Commit Graph

909 Commits

Author SHA1 Message Date
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
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
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
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
5cc55b79e0 Acceptance tests for the page size selector on the jobs list view 2020-04-02 12:50:35 -07:00
Michael Lange
770f0b7375 Repeat new pagination pattern throughout the app 2020-04-02 12:50:34 -07:00
Michael Lange
498ca21159 Reset current page when changing page size 2020-04-02 12:50:33 -07:00
Michael Lange
8c4b291e06 Replace crusty lt and gt with chevron icons 2020-04-02 12:50:32 -07:00
Michael Lange
163807fde2 Style the page size selector 2020-04-02 12:50:31 -07:00
Michael Lange
7d14e581da Add page size select to the jobs list page 2020-04-02 12:50:30 -07:00
Michael Lange
90794c1cce Page size select component 2020-04-02 12:50:29 -07:00
Michael Lange
fef1d91606 New service for storing user settings 2020-04-02 12:50:28 -07:00
Buck Doyle
7c1bc8c0c0 UI: Fix confirmation position for right-aligned TSBs (#7590)
Without this, the confirmation text was extending beyond the
edge of the page.
2020-04-02 11:58:29 -05:00
Michael Lange
cd8c92b7d4 Move beta to a tag 2020-04-01 10:49:47 -07:00
Buck Doyle
502d2734ce UI: Add localStorage persistence of exec command (#7563)
This closes #7469. Trivial thanks to localStorageProperty! 🥳
2020-04-01 08:08:42 -05:00
Michael Lange
524e3a96f8 Change CSI to Storage and mark it as beta 2020-03-31 18:21:55 -07:00
Buck Doyle
e2efb0c0f7 UI: Add exec loading template (#7566)
This closes #7460. Before this, there was an incongruous flash
of the non-exec UI during loading.
2020-03-31 13:59:43 -05:00
Buck Doyle
ce719b76cc UI: Change exec button to not show on dead jobs (#7548)
I still want to add acceptance tests for the existence
of these buttons but this change makes the exec button
for jobs behave similarly to the others.
2020-03-31 13:11:26 -05:00
Michael Lange
ab4497aa03 Account for an empty string node class 2020-03-30 17:33:45 -07:00
Michael Lange
0f07f4cc40 Add a volume facet to the clients list page 2020-03-30 17:33:44 -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
b3a23c9b07 Merge pull request #7470 from kybin/kybin-patch-1
UI: decode unicode properly in log page
2020-03-30 12:06:51 -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
Buck Doyle
557f913899 UI: Fix check for Mirage presence setting up sockets (#7497)
Without this, exec UI doesn’t work at all in the binary. I made an
unfortunate error in not copying the environment check from
app/utils/fetch.js.
2020-03-25 13:23:23 -05:00
Buck Doyle
189b52212e UI: Change determination of exec sidebar active tasks (#7491)
This closes #7476. The decomposition of computed properties
is necessary to avoid nested aggregate dependent keys; the
previous dependent key of `taskGroup` will be inadequate
when the sidebar becomes live-updating.
2020-03-25 12:08:33 -05: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
kim yongbin
339801852a UI: decode unicode properly in log page 2020-03-25 01:03:39 +09:00
Michael Lange
1bf842d148 Remove the question mark from the Volume th
This makes it consistent with other volume columns across the app.
2020-02-14 16:56:51 -08:00
Michael Lange
6024b9c1b6 Correct a test and a dependent key 2020-02-14 16:44:28 -08:00
Michael Lange
8702124fee Add volume table to the task detail page 2020-02-13 17:11:34 -08:00
Michael Lange
17a143487e Add volume requirements table to the task group page 2020-02-13 17:11:33 -08:00
Michael Lange
ed738ecc83 Add volumes column to the task row component 2020-02-13 17:11:32 -08:00
Michael Lange
fd87646973 Fix a bug where the NodeListStub API response would override existing HostVolumes in the store 2020-02-13 17:11:31 -08:00
Michael Lange
5ed87222e9 Add volume to the client row 2020-02-13 17:11:29 -08:00
Michael Lange
e5232b9ccd Add volume column to allocation row 2020-02-13 17:11:27 -08:00
Michael Lange
15c7fcfb9c Add volume column to task group row 2020-02-13 17:11:26 -08:00