From b9e77856d0222f51ad0c53d1fad22493ed32e47d Mon Sep 17 00:00:00 2001 From: Maksim Zakharov Date: Fri, 2 Sep 2022 16:41:27 +0300 Subject: update pci logic --- src/store/index.js | 2 +- src/store/modules/HardwareStatus/PciStore.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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) => { -- cgit v1.2.3