Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 1 | <template> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 2 | <div class="quicklinks"> |
| 3 | <div> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 4 | <dl> |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 5 | <dt>{{ $t('pageOverview.quicklinks.bmcTime') }}</dt> |
Yoshie Muranaka | e45f54b | 2020-03-26 15:23:34 -0700 | [diff] [blame] | 6 | <dd v-if="bmcTime"> |
| 7 | {{ bmcTime | formatDate }} {{ bmcTime | formatTime }} |
| 8 | </dd> |
| 9 | <dd v-else>--</dd> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 10 | </dl> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 11 | </div> |
| 12 | <div> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 13 | <!-- TODO: add toggle LED on/off funtionality --> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 14 | <dl> |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 15 | <dt>{{ $t('pageOverview.quicklinks.serverLed') }}</dt> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 16 | <dd> |
| 17 | <b-form-checkbox |
| 18 | v-model="serverLedChecked" |
Dixsie Wolmers | 1e2d70a | 2020-07-01 12:56:10 -0500 | [diff] [blame] | 19 | data-test-id="overviewQuickLinks-checkbox-serverLed" |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 20 | name="check-button" |
| 21 | switch |
| 22 | > |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 23 | <span v-if="serverLedChecked">{{ $t('global.status.on') }}</span> |
| 24 | <span v-else>{{ $t('global.status.off') }}</span> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 25 | </b-form-checkbox> |
| 26 | </dd> |
| 27 | </dl> |
| 28 | </div> |
| 29 | <div> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 30 | <b-button |
Dixsie Wolmers | 1e2d70a | 2020-07-01 12:56:10 -0500 | [diff] [blame] | 31 | to="/configuration/network-settings" |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 32 | variant="secondary" |
Dixsie Wolmers | 1e2d70a | 2020-07-01 12:56:10 -0500 | [diff] [blame] | 33 | data-test-id="overviewQuickLinks-button-networkSettings" |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 34 | class="d-flex justify-content-between align-items-center" |
| 35 | > |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 36 | <span>{{ $t('pageOverview.quicklinks.editNetworkSettings') }}</span> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 37 | <icon-arrow-right /> |
| 38 | </b-button> |
| 39 | </div> |
| 40 | <div> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 41 | <b-button |
Dixsie Wolmers | 1e2d70a | 2020-07-01 12:56:10 -0500 | [diff] [blame] | 42 | to="/control/serial-over-lan" |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 43 | variant="secondary" |
Dixsie Wolmers | 1e2d70a | 2020-07-01 12:56:10 -0500 | [diff] [blame] | 44 | data-test-id="overviewQuickLinks-button-solConsole" |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 45 | class="d-flex justify-content-between align-items-center" |
| 46 | > |
Yoshie Muranaka | 547b5fc | 2020-02-24 15:42:40 -0800 | [diff] [blame] | 47 | <span>{{ $t('pageOverview.quicklinks.solConsole') }}</span> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 48 | <icon-arrow-right /> |
| 49 | </b-button> |
| 50 | </div> |
| 51 | </div> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 52 | </template> |
| 53 | |
| 54 | <script> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 55 | import ArrowRight16 from '@carbon/icons-vue/es/arrow--right/16'; |
| 56 | |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 57 | export default { |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 58 | name: 'QuickLinks', |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 59 | components: { |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 60 | IconArrowRight: ArrowRight16 |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 61 | }, |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 62 | data() { |
| 63 | return { |
Dixsie Wolmers | cbcd213 | 2020-01-30 20:58:37 -0600 | [diff] [blame] | 64 | serverLedChecked: false |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 65 | }; |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 66 | }, |
| 67 | computed: { |
| 68 | bmcTime() { |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 69 | return this.$store.getters['global/bmcTime']; |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 70 | } |
| 71 | }, |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 72 | created() { |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 73 | this.$store.dispatch('global/getBmcTime').finally(() => { |
| 74 | this.$root.$emit('overview::quicklinks::complete'); |
| 75 | }); |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 76 | } |
| 77 | }; |
| 78 | </script> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 79 | |
| 80 | <style lang="scss" scoped> |
Derick Montague | 4086572 | 2020-04-13 17:01:19 -0500 | [diff] [blame] | 81 | @import 'src/assets/styles/helpers'; |
| 82 | |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 83 | dd, |
| 84 | dl { |
| 85 | margin: 0; |
| 86 | } |
| 87 | |
| 88 | .quicklinks { |
Derick Montague | 7f970a1 | 2020-03-02 17:56:09 -0600 | [diff] [blame] | 89 | background: $container-bgd; |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 90 | 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 Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 103 | @include media-breakpoint-up(xl) { |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 104 | .quicklinks { |
| 105 | grid-template-columns: repeat(4, 1fr); |
| 106 | } |
| 107 | } |
| 108 | </style> |