Commit Graph

139 Commits

Author SHA1 Message Date
Michael Lange
84f88ecf7e Test coverage for TopoViz::Node 2020-10-15 02:54:16 -07:00
Michael Lange
611b0b3e00 FlexMasonry integration tests 2020-10-15 02:54:15 -07:00
Michael Lange
ccf022ec8b Acceptance test coverage for the submit time sorting on the periodic and parameterized detail pages 2020-09-19 12:37:38 -07:00
Michael Lange
204d726435 Test coverage for page select and submit time on periodic page 2020-09-19 12:37:38 -07:00
Michael Lange
f8a505ea2f Temporarily remove poststop from the UI
Since poststart and poststop are shipping separately, we can't ship them
both in the UI at the same time.
2020-08-31 19:32:38 -07:00
Buck Doyle
685b97ad4c Merge branch 'f-ui/poststart-poststop' of github.com:hashicorp/nomad into f-ui/poststart-poststop 2020-08-28 10:18:45 -05:00
Buck Doyle
766c2dce80 Merge branch 'master' into f-ui/poststart-poststop 2020-08-28 10:15:18 -05:00
Buck Doyle
0c9b2e417b Add exec heartbeat keepalive (#8759)
This closes #8727, thanks to @jfcantu for the suggestion.
The CLI implementation of exec already has a 10-second
heartbeat so this mirrors that:
https://github.com/hashicorp/nomad/blob/v0.12.3/api/allocations.go#L161-L173
2020-08-28 10:13:33 -05:00
Michael Lange
c7da3d377d Clean up erroneous and redundant mirage things 2020-08-27 17:58:24 -07:00
Buck Doyle
4628640e0e Fix tragique formatting 2020-08-27 09:38:34 -05:00
Buck Doyle
14bfb9a53c Add poststart and poststop lifecycle phases 2020-08-26 09:55:42 -05:00
Buck Doyle
5eddb14a33 Add component accessibility auditing and fixes (#8679)
This continues #8455 by adding accessibility audits to component integration
tests and fixing associated errors. It adds audits to existing tests rather than
adding separate ones to facilitate auditing the various permutations a
component’s rendering can go through.

It also adds linting to ensure audits happen in component tests. This
necessitated consolidating test files that were scattered.
2020-08-25 10:56:02 -05:00
Buck Doyle
02b121817c Add missing server shutdown (#8677)
This removes repeated instances of this warning from test logs:
You created a second Pretender instance while there was already one running.
2020-08-17 08:17:29 -05:00
Michael Lange
40401960cb Add integration test for line-chart annotation staggering 2020-08-06 17:37:09 -07:00
Michael Lange
8f61830f72 Integration tests for the ScaleEventsChart component 2020-08-05 12:02:22 -07:00
Michael Lange
f04b646dcb Test coverage for line chart annotations 2020-08-05 12:02:22 -07:00
Michael Lange
a5031913b0 Assert that the scale up/down indicator is not shown when the count is null 2020-07-29 19:26:32 -07:00
Michael Lange
b0830f5305 Integration tests for the scale-events-accordion component 2020-07-29 19:26:32 -07:00
Michael Lange
644bfd57ec Include the region query param on the View Raw File link in the task fs explorer 2020-07-22 13:46:38 -07:00
Buck Doyle
fc1fce6934 Change edition to Octane (#8418)
This updates the Ember edition setting to Octane, which I removed from #8319
because it required the template-only Glimmer components setting to be turned
on, which this does. These changes to templates accommodate that setting.
2020-07-13 09:26:12 -05:00
Buck Doyle
0db4324275 Update template linting and fix missed curly invocations (#8382)
This includes fixes for newer template lint rules that came along with
updating that dependency, which was necessary to be able to use
the no-curly-component-invocation rule. It also updates some curly
invocations that I missed in #8075.
2020-07-09 12:30:11 -05:00
Michael Lange
d74b661214 Merge pull request #8314 from hashicorp/f-ui/scaling-ux
UI: Scaling UI UX Improvements
2020-07-01 09:21:08 -07:00
Michael Lange
2a78133330 Persist the log stream/mode setting to localStorage 2020-06-30 17:09:52 -07:00
Michael Lange
26a7267a0d StepperInput UX improvements
- Click label to focus input
- Focusing input selects value
- Entering an invalid value reverts selection
- Entering a fractional number floors the value
2020-06-30 11:54:11 -07:00
Michael Lange
b941519352 Fix flaky task-group-row test. (#8221)
Sometimes a job would be created with a running deployment which made
the increment button disabled.

While I was finding the root cause, I also changed the waitUntil pattern
to match the StepperInput technique which is more resilient to code
changes.
2020-06-20 09:48:32 -05:00
Michael Lange
110f491c98 Test coverage for the StepperInput 2020-06-18 22:08:29 -07:00
Michael Lange
469b107a64 Test coverage for the task group row scale actions 2020-06-18 22:08:28 -07:00
Michael Lange
5bb3c434d8 Select all shortcut support for the streaming file component 2020-06-16 12:51:52 -07:00
Michael Lange
f896a622d8 Test coverage for the AgentMonitor component 2020-06-16 10:23:36 -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
Buck Doyle
67e9690b7d Convert to angle bracket invocation (#8075)
This is mostly a direct application of the ember-angle-brackets-codemod.
I manually restored newlines in multi-line component invocations, usually
preserving file line length except for now-non-positional link-to @route.

I needed to rename task to taskState in some cases to avoid Ember
Concurrency naming conflicts.
2020-06-01 14:03:56 -05:00
Buck Doyle
06baadd01e UI: add filesystem browsing for allocations (#7951)
This partially addresses #7799.

Task state filesystems are contained within a subdirectory of their
parent allocation, so almost everything that existed for browsing task
state filesystems was applicable to browsing allocations, just without
the task name prepended to the path. I aimed to push this differential
handling into as few contained places as possible.

The tests also have significant overlap, so this includes an extracted
behavior to run the same tests for allocations and task states.
2020-06-01 08:15:59 -05:00
Michael Lange
f1acc77806 Merge pull request #8035 from hashicorp/f-ui/ember-fetch
UI: Replace jQuery with fetch within Ember Data
2020-05-26 12:32:03 -07:00
Buck Doyle
b965e6a84b UI: use lazy-loading for Xterm.js (#7964)
This updates Xterm.js to 4.6.0, which includes support for reverse-wraparound
mode, so we no longer need to use a vendored dependency, which closes #7461.
The interface for accessing the buffer that’s used for test assertions changed.

With the dependency now accessed conventionally, we can have it load only when
it’s needed by an exec popup window, which closes #7516. That saves us
≈60kb compressed in the dependency bundle!
2020-05-26 09:56:25 -05:00
Michael Lange
06720bdf8e Replace nulls with empty strings to have an empty response body 2020-05-21 10:35:41 -07:00
Michael Lange
f760027ccf Test coverage for node only view of the plugin detail page 2020-05-18 17:23:54 -07:00
Michael Lange
1e7f1871bd Merge pull request #7942 from hashicorp/b-ui/csi-alloc-relationships
UI: CSI Bug, Imperatively load controller/node plugin allocations
2020-05-13 10:20:09 -07:00
Michael Lange
0a258b1a9f Test coverage for the gauge chart 2020-05-13 08:36:05 -07:00
Michael Lange
30715b8b37 Test coverage for the plugin-allocation-row 2020-05-12 21:30:33 -07:00
Buck Doyle
d87fe88be7 Migrate page objects away from jQuery (#7843)
This is part of #7834’s jQuery removal goal. It addresses a couple of jQuery-related deprecation warnings and also uses “native events mode” for ember-cli-page-object, which is needed so it doesn’t have to use jQuery via the Ember global.
2020-05-06 15:14:12 -05:00
Jasmine Dahilig
c10ac6394f UI: Add representations for task lifecycles (#7659)
This adds details about task lifecycles to allocations, task groups,
and tasks. It includes a live-updating timeline-like chart on allocations.
2020-04-30 08:15:19 -05:00
Michael Lange
9557475233 Make the no connection error on the logs page dismissable 2020-04-29 17:36:17 -07:00
Michael Lange
e5a5fc7744 Fix race condition where stdout and stderr requests can cause a no connection error
This would happen because a no connection error happens after the second request fails, but
that's because it's assumed the second request is to a server node. However, if a user clicks
stderr fast enough, the first and second requests are both to the client node. This changes
the logic to check if the request is to the server before deeming log streaming a total failure.
2020-04-29 17:36:17 -07:00
Michael Lange
e186554651 Clicking stdout/stderr when already on that tab is now a noop 2020-04-29 17:36:16 -07:00
Michael Lange
fab6fcbd88 Abort log fetch request when failing over from client to server
Typically a failover means that the client can't be reached. However, if
the client does eventually return after the timeout period, the log will
stream indefinitely. This fixes that using an API that wasn't broadly
available at the time this was first written.
2020-04-29 17:34:49 -07:00
Mahmood Ali
6021ea6d25 Merge pull request #7612 from hashicorp/b-auth-alloc-exec-ws
Authenticate alloc/exec websocket requests
2020-04-06 09:24:51 -04:00
Buck Doyle
a3645e2ce7 UI: add handling for exec command-editing keys (#7601)
This is a minimal implementation that closes #7463. It doesn’t include
true support for moving around within the command to edit using arrow
keys because it gets too complex when managing wrapping at the edge of
the terminal. Instead, arrow keys are ignored. It also ignores ^A and
^E, which are cursor manipulations that pose similar problems to arrow
keys. It does support ^U, which deletes the entire command.

It also allows a command to be pasted, which was previously unsupported.
This is accomplished by migrating from Xterm.js’s onKey handler to
onData, which is recommended here:
https://github.com/xtermjs/xterm.js/issues/2673#issuecomment-574897733

onData is a higher-level handler that issues events with the final
interpreted data instead of the individual key events. That means the
processing in this PR has changed from inspecting DOM key events to
inspecting their ASCII equivalents, which I’ve extracted into a utility
dictionary for use in tests and implementation.

One consequence of ignoring most control characters is that if you paste
a string that includes a control character, that character will be
stripped. It’s somewhat strange for compound sequences like arrow keys; 
if you run copy('/bin/b' + '\x1b[D' + 'ash') in a Javascript console and
paste what’s on the clipboard, you get "/bin/b[Dash". That’s because
the left arrow key, as in that centre portion of the string,
is represented by the escape character and a coded sequence. Stripping
the control character leaves the coded sequence as part of the paste.
That seems like an acceptable compromise vs either ignoring any pasted
string with control characters (confusing UX) or trying to interpret and
strip all such compound control sequences (difficult to be exhaustive).
2020-04-03 12:14:47 -05:00
Mahmood Ali
cad5261ec1 ui: send authentication ws handshake
Have the UI send the authentication websocket handshake message.
2020-04-03 11:49:22 -04: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
0733c1e86e Test coverage for change in resource rows 2020-02-13 17:11:30 -08:00