summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/configurationApp/src
diff options
context:
space:
mode:
authorAijana Schumann <aijana.schumann@highstreet-technologies.com>2021-12-06 15:09:15 +0100
committerAijana Schumann <aijana.schumann@highstreet-technologies.com>2021-12-06 15:12:24 +0100
commit152cb381ea2c915c762416092337ce1d8589d1c6 (patch)
tree63b71c8343f9292281f5d7f5eac14342fec06402 /sdnr/wt/odlux/apps/configurationApp/src
parent8ea94e1210671b941f84abfe16e248cfa086fe49 (diff)
Update ODLUX
Update login view, add logout after user session ends, add user settings, several bugfixes Issue-ID: CCSDK-3540 Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com> Change-Id: I21137756b204287e25766a9646bf2faf7bad9d35
Diffstat (limited to 'sdnr/wt/odlux/apps/configurationApp/src')
-rw-r--r--sdnr/wt/odlux/apps/configurationApp/src/actions/deviceActions.ts6
-rw-r--r--sdnr/wt/odlux/apps/configurationApp/src/handlers/viewDescriptionHandler.ts6
-rw-r--r--sdnr/wt/odlux/apps/configurationApp/src/views/configurationApplication.tsx13
3 files changed, 23 insertions, 2 deletions
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/actions/deviceActions.ts b/sdnr/wt/odlux/apps/configurationApp/src/actions/deviceActions.ts
index b5dd310bc..ac8aa0ac2 100644
--- a/sdnr/wt/odlux/apps/configurationApp/src/actions/deviceActions.ts
+++ b/sdnr/wt/odlux/apps/configurationApp/src/actions/deviceActions.ts
@@ -55,6 +55,12 @@ export const updateNodeIdAsyncActionCreator = (nodeId: string) => async (dispatc
const { availableCapabilities, unavailableCapabilities, importOnlyModules } = await restService.getCapabilitiesByMountId(nodeId);
if (!availableCapabilities || availableCapabilities.length <= 0) {
+ dispatch(new SetCollectingSelectionData(false));
+ dispatch(new UpdateDeviceDescription(nodeId, {}, []));
+ dispatch(new UpdatViewDescription("", [], {
+ displayMode: DisplayModeType.displayAsMessage,
+ renderMessage: `NetworkElement : "${nodeId}" has no capabilities.`
+ }));
throw new Error(`NetworkElement : [${nodeId}] has no capabilities.`);
}
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/handlers/viewDescriptionHandler.ts b/sdnr/wt/odlux/apps/configurationApp/src/handlers/viewDescriptionHandler.ts
index 7a9812bfd..ff85a97ea 100644
--- a/sdnr/wt/odlux/apps/configurationApp/src/handlers/viewDescriptionHandler.ts
+++ b/sdnr/wt/odlux/apps/configurationApp/src/handlers/viewDescriptionHandler.ts
@@ -25,7 +25,8 @@ export enum DisplayModeType {
doNotDisplay = 0,
displayAsObject = 1,
displayAsList = 2,
- displayAsRPC = 3
+ displayAsRPC = 3,
+ displayAsMessage = 4
};
export type DisplaySpecification = {
@@ -41,6 +42,9 @@ export type DisplaySpecification = {
inputViewSpecification?: ViewSpecification;
outputViewSpecification?: ViewSpecification;
dataPath?: string;
+} | {
+ displayMode: DisplayModeType.displayAsMessage;
+ renderMessage: string;
}
export interface IViewDescriptionState {
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/views/configurationApplication.tsx b/sdnr/wt/odlux/apps/configurationApp/src/views/configurationApplication.tsx
index 8d0e19246..b777cdbe5 100644
--- a/sdnr/wt/odlux/apps/configurationApp/src/views/configurationApplication.tsx
+++ b/sdnr/wt/odlux/apps/configurationApp/src/views/configurationApplication.tsx
@@ -265,6 +265,7 @@ class ConfigurationApplicationComponent extends React.Component<ConfigurationApp
viewData: nextProps.viewData || null,
[OldProps]: nextProps,
choises: nextProps.displaySpecification.displayMode === DisplayModeType.doNotDisplay
+ || nextProps.displaySpecification.displayMode === DisplayModeType.displayAsMessage
? null
: nextProps.displaySpecification.displayMode === DisplayModeType.displayAsRPC
? nextProps.displaySpecification.inputViewSpecification && ConfigurationApplicationComponent.getChoisesFromElements(nextProps.displaySpecification.inputViewSpecification.elements, nextProps.viewData) || []
@@ -843,12 +844,22 @@ class ConfigurationApplicationComponent extends React.Component<ConfigurationApp
? this.renderUIViewList(ds.viewSpecification, ds.dataPath!, ds.keyProperty!, ds.apidocPath!, viewData)
: ds.displayMode === DisplayModeType.displayAsRPC
? this.renderUIViewRPC(ds.inputViewSpecification, ds.dataPath!, viewData!, outputData, undefined, true, false)
- : this.renderUIViewSelector(ds.viewSpecification, ds.dataPath!, viewData!, ds.keyProperty, editMode, isNew)
+ : ds.displayMode === DisplayModeType.displayAsMessage
+ ? this.renderMessage(ds.renderMessage)
+ : this.renderUIViewSelector(ds.viewSpecification, ds.dataPath!, viewData!, ds.keyProperty, editMode, isNew)
}
</div >
);
}
+ private renderMessage(renderMessage: string) {
+ return (
+ <div className={this.props.classes.container}>
+ <h4>{renderMessage}</h4>
+ </div>
+ );
+ }
+
private renderCollectingData() {
return (
<div className={this.props.classes.outer}>