Commit Graph

2351 Commits

Author SHA1 Message Date
Phil Renaud
014f5145dc Lockfile and bindata_assetfs recompiled on latest main (#22434) 2024-05-31 13:23:59 -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
86ee56b8c5 [ui] Jobs index page badge for when a job has a paused task (#22392)
* Adds a badge on the jobs index page if any task within any allocation of a running job is currently paused

* Snapshot and acceptance tests for paused states

* Cleared yarn cache

* Remove MirageScenario from the test dependency chain

* Logging before toString

* Cardinal sin of time-based test execution

* Maybe weve been lucky for years and the clientStatus has always been running for this test by happenstance

* Back away from the time-based and toward the settled() approach
2024-05-30 21:18:35 -04:00
Phil Renaud
1412e65bbd [ui] Dropdowns on the jobs index page get a max-height and filtering (#20626)
* Adds a max-height to dropdowns lest they get any funny ideas

* Filter filtering
2024-05-29 21:01:57 -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
8a9d58ae8f Storybook scripts and references removed (#22232) 2024-05-29 16:34:26 -04:00
Phil Renaud
811b7e85f9 [ui] Better UX with filter expressions in the jobs index search box (#22100)
* Maintains rawSearchText separate from searchText

* Filter expression suggestions

* Now super-stops duelling queries on else-type error

* Filter suggestions and corrections

* Errorlink is now template standard and testfixes

* Mirage simulates healthy errors

* Test for bad filter expressions and snapshots
2024-05-22 23:39:37 -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
Daniel Bennett
4415fabe7d jobspec: time based task execution (#22201)
this is the CE side of an Enterprise-only feature.
a job trying to use this in CE will fail to validate.

to enable daily-scheduled execution entirely client-side,
a job may now contain:

task "name" {
  schedule {
    cron {
      start    = "0 12 * * * *" # may not include "," or "/"
      end      = "0 16"         # partial cron, with only {minute} {hour}
      timezone = "EST"          # anything in your tzdb
    }
  }
...

and everything about the allocation will be placed as usual,
but if outside the specified schedule, the taskrunner will block
on the client, waiting on the schedule start, before proceeding
with the task driver execution, etc.

this includes a taksrunner hook, which watches for the end of
the schedule, at which point it will kill the task.

then, restarts-allowing, a new task will start and again block
waiting for start, and so on.

this also includes all the plumbing required to pipe API calls
through from command->api->agent->server->client, so that
tasks can be force-run, force-paused, or resume the schedule
on demand.
2024-05-22 15:40:25 -05: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
6886edf033 Makes it so an empty state query blocks and changes the style to be more Nomadic (#20588) 2024-05-15 13:57:48 -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
f9c4d2bdf0 the hasBeenRestarted allocation property checks against its task events, which can sometimes be null (#20383) 2024-04-12 14:49:07 -04:00
dependabot[bot]
5612ab46c3 chore(deps): bump ip from 2.0.0 to 2.0.1 in /ui (#20021)
Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-11 15:53:15 -04:00
dependabot[bot]
229e645681 chore(deps): bump follow-redirects from 1.15.5 to 1.15.6 in /ui (#20145)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-11 15:52:32 -04:00
dependabot[bot]
ea6a112f73 build(deps): bump express from 4.18.2 to 4.19.2 in /ui (#20239)
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-11 15:51:13 -04:00
dependabot[bot]
6c419a37ee build(deps): bump tar from 6.2.0 to 6.2.1 in /ui (#20353)
Bumps [tar](https://github.com/isaacs/node-tar) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.2.0...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-11 15:22:09 -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
fee242c53d Namespace added to example test in exec window (#20218) 2024-03-25 17:02:07 -04:00
Phil Renaud
7820df53ca [ui]] Percy Stabilization (#20061)
* Some actions and inline-chart stabilization

* Weird little semicolon, are you my undoing?
2024-03-05 08:49:58 -05:00
Phil Renaud
c2fe51bf11 Fixes an issue where shift+num would not open an eval on the evaluations index table (#20047) 2024-02-29 11:25:52 -06:00
Mike Nomitch
18e5e168f4 Remove accidental console log in namespace test setup (#19874) 2024-02-20 11:42:11 -08: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
1bde7a8fb4 [ui] Upgrades to build storybook on node v20 (#19953)
* Attempting to build storybook on node v20

* babel-plugin-dynamic-import-node added

* build without babel-plugin-dynamic-import-node explicitly declared
2024-02-12 16:51:47 -05:00
Phil Renaud
81f868631f Fix vercel deployments EBADENGINE errors (#19914) 2024-02-08 14:14:57 -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
Phil Renaud
c927377700 Random exec assignment depends on taskGroup name if provided (#19878) 2024-02-05 23:23:01 -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
005147f850 [ui] Mask token secret when logged in (#19529)
* Sign-in page now hides token secret by default (toggleable) and updates components to Helios

* General helios-ification

* All the notifications get dismissal buttons

* token-details grid for spacing
2023-12-20 10:04:53 -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
Luiz Aoqui
dfce76e511 ui: fix AllocationRow for job without action (#19505)
The allocation table header sometimes conditionally renders the
`Actions` table column, but the allocation row would render it
unconditionally, resulting in broken tables when rendering allocations
for jobs without actions, where rows had more columns than the header.

Also fix the conditional class for the deployments allocation table to
read `length` from the right value.
2023-12-18 11:30:20 -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
268e92eaba [ui] Small-screen styles for exec window (#19332)
* Phones can exec too

* De-magic breakpoints
2023-12-11 09:42:25 -05:00
Phil Renaud
5d2688a257 [ui] Two small UI quality of life changes (#19377)
* Jobs index without groups

* Download button only appears if you have content in your template

* No longer need to test for the group count in jobs index
2023-12-08 11:21:14 -05:00
Tim Gross
8e8309e58e UI: fix column header typo on job services page (#19370) 2023-12-08 10:58:23 -05:00
Phil Renaud
c381781b42 [ui] Helios upgraded to 3.3.0 (#19247) 2023-12-05 09:25:28 -05:00
Phil Renaud
646445d4ac [ui] example job with actions (#19153)
* An example job with a few interesting actions

* A pretty different example job

* Tests updated with const'd number of default templates

* Removed default jobspec params and formatted
2023-12-04 13:40:00 -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
d104432cd3 Actions: API, command, and jobspec docs (#19166)
* API command and jobspec docs

* PR comments addressed

* API docs for job/jobid/action socket

* Removing a perhaps incorrect origin of job_id across the jobs api doc

* PR comments addressed
2023-11-30 14:13:37 -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