diff options
author | Grzegorz Raguza <grzegorzx.raguza@intel.com> | 2021-09-03 20:56:54 +0300 |
---|---|---|
committer | Gunnar Mills <gmills@us.ibm.com> | 2021-09-21 22:39:22 +0300 |
commit | c9cb8d433b7ed5f4d37cd8d946c2593d4d886ce1 (patch) | |
tree | 2e6d6117f9d7733b62dcf06509e22086fa0957f2 | |
parent | 9f61234ab2e8beea6ebe1f2e9dc445cd3521a0e4 (diff) | |
download | webui-vue-c9cb8d433b7ed5f4d37cd8d946c2593d4d886ce1.tar.xz |
Change filtering virtual media
When Virtual Media image was configured and connected entry
did not appear on the UI after opening in the new tab or
after page refresh. The cause was filtering predicate.
Proxy devices has transferProtocolType eq to 'OEM',
legacy the onces that has no transferProtocolType. For
mouting from the share the property exists and has value of
'CIFS'. I added object with all protocols (see docs), and
change the filtering for legacy devices. New condition is
all accept 'OEM'.
Signed-off-by: Grzegorz Raguza <grzegorzx.raguza@intel.com>
Change-Id: I7ba123f19f924536f131ec40d15715b7f50fc985
-rw-r--r-- | src/store/modules/Operations/VirtualMediaStore.js | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/store/modules/Operations/VirtualMediaStore.js b/src/store/modules/Operations/VirtualMediaStore.js index 7c183b0e..3ae08a11 100644 --- a/src/store/modules/Operations/VirtualMediaStore.js +++ b/src/store/modules/Operations/VirtualMediaStore.js @@ -1,6 +1,18 @@ import api from '@/store/api'; import i18n from '@/i18n'; +const transferProtocolType = { + CIFS: 'CIFS', + FTP: 'FTP', + SFTP: 'SFTP', + HTTP: 'HTTP', + HTTPS: 'HTTPS', + NFS: 'NFS', + SCP: 'SCP', + TFTP: 'TFTP', + OEM: 'OEM', +}; + const VirtualMediaStore = { namespaced: true, state: { @@ -29,7 +41,7 @@ const VirtualMediaStore = { id: i18n.t('pageVirtualMedia.defaultDeviceName'), websocket: '/vm/0/0', file: null, - transferProtocolType: 'OEM', + transferProtocolType: transferProtocolType.OEM, isActive: false, }; commit('setProxyDevicesData', [device]); @@ -53,7 +65,7 @@ const VirtualMediaStore = { }; }); const proxyDevices = deviceData - .filter((d) => d.transferProtocolType === 'OEM') + .filter((d) => d.transferProtocolType === transferProtocolType.OEM) .map((device) => { return { ...device, @@ -61,7 +73,7 @@ const VirtualMediaStore = { }; }); const legacyDevices = deviceData - .filter((d) => !d.transferProtocolType) + .filter((d) => d.transferProtocolType !== transferProtocolType.OEM) .map((device) => { return { ...device, |