blob: 13138601f9dafefa996991a28e1ea4c4dca5c82a [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 Wolmers537c6cb2020-01-06 17:22:25 -05004 <div class="quicklinks-section">
5 <overview-quick-links />
6 </div>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -06007 <b-row>
Dixsie Wolmers9d40e302020-02-13 13:29:40 -06008 <b-col>
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -08009 <page-section :section-title="$t('pageOverview.bmcInformation')">
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060010 <b-row>
Dixsie Wolmers9d40e302020-02-13 13:29:40 -060011 <b-col>
12 <dl>
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080013 <dt>{{ $t('pageOverview.firmwareVersion') }}</dt>
Dixsie Wolmers46a87442020-02-26 15:26:30 -060014 <dd>{{ bmcFirmwareVersion }}</dd>
Dixsie Wolmers9d40e302020-02-13 13:29:40 -060015 </dl>
16 </b-col>
17 </b-row>
18 </page-section>
19 <b-row>
20 <b-col>
21 <page-section
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080022 :section-title="$t('pageOverview.networkInformation')"
Dixsie Wolmers9d40e302020-02-13 13:29:40 -060023 >
24 <overview-network />
25 </page-section>
26 </b-col>
27 </b-row>
28 </b-col>
29 <b-col>
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080030 <page-section :section-title="$t('pageOverview.serverInformation')">
Dixsie Wolmers9d40e302020-02-13 13:29:40 -060031 <b-row>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060032 <b-col sm="6">
33 <dl>
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080034 <dt>{{ $t('pageOverview.model') }}</dt>
Dixsie Wolmersf65ee342020-01-22 19:47:56 -060035 <dd>{{ serverModel }}</dd>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060036 </dl>
37 </b-col>
38 <b-col sm="6">
39 <dl>
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080040 <dt>{{ $t('pageOverview.manufacturer') }}</dt>
Dixsie Wolmersf65ee342020-01-22 19:47:56 -060041 <dd>{{ serverManufacturer }}</dd>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060042 </dl>
43 </b-col>
44 <b-col sm="6">
45 <dl>
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080046 <dt>{{ $t('pageOverview.serialNumber') }}</dt>
Dixsie Wolmersf65ee342020-01-22 19:47:56 -060047 <dd>{{ serverSerialNumber }}</dd>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060048 </dl>
49 </b-col>
50 <b-col sm="6">
51 <dl>
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080052 <dt>{{ $t('pageOverview.firmwareVersion') }}</dt>
Dixsie Wolmers46a87442020-02-26 15:26:30 -060053 <dd>{{ hostFirmwareVersion }}</dd>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060054 </dl>
55 </b-col>
56 </b-row>
Derick Montague09e45cd2020-01-23 15:45:57 -060057 </page-section>
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080058 <page-section :section-title="$t('pageOverview.powerConsumption')">
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060059 <b-row>
60 <b-col sm="6">
61 <dl>
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080062 <dt>{{ $t('pageOverview.powerConsumption') }}</dt>
Dixsie Wolmers4c69f5b2020-02-26 11:23:52 -060063 <dd v-if="powerConsumptionValue == null">
64 {{ $t('global.status.notAvailable') }}
65 </dd>
66 <dd v-else>{{ powerConsumptionValue }} W</dd>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060067 </dl>
68 </b-col>
69 <b-col sm="6">
70 <dl>
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080071 <dt>{{ $t('pageOverview.powerCap') }}</dt>
Dixsie Wolmers4c69f5b2020-02-26 11:23:52 -060072 <dd v-if="powerCapValue == null">
73 {{ $t('global.status.disabled') }}
74 </dd>
75 <dd v-else>{{ powerCapValue }} W</dd>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060076 </dl>
77 </b-col>
78 </b-row>
Derick Montague09e45cd2020-01-23 15:45:57 -060079 </page-section>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060080 </b-col>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060081 </b-row>
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080082 <page-section :section-title="$t('pageOverview.highPriorityEvents')">
Derick Montague09e45cd2020-01-23 15:45:57 -060083 <overview-events />
84 </page-section>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060085 </b-container>
86</template>
87
88<script>
Derick Montaguee2fd1562019-12-20 13:26:53 -060089import OverviewQuickLinks from './OverviewQuickLinks';
90import OverviewEvents from './OverviewEvents';
Dixsie Wolmers9d40e302020-02-13 13:29:40 -060091import OverviewNetwork from './OverviewNetwork';
SurenNeware61859092020-10-01 09:37:32 +053092import PageTitle from '@/components/Global/PageTitle';
93import PageSection from '@/components/Global/PageSection';
Derick Montaguee2fd1562019-12-20 13:26:53 -060094import { mapState } from 'vuex';
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -070095import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin';
Dixsie Wolmers9d40e302020-02-13 13:29:40 -060096
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060097export default {
Derick Montaguee2fd1562019-12-20 13:26:53 -060098 name: 'Overview',
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060099 components: {
Dixsie Wolmersf65ee342020-01-22 19:47:56 -0600100 OverviewQuickLinks,
101 OverviewEvents,
Dixsie Wolmers9d40e302020-02-13 13:29:40 -0600102 OverviewNetwork,
Yoshie Muranaka8d129102019-12-19 09:51:55 -0800103 PageTitle,
Derick Montague602e98a2020-10-21 16:20:00 -0500104 PageSection,
Dixsie Wolmers97d86b32019-12-02 05:07:57 -0600105 },
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -0700106 mixins: [LoadingBarMixin],
Yoshie Muranaka98bb24e2020-10-06 10:00:19 -0700107 data() {
108 return {
109 firmwareStoreModuleName: this.$store.hasModule('firmwareSingleImage')
110 ? 'firmwareSingleImage'
Derick Montague602e98a2020-10-21 16:20:00 -0500111 : 'firmware',
Yoshie Muranaka98bb24e2020-10-06 10:00:19 -0700112 };
113 },
114 computed: {
115 ...mapState({
Derick Montague602e98a2020-10-21 16:20:00 -0500116 server: (state) => state.system.systems[0],
117 powerCapValue: (state) => state.powerControl.powerCapValue,
118 powerConsumptionValue: (state) =>
119 state.powerControl.powerConsumptionValue,
Yoshie Muranaka98bb24e2020-10-06 10:00:19 -0700120 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 Montague602e98a2020-10-21 16:20:00 -0500135 },
Yoshie Muranaka98bb24e2020-10-06 10:00:19 -0700136 }),
137 bmcFirmwareVersion() {
138 return this.$store.getters[
139 `${this.firmwareStoreModuleName}/bmcFirmwareCurrentVersion`
140 ];
Derick Montague602e98a2020-10-21 16:20:00 -0500141 },
Yoshie Muranaka98bb24e2020-10-06 10:00:19 -0700142 },
Derick Montague09e45cd2020-01-23 15:45:57 -0600143 created() {
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -0700144 this.startLoader();
Derick Montague602e98a2020-10-21 16:20:00 -0500145 const quicklinksPromise = new Promise((resolve) => {
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -0700146 this.$root.$on('overview::quicklinks::complete', () => resolve());
147 });
Derick Montague602e98a2020-10-21 16:20:00 -0500148 const networkPromise = new Promise((resolve) => {
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -0700149 this.$root.$on('overview::network::complete', () => resolve());
150 });
Derick Montague602e98a2020-10-21 16:20:00 -0500151 const eventsPromise = new Promise((resolve) => {
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -0700152 this.$root.$on('overview::events::complete', () => resolve());
153 });
154 Promise.all([
Yoshie Muranakac687f102020-06-02 12:01:27 -0700155 this.$store.dispatch('system/getSystem'),
Yoshie Muranaka98bb24e2020-10-06 10:00:19 -0700156 this.$store.dispatch(
157 `${this.firmwareStoreModuleName}/getFirmwareInformation`
158 ),
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -0700159 this.$store.dispatch('powerControl/getPowerControl'),
160 quicklinksPromise,
161 networkPromise,
Derick Montague602e98a2020-10-21 16:20:00 -0500162 eventsPromise,
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -0700163 ]).finally(() => this.endLoader());
Derick Montague09e45cd2020-01-23 15:45:57 -0600164 },
Dixsie Wolmers97d86b32019-12-02 05:07:57 -0600165};
166</script>
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -0500167
168<style lang="scss" scoped>
169.quicklinks-section {
170 margin-bottom: $spacer * 2;
Dixsie Wolmers9d40e302020-02-13 13:29:40 -0600171 margin-left: $spacer * -1;
172}
173
174dd {
175 white-space: nowrap;
176 overflow: hidden;
177 text-overflow: ellipsis;
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -0500178}
179</style>