Commit Graph

112 Commits

Author SHA1 Message Date
Buck Doyle
9b5c428a62 Add handling for allocation-less exec URL (#8856)
This closes #8769. This new-window-opening code is not possible
to properly exercise within Ember’s testing facilities 😞
2020-09-15 14:48:29 -05:00
Michael Lange
3147d5c649 Sort keys when converting objects to arrays for stable model fragments 2020-09-04 19:44:21 -07:00
Buck Doyle
6f08becdae Add common serialiser abstractions (#8634)
This extracts some common API-idiosyncracy-handling patterns from model serialisers into properties that are processed by the application serialiser:

* arrayNullOverrides converts a null property value to an empty array
* mapToArray converts a map to an array of maps, using the original map keys as Name properties on the array maps
* separateNanos splits nanosecond-containing timestamps into millisecond timestamps and separate nanosecond properties
2020-08-20 12:14:49 -05:00
Michael Lange
f9cb2ff214 Unit test coverage for the ScaleEventsChart data domain logic 2020-08-05 12:02:22 -07:00
Michael Lange
9882614aa5 Test coverage for the deployment adapter action 2020-07-21 09:02:39 -07:00
Michael Lange
4afedbd06a Add region coverage to node adapter action tests 2020-07-21 09:02:39 -07:00
Michael Lange
4e152a75f5 Test all allocation adapter actions with and without a region
This involves a refactor to prevent immense verbosity.
2020-07-21 09:00:21 -07:00
Michael Lange
08bd435052 Test region query param for job adapter actions 2020-07-21 09:00:20 -07:00
Michael Lange
6bfebe2321 Refactor job adapter test to simplify setting up region and namespace state 2020-07-21 09:00:20 -07:00
Buck Doyle
39d3174207 Add specificity to exec allocation URL generation (#8463)
Thanks to @notnoop for this UX improvement suggestion.
The allocation’s task group is always known, so it
might as well be preselected in the sidebar when the
exec window opens. Also, if the task group only has
one task, might as well preselect it too.
2020-07-20 16:07:39 -05:00
Buck Doyle
fe445a0b27 Improve global search UX (#8249)
This updates the look of the search control, adds a hint about the slash
shortcut, adds highlighting of fuzzy search results, and addresses a few
edge case UX failures. It moves to using a fork of Ember Power Select
to handle an edge case where pressing escape would put the control
in an undesirable active-but-not-open state.
2020-06-25 08:51:52 -05:00
Michael Lange
7fec4d8bc5 Add canScale ability for jobs 2020-06-18 22:08:28 -07:00
Buck Doyle
11d80ae489 Add Ember ESLint plugin (#8134)
This is extracted from #8094, where I have run into some snags. Since
these ESLint fixes aren’t actually connected to the Ember 3.16 update
but involve changes to many files, we might as well address them
separately. Where possible I fixed the problems but in cases where
a fix seemed too involved, I added per-line or -file exceptions.
2020-06-09 16:03:28 -05:00
Michael Lange
e49d4e5a81 Adjust header case, which changed with the migration to fetch 2020-05-21 10:35:40 -07:00
Michael Lange
505510915b Replace XHRToken with AbortController 2020-05-21 10:35:39 -07:00
Michael Lange
0a258b1a9f Test coverage for the gauge chart 2020-05-13 08:36:05 -07:00
Buck Doyle
8c3a210839 Add ACL-checking to turn off exec button (#7919)
This closes #7453. It adds an abstraction to handle the common
needs of ability-determination.
2020-05-11 14:43:17 -05:00
Michael Lange
59636adace Add embedded task group to allocation to reference when allocation is historical 2020-05-01 14:30:02 -07:00
Buck Doyle
d913f05503 UI: Fix exec popup link for job id ≠ name (#7815)
This closes #7814. It makes URL-generation more central and changes
the exec URL to include job id instead of name.
2020-04-29 07:54:04 -05:00
Michael Lange
f6ed101740 Fix flaky serializer test 2020-04-01 14:54:05 -07:00
Michael Lange
c30a153d1f Use new text encoder for stream frames
This pattern was introduced with Exec and fixes the multibyte encoding
issue that the native window.atob has.
2020-03-30 12:50:43 -07:00
Michael Lange
5f2de59773 Guard against a null value for the HostVolumes hash
When a node has no host volumes, the API response will
have a null value for the HostVolumes attribute, which
in turn becomes a null value instead of an empty array
in the store. This protects against that, ensuring host
volumes is always an array.
2020-03-26 09:54:59 -07:00
Michael Lange
508404ccba UI: Support for CSI (#7446)
Closes #7197 #7199

Note: Test coverage is limited to adapter and serializer unit tests. All
acceptance tests have been stubbed and all features have been manually
tested end-to-end.

This represents Phase 1 of #6993 which is the core workflow of CSI in
the UI. It includes a couple new pages for viewing all external volumes
as well as the allocations associated with each. It also updates
existing volume related views on job and allocation pages to handle both
Host Volumes and CSI Volumes.
2020-03-25 07:51:26 -05:00
Buck Doyle
27df92a967 UI: add exec terminal (#6697)
This connects Xterm.js to a Nomad exec websocket so people
can interact on clients via live sessions. There are buttons on
job, allocation, task group, and task detail pages that open a
popup that lets them edit their shell command and start a
session.

More is to come, as recorded in issues.
2020-03-24 18:22:16 -05:00
Michael Lange
4fce8b4a54 Improve the node serializer tests 2020-02-13 17:42:41 -08:00
Michael Lange
5f621e2d68 Data layer for Host Volumes in the UI 2020-02-13 17:11:22 -08:00
Michael Lange
f5662817ff Account for disabled ACLs in ability tests 2020-01-31 09:41:36 -08:00
Michael Lange
fbb137bdb2 Refactor ability tests to use a setup hook for ability lookup 2020-01-30 21:29:21 -08:00
Michael Lange
88d646b48d Add an ability for client permissions 2020-01-30 21:29:19 -08:00
Michael Lange
4793dc9afb Replace custom parse-duration implementation with an existing lib 2020-01-23 16:34:38 -08:00
Michael Lange
93eaaab77e New test coverage for the drain capabilities 2020-01-23 16:34:34 -08:00
Michael Lange
da576bc805 Refactor parseDuration to support multi-character units 2020-01-23 16:34:20 -08:00
Michael Lange
6f6b9c2443 Test coverage for the parse duration util 2020-01-23 16:34:20 -08:00
Michael Lange
4d05f53f1d cancelDrain adapter method 2020-01-23 16:34:10 -08:00
Michael Lange
0b031f0b27 Update drain methods to properly wrap DrainSpec params 2020-01-23 16:34:09 -08:00
Michael Lange
4ddcd6044e drain and forceDrain adapter methods 2020-01-23 16:34:09 -08:00
Michael Lange
649be7f599 Implement eligibility toggling in the data layer 2020-01-23 16:34:07 -08:00
Buck Doyle
3adb3cd1fe ui: Change Run Job availability based on ACLs (#5944)
This builds on API changes in #6017 and #6021 to conditionally turn off the
“Run Job” button based on the current token’s capabilities, or the capabilities
of the anonymous policy if no token is present.

If you try to visit the job-run route directly, it redirects to the job list.
2020-01-20 14:57:01 -06:00
Michael Lange
24b0ef6a1b Light test coverage for the stream-logger class 2019-12-05 00:19:36 -08:00
Buck Doyle
882a0210fe UI: Update Ember to 3.12 LTS (#6419)
This is mostly deprecation fixes and blueprint changes. There
are some dependency updates too; the changes to Ember
Basic Dropdown necessitated changing it to angle bracket
component invocation. The conversion of the rest of the
templates will happen separately.
2019-10-15 13:32:58 -05:00
Buck Doyle
2364fb2da1 UI: Add creation time to evaluations table (#6050) 2019-08-22 08:11:24 -05:00
Michael Lange
c29d836dd9 Merge pull request #5871 from hashicorp/f-ui/alloc-fs
UI: Allocation file system explorer
2019-08-20 10:18:23 -07:00
Michael Lange
be5c88fd4f Remove errant server logging line 2019-07-31 01:40:39 -07:00
Michael Lange
07f1c89cc5 Use the stream decode util and never opt to use the plain query param 2019-07-30 17:22:45 -07:00
Michael Lange
a21ae52783 Move common stream frame decoding to a util 2019-07-30 17:22:44 -07:00
Buck Doyle
2152d57df3 UI: Add IPv6 bracket-wrapping to network serializer (#6007)
This addresses the issue raised by @pznamensky in #5966.
2019-07-30 16:58:01 -05:00
Michael Lange
d33f4bfd49 Acceptance testing for allocation lifecycle 2019-05-21 09:24:19 -07:00
Michael Lange
69c6c34afa Support task restarting in the allocation adapter 2019-05-21 09:24:17 -07:00
Michael Lange
203b54b246 Move addToPath to its own util 2019-05-20 11:52:47 -07:00
Michael Lange
3c1de2df91 Standardize on Abort over Cancel 2019-05-20 11:08:16 -07:00