Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 1 | <template> |
| 2 | <b-container fluid="xl"> |
| 3 | <page-title /> |
| 4 | |
| 5 | <!-- System table --> |
| 6 | <table-system /> |
Yoshie Muranaka | 5918b48 | 2020-06-08 08:18:23 -0700 | [diff] [blame] | 7 | |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 8 | <!-- BMC manager table --> |
| 9 | <table-bmc-manager /> |
| 10 | |
Yoshie Muranaka | 09e8b5d | 2020-06-08 07:36:59 -0700 | [diff] [blame] | 11 | <!-- Chassis table --> |
| 12 | <table-chassis /> |
| 13 | |
Yoshie Muranaka | e24b17d | 2020-06-08 11:03:11 -0700 | [diff] [blame] | 14 | <!-- DIMM slot table --> |
| 15 | <table-dimm-slot /> |
| 16 | |
Yoshie Muranaka | b89a53c | 2020-06-15 13:25:46 -0700 | [diff] [blame] | 17 | <!-- Fans table --> |
| 18 | <table-fans /> |
| 19 | |
Yoshie Muranaka | 5918b48 | 2020-06-08 08:18:23 -0700 | [diff] [blame] | 20 | <!-- Power supplies table --> |
| 21 | <table-power-supplies /> |
SurenNeware | dc3fa2e | 2020-08-04 20:45:25 +0530 | [diff] [blame] | 22 | |
| 23 | <!-- Processors table --> |
| 24 | <table-processors /> |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 25 | </b-container> |
| 26 | </template> |
| 27 | |
| 28 | <script> |
| 29 | import PageTitle from '@/components/Global/PageTitle'; |
| 30 | import TableSystem from './HardwareStatusTableStystem'; |
Yoshie Muranaka | 5918b48 | 2020-06-08 08:18:23 -0700 | [diff] [blame] | 31 | import TablePowerSupplies from './HardwareStatusTablePowerSupplies'; |
Yoshie Muranaka | e24b17d | 2020-06-08 11:03:11 -0700 | [diff] [blame] | 32 | import TableDimmSlot from './HardwareStatusTableDimmSlot'; |
Yoshie Muranaka | b89a53c | 2020-06-15 13:25:46 -0700 | [diff] [blame] | 33 | import TableFans from './HardwareStatusTableFans'; |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 34 | import TableBmcManager from './HardwareStatusTableBmcManager'; |
Yoshie Muranaka | 09e8b5d | 2020-06-08 07:36:59 -0700 | [diff] [blame] | 35 | import TableChassis from './HardwareStatusTableChassis'; |
SurenNeware | dc3fa2e | 2020-08-04 20:45:25 +0530 | [diff] [blame] | 36 | import TableProcessors from './HardwareStatusTableProcessors'; |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 37 | import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; |
| 38 | |
| 39 | export default { |
Yoshie Muranaka | b89a53c | 2020-06-15 13:25:46 -0700 | [diff] [blame] | 40 | components: { |
| 41 | PageTitle, |
| 42 | TableDimmSlot, |
| 43 | TablePowerSupplies, |
| 44 | TableSystem, |
Yoshie Muranaka | 09e8b5d | 2020-06-08 07:36:59 -0700 | [diff] [blame] | 45 | TableFans, |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 46 | TableBmcManager, |
SurenNeware | dc3fa2e | 2020-08-04 20:45:25 +0530 | [diff] [blame] | 47 | TableChassis, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 48 | TableProcessors, |
Yoshie Muranaka | b89a53c | 2020-06-15 13:25:46 -0700 | [diff] [blame] | 49 | }, |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 50 | mixins: [LoadingBarMixin], |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 51 | beforeRouteLeave(to, from, next) { |
| 52 | // Hide loader if user navigates away from page |
| 53 | // before requests complete |
| 54 | this.hideLoader(); |
| 55 | next(); |
| 56 | }, |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 57 | created() { |
| 58 | this.startLoader(); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 59 | const systemTablePromise = new Promise((resolve) => { |
Sukanya Pandey | edb8a77 | 2020-10-29 11:33:42 +0530 | [diff] [blame] | 60 | this.$root.$on('hardware-status-system-complete', () => resolve()); |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 61 | }); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 62 | const bmcManagerTablePromise = new Promise((resolve) => { |
Sukanya Pandey | edb8a77 | 2020-10-29 11:33:42 +0530 | [diff] [blame] | 63 | this.$root.$on('hardware-status-bmc-manager-complete', () => resolve()); |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 64 | }); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 65 | const chassisTablePromise = new Promise((resolve) => { |
Sukanya Pandey | edb8a77 | 2020-10-29 11:33:42 +0530 | [diff] [blame] | 66 | this.$root.$on('hardware-status-chassis-complete', () => resolve()); |
Yoshie Muranaka | 09e8b5d | 2020-06-08 07:36:59 -0700 | [diff] [blame] | 67 | }); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 68 | const dimmSlotTablePromise = new Promise((resolve) => { |
Sukanya Pandey | edb8a77 | 2020-10-29 11:33:42 +0530 | [diff] [blame] | 69 | this.$root.$on('hardware-status-dimm-slot-complete', () => resolve()); |
Yoshie Muranaka | e24b17d | 2020-06-08 11:03:11 -0700 | [diff] [blame] | 70 | }); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 71 | const fansTablePromise = new Promise((resolve) => { |
Sukanya Pandey | edb8a77 | 2020-10-29 11:33:42 +0530 | [diff] [blame] | 72 | this.$root.$on('hardware-status-fans-complete', () => resolve()); |
Yoshie Muranaka | b89a53c | 2020-06-15 13:25:46 -0700 | [diff] [blame] | 73 | }); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 74 | const powerSuppliesTablePromise = new Promise((resolve) => { |
Sukanya Pandey | edb8a77 | 2020-10-29 11:33:42 +0530 | [diff] [blame] | 75 | this.$root.$on('hardware-status-power-supplies-complete', () => |
Yoshie Muranaka | 5918b48 | 2020-06-08 08:18:23 -0700 | [diff] [blame] | 76 | resolve() |
| 77 | ); |
| 78 | }); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 79 | const processorsTablePromise = new Promise((resolve) => { |
Sukanya Pandey | edb8a77 | 2020-10-29 11:33:42 +0530 | [diff] [blame] | 80 | this.$root.$on('hardware-status-processors-complete', () => resolve()); |
SurenNeware | dc3fa2e | 2020-08-04 20:45:25 +0530 | [diff] [blame] | 81 | }); |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 82 | // Combine all child component Promises to indicate |
| 83 | // when page data load complete |
Yoshie Muranaka | e24b17d | 2020-06-08 11:03:11 -0700 | [diff] [blame] | 84 | Promise.all([ |
| 85 | systemTablePromise, |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 86 | bmcManagerTablePromise, |
Yoshie Muranaka | 09e8b5d | 2020-06-08 07:36:59 -0700 | [diff] [blame] | 87 | chassisTablePromise, |
Yoshie Muranaka | e24b17d | 2020-06-08 11:03:11 -0700 | [diff] [blame] | 88 | dimmSlotTablePromise, |
Yoshie Muranaka | b89a53c | 2020-06-15 13:25:46 -0700 | [diff] [blame] | 89 | fansTablePromise, |
SurenNeware | dc3fa2e | 2020-08-04 20:45:25 +0530 | [diff] [blame] | 90 | powerSuppliesTablePromise, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 91 | processorsTablePromise, |
Yoshie Muranaka | e24b17d | 2020-06-08 11:03:11 -0700 | [diff] [blame] | 92 | ]).finally(() => this.endLoader()); |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 93 | }, |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 94 | }; |
| 95 | </script> |