Commit Graph

1907 Commits

Author SHA1 Message Date
Michael Lange 9a430651c4 Move new glimmer style string to its own home 2021-02-23 10:18:58 -08:00
Michael Lange af0f2ae092 Pull the VAnnotations primitive out of the LineChart component 2021-02-23 10:18:57 -08:00
Michael Lange 21742466e5 ArrayProxy evidently isn't iterable 2021-02-23 10:18:57 -08:00
Michael Lange 7512fcbf0a Pull the Area chart primitive out of the LineChart component 2021-02-23 10:18:57 -08:00
Michael Lange ce8b9c42f2 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 e9e52e0dfe
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 fc09fdaf10
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 4adf59785d
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 f462d7d1c2
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 e3392b7da8
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 099162a55c
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 369d030467
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 455132e990
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 e77c685d0d
Update ember-a11y-testing (#9912)
This includes seemingly-unrelated changes because of dependency updates.
2021-02-02 12:45:40 -06:00
Buck Doyle 8d1f823c34
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 f487562955 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 d44e0772f7 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 0fb853d135 Add an acceptance test exercising errors from an HTTP response to a notification 2021-01-28 13:47:22 -08:00
Michael Lange d4e32d4128 Test coverage for the messageFromAdapterError util 2021-01-28 12:18:53 -08:00
Michael Lange 52a7a48177 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 320a63dc68 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 975ea6d5d1 Merge branch 'master' into b-ui/topo-viz-accounting 2021-01-28 09:56:46 -06:00
Michael Lange 7a9a208c89 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 82d06f658b 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 6ba229e86c Use Hz instead of hz throughout the UI 2021-01-26 10:53:26 -08:00
Michael Lange 074f6af98d Use dominant-baseline instead of alignment-baseline to get firefox support 2021-01-26 08:56:52 -08:00
Michael Lange 9395f16da6 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 7d998745ed 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 93195f8e12 Only count the scheduled allocs on the topo viz node stats bar 2021-01-25 11:29:01 -08:00
Michael Lange 886b1b4384 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 875de74503 Use the same prefix pattern from the region switcher for the namespace switcher 2021-01-22 13:18:15 -08:00
Michael Lange 1fabd3240c
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 6d985f05bb 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 9b488adbf2 Filter out nodes that don't have NodeResources from the topo viz 2021-01-05 17:11:17 -08:00
Michael Lange e221eefdd2 Quietly ignore orphaned allocs in the topo viz 2020-12-17 11:18:43 -08:00
dependabot[bot] 2a8f88b883
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
Buck Doyle 7e4c746c82
Move breadcrumbs objects into shared layout object (#9576)
Various page objects had breadcrumbs and breadcrumbFor within them, this
moves those to the existing Layout page object that contains shared page objects.
2020-12-10 11:51:22 -06:00
Buck Doyle 8348576473
Fix job recommendation test flakiness (#9591)
Instead of creating recommendations for all the jobs used
across these tests, this creates a specific job with
a higher group count, which reduces the likelihood
of having no recommendations to 0.0001%.

It was incorrect to assume that each task group would always
have recommendations, since there’s a 1% chance that a task
won’t have a recommendation. (10% chance for CPU and memory.)
This uses the number of groups with recommendations instead.
2020-12-10 10:10:25 -06:00
Michael Lange 27c16d1f0a Test coverage for the scale event serializer 2020-12-07 12:28:47 -08:00
Michael Lange 58ecacc710 Guard against a null Meta property in the scale event API 2020-12-07 12:28:23 -08:00
Buck Doyle 543fb24764
Fix allocation count in CSI volumes table (#9515)
This closes #9495. As detailed in there, the collection query GET
/v1/volumes?type=csi doesn’t return ReadAllocs and WriteAllocs, so the #
Allocs cell was always showing 0 upon first load because it was derived
from the lengths of those arrays. This uses the heretofore-ignored
CurrentReaders and CurrentWriters values to calculate the total instead.

The single-resource query GET /v1/volume/csi%2F:id doesn’t return
CurrentReaders and CurrentWriters that absence doesn’t override the
stored values when visiting an individual item.

Thanks to @apollo13 for reporting this and to @tgross for the API logs
and suggestion.
2020-12-07 08:51:41 -06:00
Buck Doyle 2d344179d3
Migrate preview deployments from Netlify to Vercel (#9471)
This adds:

* a script for building and deploying the Ember UI and Storybook to
  Vercel
* configuration for that deployment
* a header link to the UI to link to Storybook when built with
  STORYBOOK_LINK=true

It also removes a file used to configure Netlify redirects.

The Netlify setup had two “sites”: nomad-storybook and nomad-ui. I
attempted to replicate that here but ran into some platform limitations
with Vercel: two “projects” cannot share the same root directory without
also sharing the same vercel.json that lets us specify configuration
such as the rewrite needed to handle deep linking into the Ember UI. I
tried having Storybook use /ui/storybook as the root directory (and
adding a symbolically-linked package.json to bypass Vercel’s refusal
to build without it) but that produced broken Storybook deployments.

This instead combines the two projects into one
(nomad-storybook-and-ui), defaults to forwarding / to /ui/, and
adds the header link to the UI to navigate to Storybook.

Rather than have a complex build script in the Vercel configuration UI,
this delegates to a script in the repository.
2020-12-07 08:33:49 -06:00
Buck Doyle 3b0f876ae5
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
Buck Doyle ba147a4fca
Add query parameter to override Mirage scenario (#9380) 2020-11-30 08:12:15 -06:00
Tim Gross 4e79ddea45
csi/api: populate ReadAllocs/WriteAllocs fields (#9377)
The API is missing values for `ReadAllocs` and `WriteAllocs` fields, resulting
in allocation claims not being populated in the web UI. These fields mirror
the fields in `nomad/structs.CSIVolume`. Returning a separate list of stubs
for read and write would be ideal, but this can't be done without either
bloating the API response with repeated full `Allocation` data, or causing a
panic in previous versions of the CLI.

The `nomad/structs` fields are persisted with nil values and are populated
during RPC, so we'll do the same in the HTTP API and populate the `ReadAllocs`
and `WriteAllocs` fields with a map of allocation IDs, but with null
values. The web UI will then create its `ReadAllocations` and
`WriteAllocations` fields by mapping from those IDs to the values in
`Allocations`, instead of flattening the map into a list.
2020-11-25 16:44:06 -05:00
Tim Gross aa7c77d324
csi/ui: show Node Only for volumes when controllers aren't required (#9416)
Plugin health for controllers should show "Node Only" in the UI only when both
conditions are true: controllers are not required, and no controllers have
registered themselves (0 expected controllers). This accounts for "monolith"
plugins which might register as both controllers and nodes but not necessarily
have `ControllerRequired = true` because they don't implement the Controller
RPC endpoints we need (this requirement was added in #7844)

This changeset includes the following fixes:

* Update the Plugins tab of the UI so that monolith plugins don't show "Node
  Only" once they've registered.
* Add the missing "Node Only" logic to the Volumes tab of the UI.
2020-11-25 14:50:33 -05:00
Tim Gross 8df5f28dc3
ui/csi: fix links to volume IDs (#9355) 2020-11-13 15:44:34 -05:00
Michael Lange c041236629 Fix flaky lifecycle chart tests 2020-11-12 09:16:53 -08:00
Michael Lange f543137ec9 Revert "Temporarily remove poststop from the UI"
This reverts commit f8a505ea2f9def2a7ce7a93e6d0529e1b5da4894.
2020-11-12 09:16:52 -08:00
Michael Lange 9de4351eae Add missing feature fixture that was introduced while this feature was being developed 2020-11-11 16:43:47 -08:00
Michael Lange 4b32265867
Merge pull request #9294 from hashicorp/f-ui/das-filter-toggle
UI: Add DAS summary table filtering
2020-11-11 14:04:25 -08:00
Buck Doyle ba5e6983bb Move page object component to reflect page order 2020-11-10 13:42:15 -06:00
Buck Doyle e5089dec44 Remove unnecessary uses of createList 2020-11-10 13:38:27 -06:00
Buck Doyle 508adbf0ac Remove unused action
This is a remnant of another approach I tried when rerouting
/optimize when the filter excluded all summaries.
2020-11-10 10:07:48 -06:00
Buck Doyle 3ef7f9f89e Add redirect to parent when filter excludes all 2020-11-10 09:38:46 -06:00
Buck Doyle 7ed1f4dda8 Fix proceed to use filtered summaries 2020-11-09 15:00:58 -06:00
Buck Doyle 1cfbac5483 Add check that active summary isn’t filtered out 2020-11-09 13:02:16 -06:00
Buck Doyle 87b82a446d Add no matches empty state 2020-11-09 09:41:18 -06:00
Buck Doyle a1ea822ab7 Add count to search field placeholder 2020-11-09 09:32:49 -06:00
Buck Doyle 7b25b43ec6 Add summary-filtering field
This only filters by slug for now… 🧐
2020-11-09 09:28:40 -06:00
Buck Doyle 75861b8b4f Remove copypasted to-be-unused query parameters 2020-11-09 09:04:14 -06:00
Buck Doyle cc0336bf0f Add facets for recommendation summaries
This is mostly copied from the jobs list. One uncertainty
is what to do when changing a facet causes the currently-
active card to be excluded from the filtered list 🤔
2020-11-06 15:53:58 -06:00
Buck Doyle 8b5b2116ec
Fix job detail crash when recommendations off (#9269)
Without this, visiting any job detail page on Nomad OSS would crash with
an error like this:

Error: Ember Data Request GET
/v1/recommendations?job=ping%F0%9F%A5%B3&namespace=default returned a
404 Payload (text/xml)

The problem was twofold.

1. The recommendation ability didn’t include anything about checking
whether the feature was present. This adds a request to
/v1/operator/license on application load to determine which features are
present and store them in the system service. The ability now looks for
'Dynamic Application Sizing' in that feature list.

2. Second, I didn’t check permissions at all in the job-fetching or job
detail templates.
2020-11-06 08:21:38 -06:00
Michael Lange 36ac4ba840
Merge pull request #9271 from hashicorp/b-ui/missing-warning-in-stories
UI: Update lingering instances of the old warning icon in stories
2020-11-05 13:56:07 -08:00
Michael Lange be7b0040d3 Show dismissable no live updating notice on the topology page 2020-11-04 19:25:12 -08:00
Michael Lange 7494188013 Update lingering instances of the old warning icon in stories 2020-11-04 19:24:39 -08:00
Michael Lange 148d4429cf 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
Michael Lange 093a935a71 Update URL for namespace globbing 2020-11-04 15:23:47 -08:00
Michael Lange 4dcf454d81 Forbidden state for the topo viz 2020-11-04 12:32:22 -08:00
Buck Doyle 20ec481090
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
Buck Doyle 6450abfe76
Change node id search to prefix-only (#9244)
This test has been periodically failing, like here:
https://app.circleci.com/pipelines/github/hashicorp/nomad/12879/workflows/40c0445c-b244-4a04-a5a3-d9685b656c94/jobs/114751/tests

The failure was because sometimes the first node contains the
beginning of the ”otherNode” id somewhere within its id. It seems
less useful to match within the node, so this changes id search to
only match at the beginning of the id.
2020-11-04 12:12:31 -06:00
Michael Lange dc6ec319c2
Merge pull request #9074 from Liraim/fix_download
ui: "View Raw File" download using JS instead simple link
2020-11-04 10:09:35 -08:00
Michael Lange 34392ea280
Merge pull request #9256 from hashicorp/ui/upgrade-node
Use Node v12 for UI development
2020-11-04 10:06:41 -08:00
Michael Lange 59626344be Use Node v12 for UI development 2020-11-04 09:04:22 -08:00
Michael Lange 67bbd3770f
Merge pull request #9240 from hashicorp/f-ui/topo-viz-tooltips
UI: Topo Viz Tooltips
2020-11-02 13:46:58 -08:00
Michael Lange 521df4db97 Fix the raw 'blue' in recommendation cards to use '$blue' 2020-11-02 13:29:44 -08:00
Michael Lange 5f2ebf7a00 Replace visualViewport with the more compatible scrollX and scrollY 2020-11-02 13:25:50 -08:00
Michael Lange b5044250e6 Add tooltips to the topo viz 2020-11-02 13:25:33 -08:00
Vyacheslav Morov 48ebd36fce Add type=button to View Raw Data buttons. 2020-11-01 02:47:11 +03:00
Vyacheslav Morov c6fc37cf29 Change to button.
Rewrite tests to check that proper urls was called.
2020-10-31 23:11:14 +03:00
Michael Lange 654533229c Make the style-string property glimmer safe 2020-10-30 16:14:31 -07:00
Michael Lange d9cac96e5a Add new is-static chart tooltip variant and decouple from charts 2020-10-30 16:14:31 -07:00
Buck Doyle ab4b04e940
Add handling for empty state flaky test edge case (#9234)
This test occasionally fails because the random generation
sometimes produces a node with no allocations, such as here:
https://app.circleci.com/pipelines/github/hashicorp/nomad/12735/workflows/9a407f87-0383-48ee-8e41-7e6e351dce28/jobs/113130/steps

This is a temporary measure to solve it without trying to force the
generated data to always have an allocation.
2020-10-30 15:57:09 -05:00
Michael Lange 628fef86a5 Add namespace and task states query params to the topo viz route 2020-10-29 11:28:41 -07:00
Buck Doyle 39af5c709b
Fix Firefox positioning of chart resource label (#9209)
alignment-baseline appears to be ignored in Firefox, but dominant-baseline
works. This also moves the anchor into CSS.
2020-10-29 08:13:41 -05:00
Buck Doyle 31b4ed7a6d
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 a7293a2bfe Remove no longer used warning icon svg 2020-10-26 15:07:12 -07:00
Michael Lange d407809ea5 Replace all instances of the warning icon with the Structure alert-triangle icon 2020-10-26 15:07:12 -07:00
Michael Lange cb1d22519c List all available icons in a story.
This is like the same as using svg-jar, right?
2020-10-26 12:26:42 -07:00
Michael Lange 8fe5c55594 New all-icons helper that's really only meant for development use
This returns an array of all icons. As the comment suggests, it's
because the SVGs file can't be imported in stories since it is generated
as part of the Ember project.
2020-10-26 12:25:34 -07:00
Michael Lange 35ceca7f62
Merge pull request #9166 from mobiltracker/master
Display class in client details
2020-10-26 10:54:14 -07:00
Michael Lange 4a36f522ce
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 33d901eae9
Merge pull request #9172 from hashicorp/b-ui/logs-for-fails
UI: Always show the file browser for allocations and tasks.
2020-10-26 10:36:18 -07:00
fqborges 498fe414a3 Display class in client details 2020-10-26 11:29:19 -03:00
Michael Lange bae7002c73 Show the nomad agent version of the agent the UI is served from 2020-10-25 23:52:06 -07:00
Michael Lange 2072911356 Always show the file browser for allocations and tasks.
Before, we'd show a helpful error message when a task isn't running
instead of erroring in a generic way. Turns out when an alloc is
terminal but reachable, the filesystem is left behind so we were hiding
it.

Now it is always shown and in the event that something errors, it'll
either be generic, or--more commonly--a 404 of the allocation.
2020-10-25 22:24:56 -07:00
Michael Lange 2a1c820c1c Make alloc association lines conditional on alloc count relative to node count 2020-10-23 15:16:31 -07:00
Michael Lange e0157759a8 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 7f2fba9b23 Reset inline styles on flex-masonry elements when columns is set to 1 2020-10-23 14:17:03 -07:00
Michael Lange 38a4a027aa Truncate text in the topo viz info panel 2020-10-23 14:17:03 -07:00
Michael Lange 17403815ab Highlight starting allocations with a blue tint 2020-10-23 14:17:03 -07:00
Michael Lange 8947fd547b Limit the topo viz to only pending and running allocs
Failed allocs immediately vacate their allocated resources which results
in inaccurate distributions of allocations on a client.
2020-10-23 14:17:03 -07:00
Buck Doyle 8aacab513b
Add logged Faker seed when none is set in tests (#9140)
This will hopefully make it easier to reproduce test failures
that happen intermittently, especially in CI.
2020-10-22 13:45:51 -05:00
Buck Doyle c8caa810e9
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 70a0253f0d
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 5c34e94529 Typo 2020-10-15 11:45:59 -07:00
Michael Lange 329fecac6d Work around Safari's lack of text transform support 2020-10-15 11:45:59 -07:00
Michael Lange 2309baf080 Factor out the common sum aggregator used in the topology controller 2020-10-15 11:45:59 -07:00
Michael Lange f3300bcbf0 Remove the scenarios I didn't need/didn't get to 2020-10-15 11:45:59 -07:00
Michael Lange 56bf526778 Describe the glimmer-factory better including the motive 2020-10-15 11:45:59 -07:00
Michael Lange 41df088abe Reset the standard environment values 2020-10-15 11:45:59 -07:00
Michael Lange 649873745f Treat legend term pairs as single wrapping elements 2020-10-15 10:30:34 -07:00
Michael Lange 97510a8397 Some light topology acceptance tests 2020-10-15 03:06:51 -07:00
Michael Lange a2b57c15eb Unit and integration tests for TopoViz component 2020-10-15 02:54:16 -07:00
Michael Lange c8ea019629 Test coverage for TopoViz::Datacenter 2020-10-15 02:54:16 -07:00
Michael Lange 8b96667a61 Remove temp reloading of nodes in the TopoViz component 2020-10-15 02:54:16 -07:00
Michael Lange 4f537c8511 Update scenarios to use new resources code 2020-10-15 02:54:16 -07:00
Michael Lange 9fc33a1f9b Adjust topo viz controller to new resource code 2020-10-15 02:54:16 -07:00
Michael Lange f918987d51 Unit test for for GiB in format-bytes 2020-10-15 02:54:16 -07:00
Michael Lange 3c39895168 Update topo viz code to use new alloc/node resources pattern 2020-10-15 02:54:16 -07:00
Michael Lange 64fc738733 Migrate to the new resources properties for allocs and nodes 2020-10-15 02:54:16 -07:00
Michael Lange b2b7d5e19e Test coverage for TopoViz::Node 2020-10-15 02:54:16 -07:00
Michael Lange 78b1efc531 FlexMasonry integration tests 2020-10-15 02:54:15 -07:00
Michael Lange e21a2a03b2 More information about clients in the info panel 2020-10-15 02:54:15 -07:00
Michael Lange ba8675ae87 Filter total alloc count by only scheduled allocs 2020-10-15 02:54:15 -07:00
Michael Lange d9ac6a63c6 Add icons to denote draining or ineligibility of clients 2020-10-15 02:54:15 -07:00
Michael Lange 7477f32012 Label empty clients in the topo viz chart 2020-10-15 02:54:15 -07:00
Michael Lange f3aed88a10 Improved curves for allocation associations 2020-10-15 02:54:15 -07:00
Michael Lange ef12488d1c Fix a re-render bug with flexmasonry 2020-10-15 02:54:15 -07:00
Michael Lange 066502d408 Make the topo viz denser when there are >50 nodes
By hiding node details and making nodes interactive instead, we can pack
more allocations on a screen.
2020-10-15 02:54:15 -07:00
Michael Lange 6e55d8a6eb Conditionally use the FlexMasonry layout for datacenters within TopoViz 2020-10-15 02:54:15 -07:00
Michael Lange 1602d72789 Apply FlexMasonry to the TopoViz component 2020-10-15 02:54:15 -07:00
Michael Lange f27895c4c8 New FlexMasonry component implements a masonry layout using flexbox 2020-10-15 02:54:15 -07:00
Michael Lange d9083fdde6 Second attempt at a masonry layout 2020-10-15 02:54:15 -07:00
Michael Lange 99746a24ac A better loading screen for the topo viz while nodes load 2020-10-15 02:54:14 -07:00
Michael Lange 6d99f96425 Connect the memory and cpu rectangles 2020-10-15 02:54:14 -07:00
Michael Lange 0ab6b31cab Refactor topo viz to do as much computation upfront & use faster data structures
Now all data loading happens in the TopoViz component as well as
computation of resource proportions.

Allocation selection state is also managed centrally uses a dedicated
structure indexed by group key (job id and task group name). This way
allocations don't need to be scanned at the node level, which is O(n) at
the best (assuming no ember overhead on recomputes).
2020-10-15 02:54:14 -07:00
Michael Lange 7d75421a75 Make the alloc select render path more efficient by not needlessly recomputing data 2020-10-15 02:54:14 -07:00
Michael Lange 872ca3dd5c Add more variety to the node heights 2020-10-15 02:54:14 -07:00
Michael Lange 4c155b5da4 CSS Grid based masonry layout
TBH, it's buggy and I don't like it.
2020-10-15 02:54:14 -07:00
Michael Lange 5b55f3c740 Medium scale topo scenario 2020-10-15 02:54:14 -07:00
Michael Lange fb1deb5c40 Updated alloc and cluster details on topo page 2020-10-15 02:54:14 -07:00
Michael Lange 24d0481889 Guard against undefined denominators 2020-10-15 02:54:14 -07:00
Michael Lange 5bc4d1f1d5 Associate sibling allocations by drawing lines 2020-10-15 02:54:14 -07:00
Michael Lange e4907dc647 Super rough allocation details, needs some style love 2020-10-15 02:54:14 -07:00
Michael Lange cab4e618fc Add cluster details to the topology page 2020-10-15 02:54:13 -07:00
Michael Lange 87a902db0c Touch up topo viz interactions 2020-10-15 02:54:13 -07:00
Michael Lange 831d27efd6 Fleshing out the first prototype of the topology visualization 2020-10-15 02:54:13 -07:00
Michael Lange 49736aed46 Tweak topo scenario 2020-10-15 02:54:13 -07:00
Michael Lange 000c00e920 Start click interaction for topo viz allocs 2020-10-15 02:54:13 -07:00
Michael Lange 78ae8fd78b Fix factory bug that made it so pending allocs had no resources 2020-10-15 02:54:13 -07:00
Michael Lange b347141e0c Prototype of the topo viz
- Plot all datacenters
- For each datacenter, plot all nodes
- For each node, plot all allocations by memory and cpu
- For empty nodes, highlight the emptiness
- When hovering over allocations, give them visual focus
2020-10-15 02:54:13 -07:00
Michael Lange fcf8adb76e Quick window resize modifier 2020-10-15 02:54:13 -07:00
Michael Lange 640f1b6716 Add ember modifiers addon 2020-10-15 02:54:13 -07:00
Michael Lange 2a067d646d Scaffold topo viz components 2020-10-15 02:54:13 -07:00
Michael Lange f0a096119f Small cluster example scenario for the topo viz 2020-10-15 02:54:13 -07:00
Michael Lange 1cb1ac89d7 Scaffold a new topology page 2020-10-15 02:54:12 -07:00
Jamie Finnigan f968f435ac Fix robots.txt to disallow indexing of all paths 2020-10-14 12:45:04 -07:00
Buck Doyle 517bc3c17b
Change htmlSafe prototype calls to imports (#9075) 2020-10-13 11:50:28 -05:00
Vyacheslav Morov 911b3b7f57 "View Raw File" download using JS instead simple link
Use fetch API to download file so we can:
 - send Token in headers
 - assign filename to download
2020-10-13 02:19:15 +03:00
Michael Lange 7604597041 Acceptance test coverage for the submit time sorting on the periodic and parameterized detail pages 2020-09-19 12:37:38 -07:00
Michael Lange 862137da06 Test coverage for page select and submit time on periodic page 2020-09-19 12:37:38 -07:00
Michael Lange 1a42742d40 Update job launches table to use the page size select pattern 2020-09-18 18:27:48 -07:00
Michael Lange cb7da746b5 Sort periodic and parameterized job detail pages by most recently submitted 2020-09-18 18:03:23 -07:00
Michael Lange 9ecb25632d Add job submit time to the job children list 2020-09-18 17:58:15 -07:00
dependabot[bot] 8aca3372de
build(deps): bump websocket-extensions from 0.1.3 to 0.1.4 in /ui (#8128)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-17 11:48:07 -05:00
dependabot[bot] 0f9006b35f
build(deps): bump elliptic from 6.5.0 to 6.5.3 in /ui (#8564)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.0 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.0...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-17 11:46:23 -05:00
Buck Doyle 5f5090384b
Change compared page object to match by name (#8915)
I believe this test became flaky after #8833, you can see
an example failure here:
https://app.circleci.com/pipelines/github/hashicorp/nomad/11809/workflows/0dc3c8f4-187c-44af-8bdb-6f010d653081/jobs/100848

The goal here is not to assert that the first task group in the
server database matches the first row displayed, but before
#8833 it could be assumed that they did match. This
changes to find the row corresponding to the first server
task group instead of assuming it’ll be first.
2020-09-17 11:08:47 -05:00
dependabot[bot] fb37b4b3d5
build(deps): bump markdown-to-jsx from 6.10.3 to 6.11.4 in /ui (#8826)
Bumps [markdown-to-jsx](https://github.com/probablyup/markdown-to-jsx) from 6.10.3 to 6.11.4.
- [Release notes](https://github.com/probablyup/markdown-to-jsx/releases)
- [Commits](https://github.com/probablyup/markdown-to-jsx/compare/6.10.3...6.11.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-17 08:46:45 -05:00
Buck Doyle 7ea8dcc799
Add handling for allocation-less exec URL (#8856)
This closes #8769. This new-window-opening code is not possible
to properly exercise within Ember’s testing facilities 😞
2020-09-15 14:48:29 -05:00
Michael Lange 252fa69ce6 Sort keys when converting objects to arrays for stable model fragments 2020-09-04 19:44:21 -07:00
Michael Lange 0f2fd905d8 Derive allocation Resources property from TaskResources 2020-09-04 13:46:50 -07:00
Michael Lange edd904c1c4 Allow for custom resource requirements for jobs that are recognized by allocations
The job factory will now accept an array of resourceSpecs that is a shorthand
notation for memory, cpu, disk, and iops requirements.

These specs get passed down to task groups. The task group factory will
split the resource requirements near evenly (there is variance
threshold) across all expected tasks.

Allocations then construct task-resource objects based on the resources
from the matching task.
2020-09-04 13:46:49 -07:00
Michael Lange f9864930ce Parameterize generateResources to enable property overrides 2020-09-04 13:46:35 -07:00
Michael Lange fc31f80880 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 90e0374926 Merge branch 'f-ui/poststart-poststop' of github.com:hashicorp/nomad into f-ui/poststart-poststop 2020-08-28 10:18:45 -05:00
Buck Doyle 7ed43b0332
Merge branch 'master' into f-ui/poststart-poststop 2020-08-28 10:15:18 -05:00
Buck Doyle eadb91e734
Add exec heartbeat keepalive (#8759)
This closes #8727, thanks to @jfcantu for the suggestion.
The CLI implementation of exec already has a 10-second
heartbeat so this mirrors that:
https://github.com/hashicorp/nomad/blob/v0.12.3/api/allocations.go#L161-L173
2020-08-28 10:13:33 -05:00
Michael Lange 25bb975749 Clean up erroneous and redundant mirage things 2020-08-27 17:58:24 -07:00
Buck Doyle b06700bb63 Fix tragique formatting 2020-08-27 09:38:34 -05:00
Buck Doyle 6447e61078 Remove prestart tasks table
My suggestion is that this table isn’t sufficiently useful to
keep around with the combinatoric explosion of other lifecycle
phases. The logic was that someone might wonder “why isn’t my
main task starting?” and this table would show that the prestart
tasks hadn’t yet completed. One might wonder the same about
any task that has prerequisites, so should a poststart task have
a table that shows main tasks? And so on.

Since the route hierarchy guarantees that one has already passed
through a template that shows the lifecycle chart before one
can reach the template where this table is displayed, I believe
this table is redundant. It also conveys information in a more
abstract way than the chart, which is dense and more easily
understood, to me.
2020-08-26 09:58:44 -05:00
Buck Doyle de3504a738 Add poststart and poststop lifecycle phases 2020-08-26 09:55:42 -05:00
Buck Doyle 29de8f4f76
Add component accessibility auditing and fixes (#8679)
This continues #8455 by adding accessibility audits to component integration
tests and fixing associated errors. It adds audits to existing tests rather than
adding separate ones to facilitate auditing the various permutations a
component’s rendering can go through.

It also adds linting to ensure audits happen in component tests. This
necessitated consolidating test files that were scattered.
2020-08-25 10:56:02 -05:00
Michael Lange 114909c5e8 Always show the scaling events accordion 2020-08-24 10:34:34 -07:00
Buck Doyle 4394c5b9ff
Add common serialiser abstractions (#8634)
This extracts some common API-idiosyncracy-handling patterns from model serialisers into properties that are processed by the application serialiser:

* arrayNullOverrides converts a null property value to an empty array
* mapToArray converts a map to an array of maps, using the original map keys as Name properties on the array maps
* separateNanos splits nanosecond-containing timestamps into millisecond timestamps and separate nanosecond properties
2020-08-20 12:14:49 -05:00
Nick Ethier 3cd5f46613
Update UI to use new allocated ports fields (#8631)
* nomad: canonicalize alloc shared resources to populate ports

* ui: network ports

* ui: remove unused task network references and update tests with new shared ports model

* ui: lint

* ui: revert auto formatting

* ui: remove unused page objects

* structs: remove unrelated test from bad conflict resolution

* ui: formatting
2020-08-20 11:07:13 -04:00
Buck Doyle 2f022a6a5e
Add missing server shutdown (#8677)
This removes repeated instances of this warning from test logs:
You created a second Pretender instance while there was already one running.
2020-08-17 08:17:29 -05:00
Michael Lange 6ca01a9df4
Merge pull request #8594 from hashicorp/b-ui/task-group-scale-guard
UI: Add guard against null scale events collection
2020-08-11 15:33:16 -07:00
Michael Lange 3227b3c342
Merge pull request #8593 from hashicorp/f-ui/scaling-events-chart
UI: Task group scaling timeline
2020-08-07 10:35:00 -07:00
Michael Lange 286e56ed82 Make eq-by helper resilient to a lack of prop since handlebars doesn't short-circuit evaluation 2020-08-06 17:59:26 -07:00
Michael Lange 476002d727 Key the annotations each loop by annotationKey for stable dom nodes 2020-08-06 17:58:43 -07:00
Michael Lange a04d4f2d76 Add integration test for line-chart annotation staggering 2020-08-06 17:37:09 -07:00
Michael Lange 59d98b80ca
Add missing word "two" to test name
Co-authored-by: Buck Doyle <buck@hashicorp.com>
2020-08-06 15:43:29 -07:00
Buck Doyle 67f8d95917 Add override for null events collection
This removes some errors in the console if there are no
autoscaling events.
2020-08-06 07:51:56 -05:00
Buck Doyle 9074d33f28
UI: Add truncation of rendered search results (#8571)
This closes #8549. Thanks to @optiz0r for the bug report. Having
the global search attempt to render every returned result is
obviously a mistake!
2020-08-05 15:58:44 -05:00
Michael Lange 3b59b52bca Compare scale events by their UID instead of reference equality 2020-08-05 12:02:23 -07:00
Michael Lange ecaee67ff1 Use the correct gray for the info details 2020-08-05 12:02:22 -07:00
Michael Lange 033618c46e Safestr the annotation style property 2020-08-05 12:02:22 -07:00
Michael Lange ebdb0c4101 Conditionally show the scaling timeline or accordion 2020-08-05 12:02:22 -07:00
Michael Lange 4c4e2e505f Unit test coverage for the ScaleEventsChart data domain logic 2020-08-05 12:02:22 -07:00
Michael Lange 792fa64101 Integration tests for the ScaleEventsChart component 2020-08-05 12:02:22 -07:00
Michael Lange 39583e0ce1 Force mock error scale events to be annotations 2020-08-05 12:02:22 -07:00
Michael Lange 09f6bca470 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 21f3b7dfcc Add activeAnnotation property to line-chart 2020-08-05 12:02:22 -07:00
Michael Lange 2903d1f504 Stagger line chart annotations when they are too close 2020-08-05 12:02:22 -07:00
Michael Lange b332e186b2 Add curve options to line chart 2020-08-05 12:02:22 -07:00
Michael Lange a891e907f5 Test coverage for line chart annotations 2020-08-05 12:02:22 -07:00
Michael Lange 24b6aeb746 Story for line chart annotations 2020-08-05 12:02:22 -07:00
Michael Lange 8445e22faf Add annotations to the line chart component 2020-08-05 12:02:22 -07:00
Michael Lange 299f2b6453 Make the default time series date format for line chart more useful 2020-08-05 12:02:21 -07:00
Buck Doyle c2ce0a1dec
Add linting for acceptance accessibility audits (#8570)
This makes use of the PR I recently had merged to eslint-plugin-ember-a11y-testing
to add linting that ensures an accessibility audit is called at least once per acceptance
test file. When I have added linting for component tests, it can apply there too.

I added exclusions for the filesystem browser tests, which are covered by behaviors/fs
and for the search test which will involve significant overrides to Ember Power Select
default templates.
2020-07-30 12:40:05 -05:00
Michael Lange 7e5cfa216e Use the correct Message property instead of Reason in scale POST request
Also use a more informative default message (one that includes the new
count)
2020-07-30 08:43:15 -07:00
Michael Lange 868509de5f
Merge pull request #8563 from hashicorp/b-ui/missing-job-distribution-chart-texture
UI: Restore striped texture used in the job distribution bar
2020-07-30 08:20:48 -07:00
Buck Doyle 7596cfd5e7
Change job search navigation to use id (#8560)
This fixes #8548. It was a significant oversight to use the
name instead of the id!
2020-07-30 09:10:08 -05:00
Michael Lange 5dfa8f6350 Remove now superfluous svg-patterns.js component file 2020-07-29 22:55:16 -07:00
Michael Lange 8a78999019 Move the svg-patterns template into the component dir 2020-07-29 22:54:30 -07:00
Michael Lange 4d2f322e10 Add a tooltip to explain the count change icons 2020-07-29 19:30:00 -07:00
Michael Lange b0f2a9f51d Fix scale and summary adapters to correct live reloading 2020-07-29 19:26:32 -07:00
Michael Lange 602b6771ba Assert that the scale up/down indicator is not shown when the count is null 2020-07-29 19:26:32 -07:00
Michael Lange 13af67ac80 Integration tests for the scale-events-accordion component 2020-07-29 19:26:32 -07:00
Michael Lange 69795e8b7d Refactor scale events into their own component 2020-07-29 19:26:32 -07:00
Michael Lange 4b7f431981 Acceptance tests for scaling events 2020-07-29 19:07:24 -07:00
Michael Lange 8a995a0db8 Make scale event properties more conditional and serialized correctly 2020-07-29 19:07:24 -07:00
Michael Lange 203f7e06b8 Present scaling events on the job task group page 2020-07-29 19:07:24 -07:00
Michael Lange d92ade8c54 Load and watch the job scale endpoint on the task group page 2020-07-29 19:07:24 -07:00
Michael Lange 8eabff06d5 Finish modeling behaviors within job scale events 2020-07-29 19:07:24 -07:00
Michael Lange 35054459c2 New fluid height modifier for the json viewer 2020-07-29 19:07:24 -07:00
Michael Lange b61d23feee Refactor job summary adapter to use the namespace ID base class 2020-07-29 19:07:24 -07:00
Michael Lange 765077eb03 Model job scaling and events in Mirage 2020-07-29 19:07:24 -07:00
Michael Lange 17e6d5b836 Data modeling for job scale and scale events 2020-07-29 19:07:24 -07:00
Buck Doyle 7bed453de3
Add acceptance test accessibility auditing and fixes (#8455)
This introduces ember-a11y-testing to acceptance tests via a helper
wrapper that allows us to globally ignore rules that we can address
separately. It also adds fixes for the aXe rules that were failing.
2020-07-28 12:59:14 -05:00
Michael Lange e7d414d9c2 Include the region query param on the View Raw File link in the task fs explorer 2020-07-22 13:46:38 -07:00
Buck Doyle 9e3ae523d6
Fix layout of title component elements (#8495)
The spacing has been broken for job types that use this yield
(parameterised and periodic) since I added the exec button
to this template. This could be further refined to allow a more
logical grouping of elements where buttons and tags are
separate.
2020-07-22 11:30:58 -05:00
Michael Lange 6b984548ab Test coverage for the deployment adapter action 2020-07-21 09:02:39 -07:00
Michael Lange 9fda4412fa Add region coverage to node adapter action tests 2020-07-21 09:02:39 -07:00
Michael Lange 3d1c9283a1 Test all allocation adapter actions with and without a region
This involves a refactor to prevent immense verbosity.
2020-07-21 09:00:21 -07:00
Michael Lange 00b805b500 Test region query param for job adapter actions 2020-07-21 09:00:20 -07:00
Michael Lange 1cb0de64e0 Always send region as a query param 2020-07-21 09:00:20 -07:00
Michael Lange 5e01266940 Refactor job adapter test to simplify setting up region and namespace state 2020-07-21 09:00:20 -07:00
Buck Doyle 7f0177548d
Add specificity to exec allocation URL generation (#8463)
Thanks to @notnoop for this UX improvement suggestion.
The allocation’s task group is always known, so it
might as well be preselected in the sidebar when the
exec window opens. Also, if the task group only has
one task, might as well preselect it too.
2020-07-20 16:07:39 -05:00
Buck Doyle 8a4dc0726d
Fix typo in exec button URL-generation (#8460)
This closes #8422, another bug facilitated by the difficulty
of automated testing when opening another window. Thanks to
@notnoop for narrowing this down.
2020-07-20 16:06:55 -05:00
dependabot[bot] a5064a55f9
Bump lodash from 4.17.14 to 4.17.19 in /ui (#8449)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.14 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.14...4.17.19)
2020-07-20 11:08:06 -05:00
Buck Doyle 77b4d59f5d
Change edition to Octane (#8418)
This updates the Ember edition setting to Octane, which I removed from #8319
because it required the template-only Glimmer components setting to be turned
on, which this does. These changes to templates accommodate that setting.
2020-07-13 09:26:12 -05:00
Michael Lange aaf32cabf0 Filter out new records from the job list page
When a prefix is set and the run job button is clicked,
the new job causes an error because it has no name yet.
2020-07-10 15:29:52 -07:00
Michael Lange d5b54ad84c Reset the system and refetch namespaces with every token change 2020-07-10 15:18:36 -07:00
Buck Doyle d7c26b033e
Fix client allocations table heading order (#8409)
This closes #8408. Thanks to @gmichalec-pandora for letting us
know about this.
2020-07-10 07:27:20 -05:00
Buck Doyle 244157786a
Add explicit this to templates (#8388)
This is the result of running the no-implicit-this-codemod, some manual fixes,
and the addition of a linting rule to prevent future ambiguity.
2020-07-09 15:19:07 -05:00
Buck Doyle ea2adb3bf6
Update template linting and fix missed curly invocations (#8382)
This includes fixes for newer template lint rules that came along with
updating that dependency, which was necessary to be able to use
the no-curly-component-invocation rule. It also updates some curly
invocations that I missed in #8075.
2020-07-09 12:30:11 -05:00
Buck Doyle 40332963ef
Update to Ember 3.16/Data 3.12 (#8319)
This updates to Ember 3.16 but leaves Ember Data at 3.12 so we don’t need
to use the model fragments beta. It can be reviewed on a commit-by-commit
basis: blueprint updates, fixes for test failures, and the removal of
now-deprecated partials.

It’s not a true update to Octane as that would involve turning on template-only
components by default, which breaks various things. We can accomplish that
separately and then add the edition setting to package.json.
2020-07-09 11:37:00 -05:00
Michael Lange 970ccedd1f
Merge pull request #8314 from hashicorp/f-ui/scaling-ux
UI: Scaling UI UX Improvements
2020-07-01 09:21:08 -07:00
Michael Lange f786ee5eae Persist the log stream/mode setting to localStorage 2020-06-30 17:09:52 -07:00
Buck Doyle 3afd14e30d
Change back to released Ember Power Select (#8317)
Thanks to @cibernox’s isActive clarification in
cibernox/ember-power-select#1374, this replaces the use
of a hacked Power Select API with a deliberate blurring
of the trigger element, which is equivalent to setting
the element to inactive.
2020-06-30 15:23:02 -05:00
Buck Doyle f7e8ab4302
Fix layering so logo is clickable (#8320)
The CSS I added in #8249 to make the search be properly
centred also made the logo unclickable as it was hidden
behind the centred element! This makes the logo stay
above the search container.
2020-06-30 15:22:31 -05:00
Michael Lange 7ad214f34a 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 8072996ee2 Label buttons that only have icons for markup 2020-06-30 11:54:11 -07:00
Michael Lange 5d491167de Reset font weight for tooltips 2020-06-30 11:54:11 -07:00
Michael Lange 70cc9cb5c8 Add tooltips to scaling controls 2020-06-30 11:54:11 -07:00
Buck Doyle 196f27aec4
Add multiple substring highlights for search (#8287)
The fuzzy search highlighting was ignoring everything after the first
substring that was matched, this now highlights all substrings.
2020-06-25 15:26:52 -05:00
Michael Lange a61bc49595
Merge pull request #8283 from hashicorp/b-ui/text-alignment-view-raw-file
UI: Fix text alignment for the "view raw file" button/link on the fs file viewer
2020-06-25 09:28:30 -07:00
Michael Lange ff015d2997
Merge pull request #8281 from hashicorp/b-ui/fix-log-streaming
UI: Revert AbortController polyfill to use native AbortController on logs page
2020-06-25 09:26:49 -07:00
Michael Lange 6c7d3f49d5
Merge pull request #8280 from hashicorp/f-ui/wide-monitor-logs
UI: Make monitor log output full-width
2020-06-25 09:22:54 -07:00
Michael Lange 683a4c81ac
Merge pull request #8279 from hashicorp/b-ui/remove-safari-special-case
UI: Fix monitor in Safari
2020-06-25 09:22:39 -07:00
Buck Doyle bf7ed82def
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
Michael Lange 18bf810936 Remove line-height override that breaks text alignment for anchors that look like buttons 2020-06-24 21:31:30 -07:00
Michael Lange f6fa2c6088 Revert AbortController polyfill to use native AbortController 2020-06-24 20:46:30 -07:00
Michael Lange 22f9faeb84 Make monitor log output full-width 2020-06-24 20:37:12 -07:00
Michael Lange 3182adeefa Remove special-casing of Safari to force use of a PollLogger 2020-06-24 20:30:52 -07:00
Buck Doyle b891dc88ff
Remove non-classic use of this.set (#8242)
This will fix a linting error introduced in 068ad06.
2020-06-22 13:23:28 -05:00
Buck Doyle ca7c252a96
Add linting for classic decorator (#8182)
This completes an installation step I missed when making #8144 and
marks classes that are using the EmberObject APIs as classic.
2020-06-22 10:48:53 -05:00
Michael Lange 44556d0acb
Fix flaky task-group-row test. (#8221)
Sometimes a job would be created with a running deployment which made
the increment button disabled.

While I was finding the root cause, I also changed the waitUntil pattern
to match the StepperInput technique which is more resilient to code
changes.
2020-06-20 09:48:32 -05:00
Michael Lange ac056b14db
Merge pull request #8218 from hashicorp/b-ui/plugin-allocation-healthy-flakiness
UI: Add cycling to factory healthy flags
2020-06-19 14:39:47 -07:00
Buck Doyle 0dd9ffdab3 Add cycling to factory healthy flags
This is meant to address the plugin test failure seen here:
https://app.circleci.com/pipelines/github/hashicorp/nomad/10015/workflows/ace5d615-db03-4cfc-86b2-31e9e00473ec/jobs/77014/tests

I believe the problem was that on rare occasions, the set
of mock storage controllers and nodes were all unhealthy,
so the facet test had no rows to iterate through. Since
there are always three of each, this guarantees some
healthy ones will be present.
2020-06-19 15:43:32 -05:00
Michael Lange a9bf04675f Add a key to the alloc table on the task group detail page
Adding keys tells Ember to rerender matching entries instead of
destroying and recreating.

Without this key, every time the allocation collection changes, every
allocation row gets destroyed and recreated.

This happens a lot, since each allocation needs to be reloaded which
dirties the collection.

Since allocation rows fetch stats on init, each of these many many
renders results in a stats request.

By using key and rerendering matching records, this all goes away. Since
the rows aren't being destroyed and recreated, the init stats request
isn't being made overnumerously.
2020-06-19 11:27:57 -07:00
Buck Doyle ee7141a59a
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 3be9d338cb Remove superfluous property from the StepperInput page object 2020-06-19 10:21:39 -07:00
Michael Lange 02fd45f02b Acceptance tests for task group scaling 2020-06-18 23:23:03 -07:00
Michael Lange 1cadcf90b8 Watch the latest deployment relationship to disable the stepper appropriately 2020-06-18 23:23:03 -07:00
Michael Lange d3cce73747 Wire up the scale action on the task group page 2020-06-18 23:23:03 -07:00
Michael Lange 6259e3ae5d Integrate the stepper input with the task group page 2020-06-18 22:32:56 -07:00
Michael Lange ddd5a7e342 Test coverage for the StepperInput 2020-06-18 22:08:29 -07:00
Michael Lange ff3653ddf6 Style the StepperInput component 2020-06-18 22:08:28 -07:00
Michael Lange 28916c22cf Add count StepperInput to the task group page 2020-06-18 22:08:28 -07:00
Michael Lange 26760c440d StepperInput story 2020-06-18 22:08:28 -07:00
Michael Lange ba91a4ffe5 Barebones StepperInput component 2020-06-18 22:08:28 -07:00
Michael Lange 2e04719fbc Slow the debounce time. 2020-06-18 22:08:28 -07:00
Michael Lange f1fec7430f Test coverage for the task group row scale actions 2020-06-18 22:08:28 -07:00
Michael Lange c664f57361 Disable scale buttons when a deployment is running or ACL forbids it 2020-06-18 22:08:28 -07:00
Michael Lange 3b7b5f9649 Add canScale ability for jobs 2020-06-18 22:08:28 -07:00
Michael Lange 689dd92aa8 Mirage updates for task group scaling and scaling post endpoint 2020-06-18 22:08:28 -07:00
Michael Lange 136b4ec354 Wire up the +/- buttons in task group rows to the job scale action 2020-06-18 22:08:28 -07:00
Michael Lange aebc896ff6 New scale action for jobs (and a convenience task group method) 2020-06-18 22:08:27 -07:00
Michael Lange 57f4e9a62e Create new AbortController with each tick of the ec task loops
This was a disturbing discovery. Requests in watch loops would recycle
AbortControllers meaning once any request was aborted, all requests
forever after were skipped. I noticed it with deployments and job
summary on the job detail page.

I suspect this regression occurred when jQuery was removed. This needs
test coverage still to make sure it doesn't happen again.
2020-06-18 22:08:27 -07:00
Michael Lange 64cfa62c71 Make sure buttons in a button bar have a very visible focus state 2020-06-18 22:08:27 -07:00
Michael Lange c583c00088 Add the elements of the manual scaling actions to the task-group-row component 2020-06-18 22:08:27 -07:00
Michael Lange 1182e76383 Add the min/max and policy y/n of a task group to the details ribbon 2020-06-18 22:08:27 -07:00
Michael Lange 76c6a9d89f 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 2739da75d6 Additional button-bar treatments for use in a table row 2020-06-18 22:08:27 -07:00
Michael Lange dfcfdf0293 Extend button-bar support to buttons 2020-06-18 22:08:27 -07:00
Michael Lange b4b00282dd When an icon is intended as text, it shouldn't have pointer events
This prevents the svg from being a target in click events.
2020-06-18 22:08:27 -07:00
Michael Lange f9819105c3 New xsmall button size 2020-06-18 22:08:27 -07:00