blob: fb203381eace9934511fa8ff9ab14f8d279a2d21 [file] [log] [blame]
Yoshie Muranaka56ee7692020-05-28 13:28:29 -07001<template>
2 <b-container fluid="xl">
3 <page-title />
4
5 <!-- System table -->
6 <table-system />
Yoshie Muranaka5918b482020-06-08 08:18:23 -07007
Yoshie Muranaka54c6bfc2020-06-12 08:29:42 -07008 <!-- BMC manager table -->
9 <table-bmc-manager />
10
Yoshie Muranaka09e8b5d2020-06-08 07:36:59 -070011 <!-- Chassis table -->
12 <table-chassis />
13
Yoshie Muranakae24b17d2020-06-08 11:03:11 -070014 <!-- DIMM slot table -->
15 <table-dimm-slot />
16
Yoshie Muranakab89a53c2020-06-15 13:25:46 -070017 <!-- Fans table -->
18 <table-fans />
19
Yoshie Muranaka5918b482020-06-08 08:18:23 -070020 <!-- Power supplies table -->
21 <table-power-supplies />
SurenNewaredc3fa2e2020-08-04 20:45:25 +053022
23 <!-- Processors table -->
24 <table-processors />
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070025 </b-container>
26</template>
27
28<script>
29import PageTitle from '@/components/Global/PageTitle';
30import TableSystem from './HardwareStatusTableStystem';
Yoshie Muranaka5918b482020-06-08 08:18:23 -070031import TablePowerSupplies from './HardwareStatusTablePowerSupplies';
Yoshie Muranakae24b17d2020-06-08 11:03:11 -070032import TableDimmSlot from './HardwareStatusTableDimmSlot';
Yoshie Muranakab89a53c2020-06-15 13:25:46 -070033import TableFans from './HardwareStatusTableFans';
Yoshie Muranaka54c6bfc2020-06-12 08:29:42 -070034import TableBmcManager from './HardwareStatusTableBmcManager';
Yoshie Muranaka09e8b5d2020-06-08 07:36:59 -070035import TableChassis from './HardwareStatusTableChassis';
SurenNewaredc3fa2e2020-08-04 20:45:25 +053036import TableProcessors from './HardwareStatusTableProcessors';
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070037import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin';
38
39export default {
Yoshie Muranakab89a53c2020-06-15 13:25:46 -070040 components: {
41 PageTitle,
42 TableDimmSlot,
43 TablePowerSupplies,
44 TableSystem,
Yoshie Muranaka09e8b5d2020-06-08 07:36:59 -070045 TableFans,
Yoshie Muranaka54c6bfc2020-06-12 08:29:42 -070046 TableBmcManager,
SurenNewaredc3fa2e2020-08-04 20:45:25 +053047 TableChassis,
48 TableProcessors
Yoshie Muranakab89a53c2020-06-15 13:25:46 -070049 },
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070050 mixins: [LoadingBarMixin],
51 created() {
52 this.startLoader();
53 const systemTablePromise = new Promise(resolve => {
54 this.$root.$on('hardwareStatus::system::complete', () => resolve());
55 });
Yoshie Muranaka54c6bfc2020-06-12 08:29:42 -070056 const bmcManagerTablePromise = new Promise(resolve => {
57 this.$root.$on('hardwareStatus::bmcManager::complete', () => resolve());
58 });
Yoshie Muranaka09e8b5d2020-06-08 07:36:59 -070059 const chassisTablePromise = new Promise(resolve => {
60 this.$root.$on('hardwareStatus::chassis::complete', () => resolve());
61 });
Yoshie Muranakae24b17d2020-06-08 11:03:11 -070062 const dimmSlotTablePromise = new Promise(resolve => {
63 this.$root.$on('hardwareStatus::dimmSlot::complete', () => resolve());
64 });
Yoshie Muranakab89a53c2020-06-15 13:25:46 -070065 const fansTablePromise = new Promise(resolve => {
66 this.$root.$on('hardwareStatus::fans::complete', () => resolve());
67 });
Yoshie Muranaka5918b482020-06-08 08:18:23 -070068 const powerSuppliesTablePromise = new Promise(resolve => {
69 this.$root.$on('hardwareStatus::powerSupplies::complete', () =>
70 resolve()
71 );
72 });
SurenNewaredc3fa2e2020-08-04 20:45:25 +053073 const processorsTablePromise = new Promise(resolve => {
74 this.$root.$on('hardwareStatus::processors::complete', () => resolve());
75 });
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070076 // Combine all child component Promises to indicate
77 // when page data load complete
Yoshie Muranakae24b17d2020-06-08 11:03:11 -070078 Promise.all([
79 systemTablePromise,
Yoshie Muranaka54c6bfc2020-06-12 08:29:42 -070080 bmcManagerTablePromise,
Yoshie Muranaka09e8b5d2020-06-08 07:36:59 -070081 chassisTablePromise,
Yoshie Muranakae24b17d2020-06-08 11:03:11 -070082 dimmSlotTablePromise,
Yoshie Muranakab89a53c2020-06-15 13:25:46 -070083 fansTablePromise,
SurenNewaredc3fa2e2020-08-04 20:45:25 +053084 powerSuppliesTablePromise,
85 processorsTablePromise
Yoshie Muranakae24b17d2020-06-08 11:03:11 -070086 ]).finally(() => this.endLoader());
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070087 },
88 beforeRouteLeave(to, from, next) {
89 // Hide loader if user navigates away from page
90 // before requests complete
91 this.hideLoader();
92 next();
93 }
94};
95</script>