diff --git a/backend/resources/app/templates/graph-console.tmpl b/backend/resources/app/templates/graph-console.tmpl index 8286830719..ad4b7a1aa4 100644 --- a/backend/resources/app/templates/graph-console.tmpl +++ b/backend/resources/app/templates/graph-console.tmpl @@ -18,7 +18,7 @@ Graph Console

← Back to debug

-
+
Load graph from Penpot @@ -51,9 +51,12 @@ Graph Console
Loaded session ({{session.loaded-at}}) -

- File: {{session.name}}
+

+ File: {{session.name}} +
Revisions: ingested at {{session.revn}} · graph now {% if session.graph-revn %}{{session.graph-revn}}{% else %}{{session.revn}}{% endif %} @@ -61,7 +64,7 @@ Graph Console Graph size:
Schema: {{session.schema-version}}

-

+

Feed: connecting…

@@ -254,6 +257,8 @@ Graph Console if (file.id === fileId) { penpotLink.href = "/#/workspace/" + project.id + "/" + file.id; penpotLink.title = "Open in Penpot"; + const crumbs = document.getElementById("graph-file-crumbs"); + if (crumbs) crumbs.textContent = team.name + " › " + project.name + " › "; } }); }); @@ -1096,14 +1101,18 @@ Graph Console // Session-fieldset size line stays live even through skipped // repaints (unlike the status line under the canvas); hover // shows per-table counts. + // bm-bytes = the session DB's buffer-manager usage (CALL + // bm_info()), i.e. actual resident memory; shown next to the + // file name. Floor-dominated: the wide slice-3 schema costs + // ~115 MiB before any data. + const bmEl = document.getElementById("graph-bm"); + if (bmEl && data["bm-bytes"]) { + bmEl.textContent = "(" + (data["bm-bytes"] / 1048576).toFixed(1) + " MiB)"; + } const sizeEl = document.getElementById("graph-size"); if (sizeEl) { - // bm-bytes = the session DB's buffer-manager usage (CALL - // bm_info()), i.e. actual resident memory, not an estimate. - const bm = data["bm-bytes"]; sizeEl.textContent = data.nodes.length + " nodes, " - + data.edges.length + " edges" - + (bm ? " (" + (bm / 1048576).toFixed(1) + " MiB)" : ""); + + data.edges.length + " edges"; const counts = {}; data.nodes.forEach(function (n) { counts[n.table] = (counts[n.table] || 0) + 1; @@ -1328,7 +1337,12 @@ Graph Console const changesCell = document.createElement("td"); revnCell.textContent = String(revn); - changesCell.textContent = summary; + // add-obj / del-obj wear the diff-mark colors of the canvas. + changesCell.innerHTML = escapeHtml(summary) + .replace(/\badd-obj\b/g, + 'add-obj') + .replace(/\bdel-obj\b/g, + 'del-obj'); row.appendChild(revnCell); row.appendChild(changesCell); changelogBody.appendChild(row);