Commit Graph

202 Commits

Author SHA1 Message Date
Michael Lange
4419510652 Call out the 'down' status too, since it's a pretty bad one 2020-01-31 12:56:15 -08:00
Michael Lange
c6a677dc4a Disable options for popover and drain-popover 2020-01-30 21:29:29 -08:00
Michael Lange
4793dc9afb Replace custom parse-duration implementation with an existing lib 2020-01-23 16:34:38 -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
2e39c0a529 New toggle component 2020-01-23 16:34:27 -08:00
Michael Lange
504a7afa03 Modifiers to the two-step-button 2020-01-23 16:34:25 -08:00
Michael Lange
96522e7f53 Drain stop and update and notifications 2020-01-23 16:34:24 -08:00
Michael Lange
2ddc54e7a1 Polish for the drain popover 2020-01-23 16:34:21 -08:00
Michael Lange
faffb83d1d Extract the duration parsing into a util 2020-01-23 16:34:19 -08:00
Michael Lange
e47d255b07 Factor out the drain popover and implement its behaviors 2020-01-23 16:34:18 -08:00
Michael Lange
d401a11d0c Add triggerClass support to the popover menu 2020-01-23 16:34:18 -08:00
Michael Lange
de03d82df9 PopoverMenu component 2020-01-23 16:34:14 -08:00
Buck Doyle
9f86f5a1fc UI: Migrate to Storybook (#6507)
I originally planned to add component documentation, but as this dragged on and I found that JSDoc-to-Markdown sometimes needed hand-tuning, I decided to skip it and focus on replicating what was already present in Freestyle. Adding documentation is a finite task that can be revisited in the future.

My goal was to migrate everything from Freestyle with as few changes as possible. Some adaptations that I found necessary:
• the DelayedArray and DelayedTruth utilities that delay component rendering until slightly after initial render because without them:
  ◦ charts were rendering with zero width
  ◦ the JSON viewer was rendering with empty content
• Storybook in Ember renders components in a routerless/controllerless context by default, so some component stories needed changes:
  ◦ table pagination/sorting stories access to query params, which necessitates some reaching into Ember internals to start routing and dynamically generate a Storybook route/controller to render components into
  ◦ some stories have a faux controller as part of their Storybook context that hosts setInterval-linked dynamic computed properties
• some jiggery-pokery with anchor tags
  ◦ inert href='#' had to become href='javascript:;
  ◦ links that are actually meant to navigate need target='_parent' so they don’t navigate inside the Storybook iframe

Maybe some of these could be addressed by fixes in ember-cli-storybook but I’m wary of digging around in there any more than I already have, as I’ve lost a lot of time to Storybook confusion and frustrations already 😞

The STORYBOOK=true environment variable tweaks some environment settings to get things working as expected in the Storybook context.

I chose to:
• use angle bracket invocation within stories rather than have to migrate them soon after having moved to Storybook
• keep Freestyle around for now for its palette and typeface components
2020-01-21 15:46:32 -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
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
e6c66354d0 UI: Update to Ember 3.8 LTS (#5968) 2019-10-08 13:44:19 -05:00
Buck Doyle
dfb88cc787 UI: add Consul Connect features (#6108) 2019-09-04 09:39:56 -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
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
038fc27ef0 Always preload the alloc node so the client can be dialed first 2019-08-07 17:35:15 -07:00
Michael Lange
26e74fe2e2 Make a dedicated fs-breadcrumbs component 2019-08-07 15:29:14 -07:00
Michael Lange
55039b6b82 Minor fixes from code review 2019-08-07 15:11:32 -07:00
Michael Lange
c4516158b0 Test coverage for task-file component 2019-07-30 17:25:49 -07:00
Michael Lange
8f496e8b65 Refactor existing fs tests to use new mirage factories 2019-07-30 17:25:46 -07:00
Michael Lange
55349dccee Add unsupported file type state 2019-07-30 17:25:45 -07:00
Michael Lange
fea3731068 Integrate the task-file component with the fs explorer pages 2019-07-30 17:25:40 -07:00
Michael Lange
c335aced9b Custom Log instance to deal with API quirks 2019-07-30 17:22:53 -07:00
Michael Lange
8403cbaa53 Refactored and image support of the task-file component 2019-07-30 17:22:52 -07:00
Michael Lange
0698e119c8 Address WindowResizable refactor 2019-07-30 17:22:50 -07:00
Michael Lange
45c8f37157 image-file component for showing an image and image metadata 2019-07-30 17:22:49 -07:00
Michael Lange
caf48ee3e6 Extract a streaming-file component from the task-log component
The new streaming-file component takes an arbitrary logger component
along with some mode flags and handles things like polling, DOM updates,
and scroll position.
2019-07-30 17:22:48 -07:00
Michael Lange
a993a305cd New task-file component
Based on the task-log component. Commonalities will be refactored.
2019-07-30 17:22:47 -07:00
Michael Lange
871fe105a2 Tweak log window math 2019-07-30 17:22:46 -07:00
Buck Doyle
c0ba4eeac9 Merge branch 'master' into f-ui/alloc-fs
# Conflicts:
#	ui/app/templates/allocations/allocation/task/index.hbs
#	ui/app/templates/allocations/allocation/task/logs.hbs
2019-07-26 14:49:36 -05:00
Buck Doyle
596b5aaf7e UI: Add copy button for client/allocation UUIDs (#5926)
The button shows a success icon and tooltip on click, and resets
after two seconds.
2019-07-15 12:14:32 -05:00
Buck Doyle
ee07bab099 UI: Add allocation directory rendering (#5873)
This lets users navigate the allocation filesystem. It doesn’t
support viewing actual files yet.
2019-07-02 16:42:38 -05:00
Michael Lange
8920650990 New Mirage scenario for puppeteer script to use 2019-06-19 17:18:40 -07:00
Michael Lange
b41af1c67a Add cancel on click outside and disabled behaviors to two-step-button 2019-05-21 09:24:14 -07:00
Michael Lange
f6232f1817 ES5 getters codemod 2019-04-10 14:54:36 -07:00
Michael Lange
23729ad5a7 Address the copy/copyable deprecation 2019-04-10 14:54:35 -07:00
Michael Lange
738ceda8f2 Improve the search box component to make it fluid and iconed 2019-04-10 10:34:10 -05:00
Michael Lange
bff6039dca Always left-align the dropdown position to the trigger 2019-04-10 10:34:10 -05:00
Michael Lange
b4a921f511 Tab and keyboard navigation for multi-select 2019-04-10 10:34:10 -05:00
Michael Lange
32f815dc51 Round out the freestyle entry 2019-04-10 10:34:10 -05:00
Michael Lange
eae97d992c Persistence and onSelect handler for the multi-select-dropdown 2019-04-10 10:34:10 -05:00
Michael Lange
384ad49504 Freestyle entry for the new multi-select-dropdown component 2019-04-10 10:34:10 -05:00
Michael Lange
25a29cb4ee Conditionally show utilization metrics on alloc and task rows 2018-12-13 07:53:17 -08:00
Michael Lange
104be1cad6 Grow the default 0 to 1 bounds to the domain of the data when necessary 2018-12-05 22:07:44 -08:00