Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 1 | <template> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 2 | <page-section :section-title="$t('pageInventory.bmcManager')"> |
SurenNeware | 307382e | 2020-07-27 20:45:14 +0530 | [diff] [blame] | 3 | <b-table |
| 4 | responsive="md" |
Sukanya Pandey | fde429e | 2020-09-14 20:48:39 +0530 | [diff] [blame] | 5 | hover |
SurenNeware | 307382e | 2020-07-27 20:45:14 +0530 | [diff] [blame] | 6 | :items="items" |
| 7 | :fields="fields" |
| 8 | show-empty |
| 9 | :empty-text="$t('global.table.emptyMessage')" |
Kenneth Fullbright | 4105785 | 2021-12-27 16:19:37 -0600 | [diff] [blame] | 10 | :busy="isBusy" |
SurenNeware | 307382e | 2020-07-27 20:45:14 +0530 | [diff] [blame] | 11 | > |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 12 | <!-- Expand chevron icon --> |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 13 | <template #cell(expandRow)="row"> |
Dixsie Wolmers | 8313376 | 2020-07-15 08:45:19 -0500 | [diff] [blame] | 14 | <b-button |
| 15 | variant="link" |
| 16 | data-test-id="hardwareStatus-button-expandBmc" |
Dixsie Wolmers | 30f11f8 | 2020-11-10 16:07:56 -0600 | [diff] [blame] | 17 | :title="expandRowLabel" |
| 18 | class="btn-icon-only" |
Dixsie Wolmers | b53e086 | 2020-09-08 14:13:38 -0500 | [diff] [blame] | 19 | @click="toggleRowDetails(row)" |
Dixsie Wolmers | 8313376 | 2020-07-15 08:45:19 -0500 | [diff] [blame] | 20 | > |
Dixsie Wolmers | 30f11f8 | 2020-11-10 16:07:56 -0600 | [diff] [blame] | 21 | <icon-chevron /> |
SurenNeware | 6e2cb97 | 2020-12-24 20:58:16 +0530 | [diff] [blame] | 22 | <span class="sr-only">{{ expandRowLabel }}</span> |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 23 | </b-button> |
| 24 | </template> |
| 25 | |
| 26 | <!-- Health --> |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 27 | <template #cell(health)="{ value }"> |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 28 | <status-icon :status="statusIcon(value)" /> |
| 29 | {{ value }} |
| 30 | </template> |
| 31 | |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 32 | <!-- Toggle identify LED --> |
| 33 | <template #cell(identifyLed)="row"> |
| 34 | <b-form-checkbox |
| 35 | v-if="hasIdentifyLed(row.item.identifyLed)" |
| 36 | v-model="row.item.identifyLed" |
| 37 | name="switch" |
| 38 | switch |
| 39 | @change="toggleIdentifyLedValue(row.item)" |
| 40 | > |
| 41 | <span v-if="row.item.identifyLed"> |
| 42 | {{ $t('global.status.on') }} |
| 43 | </span> |
| 44 | <span v-else> {{ $t('global.status.off') }} </span> |
| 45 | </b-form-checkbox> |
| 46 | <div v-else>--</div> |
| 47 | </template> |
| 48 | |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 49 | <template #row-details="{ item }"> |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 50 | <b-container fluid> |
| 51 | <b-row> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 52 | <b-col class="mt-2" sm="6" xl="6"> |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 53 | <dl> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 54 | <!-- Name --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 55 | <dt>{{ $t('pageInventory.table.name') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 56 | <dd>{{ dataFormatter(item.name) }}</dd> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 57 | <!-- Part number --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 58 | <dt>{{ $t('pageInventory.table.partNumber') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 59 | <dd>{{ dataFormatter(item.partNumber) }}</dd> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 60 | <!-- Serial number --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 61 | <dt>{{ $t('pageInventory.table.serialNumber') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 62 | <dd>{{ dataFormatter(item.serialNumber) }}</dd> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 63 | <!-- Spare part number --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 64 | <dt>{{ $t('pageInventory.table.sparePartNumber') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 65 | <dd>{{ dataFormatter(item.sparePartNumber) }}</dd> |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 66 | <!-- Model --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 67 | <dt>{{ $t('pageInventory.table.model') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 68 | <dd>{{ dataFormatter(item.model) }}</dd> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 69 | <!-- UUID --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 70 | <dt>{{ $t('pageInventory.table.uuid') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 71 | <dd>{{ dataFormatter(item.uuid) }}</dd> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 72 | <!-- Service entry point UUID --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 73 | <dt>{{ $t('pageInventory.table.serviceEntryPointUuid') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 74 | <dd>{{ dataFormatter(item.serviceEntryPointUuid) }}</dd> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 75 | </dl> |
| 76 | </b-col> |
| 77 | <b-col class="mt-2" sm="6" xl="6"> |
| 78 | <dl> |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 79 | <!-- Status state --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 80 | <dt>{{ $t('pageInventory.table.statusState') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 81 | <dd>{{ dataFormatter(item.statusState) }}</dd> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 82 | <!-- Power state --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 83 | <dt>{{ $t('pageInventory.table.power') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 84 | <dd>{{ dataFormatter(item.powerState) }}</dd> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 85 | <!-- Health rollup --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 86 | <dt>{{ $t('pageInventory.table.healthRollup') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 87 | <dd>{{ dataFormatter(item.healthRollup) }}</dd> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 88 | <!-- BMC date and time --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 89 | <dt>{{ $t('pageInventory.table.bmcDateTime') }}:</dt> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 90 | <dd> |
| 91 | {{ item.dateTime | formatDate }} |
| 92 | {{ item.dateTime | formatTime }} |
| 93 | </dd> |
| 94 | <!-- Reset date and time --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 95 | <dt>{{ $t('pageInventory.table.lastResetTime') }}:</dt> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 96 | <dd> |
| 97 | {{ item.lastResetTime | formatDate }} |
| 98 | {{ item.lastResetTime | formatTime }} |
| 99 | </dd> |
| 100 | </dl> |
| 101 | </b-col> |
| 102 | </b-row> |
| 103 | <div class="section-divider mb-3 mt-3"></div> |
| 104 | <b-row> |
| 105 | <b-col class="mt-2" sm="6" xl="6"> |
| 106 | <dl> |
| 107 | <!-- Manufacturer --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 108 | <dt>{{ $t('pageInventory.table.manufacturer') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 109 | <dd>{{ dataFormatter(item.manufacturer) }}</dd> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 110 | <!-- Description --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 111 | <dt>{{ $t('pageInventory.table.description') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 112 | <dd>{{ dataFormatter(item.description) }}</dd> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 113 | <!-- Manager type --> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 114 | <dt>{{ $t('pageInventory.table.managerType') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 115 | <dd>{{ dataFormatter(item.managerType) }}</dd> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 116 | </dl> |
| 117 | </b-col> |
| 118 | <b-col class="mt-2" sm="6" xl="6"> |
Sandeepa Singh | 4c03919 | 2021-07-02 21:36:45 +0530 | [diff] [blame] | 119 | <!-- Firmware Version --> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 120 | <dl> |
Sandeepa Singh | 5287a8b | 2021-08-16 15:00:27 +0530 | [diff] [blame] | 121 | <dt>{{ $t('pageInventory.table.firmwareVersion') }}:</dt> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 122 | <dd>{{ item.firmwareVersion }}</dd> |
Sandeepa Singh | 4c03919 | 2021-07-02 21:36:45 +0530 | [diff] [blame] | 123 | </dl> |
| 124 | <!-- Graphical console --> |
| 125 | <p class="mt-1 mb-2 h6 float-none m-0"> |
Sandeepa Singh | 5287a8b | 2021-08-16 15:00:27 +0530 | [diff] [blame] | 126 | {{ $t('pageInventory.table.graphicalConsole') }} |
Sandeepa Singh | 4c03919 | 2021-07-02 21:36:45 +0530 | [diff] [blame] | 127 | </p> |
| 128 | <dl class="ml-4"> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 129 | <dt>{{ $t('pageInventory.table.connectTypesSupported') }}:</dt> |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 130 | <dd> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 131 | {{ dataFormatterArray(item.graphicalConsoleConnectTypes) }} |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 132 | </dd> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 133 | <dt>{{ $t('pageInventory.table.maxConcurrentSessions') }}:</dt> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 134 | <dd> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 135 | {{ dataFormatter(item.graphicalConsoleMaxSessions) }} |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 136 | </dd> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 137 | <dt>{{ $t('pageInventory.table.serviceEnabled') }}:</dt> |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 138 | <dd> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 139 | {{ dataFormatter(item.graphicalConsoleEnabled) }} |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 140 | </dd> |
Sandeepa Singh | 4c03919 | 2021-07-02 21:36:45 +0530 | [diff] [blame] | 141 | </dl> |
| 142 | <!-- Serial console --> |
| 143 | <p class="mt-1 mb-2 h6 float-none m-0"> |
Sandeepa Singh | 5287a8b | 2021-08-16 15:00:27 +0530 | [diff] [blame] | 144 | {{ $t('pageInventory.table.serialConsole') }} |
Sandeepa Singh | 4c03919 | 2021-07-02 21:36:45 +0530 | [diff] [blame] | 145 | </p> |
| 146 | <dl class="ml-4"> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 147 | <dt>{{ $t('pageInventory.table.connectTypesSupported') }}:</dt> |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 148 | <dd> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 149 | {{ dataFormatterArray(item.serialConsoleConnectTypes) }} |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 150 | </dd> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 151 | <dt>{{ $t('pageInventory.table.maxConcurrentSessions') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 152 | <dd>{{ dataFormatter(item.serialConsoleMaxSessions) }}</dd> |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 153 | <dt>{{ $t('pageInventory.table.serviceEnabled') }}:</dt> |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 154 | <dd>{{ dataFormatter(item.serialConsoleEnabled) }}</dd> |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 155 | </dl> |
| 156 | </b-col> |
| 157 | </b-row> |
| 158 | </b-container> |
| 159 | </template> |
| 160 | </b-table> |
| 161 | </page-section> |
| 162 | </template> |
| 163 | |
| 164 | <script> |
| 165 | import PageSection from '@/components/Global/PageSection'; |
| 166 | import IconChevron from '@carbon/icons-vue/es/chevron--down/20'; |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 167 | import StatusIcon from '@/components/Global/StatusIcon'; |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 168 | import BVToastMixin from '@/components/Mixins/BVToastMixin'; |
SurenNeware | ba91c49 | 2020-10-27 14:18:54 +0530 | [diff] [blame] | 169 | import TableRowExpandMixin, { |
| 170 | expandRowLabel, |
| 171 | } from '@/components/Mixins/TableRowExpandMixin'; |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 172 | import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 173 | |
| 174 | export default { |
| 175 | components: { IconChevron, PageSection, StatusIcon }, |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 176 | mixins: [BVToastMixin, TableRowExpandMixin, DataFormatterMixin], |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 177 | data() { |
| 178 | return { |
Kenneth Fullbright | 4105785 | 2021-12-27 16:19:37 -0600 | [diff] [blame] | 179 | isBusy: true, |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 180 | fields: [ |
| 181 | { |
| 182 | key: 'expandRow', |
| 183 | label: '', |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 184 | tdClass: 'table-row-expand', |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 185 | }, |
| 186 | { |
| 187 | key: 'id', |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 188 | label: this.$t('pageInventory.table.id'), |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 189 | formatter: this.dataFormatter, |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 190 | }, |
| 191 | { |
| 192 | key: 'health', |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 193 | label: this.$t('pageInventory.table.health'), |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 194 | formatter: this.dataFormatter, |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 195 | }, |
| 196 | { |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 197 | key: 'locationNumber', |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 198 | label: this.$t('pageInventory.table.locationNumber'), |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 199 | formatter: this.dataFormatter, |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 200 | }, |
| 201 | { |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 202 | key: 'identifyLed', |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 203 | label: this.$t('pageInventory.table.identifyLed'), |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 204 | formatter: this.dataFormatter, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 205 | }, |
| 206 | ], |
SurenNeware | ba91c49 | 2020-10-27 14:18:54 +0530 | [diff] [blame] | 207 | expandRowLabel: expandRowLabel, |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 208 | }; |
| 209 | }, |
| 210 | computed: { |
| 211 | bmc() { |
| 212 | return this.$store.getters['bmc/bmc']; |
| 213 | }, |
| 214 | items() { |
| 215 | if (this.bmc) { |
| 216 | return [this.bmc]; |
| 217 | } else { |
| 218 | return []; |
| 219 | } |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 220 | }, |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 221 | }, |
| 222 | created() { |
| 223 | this.$store.dispatch('bmc/getBmcInfo').finally(() => { |
Gunnar Mills | defc9e2 | 2020-07-07 20:29:03 -0500 | [diff] [blame] | 224 | // Emit initial data fetch complete to parent component |
Sukanya Pandey | edb8a77 | 2020-10-29 11:33:42 +0530 | [diff] [blame] | 225 | this.$root.$emit('hardware-status-bmc-manager-complete'); |
Kenneth Fullbright | 4105785 | 2021-12-27 16:19:37 -0600 | [diff] [blame] | 226 | this.isBusy = false; |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 227 | }); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 228 | }, |
Sandeepa Singh | 78b6b53 | 2021-04-09 18:08:22 +0530 | [diff] [blame] | 229 | methods: { |
| 230 | toggleIdentifyLedValue(row) { |
| 231 | this.$store |
| 232 | .dispatch('bmc/updateIdentifyLedValue', { |
| 233 | uri: row.uri, |
| 234 | identifyLed: row.identifyLed, |
| 235 | }) |
| 236 | .catch(({ message }) => this.errorToast(message)); |
| 237 | }, |
| 238 | // TO DO: remove hasIdentifyLed method once the following story is merged: |
| 239 | // https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/43179 |
| 240 | hasIdentifyLed(identifyLed) { |
| 241 | return typeof identifyLed === 'boolean'; |
| 242 | }, |
| 243 | }, |
Yoshie Muranaka | 54c6bfc | 2020-06-12 08:29:42 -0700 | [diff] [blame] | 244 | }; |
| 245 | </script> |