aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/configurationApp/src/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/apps/configurationApp/src/handlers')
-rw-r--r--sdnr/wt/odlux/apps/configurationApp/src/handlers/configurationAppRootHandler.ts8
-rw-r--r--sdnr/wt/odlux/apps/configurationApp/src/handlers/connectedNetworkElementsHandler.ts6
-rw-r--r--sdnr/wt/odlux/apps/configurationApp/src/handlers/deviceDescriptionHandler.ts22
-rw-r--r--sdnr/wt/odlux/apps/configurationApp/src/handlers/valueSelectorHandler.ts20
-rw-r--r--sdnr/wt/odlux/apps/configurationApp/src/handlers/viewDescriptionHandler.ts20
5 files changed, 39 insertions, 37 deletions
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/handlers/configurationAppRootHandler.ts b/sdnr/wt/odlux/apps/configurationApp/src/handlers/configurationAppRootHandler.ts
index 1af699a6b..9cbd9163e 100644
--- a/sdnr/wt/odlux/apps/configurationApp/src/handlers/configurationAppRootHandler.ts
+++ b/sdnr/wt/odlux/apps/configurationApp/src/handlers/configurationAppRootHandler.ts
@@ -19,9 +19,9 @@
import { combineActionHandler } from '../../../../framework/src/flux/middleware';
import { IConnectedNetworkElementsState, connectedNetworkElementsActionHandler } from './connectedNetworkElementsHandler';
-import { IDeviceDescriptionState, deviceDescriptionHandler } from "./deviceDescriptionHandler";
-import { IViewDescriptionState, viewDescriptionHandler } from "./viewDescriptionHandler";
-import { IValueSelectorState, valueSelectorHandler } from "./valueSelectorHandler";
+import { IDeviceDescriptionState, deviceDescriptionHandler } from './deviceDescriptionHandler';
+import { IViewDescriptionState, viewDescriptionHandler } from './viewDescriptionHandler';
+import { IValueSelectorState, valueSelectorHandler } from './valueSelectorHandler';
interface IConfigurationAppStoreState {
connectedNetworkElements: IConnectedNetworkElementsState; // used for ne selection
@@ -32,7 +32,7 @@ interface IConfigurationAppStoreState {
declare module '../../../../framework/src/store/applicationStore' {
interface IApplicationStoreState {
- configuration: IConfigurationAppStoreState,
+ configuration: IConfigurationAppStoreState;
}
}
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/handlers/connectedNetworkElementsHandler.ts b/sdnr/wt/odlux/apps/configurationApp/src/handlers/connectedNetworkElementsHandler.ts
index 8ca8fdf27..d2863dd2e 100644
--- a/sdnr/wt/odlux/apps/configurationApp/src/handlers/connectedNetworkElementsHandler.ts
+++ b/sdnr/wt/odlux/apps/configurationApp/src/handlers/connectedNetworkElementsHandler.ts
@@ -25,8 +25,8 @@ import { restService } from '../services/restServices';
export interface IConnectedNetworkElementsState extends IExternalTableState<NetworkElementConnection> { }
-// create eleactic search material data fetch handler
-const connectedNetworkElementsSearchHandler = createSearchDataHandler<NetworkElementConnection>('network-element-connection', false, { status: "Connected" });
+// create elastic search material data fetch handler
+const connectedNetworkElementsSearchHandler = createSearchDataHandler<NetworkElementConnection>('network-element-connection', false, { status: 'Connected' });
export const {
actionHandler: connectedNetworkElementsActionHandler,
@@ -41,5 +41,5 @@ export const {
const neUrl = restService.getNetworkElementUri(ne.id);
const policy = getAccessPolicyByUrl(neUrl);
return !(policy.GET && policy.POST);
- }
+ },
);
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/handlers/deviceDescriptionHandler.ts b/sdnr/wt/odlux/apps/configurationApp/src/handlers/deviceDescriptionHandler.ts
index 408399da4..cd01b0988 100644
--- a/sdnr/wt/odlux/apps/configurationApp/src/handlers/deviceDescriptionHandler.ts
+++ b/sdnr/wt/odlux/apps/configurationApp/src/handlers/deviceDescriptionHandler.ts
@@ -16,23 +16,23 @@
* ============LICENSE_END==========================================================================
*/
-import { Module } from "../models/yang";
-import { ViewSpecification } from "../models/uiModels";
-import { IActionHandler } from "../../../../framework/src/flux/action";
-import { UpdateDeviceDescription } from "../actions/deviceActions";
+import { Module } from '../models/yang';
+import { ViewSpecification } from '../models/uiModels';
+import { IActionHandler } from '../../../../framework/src/flux/action';
+import { UpdateDeviceDescription } from '../actions/deviceActions';
export interface IDeviceDescriptionState {
- nodeId: string,
+ nodeId: string;
modules: {
- [name: string]: Module
- },
- views: ViewSpecification[],
+ [name: string]: Module;
+ };
+ views: ViewSpecification[];
}
const deviceDescriptionStateInit: IDeviceDescriptionState = {
- nodeId: "",
+ nodeId: '',
modules: {},
- views: []
+ views: [],
};
export const deviceDescriptionHandler: IActionHandler<IDeviceDescriptionState> = (state = deviceDescriptionStateInit, action) => {
@@ -41,7 +41,7 @@ export const deviceDescriptionHandler: IActionHandler<IDeviceDescriptionState> =
...state,
nodeId: action.nodeId,
modules: action.modules,
- views: action.views
+ views: action.views,
};
}
return state;
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/handlers/valueSelectorHandler.ts b/sdnr/wt/odlux/apps/configurationApp/src/handlers/valueSelectorHandler.ts
index 5b2d55ee2..70d5eb253 100644
--- a/sdnr/wt/odlux/apps/configurationApp/src/handlers/valueSelectorHandler.ts
+++ b/sdnr/wt/odlux/apps/configurationApp/src/handlers/valueSelectorHandler.ts
@@ -16,9 +16,9 @@
* ============LICENSE_END==========================================================================
*/
-import { IActionHandler } from "../../../../framework/src/flux/action";
-import { ViewSpecification } from "../models/uiModels";
-import { EnableValueSelector, SetSelectedValue, UpdateDeviceDescription, SetCollectingSelectionData, UpdatViewDescription, UpdatOutputData } from "../actions/deviceActions";
+import { IActionHandler } from '../../../../framework/src/flux/action';
+import { ViewSpecification } from '../models/uiModels';
+import { EnableValueSelector, SetSelectedValue, UpdateDeviceDescription, SetCollectingSelectionData, UpdateViewDescription, UpdateOutputData } from '../actions/deviceActions';
export interface IValueSelectorState {
collectingData: boolean;
@@ -28,13 +28,13 @@ export interface IValueSelectorState {
onValueSelected: (value: any) => void;
}
-const nc = (val: React.SyntheticEvent) => { };
+const dummyFunc = () => { };
const valueSelectorStateInit: IValueSelectorState = {
collectingData: false,
keyProperty: undefined,
listSpecification: null,
listData: [],
- onValueSelected: nc,
+ onValueSelected: dummyFunc,
};
export const valueSelectorHandler: IActionHandler<IValueSelectorState> = (state = valueSelectorStateInit, action) => {
@@ -53,22 +53,24 @@ export const valueSelectorHandler: IActionHandler<IValueSelectorState> = (state
listData: action.listData,
};
} else if (action instanceof SetSelectedValue) {
- state.keyProperty && state.onValueSelected(action.value[state.keyProperty]);
+ if (state.keyProperty) {
+ state.onValueSelected(action.value[state.keyProperty]);
+ }
state = {
...state,
collectingData: false,
keyProperty: undefined,
listSpecification: null,
- onValueSelected: nc,
+ onValueSelected: dummyFunc,
listData: [],
};
- } else if (action instanceof UpdateDeviceDescription || action instanceof UpdatViewDescription || action instanceof UpdatOutputData) {
+ } else if (action instanceof UpdateDeviceDescription || action instanceof UpdateViewDescription || action instanceof UpdateOutputData) {
state = {
...state,
collectingData: false,
keyProperty: undefined,
listSpecification: null,
- onValueSelected: nc,
+ onValueSelected: dummyFunc,
listData: [],
};
}
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/handlers/viewDescriptionHandler.ts b/sdnr/wt/odlux/apps/configurationApp/src/handlers/viewDescriptionHandler.ts
index ff85a97ea..39b47be84 100644
--- a/sdnr/wt/odlux/apps/configurationApp/src/handlers/viewDescriptionHandler.ts
+++ b/sdnr/wt/odlux/apps/configurationApp/src/handlers/viewDescriptionHandler.ts
@@ -16,18 +16,18 @@
* ============LICENSE_END==========================================================================
*/
-import { IActionHandler } from "../../../../framework/src/flux/action";
+import { IActionHandler } from '../../../../framework/src/flux/action';
-import { UpdatViewDescription, UpdatOutputData } from "../actions/deviceActions";
-import { ViewSpecification } from "../models/uiModels";
+import { UpdateViewDescription, UpdateOutputData } from '../actions/deviceActions';
+import { ViewSpecification } from '../models/uiModels';
export enum DisplayModeType {
doNotDisplay = 0,
displayAsObject = 1,
displayAsList = 2,
displayAsRPC = 3,
- displayAsMessage = 4
-};
+ displayAsMessage = 4,
+}
export type DisplaySpecification = {
displayMode: DisplayModeType.doNotDisplay;
@@ -45,13 +45,13 @@ export type DisplaySpecification = {
} | {
displayMode: DisplayModeType.displayAsMessage;
renderMessage: string;
-}
+};
export interface IViewDescriptionState {
vPath: string | null;
displaySpecification: DisplaySpecification;
- viewData: any,
- outputData?: any,
+ viewData: any;
+ outputData?: any;
}
const viewDescriptionStateInit: IViewDescriptionState = {
@@ -64,7 +64,7 @@ const viewDescriptionStateInit: IViewDescriptionState = {
};
export const viewDescriptionHandler: IActionHandler<IViewDescriptionState> = (state = viewDescriptionStateInit, action) => {
- if (action instanceof UpdatViewDescription) {
+ if (action instanceof UpdateViewDescription) {
state = {
...state,
vPath: action.vPath,
@@ -72,7 +72,7 @@ export const viewDescriptionHandler: IActionHandler<IViewDescriptionState> = (st
outputData: undefined,
displaySpecification: action.displaySpecification,
};
- } else if (action instanceof UpdatOutputData) {
+ } else if (action instanceof UpdateOutputData) {
state = {
...state,
outputData: action.outputData,