Commit Graph

59 Commits

Author SHA1 Message Date
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
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 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 03dc959c2e
UI GHA test changes re-implemented (#17399) 2023-06-02 11:59:08 -04:00
Phil Renaud 46239e1e80
[ui, deployments] Add status panel to child jobs (#17217)
* Treated same-route as sub-route and didnt cancel watchers

* Adds panel to child jobs and sub-sorts

* removed the safety check in module-for-job tests

* [ui] Adds status panel to Sysbatch jobs (#17243)

* In working out periodic/param child jobs, realized the intersection with sysbatch is high enough that it ought to be worked on now

* Further removal of jobclientstatussummary

* Explicitly making mocked jobs in no-deployment mode

* remove last remnants of job-client-status-summary component

* Screwed up my sorting order a few commits ago; this corrects it

* noActiveDeployment gonna be the death of me
2023-05-19 15:51:35 -04:00
Phil Renaud 25b66e249d
[ui] Batch jobs, aside from child jobs, get the new status panel (#17118)
* Batch jobs, aside from child jobs, get the new status panel

* Clean up the imported jobAllocStatuses

* Note for mirage that batch jobs now have a historical status panel

* Batch job test for complete status

* Parameterized and periodic child jobs get the panel treatment

* Undo parameterized and periodic child test situations
2023-05-10 16:59:33 -04:00
Phil Renaud 2fbbac5dd8
[ui, deployments] Job status for System Jobs (#17046)
* System jobs get a panel and lost status reinstated

* Leveraging nodes and not worrying about rescheds for system jobs

* Consistency w restarted as well

* Text shadow removed and early return where possible

* System jobs added to the Historical Click list

* System alloc and client summary panels removed

* Bones of some new system jobs tests

* [ui, deployments] handle node read permissions for system job panel (#17073)

* Do the next-best-thing when we cant read nodes for system jobs

* Whitespace control handlebars expr

* Simplifies system jobs to not attempt to show a desired count, since it is a particularly complex number depending on constraints, number of nodes, etc.

* [ui, deployments] Fix order in which allocations are ascribed to the status chart (#17063)

* Discovery of alloc.isOld

* Correct sorting and better types

* A more honest walk-back that prioritizes running and pending allocs first

* Test scenario for descending-order allocs to show

* isOld mandates that we set a job version for our created job. Could also do this in the factory but maybe side-effecty

* Type simplification

* Fixed up a test that needed system job summary to be updated

* Tests for modifications to the job summary

* Explicitly mark the service jobs in test as not-deploying
2023-05-05 16:25:21 -04:00
hashicorp-copywrite[bot] 005636afa0 [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
Phil Renaud edf59597d2
[ui] Fix: Wildcard-datacenter system/sysbatch jobs stopped showing client links/chart (#16274)
* Fix for wildcard DC sys/sysbatch jobs

* A few extra modules for wildcard DC in systemish jobs

* doesMatchPattern moved to its own util as match-glob

* DC glob lookup using matchGlob

* PR feedback
2023-03-06 10:06:31 -05:00
Michael Klein e15883ad79 fix: use `@<namespace>` with remaining `JobDetail.visit`s 2022-02-17 13:22:15 +01:00
Michael Klein e46df89a7a fix: pack-detail test
We need to change the way we access `JobDetail`-pages based on recent
namespace changes.
2022-02-17 12:59:58 +01:00
Michael Klein 9a37550204 fix: anonymous policy test job-details
We need to access job-details differently when they have a namespace
due to recent namespace changes - we need to make the tests reflect
that.
2022-02-17 12:45:01 +01:00
Jai Bhagat 3350f3fb11 ui: apply new qunit linting rules to tests
Async tests should use  in integrations tests.
Acceptance tests are using Mirage and can't use
since we can't know the number of assertions.
2022-01-20 10:01:35 -05:00
Jai Bhagat 3a9057a89c ui: prettify js files 2022-01-20 09:54:56 -05:00
Jai Bhagat c4bc5ab352 ui: fix auto-fixable linting errors 2022-01-20 09:46:45 -05:00
Luiz Aoqui c0023c6c85
Update job details box (#11288) 2021-10-12 16:36:10 -04:00
Jai 563d609118
System Batch UI, Client Status Bar Chart and Client Tab page view (#11078) 2021-10-07 17:11:38 -04:00
Luiz Aoqui eb0ed980a5
ui: set namespace when looking for and displaying children jobs (#11110) 2021-09-01 14:40:25 -04:00
Jai Bhagat cc61ad66bf refactoring for same regression in job versions
In job versions, if you have an ACL token with a write policy
you should be able to revert a job, however, that was not the
case here. This is because we're using ember-can to check if
the user can run a job. That permission relies on policiesSupportRunning
which uses a function called namespaceIncludesCapability. We're going to
need to refactor any cases that use this function.
2021-07-20 16:24:42 -04:00
Michael Lange e8593ec1bb
ui: Update namespaces design (#10444)
This rethinks namespaces as a filter on list pages rather than a global setting.

The biggest net-new feature here is being able to select All (*) to list all jobs
or CSI volumes across namespaces.
2021-04-29 15:00:59 -05:00
Buck Doyle 07831ab455
Update to v4 of Ember Power Select (#10226)
This closes #10146.

Because of cibernox/ember-power-select#1203, which documents
the current impossibility of attaching test selectors to a
PowerSelect invocation, this uses test selectors on parent
containers instead, occasionally adding wrappers when needed.
I chose to leave the existing test selectors in the hopes that
we can return to using them eventually, but I could easily
remove them if it seems like extra noise now.

Presumably for the same reason, @class no longer works, so
this adjusts the scoping of global search CSS to preserve the style
of the search control.

I also included an update to the latest version of
ember-test-selectors, since we were far behind and I tried
that before finding the aforelinked issue.

Finally, this replaces ember-cli-uglify with ember-cli-terser to address
production build failures as described at ember-cli/ember-cli#9290.
2021-03-26 08:55:12 -05:00
Buck Doyle e9e52e0dfe
Update Ember/Ember CLI to 3.20 (#9641)
This doesn’t include Ember Data, as we are still back on 3.12.

Most changes are deprecation updates, linting fixes, and dependencies. It can
be read commit-by-commit, though many of them are mechanical and skimmable.
For the new linting exclusions, I’ve added them to the Tech Debt list.

The decrease in test count is because linting is no longer included in ember test.

There’s a new deprecation warning in the logs that can be fixed by updating Ember
Power Select but when I tried that it caused it to render incorrectly, so I decided to
ignore it for now and address it separately.
2021-02-17 15:01:44 -06:00
Michael Lange 875de74503 Use the same prefix pattern from the region switcher for the namespace switcher 2021-01-22 13:18:15 -08:00
Buck Doyle 8348576473
Fix job recommendation test flakiness (#9591)
Instead of creating recommendations for all the jobs used
across these tests, this creates a specific job with
a higher group count, which reduces the likelihood
of having no recommendations to 0.0001%.

It was incorrect to assume that each task group would always
have recommendations, since there’s a 1% chance that a task
won’t have a recommendation. (10% chance for CPU and memory.)
This uses the number of groups with recommendations instead.
2020-12-10 10:10:25 -06:00
Buck Doyle 8b5b2116ec
Fix job detail crash when recommendations off (#9269)
Without this, visiting any job detail page on Nomad OSS would crash with
an error like this:

Error: Ember Data Request GET
/v1/recommendations?job=ping%F0%9F%A5%B3&namespace=default returned a
404 Payload (text/xml)

The problem was twofold.

1. The recommendation ability didn’t include anything about checking
whether the feature was present. This adds a request to
/v1/operator/license on application load to determine which features are
present and store them in the system service. The ability now looks for
'Dynamic Application Sizing' in that feature list.

2. Second, I didn’t check permissions at all in the job-fetching or job
detail templates.
2020-11-06 08:21:38 -06:00
Buck Doyle 31b4ed7a6d
Add DAS UI code from enterprise (#9192)
This is a few combined iterations on the DAS feature.
2020-10-29 07:46:42 -05:00
Michael Lange 7604597041 Acceptance test coverage for the submit time sorting on the periodic and parameterized detail pages 2020-09-19 12:37:38 -07:00
Buck Doyle 29de8f4f76
Add component accessibility auditing and fixes (#8679)
This continues #8455 by adding accessibility audits to component integration
tests and fixing associated errors. It adds audits to existing tests rather than
adding separate ones to facilitate auditing the various permutations a
component’s rendering can go through.

It also adds linting to ensure audits happen in component tests. This
necessitated consolidating test files that were scattered.
2020-08-25 10:56:02 -05:00
Buck Doyle 7bed453de3
Add acceptance test accessibility auditing and fixes (#8455)
This introduces ember-a11y-testing to acceptance tests via a helper
wrapper that allows us to globally ignore rules that we can address
separately. It also adds fixes for the aXe rules that were failing.
2020-07-28 12:59:14 -05:00
Buck Doyle c46d5517bb
Add ACL-checking to turn off exec button (#7919)
This closes #7453. It adds an abstraction to handle the common
needs of ability-determination.
2020-05-11 14:43:17 -05:00
Buck Doyle 66ab14144a
ui: Change Run Job availability based on ACLs (#5944)
This builds on API changes in #6017 and #6021 to conditionally turn off the
“Run Job” button based on the current token’s capabilities, or the capabilities
of the anonymous policy if no token is present.

If you try to visit the job-run route directly, it redirects to the job list.
2020-01-20 14:57:01 -06:00
Buck Doyle 8950626c55
UI: Update Mirage to 1.1.2 (#6166) 2019-09-26 13:47:07 -05:00
Michael Lange 9358713560 Speed up slow acceptance tests with shallow jobs and generally less models 2019-04-11 20:08:43 -07:00
Michael Lange 5008ab4b8d Fix page object issues with acceptance tests that couldn't be codemodded 2019-04-10 14:54:33 -07:00
Michael Lange c1369c001d Fix a bunch of snowflake situations the codemod missed 2019-04-10 14:54:31 -07:00
Michael Lange 517ef97343 Ember test-helpers codemod 2019-04-10 14:54:31 -07:00
Michael Lange a356ab5477 Ember QUnit Codemod 2019-04-10 14:54:30 -07:00
Michael Lange 8e18903996 Show the correct template for parameterized job children 2018-11-07 21:04:27 -08:00
Michael Lange 8154d68b95 Consistently use PageObjects now that they all exist 2018-07-11 12:42:43 -07:00
Michael Lange 22f472066a Use PageObjects for job detail tests 2018-07-10 19:20:02 -07:00
Michael Schurter 7dd7fbcda2 non-Existent -> nonexistent
Reverting from #3963

https://www.merriam-webster.com/dictionary/existent
2018-03-12 11:59:33 -07:00
Josh Soref 7f6e4012a0 spelling: existent 2018-03-11 18:30:37 +00:00
Michael Lange 2563e04a6d Inject system so namespace shows up on job detail components 2018-02-06 10:53:53 -08:00
Michael Lange d3ea4557a3 New module-for-job for acceptance testing job detail differences 2018-02-06 10:53:53 -08:00
Michael Lange 76cd94a54e Use data-test- selectors in acceptance tests 2018-01-17 09:03:59 -08:00
Michael Lange e4ddfafe9d Replace custom breadcrumbs CSS with new Bulma provided CSS 2018-01-17 09:03:59 -08:00
Michael Lange 1107798da6 Use the new ember modules imports
Generated with a codemode:
https://github.com/ember-cli/ember-modules-codemod
2018-01-17 09:02:04 -08:00
Michael Lange 956e967ffd Acceptance tests for evaluations 2017-11-29 20:12:45 -08:00
Michael Lange f747cc79e4 Revert "UI Placement failures""
This reverts commits
141ecd8d9170f56c8302b5c776532e6d287a40e3
d2d838c2de08aac716a9431d9720b5c12bb19ba1
8099db433641429816e8479c6d23116269f744c0
86262b3ceff607627a9c9e0e25eb81b9b5ee739c
eb4104ec528982e0ee6ae9a05fb0460e53139f3f
0e0e23e238017815bdb6dcfbc056275b3deaacca
6d45658d77fb4c40760a63cced71b74757356e48
b52a8176e85b9c6f13ec012f7fce2ec3df1c8751
2017-11-29 20:03:39 -08:00
Michael Lange 961926880a Acceptance tests for evaluations 2017-11-29 19:46:28 -08:00