1<template>
2  <overview-card
3    :title="$t('pageOverview.serverInformation')"
4    :to="`/hardware-status/inventory`"
5  >
6    <b-row class="mt-3">
7      <b-col sm="6">
8        <dl>
9          <dt>{{ $t('pageOverview.model') }}</dt>
10          <dd>{{ dataFormatter(serverModel) }}</dd>
11          <dt>{{ $t('pageOverview.serialNumber') }}</dt>
12          <dd>{{ dataFormatter(serverSerialNumber) }}</dd>
13        </dl>
14      </b-col>
15      <b-col sm="6">
16        <dl>
17          <dt>{{ $t('pageOverview.serverManufacturer') }}</dt>
18          <dd>{{ dataFormatter(serverManufacturer) }}</dd>
19        </dl>
20      </b-col>
21    </b-row>
22  </overview-card>
23</template>
24
25<script>
26import OverviewCard from './OverviewCard';
27import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin';
28import { mapState } from 'vuex';
29
30export default {
31  name: 'Server',
32  components: {
33    OverviewCard,
34  },
35  mixins: [DataFormatterMixin],
36  computed: {
37    ...mapState({
38      server: (state) => state.system.systems[0],
39      serverModel() {
40        return this.server?.model;
41      },
42      serverSerialNumber() {
43        return this.server?.serialNumber;
44      },
45      serverManufacturer() {
46        return this.server?.manufacturer;
47      },
48    }),
49  },
50  created() {
51    this.$store.dispatch('system/getSystem').finally(() => {
52      this.$root.$emit('overview-server-complete');
53    });
54  },
55};
56</script>
57