Commit Graph

2399 Commits

Author SHA1 Message Date
Phil Renaud
e48bfeccd7 Cross-spawn pinned re: GHSA-3xgq-45jj-v275 (#24616) 2024-12-17 01:01:49 -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
dependabot[bot]
dcb0259fe3 chore(deps): bump nanoid from 3.3.7 to 3.3.8 in /ui (#24640)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-12 10:35:33 -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
3aaf6d8791 Upgrades Percy and Percy CLI (#24170) 2024-10-17 23:49:48 -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
e65767fbf0 [ui] Ember test suite upgraded (#24020)
* Ember test suite upgraded

* Switch up the order for the sake of testem

* Use the built-in ember test helper render for job editor rendering
2024-09-20 17:01:03 -04:00
Phil Renaud
483506873e Revert "Pin body-parser to resolve an outdated dep problem (#23954)" (#23970)
This reverts commit 51caca1a85.
2024-09-16 11:44:03 -04:00
Phil Renaud
51caca1a85 Pin body-parser to resolve an outdated dep problem (#23954) 2024-09-13 13:59:21 -04:00
Phil Renaud
c2bb18e167 Pin path-to-regexp with yarn1 syntax (#23955) 2024-09-13 13:51:29 -04:00
dependabot[bot]
f579b4add1 chore(deps): bump ws from 7.5.9 to 7.5.10 in /ui (#23368)
Bumps [ws](https://github.com/websockets/ws) from 7.5.9 to 7.5.10.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.9...7.5.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 10:05:28 -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
Phil Renaud
54aafa574d [ui] Jobs list should handle 502s and 504s gracefully (#23427)
* UI handles 502s and 504s gracefully

* Test and cleanup
2024-06-26 21:51:18 -04:00
Phil Renaud
81d4f364b1 [ui] Squashing Ember deprecations (#22424)
* Now that message is a gettable on the task-event model, no longer needs to be attrs-set at serializer

* xstate future-proofing default prop
2024-06-19 09:02:53 -04:00
Phil Renaud
b92afa5b4a [ui] Helios page headers added to the administration section (#23366)
* Helios page headers added to the administration section

* data-test-title mirage helper missed on policy page
2024-06-18 12:37:51 -04:00
Phil Renaud
5aad029ddb [ui] Dont show keyboard hints when a user is trying to take a screenshot (#23365)
* Dont show keyboard hints when a user is trying to take a screenshot

* Oh hey metaKey is its own special thing
2024-06-18 12:37:05 -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
a933292897 Sanitize params input to alert a user when their scenario is invalid (#23261) 2024-06-07 11:12:21 -04:00
Phil Renaud
784ec507b8 Omit the current-time-displaying components during our visual diff tests (#22435) 2024-05-31 13:41:26 -04:00
Phil Renaud
ddfadca618 Checking for the type of event param before executing a lazy click (#22429) 2024-05-31 13:24:22 -04:00
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