Commit Graph

147 Commits

Author SHA1 Message Date
Jai Bhagat
bd2558d507 fix: re-order multiselect and search boxes 2021-11-20 14:48:28 -05:00
Luiz Aoqui
551e3940ca ui: upgrade sass 1.32.6 -> 1.43.4 2021-11-05 18:09:19 -04:00
Luiz Aoqui
d4c3989e2a Update job details box (#11288) 2021-10-12 16:36:10 -04:00
Jai
0564f9fa68 System Batch UI, Client Status Bar Chart and Client Tab page view (#11078) 2021-10-07 17:11:38 -04:00
Michael Lange
92391683da ui: Update namespaces design (#10444)
This rethinks namespaces as a filter on list pages rather than a global setting.

The biggest net-new feature here is being able to select All (*) to list all jobs
or CSI volumes across namespaces.
2021-04-29 15:00:59 -05:00
Buck Doyle
911b613693 ui: Change global search to use fuzzy search API (#10412)
This updates the UI to use the new fuzzy search API. It’s a drop-in
replacement so the / shortcut to jump to search is preserved, and
results can be cycled through and chosen via arrow keys and the
enter key.

It doesn’t use everything returned by the API:
* deployments and evaluations: these match by id, doesn’t seem like
  people would know those or benefit from quick navigation to them
* namespaces: doesn’t seem useful as they currently function
* scaling policies
* tasks: the response doesn’t include an allocation id, which means they
  can’t be navigated to in the UI without an additional query
* CSI volumes: aren’t actually returned by the API

Since there’s no API to check the server configuration and know whether
the feature has been disabled, this adds another query in
route:application#beforeModel that acts as feature detection: if the
attempt to query fails (500), the global search field is hidden.

Upon having added another query on load, I realised that beforeModel was
being triggered any time service:router#transitionTo was being called,
which happens upon navigating to a search result, for instance, because
of refreshModel being present on the region query parameter. This PR
adds a check for transition.queryParamsOnly and skips rerunning the
onload queries (token permissions check, license check, fuzzy search
feature detection).

Implementation notes:

* there are changes to unrelated tests to ignore the on-load feature
  detection query
* some lifecycle-related guards against undefined were required to
  address failures when navigating to an allocation
* the minimum search length of 2 characters is hard-coded as there’s
  currently no way to determine min_term_length in the UI
2021-04-28 13:31:05 -05:00
Buck Doyle
d0f4750f51 Add job version revert buttons (#10336)
This adds a Revert two-step button to the JobVersions component for
not-current versions, which redirects to the overview on success. It
checks the job version before and after reversion to mitigate the edge
case where reverting to an otherwise-identical version has no effect, as
discussed in #10337.

It uses existing facilities for handling other errors and disabling the
button when permissions are lacking.
2021-04-20 08:33:16 -05:00
Buck Doyle
7af5afb58d Add exchange of one-time token on UI load (#10066)
This adds UI support for receiving the one-time token passed via query parameter, as in #10134
and related PRs, and exchanging it for its corresponding secret ID. When this works, it’s mostly
invisible, with a brief flash of the OTT onscreen.

The authentication failure message now suggests the -authenticate flag.

When OTT exchange fails, it shows a whole-page error.

This includes a known UX shortcoming in that the OTT will not disappear from the URL when an
identifier is specified on the command line, like nomad ui -authenticate jobname. The goal is to
address that shortcoming in a forthcoming pull request.
2021-04-01 13:21:30 -05:00
Buck Doyle
3d9464023d Update to v4 of Ember Power Select (#10226)
This closes #10146.

Because of cibernox/ember-power-select#1203, which documents
the current impossibility of attaching test selectors to a
PowerSelect invocation, this uses test selectors on parent
containers instead, occasionally adding wrappers when needed.
I chose to leave the existing test selectors in the hopes that
we can return to using them eventually, but I could easily
remove them if it seems like extra noise now.

Presumably for the same reason, @class no longer works, so
this adjusts the scoping of global search CSS to preserve the style
of the search control.

I also included an update to the latest version of
ember-test-selectors, since we were far behind and I tried
that before finding the aforelinked issue.

Finally, this replaces ember-cli-uglify with ember-cli-terser to address
production build failures as described at ember-cli/ember-cli#9290.
2021-03-26 08:55:12 -05:00
Michael Lange
17cf4ad20e Improved language around what the client stat charts represent 2021-03-24 13:52:52 -07:00
Buck Doyle
d98265d954 Add button to fail running deployments (#9831)
This closes #8744 and #9826.

It necessitated some customisation options for TwoStepButton. One is inlineText, which puts the confirmation text in the same line as the buttons. Also, there was a single-use configuration option named isInfoAction that I removed in favour of passing a set of class configuration options like this:

                @classes={{hash
                  idleButton="is-warning"
                  confirmationMessage="inherit-color"
                  cancelButton="is-danger is-important"
                  confirmButton="is-warning"}}
2021-02-10 08:38:37 -06:00
Michael Lange
ee58aeaceb Clip long namespace names but make sure to keep the full name in the title attribute 2021-01-22 13:18:15 -08:00
Buck Doyle
5efc15954a Add DAS namespaces toggle and fix empty card bug (#9337)
This builds on filtering to allow the optimize page to show recommendations
for the active namespace vs all namespaces. If turning off the toggle causes
the summary from the active card to become excluded from the filtered list,
the active summary changes, as with the facets.

It also includes a fix for this bug:
https://github.com/hashicorp/nomad/pull/9294#pullrequestreview-527748994
2020-11-30 08:18:44 -06:00
Michael Lange
edd296ff51 Revert "Temporarily remove poststop from the UI"
This reverts commit f8a505ea2f.
2020-11-12 09:16:52 -08:00
Michael Lange
a69eb82cfc Show dismissable no live updating notice on the topology page 2020-11-04 19:25:12 -08:00
Michael Lange
3cb5bbb0f8 Show a partial view notice when ACLs are enabled and the mgmt token isn't being used 2020-11-04 15:24:34 -08:00
Buck Doyle
ba17e2191b Add DAS subroute and copy button (#9201)
This continues iteration on the DAS UI by adding the ability to directly
navigate to a recommendation summary by (namespaced) slug and a copy
button for the direct navigation link.

It includes a change to CopyButton allowing it to take a block that’s
rendered within the button.

It also changes some instances of multi-relationship traversal to use
in-summary attributes, such as summary.jobNamespace instead of
summary.job.namespace.name.
2020-11-04 12:22:24 -06:00
Michael Lange
5411ed830e Fix the raw 'blue' in recommendation cards to use '$blue' 2020-11-02 13:29:44 -08:00
Buck Doyle
828487352b Add DAS UI code from enterprise (#9192)
This is a few combined iterations on the DAS feature.
2020-10-29 07:46:42 -05:00
Michael Lange
f69e3a1e2b Merge pull request #9167 from hashicorp/f-ui/topo-viz-refinements
UI: topo viz refinements
2020-10-26 10:51:31 -07:00
Michael Lange
8d8f9aaa28 Show the nomad agent version of the agent the UI is served from 2020-10-25 23:52:06 -07:00
Michael Lange
9c7bee8a01 Redo column widths on the topology page.
Now the info panel has a fixed width and the TopoViz will display as a
single column if the TopoViz column is too narrow for two columns.
2020-10-23 14:17:03 -07:00
Michael Lange
6d8192c065 Truncate text in the topo viz info panel 2020-10-23 14:17:03 -07:00
Buck Doyle
7c7b1131f0 Remove logo spin for prefers-reduced-motion (#9128)
Spinning is one of the triggers mentioned on this page:
https://webkit.org/blog/7551/responsive-design-for-motion/

Thanks to @fivetanley for mentioning that this exists.
2020-10-20 11:52:15 -05:00
Buck Doyle
69605fc3d4 Update loading spinner to be logo-based (#9106)
Thanks to @mikehobi, whose work here this is adapted from:
https://icons8.com/cssload/en/3d-loaders
2020-10-15 16:05:58 -05:00
Michael Lange
229fa293d0 Treat legend term pairs as single wrapping elements 2020-10-15 10:30:34 -07:00
Michael Lange
bb68a14cbc Improved curves for allocation associations 2020-10-15 02:54:15 -07:00
Michael Lange
c152ccb945 New FlexMasonry component implements a masonry layout using flexbox 2020-10-15 02:54:15 -07:00
Michael Lange
3cd464d03c Updated alloc and cluster details on topo page 2020-10-15 02:54:14 -07:00
Michael Lange
f5c3d0e0a7 Super rough allocation details, needs some style love 2020-10-15 02:54:14 -07:00
Michael Lange
c2b7f7c073 Add cluster details to the topology page 2020-10-15 02:54:13 -07:00
Michael Lange
36df145da5 Fleshing out the first prototype of the topology visualization 2020-10-15 02:54:13 -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
14bfb9a53c Add poststart and poststop lifecycle phases 2020-08-26 09:55:42 -05:00
Michael Lange
e343f23360 New ScaleEventsChart component
Displays all scale events in the form of an annotated line chart. When
annotations are clicked, the timestamp, message, and meta propeties for
the event are displayed below the chart.
2020-08-05 12:02:22 -07:00
Michael Lange
9c5a2b5dd5 Present scaling events on the job task group page 2020-07-29 19:07:24 -07:00
Michael Lange
87a67023f9 New fluid height modifier for the json viewer 2020-07-29 19:07:24 -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
b1b5344dc1 Reset font weight for tooltips 2020-06-30 11:54:11 -07: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
Buck Doyle
62abb11bab Add phase 1 of global search (#8175)
This introduces a DataCaches service so recently-updated collections don’t need
to be requeried within a minute, or based on the current route. It only searches
jobs and nodes. There are known bugs that will be addressed in upcoming PRs.
2020-06-19 13:05:28 -05:00
Michael Lange
2227f24474 Integrate the stepper input with the task group page 2020-06-18 22:32:56 -07:00
Michael Lange
6bde0e522a Style the StepperInput component 2020-06-18 22:08:28 -07:00
Michael Lange
3768a63712 Make sure buttons in a button bar have a very visible focus state 2020-06-18 22:08:27 -07:00
Michael Lange
6b57adc013 Prevent inline definition key/value pairs from breaking the key and value onto separate lines 2020-06-18 22:08:27 -07:00
Michael Lange
461980d927 Additional button-bar treatments for use in a table row 2020-06-18 22:08:27 -07:00
Michael Lange
158f7764be Extend button-bar support to buttons 2020-06-18 22:08:27 -07:00
Michael Lange
47969c43b9 Inline-block the buttons to remove weird text-flow spacing 2020-06-16 10:23:36 -07:00
Michael Lange
cc8aed8817 Monitor component and query param interaction 2020-06-16 10:23:35 -07:00
Michael Lange
7e93f9033d Refactor metrics styles to allow for standalone metrics 2020-05-13 08:36:04 -07:00