Commit Graph

50 Commits

Author SHA1 Message Date
Sybren A. Stüvel 4fe11d99f6 Configurable name in dashboard
Now the title & version is also dynamically updated with Vue.
2019-02-22 16:12:41 +01:00
Sybren A. Stüvel ea368d5c9b Dashboard: added checkbox to (de)select all workers 2018-12-18 15:53:24 +01:00
Sybren A. Stüvel a2377990be Dashboard: Hide blacklist header when the blacklist is empty 2018-12-18 12:20:48 +01:00
Sybren A. Stüvel 9feccdfe4a Dashboard: reduced number of columns in worker table
The 'blacklist' toggle now toggles 'details' instead, which consists of the
blacklist and worker details (currently ID and Address).
2018-12-18 12:17:47 +01:00
Sybren A. Stüvel cfe561c79e Fix T58779: allow lazy status change requests
Status changes can now be marked as 'lazy', in which case they are only
applied when the worker has finished its current task. This only required
changes to the 'may-I-run' endpoint; it now ignores lazy requests.
2018-12-18 10:51:55 +01:00
Sybren A. Stüvel f15e445baa Dashboard: make worker blacklist visible 2018-12-17 17:08:17 +01:00
Sybren A. Stüvel 43050af48b Vue.js: no need for <tr is="worker-row"> in <script> template
The browser would pop out a `<worker-row>` element from a table because it
ejects all non-`<tr>` elements there. Apparently this doesn't happen when
the template is in a `<script type='text/x-template'>` tag, so we can
simplify.
2018-12-17 15:16:47 +01:00
Sybren A. Stüvel 5fb98d6591 Dashboard: shortening more (time display + task ID) 2018-12-17 14:05:19 +01:00
Sybren A. Stüvel 751b51a3be Dashboard: delete empty time start/end JSON fields
An empty string is an invalid value for a TimeOfDay field; it should be
null or simply not be in the JSON.
2018-12-14 12:12:38 +01:00
Sybren A. Stüvel 6f1c86f940 Dashboard: show implied schedule values between parentheses 2018-12-14 12:11:59 +01:00
Sybren A. Stüvel db920f8551 Dashboard: easy copying of schedules 2018-12-14 12:02:25 +01:00
Sybren A. Stüvel e61cf5ffe9 Dashboard: show implied values for sleep schedule 2018-12-14 11:39:07 +01:00
Sybren A. Stüvel 8bb2d6e77a Dashboard: fixed font size for html+body elements
Without this Chrome has too large a font to show all worker info on one
line.
2018-12-13 18:15:40 +01:00
Sybren A. Stüvel 1c1843a38d Dashboard: Added icon for test job 2018-12-13 18:15:40 +01:00
Sybren A. Stüvel 702a773b39 Dashboard: added link to task on Flamenco Server
The link was lost in the migration to Vue.js
2018-12-13 18:14:46 +01:00
Sybren A. Stüvel a0dfa1d0ad Dashboard: schedule GUI improvements 2018-12-13 17:28:58 +01:00
Sybren A. Stüvel 24d108b78e Deactivate sleep schedule when explicitly changing the worker state 2018-12-13 17:04:55 +01:00
Sybren A. Stüvel 7680c65daf Sleep Schedule implementation
Each worker now has a sleep schedule, which behaves in the following
way:

- When the schedule is not active, it doesn't influence the worker at
  all.
- When the schedule is active, the worker is requested to be active by
  default, unless the schedule allows it to sleep.
- When the schedule has 'days of week' set to a non-empty string, the
  worker is only sent to sleep on those days. When 'days of week' is
  empty, the worker is allowed to sleep on every day.
- The worker is allowed to sleep between the schedule's start and end
  time. Those times default to respectively the start and end of the
  day.
2018-12-13 16:49:34 +01:00
Sybren A. Stüvel 3264d6ea98 Dashboard: moved worker table to its own Vue component 2018-12-12 15:03:07 +01:00
Sybren A. Stüvel ae888af018 Dashboard: proper error message when an action request fails 2018-12-12 14:42:10 +01:00
Sybren A. Stüvel cd8ea5c865 Dashboard: use Vue shortcuts in attribute names
So `v-bind:xxx` → `:xxx` and `v-on:xxx` → `@xxx`.
2018-12-12 14:36:22 +01:00
Sybren A. Stüvel d41b842321 Dashboard: Reinstated per-worker action buttons
Andy likes them better for performing actions on only a few workers.
2018-12-12 14:35:08 +01:00
Sybren A. Stüvel f46ae78499 Dashboard: specify types for Vue component props 2018-12-12 14:33:11 +01:00
Sybren A. Stüvel 9ad3d38099 Dashboard: store selected worker IDs in local storage
This allows a user to refresh the page and retain the selection.
2018-12-12 12:10:54 +01:00
Sybren A. Stüvel 98a4e2ecf1 Big modernisation steps (bootstrap 4 + Vue.js):
- Bootstrap 4
- Rendering the dashboard with Vue.js instead of constructing the HTML
  with jQuery.
