Commit Graph

625 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
Phil Renaud
8e589a9319 [ui] Add "stopped" as a valid status on jobs index/job detail (#23328)
* Stopped status passed through to the statuses endpoint and observed on job model and steady-state panel

* Status passed to statuses endpoint and test for FE model statuses
2024-06-14 23:33:00 -04:00
Phil Renaud
eacf47a484 [ui] Remove simulacral allocation stat in favor of live-updating one (#23306)
* Remove simulacral allocation stat in favor of live-updating one

* Tests remove dependency on job-summary as well
2024-06-14 09:23:31 -04:00
Phil Renaud
d34943435d [ui] Rework of node/job attributes/meta using PathTree (#23290)
* Rework of attributes using pathTree

* Pack meta reintroduced and made local

* attributes table test updated for new pathTree syntax

* removed flat import and extended the PathTree type signature to include prefix

* Slightly darken the is-faded text in tables
2024-06-12 14:28:17 -04:00
Phil Renaud
36c2439503 [ui] Tests for Sentinel Policies (#22398)
* Tests for Sentinel Policies UI

* Further sentinel tests

* job allocations test reinstated
2024-05-31 10:38:54 -04:00
Phil Renaud
e09b29113c [ui] Helios and Power Select upgrades (#22328)
* Helios and Power Select upgrades

* Renamed namespaced contextual components
2024-05-29 17:00:56 -04:00
Phil Renaud
86c858cdc3 [ui] Sentinel Policies CRUD UI (#20483)
* Gallery allows picking stuff

* Small fixes

* added sentinel templates

* Can set enforcement level on policies

* Working on the interactive sentinel dev mode

* Very rough development flow on FE

* Changed position in gutter menu

* More sentinel stuff

* PR cleanup: removed testmode, removed unneeded mixins and deps

* Heliosification

* Index-level sentinel policy deletion and page title fixes

* Makes the Canaries sentinel policy real and then comments out the unfinished ones

* rename Access Control to Administration in prep for moving Sentinel Policies and Node Pool admin there

* Sentinel policies moved within the Administration section

* Mirage fixture for sentinel policy endpoints

* Description length check and 500 prevention

* Sync review PR feedback addressed, implied butons on radio cards

* Cull un-used sentinel policies

---------

Co-authored-by: Mike Nomitch <mail@mikenomitch.com>
2024-05-22 16:41:50 -04:00
Phil Renaud
e8b77fcfa0 [ui] Jobspec UI block: Descriptions and Links (#18292)
* Hacky but shows links and desc

* markdown

* Small pre-test cleanup

* Test for UI description and link rendering

* JSON jobspec docs and variable example job get UI block

* Jobspec documentation for UI block

* Description and links moved into the Title component and made into Helios components

* Marked version upgrade

* Allow links without a description and max description to 1000 chars

* Node 18 for setup-js

* markdown sanitization

* Ui to UI and docs change

* Canonicalize, copy and diff for job.ui

* UI block added to testJob for structs testing

* diff test

* Remove redundant reset

* For readability, changing the receiving pointer of copied job variables

* TestUI endpiont conversion tests

* -require +must

* Nil check on Links

* JobUIConfig.Links as pointer

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2024-05-22 15:00:45 -04:00
Phil Renaud
8620fdca85 Adds the token name to the Profile link in the top nav (#20539) 2024-05-08 12:33:58 -04:00
Phil Renaud
16479af38d Jobs Index Page: Live Updates + Pagination (#20452)
* Hook and latch on the initial index

* Serialization and restart of controller and table

* de-log

* allocBlocks reimplemented at job model level

* totalAllocs doesnt mean on jobmodel what it did in steady.js

* Hamburgers to sausages

* Hacky way to bring new jobs back around and parent job handling in list view

* Getting closer to hook/latch

* Latch from update on hook from initialize, but fickle

* Note on multiple-watch problem

* Sensible monday morning comment removal

* use of abortController to handle transition and reset events

* Next token will now update when there's an on-page shift

* Very rough anti-jostle technique

* Demoable, now to move things out of route and into controller

* Into the controller, generally

* Smarter cancellations

* Reset abortController on index models run, and system/sysbatch jobs now have an improved groupCountSum computed property

* Prev Page reverse querying

* n+1th jobs existing will trigger nextToken/pagination display

* Start of a GET/POST statuses return

* Namespace fix

* Unblock tests

* Realizing to my small horror that this skipURLModification flag may be too heavy handed

* Lintfix

* Default liveupdates localStorage setting to true

* Pagination and index rethink

* Big uncoupling of watchable and url-append stuff

* Testfixes for region, search, and keyboard

* Job row class for test purposes

* Allocations in test now contain events

* Starting on the jobs list tests in earnest

* Forbidden state de-bubbling cleanup

* Job list page size fixes

* Facet/Search/Filter jobs list tests skipped

* Maybe it's the automatic mirage logging

* Unbreak task unit test

* Pre-sort sort

* styling for jobs list pagination and general PR cleanup

* moving from Job.ActiveDeploymentID to Job.LatestDeployment.ID

* modifyIndex-based pagination (#20350)

* modifyIndex-based pagination

* modifyIndex gets its own column and pagination compacted with icons

* A generic withPagination handler for mirage

* Some live-PR changes

* Pagination and button disabled tests

* Job update handling tests for jobs index

* assertion timeout in case of long setTimeouts

* assert.timeouts down to 500ms

* de-to-do

* Clarifying comment and test descriptions

* Bugfix: resizing your browser on the new jobs index page would make the viz grow forever (#20458)

* [ui] Searching and filtering options (#20459)

* Beginnings of a search box for filter expressions

* jobSearchBox integration test

* jobs list updateFilter initial test

* Basic jobs list filtering tests

* First attempt at side-by-side facets and search with a computed filter

* Weirdly close to an iterative approach but checked isnt tracked properly

* Big rework to make filter composition and decomposition work nicely with the url

* Namespace facet dropdown added

* NodePool facet dropdown added

* hdsFacet for future testing and basic namespace filtering test

* Namespace filter existence test

* Status filtering

* Node pool/dynamic facet test

* Test patchups

* Attempt at optimize test fix

* Allocation re-load on optimize page explainer

* The Big Un-Skip

* Post-PR-review cleanup

* todo-squashing

* [ui] Handle parent/child jobs with the paginated Jobs Index route (#20493)

* First pass at a non-watchQuery version

* Parameterized jobs get child fetching and jobs index status style for parent jobs

* Completed allocs vs Running allocs in a child-job context, and fix an issue where moving from parent to parent would not reset index

* Testfix and better handling empty-child-statuses-list

* Parent/child test case

* Dont show empty allocation-status bars for parent jobs with no children

* Splits Settings into 2 sections, sign-in/profile and user settings (#20535)

* Changelog
2024-05-06 17:09:37 -04:00
Phil Renaud
890c2ce713 Remove json linting while editing variables (#20529) 2024-05-03 16:33:33 -04:00
Phil Renaud
5150adffc0 [ui] Fix a bug where promotion would be asked with no new canaries (#20408)
* Fix a UI bug where promotion would be asked with no new canaries

* Because we now make sure of your allocations, our test cases should more accurately reflect a state of a promotable workflow
2024-04-16 15:50:06 -04:00
Phil Renaud
9a20e98d27 [ui] Show re-bound keyboard nav hints instead of their default values (#20235)
* Rebinds show up as soon as you start rebinding

* Hint bind and rebind tests

* Orphaned getCommandByPattern method removed
2024-04-08 10:11:23 -04:00
Phil Renaud
e8db588368 ui: Warning and better error handling for invalid-named variables and job templates (#19989)
* Warning and better error handling for invalid-named variables and job templates

* Warning and better error handling for invalid-named variables and job templates

* Tests for variable pathname warnings

* Only show the bad-name warning if the variable is being created and path is editable
2024-02-15 11:54:09 -05:00
Phil Renaud
c1cbc39a96 Confirmation on exit from exec as long as socket has been opened (#19985) 2024-02-15 11:52:23 -05:00
Phil Renaud
15b06e8505 [ui] HashiCorp Design System upgraded to 3.6.0 (#19872)
* HashiCorp Design System upgraded to 3.6.0

* Fresh yarn

* Responses out of range are brought back within

* General pass at a11y fixes with updated components and node

* Further tooltip updates

* 3 more partitions worth of toggle and tooltip updates

* scale-events-accordion and topo-viz node fixes
2024-02-07 16:08:41 -05:00
Mike Nomitch
bc039a7a8a Adds Namespace UI to Access Control (#19402)
Adds Namespace UI to Access Control - Also adds two step buttons to other Access Control pages

---------

Co-authored-by: Phil Renaud <phil@riotindustries.com>
2024-01-16 09:20:50 -08:00
Phil Renaud
16876697a1 [ui] Adds group-name tooltips to deploying and steady-state job panels (#19601)
* Adds group-name tooltips to deploying and steady-state job panels

* Default tooltip text for mirage edge cases
2024-01-04 13:10:37 -05:00
Phil Renaud
89cceebb91 [ui] Multi-line variable values and helios upgrades generally (#19544)
* Multi-line variable values and helios upgrades generally

* Variables page titles and actions restyle

* Hacky fix to keyboard shortcut otherwise bumping space on shift

* Related entities heliosified

* Namespace and path fields heliosed

* Paths table heliosified

* Variable view table

* Fixups after design discussion

* Monospaced editing

* De-commented template placeholder

* Acceptance tests updated for helios components across variables

* Tests helios'd in variable-form-test

* PR suggestions
2024-01-03 15:54:22 -05:00
Phil Renaud
e26c2e243c [ui] node eligibilty taken into consideration when clients list filtered to "ready" (#18607)
* node eligibilty taken into consideration when clients list filtered to 'ready'

* A working draft of complex positive querying

* tags and filter badge

* CompositeStatus -> Status

* Buttons within a Helios SegmentedGroup

* Convert the other dropdowns to helios on clients index

* A bunch of client index test fixes

* Remaining clients list acceptance tests for State facet modified
2023-12-19 16:40:56 -05:00
Sanskar Gauchan
e0e8357661 Merge branch 'hashicorp:main' into ui-logs-disabled-message 2023-12-16 10:49:26 +11:00
Phil Renaud
a6e164673e Adds a copy button to Action output (#19496) 2023-12-15 15:57:31 -05:00
Phil Renaud
49b4996d46 overflow-anchor to hold view to bottom of scrollable action output (#19452) 2023-12-13 15:19:22 -05:00
Phil Renaud
b1654016c0 Fix a small regression where accessor is hidden by default when editing a token (#19432) 2023-12-11 13:00:11 -05:00
Phil Renaud
a35acdb84e Title bar job start button now observes job submission variables data (#19220) 2023-12-01 10:57:30 -05:00
Phil Renaud
7ab7edf9cd [ui] Display job plan warnings alongside dry run info when attempting to run a job through the web UI (#19225)
* init

* Warnings shown at plan stage

* testfixes for new hds class

* New tests for warning block presence
2023-11-30 10:41:23 -05:00
Phil Renaud
fb14c2b556 [ui] Actions service and flyout (#19084)
* Initial pass at a global actions instance queue

* Action card with a bunch of functionality that needs to be pared back a bit

* Happy little actions button

* runAction performs updated to use actions service

* Stop All and Clear Finished buttons

* Keyboard service now passes element, so we can pseudo-click the actions dropdown

* resizable sidebar code blocks

* Contextual actions within task and job levels

* runAction greatly consolidated

* Pluralize action text

* Peer grouping of flyout action intances

* ShortIDs instead of full alloc IDs

* Testfixes that previously depended on notifications

* Stop and stop all for peered action instances

* Job name in action instance card linkable

* Componentized actions global button

* scss consolidation

* Clear and Stop buttons become mutually exclusive in an action card

* Clean up action card title styles a bit

* todo-bashing

* stopAll and stopPeers separated and fixed up

* Socket handling functions moved to the Actions service

* Error handling on socket message

* Smarter import

* Documentation note: need alloc-exec and alloc-raw-exec for raw_exec jobs

* Tests for flyout and dropdown actions

* Docs link when in empty flyout/queue state and percy snapshot test for it
2023-11-26 23:46:44 -05:00
Phil Renaud
bb6c86d2a4 Shows the client/node name alongside alloc short ID if the job is sys/sysbatch (#19051) 2023-11-15 10:05:12 -05:00
Phil Renaud
783572de7d [ui] Actions implementation in the web UI (#18793)
* runAction model and adapter funcs

* Hacky but functional action running from job index

* remove proxy hack

* runAction added to taskSubRow

* Added tty and ws_handshake to job action endpoint call

* delog

* Bunch of streaming work

* action started, running, and finished notification titles, neutral color, and ansi escape

* Handle random alloc selection in the web ui

* Run on All implementation in web ui

* [ui] Helios two-step button and uniform title bar for Actions (#18912)

* Initial pass at title bar button uniformity

* Vertical align on actions dropdown toggle and small edits to prevent keynav overflow issue

* We represent loading state w text and disable now

* Pageheader component to align buttons

* Buttons standardized

* Actions dropdown reveal for multi-alloc job

* Notification code styles

* An action-having single alloc job

* Mirageed

* Actions-laden jobs in mirage

* Separating allocCount and taskCount in mirage mocks

* Unbreak stop job tests

* Permissions for actions dropdown

* tests for running actions from the job index page

* running from a task row actions tests

* some todocleanup

* PR feedback addressed, including page helper for actions
2023-11-07 15:29:43 -05:00
Logan Attwood
0e643501de Fix the "Starting" allocations link (#18866)
Before this commit, it would bring you to the list of allocations
filtered by status=starting. This status does not exist in the Status
drop-down on the Allocations section of a job in the UI.
2023-11-01 15:23:43 -04:00
Sanskar Gauchan
26b3a368a4 Show message for when log collection is disabled. 2023-10-21 14:25:43 +11:00
Phil Renaud
533f293fa8 Wrap the passed path prop as a handlebars tag (#18598) 2023-10-05 12:47:18 -04:00
Phil Renaud
8da40465af fallback to get definition if submission 404s when restarting job in ui (#18621) 2023-09-29 14:52:21 -04:00
Phil Renaud
badaecea66 Access Control CRUD: Make name fields for Policies and Roles required (#18605) 2023-09-29 12:33:03 -04:00