blob: 2bf4205fa3fa185b6289433400461baf9ba26d4d [file] [log] [blame]
Dixsie Wolmers97d86b32019-12-02 05:07:57 -06001<template>
Yoshie Muranaka3111b6f2020-04-21 19:48:38 -07002 <b-container fluid="xl">
Derick Montague09e45cd2020-01-23 15:45:57 -06003 <page-title />
Dixsie Wolmers6a192d52021-09-02 15:26:58 -05004 <overview-quick-links class="mb-4" />
5 <page-section
6 :section-title="$t('pageOverview.systemInformation')"
7 class="mb-1"
8 >
9 <b-card-group deck>
10 <overview-server />
11 <overview-firmware />
12 </b-card-group>
13 <b-card-group deck>
14 <overview-network />
15 <overview-power />
16 </b-card-group>
17 </page-section>
18 <page-section :section-title="$t('pageOverview.statusInformation')">
19 <b-card-group deck>
20 <overview-events />
21 <overview-inventory />
22 <overview-dumps v-if="showDumps" />
23 </b-card-group>
Derick Montague09e45cd2020-01-23 15:45:57 -060024 </page-section>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060025 </b-container>
26</template>
27
28<script>
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -070029import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin';
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050030import OverviewDumps from './OverviewDumps.vue';
31import OverviewEvents from './OverviewEvents.vue';
32import OverviewFirmware from './OverviewFirmware.vue';
33import OverviewInventory from './OverviewInventory.vue';
34import OverviewNetwork from './OverviewNetwork';
35import OverviewPower from './OverviewPower';
36import OverviewQuickLinks from './OverviewQuickLinks';
37import OverviewServer from './OverviewServer';
38import PageSection from '@/components/Global/PageSection';
39import PageTitle from '@/components/Global/PageTitle';
Ed Tanous883a0d52024-03-23 14:56:34 -070040import { useI18n } from 'vue-i18n';
Dixsie Wolmers9d40e302020-02-13 13:29:40 -060041
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060042export default {
Derick Montaguee2fd1562019-12-20 13:26:53 -060043 name: 'Overview',
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060044 components: {
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050045 OverviewDumps,
Dixsie Wolmersf65ee342020-01-22 19:47:56 -060046 OverviewEvents,
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050047 OverviewFirmware,
48 OverviewInventory,
Dixsie Wolmers9d40e302020-02-13 13:29:40 -060049 OverviewNetwork,
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050050 OverviewPower,
51 OverviewQuickLinks,
52 OverviewServer,
Derick Montague602e98a2020-10-21 16:20:00 -050053 PageSection,
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050054 PageTitle,
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060055 },
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -070056 mixins: [LoadingBarMixin],
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050057 data() {
58 return {
Ed Tanous883a0d52024-03-23 14:56:34 -070059 $t: useI18n().t,
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050060 showDumps: process.env.VUE_APP_ENV_NAME === 'ibm',
61 };
Yoshie Muranaka98bb24e2020-10-06 10:00:19 -070062 },
Derick Montague09e45cd2020-01-23 15:45:57 -060063 created() {
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -070064 this.startLoader();
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050065 const dumpsPromise = new Promise((resolve) => {
66 this.$root.$on('overview-dumps-complete', () => resolve());
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -070067 });
Derick Montague602e98a2020-10-21 16:20:00 -050068 const eventsPromise = new Promise((resolve) => {
Sukanya Pandeyedb8a772020-10-29 11:33:42 +053069 this.$root.$on('overview-events-complete', () => resolve());
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -070070 });
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050071 const firmwarePromise = new Promise((resolve) => {
72 this.$root.$on('overview-firmware-complete', () => resolve());
73 });
74 const inventoryPromise = new Promise((resolve) => {
75 this.$root.$on('overview-inventory-complete', () => resolve());
76 });
77 const networkPromise = new Promise((resolve) => {
78 this.$root.$on('overview-network-complete', () => resolve());
79 });
80 const powerPromise = new Promise((resolve) => {
81 this.$root.$on('overview-power-complete', () => resolve());
82 });
83 const quicklinksPromise = new Promise((resolve) => {
84 this.$root.$on('overview-quicklinks-complete', () => resolve());
85 });
86 const serverPromise = new Promise((resolve) => {
87 this.$root.$on('overview-server-complete', () => resolve());
88 });
89
Konstantinda53c062023-02-06 17:25:19 +030090 const promises = [
Derick Montague602e98a2020-10-21 16:20:00 -050091 eventsPromise,
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050092 firmwarePromise,
93 inventoryPromise,
94 networkPromise,
95 powerPromise,
96 quicklinksPromise,
97 serverPromise,
Konstantinda53c062023-02-06 17:25:19 +030098 ];
99 if (this.showDumps) promises.push(dumpsPromise);
100 Promise.all(promises).finally(() => this.endLoader());
Derick Montague09e45cd2020-01-23 15:45:57 -0600101 },
Dixsie Wolmers97d86b32019-12-02 05:07:57 -0600102};
103</script>