Commit Graph

1707 Commits

Author SHA1 Message Date
Michael Lange
ead08e2ec6 Tests for PrimaryMetric::Task 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
945ad592a5 Update LineChart stories to use new tooltip pattern
Some charts intentionally don't yield a tooltip to show the possibility.
2021-03-08 21:02:40 -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
8e586a932b New Multi Line LineChart story 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
1d62065c18 Document HAnnotations + LineChart with a story 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
Tim Gross
03a1192c12 docs: swap master for main in Nomad repo 2021-03-08 14:26:31 -05: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
Michael Lange
64ebfe280f Prevent -1 dimension errors in LineChart 2021-02-24 19:28:14 -08:00
Michael Lange
1df9ec702c Update LineChart stories to use contextual component interface 2021-02-24 18:58:01 -08:00
Michael Lange
d36c38b685 Include the named-blocks polyfill compiler in the storybook babel options 2021-02-24 18:58:01 -08:00
Michael Lange
e41a0b8643 Use named-blocks and contextual components to reduce the responsibility of LineChart
Now chart primitives are partially applied by LineChart but the
invocations are left to the caller.
2021-02-24 18:58:01 -08:00
Michael Lange
0f86d68f15 Bring in the ember-named-blocks polyfill
Since some chart elements need to be rendered in the svg and others need
to be outside, we need some form of conditional yielding. This is the
cleanest implementation of this pattern and it will also ship with ember
in 3.25.
2021-02-24 18:58:00 -08:00
Michael Lange
2178bbd669 Bring back the active annotation logic to the v-annotations primitive 2021-02-24 18:58:00 -08:00
Michael Lange
b1f3618c3f Move curve logic into the area primitive 2021-02-24 18:58:00 -08:00
Michael Lange
85257f6c32 Update the custom xFormat to be a getter, as is expected by LineChart now 2021-02-23 10:34:51 -08:00
Michael Lange
9e6315e655 Convert ScaleEventsChart into a glimmer component 2021-02-23 10:18:58 -08:00
Michael Lange
09a0e4d4a8 Refactor StatsTimeSeries component to be a glimmer component and use composition instead of inheritance 2021-02-23 10:18:58 -08:00
Michael Lange
12fb78c3ab Refactor line chart scales and refactor tests 2021-02-23 10:18:58 -08:00
Michael Lange
ae381d1a20 Defensive arguments for glimmer-factory 2021-02-23 10:18:58 -08:00
Michael Lange
1e18be1757 Convert LineChart into a glimmer component 2021-02-23 10:18:58 -08:00