summaryrefslogtreecommitdiff
path: root/src/views/SystemDescription/Info/InventoryTableSystem.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/SystemDescription/Info/InventoryTableSystem.vue')
-rw-r--r--src/views/SystemDescription/Info/InventoryTableSystem.vue47
1 files changed, 27 insertions, 20 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>