Commit graph

2284 commits

Author SHA1 Message Date
Phil Renaud cce22ad73b
[ui, backport] Access Control CRUD: Make name fields for Policies and Roles required (#18605) (#18626)
* Access Control CRUD: Make name fields for Policies and Roles required (#18605)

* Removed file since merged with access-control.scss
2023-09-29 15:30:51 -04:00
hc-github-team-nomad-core 269111a369
backport of commit 8da40465af3133df150cf0e0d10c7e1b36fd2151 (#18625)
Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com>
2023-09-29 15:21:01 -04:00
Phil Renaud bfba4f5e13
[ui] ACL Roles in the UI, plus Role, Policy and Token management (#17770) (#18599)
* Rename pages to include roles

* Models and adapters

* [ui] Any policy checks in the UI now check for roles' policies as well as token policies (#18346)

* combinedPolicies as a concept

* Classic decorator on role adapter

* We added a new request for roles, so the test based on a specific order of requests got fickle fast

* Mirage roles cluster scaffolded

* Acceptance test for roles and policies on the login page

* Update mirage mock for nodes fetch to account for role policies / empty token.policies

* Roles-derived policies checks

* [ui] Access Control with Roles and Tokens (#18413)

* top level policies routes moved into access control

* A few more routes and name cleanup

* Delog and test fixes to account for new url prefix and document titles

* Overview page

* Tokens and Roles routes

* Tokens helios table

* Add a role

* Hacky role page and deletion

* New policy keyboard shortcut and roles breadcrumb nav

* If you leave New Role but havent made any changes, remove the newly-created record from store

* Roles index list and general role route crud

* Roles index actually links to roles now

* Helios button styles for new roles and policies

* Handle when you try to create a new role without having any policies

* Token editing generally

* Create Token functionality

* Cant delete self-token but management token editing and deleting is fine

* Upgrading helios caused codemirror to explode, shimmed

* Policies table fix

* without bang-element condition, modifier would refire over and over

* Token TTL or Time setting

* time will take you on

* Mirage hooks for create and list roles

* Ensure policy names only use allow characters in mirage mocks

* Mirage mocked roles and policies in the default cluster

* log and lintfix

* chromedriver to 2.1.2

* unused unit tests removed

* Nice profile dropdown

* With the HDS accordion, rename our internal component scss ref

* design revisions after discussion

* Tooltip on deleted-policy tokens

* Two-step button peripheral isDeleting gcode removed

* Never to null on token save

* copywrite headers added and empty routefiles removed

* acceptance test fixes for policies endpoint

* Route for updating a token

* Policies testfixes

* Ember on-click-outside modifier upgraded with general ember-modifier upgrade

* Test adjustments to account for new profile header dropdown

* Test adjustments for tokens via policy pages

* Removed an unused route

* Access Control index page tests

* a11y tests

* Tokens index acceptance tests generally

* Lintfix

* Token edit page tests

* Token editing tests

* New token expiration tests

* Roles Index tests

* Role editing policies tests

* A complete set of Access Control Roles tests

* Policies test

* Be more specific about which row to check for expiration time

* Nil check on expirationTime equality

* Management tokens shouldnt show No Roles/Policies, give them their own designation

* Route guard on selftoken, conditional columns, and afterModel at parent to prevent orphaned policies on tokens/roles from stopping a new save

* Policy unloading on delete and other todos plus autofocus conditionally re-enabled

* Invalid policies non-links now a concept for Roles index

* HDS style links to make job.variables.alert links look like links again

* Mirage finding looks weird so making model async in hash even though redundant

* Drop rsvp

* RSVP wasnt the problem, cached lookups were

* remove old todo comments

* de-log
2023-09-27 17:02:48 -04:00
hc-github-team-nomad-core 71f8405b2d
backport of commit 30a9b6eda74e515135dbebb600b362da6d637cb1 (#18256)
Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com>
2023-09-06 09:25:51 -04:00
hc-github-team-nomad-core e4c7388608
backport of commit 3e61b3a37df9ff0836b52ba5440106ad0f607dd7 (#18294)
Co-authored-by: Андрей Неустроев <99169437+aneustroev@users.noreply.github.com>
2023-08-22 16:01:24 -04:00
hc-github-team-nomad-core 0fb0054e60
backport of commit 13b4d98bce058c59e054f5cce9ad4175bf3c5374 (#18248)
This pull request was automerged via backport-assistant
2023-08-17 09:47:02 -05:00
hc-github-team-nomad-core bd3f52d0e7
Backport of [ui] Preserve HCL2 on stop/start via the web UI into release/1.6.x (#18241)
This pull request was automerged via backport-assistant
2023-08-17 08:33:06 -05:00
hc-github-team-nomad-core e9b6be87e2
[ui] Job Variables page (#17964) (#18106)
* Bones of a component that has job variable awareness

* Got vars listed woo

* Variables as its own subnav and some pathLinkedVariable perf fixes

* Automatic Access to Variables alerter

* Helper and component to conditionally render the right link

* A bit of cleanup post-template stuff

* testfix for looping right-arrow keynav bc we have a new subnav section

* A very roundabout way of ensuring that, if a job exists when saving a variable with a pathLinkedEntity of that job, its saved right through to the job itself

* hacky but an async version of pathLinkedVariable

* model-driven and async fetcher driven with cleanup

* Only run the update-job func if jobname is detected in var path

* Test cases begun

* Management token for variables to appear in tests

* Its a management token so it gets to see the clients tab under system jobs

* Pre-review cleanup

* More tests

* Number of requests test and small fix to groups-by-way-or-resource-arrays elsewhere

* Variable intro text tests

* Variable name re-use

* Simplifying our wording a bit

* parse json vs plainId

* Addressed PR feedback, including de-waterfalling

Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com>
2023-08-01 09:59:39 -04:00
hc-github-team-nomad-core f2c70e9d51
Backport of [ui] Search results are overloading filter with sorted results into release/1.6.x (#18105)
This pull request was automerged via backport-assistant
2023-07-31 12:07:52 -05:00
hc-github-team-nomad-core 51b8993180
backport of commit 67e5b084a1ea525cc5a2b93c2f0ed890d1af0ce3 (#18052)
This pull request was automerged via backport-assistant
2023-07-24 15:00:43 -05:00
Luiz Aoqui 21cf30178a ui: handle errors from unimplemented services (#18020)
When a request is made to an RPC service that doesn't exist (for
example, a cross-region request from a newer version of Nomad to an
older version that doesn't implement the endpoint) the application
should return an empty list as well.
2023-07-21 09:20:00 -04:00
hc-github-team-nomad-core 63316363c9
Backport of ui: handle node pool requests to older regions into release/1.6.x (#18024)
This pull request was automerged via backport-assistant
2023-07-21 08:17:08 -05:00
hc-github-team-nomad-core 180ea2df9c
backport of commit ddd74c051a4f02a2ace43abd6e0617b8ea3c1192 (#18012)
This pull request was automerged via backport-assistant
2023-07-20 13:16:53 -05:00
hc-github-team-nomad-core 36163c36f8
backport of commit 6e4603e8ba503cd08279f50da1a4c0a5539a9768 (#18011)
This pull request was automerged via backport-assistant
2023-07-20 13:16:34 -05:00
hc-github-team-nomad-core d3b1d58c4d
backport of commit 715764bfe448fc6a80ca3858377b4f760d39c611 (#18010)
This pull request was automerged via backport-assistant
2023-07-20 11:38:52 -05:00
hc-github-team-nomad-core 963b2d97b2
Backport of [ui] When a purged/404-ing job is detected, boot the user out of that job and back to the index into release/1.6.x (#18009)
This pull request was automerged via backport-assistant
2023-07-20 11:37:06 -05:00
hc-github-team-nomad-core 642cad50d8
Backport of ui: fix Topology node state filter into release/1.6.x (#18000)
This pull request was automerged via backport-assistant
2023-07-19 15:38:55 -05:00
Phil Renaud 5cc0b39683
Report shows a 3rd party browser extension puts a banner at the top of page and awkwardly shifts nav; this fixes that (#17783) 2023-06-30 17:09:42 -04:00
Phil Renaud d559072e48
[ui] Text wrap long lines of code and logs (#17754)
* Text and code wrapping as a localStorage var

* task-log uses wrapping and kb shortcut

* Word wrap keyboard labels

* Wrapper as a toggle not a button

* Changelog and fixed an extra space trailing log lines

* Moves toggle to inside

* Acceptance tests for ww and toggle click
2023-06-30 17:07:57 -04:00
Phil Renaud 01d6a94eac
[ui] HCL-in-UI: Re-arrange buttons, add save-as-file (#17752)
* Move buttons over as expected

* Let a user download file locally

* test mock fns for jobeditor

* Changelog
2023-06-28 21:57:03 -04:00
Phil Renaud 5f8c4b3d48
Link to allocations.allocation by ID reference, not by model (#17753) 2023-06-28 10:00:59 -04:00
Phil Renaud bd1ec095d3
[ui] Move Placement Failures notification above job status panel (#17750)
* Moves the Placement Failures box above job status, should it exist

* Move it for non-service job-types as well
2023-06-27 19:32:51 -04:00
Phil Renaud 7a60c69b73
[ui] links to allocations explicitly go through their route model hook (#17737)
* links to allocations explicitly go through their route model hook

* Acceptance test to make sure alloc clicking loads alloc endpoint obj
2023-06-27 10:01:50 -04:00
Phil Renaud 32af971bcb
Node Pools moved to after Type in jobs index columns (#17738) 2023-06-26 17:00:01 -04:00
Phil Renaud 81edceb2de
[ui] alignment and spacing for job status panel (#17708)
* CSS alignment and spacing for job status panel

* Only fade the count, not the legend icon, when count is 0

* Unrounded version corners

* changelog

* css has to only remove border radius when count is present

* Seed stabilization for services test

* Try consolidating the testfixes from before

* Total test isolation and bonus logs

* Drop the isolation but keep the logs

* Remove bonus logging
2023-06-26 12:18:12 -04:00
Michael Lange faa3377a56
Merge pull request #17691 from hashicorp/f/missing-chart-stories
[UI] Missing chart stories
2023-06-23 08:17:34 -07:00
Luiz Aoqui f785da4748
ci: fix flaky UI test (#17676) 2023-06-22 23:07:36 -04:00
Michael Lange 41f6f7e04f TopoViz story that is sourced from Mirage
Unfortunately due to the split build nature of the ember app and
storybook it isn't possible to import mirage in the storybook context to
control scenarios via a knob :(
2023-06-22 16:55:36 -07:00
Michael Lange 85371941c4 Full TopoViz story 2023-06-22 16:55:25 -07:00
Michael Lange cb30ef1a0f TopoViz child component stories 2023-06-22 15:03:32 -07:00
Michael Lange 859374ecad Standard usage story 2023-06-22 13:53:21 -07:00
Michael Lange de09e3f51a Basic recommendation-chart story with knobs 2023-06-22 13:53:21 -07:00
Phil Renaud 7373261b58
[ui] Versions added to deploying status panel (#17629)
* Versions added to deploying status panel

* Wrap the running and healthy title in a span

* Versions in the deployment UI next to titles

* Version count and label styles updated
2023-06-22 16:19:41 -04:00
Phil Renaud cf21a246c0
[ui, deployments] job status panel legend: counts of 0 don't get links (#17644) 2023-06-22 14:40:11 -04:00
Jai 7103ce1957
ui: create node pool model (#17301)
Co-authored-by: Phil Renaud <phil@riotindustries.com>
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-06-22 13:11:44 -04:00
Luiz Aoqui ca3c004130
ci: fix some flaky UI tests (#17648)
These tests would fail depending on the value of the seed used.
2023-06-22 10:51:07 -04:00
Luiz Aoqui 0549b880ef
ui: display mirage scenario in header label (#17649)
This information is useful when switching between different scenarios
for testing.
2023-06-22 10:38:17 -04:00
Luiz Aoqui 9f5c02d947
ui: add tooltips to the Topology labels (#17647)
Add tooltips to labels in nodes and datacenters for the Topology view
page to clarify what each value represents.
2023-06-22 10:33:42 -04:00
Luiz Aoqui 3d761e712b
ui: remove redundant columns from child job table (#17645)
Namespace, job type, and priority are already available from the parent
job header, so displaying them in the table caused it to be too crowded.
2023-06-22 10:22:41 -04:00
Phil Renaud 16886bf6bf
Moves to the current LTS release of Node for our build and release workflows (#17639) 2023-06-21 15:17:24 -04:00
Phil Renaud 94507cc7b7
[ui] General status for steady-state jobs (#17599)
* Degraded vs Healthy etc. status

* Standardize the look of a deploying status panel

* badge styles

* remove job.status from title component in favour of in-panel status

* Remove a redundant check

* re-attrd fail-deployment button considered
2023-06-21 11:57:28 -04:00
Michael Lange 918f503e51 Rip out the xUnit test reporter
This was used to integrate with Circle CI's deeper test reporting
(failures, flakes, reporting). It's strictly vestigial now that we're on
GHA.
2023-06-20 14:49:56 -07:00
Michael Lange 0e0d524f84 New generic exam:parallel yarn script
This is intended to be used like `yarn exam:parallel -- more --options`

This way a split and partition can be provided by CI without CI also
needing to deal with percy details.
2023-06-20 13:51:45 -07:00
Phil Renaud d5a2671969
[ui] Keyboard shortcuts for Promote Canary and Fail Deployment (#17568) 2023-06-20 15:43:32 -04:00
Phil Renaud 7bac272095
Specific health_unknown getter that only looks at running allocs (#17566) 2023-06-20 15:03:46 -04:00
Phil Renaud 8e41380f72
[ui, deployments] Promote Canary and Unhealthy Allocations in the deployment status panel (#17547)
* A wild health status appears

* autoPromote notification conditions

* Legend fixes etc

* Acceptance tests for new canary alerts
2023-06-19 12:06:18 -04:00
Michael Lange 3ba7f4dae3 Use the legacy openssl provider for backcompat
Node v18 uses a newer version of openssl than webpack 4 is compatible
with. This is the quickest fix.

The ideal fix would be to upgrade webpack to v5 but the state of Ember,
Storybook, and generally just JS dep management makes this not an
option.
2023-06-16 17:58:40 -07:00
Michael Lange 65270115bf Error free Storybook build 2023-06-15 12:43:15 -07:00
Michael Lange 9635bec8bb Free your mind of the babel and the packed web
ember-cli-storybook and storybook itself has progressed to the point
where the DIY configs aren't necessary. It's all swept under the
`framework: '@storybook/ember'` config in main.js. Yay!
2023-06-15 12:40:03 -07:00
Michael Lange 2b5c4d982c Tidy up Storybook related packages
It's unfortunate having to point to a hash for ember-cli-storybook, but
there hasn't been a release since the environment PR merged. At least
this is better than pointing at a fork?
2023-06-15 12:40:03 -07:00