Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 1 | <template> |
Yoshie Muranaka | 3111b6f | 2020-04-21 19:48:38 -0700 | [diff] [blame] | 2 | <b-container fluid="xl"> |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 3 | <page-title /> |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 4 | <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 Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 24 | </page-section> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 25 | </b-container> |
| 26 | </template> |
| 27 | |
| 28 | <script> |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 29 | import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 30 | import OverviewDumps from './OverviewDumps.vue'; |
| 31 | import OverviewEvents from './OverviewEvents.vue'; |
| 32 | import OverviewFirmware from './OverviewFirmware.vue'; |
| 33 | import OverviewInventory from './OverviewInventory.vue'; |
| 34 | import OverviewNetwork from './OverviewNetwork'; |
| 35 | import OverviewPower from './OverviewPower'; |
| 36 | import OverviewQuickLinks from './OverviewQuickLinks'; |
| 37 | import OverviewServer from './OverviewServer'; |
| 38 | import PageSection from '@/components/Global/PageSection'; |
| 39 | import PageTitle from '@/components/Global/PageTitle'; |
Ed Tanous | 883a0d5 | 2024-03-23 14:56:34 -0700 | [diff] [blame^] | 40 | import { useI18n } from 'vue-i18n'; |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 41 | |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 42 | export default { |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 43 | name: 'Overview', |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 44 | components: { |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 45 | OverviewDumps, |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 46 | OverviewEvents, |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 47 | OverviewFirmware, |
| 48 | OverviewInventory, |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 49 | OverviewNetwork, |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 50 | OverviewPower, |
| 51 | OverviewQuickLinks, |
| 52 | OverviewServer, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 53 | PageSection, |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 54 | PageTitle, |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 55 | }, |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 56 | mixins: [LoadingBarMixin], |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 57 | data() { |
| 58 | return { |
Ed Tanous | 883a0d5 | 2024-03-23 14:56:34 -0700 | [diff] [blame^] | 59 | $t: useI18n().t, |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 60 | showDumps: process.env.VUE_APP_ENV_NAME === 'ibm', |
| 61 | }; |
Yoshie Muranaka | 98bb24e | 2020-10-06 10:00:19 -0700 | [diff] [blame] | 62 | }, |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 63 | created() { |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 64 | this.startLoader(); |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 65 | const dumpsPromise = new Promise((resolve) => { |
| 66 | this.$root.$on('overview-dumps-complete', () => resolve()); |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 67 | }); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 68 | const eventsPromise = new Promise((resolve) => { |
Sukanya Pandey | edb8a77 | 2020-10-29 11:33:42 +0530 | [diff] [blame] | 69 | this.$root.$on('overview-events-complete', () => resolve()); |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 70 | }); |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 71 | 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 | |
Konstantin | da53c06 | 2023-02-06 17:25:19 +0300 | [diff] [blame] | 90 | const promises = [ |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 91 | eventsPromise, |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 92 | firmwarePromise, |
| 93 | inventoryPromise, |
| 94 | networkPromise, |
| 95 | powerPromise, |
| 96 | quicklinksPromise, |
| 97 | serverPromise, |
Konstantin | da53c06 | 2023-02-06 17:25:19 +0300 | [diff] [blame] | 98 | ]; |
| 99 | if (this.showDumps) promises.push(dumpsPromise); |
| 100 | Promise.all(promises).finally(() => this.endLoader()); |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 101 | }, |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 102 | }; |
| 103 | </script> |