@andrian.yablonskyy/thub-coordinator 1.0.28 → 1.0.29

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrian.yablonskyy/thub-coordinator",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
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": {
@@ -337,11 +337,8 @@ mixin resourceCard(r, groupsById, returnTo)
337
337
  .tab-pane.fade(id=`rc-${r.id}-config` role="tabpanel" aria-labelledby=`rc-${r.id}-config-tab` tabindex="0")
338
338
  dl.row.mb-0
339
339
  +rebootScheduleRow(r, returnTo)
340
- if user.role === 'admin'
341
- .modal-footer
342
- +rebootButton(r, returnTo)
343
340
 
344
- //- Reboot the Client's host now (card footer): confirmed first — naming the
341
+ //- Reboot the Client's host now (card's Actions row, icon only): confirmed first — naming the
345
342
  //- job that gets canceled, if one is running — then sent with the Client's
346
343
  //- next heartbeat. Disabled while it's offline or has no reboot helper.
347
344
  mixin rebootButton(r, returnTo)
@@ -349,12 +346,11 @@ mixin rebootButton(r, returnTo)
349
346
  - const unsupported = r.capabilities && r.capabilities.rebootSupported === false
350
347
  - const why = offline ? 'Offline — a Client can only be rebooted while connected' : unsupported ? "This host has no reboot helper — reinstall the Client as root" : null
351
348
  if why
352
- span.d-inline-block(tabindex="0" data-bs-toggle="tooltip" data-bs-title=why)
353
- button.btn.btn-outline-danger(type="button" disabled style="pointer-events: none;")
354
- i.bi.bi-bootstrap-reboot.me-1
355
- | Reboot
349
+ span.d-inline-block.ms-1(tabindex="0" data-bs-toggle="tooltip" data-bs-title=`Reboot unavailable: ${why}`)
350
+ button.btn.btn-sm.btn-outline-danger(type="button" disabled style="pointer-events: none;" aria-label="Reboot")
351
+ i.bi.bi-power
356
352
  else
357
- form(
353
+ form.d-inline.ms-1(
358
354
  method="post"
359
355
  action=`/resources/${r.id}/reboot`
360
356
  data-confirm=r.activeJob
@@ -365,9 +361,13 @@ mixin rebootButton(r, returnTo)
365
361
  data-confirm-dismiss="Don't reboot"
366
362
  )
367
363
  input(type="hidden" name="returnTo" value=returnTo)
368
- button.btn.btn-outline-danger(type="submit")
369
- i.bi.bi-bootstrap-reboot.me-1
370
- | Reboot
364
+ button.btn.btn-sm.btn-outline-danger(
365
+ type="submit"
366
+ aria-label=`Reboot ${r.name}'s host`
367
+ data-bs-toggle="tooltip"
368
+ data-bs-title=r.activeJob ? `Reboot the host (cancels running job ${r.activeJob.id})` : 'Reboot the host'
369
+ )
370
+ i.bi.bi-power
371
371
 
372
372
  //- The resource card's Details tab.
373
373
  mixin resourceDetails(r, groupsById, returnTo, local, external)
@@ -422,3 +422,4 @@ mixin resourceDetails(r, groupsById, returnTo, local, external)
422
422
  dt.col-sm-4 Actions
423
423
  dd.col-sm-8.mb-0
424
424
  +resourceActions(r, returnTo)
425
+ +rebootButton(r, returnTo)