summaryrefslogtreecommitdiff
path: root/src/views/Control
diff options
context:
space:
mode:
authorDixsie Wolmers <dixsie@ibm.com>2020-08-18 01:38:46 +0300
committerDerick Montague <derick.montague@ibm.com>2020-08-21 22:39:04 +0300
commit50cf2f78ea0b4fe4c08514d1dc71112312a2790b (patch)
tree49d510debf2e873b01cc17c9cae463ca4f32d4ec /src/views/Control
parentbb3160669584e165bb0be40bc3daef2e78307624 (diff)
downloadwebui-vue-50cf2f78ea0b4fe4c08514d1dc71112312a2790b.tar.xz
Add last reset time to reboot bmc page
- Timestamp is displayed to inform user of last power operation Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Change-Id: Ia4d95bced701b04f1099d020ee062f06d16ae8dc
Diffstat (limited to 'src/views/Control')
-rw-r--r--src/views/Control/RebootBmc/RebootBmc.vue28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/views/Control/RebootBmc/RebootBmc.vue b/src/views/Control/RebootBmc/RebootBmc.vue
index dbe17621..7bd98770 100644
--- a/src/views/Control/RebootBmc/RebootBmc.vue
+++ b/src/views/Control/RebootBmc/RebootBmc.vue
@@ -4,6 +4,20 @@
<b-row>
<b-col md="8" lg="8" xl="6">
<page-section>
+ <b-row>
+ <b-col>
+ <dl>
+ <dt>
+ {{ $t('pageRebootBmc.lastReboot') }}
+ </dt>
+ <dd v-if="lastBmcRebootTime">
+ {{ lastBmcRebootTime | formatDate }}
+ {{ lastBmcRebootTime | formatTime }}
+ </dd>
+ <dd v-else>--</dd>
+ </dl>
+ </b-col>
+ </b-row>
{{ $t('pageRebootBmc.rebootInformation') }}
<b-button
variant="primary"
@@ -23,11 +37,23 @@
import PageTitle from '../../../components/Global/PageTitle';
import PageSection from '../../../components/Global/PageSection';
import BVToastMixin from '../../../components/Mixins/BVToastMixin';
+import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin';
export default {
name: 'RebootBmc',
components: { PageTitle, PageSection },
- mixins: [BVToastMixin],
+ mixins: [BVToastMixin, LoadingBarMixin],
+ computed: {
+ lastBmcRebootTime() {
+ return this.$store.getters['controls/lastBmcRebootTime'];
+ }
+ },
+ created() {
+ this.startLoader();
+ this.$store
+ .dispatch('controls/getLastBmcRebootTime')
+ .finally(() => this.endLoader());
+ },
methods: {
onClick() {
this.$bvModal