diff --git a/ui/app/components/job-page/parts/summary.js b/ui/app/components/job-page/parts/summary.js index 5f69e09ca..ba6211659 100644 --- a/ui/app/components/job-page/parts/summary.js +++ b/ui/app/components/job-page/parts/summary.js @@ -1,13 +1,17 @@ import Component from '@ember/component'; -import { inject as service } from '@ember/service'; -import { alias } from '@ember/object/computed'; +import { computed } from '@ember/object'; export default Component.extend({ - store: service(), - job: null, - - summary: alias('job.summary'), - classNames: ['boxed-section'], + + isExpanded: computed(function() { + const storageValue = window.localStorage.nomadExpandJobSummary; + return storageValue != null ? JSON.parse(storageValue) : true; + }), + + persist(item, isOpen) { + window.localStorage.nomadExpandJobSummary = isOpen; + this.notifyPropertyChange('isExpanded'); + }, }); diff --git a/ui/app/styles/components/accordion.scss b/ui/app/styles/components/accordion.scss index 17ca8bcc5..3aaa057e5 100644 --- a/ui/app/styles/components/accordion.scss +++ b/ui/app/styles/components/accordion.scss @@ -32,6 +32,7 @@ .accordion-head-content { width: 100%; + margin-right: 1.5em; } .accordion-toggle { diff --git a/ui/app/templates/components/job-page/parts/summary.hbs b/ui/app/templates/components/job-page/parts/summary.hbs index 8fd9679c0..38e9a1b68 100644 --- a/ui/app/templates/components/job-page/parts/summary.hbs +++ b/ui/app/templates/components/job-page/parts/summary.hbs @@ -1,16 +1,41 @@ -