Commit Graph

716 Commits

Author SHA1 Message Date
Michael Lange 42432bbb52
Merge pull request #4727 from hashicorp/f-ui-improved-stats-charts
UI: Improved stats charts
2018-10-17 10:55:54 -07:00
Michael Lange aeea4076b7
Merge pull request #4718 from hashicorp/f-ui-a11y-line-chart
UI: Add some simple accessibility labels for line charts
2018-10-17 09:43:27 -07:00
Michael Lange 340f3f12d4 Add more documentation to the format-duration util 2018-10-17 08:10:16 -07:00
Michael Lange 154dc49205 Be consistent with "time series" instead of "time-series" 2018-10-17 07:37:45 -07:00
Michael Lange 1be400d18e Add role="tooltip" to tooltips throughout the app 2018-10-17 07:17:24 -07:00
Michael Lange ca631ee217 Override the a11y title and description for the stats time series chart
Since this is a use case specific chart, we can use use case specific
language in our labels.
2018-09-27 12:55:52 -07:00
Michael Lange cdb1831ceb Add a11y features to the line-chart component
- Treat it as an image
- Add a title and a description
- Hide the axes, just in case
2018-09-27 12:55:52 -07:00
Michael Lange 866b74be19 Add a longForm option to format-duration 2018-09-27 12:55:17 -07:00
Michael Lange 4a98bf989f Make the global logo link to the jobs page (home page) 2018-09-26 11:19:24 -07:00
Michael Lange ea87417d4f Add utilization stats to the task rows on allocation detail 2018-09-26 10:59:26 -07:00
Michael Lange 5736b71f00 Remove no longer used allocation-stats class 2018-09-26 10:59:26 -07:00
Michael Lange 9b90683e6b Use the StatsTracker method of getting alloc stats in alloc row 2018-09-26 10:59:26 -07:00
Michael Lange c694fcb0ba Update stat tracker unit tests 2018-09-19 19:30:18 -07:00
Michael Lange 09497b20b8 Acceptance test coverage for all the pages with resource utilization graphs 2018-09-19 16:33:51 -07:00
Michael Lange da06b48aaf Handle the empty data cases 2018-09-19 16:32:53 -07:00
Michael Lange 46936b6091 Unit tests for the stats trackers service 2018-09-19 15:33:29 -07:00
Michael Lange 18b18da49f Integration tests for the primary-metric component 2018-09-19 14:15:32 -07:00
Michael Lange c93f6506dc Add cancelation support to stats trackers 2018-09-17 16:59:09 -07:00
Michael Lange bc5dbe2fb7 Gap support for line charts 2018-09-17 16:58:56 -07:00
Michael Lange 8900d5c138 Add request throttling to the abstract stats tracker
This is the best of three options

1. Users of stats trackers control polling (old method)
2. Stat tracker is stateful and has start/stop methods (like logging)
3. Stat trackers blindly throttle requests

This is the best option because it means N number of concurrent users of
a stats tracker can request polling without inundating the tracker with
redundant frames (or the network with redundant requests), but they also
don't have to coordinate amongst themselves to determine what state a
tracker should be in.
2018-09-17 15:58:28 -07:00
Michael Lange ae161d75bc Use the new stats tracker service to get stats trackers in primary metric 2018-09-17 15:57:58 -07:00
Michael Lange bc3a76da04 Clean up old controller code 2018-09-17 15:57:23 -07:00
Michael Lange b7169596c1 New service to manage stats trackers
This solves two problems:

1. redundant trackers making redundant requests
2. trackers being obliterated as soon as the primary metric component
   is destroyed

