diff options
| author | Dan Engelbrecht <[email protected]> | 2026-04-15 20:58:32 +0200 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2026-04-15 21:00:22 +0200 |
| commit | 790eb8a75b4a059cb710ba2582036973d45375ab (patch) | |
| tree | 92eb467b02bd58b56a6d11b1388f36235c3cae14 /src/zenserver/frontend/html/pages/compute.js | |
| parent | 5.8.5-pre0 (diff) | |
| download | zen-de/dashboard-copy-button.tar.xz zen-de/dashboard-copy-button.zip | |
add dashboard copy button on select information linesde/dashboard-copy-button
Diffstat (limited to 'src/zenserver/frontend/html/pages/compute.js')
| -rw-r--r-- | src/zenserver/frontend/html/pages/compute.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/zenserver/frontend/html/pages/compute.js b/src/zenserver/frontend/html/pages/compute.js index 2eb4d4e9b..c2257029e 100644 --- a/src/zenserver/frontend/html/pages/compute.js +++ b/src/zenserver/frontend/html/pages/compute.js @@ -5,7 +5,7 @@ import { ZenPage } from "./page.js" import { Fetcher } from "../util/fetcher.js" import { Friendly } from "../util/friendly.js" -import { Table } from "../util/widgets.js" +import { Table, add_copy_button } from "../util/widgets.js" const MAX_HISTORY_POINTS = 60; @@ -352,8 +352,9 @@ export class Page extends ZenPage id, ); - // Worker ID column: monospace for hex readability + // Worker ID column: monospace for hex readability, copy button row.get_cell(5).style("fontFamily", "'SF Mono', 'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace"); + add_copy_button(row.get_cell(5).inner(), id); // Make name clickable to expand detail const cell = row.get_cell(0); @@ -524,7 +525,7 @@ export class Page extends ZenPage : q.state === "draining" ? "draining" : q.is_complete ? "complete" : "active"; - this._queues_table.add_row( + const qrow = this._queues_table.add_row( id, status, String(q.active_count ?? 0), @@ -534,6 +535,10 @@ export class Page extends ZenPage String(q.cancelled_count ?? 0), q.queue_token || "-", ); + if (q.queue_token) + { + add_copy_button(qrow.get_cell(7).inner(), q.queue_token); + } } } @@ -590,7 +595,9 @@ export class Page extends ZenPage // use monospace for readability, and show full value on hover const mono = "'SF Mono', 'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace"; row.get_cell(7).style("textAlign", "right").style("fontFamily", mono).attr("title", workerId); + if (workerId !== "-") { add_copy_button(row.get_cell(7).inner(), workerId); } row.get_cell(8).style("textAlign", "right").style("fontFamily", mono).attr("title", actionId); + if (actionId !== "-") { add_copy_button(row.get_cell(8).inner(), actionId); } } } |