Commit Graph

22 Commits

Author SHA1 Message Date
Phil Renaud e03c5a43be Job Services: fixtures and acceptance tests (#14319)
* Added to subnav and basic table implemented

* Existing services become service fragments, and services tab aggregated beneath job route

* Index page within jobs/job/services

* Watchable services

* Lintfixes

* Links to clients and individual services set up

* Child service route

* Keyboard shortcuts on service page

* Model that shows consul services as well, plus level and provider cols

* lintfix

* Level as query param

* Watch job for service name changes too

* Group level service fixtures established

* Progress at task level and job-linked services

* Task and group services on update

* Fixture side-effect cleanup

* Basic acceptance tests for job services

* Testmodel cleanup

* Disabled mirage logging

* New cluster type specifically for services

* Without explicit job-model binding

* Trying to isolate a tostring error

* Account for new tab in keyboardnav

* More test isolation attempts

* Remove skipped tests and link task to parent group by id

ui: add service health viz to table (#14369)

* ui: add service-status-bar

* test: service-status-bar

* refact: update component api for new data struct

* ui: format service health struct

* ui:  add service health viz to table

* temp: add placeholder to remind conditional watcher

* test: write tests for transformation algorithm

* refact: update transformation algo

* ui: conditionally long poll checks endpoint

* refact: add conditional logic for nomad provider

refact: update service-fragment model to include owner info

ui: differentiate between task and group-level in derived state comp

test: add test to document behavior

refact: update tests for api change

refact: update integration test for API change

chore: remove unsused vars

chore: elvis operator to protect mirage

refact: create refId instead of internalModel

refact: update algo

refact: update conditional template logic

refact: update test for api change:

chore: cant use if and not in hbs conditional
2022-09-07 10:24:33 -04:00
Phil Renaud 182bead357
[ui, mirage] Evaluation mocks (#12471)
* Linear and Branching mock evaluations

* De-comment

* test-trigger

* Making evaluation trees dynamic

* Reinstated job relationship on eval mock

* Dasherize job prefix back to normal

* Handle bug where UUIDKey is not present on job

* Appending node to eval

* Job ID as a passed property

* Remove unused import

* Branching evals set up as generatable
2022-04-27 12:11:24 -04:00
Phil Renaud 311a6d82c9
Importing string methods directly from @ember/string (#12499)
* Capitalize methods

* Let ESLint yell at us again

* Dasherize
2022-04-07 15:51:41 -04:00
Jai Bhagat 2efa6cc7e4 add agent serializer
This commit adds a serializer for the Agent. When the factory was originally
designed to have the Member properities directly on the Agent class which was
not set-up properly technically, but since we didn't really make use of the
Agent endpoint.
2021-07-06 16:42:07 -04: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
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
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 64fc738733 Migrate to the new resources properties for allocs and nodes 2020-10-15 02:54:16 -07:00
Michael Lange 0f2fd905d8 Derive allocation Resources property from TaskResources 2020-09-04 13:46:50 -07:00
Michael Lange 25bb975749 Clean up erroneous and redundant mirage things 2020-08-27 17:58: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 765077eb03 Model job scaling and events in Mirage 2020-07-29 19:07:24 -07:00
Michael Lange 1bd6a69067
UI: Support for CSI (#7446)
Closes #7197 #7199

Note: Test coverage is limited to adapter and serializer unit tests. All
acceptance tests have been stubbed and all features have been manually
tested end-to-end.

This represents Phase 1 of #6993 which is the core workflow of CSI in
the UI. It includes a couple new pages for viewing all external volumes
as well as the allocations associated with each. It also updates
existing volume related views on job and allocation pages to handle both
Host Volumes and CSI Volumes.
2020-03-25 07:51:26 -05:00
Mahmood Ali 16f7a3f31b ui: protect against nil services
Protect against case where an alloc has no services and avoid
dereferencing null.

Here, we ensure that the model and test serializers mimic the API by
having nil TaskGroup.Services instead of an empty array.
2019-09-16 16:50:30 -04:00
Buck Doyle b5e5798e54
UI: add Consul Connect features (#6108) 2019-09-04 09:39:56 -05:00
Michael Lange 94d321ef4f Properly model regions in Mirage 2018-08-09 19:57:21 -07:00
Michael Lange ab54583878 Use the JobID as the Version ID for mirage job versions 2018-07-27 16:32:43 -07:00
Michael Lange 3f781743e4 NodeEvent and NodeDriver modeling in Mirage 2018-05-25 10:15:24 -07:00
Michael Lange 7768e14380 Correctly wire up job relationships 2018-03-13 16:34:01 -07:00
Michael Lange c408b4ecc4 Run prettier on all files
Since prettier updated, some files have out of date formatting.
2018-01-17 09:04:00 -08:00
Michael Lange 21a9d9c4e5 Mirage factories for tokens and policies 2017-10-16 13:27:51 -07:00
Alex Dadgar e5ec915ac3 sync 2017-09-19 10:08:23 -05:00