Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1545,6 +1545,10 @@ def get_filesystem_blocks():
zone_writing = int(round(writing_blocks_total * zone_write_share))
zone_writing = max(0, min(zone_used, zone_writing))
zone_writing_total += zone_writing
inode_pressure = int(max(0, min(
100,
round((z["activity"] * 2.6) + (zone_writing * 0.9) + (local_used_ratio * 38.0))
)))

cell_index = 0
for r in range(row_start, row_end + 1):
Expand Down Expand Up @@ -1578,14 +1582,19 @@ def get_filesystem_blocks():
"row_end": row_end,
"activity": int(z["activity"]),
"used_percent": round(local_used_ratio * 100.0, 1),
"writing_blocks": zone_writing
"writing_blocks": zone_writing,
"inode_pressure": inode_pressure
})

writing_blocks = sum(1 for b in blocks if b["state"] == "writing")

FILESYSTEM_PREV["timestamp"] = now
FILESYSTEM_PREV["write_bytes"] = write_bytes

inode_pressure_global = 0
if zones:
inode_pressure_global = int(round(sum(int(z.get("inode_pressure", 0)) for z in zones) / len(zones)))

return {
"timestamp": datetime.now().isoformat(),
"rows": rows,
Expand All @@ -1598,7 +1607,8 @@ def get_filesystem_blocks():
"free_gb": free_gb,
"used_percent": round(used_percent, 2),
"write_bps": round(write_bps, 2),
"writing_blocks": writing_blocks
"writing_blocks": writing_blocks,
"inode_pressure": inode_pressure_global
}
}

Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ <h2>Linux Kernel Ring 0 Visualization</h2>
<script src="/static/js/kernel-dna.js?v=23"></script>
<script src="/static/js/network-stack.js?v=6"></script>
<script src="/static/js/devices-belt.js?v=14"></script>
<script src="/static/js/crypto-belt.js?v=29"></script>
<script src="/static/js/filesystem-map.js?v=3"></script>
<script src="/static/js/crypto-belt.js?v=31"></script>
<script src="/static/js/filesystem-map.js?v=10"></script>
<script src="/static/js/kernel-context-menu.js?v=25"></script>
<!-- 3D visualization script - DISABLED -->
<!-- <script src="/static/js/proc-3d-visualization.js"></script> -->
Expand Down
24 changes: 13 additions & 11 deletions static/js/crypto-belt.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@
getCompetitionPayload(meta) {
const selected = String(this.selectedCompetitionAlgorithm || 'AES').toLowerCase();
const groups = meta?.algorithm_competitions || null;
if (groups && groups[selected]) return groups[selected];

Check warning on line 552 in static/js/crypto-belt.js

View workflow job for this annotation

GitHub Actions / security

Generic Object Injection Sink

Check warning on line 552 in static/js/crypto-belt.js

View workflow job for this annotation

GitHub Actions / security

Generic Object Injection Sink
return meta?.algorithm_competition || {
request: this.selectedCompetitionAlgorithm,
implementations: [],
Expand All @@ -561,7 +561,7 @@
getDecisionPipelinePayload(meta) {
const selected = String(this.selectedCompetitionAlgorithm || 'AES').toLowerCase();
const groups = meta?.crypto_decision_pipelines || null;
if (groups && groups[selected]) return groups[selected];

Check warning on line 564 in static/js/crypto-belt.js

View workflow job for this annotation

GitHub Actions / security

Generic Object Injection Sink

Check warning on line 564 in static/js/crypto-belt.js

View workflow job for this annotation

GitHub Actions / security

Generic Object Injection Sink
return meta?.crypto_decision_pipeline || {
request: this.selectedCompetitionAlgorithm,
request_origin: 'user/kernel request',
Expand Down Expand Up @@ -1032,8 +1032,8 @@
.attr('cx', cx)
.attr('cy', cy)
.attr('r', radius)
.style('fill', isSelected ? classAccent[cls] : 'rgba(18, 24, 32, 0.92)')

Check warning on line 1035 in static/js/crypto-belt.js

View workflow job for this annotation

GitHub Actions / security

Generic Object Injection Sink
.style('stroke', isSelected ? classAccent[cls] : classAccent[cls])

Check warning on line 1036 in static/js/crypto-belt.js

View workflow job for this annotation

GitHub Actions / security

Generic Object Injection Sink

Check warning on line 1036 in static/js/crypto-belt.js

View workflow job for this annotation

GitHub Actions / security

Generic Object Injection Sink
.style('stroke-width', isSelected ? 1.55 : 0.9)
.style('opacity', isSelected ? 0.98 : (isClassFiltered ? 0.95 : 0.82))
.style('cursor', 'pointer')
Expand All @@ -1048,7 +1048,7 @@
.attr('cy', cy)
.attr('r', radius + 3.5)
.style('fill', 'none')
.style('stroke', classAccent[cls])

Check warning on line 1051 in static/js/crypto-belt.js

View workflow job for this annotation

GitHub Actions / security

Function Call Object Injection Sink
.style('stroke-width', 0.85)
.style('opacity', 0.7);
}
Expand Down Expand Up @@ -1092,10 +1092,11 @@
const panelX = Math.floor(width * 0.41) + 10;
const maxSafeW = Math.max(300, rightColumnX - panelX - 16);
const panelW = Math.max(330, Math.min(Math.min(470, Math.floor(width * 0.3)), maxSafeW));
const panelH = 238;
const decisionPanelY = Math.max(450, Math.floor(height * 0.52));
const materialCardH = 226;
const panelY = Math.min(height - panelH - 22, decisionPanelY + materialCardH + 16);
const panelY = decisionPanelY + materialCardH + 16;
const maxPanelH = Math.max(120, height - panelY - 22);
const panelH = Math.min(238, maxPanelH);
const panel = layer.append('g').attr('class', 'crypto-entropy-cloud');

panel.append('rect')
Expand Down Expand Up @@ -1146,7 +1147,7 @@
const cloudY = panelY + 86;
// Keep particle viewport compact so right-side source metrics fit comfortably.
const cloudW = Math.max(130, panelW - 220);
const cloudH = panelH - 100;
const cloudH = Math.max(60, panelH - 102);
panel.append('rect')
.attr('x', cloudX)
.attr('y', cloudY)
Expand Down Expand Up @@ -1178,7 +1179,8 @@
const keyRate = Number(entropy.key_birth_rate_est || 0);
const keyNodes = Math.max(1, Math.min(5, Math.round(keyRate / 2.2)));
const keyBaseX = panelX + panelW - 110;
const keyBaseY = panelY + 112;
const srcY = panelY + panelH - 66;
const keyBaseY = srcY - 28;
panel.append('text')
.attr('x', keyBaseX)
.attr('y', keyBaseY - 12)
Expand Down Expand Up @@ -1210,7 +1212,6 @@
.style('stroke-opacity', 0.7);

const srcX = panelX + panelW - 158;
const srcY = panelY + 152;
const sourceBarX = srcX + 70;
const sourceBarW = Math.max(64, Math.min(76, panelX + panelW - sourceBarX - 8));
panel.append('text')
Expand Down Expand Up @@ -1274,8 +1275,9 @@
const queueH = 86;
const offloadH = 116;
const totalH = clientsH + queueH + offloadH + (gap * 2);
// Keep stage-1 HUD fully visible even on shorter viewports.
const baseY = Math.max(180, height - totalH - 20);
// Align left stage stack with Algorithm Material Card top level.
const decisionPanelY = Math.max(450, Math.floor(height * 0.52));
const baseY = Math.min(decisionPanelY, Math.max(180, height - totalH - 20));
const isAllSelected = this.selectedClientFilters.size === 0;

const drawPanelShell = (x, y, w, h, title) => {
Expand Down Expand Up @@ -1489,9 +1491,9 @@
}

drawNode(group, x, y, label, level, intensity, palette, emphasis) {
const width = Math.min(Math.max(150, String(label).length * 8 + 28), 250);
const height = 34;
const radius = 8;
const width = Math.min(Math.max(132, String(label).length * 7 + 24), 220);
const height = 30;
const radius = 7;
const lineColor = emphasis ? palette.accent : (intensity > 1.2 ? palette.accent : palette.stroke);
const fillColor = level === 'crypto' ? '#11161f' : palette.fill;

Expand All @@ -1513,7 +1515,7 @@
.attr('text-anchor', 'middle')
.attr('dominant-baseline', 'middle')
.style('font-family', 'Share Tech Mono, monospace')
.style('font-size', '11px')
.style('font-size', '10px')
.style('letter-spacing', '0.35px')
.style('fill', emphasis ? '#ffffff' : '#eef3fb')
.text(String(label).toUpperCase());
Expand Down
Loading
Loading