diff options
author | 2021-04-08 12:39:48 +0000 | |
---|---|---|
committer | 2021-04-08 12:39:48 +0000 | |
commit | d702f00b71218c56af766363ce19f2459081d73c (patch) | |
tree | fafd0b1b622473745bebd767ccab55382d79b5df /sdnr/wt/odlux/apps/configurationApp/src/handlers/connectedNetworkElementsHandler.ts | |
parent | f3969004c6ccac18e742c5fc48c844e315991023 (diff) | |
parent | 21e4a946cd24b8a03ea577352f0271ebf7669ffa (diff) |
Merge "update odlux for notification change"
Diffstat (limited to 'sdnr/wt/odlux/apps/configurationApp/src/handlers/connectedNetworkElementsHandler.ts')
-rw-r--r-- | sdnr/wt/odlux/apps/configurationApp/src/handlers/connectedNetworkElementsHandler.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/handlers/connectedNetworkElementsHandler.ts b/sdnr/wt/odlux/apps/configurationApp/src/handlers/connectedNetworkElementsHandler.ts index e6b808b80..02f2929cd 100644 --- a/sdnr/wt/odlux/apps/configurationApp/src/handlers/connectedNetworkElementsHandler.ts +++ b/sdnr/wt/odlux/apps/configurationApp/src/handlers/connectedNetworkElementsHandler.ts @@ -18,8 +18,10 @@ import { createExternal, IExternalTableState } from '../../../../framework/src/components/material-table/utilities'; import { createSearchDataHandler } from '../../../../framework/src/utilities/elasticSearch'; +import { getAccessPolicyByUrl } from '../../../../framework/src/services/restService'; import { NetworkElementConnection } from '../models/networkElementConnection'; +import { restService } from '../services/restServices'; export interface IConnectedNetworkElementsState extends IExternalTableState<NetworkElementConnection> { } @@ -33,4 +35,11 @@ export const { reloadAction: connectedNetworkElementsReloadAction, // set value action, to change a value -} = createExternal<NetworkElementConnection>(connectedNetworkElementsSearchHandler, appState => appState.configuration.connectedNetworkElements); +} = createExternal<NetworkElementConnection>(connectedNetworkElementsSearchHandler, appState => appState.configuration.connectedNetworkElements, + (ne) => { + if (!ne || !ne.id) return true; + const neUrl = restService.getNetworkElementUri(ne.id); + const policy = getAccessPolicyByUrl(neUrl); + return !(policy.GET && policy.POST); + } +); |