It introduces a new problem where visiting more and more node and
allocation pages adds to an ever-growing list of trackers that can
assume lots of memory, but it solves the problem by using a
least-recently-used cache to limit the number of trackers tracked.
2018-09-17 15:53:59 -07:00
Michael Lange b675919c76 Add resource utilization graphs to the task index page 2018-09-14 10:21:48 -07:00
Michael Lange dace559442 Add resource utilization graphs to the allocation index page 2018-09-14 10:21:28 -07:00
Michael Lange 636d0c92fc Use the appropriate methods and types in the stat trackers 2018-09-14 10:21:01 -07:00
Michael Lange 80fefcf369 Style the primary-metric pattern 2018-09-14 10:20:33 -07:00
Michael Lange 379b17acbd Handle the length = 0 and length = 1 cases for activeDatum 2018-09-14 10:19:35 -07:00
Michael Lange 6a94ebc5fb Use the prototype instead of "private" property backups 2018-09-14 09:38:17 -07:00
Michael Lange a2db921c1f Make rollingArray work with mutable array extension methods 2018-09-14 08:57:26 -07:00
Michael Lange 01429a9b78 Remove old stat tracking code from the client page
In favor of the new primary-metric components
2018-09-13 17:01:24 -07:00
Michael Lange 10b9017d84 Use the new primary-metric component on the client detail page 2018-09-13 17:01:24 -07:00
Michael Lange 768f67e336 New primary-metric component
It encapsulates all the tracker, polling, and markup for this style
of metric.
2018-09-13 17:01:24 -07:00
Michael Lange 54efa8ddd5 Full markup for time series metrics 2018-09-13 17:01:24 -07:00
Michael Lange 93cf97a47b Add stat charts to the client page 2018-09-13 17:01:24 -07:00
Michael Lange b6382fe7dc Use percent for the y-axis binding 2018-09-13 17:01:24 -07:00
Michael Lange 7e431e8876 Use addObject to get kvo behaviors 2018-09-13 17:01:24 -07:00
Michael Lange 4a2b9cc153
Merge pull request #4661 from hashicorp/f-ui-line-chart
UI: line chart
2018-09-13 16:59:20 -07:00
Michael Lange 659e19303c Unit test coverage for the line chart component 2018-09-13 16:45:56 -07:00
Michael Lange 63b89904f3 Split the line-chart and stats-time-series freestyle entries 2018-09-13 16:45:56 -07:00
Michael Lange 569ba3c48a Updates to the styleguide 2018-09-13 16:45:56 -07:00
Michael Lange f2bab4591d Use "global" gradients via a clipping mask and a rect w/100% height 2018-09-13 16:45:54 -07:00
Michael Lange 05c7706487 Avoid race conditions around showing and hiding the line chart tooltip 2018-09-13 16:45:13 -07:00
Michael Lange 9008c48cd1 Stats time series
A use-case specific line-chart for showing utilization metrics by
percent
2018-09-13 16:45:13 -07:00
Michael Lange 7a8a4c32f4 Make the tooltip animation snappier for line charts
When data is coming in live, the tooltip can get bogged down by updates
causing the tooltip to never make it under the mouse, which looks like
either lag or a bug.
2018-09-13 16:45:13 -07:00
Michael Lange 46cceb2daa Don't round numbers when the domain is between 0 and 1 2018-09-13 16:45:13 -07:00
Michael Lange a74e6648b9 Styleguide entry for the line chart component 2018-09-13 16:45:13 -07:00
Michael Lange d516daf83e New line chart component 2018-09-13 16:45:08 -07:00
Michael Lange f15e3ba0c2 Test coverage for NodeStatsTracker 2018-09-11 16:27:06 -07:00
Michael Lange a97e0bcc5e Add support for non-list tooltips in charts 2018-09-07 09:57:54 -07:00
Michael Lange 2711abc3ce Add chart color swatches based on css colors 2018-09-07 09:57:33 -07:00
Michael Lange fbfc5ecb16 Example usage of the NodeStatsTracker 2018-08-31 14:39:23 -07:00
Michael Lange 680ac6c9b0 A StatsTracker for client-level statistics 2018-08-31 14:39:23 -07:00
Michael Lange 3d761b7347 Unit Tests for AllocationStatsTracker 2018-08-31 14:39:22 -07:00
Michael Lange 416de6c32a Unit tests for RollingArray 2018-08-31 14:39:22 -07:00
Michael Lange f5fa5101b4 Example of usage of the AllocationsStatsTracker 2018-08-31 14:39:22 -07:00
Michael Lange da4852a6cd An implementation of StatsTracker for allocations
It accumulates CPU and Memory usage for the allocation as a whole as well
as by task.
2018-08-31 14:39:22 -07:00
Michael Lange e1e89ce92f An abstract class for capturing nomad stats
It follows the form of poll -> json parse -> append,
Where append is defined in subclasses to add data from the new frame
to long-lived rolling arrays of data.
2018-08-31 14:39:22 -07:00
Michael Lange 0c35f189e9 An array subclass that enforces a maxLength
The maxLength is enforced by removing elements from the head of the
list.
2018-08-31 14:39:22 -07:00
Michael Lange 33da5ed14f
Merge pull request #4600 from hashicorp/f-ui-job-writes
UI: Job Writes
2018-08-30 10:41:14 -07:00
Michael Lange ebe0e97b1a
Merge pull request #4615 from hashicorp/f-ui-restart-stopped-job
UI: Restart stopped job
2018-08-30 09:49:14 -07:00
Michael Lange 3c2e7b7dd3
Merge pull request #4616 from hashicorp/f-ui-promote-canary
UI: Promote canary
2018-08-30 09:48:31 -07:00
Michael Lange 62e9cf268b Test coverage for the promote canary feature 2018-08-30 09:38:29 -07:00
Michael Lange 182e020835 Fix the flickering issue with start/stop job
When the server doesn't respond immediately, there is a visible window
of time between the action being submitted and the blocking query coming
back with the new job status.
2018-08-28 11:27:00 -07:00
Michael Lange 37acc77c9c Add a confirmation loading state to the two-step-button component 2018-08-28 11:27:00 -07:00
Michael Lange c8492682e1 Switch stop/run job actions to EC tasks 2018-08-28 11:27:00 -07:00
Michael Lange a4d951a757 Add Start Job action on the job overview page for when a job is dead 2018-08-28 11:27:00 -07:00
Michael Lange 0142f97069 Update the info message about token storage 2018-08-28 10:05:36 -07:00
Michael Lange 0eb5e61e36 Switch token storage to localStorage from sessionStorage 2018-08-28 10:05:15 -07:00
Michael Lange bcbeac7f35 Change the latest deployment component to include a Promote Canary button
Before it would say the deployment required promotion, now it has a
button that triggers the promotion.
2018-08-24 16:41:47 -07:00
Michael Lange c4cb0229d6 Support the promote deployment api action 2018-08-24 16:41:47 -07:00
Michael Lange 715e2ac82a Simplify the data control flow around job.plan() 2018-08-23 15:40:42 -07:00
Michael Lange 0fb7fea825 Acceptance tests for the edit behaviors on the job definition page 2018-08-23 10:26:20 -07:00
Michael Lange b5b4a979f9 Test coverage for the job-editor component
Most of this was ported over from the existing job run acceptance tests
2018-08-23 09:00:14 -07:00
Michael Lange 1f40ab5da5 Introduce job editing to the job definition page 2018-08-21 16:46:24 -07:00
Michael Lange 3ca2237b29 Support cancellation of editing in the job-editor 2018-08-21 16:45:53 -07:00
Michael Lange 772731ccd4 Fix bug where scrolling wasn't using the document
Instead it was using the page-layout is-right div
2018-08-21 16:44:59 -07:00
Michael Lange ed763ad14f Handle update job in the model 2018-08-21 16:44:31 -07:00
Michael Lange a7cd7b39d6 fixup-job-editor 2018-08-21 16:43:46 -07:00
Michael Lange 902ec3e734 fixup-adapter 2018-08-21 16:43:30 -07:00
Michael Lange 527b5d5e97 Support different contexts for the job editor 2018-08-21 16:41:05 -07:00
Michael Lange 05a3238c37 Support job update in the adapter 2018-08-21 16:39:47 -07:00
Michael Lange 33499658a4 Use the same urlForFindRecord logic for urlForUpdateRecord 2018-08-21 16:38:35 -07:00
Michael Lange cd6d4e41e5 Fix multiple highlight bug in the distribution-bar component
Caused by the re-indexing that occurs to remove zero-value bars.
2018-08-21 16:37:36 -07:00
Michael Lange c81ba192dc Fix a blocking queries bug
The lowest valid blocking query index is 1, but the API will return 0 if
there has yet to be an index set (no response). This in conjunction with
that 0 being stored as a string made the "fallback to 1" guard not work.
2018-08-21 13:47:01 -07:00
Michael Lange b3c2538c68 Move the bulk of the new job page into a new job editor component 2018-08-21 12:07:45 -07:00
Michael Lange 55fca36bea New job edit page 2018-08-21 12:06:43 -07:00
Michael Lange 3cee992a97 Test coverage for scheduler dry-run addition to the plan page 2018-08-20 16:44:37 -07:00
Michael Lange 063021081d Fixed bug that prevented non verbose job diffs from printing changed leaf nodes 2018-08-20 16:44:37 -07:00
Michael Lange 9cab82146c Show the scheduler dry-run output on the plan page 2018-08-20 16:44:37 -07:00
Michael Lange 8ed04e64fe Specialized No Leader error page 2018-08-20 14:11:50 -07:00
Michael Lange ee074e9ef5 Don't use the verbose diff for job run plan 2018-08-17 18:32:59 -07:00
Michael Lange 74248bc3f6 Spiff up the form buttons with type and disabled attributes 2018-08-17 18:20:15 -07:00
Michael Lange 2e35687a1d Acceptance tests for job run page 2018-08-16 17:22:58 -07:00
Michael Lange a96c4508d6 Acceptance test for the jobs list page 2018-08-15 17:12:18 -07:00
Michael Lange f06da96c90 Move the Diff property read out of the template 2018-08-15 16:58:54 -07:00
Michael Lange da46817289 Error messages for job submit 2018-08-15 15:18:38 -07:00
Michael Lange e1e3d2c34d Run job UI and API workflows 2018-08-14 18:26:26 -07:00
Michael Lange de4caacb6d Fix no allocations error message layout for the recent allocations component 2018-08-14 17:37:15 -07:00
Michael Lange 4d656c7a31 Parse and Plan API and UI workflows 2018-08-14 17:29:51 -07:00
Michael Lange b0939bde07 Add breadcrumb to the run job page 2018-08-14 13:06:26 -07:00
Michael Lange c85c2a2932 New job run page and navigation to get there. 2018-08-14 12:54:54 -07:00
Michael Lange fe9d0b8704 New layout helper for associating two elements vertically
By default, blocks have a margin of 1.5em to create a consistent
vertical rhythm. However, sometimes elements need to be associated with
the element above them. In this cases, the gap between elements needs to
be tighter. There are many ways to do this, but this approach asks the
latter content to be marked as associative. The implication is that the
association is with the previous block.
2018-08-14 12:47:28 -07:00
Michael Lange 1cc7aba5d2 Enforce a min-height for the code editor component 2018-08-14 12:46:55 -07:00
Michael Lange f41f814b49 Remove the old json viewer 2018-08-13 17:04:15 -07:00
Michael Lange dd9202769a Delete the removed "depth" aspect of json viewer from the styleguide 2018-08-13 17:04:14 -07:00
Michael Lange c5b54393d0 Theme CodeMirror
Borrowed heavily from Vault
2018-08-13 17:04:14 -07:00
Michael Lange 0746501bc8 Use ivy-codemirror in the JSON Viewer component 2018-08-13 17:04:14 -07:00
Michael Lange 8ca806f8f8 Use the model hook and setupController hook instead of afterModel
This is a more idiomatic way to handle the QP resetting in the
application controller.
2018-08-13 16:18:06 -07:00
Michael Lange 104e5196a6 Acceptance tests for the region switcher 2018-08-10 12:52:05 -07:00
Michael Lange 68142b3a82 Specify the request type for token self
Without this, the data (query params) get json stringified
2018-08-09 18:22:39 -07:00
Michael Lange 9f3a37f1c2 Simplify the control flow around changing namespaces and regions
The UI will no longer try to redirect to the appropriate namespace or
region if one is found in localStorage. Instead, it will assume that
the lack of query param means the default namespaces or region is
desired.
2018-08-09 18:22:39 -07:00
Michael Lange 6e2bb48fd5 Handle errors when getting regions or the default regions
This protects against volatility in the server and, more commonly, ACLs
returning forbidden responses.
2018-08-09 18:22:39 -07:00
Michael Lange 3534b09977 Address an issue with certain dependent keys 2018-08-09 18:22:39 -07:00
Michael Lange 3180e57138 Only deal with the region param (in the app and in api calls) when necessary 2018-08-09 18:22:39 -07:00
Michael Lange c4c79c7a1f Get the server's region (aka default region) from the API
The default region shouldn't be used as a qp since no qp means the same
thing.
2018-08-09 18:22:38 -07:00
Michael Lange 0cfeba49d7 Add the region qp to all requests made through the token service 2018-08-09 18:22:38 -07:00
Michael Lange d61fd9ef48 The application route doesn't need to fetch namespaces 2018-08-09 18:22:38 -07:00
Michael Lange 786811b84a Sidestep a transpilation bug.
Default params don't make it into arguments which were being splatted
into the call to super.
2018-08-09 18:22:38 -07:00
Michael Lange ad70fb9cc3 Repeat the new namespace pattern for region 2018-08-09 18:22:38 -07:00
Michael Lange 93f41278b1 Clear up the data flow for namespaces
This is incredibly tricky with query params, since there is a bundle of
timing issues, lifecycle issues, missing features, and all around
gotchas with query params.

