Commit Graph

435 Commits

Author SHA1 Message Date
Michael Lange 9331a02e67 Upgrade ember-cli-mirage 2018-04-17 10:28:58 -07:00
Michael Lange 5223a3f816 Don't read properties off of null objects
Somehow this controller code runs sometimes when the existing jobs
are dematerializing. This makes this.get('model') and array of null
2018-04-17 10:28:58 -07:00
Michael Lange 1f300eb4fb Make sure jobs and task groups have no spaces
Faker hacker nouns can sometimes be two words.
2018-04-17 10:28:58 -07:00
Michael Lange 9d60c9db9a Defer showing alloc addresses until the node is loaded
The URLs for addresses are meaningless until the node http addr
is available.
2018-04-10 09:31:35 -07:00
Michael Lange 2ed5b61358 Repeat the relationship unlinking pattern in the serializer
It also culls for findAll requests, so it too needs to be
careful about leaving garbage around.
2018-04-06 18:07:57 -07:00
Michael Lange 72cba3b036 Unlink record relationships before unloaded them from the store
When simply unloading a record, references to the record are
maintained by the internal relationship state of related models.
This causes refetching and duplicate models local to that relationship
state.
2018-04-06 17:50:40 -07:00
Michael Lange 78f7d57359 Never respond with an empty object from the adapter
In production builds only, this will slip into the local store
as a record with no ID, which makes for all sorts of bad news.
2018-04-05 16:50:37 -07:00
Michael Lange f473d72ceb Remove an extraneous component of the service job page 2018-04-02 18:19:17 -07:00
Alex Dadgar af81349dbe Generated files 2018-03-30 16:14:40 -07:00
Michael Lange 7d5615794d
Merge pull request #4081 from hashicorp/b-ui-service-breadcrumbs
UI: Service job breadcrumbs + errant open connections
2018-03-29 15:08:14 -07:00
Michael Lange a226021a05 Track multiple xhrs per URL rather than overriding
It was possible for a url to be overridden then canceled, leaving the
open connection open and forgotten about.
2018-03-29 14:40:57 -07:00
Michael Lange db4b81a348
Merge pull request #4067 from hashicorp/ui-upgrade-ember
UI: Upgrade Ember to LTS + fix job summary issues
2018-03-29 12:43:54 -06:00
Michael Lange b23bc70bce Add missing js class for System that extends AbstractJobPage 2018-03-28 16:46:35 -07:00
Michael Lange 7bab2a1f23 Check for a case-sensitive or lowercase header value 2018-03-28 16:10:09 -07:00
Michael Lange bff7230642 Remove now unnecessary summary fallback
Ember Data 2.18 fixed the underlying bug
2018-03-28 15:20:02 -07:00
Michael Lange b7d833a5e0 Correctly watch the job summary on the task group page
It changed from being a relationship to a model
2018-03-28 15:12:27 -07:00
Michael Lange e192d0a69d Upgrade to Ember 2.18 2018-03-28 14:57:03 -07:00
Michael Lange 6967fc2c11 Make the job<->job-summary relationship reflective
The job summary needed a JobID
2018-03-28 14:56:15 -07:00
Michael Lange dbf4b6c242 Clear out the localStorage namespace when it's no longer valid
In the event that a namespace in localStorage is not found in the
response for /namespaces, clear the localStorage value and assume
the default namespace.
2018-03-28 14:55:07 -07:00
Michael Lange 679831e96b Don't allow the alloc status table cell to word-wrap at the swatch 2018-03-28 14:51:54 -07:00
Michael Lange 84141e9d1f Read the task event message from the DisplayMessage prop 2018-03-28 12:52:02 -07:00
Michael Lange 4c34a04151 Work around the dreaded broken relationship ED bug
Summary can unlink from a job when loaded in the wrong order. This
guarantees that the summary is bound to the job detail view by
falling back to the summary in the store.
2018-03-22 20:14:37 -07:00
Michael Lange 1413ed1a44 Never duplicate query params, always include query params
A couple more edge cases related to watching URLs with query params
2018-03-22 20:14:36 -07:00
Michael Lange ca98d6b0c8 Allow child adapters specify special xhr keys
This is necessary for the namespace query param
2018-03-22 20:14:36 -07:00
Michael Lange d85673d7c6 Always use the job plain id and job namespace in job links 2018-03-22 20:14:36 -07:00
Michael Lange fb17a758da Poll for allocation stats 2018-03-22 14:34:57 -07:00
Michael Lange 6bf139d094 Refactor the way allocation stats are fetched
No longer treat it as a property for relationship, just ephemeral
data that can be fetched on demand.
2018-03-22 14:34:13 -07:00
Michael Lange 729365507f
Merge pull request #4017 from hashicorp/b-ui-error-message-for-force
Show an error message when forcing a periodic launch is forbidden
2018-03-22 11:17:14 -07:00
Michael Lange 6ac170d721
Merge pull request #4026 from hashicorp/b-ui-use-native-fetch-in-prod
UI: Use native fetch in production when available
2018-03-22 11:16:37 -07:00
Michael Lange d455b3cdd3 mirageEnabled alone doesn't capture whether or not mirage is enabled
Add an isProduction condition to ensure native fetch is used when
possible.
2018-03-21 22:09:10 -07:00
Michael Lange fc5c4ff093 The initial index value should be 1, not 0 2018-03-21 13:28:56 -07:00
Michael Lange 8541579722 Show an error message when forcing a periodic launch is forbidden
This will happen when ACLs allow for reading jobs but not submitting.
2018-03-21 12:12:17 -07:00
Michael Lange 810c5c3f7c Perioidic and Parameterized jobs need to watch /jobs for child updates 2018-03-20 16:41:53 -07:00
Michael Lange 39bf9a4e78 Always provide arguments instead of models to job links
This invoked the model hook, which will load the model and
redirect correctly based on permissions
2018-03-20 16:41:19 -07:00
Michael Lange e4e70825d0 Guard against undefined properties in cancel requests 2018-03-20 16:41:19 -07:00
Michael Lange e4d2b52748 Treat job-summary like a typical relationship rather than a custom link
This way ED doesn't eagerly fetch the job summary even when it's already
in the store due to the jobs list endpoint
2018-03-20 16:41:18 -07:00
Michael Lange a5a5923e30 Job row should denote when a parent job has no children 2018-03-20 16:41:18 -07:00
Michael Lange 3affa48def Alias the right property 2018-03-20 16:41:18 -07:00
Michael Lange 8e9fe5df01 Deployments should only be watched when the job type supports deployments 2018-03-20 16:23:03 -07:00
Michael Schurter 86ccdb9115 Fix generating static assets
Broke due to a change in go-bindata-assetfs
2018-03-19 15:52:38 -07:00
Michael Lange 31a30f5805
Merge pull request #3989 from hashicorp/f-ui-read-job-summary-from-list-view
UI: Read job summary from Jobs.List
2018-03-16 12:37:05 -07:00
Michael Lange 23cfbb9c27 Ensure the task group is present whenever an allocation row is rendered 2018-03-15 14:03:14 -07:00
Michael Lange c8b3e91d4a Update job row to no longer watch job-summary or reload the job
Now that job summary is pushed into the store from the list request
and the task group count is derived from the summary, the detailed
job information is no longer needed for a job row.
2018-03-15 10:48:37 -07:00
Michael Lange ab69c2806c Use the job-summary information available from the jobs list 2018-03-15 10:28:34 -07:00
Michael Lange d6fd741e16 Read task name off of the state rather than the task
It's possible for the task (derived from the job API response)
is nil, or has a nil name field.

