Commit Graph

350 Commits

Author SHA1 Message Date
Michael Lange
234b7efee8 Acceptance test for disabled node write controls 2020-01-31 09:41:37 -08:00
Michael Lange
f5662817ff Account for disabled ACLs in ability tests 2020-01-31 09:41:36 -08:00
Michael Lange
fbb137bdb2 Refactor ability tests to use a setup hook for ability lookup 2020-01-30 21:29:21 -08:00
Michael Lange
88d646b48d Add an ability for client permissions 2020-01-30 21:29:19 -08:00
Michael Lange
4793dc9afb Replace custom parse-duration implementation with an existing lib 2020-01-23 16:34:38 -08:00
Michael Lange
b9b6cda5b4 Update client detail test given change to the compositeStatus property 2020-01-23 16:34:38 -08:00
Michael Lange
deb2b310f6 Remove superfluous information from the client details ribbon 2020-01-23 16:34:36 -08:00
Michael Lange
4cc6702075 Use qunit-dom where applicable 2020-01-23 16:34:35 -08:00
Michael Lange
93eaaab77e New test coverage for the drain capabilities 2020-01-23 16:34:34 -08:00
Michael Lange
b11c82caaf Update existing tests 2020-01-23 16:34:33 -08:00
Michael Lange
413681e317 PopoverMenu integration tests 2020-01-23 16:34:32 -08:00
Michael Lange
8dadd3db46 Integration tests for the toggle component 2020-01-23 16:34:32 -08:00
Michael Lange
b03e1e6ee2 Update the client detail page object 2020-01-23 16:34:31 -08:00
Michael Lange
da941d2e44 Model the notification pattern as a page object component 2020-01-23 16:34:30 -08:00
Michael Lange
da576bc805 Refactor parseDuration to support multi-character units 2020-01-23 16:34:20 -08:00
Michael Lange
6f6b9c2443 Test coverage for the parse duration util 2020-01-23 16:34:20 -08:00
Michael Lange
4d05f53f1d cancelDrain adapter method 2020-01-23 16:34:10 -08:00
Michael Lange
0b031f0b27 Update drain methods to properly wrap DrainSpec params 2020-01-23 16:34:09 -08:00
Michael Lange
4ddcd6044e drain and forceDrain adapter methods 2020-01-23 16:34:09 -08:00
Michael Lange
649be7f599 Implement eligibility toggling in the data layer 2020-01-23 16:34:07 -08:00
Buck Doyle
3adb3cd1fe 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
fabcf7c1a9 Fix flapping status light test (#6852)
I unintentionally introduced a flapping test in #6817. The
draining status of the node will be randomly chosen and
that flag takes precedence over eligibility. This forces
the draining flag to be false rather than random so the
test should no longer flap.

See here for an example failure:
https://circleci.com/gh/hashicorp/nomad/26368
2019-12-13 09:02:02 -06:00
Buck Doyle
83d92251c5 UI: Fix client sorting (#6817)
There are two changes here, and some caveats/commentary:

1. The “State“ table column was actually sorting only by status. The state was not an actual property, just something calculated in each client row, as a product of status, isEligible, and isDraining. This PR adds isDraining as a component of compositeState so it can be used for sorting.

2. The Sortable mixin declares dependent keys that cause the sort to be live-updating, but only if the members of the array change, such as if a new client is added, but not if any of the sortable properties change. This PR adds a SortableFactory function that generates a mixin whose listSorted computed property includes dependent keys for the sortable properties, so the table will live-update if any of the sortable properties change, not just the array members. There’s a warning if you use SortableFactory without dependent keys and via the original Sortable interface, so we can eventually migrate away from it.
2019-12-12 13:06:54 -06:00
Michael Lange
24b0ef6a1b Light test coverage for the stream-logger class 2019-12-05 00:19:36 -08:00
Buck Doyle
458a6c413d Remove inverse block for list-pagination (#6523)
As the angle bracket invocation RFC says:

> There is no dedicated syntax for passing an "else" block
> directly. If needed, that can be passed using the named
> blocks syntax.

https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md#block

Unfortunately, using a contextual component doesn’t help as
the yield inside that component will still result in content
rendering that would show when the source isn’t empty. So
we decided to change the interface so you have to check
whether the source is empty before using it, which aligns with
how list-table works.
2019-10-24 07:05:43 -05:00
Buck Doyle
882a0210fe UI: Update Ember to 3.12 LTS (#6419)
This is mostly deprecation fixes and blueprint changes. There
are some dependency updates too; the changes to Ember
Basic Dropdown necessitated changing it to angle bracket
component invocation. The conversion of the rest of the
templates will happen separately.
2019-10-15 13:32:58 -05:00
Buck Doyle
550e1b1a1e UI: Change Mirage data to be stable in development (#6389)
This sets a default-but-query-configurable Faker seed in development,
via faker-seed. It also changes uses of Math.random to use Faker’s
randomness so auto-generated data remains stable in development.
2019-10-03 09:13:08 -05:00
Buck Doyle
7fcfdab316 UI: Update Mirage to 1.1.2 (#6166) 2019-09-26 13:47:07 -05:00
Buck Doyle
e3d8e73124 UI: Restore proxy tag tests (#6360)
The recurring problem here was that sometimes the factories would
generate more than one task, and it was random whether the task
with the proxy task would be the first in the list. This ensures
that the proxy task is always first so the tests can run again.
2019-09-26 11:50:01 -05:00
Buck Doyle
9272cca7ab UI: Remove proxy tag tests again (#6359)
I thought #6343 would fix the flapping but it didn’t 😞
2019-09-20 15:27:33 -05:00
Buck Doyle
05fd8a068c UI: Fix Connect proxy tag (#6343)
This fixes a race condition in the pseudo-relationship between a
TaskState and a Task that was causing the Consul Connect proxy tag
to sometimes show on the wrong task. There’s no direct Ember Data-style
relationship between a TaskState and its Task; instead, it’s determined
by searching for a Task with the matching name. The related Task was
sometimes stored before everything was ready and not recalculated when
the name became known. This ensures the relationship is accurate if the
TaskState’s name property changes.
2019-09-19 08:09:49 -05:00
Buck Doyle
e41a7f6765 UI: Remove Connect proxy tag tests again (#6284)
This semi-reverts #6275, as the tests are intermittently
failing in CI.
2019-09-05 14:34:47 -05:00
Buck Doyle
801cb32d07 UI: Restore Connect proxy tag tests (#6275)
These are the tests skipped in #6271.
2019-09-05 14:09:32 -05:00
Buck Doyle
97150f9f42 UI: Move kind property to task (#6271)
I put this property in the wrong place. 

I’ve found how to fix the mock API in the tests but
they’re failing to pass with headless Chrome only,
so they’re skipped for now.
2019-09-05 13:14:54 -05:00
Buck Doyle
b29d88556b Add handling for not-running task filesystem query (#6267) 2019-09-04 17:38:26 -05:00
Buck Doyle
dfb88cc787 UI: add Consul Connect features (#6108) 2019-09-04 09:39:56 -05:00
Buck Doyle
2364fb2da1 UI: Add creation time to evaluations table (#6050) 2019-08-22 08:11:24 -05:00
Michael Lange
c29d836dd9 Merge pull request #5871 from hashicorp/f-ui/alloc-fs
UI: Allocation file system explorer
2019-08-20 10:18:23 -07:00
Michael Lange
65aa4757b8 Use the standard empty state when a dir is empty 2019-08-19 17:16:26 -07:00
Michael Lange
354da0f60c Merge pull request #6048 from hashicorp/f-ui/alloc-fs-files
UI: Alloc FS: File Viewer
2019-08-19 10:36:28 -07:00
Michael Lange
a321145457 Encode characters in file paths to ensure proper URIs 2019-08-14 12:54:11 -07:00
Buck Doyle
a8c90f5352 Fix navigation via clicking recent allocation row (#6087)
This fixes the recent allocation rows to navigate when clicking within them
rather than just on the link, which matches the cursor behaviour.
2019-08-08 09:26:46 -05:00
Michael Lange
ed55a7b09a Test that the client is contacted correctly, and the server is used as a fallback 2019-08-07 17:35:43 -07:00
Michael Lange
e97c91191c Use a data-uri instead of an image for the image-file-test 2019-08-07 15:08:38 -07:00
Buck Doyle
473ef7a662 Add page titles to filesystem routes (#6024) 2019-08-01 11:17:46 -05:00
Michael Lange
e277cc5308 Update factory-based fs tests to sort properly 2019-07-31 01:41:00 -07:00
Michael Lange
be5c88fd4f Remove errant server logging line 2019-07-31 01:40:39 -07:00
Michael Lange
c4516158b0 Test coverage for task-file component 2019-07-30 17:25:49 -07:00
Michael Lange
6bd54f7343 Test coverage for streaming file component 2019-07-30 17:25:48 -07:00
Michael Lange
7294f38a32 Integration tests for the image-file component 2019-07-30 17:25:47 -07:00