diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/view.json index add594e..f0787b1 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/view.json @@ -1,18 +1,32 @@ { "custom": { - "MCM": "", - "currentTable": "ACTIVE" + "MCM": 1, + "currentTable": "ACTIVE", + "page": "", + "view": "" }, "params": {}, "propConfig": { "custom.MCM": { + "binding": { + "config": { + "expression": "if({view.custom.view} !\u003d \"\", {view.custom.view}, {view.custom.page})" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.currentTable": { + "persistent": true + }, + "custom.page": { "binding": { "config": { "path": "page.props.path" }, "transforms": [ { - "code": "\tpath \u003d value\n\ttry:\n\t\tif \"MCM\" in path:\n\t\t\tindex \u003d path.find(\"MCM\")\n\t\t\treturn path[index:index+5] # MCM + 2 digits\n\texcept:\n\t\t\tpass\n\treturn \"\"\n\t", + "code": "\ttry:\n\t\tif \"MCM\" in value:\n\t\t\tindex \u003d value.find(\"MCM\")\n\t\t\treturn value[index:index+5] # MCM + 2 digits\n\texcept:\n\t\t\tpass\n\treturn \"\"", "type": "script" } ], @@ -20,7 +34,19 @@ }, "persistent": true }, - "custom.currentTable": { + "custom.view": { + "binding": { + "config": { + "path": "page.props.primaryView" + }, + "transforms": [ + { + "code": "\ttry:\n\t\tif \"MCM\" in value:\n\t\t\tindex \u003d value.find(\"MCM\")\n\t\t\treturn value[index:index+5] # MCM + 2 digits\n\texcept:\n\t\t\tpass\n\treturn \"\"", + "type": "script" + } + ], + "type": "property" + }, "persistent": true } },