diff --git a/ui/app/components/gutter-menu.js b/ui/app/components/gutter-menu.js index 7a5086b767b9..26151644045d 100644 --- a/ui/app/components/gutter-menu.js +++ b/ui/app/components/gutter-menu.js @@ -4,6 +4,7 @@ import { computed } from '@ember/object'; export default Component.extend({ system: service(), + router: service(), sortedNamespaces: computed('system.namespaces.@each.name', function() { const namespaces = this.get('system.namespaces').toArray() || []; @@ -31,5 +32,11 @@ export default Component.extend({ }); }), - onNamespaceChange() {}, + gotoJobsForNamespace(namespace) { + if (!namespace || !namespace.get('id')) return; + + this.get('router').transitionTo('jobs', { + queryParams: { namespace: namespace.get('id') }, + }); + }, }); diff --git a/ui/app/components/job-page/abstract.js b/ui/app/components/job-page/abstract.js index 01f63b2cf7c2..931c5c6db909 100644 --- a/ui/app/components/job-page/abstract.js +++ b/ui/app/components/job-page/abstract.js @@ -11,7 +11,6 @@ export default Component.extend({ sortDescending: null, // Provide actions that require routing - onNamespaceChange() {}, gotoTaskGroup() {}, gotoJob() {}, diff --git a/ui/app/components/page-layout.js b/ui/app/components/page-layout.js new file mode 100644 index 000000000000..4c5658fda260 --- /dev/null +++ b/ui/app/components/page-layout.js @@ -0,0 +1,5 @@ +import Component from '@ember/component'; + +export default Component.extend({ + classNames: ['page-layout'], +}); diff --git a/ui/app/controllers/jobs.js b/ui/app/controllers/jobs.js index e7a69a7d8075..c8fd48cf5efd 100644 --- a/ui/app/controllers/jobs.js +++ b/ui/app/controllers/jobs.js @@ -18,12 +18,6 @@ export default Controller.extend({ // But query param defaults can't be CPs: https://github.com/emberjs/ember.js/issues/9819 syncNamespaceService: forwardNamespace('jobNamespace', 'system.activeNamespace'), syncNamespaceParam: forwardNamespace('system.activeNamespace', 'jobNamespace'), - - actions: { - refreshRoute() { - return true; - }, - }, }); function forwardNamespace(source, destination) { diff --git a/ui/app/controllers/jobs/index.js b/ui/app/controllers/jobs/index.js index 769b48115bd2..0dd0eb5a8127 100644 --- a/ui/app/controllers/jobs/index.js +++ b/ui/app/controllers/jobs/index.js @@ -58,9 +58,5 @@ export default Controller.extend(Sortable, Searchable, { gotoJob(job) { this.transitionToRoute('jobs.job', job.get('plainId')); }, - - refresh() { - this.send('refreshRoute'); - }, }, }); diff --git a/ui/app/routes/jobs.js b/ui/app/routes/jobs.js index ed9178375511..759027c2103b 100644 --- a/ui/app/routes/jobs.js +++ b/ui/app/routes/jobs.js @@ -21,7 +21,7 @@ export default Route.extend(WithForbiddenState, { model() { return this.get('store') - .findAll('job') + .findAll('job', { reload: true }) .catch(notifyForbidden(this)); }, diff --git a/ui/app/routes/jobs/index.js b/ui/app/routes/jobs/index.js index bb3c0b6a3259..7529d41045b3 100644 --- a/ui/app/routes/jobs/index.js +++ b/ui/app/routes/jobs/index.js @@ -10,10 +10,4 @@ export default Route.extend(WithWatchers, { watch: watchAll('job'), watchers: collect('watch'), - - actions: { - refreshRoute() { - return true; - }, - }, }); diff --git a/ui/app/templates/allocations.hbs b/ui/app/templates/allocations.hbs index a766b9ff647d..87dfce6a7603 100644 --- a/ui/app/templates/allocations.hbs +++ b/ui/app/templates/allocations.hbs @@ -1,6 +1,3 @@ -
- {{#global-header class="page-header"}} - {{app-breadcrumbs}} - {{/global-header}} +{{#page-layout}} {{outlet}} -
+{{/page-layout}} diff --git a/ui/app/templates/allocations/allocation/index.hbs b/ui/app/templates/allocations/allocation/index.hbs index 34389a657fce..590e3bfafbb6 100644 --- a/ui/app/templates/allocations/allocation/index.hbs +++ b/ui/app/templates/allocations/allocation/index.hbs @@ -1,100 +1,98 @@ -{{#gutter-menu class="page-body"}} -
-

- Allocation {{model.name}} - {{model.clientStatus}} - {{model.id}} -

+
+

+ Allocation {{model.name}} + {{model.clientStatus}} + {{model.id}} +

-
-
- Allocation Details - Job - {{#link-to "jobs.job" model.job (query-params jobNamespace=model.job.namespace.id) data-test-job-link}}{{model.job.name}}{{/link-to}} - - Client - {{#link-to "clients.client" model.node data-test-client-link}}{{model.node.shortId}}{{/link-to}} - -
+
+
+ Allocation Details + Job + {{#link-to "jobs.job" model.job (query-params jobNamespace=model.job.namespace.id) data-test-job-link}}{{model.job.name}}{{/link-to}} + + Client + {{#link-to "clients.client" model.node data-test-client-link}}{{model.node.shortId}}{{/link-to}} +
+
-
-
- Tasks -
-
- {{#list-table - source=sortedStates - sortProperty=sortProperty - sortDescending=sortDescending - class="is-striped" as |t|}} - {{#t.head}} - - {{#t.sort-by prop="name"}}Name{{/t.sort-by}} - {{#t.sort-by prop="state"}}State{{/t.sort-by}} - Last Event - {{#t.sort-by prop="events.lastObject.time"}}Time{{/t.sort-by}} - Addresses - {{/t.head}} - {{#t.body as |row|}} - - - {{#if (not row.model.driverStatus.healthy)}} - - {{x-icon "warning" class="is-warning"}} - - {{/if}} - - - {{#link-to "allocations.allocation.task" row.model.allocation row.model class="is-primary"}} - {{row.model.name}} - {{/link-to}} - - {{row.model.state}} - - {{#if row.model.events.lastObject.message}} - {{row.model.events.lastObject.message}} - {{else}} - No message - {{/if}} - - {{moment-format row.model.events.lastObject.time "MM/DD/YY HH:mm:ss"}} - -
    - {{#with row.model.resources.networks.firstObject as |network|}} - {{#each network.reservedPorts as |port|}} -
  • - {{port.Label}}: - {{network.ip}}:{{port.Value}} -
  • - {{/each}} - {{#each network.dynamicPorts as |port|}} -
  • - {{port.Label}}: - {{network.ip}}:{{port.Value}} -
  • - {{/each}} - {{/with}} -
- - - {{/t.body}} - {{/list-table}} -
+
+
+ Tasks
+
+ {{#list-table + source=sortedStates + sortProperty=sortProperty + sortDescending=sortDescending + class="is-striped" as |t|}} + {{#t.head}} + + {{#t.sort-by prop="name"}}Name{{/t.sort-by}} + {{#t.sort-by prop="state"}}State{{/t.sort-by}} + Last Event + {{#t.sort-by prop="events.lastObject.time"}}Time{{/t.sort-by}} + Addresses + {{/t.head}} + {{#t.body as |row|}} + + + {{#if (not row.model.driverStatus.healthy)}} + + {{x-icon "warning" class="is-warning"}} + + {{/if}} + + + {{#link-to "allocations.allocation.task" row.model.allocation row.model class="is-primary"}} + {{row.model.name}} + {{/link-to}} + + {{row.model.state}} + + {{#if row.model.events.lastObject.message}} + {{row.model.events.lastObject.message}} + {{else}} + No message + {{/if}} + + {{moment-format row.model.events.lastObject.time "MM/DD/YY HH:mm:ss"}} + +
    + {{#with row.model.resources.networks.firstObject as |network|}} + {{#each network.reservedPorts as |port|}} +
  • + {{port.Label}}: + {{network.ip}}:{{port.Value}} +
  • + {{/each}} + {{#each network.dynamicPorts as |port|}} +
  • + {{port.Label}}: + {{network.ip}}:{{port.Value}} +
  • + {{/each}} + {{/with}} +
+ + + {{/t.body}} + {{/list-table}} +
+
- {{#if model.hasRescheduleEvents}} -
-
- Reschedule Events -
-
- {{reschedule-event-timeline allocation=model}} -
+ {{#if model.hasRescheduleEvents}} +
+
+ Reschedule Events +
+
+ {{reschedule-event-timeline allocation=model}}
- {{/if}} -
-{{/gutter-menu}} + + {{/if}} +
diff --git a/ui/app/templates/allocations/allocation/task/index.hbs b/ui/app/templates/allocations/allocation/task/index.hbs index d24ec3819ec3..6746fb05badb 100644 --- a/ui/app/templates/allocations/allocation/task/index.hbs +++ b/ui/app/templates/allocations/allocation/task/index.hbs @@ -1,85 +1,83 @@ -{{#gutter-menu class="page-body"}} - {{partial "allocations/allocation/task/subnav"}} -
-

- {{model.name}} - {{model.state}} -

+{{partial "allocations/allocation/task/subnav"}} +
+

+ {{model.name}} + {{model.state}} +

-
-
- Task Details - - Started At - {{moment-format model.startedAt "MM/DD/YY HH:mm:ss"}} - - {{#if model.finishedAt}} - - Finished At - {{moment-format model.finishedAt "MM/DD/YY HH:mm:ss"}} - - {{/if}} +
+
+ Task Details + + Started At + {{moment-format model.startedAt "MM/DD/YY HH:mm:ss"}} + + {{#if model.finishedAt}} - Driver - {{model.task.driver}} + Finished At + {{moment-format model.finishedAt "MM/DD/YY HH:mm:ss"}} -
+ {{/if}} + + Driver + {{model.task.driver}} +
+
- {{#if ports.length}} -
-
- Addresses -
-
- {{#list-table source=ports as |t|}} - {{#t.head}} - Dynamic? - Name - Address - {{/t.head}} - {{#t.body as |row|}} - - {{if row.model.isDynamic "Yes" "No"}} - {{row.model.name}} - - - {{network.ip}}:{{row.model.port}} - - - - {{/t.body}} - {{/list-table}} -
-
- {{/if}} - -
+ {{#if ports.length}} +
- Recent Events + Addresses
- {{#list-table source=(reverse model.events) class="is-striped" as |t|}} + {{#list-table source=ports as |t|}} {{#t.head}} - Time - Type - Description + Dynamic? + Name + Address {{/t.head}} {{#t.body as |row|}} - - {{moment-format row.model.time "MM/DD/YY HH:mm:ss"}} - {{row.model.type}} - - {{#if row.model.message}} - {{row.model.message}} - {{else}} - No message - {{/if}} + + {{if row.model.isDynamic "Yes" "No"}} + {{row.model.name}} + + + {{network.ip}}:{{row.model.port}} + {{/t.body}} {{/list-table}}
-
-{{/gutter-menu}} + {{/if}} + +
+
+ Recent Events +
+
+ {{#list-table source=(reverse model.events) class="is-striped" as |t|}} + {{#t.head}} + Time + Type + Description + {{/t.head}} + {{#t.body as |row|}} + + {{moment-format row.model.time "MM/DD/YY HH:mm:ss"}} + {{row.model.type}} + + {{#if row.model.message}} + {{row.model.message}} + {{else}} + No message + {{/if}} + + + {{/t.body}} + {{/list-table}} +
+
+
diff --git a/ui/app/templates/allocations/allocation/task/logs.hbs b/ui/app/templates/allocations/allocation/task/logs.hbs index 6799e39d6efb..d9e2e825106b 100644 --- a/ui/app/templates/allocations/allocation/task/logs.hbs +++ b/ui/app/templates/allocations/allocation/task/logs.hbs @@ -1,6 +1,4 @@ -{{#gutter-menu class="page-body"}} - {{partial "allocations/allocation/task/subnav"}} -
- {{task-log data-test-task-log allocation=model.allocation task=model.name}} -
-{{/gutter-menu}} +{{partial "allocations/allocation/task/subnav"}} +
+ {{task-log data-test-task-log allocation=model.allocation task=model.name}} +
diff --git a/ui/app/templates/clients.hbs b/ui/app/templates/clients.hbs index a766b9ff647d..87dfce6a7603 100644 --- a/ui/app/templates/clients.hbs +++ b/ui/app/templates/clients.hbs @@ -1,6 +1,3 @@ -
- {{#global-header class="page-header"}} - {{app-breadcrumbs}} - {{/global-header}} +{{#page-layout}} {{outlet}} -
+{{/page-layout}} diff --git a/ui/app/templates/clients/client.hbs b/ui/app/templates/clients/client.hbs index f83069ccfc1c..b6e2bcf9ffef 100644 --- a/ui/app/templates/clients/client.hbs +++ b/ui/app/templates/clients/client.hbs @@ -1,252 +1,250 @@ -{{#gutter-menu class="page-body"}} -
-

- - {{or model.name model.shortId}} - {{model.id}} -

+
+

+ + {{or model.name model.shortId}} + {{model.id}} +

-
+
+
+ Client Details + + Status + {{model.status}} + + + Address + {{model.httpAddr}} + + + Draining + {{#if model.isDraining}} + true + {{else}} + false + {{/if}} + + + Eligibility + {{#if model.isEligible}} + {{model.schedulingEligibility}} + {{else}} + {{model.schedulingEligibility}} + {{/if}} + + + Datacenter + {{model.datacenter}} + + + Drivers + {{#if model.unhealthyDrivers.length}} + {{x-icon "warning" class="is-text is-warning"}} + {{model.unhealthyDrivers.length}} of {{model.detectedDrivers.length}} {{pluralize "driver" model.detectedDrivers.length}} unhealthy + {{else}} + All healthy + {{/if}} + +
+
+ + {{#if model.drainStrategy}} +
- Client Details - - Status - {{model.status}} - - - Address - {{model.httpAddr}} - - - Draining - {{#if model.isDraining}} - true + Drain Strategy + + Deadline + {{#if model.drainStrategy.isForced}} + Forced Drain + {{else if model.drainStrategy.hasNoDeadline}} + No deadline {{else}} - false + {{format-duration model.drainStrategy.deadline}} {{/if}} - - Eligibility - {{#if model.isEligible}} - {{model.schedulingEligibility}} - {{else}} - {{model.schedulingEligibility}} - {{/if}} - - - Datacenter - {{model.datacenter}} - - - Drivers - {{#if model.unhealthyDrivers.length}} - {{x-icon "warning" class="is-text is-warning"}} - {{model.unhealthyDrivers.length}} of {{model.detectedDrivers.length}} {{pluralize "driver" model.detectedDrivers.length}} unhealthy - {{else}} - All healthy - {{/if}} + {{#if model.drainStrategy.forceDeadline}} + + Forced Deadline + {{moment-format model.drainStrategy.forceDeadline "MM/DD/YY HH:mm:ss"}} + ({{moment-from-now model.drainStrategy.forceDeadline interval=1000}}) + + {{/if}} + + Ignore System Jobs? + {{if model.drainStrategy.ignoreSystemJobs "Yes" "No"}}
+ {{/if}} - {{#if model.drainStrategy}} -
-
- Drain Strategy - - Deadline - {{#if model.drainStrategy.isForced}} - Forced Drain - {{else if model.drainStrategy.hasNoDeadline}} - No deadline - {{else}} - {{format-duration model.drainStrategy.deadline}} - {{/if}} - - {{#if model.drainStrategy.forceDeadline}} - - Forced Deadline - {{moment-format model.drainStrategy.forceDeadline "MM/DD/YY HH:mm:ss"}} - ({{moment-from-now model.drainStrategy.forceDeadline interval=1000}}) - - {{/if}} - - Ignore System Jobs? - {{if model.drainStrategy.ignoreSystemJobs "Yes" "No"}} - -
-
- {{/if}} - -
-
-
Allocations {{model.allocations.length}}
- {{search-box - searchTerm=(mut searchTerm) - placeholder="Search allocations..." - class="is-inline pull-right" - inputClass="is-compact"}} -
-
- {{#list-pagination - source=sortedAllocations - size=pageSize - page=currentPage as |p|}} - {{#list-table - source=p.list - sortProperty=sortProperty - sortDescending=sortDescending - class="with-foot" as |t|}} - {{#t.head}} - - {{#t.sort-by prop="shortId"}}ID{{/t.sort-by}} - {{#t.sort-by prop="modifyIndex" title="Modify Index"}}Modified{{/t.sort-by}} - {{#t.sort-by prop="name"}}Name{{/t.sort-by}} - {{#t.sort-by prop="statusIndex"}}Status{{/t.sort-by}} - {{#t.sort-by prop="job.name"}}Job{{/t.sort-by}} - {{#t.sort-by prop="jobVersion"}}Version{{/t.sort-by}} - CPU - Memory - {{/t.head}} - {{#t.body as |row|}} - {{allocation-row - allocation=row.model - context="node" - onClick=(action "gotoAllocation" row.model) - data-test-allocation=row.model.id}} - {{/t.body}} - {{/list-table}} -
- -
- {{/list-pagination}} -
+
+
+
Allocations {{model.allocations.length}}
+ {{search-box + searchTerm=(mut searchTerm) + placeholder="Search allocations..." + class="is-inline pull-right" + inputClass="is-compact"}}
- -
-
- Client Events -
-
- {{#list-table source=sortedEvents class="is-striped" as |t|}} +
+ {{#list-pagination + source=sortedAllocations + size=pageSize + page=currentPage as |p|}} + {{#list-table + source=p.list + sortProperty=sortProperty + sortDescending=sortDescending + class="with-foot" as |t|}} {{#t.head}} - Time - Subsystem - Message + + {{#t.sort-by prop="shortId"}}ID{{/t.sort-by}} + {{#t.sort-by prop="modifyIndex" title="Modify Index"}}Modified{{/t.sort-by}} + {{#t.sort-by prop="name"}}Name{{/t.sort-by}} + {{#t.sort-by prop="statusIndex"}}Status{{/t.sort-by}} + {{#t.sort-by prop="job.name"}}Job{{/t.sort-by}} + {{#t.sort-by prop="jobVersion"}}Version{{/t.sort-by}} + CPU + Memory {{/t.head}} {{#t.body as |row|}} - - {{moment-format row.model.time "MM/DD/YY HH:mm:ss"}} - {{row.model.subsystem}} - - {{#if row.model.message}} - {{#if row.model.driver}} - {{row.model.driver}} - {{/if}} - {{row.model.message}} - {{else}} - No message - {{/if}} - - + {{allocation-row + allocation=row.model + context="node" + onClick=(action "gotoAllocation" row.model) + data-test-allocation=row.model.id}} {{/t.body}} {{/list-table}} -
+
+ +
+ {{/list-pagination}}
+
-
-
- Driver Status -
-
- {{#list-accordion source=sortedDrivers key="name" as |a|}} - {{#a.head buttonLabel="details" isExpandable=a.item.detected}} -
-
- {{a.item.name}} -
-
- {{#if a.item.detected}} - - - {{if a.item.healthy "Healthy" "Unhealthy"}} - +
+
+ Client Events +
+
+ {{#list-table source=sortedEvents class="is-striped" as |t|}} + {{#t.head}} + Time + Subsystem + Message + {{/t.head}} + {{#t.body as |row|}} + + {{moment-format row.model.time "MM/DD/YY HH:mm:ss"}} + {{row.model.subsystem}} + + {{#if row.model.message}} + {{#if row.model.driver}} + {{row.model.driver}} {{/if}} -
-
- - Detected - {{if a.item.detected "Yes" "No"}} + {{row.model.message}} + {{else}} + No message + {{/if}} + + + {{/t.body}} + {{/list-table}} +
+
+ +
+
+ Driver Status +
+
+ {{#list-accordion source=sortedDrivers key="name" as |a|}} + {{#a.head buttonLabel="details" isExpandable=a.item.detected}} +
+
+ {{a.item.name}} +
+
+ {{#if a.item.detected}} + + + {{if a.item.healthy "Healthy" "Unhealthy"}} - - - Last Updated - {{moment-from-now a.item.updateTime interval=1000}} - + {{/if}} +
+
+ + Detected + {{if a.item.detected "Yes" "No"}} + + + + Last Updated + {{moment-from-now a.item.updateTime interval=1000}} -
+
- {{/a.head}} - {{#a.body}} -

{{a.item.healthDescription}}

-
-
- {{capitalize a.item.name}} Attributes +
+ {{/a.head}} + {{#a.body}} +

{{a.item.healthDescription}}

+
+
+ {{capitalize a.item.name}} Attributes +
+ {{#if a.item.attributes.attributesStructured}} +
+ {{attributes-table + attributes=a.item.attributesShort + class="attributes-table"}}
- {{#if a.item.attributes.attributesStructured}} -
- {{attributes-table - attributes=a.item.attributesShort - class="attributes-table"}} -
- {{else}} -
-
-

No Driver Attributes

-
+ {{else}} +
+
+

No Driver Attributes

- {{/if}} -
- {{/a.body}} - {{/list-accordion}} -
+
+ {{/if}} +
+ {{/a.body}} + {{/list-accordion}}
+
-
-
- Attributes -
+
+
+ Attributes +
+
+ {{attributes-table + data-test-attributes + attributes=model.attributes.attributesStructured + class="attributes-table"}} +
+
+ Meta +
+ {{#if model.meta.attributesStructured}}
{{attributes-table - data-test-attributes - attributes=model.attributes.attributesStructured + data-test-meta + attributes=model.meta.attributesStructured class="attributes-table"}}
-
- Meta -
- {{#if model.meta.attributesStructured}} -
- {{attributes-table - data-test-meta - attributes=model.meta.attributesStructured - class="attributes-table"}} -
- {{else}} -
-
-

No Meta Attributes

-

This client is configured with no meta attributes.

-
+ {{else}} +
+
+

No Meta Attributes

+

This client is configured with no meta attributes.

- {{/if}} -
-
-{{/gutter-menu}} + + {{/if}} + +
diff --git a/ui/app/templates/clients/index.hbs b/ui/app/templates/clients/index.hbs index 2f7d0894f1d6..528dc6e91a47 100644 --- a/ui/app/templates/clients/index.hbs +++ b/ui/app/templates/clients/index.hbs @@ -1,60 +1,58 @@ -{{#gutter-menu class="page-body"}} -
- {{#if isForbidden}} - {{partial "partials/forbidden-message"}} +
+ {{#if isForbidden}} + {{partial "partials/forbidden-message"}} + {{else}} + {{#if nodes.length}} +
+
{{search-box searchTerm=(mut searchTerm) placeholder="Search clients..."}}
+
+ {{/if}} + {{#list-pagination + source=sortedNodes + size=pageSize + page=currentPage as |p|}} + {{#list-table + source=p.list + sortProperty=sortProperty + sortDescending=sortDescending + class="with-foot" as |t|}} + {{#t.head}} + + {{#t.sort-by prop="id"}}ID{{/t.sort-by}} + {{#t.sort-by class="is-200px is-truncatable" prop="name"}}Name{{/t.sort-by}} + {{#t.sort-by prop="status"}}Status{{/t.sort-by}} + {{#t.sort-by prop="isDraining"}}Drain{{/t.sort-by}} + {{#t.sort-by prop="schedulingEligibility"}}Eligibility{{/t.sort-by}} + Address + {{#t.sort-by prop="datacenter"}}Datacenter{{/t.sort-by}} + # Allocs + {{/t.head}} + {{#t.body as |row|}} + {{client-node-row data-test-client-node-row node=row.model onClick=(action "gotoNode" row.model)}} + {{/t.body}} + {{/list-table}} +
+ +
{{else}} - {{#if nodes.length}} -
-
{{search-box searchTerm=(mut searchTerm) placeholder="Search clients..."}}
-
- {{/if}} - {{#list-pagination - source=sortedNodes - size=pageSize - page=currentPage as |p|}} - {{#list-table - source=p.list - sortProperty=sortProperty - sortDescending=sortDescending - class="with-foot" as |t|}} - {{#t.head}} - - {{#t.sort-by prop="id"}}ID{{/t.sort-by}} - {{#t.sort-by class="is-200px is-truncatable" prop="name"}}Name{{/t.sort-by}} - {{#t.sort-by prop="status"}}Status{{/t.sort-by}} - {{#t.sort-by prop="isDraining"}}Drain{{/t.sort-by}} - {{#t.sort-by prop="schedulingEligibility"}}Eligibility{{/t.sort-by}} - Address - {{#t.sort-by prop="datacenter"}}Datacenter{{/t.sort-by}} - # Allocs - {{/t.head}} - {{#t.body as |row|}} - {{client-node-row data-test-client-node-row node=row.model onClick=(action "gotoNode" row.model)}} - {{/t.body}} - {{/list-table}} -
- -
- {{else}} -
- {{#if (eq nodes.length 0)}} -

No Clients

-

- The cluster currently has no client nodes. -

- {{else if searchTerm}} -

No Matches

-

No clients match the term {{searchTerm}}

- {{/if}} -
+
+ {{#if (eq nodes.length 0)}} +

No Clients

+

+ The cluster currently has no client nodes. +

+ {{else if searchTerm}} +

No Matches

+

No clients match the term {{searchTerm}}

+ {{/if}} +
{{/list-pagination}} - {{/if}} -
-{{/gutter-menu}} + {{/if}} +
diff --git a/ui/app/templates/clients/loading.hbs b/ui/app/templates/clients/loading.hbs index 3298bc9c0745..ae06c3078ee9 100644 --- a/ui/app/templates/clients/loading.hbs +++ b/ui/app/templates/clients/loading.hbs @@ -1,3 +1 @@ -{{#gutter-menu class="page-body"}} -
{{partial "partials/loading-spinner"}}
-{{/gutter-menu}} +
{{partial "partials/loading-spinner"}}
diff --git a/ui/app/templates/components/gutter-menu.hbs b/ui/app/templates/components/gutter-menu.hbs index 716a623fd8f6..90d9aa32e078 100644 --- a/ui/app/templates/components/gutter-menu.hbs +++ b/ui/app/templates/components/gutter-menu.hbs @@ -14,10 +14,7 @@ selected=system.activeNamespace searchField="name" searchEnabled=(gt sortedNamespaces.length 10) - onchange=(action (queue - (action (mut system.activeNamespace)) - (action onNamespaceChange) - )) + onchange=(action gotoJobsForNamespace) tagName="div" class="namespace-switcher" as |namespace|}} diff --git a/ui/app/templates/components/job-page/batch.hbs b/ui/app/templates/components/job-page/batch.hbs index d9f8a1fa6753..f11a778496c2 100644 --- a/ui/app/templates/components/job-page/batch.hbs +++ b/ui/app/templates/components/job-page/batch.hbs @@ -1,4 +1,4 @@ -{{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}} +{{#job-page/parts/body job=job}} {{job-page/parts/error errorMessage=errorMessage onDismiss=(action "clearErrorMessage")}} {{job-page/parts/title job=job handleError=(action "handleError")}} diff --git a/ui/app/templates/components/job-page/parameterized-child.hbs b/ui/app/templates/components/job-page/parameterized-child.hbs index f0fcad10e250..a5cbfb84646b 100644 --- a/ui/app/templates/components/job-page/parameterized-child.hbs +++ b/ui/app/templates/components/job-page/parameterized-child.hbs @@ -1,4 +1,4 @@ -{{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}} +{{#job-page/parts/body job=job}} {{job-page/parts/error errorMessage=errorMessage onDismiss=(action "clearErrorMessage")}} {{job-page/parts/title job=job title=job.trimmedName handleError=(action "handleError")}} diff --git a/ui/app/templates/components/job-page/parameterized.hbs b/ui/app/templates/components/job-page/parameterized.hbs index 8fca16924a41..b0b753c24bfb 100644 --- a/ui/app/templates/components/job-page/parameterized.hbs +++ b/ui/app/templates/components/job-page/parameterized.hbs @@ -1,4 +1,4 @@ -{{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}} +{{#job-page/parts/body job=job}} {{job-page/parts/error errorMessage=errorMessage onDismiss=(action "clearErrorMessage")}} {{#job-page/parts/title job=job handleError=(action "handleError")}} diff --git a/ui/app/templates/components/job-page/parts/body.hbs b/ui/app/templates/components/job-page/parts/body.hbs index 12c339ce42d6..4a2b8f89f499 100644 --- a/ui/app/templates/components/job-page/parts/body.hbs +++ b/ui/app/templates/components/job-page/parts/body.hbs @@ -1,6 +1,4 @@ -{{#gutter-menu class="page-body" onNamespaceChange=onNamespaceChange}} - {{partial "jobs/job/subnav"}} -
- {{yield}} -
-{{/gutter-menu}} +{{partial "jobs/job/subnav"}} +
+ {{yield}} +
diff --git a/ui/app/templates/components/job-page/periodic-child.hbs b/ui/app/templates/components/job-page/periodic-child.hbs index 398cb9327048..2accceb84c1e 100644 --- a/ui/app/templates/components/job-page/periodic-child.hbs +++ b/ui/app/templates/components/job-page/periodic-child.hbs @@ -1,4 +1,4 @@ -{{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}} +{{#job-page/parts/body job=job}} {{job-page/parts/error errorMessage=errorMessage onDismiss=(action "clearErrorMessage")}} {{job-page/parts/title job=job title=job.trimmedName handleError=(action "handleError")}} diff --git a/ui/app/templates/components/job-page/periodic.hbs b/ui/app/templates/components/job-page/periodic.hbs index bc70771dccb2..af9d6e989cbe 100644 --- a/ui/app/templates/components/job-page/periodic.hbs +++ b/ui/app/templates/components/job-page/periodic.hbs @@ -1,4 +1,4 @@ -{{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}} +{{#job-page/parts/body job=job}} {{job-page/parts/error errorMessage=errorMessage onDismiss=(action "clearErrorMessage")}} {{#job-page/parts/title job=job title=job.trimmedName handleError=(action "handleError")}} diff --git a/ui/app/templates/components/job-page/service.hbs b/ui/app/templates/components/job-page/service.hbs index 4d36cbf12b91..da7af5d5d48a 100644 --- a/ui/app/templates/components/job-page/service.hbs +++ b/ui/app/templates/components/job-page/service.hbs @@ -1,4 +1,4 @@ -{{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}} +{{#job-page/parts/body job=job}} {{job-page/parts/error errorMessage=errorMessage onDismiss=(action "clearErrorMessage")}} {{job-page/parts/title job=job handleError=(action "handleError")}} diff --git a/ui/app/templates/components/job-page/system.hbs b/ui/app/templates/components/job-page/system.hbs index d9f8a1fa6753..f11a778496c2 100644 --- a/ui/app/templates/components/job-page/system.hbs +++ b/ui/app/templates/components/job-page/system.hbs @@ -1,4 +1,4 @@ -{{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}} +{{#job-page/parts/body job=job}} {{job-page/parts/error errorMessage=errorMessage onDismiss=(action "clearErrorMessage")}} {{job-page/parts/title job=job handleError=(action "handleError")}} diff --git a/ui/app/templates/components/page-layout.hbs b/ui/app/templates/components/page-layout.hbs new file mode 100644 index 000000000000..27a5f31337af --- /dev/null +++ b/ui/app/templates/components/page-layout.hbs @@ -0,0 +1,6 @@ +{{#global-header class="page-header"}} + {{app-breadcrumbs}} +{{/global-header}} +{{#gutter-menu class="page-body"}} + {{yield}} +{{/gutter-menu}} diff --git a/ui/app/templates/jobs.hbs b/ui/app/templates/jobs.hbs index a766b9ff647d..87dfce6a7603 100644 --- a/ui/app/templates/jobs.hbs +++ b/ui/app/templates/jobs.hbs @@ -1,6 +1,3 @@ -
- {{#global-header class="page-header"}} - {{app-breadcrumbs}} - {{/global-header}} +{{#page-layout}} {{outlet}} -
+{{/page-layout}} diff --git a/ui/app/templates/jobs/index.hbs b/ui/app/templates/jobs/index.hbs index 7b409cadbba1..3985b9f00081 100644 --- a/ui/app/templates/jobs/index.hbs +++ b/ui/app/templates/jobs/index.hbs @@ -1,60 +1,58 @@ -{{#gutter-menu class="page-body" onNamespaceChange=(action "refresh")}} -
- {{#if isForbidden}} - {{partial "partials/forbidden-message"}} - {{else}} - {{#if filteredJobs.length}} -
-
{{search-box data-test-jobs-search searchTerm=(mut searchTerm) placeholder="Search jobs..."}}
-
- {{/if}} - {{#list-pagination - source=sortedJobs - size=pageSize - page=currentPage as |p|}} - {{#list-table - source=p.list - sortProperty=sortProperty - sortDescending=sortDescending - class="with-foot" as |t|}} - {{#t.head}} - {{#t.sort-by prop="name"}}Name{{/t.sort-by}} - {{#t.sort-by prop="status"}}Status{{/t.sort-by}} - {{#t.sort-by prop="type"}}Type{{/t.sort-by}} - {{#t.sort-by prop="priority"}}Priority{{/t.sort-by}} - Groups - Summary - {{/t.head}} - {{#t.body key="model.id" as |row|}} - {{job-row data-test-job-row job=row.model onClick=(action "gotoJob" row.model)}} - {{/t.body}} - {{/list-table}} -
- -
- {{else}} -
- {{#if (eq filteredJobs.length 0)}} -

No Jobs

-

- The cluster is currently empty. -

- {{else if searchTerm}} -

No Matches

-

No jobs match the term {{searchTerm}}

- {{/if}} -
- {{/list-pagination}} +
+ {{#if isForbidden}} + {{partial "partials/forbidden-message"}} + {{else}} + {{#if filteredJobs.length}} +
+
{{search-box data-test-jobs-search searchTerm=(mut searchTerm) placeholder="Search jobs..."}}
+
{{/if}} -
-{{/gutter-menu}} + {{#list-pagination + source=sortedJobs + size=pageSize + page=currentPage as |p|}} + {{#list-table + source=p.list + sortProperty=sortProperty + sortDescending=sortDescending + class="with-foot" as |t|}} + {{#t.head}} + {{#t.sort-by prop="name"}}Name{{/t.sort-by}} + {{#t.sort-by prop="status"}}Status{{/t.sort-by}} + {{#t.sort-by prop="type"}}Type{{/t.sort-by}} + {{#t.sort-by prop="priority"}}Priority{{/t.sort-by}} + Groups + Summary + {{/t.head}} + {{#t.body key="model.id" as |row|}} + {{job-row data-test-job-row job=row.model onClick=(action "gotoJob" row.model)}} + {{/t.body}} + {{/list-table}} +
+ +
+ {{else}} +
+ {{#if (eq filteredJobs.length 0)}} +

No Jobs

+

+ The cluster is currently empty. +

+ {{else if searchTerm}} +

No Matches

+

No jobs match the term {{searchTerm}}

+ {{/if}} +
+ {{/list-pagination}} + {{/if}} +
diff --git a/ui/app/templates/jobs/job/definition.hbs b/ui/app/templates/jobs/job/definition.hbs index 924d180002ea..2265ecdbe28c 100644 --- a/ui/app/templates/jobs/job/definition.hbs +++ b/ui/app/templates/jobs/job/definition.hbs @@ -1,10 +1,8 @@ -{{#gutter-menu class="page-body" onNamespaceChange=(action "gotoJobs")}} - {{partial "jobs/job/subnav"}} -
-
-
- {{json-viewer data-test-definition-view json=model.definition}} -
+{{partial "jobs/job/subnav"}} +
+
+
+ {{json-viewer data-test-definition-view json=model.definition}}
-
-{{/gutter-menu}} +
+
diff --git a/ui/app/templates/jobs/job/deployments.hbs b/ui/app/templates/jobs/job/deployments.hbs index 241a0d32d843..8bc4cb70790d 100644 --- a/ui/app/templates/jobs/job/deployments.hbs +++ b/ui/app/templates/jobs/job/deployments.hbs @@ -1,6 +1,4 @@ -{{#gutter-menu class="page-body" onNamespaceChange=(action "gotoJobs")}} - {{partial "jobs/job/subnav"}} -
- {{job-deployments-stream deployments=model.deployments}} -
-{{/gutter-menu}} +{{partial "jobs/job/subnav"}} +
+ {{job-deployments-stream deployments=model.deployments}} +
diff --git a/ui/app/templates/jobs/job/evaluations.hbs b/ui/app/templates/jobs/job/evaluations.hbs index 4f5a9be8ba91..212b6ea426d2 100644 --- a/ui/app/templates/jobs/job/evaluations.hbs +++ b/ui/app/templates/jobs/job/evaluations.hbs @@ -1,49 +1,46 @@ -{{#gutter-menu class="page-body" onNamespaceChange=(action "gotoJobs")}} - {{partial "jobs/job/subnav"}} -
-
-
- Evaluations -
-
- {{#if sortedEvaluations.length}} - {{#list-table - source=sortedEvaluations - sortProperty=sortProperty - sortDescending=sortDescending as |t|}} - {{#t.head}} - ID - {{#t.sort-by prop="priority"}}Priority{{/t.sort-by}} - {{#t.sort-by prop="triggeredBy"}}Triggered By{{/t.sort-by}} - {{#t.sort-by prop="status"}}Status{{/t.sort-by}} - {{#t.sort-by prop="hasPlacementFailures"}}Placement Failures{{/t.sort-by}} - {{/t.head}} - {{#t.body as |row|}} - - {{row.model.shortId}} - {{row.model.priority}} - {{row.model.triggeredBy}} - {{row.model.status}} - - {{#if (eq row.model.status "blocked")}} - N/A - In Progress - {{else if row.model.hasPlacementFailures}} - True - {{else}} - False - {{/if}} - - - {{/t.body}} - {{/list-table}} - {{else}} -
-

No Evaluations

-

This is most likely due to garbage collection.

-
- {{/if}} +{{partial "jobs/job/subnav"}} +
+
+
+ Evaluations
-
-
-{{/gutter-menu}} - +
+ {{#if sortedEvaluations.length}} + {{#list-table + source=sortedEvaluations + sortProperty=sortProperty + sortDescending=sortDescending as |t|}} + {{#t.head}} + ID + {{#t.sort-by prop="priority"}}Priority{{/t.sort-by}} + {{#t.sort-by prop="triggeredBy"}}Triggered By{{/t.sort-by}} + {{#t.sort-by prop="status"}}Status{{/t.sort-by}} + {{#t.sort-by prop="hasPlacementFailures"}}Placement Failures{{/t.sort-by}} + {{/t.head}} + {{#t.body as |row|}} + + {{row.model.shortId}} + {{row.model.priority}} + {{row.model.triggeredBy}} + {{row.model.status}} + + {{#if (eq row.model.status "blocked")}} + N/A - In Progress + {{else if row.model.hasPlacementFailures}} + True + {{else}} + False + {{/if}} + + + {{/t.body}} + {{/list-table}} + {{else}} +
+

No Evaluations

+

This is most likely due to garbage collection.

+
+ {{/if}} +
+
+
diff --git a/ui/app/templates/jobs/job/index.hbs b/ui/app/templates/jobs/job/index.hbs index 7d81851b2159..8cd4928e6e3e 100644 --- a/ui/app/templates/jobs/job/index.hbs +++ b/ui/app/templates/jobs/job/index.hbs @@ -3,6 +3,5 @@ sortProperty=sortProperty sortDescending=sortDescending currentPage=currentPage - onNamespaceChange=(action "gotoJobs") gotoJob=(action "gotoJob") gotoTaskGroup=(action "gotoTaskGroup")}} diff --git a/ui/app/templates/jobs/job/loading.hbs b/ui/app/templates/jobs/job/loading.hbs index a90321c319a1..911d511739dc 100644 --- a/ui/app/templates/jobs/job/loading.hbs +++ b/ui/app/templates/jobs/job/loading.hbs @@ -1,4 +1,2 @@ -{{#gutter-menu class="page-body"}} - {{partial "jobs/job/subnav"}} -
{{partial "partials/loading-spinner"}}
-{{/gutter-menu}} +{{partial "jobs/job/subnav"}} +
{{partial "partials/loading-spinner"}}
diff --git a/ui/app/templates/jobs/job/task-group.hbs b/ui/app/templates/jobs/job/task-group.hbs index b2b08c70162b..0bf01cb84ca9 100644 --- a/ui/app/templates/jobs/job/task-group.hbs +++ b/ui/app/templates/jobs/job/task-group.hbs @@ -1,109 +1,107 @@ -{{#gutter-menu class="page-body" onNamespaceChange=(action "gotoJobs")}} -
- -
-
-

- {{model.name}} -

+
+ +
+
+

+ {{model.name}} +

-
-
- Task Group Details +
+
+ Task Group Details - # Tasks {{model.tasks.length}} - Reserved CPU {{model.reservedCPU}} MHz - Reserved Memory {{model.reservedMemory}} MiB - Reserved Disk {{model.reservedEphemeralDisk}} MiB -
+ # Tasks {{model.tasks.length}} + Reserved CPU {{model.reservedCPU}} MHz + Reserved Memory {{model.reservedMemory}} MiB + Reserved Disk {{model.reservedEphemeralDisk}} MiB
+
-
-
-
Allocation Status {{allocations.length}}
-
-
- {{#allocation-status-bar allocationContainer=model.summary class="split-view" as |chart|}} -
    - {{#each chart.data as |datum index|}} -
  1. - - {{datum.value}} - - {{datum.label}} - -
  2. - {{/each}} -
- {{/allocation-status-bar}} -
+
+
+
Allocation Status {{allocations.length}}
+
+
+ {{#allocation-status-bar allocationContainer=model.summary class="split-view" as |chart|}} +
    + {{#each chart.data as |datum index|}} +
  1. + + {{datum.value}} + + {{datum.label}} + +
  2. + {{/each}} +
+ {{/allocation-status-bar}}
+
-
-
- Allocations - {{search-box - searchTerm=(mut searchTerm) - placeholder="Search allocations..." - class="is-inline pull-right" - inputClass="is-compact"}} -
-
- {{#list-pagination - source=sortedAllocations - size=pageSize - page=currentPage - class="allocations" as |p|}} - {{#list-table - source=p.list - sortProperty=sortProperty - sortDescending=sortDescending - class="with-foot" as |t|}} - {{#t.head}} - - {{#t.sort-by prop="shortId"}}ID{{/t.sort-by}} - {{#t.sort-by prop="modifyIndex" title="Modify Index"}}Modified{{/t.sort-by}} - {{#t.sort-by prop="name"}}Name{{/t.sort-by}} - {{#t.sort-by prop="statusIndex"}}Status{{/t.sort-by}} - {{#t.sort-by prop="jobVersion"}}Version{{/t.sort-by}} - {{#t.sort-by prop="node.shortId"}}Client{{/t.sort-by}} - CPU - Memory - {{/t.head}} - {{#t.body as |row|}} - {{allocation-row data-test-allocation=row.model.id allocation=row.model context="job" onClick=(action "gotoAllocation" row.model)}} - {{/t.body}} - {{/list-table}} -
- +
+
+ Allocations + {{search-box + searchTerm=(mut searchTerm) + placeholder="Search allocations..." + class="is-inline pull-right" + inputClass="is-compact"}} +
+
+ {{#list-pagination + source=sortedAllocations + size=pageSize + page=currentPage + class="allocations" as |p|}} + {{#list-table + source=p.list + sortProperty=sortProperty + sortDescending=sortDescending + class="with-foot" as |t|}} + {{#t.head}} + + {{#t.sort-by prop="shortId"}}ID{{/t.sort-by}} + {{#t.sort-by prop="modifyIndex" title="Modify Index"}}Modified{{/t.sort-by}} + {{#t.sort-by prop="name"}}Name{{/t.sort-by}} + {{#t.sort-by prop="statusIndex"}}Status{{/t.sort-by}} + {{#t.sort-by prop="jobVersion"}}Version{{/t.sort-by}} + {{#t.sort-by prop="node.shortId"}}Client{{/t.sort-by}} + CPU + Memory + {{/t.head}} + {{#t.body as |row|}} + {{allocation-row data-test-allocation=row.model.id allocation=row.model context="job" onClick=(action "gotoAllocation" row.model)}} + {{/t.body}} + {{/list-table}} +
+ +
+ {{else}} + {{#if allocations.length}} +
+
+

No Matches

+

No allocations match the term {{searchTerm}}

+
{{else}} - {{#if allocations.length}} -
-
-

No Matches

-

No allocations match the term {{searchTerm}}

-
-
- {{else}} -
-
-

No Allocations

-

No allocations have been placed.

-
+
+
+

No Allocations

+

No allocations have been placed.

- {{/if}} - {{/list-pagination}} -
+
+ {{/if}} + {{/list-pagination}}
-
-{{/gutter-menu}} + +
diff --git a/ui/app/templates/jobs/job/versions.hbs b/ui/app/templates/jobs/job/versions.hbs index 9b03e23ad364..9f2d59b10fa4 100644 --- a/ui/app/templates/jobs/job/versions.hbs +++ b/ui/app/templates/jobs/job/versions.hbs @@ -1,6 +1,4 @@ -{{#gutter-menu class="page-body" onNamespaceChange=(action "gotoJobs")}} - {{partial "jobs/job/subnav"}} -
- {{job-versions-stream versions=model.versions verbose=true}} -
-{{/gutter-menu}} +{{partial "jobs/job/subnav"}} +
+ {{job-versions-stream versions=model.versions verbose=true}} +
diff --git a/ui/app/templates/jobs/loading.hbs b/ui/app/templates/jobs/loading.hbs index 39002f28aa7f..ae06c3078ee9 100644 --- a/ui/app/templates/jobs/loading.hbs +++ b/ui/app/templates/jobs/loading.hbs @@ -1,6 +1 @@ -{{#global-header class="page-header"}} - {{app-breadcrumbs}} -{{/global-header}} -{{#gutter-menu class="page-body"}} -
{{partial "partials/loading-spinner"}}
-{{/gutter-menu}} +
{{partial "partials/loading-spinner"}}
diff --git a/ui/app/templates/loading.hbs b/ui/app/templates/loading.hbs index 206f1ebac97d..169d53ffba9a 100644 --- a/ui/app/templates/loading.hbs +++ b/ui/app/templates/loading.hbs @@ -1,8 +1,3 @@ -
- {{#global-header class="page-header"}} - {{app-breadcrumbs}} - {{/global-header}} - {{#gutter-menu class="page-body"}} -
{{partial "partials/loading-spinner"}}
- {{/gutter-menu}} -
+{{#page-layout}} +
{{partial "partials/loading-spinner"}}
+{{/page-layout}} diff --git a/ui/app/templates/servers.hbs b/ui/app/templates/servers.hbs index a2bdbc84db45..321325ca14e5 100644 --- a/ui/app/templates/servers.hbs +++ b/ui/app/templates/servers.hbs @@ -1,46 +1,41 @@ -
- {{#global-header class="page-header"}} - {{app-breadcrumbs}} - {{/global-header}} - {{#gutter-menu class="page-body"}} -
- {{#if isForbidden}} - {{partial "partials/forbidden-message"}} - {{else}} - {{#list-pagination - source=sortedAgents - size=pageSize - page=currentPage as |p|}} - {{#list-table - source=p.list - sortProperty=sortProperty - sortDescending=sortDescending - class="with-foot" as |t|}} - {{#t.head}} - {{#t.sort-by prop="name"}}Name{{/t.sort-by}} - {{#t.sort-by prop="status"}}Status{{/t.sort-by}} - {{#t.sort-by prop="isLeader"}}Leader{{/t.sort-by}} - {{#t.sort-by prop="address"}}Address{{/t.sort-by}} - {{#t.sort-by prop="serfPort"}}port{{/t.sort-by}} - {{#t.sort-by prop="datacenter"}}Datacenter{{/t.sort-by}} - {{/t.head}} - {{#t.body as |row|}} - {{server-agent-row data-test-server-agent-row agent=row.model}} - {{/t.body}} - {{/list-table}} -
- -
- {{/list-pagination}} - {{outlet}} - {{/if}} -
- {{/gutter-menu}} -
+{{#page-layout}} +
+ {{#if isForbidden}} + {{partial "partials/forbidden-message"}} + {{else}} + {{#list-pagination + source=sortedAgents + size=pageSize + page=currentPage as |p|}} + {{#list-table + source=p.list + sortProperty=sortProperty + sortDescending=sortDescending + class="with-foot" as |t|}} + {{#t.head}} + {{#t.sort-by prop="name"}}Name{{/t.sort-by}} + {{#t.sort-by prop="status"}}Status{{/t.sort-by}} + {{#t.sort-by prop="isLeader"}}Leader{{/t.sort-by}} + {{#t.sort-by prop="address"}}Address{{/t.sort-by}} + {{#t.sort-by prop="serfPort"}}port{{/t.sort-by}} + {{#t.sort-by prop="datacenter"}}Datacenter{{/t.sort-by}} + {{/t.head}} + {{#t.body as |row|}} + {{server-agent-row data-test-server-agent-row agent=row.model}} + {{/t.body}} + {{/list-table}} +
+ +
+ {{/list-pagination}} + {{outlet}} + {{/if}} +
+{{/page-layout}} diff --git a/ui/app/templates/settings.hbs b/ui/app/templates/settings.hbs index 2e4ddc936321..87dfce6a7603 100644 --- a/ui/app/templates/settings.hbs +++ b/ui/app/templates/settings.hbs @@ -1,8 +1,3 @@ -
- {{#global-header class="page-header"}} - {{app-breadcrumbs}} - {{/global-header}} - {{#gutter-menu class="page-body"}} - {{outlet}} - {{/gutter-menu}} -
+{{#page-layout}} + {{outlet}} +{{/page-layout}} diff --git a/ui/tests/integration/job-page/parts/body-test.js b/ui/tests/integration/job-page/parts/body-test.js index 042d1048b51e..6189dce66b29 100644 --- a/ui/tests/integration/job-page/parts/body-test.js +++ b/ui/tests/integration/job-page/parts/body-test.js @@ -1,11 +1,9 @@ import { run } from '@ember/runloop'; import { getOwner } from '@ember/application'; import { test, moduleForComponent } from 'ember-qunit'; -import { click, find, findAll } from 'ember-native-dom-helpers'; +import { find, findAll } from 'ember-native-dom-helpers'; import wait from 'ember-test-helpers/wait'; import hbs from 'htmlbars-inline-precompile'; -import sinon from 'sinon'; -import { clickTrigger } from 'ember-power-select/test-support/helpers'; import { startMirage } from 'nomad-ui/initializers/ember-cli-mirage'; moduleForComponent('job-page/parts/body', 'Integration | Component | job-page/parts/body', { @@ -23,10 +21,9 @@ moduleForComponent('job-page/parts/body', 'Integration | Component | job-page/pa test('includes a subnav for the job', function(assert) { this.set('job', {}); - this.set('onNamespaceChange', () => {}); this.render(hbs` - {{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}} + {{#job-page/parts/body job=job}}
Inner content
{{/job-page/parts/body}} `); @@ -48,10 +45,9 @@ test('the subnav includes the deployments link when the job is a service', funct }); this.set('job', job); - this.set('onNamespaceChange', () => {}); this.render(hbs` - {{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}} + {{#job-page/parts/body job=job}}
Inner content
{{/job-page/parts/body}} `); @@ -76,10 +72,9 @@ test('the subnav does not include the deployments link when the job is not a ser }); this.set('job', job); - this.set('onNamespaceChange', () => {}); this.render(hbs` - {{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}} + {{#job-page/parts/body job=job}}
Inner content
{{/job-page/parts/body}} `); @@ -94,44 +89,17 @@ test('the subnav does not include the deployments link when the job is not a ser test('body yields content to a section after the subnav', function(assert) { this.set('job', {}); - this.set('onNamespaceChange', () => {}); this.render(hbs` - {{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}} + {{#job-page/parts/body job=job}}
Inner content
{{/job-page/parts/body}} `); return wait().then(() => { - assert.ok( - find('[data-test-page-content] .section > .inner-content'), - 'Content is rendered in a section in a gutter menu' - ); assert.ok( find('[data-test-subnav="job"] + .section > .inner-content'), 'Content is rendered immediately after the subnav' ); }); }); - -test('onNamespaceChange action is called when the namespace changes in the nested gutter menu', function(assert) { - const namespaceSpy = sinon.spy(); - - this.set('job', {}); - this.set('onNamespaceChange', namespaceSpy); - - this.render(hbs` - {{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}} -
Inner content
- {{/job-page/parts/body}} - `); - - return wait().then(() => { - clickTrigger('[data-test-namespace-switcher]'); - click(findAll('.ember-power-select-option')[1]); - - return wait().then(() => { - assert.ok(namespaceSpy.calledOnce, 'Switching namespaces calls the onNamespaceChange action'); - }); - }); -});