blob: b964795bfddac14a21f3d326935e869f98753583 [file] [log] [blame]
Dixsie Wolmers97d86b32019-12-02 05:07:57 -06001<template>
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -05002 <div class="quicklinks">
3 <div>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -06004 <dl>
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -08005 <dt>{{ $t('pageOverview.quicklinks.bmcTime') }}</dt>
Yoshie Muranakae45f54b2020-03-26 15:23:34 -07006 <dd v-if="bmcTime">
7 {{ bmcTime | formatDate }} {{ bmcTime | formatTime }}
8 </dd>
9 <dd v-else>--</dd>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060010 </dl>
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050011 </div>
12 <div>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060013 <!-- TODO: add toggle LED on/off funtionality -->
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050014 <dl>
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080015 <dt>{{ $t('pageOverview.quicklinks.serverLed') }}</dt>
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050016 <dd>
17 <b-form-checkbox
18 v-model="serverLedChecked"
Dixsie Wolmers1e2d70a2020-07-01 12:56:10 -050019 data-test-id="overviewQuickLinks-checkbox-serverLed"
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050020 name="check-button"
21 switch
22 >
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080023 <span v-if="serverLedChecked">{{ $t('global.status.on') }}</span>
24 <span v-else>{{ $t('global.status.off') }}</span>
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050025 </b-form-checkbox>
26 </dd>
27 </dl>
28 </div>
29 <div>
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050030 <b-button
Dixsie Wolmers1e2d70a2020-07-01 12:56:10 -050031 to="/configuration/network-settings"
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050032 variant="secondary"
Dixsie Wolmers1e2d70a2020-07-01 12:56:10 -050033 data-test-id="overviewQuickLinks-button-networkSettings"
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050034 class="d-flex justify-content-between align-items-center"
35 >
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080036 <span>{{ $t('pageOverview.quicklinks.editNetworkSettings') }}</span>
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050037 <icon-arrow-right />
38 </b-button>
39 </div>
40 <div>
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050041 <b-button
Dixsie Wolmers1e2d70a2020-07-01 12:56:10 -050042 to="/control/serial-over-lan"
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050043 variant="secondary"
Dixsie Wolmers1e2d70a2020-07-01 12:56:10 -050044 data-test-id="overviewQuickLinks-button-solConsole"
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050045 class="d-flex justify-content-between align-items-center"
46 >
Yoshie Muranaka547b5fc2020-02-24 15:42:40 -080047 <span>{{ $t('pageOverview.quicklinks.solConsole') }}</span>
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050048 <icon-arrow-right />
49 </b-button>
50 </div>
51 </div>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060052</template>
53
54<script>
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050055import ArrowRight16 from '@carbon/icons-vue/es/arrow--right/16';
56
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060057export default {
Derick Montague09e45cd2020-01-23 15:45:57 -060058 name: 'QuickLinks',
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060059 components: {
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050060 IconArrowRight: ArrowRight16
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060061 },
Derick Montague09e45cd2020-01-23 15:45:57 -060062 data() {
63 return {
Dixsie Wolmerscbcd2132020-01-30 20:58:37 -060064 serverLedChecked: false
Derick Montague09e45cd2020-01-23 15:45:57 -060065 };
Dixsie Wolmersf65ee342020-01-22 19:47:56 -060066 },
67 computed: {
68 bmcTime() {
Derick Montaguee2fd1562019-12-20 13:26:53 -060069 return this.$store.getters['global/bmcTime'];
Dixsie Wolmersf65ee342020-01-22 19:47:56 -060070 }
71 },
Derick Montague09e45cd2020-01-23 15:45:57 -060072 created() {
Yoshie Muranaka598bf7e2020-05-01 12:26:00 -070073 this.$store.dispatch('global/getBmcTime').finally(() => {
74 this.$root.$emit('overview::quicklinks::complete');
75 });
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060076 }
77};
78</script>
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050079
80<style lang="scss" scoped>
Derick Montague40865722020-04-13 17:01:19 -050081@import 'src/assets/styles/helpers';
82
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050083dd,
84dl {
85 margin: 0;
86}
87
88.quicklinks {
Derick Montague7f970a12020-03-02 17:56:09 -060089 background: $container-bgd;
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -050090 display: grid;
91 grid-gap: 1rem;
92 padding: 1rem;
93 white-space: nowrap;
94 align-items: center;
95}
96
97@include media-breakpoint-up(sm) {
98 .quicklinks {
99 grid-template-columns: repeat(2, 1fr);
100 }
101}
102
Yoshie Muranaka74f86872020-02-10 12:28:37 -0800103@include media-breakpoint-up(xl) {
Dixsie Wolmers537c6cb2020-01-06 17:22:25 -0500104 .quicklinks {
105 grid-template-columns: repeat(4, 1fr);
106 }
107}
108</style>