Commit Graph

177 Commits

Author SHA1 Message Date
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
2103e55daf Update ember-a11y-testing (#9912)
This includes seemingly-unrelated changes because of dependency updates.
2021-02-02 12:45:40 -06:00
Michael Lange
ff252db327 Use Hz instead of hz throughout the UI 2021-01-26 10:53:26 -08:00
Buck Doyle
e84a360e42 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
40084e4a9a Add query parameter to override Mirage scenario (#9380) 2020-11-30 08:12:15 -06:00
Tim Gross
8351c3f9d6 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
Michael Lange
edd296ff51 Revert "Temporarily remove poststop from the UI"
This reverts commit f8a505ea2f.
2020-11-12 09:16:52 -08:00
Buck Doyle
7b9f8b5cb1 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
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
8d8f9aaa28 Show the nomad agent version of the agent the UI is served from 2020-10-25 23:52:06 -07:00
Buck Doyle
5237c11817 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
Michael Lange
2cf4b5de46 Remove the scenarios I didn't need/didn't get to 2020-10-15 11:45:59 -07:00
Michael Lange
a5ea84d957 Update scenarios to use new resources code 2020-10-15 02:54:16 -07:00
Michael Lange
faaf697c9e Migrate to the new resources properties for allocs and nodes 2020-10-15 02:54:16 -07:00
Michael Lange
98dd2586b7 Medium scale topo scenario 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
606910f365 Tweak topo scenario 2020-10-15 02:54:13 -07:00
Michael Lange
7cf3b74236 Fix factory bug that made it so pending allocs had no resources 2020-10-15 02:54:13 -07:00
Michael Lange
1e9e2a1c8b Small cluster example scenario for the topo viz 2020-10-15 02:54:13 -07:00
Michael Lange
ccf022ec8b 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
d55c3ca809 Derive allocation Resources property from TaskResources 2020-09-04 13:46:50 -07:00
Michael Lange
b46955f9e1 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
9bcf8c8d3d Parameterize generateResources to enable property overrides 2020-09-04 13:46:35 -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
766c2dce80 Merge branch 'master' into f-ui/poststart-poststop 2020-08-28 10:15:18 -05:00
Michael Lange
c7da3d377d Clean up erroneous and redundant mirage things 2020-08-27 17:58:24 -07:00
Buck Doyle
14bfb9a53c Add poststart and poststop lifecycle phases 2020-08-26 09:55:42 -05:00
Nick Ethier
2be03bc0d9 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
Michael Lange
2a88541fa2 Force mock error scale events to be annotations 2020-08-05 12:02:22 -07:00
Michael Lange
cc44bc41e5 Acceptance tests for scaling events 2020-07-29 19:07:24 -07:00
Michael Lange
9008694ab7 Make scale event properties more conditional and serialized correctly 2020-07-29 19:07:24 -07:00
Michael Lange
5f2dee8225 Model job scaling and events in Mirage 2020-07-29 19:07:24 -07:00
Michael Lange
1913c5f60f 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
5772ea210c 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
a1f1079cfd Mirage updates for task group scaling and scaling post endpoint 2020-06-18 22:08:28 -07:00
Michael Lange
a0c6cc2dfd Server monitor page 2020-06-16 10:23:36 -07:00
Michael Lange
d0a0ffd27d Test coverage for the client monitor page 2020-06-16 10:23:36 -07:00
Buck Doyle
06baadd01e UI: add filesystem browsing for allocations (#7951)
This partially addresses #7799.

Task state filesystems are contained within a subdirectory of their
parent allocation, so almost everything that existed for browsing task
state filesystems was applicable to browsing allocations, just without
the task name prepended to the path. I aimed to push this differential
handling into as few contained places as possible.

The tests also have significant overlap, so this includes an extracted
behavior to run the same tests for allocations and task states.
2020-06-01 08:15:59 -05:00
Michael Lange
3872b0be23 Always lower case headers now 2020-05-21 10:35:40 -07:00
Michael Lange
cb5cea646c Work around a mirage bug 2020-05-18 17:23:55 -07:00
Michael Lange
3da88c6925 Test coverage for the node-only change to the list view 2020-05-18 15:30:00 -07:00
Michael Lange
79327c9d96 Introduce shallow to plugin factories to speed up tests 2020-05-07 17:29:42 -07:00
Michael Lange
877cadffc9 Acceptance test for PluginDetail 2020-05-06 17:36:45 -07:00
Michael Lange
9632aace74 Sort allocations on the plugin detail page 2020-05-06 17:21:49 -07:00
Michael Lange
0dd5882c75 Update storage controller mirage code to accommodate EDMF's lack of relationships 2020-05-06 17:21:46 -07:00
Michael Lange
5d3438193a Model out the rest of the CSI Plugin properties 2020-05-06 17:21:44 -07:00
Michael Lange
d9aaaa0107 Merge pull request #7855 from hashicorp/b-ui/alloc-wrong-reserved-resources
UI: Make allocation reference own task group instead of job's task group when job versions don't match
2020-05-06 10:08:37 -07:00
Michael Lange
113cd4c6ef Stabilize job and allocation job versions in fixtures 2020-05-01 14:29:24 -07:00
Jasmine Dahilig
c10ac6394f UI: Add representations for task lifecycles (#7659)
This adds details about task lifecycles to allocations, task groups,
and tasks. It includes a live-updating timeline-like chart on allocations.
2020-04-30 08:15:19 -05:00
Michael Lange
283e112d96 Acceptance tests for the volumes list page 2020-04-03 19:28:12 -07:00