summaryrefslogtreecommitdiff
path: root/src/views/SystemDescription/Info
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/SystemDescription/Info')
-rw-r--r--src/views/SystemDescription/Info/InventoryTableSystem.vue47
-rw-r--r--src/views/SystemDescription/Info/SystemDescription.vue138
2 files changed, 82 insertions, 103 deletions
diff --git a/src/views/SystemDescription/Info/InventoryTableSystem.vue b/src/views/SystemDescription/Info/InventoryTableSystem.vue
index f903a46b..eef0d871 100644
--- a/src/views/SystemDescription/Info/InventoryTableSystem.vue
+++ b/src/views/SystemDescription/Info/InventoryTableSystem.vue
@@ -4,7 +4,7 @@
responsive="md"
show-empty
class="bootstrap-rounded-table"
- :items="systems"
+ :items="items"
:fields="fields"
:empty-text="$t('global.table.emptyMessage')"
>
@@ -15,14 +15,14 @@
<script>
import BVToastMixin from '@/components/Mixins/BVToastMixin';
import PageSection from '@/components/Global/PageSection';
-
+import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin';
import TableRowExpandMixin, {
expandRowLabel,
} from '@/components/Mixins/TableRowExpandMixin';
export default {
components: { PageSection },
- mixins: [BVToastMixin, TableRowExpandMixin],
+ mixins: [BVToastMixin, TableRowExpandMixin, LoadingBarMixin],
data() {
return {
fields: [
@@ -45,35 +45,42 @@ export default {
},
],
expandRowLabel: expandRowLabel,
- systems: [
+ items: null,
+ };
+ },
+ computed: {
+ systems() {
+ return this.$store.getters['system/systems'];
+ },
+ },
+ watch: {
+ systems() {
+ this.items = [
{
- param: 'UUID сервера',
- value: '17583',
+ param: 'id',
+ value: this.id,
},
- { param: 'Модель', value: '1.214.248 beta' },
- { param: 'Производитель', value: 'Asus' },
- { param: 'Операционная система', value: 'Linux' },
- { param: 'Серийный номер', value: '741852963335' },
+ { param: 'Модель', value: this.systems[0].model },
+ { param: 'Производитель', value: '' },
+ { param: 'Операционная система', value: '' },
+ { param: 'Серийный номер', value: this.systems[0].serialNumber },
{
param: 'Свободное место на Flash-накопителе',
value: '1 024 000 Мб',
},
- ],
- };
+ ];
+ },
},
created() {
this.$store.dispatch('system/getSystem').finally(() => {
// Emit initial data fetch complete to parent component
this.$root.$emit('hardware-status-system-complete');
- this.isBusy = false;
});
- },
- methods: {
- toggleIdentifyLedSwitch(state) {
- this.$store
- .dispatch('system/changeIdentifyLedState', state)
- .catch(({ message }) => this.errorToast(message));
- },
+ this.startLoader();
+ const systemTablePromise = new Promise((resolve) => {
+ this.$root.$on('hardware-status-system-complete', () => resolve());
+ });
+ Promise.all([systemTablePromise]).finally(() => this.endLoader());
},
};
</script>
diff --git a/src/views/SystemDescription/Info/SystemDescription.vue b/src/views/SystemDescription/Info/SystemDescription.vue
index 558c70ef..b5cde965 100644
--- a/src/views/SystemDescription/Info/SystemDescription.vue
+++ b/src/views/SystemDescription/Info/SystemDescription.vue
@@ -6,87 +6,61 @@
<page-title />
<!-- System table -->
<div class="main-container">
- <div class="page-collapse-decorator">
- <b-button
- v-b-toggle.toggle-collapse_1
- variant="link"
- class="collapse-button semi-bold-16px"
- >
- {{ $t('SystemDescription.title.ServerConfig') }}
- <component :is="iconChevronUp" class="icon-expand" />
- </b-button>
- <b-collapse id="toggle-collapse_1" class="nav-item__nav">
- <table-system ref="system" />
- <!-- Notes Administration -->
- <section class="notes-section">
- <div class="semi-bold-12px textarea-description">
- <span>{{ $t('SystemDescription.title.Notes') }}</span>
- </div>
- <div class="textarea-container">
- <div class="buttons-container">
- <button class="notes-button">
- <img
- src="@/assets/images/textarea-buttons/button-icon-bold.svg"
- />
- </button>
- <button class="notes-button">
- <img
- src="@/assets/images/textarea-buttons/button-icon-cursive.svg"
- />
- </button>
- <button class="notes-button">
- <img
- src="@/assets/images/textarea-buttons/button-icon-underline.svg"
- />
- </button>
- <button class="notes-button">
- <img
- src="@/assets/images/textarea-buttons/button-icon-crossline.svg"
- />
- </button>
- <button class="notes-button">
- <img
- src="@/assets/images/textarea-buttons/button-icon-link.svg"
- />
- </button>
- <div class="line"></div>
- <button class="notes-button">
- <img
- src="@/assets/images/textarea-buttons/button-icon-list.svg"
- />
- </button>
- <button class="notes-button">
- <img
- src="@/assets/images/textarea-buttons/button-icon-number-list.svg"
- />
- </button>
- </div>
- <textarea
- id=""
- name="area"
- placeholder="Тут будет текст который ввел администратор и работать в качестве блокнота"
- cols="30"
- rows="10"
- class="notes-textarea"
- ></textarea>
- </div>
- </section>
- </b-collapse>
- </div>
- <!-- Control -->
- <div class="page-collapse-decorator">
- <b-button
- v-b-toggle.toggle-collapse_2
- variant="link"
- class="collapse-button semi-bold-16px"
- >
- {{ $t('SystemDescription.title.Control') }}
- <component :is="iconChevronUp" class="icon-expand" />
- </b-button>
- <b-collapse id="toggle-collapse_2" class="nav-item__nav">
- <control-system />
- </b-collapse>
- </div>
+ <table-system />
+ <!-- Notes Administration -->
+ <section class="notes-section">
+ <div class="semi-bold-12px textarea-description">
+ <span>{{ $t('SystemDescription.title.Notes') }}</span>
+ </div>
+ <div class="textarea-container">
+ <div class="buttons-container">
+ <button class="notes-button">
+ <img
+ src="@/assets/images/textarea-buttons/button-icon-bold.svg"
+ />
+ </button>
+ <button class="notes-button">
+ <img
+ src="@/assets/images/textarea-buttons/button-icon-cursive.svg"
+ />
+ </button>
+ <button class="notes-button">
+ <img
+ src="@/assets/images/textarea-buttons/button-icon-underline.svg"
+ />
+ </button>
+ <button class="notes-button">
+ <img
+ src="@/assets/images/textarea-buttons/button-icon-crossline.svg"
+ />
+ </button>
+ <button class="notes-button">
+ <img
+ src="@/assets/images/textarea-buttons/button-icon-link.svg"
+ />
+ </button>
+ <div class="line"></div>
+ <button class="notes-button">
+ <img
+ src="@/assets/images/textarea-buttons/button-icon-list.svg"
+ />
+ </button>
+ <button class="notes-button">
+ <img
+ src="@/assets/images/textarea-buttons/button-icon-number-list.svg"
+ />
+ </button>
+ </div>
+ <textarea
+ id=""
+ name="area"
+ placeholder="Тут будет текст который ввел администратор и работать в качестве блокнота"
+ cols="30"
+ rows="10"
+ class="notes-textarea"
+ ></textarea>
+ </div>
+ </section>
</div>
</b-container>
</template>
@@ -94,13 +68,11 @@
<script>
import PageTitle from '@/components/Global/PageTitle';
import TableSystem from './InventoryTableSystem';
-import ControlSystem from '@/components/Global/SilaComponents/InventoryControlSystem';
import iconChevronUp from '@carbon/icons-vue/es/chevron--up/16';
export default {
components: {
PageTitle,
- ControlSystem,
TableSystem,
},
data() {