Commit Graph

1332 Commits

Author SHA1 Message Date
Buck Doyle
83164f21d2 Add removal of OTT query parameter with delay (#10319)
This followup to #10066 adds a step to clear the one-time token
from the URL after the application has loaded. The delay is
required for it to actually clear, but only when the OTT is present
to avoid slowing down the entire test suite.
2021-04-13 11:56:59 -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
Michael Lange
20c3b987c0 Aggregate the BANs in the cluster details panel 2021-03-31 09:29:14 -07:00
Michael Lange
a019587de5 Use common helpers and utils for formatting hertz 2021-03-31 09:29:14 -07:00
Michael Lange
f82fe6b875 Format all bytes using helpers, even the ones that are already MiBs 2021-03-31 09:29:02 -07:00
Michael Lange
d327b73571 Add startingUnit option to the unit formatting utils 2021-03-31 09:29:02 -07:00
Michael Lange
efaadd426b format-scheduled-bytes helper 2021-03-31 09:29:02 -07:00
Michael Lange
432ec44ba2 Refactor formatBytes helper to use core units util 2021-03-31 09:29:01 -07:00
Michael Lange
3771d2dd5a Units utils
Consolidates all the bytes and hertz units logic in one place.
2021-03-31 09:29:01 -07: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
c15bf65ef0 Remove errant log line 2021-03-24 15:34:46 -07:00
Michael Lange
d9426df7af Correctly sort tasks in alloc stat tracker so the main task takes precedence 2021-03-24 15:10:46 -07:00
Michael Lange
1d8bc393cf Guard against empty data when determining active linechart data 2021-03-24 15:09:47 -07:00
Michael Lange
ebd91a9a78 Fix line-wrapping issue with chart tooltips 2021-03-24 14:13:30 -07:00
Michael Lange
2b1449ce88 Use more explicit branching of reserved amounts based on metric type 2021-03-24 13:55:18 -07:00
Michael Lange
b009fc1f97 Remove old primary metric 2021-03-24 13:52:52 -07:00
Michael Lange
5191693be9 Update topology info box primary metric 2021-03-24 13:52:52 -07:00
Michael Lange
91521d6256 Updated old tests 2021-03-24 13:52:52 -07:00
Michael Lange
e3a1106f9d Tests for PrimaryMetric::Allocation 2021-03-24 13:52:52 -07:00
Michael Lange
2ed5b28805 Tests for PrimaryMetric::Node 2021-03-24 13:52:52 -07:00
Michael Lange
295354262a Remove now unused chartClass arg from LineChart 2021-03-24 13:52:52 -07:00
Michael Lange
17cf4ad20e Improved language around what the client stat charts represent 2021-03-24 13:52:52 -07:00
Michael Lange
7b73460769 New PrimaryMetric::Task component 2021-03-24 13:52:51 -07:00
Michael Lange
745a55bd42 Apply the new multi-line primary metric to the alloc index page 2021-03-24 13:52:51 -07:00
Michael Lange
df116888c8 Memoize the tracker and the series properties to avoid repeat computation
In addition to this computation being wasteful, it introduces a bug
where the allocation on a stats tracker can update twice in one render,
which isn't allowed in Glimmer (ironically, Glimmmer's lack of
auto-memoization introduced the issue).
2021-03-24 13:52:51 -07:00
Michael Lange
4f27bee77c Refactored multi-series allocation variant of the primary metric component 2021-03-24 13:52:51 -07:00
Michael Lange
d72eaa139c Refactor stats-time-series to allow for multiple series 2021-03-24 13:52:51 -07:00
Michael Lange
8ab301408f Sort and index multi-series data correctly in line chart
- Sorting must be done on copies to preserve orders.
 - Indices should be reversed since rendering is also reversed (the back
   layer (the tallest) is rendered first to create the stacking effect).
2021-03-24 13:52:51 -07:00
Michael Lange
8ae76455fb Stacked percentages of tasks for alloc charts
This leverages the existing pre-processing being done in the
allocation-stats-tracker to also create additive percentages relative to
the allocation resources vs. the task resources.

