summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/configurationApp/src/models
diff options
context:
space:
mode:
authorAijana Schumann <aijana.schumann@highstreet-technologies.com>2020-12-04 17:40:42 +0100
committerAijana S <aijana.schumann@highstreet-technologies.com>2020-12-07 14:52:03 +0000
commite3ad1d3884cb4c801679e3390088ce17c997f9d1 (patch)
treef9327486345ca79303916c30a8e79f696cbfdd80 /sdnr/wt/odlux/apps/configurationApp/src/models
parent57c041563b4419b9cb3868507a508e24c5eee04d (diff)
Update ConfigurationApp
Add grouping per yang module Issue-ID: CCSDK-3023 Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com> Change-Id: I7fd15d0a7dc982c6d824e679b5a0d1eeaaa2e7a8
Diffstat (limited to 'sdnr/wt/odlux/apps/configurationApp/src/models')
-rw-r--r--sdnr/wt/odlux/apps/configurationApp/src/models/uiModels.ts17
-rw-r--r--sdnr/wt/odlux/apps/configurationApp/src/models/yang.ts8
2 files changed, 24 insertions, 1 deletions
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/models/uiModels.ts b/sdnr/wt/odlux/apps/configurationApp/src/models/uiModels.ts
index a5a52fc2e..9c03bdf9b 100644
--- a/sdnr/wt/odlux/apps/configurationApp/src/models/uiModels.ts
+++ b/sdnr/wt/odlux/apps/configurationApp/src/models/uiModels.ts
@@ -19,6 +19,8 @@
export type ViewElementBase = {
"id": string;
"label": string;
+ "module": string;
+ "path": string;
"config": boolean;
"ifFeature"?: string;
"when"?: string;
@@ -52,6 +54,14 @@ export type ViewElementString = ViewElementBase & {
"invertMatch"?: true;
}
+// special case derived from
+export type ViewElementDate = ViewElementBase & {
+ "uiType": "date";
+ "pattern"?: Expression<RegExp>;
+ "length"?: Expression<YangRange>;
+ "invertMatch"?: true;
+}
+
// https://tools.ietf.org/html/rfc7950#section-9.3
export type ViewElementNumber = ViewElementBase & {
"uiType": "number";
@@ -134,6 +144,7 @@ export type ViewElement =
| ViewElementBits
| ViewElementBinary
| ViewElementString
+ | ViewElementDate
| ViewElementNumber
| ViewElementBoolean
| ViewElementObject
@@ -145,7 +156,11 @@ export type ViewElement =
| ViewElementRpc;
export const isViewElementString = (viewElement: ViewElement): viewElement is ViewElementString => {
- return viewElement && viewElement.uiType === "string";
+ return viewElement && (viewElement.uiType === "string" || viewElement.uiType === "date");
+}
+
+export const isViewElementDate = (viewElement: ViewElement): viewElement is ViewElementDate => {
+ return viewElement && (viewElement.uiType === "date");
}
export const isViewElementNumber = (viewElement: ViewElement): viewElement is ViewElementNumber => {
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/models/yang.ts b/sdnr/wt/odlux/apps/configurationApp/src/models/yang.ts
index 11eb44d92..e4ab6f59f 100644
--- a/sdnr/wt/odlux/apps/configurationApp/src/models/yang.ts
+++ b/sdnr/wt/odlux/apps/configurationApp/src/models/yang.ts
@@ -17,6 +17,13 @@
*/
import { ViewElement, ViewSpecification } from "./uiModels";
+import { StepLabel } from "@material-ui/core";
+
+export enum ModuleState {
+ stable,
+ instable,
+ unabaliabe,
+}
export type Token = {
name: string;
@@ -50,6 +57,7 @@ export type Module = {
name: string;
namespace?: string;
prefix?: string;
+ state: ModuleState;
identities: { [name: string]: Identity };
revisions: { [version: string]: Revision };
imports: { [prefix: string]: string };