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 | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 4 | <div class="quicklinks-section"> |
| 5 | <overview-quick-links /> |
| 6 | </div> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 7 | <b-row> |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 8 | <b-col> |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 9 | <page-section :section-title="$t('pageOverview.bmcInformation')"> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 10 | <b-row> |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 11 | <b-col> |
| 12 | <dl> |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 13 | <dt>{{ $t('pageOverview.firmwareVersion') }}</dt> |
Dixsie Wolmers | 46a8744 | 2020-02-26 15:26:30 -0600 | [diff] [blame] | 14 | <dd>{{ bmcFirmwareVersion }}</dd> |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 15 | </dl> |
| 16 | </b-col> |
| 17 | </b-row> |
| 18 | </page-section> |
| 19 | <b-row> |
| 20 | <b-col> |
| 21 | <page-section |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 22 | :section-title="$t('pageOverview.networkInformation')" |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 23 | > |
| 24 | <overview-network /> |
| 25 | </page-section> |
| 26 | </b-col> |
| 27 | </b-row> |
| 28 | </b-col> |
| 29 | <b-col> |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 30 | <page-section :section-title="$t('pageOverview.serverInformation')"> |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 31 | <b-row> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 32 | <b-col sm="6"> |
| 33 | <dl> |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 34 | <dt>{{ $t('pageOverview.model') }}</dt> |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 35 | <dd>{{ serverModel }}</dd> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 36 | </dl> |
| 37 | </b-col> |
| 38 | <b-col sm="6"> |
| 39 | <dl> |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 40 | <dt>{{ $t('pageOverview.manufacturer') }}</dt> |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 41 | <dd>{{ serverManufacturer }}</dd> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 42 | </dl> |
| 43 | </b-col> |
| 44 | <b-col sm="6"> |
| 45 | <dl> |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 46 | <dt>{{ $t('pageOverview.serialNumber') }}</dt> |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 47 | <dd>{{ serverSerialNumber }}</dd> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 48 | </dl> |
| 49 | </b-col> |
| 50 | <b-col sm="6"> |
| 51 | <dl> |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 52 | <dt>{{ $t('pageOverview.firmwareVersion') }}</dt> |
Dixsie Wolmers | 46a8744 | 2020-02-26 15:26:30 -0600 | [diff] [blame] | 53 | <dd>{{ hostFirmwareVersion }}</dd> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 54 | </dl> |
| 55 | </b-col> |
| 56 | </b-row> |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 57 | </page-section> |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 58 | <page-section :section-title="$t('pageOverview.powerConsumption')"> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 59 | <b-row> |
| 60 | <b-col sm="6"> |
| 61 | <dl> |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 62 | <dt>{{ $t('pageOverview.powerConsumption') }}</dt> |
Dixsie Wolmers | 4c69f5b | 2020-02-26 11:23:52 -0600 | [diff] [blame] | 63 | <dd v-if="powerConsumptionValue == null"> |
| 64 | {{ $t('global.status.notAvailable') }} |
| 65 | </dd> |
| 66 | <dd v-else>{{ powerConsumptionValue }} W</dd> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 67 | </dl> |
| 68 | </b-col> |
| 69 | <b-col sm="6"> |
| 70 | <dl> |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 71 | <dt>{{ $t('pageOverview.powerCap') }}</dt> |
Dixsie Wolmers | 4c69f5b | 2020-02-26 11:23:52 -0600 | [diff] [blame] | 72 | <dd v-if="powerCapValue == null"> |
| 73 | {{ $t('global.status.disabled') }} |
| 74 | </dd> |
| 75 | <dd v-else>{{ powerCapValue }} W</dd> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 76 | </dl> |
| 77 | </b-col> |
| 78 | </b-row> |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 79 | </page-section> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 80 | </b-col> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 81 | </b-row> |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 82 | <page-section :section-title="$t('pageOverview.highPriorityEvents')"> |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 83 | <overview-events /> |
| 84 | </page-section> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 85 | </b-container> |
| 86 | </template> |
| 87 | |
| 88 | <script> |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 89 | import OverviewQuickLinks from './OverviewQuickLinks'; |
| 90 | import OverviewEvents from './OverviewEvents'; |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 91 | import OverviewNetwork from './OverviewNetwork'; |
SurenNeware | 6185909 | 2020-10-01 09:37:32 +0530 | [diff] [blame] | 92 | import PageTitle from '@/components/Global/PageTitle'; |
| 93 | import PageSection from '@/components/Global/PageSection'; |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 94 | import { mapState } from 'vuex'; |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 95 | import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 96 | |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 97 | export default { |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 98 | name: 'Overview', |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 99 | components: { |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 100 | OverviewQuickLinks, |
| 101 | OverviewEvents, |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 102 | OverviewNetwork, |
Yoshie Muranaka | 8d12910 | 2019-12-19 09:51:55 -0800 | [diff] [blame] | 103 | PageTitle, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame^] | 104 | PageSection, |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 105 | }, |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 106 | mixins: [LoadingBarMixin], |
Yoshie Muranaka | 98bb24e | 2020-10-06 10:00:19 -0700 | [diff] [blame] | 107 | data() { |
| 108 | return { |
| 109 | firmwareStoreModuleName: this.$store.hasModule('firmwareSingleImage') |
| 110 | ? 'firmwareSingleImage' |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame^] | 111 | : 'firmware', |
Yoshie Muranaka | 98bb24e | 2020-10-06 10:00:19 -0700 | [diff] [blame] | 112 | }; |
| 113 | }, |
| 114 | computed: { |
| 115 | ...mapState({ |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame^] | 116 | server: (state) => state.system.systems[0], |
| 117 | powerCapValue: (state) => state.powerControl.powerCapValue, |
| 118 | powerConsumptionValue: (state) => |
| 119 | state.powerControl.powerConsumptionValue, |
Yoshie Muranaka | 98bb24e | 2020-10-06 10:00:19 -0700 | [diff] [blame] | 120 | serverManufacturer() { |
| 121 | if (this.server) return this.server.manufacturer || '--'; |
| 122 | return '--'; |
| 123 | }, |
| 124 | serverModel() { |
| 125 | if (this.server) return this.server.model || '--'; |
| 126 | return '--'; |
| 127 | }, |
| 128 | serverSerialNumber() { |
| 129 | if (this.server) return this.server.serialNumber || '--'; |
| 130 | return '--'; |
| 131 | }, |
| 132 | hostFirmwareVersion() { |
| 133 | if (this.server) return this.server.firmwareVersion || '--'; |
| 134 | return '--'; |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame^] | 135 | }, |
Yoshie Muranaka | 98bb24e | 2020-10-06 10:00:19 -0700 | [diff] [blame] | 136 | }), |
| 137 | bmcFirmwareVersion() { |
| 138 | return this.$store.getters[ |
| 139 | `${this.firmwareStoreModuleName}/bmcFirmwareCurrentVersion` |
| 140 | ]; |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame^] | 141 | }, |
Yoshie Muranaka | 98bb24e | 2020-10-06 10:00:19 -0700 | [diff] [blame] | 142 | }, |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 143 | created() { |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 144 | this.startLoader(); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame^] | 145 | const quicklinksPromise = new Promise((resolve) => { |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 146 | this.$root.$on('overview::quicklinks::complete', () => resolve()); |
| 147 | }); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame^] | 148 | const networkPromise = new Promise((resolve) => { |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 149 | this.$root.$on('overview::network::complete', () => resolve()); |
| 150 | }); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame^] | 151 | const eventsPromise = new Promise((resolve) => { |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 152 | this.$root.$on('overview::events::complete', () => resolve()); |
| 153 | }); |
| 154 | Promise.all([ |
Yoshie Muranaka | c687f10 | 2020-06-02 12:01:27 -0700 | [diff] [blame] | 155 | this.$store.dispatch('system/getSystem'), |
Yoshie Muranaka | 98bb24e | 2020-10-06 10:00:19 -0700 | [diff] [blame] | 156 | this.$store.dispatch( |
| 157 | `${this.firmwareStoreModuleName}/getFirmwareInformation` |
| 158 | ), |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 159 | this.$store.dispatch('powerControl/getPowerControl'), |
| 160 | quicklinksPromise, |
| 161 | networkPromise, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame^] | 162 | eventsPromise, |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 163 | ]).finally(() => this.endLoader()); |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 164 | }, |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 165 | }; |
| 166 | </script> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 167 | |
| 168 | <style lang="scss" scoped> |
| 169 | .quicklinks-section { |
| 170 | margin-bottom: $spacer * 2; |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 171 | margin-left: $spacer * -1; |
| 172 | } |
| 173 | |
| 174 | dd { |
| 175 | white-space: nowrap; |
| 176 | overflow: hidden; |
| 177 | text-overflow: ellipsis; |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 178 | } |
| 179 | </style> |