blob: 9960f373d2c449fc82dfd8496d897ed448ee5546 [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';
Dixsie Wolmers9d40e302020-02-13 13:29:40 -060040
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060041export default {
Derick Montaguee2fd1562019-12-20 13:26:53 -060042 name: 'Overview',
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060043 components: {
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050044 OverviewDumps,
Dixsie Wolmersf65ee342020-01-22 19:47:56 -060045 OverviewEvents,
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050046 OverviewFirmware,
47 OverviewInventory,
Dixsie Wolmers9d40e302020-02-13 13:29:40 -060048 OverviewNetwork,
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050049 OverviewPower,
50 OverviewQuickLinks,
51 OverviewServer,
Derick Montague602e98a2020-10-21 16:20:00 -050052 PageSection,
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050053 PageTitle,
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060054 },
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -070055 mixins: [LoadingBarMixin],
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050056 data() {
57 return {
58 showDumps: process.env.VUE_APP_ENV_NAME === 'ibm',
59 };
Yoshie Muranaka98bb24e2020-10-06 10:00:19 -070060 },
Derick Montague09e45cd2020-01-23 15:45:57 -060061 created() {
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -070062 this.startLoader();
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050063 const dumpsPromise = new Promise((resolve) => {
64 this.$root.$on('overview-dumps-complete', () => resolve());
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -070065 });
Derick Montague602e98a2020-10-21 16:20:00 -050066 const eventsPromise = new Promise((resolve) => {
Sukanya Pandeyedb8a772020-10-29 11:33:42 +053067 this.$root.$on('overview-events-complete', () => resolve());
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -070068 });
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050069 const firmwarePromise = new Promise((resolve) => {
70 this.$root.$on('overview-firmware-complete', () => resolve());
71 });
72 const inventoryPromise = new Promise((resolve) => {
73 this.$root.$on('overview-inventory-complete', () => resolve());
74 });
75 const networkPromise = new Promise((resolve) => {
76 this.$root.$on('overview-network-complete', () => resolve());
77 });
78 const powerPromise = new Promise((resolve) => {
79 this.$root.$on('overview-power-complete', () => resolve());
80 });
81 const quicklinksPromise = new Promise((resolve) => {
82 this.$root.$on('overview-quicklinks-complete', () => resolve());
83 });
84 const serverPromise = new Promise((resolve) => {
85 this.$root.$on('overview-server-complete', () => resolve());
86 });
87
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -070088 Promise.all([
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050089 dumpsPromise,
Derick Montague602e98a2020-10-21 16:20:00 -050090 eventsPromise,
Dixsie Wolmers6a192d52021-09-02 15:26:58 -050091 firmwarePromise,
92 inventoryPromise,
93 networkPromise,
94 powerPromise,
95 quicklinksPromise,
96 serverPromise,
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -070097 ]).finally(() => this.endLoader());
Derick Montague09e45cd2020-01-23 15:45:57 -060098 },
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060099};
100</script>