diff options
author | SurenNeware <sneware9@in.ibm.com> | 2020-04-01 11:37:27 +0300 |
---|---|---|
committer | Derick Montague <derick.montague@ibm.com> | 2020-05-20 20:41:11 +0300 |
commit | 090c2d44c47f4f68dd70c4c60b576542d7979836 (patch) | |
tree | 7847747e429eba932f127335ebd573808b14ec4c /src/views/Control | |
parent | 1057b1d7cfd1ac6138dcd77c5f1d514a4d884c5d (diff) | |
download | webui-vue-090c2d44c47f4f68dd70c4c60b576542d7979836.tar.xz |
Add ServerLED page
Added ability to turn on/off Indicator LED.
Signed-off-by: Suren Neware <sneware9@in.ibm.com>
Change-Id: Ia59eb0214530906dea840ff18ff22fc913870bb9
Diffstat (limited to 'src/views/Control')
-rw-r--r-- | src/views/Control/ServerLed/ServerLed.vue | 52 | ||||
-rw-r--r-- | src/views/Control/ServerLed/index.js | 2 |
2 files changed, 54 insertions, 0 deletions
diff --git a/src/views/Control/ServerLed/ServerLed.vue b/src/views/Control/ServerLed/ServerLed.vue new file mode 100644 index 00000000..1b1c24ab --- /dev/null +++ b/src/views/Control/ServerLed/ServerLed.vue @@ -0,0 +1,52 @@ +<template> + <b-container fluid="xl"> + <page-title /> + <b-row> + <b-col md="12"> + <page-section :section-title="$t('pageServerLed.serverLedTitle')"> + <b-form-group :label="$t('pageServerLed.serverLedSubTitle')"> + <b-form-checkbox + v-model="indicatorLED" + name="check-button" + value="Lit" + unchecked-value="Off" + switch + > + <span v-if="indicatorLED !== 'Off' && indicatorLED"> + {{ $t('global.status.on') }} + </span> + <span v-else> + {{ $t('global.status.off') }} + </span> + </b-form-checkbox> + </b-form-group> + </page-section> + </b-col> + </b-row> + </b-container> +</template> + +<script> +import PageTitle from '../../../components/Global/PageTitle'; +import PageSection from '../../../components/Global/PageSection'; + +export default { + name: 'ServerLed', + components: { PageTitle, PageSection }, + computed: { + indicatorLED: { + get() { + return this.$store.getters['serverLed/getIndicatorValue']; + }, + set(newValue) { + if (newValue) { + this.$store.dispatch('serverLed/saveIndicatorLedValue', newValue); + } + } + } + }, + created() { + this.$store.dispatch('serverLed/getIndicatorValue'); + } +}; +</script> diff --git a/src/views/Control/ServerLed/index.js b/src/views/Control/ServerLed/index.js new file mode 100644 index 00000000..1926dae8 --- /dev/null +++ b/src/views/Control/ServerLed/index.js @@ -0,0 +1,2 @@ +import ServerLed from './ServerLed.vue'; +export default ServerLed; |