Using the task state instead ensures a name every time.
2018-03-14 16:39:42 -07:00
Michael Lange 5dc9dbb0ea Update tests to reflect new breadcrumbs 2018-03-13 16:36:26 -07:00
Michael Lange 5c1c0db1c3 Make task page breadcrumbs extend the allocation breadcrumbs 2018-03-13 16:36:26 -07:00
Michael Lange 53ee4d72a5 Make allocation pages extend the job breadcrumb trail 2018-03-13 16:36:26 -07:00
Michael Lange d9287d1f40 Fix a bug where job links didn't always include the namespace QP 2018-03-13 16:34:01 -07:00
Michael Lange 0d9b94ab10 QueryParams primitive ported with a helper
This QueryParams object is defined in Ember source, but it isn't
public, which means there is no out of the box way to construct
the query params arg for LinkTo in JavaScript
2018-03-13 16:34:01 -07:00
Michael Lange 7768e14380 Correctly wire up job relationships 2018-03-13 16:34:01 -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 026f885087 spelling: rolling 2018-03-11 18:52:29 +00:00
Josh Soref 7f6e4012a0 spelling: existent 2018-03-11 18:30:37 +00:00
Josh Soref e0169c6a53 spelling: exhausted 2018-03-11 18:05:21 +00:00
Josh Soref ce22b18754 spelling: details 2018-03-11 17:54:56 +00:00
Josh Soref 7248de4e26 spelling: breadcrumb 2018-03-11 17:44:27 +00:00
Josh Soref 4708460e8f spelling: appropriate 2018-03-11 17:39:47 +00:00
Michael Lange 23e7a7924f Only show the placement failures section if there is a blocked eval 2018-03-08 14:14:55 -08:00
Michael Lange 29f1d9948e
Merge pull request #3936 from hashicorp/f-ui-polling
UI: Live updating views
2018-03-08 13:27:02 -08:00
Michael Lange 04681d5622 Better define mixin contracts 2018-03-08 11:15:43 -08:00
Michael Lange 24c8690cb0 Fix a bug where namespace filter is incorrect for the jobs list 2018-03-08 10:40:31 -08:00
Michael Lange 0cfa36d839 Don't let aborted requests redirect to error 2018-03-08 10:40:31 -08:00
Michael Lange 314f1ea436 Change from the setupController hook to the new startWatchers hook 2018-03-08 10:40:31 -08:00
Michael Lange 98d425fdcf Toggle polling in components when switching away from the tab 2018-03-08 10:40:31 -08:00
Michael Lange 145b153889 Wire up the job summary 2018-03-08 10:40:31 -08:00
Michael Lange 50f67d8ee6 New mixins for managing tab visibility effects 2018-03-08 10:40:31 -08:00
Michael Lange 86f73320a2 Patch tests 2018-03-05 09:32:05 -08:00
Michael Lange 2282f3243a Use willTransition instead of deactivate to cancel requests
deactivate happens _after_ the new route's model hook, which
results in the possibility of canceling new requests right
after they are made rather than existing open connections
2018-03-05 09:32:05 -08:00
Michael Lange 83df67a8ab Watch node and related allocations on the client detail page 2018-03-05 09:32:04 -08:00
Michael Lange e54cf51460 Move node watching to the index page
It doesn't need to impact the entire route hierarchy
2018-03-05 09:32:04 -08:00
Michael Lange 5363f32d33 Watch the allocation on the allocation and task pages 2018-03-05 09:32:04 -08:00
Michael Lange c201d3ae8f Watch job, job-summary, and job-allocs on the task group page 2018-03-05 09:32:04 -08:00
Michael Lange a79c0aa853 Move jobs polling from jobs to jobs.index
It's only necessary for the list view, not the entire route hierarchy
2018-03-05 09:32:04 -08:00
Michael Lange b1125c1a1f Add polling to the deployments page 2018-03-05 09:32:04 -08:00
Michael Lange 8b0ad9f2fb Move job watchers to job.index
They are only for the overview page, not the whole hierarchy
2018-03-05 09:32:04 -08:00
Michael Lange 053cf6d4f1 Cancel a watch request before making an identical one 2018-03-05 09:32:04 -08:00
Michael Lange 2b6f07c4c3 Watch job versions 2018-03-05 09:32:03 -08:00
Michael Lange c883280661 Fix preexisting bugs that only surfaced once live updating started 2018-03-05 09:32:03 -08:00
Michael Lange 0750f353a8 Go through the expected normalization paths when watching relationships 2018-03-05 09:32:03 -08:00
Michael Lange 2e825a8d22 Watch nodes and allocs on the nodes list page 2018-03-05 09:32:03 -08:00
Michael Lange 4b581dc04d Address headers and ID bugs 2018-03-02 16:28:39 -08:00
Michael Lange bbe646b131 Set slices after merging the selection 2018-03-02 16:21:37 -08:00
Michael Lange 7c27d1486b Json viewer isn't side effect free, so use a copy 2018-03-02 16:21:37 -08:00
Michael Lange 2d0a3a15ad Add tests for findHasMany store culling 2018-03-02 16:21:37 -08:00
Michael Lange 762a82702a Add tests for findAll store culling 2018-03-02 16:21:37 -08:00
Michael Lange 80c8db559b Tests for watching and canceling requests 2018-03-02 16:21:37 -08:00
Michael Lange 788d410d6b Watchable request helper for Mirage 2018-03-02 16:21:37 -08:00
Michael Lange 553c69cc32 Fix existing tests 2018-03-02 16:21:36 -08:00
Michael Lange 2634b36044 Generalized solution for removing records in the local store
When the findAll response from the server no longer has them.
2018-03-02 16:21:36 -08:00
Michael Lange 1ab5b8b3e4 Cancel watch tasks when appropriate 2018-03-02 16:21:36 -08:00
Michael Lange 962c763aa6 Watch properties cancel long poll requests 2018-03-02 16:21:36 -08:00
Michael Lange 01a83b5bee Track xhrs in the watchable adapter and expose cancellation methods 2018-03-02 16:21:36 -08:00
Michael Lange d5424fec57 Remove stale records from the store for findHasMany requests 2018-03-02 16:21:35 -08:00
Michael Lange 5a21a5ddbf Watch for summary changes in job-row 2018-03-02 16:21:35 -08:00
Michael Lange 1f7f78823e Watch all records on the jobs list page 2018-03-02 16:21:35 -08:00
Michael Lange 34872543f9 Remove records from the store when they are no longer in array responses
Ember Data doesn't do this by default, instead opting to be as
non-destructive as possible. However, this is desired behavior.
2018-03-02 16:21:35 -08:00
Michael Lange 5f10940c92 Blocking query support for findAll requests 2018-03-02 16:21:35 -08:00
Michael Lange 87e32af4ea Make the throttle time configurable 2018-03-02 16:21:35 -08:00
Michael Lange 6b1fab696e Add a watchAll computed property macro 2018-03-02 16:21:34 -08:00