Commit Graph

1218 Commits

Author SHA1 Message Date
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
Michael Lange
6af31fed7a Always pass credential in fetch requests, but also treat options reasonably
Now options can be provided without also having to remember to pass
credentials. This is convenient for abort controller signals.
2020-04-29 17:34:49 -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
Buck Doyle
edff4cc78c UI: update exec styles to match conventions (#7811) 2020-04-28 08:33:07 -05:00
Michael Lange
1b446bd3ef Merge pull request #7689 from hashicorp/ui/plumb-proxy-config-to-proxy
UI Plumb proxy config to proxy
2020-04-22 19:31:27 -07:00
Buck Doyle
77c7ed3de4 UI: Update ember-fetch to 6.7.2 (#7713)
This gets rid of this warning in the console:
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
2020-04-22 09:10:55 -05:00
Buck Doyle
9630516b4f Remove superseded note
This closes #7465.
2020-04-21 19:52:45 -07:00
Michael Lange
1e4a3cf9a1 Disable the proxy when Mirage is enabled
This is to prevent max socket connection errors that can stop
the live reload server from responding.
2020-04-21 19:52:44 -07:00
Michael Lange
78f8dac531 Use existing ember proxy config within our custom proxy 2020-04-21 19:52:43 -07:00
Michael Lange
11cbd282e0 Remove now superfluous lint-staged arguments 2020-04-09 20:46:32 -07:00
Michael Lange
ce5d77859c Upgrade Husky 2020-04-09 20:45:37 -07:00
Michael Lange
a00c5454df Upgrade lint-staged
Version 10 fixes an issue where if lint-staged fails while linting
a partially staged file, all unstaged changes will be removed from
the working tree. Now when this happens, unstaged changes will be
in the stash.
2020-04-09 20:41:35 -07:00
dependabot[bot]
41895439c0 build(deps): bump acorn from 5.7.3 to 5.7.4 in /ui (#7346)
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-04-07 10:50:21 -04:00
Michael Lange
a845c318b8 Merge pull request #7577 from hashicorp/f-ui/csi-beta-label
UI: Change CSI to Storage and mark it as beta
2020-04-06 13:21:11 -07:00
Buck Doyle
90ec5e6457 UI: add exec handling for dead jobs/task states (#7637)
This closes #7456. It hides the terminal when the job is dead and
displays an error when trying to open an exec session for a task
that isn’t running. There’s a skipped test for the latter behaviour
that I’ll have to come back for.
2020-04-06 14:08:22 -05:00
Buck Doyle
f32780355d UI: add live-updating to exec sidebar (#7499)
This closes #7454. It makes use of the existing watchable tools to
allow the exec popup sidebar to be live-updating. It also adds
alphabetic sorting of task groups and tasks.
2020-04-06 13:52:42 -05:00
Michael Lange
61a15ba223 Merge pull request #7630 from hashicorp/f-ui/csi-acceptance-tests
UI: CSI Acceptance Tests
2020-04-06 09:37:45 -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
Michael Lange
c64467320e Test coverage for the volume detail page 2020-04-04 17:13:40 -07:00
Michael Lange
eabfa3b3ed Sort allocation tables by modify index 2020-04-04 17:11:58 -07:00
Michael Lange
b6a384512d Update breadcrumb to match side menu 2020-04-04 17:11:29 -07:00
Michael Lange
b55a0e462c Fix the allocations page compoent to support multiple prop keys
It was designed to be used this way, but allocationFor has never
worked as intended 🤦
2020-04-04 10:56:12 -07:00
Michael Lange
5a84d731c0 Add page size select tests to volumes list tests 2020-04-04 09:58:34 -07:00
Michael Lange
283e112d96 Acceptance tests for the volumes list page 2020-04-03 19:28:12 -07:00
Michael Lange
0463df0e03 Page object for volumes list 2020-04-03 19:28:11 -07:00
Michael Lange
cb655b4959 Handle namespaces in the mirage handler for volumes 2020-04-03 19:28:10 -07:00
Michael Lange
227e590971 Correctly handle the namespace query param and forbidden state 2020-04-03 19:28:09 -07:00
Michael Lange
a9c57a1d1c Annotate volume row and make the tr clickable 2020-04-03 19:27:44 -07:00
Michael Lange
05d719477e Filter out volumes that don't match the chosen namespace 2020-04-03 19:27:11 -07:00
Michael Lange
d74a6c971f Sort alphabetically, A first 2020-04-03 19:26:26 -07:00
Michael Lange
98cbe43c9b Merge pull request #7574 from hashicorp/f-ui/configurable-page-sizes
UI Configurable Page Sizes
2020-04-03 16:06:17 -07:00
Mahmood Ali
4a92a27db7 ui: explicit reference to window.localStorage 2020-04-03 14:31:19 -04:00
Buck Doyle
c75657774a Remove redundant step assertion 2020-04-03 12:54:47 -05:00
Buck Doyle
dd1b2dc37d Remove redundant pause 2020-04-03 12:53:57 -05:00
Buck Doyle
2afe4441b4 Remove redundant assertions
These are more things that are already covered elsewhere.
2020-04-03 12:52:39 -05:00
Buck Doyle
4fa139a2fd Remove redundant assertions from token exec test
This only needs to check that the token is sent, the rest of
the assertions were covered by the previous test.
2020-04-03 12:35:51 -05:00
Buck Doyle
f1d9e878a7 Remove intermediate storage variable 2020-04-03 12:27:03 -05:00
Buck Doyle
4fccaaa2e3 Change to setting token directly
Most tests bypass setting the token via the UI, instead choosing
to set it in localStorage directly, because the acceptance tests
for the token UI are sufficient to exercise that part of the UI,
so this speeds up the test a bit.
2020-04-03 12:26:25 -05:00
Buck Doyle
b7999b31fb Add space 2020-04-03 12:21:44 -05: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
Michael Lange
a03009746b Refactor page-size-select page object into a reusable component 2020-04-02 15:52:44 -07:00
Michael Lange
0c23b54062 Make table foot fields consistent at all breakpoints
This effectively overrides Bulma's default field layout tweaks
at different breakpoints. This includes going from flex to block
and different font-sizes.
2020-04-02 13:41:41 -07:00
Michael Lange
a6a58ce55d Remove extranneous order property
The "default" order values as set by Bulma are different for different
breakpoints. Since this wasn't considering breakpoints, it resulted
in the unexpected reordering of pagination elements as different page
widths. Turns out removing this property gives us what we want.
2020-04-02 13:27:29 -07:00
Michael Lange
990e723c2e Apply the page size select behavior to the other pages with the page size selector 2020-04-02 12:50:37 -07:00
Michael Lange
c99214441f Factor page select tests into their own behavior 2020-04-02 12:50:36 -07:00