Commit Graph

357 Commits

Author SHA1 Message Date
Michael Lange b47ce637ed Refactor task row info test to use 'as' 2020-02-13 17:11:38 -08:00
Michael Lange 41fad6b649 Test coverage for the volume table on the task group page 2020-02-13 17:11:37 -08:00
Michael Lange 44a961f4f8 Test coverage for the task detail volumes table 2020-02-13 17:11:35 -08:00
Michael Lange 895d74c503 Test coverage for change in resource rows 2020-02-13 17:11:30 -08:00
Michael Lange c0f1aff963 Fix flaky host volumes test 2020-02-13 17:11:28 -08:00
Michael Lange 18cf59b22f Test coverage for the host volumes table 2020-02-13 17:11:25 -08:00
Michael Lange 849c996887 Data layer for Host Volumes in the UI 2020-02-13 17:11:22 -08:00
Michael Lange 31b83b1c70 Acceptance test for disabled node write controls 2020-01-31 09:41:37 -08:00
Michael Lange 5c4c05824a Account for disabled ACLs in ability tests 2020-01-31 09:41:36 -08:00
Michael Lange 2dac1d6705 Refactor ability tests to use a setup hook for ability lookup 2020-01-30 21:29:21 -08:00
Michael Lange 1fae4083eb Add an ability for client permissions 2020-01-30 21:29:19 -08:00
Michael Lange d7a3c15530 Replace custom parse-duration implementation with an existing lib 2020-01-23 16:34:38 -08:00
Michael Lange c0d57149ca Update client detail test given change to the compositeStatus property 2020-01-23 16:34:38 -08:00
Michael Lange b4ab7b02ba Remove superfluous information from the client details ribbon 2020-01-23 16:34:36 -08:00
Michael Lange 41eaec2d9b Use qunit-dom where applicable 2020-01-23 16:34:35 -08:00
Michael Lange 1dd1298626 New test coverage for the drain capabilities 2020-01-23 16:34:34 -08:00
Michael Lange 0f41bfafad Update existing tests 2020-01-23 16:34:33 -08:00
Michael Lange 5e95633481 PopoverMenu integration tests 2020-01-23 16:34:32 -08:00
Michael Lange 3b534bbdf9 Integration tests for the toggle component 2020-01-23 16:34:32 -08:00
Michael Lange bc555f7758 Update the client detail page object 2020-01-23 16:34:31 -08:00
Michael Lange 8deea899c1 Model the notification pattern as a page object component 2020-01-23 16:34:30 -08:00
Michael Lange deb1dc7ffe Refactor parseDuration to support multi-character units 2020-01-23 16:34:20 -08:00
Michael Lange c5e662a751 Test coverage for the parse duration util 2020-01-23 16:34:20 -08:00
Michael Lange c8e29c7060 cancelDrain adapter method 2020-01-23 16:34:10 -08:00
Michael Lange b162fa8a28 Update drain methods to properly wrap DrainSpec params 2020-01-23 16:34:09 -08:00
Michael Lange dae33efa1d drain and forceDrain adapter methods 2020-01-23 16:34:09 -08:00
Michael Lange aad8536949 Implement eligibility toggling in the data layer 2020-01-23 16:34:07 -08: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 6ff6a41df8
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 09067b4eb7
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 2c6392ff1e Light test coverage for the stream-logger class 2019-12-05 00:19:36 -08:00
Buck Doyle e525ff99d3
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 9b2fb14e51
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 5da134d074
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 8950626c55
UI: Update Mirage to 1.1.2 (#6166) 2019-09-26 13:47:07 -05:00
Buck Doyle 1a47a11c95
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 f55d95694c
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 d707038429
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 4ca5662895
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 dc43dbdad2
UI: Restore Connect proxy tag tests (#6275)
These are the tests skipped in #6271.
2019-09-05 14:09:32 -05:00
Buck Doyle ee0e74186f
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 ec65c8e260
Add handling for not-running task filesystem query (#6267) 2019-09-04 17:38:26 -05:00
Buck Doyle b5e5798e54
UI: add Consul Connect features (#6108) 2019-09-04 09:39:56 -05:00
Buck Doyle 49b9dd5b9b
UI: Add creation time to evaluations table (#6050) 2019-08-22 08:11:24 -05:00
Michael Lange 74c9b1ac60
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 9b669d7e38 Use the standard empty state when a dir is empty 2019-08-19 17:16:26 -07:00
Michael Lange fd6d5b274f
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 836e7426b8 Encode characters in file paths to ensure proper URIs 2019-08-14 12:54:11 -07:00
Buck Doyle 58f6e5d286
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 ee079a1220 Test that the client is contacted correctly, and the server is used as a fallback 2019-08-07 17:35:43 -07:00