This can then be used in a chart to create a stacked area representation
of consumption.
2021-03-24 13:52:51 -07:00
Michael Lange
a6a9df5b4b Simple bind helper
This binds a function to a target before passing it along to another
component. It's normal to expect to get to use `this` within functions
on components and controllers, but (sans actions) that doesn't happen
automatically.
2021-03-24 13:52:51 -07:00
Michael Lange
d6b72c14e2 Refactor PrimaryMetric into parts/purposes
Currently, PrimaryMetric is already overloaded on multiple dimensions:
metric and resource type.

This refactor will use multiple components as a form of control flow
instead spidering conditionals, which are only getting worse as the
charts for each resource type diverge.
2021-03-24 13:52:51 -07:00
Michael Lange
ce7f6d0905 Compute and render reserved annotations for client stats 2021-03-24 13:52:30 -07:00
Michael Lange
febecbb94e Pass the LineChart named blocks through to callers of StatsTimeSeries 2021-03-24 13:52:30 -07:00
Drew Bailey
e0fabcb9a7 add on update to services table in allocation details (#10153)
* add on update to services table in allocation details

* populate onupdate test data
2021-03-11 12:28:38 -05:00
Michael Lange
53f9b47c72 Move complex annotation hbs logic into JS
As @backspace pointed out, we're processing a bunch of other stuff
anyway, so might as well process the active state there too where it's
more likely to be expected.
2021-03-09 17:19:52 -08:00
Michael Lange
8a9d2abc4d No longer include an automatic tooltip in LineChart
It is now required to use the one yielded by the :after named block.
2021-03-08 21:02:01 -08:00
Michael Lange
db1a128659 Integration test coverage for horizontal annotations and tooltips 2021-03-08 20:22:01 -08:00
Michael Lange
2eff475be6 Pre format x and y values for the yielded tooltip component in line chart 2021-03-08 15:41:18 -08:00
Michael Lange
6de9e4f089 Document all the tooltip variations
Under a new Charts/Primitives section in Storybook
2021-03-08 15:41:18 -08:00
Michael Lange
659090bf81 Bring the ordinal color sequence from chart-colors to the new color-scales construct
This also required re-ordering the SCSS imports since this depends on
colors introduced by bulma.
2021-03-08 15:41:04 -08:00
Michael Lange
2ba041f801 Unify the distribution bar tooltip and the line chart tooltip styles/patterns 2021-03-08 15:41:04 -08:00
Michael Lange
f7358ed17e New storybook CSS helpers (hover region, multiples variations) 2021-03-08 15:41:04 -08:00
Michael Lange
57da27c148 Factor the tooltip out of line-chart and into a primitive 2021-03-08 15:41:04 -08:00
Michael Lange
c209cb86f2 Use chart scales to generate tooltip swatch options 2021-03-08 15:41:03 -08:00
Michael Lange
a2b2ba816a Don't deal with color classes at all in LineChart
Expect this to be set on the visual yielded components directly
2021-03-08 15:41:03 -08:00
Michael Lange
b6a0fe6a0f Support multi-dimensional data in LineChart
When a @dataProp is provided, the LineChart component assumes data is an
array of data series. It will map by the data prop and flatten to
compute the domains of the data.
2021-03-08 15:41:03 -08:00
Michael Lange
9c67253e02 Add chart color scales in scss 2021-03-08 15:41:03 -08:00
Michael Lange
78942408cc Yield HAnnotations through LineChart 2021-03-08 15:41:03 -08:00
Michael Lange
e4882dd949 New HAnnotations chart primitive 2021-03-08 15:41:03 -08:00
Buck Doyle
7832e06907 Fix rendering of DAS interstitial components (#10094)
With the Ember update, when the will-destroy action is called
to check the element height, its height is already zero. That
seems strange but I didn’t look into it any further, as
using did-insert to store the element lets us check its height
before any other actions when a processing button is pressed.
2021-03-01 09:46:22 -06:00