Commit Graph

1855 Commits

Author SHA1 Message Date
Alexey Kulakov
919e5c2aa4 feat(ui): yarn -> pnpm (#26309) 2025-08-20 13:01:22 -07:00
Alexey Kulakov
0cac9813fa fix(ui): remove old pattern for component templates (#26431) 2025-08-08 10:03:42 -07:00
Allison Larson
e16a3339ad Add CSI Volume Sentinel Policy scaffolding (#26438)
* Add ent policy enforcement stubs to CSI Volume create/register

* Wire policy override/warnings through CSI volume register/create

* Add new scope to sentinel apply

* Sanitize CSISecrets & CSIMountOptions

* Add sentinel policy scope to ui

* Update docs for new sentinel scope/policy

* Create new api funcs for CSI endpoints

* fix sentinel csi ui test

* Update sentinel-policy docs

* Add changelog

* Update docs from feedback
2025-08-07 12:03:18 -07:00
Aimee Ukasick
a30cb2f137 Update UI, code comment, and README links to docs, tutorials (#26429)
* Update UI, code comment, and README links to docs, tutorials

* fix typo in ephemeral disks learn more link url

* feedback on typo

Co-authored-by: Tim Gross <tgross@hashicorp.com>

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2025-08-06 09:40:23 -05:00
James Rasell
99b215205e ui: Handle new token self response object when ACLs are disabled. (#25881)
* ui: Handle new token self response object when ACLs are disabled.

The ACL self lookup now returns a spoof token when ACLs are
disbaled, rather than an error. The UI needs to be updated to
handle this change, so permissions checks are not performed which
grey out buttons such as client drain incorrectly.

* changelog: add entry for #25881
2025-05-23 09:16:58 -04:00
James Rasell
e928131482 ui: Only show paused icon when allocs in pending state are paused. (#25742)
Jobs were being marked incorectly as having paused allocations
when termimal allocations were marked with the paused boolean. The
UI should only mark a job as including paused allocations when
these paused allocations are in the correct client state, which is
pending.

---------

Co-authored-by: Phil Renaud <phil@riotindustries.com>
2025-04-25 07:45:45 +01:00
Phil Renaud
ce83993667 [ci/cd] Moves our default github action flows to use Node v20 (#25425)
* Moves our default github action flows to use Node v20

* noop to trigger ui-build pipeline
2025-03-19 11:38:20 -04:00
Phil Renaud
3370d9cb96 [ui] Custom watchQuery equivalent on the storage index (#25374)
* Custom watchQuery equivalent on the storage index

* Tests for live updates to the storage page

* Deconditionalizing the pagination on storage, and fixing a bug where I was looking at filtered but not paginated DHV

* Test for pagination with live-updates
2025-03-19 11:38:01 -04:00
Phil Renaud
c9e4351ee5 [ui] Icon migration from {{x-icon}} to Helios (#25353)
* First batch of x-icon to hds::icons

* Bunch more icons and a note for jobrow

* Fixes for tests that depended on specific action names

* Icon-bumped-down specified to solo-icons in table cells

* Class-basing the icon bump and deferring icon svg load in env

* Exec window sidebar icons were looking a little off
2025-03-14 13:22:18 -04:00
Phil Renaud
88ff5a7cae [ui] Scope selection for Sentinel Policies (#25390)
* An option to select, and column etc. to view, sentinel policy scope

* Flake potential: Seed(1) had a couple jobs with the same ModifyIndex

* More de-flaking
2025-03-14 12:37:39 -04:00
Phil Renaud
239ac3e4bd [ui] Case-insensitive jobs list filtering (#25378) 2025-03-13 16:39:19 -04:00
Phil Renaud
1976202cd6 Feature: Dynamic Host Volumes in the UI (#25224)
* DHV UI init

* /csi routes to /storage routes and a routeRedirector util (#25163)

* /csi routes to /storage routes and a routeRedirector util

* Tests and routes move csi/ to storage/

* Changelog added

* [ui] Storage UI overhaul + Dynamic Host Volumes UI (#25226)

* Storage index page and DHV model properties

* Naive version of a storage overview page

* Experimental fetch of alloc data dirs

* Fetch ephemeral disks and static host volumes as an ember concurrency task and nice table stylings

* Playing nice with section header labels to make eslint happy even though wcag was already cool with it

* inlined the storage type explainers and reordered things, plus tooltips and keynav

* Bones of a dynamic host volume individual page

* Woooo dynamic host volume model, adapter, and serializer with embedded alloc relationships

* Couple test fixes

* async:false relationship for dhv.hasMany('alloc') to prevent a ton of xhr requests

* DHV request type at index routemodel and better serialization

* Pagination and searching and query params oh my

* Test retrofits for csi volumes

* Really fantastic flake gets fixed

* DHV detail page acceptance test and a bunch of mirage hooks

* Seed so that the actions test has a guaranteed task

* removed ephemeral disk and static host volume manual scanning

* CapacityBytes and capabilities table added to DHV detail page

* Debugging actions flyout test

* was becoming clear that faker.seed editing was causing havoc elsewhere so might as well not boil the ocean and just tell this test to do what I want it to

* Post-create job gets taskCount instead of count

* CSI volumes now get /csi route prefix at detail level

* lazyclick method for unused keynav removed

* keyboard nav and table-watcher for DHV added

* Addressed PR comments, changed up capabilities table and id references, etc.

* Capabilities table for DHV and ID in details header

* Testfixes for pluginID and capabilities table on DHV page
2025-03-10 14:46:02 -04:00
Phil Renaud
7d08e79da3 [ui] System, Batch, and Sysbatch jobs' Start Job buttons let you revert to previous versions (#25104)
* Changes the behaviour of system/batch/sysbatch jobs not to look for a latest stable version, as their versions never go to stable

* Dont show job stability on versions page for system/sysbatch/batch jobs

* Tests that depend on jobs to revert specify that they are Service jobs

* Batch jobs added to detail-restart test loop

* Right, they're not stable, they're just versions
2025-02-25 11:10:14 -05:00
Phil Renaud
389f4612b6 [ui] Multi-condition start/revert/edit buttons when a job isn't running (#24985)
* Multi-condition start/revert/edit buttons when a job isn't running

* mirage-mocked revertable jobs and acceptance tests

* Remove version-watching from job index route
2025-02-03 22:36:50 -05:00
James Rasell
bfd5f38761 ui: Remove unrequired node read from task log streaming page. (#24973)
Co-authored-by: Phil Renaud <phil@riotindustries.com>
2025-01-30 07:42:27 +00:00
James Rasell
75d0ac657e ui: Fill service check background object for pending checks. (#24818) 2025-01-15 15:27:10 +00:00
Phil Renaud
ab39f198ff [ui] Show ALL regions' leaders when viewing servers route (#24723)
* Looks up all regions' leaders when viewing servers route

* Tests for multi-region leadership badges and css same-line fix
2025-01-07 12:35:04 -05:00
Daniel Peinhopf
04e930b756 Show HCL variable input on job submission. (#24622)
* Show HCL variable input on job submission.

* Add changelog entry

(authored by @sevensolutions)
2024-12-18 13:56:47 -05:00
Phil Renaud
7746f290e6 Reset childjobs watcher when kicking it off from a new parent job route (#24668) 2024-12-17 10:49:37 -05:00
Phil Renaud
932c3ebfb0 [ui] Adds meta k/v tables to Task Group and Task pages (#24594)
* Experimenting with a generic meta job-part component

* Taskstate.task gets me every time

* continue-on-error false test

* continue-on-error back in, but explicit success check after exam

* Testfixes for new meta structure on tasks and groups

* Clean up test and dev code
2024-12-17 10:46:03 -05:00
Phil Renaud
71e3716435 [ui] Fixes an issue where system jobs' status were set to Scaled Down when their allocs get garbage collected (#24620)
* Fixes an issue where system jobs' status were set to Scaled Down when their allocs get garbage collected

* Added to aggregateAllocStatus acceptance test and changelog
2024-12-17 01:01:19 -05:00
Phil Renaud
4b91c17dfa [ui, ci] retain artifacts from test runs including test timing (#24555)
* retain artifacts from test runs including test timing

* Pinning commit hashes for action helpers

* trigger for ui-test run

* Trying to isolate down to a simple upload

* Once more with mkdir

* What if we just wrote our own test reporter tho

* Let the partitioned runs handle placement

* Filter out common token logs, add a summary at the end, and note failures in logtime

* Custom reporter cannot also have an output file, he finds out two days late

* Aggregate summary, duration, and removing failure case

* Conditional test report generation

* Timeouts are errors

* Trying with un-partitioned input json file

* Remove the commented-out lines for main-only runs

* combine-ui-test-results as its own script
2024-12-03 09:56:06 -05:00
Phil Renaud
76e39b1c1e [ui] Volumes and plugins navigation fixes, generally (#24542)
* Volumes and plugins navigation fixes, generally

* Mirage no longer has to take the csi/ string into account

* Volume adapter test fix
2024-11-29 16:14:17 -05:00
Phil Renaud
de96c3498b [ui] "Clone and Edit" functionality for versions (#24168)
* Edit from Version functionality

* Reworked as Clone and Revert

* Change name warning for cloning as new job, version 0 checking, and erroring on sourceless clone

* If you try to plan a new version of a job with a different name of the one you're editing, suggest they might want to run a new one instead

* A few code comments and log cleanup

* Scaffolding new acceptance tests

* A whack of fun new tests

* Unit test for version number url passing on fetchRawDef

* Bit of cleanup

* fetchRawDefinition gets version support at adapter layer

* Handle spec-not-available-but-definition-is for clone-as-new-job
2024-11-29 16:12:56 -05:00
Juana De La Cuesta
c21dfdb17a [gh-476] Sanitise HCL variables before storing on job submission (#24423)
* func: User url rules to scape non alphanumeric values in hcl variables

* docs: add changelog

* func: unscape flags before returning

* use JSON.stringify instead of bespoke value quoting to handle in-value-multi-line cases

---------

Co-authored-by: Phil Renaud <phil@riotindustries.com>
2024-11-22 11:45:02 +01:00
Phil Renaud
4708e06199 [ui] Fixes double-namespace-query-param when getting versions (#24466) 2024-11-19 10:53:37 -05:00
Phil Renaud
3d9003879e [ui] Update the Task Lifecycle Status chart (#24133)
* Updates the Task Lifecycle Status chart to show which pre/poststart task may have failed

* Default colour to prevent HDS error

* De-duplicated data-test attr and added is-active and is-finished test classes

* Failed and Pending state tests
2024-11-07 13:57:58 -05:00
Phil Renaud
498b29b3cf [ui] When your token expires and you sign in again, redirect to your original route. (#24374)
* Upon sign-in post-expiry/403, redirect to original route

* Tests for token expiry re-routing

* Had made one of the new test tokens a management token, which conflicted with another test but was not necessary
2024-11-07 10:43:43 -05:00
Seth Hoenig
4dbcdd103a ui: show region in header gutter when only one region exists (#24320)
* ui: show region in header gutter when only one region exists

This PR adds a plain text label of the region to the header when there is
only one region present. Before, nothing was showin in this case, and a
dropdown was shown on federated clusters.

The use case here is for operators of multiple non-federated Nomad clusters,
when all the UI's involved otherwise look identical.

* [ui] Signing in with a token explicitly sets the region dropdown activeRegion (#24347)

* Signing in with a token explicitly sets the region dropdown activeREgion

* Test and Select a Region default text

* Account for 403 on mocked agent members req

* Dont show the region if it isnt set in agent config

* Small padding css change

* unit test condition moved to stubbable acceptance test

---------

Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com>
2024-11-01 22:58:13 -04:00
Zack Moore
00b88bda74 Upgrade HDS dependency to 4.13 & migrate FlightIcon to Hds::Icon (#24305)
* upgraded to hds 4.13.0 and migrated FlightIcon instances to Hds::Icon

* updated test selectors

* fixing percy regression

* Vertically align flyout dismiss button and remove unused hasDivider prop
2024-10-30 10:17:07 -04:00
Austin Culter
3ca728819b [ui] Prevent double-open for cmd+click on vars index links (#24316)
* Check for target on click to prevent double-opening cmd+clicked links on var index

* Create cl entry 24316

* Move the dont-open-twice logic into the variable-paths component
2024-10-29 15:50:09 -04:00
Phil Renaud
1f9b92f079 Fix an issue where variables index dropdown would appear underneath table headers (#24162) 2024-10-17 23:51:07 -04:00
Phil Renaud
ec53cccbc8 Adds an ellipsis and max width to profile nav token name (#24240) 2024-10-17 23:50:24 -04:00
Phil Renaud
dc45066ae7 [ui] Separate Diffs and Versions from the /versions endpoint as far as Ember is concerned (#24145)
* Separate Diffs and Versions from the /versions endpoint as far as Ember is concerned

* Back to async true

* Handle undefined-diffs case
2024-10-08 12:13:01 -04:00
Phil Renaud
2fc7544ff3 [ui] Modify variable access permissions for UI users with write in only certain namespaces (#24073)
* Modify variable access permissions for UI users with write in only certain namespaces

* Addressing some PR comments

* Variables index namespaces on * and ability checks are now namespaced

* Mistook Delete for Destroy, and update unit tests for mult-return allPaths
2024-10-02 16:02:40 -04:00
Phil Renaud
c07806e7fd Match styling from other page titles and get above z-index of the timeline (#24068) 2024-09-26 12:34:45 -04:00
Phil Renaud
e206993d49 Feature: Golden Versions (#24055)
* TaggedVersion information in structs, rather than job_endpoint (#23841)

* TaggedVersion information in structs, rather than job_endpoint

* Test for taggedVersion description length

* Some API plumbing

* Tag and Untag job versions (#23863)

* Tag and Untag at API level on down, but am I unblocking the wrong thing?

* Code and comment cleanup

* Unset methods generally now I stare long into the namespace abyss

* Namespace passes through with QueryOptions removed from a write requesting struct

* Comment and PR review cleanup

* Version back to VersionStr

* Generally consolidate unset logic into apply for version tagging

* Addressed some PR comments

* Auth check and RPC forwarding

* uint64 instead of pointer for job version after api layer and renamed copy

* job tag command split into apply and unset

* latest-version convenience handling moved to CLI command level

* CLI tests for tagging/untagging

* UI parts removed

* Add to job table when unsetting job tag on latest version

* Vestigial no more

* Compare versions by name and version number with the nomad history command (#23889)

* First pass at passing a tagname and/or diff version to plan/versions requests

* versions API now takes compare_to flags

* Job history command output can have tag names and descriptions

* compare_to to diff-tag and diff-version, plus adding flags to history command

* 0th version now shows a diff if a specific diff target is requested

* Addressing some PR comments

* Simplify the diff-appending part of jobVersions and hide None-type diffs from CLI

* Remove the diff-tag and diff-version parts of nomad job plan, with an eye toward making them a new top-level CLI command soon

* Version diff tests

* re-implement JobVersionByTagName

* Test mods and simplification

* Documentation for nomad job history additions

* Prevent pruning and reaping of TaggedVersion jobs (#23983)

tagged versions should not count against JobTrackedVersions
i.e. new job versions being inserted should not evict tagged versions

and GC should not delete a job if any of its versions are tagged

Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>

---------

Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>

* [ui] Version Tags on the job versions page (#24013)

* Timeline styles and their buttons modernized, and tags added

* styled but not yet functional version blocks

* Rough pass at edit/unedit UX

* Styles consolidated

* better UX around version tag crud, plus adapter and serializers

* Mirage and acceptance tests

* Modify percy to not show time-based things

---------

Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>

* Job revert command and API endpoint can take a string version tag name (#24059)

* Job revert command and API endpoint can take a string version tag name

* RevertOpts as a signature-modified alternative to Revert()

* job revert CLI test

* Version pointers in endpoint tests

* Dont copy over the tag when a job is reverted to a version with a tag

* Convert tag name to version number at CLI level

* Client method for version lookup by tag

* No longer double-declaring client

* [ui] Add tag filter to the job versions page (#24064)

* Rough pass at the UI for version diff dropdown

* Cleanup and diff fetching via adapter method

* TaggedVersion now VersionTag (#24066)

---------

Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>
2024-09-25 19:59:16 -04:00
Phil Renaud
5fcec1f8cc [ui] Show "Scaled Down" as a valid job status when task groups' counts are set to zero (#23829)
* Scaled Down as a status

* Scaled Down as a steady-state job panel status as well

* Test for badge status and changelog
2024-08-19 13:45:19 -04:00
Phil Renaud
fbd8d62955 Check for target on click to prevent double-opening cmd+clicked links on jobs index (#23832) 2024-08-19 10:20:24 -04:00
Adrian Todorov
b1212bae59 Fix a Sentinel policy template (#23686)
Fix a multiline comment missing an opening `#`
2024-07-31 14:18:14 -04:00
Phil Renaud
08eab0045a [ui] Unescape csi/ in plugin GET requests (#23625)
* Unescape csi/ in plugin GET requests

* CSI de-prefixing no longer necessary in mirage mocked endpoint
2024-07-26 13:19:42 -04:00
Phil Renaud
5df6fe6a57 [ui] Pack metadata booleanified and added to the statuses endpoint (#23404)
* Pack metadata booleanified and added to the statuses endpoint

* Simplify job.IsPack declaration
2024-07-19 11:16:43 -04:00
Phil Renaud
75722ef93e Actions pass job id instead of job name (#23553) 2024-07-11 14:55:37 -04:00
Phil Renaud
370952e390 didUpdateAttributes manually called on modify (#23548) 2024-07-11 14:55:01 -04:00
Phil Renaud
0324e781d4 [ui] Global token CRUD in the web UI (#23506)
* First pass at global token creation and regional awareness at token fetch time

* Reset and refetch token when you switch region but stay in place

* Ugly and functional global token save

* Tests and log cleanup
2024-07-11 14:54:39 -04:00
Adrian Todorov
622995df42 fix link to point to Sentinel Enfrocement Levels (#23531) 2024-07-11 12:37:20 -04:00
Adrian Todorov
69d2eed808 Improve the restrict-images Sentinel policy template to only apply to Docker/Podman tasks and to handle version numbers starting with v (#23530) 2024-07-11 12:36:57 -04:00
Phil Renaud
6560a0ce02 [ui] Generalized namespace handling, generalized facet searching, node pools facet search (#23468)
* Generalized namespace handling, generalized facet searching, node pools facet search

* Testfixes for namespace facet on jobs list

* Filter or not, need to watch for * namespaces
2024-07-08 16:57:11 -04:00
Phil Renaud
7cf6332632 [ui] When a job is deleted in the background, wait until redirect before cache unload (#23492)
* Wait until the job page is moved-off before unloading the job from ember data cache

* handle transitionAborted error
2024-07-04 17:04:30 -04:00
Phil Renaud
bbd1bb3485 Read-based checks for viewing templates and write-based checks for saving them (#23458) 2024-06-28 17:30:56 -04:00