summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYoshie Muranaka <yoshiemuranaka@gmail.com>2020-04-27 20:12:15 +0300
committerGunnar Mills <gmills@us.ibm.com>2020-05-01 16:34:53 +0300
commitf7aa7f9c8abe8480edfdf758ec25b26032e759a2 (patch)
tree64091e4f3006280f2a1b911c5e18023008127da5 /src
parent881ddc4111d0025123ce3898044d373a2eb329cf (diff)
downloadwebui-vue-f7aa7f9c8abe8480edfdf758ec25b26032e759a2.tar.xz
Remove hostname D-Bus request
Hostname is available in NetworkSettingsStore using redfish api. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I26c26281ca8d9003d2daaed13d6bbd4db6ed700c
Diffstat (limited to 'src')
-rw-r--r--src/locales/en-US.json1
-rw-r--r--src/store/modules/GlobalStore.js12
-rw-r--r--src/views/Control/ServerPowerOperations/ServerPowerOperations.vue12
-rw-r--r--src/views/Overview/Overview.vue2
4 files changed, 1 insertions, 26 deletions
diff --git a/src/locales/en-US.json b/src/locales/en-US.json
index d44cc072..d62ff326 100644
--- a/src/locales/en-US.json
+++ b/src/locales/en-US.json
@@ -238,7 +238,6 @@
},
"pageServerPowerOperations": {
"currentStatus": "Current status",
- "hostname": "Hostname",
"hostOsBootSettings": "Host OS boot settings",
"hostStatus": "Host status",
"immediateReboot": "Immediate – Server reboots without OS shutting down; may cause data corruption",
diff --git a/src/store/modules/GlobalStore.js b/src/store/modules/GlobalStore.js
index 83b5432e..c9e92a76 100644
--- a/src/store/modules/GlobalStore.js
+++ b/src/store/modules/GlobalStore.js
@@ -27,31 +27,19 @@ const hostStateMapper = hostState => {
const GlobalStore = {
namespaced: true,
state: {
- hostName: '--',
bmcTime: null,
hostStatus: 'unreachable'
},
getters: {
- hostName: state => state.hostName,
hostStatus: state => state.hostStatus,
bmcTime: state => state.bmcTime
},
mutations: {
- setHostName: (state, hostName) => (state.hostName = hostName),
setBmcTime: (state, bmcTime) => (state.bmcTime = bmcTime),
setHostStatus: (state, hostState) =>
(state.hostStatus = hostStateMapper(hostState))
},
actions: {
- getHostName({ commit }) {
- api
- .get('/xyz/openbmc_project/network/config/attr/HostName')
- .then(response => {
- const hostName = response.data.data;
- commit('setHostName', hostName);
- })
- .catch(error => console.log(error));
- },
getBmcTime({ commit }) {
api
.get('/redfish/v1/Managers/bmc')
diff --git a/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue b/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue
index 4efaebc6..01fc661e 100644
--- a/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue
+++ b/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue
@@ -1,16 +1,12 @@
<template>
<b-container fluid="xl">
<page-title />
- <b-row>
+ <b-row class="mb-4">
<b-col md="8" xl="6">
<page-section
:section-title="$t('pageServerPowerOperations.currentStatus')"
>
<dl>
- <dt>{{ $t('pageServerPowerOperations.hostname') }}</dt>
- <dd>{{ hostname }}</dd>
- </dl>
- <dl>
<dt>{{ $t('pageServerPowerOperations.hostStatus') }}</dt>
<dd v-if="hostStatus === 'on'">
{{ $t('global.status.on') }}
@@ -129,9 +125,6 @@ export default {
hostStatus() {
return this.$store.getters['global/hostStatus'];
},
- hostname() {
- return this.$store.getters['global/hostName'];
- },
isOperationInProgress() {
return this.$store.getters['controls/isOperationInProgress'];
},
@@ -139,9 +132,6 @@ export default {
return this.$store.getters['hostBootSettings/overrideEnabled'];
}
},
- created() {
- this.$store.dispatch('global/getHostName');
- },
methods: {
powerOn() {
this.$store.dispatch('controls/hostPowerOn');
diff --git a/src/views/Overview/Overview.vue b/src/views/Overview/Overview.vue
index 3c55a8ca..bf8e2132 100644
--- a/src/views/Overview/Overview.vue
+++ b/src/views/Overview/Overview.vue
@@ -106,7 +106,6 @@ export default {
serverModel: state => state.overview.serverModel,
serverManufacturer: state => state.overview.serverManufacturer,
serverSerialNumber: state => state.overview.serverSerialNumber,
- hostName: state => state.global.hostName,
hostFirmwareVersion: state => state.firmware.hostFirmwareVersion,
bmcFirmwareVersion: state => state.firmware.bmcFirmwareVersion,
powerCapValue: state => state.powerControl.powerCapValue,
@@ -118,7 +117,6 @@ export default {
methods: {
getOverviewInfo() {
this.$store.dispatch('overview/getServerInfo');
- this.$store.dispatch('global/getHostName');
this.$store.dispatch('firmware/getBmcFirmware');
this.$store.dispatch('firmware/getHostFirmware');
this.$store.dispatch('powerControl/getPowerControl');