summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim Zakharov <m.zakharov@IBS.RU>2022-09-02 16:41:27 +0300
committerMaksim Zakharov <m.zakharov@IBS.RU>2022-09-02 16:52:13 +0300
commitb9e77856d0222f51ad0c53d1fad22493ed32e47d (patch)
treec1830aaa53f7b1f4f517e951b8fef955c41b0350
parent23f1872e87fe65f2cea1ebcef3b544421be09e03 (diff)
downloadwebui-vue-b9e77856d0222f51ad0c53d1fad22493ed32e47d.tar.xz
update pci logic
-rw-r--r--src/store/index.js2
-rw-r--r--src/store/modules/HardwareStatus/PciStore.js6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/store/index.js b/src/store/index.js
index c12f1358..a4dd16ed 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -72,7 +72,7 @@ export default new Vuex.Store({
policies: PoliciesStore,
factoryReset: FactoryResetStore,
keyClear: KeyClearStore,
- pci: PciStore,
+ pciStore: PciStore,
},
plugins: [WebSocketPlugin],
});
diff --git a/src/store/modules/HardwareStatus/PciStore.js b/src/store/modules/HardwareStatus/PciStore.js
index 9f76e69d..fafd0923 100644
--- a/src/store/modules/HardwareStatus/PciStore.js
+++ b/src/store/modules/HardwareStatus/PciStore.js
@@ -37,8 +37,8 @@ const PciStore = {
});
if (data.length > 1) {
state.pci[index].Functions = functions;
+ state.pci[index].DeviceName = functions[0].DeviceName;
} else {
- console.log('state.inedex', state.pci[index]);
state.pci[index].Functions = functions[0];
state.pci[index].DeviceName = functions[0].DeviceName;
}
@@ -60,9 +60,9 @@ const PciStore = {
commit('setPciDevises', response);
return response;
})
- .then((res) => {
+ .then(async (res) => {
// get functions data
- api
+ await api
.get(res.data.PCIeFunctions['@odata.id'])
.then((res) => {
const responses = res.data.Members.map((item) => {