Commit Graph

280 Commits

Author SHA1 Message Date
Michael Lange
80246b4deb Perioidic and Parameterized jobs need to watch /jobs for child updates 2018-03-20 16:41:53 -07:00
Michael Lange
1c0d133f25 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
93471649eb Guard against undefined properties in cancel requests 2018-03-20 16:41:19 -07:00
Michael Lange
a6e2f782b7 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
8be0c5a999 Job row should denote when a parent job has no children 2018-03-20 16:41:18 -07:00
Michael Lange
b4fe0324cf Alias the right property 2018-03-20 16:41:18 -07:00
Michael Lange
725f6b917b Deployments should only be watched when the job type supports deployments 2018-03-20 16:23:03 -07:00
Michael Lange
78b2c63836 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
9e961fe0ef Ensure the task group is present whenever an allocation row is rendered 2018-03-15 14:03:14 -07:00
Michael Lange
030e229f5e 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
415c6a0d3c Use the job-summary information available from the jobs list 2018-03-15 10:28:34 -07:00
Michael Lange
6e88f3846c 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
c8693ba525 Make task page breadcrumbs extend the allocation breadcrumbs 2018-03-13 16:36:26 -07:00
Michael Lange
79ecf47936 Make allocation pages extend the job breadcrumb trail 2018-03-13 16:36:26 -07:00
Michael Lange
efeb5abbcb Fix a bug where job links didn't always include the namespace QP 2018-03-13 16:34:01 -07:00
Michael Lange
54b1101989 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
a1e34f0258 Only show the placement failures section if there is a blocked eval 2018-03-08 14:14:55 -08:00
Michael Lange
220790f3fa Merge pull request #3936 from hashicorp/f-ui-polling
UI: Live updating views
2018-03-08 13:27:02 -08:00
Michael Lange
27ec2c23df Better define mixin contracts 2018-03-08 11:15:43 -08:00
Michael Lange
df54b6bae2 Fix a bug where namespace filter is incorrect for the jobs list 2018-03-08 10:40:31 -08:00
Michael Lange
4e0489ae42 Don't let aborted requests redirect to error 2018-03-08 10:40:31 -08:00
Michael Lange
d29942f1cc Change from the setupController hook to the new startWatchers hook 2018-03-08 10:40:31 -08:00
Michael Lange
01de2ea257 Toggle polling in components when switching away from the tab 2018-03-08 10:40:31 -08:00
Michael Lange
c86469725d New mixins for managing tab visibility effects 2018-03-08 10:40:31 -08:00
Michael Lange
0cb485534b 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
8fe4f76a17 Watch node and related allocations on the client detail page 2018-03-05 09:32:04 -08:00
Michael Lange
9390e092c7 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
e7a26ce8d1 Watch the allocation on the allocation and task pages 2018-03-05 09:32:04 -08:00
Michael Lange
5307803598 Watch job, job-summary, and job-allocs on the task group page 2018-03-05 09:32:04 -08:00
Michael Lange
093bd4128b 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
9cd5632d69 Add polling to the deployments page 2018-03-05 09:32:04 -08:00
Michael Lange
e1c5a5de6c 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
9658268192 Cancel a watch request before making an identical one 2018-03-05 09:32:04 -08:00
Michael Lange
34c712d5c5 Watch job versions 2018-03-05 09:32:03 -08:00
Michael Lange
88df7fe537 Fix preexisting bugs that only surfaced once live updating started 2018-03-05 09:32:03 -08:00
Michael Lange
594b9916ad Go through the expected normalization paths when watching relationships 2018-03-05 09:32:03 -08:00
Michael Lange
a2976dae85 Watch nodes and allocs on the nodes list page 2018-03-05 09:32:03 -08:00
Michael Lange
421f082a9c Address headers and ID bugs 2018-03-02 16:28:39 -08:00
Michael Lange
5dd83fd9cd Set slices after merging the selection 2018-03-02 16:21:37 -08:00
Michael Lange
6c3a09123a Json viewer isn't side effect free, so use a copy 2018-03-02 16:21:37 -08:00
Michael Lange
504ff2d4b7 Tests for watching and canceling requests 2018-03-02 16:21:37 -08:00
Michael Lange
3c2a1f8a4a Fix existing tests 2018-03-02 16:21:36 -08:00
Michael Lange
60ee8714c1 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
dbc9903ae9 Cancel watch tasks when appropriate 2018-03-02 16:21:36 -08:00
Michael Lange
b69fe312b8 Watch properties cancel long poll requests 2018-03-02 16:21:36 -08:00
Michael Lange
ed809fe27e Track xhrs in the watchable adapter and expose cancellation methods 2018-03-02 16:21:36 -08:00
Michael Lange
8a119d99ce Remove stale records from the store for findHasMany requests 2018-03-02 16:21:35 -08:00
Michael Lange
b675d97400 Watch for summary changes in job-row 2018-03-02 16:21:35 -08:00
Michael Lange
702228e878 Watch all records on the jobs list page 2018-03-02 16:21:35 -08:00
Michael Lange
5e4491ca2c 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