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.vue86
1 files changed, 86 insertions, 0 deletions
diff --git a/src/views/SystemDescription/Info/InventoryTableSystem.vue b/src/views/SystemDescription/Info/InventoryTableSystem.vue
new file mode 100644
index 00000000..b022fd6d
--- /dev/null
+++ b/src/views/SystemDescription/Info/InventoryTableSystem.vue
@@ -0,0 +1,86 @@
+<template>
+ <page-section class="bootstrap-table__section">
+ <b-table
+ responsive="md"
+ show-empty
+ class="bootstrap-rounded-table"
+ :items="systems"
+ :fields="fields"
+ :empty-text="$t('global.table.emptyMessage')"
+ :busy="isBusy"
+ >
+ </b-table>
+ </page-section>
+</template>
+
+<script>
+import BVToastMixin from '@/components/Mixins/BVToastMixin';
+import PageSection from '@/components/Global/PageSection';
+
+import TableRowExpandMixin, {
+ expandRowLabel,
+} from '@/components/Mixins/TableRowExpandMixin';
+
+export default {
+ components: { PageSection },
+ mixins: [BVToastMixin, TableRowExpandMixin],
+ data() {
+ return {
+ isBusy: true,
+ fields: [
+ {
+ key: 'param',
+ label: 'Параметр',
+ formatter: this.dataFormatter,
+ thClass: 'semi-bold-12px__caps bootstrap-rounded-table__head_bg',
+ class: `bootstrap-rounded-table__column-first
+ bootstrap-rounded-table__column-first___system-table`,
+ tdClass: 'regular-12px bootstrap-rounded-table__td',
+ },
+ {
+ key: 'value',
+ label: 'Значение',
+ formatter: this.dataFormatter,
+ thClass: 'semi-bold-12px__caps bootstrap-rounded-table__head_bg',
+ class: 'bootstrap-rounded-table__column-last',
+ tdClass: 'regular-12px bootstrap-rounded-table__td',
+ },
+ ],
+ expandRowLabel: expandRowLabel,
+ systems: [
+ {
+ param: 'UUID сервера',
+ value: '17583',
+ },
+ { param: 'Модель', value: '1.214.248 beta' },
+ { param: 'Производитель', value: 'Asus' },
+ { param: 'Операционная система', value: 'Linux' },
+ { param: 'Серийный номер', value: '741852963335' },
+ {
+ 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));
+ },
+ },
+};
+</script>
+<style lang="scss">
+.bootstrap-rounded-table__column-first___system-table {
+ width: 50%;
+}
+</style>