1<template>
2  <div class="quicklinks">
3    <div>
4      <dl>
5        <dt>{{ $t('pageOverview.quicklinks.bmcTime') }}</dt>
6        <dd v-if="bmcTime">
7          {{ bmcTime | formatDate }} {{ bmcTime | formatTime }}
8        </dd>
9        <dd v-else>--</dd>
10      </dl>
11    </div>
12    <div>
13      <!-- TODO: add toggle LED on/off funtionality -->
14      <dl>
15        <dt>{{ $t('pageOverview.quicklinks.serverLed') }}</dt>
16        <dd>
17          <b-form-checkbox
18            v-model="serverLedChecked"
19            name="check-button"
20            switch
21          >
22            <span v-if="serverLedChecked">{{ $t('global.status.on') }}</span>
23            <span v-else>{{ $t('global.status.off') }}</span>
24          </b-form-checkbox>
25        </dd>
26      </dl>
27    </div>
28    <div>
29      <!-- TODO: link to network settings -->
30      <b-button
31        href="#"
32        variant="secondary"
33        class="d-flex justify-content-between align-items-center"
34      >
35        <span>{{ $t('pageOverview.quicklinks.editNetworkSettings') }}</span>
36        <icon-arrow-right />
37      </b-button>
38    </div>
39    <div>
40      <!-- TODO: link to SOL -->
41      <b-button
42        href="#"
43        variant="secondary"
44        class="d-flex justify-content-between align-items-center"
45      >
46        <span>{{ $t('pageOverview.quicklinks.solConsole') }}</span>
47        <icon-arrow-right />
48      </b-button>
49    </div>
50  </div>
51</template>
52
53<script>
54import ArrowRight16 from '@carbon/icons-vue/es/arrow--right/16';
55
56export default {
57  name: 'QuickLinks',
58  components: {
59    IconArrowRight: ArrowRight16
60  },
61  data() {
62    return {
63      serverLedChecked: false
64    };
65  },
66  computed: {
67    bmcTime() {
68      return this.$store.getters['global/bmcTime'];
69    }
70  },
71  created() {
72    this.getBmcTime();
73  },
74  methods: {
75    getBmcTime() {
76      this.$store.dispatch('global/getBmcTime');
77    }
78  }
79};
80</script>
81
82<style lang="scss" scoped>
83@import 'src/assets/styles/helpers';
84
85dd,
86dl {
87  margin: 0;
88}
89
90.quicklinks {
91  background: $container-bgd;
92  display: grid;
93  grid-gap: 1rem;
94  padding: 1rem;
95  white-space: nowrap;
96  align-items: center;
97}
98
99@include media-breakpoint-up(sm) {
100  .quicklinks {
101    grid-template-columns: repeat(2, 1fr);
102  }
103}
104
105@include media-breakpoint-up(xl) {
106  .quicklinks {
107    grid-template-columns: repeat(4, 1fr);
108  }
109}
110</style>
111