@andrian.yablonskyy/thub-coordinator 1.1.11 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/css/thub.css +2 -2
- package/public/js/usb-import.js +1 -1
- package/public/js/usb-scan.js +1 -1
- package/src/db/migrations/020_add_usb_scan.sql +1 -1
- package/src/services/registry.js +1 -1
- package/src/web/routes.js +1 -1
- package/views/help/_client-machines.pug +1 -1
- package/views/help/_client-setup.pug +1 -1
- package/views/mixins/resource.pug +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrian.yablonskyy/thub-coordinator",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.12",
|
|
4
4
|
"description": "TestHub Coordinator — job queue, resource registry, scheduler, heartbeat monitor, log/artifact store and web dashboard",
|
|
5
5
|
"main": "src/server.js",
|
|
6
6
|
"engines": {
|
package/public/css/thub.css
CHANGED
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/* The client details modal has up to 7 tabs (Details, the config tabs,
|
|
83
|
-
|
|
83
|
+
USB devices) — tighter padding keeps them on one row, ⚠ icons
|
|
84
84
|
included, at the modal-lg width. */
|
|
85
85
|
.thub-resource-card .nav-tabs .nav-link {
|
|
86
86
|
padding: 0.45rem 0.65rem;
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
pointer-events: auto;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
/*
|
|
129
|
+
/* USB devices: the lsusb output takes the rest of the modal's
|
|
130
130
|
height — what the tallest other tab sets, at least 12rem — and scrolls in
|
|
131
131
|
it. Its 0 basis keeps it from making the modal taller. */
|
|
132
132
|
.thub-resource-card .tab-content .tab-pane.thub-usb-pane {
|
package/public/js/usb-import.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file packages/coordinator/public/js/usb-import.js
|
|
3
|
-
* @description Dashboard: "Import to config" on the resource card's
|
|
3
|
+
* @description Dashboard: "Import to config" on the resource card's USB devices tab — updates the Config
|
|
4
4
|
* sub-tabs' device lists from the last `lsusb -tvv`, opens the first changed one, and asks to verify
|
|
5
5
|
*
|
|
6
6
|
* @author Andrian Yablonskyy
|
package/public/js/usb-scan.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file packages/coordinator/public/js/usb-scan.js
|
|
3
|
-
* @description Dashboard: the resource card's "
|
|
3
|
+
* @description Dashboard: the resource card's "USB devices" tab — Refresh asks the Client for `lsusb`,
|
|
4
4
|
* then polls until its answer arrives and shows it in place
|
|
5
5
|
*
|
|
6
6
|
* @author Andrian Yablonskyy
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
-- "
|
|
1
|
+
-- "USB devices" (resource card tab, README §10): the Client runs
|
|
2
2
|
-- `lsusb` only when an admin presses Refresh — a scan-usb command with its
|
|
3
3
|
-- next heartbeat — and posts the output back. `usb_scan` is the last result
|
|
4
4
|
-- (JSON {output, error, at}); `usb_scan_requested_at`/`_request_id` the
|
package/src/services/registry.js
CHANGED
|
@@ -625,7 +625,7 @@ function createRegistryService(db, { bus, events }){
|
|
|
625
625
|
return db.prepare('SELECT * FROM resources WHERE remove_requested_at IS NOT NULL').all().map(rowToResource);
|
|
626
626
|
}
|
|
627
627
|
|
|
628
|
-
// "
|
|
628
|
+
// "USB devices" tab: Refresh asks the Client to run `lsusb` on
|
|
629
629
|
// its next heartbeat (a scan-usb command, delivered by the caller's bus
|
|
630
630
|
// via commands). Only while it's connected — it would otherwise run
|
|
631
631
|
// whenever it next reconnects.
|
package/src/web/routes.js
CHANGED
|
@@ -616,7 +616,7 @@ function createWebRouter({ services, config }){
|
|
|
616
616
|
res.redirect(returnTo(req, '/runners'));
|
|
617
617
|
});
|
|
618
618
|
|
|
619
|
-
// "
|
|
619
|
+
// "USB devices" tab (public/js/usb-scan.js): Refresh queues a
|
|
620
620
|
// scan-usb for the Client's next heartbeat; the tab then polls the GET
|
|
621
621
|
// until the answer is in. JSON both ways — the modal stays open.
|
|
622
622
|
function usbScanView(req, r){
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
lsusb -t # USB tree
|
|
41
41
|
udevadm info -a -n /dev/ttyUSB0 | grep -m1 'ATTRS{devpath}'
|
|
42
42
|
st-info --probe # ST-Link serials
|
|
43
|
-
| Or open the runner card → #[strong
|
|
43
|
+
| Or open the runner card → #[strong USB devices] → #[strong Refresh], then #[strong Import to config].
|
|
44
44
|
li
|
|
45
45
|
| Put the devpaths into #[code hw-devices] and restart. On every start the Client writes
|
|
46
46
|
| #[code /etc/udev/rules.d/99-thub-<instance>.rules], so the devices appear as #[code /dev/thub/dut<N>-stlink|uart|usb]:
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
SW Clients have no settings of their own: they run whatever DUT image a job brings (#[code --docker-image]).
|
|
104
104
|
Admins can also edit an HW Client's devices from its runner card (#[strong ST-Link | UART | DUT USB]
|
|
105
105
|
tabs). The tabs show the config the Client runs, as it reported it at its last start, or a saved
|
|
106
|
-
change it hasn't applied yet. #[strong
|
|
106
|
+
change it hasn't applied yet. #[strong USB devices → Import to config] fills them from the host's #[code lsusb].
|
|
107
107
|
The card's #[strong Export] and #[strong Import] icons download a Client's config file (never its
|
|
108
108
|
#[code joinKey]) and apply one to it. An older HW Client takes only the file's #[code hw-devices].
|
|
109
109
|
There's no ST-Link serial field: the job's #[code --command] picks the probe
|
|
@@ -332,7 +332,7 @@ mixin resourceCard(r, groupsById, returnTo)
|
|
|
332
332
|
data-bs-target=`#rc-${r.id}-usb`
|
|
333
333
|
aria-controls=`rc-${r.id}-usb`
|
|
334
334
|
aria-selected="false"
|
|
335
|
-
)
|
|
335
|
+
) USB devices
|
|
336
336
|
|
|
337
337
|
.tab-content
|
|
338
338
|
.tab-pane.fade.show.active(id=`rc-${r.id}-details` role="tabpanel" aria-labelledby=`rc-${r.id}-details-tab` tabindex="0" data-live=`rc-details-${r.id}`)
|
|
@@ -346,7 +346,7 @@ mixin resourceCard(r, groupsById, returnTo)
|
|
|
346
346
|
.tab-pane.fade.thub-usb-pane(id=`rc-${r.id}-usb` role="tabpanel" aria-labelledby=`rc-${r.id}-usb-tab` tabindex="0")
|
|
347
347
|
+usbScanPane(r)
|
|
348
348
|
|
|
349
|
-
//- "
|
|
349
|
+
//- "USB devices" (resource card tab): the Client's `lsusb`, run
|
|
350
350
|
//- only on Refresh (admins; public/js/usb-scan.js fetches and fills it in).
|
|
351
351
|
mixin usbScanPane(r)
|
|
352
352
|
- const offline = r.status === 'OUT_OF_SERVICE' || !r.last_heartbeat_at
|