Commit Graph

239 Commits

Author SHA1 Message Date
Michael Lange
2eceffaa96 Create new monitor route for clients 2020-06-16 10:23:35 -07:00
Michael Lange
7fabdd56e6 Data cannot be a field in the base class and a CP in the child classes 2020-06-15 11:37:40 -05:00
Buck Doyle
36b58a95ab Remove superfluous uses of Object.freeze
This is no longer needed!
https://guides.emberjs.com/release/upgrading/current-edition/native-classes/#toc_properties-and-fields
2020-06-15 10:15:11 -05:00
Buck Doyle
50513ea105 Convert field to overridable computed property
StatsTimeSeries defines description as a computed property,
which isn’t possible when this is a class field.
2020-06-15 10:14:36 -05:00
Buck Doyle
6adcb17fe2 Remove problem field
It appears this gets turned into a getter-only computed property
somehow, which causes problems when subclasses override it.
2020-06-15 10:14:35 -05:00
Buck Doyle
e993a71f6f Add manually-converted classes
I don’t know why the codemod ignored these files 🧐
2020-06-15 10:14:26 -05:00
Buck Doyle
ddfd9cc750 Add fixes for ESLint getter-return
…I GUESS
2020-06-10 16:18:56 -05:00
Buck Doyle
24eadd269c Add massaged results of class codemod
Manual interventions:
• decorators on the same line for service and controller
  injections and most computed property macros
• preserving import order when possible, both per-line
  and intra-line
• moving new imports to the bottom
• removal of classic decorator for trivial cases
• conversion of init to constructor when appropriate
2020-06-10 16:18:42 -05: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
756069c9a2 Remove jquery from gauge chart 2020-05-26 14:13:29 -07:00
Michael Lange
718114cb98 Remove jquery from the distribution bar chart 2020-05-26 14:11:08 -07:00
Michael Lange
6ffa836a64 Remove jquery from line-chart 2020-05-26 14:05:45 -07:00
Michael Lange
115923d890 Type-check the ForbiddenError rather than ducktype it
Going off of the error message being "Forbidden" was brittle to begin
with and no longer works with Fetch due to the error message coming from
jquery underpinnings that were unobserved by Ember Data's attempted
recreation.
2020-05-21 10:35:40 -07:00
Michael Lange
dc06b460e4 Use the AbortController provided by the fetch polyfill 2020-05-21 10:35:39 -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
dfc45f4dcd Gauge chart component 2020-05-13 08:36:04 -07:00
Michael Lange
30715b8b37 Test coverage for the plugin-allocation-row 2020-05-12 21:30:33 -07:00
Michael Lange
db8e43949d Don't double load freshly loaded allocations 2020-05-12 21:30:33 -07:00
Michael Lange
32b4e5e8ab Properly manage the lifecycle of allocations for storage nodes and controllers 2020-05-12 21:30:33 -07:00
Michael Lange
c5b1fd3aa7 Changing namespaces now situationally redirects to jobs or volumes
Changing namespaces can be done anywhere in the app even though many
Nomad resources aren't namespace-sensitive (e.g., clients, plugins).

A user changing namespaces is an intent to reset context, "now I want
to begin a task that relates to Namespace X". Where that task begins
used to always be the Jobs list, since it was the only namespace
sensitive resource. Now with CSI Volumes, "square 1" is Volumes if the
namespace is changed from a storage page.
2020-05-08 17:35:27 -07:00
Michael Lange
7c373a2340 Refactor AllocationRow qualifyAllocation
There was a missing edge case where a job is pending. I took the moment
to also refactor the code to use async/await which cleaned up the
promise chaining.
2020-05-06 17:22:42 -07:00
Michael Lange
16296f1332 New PluginAllocationRow derivative of AllocationRow 2020-05-06 17:21:46 -07:00
Michael Lange
64fa26b4b9 Separate AllocationStat component for containing the multiple states a stat tracker can be in 2020-05-06 17:21:45 -07:00
Michael Lange
d9aaaa0107 Merge pull request #7855 from hashicorp/b-ui/alloc-wrong-reserved-resources
UI: Make allocation reference own task group instead of job's task group when job versions don't match
2020-05-06 10:08:37 -07:00
Michael Lange
2c82dc9060 Comment why the allocation has to be reloaded 2020-05-01 14:27:53 -07: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
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
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
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
498ca21159 Reset current page when changing page size 2020-04-02 12:50:33 -07:00
Michael Lange
90794c1cce Page size select component 2020-04-02 12:50:29 -07: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
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
4419510652 Call out the 'down' status too, since it's a pretty bad one 2020-01-31 12:56:15 -08:00
Michael Lange
c6a677dc4a Disable options for popover and drain-popover 2020-01-30 21:29:29 -08:00
Michael Lange
4793dc9afb Replace custom parse-duration implementation with an existing lib 2020-01-23 16:34:38 -08:00
Michael Lange
413681e317 PopoverMenu integration tests 2020-01-23 16:34:32 -08:00
Michael Lange
8dadd3db46 Integration tests for the toggle component 2020-01-23 16:34:32 -08:00
Michael Lange
2e39c0a529 New toggle component 2020-01-23 16:34:27 -08:00
Michael Lange
504a7afa03 Modifiers to the two-step-button 2020-01-23 16:34:25 -08:00
Michael Lange
96522e7f53 Drain stop and update and notifications 2020-01-23 16:34:24 -08:00
Michael Lange
2ddc54e7a1 Polish for the drain popover 2020-01-23 16:34:21 -08:00
Michael Lange
faffb83d1d Extract the duration parsing into a util 2020-01-23 16:34:19 -08:00
Michael Lange
e47d255b07 Factor out the drain popover and implement its behaviors 2020-01-23 16:34:18 -08:00
Michael Lange
d401a11d0c Add triggerClass support to the popover menu 2020-01-23 16:34:18 -08:00
Michael Lange
de03d82df9 PopoverMenu component 2020-01-23 16:34:14 -08:00