This solution has no observers and no instances of the system service
being set from the jobs controller.

The upside to this is no observers, much easier to follow logic, no more
dependent key chain reactions.
2018-08-09 18:22:38 -07:00
Michael Lange 85fe4459d0 Remove the gutter menu from the allocations page 2018-08-09 18:22:38 -07:00
Michael Lange a9aa730d2c Never show the menu divider for the first menu item 2018-08-09 18:22:38 -07:00
Michael Lange 2b93a76fa7 Line breadcrumbs up flush with section content 2018-08-09 18:22:38 -07:00
Michael Lange 04b9d80dc0 Make the dropdown ever so slightly off-white 2018-08-09 18:22:38 -07:00
Michael Lange 32d05509ca Move the region switcher out of the secondary nav and into the gutter when the gutter is collapsed 2018-08-09 18:22:37 -07:00
Michael Lange 148495e853 Add region switcher to the global header 2018-08-09 18:22:37 -07:00
Michael Lange 2877b6b351 Only show the region switcher when there are multiple regions 2018-08-09 18:22:37 -07:00
Michael Lange b889c8091e Fetch regions and namespaces in the application route 2018-08-09 18:22:37 -07:00
Michael Lange a430baba4f Harden up the system service for the event of store unloading 2018-08-09 18:22:37 -07:00
Michael Lange fd0d889a38 Reset the system service when unloading the store 2018-08-09 18:22:37 -07:00
Michael Lange 0a3a83fe1d Add the region qp to every api request 2018-08-09 18:22:37 -07:00
Michael Lange 9a9cc35bd0 Styles for the region switcher 2018-08-09 18:22:37 -07:00
Michael Lange 2bb770361b Add three-way region property (query param, service, localStorage) 2018-08-09 18:22:37 -07:00
Michael Lange 85ab69cf4e Align the hamburger menu and ensure that it's full area is clickable 2018-08-06 11:21:54 -07:00
Michael Lange 805147947b Remove extra whitespace 2018-08-06 11:21:54 -07:00
Michael Lange 86bafe66cf Make the hamburger menu look more traditional 2018-08-06 11:21:54 -07:00
Michael Lange b9fa9a98bc Test coverage for gutter menu interactions 2018-08-06 11:21:54 -07:00
Michael Lange aec990e41d Make it "feel" mobile with a backdrop that closes the gutter menu on tap 2018-08-06 11:21:54 -07:00
Michael Lange 97220ae5fb Visual treatment for the collapsed gutter menu 2018-08-06 11:21:54 -07:00
Michael Lange cada7d3f70 Treat the nomad logo and the hamburger menu as their own css components 2018-08-06 11:21:53 -07:00
Michael Lange ed4dcbe061 Refactor navbar markup 2018-08-06 11:21:53 -07:00
Michael Lange f2f8c28a91 Style the hamburber menu icon 2018-08-06 11:21:53 -07:00
Michael Lange 737805272a Add open/close functionality to the gutter-menu when it's collapsed 2018-08-06 11:21:53 -07:00
Michael Lange 3f75208f6b Hide the gutter menu at low width resolutions 2018-08-06 11:21:53 -07:00
Michael Lange 3671350fe0 Undo the responsive styles that come with bulma 2018-08-06 11:21:53 -07:00
Michael Lange 54b838d934 Keep the search box around when a search yields no results 2018-08-06 11:02:22 -07:00
Michael Lange e774163360 Tests for the recent allocations table 2018-08-06 11:02:21 -07:00
Michael Lange 50794a7626 Treat filtering on an async relationship as async 2018-08-06 11:02:21 -07:00
Michael Lange 40826b2b88 Watch allocations on the job index page
Since there are no recent allocations, those alloc need to be watched
2018-08-06 11:02:21 -07:00