diff --git a/MTN6_SCADA/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuItem/view.json b/MTN6_SCADA/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuItem/view.json new file mode 100644 index 0000000..7186949 --- /dev/null +++ b/MTN6_SCADA/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuItem/view.json @@ -0,0 +1,172 @@ +{ + "custom": {}, + "params": { + "active": false, + "color": "", + "id": "", + "text": "hello world" + }, + "propConfig": { + "params.active": { + "paramDirection": "inout", + "persistent": true + }, + "params.color": { + "paramDirection": "input", + "persistent": true + }, + "params.id": { + "paramDirection": "input", + "persistent": true + }, + "params.text": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 28, + "width": 183 + } + }, + "root": { + "children": [ + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.sendMessage(\u0027activate-filter\u0027, payload \u003d {\u0027id\u0027:self.view.params.id}, scope \u003d \u0027page\u0027)\n\tself.view.params.active \u003d True " + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "AddButton" + }, + "position": { + "basis": "30px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "!{view.params.active}" + }, + "type": "expr" + } + }, + "props.color": { + "binding": { + "config": { + "path": "view.params.color" + }, + "type": "property" + } + } + }, + "props": { + "path": "material/add", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.display.icon" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.sendMessage(\u0027deactivate-filter\u0027, payload \u003d {\u0027id\u0027:self.view.params.id}, scope \u003d \u0027page\u0027)\n\tself.view.params.active \u003d False " + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "RemoveButton" + }, + "position": { + "basis": "30px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{view.params.active}" + }, + "type": "expr" + } + }, + "props.color": { + "binding": { + "config": { + "path": "view.params.color" + }, + "type": "property" + } + } + }, + "props": { + "path": "material/remove", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "FilterText" + }, + "position": { + "basis": "153px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.text" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Page/Text", + "fontSize": 12 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "root" + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "deactivate-filter", + "pageScope": true, + "script": "\t# implement your handler here\n\tif payload[\u0027id\u0027] \u003d\u003d self.view.params.id or payload[\u0027id\u0027] \u003d\u003d -1:\n\t\tself.view.params.active \u003d False", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Navigation-Views/Docked-West/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Navigation-Views/Docked-West/view.json index 33228b6..1736b3b 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Navigation-Views/Docked-West/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Navigation-Views/Docked-West/view.json @@ -414,7 +414,7 @@ "custom.filters_active": { "binding": { "config": { - "expression": "if(!{session.custom.alarm_filter.show_diagnostic} ||\r\n!{session.custom.alarm_filter.show_gateways} ||\r\n!{session.custom.alarm_filter.show_low_alarm} ||\r\n{session.custom.alarm_filter.orderby} ||\r\n!{session.custom.alarm_filter.show_running} ||\r\n!{session.custom.alarm_filter.show_safety}, \r\nTrue,\r\nFalse)\r\n" + "expression": "if(!{session.custom.alarm_filter.show_diagnostic} ||\r\n!{session.custom.alarm_filter.show_gateways} ||\r\n!{session.custom.alarm_filter.show_low_alarm} ||\r\n{session.custom.alarm_filter.orderby} ||\r\n!{session.custom.alarm_filter.show_running} ||\r\n!{session.custom.alarm_filter.show_fio} ||\r\n!{session.custom.alarm_filter.show_camera_jams} ||\r\n!{session.custom.alarm_filter.show_safety}, \r\nTrue,\r\nFalse)\r\n" }, "type": "expr" } diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/view.json index c1fbd32..952e6e3 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/view.json @@ -114,7 +114,7 @@ "props.selected": { "binding": { "config": { - "expression": "if({session.custom.alarm_filter.show_diagnostic} \u0026\u0026 \r\n{session.custom.alarm_filter.show_gateways} \u0026\u0026\r\n{session.custom.alarm_filter.show_low_alarm} \u0026\u0026\r\n{session.custom.alarm_filter.show_running} \u0026\u0026 \r\n{session.custom.alarm_filter.show_safety}, True, False)" + "expression": "if({session.custom.alarm_filter.show_diagnostic} \u0026\u0026 \r\n{session.custom.alarm_filter.show_gateways} \u0026\u0026\r\n{session.custom.alarm_filter.show_low_alarm} \u0026\u0026\r\n{session.custom.alarm_filter.show_running} \u0026\u0026\r\n{session.custom.alarm_filter.show_camera_jams} \u0026\u0026\r\n{session.custom.alarm_filter.show_fio} \u0026\u0026\r\n{session.custom.alarm_filter.show_safety}, True, False)" }, "type": "expr" }