Commit Graph

1671 Commits

Author SHA1 Message Date
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
Michael Lange
6c6daec19b Move new glimmer style string to its own home 2021-02-23 10:18:58 -08:00
Michael Lange
1f14fd5ebf Pull the VAnnotations primitive out of the LineChart component 2021-02-23 10:18:57 -08:00
Michael Lange
ba22533d96 ArrayProxy evidently isn't iterable 2021-02-23 10:18:57 -08:00
Michael Lange
8c16a158f4 Pull the Area chart primitive out of the LineChart component 2021-02-23 10:18:57 -08:00
Michael Lange
9ce2728374 New computed property: uniquely
Wraps up a common pattern used in charts for building a a string that
incorporates the ember guid
2021-02-23 10:18:57 -08:00
Buck Doyle
e47ce42548 Update Ember/Ember CLI to 3.20 (#9641)
This doesn’t include Ember Data, as we are still back on 3.12.

Most changes are deprecation updates, linting fixes, and dependencies. It can
be read commit-by-commit, though many of them are mechanical and skimmable.
For the new linting exclusions, I’ve added them to the Tech Debt list.

The decrease in test count is because linting is no longer included in ember test.

There’s a new deprecation warning in the logs that can be fixed by updating Ember
Power Select but when I tried that it caused it to render incorrectly, so I decided to
ignore it for now and address it separately.
2021-02-17 15:01:44 -06:00
Buck Doyle
cb4443d0dc Fix recommendation test to ensure CPU exists (#10004)
This fixes a flaky test, as seen in this failure:
https://app.circleci.com/pipelines/github/hashicorp/nomad/14726/workflows/f4ae0bf2-0699-4d18-b55e-5221aafe393c/jobs/137128

One part of the test involves toggling off all memory recommendations
and then accepting, but it’s not possible to accept when there are
no CPU recommendations to begin with, which can happen because
there’s a 10% chance of not creating a corresponding recommendation
in the task factory. Since two tasks are created for this module, it’s
only a 1% chance of no CPU task, but that means 1% flakiness!
2021-02-16 08:43:18 -06:00
Buck Doyle
1d0c57dbbe Fix deployment failure error handling (#10003)
This is a supplement to #9831 to incorporate the extracted
missing-permissions error handling from #9909.

It fixes this failure on the main branch! 😳
https://app.circleci.com/pipelines/github/hashicorp/nomad/14728/workflows/4c147dca-fd1e-4de7-86aa-90ded7aabad2/jobs/137137
2021-02-10 10:23:19 -06: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
Buck Doyle
24b9a899d8 Fix exec escaping for emoji task name (#7813)
This closes #7459.

While emoji don’t actually need escaping, expanding the
expression that enumerates all task name characters that
don’t need escaping to include emoji is prohibitive, since
it’s a discontinuous range. The emoji-regex project has
such an expression and it’s 12kB.

This fixes the regular expression to property escape emoji
as a single character instead of as its component bytes.
Thanks to @DingoEatingFuzz for the suggestion.
2021-02-09 09:33:48 -06:00
Buck Doyle
84b8a1930a Change exec URLs to use job’s namespace/region (#9968)
This closes #9966. It was looking at the query parameters
for the namespace and region, but allocation (and task!)
routes don’t have a namespace query parameter. Since the URL
generator requires the job for all calls, it makes sense to
extract the namespace and region from the job instead.
2021-02-04 13:14:15 -06:00
Buck Doyle
4e0e33e7c0 Remove support for IE11 (#9578)
This changes the Babel compilation targets to exclude IE 11,
which results in significant payload size savings.
2021-02-02 13:14:51 -06:00
Michael Lange
7fd0a7c317 Merge pull request #9913 from hashicorp/b-ui/cross-region-server-monitor
UI: Cross region server monitor
2021-02-02 11:11:59 -08:00
Buck Doyle
2103e55daf Update ember-a11y-testing (#9912)
This includes seemingly-unrelated changes because of dependency updates.
2021-02-02 12:45:40 -06:00
Buck Doyle
e28cb14494 Change down to highest-priority composite status (#9927)
As pointed out by Nick Ethier, if a node was ineligible before
it went down, downness should be displayed, not ineligibility.
2021-02-01 12:00:34 -06:00
Michael Lange
2c13731d95 Don't include the region param in authorizedRequest if it's already in the URL 2021-02-01 09:54:46 -08:00
Michael Lange
fcf31ffeaf Always include the region param in server monitor requests
The region will naturally be appended to URLs via
token.authorizedRequest but agent members includes all servers across
all regions so relying on the application-level region isn't good
enough.
2021-02-01 09:54:46 -08:00
Michael Lange
3aa4cf3f2d Add an acceptance test exercising errors from an HTTP response to a notification 2021-01-28 13:47:22 -08:00
Michael Lange
5dfa556983 Test coverage for the messageFromAdapterError util 2021-01-28 12:18:53 -08:00
Michael Lange
dbf826d7ef Don't use generic ACL error messages
When the error is actually a 403, an ACL error is appropriate, but when
it isn't, fallback on what the API returns.
2021-01-28 12:18:53 -08:00
Michael Lange
6c98f1b1a2 Improve the message-from-adapter-error util
Automatically detect ACL errors
Provide a generic error message as a fallback
2021-01-28 12:18:52 -08:00
Buck Doyle
73be2c3439 Merge branch 'master' into b-ui/topo-viz-accounting 2021-01-28 09:56:46 -06:00
Michael Lange
ac758a7947 Adjust the no-association-lines logic
On very small clusters, the node count heuristic is impractical and
leads to confusion. By additionally requiring 10+ sibling allocs, the
lines will be shown more often.
2021-01-27 10:24:03 -08:00
Michael Lange
494b90c995 Don't render association lines on resize when lines aren't supposed to be shown at all 2021-01-27 10:20:10 -08:00
Michael Lange
ff252db327 Use Hz instead of hz throughout the UI 2021-01-26 10:53:26 -08:00
Michael Lange
c76b5e1f64 Use dominant-baseline instead of alignment-baseline to get firefox support 2021-01-26 08:56:52 -08:00
Michael Lange
d3dd3f5b08 Test coverage for the topology info panel.
This fixes a couple bugs

1. Overreporting resources reserved due to counting terminal allocs
2. Overreporting unique client placements due to uniquing on object refs
   instead of on client ID.
2021-01-25 19:01:11 -08:00
Michael Lange
792559e72e Clamp widths at zero to prevent negative width warnings
This would only ever realistically happen with fixture data, but still
good to not have these warnings.
2021-01-25 18:59:55 -08:00
Michael Lange
a22a952b38 Only count the scheduled allocs on the topo viz node stats bar 2021-01-25 11:29:01 -08: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
Michael Lange
e90d23d522 Use the same prefix pattern from the region switcher for the namespace switcher 2021-01-22 13:18:15 -08:00
Michael Lange
ab2e13a64f Merge pull request #9614 from hashicorp/dependabot/npm_and_yarn/ui/ini-1.3.7
build(deps): bump ini from 1.3.5 to 1.3.7 in /ui
2021-01-07 14:10:03 -08:00
Michael Lange
37e1551dcb When the topo viz filters out nodes, report this to the user via warning alert 2021-01-05 17:11:17 -08:00
Michael Lange
4d5fef68b0 Filter out nodes that don't have NodeResources from the topo viz 2021-01-05 17:11:17 -08:00
Michael Lange
b96ca93873 Quietly ignore orphaned allocs in the topo viz 2020-12-17 11:18:43 -08:00
dependabot[bot]
bd5666ce8d build(deps): bump ini from 1.3.5 to 1.3.7 in /ui
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-10 17:52:23 +00:00