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> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 5 | <!-- TODO: display timezone --> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 6 | <dt>BMC time</dt> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 7 | <dd>{{ bmcTime | date('MMM DD, YYYY HH:MM:SS') }}</dd> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 8 | </dl> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 9 | </div> |
| 10 | <div> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 11 | <!-- TODO: add toggle LED on/off funtionality --> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 12 | <dl> |
| 13 | <dt>Server LED</dt> |
| 14 | <dd> |
| 15 | <b-form-checkbox |
| 16 | v-model="serverLedChecked" |
| 17 | name="check-button" |
| 18 | switch |
| 19 | > |
| 20 | <span v-if="!serverLedChecked">On</span> |
| 21 | <span v-else>Off</span> |
| 22 | </b-form-checkbox> |
| 23 | </dd> |
| 24 | </dl> |
| 25 | </div> |
| 26 | <div> |
Gunnar Mills | f70db21 | 2020-01-28 20:21:37 -0600 | [diff] [blame] | 27 | <!-- TODO: link to network settings --> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 28 | <b-button |
| 29 | href="#" |
| 30 | variant="secondary" |
| 31 | class="d-flex justify-content-between align-items-center" |
| 32 | > |
| 33 | <span>Edit network settings</span> |
| 34 | <icon-arrow-right /> |
| 35 | </b-button> |
| 36 | </div> |
| 37 | <div> |
| 38 | <!-- TODO: link to SOL --> |
| 39 | <b-button |
| 40 | href="#" |
| 41 | variant="secondary" |
| 42 | class="d-flex justify-content-between align-items-center" |
| 43 | > |
| 44 | <span>Serial over LAN console</span> |
| 45 | <icon-arrow-right /> |
| 46 | </b-button> |
| 47 | </div> |
| 48 | </div> |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 49 | </template> |
| 50 | |
| 51 | <script> |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 52 | import ArrowRight16 from '@carbon/icons-vue/es/arrow--right/16'; |
| 53 | |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 54 | export default { |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 55 | name: 'QuickLinks', |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 56 | components: { |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 57 | IconArrowRight: ArrowRight16 |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 58 | }, |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 59 | data() { |
| 60 | return { |
Dixsie Wolmers | cbcd213 | 2020-01-30 20:58:37 -0600 | [diff] [blame] | 61 | serverLedChecked: false |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 62 | }; |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 63 | }, |
| 64 | computed: { |
| 65 | bmcTime() { |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 66 | return this.$store.getters['global/bmcTime']; |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 67 | } |
| 68 | }, |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 69 | created() { |
| 70 | this.getBmcTime(); |
| 71 | }, |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 72 | methods: { |
| 73 | getBmcTime() { |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 74 | this.$store.dispatch('global/getBmcTime'); |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 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> |
| 81 | dd, |
| 82 | dl { |
| 83 | margin: 0; |
| 84 | } |
| 85 | |
| 86 | .quicklinks { |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame^] | 87 | background: $gray-200; |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 88 | display: grid; |
| 89 | grid-gap: 1rem; |
| 90 | padding: 1rem; |
| 91 | white-space: nowrap; |
| 92 | align-items: center; |
| 93 | } |
| 94 | |
| 95 | @include media-breakpoint-up(sm) { |
| 96 | .quicklinks { |
| 97 | grid-template-columns: repeat(2, 1fr); |
| 98 | } |
| 99 | } |
| 100 | |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame^] | 101 | @include media-breakpoint-up(xl) { |
Dixsie Wolmers | 537c6cb | 2020-01-06 17:22:25 -0500 | [diff] [blame] | 102 | .quicklinks { |
| 103 | grid-template-columns: repeat(4, 1fr); |
| 104 | } |
| 105 | } |
| 106 | </style> |