2018-12-12 12:10:54 +01:00
Sybren A. Stüvel 704e0a08c8 Added config for run mode (develop/production)
This allows us to load minified JS files by default and switch to more
dev-friendly versions while developing.
2018-12-12 11:39:12 +01:00
Sybren A. Stüvel 0b001fc312 Allow task log download from the dashboard 2018-11-30 17:29:46 +01:00
Sybren A. Stüvel e751154b0a Support worker status 'error'
This is used by the worker when its pre-task sanity check fails.
2018-11-12 12:39:12 +01:00
Sybren A. Stüvel 55261f0d62 Typo fix 2018-09-11 19:44:23 +02:00
Sybren A. Stüvel 57b18f95b8 Dashboard: Nicer styling of status 2018-09-11 19:30:43 +02:00
Sybren A. Stüvel 9b9d397dd9 Include upstream queue size on dashboard 2018-09-11 19:26:29 +02:00
Sybren A. Stüvel 1c6b391f2f Show 'last seen' timestamp in idle workers tooltip on the dashboard 2018-02-20 17:07:08 +01:00
Sybren A. Stüvel 2ce108a891 Allow erasing idle workers from the dashboard 2018-02-20 14:54:52 +01:00
Sybren A. Stüvel a4097f93e2 Removed unused code 2018-02-20 12:33:40 +01:00
Sybren A. Stüvel 6ebf5d60eb Some clarifications about variables in web setup
Also changed the layout a little bit to make the sections clearer.
2018-02-20 12:28:09 +01:00
Sybren A. Stüvel 812d3d4d50 More Firefox fixes on latest image 2018-02-09 11:55:06 +01:00
Sybren A. Stüvel cf4dfd9692 Limit display height of last-rendered image to 300 pixels. 2018-02-09 11:40:29 +01:00
Sybren A. Stüvel f09148640c Send immediate notification when browser connects to SSE events.
This fixes an incompatibility of the "latest image" server-side event
system with Firefox. Firefox really want to have an immediate event on the
SSE channel, or it'll think that the connection wasn't made properly.
2018-02-09 11:37:28 +01:00
Sybren A. Stüvel 5f9ca0a671 Fixed JS race condition & warning 2018-02-09 11:23:11 +01:00
Sybren A. Stüvel 0ea22f8dcd Dashboard: only show send-test-job action when status=testing 2017-12-15 15:36:59 +01:00
Sybren A. Stüvel e1dbc7b3bf Added creation of test tasks.
Note that they aren't handled properly yet -- a check with upstream
Flamenco Server is still performed, which results in a 404 and thus an
immediate cancel.
2017-12-15 15:24:36 +01:00
Sybren A. Stüvel e7193b6a54 Added support for worker status 'testing'
In this status, workers will not go to 'awake' when they ask for a task or
acknowledge they are working on a task by calling /may-i-run.
2017-12-14 14:57:18 +01:00
Sybren A. Stüvel 3b9e0a50d1 Fixed table stripes CSS 2017-10-20 14:39:13 +02:00
Sybren A. Stüvel 9393a2fdc4 Removed quantification from 'old workers' title.
The "over a month" was no longer valid.
2017-10-20 13:49:47 +02:00
Sybren A. Stüvel b233b8abcf Dashboard: Show offline workers with darker font colour 2017-10-20 13:32:18 +02:00
Sybren A. Stüvel d23d8adfd1 Added ability to shut down worker and acknowledge timeouts 2017-10-20 13:01:30 +02:00
Sybren A. Stüvel f0319e592e Don't show actions for offline workers. 2017-10-19 18:59:12 +02:00
Sybren A. Stüvel 01860e221e Added ability to send workers to sleep (and wake them up again)
When a status change is requested, /may-i-run/{task-id} and /task will
refuse the worker to run the task or get a new one. The newly requested
status is returned instead. This keeps happening until the worker
acknowledges the new status by a call to /ack-status-change/{ack-status}.

A sleeping worker can still get a task; there is no status checks on that.
The worker will just be marked as active then. It is up to the worker to
adhere to the status given by the Manager.

The worker can poll /status-change while sleeping to know when to wake up.
In a later version we possibly could turn this into a long poll.
2017-10-19 18:55:12 +02:00
Sybren A. Stüvel 0d868d0822 Made the colour scheme of the web interface a bit more muted. 2017-10-05 10:44:52 +02:00
Sybren A. Stüvel 64c8ede727 Changed project file layout to be standard golang project layout
This means a bit more adjustment on the part of developers that aren't
familiar with how Go does things, but it makes it more consistent and
easier to work with when on multiple Go projects.
2017-10-03 12:01:06 +02:00