commit 7daf389f1cbc477b266587411c00930763a8bda6 Author: gigi.mamaladze@autStand.com Date: Tue Apr 8 12:16:15 2025 +0400 Created project diff --git a/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/build_url/code.py b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/build_url/code.py new file mode 100644 index 0000000..d311f3b --- /dev/null +++ b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/build_url/code.py @@ -0,0 +1,101 @@ +import datetime +import hashlib +import hmac + +import boto3 + +try: + from urllib.parse import quote_plus +except ImportError: + from urllib import quote_plus + + +def sign(key, msg): + return hmac.new(key, msg.encode("utf-8"), hashlib.sha256).digest() + + +def getSignatureKey(key, dateStamp, regionName, serviceName): + kDate = sign(("AWS4" + key).encode("utf-8"), dateStamp) + kRegion = sign(kDate, regionName) + kService = sign(kRegion, serviceName) + kSigning = sign(kService, "aws4_request") + return kSigning + + +def build_querystring(access_key, session_key, algorithm, amz_date, credential_scope): + query_strings = { + "X-Amz-Algorithm": algorithm, + "X-Amz-Credential": quote_plus(access_key + "/" + credential_scope), + "X-Amz-Date": amz_date, + #"X-Amz-Security-Token": quote_plus(session_key), + "X-Amz-SignedHeaders": "host", + } + keys = list(query_strings.keys()) + keys.sort() + query = [] + for key in keys: + query.append("{}={}".format(key, query_strings[key])) + + canonical_query_string = "&".join( + query + #["{}={}".format(key, value) for key, value in query_strings.items()] + ) + return canonical_query_string + + +def make_websocket_connection(api_id, region, stage, credentials): + method = "GET" + service = "execute-api" + host = "{}.{}.{}.amazonaws.com".format(api_id, service, region) + canonical_uri = "/{}".format(stage) + access_key = credentials["AccessKey"] + secret_key = credentials["SecretKey"] + session_key = credentials["SessionKey"] + now = datetime.datetime.utcnow() + + amz_date = now.strftime("%Y%m%dT%H%M%SZ") + datestamp = now.strftime("%Y%m%d") + canonical_headers = "host:" + host + "\n" + signed_headers = "host" + algorithm = "AWS4-HMAC-SHA256" + credential_scope = "/".join([datestamp, region, service, "aws4_request"]) + + canonical_querystring = build_querystring( + access_key, session_key, algorithm, amz_date, credential_scope + ) + payload_hash = hashlib.sha256(("").encode("utf-8")).hexdigest() + canonical_request = "\n".join( + [ + method, + canonical_uri, + "", + #canonical_querystring, + canonical_headers, + signed_headers, + payload_hash, + ] + ) + string_to_sign = "\n".join( + [ + algorithm, + amz_date, + credential_scope, + hashlib.sha256(canonical_request.encode("utf-8")).hexdigest(), + ] + ) + signing_key = getSignatureKey(secret_key, datestamp, region, service) + signature = hmac.new( + signing_key, string_to_sign.encode("utf-8"), hashlib.sha256 + ).hexdigest() + canonical_querystring += "&X-Amz-Signature=" + signature + request_url = "wss://{}/{}".format(host, stage) + auth_header = algorithm + " Credential=" + access_key + "/" + credential_scope + ", SignedHeaders=" + signed_headers + ", Signature=" + signature + #print('-H "Authorization":"' + auth_header +'" -H "X-Amz-Date":"' + amz_date + '" -H "X-Amz-Security-Token":"' + session_key + '" ') + request_headers = { + "Authorization":auth_header, + "X-Amz-Date": amz_date, + "X-Amz-Security-Token": session_key + } + return request_url, request_headers + + diff --git a/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/build_url/resource.json b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/build_url/resource.json new file mode 100644 index 0000000..58b68da --- /dev/null +++ b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/build_url/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol@amazon.co.uk", + "timestamp": "2022-07-04T10:32:46Z" + }, + "lastModificationSignature": "c6d362fd384c952e0c80ab7e63145e38bd4649796a935e38591861d391467c7d" + } +} \ No newline at end of file diff --git a/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/credentials/code.py b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/credentials/code.py new file mode 100644 index 0000000..cbf08c4 --- /dev/null +++ b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/credentials/code.py @@ -0,0 +1,43 @@ +import re, sys +import datetime +import base64 +import json +import com.amazonaws.services.s3.AmazonS3ClientBuilder as AmazonS3ClientBuilder +import com.amazonaws.auth.profile.ProfileCredentialsProvider as ProfileCredentialsProvider +import com.amazonaws.auth.AWSStaticCredentialsProvider as AWSStaticCredentialsProvider +import com.amazonaws.services.secretsmanager.AWSSecretsManagerClientBuilder as AWSSecretsManagerClientBuilder +import com.amazonaws.services.secretsmanager.model.GetSecretValueRequest as GetSecretValueRequest +import com.amazonaws.services.secretsmanager.model.AWSSecretsManagerException as AWSSecretsManagerException +import com.amazonaws.services.securitytoken.AWSSecurityTokenService as AWSSecurityTokenService ; +import com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClientBuilder as AWSSecurityTokenServiceClientBuilder; + + + + +# Constants + +class GetCredentials(): + ''' + Gets aws credentials for the provided path and region. + + ''' + + def __init__(self, path, profile, region): + self.path = path + self.profile = profile + self.region = region + self.credentials = self._get_credentials() +# self.client = self._get_s3_client() + + def _get_credentials(self): + '''Gets the credentials for the AWS account which the s3 bucket is in. + + Args: + + Returns: + credentials : The aws credentials for a given profile stored on the server. + ''' + credentials = ProfileCredentialsProvider(self.path, self.profile).getCredentials() + return credentials + + diff --git a/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/credentials/resource.json b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/credentials/resource.json new file mode 100644 index 0000000..55d8ba3 --- /dev/null +++ b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/credentials/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol@amazon.co.uk", + "timestamp": "2022-07-04T10:32:46Z" + }, + "lastModificationSignature": "ce24dfb3eb5265df488e4505cbdc17614b250f7af574fa7796bdbd68844f2025" + } +} \ No newline at end of file diff --git a/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/wbsckt_abort/code.py b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/wbsckt_abort/code.py new file mode 100644 index 0000000..816e70e --- /dev/null +++ b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/wbsckt_abort/code.py @@ -0,0 +1,19 @@ +import time + +def close_websckt(): + fc = system.tag.readBlocking(["Configuration/FC"]) + fc_value = fc[0].value + tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (fc_value) + system.tag.writeBlocking([tag_provider + "System/close_socket"],[1]) + time.sleep(1) + system.tag.writeBlocking([tag_provider + "System/close_socket"],[0]) + logger = system.util.getLogger("%s-Project-Update" % (fc)) + logger.info("Web-Socket closed due to project update") + +def check_web_socket(): + request_to_close = system.tag.readBlocking(["System/close_socket"]) + request_to_close_val = request_to_close[0].value + if request_to_close_val: + return True + else: + return False diff --git a/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/wbsckt_abort/resource.json b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/wbsckt_abort/resource.json new file mode 100644 index 0000000..cc340d6 --- /dev/null +++ b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/wbsckt_abort/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol@amazon.co.uk", + "timestamp": "2022-07-04T10:32:46Z" + }, + "lastModificationSignature": "4a029aaa7d282ec98ddba452bec4b87704b0263dd802521a8b94e9d7fc0b1d0e" + } +} \ No newline at end of file diff --git a/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/web_socket/code.py b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/web_socket/code.py new file mode 100644 index 0000000..3f28796 --- /dev/null +++ b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/web_socket/code.py @@ -0,0 +1,66 @@ +from java.net.http import HttpClient; +from java.net.http import WebSocket; +from java.net import URI +import json + + +class listener(WebSocket.Listener): + + def __init__(self,whid): + self.whid = whid + self.alarms = {} + self.tag_provider ="[%s_SCADA_TAG_PROVIDER]" % (self.whid) + self.logger = system.util.getLogger("%s-Web-Socket-Listener" % (whid)) + + def onOpen(self, websocket): + on_open_subscribe = json.dumps({"action":"subscribe", + "parameters":{"siteId":self.whid}} + ) + websocket.sendText(on_open_subscribe, True) + logger = system.util.getLogger("Web-Socket-OnOpen") + logger.info("message sent =" + str(on_open_subscribe)) + + + def onText(self, websocket, data, last): + # + alarm_message = None + + try: + json_data = json.loads(str(data)) + alarm_message = json_data.get("type") + + except ValueError as e: + self.logger.info("Unable to load Json object, malformed message") + + + if alarm_message == "alarm": + + + id = json_data.get("sourceId") + state = json_data.get("state") + + if state == 1: + removed_value = self.alarms.pop(id, "No key found") + + else: + self.alarms[id]= json_data + self.logger.info("this has been triggered") + self.logger.info("State is equal to " + str(state)) + system.tag.writeBlocking([self.tag_provider + "System/aws_data"], + [system.util.jsonEncode(self.alarms)] + ) + self.logger.info("Data written to tag : " + str(self.alarms)) + + self.logger.info("Response from server: " + str(data)) + websocket.request(1) +# return None + + def onClose(self, websocket, error): +# print("Socket is closed") +# logger = system.util.getLogger("OnClose-Web-Socket") + self.logger.info("Onclose method closed " + str(error)) + + def onError(self, websocket, error): +# logger = system.util.getLogger("OnError-Web-Socket") + self.logger.info("OnError method closed " + str(error)) + diff --git a/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/web_socket/resource.json b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/web_socket/resource.json new file mode 100644 index 0000000..a3e5d38 --- /dev/null +++ b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/web_socket/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol@amazon.co.uk", + "timestamp": "2022-07-04T10:32:46Z" + }, + "lastModificationSignature": "ae3435d877ea0400d1c1e7bbecff127e6f6729cacc114a8287b80618e070f9ec" + } +} \ No newline at end of file diff --git a/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/web_socket_send/code.py b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/web_socket_send/code.py new file mode 100644 index 0000000..ea2f59a --- /dev/null +++ b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/web_socket_send/code.py @@ -0,0 +1,21 @@ +import json + +class SendMessage(): + + def __init__(self, whid): + self.whid = whid + tag_path = "[%s_SCADA_TAG_PROVIDER]System/wbsckt_messages_send" % (whid) + tags_to_read = system.tag.readBlocking([tag_path]) + self.messages_to_send = system.util.jsonDecode(tags_to_read[0].value) + system.tag.writeBlocking([tag_path],[system.util.jsonEncode({})]) + self.message_list ={} + + def build_message_list(self): + if self.messages_to_send: + self.message_list = json.dumps(self.messages_to_send) + else: + self.message_list = None + + + + diff --git a/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/web_socket_send/resource.json b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/web_socket_send/resource.json new file mode 100644 index 0000000..90ceb9e --- /dev/null +++ b/AMZL_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/AWS/web_socket_send/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol@amazon.co.uk", + "timestamp": "2022-07-04T10:32:46Z" + }, + "lastModificationSignature": "32b06c82eacdc4b8bb650647598d50f33a9a8d9a42ef0d48d4660d227ed492c0" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/page-config/config.json b/com.inductiveautomation.perspective/page-config/config.json new file mode 100644 index 0000000..59f5b90 --- /dev/null +++ b/com.inductiveautomation.perspective/page-config/config.json @@ -0,0 +1,119 @@ +{ + "pages": { + "/": { + "title": "", + "viewPath": "Main-Views/Home" + }, + "/Command": { + "title": "", + "viewPath": "Main-Views/CommandControl" + }, + "/CustomView/:customView": { + "title": "", + "viewPath": "Custom-Views/Detail" + }, + "/DetailedView/:detailedView/:plcTagPath": { + "title": "DetailedView", + "viewPath": "Detailed-Views/Detail" + }, + "/Device-manager": { + "viewPath": "Main-Views/Device-Manager/DeviceManager" + }, + "/Help": { + "title": "Help", + "viewPath": "Main-Views/Help" + }, + "/MAP-Home": { + "title": "", + "viewPath": "Additional-Home-View/MAP-Home" + }, + "/Monitron": { + "viewPath": "Main-Views/Monitron" + }, + "/Oil": { + "viewPath": "Main-Views/OilMonitoring" + }, + "/Real-Time": { + "viewPath": "Alarm-Views/RealTime" + }, + "/Temperature": { + "title": "", + "viewPath": "Main-Views/TempMonitoring" + }, + "/Tools": { + "title": "Tools", + "viewPath": "Main-Views/ToolBox" + }, + "/config": { + "title": "", + "viewPath": "CommissioningTool/PageConfig" + } + }, + "sharedDocks": { + "bottom": [ + { + "anchor": "fixed", + "autoBreakpoint": 480, + "content": "cover", + "handle": "show", + "iconUrl": "material/notifications_active", + "id": "Docked-South", + "modal": false, + "resizable": false, + "show": "onDemand", + "size": 165, + "viewParams": {}, + "viewPath": "Navigation-Views/Docked-South" + } + ], + "cornerPriority": "top-bottom", + "left": [ + { + "anchor": "fixed", + "autoBreakpoint": 805, + "content": "auto", + "handle": "autoHide", + "iconUrl": "", + "id": "Docked-West", + "modal": false, + "resizable": false, + "show": "auto", + "size": 70, + "viewParams": {}, + "viewPath": "Navigation-Views/Docked-West" + } + ], + "right": [ + { + "anchor": "fixed", + "autoBreakpoint": 480, + "content": "cover", + "handle": "hide", + "iconUrl": "", + "id": "Docked-East", + "modal": false, + "resizable": false, + "show": "onDemand", + "size": 400, + "viewParams": {}, + "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East" + } + ], + "top": [ + { + "anchor": "fixed", + "autoBreakpoint": 480, + "content": "auto", + "handle": "hide", + "iconUrl": "", + "id": "", + "modal": false, + "resizable": false, + "show": "visible", + "size": 50, + "viewParams": {}, + "viewPath": "Framework/Breakpoint" + } + ] + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/page-config/resource.json b/com.inductiveautomation.perspective/page-config/resource.json new file mode 100644 index 0000000..c01f403 --- /dev/null +++ b/com.inductiveautomation.perspective/page-config/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "config.json" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-26T14:18:40Z" + }, + "lastModificationSignature": "69d02759e0c143ac5bb897cbb32c2b40c7df3fa86441d88df4ad94c0f322a807" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/session-permissions/data.bin b/com.inductiveautomation.perspective/session-permissions/data.bin new file mode 100644 index 0000000..923c43f --- /dev/null +++ b/com.inductiveautomation.perspective/session-permissions/data.bin @@ -0,0 +1,9 @@ +{ + "type": "AllOf", + "securityLevels": [ + { + "name": "Authenticated", + "children": [] + } + ] +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/session-permissions/resource.json b/com.inductiveautomation.perspective/session-permissions/resource.json new file mode 100644 index 0000000..3dfa3c1 --- /dev/null +++ b/com.inductiveautomation.perspective/session-permissions/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "data.bin" + ], + "attributes": { + "lastModification": { + "actor": "pllincol@amazon.co.uk", + "timestamp": "2022-10-19T10:50:09Z" + }, + "lastModificationSignature": "4fa93d130e77471f2b4efa02f2ce5678c1f4cca44bcb78c5f4e622344e3716c6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/session-props/props.json b/com.inductiveautomation.perspective/session-props/props.json new file mode 100644 index 0000000..2cea4ed --- /dev/null +++ b/com.inductiveautomation.perspective/session-props/props.json @@ -0,0 +1,223 @@ +{ + "custom": { + "alarm_filter": { + "magnificaiton": "x2", + "orderby": false, + "show_diagnostic": true, + "show_gateways": true, + "show_low_alarm": true, + "show_map": true, + "show_running": true, + "show_safety": true + }, + "alarms": [], + "aws": { + "prefix": "eu", + "region": "eu-west-1" + }, + "colours": { + "Fallback": "#00FF00", + "colour_impaired": false, + "state0": "#8C8C8C", + "state1": "#FF0000", + "state6": "#CCCCFF" + }, + "command_auth": { + "auth_time": { + "$": [ + "ts", + 192, + 1674052360661 + ], + "$ts": 1674052360661 + }, + "enabled": false, + "timeout_sp": 500 + }, + "covert": true, + "deviceSearchId": "", + "download_url": "https://scadacloud-storage-prod-downloadbucketdc1a1095-17r7vrw051y3t.s3.amazonaws.com/history/DNG2/58b56f26-c115-41b5-badb-a3394f312630-1672826106.csv?AWSAccessKeyId\u003dASIAVDEI3U6Y3J5KB2NA\u0026Signature\u003dzucRF2nCigK4y5M%2BNbjoI06UUng%3D\u0026x-amz-security-token\u003dIQoJb3JpZ2luX2VjEKL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCWV1LXdlc3QtMSJIMEYCIQCy78peP6YRJ1gyf9RROmmcfk%2BRHyPhxv6ejHJgyEG0KQIhALXnJXYIyDiWzr9vxehoDIa2c7sx818gUyuiFXYY6rb2KsoDCOv%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQABoMMzUwMzI2ODU5Njk3IgzVrdKyNsVjl%2BNjqWQqngOJCTFOLVppHMmo1otgHZCXlVISlnBz6rz6ykr8SHgGQPc0EsaL9a1I0oQmS42i%2BlRHpEpQfMdjUbP3dr2OnVKXmopkkUJZ592SPzA3MZzS95SHXMvbbPDs0OAw5mKdS6LHQAQb90ZdQdeoEj%2FG1bPEIiifVT07PhHMA0JMS7ExgXmHzq1c6W%2Fjc%2BdfQOjl41qnWcE1GH5MaVfU%2FOKW5PffN6pLf%2BJ61YjjbXqPIpPHimJSGqMI5BmFzAfSlsYAtgFT8bMyJhbUDaPlDF7X42SSYLs1CeAbddPFMvrhDIUk%2BYTA3oV69SMjX91LrKBNqRhFS%2F0R4U8nbA4rSd%2BhMkdr5RSwa9Q22ZQpbzuqQU1H%2B4oQy6419lQg3lkBF5SBNGdvQajD6mav2ipHYe7OkX5GKq2pNzBLzJsqGGnsJvISB83ShA6SnuiZFx%2F2LXvDtEu3jTCS4yRjDegxiKRBs%2FiwH0dN2ztb8a3vnSJN0EqaoORf2eVb%2BozzAv1EBaqnUEZZAoOKb8iaxpbZtqLaUNOOd7VsHsUPoBQRkKqH2RAw95nVnQY6nQFAgIr2YAjgyrsuAfVgr2b41jc3Dj83zJ6I9LI%2BglDMgQFyfL0RNPmoxEu3DDfq5yLy8MtiPlYcs71J3J8Z%2B7xIkH%2BIPWKwmKLsvaEtN7Io1kOfvFgEcMhhIPRwwEj70AVokPncUQ8HtKQhXnq7l1YZ4yyAw2poT%2Ff%2FgJwv7suOu2dZeh%2BH%2B9OwE4M%2BRmVoFO7tTWIakPgODw2ZFzqs\u0026Expires\u003d1672829705", + "enable_activity_logging": false, + "fc": "", + "id_to_state": "{\"PLC01/0820_06_09\":1,\"PLC02/0820_91_16/B4510\":1,\"PLC03/0820_82_04/B312_3\":1,\"PLC09/0120_33_01/B425_0\":1,\"PLC09/1210_03_27\":3,\"PLC02/0820_07_39_BT1\":1,\"ARSAW1501/05_10/B12_6\":3,\"PLC09/0110_13_40\":1,\"FSC10/TRZ_0850_01/CAS_0850_01_0299\":2,\"PLC02/0820_05_31/B4000_2\":1,\"PLC09/1210_03_30\":3,\"PLC09/1210_03_36\":3,\"PLC1000/1000_43_01\":1,\"PLC09/0120_35_18/B505_2\":1,\"PLC02/0820_05_20/B3804_6\":1,\"PLC01/0820_06_05\":1,\"PLC01/0820_06_07\":1,\"PLC1000/1000_22_02/B501_3\":1,\"PLC01/0820_01_41/B6103_2\":1,\"PLC1000/1000_42_04/B517_7\":1,\"PLC09/2210_08_60/B911_1\":1,\"PLC02/0820_05_06/B3702_6\":1,\"PLC09/2210_08_60/B911_5\":1,\"PLC09/0110_23_40/B304_2\":1,\"PLC09/1210_02_01/B705_0\":1,\"PLC09/1210_03_25\":3,\"PLC01/0820_01_75/B6401_6\":1,\"PLC01/0820_64_03\":1,\"PLC02/0820_07_29_BT1/TN12A\":1,\"PLC02/0820_05_03/B3701_2\":1,\"PLC01/0820_06_14\":1,\"PLC09/2210_03_45/B1007_4\":1,\"PLC01/0820_06_17\":1,\"PLC01/0820_06_18\":1,\"FSC10/OFZ_0850_31/CH_0850_31_06\":2,\"FSC10/OFZ_0850_31/CH_0850_31_07\":2,\"FSC10/OFZ_0850_31/CH_0850_31_04\":2,\"FSC10/OFZ_0850_31/CH_0850_31_05\":2,\"FSC10/OFZ_0850_31/CH_0850_31_08\":2,\"FSC10/OFZ_0850_31/CH_0850_31_09\":2,\"PLC09/1210_03_06\":3,\"PLC09/1210_03_04\":3,\"PLC02/0820_05_41/B4100_2\":1,\"FSC10/OFZ_0850_31/CH_0850_31_02\":2,\"PLC02/0820_91_08/B4318\":1,\"FSC10/OFZ_0850_31/CH_0850_31_03\":2,\"FSC10/OFZ_0850_31/CH_0850_31_01\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0148\":3,\"PLC02/0820_01_07\":1,\"PLC09/1210_03_13\":3,\"PLC09/1210_03_12\":1,\"PLC26/0513_11_02/B118_1\":3,\"PLC09/0120_52_23/B528_6\":1,\"PLC09/0120_51_01/B510_0\":1,\"ARSAW1303\":3,\"PLC09/2210_02_01\":1,\"PLC09/1210_02_30\":3,\"PLC1000/1000_42_04\":1,\"PLC09/1210_03_02\":3,\"PLC1000/1000_43_01/B525_0\":1,\"PLC26/0513_31_30/M1\":3,\"PLC01/0820_02_02/B6500_6\":1,\"FSC10/OFZ_0850_31/CH_0850_31_28\":2,\"FSC10/OFZ_0850_31/CH_0850_31_29\":2,\"FSC10/OFZ_0850_31/CH_0850_31_26\":2,\"PLC09/0110_23_40\":1,\"PLC01/0820_01_47/B6200_6\":1,\"FSC10/OFZ_0850_52/CH_0850_52_01\":2,\"FSC10/OFZ_0850_31/CH_0850_31_27\":2,\"FSC10/OFZ_0850_31/CH_0850_31_20\":2,\"FSC10/OFZ_0850_31/CH_0850_31_21\":2,\"FSC10/OFZ_0850_31/CH_0850_31_24\":2,\"FSC10/OFZ_0850_31/CH_0850_31_25\":2,\"FSC10/OFZ_0850_31/CH_0850_31_22\":2,\"FSC10/OFZ_0850_31/CH_0850_31_23\":2,\"FSC10/IFZ_0850_68/PCO_0850_68_98\":2,\"PLC09/0120_33_10\":1,\"PLC09/2210_09_60\":1,\"PLC09/0110_01_20\":1,\"FSC10/OFZ_0850_31/CH_0850_31_17\":2,\"FSC10/OFZ_0850_31/CH_0850_31_18\":2,\"FSC10/OFZ_0850_31/CH_0850_31_15\":2,\"FSC10/OFZ_0850_31/CH_0850_31_16\":2,\"FSC10/OFZ_0850_31/CH_0850_31_19\":2,\"PLC09/0120_52_08/B526_7\":1,\"FSC10/OFZ_0850_31/CH_0850_31_10\":2,\"PLC02/0820_91_14/B4422\":1,\"FSC10/OFZ_0850_31/CH_0850_31_13\":2,\"FSC10/OFZ_0850_31/CH_0850_31_14\":2,\"FSC10/OFZ_0850_31/CH_0850_31_11\":2,\"FSC10/OFZ_0850_31/CH_0850_31_12\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0147\":3,\"PLC01/0820_06_05/B6902_2\":1,\"FSC10/OFZ_0850_51/CH_0850_51_50\":2,\"PLC09/0120_33_01\":1,\"PLC09/1210_03_60\":3,\"FSC10/OFZ_0850_31/CH_0850_31_48\":2,\"FSC10/OFZ_0850_31/CH_0850_31_49\":2,\"PLC01/0820_02_04/B6501_6\":1,\"FSC10/OFZ_0850_31/CH_0850_31_42\":2,\"PLC02/0820_07_09_BT1\":1,\"FSC10/OFZ_0850_51/CH_0850_51_43\":2,\"PLC01/0820_03_18/B6802_6\":1,\"FSC10/OFZ_0850_31/CH_0850_31_43\":2,\"PLC09/1210_03_48\":3,\"FSC10/OFZ_0850_31/CH_0850_31_40\":2,\"FSC10/OFZ_0850_51/CH_0850_51_41\":2,\"FSC10/OFZ_0850_31/CH_0850_31_41\":2,\"PLC02/0820_91_18/B4518\":1,\"FSC10/OFZ_0850_31/CH_0850_31_46\":2,\"FSC10/OFZ_0850_31/CH_0850_31_47\":2,\"FSC10/OFZ_0850_51/CH_0850_51_44\":2,\"FSC10/OFZ_0850_31/CH_0850_31_44\":2,\"FSC10/OFZ_0850_31/CH_0850_31_45\":2,\"PLC01/0820_55_03/B420_1\":1,\"FSC10/OFZ_0850_31/CH_0850_31_39\":2,\"FSC10/OFZ_0850_31/CH_0850_31_37\":2,\"FSC10/OFZ_0850_31/CH_0850_31_38\":2,\"PLC09/1210_03_39\":3,\"FSC10/OFZ_0850_31/CH_0850_31_31\":2,\"FSC10/OFZ_0850_31/CH_0850_31_32\":2,\"PLC09/0120_32_02\":1,\"FSC10/OFZ_0850_31/CH_0850_31_30\":2,\"PLC09/0120_35_10/B504_1\":1,\"FSC10/OFZ_0850_31/CH_0850_31_35\":2,\"PLC09/2210_02_01/B905_0\":1,\"PLC09/0110_23_40/B305_1\":1,\"ARSAW1501\":3,\"PLC09/0110_23_40/B305_0\":1,\"FSC10/OFZ_0850_31/CH_0850_31_36\":2,\"FSC10/OFZ_0850_31/CH_0850_31_33\":2,\"PLC09/0110_23_40/B305_2\":1,\"FSC10/OFZ_0850_31/CH_0850_31_34\":2,\"PLC09/1210_03_42\":3,\"PLC01/0820_06_07/B6903_2\":1,\"PLC26/0513_11_02\":3,\"PLC09/1210_03_45\":3,\"PLC09/0120_32_11\":1,\"ARSAW1303/05_22\":3,\"PLC09/0110_01_20/B102_3\":1,\"PLC09/0110_01_20/B102_2\":1,\"PLC09/2210_03_45\":1,\"PLC01/0820_01_73/B6400_6\":1,\"PLC02/0820_07_49_BT1\":1,\"PLC80/0632_05_40/B113_3\":1,\"PLC80/0632_05_40/B113_4\":1,\"PLC26/S01/A902\":4,\"PLC80/0632_05_40/B113_5\":1,\"PLC26/S01/A901\":4,\"PLC26/0513_31_23\":3,\"PLC09/0120_43_01\":1,\"PLC80/0632_05_40/B113_2\":1,\"PLC80/0632_01_07/B103_6\":1,\"PLC14/0580_01_01\":3,\"PLC09/0120_51_08/B510_7\":1,\"PLC09/0120_41_20/B521_3\":1,\"PLC26/0513_31_19\":3,\"PLC01/0820_02_05/B6502_2\":1,\"PLC02/0820_07_29_BT1\":1,\"PLC02/0820_91_12/B4414\":1,\"PLC82/0640_21_02/BT1\":1,\"PLC01/0820_02_01/B6500_2\":1,\"FSC10/OFZ_0850_53/CH_0850_53_02\":2,\"PLC81/0631_05_40/B113_5\":1,\"PLC02/0820_91_13/B4418\":1,\"PLC09/1210_02_30/M1\":3,\"PLC81/0631_05_40/B113_4\":1,\"PLC81/0631_05_40/B113_3\":1,\"FSC10/OFZ_0850_55/CH_0850_55_04\":2,\"PLC1000/1000_22_02\":1,\"PLC69/0330_07_20/B118_4\":1,\"FSC10/OFZ_0850_55/CH_0850_55_02\":2,\"FSC10/OFZ_0850_55/CH_0850_55_03\":2,\"PLC69/0330_07_20/B118_3\":1,\"PLC16/0580_21_01\":3,\"PLC01/0820_01_43/B6104_2\":1,\"PLC1000/1000_33_12\":1,\"PLC01/0820_55_03\":1,\"PLC27/0514_04_20/B106_5\":1,\"PLC09/2210_04_22\":1,\"PLC02/0820_05_14/B3801_6\":1,\"PLC26/0513_31_30\":3,\"PLC26/0513_32_01\":3,\"PLC09/1210_03_27/B805_2\":3,\"PLC02/0820_05_24/B3901_6\":1,\"PLC09/1210_03_04/B802_3\":3,\"PLC82/0640_21_03\":1,\"PLC82/0640_21_04\":1,\"PLC82/0640_21_01\":1,\"PLC26/0513_31_23/B320_6\":3,\"PLC82/0640_21_02\":1,\"FSC10/OFZ_0850_53/CH_0850_53_20\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_1180\":3,\"PLC02/0820_91_06/B4310\":1,\"PLC09/0110_21_20\":1,\"PLC1000/1000_33_01\":1,\"FSC10/OFZ_0850_53/CH_0850_53_29\":2,\"FSC10/OFZ_0850_53/CH_0850_53_26\":2,\"PLC01/0820_01_71/B6306_6\":1,\"PLC09/0120_35_26/B506_2\":1,\"PLC09/0120_51_01\":1,\"PLC09/0120_51_08\":1,\"PLC09/0120_41_14/B520_5\":1,\"PLC09/0120_41_20\":1,\"PLC09/0120_32_11/B423_2\":1,\"PLC82/0640_21_01/BT1\":1,\"PLC09/1210_09_60/M1\":3,\"PLC80/0632_05_40\":1,\"PLC09/0120_41_14\":1,\"FSC10\":4,\"PLC01/0820_57_03\":1,\"PLC02/0820_05_02/B3700_6\":1,\"PLC09/0120_51_15\":1,\"PLC02/0820_91_51/B5210\":1,\"PLC27/0514_04_20\":1,\"PLC09/1210_03_45/B807_4\":3,\"PLC09/1210_03_39/B806_6\":3,\"PLC01/0820_57_03/B421_1\":1,\"PLC09/0120_41_08\":1,\"PLC02/0820_91_52/B5214\":1,\"PLC09/0120_51_23\":1,\"PLC09/2210_03_12\":1,\"FSC10/TRZ_0850_01/CAS_0850_01_1174\":3,\"PLC09/0120_52_15/B527_6\":1,\"PLC01/0820_01_77/B6402_6\":1,\"PLC01/0820_06_18/B7003_6\":1,\"PLC02/0820_91_02/B4214\":1,\"FSC10/OFZ_0850_33/CH_0850_33_21\":2,\"PLC26/0513_31_19/B320_2\":3,\"FSC10/OFZ_0850_33/CH_0850_33_25\":2,\"PLC09/0120_52_01\":1,\"PLC02/0820_91_53/B5218\":1,\"FSC10/OFZ_0850_75\":2,\"FSC10/OFZ_0850_73\":2,\"PLC09/0120_52_08\":1,\"PLC01/0820_02_03/B6501_2\":1,\"PLC09/2210_07_01\":1,\"FSC10/OFZ_0850_54/CH_0850_54_08\":2,\"PLC01/0820_06_14/B7001_6\":1,\"FSC10/OFZ_0850_54/CH_0850_54_06\":2,\"FSC10/OFZ_0850_54/CH_0850_54_03\":2,\"PLC82/0640_21_04/BT1\":1,\"FSC10/MAZ_0850_98/CCO_0850_98_98\":3,\"PLC09/0120_52_15\":1,\"PLC02/0820_07_19_BT1/TN8A\":1,\"FSC10/OFZ_0850_33/CH_0850_33_13\":2,\"PLC02/0820_04_28/B3601_6\":1,\"FSC10/OFZ_0850_33/CH_0850_33_14\":2,\"FSC10/OFZ_0850_33/CH_0850_33_12\":2,\"PLC01/0820_06_09/B6904_2\":1,\"PLC09/2210_06_29\":1,\"FSC10/OFZ_0850_33/CH_0850_33_15\":2,\"PLC09/2210_03_12/B1003_3\":1,\"PLC81/0631_05_40\":1,\"FSC10/OFZ_0850_33/CH_0850_33_19\":2,\"FSC10/OFZ_0850_54/CH_0850_54_19\":2,\"PLC02/0820_07_39_BT1/TN16A\":1,\"FSC10/OFZ_0850_54/CH_0850_54_17\":2,\"PLC69\":1,\"PLC09/2210_09_60/B912_5\":1,\"PLC09/0120_52_23\":1,\"PLC02/0820_05_41\":1,\"PLC01/0820_01_49/B6201_6\":1,\"FSC10/OFZ_0850_55\":2,\"PLC09/2210_07_27\":1,\"FSC10/OFZ_0850_54\":2,\"FSC10/OFZ_0850_33/CH_0850_33_05\":2,\"FSC10/OFZ_0850_53\":2,\"PLC01/0820_64_03/B425_5\":1,\"FSC10/OFZ_0850_52\":2,\"FSC10/OFZ_0850_51\":2,\"PLC02/0820_07_19_BT1\":1,\"FSC10/OFZ_0850_75/CH_0850_75_08\":2,\"FSC10/OFZ_0850_54/CH_0850_54_20\":2,\"PLC02/0820_91_07/B4314\":1,\"PLC69/0330_09_30\":1,\"PLC69/0330_09_30/B120_2\":1,\"PLC69/0330_09_30/B120_4\":1,\"PLC07/0320_31_20/B520_1\":1,\"PLC80\":1,\"PLC09/0120_51_15/B511_6\":1,\"FSC10/MAZ_0850_98\":3,\"PLC03\":1,\"PLC01/0820_02_04\":1,\"PLC01/0820_02_03\":1,\"PLC01/0820_02_13/B6600_2\":1,\"PLC09/2210_04_22/B1011_5\":1,\"PLC01\":1,\"PLC01/0820_02_02\":1,\"PLC01/0820_02_01\":1,\"PLC02\":1,\"PLC07\":1,\"PLC02/0820_05_20\":1,\"FSC10/OFZ_0850_33\":2,\"FSC10/OFZ_0850_32\":2,\"FSC10/OFZ_0850_31\":2,\"PLC02/0820_05_24\":1,\"PLC02/0820_05_27\":1,\"PLC82/0640_21_03/BT1\":1,\"PLC09\":3,\"PLC01/0820_02_05\":1,\"PLC14\":3,\"PLC01/0820_01_47\":1,\"PLC01/0820_01_46\":1,\"PLC01/0820_02_13\":1,\"ARSAW1501/05_10\":3,\"PLC01/0820_06_17/B7003_2\":1,\"PLC01/0820_01_43\":1,\"PLC02/0820_91_17/B4514\":1,\"PLC01/0820_71_03/B428_1\":1,\"PLC01/0820_01_41\":1,\"PLC16\":3,\"PLC02/0820_05_31\":1,\"PLC1000/1000_12_02/B308_7\":1,\"PLC01/0820_01_50/B6202_2\":1,\"PLC01/0820_59_03/B422_1\":1,\"PLC09/1210_03_60/M1\":3,\"PLC03/0820_82_04\":1,\"PLC01/0820_01_49\":1,\"PLC26\":4,\"PLC01/0820_02_20\":1,\"PLC27\":1,\"PLC01/0820_71_03\":1,\"PLC01/0820_01_50\":1,\"PLC02/0820_05_03\":1,\"PLC02/0820_05_02\":1,\"PLC02/0820_91_28/B4718\":1,\"PLC02/0820_91_33/B4818\":1,\"PLC02/0820_05_06\":1,\"PLC1000/1000_12_02\":1,\"PLC80/0632_03_01/B106_0\":1,\"PLC02/0820_91_15/B4430\":1,\"PLC01/0820_03_07\":1,\"PLC01/0820_03_08\":1,\"PLC01/0820_01_63\":1,\"PLC02/0820_05_14\":1,\"ARSAW1303/05_22/B11_4\":3,\"PLC02/0820_05_15\":1,\"PLC09/2210_06_02\":1,\"PLC01/0820_59_03\":1,\"PLC09/0120_51_23/B512_6\":1,\"PLC09/1210_03_12/B803_3\":1,\"PLC09/1210_03_06/B802_5\":3,\"PLC09/2210_07_01/B1025_0\":1,\"PLC01/0820_03_18\":1,\"PLC01/0820_03_07/B6703_2\":1,\"FSC10/OFZ_0850_32/CH_0850_32_03\":2,\"PLC01/0820_01_79\":1,\"PLC09/0120_41_08/B519_7\":1,\"PLC01/0820_01_77\":1,\"PLC02/0820_91_18\":1,\"PLC02/0820_91_17\":1,\"PLC01/0820_01_75\":1,\"PLC02/0820_91_16\":1,\"PLC01/0820_01_73\":1,\"PLC02/0820_91_15\":1,\"PLC02/0820_91_14\":1,\"FSC10/OFZ_0850_31/CH_0850_31_64\":2,\"PLC01/0820_01_71\":1,\"FSC10/OFZ_0850_31/CH_0850_31_65\":2,\"PLC02/0820_91_13\":1,\"PLC02/0820_91_12\":1,\"FSC10/OFZ_0850_31/CH_0850_31_62\":2,\"FSC10/OFZ_0850_31/CH_0850_31_63\":2,\"FSC10/OFZ_0850_32/CH_0850_32_09\":2,\"FSC10/OFZ_0850_32/CH_0850_32_06\":2,\"FSC10/OFZ_0850_31/CH_0850_31_68\":2,\"FSC10/OFZ_0850_31/CH_0850_31_69\":2,\"FSC10/OFZ_0850_31/CH_0850_31_66\":2,\"PLC26/S01\":4,\"FSC10/OFZ_0850_31/CH_0850_31_67\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0694\":3,\"FSC10/OFZ_0850_31/CH_0850_31_60\":2,\"FSC10/OFZ_0850_31/CH_0850_31_61\":2,\"PLC02/0820_07_49_BT1/TN20A\":1,\"PLC02/0820_91_36/B4910\":1,\"FSC10/OFZ_0850_32/CH_0850_32_13\":2,\"FSC10/OFZ_0850_32/CH_0850_32_14\":2,\"FSC10/OFZ_0850_31/CH_0850_31_59\":2,\"FSC10/OFZ_0850_32/CH_0850_32_12\":2,\"PLC02/0820_91_08\":1,\"PLC02/0820_91_07\":1,\"FSC10/OFZ_0850_73/CH_0850_73_13\":2,\"PLC02/0820_91_06\":1,\"FSC10/OFZ_0850_32/CH_0850_32_10\":2,\"PLC80/0632_03_06/B106_5\":1,\"FSC10/OFZ_0850_73/CH_0850_73_11\":2,\"PLC09/2210_07_27/B1028_2\":1,\"FSC10/OFZ_0850_31/CH_0850_31_53\":2,\"PLC02/0820_91_02\":1,\"FSC10/OFZ_0850_31/CH_0850_31_54\":2,\"FSC10/OFZ_0850_73/CH_0850_73_18\":2,\"FSC10/OFZ_0850_31/CH_0850_31_51\":2,\"FSC10/OFZ_0850_73/CH_0850_73_15\":2,\"PLC02/0820_05_27/B3903_2\":1,\"FSC10/OFZ_0850_31/CH_0850_31_52\":2,\"FSC10/OFZ_0850_32/CH_0850_32_17\":2,\"PLC02/0820_04_28\":1,\"FSC10/OFZ_0850_31/CH_0850_31_57\":2,\"FSC10/OFZ_0850_31/CH_0850_31_58\":2,\"FSC10/OFZ_0850_32/CH_0850_32_18\":2,\"FSC10/OFZ_0850_32/CH_0850_32_15\":2,\"FSC10/OFZ_0850_73/CH_0850_73_19\":2,\"FSC10/OFZ_0850_31/CH_0850_31_55\":2,\"FSC10/OFZ_0850_31/CH_0850_31_56\":2,\"PLC07/0320_31_20\":1,\"FSC10/OFZ_0850_32/CH_0850_32_16\":2,\"FSC10/OFZ_0850_31/CH_0850_31_50\":2,\"PLC26/0513_03_10/B104_7\":3,\"PLC02/0820_01_07/B3103_2\":1,\"PLC69/0330_07_20\":1,\"FSC10/OFZ_0850_73/CH_0850_73_02\":2,\"FSC10/OFZ_0850_73/CH_0850_73_03\":2,\"FSC10/OFZ_0850_73/CH_0850_73_01\":2,\"PLC02/0820_91_36\":1,\"FSC10/OFZ_0850_73/CH_0850_73_04\":2,\"PLC02/0820_91_33\":1,\"PLC09/0110_13_40/B204_2\":1,\"FSC10/IFZ_0850_68\":2,\"PLC26/0513_03_10\":3,\"FSC10/OFZ_0850_31/CH_0850_31_80\":2,\"PLC09/1210_03_48/B807_7\":3,\"PLC80/0632_03_06\":1,\"PLC02/0820_91_28\":1,\"PLC09/2210_08_60\":1,\"PLC80/0632_03_01\":1,\"FSC10/OFZ_0850_31/CH_0850_31_75\":2,\"FSC10/OFZ_0850_31/CH_0850_31_76\":2,\"FSC10/OFZ_0850_31/CH_0850_31_73\":2,\"FSC10/OFZ_0850_31/CH_0850_31_74\":2,\"FSC10/OFZ_0850_31/CH_0850_31_79\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0557\":3,\"PLC1000/1000_33_12/B419_3\":1,\"FSC10/OFZ_0850_32/CH_0850_32_37\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0556\":3,\"FSC10/OFZ_0850_31/CH_0850_31_77\":2,\"FSC10/OFZ_0850_31/CH_0850_31_78\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0565\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0564\":2,\"FSC10/OFZ_0850_31/CH_0850_31_71\":2,\"FSC10/OFZ_0850_31/CH_0850_31_72\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0680\":3,\"FSC10/OFZ_0850_31/CH_0850_31_70\":2,\"PLC02/0820_05_15/B3802_2\":1,\"PLC09/0120_33_10/B426_1\":1,\"PLC09/1210_09_60\":3,\"FSC10/OFZ_0850_32/CH_0850_32_47\":2,\"PLC09/0120_35_26\":1,\"PLC81\":1,\"PLC82\":1,\"FSC10/TRZ_0850_01/CAS_0850_01_0891\":4,\"PLC09/1210_03_30/B805_5\":3,\"PLC09/0110_13_40/B205_1\":1,\"PLC02/0820_91_53\":1,\"PLC09/0110_13_40/B205_0\":1,\"PLC02/0820_91_52\":1,\"PLC09/0110_13_40/B205_2\":1,\"PLC02/0820_91_51\":1,\"PLC09/2210_06_02/B1018_1\":1,\"FSC10/TRZ_0850_01\":4,\"PLC80/0632_01_07\":1,\"PLC09/0110_03_40\":1,\"PLC1000/1000_33_01/B418_0\":1,\"FSC10/OFZ_0850_32/CH_0850_32_54\":2,\"PLC09/0120_35_18\":1,\"FSC10/TRZ_0850_01/CAS_0850_01_0780\":2,\"PLC09/0110_03_40/B105_2\":1,\"PLC09/0110_03_40/B105_0\":1,\"PLC01/0820_01_79/B6403_6\":1,\"PLC09/0110_03_40/B105_1\":1,\"PLC26/0513_32_01/B405_4\":3,\"FSC10/TRZ_0850_01/CAS_0850_01_0300\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0779\":2,\"PLC09/1210_03_13/B803_4\":3,\"FSC10/OFZ_0850_33/CH_0850_33_43\":2,\"PLC01/0820_01_46/B6200_2\":1,\"PLC09/0110_21_20/B302_3\":1,\"PLC09/0110_21_20/B302_2\":1,\"PLC1000\":1,\"PLC09/0120_35_10\":1,\"PLC09/1210_03_36/B806_3\":3,\"PLC09/1210_02_01\":1,\"PLC09/1210_03_42/B807_1\":3,\"PLC09/2210_06_29/B1021_4\":1,\"PLC09/0120_32_02/B422_1\":1,\"PLC09/0110_03_40/B104_2\":1,\"PLC09/1210_03_25/B805_0\":3,\"PLC02/0820_07_09_BT1/TN4A\":1,\"PLC01/0820_01_63/B6302_6\":1,\"PLC01/0820_02_20/B6603_6\":1,\"PLC09/1210_03_02/B802_1\":3,\"PLC26/S01/A999\":4,\"PLC09/0120_52_01/B526_0\":1,\"PLC01/0820_03_08/B6703_6\":1}", + "page_id": "value", + "product_metrics": { + "enable": true + }, + "searchId": "PLC01", + "sources": [], + "view_in_focus": "/" + }, + "propConfig": { + "custom.alarmId": { + "persistent": false + }, + "custom.colours.state2": { + "binding": { + "config": { + "expression": "if({this.custom.colours.colour_impaired},\u0027#F00077\u0027,\u0027#FF8000\u0027)" + }, + "type": "expr" + } + }, + "custom.colours.state3": { + "binding": { + "config": { + "expression": "if({this.custom.colours.colour_impaired},\u0027#FF6000\u0027,\u0027#FFFF00\u0027)" + }, + "type": "expr" + } + }, + "custom.colours.state4": { + "binding": { + "config": { + "expression": "if({this.custom.colours.colour_impaired},\u0027#FCC400\u0027,\u0027#007EFC\u0027)" + }, + "type": "expr" + } + }, + "custom.colours.state5": { + "binding": { + "config": { + "expression": "if({this.custom.colours.colour_impaired},\u0027#007DFA\u0027,\u0027#00CC00\u0027)" + }, + "type": "expr" + } + }, + "custom.command_auth.auth_timeout": { + "binding": { + "config": { + "expression": "if({this.custom.command_auth.enabled},toInt(dateDiff({this.custom.command_auth.auth_time},now(),\u0027seconds\u0027)),0)" + }, + "type": "expr" + }, + "onChange": { + "enabled": null, + "script": "\tif currentValue.value \u003e self.custom.command_auth.timeout_sp:\n\t\tself.custom.command_auth.enabled \u003d False" + } + }, + "custom.command_auth.enabled": { + "onChange": { + "enabled": null, + "script": "\tif currentValue.value:\n\t\tself.custom.command_auth.auth_time \u003d system.date.now()" + } + }, + "custom.covert": { + "access": "PRIVATE" + }, + "custom.deviceSearchId": { + "access": "PRIVATE" + }, + "custom.downloads": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{this.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/download" + }, + "transforms": [ + { + "code": "\tvalue_decoded \u003d system.util.jsonDecode(value)\n\tdownloads \u003d value_decoded.get(\"data\",[])\n\tfor i in downloads:\n\t\tsession_id \u003d i.get(\"session_id\")\n\t\turl \u003d i.get(\"url\")\n\t\tif session_id \u003d\u003d self.props.id:\n\t\t\tself.custom.download_url \u003d url\n\t\t\treturn True\n\t\telse:\n\t\t\treturn False", + "type": "script" + } + ], + "type": "tag" + } + }, + "custom.fc": { + "access": "PRIVATE" + }, + "custom.has_fc_role": { + "access": "PRIVATE", + "binding": { + "config": { + "expression": "{this.props.auth.user.roles}" + }, + "transforms": [ + { + "code": "\tuser_roles \u003d value\n\tfc_role \u003d self.custom.fc\n\trme_role \u003d fc_role.lower() + \"-rme-all\"\n\thas_role \u003d False\n\tfor roles in user_roles:\n\t\tif roles.lower() \u003d\u003d rme_role:\n\t\t\thas_role \u003d True\n\t\t\t\t\n\treturn has_role\n", + "type": "script" + } + ], + "type": "expr" + } + }, + "custom.id_to_state": { + "access": "PRIVATE", + "persistent": true + }, + "custom.show_south_dock": { + "access": "PRIVATE" + }, + "custom.state": { + "access": "PRIVATE" + }, + "custom.state_messages": { + "access": "PRIVATE" + }, + "custom.state_view": { + "access": "PRIVATE" + }, + "props.auth": { + "access": "PRIVATE", + "persistent": false + }, + "props.device.accelerometer": { + "access": "SYSTEM", + "persistent": false + }, + "props.device.identifier": { + "access": "SYSTEM", + "persistent": false + }, + "props.device.timezone": { + "access": "SYSTEM", + "persistent": false + }, + "props.device.type": { + "access": "SYSTEM", + "persistent": false + }, + "props.device.userAgent": { + "access": "SYSTEM", + "persistent": false + }, + "props.gateway": { + "access": "SYSTEM", + "persistent": false + }, + "props.geolocation.data": { + "access": "SYSTEM", + "persistent": false + }, + "props.geolocation.permissionGranted": { + "access": "SYSTEM", + "persistent": false + }, + "props.host": { + "access": "SYSTEM", + "persistent": false + }, + "props.id": { + "access": "SYSTEM", + "persistent": false + }, + "props.lastActivity": { + "access": "SYSTEM", + "persistent": false + } + }, + "props": { + "address": "10.10.1.96", + "appBar": { + "togglePosition": "hidden" + }, + "device": {}, + "geolocation": {}, + "locale": "en-US", + "timeZoneId": "UTC" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/session-props/resource.json b/com.inductiveautomation.perspective/session-props/resource.json new file mode 100644 index 0000000..855ad7b --- /dev/null +++ b/com.inductiveautomation.perspective/session-props/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "props.json" + ], + "attributes": { + "lastModification": { + "actor": "vivsampa", + "timestamp": "2024-06-11T15:24:58Z" + }, + "lastModificationSignature": "2cec11896e41072cffe086e65438ae771a78d78f0a30f183ead2705b2a0e526f" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/session-scripts/data.bin b/com.inductiveautomation.perspective/session-scripts/data.bin new file mode 100644 index 0000000..1d0b230 --- /dev/null +++ b/com.inductiveautomation.perspective/session-scripts/data.bin @@ -0,0 +1 @@ +{"onStartup":"\ttags_to_read = system.tag.readBlocking([\"Configuration/FC\", \"Configuration/aws\"])\n\tsession.custom.fc = tags_to_read[0].value\n\taws = system.util.jsonDecode( tags_to_read[1].value)\n\tprefix = aws.get(\"prefix\")\n\tregion = aws.get(\"region\")\n\tsession.custom.aws.prefix = prefix\n\tsession.custom.aws.region = region\n\tsession.custom.covert = False\n\tsession.custom.download_url = None\n\tsession.custom.alarm_filter.show_map = False\n\tsession.custom.alarm_filter.magnificaiton = \"x2\"","onShutdown":"#\tsystem.perspective.logout()","onBarcodeDataReceived":"\t","onBluetoothReceived":"\t","onAccelerometerDataReceived":"\t","onNdefDataReceived":"\t"} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/session-scripts/resource.json b/com.inductiveautomation.perspective/session-scripts/resource.json new file mode 100644 index 0000000..e9dd780 --- /dev/null +++ b/com.inductiveautomation.perspective/session-scripts/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "data.bin" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-06-19T08:26:13Z" + }, + "lastModificationSignature": "1cd2c178f5d2b73e5040401d437510e4eceb09cc96845b9a96a625c04089b832" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Critical/resource.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Critical/resource.json new file mode 100644 index 0000000..d34b41c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Critical/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-20T21:19:40Z" + }, + "lastModificationSignature": "1999b4aec778d8bcf295c34988df2973aed888ec4aaef8e100e3578688548caf" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Critical/style.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Critical/style.json new file mode 100644 index 0000000..3a92ad8 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Critical/style.json @@ -0,0 +1,16 @@ +{ + "base": { + "style": { + "backgroundColor": "#B42222B3", + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "0.5px", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "lineHeight": "20px", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Diagnostic/resource.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Diagnostic/resource.json new file mode 100644 index 0000000..f3dcb80 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Diagnostic/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-20T21:24:58Z" + }, + "lastModificationSignature": "d7c147730203770cea762fd4b0677f53abcdf11f9def340b614ab2ca616f5960" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Diagnostic/style.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Diagnostic/style.json new file mode 100644 index 0000000..e913ad7 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Diagnostic/style.json @@ -0,0 +1,16 @@ +{ + "base": { + "style": { + "backgroundColor": "#FCC400B3", + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "0.5px", + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "lineHeight": "20px", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/High/resource.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/High/resource.json new file mode 100644 index 0000000..c8d9ff2 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/High/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-20T21:19:40Z" + }, + "lastModificationSignature": "9fe96766052614d0f226552ed43d33d69885433e70732793940a2040f3a6f794" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/High/style.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/High/style.json new file mode 100644 index 0000000..3f8698b --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/High/style.json @@ -0,0 +1,15 @@ +{ + "base": { + "style": { + "backgroundColor": "#FF0000B3", + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "0.5px", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Low/resource.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Low/resource.json new file mode 100644 index 0000000..029f15e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Low/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-20T21:24:31Z" + }, + "lastModificationSignature": "e6f37fe26bfaa1f5f12f2c1c95c204cffac24f1e63d380b50fc13a718433ad7a" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Low/style.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Low/style.json new file mode 100644 index 0000000..1b67501 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Low/style.json @@ -0,0 +1,15 @@ +{ + "base": { + "style": { + "backgroundColor": "#FF6000B3", + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "0.5px", + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Medium/resource.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Medium/resource.json new file mode 100644 index 0000000..3558f8d --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Medium/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-20T21:24:01Z" + }, + "lastModificationSignature": "1e83a4aeeccd481d18802147f2eb59251559d8a84190a4c7b6213f7a37bde276" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Medium/style.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Medium/style.json new file mode 100644 index 0000000..21a76c6 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Alt-Colours/Medium/style.json @@ -0,0 +1,15 @@ +{ + "base": { + "style": { + "backgroundColor": "#F00077B3", + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "0.5px", + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Critical/resource.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Critical/resource.json new file mode 100644 index 0000000..c922029 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Critical/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-02-25T15:30:11Z" + }, + "lastModificationSignature": "937e1851409ec1b7e2099b14dc7e3385b4557cbf1273c09ddf76e93a72705464" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Critical/style.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Critical/style.json new file mode 100644 index 0000000..3a92ad8 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Critical/style.json @@ -0,0 +1,16 @@ +{ + "base": { + "style": { + "backgroundColor": "#B42222B3", + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "0.5px", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "lineHeight": "20px", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Diagnostic/resource.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Diagnostic/resource.json new file mode 100644 index 0000000..d89cdbf --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Diagnostic/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-20T15:35:37Z" + }, + "lastModificationSignature": "2adbaa6aa1f6b753364b460f343a11969793bf644238eb568a1b90d91d53ad86" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Diagnostic/style.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Diagnostic/style.json new file mode 100644 index 0000000..33d9994 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Diagnostic/style.json @@ -0,0 +1,16 @@ +{ + "base": { + "style": { + "backgroundColor": "#007EFCB3", + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "0.5px", + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "lineHeight": "20px", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/High/resource.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/High/resource.json new file mode 100644 index 0000000..7283f80 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/High/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-02-25T15:30:01Z" + }, + "lastModificationSignature": "9f6e637fb05e4eef5e15df156cf86763f6a6bc2cad736be5b1420e035a9fffa3" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/High/style.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/High/style.json new file mode 100644 index 0000000..3f8698b --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/High/style.json @@ -0,0 +1,15 @@ +{ + "base": { + "style": { + "backgroundColor": "#FF0000B3", + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "0.5px", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Low/resource.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Low/resource.json new file mode 100644 index 0000000..c6f218e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Low/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-20T15:39:11Z" + }, + "lastModificationSignature": "a8fdefdda853c2d8953dc1e0d53a149085327b3698fb2e411a320eeb17158972" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Low/style.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Low/style.json new file mode 100644 index 0000000..cb775a7 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Low/style.json @@ -0,0 +1,15 @@ +{ + "base": { + "style": { + "backgroundColor": "#FFFF00B3", + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "0.5px", + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Medium/resource.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Medium/resource.json new file mode 100644 index 0000000..374dc2e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Medium/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-20T15:34:39Z" + }, + "lastModificationSignature": "eeecaeb9b35fe6826d72a09d50bd939162b19020a35cc969748534fd22104088" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Medium/style.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Medium/style.json new file mode 100644 index 0000000..45b722d --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Medium/style.json @@ -0,0 +1,15 @@ +{ + "base": { + "style": { + "backgroundColor": "#FF8000B3", + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "0.5px", + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/NoAlarm-Black/resource.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/NoAlarm-Black/resource.json new file mode 100644 index 0000000..eab44f7 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/NoAlarm-Black/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2021-11-16T16:07:09Z" + }, + "lastModificationSignature": "d1f70de6874b47f8b2f47025d99cef4aed4bf71b20217c4d561eed0dd7588270" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/NoAlarm-Black/style.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/NoAlarm-Black/style.json new file mode 100644 index 0000000..3c420c6 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/NoAlarm-Black/style.json @@ -0,0 +1,15 @@ +{ + "base": { + "style": { + "backgroundColor": "#2B2B2B", + "borderColor": "#909090", + "borderStyle": "solid", + "borderWidth": "0.5px", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/NoAlarm/resource.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/NoAlarm/resource.json new file mode 100644 index 0000000..466b6a1 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/NoAlarm/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2021-11-15T12:38:54Z" + }, + "lastModificationSignature": "702df7f3c9191867bdec8abf1e34b7f29e17af85dabb20a72ca13aefd7568109" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/NoAlarm/style.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/NoAlarm/style.json new file mode 100644 index 0000000..fcc4a21 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/NoAlarm/style.json @@ -0,0 +1,15 @@ +{ + "base": { + "style": { + "backgroundColor": "#008000", + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "0.5px", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Shelved/resource.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Shelved/resource.json new file mode 100644 index 0000000..b9d090d --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Shelved/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-11-22T08:42:18Z" + }, + "lastModificationSignature": "8bf302223a0fdf5c2c1a290ad2993ab7d5a8e0d5dfd052d629f9e3d549d1d183" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Shelved/style.json b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Shelved/style.json new file mode 100644 index 0000000..e703988 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alarms-Styles/Shelved/style.json @@ -0,0 +1,16 @@ +{ + "base": { + "style": { + "backgroundColor": "#FFFFFF", + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "0.5px", + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "lineHeight": "20px", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/alertButton/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/alertButton/resource.json new file mode 100644 index 0000000..caf5ab8 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/alertButton/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "9525e49a9d968ca6f4519e00b7eefe95a048f4fc431476c2b103b263da553c91" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/alertButton/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/alertButton/style.json new file mode 100644 index 0000000..d99fee3 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/alertButton/style.json @@ -0,0 +1,38 @@ +{ + "base": { + "style": { + "backgroundColor": "#3779AE", + "boxShadow": "none", + "color": "#FAFAFA", + "margin": "5px" + } + }, + "variants": [ + { + "pseudo": "hover", + "animation": { + "duration": "0.2s", + "direction": "normal", + "iterationCount": "1", + "timingFunction": "ease", + "keyframes": { + "0%": { + "backgroundColor": "var(--info)", + "boxShadow": "none" + }, + "100%": { + "backgroundColor": "#448BB7", + "boxShadow": "none" + } + } + } + }, + { + "pseudo": "active", + "style": { + "backgroundColor": "var(--info)", + "boxShadow": "none" + } + } + ] +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/alertButtonSecondary/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/alertButtonSecondary/resource.json new file mode 100644 index 0000000..2ec417d --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/alertButtonSecondary/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "b1a9777f01de255b7c267457f06cc0cd580feb2d4eae43ffbb9129211de954e8" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/alertButtonSecondary/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/alertButtonSecondary/style.json new file mode 100644 index 0000000..440fe39 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/alertButtonSecondary/style.json @@ -0,0 +1,30 @@ +{ + "base": { + "style": { + "backgroundColor": "#FAFAFA", + "borderColor": "var(--neutral-100)", + "borderStyle": "solid", + "borderWidth": "1px", + "color": "#323232", + "fontWeight": "normal", + "margin": "5px" + } + }, + "variants": [ + { + "pseudo": "hover", + "animation": { + "duration": "0.2s", + "direction": "normal", + "iterationCount": "1", + "timingFunction": "ease", + "keyframes": { + "0%": {}, + "100%": { + "borderWidth": "2px" + } + } + } + } + ] +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/alertClose/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/alertClose/resource.json new file mode 100644 index 0000000..774a1a7 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/alertClose/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "1ff060c75818d66c6bfa36c61f444d5c5ef0c98bf27937718f32c67bc57f109e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/alertClose/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/alertClose/style.json new file mode 100644 index 0000000..54e8b9e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/alertClose/style.json @@ -0,0 +1,16 @@ +{ + "base": { + "style": { + "cursor": "pointer", + "fill": "var(--callToAction)" + } + }, + "variants": [ + { + "pseudo": "hover", + "style": { + "fill": "var(--callToAction--hover)" + } + } + ] +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/alertMessage/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/alertMessage/resource.json new file mode 100644 index 0000000..1ae8e36 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/alertMessage/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "ad890c421b887d7e221196652693aaee207f1f12272a99aa09925a850d7e35bf" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/alertMessage/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/alertMessage/style.json new file mode 100644 index 0000000..86eb8e9 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/alertMessage/style.json @@ -0,0 +1,8 @@ +{ + "base": { + "style": { + "color": "#FAFAFA", + "fontSize": "14px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/alertTitle/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/alertTitle/resource.json new file mode 100644 index 0000000..946c425 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/alertTitle/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "244c0e5e125dffaf1255cf810bae6ac15e277d9a7d8dfbbd826a3f5072b9cc93" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/alertTitle/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/alertTitle/style.json new file mode 100644 index 0000000..70f1467 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/alertTitle/style.json @@ -0,0 +1,9 @@ +{ + "base": { + "style": { + "fontSize": "20px", + "fontWeight": "bold", + "lineHeight": "32px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/error/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/error/resource.json new file mode 100644 index 0000000..3fd7b37 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/error/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "d7453231587353b7b82ef6079c2a5c0708a9e4d21faf7cd62295c162bd7338a3" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/error/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/error/style.json new file mode 100644 index 0000000..6c614de --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/error/style.json @@ -0,0 +1,11 @@ +{ + "base": { + "style": { + "backgroundColor": "#555555", + "borderTopColor": "#FF8000", + "borderTopStyle": "solid", + "borderTopWidth": "4px", + "boxShadow": "0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22)" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/errorBtn1/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/errorBtn1/resource.json new file mode 100644 index 0000000..e411d1c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/errorBtn1/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "73b5e47cef0f7a0f90227e49d1768b1eb3bb2c4f5dd3d1bce61f58b364b18424" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/errorBtn1/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/errorBtn1/style.json new file mode 100644 index 0000000..89f4d02 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/errorBtn1/style.json @@ -0,0 +1,25 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--error)", + "borderStyle": "none", + "boxShadow": "none", + "margin": "5px", + "textTransform": "uppercase" + } + }, + "variants": [ + { + "pseudo": "hover", + "style": { + "backgroundColor": "var(--error)" + } + }, + { + "pseudo": "active", + "style": { + "color": "var(--neutral-30)" + } + } + ] +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/errorBtn2/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/errorBtn2/resource.json new file mode 100644 index 0000000..7a962e0 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/errorBtn2/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "b6355d5cabc3766bf502948143d1bc824484b7a8dd216289d0512faa1d6a9433" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/errorBtn2/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/errorBtn2/style.json new file mode 100644 index 0000000..63047d1 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/errorBtn2/style.json @@ -0,0 +1,33 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--neutral-10)", + "borderColor": "var(--error)", + "borderStyle": "solid", + "borderWidth": "1px", + "boxShadow": "none", + "color": "var(--error)", + "fontWeight": "normal", + "margin": "5px", + "textTransform": "uppercase", + "fill": "var(--error)" + } + }, + "variants": [ + { + "pseudo": "hover", + "animation": { + "duration": "0.2s", + "direction": "normal", + "iterationCount": "1", + "timingFunction": "ease", + "keyframes": { + "0%": {}, + "100%": { + "backgroundColor": "var(--neutral-20)" + } + } + } + } + ] +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/info/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/info/resource.json new file mode 100644 index 0000000..a67bfe7 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/info/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "96e7d25daf9e4b7f94edb9979264705d5f5a492630edbf162e3a28871df9bfa4" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/info/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/info/style.json new file mode 100644 index 0000000..060cd4f --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/info/style.json @@ -0,0 +1,11 @@ +{ + "base": { + "style": { + "backgroundColor": "#555555", + "borderTopColor": "#007EFC", + "borderTopStyle": "solid", + "borderTopWidth": "4px", + "boxShadow": "0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22)" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/infoBtn1/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/infoBtn1/resource.json new file mode 100644 index 0000000..fb25ea1 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/infoBtn1/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "7cd944cef21cce90889c80f897ee7c521be7c9fac68c902129c2de2bec516f1c" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/infoBtn1/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/infoBtn1/style.json new file mode 100644 index 0000000..22852ee --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/infoBtn1/style.json @@ -0,0 +1,25 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--info)", + "borderStyle": "none", + "boxShadow": "none", + "margin": "5px", + "textTransform": "uppercase" + } + }, + "variants": [ + { + "pseudo": "hover", + "style": { + "backgroundColor": "var(--info)" + } + }, + { + "pseudo": "active", + "style": { + "color": "var(--neutral-30)" + } + } + ] +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/infoBtn2/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/infoBtn2/resource.json new file mode 100644 index 0000000..4ccf345 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/infoBtn2/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "8e71c7665a5ed4bffddbd38132c2c4e0ec6f11257a692eefd9fc45c70513d6d5" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/infoBtn2/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/infoBtn2/style.json new file mode 100644 index 0000000..c1a57f5 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/infoBtn2/style.json @@ -0,0 +1,33 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--neutral-10)", + "borderColor": "var(--info)", + "borderStyle": "solid", + "borderWidth": "1px", + "boxShadow": "none", + "color": "var(--info)", + "fontWeight": "normal", + "margin": "5px", + "textTransform": "uppercase", + "fill": "var(--info)" + } + }, + "variants": [ + { + "pseudo": "hover", + "animation": { + "duration": "0.2s", + "direction": "normal", + "iterationCount": "1", + "timingFunction": "ease", + "keyframes": { + "0%": {}, + "100%": { + "backgroundColor": "var(--neutral-20)" + } + } + } + } + ] +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/success/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/success/resource.json new file mode 100644 index 0000000..cb3ddb4 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/success/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "05c6ccaae4c1b00d4279d4684e4c942955feccf35347ec461609e23e5e5c3f67" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/success/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/success/style.json new file mode 100644 index 0000000..9f36a34 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/success/style.json @@ -0,0 +1,11 @@ +{ + "base": { + "style": { + "backgroundColor": "#555555", + "borderTopColor": "#00CC00", + "borderTopStyle": "solid", + "borderTopWidth": "4px", + "boxShadow": "0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22)" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/successBtn1/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/successBtn1/resource.json new file mode 100644 index 0000000..237aa9c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/successBtn1/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "9157a8d5cfedbced92eebcfe57af427848436684b3e916245ddec429bfa9e0d7" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/successBtn1/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/successBtn1/style.json new file mode 100644 index 0000000..d68e8f4 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/successBtn1/style.json @@ -0,0 +1,25 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--success)", + "borderStyle": "none", + "boxShadow": "none", + "margin": "5px", + "textTransform": "uppercase" + } + }, + "variants": [ + { + "pseudo": "hover", + "style": { + "backgroundColor": "var(--success)" + } + }, + { + "pseudo": "active", + "style": { + "color": "var(--neutral-30)" + } + } + ] +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/successBtn2/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/successBtn2/resource.json new file mode 100644 index 0000000..541df3f --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/successBtn2/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "1eff9fa5c2495360d5f081c5f06ddf41f7539a0e6459028b4c004e1fcd6211e1" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/successBtn2/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/successBtn2/style.json new file mode 100644 index 0000000..14f8f71 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/successBtn2/style.json @@ -0,0 +1,33 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--neutral-10)", + "borderColor": "var(--success)", + "borderStyle": "solid", + "borderWidth": "1px", + "boxShadow": "none", + "color": "var(--success)", + "fontWeight": "normal", + "margin": "5px", + "textTransform": "uppercase", + "fill": "var(--success)" + } + }, + "variants": [ + { + "pseudo": "hover", + "animation": { + "duration": "0.2s", + "direction": "normal", + "iterationCount": "1", + "timingFunction": "ease", + "keyframes": { + "0%": {}, + "100%": { + "backgroundColor": "var(--neutral-20)" + } + } + } + } + ] +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/warning/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/warning/resource.json new file mode 100644 index 0000000..a11c366 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/warning/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "3bac4508deba5466c862c2a4823da22229ac06bdb415b195abaffcf101801608" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/warning/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/warning/style.json new file mode 100644 index 0000000..be9d041 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/warning/style.json @@ -0,0 +1,11 @@ +{ + "base": { + "style": { + "backgroundColor": "#555555", + "borderTopColor": "#FFFF00", + "borderTopStyle": "solid", + "borderTopWidth": "4px", + "boxShadow": "0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22)" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/warningBtn1/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/warningBtn1/resource.json new file mode 100644 index 0000000..959632c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/warningBtn1/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "609d266de1246bfec0f01f3d6091d8ccdc91e062516e9c873dd4460804593f61" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/warningBtn1/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/warningBtn1/style.json new file mode 100644 index 0000000..fffccdd --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/warningBtn1/style.json @@ -0,0 +1,25 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--warning)", + "borderStyle": "none", + "boxShadow": "none", + "margin": "5px", + "textTransform": "uppercase" + } + }, + "variants": [ + { + "pseudo": "hover", + "style": { + "backgroundColor": "var(--warning)" + } + }, + { + "pseudo": "active", + "style": { + "color": "var(--neutral-30)" + } + } + ] +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/warningBtn2/resource.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/warningBtn2/resource.json new file mode 100644 index 0000000..b53af1c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/warningBtn2/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "49bd07a491ef67aa0a0a7acc1b4b6fd773b9ac569443e54eb1081211ac84f13f" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Alerts/states/warningBtn2/style.json b/com.inductiveautomation.perspective/style-classes/Alerts/states/warningBtn2/style.json new file mode 100644 index 0000000..c38ccd0 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Alerts/states/warningBtn2/style.json @@ -0,0 +1,33 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--neutral-10)", + "borderColor": "var(--warning)", + "borderStyle": "solid", + "borderWidth": "1px", + "boxShadow": "none", + "color": "var(--warning)", + "fontWeight": "normal", + "margin": "5px", + "textTransform": "uppercase", + "fill": "var(--warning)" + } + }, + "variants": [ + { + "pseudo": "hover", + "animation": { + "duration": "0.2s", + "direction": "normal", + "iterationCount": "1", + "timingFunction": "ease", + "keyframes": { + "0%": {}, + "100%": { + "backgroundColor": "var(--neutral-20)" + } + } + } + } + ] +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Background-Styles/Controller/resource.json b/com.inductiveautomation.perspective/style-classes/Background-Styles/Controller/resource.json new file mode 100644 index 0000000..3624800 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Background-Styles/Controller/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol@amazon.co.uk", + "timestamp": "2022-09-26T14:36:22Z" + }, + "lastModificationSignature": "61aa833972910f81cdb2d12c94297830805b2b41231be36bc41d369f1ba61ad6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Background-Styles/Controller/style.json b/com.inductiveautomation.perspective/style-classes/Background-Styles/Controller/style.json new file mode 100644 index 0000000..4b15e8f --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Background-Styles/Controller/style.json @@ -0,0 +1,8 @@ +{ + "base": { + "style": { + "backgroundColor": "#3B3B3B", + "color": "#FFFFFF" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Background-Styles/Grey-Background/resource.json b/com.inductiveautomation.perspective/style-classes/Background-Styles/Grey-Background/resource.json new file mode 100644 index 0000000..1ff67a6 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Background-Styles/Grey-Background/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2021-12-08T10:43:49Z" + }, + "lastModificationSignature": "71cf335f01412f6d310005ec9f6f1359db927454c7a34f6e34bba2d627c0fc34" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Background-Styles/Grey-Background/style.json b/com.inductiveautomation.perspective/style-classes/Background-Styles/Grey-Background/style.json new file mode 100644 index 0000000..8d0e0d9 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Background-Styles/Grey-Background/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "backgroundColor": "#EEEEEE " + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Background-Styles/Main-Background/resource.json b/com.inductiveautomation.perspective/style-classes/Background-Styles/Main-Background/resource.json new file mode 100644 index 0000000..85f81cb --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Background-Styles/Main-Background/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2021-11-04T10:59:59Z" + }, + "lastModificationSignature": "ace7f51e45280d54f0ef131b84f2b489462e279d372ba7c522985bc97be560ea" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Background-Styles/Main-Background/style.json b/com.inductiveautomation.perspective/style-classes/Background-Styles/Main-Background/style.json new file mode 100644 index 0000000..9d98d89 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Background-Styles/Main-Background/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "backgroundColor": "#2B2B2B" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Buttons/Button-Menu/resource.json b/com.inductiveautomation.perspective/style-classes/Buttons/Button-Menu/resource.json new file mode 100644 index 0000000..316b639 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Buttons/Button-Menu/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-20T14:21:02Z" + }, + "lastModificationSignature": "24ee4af796a96cbf88b34ae31bcbbfcc1f0e3062a11721949ce2f0178a99874b" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Buttons/Button-Menu/style.json b/com.inductiveautomation.perspective/style-classes/Buttons/Button-Menu/style.json new file mode 100644 index 0000000..4b15e8f --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Buttons/Button-Menu/style.json @@ -0,0 +1,8 @@ +{ + "base": { + "style": { + "backgroundColor": "#3B3B3B", + "color": "#FFFFFF" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Buttons/Clear-Background/resource.json b/com.inductiveautomation.perspective/style-classes/Buttons/Clear-Background/resource.json new file mode 100644 index 0000000..0f52cf3 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Buttons/Clear-Background/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-03-02T21:46:17Z" + }, + "lastModificationSignature": "17bf39ccfdf077c3c0c295ba84d1a4432658643fbbabe9788777d764444ac003" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Buttons/Clear-Background/style.json b/com.inductiveautomation.perspective/style-classes/Buttons/Clear-Background/style.json new file mode 100644 index 0000000..9cc31d7 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Buttons/Clear-Background/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "backgroundColor": "#EEEEEE" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Buttons/PB_1/resource.json b/com.inductiveautomation.perspective/style-classes/Buttons/PB_1/resource.json new file mode 100644 index 0000000..0bbfc23 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Buttons/PB_1/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2021-12-01T09:19:54Z" + }, + "lastModificationSignature": "5e5eaa698f3567638ca85e82a3e9b455d44734aca87b44b8cec5ae4d0b734b16" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Buttons/PB_1/style.json b/com.inductiveautomation.perspective/style-classes/Buttons/PB_1/style.json new file mode 100644 index 0000000..6acf469 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Buttons/PB_1/style.json @@ -0,0 +1,9 @@ +{ + "base": { + "style": { + "backgroundColor": "#2F73BF", + "fontFamily": "Arial", + "fontSize": "12px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/DeviceManager/DeviceManagerRows/resource.json b/com.inductiveautomation.perspective/style-classes/DeviceManager/DeviceManagerRows/resource.json new file mode 100644 index 0000000..f624a6a --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/DeviceManager/DeviceManagerRows/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2021-12-01T16:05:04Z" + }, + "lastModificationSignature": "9e018160b970cb0867d3f98057a212673dc90b11ac7ed11e5f34c0d3714e7bd2" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/DeviceManager/DeviceManagerRows/style.json b/com.inductiveautomation.perspective/style-classes/DeviceManager/DeviceManagerRows/style.json new file mode 100644 index 0000000..b0b8076 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/DeviceManager/DeviceManagerRows/style.json @@ -0,0 +1,12 @@ +{ + "base": { + "style": { + "backgroundColor": "#FFFFFF", + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "12px", + "fontWeight": "bold", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Disconnects/Device-Connected/resource.json b/com.inductiveautomation.perspective/style-classes/Disconnects/Device-Connected/resource.json new file mode 100644 index 0000000..fc32dd2 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Disconnects/Device-Connected/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-07-13T15:23:36Z" + }, + "lastModificationSignature": "85ff4f497ead9ef279d96dbc4197220af7d11bcbecba8a23261e5a8532bb56e1" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Disconnects/Device-Connected/style.json b/com.inductiveautomation.perspective/style-classes/Disconnects/Device-Connected/style.json new file mode 100644 index 0000000..88cc7f3 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Disconnects/Device-Connected/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "borderStyle": "none" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Disconnects/Device-Disconnected/resource.json b/com.inductiveautomation.perspective/style-classes/Disconnects/Device-Disconnected/resource.json new file mode 100644 index 0000000..87d405e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Disconnects/Device-Disconnected/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-07-13T15:23:36Z" + }, + "lastModificationSignature": "7dee6c72f40e81be38904cdd626bad89ac9fc2735fdf63fab8779a5be8ab25f4" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Disconnects/Device-Disconnected/style.json b/com.inductiveautomation.perspective/style-classes/Disconnects/Device-Disconnected/style.json new file mode 100644 index 0000000..f037520 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Disconnects/Device-Disconnected/style.json @@ -0,0 +1,9 @@ +{ + "base": { + "style": { + "borderColor": "#FF0000", + "borderStyle": "solid", + "borderWidth": "2px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Dropdown/DropDownBox/resource.json b/com.inductiveautomation.perspective/style-classes/Dropdown/DropDownBox/resource.json new file mode 100644 index 0000000..27c6534 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Dropdown/DropDownBox/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-01-13T16:33:03Z" + }, + "lastModificationSignature": "0a7cd6014a7c590e35b176dea9de5e5c18c8825fed595bd0a4475f53148c44d3" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Dropdown/DropDownBox/style.json b/com.inductiveautomation.perspective/style-classes/Dropdown/DropDownBox/style.json new file mode 100644 index 0000000..6660145 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Dropdown/DropDownBox/style.json @@ -0,0 +1,9 @@ +{ + "base": { + "style": { + "backgroundColor": "#FFFFFF", + "color": "#000000", + "fontFamily": "Arial" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopActivated/resource.json b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopActivated/resource.json new file mode 100644 index 0000000..a8bf745 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopActivated/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-10-25T08:13:45Z" + }, + "lastModificationSignature": "6be61e1e8d8627e1901f483caae5a245f640db2543117e7f02ebbcbe6bb203b6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopActivated/style.json b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopActivated/style.json new file mode 100644 index 0000000..8898864 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopActivated/style.json @@ -0,0 +1,8 @@ +{ + "base": { + "style": { + "backgroundColor": "#FFFF00", + "color": "#FF0000" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopActivated101/resource.json b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopActivated101/resource.json new file mode 100644 index 0000000..7e9790d --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopActivated101/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-11-20T14:33:35Z" + }, + "lastModificationSignature": "7d7bf095d438de686eadaac405ec76f7da4e0f19607bc4e7c09a02ec5bc3a58c" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopActivated101/style.json b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopActivated101/style.json new file mode 100644 index 0000000..6cf9be1 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopActivated101/style.json @@ -0,0 +1,12 @@ +{ + "base": { + "animation": { + "keyframes": { + "0%": { + "backgroundColor": "#FF0000" + }, + "100%": {} + } + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopDeactivated/resource.json b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopDeactivated/resource.json new file mode 100644 index 0000000..d2d09de --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopDeactivated/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-11-20T10:52:30Z" + }, + "lastModificationSignature": "cac7ebd9266553c94cb93787c5b86e9f9f222d4858182cb719f18e2c50446df9" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopDeactivated/style.json b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopDeactivated/style.json new file mode 100644 index 0000000..46da093 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopDeactivated/style.json @@ -0,0 +1,8 @@ +{ + "base": { + "style": { + "backgroundColor": "#FFFF00", + "color": "#008000" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopDeactivated100/resource.json b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopDeactivated100/resource.json new file mode 100644 index 0000000..cc53b63 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopDeactivated100/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-11-24T10:07:02Z" + }, + "lastModificationSignature": "3e02df9251eea06e73d7bc696041b031a9318c55f19adeee8e922740d59c67ec" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopDeactivated100/style.json b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopDeactivated100/style.json new file mode 100644 index 0000000..54b23af --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/EmergencyStop-Styles/EstopDeactivated100/style.json @@ -0,0 +1,12 @@ +{ + "base": { + "animation": { + "keyframes": { + "0%": { + "backgroundColor": "#008000" + }, + "100%": {} + } + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Bold_Text/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Bold_Text/resource.json new file mode 100644 index 0000000..a4102ad --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Bold_Text/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "585f926783d365f05a5f805f339bc1dabbf6c14082d2200730cc067aafbb58d9" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Bold_Text/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Bold_Text/style.json new file mode 100644 index 0000000..b21b980 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Bold_Text/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Card/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Card/resource.json new file mode 100644 index 0000000..12a2112 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Card/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "d909c3b117b76d557a42afbfa15e72a1cdf2295f55b527d92869cbf058dafc26" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Card/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Card/style.json new file mode 100644 index 0000000..762c94d --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Card/style.json @@ -0,0 +1,13 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--neutral-10)", + "borderColor": "var(--neutral-30)", + "borderStyle": "solid", + "borderWidth": "1px", + "borderRadius": "4px", + "boxShadow": "0px 2px 4px rgba(0, 0, 40, 0.15)", + "margin": "5px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Card_transparent/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Card_transparent/resource.json new file mode 100644 index 0000000..b559737 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Card_transparent/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "4c3f6070a499c81c31e4740642f4c0ebf808e523a8af3a4f854084fff4aebf80" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Card_transparent/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Card_transparent/style.json new file mode 100644 index 0000000..abab03c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Card_transparent/style.json @@ -0,0 +1,8 @@ +{ + "base": { + "style": { + "backgroundColor": "transparent", + "margin": "1px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_error/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_error/resource.json new file mode 100644 index 0000000..c997d5b --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_error/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "8fd944a8db6c9c949a9698738fe4fee993b423a090d4254fd9de60a2748d276e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_error/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_error/style.json new file mode 100644 index 0000000..37f829c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_error/style.json @@ -0,0 +1,17 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--error)", + "borderTopLeftRadius": "4px", + "borderTopRightRadius": "4px", + "borderBottomLeftRadius": "4px", + "borderBottomRightRadius": "4px", + "color": "var(--neutral-10)", + "fontSize": "12px", + "fontWeight": "bold", + "lineHeight": "16px", + "padding": "2px", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_info/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_info/resource.json new file mode 100644 index 0000000..82eb941 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_info/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "4de4f81755f05631b6f8f7ba36c216b01b0129225a08863d4236e5eea4bdb66f" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_info/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_info/style.json new file mode 100644 index 0000000..3f225e0 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_info/style.json @@ -0,0 +1,17 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--info)", + "borderTopLeftRadius": "4px", + "borderTopRightRadius": "4px", + "borderBottomLeftRadius": "4px", + "borderBottomRightRadius": "4px", + "color": "var(--neutral-10)", + "fontSize": "12px", + "fontWeight": "bold", + "lineHeight": "16px", + "padding": "2px", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_off/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_off/resource.json new file mode 100644 index 0000000..6ab2730 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_off/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "87a2e1f14438122e01e17cc13471047b6aec9346bca94d2ea6eecedea5df083e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_off/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_off/style.json new file mode 100644 index 0000000..4cd4ed4 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_off/style.json @@ -0,0 +1,17 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--neutral-60)", + "borderTopLeftRadius": "4px", + "borderTopRightRadius": "4px", + "borderBottomLeftRadius": "4px", + "borderBottomRightRadius": "4px", + "color": "var(--neutral-10)", + "fontSize": "12px", + "fontWeight": "bold", + "lineHeight": "16px", + "padding": "2px", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_success/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_success/resource.json new file mode 100644 index 0000000..ad48966 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_success/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "19d0216d546f082cfa5bd664cb3721ac4937d9f3a68518e26161cb1eef353b2a" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_success/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_success/style.json new file mode 100644 index 0000000..65375f9 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_success/style.json @@ -0,0 +1,17 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--success)", + "borderTopLeftRadius": "4px", + "borderTopRightRadius": "4px", + "borderBottomLeftRadius": "4px", + "borderBottomRightRadius": "4px", + "color": "var(--neutral-10)", + "fontSize": "12px", + "fontWeight": "bold", + "lineHeight": "16px", + "padding": "2px", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_warning/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_warning/resource.json new file mode 100644 index 0000000..d1801d4 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_warning/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "5172112b12da738369a0ad2ad303e9500a6f4aa81ec8835fcb750ab5b6a24aac" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_warning/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_warning/style.json new file mode 100644 index 0000000..fcf27fd --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Data/value_warning/style.json @@ -0,0 +1,17 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--warning)", + "borderTopLeftRadius": "4px", + "borderTopRightRadius": "4px", + "borderBottomLeftRadius": "4px", + "borderBottomRightRadius": "4px", + "color": "var(--neutral-10)", + "fontSize": "12px", + "fontWeight": "bold", + "lineHeight": "16px", + "padding": "2px", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Embedded/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Embedded/resource.json new file mode 100644 index 0000000..002aad0 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Embedded/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "767842679a4540e19b9714c28add87731b9249cbaf1894135e6b8e4017f3defb" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Embedded/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Embedded/style.json new file mode 100644 index 0000000..e40b9fa --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Embedded/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "margin": "5px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Embedded_transparent/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Embedded_transparent/resource.json new file mode 100644 index 0000000..fac236c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Embedded_transparent/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "8e4410ca8d56830cbb68cba756cb9547560bacced6941f06e923864b68f61c88" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Embedded_transparent/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Embedded_transparent/style.json new file mode 100644 index 0000000..51f7cfa --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Embedded_transparent/style.json @@ -0,0 +1,9 @@ +{ + "base": { + "style": { + "margin": "5px", + "marginLeft": "0px", + "marginRight": "0px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Item/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Item/resource.json new file mode 100644 index 0000000..4bc71d7 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Item/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "0a776adc0866b3ee5fe86e31a9f2fed6c8669186f4ab036b198a03723d0ec42b" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Item/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Item/style.json new file mode 100644 index 0000000..c8bd125 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Item/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "paddingBottom": "4px", + "paddingLeft": "18px", + "paddingRight": "18px", + "paddingTop": "4px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Item_Border/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Item_Border/resource.json new file mode 100644 index 0000000..8df7ebd --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Item_Border/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "2df8b3d8924e82fad807180e2f5f6f521cfa09485de8d678d5aeb2a2e14c6cd7" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Item_Border/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Item_Border/style.json new file mode 100644 index 0000000..de9f0c8 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Item_Border/style.json @@ -0,0 +1,9 @@ +{ + "base": { + "style": { + "borderBottomColor": "var(--neutral-30)", + "borderBottomStyle": "solid", + "borderBottomWidth": "1px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Label/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Label/resource.json new file mode 100644 index 0000000..ca4af66 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Label/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "62fb51a3122ff501e0e3d64baee9e792754e37d5bff21b44d410c706fae418ca" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Label/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Label/style.json new file mode 100644 index 0000000..3de2c5a --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Label/style.json @@ -0,0 +1,12 @@ +{ + "base": { + "style": { + "color": "var(--neutral-70)", + "fontSize": "12px", + "fontWeight": "300", + "lineHeight": "16px", + "marginRight": "10px", + "textTransform": "uppercase" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Row/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Row/resource.json new file mode 100644 index 0000000..1f8eff6 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Row/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "43f147e02fffc14ac1224aa5b496be8528942c81e456797e4f3da0f47471368e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Row/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Row/style.json new file mode 100644 index 0000000..fc7c06a --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Row/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "marginBottom": "2px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Title/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Title/resource.json new file mode 100644 index 0000000..57f6d0c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Title/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "d2d2811be2ce62916c15f95fe06de380ff1b8d2c22d413d68c9e539f906c03d4" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Title/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Title/style.json new file mode 100644 index 0000000..8b1cf60 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Title/style.json @@ -0,0 +1,17 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--neutral-20)", + "borderBottomColor": "var(--neutral-30)", + "borderBottomStyle": "solid", + "borderBottomWidth": "1px", + "color": "var(--neutral-80)", + "fontSize": "12px", + "fontWeight": "bold", + "paddingLeft": "6px", + "paddingRight": "6px", + "textTransform": "uppercase", + "fill": "var(--neutral-70)" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Title_transparent/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Title_transparent/resource.json new file mode 100644 index 0000000..bc153a6 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Title_transparent/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "1565a3bbc869249e6ecc523fd82bdf9ae287ed6098e0f701e018891d30049dd6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Title_transparent/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Title_transparent/style.json new file mode 100644 index 0000000..2f848da --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Title_transparent/style.json @@ -0,0 +1,17 @@ +{ + "base": { + "style": { + "backgroundColor": "transparent", + "borderBottomColor": "var(--neutral-30)", + "borderBottomStyle": "solid", + "borderBottomWidth": "1px", + "color": "var(--neutral-80)", + "fontSize": "12px", + "fontWeight": "bold", + "paddingLeft": "6px", + "paddingRight": "6px", + "textTransform": "uppercase", + "fill": "var(--neutral-70)" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Value/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Value/resource.json new file mode 100644 index 0000000..f3bd5e2 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Value/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "93a043288dcd06a830f8463e31b2df67a9e2d2c0d15b6ad74c28265aabda20a7" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Card/Value/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Card/Value/style.json new file mode 100644 index 0000000..6c627a7 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Card/Value/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "color": "var(--info)", + "fontSize": "12px", + "fontWeight": "bold", + "lineHeight": "16px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Bold_Text/data.bin b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Bold_Text/data.bin new file mode 100644 index 0000000..23b71b2 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Bold_Text/data.bin @@ -0,0 +1 @@ +{"base":{"style":{"fontWeight":"bold"}}} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Bold_Text/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Bold_Text/resource.json new file mode 100644 index 0000000..ec41f3d --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Bold_Text/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "data.bin" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "724ec4a29768744e8a98b04beeaeffbe2786f9510a4c74fb1f704afedd7945f0" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Card/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Card/resource.json new file mode 100644 index 0000000..bb59688 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Card/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "7b09dc9dfc03e14eed4096d2f183f1746840ca2d1469bb5292717d48c6d045ce" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Card/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Card/style.json new file mode 100644 index 0000000..982f4b3 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Card/style.json @@ -0,0 +1,13 @@ +{ + "base": { + "style": { + "backgroundColor": "#FAFAFA", + "borderColor": "#D5D5D5", + "borderStyle": "solid", + "borderWidth": "1px", + "borderRadius": "4px", + "boxShadow": "0px 2px 4px rgba(0, 0, 40, 0.15)", + "margin": "5px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Embedded/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Embedded/resource.json new file mode 100644 index 0000000..44d5be5 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Embedded/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "0c8f1a09ea1dca1b39354b44e2dc1282bab329d6bc22b806ef0a799bc6d356d6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Embedded/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Embedded/style.json new file mode 100644 index 0000000..e40b9fa --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Embedded/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "margin": "5px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Item/data.bin b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Item/data.bin new file mode 100644 index 0000000..b3d0ed8 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Item/data.bin @@ -0,0 +1 @@ +{"base":{"style":{"paddingBottom":"4px","paddingLeft":"18px","paddingRight":"18px","paddingTop":"4px"}}} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Item/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Item/resource.json new file mode 100644 index 0000000..2972ec1 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Item/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "data.bin" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "79005be23b3ff6489426936b79cf3f2ebab8457a1095db43007414b860a6f3fd" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Item_Border/data.bin b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Item_Border/data.bin new file mode 100644 index 0000000..f7eedd7 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Item_Border/data.bin @@ -0,0 +1 @@ +{"base":{"style":{"borderBottomColor":"#D5D5D5","borderBottomStyle":"solid","borderBottomWidth":"1px"}}} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Item_Border/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Item_Border/resource.json new file mode 100644 index 0000000..ad62454 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Item_Border/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "data.bin" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "f0ee9cc172435a4fe10515590d008d84463ab6a3dc039b86f4f469e10944b7a9" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Label/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Label/resource.json new file mode 100644 index 0000000..0f86c17 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Label/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "0bcd51b2564fdb884800f6228b59baffff1e427c61e89daa92fd6e880815de1e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Label/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Label/style.json new file mode 100644 index 0000000..12be6e1 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Label/style.json @@ -0,0 +1,12 @@ +{ + "base": { + "style": { + "color": "#8E8E8E", + "fontSize": "12px", + "fontWeight": "300", + "lineHeight": "16px", + "marginRight": "10px", + "textTransform": "uppercase" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Row/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Row/resource.json new file mode 100644 index 0000000..5fb8071 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Row/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "5bd3eb9fceed7a7f8f1856aaf0172982817f2dd58c92c618d928d58dc46a02c7" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Row/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Row/style.json new file mode 100644 index 0000000..fc7c06a --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Row/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "marginBottom": "2px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Title/data.bin b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Title/data.bin new file mode 100644 index 0000000..0e16719 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Title/data.bin @@ -0,0 +1 @@ +{"base":{"style":{"backgroundColor":"#E6EAEEAD","borderBottomColor":"#D5D5D5","borderBottomStyle":"solid","borderBottomWidth":"1px","color":"#2E2E2E","fontSize":"12px","fontWeight":"bold","paddingLeft":"6px","paddingRight":"6px","textTransform":"uppercase","fill":"#2E2E2E"}}} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Title/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Title/resource.json new file mode 100644 index 0000000..44ebc46 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Title/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "data.bin" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "7c6da0dbdc1a180ea324c7fb08f7188364ef2e586aed38dfa3b92f24cda32db7" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Value/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Value/resource.json new file mode 100644 index 0000000..368d07e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Value/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "4df5b762a5257d76fa2efc5ed1c26c6aeae9bd7316f61f05377517a059545a61" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/Cards/Value/style.json b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Value/style.json new file mode 100644 index 0000000..d740f8f --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/Cards/Value/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "color": "#2B2B2B", + "fontSize": "12px", + "fontWeight": "bold", + "lineHeight": "16px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/ColorPicker/Container/resource.json b/com.inductiveautomation.perspective/style-classes/Framework/ColorPicker/Container/resource.json new file mode 100644 index 0000000..cce2e07 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/ColorPicker/Container/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "c1529eb80f683e859860ea49adf5e303a04222f1da5a0b32c8819fd6c48b4ab1" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Framework/ColorPicker/Container/style.json b/com.inductiveautomation.perspective/style-classes/Framework/ColorPicker/Container/style.json new file mode 100644 index 0000000..f1b5f0e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Framework/ColorPicker/Container/style.json @@ -0,0 +1,11 @@ +{ + "base": { + "style": { + "borderColor": "#CCCCCC", + "borderStyle": "solid", + "borderWidth": "1px", + "borderRadius": "4px", + "padding": "4px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button/resource.json b/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button/resource.json new file mode 100644 index 0000000..835c48e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "348d033d4e3781cd58222724dab76878c8ad540ed06373f8f0c8cbc10edb51cd" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button/style.json b/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button/style.json new file mode 100644 index 0000000..37e9238 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button/style.json @@ -0,0 +1,9 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--callToAction)", + "margin": "4px", + "padding": "4px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button_Disabled/resource.json b/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button_Disabled/resource.json new file mode 100644 index 0000000..5694859 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button_Disabled/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "fcc5dc0c4651704d851a3d5986fdd4a1da34d4ba8b71b04e2c2e28021736bcd6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button_Disabled/style.json b/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button_Disabled/style.json new file mode 100644 index 0000000..b9257ea --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button_Disabled/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--neutral-30)", + "color": "var(--neutral-50)", + "margin": "4px", + "padding": "4px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button_Error/resource.json b/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button_Error/resource.json new file mode 100644 index 0000000..9115e11 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button_Error/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "c7e607fef24bbb48f35f7f6e9a16ccb7d2af6e67678c981ef3f3bd4eb88f3d29" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button_Error/style.json b/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button_Error/style.json new file mode 100644 index 0000000..737d890 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Input/Button/Action_Button_Error/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "var(--error)", + "color": "#2B2B2B", + "margin": "4px", + "padding": "4px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Input/Button/Export_Button/resource.json b/com.inductiveautomation.perspective/style-classes/Input/Button/Export_Button/resource.json new file mode 100644 index 0000000..41a9c91 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Input/Button/Export_Button/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "223051a9bb6cae88d1326f72590b43228e4c19e3ea175e8420ce3aebd4bed07c" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Input/Button/Export_Button/style.json b/com.inductiveautomation.perspective/style-classes/Input/Button/Export_Button/style.json new file mode 100644 index 0000000..43da557 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Input/Button/Export_Button/style.json @@ -0,0 +1,12 @@ +{ + "base": { + "style": { + "backgroundColor": "#AAAAAA", + "borderColor": "#808080", + "borderStyle": "none", + "color": "#555555", + "margin": "5px", + "fill": "#2B2B2B" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Input/Button/General_Button/resource.json b/com.inductiveautomation.perspective/style-classes/Input/Button/General_Button/resource.json new file mode 100644 index 0000000..41a9c91 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Input/Button/General_Button/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "223051a9bb6cae88d1326f72590b43228e4c19e3ea175e8420ce3aebd4bed07c" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Input/Button/General_Button/style.json b/com.inductiveautomation.perspective/style-classes/Input/Button/General_Button/style.json new file mode 100644 index 0000000..43da557 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Input/Button/General_Button/style.json @@ -0,0 +1,12 @@ +{ + "base": { + "style": { + "backgroundColor": "#AAAAAA", + "borderColor": "#808080", + "borderStyle": "none", + "color": "#555555", + "margin": "5px", + "fill": "#2B2B2B" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Input/Button/Secondary_minimal/resource.json b/com.inductiveautomation.perspective/style-classes/Input/Button/Secondary_minimal/resource.json new file mode 100644 index 0000000..de7bf76 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Input/Button/Secondary_minimal/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "4f95c6da49368fb432e12df6f71e36173e56f6d4edbeb378ca679e6c826a81ec" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Input/Button/Secondary_minimal/style.json b/com.inductiveautomation.perspective/style-classes/Input/Button/Secondary_minimal/style.json new file mode 100644 index 0000000..9a6d62e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Input/Button/Secondary_minimal/style.json @@ -0,0 +1,8 @@ +{ + "base": { + "style": { + "backgroundColor": "transparent", + "borderStyle": "none" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Labels/Label/resource.json b/com.inductiveautomation.perspective/style-classes/Labels/Label/resource.json new file mode 100644 index 0000000..2e4164e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Labels/Label/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2021-12-01T11:34:16Z" + }, + "lastModificationSignature": "5640b85022afe01309b46d8be591202608264741ae1ba2f93f5423c7a639adae" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Labels/Label/style.json b/com.inductiveautomation.perspective/style-classes/Labels/Label/style.json new file mode 100644 index 0000000..a2681bd --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Labels/Label/style.json @@ -0,0 +1,11 @@ +{ + "base": { + "style": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "20px", + "fontWeight": "bold", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Labels/Label_1/resource.json b/com.inductiveautomation.perspective/style-classes/Labels/Label_1/resource.json new file mode 100644 index 0000000..ee2f04b --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Labels/Label_1/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2021-12-02T16:37:21Z" + }, + "lastModificationSignature": "0a7a3f7aa63a692545a4970911ba8b6e5e066fe6a3189666217b9d1cda1bf1e2" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Labels/Label_1/style.json b/com.inductiveautomation.perspective/style-classes/Labels/Label_1/style.json new file mode 100644 index 0000000..916e126 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Labels/Label_1/style.json @@ -0,0 +1,11 @@ +{ + "base": { + "style": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "14px", + "fontWeight": "bold", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/PopUp-Styles/InfoButton/resource.json b/com.inductiveautomation.perspective/style-classes/PopUp-Styles/InfoButton/resource.json new file mode 100644 index 0000000..92042d6 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/PopUp-Styles/InfoButton/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-10-29T14:08:41Z" + }, + "lastModificationSignature": "1f9730fd63b2309ab8a51b56ff3ed2fa93ebb1cf38aece906501279b83d24101" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/PopUp-Styles/InfoButton/style.json b/com.inductiveautomation.perspective/style-classes/PopUp-Styles/InfoButton/style.json new file mode 100644 index 0000000..6bb0b38 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/PopUp-Styles/InfoButton/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "paddingBottom": "5px", + "paddingLeft": "5px", + "paddingRight": "5px", + "paddingTop": "5px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/PopUp-Styles/InfoLabel/resource.json b/com.inductiveautomation.perspective/style-classes/PopUp-Styles/InfoLabel/resource.json new file mode 100644 index 0000000..685ec25 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/PopUp-Styles/InfoLabel/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-10-29T13:18:27Z" + }, + "lastModificationSignature": "f5c594779d9ba008aabb476c35bd8831f3522a304b306b2be60b6c1283a860ba" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/PopUp-Styles/InfoLabel/style.json b/com.inductiveautomation.perspective/style-classes/PopUp-Styles/InfoLabel/style.json new file mode 100644 index 0000000..434d8f1 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/PopUp-Styles/InfoLabel/style.json @@ -0,0 +1,18 @@ +{ + "base": { + "style": { + "borderBottomStyle": "none", + "borderBottomWidth": "0.5px", + "borderLeftStyle": "none", + "borderLeftWidth": "0.5px", + "borderRightStyle": "none", + "borderRightWidth": "0.5px", + "borderTopStyle": "solid", + "borderTopWidth": "0.5px", + "color": "#808080", + "fontFamily": "Roboto", + "fontSize": "12px", + "fontWeight": "lighter" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/PopUp-Styles/Information-Device/resource.json b/com.inductiveautomation.perspective/style-classes/PopUp-Styles/Information-Device/resource.json new file mode 100644 index 0000000..498fa26 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/PopUp-Styles/Information-Device/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-10-29T13:48:04Z" + }, + "lastModificationSignature": "7f5d6683e6530a5d8a1394b938c96cec9f484016d7dea7d92da51a34702a7717" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/PopUp-Styles/Information-Device/style.json b/com.inductiveautomation.perspective/style-classes/PopUp-Styles/Information-Device/style.json new file mode 100644 index 0000000..3054d91 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/PopUp-Styles/Information-Device/style.json @@ -0,0 +1,18 @@ +{ + "base": { + "style": { + "backgroundColor": "#EEEEEE ", + "borderColor": "#808080", + "borderStyle": "solid", + "borderWidth": "0.5px", + "borderTopLeftRadius": "10px", + "borderTopRightRadius": "10px", + "borderBottomLeftRadius": "10px", + "borderBottomRightRadius": "10px", + "color": "#FBFCFC", + "cursor": "auto", + "fontFamily": "Arial", + "fontWeight": "lighter" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/AAA-Style/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/AAA-Style/resource.json new file mode 100644 index 0000000..f780083 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/AAA-Style/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-04-27T09:36:00Z" + }, + "lastModificationSignature": "dfa938b0ec8dfe36705251817fea7dfa6a57965cf9211306581fb009a26aa448" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/AAA-Style/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/AAA-Style/style.json new file mode 100644 index 0000000..c9d9460 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/AAA-Style/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "backgroundColor": "#FFDC00" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State0/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State0/resource.json new file mode 100644 index 0000000..8b4df6f --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State0/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-01-04T16:56:59Z" + }, + "lastModificationSignature": "8ce5de598de20e024d5b7026771b4fc2c264acbb7e97e0dda5d9130d3764c96b" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State0/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State0/style.json new file mode 100644 index 0000000..55e15f2 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State0/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#8C8C8C", + "color": "#000000", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State1/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State1/resource.json new file mode 100644 index 0000000..f7766d1 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State1/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T14:49:34Z" + }, + "lastModificationSignature": "ce6516d96aec235ac51d8981b7f44b3746359c7b6feb379f0c429c3b90a80a85" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State1/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State1/style.json new file mode 100644 index 0000000..a6ba74f --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State1/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#FF0000", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State2/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State2/resource.json new file mode 100644 index 0000000..5f98680 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State2/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T14:50:19Z" + }, + "lastModificationSignature": "5733fc4a5868ced9d9b244dd16fed252ac913fc1c653804e115808364879b096" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State2/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State2/style.json new file mode 100644 index 0000000..a5d68c5 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State2/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#F00077B3", + "color": "#000000", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State3/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State3/resource.json new file mode 100644 index 0000000..41df3ee --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State3/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T14:50:55Z" + }, + "lastModificationSignature": "d01c7e0e80b109f167485caf3ae15278074e6674a897ec4333db54bc06d98d21" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State3/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State3/style.json new file mode 100644 index 0000000..7b36e1d --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State3/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#FF6000B3", + "color": "#000000", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State4/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State4/resource.json new file mode 100644 index 0000000..227f661 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State4/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T14:52:15Z" + }, + "lastModificationSignature": "7a17549e4701bda45b68e0e7cad2e8f13001bf39df0d9de30a5c144d7fc64d39" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State4/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State4/style.json new file mode 100644 index 0000000..a222549 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State4/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#FCC400B3", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State5/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State5/resource.json new file mode 100644 index 0000000..5d24784 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State5/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-22T08:44:03Z" + }, + "lastModificationSignature": "4ea7ea676e88922a813b7cf3d7d008baff5f92b881ad35a16a405c631a154cd0" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State5/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State5/style.json new file mode 100644 index 0000000..198a4d1 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Alt-Background-Fill/State5/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#007EFC", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State0/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State0/resource.json new file mode 100644 index 0000000..8c1313f --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State0/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T16:46:29Z" + }, + "lastModificationSignature": "e1df5e7fdf39aaa3770822e3c496fda4f8b5e70fa6aebed5b31dbccadf9d5756" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State0/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State0/style.json new file mode 100644 index 0000000..55e15f2 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State0/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#8C8C8C", + "color": "#000000", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State1/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State1/resource.json new file mode 100644 index 0000000..5e17d78 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State1/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T14:47:26Z" + }, + "lastModificationSignature": "8f681baea4f31ca9377034ee3f15ab57f06c07be6e9de4c132c3fc246c2beba6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State1/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State1/style.json new file mode 100644 index 0000000..a6ba74f --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State1/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#FF0000", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State1_Alt/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State1_Alt/resource.json new file mode 100644 index 0000000..358baf3 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State1_Alt/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-01-20T15:04:27Z" + }, + "lastModificationSignature": "8a6b2aee655f84c6d0acb7f7cdc8dd421f80e68bc48c38b75e04a565979931ff" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State1_Alt/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State1_Alt/style.json new file mode 100644 index 0000000..a6ba74f --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State1_Alt/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#FF0000", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State2/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State2/resource.json new file mode 100644 index 0000000..80328ec --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State2/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T14:48:10Z" + }, + "lastModificationSignature": "69edc4a36b44af4ccea8b8b2e6494f755e70d339791acd6a0218c390462230f7" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State2/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State2/style.json new file mode 100644 index 0000000..2887093 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State2/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#FF8000", + "color": "#000000", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State2_Alt/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State2_Alt/resource.json new file mode 100644 index 0000000..3d36fe3 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State2_Alt/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-01-20T15:04:34Z" + }, + "lastModificationSignature": "c75e8b2a4d5b3d18bc9aea0c0b88097e679117e97c1810b983e0988278d5088b" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State2_Alt/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State2_Alt/style.json new file mode 100644 index 0000000..571f7e6 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State2_Alt/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#F00077", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State3/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State3/resource.json new file mode 100644 index 0000000..8cf253e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State3/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T14:48:02Z" + }, + "lastModificationSignature": "cdee64e873c5075d9e4c1b8473d55bbeadf6679044973e4857350a8833cac8eb" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State3/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State3/style.json new file mode 100644 index 0000000..06fca02 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State3/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#FFFF00", + "color": "#000000", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State3_Alt/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State3_Alt/resource.json new file mode 100644 index 0000000..ae55620 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State3_Alt/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-01-20T15:04:39Z" + }, + "lastModificationSignature": "4998f8db3790856ced8bfe160b675371758796420cd5b209ee36207ddee836ac" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State3_Alt/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State3_Alt/style.json new file mode 100644 index 0000000..812c3c8 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State3_Alt/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#FF6000", + "color": "#000000", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State4/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State4/resource.json new file mode 100644 index 0000000..877afdd --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State4/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T14:47:32Z" + }, + "lastModificationSignature": "a94984a8b93afb77713b72d94b9f28e6cb5f7e100c1c74886958ebeb2e9289e8" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State4/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State4/style.json new file mode 100644 index 0000000..198a4d1 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State4/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#007EFC", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State4_Alt/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State4_Alt/resource.json new file mode 100644 index 0000000..fdc67d3 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State4_Alt/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-01-20T15:04:48Z" + }, + "lastModificationSignature": "7af7a85d270e00bb3976d43e215762b00a7eccf6a789f2b70f610150c727eaae" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State4_Alt/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State4_Alt/style.json new file mode 100644 index 0000000..fcb4cbc --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State4_Alt/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#FCC400", + "color": "#000000", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State5/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State5/resource.json new file mode 100644 index 0000000..2e07bd4 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State5/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T18:08:15Z" + }, + "lastModificationSignature": "3941247289e7f2da02947f73fcf80ea5603d14f9d66ca60e5308b1c92b1c1a83" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State5/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State5/style.json new file mode 100644 index 0000000..ea4de11 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State5/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#00CC00", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State5_Alt/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State5_Alt/resource.json new file mode 100644 index 0000000..4fde756 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State5_Alt/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-01-20T15:04:55Z" + }, + "lastModificationSignature": "c504f8eaca609efbdc085be9bab4e444a727285b7dc61d0262dd37167da003c5" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State5_Alt/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State5_Alt/style.json new file mode 100644 index 0000000..92691b5 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State5_Alt/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#007DFA", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State6/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State6/resource.json new file mode 100644 index 0000000..ff3a03e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State6/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-11-08T21:11:20Z" + }, + "lastModificationSignature": "feefbcccb0db745a2b88a7016813184939d8489f4f21592eb77f0910aea25865" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State6/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State6/style.json new file mode 100644 index 0000000..b9337b5 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/Background-Fill/State6/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "backgroundColor": "#CCCCFF", + "color": "#000000", + "fontFamily": "Arial", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State0/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State0/resource.json new file mode 100644 index 0000000..73d0385 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State0/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-10-25T08:13:53Z" + }, + "lastModificationSignature": "5eab50e7b7346cda2ea75cff6c034754c6ddc2c6d0b99996c71259a138a48ecc" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State0/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State0/style.json new file mode 100644 index 0000000..fb1801e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State0/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "color": "#808080" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State1/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State1/resource.json new file mode 100644 index 0000000..0b87f5f --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State1/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-04-27T14:35:13Z" + }, + "lastModificationSignature": "92b03aa4bd3ec8684646f2676ff4adf8c307155038b45f095544ce5f5306ddcd" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State1/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State1/style.json new file mode 100644 index 0000000..8806361 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State1/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "color": "#FF0000" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State101/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State101/resource.json new file mode 100644 index 0000000..fabadc9 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State101/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-22T11:35:26Z" + }, + "lastModificationSignature": "c8bf51f274d3a203a50844123f76516030002d421d845d1587b21619f5c44cce" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State101/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State101/style.json new file mode 100644 index 0000000..cfcac7b --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State101/style.json @@ -0,0 +1,13 @@ +{ + "base": { + "animation": { + "duration": "1s", + "keyframes": { + "0%": { + "backgroundColor": "#FF0000B3" + }, + "100%": {} + } + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State102/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State102/resource.json new file mode 100644 index 0000000..5f1482b --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State102/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T18:25:37Z" + }, + "lastModificationSignature": "871176e247dabf99db5cf05edd44cd60f815774147f44b6e1ccb9af23ebad469" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State102/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State102/style.json new file mode 100644 index 0000000..6381a93 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State102/style.json @@ -0,0 +1,13 @@ +{ + "base": { + "animation": { + "duration": "1s", + "keyframes": { + "0%": { + "backgroundColor": "#FF8000B3" + }, + "100%": {} + } + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State103/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State103/resource.json new file mode 100644 index 0000000..cbb5d9d --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State103/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T18:26:06Z" + }, + "lastModificationSignature": "71833ab80e60568fcaf95d185e5c44f6894a69166ece00cf155c3a352ba890cb" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State103/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State103/style.json new file mode 100644 index 0000000..8586d48 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State103/style.json @@ -0,0 +1,13 @@ +{ + "base": { + "animation": { + "duration": "1s", + "keyframes": { + "0%": { + "backgroundColor": "#FFFF00B3" + }, + "100%": {} + } + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State104/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State104/resource.json new file mode 100644 index 0000000..37c207a --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State104/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T18:26:14Z" + }, + "lastModificationSignature": "bbc347636a70914630e7f1f565e8e2df1202e9d936bc5d74f6fd2c7cfd15f3f1" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State104/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State104/style.json new file mode 100644 index 0000000..e5f9982 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State104/style.json @@ -0,0 +1,13 @@ +{ + "base": { + "animation": { + "duration": "1s", + "keyframes": { + "0%": { + "backgroundColor": "#007EFCB3" + }, + "100%": {} + } + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State105/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State105/resource.json new file mode 100644 index 0000000..abdace5 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State105/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T18:26:22Z" + }, + "lastModificationSignature": "e4dcc12f988ee0536369107964b751a89a965c8d4b609a11d40f53bf6c2e5799" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State105/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State105/style.json new file mode 100644 index 0000000..e5b9343 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State105/style.json @@ -0,0 +1,13 @@ +{ + "base": { + "animation": { + "duration": "1s", + "keyframes": { + "0%": { + "backgroundColor": "#00CC00" + }, + "100%": {} + } + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State106/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State106/resource.json new file mode 100644 index 0000000..b446fce --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State106/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T18:26:29Z" + }, + "lastModificationSignature": "d5edad966dffd9d8027753594cc265a561169fafc89e7f74ce09c8722aadf74c" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State106/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State106/style.json new file mode 100644 index 0000000..dbe7f65 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State106/style.json @@ -0,0 +1,13 @@ +{ + "base": { + "animation": { + "duration": "1s", + "keyframes": { + "0%": { + "backgroundColor": "#CCCCFF" + }, + "100%": {} + } + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State2/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State2/resource.json new file mode 100644 index 0000000..e324956 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State2/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-11-04T19:25:46Z" + }, + "lastModificationSignature": "d6d090eb502aa937824091912d813957dca8cc098fa7af1b0558a87242595d2c" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State2/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State2/style.json new file mode 100644 index 0000000..fb1801e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State2/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "color": "#808080" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State201/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State201/resource.json new file mode 100644 index 0000000..f6138aa --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State201/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-07-14T13:24:35Z" + }, + "lastModificationSignature": "ef23602d75314cd5c3e5a9ac90178354fc7fae1b1cf4cd4e5663cb9a6437ad82" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State201/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State201/style.json new file mode 100644 index 0000000..f79ee95 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State201/style.json @@ -0,0 +1,13 @@ +{ + "base": { + "animation": { + "duration": "1s", + "keyframes": { + "0%": { + "backgroundColor": "#FF0000" + }, + "100%": {} + } + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State202/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State202/resource.json new file mode 100644 index 0000000..116b7a3 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State202/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-07-14T13:24:35Z" + }, + "lastModificationSignature": "6bfa4111c57188290da62f9a8356245e6dd94938c456d3e50a5e9b932d13fba8" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State202/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State202/style.json new file mode 100644 index 0000000..d06c0f1 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State202/style.json @@ -0,0 +1,13 @@ +{ + "base": { + "animation": { + "duration": "1s", + "keyframes": { + "0%": { + "backgroundColor": "#F00077" + }, + "100%": {} + } + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State203/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State203/resource.json new file mode 100644 index 0000000..6e398d7 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State203/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-07-14T13:24:35Z" + }, + "lastModificationSignature": "945d6a4b57d24dde92cfe41218b6027707fceafd9bf2022d704f16841081bb8f" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State203/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State203/style.json new file mode 100644 index 0000000..66627cd --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State203/style.json @@ -0,0 +1,13 @@ +{ + "base": { + "animation": { + "duration": "1s", + "keyframes": { + "0%": { + "backgroundColor": "#FF6000" + }, + "100%": {} + } + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State204/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State204/resource.json new file mode 100644 index 0000000..5ab9a56 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State204/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-07-14T13:24:35Z" + }, + "lastModificationSignature": "f41dd6f4cac908833cc054e5b64d34f4232969292d556ace6ee8406f19ddd6ff" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State204/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State204/style.json new file mode 100644 index 0000000..bfcced5 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State204/style.json @@ -0,0 +1,13 @@ +{ + "base": { + "animation": { + "duration": "1s", + "keyframes": { + "0%": { + "backgroundColor": "#FCC400" + }, + "100%": {} + } + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State205/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State205/resource.json new file mode 100644 index 0000000..324f917 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State205/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-07-14T13:24:35Z" + }, + "lastModificationSignature": "926c6ac6c0fd794fcd952d361dc892c9c6cb3e0d34c3d4faa3497efe116d9c27" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State205/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State205/style.json new file mode 100644 index 0000000..677242c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State205/style.json @@ -0,0 +1,13 @@ +{ + "base": { + "animation": { + "duration": "1s", + "keyframes": { + "0%": { + "backgroundColor": "#007DFA" + }, + "100%": {} + } + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State3/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State3/resource.json new file mode 100644 index 0000000..3d0455c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State3/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-11-04T19:26:04Z" + }, + "lastModificationSignature": "42c2630f4716b0fa8446c8bd935cc3e78154d517e0ca88dcab0da90ade02b7cf" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State3/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State3/style.json new file mode 100644 index 0000000..8ddfe1b --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State3/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "color": "#4747FF" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State4/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State4/resource.json new file mode 100644 index 0000000..baec70a --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State4/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-04-27T14:40:37Z" + }, + "lastModificationSignature": "215d71f1863f68cd3732cd1fc8541794f0f14273c8fcf4e62f16d7bb3eb70973" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State4/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State4/style.json new file mode 100644 index 0000000..55e7693 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State4/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "color": "#FFB200" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State5/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State5/resource.json new file mode 100644 index 0000000..137ef36 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State5/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T18:07:37Z" + }, + "lastModificationSignature": "1c710c0833d18f82f6401b7f4111dd1d6fbd7434f235b1cb5175fb007228375c" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State5/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State5/style.json new file mode 100644 index 0000000..4bfcd6d --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State5/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "color": "#00CC00" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State6/resource.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State6/resource.json new file mode 100644 index 0000000..3028cca --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State6/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-11-04T19:26:52Z" + }, + "lastModificationSignature": "96c5f301e57d29fc5f5bf0bbeb0aeb075b0ee5d58a2668775cb1d93583bb8d2c" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/State-Styles/State6/style.json b/com.inductiveautomation.perspective/style-classes/State-Styles/State6/style.json new file mode 100644 index 0000000..d615c70 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/State-Styles/State6/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "color": "#CCCCFF" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text-Styles/Ariel-Bold-12pt/resource.json b/com.inductiveautomation.perspective/style-classes/Text-Styles/Ariel-Bold-12pt/resource.json new file mode 100644 index 0000000..a7abc8b --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text-Styles/Ariel-Bold-12pt/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-11-01T19:34:14Z" + }, + "lastModificationSignature": "12828099a2661842c655d47c7eacd93062f8283f56167561484fca1639657bc5" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text-Styles/Ariel-Bold-12pt/style.json b/com.inductiveautomation.perspective/style-classes/Text-Styles/Ariel-Bold-12pt/style.json new file mode 100644 index 0000000..1c9a08f --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text-Styles/Ariel-Bold-12pt/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "12px", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text-Styles/Ariel-Bold-White-12pt/resource.json b/com.inductiveautomation.perspective/style-classes/Text-Styles/Ariel-Bold-White-12pt/resource.json new file mode 100644 index 0000000..c124a1c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text-Styles/Ariel-Bold-White-12pt/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-11-09T13:52:21Z" + }, + "lastModificationSignature": "922e29ee6b6183325ade90125c952d7d87b62d8f5c4d04b28d6bd7a5c87c6a24" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text-Styles/Ariel-Bold-White-12pt/style.json b/com.inductiveautomation.perspective/style-classes/Text-Styles/Ariel-Bold-White-12pt/style.json new file mode 100644 index 0000000..dee08f7 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text-Styles/Ariel-Bold-White-12pt/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": "12px", + "fontWeight": "bold" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text-Styles/Controller/resource.json b/com.inductiveautomation.perspective/style-classes/Text-Styles/Controller/resource.json new file mode 100644 index 0000000..f374cbe --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text-Styles/Controller/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol@amazon.co.uk", + "timestamp": "2022-09-26T14:36:22Z" + }, + "lastModificationSignature": "c52f15aa087decb8736f37c6840c583226118a7003236c119800dfe74edb145a" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text-Styles/Controller/style.json b/com.inductiveautomation.perspective/style-classes/Text-Styles/Controller/style.json new file mode 100644 index 0000000..39fd938 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text-Styles/Controller/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "fontFamily": "Arial", + "fontSize": "10px", + "fontWeight": "bold", + "textAlign": "left" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text-Styles/Docked-Buttons/resource.json b/com.inductiveautomation.perspective/style-classes/Text-Styles/Docked-Buttons/resource.json new file mode 100644 index 0000000..118221e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text-Styles/Docked-Buttons/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "pllincol@amazon.co.uk", + "timestamp": "2022-09-26T14:36:22Z" + }, + "lastModificationSignature": "4f42ec6607300aed69df70f0831917b428c4d1714f98fb00149bd417155178d9" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text-Styles/Docked-Buttons/style.json b/com.inductiveautomation.perspective/style-classes/Text-Styles/Docked-Buttons/style.json new file mode 100644 index 0000000..4260a62 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text-Styles/Docked-Buttons/style.json @@ -0,0 +1,9 @@ +{ + "base": { + "style": { + "fontFamily": "Arial", + "fontSize": "10px", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/CenterAlign_with_Padding/resource.json b/com.inductiveautomation.perspective/style-classes/Text/CenterAlign_with_Padding/resource.json new file mode 100644 index 0000000..123507c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/CenterAlign_with_Padding/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "88a969de6e2fd1f6b5f29e64f8bec3652e26960a28b7770f8eae83d3062fb788" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/CenterAlign_with_Padding/style.json b/com.inductiveautomation.perspective/style-classes/Text/CenterAlign_with_Padding/style.json new file mode 100644 index 0000000..e2e8661 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/CenterAlign_with_Padding/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "overflowWrap": "normal", + "paddingLeft": "4px", + "paddingRight": "4px", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/InfoText/resource.json b/com.inductiveautomation.perspective/style-classes/Text/InfoText/resource.json new file mode 100644 index 0000000..df69c60 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/InfoText/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "a231d897b3e3a5b12058c4cf23d0eeaba3d83b50c818f5254239bbd231bc573f" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/InfoText/style.json b/com.inductiveautomation.perspective/style-classes/Text/InfoText/style.json new file mode 100644 index 0000000..52f9b5a --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/InfoText/style.json @@ -0,0 +1,8 @@ +{ + "base": { + "style": { + "color": "var(--neutral-80)", + "fontSize": "min(1.0vw, 14px)" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/Label/resource.json b/com.inductiveautomation.perspective/style-classes/Text/Label/resource.json new file mode 100644 index 0000000..44d5be5 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/Label/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "0c8f1a09ea1dca1b39354b44e2dc1282bab329d6bc22b806ef0a799bc6d356d6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/Label/style.json b/com.inductiveautomation.perspective/style-classes/Text/Label/style.json new file mode 100644 index 0000000..e40b9fa --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/Label/style.json @@ -0,0 +1,7 @@ +{ + "base": { + "style": { + "margin": "5px" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/LeftAlign_with_Padding/resource.json b/com.inductiveautomation.perspective/style-classes/Text/LeftAlign_with_Padding/resource.json new file mode 100644 index 0000000..be5ba47 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/LeftAlign_with_Padding/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "e91c0bdcf6473bfb448861acaad7da2e69c6a2ef557f85fbcdf5556263a9f89f" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/LeftAlign_with_Padding/style.json b/com.inductiveautomation.perspective/style-classes/Text/LeftAlign_with_Padding/style.json new file mode 100644 index 0000000..27ac20c --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/LeftAlign_with_Padding/style.json @@ -0,0 +1,8 @@ +{ + "base": { + "style": { + "paddingLeft": "4px", + "textAlign": "left" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/RightAlign_with_Padding/resource.json b/com.inductiveautomation.perspective/style-classes/Text/RightAlign_with_Padding/resource.json new file mode 100644 index 0000000..77b37a6 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/RightAlign_with_Padding/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "52e6339246d5cac3eee877c822e3de48717d65520e26e8de37478b52a3488265" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/RightAlign_with_Padding/style.json b/com.inductiveautomation.perspective/style-classes/Text/RightAlign_with_Padding/style.json new file mode 100644 index 0000000..7304b53 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/RightAlign_with_Padding/style.json @@ -0,0 +1,8 @@ +{ + "base": { + "style": { + "paddingRight": "4px", + "textAlign": "right" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/TitleText/resource.json b/com.inductiveautomation.perspective/style-classes/Text/TitleText/resource.json new file mode 100644 index 0000000..18c875f --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/TitleText/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "ce83ed1e6665e65e7882877660f4398956d992dd2ffbf0050c810ac772a533d6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/TitleText/style.json b/com.inductiveautomation.perspective/style-classes/Text/TitleText/style.json new file mode 100644 index 0000000..55e6395 --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/TitleText/style.json @@ -0,0 +1,10 @@ +{ + "base": { + "style": { + "color": "var(--neutral-80)", + "fontSize": "min(2.0vw, 36px)", + "fontWeight": "bold", + "textAlign": "center" + } + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/labelText/resource.json b/com.inductiveautomation.perspective/style-classes/Text/labelText/resource.json new file mode 100644 index 0000000..c65df9d --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/labelText/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "style.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "4a3f6a0ea527fec9bb6c24e69d1e7059d269526837354eeee7938b22d5220211" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/style-classes/Text/labelText/style.json b/com.inductiveautomation.perspective/style-classes/Text/labelText/style.json new file mode 100644 index 0000000..29a285e --- /dev/null +++ b/com.inductiveautomation.perspective/style-classes/Text/labelText/style.json @@ -0,0 +1,5 @@ +{ + "base": { + "style": {} + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/stylesheet/resource.json b/com.inductiveautomation.perspective/stylesheet/resource.json new file mode 100644 index 0000000..967655c --- /dev/null +++ b/com.inductiveautomation.perspective/stylesheet/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "stylesheet.css" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2023-09-05T13:25:20Z" + }, + "lastModificationSignature": "db6ad83da61ac54c363dcf17c27a98d0d301c550d80cd2fd189f052de36e8f7e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/stylesheet/stylesheet.css b/com.inductiveautomation.perspective/stylesheet/stylesheet.css new file mode 100644 index 0000000..9e68540 --- /dev/null +++ b/com.inductiveautomation.perspective/stylesheet/stylesheet.css @@ -0,0 +1,70 @@ +/* Direct stylesheet authoring is an advanced feature. Knowledge of CSS required.*/ + +.psc-x1 { transition: all .2s ease-in-out; } +.psc-x1:hover { transform: scale(1.5) !important; z-index: 5;} + + +.psc-x2 { transition: all .2s ease-in-out; } +.psc-x2:hover { transform: scale(2) !important; z-index: 5;} + +.psc-x3 { transition: all .2s ease-in-out; } +.psc-x3:hover { transform: scale(3) !important; z-index: 5;} + +/* Set the styling for the Table component checkbox colour.*/ +.ia_tableComponent[data-component="ia.display.table"] .ia_checkbox__checkedIcon { + color: black; +} +.ia_tableComponent[data-component="ia.display.table"] .ia_checkbox__uncheckedIcon { + color: black; +} + +div[data-component="ia.input.fileupload"] .ia_button--primary { + background-color: var(--neutral-30); + border-style: None; + color: black; + border-radius:20px; +} + + +/* Help page styles */ + +.psc-background:hover { + box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + transition: box-shadow 0.9s ease-in-out; +} + +.psc-background-none { + box-shadow: 0 0px 0px 0 , 0 0px 0px 0; + transition: box-shadow 0.9s ease-in-out; +} + +@keyframes fadeIn{ + 0% { opacity: 0; } + 100% { opacity: 1; } +} + +.psc-FadeInFast { + animation: fadeIn 2s; +} + +.psc-FadeInMedium { + animation: fadeIn 4s; +} + +.psc-FadeInSlow { + animation: fadeIn 6s; +} + + +@keyframes rotation { + from { + transform: rotate(0deg); + } + to { + transform: rotate(359deg); + } +} + +.psc-rotate { + animation: rotation 2s infinite linear; +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Additional-Home-View/MAP-Home/resource.json b/com.inductiveautomation.perspective/views/Additional-Home-View/MAP-Home/resource.json new file mode 100644 index 0000000..cfe4e9f --- /dev/null +++ b/com.inductiveautomation.perspective/views/Additional-Home-View/MAP-Home/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "ankikarw", + "timestamp": "2024-04-01T21:09:10Z" + }, + "lastModificationSignature": "39d8b5fdbc33c9104ee2dfc6d73cc3e0bcf798e38727b6e8709af8dc27eef9c2" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Additional-Home-View/MAP-Home/thumbnail.png b/com.inductiveautomation.perspective/views/Additional-Home-View/MAP-Home/thumbnail.png new file mode 100644 index 0000000..a547ea4 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Additional-Home-View/MAP-Home/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Additional-Home-View/MAP-Home/view.json b/com.inductiveautomation.perspective/views/Additional-Home-View/MAP-Home/view.json new file mode 100644 index 0000000..f45faa6 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Additional-Home-View/MAP-Home/view.json @@ -0,0 +1,108 @@ +{ + "custom": { + "activityLogger": { + "alt_pageid": "site-overview", + "start_time": { + "$": [ + "ts", + 192, + 1709762531101 + ], + "$ts": 1709762531101 + } + } + }, + "events": { + "system": { + "onShutdown": { + "config": { + "script": "\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)" + }, + "scope": "G", + "type": "script" + }, + "onStartup": { + "config": { + "script": "\tself.custom.activityLogger.start_time \u003d system.date.now()" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": {}, + "propConfig": { + "custom.activityLogger": { + "persistent": true + }, + "custom.activityLogger.pageid": { + "binding": { + "config": { + "expression": "{page.props.path}" + }, + "transforms": [ + { + "code": "\tif value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n\t\treturn self.custom.activityLogger.alt_pageid.lower()\n\telse:\n\t\treturn value[1:].lower()", + "type": "script" + } + ], + "type": "expr" + } + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "custom": { + "s3URI": "SCADA/Other/MAP.svg" + }, + "meta": { + "name": "Image" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.source": { + "binding": { + "config": { + "path": "this.custom.s3URI" + }, + "transforms": [ + { + "code": "\treturn AWS.s3.getPresignedURL(self, value)", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "altText": "none", + "fit": { + "mode": "fill" + } + }, + "type": "ia.display.image" + } + ], + "meta": { + "name": "root" + }, + "props": { + "mode": "percent", + "style": { + "backgroundColor": "#EEEEEE" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Alarm-Views/AlarmTable/resource.json b/com.inductiveautomation.perspective/views/Alarm-Views/AlarmTable/resource.json new file mode 100644 index 0000000..8d7a1e5 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Alarm-Views/AlarmTable/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "vivsampa", + "timestamp": "2024-04-18T12:23:53Z" + }, + "lastModificationSignature": "cfece3333a1ad9f32c7f70d100f78c91ec462c469dfce881bdff001e2c2fb0ca" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Alarm-Views/AlarmTable/thumbnail.png b/com.inductiveautomation.perspective/views/Alarm-Views/AlarmTable/thumbnail.png new file mode 100644 index 0000000..eeb4b64 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Alarm-Views/AlarmTable/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Alarm-Views/AlarmTable/view.json b/com.inductiveautomation.perspective/views/Alarm-Views/AlarmTable/view.json new file mode 100644 index 0000000..3077f84 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Alarm-Views/AlarmTable/view.json @@ -0,0 +1,1281 @@ +{ + "custom": {}, + "params": { + "alarm_states": [ + "Shelved", + "Active", + "Not Active" + ], + "length_of_table_data": 0, + "show_filter": false, + "show_severity_column": true, + "show_state_column": true, + "table_type": "value", + "tagProps": [ + "" + ] + }, + "propConfig": { + "params.alarm_states": { + "paramDirection": "input", + "persistent": true + }, + "params.length_of_table_data": { + "binding": { + "config": { + "expression": "len({/root/Table.props.data})" + }, + "type": "expr" + }, + "paramDirection": "output", + "persistent": true + }, + "params.show_filter": { + "paramDirection": "input", + "persistent": true + }, + "params.show_severity_column": { + "paramDirection": "input", + "persistent": true + }, + "params.show_state_column": { + "paramDirection": "input", + "persistent": true + }, + "params.table_type": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "custom": { + "alarms_to_shelve": {}, + "alarms_to_unshelve": {}, + "delay": 2000, + "run_export": false, + "run_update": true, + "severity_filters": [ + "off", + "off", + "off", + "off", + "off" + ], + "shelve_alarms": false, + "shelve_duration": "", + "unshelve_alarms": false + }, + "events": { + "component": { + "onRowClick": [ + { + "config": { + "script": "\n\talarm_id \u003d event.value.Alarm_id\n\tsource_id \u003d event.value.SourceId\n\tif self.props.data[event.row].value.Shelve.value \u003d\u003d True:\n\t\tself.props.data[event.row].value.Shelve.value \u003d False\n\t\tkey \u003d alarms.alarm_tables.create_shelve_key(source_id, alarm_id)\n\t\tself.custom.alarms_to_shelve.pop(key, \"no key found\")\n\telse:\n\t\tself.props.data[event.row].value.Shelve.value \u003d True\n\t\tkey \u003d alarms.alarm_tables.create_shelve_key(source_id, alarm_id)\n\t\tself.custom.alarms_to_shelve[key] \u003d event.value.Alarm_id" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "script": "\tif self.view.params.table_type \u003d\u003d \"Shelved\":\n\t\talarm_id \u003d event.value.Alarm_id\n\t\tsource_id \u003d event.value.SourceId\n\t\t\n\t\tif self.props.data[event.row].value.Unshelve.value \u003d\u003d True:\n\t\t\tself.props.data[event.row].value.Unshelve.value \u003d False\n\t\t\tkey \u003d alarms.alarm_tables.create_shelve_key(source_id, alarm_id)\n\t\t\tself.custom.alarms_to_unshelve.pop(key, \"no key found\")\n\t\telse:\n\t\t\tself.props.data[event.row].value.Unshelve.value \u003d True\n\t\t\tkey \u003d alarms.alarm_tables.create_shelve_key(source_id, alarm_id)\n\t\t\tself.custom.alarms_to_unshelve[key] \u003d event.value.Alarm_id" + }, + "scope": "G", + "type": "script" + } + ], + "onRowDoubleClick": { + "config": { + "script": "\trow \u003d event.value\n\tsource_id \u003d row.get(\"SourceId\")\n\tsource_id \u003d source_id.replace(\" \",\"\")\n\tconfig.project_config.source_id_lookup(self, source_id)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Table" + }, + "position": { + "basis": "1080px" + }, + "propConfig": { + "custom.device": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "type": "property" + } + }, + "custom.run_export": { + "onChange": { + "enabled": null, + "script": "\trun_export \u003d self.custom.run_export\n\tif run_export:\n\t\tdata \u003d self.props.data\n\t\trow_data \u003d []\n\t\tfor i,j in enumerate(data):\n\t\t\tvalue \u003d j[\"value\"]\n\t\t\tif i \u003d\u003d 0:\n\t\t\t\theader \u003d [item for item in value] \t\n\t\t\trow \u003d [value[item][\"value\"] for item in value]\n\t\t\tif not isinstance(row[3], int):\n\t\t\t\trow[3] \u003d 0\t\t\t\n\t\t\trow_data.append(row) \n\t\t\n\t\talarms_data \u003d system.dataset.toDataSet(header,row_data)\n\t\thtml_data \u003d system.dataset.dataSetToHTML(1, alarms_data, \"RealTimeAlarms\")\n\t\tsystem.perspective.download(\"myExport.html\",html_data)\n\t\tself.custom.run_export \u003d False" + } + }, + "custom.severity_filters[0]": { + "access": "PRIVATE" + }, + "custom.shelve_alarms": { + "onChange": { + "enabled": null, + "script": "\tif self.custom.shelve_alarms:\n\t\tsource_ids_to_shelve \u003d []\n\t\tids_to_shelve \u003d [] \n\t\tfor k,v in self.custom.alarms_to_shelve.items():\n\t\t\tsource_id, alarm_id \u003d alarms.alarm_tables.unformat_shelve_key(k)\n\t\t\tsource_ids_to_shelve .append(source_id)\n\t\t\tids_to_shelve.append(alarm_id)\n\t\twhid \u003d self.session.custom.fc\n\t\tduration \u003d self.custom.shelve_duration\n\t\tCommands.shelve_alarms.send_shelve_request(whid, source_ids_to_shelve, \"shelve\", duration, ids_to_shelve)\n\t\tself.custom.alarms_to_shelve \u003d {}\n\t\tself.custom.shelve_alarms \u003d False\n\t\t \t" + } + }, + "custom.unshelve_alarms": { + "onChange": { + "enabled": null, + "script": "\tif self.custom.unshelve_alarms:\n\t\tsource_ids_to_shelve \u003d []\n\t\tids_to_shelve \u003d [] \n\t\tfor k,v in self.custom.alarms_to_unshelve.items():\n\t\t\tsource_id, alarm_id \u003d alarms.alarm_tables.unformat_shelve_key(k)\n\t\t\tsource_ids_to_shelve .append(source_id)\n\t\t\tids_to_shelve.append(alarm_id)\n\t\twhid \u003d self.session.custom.fc\n\t\tduration \u003d 0\n\t\tCommands.shelve_alarms.send_shelve_request(whid, source_ids_to_shelve, \"unshelve\", duration, ids_to_shelve)\n\t\tself.custom.alarms_to_unshelve \u003d {}\n\t\tself.custom.unshelve_alarms \u003d False" + } + }, + "custom.update": { + "binding": { + "config": { + "expression": "if({this.custom.run_update},\r\nnow({this.custom.delay}), False)" + }, + "type": "expr" + }, + "onChange": { + "enabled": null, + "script": "\n\tno_filter \u003d False\n\tseverity_filters \u003d self.custom.severity_filters\n\talarm_states \u003d self.view.params.alarm_states\n\ttable_type \u003d self.view.params.table_type\n\twhid \u003d self.session.custom.fc\n\talarms_to_shelve \u003d self.custom.alarms_to_shelve\n\tprovider \u003d \"[%s_SCADA_TAG_PROVIDER]\" % (whid)\n\tif (severity_filters[0] \u003d\u003d \"off\" and severity_filters[1] \u003d\u003d \"off\" \n\tand severity_filters[2] \u003d\u003d \"off\" and severity_filters[3] \u003d\u003d \"off\" \n\tand severity_filters[4] \u003d\u003d \"off\"):\n\t no_filter \u003d True\n\t\n\tif system.tag.exists(provider + \"System/aws_data\"):\n\t\ttags_to_read \u003d system.tag.readBlocking([provider + \"System/aws_data\", \n\t\t\t\t\t\t\t\t\t\t\t\tprovider + \"Configuration/DetailedViews\"])\n\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\tdetailed_view_decoded \u003d system.util.jsonDecode(tags_to_read[1].value)\n\t\tif self.view.params.table_type \u003d\u003d \"Docked-East\":\n\t\t\tdevice_list \u003d [self.custom.device] \n\t\telse:\n\t\t\tdevice_list \u003d detailed_view_decoded.get(self.custom.device,[])\n\t\tif len(decode_alarm_data) \u003e 0:\n\t\t\talt_colour \u003d self.session.custom.colours.colour_impaired\n\t\t\talarms_data \u003d alarms.alarm_tables.get_alarm_table(self, decode_alarm_data, \n\t\t\tseverity_filters, no_filter, device_list, alarm_states, alt_colour,\n\t\t\ttable_type)\t\t\n\t\t\tif len(alarms_data)\u003e0:\n\t\t\t\tself.props.data \u003d alarms_data\n\t\t\telse:\n\t\t\t\tself.props.data \u003d []\n\t\telse:\n\t\t\tself.props.data \u003d []\n\telse:\n\t\tself.props.data \u003d []" + } + }, + "props.columns[2].visible": { + "binding": { + "config": { + "expression": "if({view.params.table_type} \u003d \"Shelved\", False, True)" + }, + "type": "expr" + } + }, + "props.columns[3].visible": { + "binding": { + "config": { + "expression": "if({view.params.table_type} \u003d \"Shelved\", False, True)" + }, + "type": "expr" + } + }, + "props.columns[4].visible": { + "binding": { + "config": { + "expression": "if({view.params.table_type} \u003d \"Shelved\", False, True)" + }, + "type": "expr" + } + }, + "props.columns[5].visible": { + "binding": { + "config": { + "path": "view.params.show_severity_column" + }, + "type": "property" + } + }, + "props.columns[6].visible": { + "binding": { + "config": { + "expression": "if({view.params.table_type} \u003d \"Shelved\", True, False)" + }, + "type": "expr" + } + }, + "props.columns[7].visible": { + "binding": { + "config": { + "expression": "if({view.params.table_type} \u003d \"Shelved\", False, True)" + }, + "type": "expr" + } + }, + "props.columns[8].visible": { + "binding": { + "config": { + "expression": "if({view.params.table_type} \u003d \"Shelved\", True, False)" + }, + "type": "expr" + } + }, + "props.filter.enabled": { + "binding": { + "config": { + "path": "view.params.show_filter" + }, + "type": "property" + } + }, + "props.selection.data": { + "onChange": { + "enabled": null, + "script": "\tpayload \u003d self.props.selection.data\n\tsystem.perspective.sendMessage(\"alarms-to-shelve\", payload \u003d payload, scope \u003d \"page\")" + } + } + }, + "props": { + "cells": { + "style": { + "marginLeft": 5, + "marginRight": 5, + "overflowWrap": "normal", + "wordWrap": "normal" + } + }, + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "SourceId", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Message", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY HH:mm:ss", + "editable": false, + "field": "Timestamp", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Duration", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "00:00:00", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "State", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Priority", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY HH:mm:ss", + "editable": false, + "field": "Expiration", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "Shelve", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "width": 100 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "Unshelve", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "width": 100 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Alarm_id", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Type", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "emptyMessage": { + "noData": { + "icon": { + "color": "#000000" + } + } + }, + "filter": {}, + "headerStyle": { + "classes": "Background-Styles/Controller" + }, + "selection": { + "mode": "multiple interval" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "severity-filters", + "pageScope": true, + "script": "\n\tcritical \u003d payload.get(\"critical\")\n\tif critical \u003d\u003d \"true\":\n\t\tself.custom.severity_filters[5] \u003d 5\n\tif critical \u003d\u003d \"false\":\n\t\tself.custom.severity_filters[5] \u003d \"off\"\n\t\n\thigh \u003d payload.get(\"high\")\n\tif high \u003d\u003d \"true\":\n\t\tself.custom.severity_filters[4] \u003d 4\n\tif high \u003d\u003d \"false\":\n\t\tself.custom.severity_filters[4] \u003d \"off\"\n\t\n\tmedium \u003d payload.get(\"medium\")\n\tif medium \u003d\u003d \"true\":\n\t\tself.custom.severity_filters[3] \u003d 3\n\tif medium \u003d\u003d \"false\":\n\t\tself.custom.severity_filters[3] \u003d \"off\"\n\t\n\tlow \u003d payload.get(\"low\")\n\tif low \u003d\u003d \"true\":\n\t\tself.custom.severity_filters[2] \u003d 2\n\tif low \u003d\u003d \"false\":\n\t\tself.custom.severity_filters[2] \u003d \"off\"\n\t\n\tdiagnostic \u003d payload.get(\"diagnostic\")\n\tif diagnostic \u003d\u003d \"true\":\n\t\tself.custom.severity_filters[1] \u003d 1\n\tif diagnostic \u003d\u003d \"false\":\n\t\tself.custom.severity_filters[1] \u003d \"off\"", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "update-table", + "pageScope": true, + "script": "\t# implement your handler here\n\tupdate \u003d payload[\"update\"]\n\tself.custom.run_update \u003d update", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "run-alarm-export", + "pageScope": true, + "script": "\t# implement your handler here\n\tif self.view.params.table_type \u003d\u003d \"Realtime\":\n\t\texport \u003d payload[\"export\"]\n\t\tself.custom.run_export \u003d export", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "reset-filters", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tseverity_filters \u003d self.custom.severity_filters\n\tseverity_filters[0] \u003d \"off\"\n\tseverity_filters[1] \u003d \"off\"\n\tseverity_filters[2] \u003d \"off\"\n\tseverity_filters[3] \u003d \"off\"\n\tseverity_filters[4] \u003d \"off\"\n\tself.custom.alarms_to_shelve \u003d {}", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "shelve-alarms", + "pageScope": true, + "script": "\tduration \u003d payload[\"duration\"]\n\tself.custom.shelve_duration \u003d duration\n\tself.custom.shelve_alarms \u003d True", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "unshelve-alarms", + "pageScope": true, + "script": "\tself.custom.unshelve_alarms \u003d True", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Alarm-Views/Docked-Alarm/resource.json b/com.inductiveautomation.perspective/views/Alarm-Views/Docked-Alarm/resource.json new file mode 100644 index 0000000..f822180 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Alarm-Views/Docked-Alarm/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-08-01T07:23:34Z" + }, + "lastModificationSignature": "f8a37ad2426fa95195a2814beac8f8ef7c57f32357f960dcfad8198c6aed025d" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Alarm-Views/Docked-Alarm/thumbnail.png b/com.inductiveautomation.perspective/views/Alarm-Views/Docked-Alarm/thumbnail.png new file mode 100644 index 0000000..9c71669 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Alarm-Views/Docked-Alarm/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Alarm-Views/Docked-Alarm/view.json b/com.inductiveautomation.perspective/views/Alarm-Views/Docked-Alarm/view.json new file mode 100644 index 0000000..821b5a2 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Alarm-Views/Docked-Alarm/view.json @@ -0,0 +1,1978 @@ +{ + "custom": {}, + "params": { + "PLCTagPath": "value" + }, + "propConfig": { + "params.PLCTagPath": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 1920 + } + }, + "root": { + "children": [ + { + "custom": { + "AlarmsToShelve": "{}", + "delay": 2000, + "device": "value", + "run_export": false, + "run_update": false, + "severity_filters": [ + "off", + "off", + "off", + "off", + "off" + ] + }, + "events": { + "component": { + "onRowDoubleClick": { + "config": { + "script": "\trow \u003d event.value\n\tmhe_id \u003d row.get(\"SourceId\")\n\tnavigation.amzl_navigation.navigate_to_alarm(self, mhe_id)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Active_Table" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "custom.AlarmsToShelve": { + "onChange": { + "enabled": null, + "script": "\n\tpayload \u003d self.custom.AlarmsToShelve\n\tsystem.perspective.sendMessage(\"alarms-to-shelve\", payload \u003dpayload , scope \u003d \"session\") " + } + }, + "custom.run_export": { + "onChange": { + "enabled": null, + "script": "\trun_export \u003d self.custom.run_export\n\tif run_export:\n\t\tdata \u003d self.props.data\n\t\trow_data \u003d []\n\t\tfor i,j in enumerate(data):\n\t\t\tvalue \u003d j[\"value\"]\n\t\t\tif i \u003d\u003d 0:\n\t\t\t\theader \u003d [item for item in value] \t\n\t\t\trow \u003d [value[item][\"value\"] for item in value]\n\t\t\trow_data.append(row) \n\t\t\n\t\talarms_data \u003d system.dataset.toDataSet(header,row_data)\n\t\thtml_data \u003d system.dataset.dataSetToHTML(1, alarms_data, \"RealTimeAlarms\")\n\t\tsystem.perspective.download(\"myExport.html\",html_data)\n\t\tself.custom.run_export \u003d False" + } + }, + "custom.severity_filters": { + "onChange": { + "enabled": null, + "script": "\tpayload \u003d {}\n\tseverity_filters \u003d self.custom.severity_filters\n\tpayload[\"severity_filters\"] \u003d severity_filters\n\tsystem.perspective.sendMessage(\"button-severity\", payload \u003d payload, scope \u003d \"page\")" + } + }, + "custom.update": { + "binding": { + "config": { + "expression": "now({this.custom.delay})" + }, + "type": "expr" + }, + "onChange": { + "enabled": false, + "script": "\t\n\t\n\tempty_row \u003d row_builder.build_row(DisplayPath \u003d \"\",\n\tDuration \u003d \"\", Severity \u003d \"\",\n\tTimestamp \u003d \"\", AlarmId \u003d \"\",\n\tSource \u003d \"\", StyleClass \u003d {\"classes\":\"Alarms-Styles/Diagnostic\"})\n\tno_filter \u003d False\n\tseverity_filters \u003d self.custom.severity_filters\n\talarm_states \u003d alarms.alarm_filters.docked_alarm_table()\n\t\n\tif severity_filters[0] \u003d\u003d \"off\" and severity_filters[1] \u003d\u003d \"off\" and severity_filters[2] \u003d\u003d \"off\" and severity_filters[3] \u003d\u003d \"off\" and severity_filters[4] \u003d\u003d \"off\":\n\t\tno_filter \u003d True\n\t\n\tif self.custom.run_update and system.tag.exists(\"System/aws_data\"):\n\t\t\n\t\t\n\t\ttags_to_read \u003d system.tag.readBlocking([\"System/aws_data\",\"Configuration/DetailedViews\"])\n\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\tdetailed_view_decoded \u003d system.util.jsonDecode(tags_to_read[1].value)\n\t\tdevice_list \u003d detailed_view_decoded.get(self.custom.device,[])\n\t\tif len(decode_alarm_data) \u003e 0:\n\t\t\talt_colour \u003d self.session.custom.colours.colour_impaired\n\t\t\talarms_data \u003d alarms.alarm_tables.get_alarm_table(decode_alarm_data, severity_filters, no_filter, device_list, alarm_states, alt_colour)\t\t\n\t\t\t\n\t\t\tif len(alarms_data)\u003e0:\n\t\t\t\tself.props.data \u003d alarms_data\n\t\t\t\n\t\t\telse:\n\t\t\t\tself.props.data \u003d [empty_row]\n\t\telse:\n\t\t\tself.props.data \u003d [empty_row]\n\t\t\t\t\n\t\t\t" + } + }, + "props.selection.data": { + "onChange": { + "enabled": null, + "script": "\tpayload \u003d self.props.selection.data\n\tsystem.perspective.sendMessage(\"alarms-to-shelve\", payload \u003d payload, scope \u003d \"view\")" + } + } + }, + "props": { + "cells": { + "allowEditOn": "single-click" + }, + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "SourceId", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Message", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY HH:mm:ss", + "editable": false, + "field": "Timestamp", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Duration", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "VendorId", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "AlarmId", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + } + ], + "data": [ + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "Duration": { + "value": "97h:57m:18s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Estop activated" + }, + "Priority": { + "value": "4. High" + }, + "SourceId": { + "value": "PLC03 / 30 / S0102" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674233996773 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "Duration": { + "value": "97h:57m:18s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Estop activated" + }, + "Priority": { + "value": "4. High" + }, + "SourceId": { + "value": "PLC03 / 10 / S0101" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674233996773 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "Duration": { + "value": "97h:57m:18s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Estop activated" + }, + "Priority": { + "value": "4. High" + }, + "SourceId": { + "value": "PLC03 / S01 / K0041" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674233996973 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "Duration": { + "value": "98h:40m:48s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Fuse tripped" + }, + "Priority": { + "value": "4. High" + }, + "SourceId": { + "value": "PLC03 / S01 / F0262" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674231386681 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Medium" + }, + "value": { + "Duration": { + "value": "113h:4m:53s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Too many MultiReads in interval at verification scan" + }, + "Priority": { + "value": "3. Medium" + }, + "SourceId": { + "value": "PLC03 / General" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674179541965 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Medium" + }, + "value": { + "Duration": { + "value": "10h:36m:12s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Too many NoReads in interval at verification scan" + }, + "Priority": { + "value": "3. Medium" + }, + "SourceId": { + "value": "PLC02 / General" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674548462720 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Medium" + }, + "value": { + "Duration": { + "value": "97h:57m:18s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Error" + }, + "Priority": { + "value": "3. Medium" + }, + "SourceId": { + "value": "PLC03 / ZM1" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674233996463 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Medium" + }, + "value": { + "Duration": { + "value": "97h:57m:18s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Error" + }, + "Priority": { + "value": "3. Medium" + }, + "SourceId": { + "value": "PLC03 / ZM2" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674233996404 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "9h:1m:9s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Sleep mode activated" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC09 / L3" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674554165092 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "98h:39m:12s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Medium speed mode activation" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC09 / MHE" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674231482352 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "9h:3m:47s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Reset buton" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC01 / P1 / S0033" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674554007223 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "97h:57m:17s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Undervoltage" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC03 / 60 / M0011" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674233997159 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "97h:57m:17s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Undervoltage" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC03 / 60 / M0012" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674233997159 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "8h:33m:21s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Stop button" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC02 / P1 / S0032" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674555833991 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "97h:57m:17s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Undervoltage" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC03 / 50 / M0041" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674233997130 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "97h:57m:17s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Undervoltage" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC03 / 50 / M0042" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674233997130 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "9h:1m:9s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Sleep mode activated" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC09 / I3_2" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674554165092 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "198h:55m:56s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Stop button" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC03 / P2 / S0012" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1673870478869 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "9h:35m:12s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Sleep mode activated" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC09 / L2" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674552122041 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "9h:3m:49s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Stop button" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC01 / P1 / S0032" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674554005464 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "11h:29m:21s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Received telegram is invalid" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC01 / General" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674545273550 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "97h:57m:17s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Undervoltage" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC03 / 60 / M0022" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674233997191 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "97h:57m:17s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Undervoltage" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC03 / 60 / M0021" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674233997191 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "10h:0m:42s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Sleep mode activated" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC09 / I3_1" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674550592036 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "98h:31m:6s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Reset buton" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC03 / P1 / S0033" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674231968042 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "9h:35m:12s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Sleep mode activated" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC09 / L1" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674552122041 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "97h:57m:17s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Undervoltage" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC03 / 50 / M0032" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674233997135 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "97h:57m:17s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Undervoltage" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC03 / 50 / M0031" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674233997135 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "212h:36m:18s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Stop button" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC01 / P2 / S0012" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1673821256850 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "8h:33m:13s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Reset buton" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC02 / P1 / S0033" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674555841111 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "9h:1m:9s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Sleep mode activated" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC09 / L4" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674554165092 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "225h:32m:20s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Stop button" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC02 / P2 / S0012" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1673774694508 + } + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "Duration": { + "value": "98h:31m:5s" + }, + "Expiration": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Stop button" + }, + "Priority": { + "value": "1. Diagnostic" + }, + "SourceId": { + "value": "PLC03 / P1 / S0032" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1674586633866 + ], + "$ts": 1674231969209 + } + } + } + } + ], + "headerGroups": [ + [ + { + "align": "center", + "justify": "center", + "span": 1, + "style": { + "classes": "" + }, + "title": "DisplayPath" + } + ] + ], + "headerStyle": { + "classes": "Background-Styles/Controller" + }, + "pager": { + "bottom": false + }, + "rows": { + "highlight": { + "color": "#FFFF09" + } + }, + "selection": { + "data": [ + { + "Duration": "97h:57m:18s", + "Expiration": "Thu Jan 01 1970 01:00:00 GMT+0100 (Greenwich Mean Time)", + "Message": "Estop activated", + "Priority": "4. High", + "SourceId": "PLC03 / 30 / S0102", + "Timestamp": "Fri Jan 20 2023 16:59:56 GMT+0000 (Greenwich Mean Time)" + } + ], + "mode": "multiple interval", + "selectedColumn": "SourceId", + "selectedRow": 0 + }, + "virtualized": false + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "severity-filters", + "pageScope": true, + "script": "\tcritical \u003d payload.get(\"critical\")\n\tif critical \u003d\u003d \"true\":\n\t\tself.custom.severity_filters[4] \u003d 4\n\tif critical \u003d\u003d \"false\":\n\t\tself.custom.severity_filters[4] \u003d \"off\"\n\t\n\thigh \u003d payload.get(\"high\")\n\tif high \u003d\u003d \"true\":\n\t\tself.custom.severity_filters[3] \u003d 3\n\tif high \u003d\u003d \"false\":\n\t\tself.custom.severity_filters[3] \u003d \"off\"\n\t\n\tmedium \u003d payload.get(\"medium\")\n\tif medium \u003d\u003d \"true\":\n\t\tself.custom.severity_filters[2] \u003d 2\n\tif medium \u003d\u003d \"false\":\n\t\tself.custom.severity_filters[2] \u003d \"off\"\n\t\n\tlow \u003d payload.get(\"low\")\n\tif low \u003d\u003d \"true\":\n\t\tself.custom.severity_filters[1] \u003d 1\n\tif low \u003d\u003d \"false\":\n\t\tself.custom.severity_filters[1] \u003d \"off\"\n\t\n\tdiagnostic \u003d payload.get(\"diagnostic\")\n\tif diagnostic \u003d\u003d \"true\":\n\t\tself.custom.severity_filters[0] \u003d 0\n\tif diagnostic \u003d\u003d \"false\":\n\t\tself.custom.severity_filters[0] \u003d \"off\"", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "update-table", + "pageScope": true, + "script": "\t# implement your handler here\n\tupdate \u003d payload[\"update\"]\n\tself.custom.run_update \u003d update", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "run-export", + "pageScope": true, + "script": "\t# implement your handler here\n\texport \u003d payload[\"export\"]\n\tself.custom.run_export \u003d export", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "reset-filters", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tseverity_filters \u003d self.custom.severity_filters\n\tseverity_filters[0] \u003d \"off\"\n\tseverity_filters[1] \u003d \"off\"\n\tseverity_filters[2] \u003d \"off\"\n\tseverity_filters[3] \u003d \"off\"\n\tseverity_filters[4] \u003d \"off\"", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Alarm-Views/HistoricalAlarms/resource.json b/com.inductiveautomation.perspective/views/Alarm-Views/HistoricalAlarms/resource.json new file mode 100644 index 0000000..c8fc116 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Alarm-Views/HistoricalAlarms/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-04-19T11:28:33Z" + }, + "lastModificationSignature": "ee7d205bbcff49c16cc897f2d33e13f5fd83cf556f6e0ee11507d89b3753f410" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Alarm-Views/HistoricalAlarms/thumbnail.png b/com.inductiveautomation.perspective/views/Alarm-Views/HistoricalAlarms/thumbnail.png new file mode 100644 index 0000000..f250b7e Binary files /dev/null and b/com.inductiveautomation.perspective/views/Alarm-Views/HistoricalAlarms/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Alarm-Views/HistoricalAlarms/view.json b/com.inductiveautomation.perspective/views/Alarm-Views/HistoricalAlarms/view.json new file mode 100644 index 0000000..4a97e9a --- /dev/null +++ b/com.inductiveautomation.perspective/views/Alarm-Views/HistoricalAlarms/view.json @@ -0,0 +1,2897 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "15.8px" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-White-12pt", + "fontWeight": "bold", + "text": "value", + "textAlign": "left", + "textIndent": "10px" + }, + "text": "Filter by Date/Time" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "32px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-White-12pt", + "textAlign": "left", + "textIndent": "10px" + }, + "text": "Start" + }, + "type": "ia.display.label" + }, + { + "events": { + "system": { + "onStartup": { + "config": { + "script": "\timport datetime\n\t\t\n\ttime_now \u003d datetime.datetime.now()\n\tself.props.value \u003d time_now - datetime.timedelta(hours \u003d 1)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "StartTime" + }, + "position": { + "basis": "32px", + "shrink": 0 + }, + "propConfig": { + "props.maxDate": { + "binding": { + "config": { + "path": "../EndTime.props.value" + }, + "type": "property" + } + }, + "props.minDate": { + "binding": { + "config": { + "expression": "addWeeks({../EndTime.props.value},-2)" + }, + "type": "expr" + } + } + }, + "props": { + "formattedValue": "Apr 19, 2022 10:28 AM", + "value": { + "$": [ + "ts", + 192, + 1650367709276 + ], + "$ts": 1650364109276 + } + }, + "type": "ia.input.date-time-input" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "32px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-White-12pt", + "textAlign": "left", + "textIndent": "10px" + }, + "text": "End" + }, + "type": "ia.display.label" + }, + { + "events": { + "system": { + "onStartup": { + "config": { + "script": "\timport datetime\n\t\n\ttime_now \u003d datetime.datetime.now()\n\tself.props.value \u003d time_now" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "EndTime" + }, + "position": { + "basis": "32px", + "shrink": 0 + }, + "props": { + "formattedValue": "Apr 19, 2022 11:28 AM", + "value": { + "$": [ + "ts", + 192, + 1650367709276 + ], + "$ts": 1650367709276 + } + }, + "type": "ia.input.date-time-input" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "200px" + }, + "props": { + "direction": "column", + "style": { + "borderStyle": "solid", + "borderWidth": "0.5px" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "textAlign": "left", + "textIndent": "10px" + } + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "32px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-White-12pt", + "fontWeight": "bold", + "text": "value", + "textAlign": "left", + "textIndent": "10px" + }, + "text": "Filter by Device" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tdevice \u003d self.props.value\n\tpayload[\"device\"] \u003d device\n\tsystem.perspective.sendMessage(\"device-filter\", payload \u003d payload, scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + }, + "system": { + "onStartup": { + "config": { + "script": "\tdevices \u003d system.tag.readBlocking([\"Configuration/DetailedViews\"])\n\tdevices \u003d devices[0].value\n\tdevices_decoded \u003d system.util.jsonDecode(devices)\n\tdevice_list \u003d []\n\tno_device \u003d {}\n\tno_device[\"value\"]\u003d\"\"\n\tno_device[\"label\"]\u003d\"None\"\n\tdevice_list.append(no_device)\n\tfor i in devices_decoded:\n\t\tdevice_dict \u003d{}\n\t\tif len(devices_decoded[i]) \u003d\u003d 1:\n\t\t\tdevice_dict[\"value\"] \u003d i\n\t\t\tdevice_dict[\"label\"]\u003d i\n\t\t\tdevice_list.append(device_dict)\n\t\telse:\n\t\t\titems \u003d devices_decoded[i]\n\t\t\tfor item in items:\n\t\t\t\tdevice_dict \u003d{}\n\t\t\t\tdevice_dict[\"value\"] \u003d item\n\t\t\t\tdevice_dict[\"label\"]\u003d item\n\t\t\t\tdevice_list.append(device_dict)\n\t\t\t\t\n\tself.props.options \u003d device_list\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "32px", + "shrink": 0 + }, + "props": { + "options": [ + { + "label": "None", + "value": "" + }, + { + "label": "PLC03", + "value": "PLC03" + }, + { + "label": "PLC25", + "value": "PLC25" + }, + { + "label": "PLC47", + "value": "PLC47" + }, + { + "label": "PLC97", + "value": "PLC97" + }, + { + "label": "PLC69", + "value": "PLC69" + }, + { + "label": "PLC26", + "value": "PLC26" + }, + { + "label": "PLC48", + "value": "PLC48" + }, + { + "label": "PLC01", + "value": "PLC01" + }, + { + "label": "PLC23", + "value": "PLC23" + }, + { + "label": "PLC02", + "value": "PLC02" + }, + { + "label": "PLC07", + "value": "PLC07" + }, + { + "label": "PLC29", + "value": "PLC29" + }, + { + "label": "PLC08", + "value": "PLC08" + }, + { + "label": "PLC27", + "value": "PLC27" + }, + { + "label": "PLC49", + "value": "PLC49" + }, + { + "label": "PLC06", + "value": "PLC06" + }, + { + "label": "PLC28", + "value": "PLC28" + }, + { + "label": "PLC96", + "value": "PLC96" + }, + { + "label": "PLC40", + "value": "PLC40" + }, + { + "label": "PLC60", + "value": "PLC60" + }, + { + "label": "SLAM302", + "value": "SLAM302" + }, + { + "label": "PLC21", + "value": "PLC21" + }, + { + "label": "PLC43", + "value": "PLC43" + }, + { + "label": "PLC65", + "value": "PLC65" + }, + { + "label": "SLAM306", + "value": "SLAM306" + }, + { + "label": "PLC22", + "value": "PLC22" + }, + { + "label": "PLC66", + "value": "PLC66" + }, + { + "label": "SLAM307", + "value": "SLAM307" + }, + { + "label": "PLC41", + "value": "PLC41" + }, + { + "label": "PLC1000", + "value": "PLC1000" + }, + { + "label": "PLC20", + "value": "PLC20" + }, + { + "label": "PLC42", + "value": "PLC42" + }, + { + "label": "PLC64", + "value": "PLC64" + }, + { + "label": "SLAM304", + "value": "SLAM304" + }, + { + "label": "MAN2_PLC99", + "value": "MAN2_PLC99" + }, + { + "label": "PLC23-1", + "value": "PLC23-1" + }, + { + "label": "PLC09-2", + "value": "PLC09-2" + }, + { + "label": "PLC1000-1", + "value": "PLC1000-1" + }, + { + "label": "PLC09", + "value": "PLC09" + }, + { + "label": "PLC99", + "value": "PLC99" + }, + { + "label": "PLC14", + "value": "PLC14" + }, + { + "label": "ARSAW1401", + "value": "ARSAW1401" + }, + { + "label": "ARSAW1402", + "value": "ARSAW1402" + }, + { + "label": "ARSAW1403", + "value": "ARSAW1403" + }, + { + "label": "ARSAW1404", + "value": "ARSAW1404" + }, + { + "label": "ARSAW1405", + "value": "ARSAW1405" + }, + { + "label": "ARSAW1406", + "value": "ARSAW1406" + }, + { + "label": "ARSAW1407", + "value": "ARSAW1407" + }, + { + "label": "ARSAW1408", + "value": "ARSAW1408" + }, + { + "label": "PLC15", + "value": "PLC15" + }, + { + "label": "ARSAW1501", + "value": "ARSAW1501" + }, + { + "label": "ARSAW1502", + "value": "ARSAW1502" + }, + { + "label": "ARSAW1503", + "value": "ARSAW1503" + }, + { + "label": "ARSAW1504", + "value": "ARSAW1504" + }, + { + "label": "ARSAW1505", + "value": "ARSAW1505" + }, + { + "label": "ARSAW1506", + "value": "ARSAW1506" + }, + { + "label": "ARSAW1507", + "value": "ARSAW1507" + }, + { + "label": "ARSAW1508", + "value": "ARSAW1508" + }, + { + "label": "PLC13", + "value": "PLC13" + }, + { + "label": "ARSAW1301", + "value": "ARSAW1301" + }, + { + "label": "ARSAW1302", + "value": "ARSAW1302" + }, + { + "label": "ARSAW1303", + "value": "ARSAW1303" + }, + { + "label": "ARSAW1304", + "value": "ARSAW1304" + }, + { + "label": "ARSAW1305", + "value": "ARSAW1305" + }, + { + "label": "ARSAW1306", + "value": "ARSAW1306" + }, + { + "label": "ARSAW1307", + "value": "ARSAW1307" + }, + { + "label": "ARSAW1308", + "value": "ARSAW1308" + }, + { + "label": "PLC16", + "value": "PLC16" + }, + { + "label": "ARSAW1601", + "value": "ARSAW1601" + }, + { + "label": "ARSAW1602", + "value": "ARSAW1602" + }, + { + "label": "ARSAW1603", + "value": "ARSAW1603" + }, + { + "label": "ARSAW1604", + "value": "ARSAW1604" + }, + { + "label": "ARSAW1605", + "value": "ARSAW1605" + }, + { + "label": "ARSAW1606", + "value": "ARSAW1606" + }, + { + "label": "ARSAW1607", + "value": "ARSAW1607" + }, + { + "label": "ARSAW1608", + "value": "ARSAW1608" + }, + { + "label": "PLC51", + "value": "PLC51" + }, + { + "label": "SLAM305", + "value": "SLAM305" + }, + { + "label": "PLC70", + "value": "PLC70" + }, + { + "label": "PLC71", + "value": "PLC71" + }, + { + "label": "RWC4", + "value": "RWC4" + }, + { + "label": "PLC71", + "value": "PLC71" + }, + { + "label": "PLC70", + "value": "PLC70" + }, + { + "label": "RWC4", + "value": "RWC4" + }, + { + "label": "MAN2_PLC96", + "value": "MAN2_PLC96" + }, + { + "label": "PLC32", + "value": "PLC32" + }, + { + "label": "PLC30", + "value": "PLC30" + }, + { + "label": "SLAM301", + "value": "SLAM301" + }, + { + "label": "PLC52", + "value": "PLC52" + }, + { + "label": "MAN2_PLC97", + "value": "MAN2_PLC97" + }, + { + "label": "PLC31", + "value": "PLC31" + }, + { + "label": "SLAM303", + "value": "SLAM303" + }, + { + "label": "PLC80", + "value": "PLC80" + }, + { + "label": "SLAM401", + "value": "SLAM401" + }, + { + "label": "SLAM402", + "value": "SLAM402" + } + ], + "value": "None" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "device-filter-reset", + "pageScope": true, + "script": "\t# implement your handler here\n\tdevice_selection \u003d payload[\"device\"]\n\tself.props.value \u003d device_selection", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "200px" + }, + "props": { + "direction": "column", + "style": { + "borderStyle": "solid", + "borderWidth": "0.5px" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "32px", + "grow": 1 + }, + "props": { + "style": { + "textAlign": "left", + "textIndent": "10px" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "32px", + "grow": 1 + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "32px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-White-12pt", + "fontWeight": "bold", + "text": "value", + "textAlign": "left", + "textIndent": "10px" + }, + "text": "Filter by Severity" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "Critical", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tseverity \u003d self.custom.Severity\n\tpayload[\"severity\"] \u003d severity\n\tsystem.perspective.sendMessage(\"severity-filter\", payload \u003d payload , scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "if({this.custom.background_on}\u003d\"true\",1,0)" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Critical" + }, + { + "input": 0, + "output": "Alarms-Styles/NoAlarm-Black" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "color": "#FFFFFF", + "path": "material/error" + }, + "position": "top" + }, + "style": {}, + "text": "Critical" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "button-severity-indicator", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background\n\t", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "High", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tseverity \u003d self.custom.Severity\n\tpayload[\"severity\"] \u003d severity\n\tsystem.perspective.sendMessage(\"severity-filter\", payload \u003d payload , scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "if({this.custom.background_on}\u003d\"true\",1,0)" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/High" + }, + { + "input": 0, + "output": "Alarms-Styles/NoAlarm-Black" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/priority_high" + }, + "position": "top" + }, + "style": {}, + "text": "High" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "button-severity-indicator", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "Medium", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tseverity \u003d self.custom.Severity\n\tpayload[\"severity\"] \u003d severity\n\tsystem.perspective.sendMessage(\"severity-filter\", payload \u003d payload , scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_1" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "if({this.custom.background_on}\u003d\"true\",1,0)" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Medium" + }, + { + "input": 0, + "output": "Alarms-Styles/NoAlarm-Black" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/priority_high" + }, + "position": "top" + }, + "style": {}, + "text": "Medium" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "button-severity-indicator", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "50px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "7px" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "Low", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tseverity \u003d self.custom.Severity\n\tpayload[\"severity\"] \u003d severity\n\tsystem.perspective.sendMessage(\"severity-filter\", payload \u003d payload , scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "if({this.custom.background_on}\u003d\"true\",1,0)" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Low" + }, + { + "input": 0, + "output": "Alarms-Styles/NoAlarm-Black" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/low_priority" + }, + "position": "top" + }, + "style": {}, + "text": "Low" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "button-severity-indicator", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "Diagnostic", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tseverity \u003d self.custom.Severity\n\tpayload[\"severity\"] \u003d severity\n\tsystem.perspective.sendMessage(\"severity-filter\", payload \u003d payload , scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "if({this.custom.background_on}\u003d\"true\",1,0)" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 0, + "output": "Alarms-Styles/NoAlarm-Black" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/warning" + }, + "position": "top" + }, + "style": {}, + "text": "Diagnostic" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "button-severity-indicator", + "pageScope": true, + "script": "\t# implement your handler here\n\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "100px" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "50px", + "shrink": 0 + }, + "type": "ia.container.flex" + } + ], + "custom": { + "SeverityFilter": "value" + }, + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "200px" + }, + "props": { + "direction": "column", + "style": { + "borderStyle": "solid", + "borderWidth": "0.5px" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "200px", + "grow": 1, + "shrink": 10 + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-White-12pt", + "fontWeight": "bold", + "text": "value", + "textAlign": "left", + "textIndent": "10px" + }, + "text": "Reset Filters" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "5px", + "grow": 1 + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "Critical", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload1 \u003d {}\n\tpayload2 \u003d{}\n\tpayload3 \u003d{}\n\tpayload1[\"severity\"] \u003d \"\"\n\tpayload2[\"device\"] \u003d \"None\"\n\tpayload3[\"device\"] \u003d \"\"\n\tsystem.perspective.sendMessage(\"severity-filter\", payload \u003d payload1 , scope \u003d \"page\")\n\tsystem.perspective.sendMessage(\"button-severity-indicator\", payload \u003d payload1 , scope \u003d \"page\")\n\tsystem.perspective.sendMessage(\"device-filter-reset\", payload \u003d payload2 , scope \u003d \"page\")\n\tsystem.perspective.sendMessage(\"device-filter\", payload \u003d payload3 , scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "80px" + }, + "props": { + "image": { + "icon": { + "color": "#FFFFFF", + "path": "material/clear" + }, + "position": "top" + }, + "style": { + "classes": "Alarms-Styles/NoAlarm-Black" + }, + "text": "Reset Filters" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "button-severity-indicator", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background\n\t", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "High", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.toggleDock(\"Docked-West\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0" + }, + "position": { + "basis": "80px" + }, + "props": { + "image": { + "icon": { + "path": "material/toggle_on" + }, + "position": "top" + }, + "style": { + "classes": "Alarms-Styles/NoAlarm-Black" + }, + "text": "Toggle Dock" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "button-severity-indicator", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "High", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tdata \u003d self.parent.parent.parent.parent.getChild(\"Table\").props.data\n\tdataset \u003d system.dataset.dataSetToHTML(1,data,\"Test\")\n\tsystem.perspective.print(type(dataset))\n\tsystem.perspective.download(\"myExport.html\",dataset)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_1" + }, + "position": { + "basis": "80px" + }, + "props": { + "image": { + "icon": { + "path": "material/import_export" + }, + "position": "top" + }, + "style": { + "classes": "Alarms-Styles/NoAlarm-Black" + }, + "text": "Export" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "button-severity-indicator", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "5px", + "grow": 1 + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "50px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "36px" + }, + "type": "ia.display.label" + } + ], + "custom": { + "SeverityFilter": "value" + }, + "meta": { + "name": "FlexContainer_2" + }, + "position": { + "basis": "200px" + }, + "props": { + "direction": "column", + "style": { + "borderStyle": "solid", + "borderWidth": "0.5px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "300px", + "shrink": 0 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "15.8px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Historyfilters": { + "Acked": 2, + "AckedBy": "", + "Area": "", + "DeviceDescription": "", + "DeviceType": "", + "DisplayPath": "", + "Empty": 0, + "Interval": 0, + "LinkToOEEMP": "", + "LinkToPage": "", + "Name": "", + "PLC": "", + "Priority": 0, + "SubArea": "", + "TZ": "Europe/London", + "UDT": "" + }, + "export": "value", + "severityFilter": "" + }, + "meta": { + "name": "Table" + }, + "position": { + "basis": "1639px", + "grow": 1 + }, + "propConfig": { + "custom.Historyfilters.FC": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "direct", + "tagPath": "Configuration/FC" + }, + "type": "tag" + } + }, + "custom.Historyfilters.StartDT": { + "binding": { + "config": { + "path": "../FlexContainer/FlexContainer/StartTime.props.value" + }, + "type": "property" + } + }, + "custom.Historyfilters.StopDT": { + "binding": { + "config": { + "path": "../FlexContainer/FlexContainer/EndTime.props.value" + }, + "type": "property" + } + }, + "custom.alarmHistory": { + "binding": { + "config": { + "parameters": { + "Ackd": "{this.custom.Historyfilters.Acked}", + "AckdBy": "{this.custom.Historyfilters.AckedBy}", + "Area": "{this.custom.Historyfilters.Area}", + "DeviceDescription": "{this.custom.Historyfilters.DeviceDescription}", + "DeviceType": "{this.custom.Historyfilters.DeviceType}", + "DisplayPath": "{this.custom.Historyfilters.DisplayPath}", + "Empty": "{this.custom.Historyfilters.Empty}", + "Finish": "{this.custom.Historyfilters.StopDT}", + "Interval": "{this.custom.Historyfilters.Interval}", + "LinkToOEEMP": "{this.custom.Historyfilters.LinkToOEEMP}", + "LinkToPage": "{this.custom.Historyfilters.LinkToPage}", + "Name": "{this.custom.Historyfilters.Name}", + "PLC": "{this.custom.Historyfilters.PLC}", + "Priority": "{this.custom.Historyfilters.Priority}", + "Start": "{this.custom.Historyfilters.StartDT}", + "SubArea": "{this.custom.Historyfilters.SubArea}", + "TZ": "{this.custom.Historyfilters.TZ}", + "UDT": "{this.custom.Historyfilters.UDT}", + "WHID": "{Configuration/FC}" + }, + "polling": { + "enabled": true, + "rate": "2" + }, + "queryPath": "StoredProcedures/GetHistoricalAlarms", + "returnFormat": "dataset" + }, + "type": "query" + } + }, + "custom.export": { + "onChange": { + "enabled": null, + "script": "\tdata \u003d self.props.data\n\tsystem.perspective.download(\"AlarmExport\", data)" + } + }, + "custom.severityFilter": { + "onChange": { + "enabled": null, + "script": "\tpayload \u003d {}\n\tseverity \u003d self.custom.severityFilter\n\tpayload[\"severity\"] \u003d severity\n\tsystem.perspective.sendMessage(\"button-severity-indicator\", payload\u003d payload, scope \u003d \"page\")" + } + }, + "props.data": { + "binding": { + "config": { + "path": "this.custom.alarmHistory" + }, + "type": "property" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY HH:mm:ss", + "editable": false, + "field": "TimeStamp", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Duration", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Name", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Priority", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Acked", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "UDT", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "UID", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "DeviceDescription", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "DeviceType", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "DisplayPath", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Area", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "SubArea", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "PLC", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "MaintenanceTemplate", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "LinkToPage", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "LinkToBOM", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "LinkToHelp", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "LinkToOEEMP", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + } + ], + "filter": { + "enabled": true + }, + "headerGroups": [ + [] + ] + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "severity-filter", + "pageScope": true, + "script": "\tfilter \u003d payload[\"severity\"]\n\tself.custom.severityFilter \u003d filter\n\tself.props.filter.text \u003d filter\n\t", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "device-filter", + "pageScope": true, + "script": "\t# implement your handler here\n\tdevice\u003d payload[\"device\"]\n\tself.custom.Historyfilters.PLC \u003d device", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "root" + }, + "props": { + "style": { + "classes": "Background-Styles/Main-Background" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Alarm-Views/RealTime/resource.json b/com.inductiveautomation.perspective/views/Alarm-Views/RealTime/resource.json new file mode 100644 index 0000000..8feadec --- /dev/null +++ b/com.inductiveautomation.perspective/views/Alarm-Views/RealTime/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "vivsampa", + "timestamp": "2024-06-11T15:25:17Z" + }, + "lastModificationSignature": "b847d4c35a094954df1f729fb7826eb366ebf00c46ee61d5905de12d63982952" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Alarm-Views/RealTime/thumbnail.png b/com.inductiveautomation.perspective/views/Alarm-Views/RealTime/thumbnail.png new file mode 100644 index 0000000..5683b12 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Alarm-Views/RealTime/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Alarm-Views/RealTime/view.json b/com.inductiveautomation.perspective/views/Alarm-Views/RealTime/view.json new file mode 100644 index 0000000..3f59e8e --- /dev/null +++ b/com.inductiveautomation.perspective/views/Alarm-Views/RealTime/view.json @@ -0,0 +1,5771 @@ +{ + "custom": { + "activityLogger": { + "alt_pageid": "alarms", + "start_time": { + "$": [ + "ts", + 192, + 1718118450597 + ], + "$ts": 1718118450596 + } + } + }, + "events": { + "system": { + "onShutdown": { + "config": { + "script": "\tactivityLog.logger.callLogger(self, \u0027page\u0027)\n\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)" + }, + "scope": "G", + "type": "script" + }, + "onStartup": { + "config": { + "script": "\tself.custom.activityLogger.start_time \u003d system.date.now()" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "page_name": "Alarms-RealTime", + "table_type": "value" + }, + "propConfig": { + "custom.activityLogger": { + "persistent": true + }, + "custom.activityLogger.pageid": { + "binding": { + "config": { + "expression": "{/root/TabContainer.props.currentTabIndex}" + }, + "transforms": [ + { + "code": "\tpageid\u003d self.custom.activityLogger.alt_pageid+\u0027/\u0027+self.getChild(\"root\").getChild(\"TabContainer\").props.tabs[value]\n\treturn pageid.replace(\u0027 \u0027,\u0027\u0027)", + "type": "script" + } + ], + "type": "expr" + } + }, + "params.page_name": { + "paramDirection": "input", + "persistent": true + }, + "params.table_type": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "Critical", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"\"\n\tbackground \u003d self.custom.background_on\n\tif background \u003d\u003d \"false\":\n\t\tfilter_on \u003d \"true\"\n\t\tself.custom.background_on \u003d \"true\"\n\telse:\n\t\tself.custom.background_on \u003d \"false\"\n\t\tfilter_on \u003d\"false\"\n\tpayload \u003d {\"critical\":filter_on}\n\tsystem.perspective.sendMessage(\"severity-filters\", payload \u003dpayload, scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "125px", + "display": false + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "if({this.custom.background_on}\u003d\"true\",1,0)" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Critical" + }, + { + "input": 0, + "output": "Buttons/PB_1" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "color": "#FFFFFF", + "path": "material/error" + } + }, + "style": {}, + "text": "Critical" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "reset-filters", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tif severity \u003d\u003d \"false\":\n\t\tbackground \u003d \"false\"\n\telse:\n\t\tbackground \u003d \"true\"\n\tself.custom.background_on \u003d background\n\t", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "High", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"\"\n\tbackground \u003d self.custom.background_on\n\tif background \u003d\u003d \"false\":\n\t\tfilter_on \u003d \"true\"\n\t\tself.custom.background_on \u003d \"true\"\n\telse:\n\t\tself.custom.background_on \u003d \"false\"\n\t\tfilter_on \u003d\"false\"\n\tpayload \u003d {\"high\":filter_on}\n\tsystem.perspective.sendMessage(\"severity-filters\", payload \u003dpayload, scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0" + }, + "position": { + "basis": "120px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "if({this.custom.background_on}\u003d\"false\",0,\r\nif({session.custom.colours.colour_impaired},2,1))" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "" + }, + { + "input": 1, + "output": "Alarms-Styles/High" + }, + { + "input": 2, + "output": "Alarms-Styles/Alt-Colours/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/priority_high" + } + }, + "primary": false, + "style": { + "margin": 15 + }, + "text": "High" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "reset-filters", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tif severity \u003d\u003d \"false\":\n\t\tbackground \u003d \"false\"\n\telse:\n\t\tbackground \u003d \"true\"\n\tself.custom.background_on \u003d background", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "Medium", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"\"\n\tbackground \u003d self.custom.background_on\n\tif background \u003d\u003d \"false\":\n\t\tfilter_on \u003d \"true\"\n\t\tself.custom.background_on \u003d \"true\"\n\telse:\n\t\tself.custom.background_on \u003d \"false\"\n\t\tfilter_on \u003d\"false\"\n\tpayload \u003d {\"medium\":filter_on}\n\tsystem.perspective.sendMessage(\"severity-filters\", payload \u003dpayload, scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_1" + }, + "position": { + "basis": "120px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "if({this.custom.background_on}\u003d\"false\",0,\r\nif({session.custom.colours.colour_impaired},2,1))" + }, + "transforms": [ + { + "fallback": "Buttons/PB_1", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "" + }, + { + "input": 1, + "output": "Alarms-Styles/Medium" + }, + { + "input": 2, + "output": "Alarms-Styles/Alt-Colours/Medium" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/priority_high" + } + }, + "primary": false, + "style": { + "margin": 15 + }, + "text": "Medium" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "reset-filters", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tif severity \u003d\u003d \"false\":\n\t\tbackground \u003d \"false\"\n\telse:\n\t\tbackground \u003d \"true\"\n\tself.custom.background_on \u003d background", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "Low", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"\"\n\tbackground \u003d self.custom.background_on\n\tif background \u003d\u003d \"false\":\n\t\tfilter_on \u003d \"true\"\n\t\tself.custom.background_on \u003d \"true\"\n\telse:\n\t\tself.custom.background_on \u003d \"false\"\n\t\tfilter_on \u003d\"false\"\n\tpayload \u003d {\"low\":filter_on}\n\tsystem.perspective.sendMessage(\"severity-filters\", payload \u003dpayload, scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_2" + }, + "position": { + "basis": "120px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "if({this.custom.background_on}\u003d\"false\",0,\r\nif({session.custom.colours.colour_impaired},2,1))" + }, + "transforms": [ + { + "fallback": "Buttons/PB_1", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "" + }, + { + "input": 1, + "output": "Alarms-Styles/Low" + }, + { + "input": 2, + "output": "Alarms-Styles/Alt-Colours/Low" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/low_priority" + } + }, + "primary": false, + "style": { + "margin": 15 + }, + "text": "Low" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "reset-filters", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tif severity \u003d\u003d \"false\":\n\t\tbackground \u003d \"false\"\n\telse:\n\t\tbackground \u003d \"true\"\n\tself.custom.background_on \u003d background", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "Diagnostic", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"\"\n\tbackground \u003d self.custom.background_on\n\tif background \u003d\u003d \"false\":\n\t\tfilter_on \u003d \"true\"\n\t\tself.custom.background_on \u003d \"true\"\n\telse:\n\t\tself.custom.background_on \u003d \"false\"\n\t\tfilter_on \u003d\"false\"\n\tpayload \u003d {\"diagnostic\":filter_on}\n\tsystem.perspective.sendMessage(\"severity-filters\", payload \u003dpayload, scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_3" + }, + "position": { + "basis": "120px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "if({this.custom.background_on}\u003d\"false\",0,\r\nif({session.custom.colours.colour_impaired},2,1))" + }, + "transforms": [ + { + "fallback": "Buttons/PB_1", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "" + }, + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Alt-Colours/Diagnostic" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/warning" + } + }, + "primary": false, + "style": { + "margin": 15 + }, + "text": "Diagnostic" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "reset-filters", + "pageScope": true, + "script": "\t# implement your handler here\n\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tif severity \u003d\u003d \"false\":\n\t\tbackground \u003d \"false\"\n\telse:\n\t\tbackground \u003d \"true\"\n\tself.custom.background_on \u003d background", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "700px", + "shrink": 0 + }, + "props": { + "style": { + "padding": 0 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "20px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "Critical", + "background_on": "false" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"false\"\n\tpayload[\"reset\"] \u003d filter_on\n\tsystem.perspective.sendMessage(\"reset-filters\", payload \u003dpayload, scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "120px" + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/clear" + } + }, + "primary": false, + "style": { + "margin": 15 + }, + "text": "Reset" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "button-severity-indicator", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background\n\t", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "Severity": "High", + "background_on": "true", + "update_on": false + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tpayload[\"export\"] \u003d True\n\tsystem.perspective.sendMessage(\"run-alarm-export\", payload \u003d payload, scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_1" + }, + "position": { + "basis": "120px" + }, + "props": { + "image": { + "icon": { + "path": "material/import_export" + } + }, + "primary": false, + "style": { + "margin": 15 + }, + "text": "Export" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "button-severity-indicator", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "alarms_to_shelve": [ + { + "style": { + "classes": "Alarms-Styles/Medium" + }, + "value": { + "Alarm_id": { + "value": 13 + }, + "Duration": { + "value": 10495 + }, + "Expiration": { + "value": { + "$": [ + "ts", + 0, + 1704730823344 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Photo eye blocked" + }, + "Priority": { + "value": "3. Medium" + }, + "Shelve": { + "value": false + }, + "SourceId": { + "value": "PLC09/1210_07_44/B830_3" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 0, + 1704730823344 + ], + "$ts": 1704720394486 + } + }, + "Unshelve": { + "value": false + } + } + } + ] + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tduration \u003d self.props.value\n\tpayload \u003d {}\n\tpayload[\"duration\"] \u003d duration\n\tsystem.perspective.sendMessage(\"shelve-alarms\", payload, scope \u003d \"page\")\n\tself.props.value \u003d None" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "120px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "session.custom.fc" + }, + "transforms": [ + { + "code": "\twhid \u003d value.lower()\n\tWHID \u003d value.upper()\n\tsiterole \u003d \u0027Authenticated/Roles/rme-ignition-\u0027+whid+\u0027-alarm-shelving\u0027\n\tSITErole \u003d \u0027Authenticated/Roles/rme-ignition-\u0027+WHID+\u0027-alarm-shelving\u0027\n# Example: rme-ignition-BRS1-alarm-shelving\n\troles \u003d [\u0027Authenticated/Roles/eurme-ignition-admins\u0027, siterole, SITErole]\n\tauth \u003d system.perspective.isAuthorized(False, securityLevels\u003droles)\n\treturn auth", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "options": [ + { + "label": "15 mins", + "value": 15 + }, + { + "label": "30 min", + "value": 30 + }, + { + "label": "45 min", + "value": 45 + }, + { + "label": "1 hr", + "value": 60 + }, + { + "label": "2 hr", + "value": 120 + }, + { + "label": "4 hr", + "value": 240 + }, + { + "label": "8 hr", + "value": 480 + }, + { + "label": "1 Day", + "value": 1440 + }, + { + "label": "2 Days", + "value": 2880 + }, + { + "label": "1 week", + "value": 10080 + }, + { + "label": "2 weeks", + "value": 20160 + }, + { + "label": "Out of Service", + "value": 263000 + } + ], + "placeholder": { + "color": "#000000", + "icon": { + "color": "#000000", + "path": "material/archive", + "style": { + "classes": "" + } + }, + "text": "Shelve" + }, + "search": { + "enabled": false + }, + "showClearIcon": true, + "style": { + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "classes": "Dropdown/DropDownBox", + "margin": 15 + }, + "value": null + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "alarms-to-shelve", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.custom.alarms_to_shelve \u003d payload", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "513px", + "shrink": 0 + }, + "props": { + "style": { + "padding": 0 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "70px", + "shrink": 0 + }, + "props": { + "alignContent": "flex-start", + "style": { + "overflow": "visible" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "50px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" + }, + "type": "expr" + } + } + }, + "props": { + "text": "No Active Alarms", + "textStyle": { + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "AlarmTable" + }, + "position": { + "basis": "1898px", + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if({this.props.params.length_of_table_data} \u003e 0, True, False)" + }, + "type": "expr" + } + } + }, + "props": { + "params": { + "alarm_states": [ + "Active", + "Not Active" + ], + "length_of_table_data": 0, + "show_filter": true, + "show_severity_column": true, + "show_state_column": true, + "table_type": "Realtime", + "tagProps": [ + "" + ] + }, + "path": "Alarm-Views/AlarmTable", + "style": { + "margin": 5 + } + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "480px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Active_tab" + }, + "props": { + "direction": "column", + "justify": "space-evenly" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "custom": { + "alarms_to_shelve": [ + { + "style": { + "classes": "Alarms-Styles/Medium" + }, + "value": { + "Alarm_id": { + "value": 13 + }, + "Duration": { + "value": 10495 + }, + "Expiration": { + "value": { + "$": [ + "ts", + 0, + 1704730823344 + ], + "$ts": 0 + } + }, + "Message": { + "value": "Photo eye blocked" + }, + "Priority": { + "value": "3. Medium" + }, + "Shelve": { + "value": false + }, + "SourceId": { + "value": "PLC09/1210_07_44/B830_3" + }, + "State": { + "value": "Active" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 0, + 1704730823344 + ], + "$ts": 1704720394486 + } + }, + "Unshelve": { + "value": false + } + } + } + ] + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tsystem.perspective.sendMessage(\"unshelve-alarms\", payload, scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "153px" + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/archive" + } + }, + "style": { + "classes": "Dropdown/DropDownBox" + }, + "text": "Unshelve", + "value": "" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "alarms-to-shelve", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.props.enabled \u003d True\n\tself.custom.alarms_to_shelve \u003d payload", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "450px", + "shrink": 0 + }, + "props": { + "style": { + "padding": 5 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "40px", + "shrink": 0 + }, + "props": { + "alignContent": "flex-start", + "style": { + "overflow": "visible" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "AlarmTable" + }, + "position": { + "basis": "1898px", + "grow": 1 + }, + "props": { + "params": { + "alarm_states": [ + "Shelved" + ], + "length_of_table_data": 0, + "table_type": "Shelved", + "tagProps": [ + "" + ] + }, + "path": "Alarm-Views/AlarmTable" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "500px", + "grow": 1 + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Shelved tab" + }, + "position": { + "tabIndex": 1 + }, + "props": { + "direction": "column", + "justify": "space-evenly" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "custom": { + "SetFilter": true + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tif self.custom.SetFilter \u003d\u003d True:\n\t\tpayload[\"data\"] \u003d False\n\t\tself.custom.SetFilter \u003d False\n\t\t\n\t\n\telif self.custom.SetFilter \u003d\u003d False:\n\t\tpayload[\"data\"] \u003d True\n\t\tself.custom.SetFilter \u003d True\n\t\n\tsystem.perspective.sendMessage(\"show-historical-filters\", \n\t\t\t\t\t\t\t\t\tpayload \u003d payload, scope \u003d \"page\")\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button", + "tooltip": { + "enabled": true, + "style": { + "background-color": "white", + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "color": "#000000", + "fontFamily": "Arial", + "fontWeight": "normal" + }, + "text": "Show Filters" + } + }, + "position": { + "basis": "120px" + }, + "props": { + "image": { + "icon": { + "path": "material/filter_alt" + }, + "position": "center" + }, + "primary": false, + "style": { + "margin": 15, + "marginLeft": 20 + }, + "text": "" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "281px" + }, + "props": { + "style": { + "color": "#FF0000", + "margin-left": "20px" + }, + "text": "ALL TIMESTAMPS ARE IN UTC" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Show filters" + }, + "position": { + "basis": "70px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "100px" + }, + "props": { + "style": { + "fontFamily": "Arial", + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "From" + }, + "type": "ia.display.label" + }, + { + "custom": { + "max_duration_days": 10 + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tmessaging.message_handler.set_time_from_filters(self)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "DateTimeInput", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "200px" + }, + "propConfig": { + "props.maxDate": { + "binding": { + "config": { + "expression": "now()" + }, + "type": "expr" + } + }, + "props.minDate": { + "access": "PUBLIC", + "binding": { + "config": { + "expression": "addDays(now(),-{this.custom.max_duration_days})" + }, + "type": "expr" + } + } + }, + "props": { + "formattedValue": null, + "style": { + "margin": 15 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.date-time-input" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "61px" + }, + "props": { + "style": { + "fontFamily": "Arial", + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "To" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tmessaging.message_handler.set_time_to_filters(self)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "DateTimeInput_0" + }, + "position": { + "basis": "200px" + }, + "propConfig": { + "props.maxDate": { + "binding": { + "config": { + "expression": "now()" + }, + "type": "expr" + } + }, + "props.minDate": { + "binding": { + "config": { + "expression": "addDays(now(),-10)" + }, + "type": "expr" + } + }, + "props.value": { + "persistent": true + } + }, + "props": { + "formattedValue": null, + "style": { + "margin": 15 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.date-time-input" + } + ], + "meta": { + "name": "Time" + }, + "position": { + "basis": "70px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "100px" + }, + "props": { + "style": { + "fontFamily": "Arial", + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "SourceId" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tmessaging.message_handler.set_source_filters(self)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "490px" + }, + "propConfig": { + "props.value": { + "persistent": false + } + }, + "props": { + "multiSelect": true, + "options": [ + { + "label": "_types_/Topics", + "value": "_types_/Topics" + }, + { + "label": "PLC01", + "value": "PLC01" + }, + { + "label": "PLC01/10", + "value": "PLC01/10" + }, + { + "label": "PLC01/10/S0101", + "value": "PLC01/10/S0101" + }, + { + "label": "PLC01/30", + "value": "PLC01/30" + }, + { + "label": "PLC01/30/S0102", + "value": "PLC01/30/S0102" + }, + { + "label": "PLC01/40", + "value": "PLC01/40" + }, + { + "label": "PLC01/50", + "value": "PLC01/50" + }, + { + "label": "PLC01/50/SN0101", + "value": "PLC01/50/SN0101" + }, + { + "label": "PLC01/60", + "value": "PLC01/60" + }, + { + "label": "PLC01/210", + "value": "PLC01/210" + }, + { + "label": "PLC01/220", + "value": "PLC01/220" + }, + { + "label": "PLC01/AIR", + "value": "PLC01/AIR" + }, + { + "label": "PLC01/AIR/B0021", + "value": "PLC01/AIR/B0021" + }, + { + "label": "PLC01/AIR/B0022", + "value": "PLC01/AIR/B0022" + }, + { + "label": "PLC01/P1", + "value": "PLC01/P1" + }, + { + "label": "PLC01/P1/SN0021", + "value": "PLC01/P1/SN0021" + }, + { + "label": "PLC01/S01", + "value": "PLC01/S01" + }, + { + "label": "PLC01/S01/B0111", + "value": "PLC01/S01/B0111" + }, + { + "label": "PLC01/S01/K0041", + "value": "PLC01/S01/K0041" + }, + { + "label": "PLC01/ZM1", + "value": "PLC01/ZM1" + }, + { + "label": "PLC01/ZM1/B0121", + "value": "PLC01/ZM1/B0121" + }, + { + "label": "PLC01/ZM1/B0122", + "value": "PLC01/ZM1/B0122" + }, + { + "label": "PLC01/ZM2", + "value": "PLC01/ZM2" + }, + { + "label": "PLC01/ZM2/B0121", + "value": "PLC01/ZM2/B0121" + }, + { + "label": "PLC01/ZM2/B0122", + "value": "PLC01/ZM2/B0122" + }, + { + "label": "PLC02", + "value": "PLC02" + }, + { + "label": "PLC02/S01", + "value": "PLC02/S01" + }, + { + "label": "PLC02/S01/K0041", + "value": "PLC02/S01/K0041" + }, + { + "label": "PLC02/ZM1", + "value": "PLC02/ZM1" + }, + { + "label": "PLC02/ZM1/B0083", + "value": "PLC02/ZM1/B0083" + }, + { + "label": "PLC02/ZM1/B0121", + "value": "PLC02/ZM1/B0121" + }, + { + "label": "PLC02/ZM1/B0122", + "value": "PLC02/ZM1/B0122" + }, + { + "label": "PLC02/ZM1/U0251", + "value": "PLC02/ZM1/U0251" + }, + { + "label": "PLC02/ZM2", + "value": "PLC02/ZM2" + }, + { + "label": "PLC02/ZM2/B0121", + "value": "PLC02/ZM2/B0121" + }, + { + "label": "PLC02/ZM2/B0122", + "value": "PLC02/ZM2/B0122" + }, + { + "label": "PLC02/ZM2/U0251", + "value": "PLC02/ZM2/U0251" + }, + { + "label": "PLC03", + "value": "PLC03" + }, + { + "label": "PLC03/10", + "value": "PLC03/10" + }, + { + "label": "PLC03/10/S0101", + "value": "PLC03/10/S0101" + }, + { + "label": "PLC03/30", + "value": "PLC03/30" + }, + { + "label": "PLC03/30/S0102", + "value": "PLC03/30/S0102" + }, + { + "label": "PLC03/40", + "value": "PLC03/40" + }, + { + "label": "PLC03/50", + "value": "PLC03/50" + }, + { + "label": "PLC03/50/SN0101", + "value": "PLC03/50/SN0101" + }, + { + "label": "PLC03/60", + "value": "PLC03/60" + }, + { + "label": "PLC03/210", + "value": "PLC03/210" + }, + { + "label": "PLC03/220", + "value": "PLC03/220" + }, + { + "label": "PLC03/AIR", + "value": "PLC03/AIR" + }, + { + "label": "PLC03/AIR/B0021", + "value": "PLC03/AIR/B0021" + }, + { + "label": "PLC03/AIR/B0022", + "value": "PLC03/AIR/B0022" + }, + { + "label": "PLC03/P1", + "value": "PLC03/P1" + }, + { + "label": "PLC03/P1/SN0021", + "value": "PLC03/P1/SN0021" + }, + { + "label": "PLC03/S01", + "value": "PLC03/S01" + }, + { + "label": "PLC03/S01/B0111", + "value": "PLC03/S01/B0111" + }, + { + "label": "PLC03/S01/K0041", + "value": "PLC03/S01/K0041" + }, + { + "label": "PLC03/ZM1", + "value": "PLC03/ZM1" + }, + { + "label": "PLC03/ZM1/B0121", + "value": "PLC03/ZM1/B0121" + }, + { + "label": "PLC03/ZM1/B0122", + "value": "PLC03/ZM1/B0122" + }, + { + "label": "PLC03/ZM2", + "value": "PLC03/ZM2" + }, + { + "label": "PLC03/ZM2/B0121", + "value": "PLC03/ZM2/B0121" + }, + { + "label": "PLC03/ZM2/B0122", + "value": "PLC03/ZM2/B0122" + }, + { + "label": "PLC09", + "value": "PLC09" + }, + { + "label": "PLC09/ASL1", + "value": "PLC09/ASL1" + }, + { + "label": "PLC09/ASL1/ES", + "value": "PLC09/ASL1/ES" + }, + { + "label": "PLC09/ASL2", + "value": "PLC09/ASL2" + }, + { + "label": "PLC09/ASL2/ES", + "value": "PLC09/ASL2/ES" + }, + { + "label": "PLC09/ASL3", + "value": "PLC09/ASL3" + }, + { + "label": "PLC09/ASL3/ES", + "value": "PLC09/ASL3/ES" + }, + { + "label": "PLC09/I1_1", + "value": "PLC09/I1_1" + }, + { + "label": "PLC09/I1_1/ES1", + "value": "PLC09/I1_1/ES1" + }, + { + "label": "PLC09/I1_2", + "value": "PLC09/I1_2" + }, + { + "label": "PLC09/I1_2/ES1", + "value": "PLC09/I1_2/ES1" + }, + { + "label": "PLC09/I1_3", + "value": "PLC09/I1_3" + }, + { + "label": "PLC09/I1_3_4", + "value": "PLC09/I1_3_4" + }, + { + "label": "PLC09/I1_4", + "value": "PLC09/I1_4" + }, + { + "label": "PLC09/I2_1", + "value": "PLC09/I2_1" + }, + { + "label": "PLC09/I2_1/ES1", + "value": "PLC09/I2_1/ES1" + }, + { + "label": "PLC09/I2_2", + "value": "PLC09/I2_2" + }, + { + "label": "PLC09/I2_2/ES1", + "value": "PLC09/I2_2/ES1" + }, + { + "label": "PLC09/I2_3", + "value": "PLC09/I2_3" + }, + { + "label": "PLC09/I2_3_4", + "value": "PLC09/I2_3_4" + }, + { + "label": "PLC09/I2_4", + "value": "PLC09/I2_4" + }, + { + "label": "PLC09/I3_1", + "value": "PLC09/I3_1" + }, + { + "label": "PLC09/I3_1/ES1", + "value": "PLC09/I3_1/ES1" + }, + { + "label": "PLC09/I3_2", + "value": "PLC09/I3_2" + }, + { + "label": "PLC09/I3_2/ES1", + "value": "PLC09/I3_2/ES1" + }, + { + "label": "PLC09/I3_3", + "value": "PLC09/I3_3" + }, + { + "label": "PLC09/I3_3_4", + "value": "PLC09/I3_3_4" + }, + { + "label": "PLC09/I3_4", + "value": "PLC09/I3_4" + }, + { + "label": "PLC09/I4_1", + "value": "PLC09/I4_1" + }, + { + "label": "PLC09/I4_1/ES1", + "value": "PLC09/I4_1/ES1" + }, + { + "label": "PLC09/I4_2", + "value": "PLC09/I4_2" + }, + { + "label": "PLC09/I4_2/ES1", + "value": "PLC09/I4_2/ES1" + }, + { + "label": "PLC09/I4_3", + "value": "PLC09/I4_3" + }, + { + "label": "PLC09/I4_3_4", + "value": "PLC09/I4_3_4" + }, + { + "label": "PLC09/I4_4", + "value": "PLC09/I4_4" + }, + { + "label": "PLC09/INDUCT", + "value": "PLC09/INDUCT" + }, + { + "label": "PLC09/L1_1", + "value": "PLC09/L1_1" + }, + { + "label": "PLC09/L1_1/ES1", + "value": "PLC09/L1_1/ES1" + }, + { + "label": "PLC09/L1_1A", + "value": "PLC09/L1_1A" + }, + { + "label": "PLC09/L1_1B", + "value": "PLC09/L1_1B" + }, + { + "label": "PLC09/L1_2", + "value": "PLC09/L1_2" + }, + { + "label": "PLC09/L1_2_1", + "value": "PLC09/L1_2_1" + }, + { + "label": "PLC09/L1_2_2", + "value": "PLC09/L1_2_2" + }, + { + "label": "PLC09/L1_2_3", + "value": "PLC09/L1_2_3" + }, + { + "label": "PLC09/L1_2_4", + "value": "PLC09/L1_2_4" + }, + { + "label": "PLC09/L1_2_5", + "value": "PLC09/L1_2_5" + }, + { + "label": "PLC09/L1_2_6", + "value": "PLC09/L1_2_6" + }, + { + "label": "PLC09/L1_2_7", + "value": "PLC09/L1_2_7" + }, + { + "label": "PLC09/L1_2_8", + "value": "PLC09/L1_2_8" + }, + { + "label": "PLC09/L1_3_1", + "value": "PLC09/L1_3_1" + }, + { + "label": "PLC09/L1_3_2", + "value": "PLC09/L1_3_2" + }, + { + "label": "PLC09/L1_3_5", + "value": "PLC09/L1_3_5" + }, + { + "label": "PLC09/L1_4_1", + "value": "PLC09/L1_4_1" + }, + { + "label": "PLC09/L1_4_2", + "value": "PLC09/L1_4_2" + }, + { + "label": "PLC09/L1_4_3", + "value": "PLC09/L1_4_3" + }, + { + "label": "PLC09/L1_5_1", + "value": "PLC09/L1_5_1" + }, + { + "label": "PLC09/L1_5_2", + "value": "PLC09/L1_5_2" + }, + { + "label": "PLC09/L1_6", + "value": "PLC09/L1_6" + }, + { + "label": "PLC09/L1_7", + "value": "PLC09/L1_7" + }, + { + "label": "PLC09/L1_7/ES1", + "value": "PLC09/L1_7/ES1" + }, + { + "label": "PLC09/L1_8", + "value": "PLC09/L1_8" + }, + { + "label": "PLC09/L1_8/ES1", + "value": "PLC09/L1_8/ES1" + }, + { + "label": "PLC09/L1_9_1", + "value": "PLC09/L1_9_1" + }, + { + "label": "PLC09/L1_9_2", + "value": "PLC09/L1_9_2" + }, + { + "label": "PLC09/L1_9_10", + "value": "PLC09/L1_9_10" + }, + { + "label": "PLC09/L1_10_1", + "value": "PLC09/L1_10_1" + }, + { + "label": "PLC09/L1_10_2", + "value": "PLC09/L1_10_2" + }, + { + "label": "PLC09/L1_11", + "value": "PLC09/L1_11" + }, + { + "label": "PLC09/L1_11/ES1", + "value": "PLC09/L1_11/ES1" + }, + { + "label": "PLC09/L1_11A", + "value": "PLC09/L1_11A" + }, + { + "label": "PLC09/L1_11B", + "value": "PLC09/L1_11B" + }, + { + "label": "PLC09/L1_11C", + "value": "PLC09/L1_11C" + }, + { + "label": "PLC09/L1_11D", + "value": "PLC09/L1_11D" + }, + { + "label": "PLC09/L1_11E", + "value": "PLC09/L1_11E" + }, + { + "label": "PLC09/L1_11F", + "value": "PLC09/L1_11F" + }, + { + "label": "PLC09/L1_12_1", + "value": "PLC09/L1_12_1" + }, + { + "label": "PLC09/L1_12_2", + "value": "PLC09/L1_12_2" + }, + { + "label": "PLC09/L1_12_3", + "value": "PLC09/L1_12_3" + }, + { + "label": "PLC09/L1_12_4", + "value": "PLC09/L1_12_4" + }, + { + "label": "PLC09/L1_12_15", + "value": "PLC09/L1_12_15" + }, + { + "label": "PLC09/L1_13_1", + "value": "PLC09/L1_13_1" + }, + { + "label": "PLC09/L1_14_1", + "value": "PLC09/L1_14_1" + }, + { + "label": "PLC09/L1_14_2", + "value": "PLC09/L1_14_2" + }, + { + "label": "PLC09/L1_14_3", + "value": "PLC09/L1_14_3" + }, + { + "label": "PLC09/L1_15_1", + "value": "PLC09/L1_15_1" + }, + { + "label": "PLC09/L1_16", + "value": "PLC09/L1_16" + }, + { + "label": "PLC09/L1_16/ES1", + "value": "PLC09/L1_16/ES1" + }, + { + "label": "PLC09/L1_16A", + "value": "PLC09/L1_16A" + }, + { + "label": "PLC09/L1_16B", + "value": "PLC09/L1_16B" + }, + { + "label": "PLC09/L1_17", + "value": "PLC09/L1_17" + }, + { + "label": "PLC09/L1_17_1", + "value": "PLC09/L1_17_1" + }, + { + "label": "PLC09/L1_17_2", + "value": "PLC09/L1_17_2" + }, + { + "label": "PLC09/L1_17_3", + "value": "PLC09/L1_17_3" + }, + { + "label": "PLC09/L1_17_4", + "value": "PLC09/L1_17_4" + }, + { + "label": "PLC09/L1_17_5", + "value": "PLC09/L1_17_5" + }, + { + "label": "PLC09/L1_17_6", + "value": "PLC09/L1_17_6" + }, + { + "label": "PLC09/L1_17_7", + "value": "PLC09/L1_17_7" + }, + { + "label": "PLC09/L1_17_8", + "value": "PLC09/L1_17_8" + }, + { + "label": "PLC09/L1_18_1", + "value": "PLC09/L1_18_1" + }, + { + "label": "PLC09/L1_18_20", + "value": "PLC09/L1_18_20" + }, + { + "label": "PLC09/L1_19_1", + "value": "PLC09/L1_19_1" + }, + { + "label": "PLC09/L1_19_2", + "value": "PLC09/L1_19_2" + }, + { + "label": "PLC09/L1_19_3", + "value": "PLC09/L1_19_3" + }, + { + "label": "PLC09/L1_20_1", + "value": "PLC09/L1_20_1" + }, + { + "label": "PLC09/L1_21", + "value": "PLC09/L1_21" + }, + { + "label": "PLC09/L1_21A", + "value": "PLC09/L1_21A" + }, + { + "label": "PLC09/L1_21A_1", + "value": "PLC09/L1_21A_1" + }, + { + "label": "PLC09/L1_21A_2", + "value": "PLC09/L1_21A_2" + }, + { + "label": "PLC09/L1_21A_3", + "value": "PLC09/L1_21A_3" + }, + { + "label": "PLC09/L1_21A_4", + "value": "PLC09/L1_21A_4" + }, + { + "label": "PLC09/L1_21A_5", + "value": "PLC09/L1_21A_5" + }, + { + "label": "PLC09/L1_21A_6", + "value": "PLC09/L1_21A_6" + }, + { + "label": "PLC09/L1_21A_7", + "value": "PLC09/L1_21A_7" + }, + { + "label": "PLC09/L1_21A_8", + "value": "PLC09/L1_21A_8" + }, + { + "label": "PLC09/L1_21A_9", + "value": "PLC09/L1_21A_9" + }, + { + "label": "PLC09/L1_21A_10", + "value": "PLC09/L1_21A_10" + }, + { + "label": "PLC09/L1_21B", + "value": "PLC09/L1_21B" + }, + { + "label": "PLC09/L1_21B_1", + "value": "PLC09/L1_21B_1" + }, + { + "label": "PLC09/L1_21B_2", + "value": "PLC09/L1_21B_2" + }, + { + "label": "PLC09/L1_21B_3", + "value": "PLC09/L1_21B_3" + }, + { + "label": "PLC09/L1_21B_4", + "value": "PLC09/L1_21B_4" + }, + { + "label": "PLC09/L1_21B_5", + "value": "PLC09/L1_21B_5" + }, + { + "label": "PLC09/L1_21B_6", + "value": "PLC09/L1_21B_6" + }, + { + "label": "PLC09/L1_21B_7", + "value": "PLC09/L1_21B_7" + }, + { + "label": "PLC09/L1_21B_8", + "value": "PLC09/L1_21B_8" + }, + { + "label": "PLC09/L1_21B_9", + "value": "PLC09/L1_21B_9" + }, + { + "label": "PLC09/L1_21B_10", + "value": "PLC09/L1_21B_10" + }, + { + "label": "PLC09/L1_22", + "value": "PLC09/L1_22" + }, + { + "label": "PLC09/L1_22/ES1", + "value": "PLC09/L1_22/ES1" + }, + { + "label": "PLC09/L1_22/ES2", + "value": "PLC09/L1_22/ES2" + }, + { + "label": "PLC09/L1_24", + "value": "PLC09/L1_24" + }, + { + "label": "PLC09/L1_24_1", + "value": "PLC09/L1_24_1" + }, + { + "label": "PLC09/L1_24_2", + "value": "PLC09/L1_24_2" + }, + { + "label": "PLC09/L1_24_3", + "value": "PLC09/L1_24_3" + }, + { + "label": "PLC09/L1_24_4", + "value": "PLC09/L1_24_4" + }, + { + "label": "PLC09/L1_24_5", + "value": "PLC09/L1_24_5" + }, + { + "label": "PLC09/L1_24_6", + "value": "PLC09/L1_24_6" + }, + { + "label": "PLC09/L1_24_7", + "value": "PLC09/L1_24_7" + }, + { + "label": "PLC09/L1_25", + "value": "PLC09/L1_25" + }, + { + "label": "PLC09/L1_25/ES1", + "value": "PLC09/L1_25/ES1" + }, + { + "label": "PLC09/L1_25/ES2", + "value": "PLC09/L1_25/ES2" + }, + { + "label": "PLC09/L1_25A", + "value": "PLC09/L1_25A" + }, + { + "label": "PLC09/L1_25B", + "value": "PLC09/L1_25B" + }, + { + "label": "PLC09/L1_25C", + "value": "PLC09/L1_25C" + }, + { + "label": "PLC09/L1_25D", + "value": "PLC09/L1_25D" + }, + { + "label": "PLC09/L1_25E", + "value": "PLC09/L1_25E" + }, + { + "label": "PLC09/L2_1A", + "value": "PLC09/L2_1A" + }, + { + "label": "PLC09/L2_1B", + "value": "PLC09/L2_1B" + }, + { + "label": "PLC09/L2_2", + "value": "PLC09/L2_2" + }, + { + "label": "PLC09/L2_2_1", + "value": "PLC09/L2_2_1" + }, + { + "label": "PLC09/L2_2_2", + "value": "PLC09/L2_2_2" + }, + { + "label": "PLC09/L2_2_3", + "value": "PLC09/L2_2_3" + }, + { + "label": "PLC09/L2_2_4", + "value": "PLC09/L2_2_4" + }, + { + "label": "PLC09/L2_2_5", + "value": "PLC09/L2_2_5" + }, + { + "label": "PLC09/L2_2_6", + "value": "PLC09/L2_2_6" + }, + { + "label": "PLC09/L2_2_7", + "value": "PLC09/L2_2_7" + }, + { + "label": "PLC09/L2_2_8", + "value": "PLC09/L2_2_8" + }, + { + "label": "PLC09/L2_3_1", + "value": "PLC09/L2_3_1" + }, + { + "label": "PLC09/L2_3_2", + "value": "PLC09/L2_3_2" + }, + { + "label": "PLC09/L2_3_4_5", + "value": "PLC09/L2_3_4_5" + }, + { + "label": "PLC09/L2_3_5", + "value": "PLC09/L2_3_5" + }, + { + "label": "PLC09/L2_4_1", + "value": "PLC09/L2_4_1" + }, + { + "label": "PLC09/L2_4_2", + "value": "PLC09/L2_4_2" + }, + { + "label": "PLC09/L2_4_3", + "value": "PLC09/L2_4_3" + }, + { + "label": "PLC09/L2_4_4", + "value": "PLC09/L2_4_4" + }, + { + "label": "PLC09/L2_4_6", + "value": "PLC09/L2_4_6" + }, + { + "label": "PLC09/L2_4_7", + "value": "PLC09/L2_4_7" + }, + { + "label": "PLC09/L2_4_8", + "value": "PLC09/L2_4_8" + }, + { + "label": "PLC09/L2_5", + "value": "PLC09/L2_5" + }, + { + "label": "PLC09/L2_5/ES1", + "value": "PLC09/L2_5/ES1" + }, + { + "label": "PLC09/L2_5_1", + "value": "PLC09/L2_5_1" + }, + { + "label": "PLC09/L2_5_2", + "value": "PLC09/L2_5_2" + }, + { + "label": "PLC09/L2_6", + "value": "PLC09/L2_6" + }, + { + "label": "PLC09/L2_7", + "value": "PLC09/L2_7" + }, + { + "label": "PLC09/L2_8", + "value": "PLC09/L2_8" + }, + { + "label": "PLC09/L2_9", + "value": "PLC09/L2_9" + }, + { + "label": "PLC09/L2_9/ES1", + "value": "PLC09/L2_9/ES1" + }, + { + "label": "PLC09/L2_10_1", + "value": "PLC09/L2_10_1" + }, + { + "label": "PLC09/L2_10_2", + "value": "PLC09/L2_10_2" + }, + { + "label": "PLC09/L2_10_3", + "value": "PLC09/L2_10_3" + }, + { + "label": "PLC09/L2_10_4", + "value": "PLC09/L2_10_4" + }, + { + "label": "PLC09/L2_10_11", + "value": "PLC09/L2_10_11" + }, + { + "label": "PLC09/L2_11_1", + "value": "PLC09/L2_11_1" + }, + { + "label": "PLC09/L2_11_2", + "value": "PLC09/L2_11_2" + }, + { + "label": "PLC09/L2_12", + "value": "PLC09/L2_12" + }, + { + "label": "PLC09/L2_12/ES1", + "value": "PLC09/L2_12/ES1" + }, + { + "label": "PLC09/L2_12A", + "value": "PLC09/L2_12A" + }, + { + "label": "PLC09/L2_12B", + "value": "PLC09/L2_12B" + }, + { + "label": "PLC09/L2_13", + "value": "PLC09/L2_13" + }, + { + "label": "PLC09/L2_13_1", + "value": "PLC09/L2_13_1" + }, + { + "label": "PLC09/L2_13_2", + "value": "PLC09/L2_13_2" + }, + { + "label": "PLC09/L2_13_3", + "value": "PLC09/L2_13_3" + }, + { + "label": "PLC09/L2_13_4", + "value": "PLC09/L2_13_4" + }, + { + "label": "PLC09/L2_13_5", + "value": "PLC09/L2_13_5" + }, + { + "label": "PLC09/L2_13_6", + "value": "PLC09/L2_13_6" + }, + { + "label": "PLC09/L2_13_7", + "value": "PLC09/L2_13_7" + }, + { + "label": "PLC09/L2_13_8", + "value": "PLC09/L2_13_8" + }, + { + "label": "PLC09/L2_14_1", + "value": "PLC09/L2_14_1" + }, + { + "label": "PLC09/L2_14_16", + "value": "PLC09/L2_14_16" + }, + { + "label": "PLC09/L2_15_1", + "value": "PLC09/L2_15_1" + }, + { + "label": "PLC09/L2_15_2", + "value": "PLC09/L2_15_2" + }, + { + "label": "PLC09/L2_15_3", + "value": "PLC09/L2_15_3" + }, + { + "label": "PLC09/L2_16_1", + "value": "PLC09/L2_16_1" + }, + { + "label": "PLC09/L2_17", + "value": "PLC09/L2_17" + }, + { + "label": "PLC09/L2_17A", + "value": "PLC09/L2_17A" + }, + { + "label": "PLC09/L2_17A_1", + "value": "PLC09/L2_17A_1" + }, + { + "label": "PLC09/L2_17A_2", + "value": "PLC09/L2_17A_2" + }, + { + "label": "PLC09/L2_17A_3", + "value": "PLC09/L2_17A_3" + }, + { + "label": "PLC09/L2_17A_4", + "value": "PLC09/L2_17A_4" + }, + { + "label": "PLC09/L2_17A_5", + "value": "PLC09/L2_17A_5" + }, + { + "label": "PLC09/L2_17A_6", + "value": "PLC09/L2_17A_6" + }, + { + "label": "PLC09/L2_17A_7", + "value": "PLC09/L2_17A_7" + }, + { + "label": "PLC09/L2_17A_8", + "value": "PLC09/L2_17A_8" + }, + { + "label": "PLC09/L2_17A_9", + "value": "PLC09/L2_17A_9" + }, + { + "label": "PLC09/L2_17A_10", + "value": "PLC09/L2_17A_10" + }, + { + "label": "PLC09/L2_17B", + "value": "PLC09/L2_17B" + }, + { + "label": "PLC09/L2_17B_1", + "value": "PLC09/L2_17B_1" + }, + { + "label": "PLC09/L2_17B_2", + "value": "PLC09/L2_17B_2" + }, + { + "label": "PLC09/L2_17B_3", + "value": "PLC09/L2_17B_3" + }, + { + "label": "PLC09/L2_17B_4", + "value": "PLC09/L2_17B_4" + }, + { + "label": "PLC09/L2_17B_5", + "value": "PLC09/L2_17B_5" + }, + { + "label": "PLC09/L2_17B_6", + "value": "PLC09/L2_17B_6" + }, + { + "label": "PLC09/L2_17B_7", + "value": "PLC09/L2_17B_7" + }, + { + "label": "PLC09/L2_17B_8", + "value": "PLC09/L2_17B_8" + }, + { + "label": "PLC09/L2_17B_9", + "value": "PLC09/L2_17B_9" + }, + { + "label": "PLC09/L2_17B_10", + "value": "PLC09/L2_17B_10" + }, + { + "label": "PLC09/L2_18", + "value": "PLC09/L2_18" + }, + { + "label": "PLC09/L2_18/ES1", + "value": "PLC09/L2_18/ES1" + }, + { + "label": "PLC09/L2_18/ES2", + "value": "PLC09/L2_18/ES2" + }, + { + "label": "PLC09/L2_20", + "value": "PLC09/L2_20" + }, + { + "label": "PLC09/L2_20_1", + "value": "PLC09/L2_20_1" + }, + { + "label": "PLC09/L2_20_2", + "value": "PLC09/L2_20_2" + }, + { + "label": "PLC09/L2_20_3", + "value": "PLC09/L2_20_3" + }, + { + "label": "PLC09/L2_20_4", + "value": "PLC09/L2_20_4" + }, + { + "label": "PLC09/L2_20_5", + "value": "PLC09/L2_20_5" + }, + { + "label": "PLC09/L2_20_6", + "value": "PLC09/L2_20_6" + }, + { + "label": "PLC09/L2_20_7", + "value": "PLC09/L2_20_7" + }, + { + "label": "PLC09/L2_20_8", + "value": "PLC09/L2_20_8" + }, + { + "label": "PLC09/L2_21", + "value": "PLC09/L2_21" + }, + { + "label": "PLC09/L2_21/ES1", + "value": "PLC09/L2_21/ES1" + }, + { + "label": "PLC09/L2_21/ES2", + "value": "PLC09/L2_21/ES2" + }, + { + "label": "PLC09/L2_21A", + "value": "PLC09/L2_21A" + }, + { + "label": "PLC09/L2_21B", + "value": "PLC09/L2_21B" + }, + { + "label": "PLC09/L2_21C", + "value": "PLC09/L2_21C" + }, + { + "label": "PLC09/L2_21D", + "value": "PLC09/L2_21D" + }, + { + "label": "PLC09/L2_21E", + "value": "PLC09/L2_21E" + }, + { + "label": "PLC09/L3_1", + "value": "PLC09/L3_1" + }, + { + "label": "PLC09/L3_1/ES1", + "value": "PLC09/L3_1/ES1" + }, + { + "label": "PLC09/L3_1A", + "value": "PLC09/L3_1A" + }, + { + "label": "PLC09/L3_1B", + "value": "PLC09/L3_1B" + }, + { + "label": "PLC09/L3_2", + "value": "PLC09/L3_2" + }, + { + "label": "PLC09/L3_2_1", + "value": "PLC09/L3_2_1" + }, + { + "label": "PLC09/L3_2_2", + "value": "PLC09/L3_2_2" + }, + { + "label": "PLC09/L3_2_3", + "value": "PLC09/L3_2_3" + }, + { + "label": "PLC09/L3_2_4", + "value": "PLC09/L3_2_4" + }, + { + "label": "PLC09/L3_2_5", + "value": "PLC09/L3_2_5" + }, + { + "label": "PLC09/L3_2_6", + "value": "PLC09/L3_2_6" + }, + { + "label": "PLC09/L3_2_7", + "value": "PLC09/L3_2_7" + }, + { + "label": "PLC09/L3_2_8", + "value": "PLC09/L3_2_8" + }, + { + "label": "PLC09/L3_3_1", + "value": "PLC09/L3_3_1" + }, + { + "label": "PLC09/L3_3_2", + "value": "PLC09/L3_3_2" + }, + { + "label": "PLC09/L3_3_5", + "value": "PLC09/L3_3_5" + }, + { + "label": "PLC09/L3_4", + "value": "PLC09/L3_4" + }, + { + "label": "PLC09/L3_4/ES1", + "value": "PLC09/L3_4/ES1" + }, + { + "label": "PLC09/L3_4_1", + "value": "PLC09/L3_4_1" + }, + { + "label": "PLC09/L3_5_1", + "value": "PLC09/L3_5_1" + }, + { + "label": "PLC09/L3_5_2", + "value": "PLC09/L3_5_2" + }, + { + "label": "PLC09/L3_6", + "value": "PLC09/L3_6" + }, + { + "label": "PLC09/L3_7", + "value": "PLC09/L3_7" + }, + { + "label": "PLC09/L3_7/ES1", + "value": "PLC09/L3_7/ES1" + }, + { + "label": "PLC09/L3_8", + "value": "PLC09/L3_8" + }, + { + "label": "PLC09/L3_8/ES1", + "value": "PLC09/L3_8/ES1" + }, + { + "label": "PLC09/L3_9", + "value": "PLC09/L3_9" + }, + { + "label": "PLC09/L3_9_1", + "value": "PLC09/L3_9_1" + }, + { + "label": "PLC09/L3_9_2", + "value": "PLC09/L3_9_2" + }, + { + "label": "PLC09/L3_9_3", + "value": "PLC09/L3_9_3" + }, + { + "label": "PLC09/L3_9_4", + "value": "PLC09/L3_9_4" + }, + { + "label": "PLC09/L3_9_5", + "value": "PLC09/L3_9_5" + }, + { + "label": "PLC09/L3_9_6", + "value": "PLC09/L3_9_6" + }, + { + "label": "PLC09/L3_9_7", + "value": "PLC09/L3_9_7" + }, + { + "label": "PLC09/L3_10_1", + "value": "PLC09/L3_10_1" + }, + { + "label": "PLC09/L3_10_2", + "value": "PLC09/L3_10_2" + }, + { + "label": "PLC09/L3_10_11", + "value": "PLC09/L3_10_11" + }, + { + "label": "PLC09/L3_11", + "value": "PLC09/L3_11" + }, + { + "label": "PLC09/L3_11/ES1", + "value": "PLC09/L3_11/ES1" + }, + { + "label": "PLC09/L3_11_1", + "value": "PLC09/L3_11_1" + }, + { + "label": "PLC09/L3_11_2", + "value": "PLC09/L3_11_2" + }, + { + "label": "PLC09/L3_11_3", + "value": "PLC09/L3_11_3" + }, + { + "label": "PLC09/L3_11_4", + "value": "PLC09/L3_11_4" + }, + { + "label": "PLC09/L3_12", + "value": "PLC09/L3_12" + }, + { + "label": "PLC09/L3_12/ES1", + "value": "PLC09/L3_12/ES1" + }, + { + "label": "PLC09/L3_12A", + "value": "PLC09/L3_12A" + }, + { + "label": "PLC09/L3_12B", + "value": "PLC09/L3_12B" + }, + { + "label": "PLC09/L3_12C", + "value": "PLC09/L3_12C" + }, + { + "label": "PLC09/L4_1A", + "value": "PLC09/L4_1A" + }, + { + "label": "PLC09/L4_1B", + "value": "PLC09/L4_1B" + }, + { + "label": "PLC09/L4_2", + "value": "PLC09/L4_2" + }, + { + "label": "PLC09/L4_2_1", + "value": "PLC09/L4_2_1" + }, + { + "label": "PLC09/L4_2_2", + "value": "PLC09/L4_2_2" + }, + { + "label": "PLC09/L4_2_3", + "value": "PLC09/L4_2_3" + }, + { + "label": "PLC09/L4_2_4", + "value": "PLC09/L4_2_4" + }, + { + "label": "PLC09/L4_2_5", + "value": "PLC09/L4_2_5" + }, + { + "label": "PLC09/L4_2_6", + "value": "PLC09/L4_2_6" + }, + { + "label": "PLC09/L4_2_7", + "value": "PLC09/L4_2_7" + }, + { + "label": "PLC09/L4_2_8", + "value": "PLC09/L4_2_8" + }, + { + "label": "PLC09/L4_3_1", + "value": "PLC09/L4_3_1" + }, + { + "label": "PLC09/L4_3_2", + "value": "PLC09/L4_3_2" + }, + { + "label": "PLC09/L4_3_5", + "value": "PLC09/L4_3_5" + }, + { + "label": "PLC09/L4_4_1", + "value": "PLC09/L4_4_1" + }, + { + "label": "PLC09/L4_4_2", + "value": "PLC09/L4_4_2" + }, + { + "label": "PLC09/L4_5_1", + "value": "PLC09/L4_5_1" + }, + { + "label": "PLC09/L4_5_2", + "value": "PLC09/L4_5_2" + }, + { + "label": "PLC09/L4_6", + "value": "PLC09/L4_6" + }, + { + "label": "PLC09/L4_6/ES1", + "value": "PLC09/L4_6/ES1" + }, + { + "label": "PLC09/L4_7", + "value": "PLC09/L4_7" + }, + { + "label": "PLC09/L4_8", + "value": "PLC09/L4_8" + }, + { + "label": "PLC09/L4_8/ES1", + "value": "PLC09/L4_8/ES1" + }, + { + "label": "PLC09/L4_8/ES2", + "value": "PLC09/L4_8/ES2" + }, + { + "label": "PLC09/L4_9", + "value": "PLC09/L4_9" + }, + { + "label": "PLC09/L4_9/ES1", + "value": "PLC09/L4_9/ES1" + }, + { + "label": "PLC09/L4_10_1", + "value": "PLC09/L4_10_1" + }, + { + "label": "PLC09/L4_10_2", + "value": "PLC09/L4_10_2" + }, + { + "label": "PLC09/L4_10_3", + "value": "PLC09/L4_10_3" + }, + { + "label": "PLC09/L4_10_4", + "value": "PLC09/L4_10_4" + }, + { + "label": "PLC09/L4_10_5", + "value": "PLC09/L4_10_5" + }, + { + "label": "PLC09/L4_10_6", + "value": "PLC09/L4_10_6" + }, + { + "label": "PLC09/L4_10_7", + "value": "PLC09/L4_10_7" + }, + { + "label": "PLC09/L4_10_8", + "value": "PLC09/L4_10_8" + }, + { + "label": "PLC09/L4_10_11", + "value": "PLC09/L4_10_11" + }, + { + "label": "PLC09/L4_11", + "value": "PLC09/L4_11" + }, + { + "label": "PLC09/L4_11/ES1", + "value": "PLC09/L4_11/ES1" + }, + { + "label": "PLC09/L4_11_1", + "value": "PLC09/L4_11_1" + }, + { + "label": "PLC09/L4_11_2", + "value": "PLC09/L4_11_2" + }, + { + "label": "PLC09/L4_12", + "value": "PLC09/L4_12" + }, + { + "label": "PLC09/L4_12/ES1", + "value": "PLC09/L4_12/ES1" + }, + { + "label": "PLC09/L4_12A", + "value": "PLC09/L4_12A" + }, + { + "label": "PLC09/L4_12B", + "value": "PLC09/L4_12B" + }, + { + "label": "PLC09/L4_12C", + "value": "PLC09/L4_12C" + }, + { + "label": "PLC09/L4_12D", + "value": "PLC09/L4_12D" + }, + { + "label": "PLC09/L4_12E", + "value": "PLC09/L4_12E" + }, + { + "label": "PLC09/L4_12F", + "value": "PLC09/L4_12F" + }, + { + "label": "PLC09/L4_13", + "value": "PLC09/L4_13" + }, + { + "label": "PLC09/L4_13_1", + "value": "PLC09/L4_13_1" + }, + { + "label": "PLC09/L4_13_2", + "value": "PLC09/L4_13_2" + }, + { + "label": "PLC09/L4_13_3", + "value": "PLC09/L4_13_3" + }, + { + "label": "PLC09/L4_13_4", + "value": "PLC09/L4_13_4" + }, + { + "label": "PLC09/L4_14", + "value": "PLC09/L4_14" + }, + { + "label": "PLC09/L4_14/ES1", + "value": "PLC09/L4_14/ES1" + }, + { + "label": "PLC09/L4_14A", + "value": "PLC09/L4_14A" + }, + { + "label": "PLC09/L4_14B", + "value": "PLC09/L4_14B" + }, + { + "label": "PLC09/L5_1", + "value": "PLC09/L5_1" + }, + { + "label": "PLC09/L5_2", + "value": "PLC09/L5_2" + }, + { + "label": "PLC09/L5_3", + "value": "PLC09/L5_3" + }, + { + "label": "PLC09/L5_3_1", + "value": "PLC09/L5_3_1" + }, + { + "label": "PLC09/L5_3_2", + "value": "PLC09/L5_3_2" + }, + { + "label": "PLC09/L5_3_3", + "value": "PLC09/L5_3_3" + }, + { + "label": "PLC09/L5_3_5", + "value": "PLC09/L5_3_5" + }, + { + "label": "PLC09/L5_3_6", + "value": "PLC09/L5_3_6" + }, + { + "label": "PLC09/L5_3_7", + "value": "PLC09/L5_3_7" + }, + { + "label": "PLC09/L5_3_8", + "value": "PLC09/L5_3_8" + }, + { + "label": "PLC09/L5_4", + "value": "PLC09/L5_4" + }, + { + "label": "PLC09/L5_4/ES1", + "value": "PLC09/L5_4/ES1" + }, + { + "label": "PLC09/L5_4/ES2", + "value": "PLC09/L5_4/ES2" + }, + { + "label": "PLC09/L5_4A", + "value": "PLC09/L5_4A" + }, + { + "label": "PLC09/L5_4B", + "value": "PLC09/L5_4B" + }, + { + "label": "PLC09/L5_4C", + "value": "PLC09/L5_4C" + }, + { + "label": "PLC09/L5_4D", + "value": "PLC09/L5_4D" + }, + { + "label": "PLC09/L5_4E", + "value": "PLC09/L5_4E" + }, + { + "label": "PLC09/L6_1", + "value": "PLC09/L6_1" + }, + { + "label": "PLC09/L6_2", + "value": "PLC09/L6_2" + }, + { + "label": "PLC09/L6_3", + "value": "PLC09/L6_3" + }, + { + "label": "PLC09/L6_3_1", + "value": "PLC09/L6_3_1" + }, + { + "label": "PLC09/L6_3_2", + "value": "PLC09/L6_3_2" + }, + { + "label": "PLC09/L6_3_3", + "value": "PLC09/L6_3_3" + }, + { + "label": "PLC09/L6_3_4", + "value": "PLC09/L6_3_4" + }, + { + "label": "PLC09/L6_3_5", + "value": "PLC09/L6_3_5" + }, + { + "label": "PLC09/L6_3_6", + "value": "PLC09/L6_3_6" + }, + { + "label": "PLC09/L6_3_7", + "value": "PLC09/L6_3_7" + }, + { + "label": "PLC09/L6_3_8", + "value": "PLC09/L6_3_8" + }, + { + "label": "PLC09/L6_4", + "value": "PLC09/L6_4" + }, + { + "label": "PLC09/L6_4/ES1", + "value": "PLC09/L6_4/ES1" + }, + { + "label": "PLC09/L6_4/ES2", + "value": "PLC09/L6_4/ES2" + }, + { + "label": "PLC09/L6_4A", + "value": "PLC09/L6_4A" + }, + { + "label": "PLC09/L6_4B", + "value": "PLC09/L6_4B" + }, + { + "label": "PLC09/L6_4C", + "value": "PLC09/L6_4C" + }, + { + "label": "PLC09/L6_4D", + "value": "PLC09/L6_4D" + }, + { + "label": "PLC09/L6_4E", + "value": "PLC09/L6_4E" + }, + { + "label": "PLC09/LINE_1", + "value": "PLC09/LINE_1" + }, + { + "label": "PLC09/LINE_2", + "value": "PLC09/LINE_2" + }, + { + "label": "PLC09/LINE_3", + "value": "PLC09/LINE_3" + }, + { + "label": "PLC09/LINE_4", + "value": "PLC09/LINE_4" + }, + { + "label": "PLC09/MP1", + "value": "PLC09/MP1" + }, + { + "label": "PLC09/MP1/ES1", + "value": "PLC09/MP1/ES1" + }, + { + "label": "PLC09/RP1", + "value": "PLC09/RP1" + }, + { + "label": "PLC09/RP1/ES1", + "value": "PLC09/RP1/ES1" + }, + { + "label": "PLC09/RP2", + "value": "PLC09/RP2" + }, + { + "label": "PLC09/RP2/ES1", + "value": "PLC09/RP2/ES1" + }, + { + "label": "PLC09/SAFETY MONITOR", + "value": "PLC09/SAFETY MONITOR" + }, + { + "label": "PLC09/SAFETY MONITOR/RELAY", + "value": "PLC09/SAFETY MONITOR/RELAY" + }, + { + "label": "PLC09/T1", + "value": "PLC09/T1" + }, + { + "label": "PLC09/T1_1", + "value": "PLC09/T1_1" + }, + { + "label": "PLC09/T1_2", + "value": "PLC09/T1_2" + }, + { + "label": "PLC09/T1_3", + "value": "PLC09/T1_3" + }, + { + "label": "PLC09/T1_4", + "value": "PLC09/T1_4" + }, + { + "label": "PLC09/T1_5", + "value": "PLC09/T1_5" + }, + { + "label": "PLC09/T1_6", + "value": "PLC09/T1_6" + }, + { + "label": "PLC09/T2", + "value": "PLC09/T2" + }, + { + "label": "PLC09/T2_", + "value": "PLC09/T2_" + }, + { + "label": "PLC09/T2_1", + "value": "PLC09/T2_1" + }, + { + "label": "PLC09/T2_2", + "value": "PLC09/T2_2" + }, + { + "label": "PLC09/T2_3", + "value": "PLC09/T2_3" + }, + { + "label": "PLC09/T2_4", + "value": "PLC09/T2_4" + }, + { + "label": "PLC09/T3", + "value": "PLC09/T3" + }, + { + "label": "PLC09/T3_1", + "value": "PLC09/T3_1" + }, + { + "label": "PLC09/T3_2", + "value": "PLC09/T3_2" + }, + { + "label": "PLC09/T3_3", + "value": "PLC09/T3_3" + }, + { + "label": "PLC09/T3_4", + "value": "PLC09/T3_4" + }, + { + "label": "PLC09/T3_5", + "value": "PLC09/T3_5" + }, + { + "label": "PLC09/T3_6", + "value": "PLC09/T3_6" + }, + { + "label": "PLC09/T4", + "value": "PLC09/T4" + }, + { + "label": "PLC09/T4_1", + "value": "PLC09/T4_1" + }, + { + "label": "PLC09/T4_2", + "value": "PLC09/T4_2" + }, + { + "label": "PLC09/T4_3", + "value": "PLC09/T4_3" + }, + { + "label": "PLC09/T4_4", + "value": "PLC09/T4_4" + }, + { + "label": "PLC09/T4_5", + "value": "PLC09/T4_5" + } + ], + "style": { + "margin": 15 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-source_id-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.props.options \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "SourceId" + }, + "position": { + "basis": "70px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "100px" + }, + "props": { + "style": { + "fontFamily": "Arial", + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "Priority" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tmessaging.message_handler.set_priority_filters(self)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "490px" + }, + "propConfig": { + "props.value": { + "persistent": false + } + }, + "props": { + "multiSelect": true, + "options": [ + { + "label": "Diagnostic", + "value": "1" + }, + { + "label": "Low", + "value": "2" + }, + { + "label": "Medium", + "value": "3" + }, + { + "label": "High", + "value": "4" + } + ], + "style": { + "margin": 15 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "Priority" + }, + "position": { + "basis": "70px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "100px" + }, + "props": { + "style": { + "fontFamily": "Arial", + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "Devices" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tmessaging.message_handler.set_device_filters(self)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "490px" + }, + "propConfig": { + "props.value": { + "persistent": false + } + }, + "props": { + "multiSelect": true, + "options": [ + { + "label": "PLC01", + "value": "PLC01" + }, + { + "label": "PLC02", + "value": "PLC02" + }, + { + "label": "PLC03", + "value": "PLC03" + }, + { + "label": "PLC09", + "value": "PLC09" + } + ], + "style": { + "margin": 15 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-device-filters", + "pageScope": true, + "script": "\tdevices \u003d payload[\"data\"]\n\tself.props.options \u003d devices", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "Devices" + }, + "position": { + "basis": "70px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "100px" + }, + "props": { + "style": { + "fontFamily": "Arial", + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "Type" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tmessaging.message_handler.set_type_filters(self)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "490px" + }, + "propConfig": { + "props.value": { + "persistent": false + } + }, + "props": { + "multiSelect": true, + "options": [ + { + "label": "Emergency Stop", + "value": 1 + } + ], + "style": { + "margin": 15 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "Type" + }, + "position": { + "basis": "70px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "100px" + }, + "props": { + "text": "Duration", + "textStyle": { + "fontFamily": "Arial", + "fontWeight": "bold", + "margin": 15, + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tmessaging.message_handler.set_duration_filters(self)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "NumericEntryField" + }, + "position": { + "basis": "160px" + }, + "props": { + "align": "left", + "containerStyle": { + "margin": 15 + }, + "format": "0,0", + "inputBounds": { + "maximum": 1000000, + "minimum": 0 + }, + "tooltipText": "Duration greater than or equal to in secs.", + "value": null + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.numeric-entry-field" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "100px" + }, + "props": { + "style": { + "marginRight": 80 + }, + "text": "secs", + "textStyle": { + "fontFamily": "Arial", + "fontWeight": "bold", + "textAlign": "left" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Duration" + }, + "position": { + "basis": "70px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "custom": { + "client_id": "5094ea37-bff1-4564-b9ec-cfc45bf5ad4f", + "device_filters": null, + "duration_filter": null, + "duration_filters": null, + "priority_filters": null, + "source_id_filters": null, + "time_from_filter": null, + "time_to_filter": null, + "tokens": [ + 1712754859219 + ], + "type_filters": null + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.custom.tokens \u003d []\n\tfc \u003d self.session.custom.fc\n\tmessaging.message_handler.send_http_response_code(\"Waiting...\")\n\tAPI_ID, STAGE, ACC_ID, FUNC_URL \u003d AWS.secrets_manager.get_secret(fc, \"scada/api/endpoint\")\n\tAWS_REGION \u003d self.session.custom.aws.region\n\tcredentials \u003d AWS.credentials.assume_role(region \u003d AWS_REGION, arn \u003d ACC_ID)\n\tmessaging.message_handler.update_token_array([])\n\tstart_time \u003d self.custom.time_from_filter\n\tif not start_time:\n\t\ttime \u003d self.custom.max_duration\n\t\tstart_time \u003d system.date.toMillis(time)\n\tself.custom.tokens.append(start_time)\n\tmessaging.message_handler.view_message_handler(start_time, \"update-default-start\")\n\tfilters \u003d AWS.build_url_http.get_filters_2(sources \u003d self.custom.source_id_filters, \n\t\t\t\t\t\t\t\t\t\t\tdevices \u003d self.custom.device_filters,\n\t\t\t\t\t\t\t\t\t\t\tpriorities \u003d self.custom.priority_filters, \n\t\t\t\t\t\t\t\t\t\t\ttypes \u003d self.custom.type_filters,\n\t\t\t\t\t\t\t\t\t\t\tstart \u003d start_time,\n\t\t\t\t\t\t\t\t\t\t\t\tend \u003d self.custom.time_to_filter, \n\t\t\t\t\t\t\t\t\t\t\t\tduration \u003d self.custom.duration_filter, \n\t\t\t\t\t\t\t\t\t\t\t\turl_encoding \u003d True)\n\tstatus, data \u003d AWS.build_url_http.build_url(credentials, fc \u003d fc, filters \u003d filters, region \u003d AWS_REGION)\n\tif status \u003d\u003d 200:\n\t\tjson_data \u003d system.util.jsonDecode(data)\n\t\thistorical_data \u003d json_data.get(\"payload\",{}).get(\"messages\")\n\t\tfor i in historical_data:\n\t\t\ttimestamp \u003d i.get(\"value\",{}).get(\"Timestamp\",{}).get(\"value\")\n\t\t\tconvert_timestamp \u003d alarms.alarm_tables.get_timestamp(int(timestamp))\n\t\t\tutc_offset \u003d -self.session.props.device.timezone.utcOffset\n\t\t\tconvert_timestamp \u003d system.date.addHours(convert_timestamp, utc_offset)\n\t\t\tduration_ms \u003d i.get(\"value\",{}).get(\"Duration\",{}).get(\"value\")\n\t\t\tduration_s \u003d float(duration_ms)/1000\n\t\t\ti[\"value\"][\"Timestamp\"][\"value\"] \u003d convert_timestamp\n\t\t\ti[\"value\"][\"Duration\"][\"value\"] \u003d duration_s\n\t #The first set of data received will only have a next token\n\t #To get back to this data we store a value of 0 in the token array\n\t #and store the data in the property inital_value on the table component.\n\t #When paginating backwards we get to a 0 value we load the inital_values \n\t #into the historical table\n\t\tmessaging.message_handler.update_historical_first_request(historical_data)\n\t\tnext_token \u003d json_data.get(\"payload\",{}).get(\"NextToken\")\n\t\tclient_id \u003d json_data.get(\"payload\",{}).get(\"ClientId\")\n\t\tmessaging.message_handler.update_client_id(client_id)\n\t\tmessaging.message_handler.view_message_handler(next_token, \"update-next-token\")\n\t\tmessaging.message_handler.view_message_handler(self.custom.tokens, \"update-tokens-array\")\n\tmessaging.message_handler.send_http_response_code(status)\n\tself.custom.client_id \u003d client_id\n\tself.props.enabled \u003d True" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Apply" + }, + "position": { + "basis": "120px" + }, + "propConfig": { + "custom.device_filters": { + "persistent": true + }, + "custom.max_duration": { + "binding": { + "config": { + "expression": "addDays(now(),-20)" + }, + "type": "expr" + } + }, + "custom.priority_filters": { + "persistent": true + }, + "custom.source_id_filters": { + "persistent": true + }, + "custom.time_from_filter": { + "persistent": true + }, + "custom.time_to_filter": { + "persistent": true + } + }, + "props": { + "image": { + "icon": { + "path": "material/update" + } + }, + "style": { + "margin": 15 + }, + "text": "Apply" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "set-source-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_id_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-device-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-message-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.message_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-priority-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-from-filters", + "pageScope": true, + "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-to-filters", + "pageScope": true, + "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d time", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\taction \u003d payload[\"data\"]\n\tif action \u003d\u003d \"reset\":\n\t\tself.custom.device_filters \u003d None\n\t\tself.custom.priority_filters \u003d None\n\t\tself.custom.source_id_filters \u003d None\n\t\tself.custom.time_from_filter \u003d None\n\t\tself.custom.time_to_filter \u003d None\n\t\tself.custom.type_filters \u003d None\n\t\tself.custom.duration_filter \u003d None\n\t\tself.props.enabled \u003dTrue\n\t\tself.custom.tokens \u003d []\n\t\t", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-type-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-duration-filters", + "pageScope": true, + "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "#\tpayload \u003d {}\n#\tpayload[\"data\"] \u003d \"reset\"\n#\tsystem.perspective.sendMessage(\"reset-historical-filters\", \n#\t\t\t\t\t\t\t\t\tpayload\u003d payload, scope \u003d \"page\")\n\tmessaging.message_handler.reset_historical_filters(\"reset\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear" + }, + "position": { + "basis": "120px" + }, + "props": { + "image": { + "icon": { + "path": "material/delete_forever" + } + }, + "primary": false, + "style": { + "margin": 15 + }, + "text": "Clear" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "122px", + "shrink": 2 + }, + "props": { + "style": { + "fontFamily": "Arial", + "fontWeight": "bold", + "marginLeft": "30px", + "textAlign": "center" + }, + "text": "Diagnostics" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "propConfig": { + "props.color": { + "binding": { + "config": { + "expression": "case({this.props.path},\r\n\"material/check_circle_outline\", \"#2ECC71\",\r\n\"material/error_outline\", \"#4287f5\",\r\n\"#FF0000\")" + }, + "type": "expr" + } + } + }, + "props": { + "path": "material/error_outline" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "http-response-code", + "pageScope": true, + "script": "\t\n\tresponse \u003d payload[\"response\"]\n\tif response \u003d\u003d 200:\n\t\tresponse \u003d \"material/check_circle_outline\"\n\telif response \u003d\u003d \"Waiting...\":\n\t\tresponse \u003d \"material/error_outline\"\n\telif response \u003d\u003d \"\":\n\t\tresponse \u003d \"\"\n\telse:\n\t\tresponse \u003d \"material/cancel\"\n\tself.props.path \u003d response", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\tself.props.path \u003d \"\"", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.icon" + }, + { + "custom": { + "status_code": "Waiting..." + }, + "meta": { + "name": "Response", + "tooltip": {} + }, + "position": { + "basis": "164px" + }, + "propConfig": { + "meta.tooltip.enabled": { + "binding": { + "config": { + "expression": "if(len({this.props.text}) \u003e 0, True, False)" + }, + "type": "expr" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "\"The request returned the following http response code \" + {this.custom.status_code}" + }, + "type": "expr" + } + }, + "props.style.color": { + "binding": { + "config": { + "expression": "case({this.props.text},\r\n\"Success\", \"#2ECC71\",\r\n\"Waiting...\", \"#4287f5\",\r\n\"#FF0000\")" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "borderColor": "#555555", + "borderStyle": "solid", + "borderWidth": "0.5px", + "cursor": "help", + "fontWeight": "bold", + "marginBottom": "10px", + "marginLeft": "10px", + "marginTop": "10px", + "textAlign": "center" + }, + "text": "Waiting..." + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "http-response-code", + "pageScope": true, + "script": "\tresponse \u003d payload[\"response\"]\n\tresponses \u003d {200:\"Success\", \"Waiting...\":\"Waiting...\", \"\":\"\"}\n\tdisplay_value \u003d responses.get(response, \"Fail\")\n\t\n#\tif response \u003d\u003d 200:\n#\t\tresponse \u003d \"Success\"\n#\t\n#\tif response \u003d\u003d \"Waiting...\":\n#\t\tresponse \u003d\u003d \"Waiting...\"\n#\telse:\n#\t\tresponse \u003d \"Fail\"\n\tself.props.text \u003d display_value\n\tself.custom.status_code \u003d response", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\tself.props.text \u003d \"\"\n\tself.custom.status_code \u003d \"\"", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Apply" + }, + "position": { + "basis": "70px", + "shrink": 0 + }, + "props": { + "alignContent": "flex-start" + }, + "type": "ia.container.flex" + } + ], + "custom": { + "ShowFilters": true + }, + "meta": { + "name": "Filters" + }, + "position": { + "basis": "500px", + "grow": 1, + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "this.custom.ShowFilters" + }, + "type": "property" + }, + "persistent": true + } + }, + "props": { + "direction": "column", + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "0 4px 20px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "show-historical-filters", + "pageScope": true, + "script": "\tshow \u003d payload[\"data\"]\n\tself.custom.ShowFilters \u003d show", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "custom": { + "device_filters": null, + "duration_filter": null, + "duration_filters": "value", + "initial_data": [ + { + "value": { + "Device": { + "value": "PLC01" + }, + "Duration": { + "value": 10 + }, + "Message": { + "value": "Test" + }, + "Priority": { + "value": "1" + }, + "SourceId": { + "value": "PLC01/0820_06_16/NR1" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1712731396290 + ], + "$ts": 1711029268000 + } + }, + "Type": { + "value": "0" + } + } + }, + { + "value": { + "Device": { + "value": "PLC01" + }, + "Duration": { + "value": 0.01 + }, + "Message": { + "value": "Test" + }, + "Priority": { + "value": "1" + }, + "SourceId": { + "value": "PLC01/0820_06_16/NR1" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1712731396290 + ], + "$ts": 1711473599010 + } + }, + "Type": { + "value": "0" + } + } + }, + { + "value": { + "Device": { + "value": "PLC01" + }, + "Duration": { + "value": 10 + }, + "Message": { + "value": "Test" + }, + "Priority": { + "value": "1" + }, + "SourceId": { + "value": "PLC01/0820_06_16/NR1" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1712731396290 + ], + "$ts": 1711474160000 + } + }, + "Type": { + "value": "0" + } + } + }, + { + "value": { + "Device": { + "value": "PLC01" + }, + "Duration": { + "value": 10 + }, + "Message": { + "value": "Test" + }, + "Priority": { + "value": "1" + }, + "SourceId": { + "value": "PLC01/0820_06_16/NR1" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1712731396290 + ], + "$ts": 1711474180000 + } + }, + "Type": { + "value": "0" + } + } + }, + { + "value": { + "Device": { + "value": "PLC01" + }, + "Duration": { + "value": 10 + }, + "Message": { + "value": "Test" + }, + "Priority": { + "value": "1" + }, + "SourceId": { + "value": "PLC01/0820_06_16/NR1" + }, + "Timestamp": { + "value": { + "$": [ + "ts", + 192, + 1712731396290 + ], + "$ts": 1711474200000 + } + }, + "Type": { + "value": "0" + } + } + } + ], + "priority_filters": null, + "source_id_filters": null, + "time_from_filter": null, + "time_to_filter": null, + "type_filters": null + }, + "meta": { + "name": "Table" + }, + "position": { + "basis": "1920px", + "grow": 1 + }, + "propConfig": { + "custom.max_duration": { + "binding": { + "config": { + "expression": "addDays(now(),-10)" + }, + "type": "expr" + } + } + }, + "props": { + "box-shadow": "0 4px 20px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)", + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "SourceId", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Message", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Device", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Priority", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY HH:mm:ss", + "editable": false, + "field": "Timestamp", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Duration", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "00:00:00", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "none", + "editable": false, + "field": "Type", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "enabled": true, + "pager": { + "bottom": false + }, + "style": { + "margin": 20 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-first-request", + "pageScope": true, + "script": "\tdata \u003d payload[\"data\"]\n\tinitial_data \u003d payload[\"initial_data\"]\n\tself.props.data \u003d data\n\tself.custom.initial_data \u003d initial_data", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "update-historical-data", + "pageScope": true, + "script": "\thistorical_data \u003d payload[\"data\"]\n\tself.props.data \u003d historical_data", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "load_initial_data", + "pageScope": true, + "script": "\trequest \u003d payload[\"data\"]\n\tsystem.perspective.print(\"initial message received\")\n\tif request \u003d\u003d True:\n\t\tself.props.data \u003d self.custom.initial_data", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\treset \u003d payload[\"data\"]\n\tif reset \u003d\u003d \"reset\":\n\t\tself.props.data \u003d []\n\t\tself.custom.device_filters \u003d None\n\t\tself.custom.priority_filters \u003d None\n\t\tself.custom.source_id_filters \u003d None\n\t\tself.custom.time_from_filter \u003d None\n\t\tself.custom.time_to_filter \u003d None\n\t\tself.custom.type_filters \u003d None\n\t\tself.custom.duration_filter \u003d None\n\t\tself.props.enabled \u003dTrue", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-source-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_id_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-device-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-priority-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-from-filters", + "pageScope": true, + "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-to-filters", + "pageScope": true, + "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d time", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-type-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-duration-filters", + "pageScope": true, + "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "Table" + }, + "position": { + "basis": "980px", + "grow": 1 + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-historical-data", + "pageScope": true, + "script": "\tdata \u003d payload[\"data\"]\n\tself.getChild(\"Table\").props.data \u003d data", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "custom": { + "device_filters": null, + "download_in_progress": true, + "duration_filter": null, + "duration_filters": null, + "enable_timeout": false, + "priority_filters": null, + "source_id_filters": null, + "time_from_filter": null, + "time_to_filter": null, + "type_filters": null + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\twhid \u003d self.session.custom.fc\n\tsession_id \u003d self.session.props.id\n\t\n\tfilters \u003d AWS.build_url_http.get_filters_2(sources \u003d self.custom.source_id_filters, \n\t\t\t\t\t\t\t\t\t\t\t\tdevices \u003d self.custom.device_filters,\n\t\t\t\t\t\t\t\t\t\t\t\tpriorities \u003d self.custom.priority_filters, \n\t\t\t\t\t\t\t\t\t\t\t\ttypes \u003d self.custom.type_filters,\n\t\t\t\t\t\t\t\t\t\t\t\tstart \u003d self.custom.time_from_filter,\n\t\t\t\t\t\t\t\t\t\t\t\tend \u003d self.custom.time_to_filter, \n\t\t\t\t\t\t\t\t\t\t\t\tduration \u003d self.custom.duration_filter)\n\t\n\tCommands.button_commands.send_download_request(whid, filters, session_id)\n\tself.custom.enable_timeout \u003d True\n\tself.custom.download_in_progress \u003d True" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Export" + }, + "position": { + "basis": "120px", + "shrink": 0 + }, + "propConfig": { + "custom.device_filters": { + "persistent": true + }, + "custom.disable": { + "binding": { + "config": { + "expression": "if(isNull({this.custom.start_time}), False, secondsBetween({this.custom.start_time}, {this.custom.time_now}))" + }, + "transforms": [ + { + "code": "\tif value \u003e 60:\n\t\tself.custom.enable_timeout \u003d False\n\t\treturn False\n\telse:\n\t\treturn True", + "type": "script" + } + ], + "type": "expr" + } + }, + "custom.download_complete": { + "binding": { + "config": { + "path": "session.custom.downloads" + }, + "transforms": [ + { + "code": "\tif value \u003d\u003d True:\n\t\tself.custom.download_in_progress \u003d False", + "type": "script" + } + ], + "type": "property" + } + }, + "custom.priority_filters": { + "persistent": true + }, + "custom.source_id_filters": { + "persistent": true + }, + "custom.start_time": { + "binding": { + "config": { + "expression": "{this.custom.enable_timeout}" + }, + "transforms": [ + { + "code": "\tif value \u003d\u003d True:\n\t\treturn self.custom.time_now", + "type": "script" + } + ], + "type": "expr" + } + }, + "custom.time_from_filter": { + "persistent": true + }, + "custom.time_now": { + "binding": { + "config": { + "expression": "now()" + }, + "type": "expr" + } + }, + "custom.time_to_filter": { + "persistent": true + }, + "props.enabled": { + "binding": { + "config": { + "expression": "!{this.custom.enable_timeout} || !{this.custom.download_in_progress} " + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "if(!{this.custom.enable_timeout}, \"Export\",\r\nif({this.custom.download_in_progress}, \"Exporting...\",\r\n\"Export\"))" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/import_export" + } + }, + "primary": false, + "style": { + "margin": 15, + "marginLeft": 20 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "set-source-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_id_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-device-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-message-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.message_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-priority-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-from-filters", + "pageScope": true, + "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-to-filters", + "pageScope": true, + "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d time", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\taction \u003d payload[\"data\"]\n\tif action \u003d\u003d \"reset\":\n\t\tself.custom.device_filters \u003d None\n\t\tself.custom.priority_filters \u003d None\n\t\tself.custom.source_id_filters \u003d None\n\t\tself.custom.time_from_filter \u003d None\n\t\tself.custom.time_to_filter \u003d None\n\t\tself.custom.type_filters \u003d None\n\t\tself.custom.duration_filter \u003d None\n\t\tself.props.enabled \u003dTrue\n\t\t", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-type-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-duration-filters", + "pageScope": true, + "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "580px", + "grow": 1 + }, + "type": "ia.display.label" + }, + { + "custom": { + "client_id": "5094ea37-bff1-4564-b9ec-cfc45bf5ad4f", + "current_page": null, + "device_filters": null, + "duration_filter": null, + "initial_token": null, + "previous_token": "value", + "priority_filters": null, + "source_filters": null, + "source_id_filters": null, + "start_pagination": false, + "time_from_filter": null, + "time_to_filter": null, + "tokens": [], + "type_filters": null + }, + "events": { + "component": { + "onActionPerformed": [ + { + "config": { + "script": "\tmessaging.message_handler.send_http_response_code(\"Waiting...\")\n\tself.props.enabled \u003d False\n\tfc \u003d self.session.custom.fc\n\tclient_id \u003d self.custom.client_id\n\tAPI_ID, STAGE, ACC_ID, FUNC_URL \u003d AWS.secrets_manager.get_secret(fc, \"scada/api/endpoint\")\n\tAWS_REGION \u003d self.session.custom.aws.region\n\tif self.custom.start_pagination:\n\t\tstart_time \u003d self.custom.tokens.pop(-1)\n\t\tstart_time \u003d self.custom.tokens.pop(-1)\n\telse:\n\t\tstart_time \u003d self.custom.tokens.pop(-1)\n\tpayload \u003d {}\n\tpayload[\"data\"] \u003d \"\"\n\tsystem.perspective.sendMessage(\"reset-pagination-start\", payload, scope \u003d \"view\")\n\tcredentials \u003d AWS.credentials.assume_role(region \u003d AWS_REGION, arn \u003d ACC_ID)\n\tfilters \u003d AWS.build_url_http.get_filters_2(sources \u003d self.custom.source_id_filters, \n\t\t\t\t\t\t\t\t\t\t\tdevices \u003d self.custom.device_filters,\n\t\t\t\t\t\t\t\t\t\t\tpriorities \u003d self.custom.priority_filters, \n\t\t\t\t\t\t\t\t\t\t\ttypes \u003d self.custom.type_filters,\n\t\t\t\t\t\t\t\t\t\t\tstart \u003d start_time,\n\t\t\t\t\t\t\t\t\t\t\tend \u003d self.custom.time_to_filter, \n\t\t\t\t\t\t\t\t\t\t\tduration \u003d self.custom.duration_filter,\n\t\t\t\t\t\t\t\t\t\t\turl_encoding \u003d True)\n\tstatus, data \u003d AWS.build_url_http.build_url(credentials, fc \u003d fc, filters \u003d filters,\n\t\t\t\t\t\t\t\t\t\t\t\tregion \u003d AWS_REGION)\n\tsystem.perspective.print(data)\n\tif status \u003d\u003d 200:\n\t\tjson_data \u003d system.util.jsonDecode(data)\n\t\thistorical_data \u003d json_data.get(\"payload\",{}).get(\"messages\")\n\t\tfor i,j in enumerate(historical_data):\n\t\t\tsystem.perspective.print(\"time is \" + str(i))\n\t\t\ttimestamp \u003d j.get(\"value\",{}).get(\"Timestamp\",{}).get(\"value\")\n\t\t\tconvert_timestamp \u003d alarms.alarm_tables.get_timestamp(int(timestamp))\n\t\t\tutc_offset \u003d -self.session.props.device.timezone.utcOffset\n\t\t\tconvert_timestamp \u003d system.date.addHours(convert_timestamp, utc_offset) \n\t\t\tj[\"value\"][\"Timestamp\"][\"value\"] \u003d convert_timestamp\n\t\t\tduration_ms \u003d j.get(\"value\",{}).get(\"Duration\",{}).get(\"value\")\n \t\t\tduration_s \u003d float(duration_ms)/1000\n \t\t\tj[\"value\"][\"Timestamp\"][\"value\"] \u003d convert_timestamp\n \t\t\tj[\"value\"][\"Duration\"][\"value\"] \u003d duration_s \n\t\tmessaging.message_handler.update_historical(historical_data)\n\t\tmessaging.message_handler.view_message_handler(\"\", \"update-pagination-start\")\n\t\ttoken \u003d json_data.get(\"payload\",{}).get(\"nextToken\")\n\tself.custom.start_pagination \u003d False\t\t\n\tmessaging.message_handler.send_http_response_code(status)\n\t" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "script": "\tpayload \u003d {}\n\tpayload[\"data\"] \u003d self.custom.tokens\n\tsystem.perspective.sendMessage(\"update-tokens-array\", payload, scope \u003d \"view\")" + }, + "scope": "G", + "type": "script" + } + ] + } + }, + "meta": { + "name": "Back", + "tooltip": { + "enabled": true, + "text": "Return previous results" + } + }, + "position": { + "basis": "120px", + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "if(len({this.custom.tokens}), True, False)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/arrow_back" + }, + "position": "center" + }, + "primary": false, + "style": { + "margin": 15, + "marginLeft": 0 + }, + "text": "" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-tokens-array", + "pageScope": false, + "script": "\ttokens \u003d payload[\"data\"]\n\tself.custom.tokens \u003d tokens", + "sessionScope": false, + "viewScope": true + }, + { + "messageType": "update-initial-tokens", + "pageScope": true, + "script": "\ttoken \u003d payload[\"data\"]\n\tself.custom.initial_token \u003d token", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\treset \u003d payload[\"data\"]\n\tif reset \u003d\u003d \"reset\":\n\t\tself.props.enabled \u003d True\n \t\tself.custom.device_filters \u003d None\n \t\tself.custom.priority_filters \u003d None\n \t\tself.custom.source_id_filters \u003d None\n \t\tself.custom.time_from_filter \u003d None\n \t\tself.custom.time_to_filter \u003d None\n \t\tself.custom.type_filters \u003d None\n \t\tself.custom.source_filters \u003d None\n \t\tself.custom.duration_filter \u003d None\n \t\tself.custom.initial_token \u003d None\n \t\tself.custom.start_pagination \u003d False\n \t\tself.custom.tokens \u003d []", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-type-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-priority-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-source-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-device-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-to-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-from-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-duration-filters", + "pageScope": true, + "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration\n\t# implement your handler here", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "update-client-id", + "pageScope": true, + "script": "\tclient_id \u003d payload[\"data\"]\n\tself.custom.client_id \u003d client_id\n\t", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "update-previous-timestamp", + "pageScope": false, + "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time", + "sessionScope": false, + "viewScope": true + }, + { + "messageType": "set-pagination-flag", + "pageScope": false, + "script": "\tself.custom.start_pagination \u003d True", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Records Number", + "visible": false + }, + "position": { + "basis": "50px" + }, + "props": { + "text": 0, + "textStyle": { + "fontFamily": "Arial", + "fontWeight": "bold", + "textAlign": "center" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-token-array", + "pageScope": true, + "script": "\tarray \u003d payload[\"data\"]\n\tself.props.text \u003d len(array)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\tself.props.text \u003d 0", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.label" + }, + { + "custom": { + "client_id": "", + "current_page": 0, + "device_filters": null, + "duration_filter": null, + "initial_token": null, + "next_token": "", + "previous_timestamp": "", + "priority_filters": null, + "source_filters": null, + "source_id_filters": null, + "start_pagination": false, + "time_from_filter": 1712754859219, + "time_to_filter": null, + "tokens": [], + "type_filters": null + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tmessaging.message_handler.send_http_response_code(\"Waiting...\")\n\tself.props.enabled \u003d False\n\tfc \u003d self.session.custom.fc\n\tclient_id \u003d self.custom.client_id\n\ttoken \u003d self.custom.next_token\n\tAPI_ID, STAGE, ACC_ID, FUNC_URL \u003d AWS.secrets_manager.get_secret(fc, \"scada/api/endpoint\")\n\tAWS_REGION \u003d self.session.custom.aws.region\n\ttime \u003d self.custom.max_duration\n\tstart_time \u003d self.custom.time_from_filter\n\tcredentials \u003d AWS.credentials.assume_role(region \u003d AWS_REGION, arn \u003d ACC_ID)\n\tfilters \u003d AWS.build_url_http.get_filters_2(sources \u003d self.custom.source_id_filters, \n\t\t\t\t\t\t\t\t\t\t\tdevices \u003d self.custom.device_filters,\n\t\t\t\t\t\t\t\t\t\t\tpriorities \u003d self.custom.priority_filters, \n\t\t\t\t\t\t\t\t\t\t\ttypes \u003d self.custom.type_filters,\n\t\t\t\t\t\t\t\t\t\t\tstart \u003d start_time,\n\t\t\t\t\t\t\t\t\t\t\tend \u003d self.custom.time_to_filter, \n\t\t\t\t\t\t\t\t\t\t\tduration \u003d self.custom.duration_filter,\n\t\t\t\t\t\t\t\t\t\t\turl_encoding \u003d True)\n\tstatus, data \u003d AWS.build_url_http.build_url(credentials, fc \u003d fc, next_token \u003d token, \n\t\t\t\t\t\t\t\t\t\t\t\tfilters \u003d filters, client_id \u003d client_id, region \u003d AWS_REGION)\n\tif status \u003d\u003d 200:\n\t\tjson_data \u003d system.util.jsonDecode(data)\n\t\thistorical_data \u003d json_data.get(\"payload\",{}).get(\"messages\")\n\t\tfor i,j in enumerate(historical_data):\n\t\t\tif i \u003d\u003d 0:\n\t\t\t\tself.custom.tokens.append(j.get(\"value\",{}).get(\"Timestamp\",{}).get(\"value\"))\n\t\t\tsystem.perspective.print(\"time is \" + str(i))\n\t\t\ttimestamp \u003d j.get(\"value\",{}).get(\"Timestamp\",{}).get(\"value\")\n\t\t\tconvert_timestamp \u003d alarms.alarm_tables.get_timestamp(int(timestamp))\n\t\t\tutc_offset \u003d -self.session.props.device.timezone.utcOffset\n\t\t\tconvert_timestamp \u003d system.date.addHours(convert_timestamp, utc_offset) \n\t\t\tj[\"value\"][\"Timestamp\"][\"value\"] \u003d convert_timestamp\n\t\t\tduration_ms \u003d j.get(\"value\",{}).get(\"Duration\",{}).get(\"value\")\n\t\t\tduration_s \u003d float(duration_ms)/1000\n\t\t\tj[\"value\"][\"Timestamp\"][\"value\"] \u003d convert_timestamp\n\t\t\tj[\"value\"][\"Duration\"][\"value\"] \u003d duration_s\n\t\tmessaging.message_handler.update_historical(historical_data)\n\t\ttoken \u003d json_data.get(\"payload\",{}).get(\"nextToken\")\t\n\t\tnext_token \u003d json_data.get(\"payload\",{}).get(\"NextToken\")\n\t\tself.custom.next_token \u003d next_token\n\t\tclient_id \u003d json_data.get(\"payload\",{}).get(\"ClientId\")\n\t\tself.custom.client_id \u003d client_id\n\tmessaging.message_handler.send_http_response_code(status)\n\tmessaging.message_handler.view_message_handler(self.custom.tokens, \"update-tokens-array\")\n\tif len(self.custom.tokens)\u003e1:\n\t\tmessaging.message_handler.view_message_handler(\"\", \"set-pagination-flag\")\n\tif self.custom.next_token:\n\t\tself.props.enabled \u003d True" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Forward", + "tooltip": { + "enabled": true, + "text": "Return next results" + } + }, + "position": { + "basis": "120px", + "shrink": 0 + }, + "propConfig": { + "custom.max_duration": { + "binding": { + "config": { + "expression": "addDays(now(),-10)" + }, + "type": "expr" + } + }, + "custom.previous_timestamp": { + "onChange": { + "enabled": null, + "script": "\tpayload \u003d {}\n\tpayload[\"data\"] \u003d self.custom.previous_timestamp\n\tsystem.perspective.sendMessage(\"update-previous-timestamp\", payload, scope \u003d \"view\")" + } + }, + "position.display": { + "persistent": true + }, + "props.enabled": { + "binding": { + "config": { + "expression": "if({this.custom.next_token}\u003dnull, False, True)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/arrow_forward" + }, + "position": "center" + }, + "primary": false, + "style": { + "margin": 15 + }, + "text": "" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-tokens-array", + "pageScope": false, + "script": "\ttokens \u003d payload[\"data\"]\n\tself.custom.tokens \u003d tokens", + "sessionScope": false, + "viewScope": true + }, + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\treset \u003d payload[\"data\"]\n\tif reset \u003d\u003d \"reset\":\n\t\tself.props.enabled \u003d True\n\t\tself.custom.device_filters \u003d None\n\t\tself.custom.priority_filters \u003d None\n\t\tself.custom.source_id_filters \u003d None\n\t\tself.custom.time_from_filter \u003d None\n\t\tself.custom.time_to_filter \u003d None\n\t\tself.custom.type_filters \u003d None\n\t\tself.custom.source_filters \u003d None\n\t\tself.custom.duration_filter \u003d None\n\t\tself.custom.initial_token \u003d None\n\t\tself.custom.next_token \u003d \"\"\n\t\tself.custom.start_pagination \u003d False\n\t\tself.custom.tokens \u003d []", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-source-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_id_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-device-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-priority-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-from-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-to-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-type-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-duration-filters", + "pageScope": true, + "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "update-client-id", + "pageScope": true, + "script": "\tclient_id \u003d payload[\"data\"]\n\tself.custom.client_id \u003d client_id\n\t", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "update-next-token", + "pageScope": false, + "script": "\tnext_token \u003d payload[\"data\"]\n\tself.custom.next_token \u003d next_token", + "sessionScope": false, + "viewScope": true + }, + { + "messageType": "set-pagination-start", + "pageScope": false, + "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time\n\tself.custom.next_token \u003d \"\"", + "sessionScope": false, + "viewScope": true + }, + { + "messageType": "update-default-start", + "pageScope": false, + "script": "\tdata\u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d data", + "sessionScope": false, + "viewScope": true + }, + { + "messageType": "update-pagination-start", + "pageScope": false, + "script": "\tself.custom.time_from_filter \u003d self.custom.tokens[-1]\n\tself.custom.client_id \u003d \"\"\n\tself.custom.next_token \u003d \"\"\n\t", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "914px" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Paginate" + }, + "position": { + "basis": "70px", + "shrink": 0 + }, + "props": { + "justify": "space-evenly" + }, + "type": "ia.container.flex" + } + ], + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tfc \u003d self.session.custom.fc\n\tsource_ids \u003d tags.tag_utilities.get_tag_paths(fc)\n\tmessaging.message_handler.update_source_id_filters(source_ids)\n\t#Set the device filter options on startup.\n\tdevices \u003d tags.tag_utilities.get_devices(fc)\n\tdevice_drop_down \u003d []\n\tfor i in devices:\n\t\toptions \u003d {\"label\":i, \"value\":i}\n\t\tdevice_drop_down.append(options)\n\tmessaging.message_handler.update_device_filters(device_drop_down)\n\tmessaging.message_handler.update_historical([])\n#\tmessaging.message_handler.show_historical_filters(False)\n\tmessaging.message_handler.reset_historical_filters(\"reset\")\n\tmessaging.message_handler.update_token_array([])\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "classes": "Background-Styles/Grey-Background" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Historical_tab" + }, + "position": { + "tabIndex": 2 + }, + "props": { + "direction": "column", + "justify": "space-evenly" + }, + "type": "ia.container.flex" + } + ], + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tself.props.currentTabIndex \u003d 0" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "TabContainer" + }, + "position": { + "basis": "300px", + "grow": 1 + }, + "propConfig": { + "props.currentTabIndex": { + "onChange": { + "enabled": null, + "script": "\tif self.props.currentTabIndex !\u003d 0:\n\t\tpayload \u003d {}\n\t\tfilter_on \u003d \"false\"\n\t\tpayload[\"reset\"] \u003d filter_on\n\t\tsystem.perspective.sendMessage(\"reset-filters\", payload \u003dpayload, scope \u003d \"page\")\n\ttry:\n\t\tpageid \u003d self.view.custom.activityLogger.alt_pageid + \u0027/\u0027+ self.props.tabs[previousValue.value]\n\t\tpageid \u003d pageid.replace(\u0027 \u0027,\u0027\u0027)\n\t\tpayload \u003d activityLog.productMetrics.createActivityPayload(self.view, \u0027page\u0027, pageid, pageid)\n\t\tself.view.custom.activityLogger.start_time \u003d system.date.now()\n\t\tif payload:\n\t\t\tsystem.perspective.sendMessage(\u0027activityLogger-TabChanged\u0027, payload \u003d payload, scope \u003d \u0027page\u0027)\n\texcept:\n\t\tpass" + } + } + }, + "props": { + "contentStyle": { + "classes": "Background-Styles/Grey-Background" + }, + "currentTabIndex": 2, + "style": { + "classes": "Background-Styles/Grey-Background" + }, + "tabSize": { + "width": 140 + }, + "tabStyle": { + "active": { + "backgroundColor": "#EEEEEE", + "borderLeftColor": "#7FFF00", + "borderLeftStyle": "solid", + "borderLeftWidth": 5, + "borderTopLeftRadius": 5, + "borderTopRightRadius": 5, + "color": "#000000", + "fontFamily": "Arial", + "fontWeight": "bold", + "outlineStyle": "none", + "textDecoration": "underline" + }, + "inactive": { + "backgroundColor": "#D7D7D7", + "borderLeftColor": "#FFFFFF", + "borderTopLeftRadius": 5, + "borderTopRightRadius": 5, + "color": "#969696", + "fontFamily": "Arial" + } + }, + "tabs": [ + "Active Alarms", + "Shelved Alarms", + "Historical" + ] + }, + "type": "ia.container.tab" + } + ], + "events": { + "system": { + "onStartup": { + "config": { + "script": "\twhid \u003d self.session.custom.fc\n\tsession_id \u003d self.session.props.id\n\tpage_id \u003d self.view.params.page_name\n\tCommands.analytics.send_page_details(whid, session_id, page_id)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root" + }, + "props": { + "style": { + "classes": "Background-Styles/Main-Background" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "activityLogger-TabChanged", + "pageScope": true, + "script": "\t# implement your handler here\n\tif payload:\n\t\tactivityLog.productMetrics.callActivityLoggerAPI(payload)", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Alerts/alert/resource.json b/com.inductiveautomation.perspective/views/Alerts/alert/resource.json new file mode 100644 index 0000000..c02cd81 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Alerts/alert/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "dmamani", + "timestamp": "2024-01-23T18:10:35Z" + }, + "lastModificationSignature": "b40750822d1409c52fd263b06622cd52591e64b6b25aa2ef582b4d2e51a505c6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Alerts/alert/thumbnail.png b/com.inductiveautomation.perspective/views/Alerts/alert/thumbnail.png new file mode 100644 index 0000000..8fb4e8c Binary files /dev/null and b/com.inductiveautomation.perspective/views/Alerts/alert/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Alerts/alert/view.json b/com.inductiveautomation.perspective/views/Alerts/alert/view.json new file mode 100644 index 0000000..0845b6f --- /dev/null +++ b/com.inductiveautomation.perspective/views/Alerts/alert/view.json @@ -0,0 +1,749 @@ +{ + "custom": {}, + "params": { + "btnActionClose": "closePopup", + "btnActionPrimary": "closePopup", + "btnActionSecondary": "closePopup", + "btnIconAlignment": "right", + "btnIconPrimary": "chevron_right", + "btnIconSecondary": "", + "btnTextPrimary": "Primary", + "btnTextSecondary": "Secondary", + "message": "Alert message goes here.", + "payload": { + "key": "The payload to return to the caller would go here. DLC 2021-09-23" + }, + "showCloseBtn": true, + "state": "info", + "title": "title" + }, + "propConfig": { + "params.btnActionClose": { + "paramDirection": "input", + "persistent": true + }, + "params.btnActionPrimary": { + "paramDirection": "inout", + "persistent": true + }, + "params.btnActionSecondary": { + "paramDirection": "inout", + "persistent": true + }, + "params.btnIconAlignment": { + "paramDirection": "inout" + }, + "params.btnIconPrimary": { + "paramDirection": "inout", + "persistent": true + }, + "params.btnIconSecondary": { + "paramDirection": "inout", + "persistent": true + }, + "params.btnIconSecondary_1": { + "paramDirection": "input", + "persistent": true + }, + "params.btnIconSecondary_2": { + "paramDirection": "input", + "persistent": true + }, + "params.btnIconSecondary_3": { + "paramDirection": "input", + "persistent": true + }, + "params.btnTextPrimary": { + "paramDirection": "inout" + }, + "params.btnTextSecondary": { + "paramDirection": "inout" + }, + "params.buttons.key": { + "paramDirection": "input", + "persistent": true + }, + "params.message": { + "paramDirection": "input", + "persistent": true + }, + "params.payload": { + "paramDirection": "input", + "persistent": true + }, + "params.showCloseBtn": { + "paramDirection": "input", + "persistent": true + }, + "params.state": { + "paramDirection": "input", + "persistent": true + }, + "params.title": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 224, + "width": 384 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "iconMain" + }, + "position": { + "basis": "32px", + "shrink": 0 + }, + "propConfig": { + "props.color": { + "binding": { + "config": { + "expression": "{view.params.state}" + }, + "transforms": [ + { + "fallback": "var(--info)", + "inputType": "scalar", + "mappings": [ + { + "input": "warning", + "output": "#FFFF00" + }, + { + "input": "success", + "output": "#00CC00" + }, + { + "input": "error", + "output": "#FF8000" + }, + { + "input": "info", + "output": "#007EFC" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "expr" + } + }, + "props.path": { + "binding": { + "config": { + "expression": "{view.params.state}" + }, + "transforms": [ + { + "fallback": "material/info", + "inputType": "scalar", + "mappings": [ + { + "input": "warning", + "output": "material/warning" + }, + { + "input": "info", + "output": "material/info" + }, + { + "input": "error", + "output": "material/error" + }, + { + "input": "success", + "output": "material/check_circle" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "Utilities/m-r-16" + } + }, + "type": "ia.display.icon" + }, + { + "children": [ + { + "meta": { + "name": "title" + }, + "position": { + "grow": 1, + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{this.props.text}" + }, + "transforms": [ + { + "fallback": true, + "inputType": "scalar", + "mappings": [ + { + "input": "", + "output": false + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "expr" + } + }, + "props.style.color": { + "binding": { + "config": { + "path": "view.params.state" + }, + "enabled": false, + "transforms": [ + { + "fallback": "var(--info)", + "inputType": "scalar", + "mappings": [ + { + "input": "info", + "output": "var(--info)" + }, + { + "input": "success", + "output": "var(--success)" + }, + { + "input": "error", + "output": "var(--error)" + }, + { + "input": "warning", + "output": "var(--warning)" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.title" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Alerts/alertTitle", + "color": "#FAFAFA" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "message" + }, + "position": { + "grow": 1, + "shrink": 0 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.message" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Alerts/alertMessage" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "content" + }, + "position": { + "grow": 1 + }, + "props": { + "direction": "column", + "style": { + "classes": "Utilities/m-r-16" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tmessageType \u003d self.view.params.btnActionClose\t\n\tsystem.perspective.sendMessage(messageType, scope \u003d \"session\")" + }, + "scope": "G", + "type": "script" + }, + "onTouchStart": { + "config": { + "script": "\tmessageType \u003d self.view.params.btnActionClose\t\t\n\tpayload \u003d self.view.params.payload\t\t## Added 2021-09-23 to return to caller view\n\tsystem.perspective.sendMessage(messageType, payload, scope \u003d \"session\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "iconClose" + }, + "position": { + "basis": "16px", + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.params.showCloseBtn" + }, + "type": "property" + } + } + }, + "props": { + "color": "#FAFAFA", + "path": "material/close", + "style": { + "classes": "Alerts/alertClose" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "closePopup", + "pageScope": false, + "script": "\t# closes the last focused popup\n\tsystem.perspective.closePopup(\u0027alertDialog\u0027)", + "sessionScope": true, + "viewScope": false + } + ] + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "body" + }, + "position": { + "basis": "150px", + "grow": 1, + "shrink": 0 + }, + "props": { + "alignItems": "flex-start", + "style": { + "classes": "Utilities/p-16" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tmessageType \u003d self.view.params.btnActionSecondary\t\t\n\tpayload \u003d self.view.params.payload\t\t## Added 2021-09-23 to return to caller view\n\tsystem.perspective.sendMessage(messageType, payload, scope \u003d \"session\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "actionSecondary" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": true, + "inputType": "scalar", + "mappings": [ + { + "input": "", + "output": false + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.image.icon.path": { + "binding": { + "config": { + "expression": "\"material/\" + {view.params.btnIconSecondary}" + }, + "transforms": [ + { + "code": "\tif str(value) \u003d\u003d \"material/\":\n\t\treturn \"\"\n\telse:\n\t\treturn value", + "type": "script" + } + ], + "type": "expr" + } + }, + "props.image.position": { + "binding": { + "config": { + "path": "view.params.btnIconAlignment" + }, + "type": "property" + } + }, + "props.image.style.fill": { + "binding": { + "config": { + "path": "view.params.state" + }, + "transforms": [ + { + "fallback": "#222222", + "inputType": "scalar", + "mappings": [ + { + "input": "info", + "output": "#17599C" + }, + { + "input": "success", + "output": "#117539" + }, + { + "input": "warning", + "output": "#C26700" + }, + { + "input": "error", + "output": "#A62D19" + } + ], + "outputType": "color", + "type": "map" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.params.state" + }, + "enabled": false, + "transforms": [ + { + "fallback": "Alerts/alertBtn2 Utilities/m-r-8 Utilities/p-rl-8", + "inputType": "scalar", + "mappings": [ + { + "input": "error", + "output": "Alerts/states/errorBtn2 Utilities/m-r-8 Utilities/p-rl-8" + }, + { + "input": "warning", + "output": "Alerts/states/warningBtn2 Utilities/m-r-8 Utilities/p-rl-8" + }, + { + "input": "info", + "output": "Alerts/states/infoBtn2 Utilities/m-r-8 Utilities/p-rl-8" + }, + { + "input": "success", + "output": "Alerts/states/successBtn2 Utilities/m-r-8 Utilities/p-rl-8" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "{view.params.btnTextSecondary}" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "height": 20, + "icon": {}, + "width": 20 + }, + "primary": false, + "style": { + "classes": "Alerts/alertButtonSecondary" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "closePopup", + "pageScope": false, + "script": "\t# closes the last focused popup\n\tsystem.perspective.closePopup(\u0027alertDialog\u0027)", + "sessionScope": true, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tmessageType \u003d self.view.params.btnActionPrimary\t\n\tpayload \u003d self.view.params.payload\t\t## Added 2021-09-23 to return to caller view\n\tsystem.perspective.sendMessage(messageType, payload, scope \u003d \"session\")\n#\tsystem.perspective.print(\u0027sent message \"%s\" to session from primary button\u0027 % messageType)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "actionPrimary" + }, + "position": { + "basis": "102px", + "shrink": 0 + }, + "propConfig": { + "props.image.icon.path": { + "binding": { + "config": { + "expression": "\"material/\" + {view.params.btnIconPrimary}" + }, + "transforms": [ + { + "code": "\tif str(value) \u003d\u003d \"material/\":\n\t\treturn \"\"\n\telse:\n\t\treturn value", + "type": "script" + } + ], + "type": "expr" + } + }, + "props.image.position": { + "binding": { + "config": { + "path": "view.params.btnIconAlignment" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.params.state" + }, + "enabled": false, + "transforms": [ + { + "fallback": "Alerts/alertBtn1 Utilities/p-rl-8", + "inputType": "scalar", + "mappings": [ + { + "input": "error", + "output": "Alerts/states/errorBtn1 Utilities/p-rl-8" + }, + { + "input": "warning", + "output": "Alerts/states/warningBtn1 Utilities/p-rl-8" + }, + { + "input": "info", + "output": "Alerts/states/infoBtn1 Utilities/p-rl-8" + }, + { + "input": "success", + "output": "Alerts/states/successBtn1 Utilities/p-rl-8" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.btnTextPrimary" + }, + "type": "property" + } + } + }, + "props": { + "image": { + "height": 20, + "icon": {}, + "width": 20 + }, + "style": { + "classes": "Alerts/alertButton" + }, + "textStyle": { + "textAlign": "center" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "closePopup", + "pageScope": false, + "script": "\t# closes the last focused popup\n\tsystem.perspective.closePopup(\u0027alertDialog\u0027)", + "sessionScope": true, + "viewScope": false + }, + { + "messageType": "logout", + "pageScope": false, + "script": "\tsystem.perspective.logout()", + "sessionScope": true, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "footer" + }, + "position": { + "basis": "56px", + "shrink": 0 + }, + "props": { + "justify": "flex-end", + "style": { + "backgroundColor": "var(--neutral-30)", + "borderTop": "1px solid var(--neutral-50)", + "classes": "Utilities/p-8" + } + }, + "type": "ia.container.flex" + } + ], + "events": { + "dom": { + "onFocus": { + "config": { + "script": "\tmessageType \u003d \u0027alertFocus\u0027\n\tsystem.perspective.sendMessage(messageType)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "dialog" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "{view.params.state}" + }, + "transforms": [ + { + "fallback": "Alerts/alertDefault", + "inputType": "scalar", + "mappings": [ + { + "input": "info", + "output": "Alerts/states/info" + }, + { + "input": "warning", + "output": "Alerts/states/warning" + }, + { + "input": "error", + "output": "Alerts/states/error" + }, + { + "input": "success", + "output": "Alerts/states/success" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "direction": "column", + "style": { + "maxHeight": "none" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Alerts/info-examples/resource.json b/com.inductiveautomation.perspective/views/Alerts/info-examples/resource.json new file mode 100644 index 0000000..04243f6 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Alerts/info-examples/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "4d9743f9356381c628de9fc18ba2d9abaa35aad23d528530de567d1c06483475" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Alerts/info-examples/thumbnail.png b/com.inductiveautomation.perspective/views/Alerts/info-examples/thumbnail.png new file mode 100644 index 0000000..51622d7 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Alerts/info-examples/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Alerts/info-examples/view.json b/com.inductiveautomation.perspective/views/Alerts/info-examples/view.json new file mode 100644 index 0000000..b21b1a1 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Alerts/info-examples/view.json @@ -0,0 +1,479 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "width": 600 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label_4" + }, + "position": { + "basis": "48px" + }, + "props": { + "style": { + "fontSize": "24px", + "textAlign": "center" + }, + "text": "Swap Theme" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "40px", + "shrink": 0 + }, + "propConfig": { + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "session.props.theme" + }, + "type": "property" + } + } + }, + "props": { + "options": [ + { + "label": "Light", + "value": "light" + }, + { + "label": "Light (cool tint)", + "value": "light-cool" + }, + { + "label": "Light (warm tint)", + "value": "light-warm" + }, + { + "label": "Dark", + "value": "dark" + }, + { + "label": "Dark (cool tint)", + "value": "dark-cool" + }, + { + "label": "Dark (warm tint)", + "value": "dark-warm" + } + ], + "placeholder": { + "text": "" + }, + "search": { + "enabled": false + }, + "style": { + "classes": "Utilities/m-b-16" + } + }, + "type": "ia.input.dropdown" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "40px" + }, + "props": { + "alignVertical": "bottom", + "style": { + "fontSize": "24px", + "textAlign": "center" + }, + "text": "Example Scripts" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# ~~ 12 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\n\tAlerts.showAlert(\"warning\", \"This is a Warning!\", \"You have been warned.\", \"false\", \"Accept\", \"Cancel\", \"\", \"\", \"\", \"closePopup\", \"closePopup\", \"closePopup\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "warning script" + }, + "position": { + "basis": "80px", + "grow": 1 + }, + "props": { + "style": { + "classes": "Alerts/states/warningBtn1 Utilities/m-r-8 Utilities/p-8" + }, + "text": "Warning" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# ~~ 12 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\n\tAlerts.showAlert(\"success\", \"You\u0027re So Successful\", \"Fantastic work. Really, just a job well done.\", \"true\", \"I know\", \"No\", \"tag_faces\", \"close\", \"\", \"closePopup\", \"closePopup\", \"closePopup\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "success script" + }, + "position": { + "basis": "80px", + "grow": 1 + }, + "props": { + "style": { + "classes": "Alerts/states/successBtn1 Utilities/m-r-8 Utilities/p-8" + }, + "text": "Success" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# ~~ 12 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\n\tAlerts.showAlert(\"error\", \"I\u0027m Sorry, Dave.\", \"I\u0027m afraid I can\u0027t do that. I think you know what the problem is just as well as I do.\", \"true\", \"Disconnect Hal\", \"\", \"disc_full\", \"\", \"\", \"closePopup\", \"closePopup\", \"closePopup\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "error script" + }, + "position": { + "basis": "80px", + "grow": 1 + }, + "props": { + "style": { + "classes": "Alerts/states/errorBtn1 Utilities/m-r-8 Utilities/p-8" + }, + "text": "Error" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# ~~ 12 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\n\tAlerts.showAlert(\"info\", \"Info Title\", \"Alert message goes here.\", \"true\", \"Continue\", \"Cancel\", \"\", \"\", \"\", \"closePopup\", \"closePopup\", \"closePopup\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "info script" + }, + "position": { + "basis": "80px", + "grow": 1 + }, + "props": { + "style": { + "classes": "Alerts/states/infoBtn1 Utilities/m-r-8 Utilities/p-8" + }, + "text": "Info" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "scripts" + }, + "position": { + "basis": "56px" + }, + "props": { + "alignItems": "center", + "style": { + "classes": "Utilities/m-b-16" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "48px" + }, + "props": { + "alignVertical": "bottom", + "style": { + "fontSize": "24px", + "textAlign": "center" + }, + "text": "Example Actions" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "draggable": false, + "id": "alertWarning", + "modal": true, + "overlayDismiss": true, + "resizable": false, + "showCloseIcon": false, + "type": "open", + "viewParams": { + "btnActionClose": "closePopup", + "btnActionPrimary": "closePopup", + "btnActionSecondary": "closePopup", + "btnIconPrimary": "", + "btnTextPrimary": "Accept", + "btnTextSecondary": "Cancel", + "message": "You have been warned.", + "showCloseBtn": "false", + "state": "warning", + "title": "This is a Warning!" + }, + "viewPath": "Alerts/alert" + }, + "scope": "C", + "type": "popup" + } + } + }, + "meta": { + "name": "warning action" + }, + "position": { + "basis": "80px", + "grow": 1 + }, + "props": { + "style": { + "classes": "Alerts/states/warningBtn1 Utilities/m-r-8 Utilities/p-8" + }, + "text": "Warning" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "draggable": false, + "id": "alertSuccess", + "modal": true, + "overlayDismiss": true, + "resizable": false, + "showCloseIcon": false, + "type": "open", + "viewParams": { + "btnActionClose": "closePopup", + "btnActionPrimary": "closePopup", + "btnActionSecondary": "closePopup", + "btnIconPrimary": "tag_faces", + "btnIconSecondary": "close", + "btnTextPrimary": "I Know", + "btnTextSecondary": "No", + "message": "Fantastic work. Really, just a job well done.", + "state": "success", + "title": "You\u0027re So Successful" + }, + "viewPath": "Alerts/alert" + }, + "scope": "C", + "type": "popup" + } + } + }, + "meta": { + "name": "success action" + }, + "position": { + "basis": "80px", + "grow": 1, + "shrink": 0 + }, + "props": { + "style": { + "classes": "Alerts/states/successBtn1 Utilities/m-r-8 Utilities/p-8" + }, + "text": "Success" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "draggable": false, + "id": "alertError", + "modal": true, + "overlayDismiss": true, + "resizable": false, + "showCloseIcon": false, + "type": "open", + "viewParams": { + "btnActionClose": "closePopup", + "btnActionPrimary": "closePopup", + "btnActionSecondary": "closePopup", + "btnIconPrimary": "disc_full", + "btnTextPrimary": "Disconnect Hal", + "btnTextSecondary": "", + "message": "I\u0027m afraid I can\u0027t do that. I think you know what the problem is just as well as I do. ", + "state": "error", + "title": "I\u0027m Sorry, Dave." + }, + "viewPath": "Alerts/alert" + }, + "scope": "C", + "type": "popup" + } + } + }, + "meta": { + "name": "error action" + }, + "position": { + "basis": "80px", + "grow": 1 + }, + "props": { + "style": { + "classes": "Alerts/states/errorBtn1 Utilities/m-r-8 Utilities/p-8" + }, + "text": "Error" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "draggable": false, + "id": "alertInfo", + "modal": true, + "overlayDismiss": true, + "resizable": false, + "showCloseIcon": false, + "type": "open", + "viewParams": { + "btnActionClose": "closePopup", + "btnActionPrimary": "closePopup", + "btnActionSecondary": "closePopup", + "btnIconPrimary": "", + "btnTextPrimary": "Continue", + "btnTextSecondary": "Cancel", + "state": "info", + "title": "Info Title" + }, + "viewPath": "Alerts/alert" + }, + "scope": "C", + "type": "popup" + } + } + }, + "meta": { + "name": "info action" + }, + "position": { + "basis": "80px", + "grow": 1 + }, + "props": { + "style": { + "classes": "Alerts/states/infoBtn1 Utilities/m-r-8 Utilities/p-8" + }, + "text": "Info" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "actions" + }, + "position": { + "basis": "56px" + }, + "props": { + "alignItems": "center", + "style": { + "classes": "Utilities/m-b-16" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "info" + }, + "position": { + "basis": "400px", + "grow": 1 + }, + "props": { + "source": "Thank you for downloading this Ignition resource!\n\n## How to Use\nAlert popups may be called via a script or event action. The specified parameters drive their appearance and features.\n\n### Button Actions\nThe action performed when interacting with an alert button is determined by [component message handlers](https://docs.inductiveautomation.com/display/DOC80/Component+Message+Handlers). In this way, they are dynamic and extensible based on the parameters driving the alert. Add a message handler to the corresponding button to enable a new action onActionPerformed.", + "style": { + "backgroundColor": "var(--neutral-30)", + "borderRadius": "4px", + "fontSize": "0.875rem", + "marginTop": "1rem", + "padding": "1rem", + "textAlign": "center" + } + }, + "type": "ia.display.markdown" + } + ], + "meta": { + "name": "root" + }, + "props": { + "alignContent": "flex-start", + "direction": "column", + "style": { + "margin": "0 auto", + "maxWidth": "600px", + "padding": "1rem" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Custom-Views/Detail/resource.json b/com.inductiveautomation.perspective/views/Custom-Views/Detail/resource.json new file mode 100644 index 0000000..d33c03a --- /dev/null +++ b/com.inductiveautomation.perspective/views/Custom-Views/Detail/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-04-12T20:45:31Z" + }, + "lastModificationSignature": "f219b6078885aed988e1fcda0248cef1fd9891ff71ad6721e8bb089d2a8e8b2e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Custom-Views/Detail/thumbnail.png b/com.inductiveautomation.perspective/views/Custom-Views/Detail/thumbnail.png new file mode 100644 index 0000000..8f4561b Binary files /dev/null and b/com.inductiveautomation.perspective/views/Custom-Views/Detail/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Custom-Views/Detail/view.json b/com.inductiveautomation.perspective/views/Custom-Views/Detail/view.json new file mode 100644 index 0000000..b298469 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Custom-Views/Detail/view.json @@ -0,0 +1,59 @@ +{ + "custom": { + "show_alarms": false + }, + "params": { + "customView": "", + "plcTagPath": "" + }, + "propConfig": { + "custom.show_alarms": { + "persistent": true + }, + "params.customView": { + "paramDirection": "input", + "persistent": true + }, + "params.plcTagPath": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "basis": "320px", + "grow": 1 + }, + "propConfig": { + "props.path": { + "binding": { + "config": { + "expression": "\"Custom-Views/\"+ {view.params.customView}" + }, + "type": "expr" + } + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Detailed-Views/Detail/resource.json b/com.inductiveautomation.perspective/views/Detailed-Views/Detail/resource.json new file mode 100644 index 0000000..319896a --- /dev/null +++ b/com.inductiveautomation.perspective/views/Detailed-Views/Detail/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "ankikarw", + "timestamp": "2024-04-01T21:08:14Z" + }, + "lastModificationSignature": "6d2ef24a45bd74ca3698bce47743ea4adbdd426ba4f3698b0f1d16830549e601" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Detailed-Views/Detail/thumbnail.png b/com.inductiveautomation.perspective/views/Detailed-Views/Detail/thumbnail.png new file mode 100644 index 0000000..2e434b8 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Detailed-Views/Detail/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Detailed-Views/Detail/view.json b/com.inductiveautomation.perspective/views/Detailed-Views/Detail/view.json new file mode 100644 index 0000000..c87b827 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Detailed-Views/Detail/view.json @@ -0,0 +1,175 @@ +{ + "custom": { + "activityLogger": { + "start_time": { + "$": [ + "ts", + 192, + 1709760479262 + ], + "$ts": 1709760479262 + } + }, + "show_alarms": false + }, + "events": { + "system": { + "onShutdown": { + "config": { + "script": "\tactivityLog.logger.callLogger(self, \u0027page\u0027)\n\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)" + }, + "scope": "G", + "type": "script" + }, + "onStartup": { + "config": { + "script": "\tself.custom.activityLogger.start_time \u003d system.date.now()" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "detailedView": "", + "plcTagPath": "" + }, + "propConfig": { + "custom.activityLogger": { + "persistent": true + }, + "custom.activityLogger.alt_pageid": { + "binding": { + "config": { + "expression": "\"detailed_views/\"+ {view.params.detailedView}" + }, + "type": "expr" + } + }, + "custom.activityLogger.pageid": { + "binding": { + "config": { + "expression": "{page.props.path}" + }, + "transforms": [ + { + "code": "\tif value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n\t\treturn self.custom.activityLogger.alt_pageid.lower()\n\telse:\n\t\treturn value[1:].lower()", + "type": "script" + } + ], + "type": "expr" + } + }, + "custom.show_alarms": { + "persistent": true + }, + "params.detailedView": { + "paramDirection": "input", + "persistent": true + }, + "params.plcTagPath": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "basis": "320px", + "grow": 1 + }, + "propConfig": { + "props.params.PLCTagPath": { + "binding": { + "config": { + "path": "view.params.plcTagPath" + }, + "type": "property" + } + } + }, + "props": { + "path": "Alarm-Views/Docked-Alarm" + }, + "type": "ia.display.view" + } + ], + "custom": { + "key": "value" + }, + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "130px", + "display": false + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "show-south-dock", + "pageScope": true, + "script": "\tshow \u003d payload[\"show_alarms\"]\n\tsystem.perspective.print(show)\n\tself.position.display \u003d show", + "sessionScope": true, + "viewScope": false + } + ] + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "basis": "320px", + "grow": 1 + }, + "propConfig": { + "props.path": { + "binding": { + "config": { + "expression": "\"Detailed-Views/\"+ {view.params.detailedView}" + }, + "type": "expr" + } + } + }, + "type": "ia.display.view" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "id": "Docked-East", + "type": "close" + }, + "scope": "C", + "type": "dock" + } + } + }, + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Detailed-Views/Template/resource.json b/com.inductiveautomation.perspective/views/Detailed-Views/Template/resource.json new file mode 100644 index 0000000..f0e3d89 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Detailed-Views/Template/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-06-19T10:11:13Z" + }, + "lastModificationSignature": "2311d4f429bbe332389e1b994be7dbe7bd3f91117ef18c015d9803846f19cb4c" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Detailed-Views/Template/thumbnail.png b/com.inductiveautomation.perspective/views/Detailed-Views/Template/thumbnail.png new file mode 100644 index 0000000..41fcd9e Binary files /dev/null and b/com.inductiveautomation.perspective/views/Detailed-Views/Template/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Detailed-Views/Template/view.json b/com.inductiveautomation.perspective/views/Detailed-Views/Template/view.json new file mode 100644 index 0000000..67c6d2b --- /dev/null +++ b/com.inductiveautomation.perspective/views/Detailed-Views/Template/view.json @@ -0,0 +1,59 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "custom": { + "s3URI": "amzl/CGN9/images/CGN9_V2.svg" + }, + "meta": { + "name": "Image" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.source": { + "binding": { + "config": { + "path": "this.custom.s3URI" + }, + "transforms": [ + { + "code": "\treturn AWS.s3.getPresignedURL(self, value)", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "altText": "none", + "fit": { + "mode": "fill" + } + }, + "type": "ia.display.image" + } + ], + "meta": { + "name": "root" + }, + "props": { + "mode": "percent", + "style": { + "backgroundColor": "#EEEEEE" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Detailed-Views/Test/resource.json b/com.inductiveautomation.perspective/views/Detailed-Views/Test/resource.json new file mode 100644 index 0000000..b1192ed --- /dev/null +++ b/com.inductiveautomation.perspective/views/Detailed-Views/Test/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-05-25T09:20:25Z" + }, + "lastModificationSignature": "90c0341820d1344fb0f321d46df98a8770b82d8d250ebefc2bbca81b2de8b4e6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Detailed-Views/Test/thumbnail.png b/com.inductiveautomation.perspective/views/Detailed-Views/Test/thumbnail.png new file mode 100644 index 0000000..9a384ad Binary files /dev/null and b/com.inductiveautomation.perspective/views/Detailed-Views/Test/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Detailed-Views/Test/view.json b/com.inductiveautomation.perspective/views/Detailed-Views/Test/view.json new file mode 100644 index 0000000..05f423e --- /dev/null +++ b/com.inductiveautomation.perspective/views/Detailed-Views/Test/view.json @@ -0,0 +1,87 @@ +{ + "custom": {}, + "params": {}, + "props": {}, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "height": 49, + "width": 171, + "x": 174, + "y": 182 + }, + "props": { + "style": { + "classes": "State-Styles/Background-Fill/State1" + }, + "text": "Label" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "height": 49, + "width": 171, + "x": 174, + "y": 246 + }, + "props": { + "text": "Label" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "height": 49, + "width": 171, + "x": 174, + "y": 328 + }, + "props": { + "text": "Label" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tvalue \u003d 1\n\tsystem.tag.writeBlocking([\"PLC1000/Cmd/inReset\"],[value])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "height": 54, + "width": 174, + "x": 100, + "y": 516 + }, + "props": { + "text": "Reset" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "root" + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Breakpoint Embedded/resource.json b/com.inductiveautomation.perspective/views/Framework/Breakpoint Embedded/resource.json new file mode 100644 index 0000000..42594ca --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Breakpoint Embedded/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-04-26T13:00:48Z" + }, + "lastModificationSignature": "a7d684bf8ecb95bc163d5a9a388339980c6a24aab35b7f070d98fc9139aa556f" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Breakpoint Embedded/thumbnail.png b/com.inductiveautomation.perspective/views/Framework/Breakpoint Embedded/thumbnail.png new file mode 100644 index 0000000..26bb76d Binary files /dev/null and b/com.inductiveautomation.perspective/views/Framework/Breakpoint Embedded/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Framework/Breakpoint Embedded/view.json b/com.inductiveautomation.perspective/views/Framework/Breakpoint Embedded/view.json new file mode 100644 index 0000000..e6ac614 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Breakpoint Embedded/view.json @@ -0,0 +1,113 @@ +{ + "custom": {}, + "params": { + "breakpoint": 500, + "params": {}, + "path": "Header/Header" + }, + "propConfig": { + "params.breakpoint": { + "paramDirection": "input", + "persistent": true + }, + "params.params": { + "paramDirection": "input", + "persistent": true + }, + "params.path": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 58, + "width": 512 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Large" + }, + "position": { + "size": "large" + }, + "propConfig": { + "props.params.params": { + "binding": { + "config": { + "path": "view.params.params" + }, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "view.params.path" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "size": "medium" + }, + "style": { + "backgroundColor": "#2B2B2B" + } + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Small" + }, + "propConfig": { + "props.params.params": { + "binding": { + "config": { + "path": "view.params.params" + }, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "view.params.path" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "size": "small" + }, + "style": { + "backgroundColor": "#2B2B2B" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "propConfig": { + "props.breakpoint": { + "binding": { + "config": { + "path": "view.params.breakpoint" + }, + "type": "property" + } + } + }, + "type": "ia.container.breakpt" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Breakpoint/resource.json b/com.inductiveautomation.perspective/views/Framework/Breakpoint/resource.json new file mode 100644 index 0000000..e268cca --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Breakpoint/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "5dc0b9e3749d4b7f02c56ad52717cb45a4007af3a7cc2d8e019b2021fe284143" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Breakpoint/thumbnail.png b/com.inductiveautomation.perspective/views/Framework/Breakpoint/thumbnail.png new file mode 100644 index 0000000..5defdeb Binary files /dev/null and b/com.inductiveautomation.perspective/views/Framework/Breakpoint/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Framework/Breakpoint/view.json b/com.inductiveautomation.perspective/views/Framework/Breakpoint/view.json new file mode 100644 index 0000000..8f56c7d --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Breakpoint/view.json @@ -0,0 +1,123 @@ +{ + "custom": {}, + "params": { + "breakpointLarge": 768, + "breakpointMedium": 480, + "params": {}, + "path": "Header/Header" + }, + "propConfig": { + "params.breakpointLarge": { + "paramDirection": "input", + "persistent": true + }, + "params.breakpointMedium": { + "paramDirection": "input", + "persistent": true + }, + "params.params": { + "paramDirection": "input", + "persistent": true + }, + "params.path": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 58, + "width": 818 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Large" + }, + "position": { + "size": "large" + }, + "propConfig": { + "props.params.params": { + "binding": { + "config": { + "path": "view.params.params" + }, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "view.params.path" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "size": "large" + } + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Small" + }, + "propConfig": { + "props.params.breakpoint": { + "binding": { + "config": { + "path": "view.params.breakpointMedium" + }, + "type": "property" + } + }, + "props.params.params": { + "binding": { + "config": { + "path": "view.params.params" + }, + "type": "property" + } + }, + "props.params.path": { + "binding": { + "config": { + "path": "view.params.path" + }, + "type": "property" + } + } + }, + "props": { + "path": "Framework/Breakpoint Embedded" + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "propConfig": { + "props.breakpoint": { + "binding": { + "config": { + "path": "view.params.breakpointLarge" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "backgroundColor": "#2B2B2B" + } + }, + "type": "ia.container.breakpt" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card (1)/resource.json b/com.inductiveautomation.perspective/views/Framework/Card/Card (1)/resource.json new file mode 100644 index 0000000..ef8d04b --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Card (1)/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "d45facbf9fb6c583d44343cfac16ffbff37867a47b01b44b2e960776b3f7f64a" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card (1)/thumbnail.png b/com.inductiveautomation.perspective/views/Framework/Card/Card (1)/thumbnail.png new file mode 100644 index 0000000..fc9a0d0 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Framework/Card/Card (1)/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card (1)/view.json b/com.inductiveautomation.perspective/views/Framework/Card/Card (1)/view.json new file mode 100644 index 0000000..7992065 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Card (1)/view.json @@ -0,0 +1,125 @@ +{ + "custom": {}, + "params": { + "params": {}, + "path": "", + "title": "Card Title", + "useDefaultHeight": false, + "useDefaultWidth": false + }, + "propConfig": { + "params.params": { + "paramDirection": "input", + "persistent": true + }, + "params.path": { + "paramDirection": "input", + "persistent": true + }, + "params.title": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultHeight": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultWidth": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 339, + "width": 369 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "20px", + "shrink": 0 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.title" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Title" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "props.params": { + "binding": { + "config": { + "path": "view.params.params" + }, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "view.params.path" + }, + "type": "property" + } + }, + "props.useDefaultViewHeight": { + "binding": { + "config": { + "path": "view.params.useDefaultHeight" + }, + "type": "property" + } + }, + "props.useDefaultViewWidth": { + "binding": { + "config": { + "path": "view.params.useDefaultWidth" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Embedded" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "classes": "Framework/Card/Card" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card/resource.json b/com.inductiveautomation.perspective/views/Framework/Card/Card/resource.json new file mode 100644 index 0000000..df5e51c --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Card/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "9bc94873bc7a0f1d20427d0138dfc52f8c70bb0f45132b36a986365cd358ab57" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card/thumbnail.png b/com.inductiveautomation.perspective/views/Framework/Card/Card/thumbnail.png new file mode 100644 index 0000000..a796c6d Binary files /dev/null and b/com.inductiveautomation.perspective/views/Framework/Card/Card/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card/view.json b/com.inductiveautomation.perspective/views/Framework/Card/Card/view.json new file mode 100644 index 0000000..763521d --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Card/view.json @@ -0,0 +1,151 @@ +{ + "custom": {}, + "params": { + "address": "test", + "params": {}, + "path": "", + "system": {}, + "title": "Card Title", + "useDefaultHeight": false, + "useDefaultWidth": false + }, + "propConfig": { + "params.address": { + "paramDirection": "input", + "persistent": true + }, + "params.params": { + "paramDirection": "input", + "persistent": true + }, + "params.path": { + "paramDirection": "input", + "persistent": true + }, + "params.system": { + "paramDirection": "input", + "persistent": true + }, + "params.title": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultHeight": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultWidth": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 339, + "width": 369 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "20px", + "shrink": 0 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.title" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Title" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "props.params": { + "binding": { + "config": { + "path": "view.params.params" + }, + "type": "property" + } + }, + "props.params.address": { + "binding": { + "config": { + "path": "view.params.address" + }, + "type": "property" + } + }, + "props.params.system": { + "binding": { + "config": { + "path": "view.params.system" + }, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "view.params.path" + }, + "type": "property" + } + }, + "props.useDefaultViewHeight": { + "binding": { + "config": { + "path": "view.params.useDefaultHeight" + }, + "type": "property" + } + }, + "props.useDefaultViewWidth": { + "binding": { + "config": { + "path": "view.params.useDefaultWidth" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Embedded" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "classes": "Framework/Card/Card" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible/resource.json b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible/resource.json new file mode 100644 index 0000000..a17f803 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "30c270c0d10c2be4f1e0f8495619db4b734c1471b7af41fa5e6c279084b1f8e8" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible/thumbnail.png b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible/thumbnail.png new file mode 100644 index 0000000..783e7ff Binary files /dev/null and b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible/view.json b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible/view.json new file mode 100644 index 0000000..1e3209b --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible/view.json @@ -0,0 +1,212 @@ +{ + "custom": { + "expanded": true + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tself.custom.expanded \u003d self.params.open_expanded\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "open_expanded": true, + "params": {}, + "path": "Diagnostics/Embedded/System", + "title": "Card Title", + "useDefaultHeight": false, + "useDefaultWidth": false + }, + "propConfig": { + "custom.expanded": { + "persistent": true + }, + "params.address": { + "paramDirection": "input", + "persistent": true + }, + "params.open_expanded": { + "paramDirection": "input", + "persistent": true + }, + "params.params": { + "paramDirection": "input", + "persistent": true + }, + "params.path": { + "paramDirection": "input", + "persistent": true + }, + "params.system": { + "paramDirection": "input", + "persistent": true + }, + "params.title": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultHeight": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultWidth": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 339, + "width": 369 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.title" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Title" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.custom.expanded \u003d not self.view.custom.expanded" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "propConfig": { + "props.image.icon.path": { + "binding": { + "config": { + "expression": "if({view.custom.expanded}, \u0027material/expand_less\u0027, \u0027material/expand_more\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": {} + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "24px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.custom.expanded" + }, + "type": "property" + } + }, + "props.params": { + "binding": { + "config": { + "path": "view.params.params" + }, + "overlayOptOut": true, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "view.params.path" + }, + "overlayOptOut": true, + "type": "property" + } + }, + "props.useDefaultViewHeight": { + "binding": { + "config": { + "path": "view.params.useDefaultHeight" + }, + "type": "property" + } + }, + "props.useDefaultViewWidth": { + "binding": { + "config": { + "path": "view.params.useDefaultWidth" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Embedded" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "classes": "Framework/Card/Card" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent/resource.json b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent/resource.json new file mode 100644 index 0000000..1890699 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "460ef10dae8197ad78238bf6b0a5daca27d1dc751007c0b29b3e2608650d3338" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent/thumbnail.png b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent/thumbnail.png new file mode 100644 index 0000000..5223a19 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent/view.json b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent/view.json new file mode 100644 index 0000000..dc1e396 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent/view.json @@ -0,0 +1,237 @@ +{ + "custom": { + "box_shadow": "0px 2px 4px rgba(0, 0, 40, 0.15)", + "expanded": true + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tself.custom.expanded \u003d self.params.open_expanded\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "open_expanded": true, + "params": {}, + "path": "Objects/Templates/EAM/Cards/Editable/Work Order Scheduling", + "show_box_shadow_on_expanded": true, + "title": "Card Title", + "useDefaultHeight": false, + "useDefaultWidth": false + }, + "propConfig": { + "custom.box_shadow": { + "binding": { + "config": { + "expression": "if(\r\n\t{view.params.show_box_shadow_on_expanded}\u0026\u0026{view.custom.expanded},\r\n\t\u00270px 2px 4px rgba(0, 0, 40, 0.15)\u0027,\r\n\t\u0027\u0027\r\n)" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.expanded": { + "persistent": true + }, + "params.address": { + "paramDirection": "input", + "persistent": true + }, + "params.open_expanded": { + "paramDirection": "input", + "persistent": true + }, + "params.params": { + "paramDirection": "input", + "persistent": true + }, + "params.path": { + "paramDirection": "input", + "persistent": true + }, + "params.show_box_shadow_on_expanded": { + "paramDirection": "input", + "persistent": true + }, + "params.system": { + "paramDirection": "input", + "persistent": true + }, + "params.title": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultHeight": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultWidth": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 339, + "width": 369 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.title" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Title_transparent" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.custom.expanded \u003d not self.view.custom.expanded" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "propConfig": { + "props.image.icon.path": { + "binding": { + "config": { + "expression": "if({view.custom.expanded}, \u0027material/expand_less\u0027, \u0027material/expand_more\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": {} + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "24px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.custom.expanded" + }, + "type": "property" + } + }, + "props.params": { + "binding": { + "config": { + "path": "view.params.params" + }, + "overlayOptOut": true, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "view.params.path" + }, + "overlayOptOut": true, + "type": "property" + } + }, + "props.useDefaultViewHeight": { + "binding": { + "config": { + "path": "view.params.useDefaultHeight" + }, + "type": "property" + } + }, + "props.useDefaultViewWidth": { + "binding": { + "config": { + "path": "view.params.useDefaultWidth" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Embedded_transparent" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "propConfig": { + "props.style.boxShadow": { + "binding": { + "config": { + "path": "view.custom.box_shadow" + }, + "type": "property" + } + } + }, + "props": { + "direction": "column", + "style": { + "classes": "Framework/Card/Card_transparent" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent_with_Anchor/resource.json b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent_with_Anchor/resource.json new file mode 100644 index 0000000..73ae8d8 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent_with_Anchor/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "884db6d776eeaaa47547a53813b356772880f17d7d336317f8f4ffbce54241a9" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent_with_Anchor/thumbnail.png b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent_with_Anchor/thumbnail.png new file mode 100644 index 0000000..250bfee Binary files /dev/null and b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent_with_Anchor/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent_with_Anchor/view.json b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent_with_Anchor/view.json new file mode 100644 index 0000000..b9b1bb6 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Card_Collapsible_Transparent_with_Anchor/view.json @@ -0,0 +1,431 @@ +{ + "custom": { + "box_shadow": "0px 2px 4px rgba(0, 0, 40, 0.15)", + "expanded": true, + "show_content": true + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tself.custom.expanded \u003d self.params.open_expanded\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "anchor_position": null, + "content_shown": true, + "open_expanded": true, + "params": {}, + "path": "Objects/Templates/S3/Management/file", + "show_box_shadow_on_expanded": true, + "title": "Card Title", + "useDefaultHeight": false, + "useDefaultWidth": false + }, + "propConfig": { + "custom.box_shadow": { + "binding": { + "config": { + "expression": "if(\r\n\t{view.params.show_box_shadow_on_expanded}\u0026\u0026{view.custom.expanded},\r\n\t\u00270px 2px 4px rgba(0, 0, 40, 0.15)\u0027,\r\n\t\u0027\u0027\r\n)" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.expanded": { + "persistent": true + }, + "custom.show_content": { + "persistent": true + }, + "params.address": { + "paramDirection": "input", + "persistent": true + }, + "params.anchor_position": { + "paramDirection": "input", + "persistent": true + }, + "params.content_shown": { + "binding": { + "config": { + "path": "view.custom.show_content" + }, + "type": "property" + }, + "paramDirection": "output", + "persistent": true + }, + "params.open_expanded": { + "paramDirection": "input", + "persistent": true + }, + "params.params": { + "paramDirection": "input", + "persistent": true + }, + "params.path": { + "paramDirection": "input", + "persistent": true + }, + "params.show_box_shadow_on_expanded": { + "paramDirection": "input", + "persistent": true + }, + "params.system": { + "paramDirection": "input", + "persistent": true + }, + "params.title": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultHeight": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultWidth": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 600, + "width": 500 + } + }, + "root": { + "children": [ + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# toggle \u0027show_content\u0027 view custom prop\n\tself.view.custom.show_content \u003d not self.view.custom.show_content" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "props.image.icon.path": { + "binding": { + "config": { + "expression": "if({view.custom.show_content},\"material/chevron_left\",\"material/chevron_right\")" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": {} + }, + "primary": false, + "style": { + "borderStyle": "none", + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer Anchor Left" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{view.params.anchor_position}\u003d\u0027left\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "direction": "column", + "style": { + "classes": "Framework/Card/Title_transparent", + "margin": "0px", + "padding": "0px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.title" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Title_transparent" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.custom.expanded \u003d not self.view.custom.expanded" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "propConfig": { + "props.image.icon.path": { + "binding": { + "config": { + "expression": "if({view.custom.expanded}, \u0027material/expand_less\u0027, \u0027material/expand_more\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": {} + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "24px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.custom.expanded" + }, + "type": "property" + } + }, + "props.params": { + "binding": { + "config": { + "path": "view.params.params" + }, + "overlayOptOut": true, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "view.params.path" + }, + "overlayOptOut": true, + "type": "property" + } + }, + "props.useDefaultViewHeight": { + "binding": { + "config": { + "path": "view.params.useDefaultHeight" + }, + "type": "property" + } + }, + "props.useDefaultViewWidth": { + "binding": { + "config": { + "path": "view.params.useDefaultWidth" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Embedded_transparent" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "100%", + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.custom.show_content" + }, + "type": "property" + } + } + }, + "props": { + "direction": "column", + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# toggle \u0027show_content\u0027 view custom prop\n\tself.view.custom.show_content \u003d not self.view.custom.show_content" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "props.image.icon.path": { + "binding": { + "config": { + "expression": "if({view.custom.show_content},\"material/chevron_right\",\"material/chevron_left\")" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": {} + }, + "primary": false, + "style": { + "borderStyle": "none" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer Anchor Right" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{view.params.anchor_position}\u003d\u0027right\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "direction": "column", + "style": { + "classes": "Framework/Card/Title_transparent", + "margin": "0px", + "padding": "0px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "propConfig": { + "props.justify": { + "binding": { + "config": { + "expression": "if({view.params.anchor_position}\u003d\u0027right\u0027,\u0027flex-end\u0027,\u0027flex-start\u0027)" + }, + "type": "expr" + } + }, + "props.style.boxShadow": { + "binding": { + "config": { + "path": "view.custom.box_shadow" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Card_transparent" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible/resource.json b/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible/resource.json new file mode 100644 index 0000000..9c6ef83 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "cf20cbe1afcfdefd90aab5c86b3aba04ad20c55a679a8a1096eeca4630290c66" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible/thumbnail.png b/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible/thumbnail.png new file mode 100644 index 0000000..1b9f7ec Binary files /dev/null and b/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible/view.json b/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible/view.json new file mode 100644 index 0000000..7fe9f01 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible/view.json @@ -0,0 +1,213 @@ +{ + "custom": { + "expanded": true + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tself.custom.expanded \u003d self.params.open_expanded\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "open_expanded": true, + "params": {}, + "path": "Diagnostics/Embedded/System", + "title": "Card Title", + "useDefaultHeight": false, + "useDefaultWidth": false + }, + "propConfig": { + "custom.expanded": { + "persistent": true + }, + "params.address": { + "paramDirection": "input", + "persistent": true + }, + "params.open_expanded": { + "paramDirection": "input", + "persistent": true + }, + "params.params": { + "paramDirection": "input", + "persistent": true + }, + "params.path": { + "paramDirection": "input", + "persistent": true + }, + "params.system": { + "paramDirection": "input", + "persistent": true + }, + "params.title": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultHeight": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultWidth": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 339, + "width": 369 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.title" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Title" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.custom.expanded \u003d not self.view.custom.expanded" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "propConfig": { + "props.image.icon.path": { + "binding": { + "config": { + "expression": "if({view.custom.expanded}, \u0027material/expand_less\u0027, \u0027material/expand_more\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": {} + }, + "primary": false, + "style": { + "backgroundColor": "transparent", + "borderStyle": "none" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "24px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.custom.expanded" + }, + "type": "property" + } + }, + "props.params": { + "binding": { + "config": { + "path": "view.params.params" + }, + "overlayOptOut": true, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "view.params.path" + }, + "overlayOptOut": true, + "type": "property" + } + }, + "props.useDefaultViewHeight": { + "binding": { + "config": { + "path": "view.params.useDefaultHeight" + }, + "type": "property" + } + }, + "props.useDefaultViewWidth": { + "binding": { + "config": { + "path": "view.params.useDefaultWidth" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Embedded" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "classes": "Framework/Card/Card" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible_Transparent/resource.json b/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible_Transparent/resource.json new file mode 100644 index 0000000..c89b929 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible_Transparent/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "14538234db6bf2888c1967ae388bb55cccb03b9325c7d4d82dd6847daf1a4cc8" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible_Transparent/thumbnail.png b/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible_Transparent/thumbnail.png new file mode 100644 index 0000000..67a2812 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible_Transparent/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible_Transparent/view.json b/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible_Transparent/view.json new file mode 100644 index 0000000..dc1e396 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Card/Nested/Card_Collapsible_Transparent/view.json @@ -0,0 +1,237 @@ +{ + "custom": { + "box_shadow": "0px 2px 4px rgba(0, 0, 40, 0.15)", + "expanded": true + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tself.custom.expanded \u003d self.params.open_expanded\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "open_expanded": true, + "params": {}, + "path": "Objects/Templates/EAM/Cards/Editable/Work Order Scheduling", + "show_box_shadow_on_expanded": true, + "title": "Card Title", + "useDefaultHeight": false, + "useDefaultWidth": false + }, + "propConfig": { + "custom.box_shadow": { + "binding": { + "config": { + "expression": "if(\r\n\t{view.params.show_box_shadow_on_expanded}\u0026\u0026{view.custom.expanded},\r\n\t\u00270px 2px 4px rgba(0, 0, 40, 0.15)\u0027,\r\n\t\u0027\u0027\r\n)" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.expanded": { + "persistent": true + }, + "params.address": { + "paramDirection": "input", + "persistent": true + }, + "params.open_expanded": { + "paramDirection": "input", + "persistent": true + }, + "params.params": { + "paramDirection": "input", + "persistent": true + }, + "params.path": { + "paramDirection": "input", + "persistent": true + }, + "params.show_box_shadow_on_expanded": { + "paramDirection": "input", + "persistent": true + }, + "params.system": { + "paramDirection": "input", + "persistent": true + }, + "params.title": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultHeight": { + "paramDirection": "input", + "persistent": true + }, + "params.useDefaultWidth": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 339, + "width": 369 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.title" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Title_transparent" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.custom.expanded \u003d not self.view.custom.expanded" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "propConfig": { + "props.image.icon.path": { + "binding": { + "config": { + "expression": "if({view.custom.expanded}, \u0027material/expand_less\u0027, \u0027material/expand_more\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": {} + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "24px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.custom.expanded" + }, + "type": "property" + } + }, + "props.params": { + "binding": { + "config": { + "path": "view.params.params" + }, + "overlayOptOut": true, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "view.params.path" + }, + "overlayOptOut": true, + "type": "property" + } + }, + "props.useDefaultViewHeight": { + "binding": { + "config": { + "path": "view.params.useDefaultHeight" + }, + "type": "property" + } + }, + "props.useDefaultViewWidth": { + "binding": { + "config": { + "path": "view.params.useDefaultWidth" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Embedded_transparent" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "propConfig": { + "props.style.boxShadow": { + "binding": { + "config": { + "path": "view.custom.box_shadow" + }, + "type": "property" + } + } + }, + "props": { + "direction": "column", + "style": { + "classes": "Framework/Card/Card_transparent" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Color Picker/Color Picker/resource.json b/com.inductiveautomation.perspective/views/Framework/Color Picker/Color Picker/resource.json new file mode 100644 index 0000000..e0632f4 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Color Picker/Color Picker/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "6d1aa11b15ff146dffc4a2f0f92df3625ea69dfa614ed48031b7f79d1100a9c0" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Color Picker/Color Picker/thumbnail.png b/com.inductiveautomation.perspective/views/Framework/Color Picker/Color Picker/thumbnail.png new file mode 100644 index 0000000..57700fd Binary files /dev/null and b/com.inductiveautomation.perspective/views/Framework/Color Picker/Color Picker/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Framework/Color Picker/Color Picker/view.json b/com.inductiveautomation.perspective/views/Framework/Color Picker/Color Picker/view.json new file mode 100644 index 0000000..5fc79b3 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Color Picker/Color Picker/view.json @@ -0,0 +1,787 @@ +{ + "custom": {}, + "params": { + "color": "#FFFFFF" + }, + "propConfig": { + "params.color": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 380, + "width": 250 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Color Palette" + }, + "position": { + "grow": 1 + }, + "props": { + "alignContent": "flex-start", + "alignItems": "flex-start", + "elementPosition": { + "basis": "20px", + "grow": 0, + "shrink": 0 + }, + "instances": [ + { + "color": "#FFFFFF" + }, + { + "color": "#D5D5D5" + }, + { + "color": "#AAAAAA" + }, + { + "color": "#808080" + }, + { + "color": "#555555" + }, + { + "color": "#2B2B2B" + }, + { + "color": "#000000" + }, + { + "color": "#FFCCCC" + }, + { + "color": "#FF8A8A" + }, + { + "color": "#FF4747" + }, + { + "color": "#FF0000" + }, + { + "color": "#D90000" + }, + { + "color": "#AC0000" + }, + { + "color": "#800000" + }, + { + "color": "#FFE8CC" + }, + { + "color": "#FFCA8A" + }, + { + "color": "#FFAC47" + }, + { + "color": "#FF8C00" + }, + { + "color": "#D97700" + }, + { + "color": "#AC5F00" + }, + { + "color": "#804600" + }, + { + "color": "#FFFFCC" + }, + { + "color": "#FFFF8A" + }, + { + "color": "#FFFF47" + }, + { + "color": "#FFFF00" + }, + { + "color": "#D9D900" + }, + { + "color": "#ACAC00" + }, + { + "color": "#808000" + }, + { + "color": "#CCFFCC" + }, + { + "color": "#8AFF8A" + }, + { + "color": "#47FF47" + }, + { + "color": "#00FF00" + }, + { + "color": "#00D900" + }, + { + "color": "#00AC00" + }, + { + "color": "#008000" + }, + { + "color": "#CCFFFF" + }, + { + "color": "#8AFFFF" + }, + { + "color": "#47FFFF" + }, + { + "color": "#00FFFF" + }, + { + "color": "#00D9D9" + }, + { + "color": "#00ACAC" + }, + { + "color": "#008080" + }, + { + "color": "#CCCCFF" + }, + { + "color": "#8A8AFF" + }, + { + "color": "#4747FF" + }, + { + "color": "#0000FF" + }, + { + "color": "#0000D9" + }, + { + "color": "#0000AC" + }, + { + "color": "#000080" + }, + { + "color": "#FFCCFF" + }, + { + "color": "#FF8AFF" + }, + { + "color": "#FF47FF" + }, + { + "color": "#FF00FF" + }, + { + "color": "#D900D9" + }, + { + "color": "#AC00AC" + }, + { + "color": "#800080" + } + ], + "key": "value", + "path": "Framework/Color Picker/Color", + "style": { + "backgroundColor": "#FFFFFF" + }, + "useDefaultViewHeight": false, + "useDefaultViewWidth": false, + "wrap": "wrap" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "color-clicked", + "pageScope": true, + "script": "\tcolor \u003d payload[\"color\"]\n\tself.view.params.color \u003d color", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.flex-repeater" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "40px", + "shrink": 0 + }, + "props": { + "style": { + "marginLeft": "6px" + }, + "text": "Red" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "NumericEntryField" + }, + "position": { + "basis": "32px", + "shrink": 0 + }, + "propConfig": { + "props.value": { + "binding": { + "config": { + "path": "view.params.color" + }, + "transforms": [ + { + "code": "\ttry:\n\t\treturn int(value[1:3], 16)\n\texcept:\n\t\treturn None", + "type": "script" + } + ], + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tif origin in [\"Browser\", \"BindingWriteback\"]:\n\t\tif currentValue.value !\u003d None:\n\t\t\tcolor \u003d self.view.params.color\n\t\t\thexColor \u003d hex(currentValue.value).replace(\"0x\",\"\").upper().replace(\"L\",\"\")\n\t\t\tif len(hexColor) \u003d\u003d 1:\n\t\t\t\thexColor \u003d \"0%s\" % hexColor\n\t\t\tcolor \u003d \"#\" + hexColor + color[3:]\n\t\t\tself.view.params.color \u003d color" + } + } + }, + "props": { + "format": "0,0", + "inputBounds": { + "maximum": 255, + "minimum": 0 + }, + "style": { + "borderRadius": "4px" + } + }, + "type": "ia.input.numeric-entry-field" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "50px", + "shrink": 0 + }, + "props": { + "direction": "column", + "justify": "center", + "style": { + "marginLeft": "10px", + "marginRight": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Slider" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "../FlexContainer/NumericEntryField.props.value" + }, + "type": "property" + } + } + }, + "props": { + "labels": { + "interval": 42.5, + "show": true + }, + "max": 255, + "style": { + "marginLeft": "10px", + "marginRight": "20px" + } + }, + "type": "ia.input.slider" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "72px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "shrink": 0 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "40px", + "shrink": 0 + }, + "props": { + "style": { + "marginLeft": "6px" + }, + "text": "Blue" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "NumericEntryField" + }, + "position": { + "basis": "32px", + "shrink": 0 + }, + "propConfig": { + "props.value": { + "binding": { + "config": { + "path": "view.params.color" + }, + "transforms": [ + { + "code": "\ttry:\n\t\treturn int(value[3:5], 16)\n\texcept:\n\t\treturn None", + "type": "script" + } + ], + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tif origin in [\"Browser\", \"BindingWriteback\"]:\n\t\tif currentValue.value !\u003d None:\n\t\t\tcolor \u003d self.view.params.color\n\t\t\thexColor \u003d hex(currentValue.value).replace(\"0x\",\"\").upper().replace(\"L\",\"\")\n\t\t\tif len(hexColor) \u003d\u003d 1:\n\t\t\t\thexColor \u003d \"0%s\" % hexColor\n\t\t\tcolor \u003d \"#\" + color[1:3] + hexColor + color[5:]\n\t\t\tself.view.params.color \u003d color" + } + } + }, + "props": { + "format": "0,0", + "inputBounds": { + "maximum": 255, + "minimum": 0 + }, + "style": { + "borderRadius": "4px" + } + }, + "type": "ia.input.numeric-entry-field" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "50px", + "shrink": 0 + }, + "props": { + "direction": "column", + "justify": "center", + "style": { + "marginLeft": "10px", + "marginRight": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Slider" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "../FlexContainer/NumericEntryField.props.value" + }, + "type": "property" + } + } + }, + "props": { + "labels": { + "interval": 42.5, + "show": true + }, + "max": 255, + "style": { + "marginLeft": "10px", + "marginRight": "20px" + } + }, + "type": "ia.input.slider" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "72px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "shrink": 0 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "40px", + "shrink": 0 + }, + "props": { + "style": { + "marginLeft": "6px" + }, + "text": "Green" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "NumericEntryField" + }, + "position": { + "basis": "32px", + "shrink": 0 + }, + "propConfig": { + "props.value": { + "binding": { + "config": { + "path": "view.params.color" + }, + "transforms": [ + { + "code": "\ttry:\n\t\treturn int(value[5:], 16)\n\texcept:\n\t\treturn None", + "type": "script" + } + ], + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tif origin in [\"Browser\", \"BindingWriteback\"]:\n\t\tif currentValue.value !\u003d None:\n\t\t\tcolor \u003d self.view.params.color\n\t\t\thexColor \u003d hex(currentValue.value).replace(\"0x\",\"\").upper().replace(\"L\",\"\")\n\t\t\tif len(hexColor) \u003d\u003d 1:\n\t\t\t\thexColor \u003d \"0%s\" % hexColor\n\t\t\tcolor \u003d \"#\" + color[1:5] + hexColor\n\t\t\tself.view.params.color \u003d color" + } + } + }, + "props": { + "format": "0,0", + "inputBounds": { + "maximum": 255, + "minimum": 0 + }, + "style": { + "borderRadius": "4px" + } + }, + "type": "ia.input.numeric-entry-field" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "50px", + "shrink": 0 + }, + "props": { + "direction": "column", + "justify": "center", + "style": { + "marginLeft": "10px", + "marginRight": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Slider" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "../FlexContainer/NumericEntryField.props.value" + }, + "type": "property" + } + } + }, + "props": { + "labels": { + "interval": 42.5, + "show": true + }, + "max": 255, + "style": { + "marginLeft": "10px", + "marginRight": "20px" + } + }, + "type": "ia.input.slider" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "72px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_2" + }, + "position": { + "shrink": 0 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "shrink": 0 + }, + "props": { + "style": { + "marginLeft": "6px", + "marginRight": "6px" + }, + "text": "Color" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "TextField" + }, + "position": { + "basis": "100px", + "shrink": 0 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.color" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderRadius": "4px" + } + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "20px" + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "view.params.color" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderColor": "#D3D3D3", + "borderRadius": "32px", + "borderStyle": "solid", + "borderWidth": "1px", + "margin": "6px" + } + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t## Send message back to view/component that called color picker popup\n\tsystem.perspective.sendMessage(\n\t\t\"updateFromColorPicker\",\n\t\tpayload\u003d{\"color\": self.view.params.color},\n\t\tscope\u003d\"session\"\n\t)\n\t## close color picker poup\n\tsystem.perspective.closePopup(\"ColorPicker\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button Update and Close", + "tooltip": { + "enabled": true, + "location": "center-left", + "text": "Update and close" + } + }, + "props": { + "image": { + "icon": { + "path": "material/exit_to_app" + } + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "grow": 1 + }, + "props": { + "justify": "flex-end" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "32px", + "shrink": 0 + }, + "props": { + "style": { + "marginBottom": "10px", + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "classes": "Framework/ColorPicker/Container" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Color Picker/Color/resource.json b/com.inductiveautomation.perspective/views/Framework/Color Picker/Color/resource.json new file mode 100644 index 0000000..581cb02 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Color Picker/Color/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "717d10dbaf54ab9249ef52ea4e33293312874db677b33e0e03fee6f7b913b4fc" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Framework/Color Picker/Color/view.json b/com.inductiveautomation.perspective/views/Framework/Color Picker/Color/view.json new file mode 100644 index 0000000..f9a1b0b --- /dev/null +++ b/com.inductiveautomation.perspective/views/Framework/Color Picker/Color/view.json @@ -0,0 +1,65 @@ +{ + "custom": {}, + "params": { + "color": "#00FF00" + }, + "propConfig": { + "params.color": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 20, + "width": 20 + } + }, + "root": { + "children": [ + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tcolor \u003d self.view.params.color\n\tsystem.perspective.sendMessage(messageType\u003d\"color-clicked\", payload\u003d{\"color\":color})" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Label" + }, + "position": { + "basis": "20px", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "view.params.color" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "cursor": "pointer" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Header/Header/resource.json b/com.inductiveautomation.perspective/views/Header/Header/resource.json new file mode 100644 index 0000000..082a0ec --- /dev/null +++ b/com.inductiveautomation.perspective/views/Header/Header/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-05-08T10:39:26Z" + }, + "lastModificationSignature": "2bbce8feddf3b04e05dd5067ffcb319a9b6aed5ffef44147827c6c8167432046" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Header/Header/thumbnail.png b/com.inductiveautomation.perspective/views/Header/Header/thumbnail.png new file mode 100644 index 0000000..6d8b80b Binary files /dev/null and b/com.inductiveautomation.perspective/views/Header/Header/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Header/Header/view.json b/com.inductiveautomation.perspective/views/Header/Header/view.json new file mode 100644 index 0000000..e2cb645 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Header/Header/view.json @@ -0,0 +1,1102 @@ +{ + "custom": { + "activityLogger": { + "alt_pageid": "Header", + "start_time": { + "$": [ + "ts", + 192, + 1715164723047 + ], + "$ts": 1715164723045 + } + } + }, + "events": { + "system": { + "onShutdown": { + "config": { + "script": "\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)" + }, + "scope": "G", + "type": "script" + }, + "onStartup": { + "config": { + "script": "\tself.custom.activityLogger.start_time \u003d system.date.now()" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "params": {}, + "size": "medium" + }, + "propConfig": { + "custom.activityLogger": { + "persistent": true + }, + "custom.activityLogger.pageid": { + "binding": { + "config": { + "path": "page.props.path" + }, + "transforms": [ + { + "code": " if value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n return self.custom.activityLogger.alt_pageid.lower()\n else:\n return value[1:].lower()\n\treturn value", + "type": "script" + } + ], + "type": "property" + } + }, + "params.params": { + "paramDirection": "input", + "persistent": true + }, + "params.size": { + "paramDirection": "input" + } + }, + "props": { + "defaultSize": { + "height": 58 + } + }, + "root": { + "children": [ + { + "children": [ + { + "events": { + "dom": { + "onDoubleClick": { + "config": { + "page": "/Monitron" + }, + "scope": "C", + "type": "nav" + } + } + }, + "meta": { + "name": "Icon" + }, + "position": { + "basis": "30px" + }, + "props": { + "color": "#FFFFFF", + "path": "material/vibration", + "style": { + "classes": "" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "41px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "direct", + "tagPath": "[IEC_SCADA_TAG_PROVIDER]Monitron/monitron_data" + }, + "transforms": [ + { + "code": "\treturn value.getRowCount()", + "type": "script" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "color": "#FFFFFF", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "80px", + "display": false + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "dom": { + "onDoubleClick": { + "config": { + "page": "/Oil" + }, + "scope": "C", + "type": "nav" + } + } + }, + "meta": { + "name": "Icon" + }, + "position": { + "basis": "30px" + }, + "props": { + "color": "#FFFFFF", + "path": "material/opacity", + "style": { + "classes": "" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "41px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "direct", + "tagPath": "[IEC_SCADA_TAG_PROVIDER]Oil/oil_condition_monitoring" + }, + "transforms": [ + { + "code": "\treturn value.getRowCount()", + "type": "script" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "color": "#FFFFFF", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "80px", + "display": false + }, + "type": "ia.container.flex" + }, + { + "custom": { + "s3URI": "SCADA/rme-white-250.png" + }, + "meta": { + "name": "Image" + }, + "position": { + "basis": "120px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{view.params.size} \u003d \"large\"" + }, + "type": "expr" + } + }, + "props.source": { + "binding": { + "config": { + "path": "this.custom.s3URI" + }, + "transforms": [ + { + "code": "\treturn AWS.s3.getPresignedURL(self, value)", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "fit": { + "height": 40, + "mode": "fill" + } + }, + "type": "ia.display.image" + }, + { + "meta": { + "hasDelegate": true, + "name": "Spacer Start" + }, + "position": { + "basis": "16px", + "shrink": 0 + }, + "props": { + "text": " " + }, + "type": "ia.display.label" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "id": "Docked-West", + "type": "toggle" + }, + "scope": "C", + "type": "dock" + } + } + }, + "meta": { + "name": "Menu Dock" + }, + "position": { + "basis": "24px", + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{view.params.size} !\u003d \"large\"" + }, + "type": "expr" + } + } + }, + "props": { + "color": "#FFFFFF", + "path": "material/menu", + "style": { + "classes": "Header/Icon", + "marginRight": "10px" + } + }, + "type": "ia.display.icon" + }, + { + "children": [ + { + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "550px", + "grow": 1 + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "300px", + "shrink": 0 + }, + "propConfig": { + "custom.area": { + "binding": { + "config": { + "expression": "if(isNull({this.custom.lookup_path}), \"\",\r\ntry(jsonGet({this.custom.plc_dict},\"Area\"),\"\"))" + }, + "type": "expr" + } + }, + "custom.lookup_path": { + "binding": { + "config": { + "expression": "try(if({this.custom.path}[1,0]\u003d\"DetailedView\", {this.custom.path}[2,0],\r\n\"\"), \"\")\r\n" + }, + "type": "expr" + } + }, + "custom.path": { + "binding": { + "config": { + "path": "page.props.path" + }, + "transforms": [ + { + "expression": "split({value},\"/\")", + "type": "expression" + } + ], + "type": "property" + } + }, + "custom.path_to_display": { + "binding": { + "config": { + "expression": "if(len({this.custom.lookup_path})\u003c1, \"\",\r\nif(len({this.custom.area}) \u003c1, {this.custom.lookup_path},\r\nif(len({this.custom.sub_area}) \u003e 0, concat({this.custom.lookup_path} + \" / \" + {this.custom.area} + \" / \" + {this.custom.sub_area}),\r\nconcat({this.custom.lookup_path} + \" / \" + {this.custom.area}))))" + }, + "type": "expr" + } + }, + "custom.plc_dict": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" + }, + "transforms": [ + { + "expression": "jsonGet({value},{this.custom.lookup_path})", + "type": "expression" + } + ], + "type": "tag" + } + }, + "custom.sub_area": { + "binding": { + "config": { + "expression": "if(isNull({this.custom.lookup_path}), \"\",\r\ntry(jsonGet({this.custom.plc_dict},\"SubArea\"), \"\"))" + }, + "type": "expr" + } + }, + "position.display": { + "binding": { + "config": { + "expression": "{view.params.size} \u003d \"large\"" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "path": "this.custom.path_to_display" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "150px", + "grow": 1 + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Area" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "type": "ia.container.flex" + }, + { + "meta": { + "hasDelegate": true, + "name": "Spacer 1" + }, + "position": { + "basis": "20px" + }, + "props": { + "text": " " + }, + "type": "ia.display.label" + }, + { + "custom": { + "buttonid": "HeaderNotifyIcon", + "entries": [ + { + "PrimaryKey": "2024-05-08 10:17:51", + "author": "pll", + "body": "Introducing our brand new Announcement Feature! 🎉 Stay in the loop with important updates, new features, planned downtime events, all in one place. Never miss out again! Check it out now and stay tuned for the latest updates. 🔊", + "childproj": "https://eu-preprod.scada2.rme.amazon.dev: MAN2", + "expire": "2024-05-09 05:00:00", + "link1": "https://", + "link1title": "", + "link2": "https://", + "link2title": "", + "priority": "Healthy", + "publish": "2024-05-08 10:08:33", + "title": "📢 Exciting News! 📢", + "whids": "" + } + ], + "entryCount": 1, + "highestPriority": 5 + }, + "events": { + "dom": { + "onClick": [ + { + "config": { + "draggable": true, + "id": "ioNP2CXn", + "modal": true, + "overlayDismiss": true, + "resizable": true, + "showCloseIcon": true, + "title": "Notifications", + "type": "open", + "viewParams": { + "entryCount": "{/root/Icon_0.custom.entryCount}", + "instances": "{/root/Icon_0.custom.entries}" + }, + "viewPath": "PopUp-Views/Notify-Tool/Notify-Popup", + "viewportBound": false + }, + "scope": "C", + "type": "popup" + }, + { + "config": { + "script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + } + ] + } + }, + "meta": { + "name": "Icon_0", + "tooltip": { + "enabled": true, + "location": "bottom-right", + "style": { + "whiteSpace": "pre" + }, + "text": "📢 Exciting News! 📢\n" + } + }, + "position": { + "basis": "30px" + }, + "propConfig": { + "custom.refreshMSG": { + "binding": { + "config": { + "expression": "now(600000)" + }, + "type": "expr" + }, + "onChange": { + "enabled": null, + "script": "\tsystem.perspective.sendMessage(\u0027refreshNotifyIcon\u0027)" + } + }, + "position.display": { + "binding": { + "config": { + "path": "view.custom.EntriesList" + }, + "transforms": [ + { + "code": "\tfrom datetime import datetime\n\t\n#\tRead entries from dynamo table\n\treturns \u003d notifyTool.ReadFromDynamo.DynamoReader()\n\tEntriesList \u003d returns[\u0027Items\u0027]\n\tEntriesList.reverse()\n#\treturn EntriesList\n\n#\tCreate empty list and now string\n\tpublishdates \u003d []\n\tnow \u003d datetime.now()\n\tnowstr \u003d str(now)[:19]\n\tactiveNotify \u003d False\n\twhid \u003d self.session.custom.fc\n\tstates \u003d {\u0027Healthy\u0027:5,\u0027Diagnostic\u0027:4, \u0027Low\u0027:3, \u0027Medium\u0027:2, \u0027High\u0027:1}\n#\tCheck EntriesList for active entries based on publish and expire times\n\tactiveEntries \u003d []\n\ttooltip \u003d []\n\tcount \u003d 0\n\thighestPriority \u003d 5\n\tfor e in EntriesList:\n\t\t\n\t\tif len(e[\u0027whids\u0027])\u003e0:\n\t\t\tif whid in e[\u0027whids\u0027]:\n\t\t\t\tif nowstr \u003e\u003d e[\u0027publish\u0027] and nowstr\u003c\u003dstr( e[\u0027expire\u0027]):\n\t\t\t\t\tactiveEntries.append(e)\n\t\t\t\t\ttooltip.append(e[\u0027title\u0027])\n\t\t\t\t\tactiveNotify \u003d True\n\t\t\t\t\tcount +\u003d1\n\t\t\t\t\tif states[e[\u0027priority\u0027]] \u003c highestPriority:\n\t\t\t\t\t\thighestPriority \u003d states[e[\u0027priority\u0027]]\n\t\telse:\n\t\t\tif nowstr \u003e\u003d e[\u0027publish\u0027] and nowstr\u003c\u003dstr( e[\u0027expire\u0027]):\n\t\t\t\tactiveEntries.append(e)\n\t\t\t\ttooltip.append(e[\u0027title\u0027])\n\t\t\t\tactiveNotify \u003d True\t\t\n\t\t\t\tcount +\u003d1\t\n\t\t\t\tif states[e[\u0027priority\u0027]] \u003c highestPriority:\n\t\t\t\t\thighestPriority \u003d states[e[\u0027priority\u0027]]\n\n\t\t\t\n\ttooltiptext \u003d \u0027\u0027\n\tfor i in tooltip:\n\t\ttooltiptext+\u003d i+\u0027\\n\u0027\n\tself.custom.entries \u003d activeEntries\n\tself.custom.highestPriority \u003d highestPriority\n\tself.custom.entryCount \u003d count\n\tself.meta.tooltip.text \u003d tooltiptext\t\n\n\n#\treturn returns\n#\treturn activeEntries\n\treturn activeNotify", + "type": "script" + } + ], + "type": "property" + } + }, + "props.color": { + "binding": { + "config": { + "path": "this.custom.highestPriority" + }, + "transforms": [ + { + "fallback": "state5", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "state1" + }, + { + "input": 2, + "output": "state2" + }, + { + "input": 3, + "output": "state3" + }, + { + "input": 4, + "output": "state4" + }, + { + "input": 5, + "output": "state5" + } + ], + "outputType": "scalar", + "type": "map" + }, + { + "code": "\ttest \u003d self.session.custom.colours.colour_impaired\n\tstatecolor \u003d self.session.custom.colours[value]\n\treturn statecolor", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "path": "material/campaign", + "style": { + "marginLeft": 5, + "marginRight": 5 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "refreshNotifyIcon", + "pageScope": true, + "script": "\n\tself.refreshBinding(\u0027props.color\u0027)\n\tself.refreshBinding(\u0027position.display\u0027)", + "sessionScope": true, + "viewScope": false + } + ] + }, + "type": "ia.display.icon" + }, + { + "meta": { + "hasDelegate": true, + "name": "Spacer End_3" + }, + "position": { + "basis": "20px", + "shrink": 0 + }, + "props": { + "text": " " + }, + "type": "ia.display.label" + }, + { + "custom": { + "buttonid": "HeaderLegendIcon" + }, + "events": { + "dom": { + "onClick": [ + { + "config": { + "draggable": false, + "id": "TZyBcXB7", + "modal": true, + "overlayDismiss": true, + "resizable": false, + "showCloseIcon": false, + "type": "open", + "viewPath": "PopUp-Views/Legend_Popup/Legend-popup-view", + "viewportBound": true + }, + "scope": "C", + "type": "popup" + }, + { + "config": { + "script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + } + ] + } + }, + "meta": { + "name": "Icon", + "tooltip": { + "delay": 250, + "enabled": true, + "sustain": 1000, + "text": "Legend" + } + }, + "position": { + "basis": "35px" + }, + "props": { + "color": "#FFFFFF", + "path": "material/legend_toggle", + "style": { + "classes": "", + "marginRight": 20 + } + }, + "type": "ia.display.icon" + }, + { + "children": [ + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.navigate(page \u003d \"/Real-Time\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Icon" + }, + "position": { + "basis": "30px" + }, + "props": { + "color": "#FFFFFF", + "path": "material/notifications_active", + "style": { + "classes": "" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "41px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "direct", + "tagPath": "System/aws_data" + }, + "transforms": [ + { + "code": "\tjson_decode \u003d system.util.jsonDecode(value)\n\treturn len(json_decode)", + "type": "script" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "color": "#FFFFFF", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "80px" + }, + "props": { + "justify": "flex-end", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "hasDelegate": true, + "name": "Spacer End_2" + }, + "position": { + "basis": "20px", + "shrink": 0 + }, + "props": { + "text": " " + }, + "type": "ia.display.label" + }, + { + "custom": { + "covert": true + }, + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tdevice_list \u003d tags.tag_utilities.get_devices(self.session.custom.fc)\n\ttags.tag_utilities.reset_disconnect_tags(self.session.custom.fc, device_list)\n\tAWS.wbsckt_abort.close_websckt()" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Icon_2", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "30px" + }, + "propConfig": { + "custom.heartbeat_received": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/wbsckt_heartbeat_interval" + }, + "transforms": [ + { + "expression": "if(secondsBetween(todate({value}),todate(now())) \u003e 70, False, True)", + "type": "expression" + } + ], + "type": "tag" + } + }, + "custom.wbsckt_running": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/wbsckt_running" + }, + "transforms": [ + { + "expression": "if({value} \u003d True \u0026\u0026 ({this.custom.heartbeat_received} \u003d True) , True, False)", + "type": "expression" + } + ], + "type": "tag" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "path": "this.custom.wbsckt_running" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "websocket running" + }, + { + "input": false, + "output": "websocket disconnected" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.color": { + "binding": { + "config": { + "path": "this.custom.wbsckt_running" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": false, + "output": "#FF4747" + }, + { + "input": true, + "output": "#FFFFFF" + } + ], + "outputType": "color", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "path": "material/location_city", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "50px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "direct", + "tagPath": "Configuration/FC" + }, + "type": "tag" + } + } + }, + "props": { + "icon": "material/building", + "style": { + "borderWidth": "0.25px", + "color": "#FFFFFF", + "textAlign": "", + "textIndent": 10 + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "hasDelegate": true, + "name": "Spacer End" + }, + "position": { + "basis": "20px", + "shrink": 0 + }, + "props": { + "text": " " + }, + "type": "ia.display.label" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tif self.session.props.auth.authenticated:\n\t\tsystem.perspective.logout()\n\telse:\n\t\tsystem.perspective.login()" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "User" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "props": { + "path": "material/person", + "style": { + "classes": "Header/Icon", + "color": "#FFFFFF" + } + }, + "type": "ia.display.icon" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tif self.session.props.auth.authenticated:\n\t\tsystem.perspective.logout()\n\telse:\n\t\tsystem.perspective.login()" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "hasDelegate": true, + "name": "Sign In" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{view.params.size} !\u003d \"small\"" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "path": "session.props.auth.user.userName" + }, + "transforms": [ + { + "code": "\tif len(value) \u003d\u003d 0 or value \u003d\u003d \"null\":\n\t return \"Sign In\"\n\telse:\n\t return value.split(\"@\")[0]", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Header/Icon", + "color": "#FFFFFF", + "cursor": "pointer", + "marginLeft": "4px" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "hasDelegate": true, + "name": "Spacer End_0" + }, + "position": { + "basis": "20px", + "shrink": 0 + }, + "props": { + "text": " " + }, + "type": "ia.display.label" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.closeSession()" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Exit", + "tooltip": { + "enabled": true, + "location": "bottom-left", + "style": { + "fontFamily": "Arial", + "fontSize": 12 + }, + "tail": false, + "text": "Exit Application" + } + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "props": { + "path": "material/exit_to_app", + "style": { + "classes": "Header/Icon", + "color": "#FFFFFF", + "cursor": "pointer" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "hasDelegate": true, + "name": "Spacer End_1" + }, + "position": { + "basis": "16px", + "shrink": 0 + }, + "props": { + "text": " " + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "root" + }, + "props": { + "justify": "flex-end" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/ATLAS/resource.json b/com.inductiveautomation.perspective/views/Main-Views/ATLAS/resource.json new file mode 100644 index 0000000..ccca531 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/ATLAS/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2021-11-26T15:11:03Z" + }, + "lastModificationSignature": "bc1405b17428d64c6e8efbc35f4fcdfa4aa54bee5b214f466518604d0d1ae793" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/ATLAS/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/ATLAS/thumbnail.png new file mode 100644 index 0000000..03bc5a5 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/ATLAS/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/ATLAS/view.json b/com.inductiveautomation.perspective/views/Main-Views/ATLAS/view.json new file mode 100644 index 0000000..d8ce2fb --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/ATLAS/view.json @@ -0,0 +1,14 @@ +{ + "custom": {}, + "params": {}, + "props": {}, + "root": { + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/CommandControl (OLD)/resource.json b/com.inductiveautomation.perspective/views/Main-Views/CommandControl (OLD)/resource.json new file mode 100644 index 0000000..9be1288 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/CommandControl (OLD)/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-01-18T16:29:05Z" + }, + "lastModificationSignature": "b40a96ca70162bbc172297d6e23a77a6897e933ad545dc9c2c3f563e0119cc3e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/CommandControl (OLD)/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/CommandControl (OLD)/thumbnail.png new file mode 100644 index 0000000..e649cc1 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/CommandControl (OLD)/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/CommandControl (OLD)/view.json b/com.inductiveautomation.perspective/views/Main-Views/CommandControl (OLD)/view.json new file mode 100644 index 0000000..7fd2bd2 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/CommandControl (OLD)/view.json @@ -0,0 +1,228 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "custom": { + "Devices": [ + "PLC01", + "PLC02", + "PLC03", + "PLC06", + "PLC07", + "PLC08", + "PLC09", + "PLC13", + "PLC14", + "PLC15", + "PLC16", + "PLC20", + "PLC21", + "PLC22", + "PLC23", + "PLC25", + "PLC26", + "PLC27", + "PLC28", + "PLC29", + "PLC30", + "PLC31", + "PLC32", + "PLC40", + "PLC41", + "PLC42", + "PLC43", + "PLC47", + "PLC48", + "PLC49", + "PLC51", + "PLC52", + "PLC60", + "PLC64", + "PLC65", + "PLC66", + "PLC69", + "PLC70", + "PLC71", + "PLC80", + "PLC96", + "PLC97", + "PLC99", + "ARSAW1301", + "ARSAW1302", + "ARSAW1303", + "ARSAW1304", + "ARSAW1305", + "ARSAW1306", + "ARSAW1307", + "ARSAW1401", + "ARSAW1402", + "ARSAW1403", + "ARSAW1404", + "ARSAW1405", + "ARSAW1406", + "ARSAW1407", + "ARSAW1501", + "ARSAW1502", + "ARSAW1503", + "ARSAW1504", + "ARSAW1505", + "ARSAW1506", + "ARSAW1507", + "ARSAW1601", + "ARSAW1602", + "ARSAW1603", + "ARSAW1604", + "ARSAW1605", + "ARSAW1606", + "ARSAW1607", + "FSC10", + "SLAM301", + "SLAM302", + "SLAM303", + "SLAM304", + "SLAM305", + "SLAM306", + "SLAM307", + "SLAM402", + "SLAM401", + "RWC4" + ] + }, + "meta": { + "name": "FlexRepeater" + }, + "position": { + "basis": "1080px" + }, + "props": { + "alignContent": "flex-start", + "alignItems": "flex-start", + "elementPosition": { + "grow": 0, + "shrink": 0 + }, + "instances": [ + { + "instancePosition": {}, + "instanceStyle": { + "classes": "", + "margin": "5px" + }, + "tagProps": [ + "PLC01", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + { + "instancePosition": {}, + "instanceStyle": { + "classes": "", + "margin": "5px" + }, + "tagProps": [ + "PLC02", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + { + "instancePosition": {}, + "instanceStyle": { + "classes": "", + "margin": "5px" + }, + "tagProps": [ + "PLC03", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + { + "instancePosition": {}, + "instanceStyle": { + "classes": "", + "margin": "5px" + }, + "tagProps": [ + "PLC09", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + } + ], + "path": "Symbol-Views/Controller-Views/CommandControl", + "style": { + "overflow": "visible" + }, + "wrap": "wrap" + }, + "type": "ia.display.flex-repeater" + } + ], + "custom": { + "Devices": [ + "PLC01", + "PLC02", + "PLC03", + "PLC09" + ], + "count": "value", + "delay": 4000 + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tfc \u003d system.tag.readBlocking([\"Configuration/FC\"])\n\ttag_provider \u003d \"[%s_SCADA_TAG_PROVIDER]\" % (fc[0].value)\n\ttags_to_read \u003d system.tag.readBlocking([tag_provider+\"Configuration/DetailedViews\"])\n\tdevices \u003d system.util.jsonDecode(tags_to_read[0].value)\n\tif devices:\n\t\tinstances \u003d []\n\t\tdashboard_devices \u003d []\n\t\tfor k,v in devices.items():\n\t\t\tdevice_list \u003d v\n\t\t\tfor i in device_list:\n\t\t\t\tdashboard_devices.append(i)\n\t\t\t\tinstances.append({\n\t\t\t\t \"instanceStyle\": {\n\t\t\t\t \"classes\": \"\",\n\t\t\t\t \"margin\": \"5px\"\n\t\t\t\t },\n\t\t\t\t \"instancePosition\": {},\n\t\t\t\t \"tagProps\": [\n\t\t\t\t i,\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\"\n\t\t\t\t ]\n\t\t\t\t })\n\t\tsystem.perspective.print(instances)\n\t\tself.custom.Devices \u003d dashboard_devices\n\t\tself.getChild(\"FlexRepeater\").props.instances \u003d instances" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/CommandControl/resource.json b/com.inductiveautomation.perspective/views/Main-Views/CommandControl/resource.json new file mode 100644 index 0000000..bed373e --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/CommandControl/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-05-13T13:56:35Z" + }, + "lastModificationSignature": "d92dd5869d5c712f676f09a2d1c6891ea055318cd68388cb8ec2d00073131eec" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/CommandControl/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/CommandControl/thumbnail.png new file mode 100644 index 0000000..60e320d Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/CommandControl/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/CommandControl/view.json b/com.inductiveautomation.perspective/views/Main-Views/CommandControl/view.json new file mode 100644 index 0000000..ec5ac7b --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/CommandControl/view.json @@ -0,0 +1,1808 @@ +{ + "custom": { + "PLCs": "{\n \"FSC1\": [\"FSC1\"],\n \"FSC2\": [\"FSC2\"],\n \"FSC_Cells\": [\"FSC_Cells\"],\n \"FSC_Induct_1-4\": [\"FSC_Induct_1-4\"],\n \"FSC_Induct_5-8\": [\"FSC10\"],\n \"PLC01\": [\"PLC01\"],\n \"PLC02\": [\n \"PLC02\",\n \"PLC98\"\n ],\n \"PLC03\": [\"PLC03\"],\n \"PLC06\": [\n \"PLC06\",\n \"PLC07\"\n ],\n \"PLC08\": [\n \"PLC08\",\n \"PLC99\"\n ],\n \"PLC09\": [\"PLC09\"],\n \"PLC09_Receiving2\": [\"PLC09_Receiving2\"],\n \"PLC09_Receiving3\": [\"PLC09_Receiving3\"],\n \"PLC1000\": [\"PLC1000\"],\n \"PLC1000_Receiving4\": [\"PLC1000_Receiving4\"],\n \"PLC1301\": [\"ARSAW1301\"],\n \"PLC1302\": [\"ARSAW1302\"],\n \"PLC1303\": [\"ARSAW1303\"],\n \"PLC1304\": [\"ARSAW1304\"],\n \"PLC1305\": [\"ARSAW1305\"],\n \"PLC1306\": [\"ARSAW1306\"],\n \"PLC1307\": [\"ARSAW1307\"],\n \"PLC1308\": [\"ARSAW1308\"],\n \"PLC1309\": [\"ARSAW1309\"],\n \"PLC1310\": [\"ARSAW1310\"],\n \"PLC1311\": [\"ARSAW1311\"],\n \"PLC1312\": [\"ARSAW1312\"],\n \"PLC13_SC1\": [\"PLC13\"],\n \"PLC13_SC2\": [\"PLC13_SC2\"],\n \"PLC14\": [\"PLC14\"],\n \"PLC1501\": [\"ARSAW1501\"],\n \"PLC1502\": [\"ARSAW1502\"],\n \"PLC1503\": [\"ARSAW1503\"],\n \"PLC1504\": [\"ARSAW1504\"],\n \"PLC1505\": [\"ARSAW1505\"],\n \"PLC1506\": [\"ARSAW1506\"],\n \"PLC1507\": [\"ARSAW1507\"],\n \"PLC1508\": [\"ARSAW1508\"],\n \"PLC1509\": [\"ARSAW1509\"],\n \"PLC1510\": [\"ARSAW1510\"],\n \"PLC1511\": [\"ARSAW1511\"],\n \"PLC1512\": [\"ARSAW1512\"],\n \"PLC15_SC1\": [\"PLC15\"],\n \"PLC15_SC2\": [\"PLC15_SC2\"],\n \"PLC16\": [\"PLC16\"],\n \"PLC20_Tote1-3\": [\"PLC20\"],\n \"PLC20_Tote4-8\": [\"PLC20_Tote4-8\"],\n \"PLC21_22\": [\n \"PLC21\",\n \"PLC22\"\n ],\n \"PLC23\": [\"PLC23\"],\n \"PLC24\": [\n \"PLC24\",\n \"PLC97\"\n ],\n \"PLC25\": [\"PLC25\"],\n \"PLC26\": [\"PLC26\"],\n \"PLC27\": [\"PLC27\"],\n \"PLC30\": [\"PLC30\"],\n \"PLC31\": [\"PLC31\"],\n \"PLC32\": [\"PLC32\"],\n \"PLC60\": [\"PLC60\"],\n \"PLC61\": [\"PLC61\"],\n \"PLC69\": [\"PLC69\"],\n \"PLC70\": [\n \"PLC70\",\n \"PLC71\"\n ],\n \"PLC80_81_82\": [\n \"PLC80\",\n \"PLC81\",\n \"PLC82\"\n ]\n}", + "activityLogger": { + "alt_pageid": "command_control", + "start_time": { + "$": [ + "ts", + 192, + 1715227222179 + ], + "$ts": 1715227222179 + } + }, + "devices": { + "ARSAW1301": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1301", + "tagProps": [ + "ARSAW1301", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1302": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1302", + "tagProps": [ + "ARSAW1302", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1303": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1303", + "tagProps": [ + "ARSAW1303", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1304": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1304", + "tagProps": [ + "ARSAW1304", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1305": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1305", + "tagProps": [ + "ARSAW1305", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1306": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1306", + "tagProps": [ + "ARSAW1306", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1307": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1307", + "tagProps": [ + "ARSAW1307", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1308": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1308", + "tagProps": [ + "ARSAW1308", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1309": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1309", + "tagProps": [ + "ARSAW1309", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1310": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1310", + "tagProps": [ + "ARSAW1310", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1311": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1311", + "tagProps": [ + "ARSAW1311", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1312": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1312", + "tagProps": [ + "ARSAW1312", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1501": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1501", + "tagProps": [ + "ARSAW1501", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1502": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1502", + "tagProps": [ + "ARSAW1502", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1503": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1503", + "tagProps": [ + "ARSAW1503", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1504": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1504", + "tagProps": [ + "ARSAW1504", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1505": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1505", + "tagProps": [ + "ARSAW1505", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1506": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1506", + "tagProps": [ + "ARSAW1506", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1507": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1507", + "tagProps": [ + "ARSAW1507", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1508": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1508", + "tagProps": [ + "ARSAW1508", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1509": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1509", + "tagProps": [ + "ARSAW1509", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1510": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1510", + "tagProps": [ + "ARSAW1510", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1511": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1511", + "tagProps": [ + "ARSAW1511", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "ARSAW1512": { + "area": "AR FLOOR/ARSAW\r\r", + "name": "ARSAW1512", + "tagProps": [ + "ARSAW1512", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "FSC1": { + "area": "/\r\r", + "name": "FSC1", + "tagProps": [ + "FSC1", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "FSC10": { + "area": "OUTBOUND/FSC\r\r", + "name": "FSC10", + "tagProps": [ + "FSC10", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "FSC2": { + "area": "/\r\r", + "name": "FSC2", + "tagProps": [ + "FSC2", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "FSC_Cells": { + "area": "/\r\r", + "name": "FSC_Cells", + "tagProps": [ + "FSC_Cells", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "FSC_Induct_1-4": { + "area": "/\r\r", + "name": "FSC_Induct_1-4", + "tagProps": [ + "FSC_Induct_1-4", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC01": { + "area": "OUTBOUND/SHIP\r\r", + "name": "PLC01", + "tagProps": [ + "PLC01", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC02": { + "area": "OUTBOUND/SHIP\r\r", + "name": "PLC02", + "tagProps": [ + "PLC02", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC03": { + "area": "OUTBOUND/KO \u0026 REJECT\r\r", + "name": "PLC03", + "tagProps": [ + "PLC03", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC06": { + "area": "OUTBOUND/TOTE ROUTER\r\r", + "name": "PLC06", + "tagProps": [ + "PLC06", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC07": { + "area": "OUTBOUND/TOTE ROUTER\r\r", + "name": "PLC07", + "tagProps": [ + "PLC07", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC08": { + "area": "OUTBOUND/TOTE FEED\r\r", + "name": "PLC08", + "tagProps": [ + "PLC08", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC09": { + "area": "INBOUND/RECEIVING\r\r", + "name": "PLC09", + "tagProps": [ + "PLC09", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC09_Receiving2": { + "area": "/\r\r", + "name": "PLC09_Receiving2", + "tagProps": [ + "PLC09_Receiving2", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC09_Receiving3": { + "area": "/\r\r", + "name": "PLC09_Receiving3", + "tagProps": [ + "PLC09_Receiving3", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC1000": { + "area": "INBOUND/RECEIVING\r\r", + "name": "PLC1000", + "tagProps": [ + "PLC1000", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC1000_Receiving4": { + "area": "/\r\r", + "name": "PLC1000_Receiving4", + "tagProps": [ + "PLC1000_Receiving4", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC13": { + "area": "AR FLOOR/ARSAW P2\r\r", + "name": "PLC13", + "tagProps": [ + "PLC13", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC13_SC2": { + "area": "/\r\r", + "name": "PLC13_SC2", + "tagProps": [ + "PLC13_SC2", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC14": { + "area": "/\r\r", + "name": "PLC14", + "tagProps": [ + "PLC14", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC15": { + "area": "AR FLOOR/ARSAW P3\r\r", + "name": "PLC15", + "tagProps": [ + "PLC15", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC15_SC2": { + "area": "/\r\r", + "name": "PLC15_SC2", + "tagProps": [ + "PLC15_SC2", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC16": { + "area": "AR FLOOR/PICK TO REBIN P3\r\r", + "name": "PLC16", + "tagProps": [ + "PLC16", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC20": { + "area": "OUTBOUND/AFE1 TOTE 1-3\r\r", + "name": "PLC20", + "tagProps": [ + "PLC20", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC20_Tote4-8": { + "area": "/\r\r", + "name": "PLC20_Tote4-8", + "tagProps": [ + "PLC20_Tote4-8", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC21": { + "area": "OUTBOUND/AFE TRAY ROUTER\r\r", + "name": "PLC21", + "tagProps": [ + "PLC21", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC22": { + "area": "OUTBOUND/AFE TRAY ROUTER\r\r", + "name": "PLC22", + "tagProps": [ + "PLC22", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC23": { + "area": "OUTBOUND/AFE1 TRAY FEED\r\r", + "name": "PLC23", + "tagProps": [ + "PLC23", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC24": { + "area": "OUTBOUND/AFE1 WALL 1-2\r\r", + "name": "PLC24", + "tagProps": [ + "PLC24", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC25": { + "area": "OUTBOUND/AFE1 WALL 3-4\r\r", + "name": "PLC25", + "tagProps": [ + "PLC25", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC26": { + "area": "OUTBOUND/AFE1 WALL 5-6\r\r", + "name": "PLC26", + "tagProps": [ + "PLC26", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC27": { + "area": "OUTBOUND/AFE1 WALL 7-8\r\r", + "name": "PLC27", + "tagProps": [ + "PLC27", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC30": { + "area": "OUTBOUND/AFE1 PACK 1-4\r\r", + "name": "PLC30", + "tagProps": [ + "PLC30", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC31": { + "area": "OUTBOUND/AFE1 PACK 5-8\r\r", + "name": "PLC31", + "tagProps": [ + "PLC31", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC32": { + "area": "OUTBOUND/AFE1 EMP. TOTE\r\r", + "name": "PLC32", + "tagProps": [ + "PLC32", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC60": { + "area": "OUTBOUND/S.PACKING 1\r\r", + "name": "PLC60", + "tagProps": [ + "PLC60", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC61": { + "area": "OUTBOUND/S.PACKING 2\r\r", + "name": "PLC61", + "tagProps": [ + "PLC61", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC69": { + "area": "OUTBOUND/GIFT WRAP\r\r", + "name": "PLC69", + "tagProps": [ + "PLC69", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC70": { + "area": "OUTBOUND/TRANSSHIP\r\r", + "name": "PLC70", + "tagProps": [ + "PLC70", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC71": { + "area": "OUTBOUND/TRANSSHIP\r\r", + "name": "PLC71", + "tagProps": [ + "PLC71", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC80": { + "area": "OUTBOUND/SMART PACKING\r\r", + "name": "PLC80", + "tagProps": [ + "PLC80", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC81": { + "area": "OUTBOUND/SMART PACKING\r\r", + "name": "PLC81", + "tagProps": [ + "PLC81", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC82": { + "area": "OUTBOUND/SMART PACKING\r\r", + "name": "PLC82", + "tagProps": [ + "PLC82", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC97": { + "area": "SAFETY PLC/\r\r", + "name": "PLC97", + "tagProps": [ + "PLC97", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC98": { + "area": "SAFETY PLC/\r\r", + "name": "PLC98", + "tagProps": [ + "PLC98", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "PLC99": { + "area": "SAFETY PLC/\r\r", + "name": "PLC99", + "tagProps": [ + "PLC99", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + } + } + }, + "events": { + "system": { + "onShutdown": { + "config": { + "script": "\tactivityLog.logger.callLogger(self, \u0027page\u0027)\n\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)" + }, + "scope": "G", + "type": "script" + }, + "onStartup": { + "config": { + "script": "\tself.custom.activityLogger.start_time \u003d system.date.now()" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "page_name": "Command and Control" + }, + "propConfig": { + "custom.PLCs": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/DetailedViews" + }, + "type": "tag" + }, + "persistent": true + }, + "custom.activityLogger": { + "persistent": true + }, + "custom.activityLogger.pageid": { + "binding": { + "config": { + "expression": "{page.props.path}" + }, + "transforms": [ + { + "code": "\tif value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n\t\treturn self.custom.activityLogger.alt_pageid.lower()\n\telse:\n\t\treturn value[1:].lower()", + "type": "script" + } + ], + "type": "expr" + } + }, + "custom.devices": { + "binding": { + "config": { + "path": "view.custom.PLCs" + }, + "transforms": [ + { + "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tPLCs \u003d {}\n\tfc \u003d self.session.custom.fc\n\tconfig \u003d system.tag.readBlocking(\u0027[\u0027 + fc + \u0027_SCADA_TAG_PROVIDER]\u0027 + \u0027/Configuration/PLC\u0027)[0].value\n\t\n\tif devices:\n\t\tfor k, v in devices.items():\n\t\t\tdevice_list \u003d v\n\t\t\tfor i in device_list:\n\t\t\t\tdecode \u003d system.util.jsonDecode(config)\n\t\t\t\tif decode:\n\t\t\t\t\tarea \u003d decode[i][\"Area\"]\n\t\t\t\t\tsub_area \u003d decode[i][\"SubArea\"]\n\t\t\t\t\tarea_label \u003d str(area) + \"/\" + str(sub_area) if sub_area else str(area)\n\t\t\t\telse:\n\t\t\t\t\tarea \u003d \"\"\n\t\t\t\t\tarea_label \u003d \"\"\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tPLCs[i] \u003d {\u0027name\u0027:i,\u0027area\u0027:area_label,\u0027tagProps\u0027:[\n\t\t\t\t\t\t\t\t i,\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\"\n\t\t\t\t\t\t\t\t ]}\n\t\n\treturn PLCs", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "params.page_name": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "300px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "session.custom.command_auth.enabled" + }, + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "\u0027Control Enabled Timeout: \u0027 + ({session.custom.command_auth.timeout_sp} - {session.custom.command_auth.auth_timeout}) + \u0027 seconds\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "marginBottom": 15, + "marginTop": 15 + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tif self.session.custom.command_auth.enabled:\n\t\t\tself.session.custom.command_auth.enabled \u003d False\n\telse:\n\t\t#self.session.custom.command_auth.enabled \u003d True\n\t\tsystem.perspective.openPopup(\u0027command-auth\u0027, \u0027PopUp-Views/Command-Authenticate\u0027, showCloseIcon \u003d False, draggable \u003d False, modal \u003d True, overlayDismiss \u003d True)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "175px" + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "//if({this.props.enabled}, \u0027Re-Authenticate to Enable Command Controls\u0027, \u0027Insufficient Privileges - User Role Required: \u0027 + {session.custom.fc} + \u0027-rme-all\u0027)\r\nif({session.custom.command_auth.enabled},\u0027Click to Disable Controls.\u0027, \u0027Re-Authenticate to Enable Command Controls \\nUser Role Required: \u0027 + {session.custom.fc} + \u0027-rme-all\u0027)" + }, + "type": "expr" + } + }, + "props.image.icon.path": { + "binding": { + "config": { + "expression": "if({session.custom.command_auth.enabled},\u0027material/lock_open\u0027,\u0027material/lock\u0027)" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "if({session.custom.command_auth.enabled},\u0027Disable Controls\u0027,\u0027Enable Controls\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": {} + }, + "primary": false, + "style": { + "marginBottom": 15, + "marginRight": 5, + "marginTop": 15 + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "70px", + "shrink": 0 + }, + "props": { + "justify": "flex-end" + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Table" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "path": "view.custom.devices" + }, + "transforms": [ + { + "code": "\tresults \u003d []\n\tfor row, val in value.items():\n\t\tresults.append({\"plc\": val[\"name\"], \"area\": val[\"area\"],\"status\": {\"tagProps\":val[\"tagProps\"]},\"alarms\": {\"tagProps\":val[\"tagProps\"]},\"actions\": {\"tagProps\":val[\"tagProps\"]}})\n\t\n\tresults.sort(key\u003dlambda item: item[\u0027plc\u0027])\n\treturn results", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "cells": { + "style": { + "borderColor": "#4A4A4A", + "borderStyle": "solid", + "borderWidth": 1, + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "paddingLeft": 16, + "paddingRight": 16 + } + }, + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "plc", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "borderColor": "#4A4A4A", + "borderStyle": "solid", + "borderWidth": 1, + "classes": "", + "color": "#4A4A4A", + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "paddingLeft": 11, + "paddingRight": 11 + }, + "title": "PLC" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": false, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 50 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "area", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "borderColor": "#4A4A4A", + "borderStyle": "solid", + "borderWidth": 1, + "classes": "", + "color": "#4A4A4A", + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "paddingLeft": 11, + "paddingRight": 11 + }, + "title": "Area" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": false, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 50 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "status", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "borderColor": "#4A4A4A", + "borderStyle": "solid", + "borderWidth": 1, + "classes": "", + "color": "#4A4A4A", + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "paddingLeft": 11, + "paddingRight": 11 + }, + "title": "Status" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": false, + "sort": "none", + "sortable": false, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "Symbol-Views/Controller-Views/CommandControlStatus", + "visible": true, + "width": 75 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "alarms", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "borderColor": "#4A4A4A", + "borderStyle": "solid", + "borderWidth": 1, + "classes": "", + "color": "#4A4A4A", + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "paddingLeft": 11, + "paddingRight": 11 + }, + "title": "Active Alarms" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": false, + "sort": "none", + "sortable": false, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "Symbol-Views/Controller-Views/CommandControlAlarms", + "visible": true, + "width": "auto" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "actions", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "borderColor": "#4A4A4A", + "borderStyle": "solid", + "borderWidth": 1, + "classes": "", + "color": "#4A4A4A", + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "paddingLeft": 11, + "paddingRight": 11 + }, + "title": "Controls" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "view", + "resizable": false, + "sort": "none", + "sortable": false, + "strictWidth": false, + "style": { + "classes": "", + "textAlign": "center" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "Symbol-Views/Controller-Views/CommandControlActions", + "visible": true, + "width": "auto" + } + ], + "dragOrderable": false, + "pager": { + "initialOption": 50 + }, + "rows": { + "height": 44, + "highlight": { + "color": "#EEEEEE" + }, + "striped": { + "enabled": false + }, + "style": { + "backgroundColor": "#FFFFFF", + "borderColor": "#4A4A4A", + "borderStyle": "none", + "borderWidth": 1, + "classes": "Fonts/BodyText14", + "color": "#4A4A4A" + } + }, + "selection": { + "enableRowSelection": false + }, + "style": { + "borderStyle": "none", + "margin": 5, + "overflow": "hidden", + "overflowX": "hidden", + "overflowY": "hidden" + }, + "virtualized": false + }, + "type": "ia.display.table" + } + ], + "custom": { + "Devices": [], + "count": "value", + "delay": 4000 + }, + "events": { + "system": { + "onShutdown": [ + { + "config": { + "script": "\tself.session.custom.command_auth.enabled \u003d False" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "script": "\twhid \u003d self.session.custom.fc\n\tsession_id \u003d self.session.props.id\n\tpage_id \u003d self.view.params.page_name\n\tCommands.analytics.send_page_details(whid, session_id, page_id)" + }, + "scope": "G", + "type": "script" + } + ] + } + }, + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/CT_Main/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/CT_Main/resource.json new file mode 100644 index 0000000..988cda3 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/CT_Main/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2023-09-05T13:27:26Z" + }, + "lastModificationSignature": "94601cb316152d28ca4ee30b9b7f1d310dcb42cfe79275c42f428705059ce8cf" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/CT_Main/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/CT_Main/thumbnail.png new file mode 100644 index 0000000..4f75374 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/CT_Main/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/CT_Main/view.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/CT_Main/view.json new file mode 100644 index 0000000..8c494ee --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/CT_Main/view.json @@ -0,0 +1,7467 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "height": 0.9124, + "width": 0.2638, + "x": 0.0026, + "y": 0.0626 + }, + "props": { + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10 + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "FlexContainer_2" + }, + "position": { + "height": 0.0529, + "width": 0.9791, + "x": 0.0025, + "y": -0.002 + }, + "props": { + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10 + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "FlexContainer_1", + "visible": false + }, + "position": { + "height": 0.1482, + "width": 0.3717, + "x": 0.2761, + "y": 0.8209 + }, + "props": { + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10 + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "component": { + "onEditCellCommit": { + "config": { + "script": "\tpayload \u003d {\n\t\t\"Msg\":\"Event is %s\"%str(event)\n\t}\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\t\n\tsystem.perspective.sendMessage(\"updateAlarmNote\", event, \"page\")" + }, + "scope": "G", + "type": "script" + }, + "onRowDoubleClick": { + "config": { + "script": "\tselectedRowValue\u003devent[\"value\"]\n\tpayload\u003d{\"ID\":selectedRowValue[\"ID\"],\"Name\":selectedRowValue[\"Name\"],\"Priority\":selectedRowValue[\"Priority\"]}\n\tsystem.perspective.sendMessage(\"alarmsTab_selectAlarm\",payload)\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "tableAlarms" + }, + "position": { + "height": 0.7411, + "width": 0.708, + "x": 0.2749, + "y": 0.0632 + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "bidirectional": true, + "path": "session.custom.alarms" + }, + "type": "property" + } + } + }, + "props": { + "cells": { + "style": { + "overflow": "hidden" + } + }, + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Row", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "ID", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 80 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Name", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "string", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 400 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Priority", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "string", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 150 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Type", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "string", + "resizable": false, + "sort": "none", + "sortable": false, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Tested_date_UTC", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "string", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Result", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "string", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "Notes", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "string", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "dragOrderable": false, + "pager": { + "bottom": false, + "initialOption": 1000 + }, + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10, + "overflow": "auto" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "updateAlarmNote", + "pageScope": true, + "script": "\t# implement your handler here\n\trow_index \u003d payload[\"rowIndex\"]\n\tcolumn \u003d payload[\"column\"]\n\t\n\tself.props.data[row_index][column] \u003d payload[\"value\"]", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.table" + }, + { + "meta": { + "name": "Label_7" + }, + "position": { + "height": 0.0318, + "width": 0.0626, + "x": -0.0988, + "y": 0.3665 + }, + "props": { + "text": "Timestamp ms" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_4", + "visible": false + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "75% 137%" + }, + "width": 0.1666, + "x": 0.2988, + "y": 0.8376 + }, + "props": { + "style": { + "fontWeight": "bolder" + }, + "text": "Information" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{}\n\tpayload[\"containerName\"]\u003dself.parent.meta.name\n\tpayload[\"targetTable\"]\u003d\"tableAlarms\"\n\tsystem.perspective.sendMessage(\"exportFile\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_18", + "tooltip": { + "enabled": true, + "text": "Exports Alarms Table Data" + } + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.1933, + "y": 0.9258 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/import_export" + } + }, + "primary": false, + "text": "Export" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.sendMessage(\"alarmsTab_init\")\n\tself.session.custom.alarms \u003d[]" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "buttonInit", + "tooltip": { + "enabled": true, + "text": "Reset Alarm List and User Inputs" + } + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.1224, + "y": 0.9258 + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#000000", + "path": "material/refresh" + } + }, + "primary": false, + "text": "Reset" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.getChild(\"root\").custom.displayUpload \u003d True" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Uploads" + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.0193, + "y": 0.0173 + }, + "props": { + "image": { + "icon": { + "path": "material/import_export" + } + }, + "primary": false, + "text": "Uploads" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"status\":1,\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"sendSimulationEvent\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_12", + "tooltip": { + "enabled": true, + "text": "Send Alarm Active Message" + } + }, + "position": { + "height": 0.0385, + "width": 0.1408, + "x": 0.1223, + "y": 0.3082 + }, + "props": { + "image": { + "icon": { + "color": "#FFFFFF", + "path": "material/power_settings_new" + } + }, + "text": "Activate" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"status\":0,\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"sendSimulationEvent\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_13", + "tooltip": { + "enabled": true, + "text": "Send Alarm De-active Message" + } + }, + "position": { + "height": 0.0385, + "width": 0.1408, + "x": 0.1223, + "y": 0.3515 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/not_interested" + } + }, + "primary": false, + "text": "De-activate" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "textFieldEventsCommandParams_Timestamp", + "visible": false + }, + "position": { + "height": 0.0318, + "width": 0.1079, + "x": 0.1223, + "y": 0.2716 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "expression": "toStr(toMillis({../DateTimeInput.props.value}))" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "textAlign": "right" + }, + "tex": "" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_10" + }, + "position": { + "height": 0.0318, + "width": 0.0803, + "x": 0.0287, + "y": 0.1251 + }, + "props": { + "text": "Controller" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "dropdownEventsCommandParams_Target" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "50% 169%" + }, + "width": 0.142, + "x": 0.1223, + "y": 0.0886 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": "session.custom.sources" + }, + "transforms": [ + { + "code": "\toptions \u003d []\n\tfor source in value :\n\t\topt \u003d {\n\t\t \"value\":source[\"Source\"],\n\t\t \"label\":source[\"Source\"]\n\t\t}\n\t\toptions.append(opt)\n\t\t\n\treturn options ", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "showClearIcon": true, + "value": null + }, + "type": "ia.input.dropdown" + }, + { + "meta": { + "name": "textFieldEventsCommandParams_EventDescription" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "375% -109%" + }, + "width": 0.1418, + "x": 0.1223, + "y": 0.1617 + }, + "props": { + "enabled": false, + "style": { + "textAlign": "right" + }, + "tex": "" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_8" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "75% 137%" + }, + "width": 0.0803, + "x": 0.0287, + "y": 0.0886 + }, + "props": { + "text": "Source ID" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_14" + }, + "position": { + "height": 0.0318, + "width": 0.0803, + "x": 0.0287, + "y": 0.1617 + }, + "props": { + "text": "Alarm Description" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"testResult\":\"PASSED\",\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"setTestResult\", payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_14", + "tooltip": { + "enabled": true, + "text": "Scada State Matches Alarms State " + } + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.1223, + "y": 0.4429 + }, + "props": { + "image": { + "icon": { + "color": "#323232", + "path": "material/check_circle_outline" + } + }, + "primary": false, + "text": "Passed" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"testResult\":\"FAILED\",\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"setTestResult\", payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_15", + "tooltip": { + "enabled": true, + "text": "Scada State Does Not Matche Alarms State " + } + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.1932, + "y": 0.4429 + }, + "props": { + "image": { + "icon": { + "color": "#323232", + "path": "material/highlight_off" + } + }, + "primary": false, + "text": "Failed" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_6" + }, + "position": { + "height": 0.0318, + "width": 0.0803, + "x": 0.0287, + "y": 0.1983 + }, + "props": { + "text": "ID" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "textFieldEventsCommandParams_EventID" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "375% -109%" + }, + "width": 0.1418, + "x": 0.1223, + "y": 0.1983 + }, + "props": { + "enabled": false, + "style": { + "textAlign": "right" + }, + "tex": "" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_13" + }, + "position": { + "height": 0.0318, + "width": 0.0803, + "x": 0.0287, + "y": 0.2348 + }, + "props": { + "text": "Priority" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "textField_alarmPriority", + "tooltip": { + "style": { + "classes": "Alarms-Styles/Critical" + } + } + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "375% -109%" + }, + "width": 0.1418, + "x": 0.1223, + "y": 0.2348 + }, + "props": { + "enabled": false, + "style": { + "textAlign": "right" + }, + "tex": "" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_20" + }, + "position": { + "height": 0.0318, + "width": 0.0803, + "x": 0.0287, + "y": 0.2714 + }, + "props": { + "text": "Date and time" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "DateTimeInput" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "-58% 268%" + }, + "width": 0.1079, + "x": 0.1223, + "y": 0.2714 + }, + "props": { + "format": "YYYY-MM-DD hh:mm:ss", + "formattedValue": "2023-08-29 12:11:39", + "tex": "", + "text": "", + "value": 1693311099006 + }, + "type": "ia.input.date-time-input" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t\n\tnow \u003d system.date.now()\n\t\n\ttimeNow\u003dsystem.date.toMillis(now)\n\tself.getSibling(\"DateTimeInput\").props.value \u003d timeNow\n\t\n\t\n\tMsg \u003d \"Setting time of message to %s\"%now\n\tpayload \u003d {\n\t\t\"Msg\":Msg\n\t}\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "buttonInit_2" + }, + "position": { + "height": 0.0318, + "width": 0.0308, + "x": 0.2328, + "y": 0.2727 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/access_time" + } + }, + "primary": false, + "text": "" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "textFieldTargetPLC" + }, + "position": { + "height": 0.0318, + "width": 0.142, + "x": 0.1223, + "y": 0.1251 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "../dropdownEventsCommandParams_Target.props.value" + }, + "transforms": [ + { + "code": "\ttry:\n\t\treturn value.split(\"/\")[0]\n\texcept:\n\t\treturn \"\"", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "enabled": false, + "style": { + "textAlign": "right" + }, + "tex": "" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "EmbeddedView", + "tooltip": { + "enabled": true, + "text": "User Feedback" + } + }, + "position": { + "height": 0.153, + "width": 0.708, + "x": 0.2742, + "y": 0.82 + }, + "props": { + "path": "Main-Views/Commissioning Tool/UserFeedBack", + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10, + "overflow": "auto" + } + }, + "type": "ia.display.view" + } + ], + "custom": { + "dateTimeCommandSent": { + "$": [ + "ts", + 192, + 1668596541256 + ], + "$ts": 1668596541109 + }, + "testingAlarmPriority1": "", + "testingAlarmPriority2": "", + "testingAlarmPriority3": "", + "testingAlarmPriority4": "" + }, + "meta": { + "name": "ContainerAlarms" + }, + "props": { + "mode": "percent" + }, + "type": "ia.container.coord" + }, + { + "children": [ + { + "meta": { + "name": "FlexContainer_3" + }, + "position": { + "height": 0.9105, + "width": 0.2664, + "x": 0.0021, + "y": 0.0644 + }, + "props": { + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10 + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "FlexContainer_2" + }, + "position": { + "height": 0.0549, + "width": 0.9776, + "x": 0.0026, + "y": -0.001 + }, + "props": { + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10 + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "component": { + "onEditCellCommit": { + "config": { + "script": "\tpayload \u003d {\n\t\t\"Msg\":\"Event is %s\"%str(event)\n\t}\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\t\n\tsystem.perspective.sendMessage(\"updateSourceNote\", event, \"page\")" + }, + "scope": "G", + "type": "script" + }, + "onRowDoubleClick": { + "config": { + "script": "\tselectedRowValue\u003devent[\"value\"]\n\tpayload\u003d{\"Source\":selectedRowValue[\"Source\"]}\n\tsystem.perspective.sendMessage(\"sourcesTab_selectSource\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "tableSources" + }, + "position": { + "height": 0.7382, + "width": 0.7049, + "x": 0.2751, + "y": 0.0649 + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "bidirectional": true, + "path": "session.custom.sources" + }, + "type": "property" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Row", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "ID", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 80 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Source", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Tested_date_UTC", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Result", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "Notes", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "pager": { + "initialOption": 1000 + }, + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10, + "overflow": "auto" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "updateSourceNote", + "pageScope": true, + "script": "\t# implement your handler here\n\trow_index \u003d payload[\"rowIndex\"]\n\tcolumn \u003d payload[\"column\"]\n\t\n\tself.props.data[row_index][column] \u003d payload[\"value\"]", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.table" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.sendMessage(\"sourcesTab_init\")\n\tself.session.custom.sources \u003d []\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "buttonInit" + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.1286, + "y": 0.9241 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/refresh" + } + }, + "primary": false, + "text": "Reset" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_8" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "75% 133%" + }, + "width": 0.0808, + "x": 0.0293, + "y": 0.0898 + }, + "props": { + "text": "Source ID" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "textFieldEventsCommandParams_Timestamp", + "visible": false + }, + "position": { + "height": 0.0318, + "width": 0.1084, + "x": 0.1231, + "y": 0.2387 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "expression": "toStr(toMillis({../DateTimeInput.props.value}))" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "textAlign": "right" + } + }, + "type": "ia.input.text-field" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t\n\ttimeNow\u003dsystem.date.toMillis(system.date.now())\n\tself.getSibling(\"DateTimeInput\").props.value \u003d timeNow\n\tself.getSibling(\"textFieldEventsCommandParams_Timestamp\").props.text \u003d timeNow\n\t\n\tMsg \u003d \"Setting time of message to %s\"%system.date.now()\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "buttonInit_1" + }, + "position": { + "height": 0.0318, + "width": 0.0287, + "x": 0.2364, + "y": 0.2387 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/access_time" + } + }, + "primary": false, + "text": "" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_6" + }, + "position": { + "height": 0.0318, + "width": 0.0808, + "x": 0.0291, + "y": 0.3118 + }, + "props": { + "text": "ID" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "textFieldEventsCommandParams_EventID" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "375% -109%" + }, + "width": 0.1403, + "x": 0.1246, + "y": 0.3118 + }, + "props": { + "enabled": false, + "style": { + "textAlign": "right" + }, + "text": "1" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_14" + }, + "position": { + "height": 0.0318, + "width": 0.0808, + "x": 0.0291, + "y": 0.2013 + }, + "props": { + "text": "Alarm Description" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "textFieldEventsCommandParams_EventDescription" + }, + "position": { + "height": 0.0318, + "width": 0.1423, + "x": 0.124, + "y": 0.2013 + }, + "props": { + "enabled": false, + "style": { + "textAlign": "right" + }, + "text": "AccessDoorOpenedFault1" + }, + "type": "ia.input.text-field" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"status\":1,\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"sendSimulationEvent\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_12" + }, + "position": { + "height": 0.0385, + "width": 0.1387, + "x": 0.1251, + "y": 0.3484 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/power_settings_new" + } + }, + "text": "Activate" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"status\":0,\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"sendSimulationEvent\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_13" + }, + "position": { + "height": 0.0385, + "width": 0.1387, + "x": 0.1251, + "y": 0.3917 + }, + "props": { + "image": { + "icon": { + "color": "000000", + "path": "material/not_interested" + } + }, + "primary": false, + "text": "De-activate" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"testResult\":\"PASSED\",\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"setTestResult\", payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_15" + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.1242, + "y": 0.5462 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/check_circle_outline" + } + }, + "primary": false, + "text": "Passed" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"testResult\":\"FAILED\",\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"setTestResult\", payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_16" + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.1961, + "y": 0.5462 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/highlight_off" + } + }, + "primary": false, + "text": "Failed" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{}\n\tpayload[\"containerName\"]\u003dself.parent.meta.name\n\tpayload[\"targetTable\"]\u003d\"tableSources\"\n\tsystem.perspective.sendMessage(\"exportFile\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_18" + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.2007, + "y": 0.9243 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/import_export" + } + }, + "primary": false, + "text": "Export" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\talarm \u003d self.parent.custom.testingAlarmPriority1\n\tpayload\u003d{\"alarm\":alarm}\n\tsystem.perspective.sendMessage(\"sourcesTab_setAlarm\", payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_17" + }, + "position": { + "height": 0.0318, + "width": 0.0261, + "x": 0.1254, + "y": 0.1631 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "if({parent.custom.testingAlarmPriority1}\u003d\u0027{}\u0027 || {parent.custom.testingAlarmPriority1}\u003d\u0027\u0027, False, True) " + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "session.custom.colours.colour_impaired" + }, + "transforms": [ + { + "code": "\tif not value:\n\t\treturn \"Alarms-Styles/Diagnostic\"\n\telse:\n\t\treturn \"Alarms-Styles/Alt-Colours/Diagnostic\"\n\t\t ", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "style": {}, + "text": 1 + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\talarm \u003d self.parent.custom.testingAlarmPriority2\n\tpayload\u003d{\"alarm\":alarm}\n\tsystem.perspective.sendMessage(\"sourcesTab_setAlarm\", payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_19" + }, + "position": { + "height": 0.0318, + "width": 0.0266, + "x": 0.1566, + "y": 0.1631 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "if({parent.custom.testingAlarmPriority2}\u003d\u0027{}\u0027 || {parent.custom.testingAlarmPriority2}\u003d\u0027\u0027, False, True) " + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "session.custom.colours.colour_impaired" + }, + "transforms": [ + { + "code": "\tif not value:\n\t\treturn \"Alarms-Styles/Low\"\n\telse:\n\t\treturn \"Alarms-Styles/Alt-Colours/Low\"\n\t\t ", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "style": {}, + "text": 2 + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\talarm \u003d self.parent.custom.testingAlarmPriority3\n\tpayload\u003d{\"alarm\":alarm}\n\tsystem.perspective.sendMessage(\"sourcesTab_setAlarm\", payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_20" + }, + "position": { + "height": 0.0318, + "width": 0.0261, + "x": 0.1879, + "y": 0.1631 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "if({parent.custom.testingAlarmPriority3}\u003d\u0027{}\u0027 || {parent.custom.testingAlarmPriority3}\u003d\u0027\u0027, False, True) " + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "session.custom.colours.colour_impaired" + }, + "transforms": [ + { + "code": "\tif not value:\n\t\treturn \"Alarms-Styles/Medium\"\n\telse:\n\t\treturn \"Alarms-Styles/Alt-Colours/Medium\"\n\t\t ", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "style": {}, + "text": 3 + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\talarm \u003d self.parent.custom.testingAlarmPriority4\n\tpayload\u003d{\"alarm\":alarm}\n\tsystem.perspective.sendMessage(\"sourcesTab_setAlarm\", payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_21" + }, + "position": { + "height": 0.0318, + "width": 0.0261, + "x": 0.2192, + "y": 0.1631 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "if({parent.custom.testingAlarmPriority4}\u003d\u0027{}\u0027 || {parent.custom.testingAlarmPriority4}\u003d\u0027\u0027, False, True) " + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "session.custom.colours.colour_impaired" + }, + "transforms": [ + { + "code": "\tif not value:\n\t\treturn \"Alarms-Styles/High\"\n\telse:\n\t\treturn \"Alarms-Styles/Alt-Colours/High\"\n\t\t ", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "style": {}, + "text": 4 + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_13" + }, + "position": { + "height": 0.0318, + "width": 0.0808, + "x": 0.0291, + "y": 0.2752 + }, + "props": { + "text": "Priority" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "textField_alarmPriority", + "tooltip": { + "style": { + "classes": "Alarms-Styles/Critical" + } + } + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "375% -109%" + }, + "width": 0.1403, + "x": 0.1241, + "y": 0.2752 + }, + "props": { + "enabled": false, + "style": { + "textAlign": "right" + }, + "text": "High" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_20" + }, + "position": { + "height": 0.0318, + "width": 0.0808, + "x": 0.0291, + "y": 0.2361 + }, + "props": { + "text": "Date and time" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "DateTimeInput" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "50% 62%" + }, + "width": 0.1074, + "x": 0.1242, + "y": 0.2377 + }, + "props": { + "format": "YYYY-MM-DD hh:mm:ss", + "formattedValue": "2023-08-30 12:28:29", + "text": "", + "value": 1693398509608 + }, + "type": "ia.input.date-time-input" + }, + { + "meta": { + "name": "Label_11" + }, + "position": { + "height": 0.0318, + "width": 0.0808, + "x": 0.0291, + "y": 0.1264 + }, + "props": { + "text": "Controller" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "textFieldTargetPLC" + }, + "position": { + "height": 0.0318, + "width": 0.1418, + "x": 0.1242, + "y": 0.1264 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "../textField_SelectedTarget.props.text" + }, + "transforms": [ + { + "code": "\treturn value.split(\"/\")[0]", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "enabled": false, + "style": { + "textAlign": "right" + }, + "tex": "" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_16" + }, + "position": { + "height": 0.0318, + "width": 0.0808, + "x": 0.0294, + "y": 0.1631 + }, + "props": { + "text": "Alarm Priority" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "textField_SelectedTarget" + }, + "position": { + "height": 0.0318, + "width": 0.1423, + "x": 0.124, + "y": 0.0898 + }, + "props": { + "enabled": false, + "style": { + "textAlign": "right" + }, + "tex": "", + "text": "PLC01/UL5-2/ESTOP2" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "StatusIcon" + }, + "position": { + "height": 0.0799, + "rotate": { + "anchor": "50% 40%" + }, + "width": 0.0693, + "x": 0.1954, + "y": 0.4562 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "if({this.props.params.tagProps[0]}\u003d\u0027\u0027,False,True)" + }, + "type": "expr" + } + }, + "props.params.tagProps[0]": { + "binding": { + "config": { + "path": "../dropdownEventsCommandParams_Target.props.value" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "tagProps": [ + null, + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "path": "Symbol-Views/Equipment-Views/ControlCabinet", + "useDefaultViewWidth": true + }, + "type": "ia.display.view" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.getChild(\"root\").custom.displayUpload \u003d True" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Uploads" + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.0193, + "y": 0.0163 + }, + "props": { + "image": { + "icon": { + "path": "material/import_export" + } + }, + "primary": false, + "text": "Uploads" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "height": 0.153, + "width": 0.7044, + "x": 0.2763, + "y": 0.8212 + }, + "props": { + "path": "Main-Views/Commissioning Tool/UserFeedBack", + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10, + "overflow": "auto" + } + }, + "type": "ia.display.view" + } + ], + "custom": { + "testingAlarmPriority1": { + "id": "3", + "message": "BufferBatteryErrorSystemWarning1", + "priority": "Diagnostic", + "type": "0" + }, + "testingAlarmPriority2": "", + "testingAlarmPriority3": { + "id": "22", + "message": "ExternalUnitFault1", + "priority": "Medium", + "type": "0" + }, + "testingAlarmPriority4": { + "id": "1", + "message": "AccessDoorOpenedFault1", + "priority": "High", + "type": "1" + } + }, + "meta": { + "name": "ContainerSources" + }, + "position": { + "tabIndex": 1 + }, + "props": { + "mode": "percent" + }, + "type": "ia.container.coord" + }, + { + "children": [ + { + "meta": { + "name": "FlexContainer_3" + }, + "position": { + "height": 0.9192, + "width": 0.2534, + "x": 0.003, + "y": 0.0635 + }, + "props": { + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10 + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "FlexContainer_5" + }, + "position": { + "height": 0.0597, + "width": 0.9797, + "x": 0.0032, + "y": -0.0058 + }, + "props": { + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10 + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"fileFormat\":\"csv\"}\n\tsystem.perspective.sendMessage(\"measurementTab_exportFile\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_18" + }, + "position": { + "height": 0.0385, + "width": 0.0673, + "x": 0.1884, + "y": 0.9278 + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#000000", + "path": "material/import_export" + } + }, + "primary": false, + "text": "Export" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileExtension\":event.file.name.split(\".\")[1]}\n\tsystem.perspective.sendMessage(\"measurementTab_importFile\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload_0" + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.0197, + "y": 0.0159 + }, + "props": { + "fileUploadIcon": { + "color": "#000000", + "path": "material/import_export", + "style": { + "borderStyle": "none" + } + }, + "maxUploads": 1, + "style": { + "backgroundColor": "#FAFAFA", + "borderStyle": "solid", + "classes": "" + }, + "supportedFileTypes": [ + "csv" + ] + }, + "type": "ia.input.fileupload" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.sendMessage(\"measurementTab_changeSelectedPLC\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "dropdownTargetPLC" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "50% 169%" + }, + "width": 0.1413, + "x": 0.1141, + "y": 0.1304 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": "session.custom.sources" + }, + "transforms": [ + { + "code": "\toptions \u003d []\n\tlist_of_controllers \u003d []\n\tfor source in value :\n\t\ttry:\n\t\t\tcontroller \u003d source[\"Source\"].split(\"/\")[0]\n\t\texcept:\n\t\t\tcontinue\n\t\t\n\t\tif controller in list_of_controllers:\n\t\t\tcontinue\t\n\t\t\n\t\tlist_of_controllers.append(controller)\n\t\t\n\t\topt \u003d {\n\t\t \"value\":controller,\n\t\t \"label\": controller\n\t\t}\n\t\toptions.append(opt)\n\t\t\n\treturn options ", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "placeholder": { + "text": "Select Controller..." + }, + "showClearIcon": true, + "value": "PLC01" + }, + "type": "ia.input.dropdown" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.sendMessage(\"measurementTab_init\")\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "buttonInit" + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.1126, + "y": 0.9278 + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#000000", + "path": "material/refresh" + } + }, + "primary": false, + "text": "Reset" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_11" + }, + "position": { + "height": 0.0318, + "width": 0.0933, + "x": 0.022, + "y": 0.1312 + }, + "props": { + "text": "Controller" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.sendMessage(\"measurementTab_sendEvent\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_17" + }, + "position": { + "height": 0.0385, + "width": 0.1449, + "x": 0.1126, + "y": 0.8263 + }, + "props": { + "image": { + "icon": { + "color": "#FFFFFF", + "path": "material/power_settings_new" + } + }, + "text": "Send Sequence" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "rowOfLastMessageSent", + "visible": false + }, + "position": { + "height": 0.0308, + "rotate": { + "anchor": "50% 38%" + }, + "width": 0.0313, + "x": 0.6155, + "y": 0.9464 + }, + "props": { + "enabled": false, + "value": 1 + }, + "type": "ia.input.numeric-entry-field" + }, + { + "meta": { + "name": "Label_13" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "75% 137%" + }, + "width": 0.0933, + "x": 0.022, + "y": 0.0935 + }, + "props": { + "text": "Source ID" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "dropdownEventsCommandParams_Target" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "50% 169%" + }, + "width": 0.1413, + "x": 0.1141, + "y": 0.0928 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": "session.custom.sources" + }, + "transforms": [ + { + "code": "\toptions \u003d []\n\tfor source in value :\n\t\topt \u003d {\n\t\t \"value\":source[\"Source\"],\n\t\t \"label\": source[\"Source\"]\n\t\t}\n\t\toptions.append(opt)\n\t\t\n\treturn options ", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "placeholder": { + "text": "Select Source ID..." + }, + "showClearIcon": true, + "value": "PLC01/UL5-1" + }, + "type": "ia.input.dropdown" + }, + { + "meta": { + "name": "dropdownMeasurementName" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "50% 169%" + }, + "width": 0.1444, + "x": 0.1148, + "y": 0.3525 + }, + "props": { + "options": [ + { + "label": "RESULT_NOREAD", + "value": "RESULT_NOREAD" + }, + { + "label": "RESULT_MULTIREAD", + "value": "RESULT_MULTIREAD" + }, + { + "label": "RESULT_SAL_CODE_AT_INFEED", + "value": "RESULT_SAL_CODE_AT_INFEED" + }, + { + "label": "RESULT_INSUFFICIENT_GAP_AT_INFEED", + "value": "RESULT_INSUFFICIENT_GAP_AT_INFEED" + }, + { + "label": "RESULT_NOT_ALIGNED", + "value": "RESULT_NOT_ALIGNED" + }, + { + "label": "RESULT_WRONG_ORIENTATION", + "value": "RESULT_WRONG_ORIENTATION" + }, + { + "label": "RESULT_OVER_LENGTH", + "value": "RESULT_OVER_LENGTH" + }, + { + "label": "RESULT_NODATA", + "value": "RESULT_NODATA" + }, + { + "label": "RESULT_BAD_REQUEST", + "value": "RESULT_BAD_REQUEST" + }, + { + "label": "RESULT_AEG_ERROR", + "value": "RESULT_AEG_ERROR" + }, + { + "label": "RESULT_VERIFY_SALNOREAD", + "value": "RESULT_VERIFY_SALNOREAD" + }, + { + "label": "RESULT_VERIFY_SHIPNOREAD", + "value": "RESULT_VERIFY_SHIPNOREAD" + }, + { + "label": "RESULT_VERIFY_SALMISMATCH", + "value": "RESULT_VERIFY_SALMISMATCH" + }, + { + "label": "RESULT_SAFETY_STOP_FLUSH", + "value": "RESULT_SAFETY_STOP_FLUSH" + }, + { + "label": "RESULT_VERIFY_SAL_MULTIREAD", + "value": "RESULT_VERIFY_SAL_MULTIREAD" + }, + { + "label": "RESULT_MISMATCH_FLUSH", + "value": "RESULT_MISMATCH_FLUSH" + }, + { + "label": "RESULT_PITCH_OR_TRACKING_ERROR", + "value": "RESULT_PITCH_OR_TRACKING_ERROR" + }, + { + "label": "RESULT_CAMERA_ERROR_INDUCT", + "value": "RESULT_CAMERA_ERROR_INDUCT" + }, + { + "label": "RESULT_CAMERA_ERROR_VERIFY", + "value": "RESULT_CAMERA_ERROR_VERIFY" + }, + { + "label": "RESULT_TAMP_FAILED_TO_EXTEND", + "value": "RESULT_TAMP_FAILED_TO_EXTEND" + }, + { + "label": "RESULT_MISC_ERROR_OPERATIONS", + "value": "RESULT_MISC_ERROR_OPERATIONS" + }, + { + "label": "RESULT_MISC_ERROR_MACHINE", + "value": "RESULT_MISC_ERROR_MACHINE" + }, + { + "label": "RESULT_UNKNOWN", + "value": "RESULT_UNKNOWN" + }, + { + "label": "RESULT_SUCCESS_SIDELINE", + "value": "RESULT_SUCCESS_SIDELINE" + }, + { + "label": "RESULT_SUCCESS", + "value": "RESULT_SUCCESS" + } + ], + "showClearIcon": true, + "value": "RESULT_INSUFFICIENT_GAP_AT_INFEED" + }, + "type": "ia.input.dropdown" + }, + { + "meta": { + "name": "delta" + }, + "position": { + "height": 0.0318, + "width": 0.1444, + "x": 0.1143, + "y": 0.3891 + }, + "props": { + "inputBounds": { + "maximum": 10000, + "minimum": 1 + }, + "value": 100 + }, + "type": "ia.input.numeric-entry-field" + }, + { + "meta": { + "name": "Label_16" + }, + "position": { + "height": 0.0318, + "width": 0.0792, + "x": 0.0218, + "y": 0.3911 + }, + "props": { + "text": "Delta" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_17" + }, + "position": { + "height": 0.0318, + "width": 0.0808, + "x": 0.0218, + "y": 0.3545 + }, + "props": { + "text": "Measurement name" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.sendMessage(\"measurementTab_setMeasurementInTable\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_29" + }, + "position": { + "height": 0.0385, + "width": 0.1444, + "x": 0.1143, + "y": 0.4988 + }, + "props": { + "image": { + "icon": { + "color": "#323232", + "path": "material/control_point" + } + }, + "primary": false, + "text": "Set Measurement" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_18" + }, + "position": { + "height": 0.0318, + "width": 0.0792, + "x": 0.0218, + "y": 0.4276 + }, + "props": { + "text": "Unit" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_19" + }, + "position": { + "height": 0.0318, + "width": 0.0792, + "x": 0.0218, + "y": 0.4642 + }, + "props": { + "text": "Sampling ms" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "sampling" + }, + "position": { + "height": 0.0318, + "width": 0.1444, + "x": 0.1143, + "y": 0.4622 + }, + "props": { + "inputBounds": { + "minimum": 1 + }, + "value": 1 + }, + "type": "ia.input.numeric-entry-field" + }, + { + "meta": { + "name": "textFieldUnit" + }, + "position": { + "height": 0.0318, + "width": 0.1444, + "x": 0.1143, + "y": 0.4256 + }, + "props": { + "style": { + "textAlign": "right" + }, + "text": "un" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_22" + }, + "position": { + "height": 0.0318, + "width": 0.0975, + "x": 0.0222, + "y": 0.7102 + }, + "props": { + "text": "Current state" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"targetEventState\":\"1\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setEventState\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_30" + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.115, + "y": 0.6 + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#323232", + "path": "material/power_settings_new" + } + }, + "primary": false, + "text": "Set On" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"targetEventState\":\"0\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setEventState\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_31" + }, + "position": { + "height": 0.0385, + "width": 0.0683, + "x": 0.189, + "y": 0.6 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/not_interested" + } + }, + "primary": false, + "text": "Set Off" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_24" + }, + "position": { + "height": 0.0318, + "width": 0.0928, + "x": 0.022, + "y": 0.5628 + }, + "props": { + "text": "Alarm ID" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_23" + }, + "position": { + "height": 0.0318, + "width": 0.0975, + "x": 0.022, + "y": 0.6 + }, + "props": { + "text": "Signal state" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"targetState\":\"1\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setState\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_33" + }, + "position": { + "height": 0.0385, + "width": 0.0454, + "x": 0.1145, + "y": 0.7094 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/control_point" + } + }, + "primary": false, + "text": "Fault" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"targetState\":\"2\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setState\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_34" + }, + "position": { + "height": 0.0385, + "width": 0.0454, + "x": 0.1635, + "y": 0.7094 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/control_point" + } + }, + "primary": false, + "text": "Stop" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"targetState\":\"3\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setState\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_35" + }, + "position": { + "height": 0.0385, + "width": 0.0459, + "x": 0.2126, + "y": 0.7094 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/control_point" + } + }, + "primary": false, + "text": "Run" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "height": 0.7584, + "width": 0.7226, + "x": 0.2591, + "y": 0.0641 + }, + "propConfig": { + "props.params.last_message_index": { + "binding": { + "config": { + "path": "../rowOfLastMessageSent.props.value" + }, + "type": "property" + } + }, + "props.params.tabledata": { + "binding": { + "config": { + "path": "../tableSequence.props.data" + }, + "type": "property" + } + } + }, + "props": { + "path": "Main-Views/Commissioning Tool/SequenceTester", + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10, + "overflow": "visible" + } + }, + "type": "ia.display.view" + }, + { + "events": { + "component": { + "onRowDoubleClick": { + "config": { + "script": "\tselectedRowValue\u003devent[\"value\"]\n\t#payload\u003d{\"Source\":selectedRowValue[\"Source\"]}\n\t#system.perspective.sendMessage(\"sourcesTab_selectSource\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "tableSequence", + "visible": false + }, + "position": { + "height": 0.5938, + "width": 0.6747, + "x": 0.3011, + "y": 0.2369 + }, + "propConfig": { + "props.selection.data": { + "onChange": { + "enabled": null, + "script": "\tsystem.perspective.sendMessage(\"tableSelectionData\", self.props.selection.data, \"page\")" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Seq", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 100 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "dragOrderable": false, + "items": [], + "pager": { + "initialOption": 1000 + }, + "resizeMode": "fixed", + "selection": { + "mode": "multiple interval" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update_selectionData", + "pageScope": true, + "script": "\tself.props.data\n\t\n\t# implement your handler here\n\tseq\u003d payload[\"index\"]\n\tstate \u003d payload[\"state\"]\n\tsystem.perspective.print(seq)\n\tsystem.perspective.print(state)\n\t\n\tself.props.data[seq][\"Selected\"] \u003d state\n", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "ClearSelection", + "pageScope": true, + "script": "\tsystem.perspective.print(\"clearSelection\")\n\tfor item in self.props.data:\n\t\titem[\"Selected\"] \u003d False", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "ClearAll", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.props.data \u003d []", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "SelectAll", + "pageScope": true, + "script": "\t# implement your handler here\n\t\n\tfor item in self.props.data:\n\t\titem[\"Selected\"] \u003d True", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.table" + }, + { + "meta": { + "name": "Label_20" + }, + "position": { + "height": 0.0318, + "width": 0.1251, + "x": 0.0185, + "y": 0.5318 + }, + "props": { + "text": "Events", + "textStyle": { + "fontSize": 12, + "fontStyle": "italic", + "fontWeight": "bolder", + "textDecoration": "underline" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_26" + }, + "position": { + "height": 0.0318, + "width": 0.0912, + "x": 0.0185, + "y": 0.3163 + }, + "props": { + "text": "Measurement Event", + "textStyle": { + "fontSize": 12, + "fontStyle": "italic", + "fontWeight": "bolder", + "textDecoration": "underline" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_27" + }, + "position": { + "height": 0.0318, + "width": 0.0912, + "x": 0.0185, + "y": 0.6356 + }, + "props": { + "text": "State Changed Event", + "textStyle": { + "fontSize": 12, + "fontStyle": "italic", + "fontWeight": "bolder", + "textDecoration": "underline" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_15" + }, + "position": { + "height": 0.0318, + "width": 0.0813, + "x": 0.0208, + "y": 0.208 + }, + "props": { + "text": "Offset ms" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_25" + }, + "position": { + "height": 0.0318, + "width": 0.0778, + "x": 0.0208, + "y": 0.1693 + }, + "props": { + "text": "Date and time" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_8" + }, + "position": { + "height": 0.0318, + "width": 0.0892, + "x": 0.0206, + "y": 0.2433 + }, + "props": { + "text": "Delay between Msg" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "textFieldEventsCommandParams_Timestamp", + "visible": false + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "117% 50%" + }, + "width": 0.109, + "x": 0.114, + "y": 0.1989 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "expression": "toStr(toMillis({../DateTimeInput_0.props.value}))" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "textAlign": "right" + } + }, + "type": "ia.input.text-field" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\ttimeNow\u003dsystem.date.now()\n\ttimestamp \u003d system.date.toMillis(timeNow)\n\t\n\tself.getSibling(\"DateTimeInput_0\").props.value \u003d timestamp\n\tself.getSibling(\"textFieldEventsCommandParams_Timestamp\").props.text \u003d timestamp\n\t\n\tMsg \u003d \"Setting time of messages to %s\"%timeNow\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "buttonInit_1" + }, + "position": { + "height": 0.0318, + "width": 0.0292, + "x": 0.2262, + "y": 0.1675 + }, + "props": { + "image": { + "icon": { + "color": "#323232", + "path": "material/access_time" + } + }, + "primary": false, + "text": "" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "textFieldInterval" + }, + "position": { + "height": 0.0318, + "width": 0.1413, + "x": 0.1142, + "y": 0.2414 + }, + "props": { + "inputBounds": { + "minimum": 1 + }, + "value": 100 + }, + "type": "ia.input.numeric-entry-field" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.sendMessage(\"measurementTab_setTimestampInTable\")\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_22" + }, + "position": { + "height": 0.0385, + "width": 0.1413, + "x": 0.1143, + "y": 0.2798 + }, + "props": { + "image": { + "icon": { + "color": "#323232", + "path": "material/control_point" + } + }, + "primary": false, + "text": "Set Sequence Data" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "timestampOffset" + }, + "position": { + "height": 0.0318, + "width": 0.1408, + "x": 0.1143, + "y": 0.2061 + }, + "props": { + "inputBounds": { + "minimum": 1 + }, + "value": 1000 + }, + "type": "ia.input.numeric-entry-field" + }, + { + "meta": { + "name": "DateTimeInput_0" + }, + "position": { + "height": 0.0318, + "width": 0.109, + "x": 0.1128, + "y": 0.1674 + }, + "props": { + "format": "YYYY-MM-DD hh:mm:ss", + "formattedValue": "2023-08-29 12:18:17", + "value": 1693311497777 + }, + "type": "ia.input.date-time-input" + }, + { + "meta": { + "name": "Label_28" + }, + "position": { + "height": 0.0318, + "width": 0.0959, + "x": 0.0222, + "y": 0.6698 + }, + "props": { + "text": "Reason Code" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "dropdownReasonCode" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "50% 169%" + }, + "width": 0.1439, + "x": 0.1146, + "y": 0.6698 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": ".../ContainerAlarms/tableAlarms.props.data" + }, + "transforms": [ + { + "code": "\toptions \u003d []\n\t\n\tfor item in value:\n\t\topt \u003d{\n\t\t\"label\": item[\"Name\"],\n\t\t\"value\": item[\"ID\"]\n\t\t}\n\t\toptions.append(opt)\n\treturn options", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "placeholder": { + "text": "Select Reason Code..." + }, + "showClearIcon": true, + "value": "2" + }, + "type": "ia.input.dropdown" + }, + { + "meta": { + "name": "eventID" + }, + "position": { + "height": 0.0318, + "width": 0.1444, + "x": 0.1135, + "y": 0.5624 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": ".../ContainerAlarms/tableAlarms.props.data" + }, + "transforms": [ + { + "code": "\toptions \u003d []\n\t\t\n\tfor item in value:\n\t\topt \u003d{\n\t\t\"label\": item[\"ID\"],\n\t\t\"value\": item[\"ID\"]\n\t\t}\n\t\toptions.append(opt)\n\treturn options", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "placeholder": { + "text": "Select Alarm ID..." + }, + "value": "69" + }, + "type": "ia.input.dropdown" + }, + { + "meta": { + "name": "Label_29" + }, + "position": { + "height": 0.0318, + "width": 0.1, + "x": 0.0194, + "y": 0.7412 + }, + "props": { + "text": "Mode Changed Event", + "textStyle": { + "fontSize": 12, + "fontStyle": "italic", + "fontWeight": "bolder", + "textDecoration": "underline" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_30" + }, + "position": { + "height": 0.0318, + "width": 0.0975, + "x": 0.0225, + "y": 0.7737 + }, + "props": { + "text": "Current Mode" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"targetState\":\"0\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setMode\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_36" + }, + "position": { + "height": 0.0385, + "width": 0.0454, + "x": 0.1141, + "y": 0.7729 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/control_point" + } + }, + "primary": false, + "text": "Auto" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"targetState\":\"1\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setMode\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_37" + }, + "position": { + "height": 0.0385, + "width": 0.0454, + "x": 0.1627, + "y": 0.7729 + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#000000", + "path": "material/control_point" + } + }, + "primary": false, + "text": "Maint" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"targetState\":\"2\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setMode\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_38" + }, + "position": { + "height": 0.0385, + "width": 0.0459, + "x": 0.2114, + "y": 0.7729 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/control_point" + } + }, + "primary": false, + "text": "Man" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "EmbeddedView_0" + }, + "position": { + "height": 0.1482, + "width": 0.7226, + "x": 0.2592, + "y": 0.8335 + }, + "props": { + "path": "Main-Views/Commissioning Tool/UserFeedBack", + "style": { + "borderStyle": "solid", + "borderWidth": "1px", + "box-shadow": "5px 5px 5px grey", + "marginBottom": 10, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 10, + "overflow": "auto" + } + }, + "type": "ia.display.view" + } + ], + "custom": { + "testingAlarmPriority1": "", + "testingAlarmPriority2": "", + "testingAlarmPriority3": "", + "testingAlarmPriority4": "" + }, + "meta": { + "name": "ContainerMeasurement" + }, + "position": { + "tabIndex": 2 + }, + "props": { + "mode": "percent" + }, + "type": "ia.container.coord" + }, + { + "children": [ + { + "events": { + "component": { + "onRowDoubleClick": { + "config": { + "script": "\tselectedRowValue\u003devent[\"value\"]\n\tself.getSibling(\"textFieldEventID\").props.text \u003d selectedRowValue[\"ID\"]" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "tableAlarms" + }, + "position": { + "height": 0.8758, + "width": 0.7497, + "x": 0.2462, + "y": 0.0434 + }, + "props": { + "pager": { + "bottom": false, + "initialOption": 1000 + }, + "selection": { + "mode": "multiple interval" + } + }, + "type": "ia.display.table" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.sendMessage(\"utilsTab_changeSelectedPLC\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "dropdownTargetPLC" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "50% 169%" + }, + "width": 0.1382, + "x": 0.1042, + "y": 0.0515 + }, + "props": { + "options": [ + { + "label": "PLC01", + "value": "PLC01" + }, + { + "label": "PLC02", + "value": "PLC02" + }, + { + "label": "PLC03", + "value": "PLC03" + }, + { + "label": "PLC09", + "value": "PLC09" + } + ], + "showClearIcon": true, + "textAlign": "right", + "value": "PLC01" + }, + "type": "ia.input.dropdown" + }, + { + "meta": { + "name": "Label_11" + }, + "position": { + "height": 0.0318, + "width": 0.0975, + "x": 0.003, + "y": 0.0515 + }, + "props": { + "text": "Target PLC" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.sendMessage(\"utilsTab_init\")\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "buttonInit" + }, + "position": { + "height": 0.0318, + "width": 0.1366, + "x": 0.1045, + "y": 0.8535 + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "primary": false, + "text": "Reset" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileExtension\":event.file.name.split(\".\")[1]}\n\tsystem.perspective.sendMessage(\"utilsTab_importFile\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload_0" + }, + "position": { + "height": 0.0318, + "width": 0.1137, + "x": 0.0027, + "y": 0.0062 + }, + "props": { + "maxUploads": 1 + }, + "type": "ia.input.fileupload" + }, + { + "meta": { + "name": "dropdownCommandTarget" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "50% 169%" + }, + "width": 0.1382, + "x": 0.1042, + "y": 0.1175 + }, + "props": { + "options": [ + { + "label": "PLC01/10", + "value": "PLC01/10" + }, + { + "label": "PLC01/30", + "value": "PLC01/30" + }, + { + "label": "PLC01/40", + "value": "PLC01/40" + }, + { + "label": "PLC01/50", + "value": "PLC01/50" + }, + { + "label": "PLC01/60", + "value": "PLC01/60" + }, + { + "label": "PLC01/210", + "value": "PLC01/210" + }, + { + "label": "PLC01/220", + "value": "PLC01/220" + }, + { + "label": "PLC01/AIR", + "value": "PLC01/AIR" + }, + { + "label": "PLC01/P1", + "value": "PLC01/P1" + }, + { + "label": "PLC01/S01", + "value": "PLC01/S01" + }, + { + "label": "PLC01/State", + "value": "PLC01/State" + }, + { + "label": "PLC01/ZM1", + "value": "PLC01/ZM1" + }, + { + "label": "PLC01/ZM2", + "value": "PLC01/ZM2" + } + ], + "placeholder": { + "text": "Select Target..." + }, + "showClearIcon": true, + "textAlign": "right", + "value": "PLC01/30" + }, + "type": "ia.input.dropdown" + }, + { + "meta": { + "name": "textFieldEventState", + "visible": false + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "0% 37%" + }, + "width": 0.013, + "x": 0.2449, + "y": 0.6909 + }, + "props": { + "enabled": false, + "text": "0" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_8" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "75% 137%" + }, + "width": 0.097, + "x": 0.0036, + "y": 0.1175 + }, + "props": { + "text": "Command Target" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"command\":\"synchStatus\"}\n\tsystem.perspective.sendMessage(\"utilsTab_handleCommands\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_20" + }, + "position": { + "height": 0.0318, + "width": 0.0652, + "x": 0.1054, + "y": 0.4845 + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "primary": false, + "text": "Synch status" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"command\":\"synchAlarms\"}\n\tsystem.perspective.sendMessage(\"utilsTab_handleCommands\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_21" + }, + "position": { + "height": 0.0318, + "width": 0.0693, + "x": 0.1732, + "y": 0.4845 + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "primary": false, + "text": "Synch alarms" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"command\":\"restoreFromDisconnection\"}\n\tsystem.perspective.sendMessage(\"utilsTab_handleCommands\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_7" + }, + "position": { + "height": 0.0318, + "width": 0.0688, + "x": 0.1735, + "y": 0.4078 + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "primary": false, + "text": "Reconnect" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"command\":\"simulateDisconnection\"}\n\tsystem.perspective.sendMessage(\"utilsTab_handleCommands\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_6" + }, + "position": { + "height": 0.0318, + "width": 0.0662, + "x": 0.1046, + "y": 0.4078 + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "primary": false, + "text": "Disconnect" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "textFieldDisconnectionDuration" + }, + "position": { + "height": 0.0318, + "width": 0.1382, + "x": 0.1042, + "y": 0.3694 + }, + "props": { + "text": "5000" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_15" + }, + "position": { + "height": 0.0288, + "width": 0.1522, + "x": 0.5459, + "y": 0.0113 + }, + "props": { + "text": "Alarm list", + "textStyle": { + "fontWeight": "bolder", + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_13" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "75% 137%" + }, + "width": 0.097, + "x": 0.0036, + "y": 0.1541 + }, + "props": { + "text": "Command Code" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "textFieldCommandCode", + "visible": false + }, + "position": { + "height": 0.0298, + "width": 0.0141, + "x": 0.2438, + "y": 0.2227 + }, + "props": { + "enabled": false, + "text": "1" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_14" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "75% 137%" + }, + "width": 0.097, + "x": 0.0036, + "y": 0.1907 + }, + "props": { + "text": "Command Params" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "textFieldCommandParameters" + }, + "position": { + "height": 0.0318, + "width": 0.1382, + "x": 0.1042, + "y": 0.1907 + }, + "props": { + "enabled": false, + "style": { + "textAlign": "right" + } + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_17" + }, + "position": { + "height": 0.0318, + "width": 0.097, + "x": 0.0036, + "y": 0.2638 + }, + "props": { + "text": "Timestamp" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "textFieldCommandTimestamp" + }, + "position": { + "height": 0.0318, + "width": 0.1011, + "x": 0.1042, + "y": 0.2638 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "expression": "toStr(toMillis({../dateTimeInputCommandTime.props.value}))" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "textAlign": "right" + } + }, + "type": "ia.input.text-field" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\ttimeNow\u003dsystem.date.now()\n\ttimestamp \u003d system.date.toMillis(timeNow)\n\tself.getSibling(\"textFieldCommandTimestamp\").props.text \u003d timestamp" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "buttonInit_2" + }, + "position": { + "height": 0.0318, + "width": 0.0328, + "x": 0.2085, + "y": 0.2638 + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/access_time" + } + }, + "primary": false, + "text": "" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "dateTimeInputCommandTime" + }, + "position": { + "height": 0.0318, + "width": 0.1382, + "x": 0.1042, + "y": 0.2273 + }, + "props": { + "format": "YYYY-MM-DD hh:mm:ss", + "formattedValue": "2022-12-23 04:14:00", + "value": { + "$": [ + "ts", + 0, + 1691659021617 + ], + "$ts": 1671812040000 + } + }, + "type": "ia.input.date-time-input" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload\u003d{\"command\":\"sendCommand\"}\n\tsystem.perspective.sendMessage(\"utilsTab_handleCommands\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_15" + }, + "position": { + "height": 0.0318, + "width": 0.1382, + "x": 0.1042, + "y": 0.3004 + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "primary": false, + "text": "Send command" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_4" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "75% 137%" + }, + "width": 0.097, + "x": 0.0036, + "y": 0.9033 + }, + "props": { + "text": "Information" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "textAreaResult" + }, + "position": { + "height": 0.0616, + "width": 0.9619, + "x": 0.0039, + "y": 0.9324 + }, + "props": { + "enabled": false, + "text": "Init completed" + }, + "type": "ia.input.text-area" + }, + { + "meta": { + "name": "Label_19" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "75% 137%" + }, + "width": 0.0959, + "x": 0.004, + "y": 0.3694 + }, + "props": { + "text": "Disconnection duration" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_20" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "75% 137%" + }, + "width": 0.0959, + "x": 0.004, + "y": 0.4078 + }, + "props": { + "text": "Connection" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_21" + }, + "position": { + "height": 0.0318, + "rotate": { + "anchor": "75% 137%" + }, + "width": 0.0959, + "x": 0.004, + "y": 0.4845 + }, + "props": { + "text": "Sync" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_18" + }, + "position": { + "height": 0.0318, + "width": 0.1382, + "x": 0.1042, + "y": 0.0839 + }, + "props": { + "text": "Commands", + "textStyle": { + "fontWeight": "bolder", + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_22" + }, + "position": { + "height": 0.0318, + "width": 0.1382, + "x": 0.1042, + "y": 0.3328 + }, + "props": { + "text": "Comms Connection", + "textStyle": { + "fontWeight": "bolder", + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_23" + }, + "position": { + "height": 0.0288, + "width": 0.1366, + "x": 0.1046, + "y": 0.4508 + }, + "props": { + "text": "Synchronisation", + "textStyle": { + "fontWeight": "bolder", + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "height": 0.0318, + "width": 0.1382, + "x": 0.1042, + "y": 0.1541 + }, + "propConfig": { + "props.value": { + "onChange": { + "enabled": null, + "script": "\tself.getSibling(\"textFieldCommandCode\").props.text \u003d str(self.props.value)" + } + } + }, + "props": { + "options": [ + { + "label": "Start", + "value": 1 + }, + { + "label": "Stop", + "value": 2 + }, + { + "label": "Reset", + "value": 3 + }, + { + "label": "Get", + "value": 4 + }, + { + "label": "Set", + "value": 5 + }, + { + "label": "Enable", + "value": 6 + }, + { + "label": "Disable", + "value": 7 + } + ], + "placeholder": { + "text": "Select Command..." + }, + "textAlign": "right", + "value": 1 + }, + "type": "ia.input.dropdown" + }, + { + "meta": { + "name": "Label_25" + }, + "position": { + "height": 0.0318, + "width": 0.097, + "x": 0.0036, + "y": 0.2273 + }, + "props": { + "text": "Date and time" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "ContainerUtils" + }, + "position": { + "tabIndex": 3 + }, + "props": { + "mode": "percent" + }, + "type": "ia.container.coord" + } + ], + "custom": { + "Admin": false, + "AdminTabs": [ + "Alarms", + "Sources", + "Sequence", + "Utils" + ], + "Default": [ + "Alarms", + "Sources", + "Sequence" + ] + }, + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tindex \u003d self.props.currentTabIndex\n\tif index \u003d\u003d 4:\n\t\tsystem.perspective.navigate(url \u003d \"https://w.amazon.com/bin/view/EURME/MAP/Projects/Amazon_SCADA/SCADA/Manual/CommissioningTools/\" , newTab \u003d True)\t\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "TabContainer" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "parent.custom.displayUpload" + }, + "transforms": [ + { + "expression": "!{value}", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.tabs": { + "binding": { + "config": { + "path": "this.custom.Admin" + }, + "transforms": [ + { + "code": "\t\n\tif value:\n\t\treturn self.custom.AdminTabs\n\telse:\n\t\treturn self.custom.Default", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "tabSize": { + "height": 40, + "width": 120 + } + }, + "type": "ia.container.tab" + }, + { + "children": [ + { + "meta": { + "name": "Header" + }, + "position": { + "basis": "75px" + }, + "props": { + "style": { + "opacity": "0.73", + "overflow": "auto", + "textShadow": "#AAAAAA 1px 2px 2px" + }, + "text": "Commissioning Tool", + "textStyle": { + "fontSize": 30, + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Header" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": "Start From Fresh ?", + "textStyle": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Header" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": "Upload Alarms.csv", + "textStyle": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileName\":event.file.name}\n\tsystem.perspective.sendMessage(\"alarmsTab_importFile\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload" + }, + "position": { + "grow": 1 + }, + "props": { + "style": { + "backgroundColor": "#F2F3F4", + "borderStyle": "none", + "classes": "FadeInFast, background, background-none", + "cursor": "pointer", + "max-height": "400px", + "overflow": "visible" + }, + "supportedFileTypes": [ + "csv" + ] + }, + "type": "ia.input.fileupload" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "grow": 1 + }, + "props": { + "direction": "column", + "style": { + "margin": "10px", + "padding": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Header" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": "Upload Sources.csv", + "textStyle": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileName\":event.file.name}\n\tsystem.perspective.sendMessage(\"sourcesTab_importFile\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload" + }, + "position": { + "grow": 1 + }, + "props": { + "style": { + "backgroundColor": "#F2F3F4", + "borderStyle": "none", + "classes": "FadeInFast, background, background-none", + "cursor": "pointer", + "max-height": "400px", + "overflow": "visible" + }, + "supportedFileTypes": [ + "csv" + ] + }, + "type": "ia.input.fileupload" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "grow": 1 + }, + "props": { + "direction": "column", + "style": { + "margin": "10px", + "padding": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "grow": 1 + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "grow": 1 + }, + "props": { + "direction": "column", + "style": { + "borderBottomLeftRadius": "2px", + "borderBottomRightRadius": "2px", + "borderColor": "#D4D4D4", + "borderStyle": "dotted", + "borderTopLeftRadius": "2px", + "borderTopRightRadius": "2px", + "borderWidth": "1px", + "margin": "25px", + "max-height": "500px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Header" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": "Pick Up Where You Left Off ?", + "textStyle": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Header" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": "Upload Alarms Export", + "textStyle": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileName\":event.file.name}\n\tsystem.perspective.sendMessage(\"uploadBackup\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload" + }, + "position": { + "grow": 1 + }, + "props": { + "style": { + "backgroundColor": "#F2F3F4", + "borderStyle": "none", + "classes": "FadeInFast, background, background-none", + "cursor": "pointer", + "max-height": "400px", + "overflow": "visible" + }, + "supportedFileTypes": [ + "csv" + ] + }, + "type": "ia.input.fileupload" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "grow": 1 + }, + "props": { + "direction": "column", + "style": { + "margin": "10px", + "padding": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Header" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": "Upload Sources Export", + "textStyle": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileName\":event.file.name}\n\tsystem.perspective.sendMessage(\"uploadBackup\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload" + }, + "position": { + "grow": 1 + }, + "props": { + "style": { + "backgroundColor": "#F2F3F4", + "borderStyle": "none", + "classes": "FadeInFast, background, background-none", + "cursor": "pointer", + "max-height": "400px", + "overflow": "visible" + }, + "supportedFileTypes": [ + "csv" + ] + }, + "type": "ia.input.fileupload" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "grow": 1 + }, + "props": { + "direction": "column", + "style": { + "margin": "10px", + "padding": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "grow": 1 + }, + "props": { + "style": { + "max-height": "value" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "grow": 1 + }, + "props": { + "direction": "column", + "style": { + "borderBottomLeftRadius": "2px", + "borderBottomRightRadius": "2px", + "borderColor": "#D4D4D4", + "borderStyle": "dotted", + "borderTopLeftRadius": "2px", + "borderTopRightRadius": "2px", + "borderWidth": "1px", + "margin": "25px", + "max-height": "500px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "props": { + "style": { + "margin": "10px", + "padding": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Footer" + }, + "props": { + "style": { + "margin": "10px", + "max-height": "75px", + "overflow": "visible" + }, + "text": "Required Data ", + "textStyle": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "AlarmsData" + }, + "position": { + "basis": "200px" + }, + "propConfig": { + "props.selected": { + "binding": { + "config": { + "path": "session.custom.alarms" + }, + "transforms": [ + { + "code": "\tif value :\n\t\treturn True\n\telse:\n\t\treturn False", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "enabled": false, + "text": "Alarms Data", + "textPosition": "left" + }, + "type": "ia.input.checkbox" + }, + { + "meta": { + "name": "SourceData" + }, + "position": { + "basis": "200px" + }, + "propConfig": { + "props.selected": { + "binding": { + "config": { + "path": "session.custom.sources" + }, + "transforms": [ + { + "code": "\tif value :\n\t\treturn True\n\telse:\n\t\treturn False", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "enabled": false, + "text": "Source Data", + "textPosition": "left" + }, + "type": "ia.input.checkbox" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "grow": 1 + }, + "props": { + "justify": "space-around", + "style": { + "margin": "10px", + "max-height": "75px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.session.custom.alarms \u003d []\n\tself.session.custom.sources \u003d []" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0" + }, + "position": { + "basis": "120px", + "grow": 1 + }, + "propConfig": { + "custom.Start": { + "binding": { + "config": { + "expression": "try(if(len({/root.custom.alarms})\u003e0 \u0026\u0026 len({/root.custom.sources})\u003e0, True,False),False)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/delete_forever" + } + }, + "primary": false, + "style": { + "margin": "5px", + "max-width": "120px" + }, + "text": "Clear" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.getChild(\"root\").custom.displayUpload \u003d False" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "120px", + "grow": 1 + }, + "propConfig": { + "custom.Start": { + "binding": { + "config": { + "expression": "try(if(len({/root.custom.alarms})\u003e0 \u0026\u0026 len({/root.custom.sources})\u003e0, True,False),False)" + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "path": "this.custom.Start" + }, + "transforms": [ + { + "code": "\treturn value", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/play_circle_outline" + } + }, + "style": { + "margin": "5px", + "max-width": "120px" + }, + "text": "Start" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "grow": 1 + }, + "props": { + "justify": "flex-end", + "style": { + "margin": "20px", + "max-height": "75px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "200px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "basis": "150px" + }, + "props": { + "path": "Main-Views/Commissioning Tool/UserFeedBack", + "style": { + "margin": "10px", + "overflow": "auto", + "padding": "10px" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "parent.custom.displayUpload" + }, + "type": "property" + } + } + }, + "props": { + "direction": "column", + "style": { + "margin": "10px", + "padding": "5-x" + } + }, + "type": "ia.container.flex" + } + ], + "custom": { + "displayUpload": true + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\t\n\tif not self.session.custom.sources or not self.session.custom.alarms:\n\t\tself.custom.displayUpload \u003d True \n\telse:\n\t\tself.custom.displayUpload \u003d False\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root" + }, + "position": { + "x": 0.0412, + "y": 0.001 + }, + "propConfig": { + "custom.alarms": { + "binding": { + "config": { + "path": "session.custom.alarms" + }, + "type": "property" + } + }, + "custom.sources": { + "binding": { + "config": { + "path": "session.custom.sources" + }, + "type": "property" + } + } + }, + "props": { + "direction": "column" + }, + "scripts": { + "customMethods": [ + { + "name": "sendConsoleMsg", + "params": [ + "Msg" + ], + "script": "\t# implement your method here\n\tpayload \u003d {\n\t\t\t\t\"Msg\":Msg\n\t\t\t}\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")" + } + ], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "alarmsTab_init", + "pageScope": true, + "script": "\tresult\u003d \"Resetting Alarms Page ...\"\n\t\n\t\n\ttry:\n\t import sys\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerAlarms\")\n\t #clearing all fields\n\t\n\t targetContainer.getChild(\"textFieldTargetPLC\").props.text \u003d \"\"\n\t targetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.value \u003d None\n\t targetContainer.getChild(\"textFieldEventsCommandParams_EventID\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textField_alarmPriority\").props.text \u003d \"\"\n\t targetContainer.getChild(\"DateTimeInput\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textFieldEventsCommandParams_EventDescription\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text\u003d \"\"\n\t \n\t targetContainer.getChild(\"tableAlarms\").props.data \u003d []\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\n\tself.sendConsoleMsg(result)\n\n\n", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "setTimeNow", + "pageScope": true, + "script": "\timport sys\n\tresult\u003d\"Setting Time to current time\"\n\ttry:\n\t containerName \u003d payload[\"containerName\"]\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(containerName)\n\t targetName\u003dpayload[\"targetName\"]\n\t timeNow\u003dsystem.date.now()\n\t timestamp \u003d system.date.toMillis(timeNow)\n\t targetContainer.getChild(targetName).props.value \u003d timeNow\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t \n\tself.sendConsoleMsg(result)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "setEventState", + "pageScope": true, + "script": "\t\n\tresult \u003d \"Setting Event State on %s to %s\"%(payload[\"containerName\"] , payload[\"status\"] )\n\tstatus \u003d payload[\"status\"]\n\tcontainerName \u003d payload[\"containerName\"]\n\t\n\tself.getChild(\"TabContainer\").getChild(containerName).getChild(\"textFieldEventsCommandParams_Status\").props.text \u003d status\n\t\n\tself.sendConsoleMsg(result)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "sendSimulationEvent", + "pageScope": true, + "script": "\n\t\n\tself.sendConsoleMsg(\"Sending an Event ...\")\n\t\n\tcontainerName \u003d payload[\"containerName\"]\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(containerName)\n\tsimulationEventStatus\u003dpayload[\"status\"]\n\tselectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\twhid \u003dstr(system.tag.readBlocking([selectedTagProvider+\"Configuration/FC\"])[0].value)\n\ttimestamp \u003d targetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text\n\ttargetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text \u003d timestamp\n\t\n\tplc\u003dstr(targetContainer.getChild(\"textFieldTargetPLC\").props.text)\n\teventParameters_target\u003d\"\"\n\tif containerName\u003d\u003d\"ContainerSources\":\n\t eventParameters_target \u003d str(targetContainer.getChild(\"textField_SelectedTarget\").props.text)#review\n\telse:\n\t eventParameters_target \u003d str(targetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.value)\n\tcommandTarget\u003dplc+\"/-1\"#-1 is used by E2C application to identify a simulation command\n\teventParameters_timestamp\u003dstr(targetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text)\n\teventParameters_eventID\u003dstr(targetContainer.getChild(\"textFieldEventsCommandParams_EventID\").props.text)\n\teventParameters_status\u003dstr(simulationEventStatus)\n\teventParametersString\u003deventParameters_target+\",\"+eventParameters_timestamp+\",\"+eventParameters_eventID+\",\"+eventParameters_status\n\tcommandParams \u003d \"EVENTS,\"+eventParametersString\n\tactionCode \u003d 5 #SET\n\tparameters\u003d{}\n\tparameters[\"commandTarget\"] \u003d commandTarget\n\tparameters[\"commandCode\"] \u003d actionCode\n\tparameters[\"commandParams\"] \u003d commandParams\n\n\tself.sendConsoleMsg(\"Event Parameters : %s\"%str(parameters))\n\t\n\tresponse \u003d Commands.button_commands.send_request(whid,actionCode,parameters)\n\t\n\tself.sendConsoleMsg(response)\n", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "setTestResult", + "pageScope": true, + "script": "\timport sys\n\t\n\tcontainerName \u003d payload[\"containerName\"]\n\ttargetTable\u003d\"tableAlarms\"\n\tif containerName\u003d\u003d\"ContainerSources\":\n\t\ttargetTable\u003d\"tableSources\"\n\ttestResult\u003dpayload[\"testResult\"]\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(containerName)\n\t\n\tresult\u003d\"Setting test results for %s\"%targetTable\n\t\n\ttry:\n\t\ttargetAlarmIDLastTest\u003dtargetContainer.getChild(\"textFieldEventsCommandParams_EventID\").props.text\n\t\tcurrentDataJSON \u003d targetContainer.getChild(targetTable).props.data\n\t\tselectedRowsJSON\u003dtargetContainer.getChild(targetTable).props.selection.data\t\t\n\t\tfor indexSelectedRow in range(len(selectedRowsJSON)):\n\t\t\tcurrentSelectedRowDic\u003dselectedRowsJSON[indexSelectedRow]\n\t\t\trowNumber\u003dint(currentSelectedRowDic[\"Row\"])\n\t\t\tnewData\u003dcurrentDataJSON[rowNumber]\t\t\t\n\t\t\tcurrentDataJSON[rowNumber][\"Tested_date_UTC\"]\u003dsystem.date.format(system.date.now(),\"YYYY-MM-DD HH:mm:ss\")\n\t\t\tcurrentDataJSON[rowNumber][\"Result\"]\u003dtestResult\n\texcept:\n\t\texc_type, exc_obj, tb \u003d sys.exc_info()\n\t\tlineno \u003d tb.tb_lineno\n\t\terrorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t\tself.sendConsoleMsg(errorMessage)\n\t\n\tself.sendConsoleMsg(result)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "exportFile", + "pageScope": true, + "script": "\timport sys\n\t\n\tcontainerName\u003dpayload[\"containerName\"]\n\ttargetTable\u003dpayload[\"targetTable\"]\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(containerName)\n\tselectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\twhid \u003dstr(system.tag.readBlocking([selectedTagProvider+\"Configuration/FC\"])[0].value)\n\t\n\tfilePrefix\u003d\"Alarms_Testing_\"\n\tif targetTable\u003d\u003d\"tableSources\":\n\t filePrefix\u003d\"Sources_Testing_\"\n\t\n\ttry:\n\t columns \u003d targetContainer.getChild(targetTable).props.columns\n\t headers\u003d[]\n\t for column in columns:\n\t headers.append(column.field)\n\t rows \u003d targetContainer.getChild(targetTable).props.data\n\t data\u003d[]\n\t for row in rows:\n\t rowContent\u003d[]\n\t for column in columns:\n\t rowContent.append(row[column.field])\n\t data.append(rowContent)\n\t\n\t ds\u003dsystem.dataset.toDataSet(headers, data)\n\t Excel_xlsx \u003d system.dataset.toCSV(ds,True)\n\t fileName\u003dfilePrefix+whid\n\t fileName\u003dfileName+\"_\"+str(targetContainer.getChild(\"textFieldTargetPLC\").props.text)\n\t fileName\u003dfileName+\"_\"+system.date.format(system.date.now(),\u0027yyyyMMddHHmmss\u0027)+\".csv\"\n\t \n\t system.perspective.download(fileName,Excel_xlsx)\n\t \n\t result\u003d\"Exporting %s\"%fileName\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t\n\tself.sendConsoleMsg(result)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "alarmsTab_importFile", + "pageScope": true, + "script": "\timport sys\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerAlarms\")\n\theaders \u003d [\"Row\",\"ID\",\"Name\",\"Priority\",\"Type\",\"Tested date\",\"Result\",\"Notes\" ]\n\trows\u003d[]\n\ttableContent\u003d[]\n\tresult\u003d\"Importing file: %s \"%payload[\"fileName\"]\n\t\n\tself.sendConsoleMsg(result)\n\t\t\n\ttry:\n\t rowNumber\u003d0\n\t fileContent \u003d payload[\"fileContent\"]\n\t fileName\u003dpayload[\"fileName\"]\n\t \n\t fileExtension \u003d fileName.split(\".\")[1]\n\t if fileName!\u003d\"alarms.csv\":\n\t result+\u003d\"Invalid file name. Please select alarms.csv file\"\n\t targetContainer.getChild(\"textAreaResult\").props.text \u003d str(result)\n\t return\n\t\n\t tableContent\u003d[]\n\t rowsValues\u003d[]\n\t rowsValues \u003d fileContent.splitlines()\n\t for indexRow in range(1,len(rowsValues)):\n\t Row\u003drowNumber\n\t rowFields \u003d rowsValues[indexRow].replace(\"\\\"\",\"\").split(\",\")\n\t ID\u003drowFields[0]\n\t Name\u003drowFields[1]\n\t Priority\u003d\"Invalid\"\n\t\n\t if int(rowFields[2])\u003d\u003d1:\n\t Priority\u003d\"Diagnostic\"\n\t if int(rowFields[2])\u003d\u003d2:\n\t Priority\u003d\"Low\"\n\t if int(rowFields[2])\u003d\u003d3:\n\t Priority\u003d\"Medium\"\n\t if int(rowFields[2])\u003d\u003d4:\n\t Priority\u003d\"High\"\n\t Type\u003d\"Default\"\n\t if rowFields[3]\u003d\u003d\"1\":\n\t Type\u003d\"Critical\"\n\t TestedDate\u003d\"\"\n\t TestedResult\u003d\"\"\n\t Notes\u003d\"\"\n\t rowContent\u003d{}\n\t rowContent[\"Row\"]\u003drowNumber\n\t rowContent[\"ID\"]\u003dID\n\t rowContent[\"Name\"]\u003dName\n\t rowContent[\"Priority\"]\u003dPriority\n\t rowContent[\"Type\"]\u003dType\n\t rowContent[\"Tested_date_UTC\"]\u003d\"\"\n\t rowContent[\"Result\"]\u003d\"\"\n\t rowContent[\"Notes\"]\u003d\"\"\n\t tableContent.append(rowContent)\n\t rowNumber+\u003d1\n\n\t self.session.custom.alarms \u003d tableContent\n\t\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t\n\tresult \u003d \"File imported succesfully\" \t\n\tself.sendConsoleMsg(result)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "sourcesTab_importFile", + "pageScope": true, + "script": "\timport sys\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerSources\")\n\tresult\u003d\"\"\n\ttableContent\u003d[]\n\ttry:\n\t rowNumber\u003d0\n\t fileContent \u003d payload[\"fileContent\"]\n\t fileName\u003dpayload[\"fileName\"]\n\t \n\t result\u003d\"Importing file: %s \"%payload[\"fileName\"]\n\t \t\n\t self.sendConsoleMsg(result)\n\t fileExtension \u003d fileName.split(\".\")[1]\n\t\n\t\n\t if fileName!\u003d\"sources.csv\":\n\t result \u003d\"Invalid file name. Please select sources.csv file\"\n\t self.sendConsoleMsg(result)\n\t return\n\t\n\t rowsValues\u003d[]\n\t rowsValues \u003d fileContent.splitlines()\n\t tagProviderSourcesList\u003d[]\n\t for indexRow in range(1,len(rowsValues)):\n\t rowFields \u003d rowsValues[indexRow].replace(\"\\\"\",\"\").split(\",\")\n\t rowContent\u003d{}\n\t rowContent[\"Row\"]\u003drowNumber\n\t rowContent[\"ID\"]\u003drowFields[0]\n\t rowContent[\"Source\"]\u003drowFields[1]\n\t rowContent[\"Tested_date_UTC\"]\u003d\"\"\n\t rowContent[\"Result\"]\u003d\"\"\n\t rowContent[\"Notes\"]\u003d\"\"\n\t tableContent.append(rowContent)\n\t tagProviderSourcesList.append(rowFields[1])\n\t rowNumber+\u003d1\n\t self.session.custom.sources \u003d tableContent\n\t\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t \t\n\tresult \u003d \"File imported succesfully\" \t\n\tself.sendConsoleMsg(result)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "sourcesTab_init", + "pageScope": true, + "script": "\tresult\u003d \"Resetting Sources Page ...\"\n\ttry:\n\t import sys\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerSources\")\n\t #clearing all fields\n\t targetContainer.getChild(\"textFieldTargetPLC\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textField_SelectedTarget\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textFieldEventsCommandParams_EventID\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textField_alarmPriority\").props.text \u003d \"\"\n\t targetContainer.getChild(\"DateTimeInput\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textFieldEventsCommandParams_EventDescription\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text\u003d \"\"\n\t targetContainer.getChild(\"StatusIcon\").props.params.tagProps[0]\u003d\"\"\n\t #Creating source table\n\t targetContainer.getChild(\"tableSources\").props.data \u003d []\n\t targetContainer.custom.testingAlarmPriority1 \u003d \u0027\u0027\n\t targetContainer.custom.testingAlarmPriority2 \u003d \u0027\u0027\n\t targetContainer.custom.testingAlarmPriority3 \u003d \u0027\u0027\n\t targetContainer.custom.testingAlarmPriority4 \u003d \u0027\u0027\n\t result+\u003d\"Init completed\"\n\t\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t \n\tself.sendConsoleMsg(result)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "alarmsTab_selectAlarm", + "pageScope": true, + "script": "\t\n\t\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerAlarms\")\n\ttargetContainer.getChild(\"textFieldEventsCommandParams_EventID\").props.text \u003d payload[\"ID\"]\n\ttargetContainer.getChild(\"textFieldEventsCommandParams_EventDescription\").props.text \u003d payload[\"Name\"]\n\ttargetContainer.getChild(\"textField_alarmPriority\").props.text\u003dpayload[\"Priority\"]\n\t\n\n\t\n\tself.sendConsoleMsg(\"Setting Alarm ID, Description \u0026 Priority \")", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "sourcesTab_selectSource", + "pageScope": true, + "script": "\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerSources\")\n\tself.getChild(\"TabContainer\").getChild(\"ContainerSources\").getChild(\"textField_SelectedTarget\").props.text \u003d payload[\"Source\"]\n\ttargetContainer.getChild(\"StatusIcon\").props.params.tagProps[0]\u003dpayload[\"Source\"]\n\t\n\tself.sendConsoleMsg(\"Setting Source ID\")", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "sourcesTab_setAlarm", + "pageScope": true, + "script": "\t# implement your handler here\n\ttargetAlarm\u003dpayload[\"alarm\"]\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerSources\")\n\ttargetContainer.getChild(\"textField_alarmPriority\").props.text\u003dtargetAlarm[\"priority\"]\n\ttargetContainer.getChild(\"textFieldEventsCommandParams_EventID\").props.text \u003d targetAlarm[\"id\"]\n\ttargetContainer.getChild(\"textFieldEventsCommandParams_EventDescription\").props.text\u003dtargetAlarm[\"message\"]\n\t\n\tself.sendConsoleMsg(\"Setting Alarm ID, Description \u0026 Priority \")", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "measurementTab_init", + "pageScope": true, + "script": "\timport sys\n\ttry:\n\t\tresult\u003d\"Restting Sequence Page \"\n\t\tself.sendConsoleMsg(result)\n\t\t\n\t\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t\tselectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t\t#Check if is a valid SCADA 2.0 Tag provider\n\t\t#Filling up the dropdown with the list of the PLCs\n\t\ttagProvidersPLCs \u003d system.tag.browse(path \u003dselectedTagProvider , filter \u003d {})\n\t\ttagProviderPLCsList\u003d[]\n\t\tfor tagProvidersPLC in tagProvidersPLCs.getResults():\n\t\t fullPath\u003dstr(tagProvidersPLC[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t\t entry\u003d{}\n\t\t entry[\u0027value\u0027] \u003d fullPath\n\t\t entry[\u0027label\u0027] \u003d fullPath\n\t\t tagProviderPLCsList.append(entry)\n\t\ttargetContainer.getChild(\"dropdownTargetPLC\").props.options \u003d tagProviderPLCsList\n\t\tselectedValue \u003d tagProviderPLCsList[0][\"label\"]\n\t\ttargetContainer.getChild(\"dropdownTargetPLC\").props.value \u003d selectedValue\n\t\t#Filling up the dropdown with the list of the sources\n\t\ttagProvidersSources \u003d system.tag.browse(path \u003dselectedTagProvider+\"/\"+selectedValue , filter \u003d {})\n\t\ttagProviderSourcesList\u003d[]\n\t\tfor tagProvidersSource in tagProvidersSources.getResults():\n\t\t fullPath\u003dstr(tagProvidersSource[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t\t entry\u003d{}\n\t\t entry[\u0027value\u0027] \u003d fullPath\n\t\t entry[\u0027label\u0027] \u003d fullPath\n\t\t tagProviderSourcesList.append(entry)\n\t\ttargetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.options \u003d tagProviderSourcesList\n\t\n\t\n\t\ttargetContainer.getChild(\"tableSequence\").props.data \u003d []\n\t\ttargetContainer.custom.testingAlarmPriority1 \u003d \u0027\u0027\n\t\ttargetContainer.custom.testingAlarmPriority2 \u003d \u0027\u0027\n\t\ttargetContainer.custom.testingAlarmPriority3 \u003d \u0027\u0027\n\t\ttargetContainer.custom.testingAlarmPriority4 \u003d \u0027\u0027\n\t\tresult \u003d\"Init completed\"\n\t\t\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t \n\t self.sendConsoleMsg(errorMessage)\n\tself.sendConsoleMsg(result)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "measurementTab_importFile", + "pageScope": true, + "script": "\timport sys\n\tfrom collections import OrderedDict\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\ttry:\n\t result\u003d\"Importing file Sequence Backup ... \"\n\t\n\t self.sendConsoleMsg(result)\n\t rowNumber\u003d0\n\t result\u003d\"\"\n\t fileContent \u003d payload[\"fileContent\"]\n\t fileExtension\u003dpayload[\"fileExtension\"]\n\t if fileExtension\u003d\u003d\"csv\":\n\t self.sendConsoleMsg(\"File has correct extension . Importing ...\") \n\t rowsValues\u003d[]\n\t rowsValues \u003d fileContent.splitlines()\n\t tableContent\u003d[]\n\t for indexRow in range(1,len(rowsValues)):\n\t \n\t rowFields \u003d rowsValues[indexRow].replace(\"\\\"\",\"\").split(\",\")\n\t system.perspective.print(rowFields)\n\t messageType\u003drowFields[6]\n\t rowContent \u003d OrderedDict(\n\t [\n\t (\"Seq\",str(rowFields[13])),\n\t (\"Type\", messageType),\n\t (\"When\",rowFields[7]),\n\t (\"Source\", rowFields[5]),\n\t (\"CurrentState\",\"\"),\n\t (\"ReasonCode\", \"\"),\n\t (\"CurrentMode\", \"\"),\n\t (\"EventID\", \"\"),\n\t (\"EventState\", \"\"),\n\t (\"MeasurementName\",\"\"),\n\t (\"SamplingInterval\",\"\"),\n\t (\"Unit\",\"\"),\n\t (\"DeltaValue\",\"\"),\n\t (\"Selected\", \"\")\n\t ]\n\t )\n\t if messageType\u003d\u003d\"StateChanged\":\n\t rowContent[\"CurrentState\"]\u003drowFields[8]\n\t rowContent[\"ReasonCode\"]\u003drowFields[4]\n\t if messageType\u003d\u003d\"ModeChanged\":\n\t rowContent[\"CurrentMode\"]\u003drowFields[0]\n\t if messageType\u003d\u003d\"Event\":\n\t rowContent[\"EventID\"]\u003drowFields[9]\n\t rowContent[\"EventState\"]\u003d rowFields[1]\n\t if messageType\u003d\u003d\"MeasurementEvent\":\n\t rowContent[\"MeasurementName\"]\u003drowFields[10]\n\t rowContent[\"SamplingInterval\"]\u003drowFields[2]\n\t rowContent[\"Unit\"]\u003drowFields[3]\n\t rowContent[\"DeltaValue\"]\u003d rowFields[11]\n\t tableContent.append(rowContent)\n\t \ttargetContainer.getChild(\"tableSequence\").props.data \u003d tableContent\n\t else:\n\t \tresult\u003d\"Importing file must be a CSV file not a %s\"%(fileExtension) \n\t \t\n\t \tself.sendConsoleMsg(result)\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\tself.sendConsoleMsg(\"Sequence Import Sucessful\")", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "measurementTab_sendEvent", + "pageScope": true, + "script": "\t# implement your handler here\n\timport time\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\tselectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\twhid \u003d str(system.tag.readBlocking([selectedTagProvider+\"Configuration/FC\"])[0].value)\n\tcommandTarget\u003d str(targetContainer.getChild(\"dropdownTargetPLC\").props.value)+\"/SPRK\"\n\tinterval \u003d targetContainer.getChild(\"textFieldInterval\").props.value\n\t\n\tselectedRows \u003d targetContainer.getChild(\"tableSequence\").props.data\n\tresult\u003d\"\"\n\ttry:\n\t\tactionCode \u003d 5 #SET\n\t\tfor selectedRow in selectedRows:\n\t\t eventType\u003dselectedRow[\"Type\"]\n\t\t timestamp \u003d selectedRow[\"When\"]\n\t\t source \u003d selectedRow[\"Source\"]\n\t\t indexSeletectedRow\u003dint(selectedRow[\"Seq\"])\n\t\t targetContainer.getChild(\"tableSequence\").props.selection.selectedRow \u003d indexSeletectedRow\n\t\t targetContainer.getChild(\"rowOfLastMessageSent\").props.value \u003d indexSeletectedRow\n\t\t if eventType\u003d\u003d\"StateChanged\":\n\t\t currentState \u003d selectedRow[\"CurrentState\"]\n\t\t reasonCode \u003d selectedRow[\"ReasonCode\"]\n\t\t eventParametersString\u003dstr(source)+\",\"+str(currentState)+\",\"+str(reasonCode)+\",\"+str(timestamp)\n\t\t commandParams \u003d \"STATE,\"+eventParametersString\n\t\t if eventType\u003d\u003d\"ModeChanged\":\n\t\t currentMode \u003d selectedRow[\"CurrentMode\"]\n\t\t eventParametersString\u003dstr(source)+\",\"+str(currentMode)+\",\"+str(timestamp)\n\t\t commandParams \u003d \"MODE,\"+eventParametersString\n\t\t if eventType\u003d\u003d\"Event\":\n\t\t eventID \u003d selectedRow[\"EventID\"]\n\t\t eventState \u003d selectedRow[\"EventState\"]\n\t\t eventParametersString\u003dstr(source)+\",\"+str(timestamp)+\",\"+str(eventID)+\",\"+str(eventState)\n\t\t commandParams \u003d \"EVENTS,\"+eventParametersString\n\t\t if eventType\u003d\u003d\"MeasurementEvent\":\n\t\t measurementName \u003d selectedRow[\"MeasurementName\"]\n\t\t samplingInterval \u003d selectedRow[\"SamplingInterval\"]\n\t\t unit \u003d selectedRow[\"Unit\"]\n\t\t deltaValue \u003d selectedRow[\"DeltaValue\"]\n\t\t eventParametersString\u003dstr(source)+\",\"+str(measurementName)+\",\"+str(samplingInterval)+\",\"+str(unit)+\",\"+str(deltaValue)+\",\"+str(timestamp)\n\t\t commandParams \u003d \"MEASUREMENT,\"+eventParametersString\n\t\t parameters\u003d{}\n\t\t parameters[\"commandTarget\"] \u003d commandTarget\n\t\t parameters[\"commandCode\"] \u003d actionCode\n\t\t parameters[\"commandParams\"] \u003d commandParams\n\t\t\n\t\t self.sendConsoleMsg(\"UI : sending command to whid\u003d\"+whid+\",actionCode\"+str(actionCode)+\",parameters\u003d\"+str(parameters))\n\t\t response \u003d Commands.button_commands.send_request(whid,actionCode,parameters)\n\t\t self.sendConsoleMsg(response)\n\t\t time.sleep(interval)\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "measurementTab_exportFile", + "pageScope": true, + "script": "\timport sys\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\tresult\u003d\"\"\n\tresult\u003d\"Exporting Sequence data \"\n\tself.sendConsoleMsg(result)\n\ttry:\n\t fileContent\u003dNone\n\t arrayElements \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t selectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t whid \u003d str(system.tag.readBlocking([selectedTagProvider+\"Configuration/FC\"])[0].value)\n\t fileName\u003d\"Sequence_Testing_\"+whid+\"_\"+str(targetContainer.getChild(\"dropdownTargetPLC\").props.value)+\"_\"+system.date.format(system.date.now(),\u0027yyyyMMddHHmmss\u0027)\n\t \n\t fileName+\u003d\".csv\"\n\t headers\u003d[]\n\t rows\u003d[]\n\t for element in arrayElements:\n\t keys\u003delement.keys()\n\t if len(headers)\u003d\u003d0:\n\t headers\u003dkeys\n\t row\u003d[]\n\t for key in keys:\n\t row.append(element[key])\n\t rows.append(row)\n\t\n\t ds \u003d system.dataset.toDataSet(headers,rows)\n\t fileContent \u003d system.dataset.toCSV(ds)\n\t system.perspective.download(fileName,fileContent)\n\t\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t return\n\t \n\tresult\u003d\"Export Succesful \"\n\tself.sendConsoleMsg(result)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "measurementTab_addRow", + "pageScope": true, + "script": "\tsystem.perspective.print(\"Add Row ...\")\n\timport sys\n\tfrom collections import OrderedDict\n\ttypeElement \u003d payload[\"messageType\"]\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\tresult\u003d\"Adding a \"\n\t\n\ttry:\n\t tableElements \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t result \u003d str(type(tableElements))\n\t rowIndex\u003d0\n\t if tableElements is None:\n\t tableElements\u003d[]\n\t else:\n\t rowIndex \u003d len(tableElements)\n\t\n\t newElement \u003d OrderedDict(\n\t [\n\t (\"Seq\",str(rowIndex)),\n\t (\"Type\", typeElement),\n\t (\"When\",targetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text),\n\t (\"Source\", targetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.value),\n\t (\"CurrentState\",\"\"),\n\t (\"ReasonCode\", \"\"),\n\t (\"CurrentMode\", \"\"),\n\t (\"EventID\", \"\"),\n\t (\"EventState\", \"\"),\n\t (\"MeasurementName\",\"\"),\n\t (\"SamplingInterval\",\"\"),\n\t (\"Unit\",\"\"),\n\t (\"DeltaValue\",\"\"),\n\t (\"Selected\",False)\n\t ]\n\t )\n\t \n\t \n\t result\u003d\"Adding a %s \"%typeElement\n\t self.sendConsoleMsg(result)\n\t \n\t tableElements.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\n", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "measurementTab_deleteRows", + "pageScope": true, + "script": "\timport sys\n\ttry:\n\t \n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t result\u003d\"\"\n\t oldArray \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t selectedRows \u003d [payload[\"index\"]]\n\t \n\t result \u003d \"Removing row %s\"%selectedRows\n\t self.sendConsoleMsg(result)\n\t newArray\u003d[]\n\t rowIndexesToBeDeleted\u003d[]\n\t for selectedRow in selectedRows:\n\t rowIndexesToBeDeleted.append(int(selectedRow))\n\t newRowIndex\u003d0\n\t for element in oldArray:\n\t rowIndex\u003dint(element[\"Seq\"])\n\t if not (rowIndex in rowIndexesToBeDeleted):\n\t newElement\u003d dict(element)\n\t newElement[\"Seq\"]\u003dstr(newRowIndex)\n\t newRowIndex+\u003d1\n\t newArray.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data \u003d newArray\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "measurementTab_setTimestampInTable", + "pageScope": true, + "script": "\timport sys\n\tresult\u003d\"Setting TimeStamp \u0026 Source ID for all items in sequence ...\"\n\tself.sendConsoleMsg(result)\n\t\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t timestampOffset \u003d targetContainer.getChild(\"timestampOffset\").props.value * 1000\n\t currentTimestamp \u003d long(targetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text)\n\t commandTarget \u003d targetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.value\n\t tableData \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t newArray\u003d[]\n\t for element in tableData:\n\t newElement\u003d dict(element)\n\t if element[\"Selected\"]:\n\t newElement[\"When\"]\u003dstr(currentTimestamp)\n\t newElement[\"Source\"]\u003dcommandTarget\n\t currentTimestamp+\u003dtimestampOffset\n\t \n\t newArray.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data \u003d newArray\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "measurementTab_setState", + "pageScope": true, + "script": "\timport sys\n\tresult\u003d\"Setting State and ReasonCode\"\n\tself.sendConsoleMsg(result)\n\tSTATE_TYPE \u003d \"StateChanged\"\n\ttargetState\u003dpayload[\"targetState\"]\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t tableData \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t selectedRows \u003d targetContainer.getChild(\"tableSequence\").props.selection.data\n\t reasonCode \u003d targetContainer.getChild(\"dropdownReasonCode\").props.value\n\t newArray\u003d[]\n\t for element in tableData:\n\t newElement\u003d dict(element)\n\t if element[\"Selected\"] and element[\"Type\"] \u003d\u003d STATE_TYPE :\n\t newElement[\"CurrentState\"]\u003dtargetState\n\t newElement[\"ReasonCode\"]\u003d str(reasonCode)\n\t newArray.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data \u003d newArray\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "measurementTab_setMeasurementInTable", + "pageScope": true, + "script": "\timport sys\n\tresult\u003d\"Setting Mesurement Name , Sample Interval , Unit \u0026 Delta Values\"\n\tself.sendConsoleMsg(result)\n\tMEASUREMENT_EVENT\u003d \"MeasurementEvent\"\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t tableData \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t newArray\u003d[]\n\t measurementName \u003d targetContainer.getChild(\"dropdownMeasurementName\").props.value\n\t delta \u003d targetContainer.getChild(\"delta\").props.value\n\t sampling \u003d targetContainer.getChild(\"sampling\").props.value\n\t unit \u003d targetContainer.getChild(\"textFieldUnit\").props.text\n\t for element in tableData:\n\t newElement\u003d dict(element)\n\t if element[\"Selected\"] and element[\"Type\"] \u003d\u003d MEASUREMENT_EVENT:\n\t newElement[\"MeasurementName\"]\u003dmeasurementName\n\t newElement[\"SamplingInterval\"]\u003dstr(sampling)\n\t newElement[\"Unit\"]\u003dunit\n\t newElement[\"DeltaValue\"]\u003dstr(delta)\n\t newArray.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data \u003d newArray\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "measurementTab_setEventState", + "pageScope": true, + "script": "\timport sys\n\tresult\u003d\"Setting Event ID \u0026 Event State\"\n\tself.sendConsoleMsg(result)\n\ttargetEventState\u003dpayload[\"targetEventState\"]\n\tEVENT_TYPE \u003d \"Event\"\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t tableData \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t eventID \u003d targetContainer.getChild(\"eventID\").props.value\n\t newArray\u003d[]\n\t for element in tableData:\n\t newElement\u003d dict(element)\n\t if element[\"Selected\"] and element[\"Type\"] \u003d\u003d EVENT_TYPE:\n\t newElement[\"EventID\"]\u003deventID\n\t newElement[\"EventState\"]\u003dtargetEventState\n\t newArray.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data \u003d newArray\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "utilsTab_handleCommands", + "pageScope": true, + "script": "\timport sys\n\tresult\u003d\"\"\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerUtils\")\n\t command \u003d payload[\"command\"]\n\t selectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t whid \u003dstr(system.tag.readBlocking([selectedTagProvider+\"Configuration/FC\"])[0].value)\n\t\n\t PLC\u003dtargetContainer.getChild(\"dropdownTargetPLC\").props.value\n\t targetSimulation \u003d PLC+\"/-1\"#-1 is used by E2C application to identify a simulation command\n\t commandTarget\u003dtargetContainer.getChild(\"dropdownCommandTarget\").props.value\n\t commandCode\u003dtargetContainer.getChild(\"textFieldCommandCode\").props.text\n\t commandParameters\u003dtargetContainer.getChild(\"textFieldCommandParameters\").props.text\n\t commandTimestamp\u003dtargetContainer.getChild(\"textFieldCommandTimestamp\").props.text\n\t eventSource\u003dtargetContainer.getChild(\"dropdownEventsSource\").props.value\n\t eventTimestamp\u003dtargetContainer.getChild(\"textFieldEventTimestamp\").props.text\n\t eventID\u003dtargetContainer.getChild(\"textFieldEventID\").props.text\n\t eventState\u003dtargetContainer.getChild(\"textFieldEventState\").props.text\n\t disconnectionDuration\u003dtargetContainer.getChild(\"textFieldDisconnectionDuration\").props.text\n\t\n\t\n\t if command\u003d\u003d\"synchStatus\":\n\t commandParameters \u003d \"SYNCH,STATUS\"\n\t actionCode \u003d 1 #Start\n\t functionParameters\u003d{}\n\t functionParameters[\"commandTarget\"] \u003d targetSimulation\n\t functionParameters[\"commandCode\"] \u003d actionCode\n\t functionParameters[\"commandParams\"] \u003d commandParameters\n\t response \u003d Commands.button_commands.send_request(whid,actionCode,functionParameters)\n\t\n\t if command\u003d\u003d\"synchAlarms\":\n\t commandParameters \u003d \"SYNCH,ALARMS\"\n\t actionCode \u003d 1 #Start\n\t functionParameters\u003d{}\n\t functionParameters[\"commandTarget\"] \u003d targetSimulation\n\t functionParameters[\"commandCode\"] \u003d actionCode\n\t functionParameters[\"commandParams\"] \u003d commandParameters\n\t response \u003d Commands.button_commands.send_request(whid,actionCode,functionParameters)\n\t if command\u003d\u003d\"simulateDisconnection\":\n\t commandParams \u003d \"DISCONNECTION,\"+str(disconnectionDuration)\n\t actionCode \u003d 6 #Enable\n\t functionParameters\u003d{}\n\t functionParameters[\"commandTarget\"] \u003d targetSimulation\n\t functionParameters[\"commandCode\"] \u003d actionCode\n\t functionParameters[\"commandParams\"] \u003d commandParameters\n\t response \u003d Commands.button_commands.send_request(whid,actionCode,functionParameters)\n\t if command\u003d\u003d\"restoreFromDisconnection\":\n\t commandParams \u003d \"DISCONNECTION\"\n\t actionCode \u003d 7 #Disable\n\t functionParameters\u003d{}\n\t functionParameters[\"commandTarget\"] \u003d targetSimulation\n\t functionParameters[\"commandCode\"] \u003d actionCode\n\t functionParameters[\"commandParams\"] \u003d commandParameters\n\t response \u003d Commands.button_commands.send_request(whid,actionCode,functionParameters)\n\t if command\u003d\u003d\"sendCommand\":\n\t actionCode \u003d commandCode\n\t functionParameters\u003d{}\n\t functionParameters[\"commandTarget\"] \u003d commandTarget\n\t functionParameters[\"commandCode\"] \u003d commandCode\n\t functionParameters[\"commandParams\"] \u003d \u0027\u0027\n\t functionParameters[\"commandTimestamp\"] \u003d commandTimestamp\n\t response \u003d Commands.button_commands.send_request(whid,actionCode,functionParameters)\n\t if command\u003d\u003d\"sendAlarm\":\n\t actionCode \u003d 5 #SET\n\t functionParameters\u003d{}\n\t functionParameters[\"commandTarget\"] \u003d targetSimulation\n\t functionParameters[\"commandCode\"] \u003d actionCode\n\t functionParameters[\"commandParams\"] \u003d \"EVENTS,\"+str(eventSource)+\",\"+str(eventTimestamp)+\",\"+str(eventID)+\",\"+str(eventState)\n\t response \u003d Commands.button_commands.send_request(whid,actionCode,functionParameters)\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t result +\u003d errorMessage\n\ttargetContainer.getChild(\"textAreaResult\").props.text \u003d result", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "utilsTab_importFile", + "pageScope": true, + "script": "\t# implement your handler hereimport sys\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerUtils\")\n\theaders \u003d [\"Row\",\"ID\",\"Name\",\"Priority\",\"Type\" ]\n\trows\u003d[]\n\ttry:\n\t\tds\u003dsystem.dataset.toDataSet(headers,rows)\n\t\trowNumber\u003d0\n\t\tresult\u003d\"\"\n\t\tfileContent \u003d payload[\"fileContent\"]\n\t\tfileExtension\u003dpayload[\"fileExtension\"]\n\t\tif fileExtension\u003d\u003d\"json\":\n\t\t\t#Importing from a configuration file\n\t\t\tcontentJSON \u003d system.util.jsonDecode(fileContent)\n\t\t\talarmList\u003dcontentJSON[\u0027alarmList\u0027]\n\t\t\tfor alarm in alarmList:\n\t\t\t\tRow\u003drowNumber\n\t\t\t\tID\u003dalarm[\"id\"]\n\t\t\t\tName\u003dalarm[\"message\"]\n\t\t\t\tPriority\u003d\"Invalid\"\n\t\t\t\t\n\t\t\t\tif alarm[\"priority\"]\u003d\u003d\"1\":\n\t\t\t\t\tPriority\u003d\"Diagnostic\"\n\t\t\t\tif alarm[\"priority\"]\u003d\u003d\"2\":\n\t\t\t\t\tPriority\u003d\"Low\"\n\t\t\t\tif alarm[\"priority\"]\u003d\u003d\"3\":\n\t\t\t\t\tPriority\u003d\"Medium\"\n\t\t\t\tif alarm[\"priority\"]\u003d\u003d\"4\":\n\t\t\t\t\tPriority\u003d\"High\"\n\t\t\t\tType\u003d\"Default\"\n\t\t\t\tif alarm[\"type\"]\u003d\u003d\"1\":\n\t\t\t\t\tType\u003d\"Critical\"\n\t\t\t\trows.append([Row,ID,Name,Priority,Type])\n\t\t\t\trowNumber+\u003d1\t\t\n\t\tds \u003d system.dataset.toDataSet(headers,rows)\n\t\ttargetContainer.getChild(\"tableAlarms\").props.data \u003d ds\n\texcept:\n\t\texc_type, exc_obj, tb \u003d sys.exc_info()\n\t\tlineno \u003d tb.tb_lineno\n\t\terrorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t\tresult +\u003d errorMessage\n\ttargetContainer.getChild(\"textAreaResult\").props.text \u003d str(result)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "utilsTab_init", + "pageScope": true, + "script": "\ttry:\n\t import sys\n\t result\u003d\"\"\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerUtils\")\n\t selectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t #Check if is a valid SCADA 2.0 Tag provider\n\t validSCADATagProvider\u003dTrue\n\t if validSCADATagProvider and not system.tag.exists(selectedTagProvider+\"Configuration/FC\"):\n\t result+\u003d\"The tag \\\"Configuration/FC\\\" does not exists in the selected tag provider\"+\"\\r\\n\"\n\t validSCADATagProvider\u003dFalse\n\t if validSCADATagProvider and not system.tag.exists(selectedTagProvider+\"System/aws_data\"):\n\t result+\u003d\"The tag \\\"System/aws_data\\\" does not exists in the selected tag provider\"+\"\\r\\n\"\n\t validSCADATagProvider\u003dFalse\n\t if validSCADATagProvider and not system.tag.exists(selectedTagProvider+\"System/device_count\"):\n\t result+\u003d\"The tag \\\"System/device_count\\\" does not exists in the selected tag provider\"+\"\\r\\n\"\n\t validSCADATagProvider\u003dFalse\n\t if validSCADATagProvider:\n\t #Extracting the target site\n\t #Filling up the dropdown with the list of the PLCs\n\t tagProvidersPLCs \u003d system.tag.browse(path \u003dselectedTagProvider , filter \u003d {})\n\t tagProviderPLCsList\u003d[]\n\t for tagProvidersPLC in tagProvidersPLCs.getResults():\n\t fullPath\u003dstr(tagProvidersPLC[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t entry\u003d{}\n\t entry[\u0027value\u0027] \u003d fullPath\n\t entry[\u0027label\u0027] \u003d fullPath\n\t tagProviderPLCsList.append(entry)\n\t targetContainer.getChild(\"dropdownTargetPLC\").props.options \u003d tagProviderPLCsList\n\t selectedValue \u003d tagProviderPLCsList[0][\"label\"]\n\t targetContainer.getChild(\"dropdownTargetPLC\").props.value \u003d selectedValue\n\t #Filling up the dropdown with the list of the sources\n\t tagProvidersSources \u003d system.tag.browse(path \u003dselectedTagProvider+\"/\"+selectedValue , filter \u003d {})\n\t tagProviderSourcesList\u003d[]\n\t for tagProvidersSource in tagProvidersSources.getResults():\n\t fullPath\u003dstr(tagProvidersSource[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t entry\u003d{}\n\t entry[\u0027value\u0027] \u003d fullPath\n\t entry[\u0027label\u0027] \u003d fullPath\n\t tagProviderSourcesList.append(entry)\n\t targetContainer.getChild(\"dropdownCommandTarget\").props.options \u003d tagProviderSourcesList\n\t targetContainer.getChild(\"dropdownEventsSource\").props.options \u003d tagProviderSourcesList\n\t\n\t\n\t targetContainer.getChild(\"tableAlarms\").props.data \u003d []\n\t targetContainer.getChild(\"textFieldCommandCode\").props.text \u003d \u0027\u0027\n\t targetContainer.getChild(\"textFieldCommandParameters\").props.text \u003d \u0027\u0027\n\t targetContainer.getChild(\"textFieldEventID\").props.text \u003d \u0027\u0027\n\t result+\u003d\"Init completed\"\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t result +\u003d errorMessage\n\ttargetContainer.getChild(\"textAreaResult\").props.text \u003d str(result)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "alarmsTab_changeSelectedPLC", + "pageScope": true, + "script": "\tresult\u003d\"\"\n\tresult\u003d\"Changing selected PLC for Alarms Page...\"\n\tself.sendConsoleMsg(result)\n\t\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerAlarms\")\n\t selectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t selectedPLC\u003dtargetContainer.getChild(\"dropdownTargetPLC\").props.value\n\t tagProvidersSources \u003d system.tag.browse(path \u003dselectedTagProvider+\"/\"+selectedPLC , filter \u003d {})\n\t tagProviderSourcesList\u003d[]\n\t for tagProvidersSource in tagProvidersSources.getResults():\n\t fullPath\u003dstr(tagProvidersSource[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t entry\u003d{}\n\t entry[\u0027value\u0027] \u003d fullPath\n\t entry[\u0027label\u0027] \u003d fullPath\n\t tagProviderSourcesList.append(entry)\n\t targetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.options \u003d tagProviderSourcesList\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "measurementTab_changeSelectedPLC", + "pageScope": true, + "script": "\tresult\u003d\"Changing selected PLC for Sequnce Page ...\"\n\tself.sendConsoleMsg(result)\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurment\")\n\t selectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t\n\t selectedPLC\u003dtargetContainer.getChild(\"dropdownTargetPLC\").props.value\n\t tagProvidersSources \u003d system.tag.browse(path \u003dselectedTagProvider+\"/\"+selectedPLC , filter \u003d {})\n\t tagProviderSourcesList\u003d[]\n\t result +\u003d str(tagProvidersSources)\n\t for tagProvidersSource in tagProvidersSources.getResults():\n\t fullPath\u003dstr(tagProvidersSource[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t entry\u003d{}\n\t entry[\u0027value\u0027] \u003d fullPath\n\t entry[\u0027label\u0027] \u003d fullPath\n\t tagProviderSourcesList.append(entry)\n\t targetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.options \u003d tagProviderSourcesList\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "utilsTab_changeSelectedPLC", + "pageScope": true, + "script": "\tresult\u003d\"\"\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerUtils\")\n\t selectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t selectedPLC\u003dtargetContainer.getChild(\"dropdownTargetPLC\").props.value\n\t tagProvidersSources \u003d system.tag.browse(path \u003dselectedTagProvider+\"/\"+selectedPLC , filter \u003d {})\n\t tagProviderSourcesList\u003d[]\n\t for tagProvidersSource in tagProvidersSources.getResults():\n\t fullPath\u003dstr(tagProvidersSource[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t entry\u003d{}\n\t entry[\u0027value\u0027] \u003d fullPath\n\t entry[\u0027label\u0027] \u003d fullPath\n\t tagProviderSourcesList.append(entry)\n\t targetContainer.getChild(\"dropdownCommandTarget\").props.options \u003d tagProviderSourcesList\n\t targetContainer.getChild(\"dropdownEventsSource\").props.options \u003d tagProviderSourcesList\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t result +\u003d errorMessage\n\ttargetContainer.getChild(\"textAreaResult\").props.text \u003d str(result)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "uploadBackup", + "pageScope": true, + "script": "\t# implement your handler here\n\tfileContent \u003d payload[\"fileContent\"]\n\tfileName\u003d payload[\"fileName\"]\n\tif \"Alarms\" in fileName:\n\t result\u003d\"Importing an Alarms backup file \"\n\t self.sendConsoleMsg(result)\n\t #Importing the alarms from a previously saved file\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerAlarms\")\n\t try:\n\t tableContent\u003d[]\n\t rowsValues\u003d[]\n\t rowsValues \u003d fileContent.splitlines()\n\t for indexRow in range(1,len(rowsValues)):\n\t rowFields \u003d rowsValues[indexRow].replace(\"\\\"\",\"\").split(\",\")\n\t rowContent\u003d{}\n\t rowContent[\"Row\"]\u003drowFields[0]\n\t rowContent[\"ID\"]\u003drowFields[1]\n\t rowContent[\"Name\"]\u003drowFields[2]\n\t rowContent[\"Priority\"]\u003drowFields[3]\n\t rowContent[\"Type\"]\u003drowFields[4]\n\t rowContent[\"Tested_date_UTC\"]\u003drowFields[5]\n\t rowContent[\"Result\"]\u003drowFields[6]\n\t rowContent[\"Notes\"]\u003drowFields[7]\n\t tableContent.append(rowContent)\n\t\t self.session.custom.alarms \u003d tableContent\n\t except:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t return\n\telif \"Sources\" in fileName:\n\t #Importing the sources from a previously saved file\n\t result\u003d\"Importing an Sources backup file \"\n\t self.sendConsoleMsg(result)\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerSources\")\n\t try:\n\t tableContent\u003d[]\n\t rowsValues\u003d[]\n\t rowsValues \u003d fileContent.splitlines()\n\t tagProviderSourcesList\u003d[]\n\t for indexRow in range(1,len(rowsValues)):\n\t system.perspective.print(str(indexRow))\n\t system.perspective.print(str(rowsValues[indexRow]))\n\t rowFields \u003d rowsValues[indexRow].replace(\"\\\"\",\"\").split(\",\")\n\t system.perspective.print(str(rowFields))\n\t rowContent\u003d{}\n\t rowContent[\"Row\"]\u003drowFields[0]\n\t rowContent[\"ID\"]\u003drowFields[1]\n\t rowContent[\"Source\"]\u003drowFields[2]\n\t rowContent[\"Tested_date_UTC\"]\u003drowFields[3]\n\t rowContent[\"Result\"]\u003drowFields[4]\n\t rowContent[\"Notes\"]\u003drowFields[5]\n\t system.perspective.print(str(rowContent))\n\t tableContent.append(rowContent)\n\t \n\t \n\t system.perspective.print(\"Setting Table Sources DATA\")\n\t \t\t\t\t\n\t self.session.custom.sources \u003d tableContent\n\t except:\n\t \tsystem.perspective.print(\"Error\")\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\t\t\n\t return\n\telif \"Sequence\" in fileName:\n\t result\u003d\"Importing sequence from file is not yet supported\"\n\t self.sendConsoleMsg(result)\n\telse:\n\t result\u003d\"Invalid file name\"\n\t self.sendConsoleMsg(result)\n\t \n\tresult\u003d\"File :%s imported Succesfully \"%fileName\n\tself.sendConsoleMsg(result)", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "measurementTab_setMode", + "pageScope": true, + "script": "\timport sys\n\tresult\u003d\"Setting Current Mode\"\n\tMODE_TYPE \u003d \"ModeChanged\"\n\ttargetState\u003dpayload[\"targetState\"]\n\t\n\tself.sendConsoleMsg(result)\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t tableData \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t selectedRows \u003d targetContainer.getChild(\"tableSequence\").props.selection.data\n\t newArray\u003d[]\n\t for element in tableData:\n\t newElement\u003d dict(element)\n\t if element[\"Selected\"] and element[\"Type\"] \u003d\u003d MODE_TYPE :\n\t newElement[\"CurrentMode\"]\u003dtargetState\n\t newArray.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data \u003d newArray\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t result +\u003d errorMessage\n\ttargetContainer.getChild(\"textAreaResult\").props.text \u003d result", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Column/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Column/resource.json new file mode 100644 index 0000000..66f5523 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Column/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2023-09-05T13:14:40Z" + }, + "lastModificationSignature": "1d84f637a3b7b0a62b825291e86a6c5097be19a9e4a9ca7545d1504c8272a864" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Column/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Column/thumbnail.png new file mode 100644 index 0000000..07843ca Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Column/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Column/view.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Column/view.json new file mode 100644 index 0000000..37073f4 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Column/view.json @@ -0,0 +1,110 @@ +{ + "custom": {}, + "params": { + "Display": true, + "Label": "value", + "Value": "RESULT_INSUFFICIENT_GAP_AT_INFEED" + }, + "propConfig": { + "params.Display": { + "paramDirection": "input", + "persistent": true + }, + "params.Label": { + "paramDirection": "input", + "persistent": true + }, + "params.Value": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 50, + "width": 140 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.params.Display" + }, + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.Label" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "border-bottom": "0.75px solid black" + }, + "textStyle": { + "fontSize": 12, + "fontWeight": "bolder", + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "value" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.params.Display" + }, + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.Value" + }, + "type": "property" + } + } + }, + "props": { + "textStyle": { + "fontSize": 12, + "overflowWrap": "break-word", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Message/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Message/resource.json new file mode 100644 index 0000000..4f2c39a --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Message/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2023-09-05T13:14:40Z" + }, + "lastModificationSignature": "968bb8f7abbee92745184e7352aeab5887aaf6f1fcb6394322c8a3b83b08a7a0" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Message/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Message/thumbnail.png new file mode 100644 index 0000000..082edb5 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Message/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Message/view.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Message/view.json new file mode 100644 index 0000000..decb668 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Message/view.json @@ -0,0 +1,115 @@ +{ + "custom": {}, + "params": { + "row": "value", + "rowIndex": "value", + "value": { + "Msg": "Mesg PlaceHolder", + "Timestamp": "TimeStamp Place holder" + } + }, + "propConfig": { + "params.row": { + "paramDirection": "input", + "persistent": true + }, + "params.rowIndex": { + "paramDirection": "input", + "persistent": true + }, + "params.value": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 59, + "width": 891 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "147px", + "shrink": 0 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.value" + }, + "transforms": [ + { + "code": "\treturn value[\"Timestamp\"]", + "type": "script" + } + ], + "type": "property" + } + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.value" + }, + "transforms": [ + { + "code": "\treturn value[\"Msg\"]", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "margin": "5px", + "padding": "5px" + }, + "textStyle": { + "fontSize": 14, + "fontWeight": "100", + "overflow": "visible", + "overflowWrap": "break-word", + "wordWrap": "break-word" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "root" + }, + "props": { + "style": { + "backgroundColor": "#AAAAAA", + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "color": "#000000", + "margin": "10px", + "padding": "5px" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Row/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Row/resource.json new file mode 100644 index 0000000..6868408 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Row/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2023-09-05T13:14:40Z" + }, + "lastModificationSignature": "80ac7caea7a97701ab22d24749afa0b9bc3e713ea9f9dc729baae36873a7d18e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Row/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Row/thumbnail.png new file mode 100644 index 0000000..7396f4b Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Row/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Row/view.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Row/view.json new file mode 100644 index 0000000..e898bdb --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Row/view.json @@ -0,0 +1,318 @@ +{ + "custom": { + "numberOfColumns": 6, + "test": [ + { + "Label": "Seq", + "Value": 2, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Label": "Type", + "Value": "StateChanged", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Label": "When", + "Value": "1670429640000", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Label": "Source", + "Value": "PLC01/054BV55", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Label": "CurrentState", + "Value": "", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Label": "ReasonCode", + "Value": "", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + } + ] + }, + "params": { + "checkedState": "False", + "index": "value", + "rowData": [ + [ + "Seq", + 2 + ], + [ + "Type", + "StateChanged" + ], + [ + "When", + "1670429640000" + ], + [ + "Source", + "PLC01/054BV55" + ], + [ + "CurrentState", + "" + ], + [ + "ReasonCode", + "" + ] + ] + }, + "propConfig": { + "custom.test": { + "persistent": true + }, + "params.checkedState": { + "paramDirection": "input", + "persistent": true + }, + "params.index": { + "paramDirection": "input", + "persistent": true + }, + "params.rowData": { + "onChange": { + "enabled": null, + "script": "\tself.custom.numberOfColumns \u003d len(self.params.rowData)\n\t\n\tsystem.perspective.print(\"ROW SCRIPT\")\n\tsystem.perspective.print(self.params.rowData)\n\tinstances \u003d []\n\t\n\tfor col in self.params.rowData:\n\t\tsystem.perspective.print(col)\n\t\tinstance \u003d {\n\t\t\t \"instanceStyle\": {\n\t\t\t \"classes\": \"\"\n\t\t\t },\n\t\t\t \"instancePosition\": {},\n\t\t\t \"Label\": col[0],\n\t\t\t \"Value\": col[1]\n\t\t\t }\n\t\tinstances.append(instance)\n\t\t\n\tself.getChild(\"root\").getChild(\"FlexRepeater\").props.instances \u003d instances\n\t\n\tself.custom.test \u003d instances\n" + }, + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 86, + "width": 1220 + } + }, + "root": { + "children": [ + { + "custom": { + "SelectionData": "value" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.print(self.view.params.index)\n\tmsg \u003d \"update_selectionData\"\n\tpayload \u003d {\n\t\t\"index\" : self.view.params.index,\n\t\t\"state\"\t: self.props.selected\n\t}\n\tsystem.perspective.sendMessage(msg, payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Checkbox" + }, + "position": { + "basis": "40px", + "shrink": 0 + }, + "propConfig": { + "props.selected": { + "binding": { + "config": { + "path": "view.params.checkedState" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "marginRight": "2px" + }, + "text": "" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "tableSelectionData", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.custom.SelectionData \u003d payload", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.checkbox" + }, + { + "custom": { + "key": { + "backgroundColor": "#F2F3F4", + "borderStyle": "none", + "classes": "FadeInFast, background, background-none", + "cursor": "pointer", + "max-height": "400px", + "overflow": "visible" + } + }, + "meta": { + "name": "FlexRepeater" + }, + "props": { + "elementPosition": { + "basis": "150px" + }, + "instances": [ + { + "Label": "Seq", + "Value": 2, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Label": "Type", + "Value": "StateChanged", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Label": "When", + "Value": "1670429640000", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Label": "Source", + "Value": "PLC01/054BV55", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Label": "CurrentState", + "Value": "", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Label": "ReasonCode", + "Value": "", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + } + ], + "path": "Main-Views/Commissioning Tool/Column", + "style": { + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderStyle": "solid", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "borderWidth": "1px", + "margin": "2px", + "marginRight": 5, + "overflow": "hidden", + "radius": "4px" + }, + "useDefaultViewHeight": false + }, + "type": "ia.display.flex-repeater" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.print(self.view.params.index)\n\tmsg \u003d \"measurementTab_deleteRows\"\n\tpayload \u003d {\"index\" : self.view.params.index}\n\tsystem.perspective.sendMessage(msg, payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "grow": 1 + }, + "props": { + "image": { + "icon": { + "path": "material/delete_forever" + } + }, + "primary": false, + "style": { + "margin": "10 px", + "max-height": "40px" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "40px", + "shrink": 0 + }, + "props": { + "direction": "column", + "justify": "center" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "style": { + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "classes": "FadeInFast, background, background-none", + "margin": "5px", + "max-height": "75px" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/SequenceTester/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/SequenceTester/resource.json new file mode 100644 index 0000000..b1caf00 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/SequenceTester/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2023-09-05T13:14:40Z" + }, + "lastModificationSignature": "5c35b4b0c31d4ec1a0472fbbb052c9a756e39aa10514ce1c0ef0c562d985f0ff" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/SequenceTester/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/SequenceTester/thumbnail.png new file mode 100644 index 0000000..770e284 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/SequenceTester/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/SequenceTester/view.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/SequenceTester/view.json new file mode 100644 index 0000000..de19572 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/SequenceTester/view.json @@ -0,0 +1,709 @@ +{ + "custom": { + "no_items_selected": true, + "numberOfRows": 3, + "transformedData": [ + { + "checkedState": false, + "index": 0, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + }, + "rowData": [ + [ + "Seq", + 1 + ], + [ + "Type", + "StateChanged" + ], + [ + "When", + 1692112814922 + ], + [ + "Source", + "PLC01/054BV51" + ], + [ + "CurrentState", + "" + ], + [ + "ReasonCode", + "" + ] + ] + }, + { + "checkedState": false, + "index": 1, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + }, + "rowData": [ + [ + "Seq", + "1" + ], + [ + "Type", + "ModeChanged" + ], + [ + "When", + 1692112814922 + ], + [ + "Source", + "PLC01/054BV51" + ], + [ + "CurrentMode", + "" + ] + ] + }, + { + "checkedState": false, + "index": 2, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + }, + "rowData": [ + [ + "Seq", + "2" + ], + [ + "Type", + "MeasurementEvent" + ], + [ + "When", + 1692112814922 + ], + [ + "Source", + "PLC01/054BV51" + ], + [ + "MeasurementName", + "" + ], + [ + "SamplingInterval", + "" + ], + [ + "Unit", + "" + ], + [ + "DeltaValue", + "" + ] + ] + } + ] + }, + "params": { + "last_message_index": 0, + "tabledata": [ + { + "CurrentMode": "", + "CurrentState": "", + "DeltaValue": "", + "EventID": "", + "EventState": "", + "MeasurementName": "", + "ReasonCode": "", + "SamplingInterval": "", + "Selected": false, + "Seq": 1, + "Source": "PLC01/054BV51", + "Type": "StateChanged", + "Unit": "", + "When": 1692112814922 + }, + { + "CurrentMode": "", + "CurrentState": "", + "DeltaValue": "", + "EventID": "", + "EventState": "", + "MeasurementName": "", + "ReasonCode": "", + "SamplingInterval": "", + "Selected": false, + "Seq": "1", + "Source": "PLC01/054BV51", + "Type": "ModeChanged", + "Unit": "", + "When": 1692112814922 + }, + { + "CurrentMode": "", + "CurrentState": "", + "DeltaValue": "", + "EventID": "", + "EventState": "", + "MeasurementName": "", + "ReasonCode": "", + "SamplingInterval": "", + "Selected": false, + "Seq": "2", + "Source": "PLC01/054BV51", + "Type": "MeasurementEvent", + "Unit": "", + "When": 1692112814922 + } + ] + }, + "propConfig": { + "custom.no_items_selected": { + "binding": { + "config": { + "path": "view.params.tabledata" + }, + "transforms": [ + { + "code": "\tno_items_selected \u003d True\n\t\n\tfor i in value :\n\t\tif i[\"Selected\"]:\n\t\t\tno_items_selected \u003d False\n\t \t\n\treturn no_items_selected", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.transformedData": { + "onChange": { + "enabled": false, + "script": "\t\n\tinstances \u003d[]\n\t\n\tfor i , value in enumerate(self.custom.transformedData):\n\t\tinstance \u003d {\n\t\t\t\t \"instanceStyle\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t },\n\t\t\t\t \"instancePosition\": {},\n\t\t\t\t \"index\": i,\n\t\t\t\t \"rowData\": value\n\t\t\t\t }\n\t\tinstances.append(instance)\n\t\t\n\tself.getChild(\"root\").getChild(\"FlexRepeater\").props.instances \u003d instances\n\t" + }, + "persistent": true + }, + "params.last_message_index": { + "paramDirection": "input", + "persistent": true + }, + "params.tabledata": { + "onChange": { + "enabled": null, + "script": "\n\ttransformed_data \u003d []\n\t\n\tstateChangeParams \u003d [\"CurrentState\" , \"ReasonCode\"]\n\tmodeChangeParams \u003d [\"CurrentMode\"]\n\teventParams \u003d [\"EventID\" , \"EventState\"]\n\tmeasurementParams \u003d [\"MeasurementName\", \"SamplingInterval\", \"Unit\", \"DeltaValue\" ]\n\t\t\t\t\t\n\tfor item in self.params.tabledata:\n\t\trow_data \u003d []\n\t\tcol1 \u003d (\"Seq\", item[\"Seq\"])\n\t\trow_data.append(col1)\n\t\tcol2 \u003d (\"Type\",item[\"Type\"])\n\t\trow_data.append(col2)\n\t\tcol3 \u003d (\"When\",item[\"When\"])\n\t\trow_data.append(col3)\n\t\tcol4 \u003d (\"Source\", item[\"Source\"])\n\t\trow_data.append(col4)\n\t\t\n\t\tif item[\"Type\"] \u003d\u003d \"StateChanged\":\n\t\t\tcol5 \u003d (\"CurrentState\", item[\"CurrentState\"])\n\t\t\trow_data.append(col5)\n\t\t\tcol6 \u003d (\"ReasonCode\", item[\"ReasonCode\"]) \n\t\t\trow_data.append(col6)\n\t\t\n\t\tif item[\"Type\"] \u003d\u003d \"ModeChanged\":\n\t\t\tcol5 \u003d (\"CurrentMode\", item[\"CurrentMode\"])\n\t\t\trow_data.append(col5)\n\t\t\n\t\tif item[\"Type\"] \u003d\u003d \"Event\":\n\t\t\tcol5 \u003d (\"EventID\", item[\"EventID\"])\n\t\t\trow_data.append(col5)\n\t\t\t\n\t\t\tcol6 \u003d (\"EventState\", item[\"EventState\"])\n\t\t\trow_data.append(col6)\n\t\t\t\n\t\tif item[\"Type\"] \u003d\u003d \"MeasurementEvent\":\n\t\t\tcol5 \u003d (\"MeasurementName\", item[\"MeasurementName\"])\n\t\t\trow_data.append(col5)\n\t\t\tcol6 \u003d (\"SamplingInterval\", item[\"SamplingInterval\"])\n\t\t\trow_data.append(col6)\n\t\t\tcol7 \u003d (\"Unit\", item[\"Unit\"])\n\t\t\trow_data.append(col7)\n\t\t\tcol8 \u003d (\"DeltaValue\", item[\"DeltaValue\"])\n\t\t\trow_data.append(col8)\n\t\t\n\t\tselected \u003d item[\"Selected\"]\t\t\n\t\t\t\t\t\t\t\t\n\t\tsystem.perspective.print((row_data, selected ))\n\t\ttransformed_data.append((row_data, selected))\n\t\n\tself.custom.numberOfRows \u003d len(self.params.tabledata)\n\t\n\tsystem.perspective.print(transformed_data)\n\tself.custom.transformedData \u003d transformed_data\n\t\n\t\n\tsystem.perspective.print(type(self.custom.transformedData))\n\t\n\t\t\n\tinstances \u003d[]\n\t\n\tfor i , row in enumerate(transformed_data):\n\t\tinstance \u003d {\n\t\t\t\t \"instanceStyle\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t },\n\t\t\t\t \"instancePosition\": {},\n\t\t\t\t \"index\": i,\n\t\t\t\t \"rowData\": row[0], \n\t\t\t\t \"checkedState\": row[1]\n\t\t\t\t }\n\t\tinstances.append(instance)\n\t\t\n\tself.getChild(\"root\").getChild(\"FlexRepeater\").props.instances \u003d instances\n\t\n\tself.custom.transformedData \u003d instances\n\t\t" + }, + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 788, + "width": 1314 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "fontWeight": "bolder" + }, + "text": "Sequence" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "FlexRepeater" + }, + "position": { + "basis": "320px", + "grow": 1, + "shrink": 0 + }, + "props": { + "direction": "column", + "elementPosition": { + "basis": "800px" + }, + "elementStyle": { + "max-height": "75px", + "min-height": "75px" + }, + "instances": [ + { + "checkedState": false, + "index": 0, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + }, + "rowData": [ + [ + "Seq", + 1 + ], + [ + "Type", + "StateChanged" + ], + [ + "When", + 1692112814922 + ], + [ + "Source", + "PLC01/054BV51" + ], + [ + "CurrentState", + "" + ], + [ + "ReasonCode", + "" + ] + ] + }, + { + "checkedState": false, + "index": 1, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + }, + "rowData": [ + [ + "Seq", + "1" + ], + [ + "Type", + "ModeChanged" + ], + [ + "When", + 1692112814922 + ], + [ + "Source", + "PLC01/054BV51" + ], + [ + "CurrentMode", + "" + ] + ] + }, + { + "checkedState": false, + "index": 2, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + }, + "rowData": [ + [ + "Seq", + "2" + ], + [ + "Type", + "MeasurementEvent" + ], + [ + "When", + 1692112814922 + ], + [ + "Source", + "PLC01/054BV51" + ], + [ + "MeasurementName", + "" + ], + [ + "SamplingInterval", + "" + ], + [ + "Unit", + "" + ], + [ + "DeltaValue", + "" + ] + ] + } + ], + "path": "Main-Views/Commissioning Tool/Row", + "useDefaultViewHeight": false + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "delete-instance", + "pageScope": true, + "script": "\t# implement your handler here\n\tsystem.perspective.print(payload)", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.flex-repeater" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tif self.view.custom.no_items_selected :\n\t\tsystem.perspective.sendMessage(\"SelectAll\", None , \"page\")\n\t\tMsg \u003d \"Selecting all messages \"\n\telse:\n\t\tsystem.perspective.sendMessage(\"ClearSelection\", None , \"page\")\n\t\tMsg \u003d \"Clearing selection \"\n\t\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "ClearSelection" + }, + "position": { + "basis": "55px", + "shrink": 0 + }, + "propConfig": { + "props.image.icon.path": { + "binding": { + "config": { + "path": "view.custom.no_items_selected" + }, + "transforms": [ + { + "code": "\tif not value:\n\t\treturn \"material/clear\"\n\telse:\n\t\treturn \"material/check_box\"", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "icon": {} + }, + "primary": false, + "style": { + "marginLeft": "10px" + }, + "text": "" + }, + "type": "ia.input.button" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t\n\tMsg \u003d \"Adding a State Message to the Sequence \"\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\tpayload \u003d {\"messageType\":\"StateChanged\"}\n\tsystem.perspective.sendMessage(\"measurementTab_addRow\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "115px" + }, + "props": { + "image": { + "icon": { + "path": "material/control_point" + } + }, + "primary": false, + "text": "State" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t\n\tMsg \u003d \"Adding a Mode Message to the Sequence \"\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\tpayload \u003d {\"messageType\":\"ModeChanged\"}\n\tsystem.perspective.sendMessage(\"measurementTab_addRow\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0" + }, + "position": { + "basis": "115px" + }, + "props": { + "image": { + "icon": { + "path": "material/control_point" + } + }, + "primary": false, + "text": "Mode" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tMsg \u003d \"Adding a Event Message to the Sequence \"\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\t\n\tpayload \u003d {\"messageType\":\"Event\"}\n\tsystem.perspective.sendMessage(\"measurementTab_addRow\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_1" + }, + "position": { + "basis": "115px" + }, + "props": { + "image": { + "icon": { + "path": "material/control_point" + } + }, + "primary": false, + "text": "Event" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tMsg \u003d \"Adding a Measurement Message to the Sequence \"\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\t\n\tpayload \u003d {\"messageType\":\"MeasurementEvent\"}\n\tsystem.perspective.sendMessage(\"measurementTab_addRow\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_2" + }, + "position": { + "basis": "140px" + }, + "props": { + "image": { + "icon": { + "path": "material/control_point" + } + }, + "primary": false, + "text": "Measurement" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "500px", + "grow": 1, + "shrink": 0 + }, + "props": { + "justify": "space-around", + "style": { + "marginLeft": "10px", + "marginRight": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "32px", + "grow": 1 + }, + "props": { + "style": { + "fontWeight": "ClearAll", + "min-width": "value" + } + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "50px", + "grow": 1 + }, + "props": { + "text": "Row of last message sent:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "TextField" + }, + "position": { + "basis": "150px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.last_message_index" + }, + "type": "property" + } + } + }, + "props": { + "deferUpdates": false, + "enabled": false, + "style": { + "max-width": "50px", + "textAlign": "center" + } + }, + "type": "ia.input.text-field" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "250px", + "shrink": 0 + }, + "props": { + "justify": "space-between" + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "32px", + "grow": 1 + }, + "props": { + "style": { + "fontWeight": "ClearAll", + "min-width": "value" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tMsg \u003d \"Removing All Messages from the Sequence\"\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\t\n\tsystem.perspective.sendMessage(\"ClearAll\", None , \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "ClearAll", + "tooltip": { + "enabled": true, + "text": "Clear All" + } + }, + "position": { + "basis": "40px", + "shrink": 0 + }, + "props": { + "image": { + "icon": { + "path": "material/delete_forever" + } + }, + "primary": false, + "style": { + "marginLeft": "15px" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "40px", + "shrink": 0 + }, + "props": { + "justify": "space-around", + "style": { + "margin": "5px", + "overflow": "visible" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "margin": "5px" + }, + "wrap": "wrap" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Upload_files/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Upload_files/resource.json new file mode 100644 index 0000000..14aad8e --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Upload_files/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2023-09-05T13:14:40Z" + }, + "lastModificationSignature": "e1779304363230bd73a2cf727abd8df6c200252c949ddc252bce862bb4f374cb" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Upload_files/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Upload_files/thumbnail.png new file mode 100644 index 0000000..cecbc07 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Upload_files/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Upload_files/view.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Upload_files/view.json new file mode 100644 index 0000000..242366a --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/Upload_files/view.json @@ -0,0 +1,198 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 301, + "width": 493 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "50px", + "grow": 1 + }, + "props": { + "text": "alarms.csv" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileName\":event.file.name}\n\tsystem.perspective.sendMessage(\"alarmsTab_importFile\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload" + }, + "position": { + "basis": "200px" + }, + "props": { + "style": { + "classes": "", + "margin": "10px" + }, + "supportedFileTypes": [ + "csv" + ] + }, + "type": "ia.input.fileupload" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "props": { + "style": { + "margin": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "50px", + "grow": 1 + }, + "props": { + "text": "sources.csv" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileName\":event.file.name}\n\tsystem.perspective.sendMessage(\"sourcesTab_importFile\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload" + }, + "position": { + "basis": "200px" + }, + "props": { + "style": { + "classes": "", + "margin": "10px" + }, + "supportedFileTypes": [ + "csv" + ] + }, + "type": "ia.input.fileupload" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "props": { + "style": { + "margin": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "50px", + "grow": 1 + }, + "props": { + "text": "Pick up where you left off ?" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileName\":event.file.name}\n\tsystem.perspective.sendMessage(\"uploadBackup\",payload)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload" + }, + "position": { + "basis": "200px" + }, + "props": { + "style": { + "classes": "", + "margin": "10px" + }, + "supportedFileTypes": [ + "csv" + ] + }, + "type": "ia.input.fileupload" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "props": { + "style": { + "margin": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/UserFeedBack/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/UserFeedBack/resource.json new file mode 100644 index 0000000..9fd90a5 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/UserFeedBack/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2023-09-05T13:14:40Z" + }, + "lastModificationSignature": "3a1df99312fc6bbdfb275670011eb3f51d411cbe540c88ba80683689e2d79dea" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/UserFeedBack/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/UserFeedBack/thumbnail.png new file mode 100644 index 0000000..41bcc9f Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/UserFeedBack/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/UserFeedBack/view.json b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/UserFeedBack/view.json new file mode 100644 index 0000000..7db571c --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Commissioning Tool/UserFeedBack/view.json @@ -0,0 +1,242 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 155, + "width": 1910 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "233px" + }, + "props": { + "text": "Console Log", + "textStyle": { + "fontWeight": "bold", + "padding": "5px", + "textDecoration": "underline" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tsystem.perspective.sendMessage(\"clearFeedback\" , payload , \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "40px" + }, + "props": { + "image": { + "icon": { + "path": "material/delete_forever" + } + }, + "primary": false, + "style": { + "borderStyle": "solid" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "40px" + }, + "props": { + "justify": "space-between", + "style": { + "paddingBottom": "5px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Table" + }, + "position": { + "basis": "400px", + "grow": 1 + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Value", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "Main-Views/Commissioning Tool/Message", + "visible": true, + "width": "100px" + } + ], + "data": [ + { + "Value": { + "Msg": "", + "Timestamp": "" + } + } + ], + "enableHeader": false, + "pager": { + "bottom": false + }, + "rows": { + "subviewExpansionMode": "single" + }, + "selection": { + "enableRowSelection": false + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "clearFeedback", + "pageScope": true, + "script": "\t# implement your handler here\n\t\n\tself.props.data \u003d []", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "addFeedback", + "pageScope": true, + "script": "\t# implement your handler here\n\t\n\trecord \u003d {\n\t \"Value\": {\n\t \"Timestamp\": str(system.date.now()),\n\t \"Msg\": payload[\"Msg\"]\n\t }\n\t}\n\tself.props.data.insert(0, record)", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "80px", + "grow": 1, + "shrink": 0 + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "padding": "5px" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDetailedViewMapping/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDetailedViewMapping/resource.json new file mode 100644 index 0000000..564cddd --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDetailedViewMapping/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2024-05-23T11:48:44Z" + }, + "lastModificationSignature": "e27e5d5ff491ce5ecdd223a5040dad6e50eb25fff41b09ccf866e4b1e9ce420e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDetailedViewMapping/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDetailedViewMapping/thumbnail.png new file mode 100644 index 0000000..d587729 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDetailedViewMapping/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDetailedViewMapping/view.json b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDetailedViewMapping/view.json new file mode 100644 index 0000000..880cdb0 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDetailedViewMapping/view.json @@ -0,0 +1,778 @@ +{ + "custom": {}, + "params": { + "params": "value" + }, + "propConfig": { + "params.params": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 400 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "50px", + "display": false + }, + "props": { + "text": "Invalid Device List Data . Make sure format is correct E.g [\"\u003cPLCiD\u003e\", \"\u003cPLCiD\u003e\"]" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "device-list-error", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.position.display \u003d not payload", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "32px" + }, + "props": { + "path": "material/view_list", + "style": { + "marginLeft": "10px" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "129px", + "grow": 1 + }, + "props": { + "style": { + "marginLeft": "10px" + }, + "text": "Add Detailed View", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "20px", + "fontWeight": "bolder", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "40px" + }, + "props": { + "justify": "space-around", + "style": { + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "129px" + }, + "props": { + "style": { + "marginLeft": "0px" + }, + "text": "View", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "16px", + "fontWeight": "bold" + } + }, + "type": "ia.display.label" + }, + { + "custom": { + "Device": "", + "tagPath": "Configuration/FC" + }, + "meta": { + "name": "TextField" + }, + "position": { + "basis": "150px" + }, + "propConfig": { + "props.text": { + "onChange": { + "enabled": null, + "script": "\tsystem.perspective.sendMessage(\"update-view-data\", currentValue.value)" + } + } + }, + "props": { + "placeholder": "\u003cView Id\u003e" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "multiple_selection", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.props.enabled \u003d not payload", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "missing-data", + "pageScope": true, + "script": "\t# implement your handler here\n\t", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.text-field" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "40px" + }, + "props": { + "justify": "space-around", + "style": { + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "130px" + }, + "props": { + "style": { + "marginLeft": "0px" + }, + "text": "Device List :", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "16px", + "fontWeight": "bold" + } + }, + "type": "ia.display.label" + }, + { + "custom": { + "dataToAdd": "[\"PLC01\"]", + "key": "prefix", + "tagPath": "Configuration/DetailedViews" + }, + "meta": { + "name": "TextField_0" + }, + "position": { + "basis": "150px" + }, + "propConfig": { + "props.text": { + "onChange": { + "enabled": null, + "script": "\timport ast\n\t\t\n\tdef is_valid_list(s):\n\t try:\n\t # Try to evaluate the string\n\t result \u003d ast.literal_eval(s)\n\t # Check if the result is a list\n\t return isinstance(result, list)\n\t except (ValueError, SyntaxError):\n\t # If there is a ValueError or SyntaxError, the string is not a valid list\n\t return False\n\n\t\n\tif is_valid_list(currentValue.value):\n\t\tself.custom.dataToAdd \u003d currentValue.value\n\t\tsystem.perspective.sendMessage(\"update-devicelist-data\", currentValue.value)\n\telse:\n\t\tsystem.perspective.sendMessage(\"update-devicelist-data\", \"\")\n\t\tsystem.perspective.print(\"Not a valid list \")\n\t\n\tsystem.perspective.sendMessage(\"device-list-error\", is_valid_list(currentValue.value))" + } + } + }, + "props": { + "placeholder": "[\"PLC02\", \"PLC03\"]" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "multiple_selection", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.props.enabled \u003d not payload", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.text-field" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "40px" + }, + "props": { + "justify": "space-around", + "style": { + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Checkbox" + }, + "position": { + "basis": "130px" + }, + "propConfig": { + "props.selected": { + "onChange": { + "enabled": null, + "script": "\tsystem.perspective.sendMessage(\"multiple_selection\", payload\u003dcurrentValue.value)" + } + } + }, + "props": { + "text": "Upload" + }, + "type": "ia.input.checkbox" + }, + { + "custom": { + "data": { + "BOB": [ + "THE", + "NOB" + ], + "FSC1": [ + "FSC1" + ], + "FSC2": [ + "FSC2" + ], + "FSC_Cells": [ + "FSC_Cells" + ], + "FSC_Induct_1-4": [ + "FSC_Induct_1-4" + ], + "FSC_Induct_5-8": [ + "FSC10" + ], + "PLC01": [ + "PLC01" + ], + "PLC02": [ + "PLC02", + "PLC98" + ], + "PLC03": [ + "PLC03" + ], + "PLC06": [ + "PLC06", + "PLC07" + ], + "PLC08": [ + "PLC08", + "PLC99" + ], + "PLC09": [ + "PLC09" + ], + "PLC09_Receiving2": [ + "PLC09_Receiving2" + ], + "PLC09_Receiving3": [ + "PLC09_Receiving3" + ], + "PLC1000": [ + "PLC1000" + ], + "PLC1000_Receiving4": [ + "PLC1000_Receiving4" + ], + "PLC1301": [ + "ARSAW1301" + ], + "PLC1302": [ + "ARSAW1302" + ], + "PLC1303": [ + "ARSAW1303" + ], + "PLC1304": [ + "ARSAW1304" + ], + "PLC1305": [ + "ARSAW1305" + ], + "PLC1306": [ + "ARSAW1306" + ], + "PLC1307": [ + "ARSAW1307" + ], + "PLC1308": [ + "ARSAW1308" + ], + "PLC1309": [ + "ARSAW1309" + ], + "PLC1310": [ + "ARSAW1310" + ], + "PLC1311": [ + "ARSAW1311" + ], + "PLC1312": [ + "ARSAW1312" + ], + "PLC13_SC1": [ + "PLC13" + ], + "PLC13_SC2": [ + "PLC13_SC2" + ], + "PLC14": [ + "PLC14" + ], + "PLC1501": [ + "ARSAW1501" + ], + "PLC1502": [ + "ARSAW1502" + ], + "PLC1503": [ + "ARSAW1503" + ], + "PLC1504": [ + "ARSAW1504" + ], + "PLC1505": [ + "ARSAW1505" + ], + "PLC1506": [ + "ARSAW1506" + ], + "PLC1507": [ + "ARSAW1507" + ], + "PLC1508": [ + "ARSAW1508" + ], + "PLC1509": [ + "ARSAW1509" + ], + "PLC1510": [ + "ARSAW1510" + ], + "PLC1511": [ + "ARSAW1511" + ], + "PLC1512": [ + "ARSAW1512" + ], + "PLC15_SC1": [ + "PLC15" + ], + "PLC15_SC2": [ + "PLC15_SC2" + ], + "PLC16": [ + "PLC16" + ], + "PLC20_Tote1-3": [ + "PLC20" + ], + "PLC20_Tote4-8": [ + "PLC20_Tote4-8" + ], + "PLC21_22": [ + "PLC21", + "PLC22" + ], + "PLC23": [ + "PLC23" + ], + "PLC24": [ + "PLC24", + "PLC97" + ], + "PLC25": [ + "PLC25" + ], + "PLC26": [ + "PLC26" + ], + "PLC27": [ + "PLC27" + ], + "PLC30": [ + "PLC30" + ], + "PLC31": [ + "PLC31" + ], + "PLC32": [ + "PLC32" + ], + "PLC60": [ + "PLC60" + ], + "PLC61": [ + "PLC61" + ], + "PLC69": [ + "PLC69" + ], + "PLC70": [ + "PLC70", + "PLC71" + ], + "PLC80_81_82": [ + "PLC80", + "PLC81", + "PLC82" + ] + }, + "fileString": "\"PageId\",\"DeviceList\"\n\"PLC1301\",\"ARSAW1301\"\n\"PLC03\",\"PLC03\"\n\"PLC1302\",\"ARSAW1302\"\n\"PLC01\",\"PLC01\"\n\"PLC02\",\"PLC02#PLC98\"\n\"PLC1305\",\"ARSAW1305\"\n\"PLC1503\",\"ARSAW1503\"\n\"PLC08\",\"PLC08#PLC99\"\n\"PLC1306\",\"ARSAW1306\"\n\"PLC1504\",\"ARSAW1504\"\n\"PLC1501\",\"ARSAW1501\"\n\"PLC1303\",\"ARSAW1303\"\n\"PLC06\",\"PLC06#PLC07\"\n\"PLC1304\",\"ARSAW1304\"\n\"PLC1502\",\"ARSAW1502\"\n\"PLC09_Receiving3\",\"PLC09_Receiving3\"\n\"PLC09_Receiving2\",\"PLC09_Receiving2\"\n\"PLC1309\",\"ARSAW1309\"\n\"PLC1507\",\"ARSAW1507\"\n\"PLC1508\",\"ARSAW1508\"\n\"PLC1505\",\"ARSAW1505\"\n\"PLC1307\",\"ARSAW1307\"\n\"PLC09\",\"PLC09\"\n\"PLC1308\",\"ARSAW1308\"\n\"PLC1506\",\"ARSAW1506\"\n\"PLC20_Tote1-3\",\"PLC20\"\n\"PLC1509\",\"ARSAW1509\"\n\"PLC14\",\"PLC14\"\n\"PLC80_81_82\",\"PLC80#PLC81#PLC82\"\n\"PLC16\",\"PLC16\"\n\"FSC_Induct_1-4\",\"FSC_Induct_1-4\"\n\"FSC_Induct_5-8\",\"FSC10\"\n\"FSC_Cells\",\"FSC_Cells\"\n\"PLC21_22\",\"PLC21#PLC22\"\n\"PLC25\",\"PLC25\"\n\"PLC69\",\"PLC69\"\n\"PLC26\",\"PLC26\"\n\"PLC23\",\"PLC23\"\n\"PLC24\",\"PLC24#PLC97\"\n\"PLC27\",\"PLC27\"\n\"PLC61\",\"PLC61\"\n\"PLC60\",\"PLC60\"\n\"PLC1000\",\"PLC1000\"\n\"PLC20_Tote4-8\",\"PLC20_Tote4-8\"\n\"PLC13_SC2\",\"PLC13_SC2\"\n\"PLC13_SC1\",\"PLC13\"\n\"PLC1312\",\"ARSAW1312\"\n\"PLC1510\",\"ARSAW1510\"\n\"PLC1511\",\"ARSAW1511\"\n\"PLC1310\",\"ARSAW1310\"\n\"PLC1311\",\"ARSAW1311\"\n\"PLC1512\",\"ARSAW1512\"\n\"PLC70\",\"PLC70#PLC71\"\n\"PLC32\",\"PLC32\"\n\"PLC30\",\"PLC30\"\n\"PLC31\",\"PLC31\"\n\"FSC1\",\"FSC1\"\n\"PLC15_SC2\",\"PLC15_SC2\"\n\"FSC2\",\"FSC2\"\n\"PLC1000_Receiving4\",\"PLC1000_Receiving4\"\n\"PLC15_SC1\",\"PLC15\"\n", + "list_data": [ + "PLC1301", + "ARSAW1301\r", + "PLC03", + "PLC03\r", + "PLC1302", + "ARSAW1302\r", + "PLC01", + "PLC01\r", + "PLC02", + "PLC02#PLC98\r", + "PLC1305", + "ARSAW1305\r", + "PLC1503", + "ARSAW1503\r", + "PLC08", + "PLC08#PLC99\r", + "PLC1306", + "ARSAW1306\r", + "PLC1504", + "ARSAW1504\r", + "PLC1501", + "ARSAW1501\r", + "PLC1303", + "ARSAW1303\r", + "PLC06", + "PLC06#PLC07\r", + "PLC1304", + "ARSAW1304\r", + "PLC1502", + "ARSAW1502\r", + "PLC09_Receiving3", + "PLC09_Receiving3\r", + "PLC09_Receiving2", + "PLC09_Receiving2\r", + "PLC1309", + "ARSAW1309\r", + "PLC1507", + "ARSAW1507\r", + "PLC1508", + "ARSAW1508\r", + "PLC1505", + "ARSAW1505\r", + "PLC1307", + "ARSAW1307\r", + "PLC09", + "PLC09\r", + "PLC1308", + "ARSAW1308\r", + "PLC1506", + "ARSAW1506\r", + "PLC20_Tote1-3", + "PLC20\r", + "PLC1509", + "ARSAW1509\r", + "PLC14", + "PLC14\r", + "PLC80_81_82", + "PLC80#PLC81#PLC82\r", + "PLC16", + "PLC16\r", + "FSC_Induct_1-4", + "FSC_Induct_1-4\r", + "FSC_Induct_5-8", + "FSC10\r", + "FSC_Cells", + "FSC_Cells\r", + "PLC21_22", + "PLC21#PLC22\r", + "PLC25", + "PLC25\r", + "PLC69", + "PLC69\r", + "PLC26", + "PLC26\r", + "PLC23", + "PLC23\r", + "PLC24", + "PLC24#PLC97\r", + "PLC27", + "PLC27\r", + "PLC61", + "PLC61\r", + "PLC60", + "PLC60\r", + "PLC1000", + "PLC1000\r", + "PLC20_Tote4-8", + "PLC20_Tote4-8\r", + "PLC13_SC2", + "PLC13_SC2\r", + "PLC13_SC1", + "PLC13\r", + "PLC1312", + "ARSAW1312\r", + "PLC1510", + "ARSAW1510\r", + "PLC1511", + "ARSAW1511\r", + "PLC1310", + "ARSAW1310\r", + "PLC1311", + "ARSAW1311\r", + "PLC1512", + "ARSAW1512\r", + "PLC70", + "PLC70#PLC71\r", + "PLC32", + "PLC32\r", + "PLC30", + "PLC30\r", + "PLC31", + "PLC31\r", + "FSC1", + "FSC1\r", + "PLC15_SC2", + "PLC15_SC2\r", + "FSC2", + "FSC2\r", + "PLC1000_Receiving4", + "PLC1000_Receiving4\r", + "PLC15_SC1", + "PLC15\r", + "BOB", + "THE#NOB" + ], + "testParsing": true + }, + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "\t\n#\tdef compare_dicts(dict1, dict2):\n#\t # Check if dictionaries have the same keys\n#\t if set(dict1.keys()) !\u003d set(dict2.keys()):\n#\t return False\n#\t \n#\t # Check if values for each key are equal\n#\t for key in dict1:\n#\t if dict1[key] !\u003d dict2[key]:\n#\t \tsystem.perspective.print(\"Uploaded data Value : %s\"%dict1[key])\n#\t \tsystem.perspective.print(\"Tag data Value : %s\"%dict2[key])\n#\t \treturn False\n#\t \n#\t # If all values are equal, return True\n#\t return True\n#\t\n#\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileName\":event.file.name}\n#\twhid \u003d self.session.custom.fc\n#\tdata \u003d{}\n#\t\n#\tdef convert_csv_string_list(string):\n#\t\t# removes new line chars and \n#\t\treturn string.replace(\"\\n\",\",\").replace(\"\\\"\",\"\").split(\",\")[2:]\n#\t\n#\tdef convert_dict_value_to_list(string):\n#\t\tdevice_list \u003d []\n#\t\tfor i in string.replace(\"#\", \",\").split(\",\"):\n#\t\t\tdevice_list.append(i.strip())\n#\t\treturn device_list\n#\t\n#\tlist_data \u003d convert_csv_string_list(event.file.getString())\n#\n#\tself.custom.list_data \u003d list_data\n#\t\n#\tdata \u003d {}\n#\tfor i in range(0, len(list_data),2):\n#\t\n#\t\tdata[list_data[i]]\u003d convert_dict_value_to_list(list_data[i+1])\n#\n#\tself.custom.data \u003d data\n#\tif self.custom.testParsing:\n#\t\ttag_dict \u003dsystem.util.jsonDecode(system.tag.readBlocking(\"[%s_SCADA_TAG_PROVIDER]Configuration/DetailedViews\"%whid)[0].value)\n#\t\t\n#\t\tsystem.perspective.print(\"TestResult : %s\"%compare_dicts(data, tag_dict))\n#\n#\tsystem.tag.writeBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/DetailedViews\"%whid], system.util.jsonEncode(data))\n\n\twhid \u003d self.session.custom.fc\n\tFileHandler.uploader.add_detailed_view_btn_code(whid, event)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload" + }, + "position": { + "basis": "150px", + "display": false + }, + "props": { + "style": { + "classes": "" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "multiple_selection", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.position.display \u003d payload ", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.fileupload" + }, + { + "custom": { + "rowToAdd": { + "deviceList": "", + "view": "" + } + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\twhid \u003d self.session.custom.fc\n\ttagPath \u003d \"[%s_SCADA_TAG_PROVIDER]Configuration/DetailedViews\"%(whid)\n\t\n\ttagData \u003d system.util.jsonDecode(system.tag.readBlocking(tagPath)[0].value)\n\tself.custom.tagData.append(self.custom.rowToAdd)\n\t\n\tdata \u003d []\n\tfor i in system.util.jsonDecode(self.custom.rowToAdd[\"deviceList\"]):\n\t\tdata.append(i)\n\t\n\ttagData[self.custom.rowToAdd[\"view\"]] \u003d data\n\t\t\t\n\t\n\tsystem.tag.writeBlocking([tagPath], [system.util.jsonEncode(tagData)])\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button", + "tooltip": { + "enabled": true, + "text": "Missing Data for : [u\u0027deviceList\u0027, u\u0027view\u0027]" + } + }, + "position": { + "basis": "150px" + }, + "propConfig": { + "custom.tagData": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/DetailedViews" + }, + "transforms": [ + { + "code": "\treturn [{\"PageId\":k,\"DeviceList\":v}for k,v in system.util.jsonDecode(value).items()]", + "type": "script" + } + ], + "type": "tag" + } + }, + "props.enabled": { + "binding": { + "config": { + "path": "this.custom.rowToAdd" + }, + "transforms": [ + { + "code": "\n\tmissing_data \u003d []\n\tfor k, v in value.items():\n\t\tif not v:\n\t\t\tmissing_data.append(k)\n\t\n\tif missing_data:\n\t\tenabled \u003d False\n\t\tmsg \u003d \"Missing Data for : %s\"%missing_data\n\telse:\n\t\tenabled \u003d True\n\t\tmsg \u003d \"\"\n\t\n\tself.meta.tooltip.text \u003d msg \n\t\n\treturn enabled\n\t", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/add_circle" + }, + "position": "right" + }, + "primary": false, + "text": "Submit" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-devicelist-data", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.custom.rowToAdd[\"deviceList\"] \u003d payload", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "update-view-data", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.custom.rowToAdd[\"view\"] \u003d payload", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "multiple_selection", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.position.display \u003d not payload", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer_5" + }, + "position": { + "basis": "40px" + }, + "props": { + "justify": "space-around", + "style": { + "margin-top": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderStyle": "solid", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "margin": "10px" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDevice/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDevice/resource.json new file mode 100644 index 0000000..f7ba882 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDevice/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2024-05-23T11:48:44Z" + }, + "lastModificationSignature": "b5fe38b2e79ff3a74ec6805f75ec0f650ca606fa7126d50fd4d39e9112a56cfe" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDevice/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDevice/thumbnail.png new file mode 100644 index 0000000..fc50d9c Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDevice/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDevice/view.json b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDevice/view.json new file mode 100644 index 0000000..a625894 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/AddDevice/view.json @@ -0,0 +1,1001 @@ +{ + "custom": {}, + "params": { + "params": "value" + }, + "propConfig": { + "params.params": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 400 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "32px" + }, + "props": { + "path": "material/settings_applications", + "style": { + "marginLeft": "10px" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "129px", + "grow": 1 + }, + "props": { + "style": { + "marginLeft": "10px" + }, + "text": "Add Device", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "20px", + "fontWeight": "bolder", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "40px" + }, + "props": { + "justify": "space-around", + "style": { + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "129px" + }, + "props": { + "style": { + "marginLeft": "0px" + }, + "text": "Device :", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "16px", + "fontWeight": "bold" + } + }, + "type": "ia.display.label" + }, + { + "custom": { + "Device": "", + "tagPath": "Configuration/FC" + }, + "meta": { + "name": "TextField" + }, + "position": { + "basis": "150px" + }, + "propConfig": { + "props.text": { + "onChange": { + "enabled": null, + "script": "\tsystem.perspective.sendMessage(\"update-device-data\", currentValue.value)" + } + } + }, + "props": { + "placeholder": "\u003cDevice Id\u003e" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "multiple_selection", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.props.enabled \u003d not payload", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "missing-data", + "pageScope": true, + "script": "\t# implement your handler here\n\t", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.text-field" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "40px" + }, + "props": { + "justify": "space-around", + "style": { + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "130px" + }, + "props": { + "style": { + "marginLeft": "0px" + }, + "text": "Area :", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "16px", + "fontWeight": "bold" + } + }, + "type": "ia.display.label" + }, + { + "custom": { + "key": "prefix", + "tagPath": "Configuration/aws" + }, + "meta": { + "name": "TextField_0" + }, + "position": { + "basis": "150px" + }, + "propConfig": { + "props.text": { + "onChange": { + "enabled": null, + "script": "\tsystem.perspective.sendMessage(\"update-area-data\", currentValue.value)" + } + } + }, + "props": { + "placeholder": "\u003cArea Id\u003e" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "multiple_selection", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.props.enabled \u003d not payload", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.text-field" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "40px" + }, + "props": { + "justify": "space-around", + "style": { + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "130px" + }, + "props": { + "style": { + "marginLeft": "0px" + }, + "text": "SubArea :", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "16px", + "fontWeight": "bold" + } + }, + "type": "ia.display.label" + }, + { + "custom": { + "key": "prefix", + "tagPath": "Configuration/aws" + }, + "meta": { + "name": "TextField_0" + }, + "position": { + "basis": "150px" + }, + "propConfig": { + "props.text": { + "onChange": { + "enabled": null, + "script": "\tsystem.perspective.sendMessage(\"update-subarea-data\", currentValue.value)" + } + } + }, + "props": { + "placeholder": "\u003cSubArea Id\u003e" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "multiple_selection", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.props.enabled \u003d not payload", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.text-field" + } + ], + "meta": { + "name": "FlexContainer_2" + }, + "position": { + "basis": "40px" + }, + "props": { + "justify": "space-around", + "style": { + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Checkbox" + }, + "position": { + "basis": "130px" + }, + "propConfig": { + "props.selected": { + "onChange": { + "enabled": null, + "script": "\tsystem.perspective.sendMessage(\"multiple_selection\", payload\u003dcurrentValue.value)" + } + } + }, + "props": { + "style": { + "margin-left": "0px" + }, + "text": "Upload" + }, + "type": "ia.input.checkbox" + }, + { + "custom": { + "rowToAdd": { + "Area": "", + "Device": "", + "SubArea": "" + } + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\twhid \u003d self.session.custom.fc\n\ttagPath \u003d \"[%s_SCADA_TAG_PROVIDER]Configuration/PLC\"%(whid)\n\tself.custom.tagData.append(self.custom.rowToAdd)\n\t\n\ttag \u003d {}\n\tfor i in self.custom.tagData:\n\t\ttag[i[\"Device\"]]\u003d {\"Area\": i[\"Area\"], \"SubArea\":i[\"SubArea\"]}\n\t\t\n\t\n\tsystem.tag.writeBlocking([tagPath], [system.util.jsonEncode(tag)])\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button", + "tooltip": { + "enabled": true, + "text": "Missing Data for : [u\u0027Area\u0027, u\u0027SubArea\u0027, u\u0027Device\u0027]" + } + }, + "position": { + "basis": "150px" + }, + "propConfig": { + "custom.tagData": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" + }, + "transforms": [ + { + "code": "\ttagData \u003d[{\"Device\":k, \"Area\":v[\"Area\"], \"SubArea\":v[\"SubArea\"]} for k,v in system.util.jsonDecode(value).items()]\n\treturn tagData", + "type": "script" + } + ], + "type": "tag" + } + }, + "props.enabled": { + "binding": { + "config": { + "path": "this.custom.rowToAdd" + }, + "transforms": [ + { + "code": "\n\tmissing_data \u003d []\n\tfor k, v in value.items():\n\t\tif not v:\n\t\t\tmissing_data.append(k)\n\t\n\tif missing_data:\n\t\tenabled \u003d False\n\t\tmsg \u003d \"Missing Data for : %s\"%missing_data\n\telse:\n\t\tenabled \u003d True\n\t\tmsg \u003d \"\"\n\t\n\tself.meta.tooltip.text \u003d msg \n\t\n\treturn enabled\n\t", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/add_circle" + }, + "position": "right" + }, + "primary": false, + "text": "Submit" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-device-data", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.custom.rowToAdd[\"Device\"] \u003d payload", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "update-area-data", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.custom.rowToAdd[\"Area\"] \u003d payload", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "update-subarea-data", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.custom.rowToAdd[\"SubArea\"] \u003d payload", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "multiple_selection", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.position.display \u003d not payload", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "custom": { + "data": { + "ARSAW1301": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1302": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1303": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1304": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1305": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1306": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1307": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1308": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1309": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1310": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1311": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1312": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1501": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1502": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1503": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1504": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1505": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1506": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1507": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1508": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1509": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1510": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1511": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "ARSAW1512": { + "Area": "AR FLOOR", + "SubArea": "ARSAW\r" + }, + "FSC1": { + "Area": "", + "SubArea": "\r" + }, + "FSC10": { + "Area": "OUTBOUND", + "SubArea": "FSC\r" + }, + "FSC2": { + "Area": "", + "SubArea": "\r" + }, + "FSC_Cells": { + "Area": "", + "SubArea": "\r" + }, + "FSC_Induct_1-4": { + "Area": "", + "SubArea": "\r" + }, + "PLC01": { + "Area": "OUTBOUND", + "SubArea": "SHIP\r" + }, + "PLC02": { + "Area": "OUTBOUND", + "SubArea": "SHIP\r" + }, + "PLC03": { + "Area": "OUTBOUND", + "SubArea": "KO \u0026 REJECT\r" + }, + "PLC06": { + "Area": "OUTBOUND", + "SubArea": "TOTE ROUTER\r" + }, + "PLC07": { + "Area": "OUTBOUND", + "SubArea": "TOTE ROUTER\r" + }, + "PLC08": { + "Area": "OUTBOUND", + "SubArea": "TOTE FEED\r" + }, + "PLC09": { + "Area": "INBOUND", + "SubArea": "RECEIVING\r" + }, + "PLC09_Receiving2": { + "Area": "", + "SubArea": "\r" + }, + "PLC09_Receiving3": { + "Area": "", + "SubArea": "\r" + }, + "PLC1000": { + "Area": "INBOUND", + "SubArea": "RECEIVING\r" + }, + "PLC1000_Receiving4": { + "Area": "", + "SubArea": "\r" + }, + "PLC13": { + "Area": "AR FLOOR", + "SubArea": "ARSAW P2\r" + }, + "PLC13_SC2": { + "Area": "", + "SubArea": "\r" + }, + "PLC14": { + "Area": "", + "SubArea": "\r" + }, + "PLC15": { + "Area": "AR FLOOR", + "SubArea": "ARSAW P3\r" + }, + "PLC15_SC2": { + "Area": "", + "SubArea": "\r" + }, + "PLC16": { + "Area": "AR FLOOR", + "SubArea": "PICK TO REBIN P3\r" + }, + "PLC20": { + "Area": "OUTBOUND", + "SubArea": "AFE1 TOTE 1-3\r" + }, + "PLC20_Tote4-8": { + "Area": "", + "SubArea": "\r" + }, + "PLC21": { + "Area": "OUTBOUND", + "SubArea": "AFE TRAY ROUTER\r" + }, + "PLC22": { + "Area": "OUTBOUND", + "SubArea": "AFE TRAY ROUTER\r" + }, + "PLC23": { + "Area": "OUTBOUND", + "SubArea": "AFE1 TRAY FEED\r" + }, + "PLC24": { + "Area": "OUTBOUND", + "SubArea": "AFE1 WALL 1-2\r" + }, + "PLC25": { + "Area": "OUTBOUND", + "SubArea": "AFE1 WALL 3-4\r" + }, + "PLC26": { + "Area": "OUTBOUND", + "SubArea": "AFE1 WALL 5-6\r" + }, + "PLC27": { + "Area": "OUTBOUND", + "SubArea": "AFE1 WALL 7-8\r" + }, + "PLC30": { + "Area": "OUTBOUND", + "SubArea": "AFE1 PACK 1-4\r" + }, + "PLC31": { + "Area": "OUTBOUND", + "SubArea": "AFE1 PACK 5-8\r" + }, + "PLC32": { + "Area": "OUTBOUND", + "SubArea": "AFE1 EMP. TOTE\r" + }, + "PLC60": { + "Area": "OUTBOUND", + "SubArea": "S.PACKING 1\r" + }, + "PLC61": { + "Area": "OUTBOUND", + "SubArea": "S.PACKING 2\r" + }, + "PLC69": { + "Area": "OUTBOUND", + "SubArea": "GIFT WRAP\r" + }, + "PLC70": { + "Area": "OUTBOUND", + "SubArea": "TRANSSHIP\r" + }, + "PLC71": { + "Area": "OUTBOUND", + "SubArea": "TRANSSHIP\r" + }, + "PLC80": { + "Area": "OUTBOUND", + "SubArea": "SMART PACKING\r" + }, + "PLC81": { + "Area": "OUTBOUND", + "SubArea": "SMART PACKING\r" + }, + "PLC82": { + "Area": "OUTBOUND", + "SubArea": "SMART PACKING\r" + }, + "PLC97": { + "Area": "SAFETY PLC", + "SubArea": "\r" + }, + "PLC98": { + "Area": "SAFETY PLC", + "SubArea": "\r" + }, + "PLC99": { + "Area": "SAFETY PLC", + "SubArea": "\r" + }, + "THE": { + "Area": "BOB", + "SubArea": "NOB" + } + }, + "list_data": [ + "OUTBOUND", + "PLC03", + "KO \u0026 REJECT\r", + "OUTBOUND", + "PLC01", + "SHIP\r", + "OUTBOUND", + "PLC02", + "SHIP\r", + "OUTBOUND", + "PLC07", + "TOTE ROUTER\r", + "OUTBOUND", + "PLC08", + "TOTE FEED\r", + "OUTBOUND", + "PLC06", + "TOTE ROUTER\r", + "OUTBOUND", + "PLC81", + "SMART PACKING\r", + "OUTBOUND", + "PLC82", + "SMART PACKING\r", + "", + "PLC09_Receiving3", + "\r", + "", + "PLC09_Receiving2", + "\r", + "INBOUND", + "PLC09", + "RECEIVING\r", + "", + "PLC14", + "\r", + "AR FLOOR", + "PLC15", + "ARSAW P3\r", + "AR FLOOR", + "PLC13", + "ARSAW P2\r", + "AR FLOOR", + "PLC16", + "PICK TO REBIN P3\r", + "", + "FSC_Induct_1-4", + "\r", + "SAFETY PLC", + "PLC98", + "\r", + "SAFETY PLC", + "PLC99", + "\r", + "SAFETY PLC", + "PLC97", + "\r", + "OUTBOUND", + "FSC10", + "FSC\r", + "", + "FSC_Cells", + "\r", + "OUTBOUND", + "PLC25", + "AFE1 WALL 3-4\r", + "OUTBOUND", + "PLC69", + "GIFT WRAP\r", + "OUTBOUND", + "PLC26", + "AFE1 WALL 5-6\r", + "OUTBOUND", + "PLC23", + "AFE1 TRAY FEED\r", + "OUTBOUND", + "PLC24", + "AFE1 WALL 1-2\r", + "OUTBOUND", + "PLC27", + "AFE1 WALL 7-8\r", + "AR FLOOR", + "ARSAW1310", + "ARSAW\r", + "OUTBOUND", + "PLC61", + "S.PACKING 2\r", + "AR FLOOR", + "ARSAW1312", + "ARSAW\r", + "AR FLOOR", + "ARSAW1510", + "ARSAW\r", + "AR FLOOR", + "ARSAW1311", + "ARSAW\r", + "OUTBOUND", + "PLC60", + "S.PACKING 1\r", + "AR FLOOR", + "ARSAW1512", + "ARSAW\r", + "OUTBOUND", + "PLC21", + "AFE TRAY ROUTER\r", + "AR FLOOR", + "ARSAW1511", + "ARSAW\r", + "OUTBOUND", + "PLC22", + "AFE TRAY ROUTER\r", + "INBOUND", + "PLC1000", + "RECEIVING\r", + "OUTBOUND", + "PLC20", + "AFE1 TOTE 1-3\r", + "AR FLOOR", + "ARSAW1307", + "ARSAW\r", + "AR FLOOR", + "ARSAW1505", + "ARSAW\r", + "AR FLOOR", + "ARSAW1306", + "ARSAW\r", + "AR FLOOR", + "ARSAW1504", + "ARSAW\r", + "AR FLOOR", + "ARSAW1309", + "ARSAW\r", + "AR FLOOR", + "ARSAW1507", + "ARSAW\r", + "AR FLOOR", + "ARSAW1308", + "ARSAW\r", + "AR FLOOR", + "ARSAW1506", + "ARSAW\r", + "AR FLOOR", + "ARSAW1509", + "ARSAW\r", + "", + "PLC20_Tote4-8", + "\r", + "AR FLOOR", + "ARSAW1508", + "ARSAW\r", + "", + "PLC13_SC2", + "\r", + "AR FLOOR", + "ARSAW1301", + "ARSAW\r", + "OUTBOUND", + "PLC70", + "TRANSSHIP\r", + "OUTBOUND", + "PLC71", + "TRANSSHIP\r", + "AR FLOOR", + "ARSAW1303", + "ARSAW\r", + "AR FLOOR", + "ARSAW1501", + "ARSAW\r", + "OUTBOUND", + "PLC32", + "AFE1 EMP. TOTE\r", + "AR FLOOR", + "ARSAW1302", + "ARSAW\r", + "AR FLOOR", + "ARSAW1305", + "ARSAW\r", + "AR FLOOR", + "ARSAW1503", + "ARSAW\r", + "OUTBOUND", + "PLC30", + "AFE1 PACK 1-4\r", + "AR FLOOR", + "ARSAW1304", + "ARSAW\r", + "AR FLOOR", + "ARSAW1502", + "ARSAW\r", + "OUTBOUND", + "PLC31", + "AFE1 PACK 5-8\r", + "OUTBOUND", + "PLC80", + "SMART PACKING\r", + "", + "FSC1", + "\r", + "", + "PLC15_SC2", + "\r", + "", + "FSC2", + "\r", + "", + "PLC1000_Receiving4", + "\r", + "BOB", + "THE", + "NOB" + ] + }, + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "#\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileName\":event.file.name}\n#\twhid \u003d self.session.custom.fc\n#\tdata \u003d{}\n#\tdef get_child():\n#\t\treturn {\n#\t\t\t\"Area\":\"\",\n#\t\t\t\"SubArea\":\"\"\n#\t\t}\n#\t\t\n#\tdef convert_csv_string_list(string):\n#\t\treturn string.replace(\"\\n\",\",\").replace(\"\\\"\",\"\").split(\",\")[3:]\n#\t\n#\tlist_data \u003d convert_csv_string_list(event.file.getString())\n#\tself.custom.list_data \u003d list_data\n#\tfor i in range(2, len(list_data),3):\n#\t\tchild \u003d get_child()\n#\t\tchild[\"Area\"] \u003d list_data[i-2]\n#\t\tchild[\"SubArea\"] \u003d list_data[i]\n#\t\tdata[list_data[i-1]]\u003d child\n#\n#\tself.custom.data \u003d data\n#\t\n#\t\n#\tvalues \u003d system.util.jsonEncode(data)\n#\t\n#\tsystem.tag.writeBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/PLC\"%whid], values)\n#\t\n\twhid \u003d self.session.custom.fc\n\tFileHandler.uploader.add_device_btn_code(whid, event)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload" + }, + "position": { + "basis": "150px", + "display": false + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "multiple_selection", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.position.display \u003d payload ", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.fileupload" + } + ], + "meta": { + "name": "FlexContainer_4" + }, + "position": { + "basis": "40px" + }, + "props": { + "justify": "space-around", + "style": { + "margin-top": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderStyle": "solid", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "margin": "10px" + }, + "wrap": "wrap" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/MainView/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/MainView/resource.json new file mode 100644 index 0000000..2d2e704 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/MainView/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2024-05-23T13:35:01Z" + }, + "lastModificationSignature": "86b770e2c6c80ce566583f539b858cf1462a6ec95f3ce1d178dfa2a7c541fdcc" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/MainView/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/MainView/thumbnail.png new file mode 100644 index 0000000..cfd4597 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/MainView/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/MainView/view.json b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/MainView/view.json new file mode 100644 index 0000000..805802c --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/MainView/view.json @@ -0,0 +1,2408 @@ +{ + "custom": { + "Enable_input": false + }, + "params": {}, + "propConfig": { + "custom.Enable_input": { + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "32px" + }, + "props": { + "path": "material/edit_attributes", + "style": { + "marginLeft": "10px" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "232px" + }, + "props": { + "style": { + "marginLeft": "10px" + }, + "text": "Configuration Tags", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "16px", + "fontWeight": "bold" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "50px", + "grow": 1 + }, + "type": "ia.display.label" + }, + { + "custom": { + "dockOpened": true + }, + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tdevice_entry \u003d {\"Device\":\"\",\"Area\":\"\",\"SubArea\":\"\"}\n\tif not self.view.getChild(\"root\").custom.isDockOpen:\n\t\tparams \u003d {\n\t\t\t\"path\":\"Main-Views/Config-Tool/TagViewer\",\n\t\t\t\"params\":device_entry\t\n\t\t}\n\t\t\n\t\tsystem.perspective.sendMessage(\"select-side-view\", payload\u003dparams)\n\t\n\t\t\n\t\n\tsystem.perspective.print(self.view.getChild(\"root\").custom.isDockOpen)\n\tself.custom.dockOpened \u003d self.view.getChild(\"root\").custom.isDockOpen ^ True\n\tsystem.perspective.print(self.view.getChild(\"root\").custom.isDockOpen)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Icon_0" + }, + "position": { + "basis": "30px" + }, + "props": { + "path": "material/local_offer", + "style": { + "margin": "5px" + } + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "50px" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "57px" + }, + "props": { + "text": "FC:", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "16px", + "fontWeight": "bold" + } + }, + "type": "ia.display.label" + }, + { + "custom": { + "tagPath": "Configuration/FC" + }, + "meta": { + "name": "TextField" + }, + "position": { + "basis": "175px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "view.custom.Enable_input" + }, + "type": "property" + } + }, + "props.placeholder": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/FC" + }, + "transforms": [ + { + "code": "\tif value :\n\t\treturn value\n\telse:\n\t\treturn \"No Value Configured\"", + "type": "script" + } + ], + "type": "tag" + } + }, + "props.text": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/FC" + }, + "transforms": [ + { + "code": "\treturn value", + "type": "script" + } + ], + "type": "tag" + }, + "onChange": { + "enabled": null, + "script": "\tif currentValue.value:\n\t\ttagPath \u003d \"[%s_SCADA_TAG_PROVIDER]%s\"%(self.session.custom.fc,self.custom.tagPath)\n\t\tsystem.perspective.print(tagPath)\n\t\tres \u003d system.tag.writeBlocking([tagPath], [currentValue.value])\n\t\tsystem.perspective.print(res)" + } + } + }, + "props": { + "deferUpdates": false + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "107px" + }, + "props": { + "style": { + "marginLeft": "25px" + }, + "text": "AWS Prefix :", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "16px", + "fontWeight": "bold" + } + }, + "type": "ia.display.label" + }, + { + "custom": { + "key": "prefix", + "tagPath": "Configuration/aws" + }, + "meta": { + "name": "TextField_0" + }, + "position": { + "basis": "175px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "view.custom.Enable_input" + }, + "type": "property" + } + }, + "props.placeholder": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/aws" + }, + "transforms": [ + { + "code": "\t\n\t\n\tvalue \u003d system.util.jsonDecode(value)\n\t\n\tif value.get(\"prefix\"):\n\t\treturn value[\"prefix\"] \n\telse:\n\t\treturn \"No Value Configured\"", + "type": "script" + } + ], + "type": "tag" + } + }, + "props.text": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/aws" + }, + "transforms": [ + { + "code": "\treturn system.util.jsonDecode(value).get(\"prefix\", None)", + "type": "script" + } + ], + "type": "tag" + }, + "onChange": { + "enabled": null, + "script": "\tif currentValue.value:\n\t\tfc \u003d self.session.custom.fc\n\t\ttagPath \u003d \"[%s_SCADA_TAG_PROVIDER]%s\"%(fc, self.custom.tagPath)\n\t\ttagData \u003d system.util.jsonDecode(system.tag.readBlocking([tagPath])[0].value)\n\t\ttry:\n\t\t\ttagData[self.custom.key] \u003d currentValue.value.strip()\n\t\texcept Exception as e :\n\t\t\tsystem.perspective.print(e)\n\t\t\treturn \n\t\tsystem.tag.writeBlocking([tagPath], [system.util.jsonEncode(tagData)])\n\t\t\t\n\t\t\t" + } + } + }, + "props": { + "deferUpdates": false + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "initialise-values", + "pageScope": true, + "script": "\t# implement your handler here\n\tsystem.perspective.print(payload)", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "115px" + }, + "props": { + "style": { + "marginLeft": "25px" + }, + "text": "AWS Region :", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "16px", + "fontWeight": "bold" + } + }, + "type": "ia.display.label" + }, + { + "custom": { + "key": "region", + "tagPath": "Configuration/aws" + }, + "meta": { + "name": "TextField_2" + }, + "position": { + "basis": "175px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "view.custom.Enable_input" + }, + "type": "property" + } + }, + "props.placeholder": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/aws" + }, + "transforms": [ + { + "code": "\t\n\t\n\tvalue \u003d system.util.jsonDecode(value)\n\t\n\tif value.get(\"region\"):\n\t\treturn value[\"region\"] \n\telse:\n\t\treturn \"No Value Configured\"", + "type": "script" + } + ], + "type": "tag" + } + }, + "props.text": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/aws" + }, + "transforms": [ + { + "code": "\treturn system.util.jsonDecode(value).get(\"region\", None)", + "type": "script" + } + ], + "type": "tag" + }, + "onChange": { + "enabled": null, + "script": "\tif currentValue.value:\n\t\tfc \u003d self.session.custom.fc\n\t\ttagPath \u003d \"[%s_SCADA_TAG_PROVIDER]%s\"%(fc, self.custom.tagPath)\n\t\ttagData \u003d system.util.jsonDecode(system.tag.readBlocking([tagPath])[0].value)\n\t\ttry:\n\t\t\ttagData[self.custom.key] \u003d currentValue.value.strip()\n\t\texcept Exception as e :\n\t\t\tsystem.perspective.print(e)\n\t\t\treturn \n\t\tsystem.tag.writeBlocking([tagPath], [system.util.jsonEncode(tagData)])\n\t\t\t\n\t\t\t" + } + } + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "120px" + }, + "props": { + "style": { + "marginLeft": "25px" + }, + "text": "Backend Type :", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "16px", + "fontWeight": "bold" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "175px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "view.custom.Enable_input" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/BACKEND_EDGE_DEVICE" + }, + "transforms": [ + { + "code": "\tif value:\n\t\treturn value\n\t", + "type": "script" + } + ], + "type": "tag" + }, + "onChange": { + "enabled": null, + "script": "\twhid \u003d self.session.custom.fc\n\tsystem.tag.writeBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/BACKEND_EDGE_DEVICE\"%whid], [currentValue.value])" + } + } + }, + "props": { + "options": [ + { + "label": "Edge To Cloud", + "value": "e2c" + }, + { + "label": "Quattro", + "value": "quattro" + }, + { + "label": "DataBridge", + "value": "databridge" + } + ], + "placeholder": { + "text": "No Value Configured" + }, + "search": { + "enabled": false + } + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "40px" + }, + "props": { + "style": { + "marginLeft": "10px", + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "140px" + }, + "props": { + "direction": "column", + "style": { + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderStyle": "solid", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "margin": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "32px" + }, + "props": { + "path": "material/settings_applications", + "style": { + "marginLeft": "10px" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "232px" + }, + "props": { + "style": { + "marginLeft": "10px" + }, + "text": "PLC Configuration", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "16px", + "fontWeight": "bold" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "50px" + }, + "type": "ia.container.flex" + }, + { + "events": { + "component": { + "onEditCellCommit": { + "config": { + "script": "\tif not self.view.custom.Enable_input:\n\t\treturn\n\tcolumn \u003d event.column\n\trow \u003d event.row\n\tself.props.data[row][column] \u003d event.value\n\trow_data \u003d self.props.data[row]\n\tsystem.perspective.print(row_data)\n\twhid \u003d self.session.custom.fc\n\ttag_path \u003d \"[%s_SCADA_TAG_PROVIDER]Configuration/PLC\"%whid\n\ttag_data \u003d system.tag.readBlocking([tag_path])[0].value\n\ttag_data \u003d system.util.jsonDecode(tag_data)\n\t\n\tdef get_child():\n\t\treturn {\n\t\t\t\"Area\":\"\",\n\t\t\t\"SubArea\":\"\"\n\t\t}\n\t\n\tchild \u003d get_child()\n\tchild[\"Area\"] \u003d row_data[\"Area\"]\n\tchild[\"SubArea\"]\u003d row_data[\"SubArea\"]\n\t\n\ttag_data[row_data[\"Device\"]]\u003d child\n\tencoded_data \u003d system.util.jsonEncode(tag_data)\n\tsystem.tag.writeBlocking([tag_path], [encoded_data])\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Table" + }, + "position": { + "basis": "286px" + }, + "propConfig": { + "custom.tagData": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" + }, + "transforms": [ + { + "code": "\ttagData \u003d[{\"Device\":k, \"Area\":v[\"Area\"], \"SubArea\":v[\"SubArea\"]} for k,v in system.util.jsonDecode(value).items()]\n\treturn tagData", + "type": "script" + } + ], + "type": "tag" + } + }, + "props.data": { + "binding": { + "config": { + "path": "this.custom.tagData" + }, + "type": "property" + } + }, + "props.selection.data": { + "onChange": { + "enabled": null, + "script": "\tsystem.perspective.sendMessage(\"selected-plcs\", payload\u003dcurrentValue.value)" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "Device", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "fontSize": "12px" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "Area", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "fontSize": "12px" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "SubArea", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "fontSize": "12px" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "filter": { + "enabled": true + }, + "selection": { + "mode": "multiple interval" + }, + "style": { + "fontSize": "12px", + "marginLeft": "10px" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "add-device-entry", + "pageScope": false, + "script": "\tdata \u003d payload[\"data\"]\n\tself.props.data.append(data)", + "sessionScope": false, + "viewScope": true + }, + { + "messageType": "update-plc-config", + "pageScope": false, + "script": "\tdata \u003d payload[\"data\"]\n\tself.props.data \u003d data", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.display.table" + }, + { + "children": [ + { + "custom": { + "dockOpened": true + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tdevice_entry \u003d {\"Device\":\"\",\"Area\":\"\",\"SubArea\":\"\"}\n\tif not self.view.getChild(\"root\").custom.isDockOpen:\n\t\tparams \u003d {\n\t\t\t\"path\":\"Main-Views/Config-Tool/AddDevice\",\n\t\t\t\"params\":device_entry\t\n\t\t}\n\t\tsystem.perspective.sendMessage(\"select-side-view\", payload\u003dparams)\n\n\tself.custom.dockOpened \u003d self.view.getChild(\"root\").custom.isDockOpen ^ True\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "135px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "view.custom.Enable_input" + }, + "type": "property" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/add_circle_outline" + } + }, + "primary": false, + "style": { + "marginLeft": "10px" + }, + "text": "Add Device" + }, + "type": "ia.input.button" + }, + { + "custom": { + "dataAfterRemoval": { + "ARSAW1301": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1302": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1303": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1304": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1305": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1306": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1307": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1308": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1309": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1310": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1311": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1312": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1501": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1502": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1503": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1504": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1505": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1506": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1507": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1508": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1509": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1510": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1511": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1512": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "FSC1": { + "Area": "", + "SubArea": "" + }, + "FSC10": { + "Area": "OUTBOUND", + "SubArea": "FSC" + }, + "FSC2": { + "Area": "", + "SubArea": "" + }, + "FSC_Cells": { + "Area": "", + "SubArea": "" + }, + "FSC_Induct_1-4": { + "Area": "", + "SubArea": "" + }, + "PLC01": { + "Area": "OUTBOUND", + "SubArea": "SHIP" + }, + "PLC02": { + "Area": "OUTBOUND", + "SubArea": "SHIP" + }, + "PLC03": { + "Area": "OUTBOUND", + "SubArea": "KO \u0026 REJECT" + }, + "PLC06": { + "Area": "OUTBOUND", + "SubArea": "TOTE ROUTER" + }, + "PLC07": { + "Area": "OUTBOUND", + "SubArea": "TOTE ROUTER" + }, + "PLC08": { + "Area": "OUTBOUND", + "SubArea": "TOTE FEED" + }, + "PLC09": { + "Area": "INBOUND", + "SubArea": "RECEIVING" + }, + "PLC09_Receiving2": { + "Area": "", + "SubArea": "" + }, + "PLC09_Receiving3": { + "Area": "", + "SubArea": "" + }, + "PLC1000": { + "Area": "INBOUND", + "SubArea": "RECEIVING" + }, + "PLC1000_Receiving4": { + "Area": "", + "SubArea": "" + }, + "PLC13": { + "Area": "AR FLOOR", + "SubArea": "ARSAW P2" + }, + "PLC13_SC2": { + "Area": "", + "SubArea": "" + }, + "PLC14": { + "Area": "", + "SubArea": "" + }, + "PLC15": { + "Area": "AR FLOOR", + "SubArea": "ARSAW P3" + }, + "PLC15_SC2": { + "Area": "", + "SubArea": "" + }, + "PLC16": { + "Area": "AR FLOOR", + "SubArea": "PICK TO REBIN P3" + }, + "PLC20": { + "Area": "OUTBOUND", + "SubArea": "AFE1 TOTE 1-3" + }, + "PLC20_Tote4-8": { + "Area": "", + "SubArea": "" + }, + "PLC21": { + "Area": "OUTBOUND", + "SubArea": "AFE TRAY ROUTER" + }, + "PLC22": { + "Area": "OUTBOUND", + "SubArea": "AFE TRAY ROUTER" + }, + "PLC23": { + "Area": "OUTBOUND", + "SubArea": "AFE1 TRAY FEED" + }, + "PLC24": { + "Area": "OUTBOUND", + "SubArea": "AFE1 WALL 1,2" + }, + "PLC25": { + "Area": "OUTBOUND", + "SubArea": "AFE1 WALL 3,4" + }, + "PLC26": { + "Area": "OUTBOUND", + "SubArea": "AFE1 WALL 5,6" + }, + "PLC27": { + "Area": "OUTBOUND", + "SubArea": "AFE1 WALL 7,8" + }, + "PLC30": { + "Area": "OUTBOUND", + "SubArea": "AFE1 PACK 1-4" + }, + "PLC31": { + "Area": "OUTBOUND", + "SubArea": "AFE1 PACK 5-8" + }, + "PLC32": { + "Area": "OUTBOUND", + "SubArea": "AFE1 EMP. TOTE" + }, + "PLC60": { + "Area": "OUTBOUND", + "SubArea": "S.PACKING 1" + }, + "PLC61": { + "Area": "OUTBOUND", + "SubArea": "S.PACKING 2" + }, + "PLC69": { + "Area": "OUTBOUND", + "SubArea": "GIFT WRAP" + }, + "PLC70": { + "Area": "OUTBOUND", + "SubArea": "TRANSSHIP" + }, + "PLC71": { + "Area": "OUTBOUND", + "SubArea": "TRANSSHIP" + }, + "PLC80": { + "Area": "OUTBOUND", + "SubArea": "SMART PACKING" + }, + "PLC81": { + "Area": "OUTBOUND", + "SubArea": "SMART PACKING" + }, + "PLC82": { + "Area": "OUTBOUND", + "SubArea": "SMART PACKING" + }, + "PLC97": { + "Area": "SAFETY PLC", + "SubArea": "" + }, + "PLC98": { + "Area": "SAFETY PLC", + "SubArea": "" + }, + "PLC99": { + "Area": "SAFETY PLC", + "SubArea": "" + } + }, + "itemsToRemove": [] + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t\n\twhid \u003d self.session.custom.fc\n\t\n\ttagData \u003d system.util.jsonDecode(system.tag.readBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/PLC\"%whid])[0].value) \n\t\n\tfor item in self.custom.itemsToRemove:\n\t\tresult \u003d tagData.pop(item[\"Device\"],None)\n\t\n\tsystem.tag.writeBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/PLC\"%whid],system.util.jsonEncode(tagData))" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_2" + }, + "position": { + "basis": "156px" + }, + "propConfig": { + "custom.tagData": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" + }, + "transforms": [ + { + "code": "\treturn system.util.jsonDecode(value)", + "type": "script" + } + ], + "type": "tag" + } + }, + "props.enabled": { + "binding": { + "config": { + "path": "view.custom.Enable_input" + }, + "type": "property" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/remove_circle_outline" + } + }, + "primary": false, + "style": { + "marginLeft": "10px", + "marginRight": "10px" + }, + "text": "Remove Device" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "selected-plcs", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.custom.itemsToRemove \u003d payload", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t\n\ttagPath\u003d \"[%s_SCADA_TAG_PROVIDER]Configuration/PLC\"%self.session.custom.fc \n\t\t\n\tsystem.tag.writeBlocking(tagPath, \"{}\")\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0", + "visible": false + }, + "position": { + "basis": "135px", + "display": false + }, + "props": { + "image": { + "icon": { + "path": "material/remove_circle_outline" + } + }, + "primary": false, + "style": { + "marginLeft": "10px", + "marginRight": "10px" + }, + "text": "Clear" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\n\tFileHandler.downloader.download_file(\"Device_data.csv\", self.custom.tagData, FileHandler.downloader.device_data_converter)\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_3" + }, + "position": { + "basis": "135px" + }, + "propConfig": { + "custom.tagData": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" + }, + "transforms": [ + { + "code": "\ttagData \u003d[{\"Device\":k, \"Area\":v[\"Area\"], \"SubArea\":v[\"SubArea\"]} for k,v in system.util.jsonDecode(value).items()]\n\treturn tagData", + "type": "script" + } + ], + "type": "tag" + } + } + }, + "props": { + "image": { + "icon": { + "color": "#377AAE", + "path": "material/cloud_download" + } + }, + "primary": false, + "style": { + "classes": "\n" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "40px" + }, + "props": { + "style": { + "marginBottom": "10px", + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "414px" + }, + "props": { + "direction": "column", + "style": { + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderStyle": "solid", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "margin": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "32px" + }, + "props": { + "path": "material/view_list", + "style": { + "marginLeft": "10px" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "232px" + }, + "props": { + "style": { + "marginLeft": "10px" + }, + "text": "Detailed View Mapping", + "textStyle": { + "fontFamily": "Arial", + "fontSize": "16px", + "fontWeight": "bold" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "50px" + }, + "type": "ia.container.flex" + }, + { + "events": { + "component": { + "onEditCellCommit": { + "config": { + "script": "\timport ast\n\t\n\tif not self.view.custom.Enable_input:\n\t\treturn \n\t\t\n\tdef is_valid_list(s):\n\t try:\n\t # Try to evaluate the string\n\t result \u003d ast.literal_eval(s)\n\t # Check if the result is a list\n\t return isinstance(result, list)\n\t except (ValueError, SyntaxError):\n\t # If there is a ValueError or SyntaxError, the string is not a valid list\n\t return False\n\n\tcolumn \u003d event.column\n\trow \u003d event.row\n\tself.props.data[row][column] \u003d event.value\n\trow_data \u003d self.props.data[row]\n\twhid \u003d self.session.custom.fc\n\ttag_path \u003d \"[%s_SCADA_TAG_PROVIDER]Configuration/DetailedViews\"%whid\n\ttag_data \u003d system.tag.readBlocking([tag_path])[0].value\n\ttag_data \u003d system.util.jsonDecode(tag_data)\n\t\n\tif is_valid_list(event.value):\n\t\ttag_data[row_data[\"DetailedView\"]] \u003d event.value\n\telse:\n\t\tsystem.perspective.print(\"Not a valid list \")\n\t\treturn\n\n\ttag_data \u003d system.util.jsonEncode(tag_data)\n\tsystem.tag.writeBlocking([tag_path], [tag_data])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Table" + }, + "position": { + "basis": "302px" + }, + "propConfig": { + "custom.tagData": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/DetailedViews" + }, + "transforms": [ + { + "code": "\tdata \u003d []\n\t\n\tdef get_item(detailed_view , devices):\n\t\treturn {\n\t\t\t\"Devices\":str(devices),\n\t\t\t\"DetailedView\":detailed_view\n\t\t\t\n\t\t}\n\t\n\tfor k,v in system.util.jsonDecode(value).items():\n\t\titem \u003d get_item(k, v)\n\t\tdata.append(item)\n\t\n\treturn data\n\t\t\n\t\t", + "type": "script" + } + ], + "type": "tag" + } + }, + "props.data": { + "binding": { + "config": { + "path": "this.custom.tagData" + }, + "type": "property" + } + }, + "props.rows.subview.viewParams.value": { + "binding": { + "config": { + "path": "this.props.selection.data" + }, + "type": "property" + } + }, + "props.selection.data": { + "onChange": { + "enabled": null, + "script": "\tsystem.perspective.sendMessage(\"selected-views\", payload\u003dcurrentValue.value)" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "DetailedView", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": false, + "sort": "none", + "sortable": false, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "Devices", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "filter": { + "enabled": true + }, + "rows": { + "subview": { + "viewParams": { + "rowIndex": "value" + }, + "viewPath": "Main-Views/Config-Tool/TableSubView" + } + }, + "style": { + "fontSize": "12px", + "marginLeft": "10px" + } + }, + "type": "ia.display.table" + }, + { + "children": [ + { + "custom": { + "dockOpened": true + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tdevice_entry \u003d {\"view\":\"\",\"deviceList\":\"\"}\n\tif not self.view.getChild(\"root\").custom.isDockOpen:\n\t\tparams \u003d {\n\t\t\t\"path\":\"Main-Views/Config-Tool/AddDetailedViewMapping\",\n\t\t\t\"params\":device_entry\t\n\t\t}\n\t\tsystem.perspective.sendMessage(\"select-side-view\", payload\u003dparams)\n\n\t\n\tsystem.perspective.print(self.view.getChild(\"root\").custom.isDockOpen)\n\tself.custom.dockOpened \u003d self.view.getChild(\"root\").custom.isDockOpen ^ True\n\tsystem.perspective.print(self.view.getChild(\"root\").custom.isDockOpen)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "135px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "view.custom.Enable_input" + }, + "type": "property" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/add_circle_outline" + } + }, + "primary": false, + "style": { + "marginLeft": "10px" + }, + "text": "Add View" + }, + "type": "ia.input.button" + }, + { + "custom": { + "dataAfterRemoval": { + "ARSAW1301": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1302": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1303": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1304": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1305": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1306": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1307": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1308": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1309": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1310": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1311": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1312": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1501": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1502": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1503": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1504": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1505": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1506": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1507": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1508": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1509": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1510": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1511": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "ARSAW1512": { + "Area": "AR FLOOR", + "SubArea": "ARSAW" + }, + "FSC1": { + "Area": "", + "SubArea": "" + }, + "FSC10": { + "Area": "OUTBOUND", + "SubArea": "FSC" + }, + "FSC2": { + "Area": "", + "SubArea": "" + }, + "FSC_Cells": { + "Area": "", + "SubArea": "" + }, + "FSC_Induct_1-4": { + "Area": "", + "SubArea": "" + }, + "PLC01": { + "Area": "OUTBOUND", + "SubArea": "SHIP" + }, + "PLC02": { + "Area": "OUTBOUND", + "SubArea": "SHIP" + }, + "PLC03": { + "Area": "OUTBOUND", + "SubArea": "KO \u0026 REJECT" + }, + "PLC06": { + "Area": "OUTBOUND", + "SubArea": "TOTE ROUTER" + }, + "PLC07": { + "Area": "OUTBOUND", + "SubArea": "TOTE ROUTER" + }, + "PLC08": { + "Area": "OUTBOUND", + "SubArea": "TOTE FEED" + }, + "PLC09": { + "Area": "INBOUND", + "SubArea": "RECEIVING" + }, + "PLC09_Receiving2": { + "Area": "", + "SubArea": "" + }, + "PLC09_Receiving3": { + "Area": "", + "SubArea": "" + }, + "PLC1000": { + "Area": "INBOUND", + "SubArea": "RECEIVING" + }, + "PLC1000_Receiving4": { + "Area": "", + "SubArea": "" + }, + "PLC13": { + "Area": "AR FLOOR", + "SubArea": "ARSAW P2" + }, + "PLC13_SC2": { + "Area": "", + "SubArea": "" + }, + "PLC14": { + "Area": "", + "SubArea": "" + }, + "PLC15": { + "Area": "AR FLOOR", + "SubArea": "ARSAW P3" + }, + "PLC15_SC2": { + "Area": "", + "SubArea": "" + }, + "PLC16": { + "Area": "AR FLOOR", + "SubArea": "PICK TO REBIN P3" + }, + "PLC20": { + "Area": "OUTBOUND", + "SubArea": "AFE1 TOTE 1-3" + }, + "PLC20_Tote4-8": { + "Area": "", + "SubArea": "" + }, + "PLC21": { + "Area": "OUTBOUND", + "SubArea": "AFE TRAY ROUTER" + }, + "PLC22": { + "Area": "OUTBOUND", + "SubArea": "AFE TRAY ROUTER" + }, + "PLC23": { + "Area": "OUTBOUND", + "SubArea": "AFE1 TRAY FEED" + }, + "PLC24": { + "Area": "OUTBOUND", + "SubArea": "AFE1 WALL 1,2" + }, + "PLC25": { + "Area": "OUTBOUND", + "SubArea": "AFE1 WALL 3,4" + }, + "PLC26": { + "Area": "OUTBOUND", + "SubArea": "AFE1 WALL 5,6" + }, + "PLC27": { + "Area": "OUTBOUND", + "SubArea": "AFE1 WALL 7,8" + }, + "PLC30": { + "Area": "OUTBOUND", + "SubArea": "AFE1 PACK 1-4" + }, + "PLC31": { + "Area": "OUTBOUND", + "SubArea": "AFE1 PACK 5-8" + }, + "PLC32": { + "Area": "OUTBOUND", + "SubArea": "AFE1 EMP. TOTE" + }, + "PLC60": { + "Area": "OUTBOUND", + "SubArea": "S.PACKING 1" + }, + "PLC61": { + "Area": "OUTBOUND", + "SubArea": "S.PACKING 2" + }, + "PLC69": { + "Area": "OUTBOUND", + "SubArea": "GIFT WRAP" + }, + "PLC70": { + "Area": "OUTBOUND", + "SubArea": "TRANSSHIP" + }, + "PLC71": { + "Area": "OUTBOUND", + "SubArea": "TRANSSHIP" + }, + "PLC80": { + "Area": "OUTBOUND", + "SubArea": "SMART PACKING" + }, + "PLC81": { + "Area": "OUTBOUND", + "SubArea": "SMART PACKING" + }, + "PLC82": { + "Area": "OUTBOUND", + "SubArea": "SMART PACKING" + }, + "PLC97": { + "Area": "SAFETY PLC", + "SubArea": "" + }, + "PLC98": { + "Area": "SAFETY PLC", + "SubArea": "" + }, + "PLC99": { + "Area": "SAFETY PLC", + "SubArea": "" + } + }, + "itemsToRemove": [] + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t\n\twhid \u003d self.session.custom.fc\n\t\n\ttagData \u003d system.util.jsonDecode(system.tag.readBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/DetailedViews\"%whid])[0].value) \n\t\n\tfor item in self.custom.itemsToRemove:\n\t\tresult \u003d tagData.pop(item[\"DetailedView\"],None)\n\t\n\tsystem.tag.writeBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/DetailedViews\"%whid],system.util.jsonEncode(tagData))" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_2" + }, + "position": { + "basis": "156px" + }, + "propConfig": { + "custom.tagData": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" + }, + "transforms": [ + { + "code": "\treturn system.util.jsonDecode(value)", + "type": "script" + } + ], + "type": "tag" + } + }, + "props.enabled": { + "binding": { + "config": { + "path": "view.custom.Enable_input" + }, + "type": "property" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/remove_circle_outline" + } + }, + "primary": false, + "style": { + "marginLeft": "10px", + "marginRight": "10px" + }, + "text": "Remove View" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "selected-views", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.custom.itemsToRemove \u003d payload", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\twhid \u003d self.session.custom.fc\n\tsystem.tag.writeBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/DetailedViews\"%whid], [\"{}\"])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0", + "visible": false + }, + "position": { + "basis": "135px", + "display": false + }, + "props": { + "image": { + "icon": { + "path": "material/remove_circle_outline" + } + }, + "primary": false, + "style": { + "marginLeft": "10px" + }, + "text": "Clear" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t\n\tFileHandler.downloader.download_file(\"DetailedView_data.csv\", self.custom.tagData, FileHandler.downloader.detailed_views_converter)\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_1" + }, + "position": { + "basis": "135px" + }, + "propConfig": { + "custom.tagData": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/DetailedViews" + }, + "transforms": [ + { + "code": "\treturn [{\"DetailedView\":k,\"Devices\":v}for k,v in system.util.jsonDecode(value).items()]", + "type": "script" + } + ], + "type": "tag" + } + } + }, + "props": { + "image": { + "icon": { + "color": "#377AAE", + "path": "material/cloud_download" + } + }, + "primary": false, + "style": { + "classes": "\n" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "40px" + }, + "props": { + "style": { + "marginBottom": "10px", + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "414px" + }, + "props": { + "direction": "column", + "style": { + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderStyle": "solid", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "margin": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "888px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "custom": { + "params": { + "Area": "", + "Device": "", + "SubArea": "" + }, + "path": "Main-Views/Config-Tool/TagViewer" + }, + "meta": { + "name": "EmbeddedView" + }, + "position": { + "basis": "320px", + "grow": 1 + }, + "propConfig": { + "props.params.params": { + "binding": { + "config": { + "path": "this.custom.params" + }, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "this.custom.path" + }, + "type": "property" + } + } + }, + "props": { + "useDefaultViewWidth": true + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "select-side-view", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.custom.path \u003d payload.get(\"path\")\n\tself.custom.params \u003d payload.get(\"params\")\n\t", + "sessionScope": true, + "viewScope": false + } + ] + }, + "type": "ia.display.view" + } + ], + "custom": { + "path": "Main-Views/Config-Tool/TagViewer" + }, + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "420px" + }, + "props": { + "direction": "column" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "select-side-view", + "pageScope": true, + "script": "\t# implement your handler here\n\tif self.position.display and payload.get(\"path\") \u003d\u003d self.custom.path :\n\t\tself.position.display \u003d False\n\telse:\n\t\tself.position.display \u003d True\n\t\t\n\tself.custom.path \u003d payload.get(\"path\")\n\n#\tself.position.display \u003d not self.position.display", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.container.flex" + } + ], + "custom": { + "isDockOpen": false + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\twhid \u003d self.session.custom.fc\n\ttag_path \u003d \"[%s_SCADA_TAG_PROVIDER]Configuration/PLC\" % (whid)\n\t\n\tif system.tag.exists(tag_path):\n\t\tpayload \u003d {}\n\t\ttag_to_read \u003d system.tag.readBlocking([tag_path])[0].value\n\t\tjson_value \u003d system.util.jsonDecode(tag_to_read)\n\t\tplc_config \u003d []\n\t\tfor k,v in json_value.items():\n\t\t\tplc \u003d k\n\t\t\tarea \u003d v.get(\"Area\")\n\t\t\tsub_area \u003d v.get(\"SubArea\")\n\t\t\titems_to_add \u003d {\"Device\":plc, \n\t\t\t\t\t\t\t\"Area\":area, \n\t\t\t\t\t\t\t\"SubArea\":sub_area}\n\t\t\tplc_config.append(items_to_add)\n\t\tpayload[\"data\"] \u003d plc_config\n\t\tsystem.perspective.sendMessage(\"update-plc-config\", payload, scope \u003d \"view\")\n\t\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root" + }, + "scripts": { + "customMethods": [ + { + "name": "newMethod", + "params": [], + "script": "\t# implement your method here" + } + ], + "extensionFunctions": null, + "messageHandlers": [] + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/SideMenu/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/SideMenu/resource.json new file mode 100644 index 0000000..9e9eaba --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/SideMenu/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2024-05-23T11:48:44Z" + }, + "lastModificationSignature": "f9036e3217d98d229f9389a80c6f0240475243f97e482aa691e68989924df335" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/SideMenu/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/SideMenu/thumbnail.png new file mode 100644 index 0000000..56232cd Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/SideMenu/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/SideMenu/view.json b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/SideMenu/view.json new file mode 100644 index 0000000..ef0dc6f --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/SideMenu/view.json @@ -0,0 +1,66 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 1080, + "width": 400 + } + }, + "root": { + "children": [ + { + "custom": { + "params": {}, + "path": "value" + }, + "meta": { + "name": "EmbeddedView" + }, + "position": { + "basis": "320px", + "grow": 1 + }, + "propConfig": { + "props.params.params": { + "binding": { + "config": { + "path": "this.custom.params" + }, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "this.custom.path" + }, + "type": "property" + } + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "select-side-view", + "pageScope": true, + "script": "\t# implement your handler here\n\tself.custom.path \u003d payload.get(\"path\")\n\tself.custom.params \u003d payload.get(\"params\")\n\tsystem.perspective.print(payload)\n\t", + "sessionScope": true, + "viewScope": false + } + ] + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/TagViewer/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/TagViewer/resource.json new file mode 100644 index 0000000..a8a16ae --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/TagViewer/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2024-05-23T11:48:44Z" + }, + "lastModificationSignature": "2475274c60d5018f42d41bd44cef9752cdbb88c7c53ac6b44106ff8c87962185" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/TagViewer/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/TagViewer/thumbnail.png new file mode 100644 index 0000000..2f771c9 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/TagViewer/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/TagViewer/view.json b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/TagViewer/view.json new file mode 100644 index 0000000..68b4ff4 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Config-Tool/TagViewer/view.json @@ -0,0 +1,237 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 1080, + "width": 400 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "custom": { + "selected_tag": "[BRS1_SCADA_TAG_PROVIDER]System/device_count" + }, + "events": { + "component": { + "onNodeClick": { + "config": { + "script": "\tpath \u003d event.path\n\tinfo \u003d system.tag.getConfiguration(path)\n\ttag_type \u003d str(info[0].get(\"tagType\"))\n\tif tag_type \u003d\u003d \"AtomicTag\":\n\t\tself.custom.selected_tag \u003d path\n\telse:\n\t\tself.custom.selected_tag \u003d None" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "TagBrowseTree" + }, + "position": { + "basis": "669px" + }, + "propConfig": { + "custom.tag_value": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "selected_tag": "{this.custom.selected_tag}" + }, + "tagPath": "{selected_tag}" + }, + "transforms": [ + { + "code": "\timport org.python.core.PyUnicode as uni\n\tif value \u003d\u003d None:\n\t\treturn \"N/A\"\n\t\t\n\tif isinstance(value, uni) and len(value) \u003e 50:\n\t\treturn (value[:50])\n\treturn value", + "type": "script" + } + ], + "type": "tag" + }, + "onChange": { + "enabled": null, + "script": "\tpayload \u003d {}\n\ttag_value \u003d self.custom.tag_value\n\tpayload[\"data\"] \u003d tag_value \n\tsystem.perspective.sendMessage(\"update-tag-value\", payload, scope \u003d \"view\")" + } + }, + "props.root.path": { + "binding": { + "config": { + "expression": "concat(\"[\",{session.custom.fc},\"_SCADA_TAG_PROVIDER]\")" + }, + "type": "expr" + } + } + }, + "props": { + "root": {}, + "selection": { + "mode": "single", + "values": [ + "[BRS1_SCADA_TAG_PROVIDER]System/device_count" + ] + } + }, + "type": "ia.display.tag-browse-tree" + }, + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "32px" + }, + "props": { + "path": "material/local_offer", + "style": { + "marginLeft": "10px" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "80px" + }, + "props": { + "style": { + "textIndent": "10px" + }, + "text": "Tag Value", + "textStyle": { + "fontSize": "12px", + "fontWeight": "bold" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "40px" + }, + "props": { + "style": { + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderStyle": "none", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "marginLeft": "10px", + "marginRight": "10px", + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Markdown" + }, + "position": { + "basis": "301px" + }, + "props": { + "source": "{}", + "style": { + "fontFamily": "Arial", + "textIndent": "10px" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-tag-value", + "pageScope": false, + "script": "\tdata \u003d payload[\"data\"]\n\tself.props.source \u003d data", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.display.markdown" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "112px" + }, + "props": { + "style": { + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderStyle": "solid", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "margin": "10px", + "marginLeft": "10px", + "marginRight": "10px", + "marginTop": "10px", + "paddingBottom": "10px", + "paddingLeft": "10px", + "paddingRight": "10px", + "paddingTop": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "1025px" + }, + "props": { + "direction": "column", + "style": { + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderStyle": "solid", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "margin": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "361px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/Device/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/Device/resource.json new file mode 100644 index 0000000..c8c5dcf --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/Device/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2021-12-03T10:58:55Z" + }, + "lastModificationSignature": "e767a15a992f8bb028ea2dd0ea6449aa6be61eeef9f378eb1078341552bf06f7" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/Device/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/Device/thumbnail.png new file mode 100644 index 0000000..176953c Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/Device/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/Device/view.json b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/Device/view.json new file mode 100644 index 0000000..ce1af37 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/Device/view.json @@ -0,0 +1,244 @@ +{ + "custom": {}, + "params": { + "device_name": "Test", + "driver": "value", + "enabled": false, + "host_name": "value", + "status": "value" + }, + "propConfig": { + "params.device_name": { + "paramDirection": "input", + "persistent": true + }, + "params.driver": { + "paramDirection": "input", + "persistent": true + }, + "params.enabled": { + "paramDirection": "input", + "persistent": true + }, + "params.host_name": { + "paramDirection": "input", + "persistent": true + }, + "params.status": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 50, + "width": 1908 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "400px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.device_name" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "400px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.driver" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "200px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.enabled" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "564px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.status" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "564px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.host_name" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "2px", + "grow": 1 + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\timport sys\n\tfrom java.lang import Exception\n\t\n\ttry:\n\t\tif system.tag.exists(\"System/DeviceList\"):\n\t\t\tdevice_cfg \u003d system.tag.read(\"System/DeviceList\").value\n\t\t\tif device_cfg\u003d\u003d\u0027\u0027:\n\t\t\t\tdevice_cfg\u003d\u0027{}\u0027\n\t\t\tcfg \u003d system.util.jsonDecode(device_cfg)\n\t\t\tenabled \u003d self.view.params.enabled\n\t\t\tdevice \u003d self.view.params.device_name\n\t\t\tsystem.perspective.print(enabled)\n\t\t\tif enabled:\n\t\t\t\tdevice_list \u003d cfg.get(\"Devicedisable\",[])\n\t\t\t\tif device not in device_list:\n\t\t\t\t\tdevice_list.append(device)\n\t\t\t\tcfg[\"Devicedisable\"] \u003d device_list\n\t\t\tif not enabled:\n\t\t\t\tdevice_list \u003d cfg.get(\"DeviceEnable\",[])\n\t\t\t\tif device not in device_list:\n\t\t\t\t\tdevice_list.append(device)\n\t\t\t\tcfg[\"DeviceEnable\"] \u003d device_list\n\t\t\tsystem.perspective.print(cfg) \n\t\t\tencode \u003d system.util.jsonEncode(cfg)\n\t\t\tsystem.tag.write(\"System/DeviceList\",encode)\t\n\texcept:\n\t logger \u003d system.util.getLogger(\"Device_Enable\")\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003d str(lineno) + str(exc_type) + str(exc_obj)\n\t #system.gui.errorBox(errorMessage,\"Error\")\n\t " + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0" + }, + "position": { + "basis": "50px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "expression": "if({view.params.enabled} \u003d True, \"Disable Device\", \"Enable Device\")" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "Buttons/PB_1" + } + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "2px", + "grow": 1 + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "200px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "custom": { + "update": "value", + "update_enable": "value" + }, + "meta": { + "name": "root" + }, + "props": { + "style": { + "borderStyle": "ridge" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DeviceManager/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DeviceManager/resource.json new file mode 100644 index 0000000..4e1e186 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DeviceManager/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2021-12-08T13:35:55Z" + }, + "lastModificationSignature": "5e3a01374c4256735f54489c627ffd3d57041f28ac3ecc641b2896a88af945aa" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DeviceManager/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DeviceManager/thumbnail.png new file mode 100644 index 0000000..5dc400d Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DeviceManager/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DeviceManager/view.json b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DeviceManager/view.json new file mode 100644 index 0000000..6307483 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DeviceManager/view.json @@ -0,0 +1,1713 @@ +{ + "custom": { + "delay": 2000, + "update": 2000 + }, + "params": {}, + "propConfig": { + "custom.delay": { + "persistent": true + }, + "custom.update": { + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "10px" + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-White-12pt", + "fontSize": 20, + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "800px" + }, + "props": { + "style": { + "classes": "Labels/Label" + }, + "text": "Import/Add Device" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "145px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "800px" + }, + "props": { + "style": { + "classes": "Labels/Label" + }, + "text": "Export/Remove Device" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_4" + }, + "position": { + "basis": "10px", + "grow": 1 + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "32px", + "grow": 1, + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onEditCellCommit": { + "config": { + "script": "\t\n\t\n\tdef get_headers_index(headers,col):\n\t for i,value in enumerate(headers):\n\t if value \u003d\u003d col:\n\t\t \treturn i\n\t\n\t\n\tdata \u003d self.props.data\n\theaders \u003d system.dataset.getColumnHeaders(data)\n\tcol \u003d event.column\n\trow \u003d event.rowIndex\n\tvalue \u003d event.value\n\tcol_index \u003d get_headers_index(headers,col)\n\tself.props.data \u003d system.dataset.setValue(data, row, col_index, value)\n\t\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "AddTable" + }, + "position": { + "basis": "800px" + }, + "propConfig": { + "props.data": { + "onChange": { + "enabled": null, + "script": "\tpayload \u003d self.props.data\n\tsystem.perspective.sendMessage(\"addtable-data-update\", payload \u003d payload , scope \u003d \"view\")" + } + }, + "props.selection.selectedRow": { + "onChange": { + "enabled": null, + "script": "\tif currentValue.value is not None:\n\t\tpayload \u003d currentValue.value\t\n\telse:\n\t\tpayload \u003d -1\n\tsystem.perspective.sendMessage(\"addtable-selection-update\", payload \u003d payload , scope \u003d \"view\")" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "Device Name", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "Hostname", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "Driver", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "view", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "Main-Views/Device-Manager/DriverDropDown", + "visible": true, + "width": "" + } + ], + "data": { + "$": [ + "ds", + 192, + 1638525899295 + ], + "$columns": [ + { + "data": [ + "IEC_Test" + ], + "name": "Device Name", + "type": "String" + }, + { + "data": [ + "lsdcknsncls" + ], + "name": "Hostname", + "type": "String" + }, + { + "data": [ + "S7300" + ], + "name": "Driver", + "type": "String" + } + ] + }, + "rows": { + "subviewExpansionMode": "single" + }, + "selection": { + "data": [ + { + "Driver": "S7300" + } + ], + "enableColumnSelection": true, + "selectedColumn": "Driver", + "selectedRow": 0 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-addtable-data", + "pageScope": false, + "script": "\tself.props.data \u003d payload", + "sessionScope": false, + "viewScope": true + }, + { + "messageType": "update-addtable-selectedrow", + "pageScope": false, + "script": "\tif payload \u003d\u003d -1:\n\t\tself.props.selection.selectedRow \u003d None", + "sessionScope": false, + "viewScope": true + }, + { + "messageType": "addtable-dropdown-updaterow", + "pageScope": true, + "script": "\t#newData \u003d []\n\tsystem.perspective.print(\"DropDownMessage\")\n\thostname \u003d str(payload[\u0027Hostname\u0027])\n\tvalue \u003d payload[\u0027value\u0027]\n\tdata \u003d system.dataset.toPyDataSet(self.props.data)\n\tnewData \u003d data\n\tupdate \u003d False \n\tfor row in range(data.getRowCount()):\n\t\tsystem.perspective.print(\"Looping\")\n\t\tif data[row][\u0027Hostname\u0027] \u003d\u003d hostname:\n\t\t\tsystem.perspective.print(\"New Data\")\n\t\t\tnewData \u003d system.dataset.updateRow(data , row , {\"Driver\": value})\n\t\t\tbreak\n\t\t\n\tself.props.data \u003d newData\n", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.display.table" + }, + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "custom": { + "file_data": "" + }, + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "\tsystem.perspective.print(\"uploading\")\n\tself.custom.file_data \u003d event.file.getString()\n\t\n\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "propConfig": { + "custom.file_data": { + "onChange": { + "enabled": null, + "script": "\tif currentValue.value :\n\t\ttmp \u003d currentValue.value.replace(\"\\n\", \",\").replace(\u0027\"\u0027, \u0027\u0027)\n\t\t\n\t\tdata \u003d tmp.split(\",\")\n\t\theaders \u003d data[0:3]\n\t\tvalues \u003d []\n\t\tprint(headers)\n\t\n\t\tfor i in range(0,(len(data)-3),3):\n\t\t\tif i \u003d\u003d 0:\n\t\t\t\tpass\n\t\t\telse:\n\t\t\t\tvalue \u003d [data[i] , data[i+1] , data[i+2]]\n\t\t\t\t#value \u003d {\"Device name\":data[i] , \"Hostname\": data[i+1], \"Driver\":data[i+2]}\n\t\t\t\tprint(len(value))\n\t\t\t\tvalues.append(value)\n\t\t\n\t\n\t\tnew_data \u003d system.dataset.toDataSet(headers,values)\n\t\t#new_data \u003d values\n\t\tsystem.perspective.sendMessage(\"update-addtable-data\", payload \u003d new_data, scope \u003d \"view\")\n\t\tself.custom.file_data \u003d \"\"" + } + } + }, + "props": { + "fileUploadIcon": { + "color": "#000000", + "name": "Import" + }, + "style": { + "backgroundColor": "#BAB6B6", + "classes": "" + }, + "supportedFileTypes": [ + "csv" + ] + }, + "type": "ia.input.fileupload" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "AddTableData": { + "$": [ + "ds", + 192, + 1638525899295 + ], + "$columns": [ + { + "data": [ + "IEC_Test" + ], + "name": "Device Name", + "type": "String" + }, + { + "data": [ + "lsdcknsncls" + ], + "name": "Hostname", + "type": "String" + }, + { + "data": [ + "S7300" + ], + "name": "Driver", + "type": "String" + } + ] + } + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tdata \u003d self.custom.AddTableData\n\tpayload \u003d system.dataset.addRow(data,[\"\",\"\",\"\"])\n\tsystem.perspective.sendMessage(\"update-addtable-data\", payload\u003dpayload, scope\u003d\"view\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "props": { + "image": { + "icon": { + "path": "material/add" + } + }, + "style": { + "classes": "Buttons/PB_1" + }, + "text": "Add Row" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "addtable-data-update", + "pageScope": false, + "script": "\t# implement your handler here\n\tself.custom.AddTableData \u003d payload", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "AddTableData": { + "$": [ + "ds", + 192, + 1638525899295 + ], + "$columns": [ + { + "data": [ + "IEC_Test" + ], + "name": "Device Name", + "type": "String" + }, + { + "data": [ + "lsdcknsncls" + ], + "name": "Hostname", + "type": "String" + }, + { + "data": [ + "S7300" + ], + "name": "Driver", + "type": "String" + } + ] + }, + "SelectedRow": 0 + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\trow_to_delete \u003d self.custom.SelectedRow\n\tdataset \u003d self.custom.AddTableData\n\trows \u003d dataset.getRowCount()\n\tsystem.perspective.print(\"The row is \"+ str(row_to_delete))\n\tsystem.perspective.print(\"The number of row(s) is \"+ str(rows))\n\tif row_to_delete is not None:\n\t\tif row_to_delete or (row_to_delete \u003d\u003d 0 and rows \u003e 1):\n\t\t\tsystem.perspective.print(\"Deleting \"+ str(row_to_delete))\n\t\t\tpayload \u003d system.dataset.deleteRow(dataset,row_to_delete)\n\t\telif row_to_delete \u003d\u003d 0 and rows \u003d\u003d 1:\n\t\t\tsystem.perspective.print(\"Deleting \"+ str(row_to_delete))\n\t\t\tpayload \u003d system.dataset.updateRow(dataset,row_to_delete,{\"Device Name\":\"\",\"Hostname\":\"\",\"Driver\":\"\"}) \n\t\t\t\n\t\tsystem.perspective.sendMessage(\"update-addtable-data\", payload\u003dpayload, scope\u003d\"view\")\n\t\tsystem.perspective.sendMessage(\"update-addtable-selectedrow\", payload\u003d -1, scope\u003d\"view\")\n\t\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_1" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "props": { + "image": { + "icon": { + "path": "material/remove" + } + }, + "style": { + "classes": "Buttons/PB_1" + }, + "text": "Delete Row" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "addtable-data-update", + "pageScope": false, + "script": "\tself.custom.AddTableData \u003d payload", + "sessionScope": false, + "viewScope": true + }, + { + "messageType": "addtable-selection-update", + "pageScope": false, + "script": "\tsystem.perspective.print(payload)\n\tif payload \u003d\u003d -1:\n\t\tself.custom.SelectedRow \u003d None\t\n\telse:\n\t\tself.custom.SelectedRow \u003d payload", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "AddTableData": { + "$": [ + "ds", + 192, + 1638525899295 + ], + "$columns": [ + { + "data": [ + "IEC_Test" + ], + "name": "Device Name", + "type": "String" + }, + { + "data": [ + "lsdcknsncls" + ], + "name": "Hostname", + "type": "String" + }, + { + "data": [ + "S7300" + ], + "name": "Driver", + "type": "String" + } + ] + }, + "Drivers": "{\"S7300\":\"\",\"S7400\":\"\",\"S71200\":\"\",\"S71500\":\"S7\", \"CompactLogix\":\"\",\"Legacy Allen-Bradley\":\"\",\"ControlLogix\":\"\", \"LogixDriver\":\"\",\"MicroLogix\":\"\"} " + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\timport sys\n\timport re\n\tfrom java.lang import Exception\n\t\n\tdef drivers():\n\t\tdrivers_dict \u003d self.custom.Drivers\n\t\tdrivers_decode \u003d system.util.jsonDecode(drivers_dict)\n\t\treturn drivers_decode\n\t\n\tdef decode(tagPath):\n\t device_cfg \u003d system.tag.read(tagPath).value\n\t device_decode \u003d system.util.jsonDecode(device_cfg)\n\t return device_decode\n\t\n\t\n\tdef update_add_devices(device_list,drivers):\n\t\tfc \u003d system.tag.read(\"Configuration/FC\").value\n\t\tprefix \u003d fc\t\n\t\tdevices_data \u003d self.custom.AddTableData\n\t\tpy_devices \u003d system.dataset.toPyDataSet(devices_data)\n\t\tcurrent_device_list \u003d device_list.get(\"Devicestatus\",\"\")\n\t\tdevices_to_check \u003d [i for i in current_device_list]\n\t\tdevices_to_add \u003d {}\n\t\terror\u003d[]\n\t\tif py_devices:\n\t\t\tfor i,j in enumerate(py_devices):\n\t\t\t\trow \u003d[]\n\t\t\t\tname \u003d j[0]\n\t\t\t\thostname \u003d j[1]\n\t\t\t\tdriver \u003d j[2]\n\t\t\t\tsystem.perspective.print(drivers.get(j[2]))\t\n\t\t\t\tcheck_driver \u003d drivers.get(j[2],\"False\")\n\t\t\t\tif name.startswith(prefix):\n\t\t\t\t\tif name not in devices_to_check:\n\t\t\t\t\t\tif j[0] and j[1] and check_driver !\u003d \"False\":\n\t\t\t\t\t\t\trow.append(hostname)\n\t\t\t\t\t\t\trow.append(driver)\n\t\t\t\t\t\t\tdevices_to_add[name] \u003d row\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\terror.append(i)\n\t\t\t\t\telse:\n\t\t\t\t\t system.perspective.print(\"Device already exists: %s\" % (name))\n\t\t\t\t\t message \u003d {\"labelText\":\"Device already exists: %s\" % (name),\"acceptPB\":\"Ok\", \"cancelPB\":\"hide\",\"iconPath\":\"material/error\" }\n\t\t\t\t\t system.perspective.openPopup(\"Exists\",\u0027PopUp-Views/UserInfo\u0027, params \u003d {\u0027Message\u0027:message})\n\t\t\t\telse:\n\t\t\t\t\t system.perspective.print(\"Use the correct prefix: %s\" % (fc))\n\t\t\t\t\t message \u003d {\"labelText\":\"Use the correct prefix: %s\" % (fc),\"acceptPB\":\"Ok\", \"cancelPB\":\"hide\",\"iconPath\":\"material/error\" }\n\t\t\t\t\t system.perspective.openPopup(\"Exists\",\u0027PopUp-Views/UserInfo\u0027, params \u003d {\u0027Message\u0027:message})\n\t\t#\tdisplay_err\u003d\"\"\n\t\t#\tdisplay_err \u003d display_err.join(error)\n\t\t\tif error:\n\t\t\t\tdisplay_err \u003d str(error)\n\t\t\t\tsystem.perspective.print(\"Missing data in row: %s\" % (display_err))\n\t\t\t\tmessage \u003d {\"labelText\":\"Missing data in row: %s\" % (display_err),\"acceptPB\":\"Ok\", \"cancelPB\":\"hide\",\"iconPath\":\"material/error\" }\n\t\t\t\tsystem.perspective.openPopup(\"Exists\",\u0027PopUp-Views/UserInfo\u0027, params \u003d {\u0027Message\u0027:message})\n\t\t\tdevice_list[\"AddDevices\"] \u003d devices_to_add \n\t\t\tencode \u003d system.util.jsonEncode(device_list)\n\t\t\tsystem.tag.write(\"System/DeviceList\",encode)\n\t\n\ttry:\n\t\topc_drivers \u003d drivers()\n\t\tif system.tag.exists(\"System/DeviceStatus\"):\n\t\t\tcfg \u003d decode(\"System/DeviceStatus\")\n\t\t\tupdate_add_devices(cfg,opc_drivers)\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t error_description\u003dstr(lineno)+\" , \"+str(exc_type)+\" , \"+str(exc_obj)\n\t system.perspective.print(error_description)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_2" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "props": { + "AddTableData": { + "$": [ + "ds", + 192, + 1638376388559 + ], + "$columns": [ + { + "data": [ + "IECTest1", + "IECTest2" + ], + "name": "Device Name", + "type": "String" + }, + { + "data": [ + "IECTest1", + "" + ], + "name": "Hostname", + "type": "String" + }, + { + "data": [ + "S71500", + "" + ], + "name": "Driver", + "type": "String" + } + ] + }, + "image": { + "icon": { + "path": "material/keyboard_return" + } + }, + "style": { + "classes": "Buttons/PB_1" + }, + "text": "Add Device" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "addtable-data-update", + "pageScope": false, + "script": "\t\n\tself.custom.AddTableData \u003d payload", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\theader \u003d [\"Device Name\",\"Hostname\",\"Driver\"]\n\ttable \u003d [[\"\",\"\",\"\"]]\n\tpayload \u003d system.dataset.toDataSet(header,table)\n\tsystem.perspective.sendMessage(\"update-addtable-data\", payload\u003dpayload, scope\u003d\"view\")\n\tsystem.perspective.sendMessage(\"update-addtable-selectedrow\", payload\u003d -1, scope\u003d\"view\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Icon" + }, + "position": { + "basis": "30px" + }, + "props": { + "color": "#FFFFFF", + "path": "material/delete_forever", + "style": { + "borderBottomLeftRadius": 5, + "borderBottomRightRadius": 5, + "borderColor": "#AAAAAA", + "borderStyle": "solid", + "borderTopLeftRadius": 5, + "borderTopRightRadius": 5, + "borderWidth": 1, + "classes": "Buttons/PB_1" + } + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "DeleteTable" + }, + "position": { + "basis": "800px" + }, + "propConfig": { + "props.data": { + "onChange": { + "enabled": null, + "script": "\tpayload \u003d self.props.data\n\tsystem.perspective.sendMessage(\"deletetable-data-update\", payload \u003d payload , scope \u003d \"view\")" + } + }, + "props.selection.selectedRow": { + "onChange": { + "enabled": null, + "script": "\tif currentValue.value is not None:\n\t\tpayload \u003d currentValue.value\t\n\telse:\n\t\tpayload \u003d -1\n\tsystem.perspective.sendMessage(\"deletetable-selection-update\", payload \u003d payload , scope \u003d \"view\")" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "Device Name", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "Hostname", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": true, + "field": "Driver", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "data": { + "$": [ + "ds", + 192, + 1638468310855 + ], + "$columns": [ + { + "data": [ + "IEC_Test" + ], + "name": "Device Name", + "type": "String" + }, + { + "data": [ + "lsdcknsncls" + ], + "name": "Hostname", + "type": "String" + }, + { + "data": [ + "S7300" + ], + "name": "Driver", + "type": "String" + } + ] + }, + "selection": { + "data": [ + { + "Driver": "S7300" + } + ], + "enableColumnSelection": true, + "selectedColumn": "Driver", + "selectedRow": 0 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-deletetable-data", + "pageScope": false, + "script": "\tself.props.data \u003d payload ", + "sessionScope": false, + "viewScope": true + }, + { + "messageType": "update-deletetable-selectedrow", + "pageScope": false, + "script": "\tif payload \u003d\u003d -1:\n\t\tself.props.selection.selectedRow \u003d None", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.display.table" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\timport sys\n\tfrom java.lang import Exception\n\t\n\tdef update_delete_table():\t\n\t\t\tprefix \u003d system.tag.read(\"Configuration/FC\").value\n\t\t\tdevices\u003d system.tag.read(\"System/DeviceStatus\").value\n\t\t\tdecode_devices\u003d system.util.jsonDecode(devices)\n\t\t\tdevice_status\u003d decode_devices.get(\"Devicestatus\",\"\")\n\t\t\ttable\u003d []\n\t\t\tif device_status:\n\t\t\t\tfor i in device_status:\n\t\t\t\t\trow \u003d[]\n\t\t\t\t\tname\u003d [i]\n\t\t\t\t\tif i.startswith(prefix):\n\t\t\t\t\t\trow\u003d device_status[i]\n\t\t\t\t\t\thostname \u003d [row[3]]\n\t\t\t\t\t\tdriver \u003d [row[2]]\n\t\t\t\t\t\tnew_row \u003d name + hostname + driver\n\t\t\t\t\t\ttable.append(new_row)\n\t\t\t\n\t\t\tif not len(table):\n\t\t\t\ttable.append([\"\",\"\",\"\"])\n\t\t\t\t\t\t\n\t\t\theader\u003d [\"Device Name\",\"Hostname\",\"Driver\"]\n\t\t\tdevice_dataset \u003d system.dataset.toDataSet(header,table)\n\t\t\tsystem.perspective.print(device_dataset)\n\t\t\tsystem.perspective.sendMessage(\"update-deletetable-data\", payload \u003d device_dataset , scope\u003d\"view\") \n\t\t\t\n#\ttry:\n\tif system.tag.exists(\"System/DeviceStatus\"):\n\t update_delete_table()\n#\texcept:\n#\t logger \u003d system.util.getLogger(\"Update_delete_table\")\n#\t exc_type, exc_obj, tb \u003d sys.exc_info()" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "props": { + "image": { + "icon": { + "path": "material/update" + } + }, + "style": { + "classes": "Buttons/PB_1" + }, + "text": "Update" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "DeleteTableData": { + "$": [ + "ds", + 192, + 1638468310856 + ], + "$columns": [ + { + "data": [ + "IEC_Test" + ], + "name": "Device Name", + "type": "String" + }, + { + "data": [ + "lsdcknsncls" + ], + "name": "Hostname", + "type": "String" + }, + { + "data": [ + "S7300" + ], + "name": "Driver", + "type": "String" + } + ] + }, + "SelectedRow": 0 + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\timport sys\n\tfrom java.lang import Exception\n\t\n\tdef decode(tagPath):\n\t device_cfg \u003d system.tag.read(tagPath).value\n\t device_decode \u003d system.util.jsonDecode(device_cfg)\n\t return device_decode\n\t\n\t\n\tdef update_delete_devices(device_list):\n\t\trow_to_delete \u003d self.parent.parent.getChild(\u0027DeleteTable\u0027).props.selection.selectedRow\n\t\tdelete_data \u003d self.parent.parent.getChild(\u0027DeleteTable\u0027).props.data\n\t\tsystem.perspective.print(device_list)\n\t\tpy_devices \u003d system.dataset.toPyDataSet(delete_data)\n#\t\tsystem.perspective.print(py_devices)\n\t\trow \u003d[]\n\t\tif py_devices:\n\t\t\tfor i,j in enumerate(py_devices):\n\t\t\t\tif i \u003d\u003d row_to_delete:\n\t\t\t\t\tname \u003d j[0]\n\t\t\t\t\trow.append(name)\n\t\t\tdevice_list[\"Removedevices\"] \u003d row \n\t\t\tencode \u003d system.util.jsonEncode(device_list)\n\t\t\t#proceed \u003d system.gui.confirm(\"Device %s will be removed from the gateway, do you wish to proceed?\" % (name), \"Remove Device\",1)\n\t\t\t#if proceed:\n\t\t\t#system.tag.write(\"System/DeviceList\",encode)\n\t\t\tsystem.tag.writeBlocking([\"System/DeviceList\",], encode)\n\t\t\t\n#\ttry:\n\tcfg \u003d decode(\"System/DeviceList\")\n\tupdate_delete_devices(cfg)\n\t\t\n#\texcept:\n#\t logger \u003d system.util.getLogger(\"Device_Delete\")\n#\t exc_type, exc_obj, tb \u003d sys.exc_info()\n#\t lineno \u003d tb.tb_lineno\n#\t logger.error(\"Error: %s, %s, %s\" % (lineno, exc_type, exc_obj))\n#\t " + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "props": { + "image": { + "icon": { + "path": "material/remove" + } + }, + "style": { + "classes": "Buttons/PB_1" + }, + "text": "Remove Device" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "deletetable-selection-update", + "pageScope": false, + "script": "\tif payload \u003d\u003d -1:\n\t\tself.custom.SelectedRow \u003d None\t\n\telse:\n\t\tself.custom.SelectedRow \u003d payload", + "sessionScope": false, + "viewScope": true + }, + { + "messageType": "deletetable-data-update", + "pageScope": false, + "script": "\tself.custom.DeleteTableData \u003d payload", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "DeleteTableData": { + "$": [ + "ds", + 192, + 1638468310856 + ], + "$columns": [ + { + "data": [ + "IEC_Test" + ], + "name": "Device Name", + "type": "String" + }, + { + "data": [ + "lsdcknsncls" + ], + "name": "Hostname", + "type": "String" + }, + { + "data": [ + "S7300" + ], + "name": "Driver", + "type": "String" + } + ] + } + }, + "events": { + "dom": { + "onClick": { + "config": { + "script": "\timport sys\n\tfrom java.lang import Exception\n\t\n\tdef save_devices():\n\t\tdevices_to_save \u003d self.custom.DeleteTableData\n\t\tpy_devices \u003d system.dataset.toPyDataSet(devices_to_save)\n\t\tdevice_list \u003d []\n\t\tfor i,j in enumerate(py_devices):\n\t\t#check the required fields have data in them.\n\t\t\trow \u003d[]\n\t\t\tname \u003d j[0]\n\t\t\thostname \u003d j[1]\n\t\t\tdriver \u003d j[2]\n\t\t\trow.append(name)\n\t\t\trow.append(hostname)\n\t\t\trow.append(driver)\n\t\t\tdevice_list.append(row)\n\t\tHeader \u003d [\u0027Device Name\u0027,\u0027Hostname\u0027,\u0027Driver\u0027]\n\t\tdevice_dataset \u003d system.dataset.toDataSet(Header,device_list)\n\t\tcsv_file \u003d system.dataset.toCSV(device_dataset)\n\t\tsystem.perspective.download(filename\u003d \"myExport.csv\", data \u003d csv_file, contentType\u003d \"text/csv; charset\u003dutf-8\")\n#\t\tfilePath \u003d system.file.saveFile(\"myExport.csv\", \"csv\", \"Gateway Devices\") \n#\t\tif filePath:\n#\t\t system.file.writeFile(filePath, csv_file)\n\t\n\t\n#\ttry: \n\tsave_devices()\n#\texcept:\n#\t logger \u003d system.util.getLogger(\"save_devices\")\n#\t exc_type, exc_obj, tb \u003d sys.exc_info()\n#\t lineno \u003d tb.tb_lineno\n#\t logger.error(\"Error: %s, %s, %s\" % (lineno, exc_type, exc_obj))" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Icon" + }, + "position": { + "basis": "30px" + }, + "props": { + "color": "#FFFFFF", + "path": "material/save", + "style": { + "borderBottomLeftRadius": 5, + "borderBottomRightRadius": 5, + "borderColor": "#AAAAAA", + "borderStyle": "solid", + "borderTopLeftRadius": 5, + "borderTopRightRadius": 5, + "borderWidth": 1, + "classes": "Buttons/PB_1" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "deletetable-data-update", + "pageScope": false, + "script": "\tself.custom.DeleteTableData \u003d payload", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "custom": { + "DeleteTableData": "value", + "SelectedRow": "value" + }, + "events": { + "dom": { + "onClick": { + "config": { + "script": "\theader \u003d [\"Device Name\",\"Hostname\",\"Driver\"]\n\ttable \u003d [[\"\",\"\",\"\"]]\n\tdevice_dataset \u003d system.dataset.toDataSet(header,table)\n\tsystem.perspective.sendMessage(\"update-deletetable-data\", payload\u003ddevice_dataset, scope\u003d\"view\")\n\tsystem.perspective.sendMessage(\"update-deletetable-selectedrow\", payload\u003d -1, scope\u003d\"view\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Icon_0" + }, + "position": { + "basis": "30px" + }, + "props": { + "color": "#FFFFFF", + "path": "material/delete_forever", + "style": { + "borderBottomLeftRadius": 5, + "borderBottomRightRadius": 5, + "borderColor": "#AAAAAA", + "borderStyle": "solid", + "borderTopLeftRadius": 5, + "borderTopRightRadius": 5, + "borderWidth": 1, + "classes": "Buttons/PB_1" + } + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "direction": "column" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "deletetable-selection-update", + "pageScope": true, + "script": "\tif payload \u003d\u003d -1:\n\t\tself.custom.SelectedRow \u003d None\t\n\telse:\n\t\tself.custom.SelectedRow \u003d payload", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label_4" + }, + "position": { + "basis": "10px", + "grow": 1 + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "198px", + "shrink": 0 + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "230px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label_4" + }, + "position": { + "basis": "15px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Labels/Label", + "textAlign": "center" + }, + "text": "\n" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "400px" + }, + "props": { + "style": { + "classes": "Labels/Label_1", + "textAlign": "center" + }, + "text": "Device Name" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "400px" + }, + "props": { + "style": { + "classes": "Labels/Label_1", + "textAlign": "center" + }, + "text": "Driver" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "200px" + }, + "props": { + "style": { + "classes": "Labels/Label_1", + "textAlign": "center" + }, + "text": "Enabled" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "564px" + }, + "props": { + "style": { + "classes": "Labels/Label_1", + "textAlign": "center" + }, + "text": "Connection Status" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "564px" + }, + "props": { + "style": { + "classes": "Labels/Label_1", + "textAlign": "center" + }, + "text": "Hostname" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "200px" + }, + "props": { + "direction": "column", + "style": { + "overflow": "visible" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label_5" + }, + "position": { + "basis": "15px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Labels/Label", + "textAlign": "center" + }, + "text": "\n" + }, + "type": "ia.display.label" + } + ], + "custom": { + "update": "value", + "update_enable": "value" + }, + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "100px" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "DeviceList" + }, + "position": { + "grow": 1 + }, + "props": { + "direction": "column", + "path": "Main-Views/Device-Manager/Device", + "useDefaultViewWidth": false + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-devicelist-data", + "pageScope": false, + "script": "\tself.props.instances \u003d payload", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.display.flex-repeater" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "784px" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "32px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "custom": { + "delay": 4000, + "run_update": true + }, + "meta": { + "name": "root" + }, + "propConfig": { + "custom.update": { + "binding": { + "config": { + "expression": "now({this.custom.delay})" + }, + "type": "expr" + }, + "onChange": { + "enabled": null, + "script": "\tdef update():\n\t\tdevices \u003d system.tag.read(\"System/DeviceStatus\").value\n\t\tfc \u003d system.tag.read(\"Configuration/FC\").value\n\t\tdecode_devices \u003d system.util.jsonDecode(devices)\n\t\tdevice_status \u003d decode_devices.get(\"Devicestatus\",\"\")\n\t\tsystem.perspective.print(device_status)\n\t\tinstance_style \u003d {\"classes\":\"DeviceManager/DeviceManagerRows\"}\n\t\tinstance_position \u003d {}\n\t\ttable_data \u003d []\n\t\tif device_status:\n\t\t\tfor i in device_status:\n\t\t\t\tif i.startswith(fc):\n\t\t\t\t\trow\u003d{}\n\t\t\t\t\trow[\"device_name\"]\u003d i\n\t\t\t\t\tdevice_items \u003d device_status.get(i)\n\t\t\t\t\tsystem.perspective.print(type(device_items))\n\t\t\t\t\tenabled \u003d device_items[0]\n\t\t\t\t\tstatus \u003d device_items[1]\n\t\t\t\t\tdriver \u003d device_items[2]\n\t\t\t\t\thost_name \u003d device_items[3]\n\t\t\t\t\t\n\t\t\t\t\trow[\"status\"] \u003d status\n\t\t\t\t\trow[\"enabled\"] \u003d enabled\n\t\t\t\t\trow[\"host_name\"] \u003d host_name\n\t\t\t\t\trow[\"driver\"] \u003d driver\n#\t\t\t\t\t\n\t\t\t\t\trow[\"instanceStyle\"]\u003d instance_style\n\t\t\t\t\trow[\"instancePosition\"]\u003d instance_position\n\t\t\t\t\ttable_data.append(row)\n#\t\t\t\n\t\t\t#self.getChild(\"FlexRepeater\").props.instances \u003d table_data\n\t\t\tsystem.perspective.sendMessage(\"update-devicelist-data\", payload \u003d table_data , scope\u003d\"view\")\n\t\telse:\n#\t\t\trow \u003d row_builder.build_row(status \u003d \"\", enabled \u003d \"\", host_name\u003d\"\", driver\u003d\"\",\n#\t\t\t \t\t\t\t\t\t\tinstanceStyle\u003d instance_style, instancePosition \u003d instance_position)\n#\t\t\ttable_data.append(row)\n\t\t\tsystem.perspective.sendMessage(\"update-devicelist-data\", payload \u003d [] , scope\u003d\"view\")\n\t\t\t\t\t\n\n\tif self.custom.run_update:\n\t\tif system.tag.exists(\"System/DeviceStatus\"):\n\t\t\tupdate()\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n#\t\theader\u003d [\"device_name\",\"enabled\",\"status\",\"driver\",\"hostname\"]\n#\t\tdevice_dataset \u003d system.dataset.toDataSet(header,table)\n#\t\tsorted \u003d system.dataset.sort(device_dataset,\"device_name\",True)\n#\t\tevent.source.parent.getComponent(\u0027DeviceTable\u0027).templateParams \u003d sorted\n#\t\n#\tdef errors():\n#\t\terrors \u003d system.tag.read(\"System/DeviceMgrErrors\").value\n#\t\tevent.source.parent.Errors \u003d errors\n#\ttry:\n#\t\tif event.source.parent.getComponent(\u0027DeviceTable\u0027).runscript:\n#\t\t\tif system.tag.exists(\"System/DeviceStatus\"):\n#\t\t\t\tsystem.util.invokeAsynchronous(update)\n#\t\t\tif system.tag.exists(\"System/DeviceMgrErrors\"):\n#\t\t\t\tsystem.util.invokeAsynchronous(errors)\n#\t\n#\texcept:\n#\t\texc_type, exc_obj, tb \u003d sys.exc_info()\n#\t\tlineno \u003d tb.tb_lineno\n#\t\terror_description\u003dstr(lineno)+\" , \"+str(exc_type)+\" , \"+str(exc_obj)\n#\t\tsystem.gui.messageBox(error_description)" + } + } + }, + "props": { + "direction": "column", + "style": { + "classes": "Background-Styles/Main-Background PopUp-Styles/Information-Device" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DriverDropDown/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DriverDropDown/resource.json new file mode 100644 index 0000000..3c4b086 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DriverDropDown/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2021-12-03T16:06:13Z" + }, + "lastModificationSignature": "636ead500d1ebb3b6b709eedf0c4838b2dc0aa72e06f879e7cbe0222594b3427" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DriverDropDown/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DriverDropDown/thumbnail.png new file mode 100644 index 0000000..f46bd05 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DriverDropDown/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DriverDropDown/view.json b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DriverDropDown/view.json new file mode 100644 index 0000000..43a4bf5 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Device-Manager/DriverDropDown/view.json @@ -0,0 +1,97 @@ +{ + "custom": {}, + "params": { + "rowData": { + "Driver": "value" + } + }, + "propConfig": { + "params.rowData": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 36, + "width": 227 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "36px" + }, + "propConfig": { + "props.value": { + "binding": { + "config": { + "path": "view.params.rowData.Driver" + }, + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tvalue \u003d currentValue.value\n\tsystem.perspective.print(str(origin))\n\tif value is not None:\n\t\tif \u0027Binding\u0027 not in str(origin):\n\t\t\tmsg \u003d \u0027addtable-dropdown-updaterow\u0027\n\t\t\tHostname \u003d self.view.params.rowData[\u0027Hostname\u0027]\n\t\t\tpayload \u003d\t{\n\t\t\t\t\t\t\u0027value\u0027\t\t: value,\n\t\t\t\t\t\t\u0027Hostname\u0027\t: Hostname\n\t\t\t\t\t\t}\n\t\t\tsystem.perspective.sendMessage(msg, payload)" + } + } + }, + "props": { + "options": [ + { + "label": "S7300", + "value": "S7300" + }, + { + "label": "S7400", + "value": "S7400" + }, + { + "label": "S71200", + "value": "S71200" + }, + { + "label": "S71500", + "value": "S71500" + }, + { + "label": "CompactLogix", + "value": "CompactLogix" + }, + { + "label": "Legacy Allen-Bradley", + "value": "ControlLogix" + }, + { + "label": "ControlLogix", + "value": "ControlLogix" + }, + { + "label": "LogixDriver", + "value": "LogixDriver" + }, + { + "label": "Allen Bradley MicroLogix", + "value": "MicroLogix" + } + ], + "placeholder": { + "text": "Select Driver..." + } + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Help/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Help/resource.json new file mode 100644 index 0000000..d687859 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Help/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-06-17T15:06:34Z" + }, + "lastModificationSignature": "c623095a27061d07941ce8c8bf11266ba83ab32ed50523815b65db3be0e30b5f" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Help/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Help/thumbnail.png new file mode 100644 index 0000000..7abf0a7 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Help/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Help/view.json b/com.inductiveautomation.perspective/views/Main-Views/Help/view.json new file mode 100644 index 0000000..6273751 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Help/view.json @@ -0,0 +1,792 @@ +{ + "custom": { + "activityLogger": { + "alt_pageid": "help", + "start_time": { + "$": [ + "ts", + 192, + 1718194270770 + ], + "$ts": 1718194270770 + } + } + }, + "events": { + "system": { + "onShutdown": { + "config": { + "script": "#\tactivityLog.logger.callLogger(self, \u0027page\u0027)\n\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)" + }, + "scope": "G", + "type": "script" + }, + "onStartup": { + "config": { + "script": "\tself.custom.activityLogger.start_time \u003d system.date.now()" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": {}, + "propConfig": { + "custom.activityLogger": { + "persistent": true + }, + "custom.activityLogger.pageid": { + "binding": { + "config": { + "expression": "{page.props.path}" + }, + "transforms": [ + { + "code": "\tif value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n\t\treturn self.custom.activityLogger.alt_pageid.lower()\n\telse:\n\t\treturn value[1:].lower()", + "type": "script" + } + ], + "type": "expr" + } + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Header" + }, + "position": { + "basis": "50px" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Body header" + }, + "position": { + "basis": "1920px" + }, + "props": { + "text": "How can we help you ?", + "textStyle": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "45px", + "fontWeight": "bolder", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "120px", + "grow": 1 + }, + "props": { + "justify": "center", + "style": { + "opacity": "0.73", + "textShadow": "#AAAAAA 1px 2px 2px" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Markdown" + }, + "position": { + "basis": "94px", + "grow": 1 + }, + "props": { + "markdown": { + "escapeHtml": false + }, + "source": "\u003chtml\u003eThis page provides help on all things SCADA related. Cant find what your looking for ?. \u003cbr\u003eReach out to the MAP team for assistance.\u003c/html\u003e", + "style": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "20px", + "fontWeight": "lighter", + "lineHeight": "1.5", + "marginBottom": "20px", + "textAlign": "center" + } + }, + "type": "ia.display.markdown" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "58px" + }, + "props": { + "color": "#4D9CCE", + "path": "material/menu_book", + "style": { + "margin": "10px", + "marginTop": "50px" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "100px" + }, + "props": { + "text": "User Guide", + "textStyle": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "22px", + "fontWeight": "bold", + "marginTop": "", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "custom": { + "buttonid": "help/user_guide" + }, + "events": { + "dom": { + "onClick": [ + { + "config": { + "script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "newTab": true, + "url": "https://w.amazon.com/bin/view/EURME/MAP/Product_Management/SCADA2/Resources/UserGuide" + }, + "scope": "C", + "type": "nav" + } + ] + } + }, + "meta": { + "name": "UserGuideCard" + }, + "position": { + "basis": "400px" + }, + "props": { + "direction": "column", + "style": { + "backgroundColor": "#F2F3F4", + "classes": "FadeInFast, background, background-none", + "cursor": "pointer", + "marginBottom": "10px", + "marginRight": "50px", + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "58px" + }, + "props": { + "color": "#4D9CCE", + "path": "material/developer_mode", + "style": { + "margin": "10px", + "marginTop": "50px" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "100px" + }, + "props": { + "text": "Developer Guide", + "textStyle": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "22px", + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "custom": { + "buttonid": "help/dev_guide" + }, + "events": { + "dom": { + "onClick": [ + { + "config": { + "script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "newTab": true, + "url": "https://w.amazon.com/bin/view/EURME/MAP/Projects/Amazon_SCADA/Expanding_BU_and_New_Regions_SCADA/AMZL/DeveloperGuide/" + }, + "scope": "C", + "type": "nav" + } + ] + } + }, + "meta": { + "name": "DevelopmentGuideCard" + }, + "position": { + "basis": "400px" + }, + "props": { + "direction": "column", + "style": { + "backgroundColor": "#F2F3F4", + "classes": "FadeInFast, background, background-none", + "cursor": "pointer", + "marginBottom": "10px", + "marginRight": "50px", + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "58px" + }, + "props": { + "color": "#4D9CCE", + "path": "material/comment", + "style": { + "margin": "10px", + "marginTop": "50px" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "100px" + }, + "props": { + "text": "Provide Feedback", + "textStyle": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "22px", + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "custom": { + "buttonid": "help/feedback" + }, + "events": { + "dom": { + "onClick": [ + { + "config": { + "script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "newTab": true, + "url": "https://quip-amazon.com/BSxOAUz9geea/SCADA-20-Feedback" + }, + "scope": "C", + "type": "nav" + } + ] + } + }, + "meta": { + "name": "DevelopmentGuideCard_0" + }, + "position": { + "basis": "400px" + }, + "props": { + "direction": "column", + "style": { + "backgroundColor": "#F2F3F4", + "classes": "FadeInFast, background, background-none", + "cursor": "pointer", + "marginBottom": "10px", + "marginRight": 50, + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "58px" + }, + "props": { + "color": "#4D9CCE", + "path": "material/healing", + "style": { + "margin": "10px", + "marginTop": "50px" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "100px" + }, + "props": { + "text": "Report Safety Concern", + "textStyle": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "22px", + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "custom": { + "buttonid": "help/reportsafetyconcern" + }, + "events": { + "dom": { + "onClick": [ + { + "config": { + "script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "newTab": true, + "url": "https://atoz.amazon.work/safety_observations" + }, + "scope": "C", + "type": "nav" + } + ] + } + }, + "meta": { + "name": "SafetyConcernsCard" + }, + "position": { + "basis": "400px" + }, + "props": { + "direction": "column", + "style": { + "backgroundColor": "#F2F3F4", + "classes": "FadeInFast, background, background-none", + "cursor": "pointer", + "marginBottom": "10px", + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "CardsTopRow" + }, + "position": { + "basis": "280px" + }, + "props": { + "justify": "center", + "style": { + "marginBottom": "20px", + "marginTop": "20px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "58px" + }, + "props": { + "color": "#4D9CCE", + "path": "material/confirmation_number", + "style": { + "margin": "10px", + "marginTop": "50px" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "100px" + }, + "props": { + "text": "Open a Ticket", + "textStyle": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "22px", + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "custom": { + "buttonid": "help/ticket" + }, + "events": { + "dom": { + "onClick": [ + { + "config": { + "script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "newTab": true, + "url": "https://river.amazon.com/?org\u003dGlobal_RME" + }, + "scope": "C", + "type": "nav" + } + ] + } + }, + "meta": { + "name": "Open a Ticket" + }, + "position": { + "basis": "400px" + }, + "props": { + "direction": "column", + "style": { + "backgroundColor": "#F2F3F4", + "classes": "FadeInFast, background, background-none", + "cursor": "pointer", + "marginBottom": "10px", + "marginRight": "50px", + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "58px" + }, + "props": { + "color": "#4D9CCE", + "path": "material/playlist_add_check", + "style": { + "margin": "10px", + "marginTop": "50px" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "100px" + }, + "props": { + "text": "Commissioning Tool Guide", + "textStyle": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "22px", + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "custom": { + "buttonid": "help/commission_guide" + }, + "events": { + "dom": { + "onClick": [ + { + "config": { + "script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "newTab": true, + "url": "https://w.amazon.com/bin/view/EURME/MAP/Product_Management/SCADA2/Resources/CommissioningToolUserGuide" + }, + "scope": "C", + "type": "nav" + } + ] + } + }, + "meta": { + "name": "Commissioning Tool guide" + }, + "position": { + "basis": "400px" + }, + "props": { + "direction": "column", + "style": { + "backgroundColor": "#F2F3F4", + "classes": "FadeInFast, background, background-none", + "cursor": "pointer", + "marginBottom": "10px", + "marginRight": "50px", + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "58px" + }, + "props": { + "color": "#4D9CCE", + "path": "material/local_library", + "style": { + "margin": "10px", + "marginTop": "50px" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "100px" + }, + "props": { + "text": "Symbol Library", + "textStyle": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": "22px", + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "custom": { + "buttonid": "help/symbol_library" + }, + "events": { + "dom": { + "onClick": [ + { + "config": { + "script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "params": {}, + "view": "Symbol-Views/Symbol-Library-Views/SymbolLibraryMain" + }, + "scope": "C", + "type": "nav" + } + ] + } + }, + "meta": { + "name": "Symbol Library" + }, + "position": { + "basis": "400px" + }, + "props": { + "direction": "column", + "style": { + "backgroundColor": "#F2F3F4", + "classes": "FadeInFast, background, background-none", + "cursor": "pointer", + "marginBottom": "10px", + "marginRight": "0px", + "marginTop": "10px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "CardsBottomRow" + }, + "position": { + "basis": "260px" + }, + "props": { + "justify": "center", + "style": { + "marginTop": "20px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Card body" + }, + "position": { + "basis": "734px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Body" + }, + "position": { + "basis": "980px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Footer" + }, + "position": { + "basis": "50px" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "backgroundColor": "#EDEDED" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Home/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Home/resource.json new file mode 100644 index 0000000..dc9eb52 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Home/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "ankikarw", + "timestamp": "2024-04-01T21:08:56Z" + }, + "lastModificationSignature": "f4866de5e70cc165986fabfabf7b2f5ff1ff2b5eba137f329fc720e91561286c" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Home/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Home/thumbnail.png new file mode 100644 index 0000000..89ac8e1 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Home/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Home/view.json b/com.inductiveautomation.perspective/views/Main-Views/Home/view.json new file mode 100644 index 0000000..1c34dd4 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Home/view.json @@ -0,0 +1,198 @@ +{ + "custom": { + "activityLogger": { + "alt_pageid": "card_view", + "start_time": { + "$": [ + "ts", + 192, + 1710802671820 + ], + "$ts": 1710802671820 + } + } + }, + "events": { + "system": { + "onShutdown": { + "config": { + "script": "\tactivityLog.logger.callLogger(self, \u0027page\u0027)\n\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)" + }, + "scope": "G", + "type": "script" + }, + "onStartup": { + "config": { + "script": "\tself.custom.activityLogger.start_time \u003d system.date.now()" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "page_name": "Home" + }, + "propConfig": { + "custom.activityLogger": { + "persistent": true + }, + "custom.activityLogger.pageid": { + "binding": { + "config": { + "expression": "{page.props.path}" + }, + "transforms": [ + { + "code": "\tif value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n\t\treturn self.custom.activityLogger.alt_pageid.lower()\n\telse:\n\t\treturn value[1:].lower()", + "type": "script" + } + ], + "type": "expr" + } + }, + "params.page_name": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "FlexRepeater" + }, + "position": { + "basis": "1080px" + }, + "props": { + "alignContent": "flex-start", + "alignItems": "flex-start", + "elementPosition": { + "grow": 0, + "shrink": 0 + }, + "path": "Symbol-Views/Controller-Views/ControllerStatus", + "style": { + "overflow": "visible" + }, + "wrap": "wrap" + }, + "type": "ia.display.flex-repeater" + } + ], + "custom": { + "Devices": [ + "ARSAW1301", + "PLC03", + "ARSAW1302", + "PLC01", + "PLC02", + "PLC98", + "ARSAW1305", + "ARSAW1503", + "PLC08", + "PLC99", + "ARSAW1306", + "ARSAW1504", + "ARSAW1501", + "ARSAW1303", + "PLC06", + "PLC07", + "ARSAW1304", + "ARSAW1502", + "ARSAW1309", + "ARSAW1507", + "ARSAW1508", + "PLC09", + "ARSAW1307", + "ARSAW1505", + "ARSAW1308", + "ARSAW1506", + "PLC20", + "ARSAW1509", + "PLC14", + "PLC80", + "PLC81", + "PLC82", + "PLC16", + "FSC10", + "PLC21", + "PLC22", + "PLC69", + "PLC25", + "PLC26", + "PLC23", + "PLC24", + "PLC97", + "PLC27", + "PLC61", + "PLC60", + "PLC1000", + "PLC13", + "ARSAW1312", + "ARSAW1510", + "ARSAW1511", + "ARSAW1310", + "ARSAW1311", + "ARSAW1512", + "PLC70", + "PLC71", + "PLC32", + "PLC30", + "PLC31", + "PLC15" + ], + "count": "value", + "delay": 2000, + "run_update": true + }, + "events": { + "system": { + "onStartup": [ + { + "config": { + "script": "\tVisualisation.home_page.create_home_page(self)" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "script": "\twhid \u003d self.session.custom.fc\n\tsession_id \u003d self.session.props.id\n\tpage_id \u003d self.view.params.page_name\n\tCommands.analytics.send_page_details(whid, session_id, page_id)" + }, + "scope": "G", + "type": "script" + } + ] + } + }, + "meta": { + "name": "root" + }, + "propConfig": { + "custom.update": { + "binding": { + "config": { + "expression": "now({this.custom.delay})" + }, + "type": "expr" + }, + "onChange": { + "enabled": null, + "script": "\n if (self.session.custom.fc \u003d\u003d \u0027\u0027) or (self.session.custom.fc is None):\n \tself.getChild(\"FlexRepeater\").props.instances \u003d []\n \treturn\n \n if self.custom.run_update:\n \tVisualisation.home_page.update_home_status(self)\n# system_tags \u003d system.tag.readBlocking([\"Configuration/FC\", \"System/ActiveAlarms\"])\n# tag_provider \u003d \"[%s_SCADA_TAG_PROVIDER]\" % (system_tags[0].value)\n# status_decoded \u003d system.util.jsonDecode(self.session.custom.id_to_state)\n# if status_decoded:\n#\t values \u003d []\n#\t devices \u003d self.custom.Devices\n#\t for i in devices:\n#\t \tvalue \u003d status_decoded.get(i)\n#\t \tif value \u003d\u003d None:\n#\t \t\tvalues.append(5)\n#\t \telse:\n#\t \t\tvalues.append(value)\n#\t zipped_list \u003d zip(values, devices)\n#\t devices_sorted \u003d [y for x,y in sorted(zipped_list)]\n#\t for i,j in enumerate(devices_sorted):\n#\t try:\n#\t \tself.getChild(\"FlexRepeater\").props.instances[i].tagProps[0] \u003d j\n#\t except:\n#\t \tsystem.perspective.print(i)" + } + } + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Monitron/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Monitron/resource.json new file mode 100644 index 0000000..8cdf80d --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Monitron/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-08-01T07:50:47Z" + }, + "lastModificationSignature": "61c5bd5937b119066022a8e72ca5d633b022c53ee31cc3e30dd2b35d9b3c0be8" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Monitron/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Monitron/thumbnail.png new file mode 100644 index 0000000..b64e1f9 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Monitron/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Monitron/view.json b/com.inductiveautomation.perspective/views/Main-Views/Monitron/view.json new file mode 100644 index 0000000..316cac6 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Monitron/view.json @@ -0,0 +1,55 @@ +{ + "custom": {}, + "params": {}, + "props": {}, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "fontFamily": "Arial", + "fontSize": 22, + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "MONITRON" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Table" + }, + "position": { + "basis": "400px" + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "direct", + "tagPath": "[IEC_SCADA_TAG_PROVIDER]Monitron/monitron_data" + }, + "type": "tag" + } + } + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Notify-Tool/Notify-Main/resource.json b/com.inductiveautomation.perspective/views/Main-Views/Notify-Tool/Notify-Main/resource.json new file mode 100644 index 0000000..4dda3fd --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Notify-Tool/Notify-Main/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-05-08T10:40:03Z" + }, + "lastModificationSignature": "aa710aa50c18ffc59aa435beb8c5f043919305f38759ea2dfddfe837cfbda6a1" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/Notify-Tool/Notify-Main/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/Notify-Tool/Notify-Main/thumbnail.png new file mode 100644 index 0000000..bc6ead2 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/Notify-Tool/Notify-Main/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/Notify-Tool/Notify-Main/view.json b/com.inductiveautomation.perspective/views/Main-Views/Notify-Tool/Notify-Main/view.json new file mode 100644 index 0000000..143c105 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/Notify-Tool/Notify-Main/view.json @@ -0,0 +1,2890 @@ +{ + "custom": { + "EntriesList": [ + { + "PrimaryKey": "2024-05-08 10:17:51", + "author": "pll", + "body": "Introducing our brand new Announcement Feature! 🎉 Stay in the loop with important updates, new features, planned downtime events, all in one place. Never miss out again! Check it out now and stay tuned for the latest updates. 🔊", + "childproj": "https://eu-preprod.scada2.rme.amazon.dev: MAN2", + "expire": "2024-05-09 05:00:00", + "link1": "https://", + "link1title": "", + "link2": "https://", + "link2title": "", + "priority": "Healthy", + "publish": "2024-05-08 10:08:33", + "title": "📢 Exciting News! 📢", + "whids": "" + } + ], + "PreviewJSON": [ + { + "author": "cojonas", + "body": "", + "childproj": "https://eu-development.scada2.rme.amazon.dev:", + "expire": "2024-05-08 05:00:00", + "link1": "https://", + "link1title": "", + "link2": "https://", + "link2title": "", + "publish": "2024-04-26 07:07:32", + "title": "" + } + ], + "TableSelection": null, + "activityLogger": { + "alt_pageid": "notifyTool", + "start_time": { + "$": [ + "ts", + 192, + 1715164768393 + ], + "$ts": 1715164768393 + } + }, + "body": "", + "entryCount": 0, + "expire": "2024-05-09 05:00:00", + "fileName": "Notifications_as of 2024-4-8_10_40_3.xlsx", + "link1": "https://", + "link1title": "", + "link2": "https://", + "link2title": "", + "priority": "Healthy", + "publish": "2024-05-08 10:39:28", + "title": "", + "whids": "" + }, + "events": { + "system": { + "onShutdown": { + "config": { + "script": "\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)" + }, + "scope": "G", + "type": "script" + }, + "onStartup": { + "config": { + "script": "\t\t\n\tfrom datetime import datetime, timedelta\n\t\n\tself.custom.activityLogger.start_time \u003d system.date.now()\n\t\n\tsystem.perspective.sendMessage(\u0027refreshNotifyIcon\u0027)\n\tsystem.perspective.sendMessage(\u0027refreshNotifyTable\u0027)\n\tdt \u003d datetime.today()\n\tself.getChild(\"root\").getChild(\"FlexContainer\").getChild(\"FlexContainer_Left\").getChild(\"FlexContainer\").getChild(\"Publish-DateTimeInput\").props.value \u003d dt\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": {}, + "propConfig": { + "custom.EntriesList": { + "persistent": true + }, + "custom.PreviewJSON": { + "persistent": true + }, + "custom.TableSelection": { + "binding": { + "config": { + "path": "/root/FlexContainer_4/FlexContainer/Table.props.selection.data[0]" + }, + "type": "property" + }, + "persistent": true + }, + "custom.activityLogger": { + "persistent": true + }, + "custom.activityLogger.pageid": { + "binding": { + "config": { + "path": "page.props.path" + }, + "transforms": [ + { + "code": " if value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n return self.custom.activityLogger.alt_pageid.lower()\n else:\n return value[1:].lower()\n\treturn value", + "type": "script" + } + ], + "type": "property" + } + }, + "custom.body": { + "binding": { + "config": { + "path": "/root/FlexContainer/FlexContainer_Middle/FlexContainer_0/Body-TextArea.props.text" + }, + "type": "property" + }, + "persistent": true + }, + "custom.entryCount": { + "persistent": true + }, + "custom.expire": { + "binding": { + "config": { + "path": "/root/FlexContainer/FlexContainer_Left/FlexContainer_0/Expire-DateTimeInput.props.formattedValue" + }, + "type": "property" + }, + "persistent": true + }, + "custom.fileName": { + "binding": { + "config": { + "expression": "\r\n\u0027Notifications_as of \u0027\r\n+ dateExtract(now(),\u0027year\u0027) +\u0027-\u0027\r\n+ dateExtract(now(),\u0027month\u0027) +\u0027-\u0027\r\n+ dateExtract(now(),\u0027day\u0027) +\u0027_\u0027\r\n+ dateExtract(now(),\u0027hour\u0027) +\u0027_\u0027\r\n+ dateExtract(now(),\u0027minute\u0027) +\u0027_\u0027\r\n+ dateExtract(now(),\u0027second\u0027)+\u0027.xlsx\u0027" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.link1": { + "binding": { + "config": { + "path": "/root/FlexContainer/FlexContainer_Right/FlexContainer/FlexContainer_2/FlexContainer/URL1-TextField.props.text" + }, + "transforms": [ + { + "code": "#\tif len(value) \u003e0:\n\tif \u0027http://\u0027 not in value and \u0027https://\u0027 not in value:\n\t\tvalue \u003d \u0027https://\u0027+value\n\n\t\treturn value\n\telse:\n\t\treturn value", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.link1title": { + "binding": { + "config": { + "path": "/root/FlexContainer/FlexContainer_Right/FlexContainer/FlexContainer_2/FlexContainer_0/URL1-NameTextField.props.text" + }, + "type": "property" + }, + "persistent": true + }, + "custom.link2": { + "binding": { + "config": { + "path": "/root/FlexContainer/FlexContainer_Right/FlexContainer/FlexContainer_3/FlexContainer/URL2-TextField.props.text" + }, + "transforms": [ + { + "code": "#\tif len(value) \u003e0:\n\tif \u0027http://\u0027 not in value and \u0027https://\u0027 not in value:\n\t\tvalue \u003d \u0027https://\u0027+value\n\n\t\treturn value\n\telse:\n\t\treturn value", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.link2title": { + "binding": { + "config": { + "path": "/root/FlexContainer/FlexContainer_Right/FlexContainer/FlexContainer_3/FlexContainer_0/URL2-NameTextField.props.text" + }, + "transforms": [ + { + "code": "#\tif len(value) \u003e0:\n\treturn value", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "/root/FlexContainer/FlexContainer_Left/FlexContainer_2/Dropdown.props.value" + }, + "type": "property" + }, + "persistent": true + }, + "custom.publish": { + "binding": { + "config": { + "path": "/root/FlexContainer/FlexContainer_Left/FlexContainer/Publish-DateTimeInput.props.formattedValue" + }, + "type": "property" + }, + "persistent": true + }, + "custom.title": { + "binding": { + "config": { + "path": "/root/FlexContainer/FlexContainer_Middle/FlexContainer/Title-TextField.props.text" + }, + "type": "property" + }, + "persistent": true + }, + "custom.whids": { + "binding": { + "config": { + "path": "/root/FlexContainer/FlexContainer_Left/FlexContainer_1/WHID-TextArea.props.text" + }, + "type": "property" + }, + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "108px" + }, + "props": { + "text": "Publish Date", + "textStyle": { + "paddingLeft": 5 + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Publish-DateTimeInput", + "tooltip": { + "enabled": true, + "location": "top-left", + "sustain": 2000 + } + }, + "position": { + "basis": "170px", + "grow": 1 + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "path": "this.props.minDate" + }, + "transforms": [ + { + "code": "\t\n\tmsg \u003d \u0027Time is UTC. Minimum publish date is \u0027 +str(value)\n\t\n\treturn msg", + "type": "script" + } + ], + "type": "property" + } + }, + "props.minDate": { + "binding": { + "config": { + "expression": "midnight(addDays(now(),-1))" + }, + "type": "expr" + } + } + }, + "props": { + "format": "YYYY-MM-DD hh:mm:ss", + "formattedValue": "2024-05-08 10:39:28", + "value": { + "$": [ + "ts", + 192, + 1715164768393 + ], + "$ts": 1715164768393 + } + }, + "type": "ia.input.date-time-input" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "40px" + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderStyle": "solid", + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "borderWidth": 1, + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "108px" + }, + "props": { + "text": "Expire Date", + "textStyle": { + "paddingLeft": 5 + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Expire-DateTimeInput", + "tooltip": { + "enabled": true, + "location": "top-left", + "sustain": 2000 + } + }, + "position": { + "basis": "170px", + "grow": 1 + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "path": ".../FlexContainer/Publish-DateTimeInput.props.value" + }, + "transforms": [ + { + "code": "\t\n\tmsg \u003d \u0027Time is UTC. Minimum expire date is \u0027 +str(value)\n\t\n\treturn msg", + "type": "script" + } + ], + "type": "property" + } + }, + "props.minDate": { + "binding": { + "config": { + "path": ".../FlexContainer/Publish-DateTimeInput.props.value" + }, + "transforms": [ + { + "code": "\tfrom datetime import datetime, timedelta\n\tdt \u003d datetime.today()\n\t\n\treturn dt", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "format": "YYYY-MM-DD hh:mm:ss", + "formattedValue": "2024-05-09 05:00:00", + "value": { + "$": [ + "ts", + 0, + 1714766194471 + ], + "$ts": 1715274000000 + } + }, + "type": "ia.input.date-time-input" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "40px" + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderStyle": "solid", + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "borderWidth": 1, + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "TextArea" + }, + "position": { + "basis": "308px", + "display": false + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "session.props.auth.user.roles" + }, + "type": "property" + } + } + }, + "type": "ia.input.text-area" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "152px" + }, + "props": { + "text": "WHID\u0027s", + "textStyle": { + "paddingLeft": 5 + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "WHID-TextArea", + "tooltip": { + "enabled": true, + "location": "top-left", + "sustain": 2000, + "text": "Enter WHID\u0027s for WHID specific notifications, blank for all WHID\u0027s" + } + }, + "position": { + "basis": "240px" + }, + "type": "ia.input.text-area" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "40px" + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderStyle": "solid", + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "borderWidth": 1, + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "152px" + }, + "props": { + "text": "Priority", + "textStyle": { + "paddingLeft": 5 + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "256px" + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": "session.custom.colours.colour_impaired" + }, + "transforms": [ + { + "code": "\n\theaders \u003d [\u0027Priority\u0027] \n\tstates \u003d [[\u0027Healthy\u0027],[\u0027Diagnostic\u0027], [\u0027Low\u0027], [\u0027Medium\u0027], [\u0027High\u0027]]\n\tdataset \u003d system.dataset.toDataSet(headers, states)\n\t\n\treturn dataset", + "type": "script" + } + ], + "type": "property" + } + }, + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "this.props.value" + }, + "transforms": [ + { + "fallback": "state5", + "inputType": "scalar", + "mappings": [ + { + "input": "Healthy", + "output": "state5" + }, + { + "input": "Diagnostic", + "output": "state4" + }, + { + "input": "Low", + "output": "state3" + }, + { + "input": "Medium", + "output": "state2" + }, + { + "input": "High", + "output": "state1" + } + ], + "outputType": "scalar", + "type": "map" + }, + { + "code": "\tprefix \u003d self.session.custom.colours[value]\n\treturn prefix", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "fontWeight": "bold" + }, + "value": "Healthy" + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "FlexContainer_2" + }, + "position": { + "basis": "40px" + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderStyle": "solid", + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "borderWidth": 1, + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_Left" + }, + "position": { + "basis": "300px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "97px" + }, + "props": { + "text": "Title", + "textStyle": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Title-TextField", + "tooltip": { + "enabled": true, + "location": "top-left", + "sustain": 2000 + } + }, + "position": { + "basis": "150px", + "grow": 1 + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "code": "\ttooltip \u003d \u0027Required Field, Character count: \u0027 + str(len(value))\n\t\n\treturn tooltip", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "placeholder": "Enter Title" + }, + "type": "ia.input.text-field" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "40px" + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderStyle": "solid", + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "borderWidth": 1, + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "97px" + }, + "props": { + "text": "Body", + "textStyle": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Body-TextArea", + "tooltip": { + "enabled": true, + "location": "top-left", + "sustain": 2000 + } + }, + "position": { + "basis": "240px", + "grow": 1 + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "code": "\ttooltip \u003d \u0027Required Field, Character count: \u0027 + str(len(value))\n\t\n\treturn tooltip", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "placeholder": "Enter Notification Text", + "rejectUpdatesWhileFocused": false, + "resize": "vertical", + "wrap": "hard" + }, + "type": "ia.input.text-area" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "143px" + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderStyle": "solid", + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "borderWidth": 1, + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "custom": { + "PreviewJSON": "value" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tmsg \u003d {\u0027instances\u0027:[{\u0027title\u0027:self.view.custom.title, \n\t\t\u0027body\u0027:self.view.custom.body,\n\t\t\u0027publish\u0027:str(self.view.custom.publish)[:19],\n\t\t\u0027expire\u0027:str(self.view.custom.expire)[:19],\n\t\t\u0027link1\u0027:self.view.custom.link1,\n\t\t\u0027link1title\u0027:self.view.custom.link1title,\n\t\t\u0027link2\u0027:self.view.custom.link2,\n\t\t\u0027link2title\u0027:self.view.custom.link2title,\n\t\t\u0027author\u0027:self.session.props.auth.user.userName,\n\t\t\u0027priority\u0027:self.view.custom.priority,\n\t\t\u0027childproj\u0027:self.session.props.gateway.address}],\n\t\t\u0027entryCount\u0027:1}\n#\tself.view.custom.PreviewJSON \u003d value\n\n\tsystem.perspective.openPopup(\u0027jKEJ8tuj34\u0027,\u0027PopUp-Views/Notify-Tool/Notify-Popup\u0027,params\u003dmsg, modal\u003dTrue, resizable\u003dTrue, overlayDismiss\u003dTrue, title\u003d\u0027Notification Preview\u0027)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Preview-Button" + }, + "position": { + "basis": "115px" + }, + "props": { + "image": { + "icon": { + "path": "material/preview" + } + }, + "style": { + "backgroundColor": "#555555", + "classes": "Background-Styles/Controller", + "marginBottom": 5, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 5 + }, + "text": "Preview" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tfrom datetime import datetime\n\timport time\n\tfields \u003d [self.view.custom.body,\n\t\t\t\tself.view.custom.title, \n\t\t\t\tself.view.custom.publish,\n\t\t\t\tself.view.custom.expire,]\n\t\t\t\t\n\twhids \u003d str(self.view.custom.whids.upper())\t\t\t\n\ttry:\n\t\tif \u0027\u0027 not in fields and None not in fields:\n\t\t\tchidproj \u003d self.session.props.gateway.address +\u0027 \u0027+self.session.custom.fc\n\t\t\tnow \u003d datetime.now()\n\t\t\tnowstr \u003d str(now)[:19]\n\t\t\t\n\t\t\tpayload \u003d {\u0027PrimaryKey\u0027:nowstr,\n\t\t\t\t\u0027title\u0027:self.view.custom.title, \n\t\t\t\t\u0027body\u0027:self.view.custom.body,\n\t\t\t\t\u0027publish\u0027:str(self.view.custom.publish)[:19],\n\t\t\t\t\u0027expire\u0027:str(self.view.custom.expire)[:19],\n\t\t\t\t\u0027link1\u0027:self.view.custom.link1,\n\t\t\t\t\u0027link1title\u0027:self.view.custom.link1title,\n\t\t\t\t\u0027link2\u0027:self.view.custom.link2,\n\t\t\t\t\u0027link2title\u0027:self.view.custom.link2title,\n\t\t\t\t\u0027whids\u0027:whids,\n\t\t\t\t\u0027priority\u0027:self.view.custom.priority,\n\t\t\t\t\u0027author\u0027:(self.session.props.auth.user.userName)[:3],\n\t\t\t\t\u0027childproj\u0027:chidproj}\n\t\t\t\t\n#\t\t\tsystem.perspective.print(payload)\n\t\t\tnotifyTool.WriteToDynamo.DynamoWriter(payload)\n\t\t\tsystem.perspective.sendMessage(\u0027refreshNotifyTable\u0027)\n\t\telse:\n\t\t\t\n\t\t\tmsg\u003d {\u0027body\u0027:\u0027Title, Body, Publish date, and Expire date cannot be blank\u0027}\n\t\t\tsystem.perspective.openPopup(\u0027jKEJ8tuj\u0027,\u0027PopUp-Views/Notify-Tool/Notify-Submit-Popup\u0027,params\u003dmsg, modal\u003dTrue, overlayDismiss\u003dTrue, title \u003d \"Whoops, don\u0027t forget the words\")\n\texcept:\n\t\tpass\n\t\t\n\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Submit-Button" + }, + "position": { + "basis": "115px" + }, + "props": { + "image": { + "icon": { + "path": "material/send" + } + }, + "style": { + "backgroundColor": "#555555", + "classes": "Background-Styles/Controller", + "marginBottom": 5, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 5 + }, + "text": "Submit" + }, + "type": "ia.input.button" + }, + { + "custom": { + "PreviewJSON": "value" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tclear \u003d \u0027\u0027\n\tself.parent.parent.getChild(\"FlexContainer\").getChild(\"Title-TextField\").props.text \u003d clear\n\tself.parent.parent.getChild(\"FlexContainer_0\").getChild(\"Body-TextArea\").props.text \u003d clear\n\tself.parent.parent.parent.getChild(\"FlexContainer_Right\").getChild(\"FlexContainer\").getChild(\"FlexContainer_2\").getChild(\"FlexContainer\").getChild(\"URL1-TextField\").props.text \u003d clear\n\tself.parent.parent.parent.getChild(\"FlexContainer_Right\").getChild(\"FlexContainer\").getChild(\"FlexContainer_2\").getChild(\"FlexContainer_0\").getChild(\"URL1-NameTextField\").props.text \u003d clear\n\tself.parent.parent.parent.getChild(\"FlexContainer_Right\").getChild(\"FlexContainer\").getChild(\"FlexContainer_3\").getChild(\"FlexContainer\").getChild(\"URL2-TextField\").props.text \u003d clear\n\tself.parent.parent.parent.getChild(\"FlexContainer_Right\").getChild(\"FlexContainer\").getChild(\"FlexContainer_3\").getChild(\"FlexContainer_0\").getChild(\"URL2-NameTextField\").props.text \u003d clear\n\tself.parent.parent.parent.getChild(\"FlexContainer_Left\").getChild(\"FlexContainer_1\").getChild(\"WHID-TextArea\").props.text \u003d clear\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Preview-Button_0" + }, + "position": { + "basis": "115px" + }, + "props": { + "image": { + "icon": { + "path": "material/format_clear" + } + }, + "style": { + "backgroundColor": "#555555", + "classes": "Background-Styles/Controller", + "marginBottom": 5, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 5 + }, + "text": "Clear" + }, + "type": "ia.input.button" + }, + { + "custom": { + "PreviewJSON": "value" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\trow \u003d self.parent.parent.parent.parent.getChild(\"FlexContainer_4\").getChild(\"FlexContainer\").getChild(\"Table\").props.selection.data[0]\n\t\t\n\tself.parent.parent.getChild(\"FlexContainer\").getChild(\"Title-TextField\").props.text \u003d row[\u0027title\u0027]\n\tself.parent.parent.getChild(\"FlexContainer_0\").getChild(\"Body-TextArea\").props.text \u003d row[\u0027body\u0027]\n\tself.parent.parent.parent.getChild(\"FlexContainer_Right\").getChild(\"FlexContainer\").getChild(\"FlexContainer_2\").getChild(\"FlexContainer\").getChild(\"URL1-TextField\").props.text \u003d row[\u0027link1\u0027]\n\tself.parent.parent.parent.getChild(\"FlexContainer_Right\").getChild(\"FlexContainer\").getChild(\"FlexContainer_2\").getChild(\"FlexContainer_0\").getChild(\"URL1-NameTextField\").props.text \u003d row[\u0027link1title\u0027]\n\tself.parent.parent.parent.getChild(\"FlexContainer_Right\").getChild(\"FlexContainer\").getChild(\"FlexContainer_3\").getChild(\"FlexContainer\").getChild(\"URL2-TextField\").props.text \u003d row[\u0027link2\u0027]\n\tself.parent.parent.parent.getChild(\"FlexContainer_Right\").getChild(\"FlexContainer\").getChild(\"FlexContainer_3\").getChild(\"FlexContainer_0\").getChild(\"URL2-NameTextField\").props.text \u003d row[\u0027link2title\u0027]\n\tself.parent.parent.parent.getChild(\"FlexContainer_Left\").getChild(\"FlexContainer_1\").getChild(\"WHID-TextArea\").props.text \u003d row[\u0027whids\u0027]\n\tself.parent.parent.parent.getChild(\"FlexContainer_Left\").getChild(\"FlexContainer_2\").getChild(\"Dropdown\").props.value \u003d row[\u0027priority\u0027]" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Populate-Button" + }, + "position": { + "basis": "115px" + }, + "props": { + "image": { + "icon": { + "path": "material/upgrade" + } + }, + "style": { + "backgroundColor": "#555555", + "classes": "Background-Styles/Controller", + "marginBottom": 5, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 5 + }, + "text": "Populate" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "40px" + }, + "props": { + "justify": "space-evenly" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_Middle" + }, + "position": { + "basis": "900px" + }, + "props": { + "direction": "column", + "style": { + "borderBottomLeftRadius": 10, + "borderBottomRightRadius": 10, + "borderTopLeftRadius": 10, + "borderTopRightRadius": 10 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "URL1-Label" + }, + "position": { + "basis": "110px" + }, + "props": { + "text": "Link 1", + "textStyle": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "URL1-TextField" + }, + "position": { + "basis": "150px", + "grow": 1 + }, + "props": { + "placeholder": "Enter Link 1" + }, + "type": "ia.input.text-field" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "200px" + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "borderWidth": 1, + "marginBottom": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "URL1-NameLabel" + }, + "position": { + "basis": "110px" + }, + "props": { + "style": { + "paddingLeft": 5, + "paddingRight": 5 + }, + "text": "Link 1 Name" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "URL1-NameTextField" + }, + "position": { + "basis": "150px", + "grow": 1 + }, + "props": { + "placeholder": "Enter Link 1 Title" + }, + "type": "ia.input.text-field" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "200px" + }, + "props": { + "style": { + "marginBottom": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_2" + }, + "position": { + "basis": "92px" + }, + "props": { + "direction": "column", + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderStyle": "solid", + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "borderWidth": 1, + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "URL2-Label" + }, + "position": { + "basis": "110px" + }, + "props": { + "text": "Link 2", + "textStyle": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "URL2-TextField" + }, + "position": { + "basis": "150px", + "grow": 1 + }, + "props": { + "placeholder": "Enter Link 2" + }, + "type": "ia.input.text-field" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "200px" + }, + "props": { + "style": { + "marginBottom": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "URL2-NameLabel" + }, + "position": { + "basis": "110px" + }, + "props": { + "style": { + "paddingLeft": 5, + "paddingRight": 5 + }, + "text": "Link 2 Name" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "URL2-NameTextField" + }, + "position": { + "basis": "150px", + "grow": 1 + }, + "props": { + "placeholder": "Enter Link 2 Title" + }, + "type": "ia.input.text-field" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "200px" + }, + "props": { + "style": { + "marginBottom": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_3" + }, + "position": { + "basis": "92px" + }, + "props": { + "direction": "column", + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderStyle": "solid", + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "borderWidth": 1, + "classes": "Buttons/Button-Menu", + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_Right" + }, + "position": { + "basis": "300px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "800px" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "170px" + }, + "props": { + "style": { + "textAlign": "center" + }, + "text": "Notification Entries" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "40px", + "grow": 1 + }, + "props": { + "justify": "space-around", + "style": { + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.container.flex" + }, + { + "custom": { + "entries": [ + { + "PrimaryKey": "2024-05-08 10:17:51", + "author": "pll", + "body": "Introducing our brand new Announcement Feature! 🎉 Stay in the loop with important updates, new features, planned downtime events, all in one place. Never miss out again! Check it out now and stay tuned for the latest updates. 🔊", + "childproj": "https://eu-preprod.scada2.rme.amazon.dev: MAN2", + "expire": "2024-05-09 05:00:00", + "link1": "https://", + "link1title": "", + "link2": "https://", + "link2title": "", + "priority": "Healthy", + "publish": "2024-05-08 10:08:33", + "title": "📢 Exciting News! 📢", + "whids": "" + } + ], + "entryCount": 1, + "highestPriority": 5 + }, + "events": { + "dom": { + "onClick": { + "config": { + "draggable": true, + "id": "ioNP2CXn", + "modal": true, + "overlayDismiss": true, + "resizable": true, + "showCloseIcon": true, + "title": "Notifications", + "type": "open", + "viewParams": { + "entryCount": "{/root/FlexContainer_4/FlexContainer/FlexContainer_4/Icon.custom.entryCount}", + "instances": "{/root/FlexContainer_4/FlexContainer/FlexContainer_4/Icon.custom.entries}" + }, + "viewPath": "PopUp-Views/Notify-Tool/Notify-Popup", + "viewportBound": false + }, + "scope": "C", + "type": "popup" + } + } + }, + "meta": { + "name": "Icon", + "tooltip": { + "enabled": true, + "location": "bottom-right", + "style": { + "whiteSpace": "pre" + }, + "text": "📢 Exciting News! 📢\n" + } + }, + "position": { + "basis": "30px" + }, + "propConfig": { + "custom.refreshMSG": { + "binding": { + "config": { + "expression": "now(90000)\r\n// Update property value every 90 seconds, firing change script" + }, + "type": "expr" + }, + "onChange": { + "enabled": null, + "script": "\tsystem.perspective.sendMessage(\u0027refreshNotifyIcon\u0027)\n\tsystem.perspective.sendMessage(\u0027refreshNotifyTable\u0027)" + } + }, + "position.display": { + "binding": { + "config": { + "path": "view.custom.EntriesList" + }, + "transforms": [ + { + "code": "\tfrom datetime import datetime\n\t\n#\tRead entries from dynamo table\n\treturns \u003d notifyTool.ReadFromDynamo.DynamoReader()\n\tEntriesList \u003d returns[\u0027Items\u0027]\n\t\n\tEntriesList.reverse()\n\n\n#\tCreate empty list and now string\n\tpublishdates \u003d []\n\tnow \u003d datetime.now()\n\tnowstr \u003d str(now)[:19]\n\tactiveNotify \u003d False\n\twhid \u003d self.session.custom.fc\n\tstates \u003d {\u0027Healthy\u0027:5,\u0027Diagnostic\u0027:4, \u0027Low\u0027:3, \u0027Medium\u0027:2, \u0027High\u0027:1}\n\n\tactiveEntries \u003d []\n\ttooltip \u003d []\n\tcount \u003d 0\n\thighestPriority \u003d 5\n\tfor e in EntriesList:\n\t\t\n\t\tif len(e[\u0027whids\u0027])\u003e0:\t\t\t\t# Check for WHID in whid field\n\t\t\tif whid in e[\u0027whids\u0027]:\t\t\t# Check for WHID match in whid field\n\t\t\t\t#\tCheck EntriesList for active entries based on publish and expire times\n\t\t\t\tif nowstr \u003e\u003d e[\u0027publish\u0027] and nowstr\u003c\u003dstr( e[\u0027expire\u0027]):\n\t\t\t\t\tactiveEntries.append(e)\n\t\t\t\t\ttooltip.append(e[\u0027title\u0027])\n\t\t\t\t\tactiveNotify \u003d True\n\t\t\t\t\tcount +\u003d1\n\t\t\t\t\tif states[e[\u0027priority\u0027]] \u003c highestPriority:\n\t\t\t\t\t\thighestPriority \u003d states[e[\u0027priority\u0027]]\n\t\telse:\n\t\t\tif nowstr \u003e\u003d e[\u0027publish\u0027] and nowstr\u003c\u003dstr( e[\u0027expire\u0027]):\n\t\t\t\tactiveEntries.append(e)\n\t\t\t\ttooltip.append(e[\u0027title\u0027])\n\t\t\t\tactiveNotify \u003d True\t\t\n\t\t\t\tcount +\u003d1\t\n\t\t\t\tif states[e[\u0027priority\u0027]] \u003c highestPriority:\n\t\t\t\t\thighestPriority \u003d states[e[\u0027priority\u0027]]\n\n\ttooltiptext \u003d \u0027\u0027\n\tfor i in tooltip:\n\t\ttooltiptext+\u003d i+\u0027\\n\u0027\n\t\t\n\tself.custom.entries \u003d activeEntries\n\tself.custom.highestPriority \u003d highestPriority\n\tself.custom.entryCount \u003d count\n\tself.meta.tooltip.text \u003d tooltiptext\t\n\n\treturn activeNotify", + "type": "script" + } + ], + "type": "property" + } + }, + "props.color": { + "binding": { + "config": { + "path": "this.custom.highestPriority" + }, + "transforms": [ + { + "fallback": "state5", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "state1" + }, + { + "input": 2, + "output": "state2" + }, + { + "input": 3, + "output": "state3" + }, + { + "input": 4, + "output": "state4" + }, + { + "input": 5, + "output": "state5" + } + ], + "outputType": "scalar", + "type": "map" + }, + { + "code": "\ttest \u003d self.session.custom.colours.colour_impaired\n\tstatecolor \u003d self.session.custom.colours[value]\n\treturn statecolor", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "path": "material/campaign", + "style": { + "marginLeft": 5, + "marginRight": 5 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "refreshNotifyIcon", + "pageScope": true, + "script": "\tself.refreshBinding(\u0027position.display\u0027)\n\tself.refreshBinding(\u0027props.color\u0027)\n", + "sessionScope": true, + "viewScope": false + } + ] + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "130px" + }, + "props": { + "style": { + "textAlign": "center" + }, + "text": "Icon Preview" + }, + "type": "ia.display.label" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tjsonFile \u003d self.parent.parent.getChild(\"Table\").props.data\n\theaders \u003d list(set(jsonFile[0].keys()))\n\t\n\trowdata \u003d []\n\tfor r in jsonFile:\n\t\trow \u003d []\n\t\tfor k in headers:\n\t\t\trow.append(r[k])\n\t\trowdata.append(row)\n\t\n\tdataset \u003d system.dataset.toDataSet(headers, rowdata)\n\tdatasetexcel \u003d system.dataset.toExcel(True, [dataset])\n\t\n\tfilename \u003d self.view.custom.fileName\n\tsystem.perspective.download(filename, datasetexcel)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Retrieve_Test_0", + "tooltip": { + "enabled": true, + "text": "Download Table as Excel" + } + }, + "position": { + "basis": "115px" + }, + "props": { + "image": { + "icon": { + "path": "material/cloud_download" + } + }, + "style": { + "backgroundColor": "#555555", + "classes": "Background-Styles/Controller", + "marginBottom": 5, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 5 + }, + "text": "Download" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\ttry:\n\t\treturns \u003d notifyTool.ReadFromDynamo.DynamoReader()\n\t\tself.view.custom.EntriesList \u003d returns[\u0027Items\u0027]\n\n\texcept:\n\t\tsystem.perspective.print(\u0027Error manual refreshing from Dynamo Table\u0027)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Retrieve_Test", + "tooltip": { + "enabled": true, + "text": "Manual Refresh of Table" + } + }, + "position": { + "basis": "115px" + }, + "props": { + "image": { + "icon": { + "path": "material/get_app" + } + }, + "style": { + "backgroundColor": "#555555", + "classes": "Background-Styles/Controller", + "marginBottom": 5, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 5 + }, + "text": "Refresh" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t\n\tPK \u003d self.view.custom.TableSelection[\u0027PrimaryKey\u0027]\n\tPub \u003d self.view.custom.TableSelection[\u0027publish\u0027]\n\n\treturns \u003d notifyTool.DeleteFromDynamo.DynamoDeleter(PrimaryKey\u003dPK,publish\u003dPub)\n\tsystem.perspective.sendMessage(\u0027refreshNotifyTable\u0027)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Delete-Button", + "tooltip": { + "enabled": true, + "text": "Permanently Delete selected entry" + } + }, + "position": { + "basis": "115px" + }, + "props": { + "image": { + "icon": { + "path": "material/delete_forever" + } + }, + "style": { + "backgroundColor": "#555555", + "classes": "Background-Styles/Controller", + "marginBottom": 5, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 5 + }, + "text": "Delete" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer_4" + }, + "position": { + "basis": "40px" + }, + "props": { + "justify": "flex-end" + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Table" + }, + "position": { + "basis": "400px", + "grow": 1 + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "path": "view.custom.EntriesList" + }, + "type": "property" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "priority", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Priority" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 60 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "PrimaryKey", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Submit Date" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "descending", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 85 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "publish", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Publish Date" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "ascending", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 85 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "expire", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Expire Date" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 85 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "title", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Title" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "Body" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "body", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Body" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 450 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "author", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Author" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 80 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "link1title", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Link 1 Title" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 140 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "link1", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Link 1" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "link2title", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Link 2 Title" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 140 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "link2", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Link 2" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "overflowWrap": "break-word" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": "falseq", + "field": "childproj", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Published from:" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "overflowWrap": "break-word" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "whids", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "WHID Specific" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "rows": { + "style": { + "marginBottom": 2.5, + "marginTop": 2.5, + "overflowWrap": "break-word" + } + }, + "sortOrder": [ + "PrimaryKey", + "publish" + ], + "style": { + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "refreshNotifyTable", + "pageScope": true, + "script": "\ttry:\n\t\treturns \u003d notifyTool.ReadFromDynamo.DynamoReader()\n\t\tself.view.custom.EntriesList \u003d returns[\u0027Items\u0027]\n\t\tself.refreshBinding(\u0027props.data\u0027)\n\t\t# implement your handler here\n\texcept:\n\t\tsystem.perspective.print(\u0027Error updating Notification Table\u0027)", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_4" + }, + "position": { + "basis": "1300px", + "grow": 1 + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "path": "session.props.auth.user.roles" + }, + "transforms": [ + { + "code": "\n\troles \u003d [\u0027Authenticated/Roles/eurme-ignition-admins\u0027]\n\tauth \u003d system.perspective.isAuthorized(False, securityLevels\u003droles)\n\treturn auth", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "direction": "column", + "style": { + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/OilMonitoring/resource.json b/com.inductiveautomation.perspective/views/Main-Views/OilMonitoring/resource.json new file mode 100644 index 0000000..ad2aa8c --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/OilMonitoring/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-08-01T07:50:50Z" + }, + "lastModificationSignature": "aa458112aea94477b10f64a8c4d68192312975c5ace962c447a7198f757b5fa8" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/OilMonitoring/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/OilMonitoring/thumbnail.png new file mode 100644 index 0000000..235ed32 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/OilMonitoring/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/OilMonitoring/view.json b/com.inductiveautomation.perspective/views/Main-Views/OilMonitoring/view.json new file mode 100644 index 0000000..05d8d29 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/OilMonitoring/view.json @@ -0,0 +1,55 @@ +{ + "custom": {}, + "params": {}, + "props": {}, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "fontFamily": "Arial", + "fontSize": 22, + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "OIL MONITORING" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Table" + }, + "position": { + "basis": "400px" + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "direct", + "tagPath": "[IEC_SCADA_TAG_PROVIDER]Oil/oil_condition_monitoring" + }, + "type": "tag" + } + } + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/S3/manage/resource.json b/com.inductiveautomation.perspective/views/Main-Views/S3/manage/resource.json new file mode 100644 index 0000000..feb6e50 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/S3/manage/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-25T17:46:20Z" + }, + "lastModificationSignature": "104f1e64bd0aa3c09ffd1da39720b98eb0e0afed40fd3b19129f05d8def1b15b" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/S3/manage/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/S3/manage/thumbnail.png new file mode 100644 index 0000000..f91e7a5 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/S3/manage/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/S3/manage/view.json b/com.inductiveautomation.perspective/views/Main-Views/S3/manage/view.json new file mode 100644 index 0000000..e35b3d6 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/S3/manage/view.json @@ -0,0 +1,918 @@ +{ + "custom": { + "api_region_name": "eu", + "api_stage": "prod", + "enable_site_selection": true, + "help_url": "https://w.amazon.com/bin/view/EURME/MAP/Projects/Amazon_SCADA/Expanding_BU_and_New_Regions_SCADA/AMZL/DeveloperGuide/#H7.1SCADAFileManagementUtility", + "image_file_container_basis": "50%", + "image_file_content_shown": true, + "image_file_prefix": "SCADA//images/", + "image_file_suffix": ".svg", + "instances_file_prefix": "SCADA/EWR4/instance_configs/", + "loading": false, + "migrate_enabled": false, + "selected_image": null, + "selected_whid": "", + "site_folder": "SCADA//", + "site_image_list": [], + "site_source_list": [], + "source_file_container_basis": "50%", + "source_file_content_shown": true, + "source_file_prefix": "SCADA//source/", + "source_file_suffix": ".drawio", + "stage_config": { + "account_id": "006306898152", + "api_call_role": "arn:aws:iam::609617486056:role/RMESDScadaS3ManagementAPIcallRole-prod-eu-west-1", + "endpoint": "https://eu-west-1.scada-s3-management.scada.eurme.amazon.dev/", + "lambda_name": "RMESDScadaS3ManagementFlaskLambda-prod", + "region": "eu-west-1", + "repo_bucket": "ignition-image-repo", + "s3_region": "eu-west-1", + "source_bucket": "ignition-image-source" + }, + "title_text": "S3 File Management", + "upload_enabled": true, + "user_roles": [ + "rme-ctrl-map-all", + "rme-ctrl-all", + "rme-grt-all", + "na-rme-all", + "watrmecomms-l4-l8-bb-all", + "eurme-ignition-developers", + "eurme-ignition-admins", + "eurme-ignition-managers", + "eurme-ignition-users", + "maplab-rme-all", + "eurme-ignition-ae-india" + ], + "whid": "" + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tselected_image \u003d self.params.selected_image\n\tself.custom.selected_image \u003d selected_image\n\tselected_site \u003d self.params.selected_site\n\tif not selected_site:\n\t\tselected_site \u003d self.custom.whid\n\tself.custom.selected_whid \u003d selected_site" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "selected_image": null, + "selected_site": null + }, + "propConfig": { + "custom.api_region_name": { + "binding": { + "config": { + "path": "session.custom.aws.prefix" + }, + "type": "property" + }, + "persistent": true + }, + "custom.api_stage": { + "persistent": true + }, + "custom.enable_site_selection": { + "binding": { + "config": { + "expression": "isAuthorized(false, \u0027Authenticated/Roles/eurme-ignition-developers\u0027)" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.help_url": { + "persistent": true + }, + "custom.image_file_container_basis": { + "binding": { + "config": { + "expression": "if(!{view.custom.image_file_content_shown},\u0027auto\u0027,\r\n\tif({view.custom.source_file_content_shown},\u002750%\u0027,\u0027100%\u0027))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.image_file_content_shown": { + "binding": { + "config": { + "path": "/root/FlexContainer File Configs/Image File Config.props.params.content_shown" + }, + "type": "property" + }, + "persistent": true + }, + "custom.image_file_prefix": { + "binding": { + "config": { + "expression": "{view.custom.site_folder}+\u0027images/\u0027" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.image_file_suffix": { + "persistent": true + }, + "custom.loading": { + "persistent": true + }, + "custom.migrate_enabled": { + "binding": { + "config": { + "expression": "{view.custom.flow_view_edit_mode.reviewer_enabled}\r\n\u0026\u0026!isNull({view.custom.stage_source})\r\n\u0026\u0026len({view.custom.stage_source})\r\n\u0026\u0026!isNull({view.custom.stage_destination})\r\n\u0026\u0026len({view.custom.stage_destination})" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.selected_image": { + "persistent": true + }, + "custom.selected_whid": { + "onChange": { + "enabled": null, + "script": "\t# DEVNOTE: During peer review, noticed that when files are selected and then \n\t# the whid is changed, that a loop of file updates can be triggered\n\t# therefore, clear the \"selected_image\" custom prop on whid change\n\tself.custom.selected_image \u003d None\n\t" + }, + "persistent": true + }, + "custom.site_folder": { + "binding": { + "config": { + "expression": "stringFormat(\u0027SCADA/%s/\u0027, {view.custom.selected_whid})" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.site_image_list": { + "binding": { + "config": { + "path": "view.custom.selected_whid" + }, + "transforms": [ + { + "code": "\tif not value:\n\t\treturn []\n\tfrom AWS.s3 import S3Manager\n\t\n\tusername \u003d self.session.props.auth.user.userName\n\tapi_region_name \u003d self.custom.api_region_name\n\t\n\ts3m \u003d S3Manager(api_region_name\u003dapi_region_name, username\u003dusername)\n\t\n\tsite \u003d value\n\tbucket \u003d self.custom.stage_config.repo_bucket\n\t\n\treturn s3m.fetch_object_list_by_site_and_bucket(site, bucket)", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.site_source_list": { + "binding": { + "config": { + "path": "view.custom.selected_whid" + }, + "transforms": [ + { + "code": "\tif not value:\n\t\treturn []\n\tfrom AWS.s3 import S3Manager\n\t\n\tusername \u003d self.session.props.auth.user.userName\n\tapi_region_name \u003d self.custom.api_region_name\n\t\n\ts3m \u003d S3Manager(api_region_name\u003dapi_region_name, username\u003dusername)\n\t\n\tsite \u003d value\n\tbucket \u003d self.custom.stage_config.source_bucket\n\t\n\treturn s3m.fetch_object_list_by_site_and_bucket(site, bucket)", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.source_file_container_basis": { + "binding": { + "config": { + "expression": "if(!{view.custom.source_file_content_shown},\u0027auto\u0027,\r\n\tif({view.custom.image_file_content_shown},\u002750%\u0027,\u0027100%\u0027))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.source_file_content_shown": { + "binding": { + "config": { + "path": "/root/FlexContainer File Configs/Source File Config.props.params.content_shown" + }, + "type": "property" + }, + "persistent": true + }, + "custom.source_file_prefix": { + "binding": { + "config": { + "expression": "{view.custom.site_folder}+\u0027source/\u0027" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.source_file_suffix": { + "persistent": true + }, + "custom.stage_config": { + "binding": { + "config": { + "expression": "{view.custom.api_region_name}" + }, + "transforms": [ + { + "code": "\treturn AWS.s3.STAGE_CONFIG[\u0027prod\u0027][value]", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.title_text": { + "persistent": true + }, + "custom.upload_enabled": { + "persistent": true + }, + "custom.user_roles": { + "binding": { + "config": { + "path": "session.props.auth.user.roles" + }, + "type": "property" + }, + "persistent": true + }, + "custom.whid": { + "binding": { + "config": { + "path": "session.custom.fc" + }, + "type": "property" + }, + "persistent": true + }, + "params.selected_image": { + "paramDirection": "input", + "persistent": true + }, + "params.selected_site": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 825, + "width": 1200 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Header" + }, + "position": { + "grow": 1 + }, + "props": { + "style": { + "opacity": "0.73", + "overflow": "auto", + "textShadow": "#AAAAAA 1px 2px 2px" + }, + "text": "S3 SCADA File Management", + "textStyle": { + "fontSize": 30, + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "events": { + "dom": { + "onClick": { + "config": { + "newTab": true, + "url": "{view.custom.help_url}" + }, + "scope": "C", + "type": "nav" + } + } + }, + "meta": { + "name": "Icon", + "tooltip": { + "enabled": true, + "text": "View documentation for this tool" + } + }, + "position": { + "basis": "30px" + }, + "props": { + "path": "material/help_outline", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Header" + }, + "position": { + "basis": "75px", + "shrink": 0 + }, + "props": { + "justify": "center", + "style": { + "classes": "Framework/Card/Title_transparent", + "textTransform": "capitalize" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Folder Config" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.params.params.enables.site": { + "binding": { + "config": { + "path": "view.custom.enable_site_selection" + }, + "type": "property" + } + }, + "props.params.params.image_count": { + "binding": { + "config": { + "expression": "try(len({view.custom.site_image_list}),0)" + }, + "type": "expr" + } + }, + "props.params.params.selected_whid": { + "binding": { + "config": { + "path": "view.custom.selected_whid" + }, + "type": "property" + } + }, + "props.params.params.source_count": { + "binding": { + "config": { + "expression": "try(len({view.custom.site_source_list}),0)" + }, + "type": "expr" + } + } + }, + "props": { + "params": { + "open_expanded": true, + "params": { + "enables": {} + }, + "path": "Objects/Templates/S3/Management/manage", + "show_box_shadow_on_expanded": true, + "title": "Bucket Configuration", + "useDefaultHeight": false, + "useDefaultWidth": false + }, + "path": "Framework/Card/Card_Collapsible_Transparent" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Site Config" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.params.params.enables.site": { + "binding": { + "config": { + "path": "view.custom.enable_site_selection" + }, + "type": "property" + } + }, + "props.params.params.image_count": { + "binding": { + "config": { + "expression": "try(len({view.custom.site_image_list}),0)" + }, + "type": "expr" + } + }, + "props.params.params.selected_whid": { + "binding": { + "config": { + "path": "view.custom.selected_whid" + }, + "type": "property" + } + }, + "props.params.params.source_count": { + "binding": { + "config": { + "expression": "try(len({view.custom.site_source_list}),0)" + }, + "type": "expr" + } + } + }, + "props": { + "params": { + "open_expanded": true, + "params": { + "enables": {} + }, + "path": "Objects/Templates/S3/Management/site", + "show_box_shadow_on_expanded": true, + "title": "Site Configuration", + "useDefaultHeight": false, + "useDefaultWidth": false + }, + "path": "Framework/Card/Card_Collapsible_Transparent" + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer Site" + }, + "position": { + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Image File Config" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.basis": { + "binding": { + "config": { + "path": "view.custom.image_file_container_basis" + }, + "type": "property" + } + }, + "props.params.params.bucket": { + "binding": { + "config": { + "path": "view.custom.stage_config.repo_bucket" + }, + "type": "property" + } + }, + "props.params.params.enables.delete": { + "binding": { + "config": { + "path": "view.custom.upload_enabled" + }, + "type": "property" + } + }, + "props.params.params.enables.upload": { + "binding": { + "config": { + "path": "view.custom.upload_enabled" + }, + "type": "property" + } + }, + "props.params.params.files": { + "binding": { + "config": { + "path": "view.custom.site_image_list" + }, + "type": "property" + } + }, + "props.params.params.prefix": { + "binding": { + "config": { + "path": "view.custom.image_file_prefix" + }, + "type": "property" + } + }, + "props.params.params.selected_file": { + "binding": { + "config": { + "path": "view.custom.selected_image" + }, + "type": "property" + } + }, + "props.params.params.suffix": { + "binding": { + "config": { + "path": "view.custom.image_file_suffix" + }, + "type": "property" + } + }, + "props.params.params.whid": { + "binding": { + "config": { + "path": "view.custom.selected_whid" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "anchor_position": "left", + "content_shown": true, + "open_expanded": true, + "params": { + "enables": { + "download": true, + "file": true, + "object_key": false + }, + "upload_file_types": [ + "svg" + ] + }, + "path": "Objects/Templates/S3/Management/file", + "show_box_shadow_on_expanded": true, + "title": "Image SVG Files", + "useDefaultHeight": false, + "useDefaultWidth": false + }, + "path": "Framework/Card/Card_Collapsible_Transparent_with_Anchor", + "style": { + "overflow": "auto" + } + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Source File Config" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.basis": { + "binding": { + "config": { + "path": "view.custom.source_file_container_basis" + }, + "type": "property" + } + }, + "props.params.params.bucket": { + "binding": { + "config": { + "path": "view.custom.stage_config.source_bucket" + }, + "type": "property" + } + }, + "props.params.params.enables.delete": { + "binding": { + "config": { + "path": "view.custom.upload_enabled" + }, + "type": "property" + } + }, + "props.params.params.enables.upload": { + "binding": { + "config": { + "path": "view.custom.upload_enabled" + }, + "type": "property" + } + }, + "props.params.params.files": { + "binding": { + "config": { + "path": "view.custom.site_source_list" + }, + "type": "property" + } + }, + "props.params.params.prefix": { + "binding": { + "config": { + "path": "view.custom.source_file_prefix" + }, + "type": "property" + } + }, + "props.params.params.selected_file": { + "binding": { + "config": { + "path": "view.custom.selected_image" + }, + "type": "property" + } + }, + "props.params.params.suffix": { + "binding": { + "config": { + "path": "view.custom.source_file_suffix" + }, + "type": "property" + } + }, + "props.params.params.whid": { + "binding": { + "config": { + "path": "view.custom.selected_whid" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "anchor_position": "right", + "content_shown": true, + "open_expanded": true, + "params": { + "enables": { + "download": true, + "file": true, + "object_key": false + }, + "upload_file_types": [ + "drawio" + ] + }, + "path": "Objects/Templates/S3/Management/file", + "show_box_shadow_on_expanded": true, + "title": "Source DRAWIO Files", + "useDefaultHeight": false, + "useDefaultWidth": false + }, + "path": "Framework/Card/Card_Collapsible_Transparent_with_Anchor", + "style": { + "overflow": "auto" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer File Configs" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "space-between" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "newTab": true, + "url": "{view.custom.help_url}" + }, + "scope": "C", + "type": "nav" + } + } + }, + "meta": { + "name": "Button Documentation", + "tooltip": { + "enabled": true, + "location": "bottom", + "text": "View online documentation for this utility" + } + }, + "props": { + "image": { + "icon": { + "path": "material/info" + } + }, + "primary": false, + "style": { + "margin": "4px", + "padding": "4px" + }, + "text": "Documentation" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsite \u003d self.view.params.selected_site\n\tnull \u003d None\n\tquery_params \u003d {\n\t\t\"copy_option\": null,\n\t\t\"destination_view\": null,\n\t\t\"destination_site\": site,\n\t\t\"destination_bucket\": null,\n\t\t\"end_time\": null,\n\t\t\"error_occurred\": null,\n\t\t\"operation\": null,\n\t\t\"source_view\": null,\n\t\t\"source_site\": null,\n\t\t\"source_bucket\": null,\n\t\t\"start_time\": null,\n\t\t\"username\": self.session.props.auth.user.userName\n\t}\n\t# Open audit log viewer\n\tview_path \u003d \u0027PopUp-Views/S3/Audit/Log_Viewer\u0027\n\tparams \u003d {\u0027query_params\u0027: query_params}\n\tsystem.perspective.openPopup(\u0027Audit Log Viewer\u0027, view_path, \n\t\t\t\t\t\t\t\tparams, \u0027SCADA Audit Logs\u0027)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button Audit Log", + "tooltip": { + "enabled": true, + "location": "bottom", + "text": "View SCADA S3 audit logs for current user and site" + } + }, + "props": { + "image": { + "icon": { + "path": "material/table_view" + } + }, + "primary": false, + "style": { + "margin": "4px", + "padding": "4px" + }, + "text": "Audit Logs" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# build out the object key from repo bucket, site, selected view, and suffix\n\tbucket \u003d self.view.custom.stage_config.repo_bucket\n\tsite \u003d self.view.params.selected_site\n\tprefix \u003d self.view.custom.source_file_prefix\n\tview \u003d self.view.params.selected_image\n\tsuffix \u003d self.view.custom.image_file_suffix\n\tobj_key \u003d \u0027%s%s%s\u0027 % (prefix, view, suffix)\n\t# build out query params from local variables\n\tquery_params \u003d {\n\t\t\"view\": view,\n\t\t\"object_key\": obj_key,\n\t\t\"site\": site,\n\t\t\"bucket\": bucket\n\t}\n\t# Open version history log viewer\n\tview_path \u003d \u0027PopUp-Views/S3/Versions/Log_Viewer\u0027\n\tparams \u003d {\u0027query_params\u0027: query_params}\n\tsystem.perspective.openPopup(\u0027Version Log Viewer\u0027, view_path, \n\t\t\t\t\t\t\t\tparams, \u0027SCADA S3 Version History Log Viewer\u0027)\n\t\t\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button Version History", + "tooltip": { + "enabled": true, + "location": "bottom", + "text": "View SCADA S3 version history for currently selected file" + } + }, + "props": { + "image": { + "icon": { + "path": "material/history" + } + }, + "primary": false, + "style": { + "margin": "4px", + "padding": "4px" + }, + "text": "Version History" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer Buttons" + }, + "position": { + "basis": "50px", + "shrink": 0 + }, + "props": { + "justify": "flex-end" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "50px", + "grow": 1, + "shrink": 0 + }, + "props": { + "direction": "column", + "justify": "flex-end" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "scripts": { + "customMethods": [ + { + "name": "show_confirm_dialog", + "params": [], + "script": "\t# ~~ 12 PARAMETERS ~~\n\t\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t\t# show close button\t\t(default \u003d true) boolean\n\t\t# btn text primary\t\t(default \u003d \"Primary\")\n\t\t# btn text secondary\t(default \u003d \"Secondary\")\n\t\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t\n\t\tmsg \u003d \"Update Instance Configuration for MP%s?\" % (self.view.params.instance.viewParams.mhe_id)\n\t\tAlerts.showAlert(\n\t\t\t\"info\", \n\t\t\t\"Update Instance Config?\", \n\t\t\tmsg, \n\t\t\t\"true\",\n\t\t\t\"Continue\", \n\t\t\t\"Cancel\", \n\t\t\t\"chevron_right\", \n\t\t\t\"\", \n\t\t\t\"right\", \n\t\t\t\"confirm_update_instance_config\", \n\t\t\t\"closePopup\", \n\t\t\t\"closePopup\"\n\t\t)\n\t\t" + }, + { + "name": "show_success_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"success\", \n\t\t\"Instance Updated\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"right\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t" + }, + { + "name": "show_warning_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 12 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\n\tAlerts.showAlert(\n\t\t\"warning\", \n\t\t\"Instance Not Updated\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"right\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\"\n\t)\n\t\t" + }, + { + "name": "show_error_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 12 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\n\tAlerts.showAlert(\n\t\t\"error\", \n\t\t\"Instance Update Error!\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"right\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\"\n\t)\n\t\t" + }, + { + "name": "update_bindings", + "params": [], + "script": "\tself.view.custom.loading \u003d False\n\t\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update_selected_whid", + "pageScope": false, + "script": "\t# implement your handler here\n\tself.view.custom.selected_whid \u003d payload.get(\u0027whid\u0027, None)\n", + "sessionScope": true, + "viewScope": true + }, + { + "messageType": "update_selected_image", + "pageScope": false, + "script": "\t# implement your handler here\n\tself.view.custom.selected_image \u003d payload.get(\u0027image\u0027, None)\n\t", + "sessionScope": true, + "viewScope": true + }, + { + "messageType": "update_file_binding", + "pageScope": false, + "script": "\t# update the appropriate binding to fetch an updated dataset of S3 objects,\n\t# depending upon which bucket was updated\n\tbucket \u003d payload.get(\u0027bucket\u0027, None)\n\tif bucket \u003d\u003d self.view.custom.stage_config.repo_bucket:\n\t\tself.view.refreshBinding(\u0027custom.site_image_list\u0027)\n\tif bucket \u003d\u003d self.view.custom.stage_config.source_bucket:\n\t\tself.view.refreshBinding(\u0027custom.site_source_list\u0027)", + "sessionScope": true, + "viewScope": false + } + ] + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/TempMonitoring/resource.json b/com.inductiveautomation.perspective/views/Main-Views/TempMonitoring/resource.json new file mode 100644 index 0000000..f88c0b5 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/TempMonitoring/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-08-01T07:50:53Z" + }, + "lastModificationSignature": "02fec01785029e7278ff7a13d4860c24dbe8a6d97c63152c2db49f6ccb93b088" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/TempMonitoring/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/TempMonitoring/thumbnail.png new file mode 100644 index 0000000..af3cfd9 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/TempMonitoring/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/TempMonitoring/view.json b/com.inductiveautomation.perspective/views/Main-Views/TempMonitoring/view.json new file mode 100644 index 0000000..cc715fc --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/TempMonitoring/view.json @@ -0,0 +1,55 @@ +{ + "custom": {}, + "params": {}, + "props": {}, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "fontFamily": "Arial", + "fontSize": 22, + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "TEMPERATURE" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Table" + }, + "position": { + "basis": "400px" + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "direct", + "tagPath": "[IEC_SCADA_TAG_PROVIDER]Temperature/temperature_monitoring" + }, + "type": "tag" + } + } + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/ToolBox/resource.json b/com.inductiveautomation.perspective/views/Main-Views/ToolBox/resource.json new file mode 100644 index 0000000..3e3c4e0 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/ToolBox/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2024-05-23T13:35:02Z" + }, + "lastModificationSignature": "4f0fba3ea3ff067b076240be6ebd6abae4692c5fe9e5f76c1c8a8fe43c08b952" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Main-Views/ToolBox/thumbnail.png b/com.inductiveautomation.perspective/views/Main-Views/ToolBox/thumbnail.png new file mode 100644 index 0000000..668d679 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Main-Views/ToolBox/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Main-Views/ToolBox/view.json b/com.inductiveautomation.perspective/views/Main-Views/ToolBox/view.json new file mode 100644 index 0000000..55d867a --- /dev/null +++ b/com.inductiveautomation.perspective/views/Main-Views/ToolBox/view.json @@ -0,0 +1,155 @@ +{ + "custom": { + "activityLogger": { + "alt_pageid": "tools", + "start_time": { + "$": [ + "ts", + 192, + 1716471122012 + ], + "$ts": 1716471122012 + } + } + }, + "events": { + "system": { + "onShutdown": { + "config": { + "script": "\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)" + }, + "scope": "G", + "type": "script" + }, + "onStartup": { + "config": { + "script": "\tself.session.custom.view_in_focus \u003d self.page.props.path\n\tself.custom.activityLogger.start_time \u003d system.date.now()" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": {}, + "propConfig": { + "custom.activityLogger": { + "persistent": true + }, + "custom.activityLogger.pageid": { + "binding": { + "config": { + "expression": "{/root.props.currentTabIndex}" + }, + "transforms": [ + { + "code": "\tpageid\u003d self.custom.activityLogger.alt_pageid+\u0027/\u0027+self.getChild(\"root\").props.tabs[value]\n\treturn pageid.replace(\u0027 \u0027,\u0027\u0027)", + "type": "script" + } + ], + "type": "expr" + } + } + }, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "CommissioningTool" + }, + "props": { + "path": "Main-Views/Commissioning Tool/CT_Main" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "S3" + }, + "position": { + "tabIndex": 1 + }, + "propConfig": { + "props.params.selected_site": { + "binding": { + "config": { + "path": "session.custom.fc" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "selected_image": null + }, + "path": "Main-Views/S3/manage" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "NotifyTool" + }, + "position": { + "tabIndex": 2 + }, + "props": { + "path": "Main-Views/Notify-Tool/Notify-Main" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "tabIndex": 3 + }, + "props": { + "path": "Main-Views/Config-Tool/MainView" + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "propConfig": { + "props.currentTabIndex": { + "onChange": { + "enabled": null, + "script": "\ttry:\n\t\tpageid \u003d self.view.custom.activityLogger.alt_pageid + \u0027/\u0027+ self.props.tabs[previousValue.value]\n\t\tpageid \u003d pageid.replace(\u0027 \u0027,\u0027\u0027)\n\t\tpayload \u003d activityLog.productMetrics.createActivityPayload(self.view, \u0027page\u0027, pageid, pageid)\n\t\tif payload:\n\t\t\tself.view.custom.activityLogger.start_time \u003d system.date.now()\n\t\t\tsystem.perspective.sendMessage(\u0027activityLogger-TabChanged\u0027, payload \u003d payload, scope \u003d \u0027page\u0027)\n\texcept:\n\t\tpass" + } + } + }, + "props": { + "currentTabIndex": 3, + "tabs": [ + "CT", + "S3", + "Notify Tool", + "Site Config" + ] + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "activityLogger-TabChanged", + "pageScope": true, + "script": "\t# implement your handler here\n\tif payload:\n\t\tactivityLog.productMetrics.callActivityLoggerAPI(payload)\n", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.container.tab" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/resource.json b/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/resource.json new file mode 100644 index 0000000..1c530d1 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-03-04T18:20:24Z" + }, + "lastModificationSignature": "17ebd5c9e8302715d2f69c63ba80f11bb2606f4725f48ea4027ee67eb268e16b" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/thumbnail.png b/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/thumbnail.png new file mode 100644 index 0000000..5657bad Binary files /dev/null and b/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/view.json b/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/view.json new file mode 100644 index 0000000..c4ea686 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/view.json @@ -0,0 +1,151 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 193, + "width": 1920 + } + }, + "root": { + "children": [ + { + "children": [ + { + "custom": { + "show_view": "Alarms" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpayload \u003d {}\n\tif self.custom.show_view \u003d\u003d \"Alarms\":\n\t\tself.custom.show_view \u003d \"State\"\n\t\tpayload[\"data\"] \u003d \"State\"\n\t\thandle_icon \u003d \"material/play_arrow\"\n\telif self.custom.show_view \u003d\u003d \"State\":\t\n\t\tself.custom.show_view \u003d \"Alarms\"\n\t\tpayload[\"data\"] \u003d \"Alarms\"\n\t\thandle_icon \u003d \"material/notifications_active\"\n\tsystem.perspective.alterDock(\"Docked-South\", { \"handleIcon\": handle_icon } )\n\tsystem.perspective.sendMessage(\"change-docked-view\", \n\t\t\t\t\t\t\t\t\tpayload \u003d payload, scope \u003d \"page\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Show", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "70px", + "display": false + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "case({this.custom.show_view},\r\n\"Alarms\", \"Displaying active alarms\",\r\n\"State\", \"displaying current state of equipment\",\r\n\"Unknown\")" + }, + "type": "expr" + } + }, + "props.image.icon.path": { + "binding": { + "config": { + "expression": "case({this.custom.show_view},\r\n\"Alarms\", \"material/play_arrow\",\r\n\"State\", \"material/notifications_active\",\r\n\"material/device_unknown\")" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "case({this.custom.show_view},\r\n\"Alarms\", \"State\",\r\n\"State\", \"Alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#FFFFFF" + }, + "position": "top", + "width": 32 + }, + "style": { + "classes": "Buttons/Button-Menu", + "color": "#FFFFFF", + "margin": 1 + }, + "textStyle": { + "classes": "Text-Styles/Docked-Buttons" + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "70px", + "shrink": 0 + }, + "props": { + "direction": "column", + "style": { + "backgroundColor": "#3B3B3B" + } + }, + "type": "ia.container.flex" + }, + { + "custom": { + "view": "Alarms" + }, + "meta": { + "name": "EmbeddedView" + }, + "position": { + "basis": "1850px", + "grow": 1 + }, + "propConfig": { + "props.path": { + "binding": { + "config": { + "expression": "case({this.custom.view},\r\n\"Alarms\", \"Alarm-Views/AlarmTable\",\r\n\"State\", \"State-Views/State-Table\",\r\n\"Alarm-Views/Docked-Alarm\")" + }, + "type": "expr" + } + } + }, + "props": { + "loading": { + "order": "with-parent" + }, + "params": { + "length_of_table_data": 353 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "change-docked-view", + "pageScope": true, + "script": "\tview \u003d payload[\"data\"]\n\tself.custom.view \u003d view", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/Docked-West/resource.json b/com.inductiveautomation.perspective/views/Navigation-Views/Docked-West/resource.json new file mode 100644 index 0000000..43795f5 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Navigation-Views/Docked-West/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-12T19:54:03Z" + }, + "lastModificationSignature": "b501603e98191e16f87052eeb73a1ef3e4cecabeb30ead6fe78ecb6eb27c1857" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/Docked-West/thumbnail.png b/com.inductiveautomation.perspective/views/Navigation-Views/Docked-West/thumbnail.png new file mode 100644 index 0000000..060df03 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Navigation-Views/Docked-West/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/Docked-West/view.json b/com.inductiveautomation.perspective/views/Navigation-Views/Docked-West/view.json new file mode 100644 index 0000000..8df13c4 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Navigation-Views/Docked-West/view.json @@ -0,0 +1,832 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 1080, + "width": 70 + } + }, + "root": { + "children": [ + { + "children": [ + { + "custom": { + "show": false + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tmap_selected \u003d self.session.custom.alarm_filter.show_map\n\tself.custom.show \u003d False\n\tif not map_selected:\n\t\tsystem.perspective.navigate(\"/\")\n\telse:\n\t\tsystem.perspective.navigate(\"/MAP-Home\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Home", + "tooltip": { + "enabled": true, + "text": "Home" + } + }, + "position": { + "basis": "70px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "path": "session.props.theme" + }, + "transforms": [ + { + "code": "\tif \u0027dark\u0027 in value:\n\t\treturn \u0027Buttons/Button-Menu\u0027\n\telse:\n\t\treturn \u0027Buttons/Button-Menu\u0027", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#FFFFFF", + "path": "material/home" + }, + "position": "top", + "width": 32 + }, + "style": { + "margin": 1 + }, + "text": "Home", + "textStyle": { + "fontSize": 10 + } + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tif self.props.selected \u003d\u003d True and self.page.props.path \u003d\u003d \"/\":\n\t\tsystem.perspective.navigate(\"/MAP-Home\")\n\t\t\n\telif self.page.props.path \u003d\u003d \"/MAP-Home\":\n\t\tsystem.perspective.navigate(\"/\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "ToggleSwitch", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "60px" + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "path": "session.custom.alarm_filter.show_map" + }, + "transforms": [ + { + "expression": "if({value}, \"Toggle for home card view\", \"Toggle for home detailed view\")", + "type": "expression" + } + ], + "type": "property" + } + }, + "position.display": { + "binding": { + "config": { + "path": "/root.custom.show_home_selector" + }, + "type": "property" + } + }, + "props.selected": { + "binding": { + "config": { + "bidirectional": true, + "path": "session.custom.alarm_filter.show_map" + }, + "type": "property" + } + } + }, + "props": { + "color": { + "background-color": "", + "selected": "#FFFFFF", + "unselected": "#FFFFFF" + }, + "label": { + "position": "left", + "style": { + "classes": "", + "fontSize": "10px" + }, + "text": "Map View" + }, + "style": { + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderColor": "#AAAAAA", + "borderStyle": "solid", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "borderWidth": "0.5px", + "classes": "Buttons/Button-Menu", + "margin": "1px" + } + }, + "type": "ia.input.toggle-switch" + } + ], + "events": { + "dom": { + "onMouseEnter": { + "config": { + "script": "\tself.parent.custom.show_home_selector \u003d True" + }, + "scope": "G", + "type": "script" + }, + "onMouseLeave": { + "config": { + "script": "\tself.parent.custom.show_home_selector \u003d False" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FlexContainer" + }, + "propConfig": { + "position.basis": { + "binding": { + "config": { + "expression": "if({parent.custom.show_home_selector} \u003d True, \"130px\", \"70px\")" + }, + "type": "expr" + } + } + }, + "props": { + "direction": "column", + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.closePopup(\"DevicePopUP\")\n\tsystem.perspective.closePopup(\"StatusPopUP\")\n\tself.custom.show \u003d False\n\tsystem.perspective.navigate(\"/Real-Time\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Alarms", + "tooltip": { + "enabled": true, + "text": "Alarms" + } + }, + "position": { + "basis": "70px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "path": "session.props.theme" + }, + "transforms": [ + { + "code": "\tif \u0027dark\u0027 in value:\n\t\treturn \u0027Buttons/Button-Menu\u0027\n\telse:\n\t\treturn \u0027Buttons/Button-Menu\u0027", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#FFFFFF", + "path": "material/access_alarm" + }, + "position": "top", + "width": 32 + }, + "style": { + "margin": 1 + }, + "text": "Alarms", + "textStyle": { + "classes": "Text-Styles/Docked-Buttons" + } + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\n\tsystem.perspective.openPopup(id \u003d \"Search\", view \u003d \"PopUp-Views/Search\", \n\t\t\t\t\t\t\t\t\t\t\t\tshowCloseIcon \u003d False, modal \u003d True,\n\t\t\t\t\t\t\t\t\t\t\t\tviewportBound \u003d True,\n\t\t\t\t\t\t\t\t\t\t\t\tdraggable \u003d False,\n\t\t\t\t\t\t\t\t\t\t\t\toverlayDismiss \u003d True\n\t\t\t\t\t\t\t\t\t\t\t\t)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "search", + "tooltip": { + "enabled": true, + "text": "Search" + } + }, + "position": { + "basis": "70px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "path": "session.props.theme" + }, + "transforms": [ + { + "code": "\tif \u0027dark\u0027 in value:\n\t\treturn \u0027Buttons/Button-Menu\u0027\n\telse:\n\t\treturn \u0027Buttons/Button-Menu\u0027", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#FFFFFF", + "path": "material/search" + }, + "position": "top", + "width": 32 + }, + "style": { + "margin": 1 + }, + "text": "Search", + "textStyle": { + "classes": "Text-Styles/Docked-Buttons" + } + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.session.custom.searchId \u003d \"\"\n\tself.session.custom.deviceSearchId \u003d \"\"\n\tsystem.perspective.closePopup(id \u003d \"TagSearch\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Search off", + "tooltip": { + "enabled": true, + "text": "Search Off" + } + }, + "position": { + "basis": "70px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "path": "session.props.theme" + }, + "transforms": [ + { + "code": "\tif \u0027dark\u0027 in value:\n\t\treturn \u0027Buttons/Button-Menu\u0027\n\telse:\n\t\treturn \u0027Buttons/Button-Menu\u0027", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#FFFFFF", + "path": "material/search_off" + }, + "position": "top", + "width": 32 + }, + "style": { + "margin": 1 + }, + "text": "Search Off", + "textStyle": { + "classes": "Text-Styles/Docked-Buttons" + } + }, + "type": "ia.input.button" + }, + { + "custom": { + "show": false + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "draggable": false, + "id": "IL8RVZ5T", + "modal": true, + "overlayDismiss": true, + "position": { + "relativeLocation": "top-right" + }, + "positionType": "relative", + "resizable": false, + "showCloseIcon": false, + "type": "open", + "viewParams": { + "viewFocus": "{session.custom.view_in_focus}" + }, + "viewPath": "PopUp-Views/Detail-View-Filter", + "viewportBound": true + }, + "scope": "C", + "type": "popup" + } + } + }, + "meta": { + "name": "Filter", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "70px" + }, + "propConfig": { + "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" + }, + "type": "expr" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({this.custom.filters_active}, \"Status Filters are active\",\r\n\"Select Status Filters\")" + }, + "type": "expr" + } + }, + "props.image.icon.color": { + "binding": { + "config": { + "expression": "if({this.custom.filters_active},\r\n\"#FF8C00\",\r\n\"#FFFFFF\")\r\n" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "path": "material/filter_alt", + "style": { + "classes": "" + } + }, + "position": "top", + "width": 32 + }, + "style": { + "classes": "Buttons/Button-Menu, filter-button", + "margin": 1 + }, + "text": "Filter", + "textStyle": { + "classes": "Text-Styles/Docked-Buttons" + } + }, + "type": "ia.input.button" + }, + { + "custom": { + "show": false + }, + "events": { + "component": { + "onActionPerformed": [ + { + "config": { + "params": {}, + "view": "Main-Views/CT_Main" + }, + "enabled": false, + "scope": "C", + "type": "nav" + }, + { + "config": { + "script": "\tsystem.perspective.closePopup(\"DevicePopUP\")\n\tsystem.perspective.closePopup(\"StatusPopUP\")\n\tself.custom.show \u003d False\n\tsystem.perspective.navigate(\"/Tools\")" + }, + "scope": "G", + "type": "script" + } + ] + } + }, + "meta": { + "name": "Tools", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "70px" + }, + "propConfig": { + "custom.has_role": { + "binding": { + "config": { + "expression": "isAuthorized(false, \u0027Authenticated/Roles/eurme-ignition-developers\u0027, \r\n\t\u0027Authenticated/Roles/eurme-ignition-ae\u0027, \u0027Authenticated/Roles/narme-ignition-developers\u0027)" + }, + "type": "expr" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({this.custom.has_role}\u003d False, \r\n\"You do not have the required role to access this page\",\r\n\"Access tools page\")\r\n" + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "path": "this.custom.has_role" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "session.props.theme" + }, + "transforms": [ + { + "code": "\tif \u0027dark\u0027 in value:\n\t\treturn \u0027Buttons/Button-Menu\u0027\n\telse:\n\t\treturn \u0027Buttons/Button-Menu\u0027", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#FFFFFF", + "path": "material/handyman" + }, + "position": "top", + "width": 32 + }, + "style": { + "margin": 1 + }, + "text": "Tools", + "textStyle": { + "classes": "Text-Styles/Docked-Buttons" + } + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "page": "/Command" + }, + "scope": "C", + "type": "nav" + } + } + }, + "meta": { + "name": "Control", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "70px" + }, + "propConfig": { + "custom.has_role": { + "binding": { + "config": { + "expression": "{session.custom.fc}" + }, + "transforms": [ + { + "code": "#\trme_role \u003d value +\"-rme-all\"\n\trme_role \u003d \"eurme-ignition-developers\"\n\troles \u003d (self.session.props.auth.user.roles)\n\tif (rme_role.lower() in roles \n\tor rme_role.upper() in roles):\n\t\treturn True\n\telse:\n\t\treturn False", + "type": "script" + } + ], + "type": "expr" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({this.custom.has_role}\u003d False, \r\n\"You do not have the required role to access this page\",\r\n\"Access controls page\")\r\n" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "session.props.theme" + }, + "transforms": [ + { + "code": "\tif \u0027dark\u0027 in value:\n\t\treturn \u0027Buttons/Button-Menu\u0027\n\telse:\n\t\treturn \u0027Buttons/Button-Menu\u0027", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#FFFFFF", + "path": "material/gamepad" + }, + "position": "top", + "width": 32 + }, + "style": { + "margin": 1 + }, + "text": "Control", + "textStyle": { + "classes": "Text-Styles/Docked-Buttons" + } + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.closePopup(\"DevicePopUP\")\n\tsystem.perspective.closePopup(\"StatusPopUP\")\n\tself.custom.show \u003d False\n\tsystem.perspective.navigate(\"/Help\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Help", + "tooltip": { + "enabled": true, + "text": "Navigate to the help wiki" + } + }, + "position": { + "basis": "70px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "path": "session.props.theme" + }, + "transforms": [ + { + "code": "\tif \u0027dark\u0027 in value:\n\t\treturn \u0027Buttons/Button-Menu\u0027\n\telse:\n\t\treturn \u0027Buttons/Button-Menu\u0027", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#FFFFFF", + "path": "material/help_outline" + }, + "position": "top", + "width": 32 + }, + "style": { + "margin": 1 + }, + "text": "Help", + "textStyle": { + "classes": "Text-Styles/Docked-Buttons" + } + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.navigateBack()" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Back", + "tooltip": { + "enabled": true, + "text": "Back" + } + }, + "position": { + "basis": "70px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "path": "session.props.theme" + }, + "transforms": [ + { + "code": "\tif \u0027dark\u0027 in value:\n\t\treturn \u0027Buttons/Button-Menu\u0027\n\telse:\n\t\treturn \u0027Buttons/Button-Menu\u0027", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#FFFFFF", + "path": "material/keyboard_return" + }, + "position": "top", + "width": 32 + }, + "style": { + "margin": 1 + }, + "text": "Back", + "textStyle": { + "fontSize": 10 + } + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\turl \u003d self.session.custom.download_url\n\tself.session.custom.download_url \u003d None\n\tsystem.perspective.navigate(url \u003d url , newTab \u003d True)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Downloads", + "tooltip": { + "enabled": true, + "text": "Notifications" + } + }, + "position": { + "basis": "70px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if(isNull({session.custom.download_url}), False, True)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "color": "#FF8C00", + "path": "material/cloud_download" + }, + "position": "top", + "width": 32 + }, + "style": { + "classes": "Buttons/Button-Menu", + "color": "#FFFFFF", + "margin": 1 + }, + "text": "Download", + "textStyle": { + "classes": "Text-Styles/Docked-Buttons" + } + }, + "type": "ia.input.button" + } + ], + "custom": { + "show_home_selector": false + }, + "meta": { + "name": "root" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "path": "session.props.theme" + }, + "transforms": [ + { + "code": "\tif \u0027dark\u0027 in value:\n\t\treturn \u0027Buttons/Button-Menu\u0027\n\telse:\n\t\treturn \u0027Buttons/Button-Menu\u0027", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "direction": "column", + "style": {} + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/Key/resource.json b/com.inductiveautomation.perspective/views/Navigation-Views/Key/resource.json new file mode 100644 index 0000000..d4d42ee --- /dev/null +++ b/com.inductiveautomation.perspective/views/Navigation-Views/Key/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-04-26T10:20:19Z" + }, + "lastModificationSignature": "b0f5e9b1786a8a65c858881880ac11a8a492dac59145bc2bf93a80b54ed06edb" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/Key/thumbnail.png b/com.inductiveautomation.perspective/views/Navigation-Views/Key/thumbnail.png new file mode 100644 index 0000000..109f5a6 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Navigation-Views/Key/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/Key/view.json b/com.inductiveautomation.perspective/views/Navigation-Views/Key/view.json new file mode 100644 index 0000000..6c7eb4b --- /dev/null +++ b/com.inductiveautomation.perspective/views/Navigation-Views/Key/view.json @@ -0,0 +1,155 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 192, + "width": 167 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label_0", + "tooltip": { + "enabled": true, + "text": "Uncontrolled Stop" + } + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "borderBottomStyle": "solid", + "classes": "State-Styles/Background-Fill/State1", + "textAlign": "center" + }, + "text": "Fault" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_1", + "tooltip": { + "enabled": true, + "text": "Controlled Stop" + } + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "borderBottomStyle": "solid", + "classes": "State-Styles/Background-Fill/State2", + "textAlign": "center" + }, + "text": "Stop" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_2", + "tooltip": { + "enabled": true, + "text": "Process Alarm" + } + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "borderBottomStyle": "solid", + "classes": "State-Styles/Background-Fill/State3", + "textAlign": "center" + }, + "text": "Process Alarm" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_3", + "tooltip": { + "enabled": true, + "text": "Diagnostic" + } + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "borderBottomStyle": "solid", + "classes": "State-Styles/Background-Fill/State4", + "textAlign": "center" + }, + "text": "Diagnostic" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_4", + "tooltip": { + "enabled": true, + "text": "Running" + } + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "classes": "State-Styles/Background-Fill/State5", + "textAlign": "center" + }, + "text": "Running" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_5", + "tooltip": { + "enabled": true, + "text": "Unknown" + } + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "borderTopStyle": "solid", + "classes": "State-Styles/Background-Fill/State6", + "textAlign": "center" + }, + "text": "Unknown" + }, + "type": "ia.display.label" + } + ], + "custom": { + "display": true + }, + "meta": { + "name": "root", + "tooltip": { + "text": "key" + } + }, + "props": { + "direction": "column", + "style": { + "borderStyle": "solid" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/NavLabel/resource.json b/com.inductiveautomation.perspective/views/Navigation-Views/NavLabel/resource.json new file mode 100644 index 0000000..1ea8e7e --- /dev/null +++ b/com.inductiveautomation.perspective/views/Navigation-Views/NavLabel/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2024-02-19T15:55:50Z" + }, + "lastModificationSignature": "288e8bf0d7633928dfa8f83cd8d19972b7d9da8cad7ac50bc5720b4cc13f0ea6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/NavLabel/thumbnail.png b/com.inductiveautomation.perspective/views/Navigation-Views/NavLabel/thumbnail.png new file mode 100644 index 0000000..3dbe047 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Navigation-Views/NavLabel/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/NavLabel/view.json b/com.inductiveautomation.perspective/views/Navigation-Views/NavLabel/view.json new file mode 100644 index 0000000..71794c5 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Navigation-Views/NavLabel/view.json @@ -0,0 +1,146 @@ +{ + "custom": {}, + "params": { + "page_id": "value", + "text": "enter text" + }, + "propConfig": { + "params.page_id": { + "paramDirection": "input", + "persistent": true + }, + "params.text": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 48, + "width": 136 + } + }, + "root": { + "children": [ + { + "custom": { + "PLC": "none" + }, + "meta": { + "name": "text_label" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "custom.text": { + "binding": { + "config": { + "path": "view.params.text" + }, + "type": "property" + } + }, + "props.elements[1].elements[0].text": { + "binding": { + "config": { + "path": "this.custom.text" + }, + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "name": "defs", + "type": "defs" + }, + { + "elements": [ + { + "fill": { + "paint": "#000000" + }, + "name": "tspan", + "stroke": { + "paint": "#020202", + "width": ".165" + }, + "text-anchor": "middle", + "type": "tspan", + "x": 5.7088058, + "y": 6.8615942 + } + ], + "fill": { + "paint": "#000000" + }, + "fontSize": "4.4316px", + "name": "text", + "stroke": { + "linecap": "round", + "linejoin": "round", + "paint": "#020202", + "width": ".165" + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "transform": "scale(.99694 1.0031)", + "type": "text", + "x": "3.7088058", + "y": "6.8615942" + } + ], + "style": { + "backgroundColor": "#FFFFFF", + "borderBottomLeftRadius": "5px", + "borderBottomRightRadius": "5px", + "borderStyle": "solid", + "borderTopLeftRadius": "5px", + "borderTopRightRadius": "5px", + "borderWidth": "1px" + }, + "viewBox": "0 0 10.583 10.583" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.navigate(\"/\" + self.view.params.page_id)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true + } + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "path": "view.params.page_id" + }, + "type": "property" + } + } + }, + "props": { + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/Nav_Button/resource.json b/com.inductiveautomation.perspective/views/Navigation-Views/Nav_Button/resource.json new file mode 100644 index 0000000..75a5324 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Navigation-Views/Nav_Button/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-08-01T07:51:10Z" + }, + "lastModificationSignature": "3d112464b439d7aa359b6de14a8f60ef35962ec68bc688b2c3c27ebd23247100" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/Nav_Button/thumbnail.png b/com.inductiveautomation.perspective/views/Navigation-Views/Nav_Button/thumbnail.png new file mode 100644 index 0000000..c815a47 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Navigation-Views/Nav_Button/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/Nav_Button/view.json b/com.inductiveautomation.perspective/views/Navigation-Views/Nav_Button/view.json new file mode 100644 index 0000000..ec8c9ef --- /dev/null +++ b/com.inductiveautomation.perspective/views/Navigation-Views/Nav_Button/view.json @@ -0,0 +1,97 @@ +{ + "custom": {}, + "params": { + "direction": { + "downward": false, + "left": false, + "right": false, + "upward": false + }, + "pageid": "" + }, + "propConfig": { + "params.direction": { + "paramDirection": "input", + "persistent": true + }, + "params.pageid": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 45, + "width": 45 + } + }, + "root": { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.navigate(\"/\" + self.view.params.pageid)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "45px" + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "path": "view.params.pageid" + }, + "type": "property" + } + }, + "props.align": { + "persistent": true + }, + "props.image.icon.path": { + "binding": { + "config": { + "expression": "if({view.params.direction.upward},\"material/keyboard_arrow_up\",\nif({view.params.direction.downward},\"material/keyboard_arrow_down\",\nif({view.params.direction.left},\"material/keyboard_arrow_left\",\nif({view.params.direction.right},\"material/keyboard_arrow_right\",0))))" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "height": 45, + "icon": { + "color": "#000000" + }, + "position": "center", + "width": 45 + }, + "style": { + "backgroundColor": "#F6F6F6" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/NavigationButton/resource.json b/com.inductiveautomation.perspective/views/Navigation-Views/NavigationButton/resource.json new file mode 100644 index 0000000..f0a43c0 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Navigation-Views/NavigationButton/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "whealja@amazon.co.uk", + "timestamp": "2022-08-24T10:17:11Z" + }, + "lastModificationSignature": "eda236777a6fe09a312612c0eaf0475b2d9a47596efab02d8e65adc05be5046d" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/NavigationButton/thumbnail.png b/com.inductiveautomation.perspective/views/Navigation-Views/NavigationButton/thumbnail.png new file mode 100644 index 0000000..afad639 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Navigation-Views/NavigationButton/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Navigation-Views/NavigationButton/view.json b/com.inductiveautomation.perspective/views/Navigation-Views/NavigationButton/view.json new file mode 100644 index 0000000..562c9a3 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Navigation-Views/NavigationButton/view.json @@ -0,0 +1,141 @@ +{ + "custom": {}, + "params": { + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "params.tagProps": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 41, + "width": 83 + } + }, + "root": { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tif self.view.params.tagProps[0] is not True:\n\t\tnavigation.additional_view.navigate_to_additional_view(self)\n\telse:\n\t\tnavigation.navigate_to_page.detailed_view(self, self.view.params.tagProps[2],self.view.params.tagProps[2], self.view.params.tagProps[3])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "41px" + }, + "propConfig": { + "custom.page_id": { + "binding": { + "config": { + "path": "view.params.tagProps[2]" + }, + "type": "property" + } + }, + "custom.status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "direct", + "tagPath": "Configuration/DetailedViews.value" + }, + "transforms": [ + { + "code": "\t\n\tjson_decode \u003d system.util.jsonDecode(value)\n\tpage_id \u003d self.custom.page_id\n\tpage_status \u003d json_decode.get(\"AdditionalPages\",{}).get(page_id,5)\n\treturn page_status", + "type": "script" + } + ], + "type": "tag" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "{this.custom.status}" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "State-Styles/Background-Fill/State1" + }, + { + "input": 2, + "output": "State-Styles/Background-Fill/State2" + }, + { + "input": 3, + "output": "State-Styles/Background-Fill/State3" + }, + { + "input": 4, + "output": "State-Styles/Background-Fill/State4" + }, + { + "input": 5, + "output": "Buttons/Clear-Background" + }, + { + "input": 6, + "output": "State-Styles/Background-Fill/State6" + }, + { + "input": 0, + "output": "State-Styles/Background-Fill/State0" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/navigation" + } + }, + "style": {}, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelection/resource.json b/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelection/resource.json new file mode 100644 index 0000000..5f02148 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelection/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "5355db48f4985d2afb9e8d4b0a16738fd00ad258f4a027e351f57ba9fc88b7f8" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelection/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelection/thumbnail.png new file mode 100644 index 0000000..d9e000b Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelection/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelection/view.json b/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelection/view.json new file mode 100644 index 0000000..f8424ae --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelection/view.json @@ -0,0 +1,147 @@ +{ + "custom": { + "SelectAll": null + }, + "params": { + "Columns": { + "ETag": false, + "Filename": true, + "Key": false, + "Last Updated": true, + "Size (bytes)": true, + "Storage Class": false + } + }, + "propConfig": { + "custom.SelectAll": { + "binding": { + "config": { + "path": "view.params.Columns" + }, + "enabled": false, + "transforms": [ + { + "code": "\tshow_all \u003d True\n\tif len(value) \u003e 0:\n\t\thidden_count \u003d 0\t\t\n\t\tfor column in value:\n\t\t\tif not column[\u0027Hidden\u0027]:\n\t\t\t\tshow_all \u003d False\n\t\t\t\thidden_count +\u003d 1\n\t\tif show_all and hidden_count !\u003d len(value):\n\t\t\tshow_all \u003d None\n\treturn show_all", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "params.Columns": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 224, + "width": 450 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Title" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "marginTop": 5, + "textAlign": "center", + "textDecoration": "underline" + }, + "text": "Hide/Unhide Columns" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "SelectAllCheck" + }, + "position": { + "basis": "36px", + "display": false + }, + "propConfig": { + "props.selected": { + "binding": { + "config": { + "path": "view.custom.SelectAll" + }, + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "IF(!isNull({view.custom.SelectAll}), IF({view.custom.SelectAll}, \u0027Hide All\u0027, \u0027Show All\u0027), \u0027Hide/Show All\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "fontSize": 12 + } + }, + "type": "ia.input.checkbox" + }, + { + "meta": { + "name": "ColumnTiles" + }, + "position": { + "basis": "320px" + }, + "propConfig": { + "props.instances": { + "binding": { + "config": { + "path": "view.params.Columns" + }, + "transforms": [ + { + "code": "\tcolumns \u003d []\n\tif len(value.keys()) \u003e 0:\n\t\tfor column in value:\n\t\t\tnew_instance \u003d {\n\t\t\t\t\u0027Name\u0027: column,\n\t\t\t\t#If not hidden, show Add (+) sign\n\t\t\t\t\u0027Hidden\u0027: not value[column]\n\t\t\t}\n\t\t\tcolumns.append(new_instance)\n\treturn columns", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "alignContent": "flex-start", + "alignItems": "flex-start", + "justify": "center", + "path": "Objects/PowerTable/ColumnSelectionTile", + "style": { + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + }, + "wrap": "wrap" + }, + "type": "ia.display.flex-repeater" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "borderBottomLeftRadius": 20, + "borderBottomRightRadius": 20, + "borderTopRightRadius": 20 + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelectionTile/resource.json b/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelectionTile/resource.json new file mode 100644 index 0000000..8d044f5 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelectionTile/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "788df093ef7b42620c53e7201663b90a55c212664f1bd64cb58256341e246b9d" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelectionTile/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelectionTile/thumbnail.png new file mode 100644 index 0000000..21642e6 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelectionTile/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelectionTile/view.json b/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelectionTile/view.json new file mode 100644 index 0000000..4192b88 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/PowerTable/ColumnSelectionTile/view.json @@ -0,0 +1,84 @@ +{ + "custom": {}, + "params": { + "Hidden": true, + "Name": "Planned_Stop_Or_Not_Used" + }, + "propConfig": { + "params.Hidden": { + "paramDirection": "inout", + "persistent": true + }, + "params.Name": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 37, + "width": 200 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "ColumnSelect" + }, + "position": { + "basis": "36px" + }, + "propConfig": { + "props.selected": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.Hidden" + }, + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\t#Use previous value. If you\u0027re clicking -, you want to remove then toggle to +. Vice versa with clicking +.\n\tif getattr(previousValue, \u0027value\u0027, None) is not None:\n\t\tsystem.perspective.sendMessage(\u0027column-visibility\u0027, {str(self.view.params.Name): previousValue.value}, scope\u003d\u0027page\u0027)" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.Name" + }, + "type": "property" + } + } + }, + "props": { + "checkedIcon": { + "path": "material/add" + }, + "indeterminateIcon": { + "path": "material/add" + }, + "style": { + "fontSize": 12, + "overflow": "visible" + }, + "uncheckedIcon": { + "path": "material/remove" + } + }, + "type": "ia.input.checkbox" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "overflow": "visible" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuGroup/resource.json b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuGroup/resource.json new file mode 100644 index 0000000..13d0b7e --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuGroup/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "042a5f32b94dbea311e35657f7cb1aec712b6e41ce83b2678546c81c6a4e9774" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuGroup/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuGroup/thumbnail.png new file mode 100644 index 0000000..cc584ec Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuGroup/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuGroup/view.json b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuGroup/view.json new file mode 100644 index 0000000..00dc9bb --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuGroup/view.json @@ -0,0 +1,171 @@ +{ + "custom": { + "filter_list": [ + { + "color": "#8B008B", + "filter_id": 5, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + }, + "text": "CP30" + }, + { + "color": "#8B008B", + "filter_id": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + }, + "text": "CP71" + }, + { + "color": "#8B008B", + "filter_id": 4, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + }, + "text": "CP72" + } + ] + }, + "params": { + "filters": [ + { + "color": "#8B008B", + "column": "controller", + "group": 0, + "id": 3, + "text": "CP71" + }, + { + "color": "#8B008B", + "column": "controller", + "group": 0, + "id": 4, + "text": "CP72" + }, + { + "color": "#8B008B", + "column": "controller", + "group": 0, + "id": 5, + "text": "CP30" + } + ], + "group_name": "value" + }, + "propConfig": { + "custom.filter_list": { + "binding": { + "config": { + "path": "view.params.filters" + }, + "transforms": [ + { + "code": "\tinstances \u003d []\n\tfor filter in value:\n\t\tinstance \u003d {\"instanceStyle\": {\n\t\t \t\t\t\"classes\": \"\"},\n\t\t \t\t\t \"instancePosition\": {}}\n\t \tinstance[\u0027text\u0027] \u003d filter.text\n\t \tinstance[\u0027color\u0027] \u003d filter.color\n\t \tinstance[\u0027filter_id\u0027] \u003d filter.id\n\t \tinstances.append(instance)\n\t\n\treturn sorted(instances, key\u003dlambda d: d[\u0027text\u0027])", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "params.filters": { + "paramDirection": "input", + "persistent": true + }, + "params.group_name": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 178, + "width": 214 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Title" + }, + "position": { + "basis": "32px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "expression": "UPPER({view.params.group_name})" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "borderBottomStyle": "solid", + "borderBottomWidth": 1, + "classes": "Title/Text", + "fontSize": 13, + "marginLeft": "10%", + "marginRight": "10%", + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Filters" + }, + "position": { + "basis": "138px", + "shrink": 0 + }, + "propConfig": { + "props.instances": { + "binding": { + "config": { + "path": "view.params.filters" + }, + "transforms": [ + { + "code": "\treturn sorted(value, key\u003dlambda d: d[\u0027text\u0027])", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "alignContent": "flex-start", + "direction": "column", + "path": "Objects/PowerTable/FilterMenuItem", + "style": { + "marginBottom": 5, + "marginLeft": "12%", + "marginRight": "12%" + }, + "useDefaultViewWidth": false + }, + "type": "ia.display.flex-repeater" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "overflow": "visible" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuItem/resource.json b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuItem/resource.json new file mode 100644 index 0000000..b5a2845 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuItem/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "362d7b7a0c9428fa8665f4cc724d263e16ef92e5a6d34b5035722fbb6ec9f915" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuItem/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuItem/thumbnail.png new file mode 100644 index 0000000..4b9da02 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuItem/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuItem/view.json b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuItem/view.json new file mode 100644 index 0000000..7841930 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterMenuItem/view.json @@ -0,0 +1,172 @@ +{ + "custom": {}, + "params": { + "active": false, + "color": "", + "id": "", + "text": "" + }, + "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/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterTile/resource.json b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterTile/resource.json new file mode 100644 index 0000000..212f0a6 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterTile/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "b7fee667758367985e1153d9364a1122b4598435b9735d1fa2d0f6f1b44d2faf" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterTile/view.json b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterTile/view.json new file mode 100644 index 0000000..596b166 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/PowerTable/FilterTile/view.json @@ -0,0 +1,157 @@ +{ + "custom": {}, + "params": { + "color": "#FF3535", + "id": "", + "text": "Active, Unacknowledged" + }, + "propConfig": { + "params.color": { + "paramDirection": "input", + "persistent": true + }, + "params.id": { + "paramDirection": "input", + "persistent": true + }, + "params.text": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 16, + "width": 193 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "FilterColor" + }, + "position": { + "basis": "11px" + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "view.params.color" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderBottomLeftRadius": 5, + "borderTopLeftRadius": 5 + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "FilterText" + }, + "position": { + "basis": "149px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.text" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Page/Text", + "fontSize": 12, + "marginLeft": 10 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Left" + }, + "position": { + "basis": "169px" + }, + "props": { + "style": { + "overflow": "visible" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.sendMessage(\u0027deactivate-filter\u0027, payload \u003d {\u0027id\u0027:self.view.params.id}, scope \u003d \u0027page\u0027)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "DeactivateButton" + }, + "position": { + "basis": "25px" + }, + "props": { + "path": "material/close", + "style": { + "cursor": "pointer", + "marginRight": 5 + } + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "Right" + }, + "position": { + "basis": "25px" + }, + "props": { + "justify": "flex-end" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "justify": "space-between", + "style": { + "borderBottomLeftRadius": 5, + "borderBottomRightRadius": 5, + "borderStyle": "solid", + "borderTopLeftRadius": 5, + "borderTopRightRadius": 5, + "borderWidth": 1, + "classes": "Page/Page", + "overflow": "visible" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Numeric Input/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Numeric Input/resource.json new file mode 100644 index 0000000..e5f5340 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Numeric Input/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "c688472fe4a4f5d17e8f6112d802b2008a083e34e0dcace3bd6e105b91cf94e7" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Numeric Input/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Numeric Input/thumbnail.png new file mode 100644 index 0000000..4fbefa7 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Numeric Input/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Numeric Input/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Numeric Input/view.json new file mode 100644 index 0000000..7fa2854 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Numeric Input/view.json @@ -0,0 +1,144 @@ +{ + "custom": { + "numeric_val": 0 + }, + "params": { + "align": "left", + "enabled": true, + "number_format": "0,0.##", + "target_message_handler": null, + "use_right_margin": true, + "val": "" + }, + "propConfig": { + "custom.numeric_val": { + "binding": { + "config": { + "expression": "toFloat({view.params.val}, 0)" + }, + "overlayOptOut": true, + "type": "expr" + }, + "persistent": true + }, + "params.align": { + "paramDirection": "input", + "persistent": true + }, + "params.enabled": { + "paramDirection": "input", + "persistent": true + }, + "params.number_format": { + "paramDirection": "input", + "persistent": true + }, + "params.target_message_handler": { + "paramDirection": "input", + "persistent": true + }, + "params.use_right_margin": { + "paramDirection": "input", + "persistent": true + }, + "params.val": { + "onChange": { + "enabled": false, + "script": "\tval \u003d currentValue.value\n\tif val:\n\t\tif self.params.target_message_handler:\n\t\t\tsystem.perspective.sendMessage(\n\t\t\t\tself.params.target_message_handler,\n\t\t\t\t{\u0027value\u0027: val},\n\t\t\t\tscope\u003d\u0027session\u0027\n\t\t\t)\n" + }, + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 32, + "width": 200 + } + }, + "root": { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# transform user entry into a string and send to view param\n\tval \u003d self.props.value\n\tself.view.params.val \u003d val\n\tif val:\n\t\tif self.view.params.target_message_handler:\n\t\t\tsystem.perspective.sendMessage(\n\t\t\t\tself.view.params.target_message_handler,\n\t\t\t\t{\u0027value\u0027: val},\n\t\t\t\tscope\u003d\u0027session\u0027\n\t\t\t)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "NumericEntryField" + }, + "position": { + "basis": "172px", + "grow": 1 + }, + "propConfig": { + "props.align": { + "binding": { + "config": { + "path": "view.params.align" + }, + "overlayOptOut": true, + "type": "property" + } + }, + "props.containerStyle.marginRight": { + "binding": { + "config": { + "expression": "if({view.params.use_right_margin},\u002726px\u0027,\u00272px\u0027)" + }, + "overlayOptOut": true, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "path": "view.params.enabled" + }, + "type": "property" + } + }, + "props.format": { + "binding": { + "config": { + "path": "view.params.number_format" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "path": "view.custom.numeric_val" + }, + "overlayOptOut": true, + "type": "property" + } + } + }, + "props": { + "containerStyle": { + "margin": "2px" + } + }, + "type": "ia.input.numeric-entry-field" + } + ], + "meta": { + "name": "root" + }, + "props": { + "justify": "center", + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Text Field Input/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Text Field Input/resource.json new file mode 100644 index 0000000..d0d3632 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Text Field Input/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "070bae2e6028bbc44912bed707b3517b3a3f6e9c96bdbaa865c5710a7235ba50" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Text Field Input/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Text Field Input/thumbnail.png new file mode 100644 index 0000000..88fa20c Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Text Field Input/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Text Field Input/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Text Field Input/view.json new file mode 100644 index 0000000..a80ad41 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Input/Generic Text Field Input/view.json @@ -0,0 +1,92 @@ +{ + "custom": {}, + "params": { + "enabled": true, + "placeholder": "", + "target_message_handler": null, + "val": "" + }, + "propConfig": { + "params.enabled": { + "paramDirection": "input", + "persistent": true + }, + "params.placeholder": { + "paramDirection": "input", + "persistent": true + }, + "params.target_message_handler": { + "paramDirection": "input", + "persistent": true + }, + "params.val": { + "onChange": { + "enabled": null, + "script": "\tval \u003d currentValue.value\n\tif val:\n\t\tif self.params.target_message_handler:\n\t\t\tsystem.perspective.sendMessage(\n\t\t\t\tself.params.target_message_handler,\n\t\t\t\t{\u0027value\u0027: val},\n\t\t\t\tscope\u003d\u0027session\u0027\n\t\t\t)\n" + }, + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 32, + "width": 200 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Field Number" + }, + "position": { + "basis": "172px", + "grow": 1, + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "view.params.enabled" + }, + "type": "property" + } + }, + "props.placeholder": { + "binding": { + "config": { + "path": "view.params.placeholder" + }, + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.val" + }, + "overlayOptOut": true, + "type": "property" + } + } + }, + "props": { + "style": { + "margin": "2px", + "marginRight": "26px" + } + }, + "type": "ia.input.text-field" + } + ], + "meta": { + "name": "root" + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Input/password_field/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/Input/password_field/resource.json new file mode 100644 index 0000000..d5f8d3a --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Input/password_field/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "1efa4744e98ed558f3a975e5b6e064318e1dabfb8b2759759d7ea662b1868a17" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Input/password_field/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/Input/password_field/thumbnail.png new file mode 100644 index 0000000..cf0e6a0 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/Input/password_field/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Input/password_field/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/Input/password_field/view.json new file mode 100644 index 0000000..35bc754 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Input/password_field/view.json @@ -0,0 +1,141 @@ +{ + "custom": {}, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tself.params.request_focus \u003d True\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "enabled": true, + "placeholder": "enter password...", + "request_focus": false, + "text": "" + }, + "propConfig": { + "params.enabled": { + "paramDirection": "input", + "persistent": true + }, + "params.placeholder": { + "paramDirection": "input", + "persistent": true + }, + "params.request_focus": { + "onChange": { + "enabled": null, + "script": "\t# if focus request set externally, set focus via message and clear request\n\tif currentValue.value:\n\t\tsystem.perspective.sendMessage(\u0027request_focus\u0027, scope\u003d\u0027view\u0027)\n\t\tself.params.request_focus \u003d False\n\t" + }, + "paramDirection": "inout", + "persistent": true + }, + "params.text": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 50, + "width": 200 + } + }, + "root": { + "children": [ + { + "events": { + "dom": { + "onKeyPress": { + "config": { + "script": "\tif event.key \u003d\u003d \u0027Enter\u0027:\n\t\tsystem.perspective.sendMessage(\u0027password_entered\u0027, {\u0027value\u0027: self.props.text}, scope\u003d\u0027session\u0027)\n\t\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "PasswordField" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "view.params.enabled" + }, + "type": "property" + } + }, + "props.placeholder": { + "binding": { + "config": { + "path": "view.params.placeholder" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027Input/Text/text_field_enabled\u0027,\u0027Input/Text/text_field_disabled\u0027)" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.text" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "margin": "1%", + "padding": "1%" + } + }, + "scripts": { + "customMethods": [ + { + "name": "set_focus", + "params": [], + "script": "\tfrom time import sleep\n\tsleep(0.50)\n\tself.focus()\n\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "request_focus", + "pageScope": false, + "script": "\tsystem.util.invokeAsynchronous(self.set_focus())\n\t", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.password-field" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Input/text_field/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/Input/text_field/resource.json new file mode 100644 index 0000000..3a55e6a --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Input/text_field/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "65599b33b7691e8df9048482b1eed10ca931b9dded75fc82326312eb4b29c357" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Input/text_field/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/Input/text_field/thumbnail.png new file mode 100644 index 0000000..dcdc17c Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/Input/text_field/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Input/text_field/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/Input/text_field/view.json new file mode 100644 index 0000000..3f27d80 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Input/text_field/view.json @@ -0,0 +1,129 @@ +{ + "custom": {}, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tself.params.request_focus \u003d True\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "enabled": true, + "placeholder": "enter text...", + "request_focus": false, + "text": "" + }, + "propConfig": { + "params.enabled": { + "paramDirection": "input", + "persistent": true + }, + "params.placeholder": { + "paramDirection": "input", + "persistent": true + }, + "params.request_focus": { + "onChange": { + "enabled": null, + "script": "\t# if focus request set externally, set focus via message and clear request\n\tif currentValue.value:\n\t\tsystem.perspective.sendMessage(\u0027request_focus\u0027, scope\u003d\u0027view\u0027)\n\t\tself.params.request_focus \u003d False\n\t" + }, + "paramDirection": "inout", + "persistent": true + }, + "params.text": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 50, + "width": 200 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "TextField" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "view.params.enabled" + }, + "type": "property" + } + }, + "props.placeholder": { + "binding": { + "config": { + "path": "view.params.placeholder" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027Input/Text/text_field_enabled\u0027,\u0027Input/Text/text_field_disabled\u0027)" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.text" + }, + "overlayOptOut": true, + "type": "property" + } + } + }, + "props": { + "style": { + "margin": "1%", + "padding": "1%" + } + }, + "scripts": { + "customMethods": [ + { + "name": "set_focus", + "params": [], + "script": "\tfrom time import sleep\n\tsleep(0.25)\n\tself.focus()\n\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "request_focus", + "pageScope": false, + "script": "\tsystem.util.invokeAsynchronous(self.set_focus())\n\t", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.text-field" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/TextInput_centerAlign/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/TextInput_centerAlign/resource.json new file mode 100644 index 0000000..44253c8 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/TextInput_centerAlign/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "e3b9ed9d6607c2266623821c0a51a88de2316740e903a620307d026f5fdd0d85" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/TextInput_centerAlign/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/TextInput_centerAlign/thumbnail.png new file mode 100644 index 0000000..7a22312 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/TextInput_centerAlign/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/TextInput_centerAlign/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/TextInput_centerAlign/view.json new file mode 100644 index 0000000..b5cf61a --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/TextInput_centerAlign/view.json @@ -0,0 +1,99 @@ +{ + "custom": {}, + "params": { + "styleClass": "", + "text": "" + }, + "propConfig": { + "params.styleClass": { + "paramDirection": "input", + "persistent": true + }, + "params.stylePath": { + "paramDirection": "input", + "persistent": true + }, + "params.text": { + "binding": { + "config": { + "expression": "{view.params.text}" + }, + "type": "expr" + }, + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 40, + "width": 210 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "TextInput" + }, + "position": { + "basis": "10px", + "grow": 1 + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "{view.params.styleClass}" + }, + "transforms": [ + { + "fallback": "Input/Label/Valid_Entry", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "Input/Label/Invalid_Entry" + }, + { + "input": 1, + "output": "Input/Label/Valid_Entry" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.text" + }, + "type": "property" + } + } + }, + "props": { + "placeholder": "Enter Value", + "resize": "both", + "style": {} + }, + "type": "ia.input.text-area" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "justify": "center", + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label/resource.json new file mode 100644 index 0000000..5cf6b10 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "a454d974dc91976f673c5169818b70db35890c1173823583f1c2e3618436af31" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label/thumbnail.png new file mode 100644 index 0000000..212abb5 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label/view.json new file mode 100644 index 0000000..946df88 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label/view.json @@ -0,0 +1,68 @@ +{ + "custom": {}, + "params": { + "stylePath": "value", + "text": "value" + }, + "propConfig": { + "params.stylePath": { + "paramDirection": "input", + "persistent": true + }, + "params.text": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 30, + "width": 210 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "209px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "{view.params.stylePath}" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "{view.params.text}" + }, + "type": "expr" + } + } + }, + "props": { + "style": {} + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "root" + }, + "props": { + "alignItems": "center", + "justify": "center", + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_CenterAlign/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_CenterAlign/resource.json new file mode 100644 index 0000000..d56f9aa --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_CenterAlign/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "06d57baccc7fb39326e99dfea475efcce07ccbacf54459b186edd0c155395ba1" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_CenterAlign/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_CenterAlign/thumbnail.png new file mode 100644 index 0000000..ac549f0 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_CenterAlign/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_CenterAlign/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_CenterAlign/view.json new file mode 100644 index 0000000..016aab8 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_CenterAlign/view.json @@ -0,0 +1,58 @@ +{ + "custom": {}, + "params": { + "text": "value" + }, + "propConfig": { + "params.text": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 30, + "width": 210 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "209px", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "expression": "{view.params.text}" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "Text/CenterAlign_with_Padding" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "root" + }, + "props": { + "alignItems": "center", + "justify": "center", + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_LeftAlign/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_LeftAlign/resource.json new file mode 100644 index 0000000..caff74c --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_LeftAlign/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "0ca93bdfcf583b6cef05bd9e9b969e861af11e537426c518c5f4f8ec5c5d36d1" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_LeftAlign/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_LeftAlign/thumbnail.png new file mode 100644 index 0000000..8f01e41 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_LeftAlign/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_LeftAlign/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_LeftAlign/view.json new file mode 100644 index 0000000..d554ba8 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_LeftAlign/view.json @@ -0,0 +1,58 @@ +{ + "custom": {}, + "params": { + "text": "value" + }, + "propConfig": { + "params.text": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 30, + "width": 210 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "209px", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "expression": "{view.params.text}" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "Text/LeftAlign_with_Padding" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "root" + }, + "props": { + "alignItems": "center", + "justify": "center", + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_RightAlign/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_RightAlign/resource.json new file mode 100644 index 0000000..01ba7be --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_RightAlign/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "bb306833584878d2e43268c5b636724521f396c487325c652b74dcbd16fa016f" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_RightAlign/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_RightAlign/thumbnail.png new file mode 100644 index 0000000..c1dcae3 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_RightAlign/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_RightAlign/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_RightAlign/view.json new file mode 100644 index 0000000..998ac83 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_RightAlign/view.json @@ -0,0 +1,58 @@ +{ + "custom": {}, + "params": { + "text": "value" + }, + "propConfig": { + "params.text": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 30, + "width": 210 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "209px", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "expression": "{view.params.text}" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "Text/RightAlign_with_Padding" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "root" + }, + "props": { + "alignItems": "center", + "justify": "center", + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_legend/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_legend/resource.json new file mode 100644 index 0000000..9b608a7 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_legend/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "d98d49b989e27566aaa84a5f2dd4e1daee08d1264e9c9bd4e62006c7990e5360" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_legend/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_legend/thumbnail.png new file mode 100644 index 0000000..4b495d8 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_legend/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_legend/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_legend/view.json new file mode 100644 index 0000000..6fe6401 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/Labels/label_legend/view.json @@ -0,0 +1,710 @@ +{ + "custom": { + "font_size": ".57vmax" + }, + "params": {}, + "propConfig": { + "custom.font_size": { + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 149, + "width": 423 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "160px" + }, + "propConfig": { + "props.textStyle.fontSize": { + "binding": { + "config": { + "path": "view.custom.font_size" + }, + "type": "property" + } + } + }, + "props": { + "text": "Color Legend", + "textStyle": { + "paddingLeft": 5 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_4" + }, + "position": { + "basis": "35px", + "grow": 1 + }, + "props": { + "style": { + "backgroundColor": "#3B3B3B", + "borderColor": "#CAC3C3", + "borderStyle": "solid", + "borderWidth": 1, + "overflow": "hidden", + "paddingLeft": 5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "148px", + "grow": 1 + }, + "propConfig": { + "props.textStyle.fontSize": { + "binding": { + "config": { + "path": "view.custom.font_size" + }, + "type": "property" + } + } + }, + "props": { + "text": "MHE Stopped" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer", + "tooltip": { + "enabled": true, + "sustain": 1500, + "text": "MHE is stopped (State2)" + } + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state0" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "marginBottom": 0, + "marginLeft": 10, + "marginRight": 5, + "marginTop": 1, + "overflow": "hidden", + "paddingLeft": 10 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "148px", + "grow": 1 + }, + "propConfig": { + "props.textStyle.fontSize": { + "binding": { + "config": { + "path": "view.custom.font_size" + }, + "type": "property" + } + } + }, + "props": { + "text": "MHE Running" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_0", + "tooltip": { + "enabled": true, + "sustain": 1500, + "text": "MHE is running (State3)" + } + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state5" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "marginBottom": 0, + "marginLeft": 5, + "marginRight": 10, + "marginTop": 1, + "overflow": "hidden", + "paddingLeft": 10 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "45px", + "grow": 1 + }, + "props": { + "style": { + "backgroundColor": "#3B3B3B", + "borderColor": "#CAC3C3", + "borderStyle": "solid", + "borderWidth": 1, + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "148px", + "grow": 1 + }, + "propConfig": { + "props.textStyle.fontSize": { + "binding": { + "config": { + "path": "view.custom.font_size" + }, + "type": "property" + } + } + }, + "props": { + "text": "Healthy" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state5" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "marginBottom": 0, + "marginLeft": 10, + "marginRight": 5, + "marginTop": 1, + "overflow": "hidden", + "paddingLeft": 10 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "148px", + "grow": 1 + }, + "propConfig": { + "props.textStyle.fontSize": { + "binding": { + "config": { + "path": "view.custom.font_size" + }, + "type": "property" + } + } + }, + "props": { + "text": "Diagnostic" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_0", + "tooltip": { + "enabled": true, + "sustain": 1500, + "text": "Diagnostic Information" + } + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state4" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "marginBottom": 0, + "marginLeft": 5, + "marginRight": 10, + "marginTop": 1, + "overflow": "hidden", + "paddingLeft": 10 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_0", + "tooltip": { + "enabled": true, + "sustain": 1500, + "text": "Healthy, no active alarms" + } + }, + "position": { + "basis": "45px", + "grow": 1 + }, + "props": { + "style": { + "backgroundColor": "#3B3B3B", + "borderColor": "#CAC3C3", + "borderStyle": "solid", + "borderWidth": 1, + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "148px", + "grow": 1 + }, + "propConfig": { + "props.textStyle.fontSize": { + "binding": { + "config": { + "path": "view.custom.font_size" + }, + "type": "property" + } + } + }, + "props": { + "text": "Low", + "textStyle": { + "color": "#000000" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer", + "tooltip": { + "enabled": true, + "sustain": 1500, + "text": "Running at reduced capacity" + } + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state3" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "marginBottom": 0, + "marginLeft": 10, + "marginRight": 5, + "marginTop": 1, + "overflow": "hidden", + "paddingLeft": 10 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "148px", + "grow": 1 + }, + "propConfig": { + "props.textStyle.fontSize": { + "binding": { + "config": { + "path": "view.custom.font_size" + }, + "type": "property" + } + } + }, + "props": { + "text": "Medium" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_0", + "tooltip": { + "enabled": true, + "sustain": 1500, + "text": "Controlled stop" + } + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state2" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "marginBottom": 0, + "marginLeft": 5, + "marginRight": 10, + "marginTop": 1, + "overflow": "hidden", + "paddingLeft": 10 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "45px", + "grow": 1 + }, + "props": { + "style": { + "backgroundColor": "#3B3B3B", + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderColor": "#CAC3C3", + "borderStyle": "solid", + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "borderWidth": 1, + "overflow": "hidden", + "paddingLeft": 1 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "148px", + "grow": 1 + }, + "propConfig": { + "props.textStyle.fontSize": { + "binding": { + "config": { + "path": "view.custom.font_size" + }, + "type": "property" + } + } + }, + "props": { + "text": "High" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer", + "tooltip": { + "enabled": true, + "sustain": 1500, + "text": "Uncontrolled stop" + } + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state1" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderBottomLeftRadius": 4, + "borderBottomRightRadius": 4, + "borderTopLeftRadius": 4, + "borderTopRightRadius": 4, + "marginBottom": 0, + "marginLeft": 10, + "marginRight": 5, + "marginTop": 1, + "overflow": "hidden", + "paddingLeft": 10 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "draggable": true, + "id": "K1uUHAix", + "modal": true, + "overlayDismiss": true, + "resizable": true, + "showCloseIcon": true, + "title": "Legend", + "type": "open", + "viewPath": "PopUp-Views/Legend", + "viewportBound": false + }, + "scope": "C", + "type": "popup" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "168px", + "grow": 1 + }, + "propConfig": { + "props.textStyle.fontSize": { + "binding": { + "config": { + "path": "view.custom.font_size" + }, + "type": "property" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/legend_toggle" + }, + "style": { + "backgroundColor": "#555555" + } + }, + "justify": "start", + "style": { + "backgroundColor": "#555555", + "paddingLeft": 8 + }, + "text": "DETAILS" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "props": { + "style": { + "backgroundColor": "#555555", + "marginBottom": 0, + "marginLeft": 5, + "marginRight": 10, + "marginTop": 1 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_2" + }, + "position": { + "basis": "45px", + "grow": 1 + }, + "props": { + "style": { + "backgroundColor": "#3B3B3B", + "borderColor": "#CAC3C3", + "borderStyle": "solid", + "borderWidth": 1, + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_6" + }, + "position": { + "basis": "800px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Log_Table/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Log_Table/resource.json new file mode 100644 index 0000000..f5a2fc4 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Log_Table/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "d6456d87111a4d77b947cae139502a425f551a7d2474e675d6bab666810042bf" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Log_Table/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Log_Table/thumbnail.png new file mode 100644 index 0000000..a117e46 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Log_Table/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Log_Table/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Log_Table/view.json new file mode 100644 index 0000000..9dd7586 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Log_Table/view.json @@ -0,0 +1,1123 @@ +{ + "custom": { + "filter_menu_data": [ + { + "filters": [ + { + "color": "#8B008B", + "column": "test1", + "group": 1, + "id": 0, + "text": "value1" + } + ], + "group_name": "test1", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "filters": [ + { + "color": "#00CED1", + "column": "test2", + "group": 2, + "id": 1, + "text": "value2" + } + ], + "group_name": "test2", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + } + ], + "filtered_table_data": [], + "filters": { + "active": [], + "default_colors": [ + "#8B008B", + "#00CED1", + "#FF8C00", + "#708090", + "#DC143C", + "#FFDEAD", + "#7B68EE", + "#4169E1", + "#F4A460", + "#9ACD32" + ], + "number_of_groups": "value", + "selection_active": false + }, + "table_data": [], + "use_filtered_table": false + }, + "params": { + "DoubleClick": { + "Enabled": false, + "MP": "MP", + "Sts": "STATUS", + "TextCode": "TEXT_CODE", + "WHID": "WHID" + }, + "NavigationSettings": { + "BaseUrl": "", + "Column": "", + "Enabled": false + }, + "SelectedRow": [], + "VisibleColCount": 5, + "filters": [ + { + "column": "test1", + "group": 1, + "text": "value1" + }, + { + "column": "test2", + "group": 2, + "text": "value2" + } + ], + "header_order": [ + "timestamp", + "username", + "operation", + { + "field": "destination_bucket", + "visible": true + }, + "destination_site", + "destination_view", + { + "field": "destination_object_key", + "visible": false + }, + { + "field": "destination_version_id", + "visible": false + }, + "expires", + { + "field": "source_bucket", + "visible": true + }, + "source_site", + "source_view", + { + "field": "source_object_key", + "visible": false + }, + { + "field": "source_version_id", + "visible": false + }, + { + "field": "response", + "visible": false + }, + "error_occurred", + { + "field": "error_message", + "visible": true + }, + { + "field": "audit_id", + "visible": false + }, + { + "field": "copy_option", + "visible": false + }, + { + "field": "ttl", + "visible": false + } + ], + "key_to_read_from": "use_param", + "puToDismiss": "", + "table_data": [], + "title": "S3 SCADA Audit Logs" + }, + "propConfig": { + "custom.filter_menu_data": { + "binding": { + "config": { + "path": "view.custom.filters.deactive" + }, + "transforms": [ + { + "code": "\tinstances \u003d []\n\tgroups \u003d {}\n\tfor filter in value:\n\t \tif not groups.has_key(filter.column):\n\t \t\tgroups[filter.column] \u003d []\n\t \tgroups[filter.column].append(filter)\n\tfor key in groups:\n\t\tinstance \u003d {\"instanceStyle\": {\n\t \t\t\t\"classes\": \"\"},\n\t \t\t\t \"instancePosition\": {}}\n\t \tgroups[key].sort()\n\t \tinstance[\u0027filters\u0027] \u003d groups[key]\n\t \tinstance[\u0027group_name\u0027] \u003d key\n\t \tinstances.append(instance)\n\treturn instances", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.filtered_table_data": { + "binding": { + "config": { + "expression": "if({view.custom.table_data} !\u003d {view.custom.filters.active},\r\n{view.custom.filters.active},\r\n{view.custom.filters.active})" + }, + "transforms": [ + { + "code": "\tfiltered_table \u003d []\n\tif len(value) \u003e 0:\n\t\tfilter_lookup \u003d {}\n\t\tfor act_filter in value:\n\t\t\tif act_filter[\u0027column\u0027] not in filter_lookup:\n\t\t\t\tfilter_lookup[act_filter[\u0027column\u0027]] \u003d []\n\t\t\tfilter_lookup[act_filter[\u0027column\u0027]].append(act_filter[\u0027text\u0027])\n\t\tfor row in self.custom.table_data:\n\t\t\tsystem.perspective.print(row)\n\t\t\tshould_filter \u003d {}\t\t\n\t\t\t# Handles stylized rows\t\n\t\t\tif \u0027style\u0027 in row and \u0027value\u0027 in row and len(row) \u003d\u003d2:\n\t\t\t\t#for column in row:\n\t\t\t\t\t#system.perspective.print(\u0027value:%s\u0027%column)\n\t\t\t\t\tdata_columns \u003d row[\u0027value\u0027]\n\t\t\t\t\tfor s_column in data_columns:\n\t\t\t\t\t\tif s_column in filter_lookup:\n\t\t\t\t\t\t\tif data_columns[s_column] in filter_lookup[s_column]:\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tshould_filter[s_column] \u003d True\n\t\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t\tshould_filter[s_column] \u003d False\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\tshould_filter[s_column] \u003d False\t\n\t\t\telse:\n\t\t\t\tfor column in row:\n\t\t\t\t\tif column in filter_lookup:\n\t\t\t\t\t\tif row[column] in filter_lookup[column]:\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tshould_filter[column] \u003d True\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\tshould_filter[column] \u003d False\n\t\t\t\t\telse:\n\t\t\t\t\t\tshould_filter[column] \u003d False\n\t\t\tif sum(should_filter.values()) \u003d\u003d len(filter_lookup.keys()):\n\t\t\t\tfiltered_table.append(row)\n\n\treturn filtered_table", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.filters": { + "persistent": true + }, + "custom.filters.deactive": { + "binding": { + "config": { + "path": "view.params.filters" + }, + "transforms": [ + { + "code": "\t\n\tfilters \u003d []\n\tgroups \u003d []\n\tfor index, filter in enumerate(value):\n\t\tnew_filter \u003d {}\t\n\t\tif not filter.has_key(\u0027group\u0027):\n\t\t\tnew_filter[\u0027group\u0027] \u003d 0\n\t\telse:\n\t\t\tnew_filter[\u0027group\u0027] \u003d filter.group\n\t\tif not filter.has_key(\u0027color\u0027):\n\t\t\tif new_filter[\u0027group\u0027] not in groups:\n\t\t\t\tgroups.append(new_filter[\u0027group\u0027])\n\t\t\tnew_filter[\u0027color\u0027] \u003d self.custom.filters.default_colors[groups.index(new_filter[\u0027group\u0027])]\n\t\telse:\n\t\t\tnew_filter[\u0027color\u0027] \u003d filter.color\n\t\tif not filter.has_key(\u0027text\u0027):\n\t\t\tnew_filter[\u0027text\u0027] \u003d \u0027Filter \u0027 + str(index)\n\t\telse:\n\t\t\tnew_filter[\u0027text\u0027] \u003d filter.text\n\t\tif not filter.has_key(\u0027column\u0027):\n\t\t\tnew_filter[\u0027column\u0027] \u003d 0\n\t\telse:\n\t\t\tnew_filter[\u0027column\u0027] \u003d filter.column\n\t\tnew_filter[\u0027id\u0027] \u003d index\n\t\tfilters.append(new_filter)\t\t\t\t\n\treturn filters", + "type": "script" + } + ], + "type": "property" + } + }, + "custom.table_data": { + "binding": { + "config": { + "expression": "if({view.params.key_to_read_from} \u003d \u0027use_param\u0027,\r\n{view.params.table_data},\r\nproperty(concat(\u0027session.custom.tableComponentData.\u0027,{view.params.key_to_read_from})))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.use_filtered": { + "persistent": true + }, + "custom.use_filtered_table": { + "binding": { + "config": { + "path": "view.custom.filtered_table_data" + }, + "transforms": [ + { + "code": "\treturn len(value) \u003e 0", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "params.DoubleClick": { + "paramDirection": "input", + "persistent": true + }, + "params.NavigationSettings": { + "paramDirection": "input", + "persistent": true + }, + "params.SelectedRow": { + "binding": { + "config": { + "path": "/root/Table.props.selection.data" + }, + "type": "property" + }, + "paramDirection": "output", + "persistent": true + }, + "params.VisibleColCount": { + "paramDirection": "input", + "persistent": true + }, + "params.filters": { + "paramDirection": "input", + "persistent": true + }, + "params.header_order": { + "paramDirection": "input", + "persistent": true + }, + "params.key_to_read_from": { + "paramDirection": "input", + "persistent": true + }, + "params.puToDismiss": { + "paramDirection": "input", + "persistent": true + }, + "params.table_data": { + "paramDirection": "input", + "persistent": true + }, + "params.title": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 844 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Title" + }, + "position": { + "basis": "100%" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.title" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Title/Text", + "fontSize": 14, + "overflow": "visible" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Title" + }, + "position": { + "basis": "50%" + }, + "props": { + "style": { + "fontSize": 1, + "marginLeft": 10, + "overflow": "visible" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "FilterCheck", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "Enable Table Search" + } + }, + "position": { + "basis": "108px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "LEN({..../Table.props.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "checkedIcon": { + "style": { + "fontSize": 16 + } + }, + "indeterminateIcon": { + "style": { + "fontSize": 16 + } + }, + "style": { + "fontSize": 12 + }, + "text": "Search?", + "textPosition": "left", + "uncheckedIcon": { + "style": { + "fontSize": 16 + } + } + }, + "type": "ia.input.checkbox" + }, + { + "meta": { + "name": "Spacer1" + }, + "position": { + "basis": "1px" + }, + "props": { + "style": { + "classes": "General/Divider" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\ttable \u003d self.parent.parent.parent.getChild(\"Table\")\n\t# ignition perspective has a bug with table where the only way to \n\t# actually de-select and remove the row highlight is to set the\n\t# row and column to -1 and THEN None\n\t# this will automatically clear the selection.data array\n\ttable.props.selection.selectedRow \u003d -1\n\ttable.props.selection.selectedColumn \u003d -1\n\ttable.props.selection.selectedRow \u003d None\n\ttable.props.selection.selectedColumn \u003d None" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "ClearSelectionButton", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "Clear Selection" + } + }, + "position": { + "basis": "31px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "len({..../Table.props.selection.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "path": "material/clear", + "style": { + "classes": "General/Button" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Spacer2" + }, + "position": { + "basis": "1px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "../ClearSelectionButton.position.display" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "General/Divider" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "draggable": false, + "id": "ColumnSelection", + "modal": true, + "overlayDismiss": true, + "position": { + "relativeLocation": "bottom-left" + }, + "positionType": "relative", + "resizable": true, + "showCloseIcon": true, + "type": "toggle", + "viewParams": { + "Columns": "{/root/TableHeader/TableActions/ColumnSelectionButton.custom.Columns}" + }, + "viewPath": "Objects/PowerTable/ColumnSelection", + "viewportBound": false + }, + "scope": "C", + "type": "popup" + } + } + }, + "meta": { + "name": "ColumnSelectionButton", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "+/- Columns" + } + }, + "position": { + "basis": "29px" + }, + "propConfig": { + "custom.Columns": { + "binding": { + "config": { + "path": "..../Table.props.columns" + }, + "transforms": [ + { + "code": "\tcolumns \u003d {}\n\tif len(value) \u003e 0:\n\t\tfor column in value:\n\t\t\t#field \u003d column.field\n\t\t\tfield \u003d column.header.title\n\t\t\tif field \u003d\u003d \u0027\u0027:\n\t\t\t\tfield \u003d \u0027None\u0027\n\t\t\tcolumns[field] \u003d column.visible\n\treturn columns", + "type": "script" + } + ], + "type": "property" + } + }, + "position.display": { + "binding": { + "config": { + "expression": "LEN({..../Table.props.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "path": "material/view_column", + "style": { + "classes": "General/Button", + "fontSize": 12, + "marginBottom": 5, + "marginTop": 5 + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Spacer4" + }, + "position": { + "basis": "1px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "LEN({..../Table.props.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "General/Divider" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tself.view.custom.filters.selection_active \u003d not self.view.custom.filters.selection_active" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FilterButton", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "Filter Table" + } + }, + "position": { + "basis": "29px", + "display": false + }, + "props": { + "path": "material/filter_list", + "style": { + "classes": "General/Button", + "fontSize": 12, + "marginBottom": 5, + "marginTop": 5 + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Spacer3" + }, + "position": { + "basis": "1px" + }, + "props": { + "style": { + "classes": "General/Divider" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\n\tcsv_headers \u003d []\n\tcsv_data \u003d []\n\tsystem.perspective.print(\u0027DOWNLOADING TABLE DATA\u0027)\n\tsource_data \u003d self.parent.parent.parent.getChild(\"Table\").props.data\n\theaders \u003d source_data[0].keys()\n\t\n\tif \u0027style\u0027 in headers and \u0027value\u0027 in headers and len(headers) \u003d\u003d 2:\n\t\tdata \u003d [row[\u0027value\u0027] for row in source_data]\n\telse:\n\t\tdata \u003d source_data\n\t\t\n\tfor record in data:\n\t\tif len(csv_headers) \u003d\u003d 0:\n\t\t\tcsv_headers \u003d record.keys()\n\t\t\tcsv_headers.sort()\n\t\t\tcsv_headers \u003d [str(i) for i in csv_headers]\n\t\tcsv_row \u003d []\n\t\tfor index in range(len(record)):\n\t\t\tcsv_row.append(str(record[csv_headers[index]]))\n\t\tcsv_data.append(csv_row)\n\t\n\ttry:\n\t\tcsv_dataset \u003d system.dataset.toDataSet(csv_headers, csv_data)\n\texcept Exception, e:\n\t\tsystem.perspective.print(str(e))\n\tcsv_export \u003d system.dataset.toCSV(csv_dataset)\n\tfilename \u003d \u0027{0}.csv\u0027.format(str(system.date.now()).replace(\u0027 \u0027, \u0027_\u0027))\n\tsystem.perspective.download(filename, csv_export)\n\t\n\tsystem.perspective.print(\u0027DONE DOWNLOADING TABLE DATA\u0027)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "SettingsButton", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "Download Table Contents" + } + }, + "position": { + "basis": "30px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "LEN({..../Table.props.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "path": "material/cloud_download", + "style": { + "classes": "General/Button", + "marginRight": 10 + } + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "TableActions", + "tooltip": { + "location": "top-right" + } + }, + "position": { + "grow": 1 + }, + "props": { + "justify": "flex-end" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "TableHeader" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "space-between", + "style": { + "borderBottomStyle": "solid", + "borderBottomWidth": 1, + "cursor": "pointer" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "FilterMenu" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.instances": { + "binding": { + "config": { + "path": "view.custom.filter_menu_data" + }, + "type": "property" + } + } + }, + "props": { + "alignContent": "flex-start", + "alignItems": "flex-start", + "path": "Objects/PowerTable/FilterMenuGroup", + "style": { + "overflow": "visible" + }, + "useDefaultViewHeight": false, + "useDefaultViewWidth": false, + "wrap": "wrap" + }, + "type": "ia.display.flex-repeater" + } + ], + "meta": { + "name": "FilterSelection" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.custom.filters.selection_active" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderBottomStyle": "solid", + "borderBottomWidth": 1, + "classes": "Menu/Menu", + "overflow": "visible", + "paddingLeft": 10, + "paddingRight": 10 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "FiltersLabel" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.custom.filters.active" + }, + "transforms": [ + { + "code": "\t\n\treturn \u0027\u0027.join([\u0027FILTERS (\u0027, str(len(value)), \u0027):\u0027])", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Menu/Menu Page/Text", + "fontSize": 10, + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "FiltersCarousel" + }, + "propConfig": { + "props.views": { + "binding": { + "config": { + "path": "view.custom.filters.active" + }, + "transforms": [ + { + "code": "\n\tviews \u003d []\n\tfor filter in value:\n\t\tcarousel_view \u003d {\n\t\t\t\u0027viewPath\u0027:\u0027Components/PowerTable/FilterTile\u0027,\n\t\t\t\u0027direction\u0027 : \u0027row\u0027,\n\t\t\t\u0027viewParams\u0027: {},\n\t\t\t\u0027justify\u0027:\u0027flex-start\u0027,\n\t\t\t\u0027alignItems\u0027: \u0027center\u0027}\n\t\tcarousel_view[\u0027viewParams\u0027][\u0027color\u0027] \u003d filter[\u0027color\u0027]\n\t\tcarousel_view[\u0027viewParams\u0027][\u0027text\u0027] \u003d filter[\u0027text\u0027]\t\n\t\tcarousel_view[\u0027viewParams\u0027][\u0027id\u0027] \u003d filter[\u0027id\u0027]\t\n\t\t\n\t\tviews.append(carousel_view)\n\treturn views", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "appearance": { + "arrows": { + "next": { + "style": { + "marginRight": 5 + } + }, + "previous": { + "style": { + "marginLeft": 5 + } + } + }, + "dots": { + "enabled": false + }, + "slidePadding": 3, + "slidesToShow": 5, + "useDefaultViewHeight": true, + "useDefaultViewWidth": true + }, + "style": { + "overflow": "visible", + "textAlign": "left" + } + }, + "type": "ia.display.carousel" + } + ], + "meta": { + "name": "Left" + }, + "position": { + "basis": "90%" + }, + "props": { + "style": { + "overflow": "visible" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.custom.filters.active \u003d []\n\tsystem.perspective.sendMessage(\u0027deactivate-filter\u0027, payload \u003d {\u0027id\u0027:-1}, scope \u003d \u0027page\u0027)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "ClearButton" + }, + "position": { + "basis": "51px" + }, + "props": { + "primary": false, + "style": { + "classes": "Menu/Item", + "fontSize": 12, + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + }, + "text": "Clear", + "textStyle": { + "classes": "Page/Text" + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Right" + }, + "position": { + "basis": "10%" + }, + "props": { + "justify": "flex-end", + "style": { + "overflow": "visible" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Filters" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.custom.filters.active" + }, + "transforms": [ + { + "code": "\treturn len(value) \u003e 0", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "overflow": "visible" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "ReulstLengthLabel" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.custom.filters.active" + }, + "transforms": [ + { + "code": "\treturn len(value) \u003e 0", + "type": "script" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "../Table.props.data" + }, + "transforms": [ + { + "code": "\treturn \u0027\u0027.join([str(len(value)), \u0027 results within filters\u0027])", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Menu/Item Page/Text", + "fontSize": 12, + "paddingLeft": 5, + "textTransform": "lowercase" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "pager" + }, + "position": { + "basis": "35px", + "display": false, + "shrink": 0 + }, + "propConfig": { + "props.params.number_of_pages": { + "binding": { + "config": { + "expression": "len({../Table.custom.raw_data})" + }, + "type": "expr" + } + }, + "props.params.options_for_pagers": { + "binding": { + "config": { + "path": "../Table.props.pager.options" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "number_of_items_per_page": 100, + "page_selected": 0 + }, + "path": "Components/PowerTable/pager" + }, + "type": "ia.display.view" + }, + { + "events": { + "component": { + "onRowDoubleClick": { + "config": { + "script": "\t# grab row JSON from double-click\n\td \u003d event.value\n\t# build out query_params from row values\n\tquery_params \u003d {\n\t\t\"view\": d.destination_view,\n\t\t\"object_key\": d.destination_object_key,\n\t\t\"site\": d.destination_site,\n\t\t\"bucket\": d.destination_bucket\n\t}\n\t# Open version history log viewer\n\tview_path \u003d \u0027PopUp-Views/S3/Versions/Log_Viewer\u0027\n\tparams \u003d {\u0027query_params\u0027: query_params}\n\tsystem.perspective.openPopup(\u0027Version Log Viewer\u0027, view_path, \n\t\t\t\t\t\t\t\tparams, \u0027SCADA S3 Version History Log Viewer\u0027)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Table" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "custom.raw_data": { + "binding": { + "config": { + "expression": "IF({../pager.props.params.number_of_items_per_page} \u003e 0,\r\nIF(LEN({view.custom.filters.active})\u003d0, {view.custom.table_data}, {view.custom.filtered_table_data}),\u0027\u0027)" + }, + "transforms": [ + { + "code": "\tlist_of_data \u003d []\n\tsingle_list \u003d []\n\tfor item in value:\n\t\tif len(single_list) \u003c self.getSibling(\"pager\").props.params.number_of_items_per_page:\n\t\t\tsingle_list.append(item)\n\t\telse:\n\t\t\tlist_of_data.append(single_list)\n\t\t\tsingle_list \u003d []\n\t\t\tsingle_list.append(item)\n\tif len(single_list) \u003e 0:\n\t\tlist_of_data.append(single_list)\n\treturn list_of_data", + "type": "script" + } + ], + "type": "expr" + } + }, + "props.columns": { + "binding": { + "config": { + "path": "view.custom.table_data" + }, + "transforms": [ + { + "code": "\tfrom helper.helper import sanitize_tree\n\tcolumns \u003d []\n\tif len(value) \u003e 0:\n\t\trequestedHeaders \u003d sanitize_tree(self.view.params.header_order)\n\t\tfrom pprint import pformat\n#\t\tsystem.perspective.print(pformat(requestedHeaders))\n\t\theaders \u003d []\n\t\tif len(requestedHeaders) \u003e 0:\n\t\t\tfor item in requestedHeaders:\n\t\t\t\tif \u0027style\u0027 in value[0].keys() and \u0027value\u0027 in value[0].keys() and len(value[0].keys()) \u003d\u003d2:\n\t\t\t\t\tif item in value[0][\u0027value\u0027].keys():\n\t\t\t\t\t\theaders.append(item)\n\t\t\t\telse:\n\t\t\t\t\tif item in value[0].keys():\n\t\t\t\t\t\theaders.append(item)\n\t\t\t\t\tif isinstance(item, dict) and \u0027field\u0027 in item and item[\u0027field\u0027] in value[0].keys():\n\t\t\t\t\t\theaders.append(item)\n\t\tif len(headers) \u003d\u003d 0:\n\t\t\theaders \u003d value[0].keys()\n\t\tfor header in headers:\t\n\t\t\tfield \u003d header\n\t\t\tvisible \u003d True\n\t\t\ttry:\n\t\t\t\ttitle \u003d str(header).replace(\u0027_\u0027, \u0027 \u0027).upper()\n\t\t\texcept:\n\t\t\t\ttitle \u003d \u0027\u0027\n\t\t\tif isinstance(header, dict):\n\t\t\t\tfield \u003d header.get(\u0027field\u0027, \u0027\u0027)\n\t\t\t\tvisible \u003d header.get(\u0027visible\u0027, True)\n\t\t\t\ttitle \u003d header.get(\u0027title\u0027, field.replace(\u0027_\u0027, \u0027 \u0027).upper())\n\t\t\tcolumn \u003d {\n\t\t\t \"field\": field,\n\t\t\t \"visible\": visible,\n\t\t\t \"editable\": True,\n\t\t\t \"render\": \"auto\",\n\t\t\t \"justify\": \"center\",\n\t\t\t \"align\": \"center\",\n\t\t\t \"resizable\": True,\n\t\t\t \"sortable\": True,\n\t\t\t \"sort\": \"none\",\n\t\t\t \"viewPath\": \"\",\n\t\t\t \"viewParams\": {},\n\t\t\t \"boolean\": \"checkbox\",\n\t\t\t \"number\": \"value\",\n\t\t\t \"progressBar\": {\n\t\t\t\t\"max\": 100,\n\t\t\t\t\"min\": 0,\n\t\t\t\t\"bar\": {\n\t\t\t\t \"color\": \"\",\n\t\t\t\t \"style\": {\n\t\t\t\t\t\"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"track\": {\n\t\t\t\t \"color\": \"\",\n\t\t\t\t \"style\": {\n\t\t\t\t\t\"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"value\": {\n\t\t\t\t \"enabled\": True,\n\t\t\t\t \"format\": \"0,0.##\",\n\t\t\t\t \"justify\": \"center\",\n\t\t\t\t \"style\": {\n\t\t\t\t\t\"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t },\n\t\t\t \"toggleSwitch\": {\n\t\t\t\t\"color\": {\n\t\t\t\t \"selected\": \"\",\n\t\t\t\t \"unselected\": \"\"\n\t\t\t\t}\n\t\t\t },\n\t\t\t \"numberFormat\": \"0,0.##\",\n\t\t\t \"dateFormat\": \"MM/DD/YYYY\",\n\t\t\t \"width\": \"\",\n\t\t\t \"strictWidth\": False,\n\t\t\t \"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t },\n\t\t\t \"header\": {\n\t\t\t\t\"title\": title,\n\t\t\t\t\"justify\": \"center\",\n\t\t\t\t\"align\": \"center\",\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\",\n\t\t\t\t \u0027fontSize\u0027:\u002712px\u0027\n\t\t\t\t}\n\t\t\t },\n\t\t\t \"footer\": {\n\t\t\t\t\"title\": \"\",\n\t\t\t\t\"justify\": \"left\",\n\t\t\t\t\"align\": \"center\",\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\t\t\t\n\t\t\tcolumns.append(column)\n#\t\tif self.view.params.header_order !\u003d [] and len(headers) \u003d\u003d len(self.view.params.header_order):\n#\t\t\tnew_columns \u003d [None] * len(columns)\n#\t\t\tfor column in columns:\n#\t\t\t\tindex \u003d self.view.params.header_order.index(column[\u0027field\u0027])\n#\t\t\t\tnew_columns[index] \u003d column\n#\t\t\tcolumns \u003d new_columns\n\treturn columns", + "type": "script" + } + ], + "type": "property" + } + }, + "props.data": { + "binding": { + "config": { + "expression": "IF({../pager.props.params.number_of_items_per_page} \u003e 0,\r\nIF(LEN({view.custom.filters.active})\u003d0, {view.custom.table_data}, {view.custom.filtered_table_data}),\u0027\u0027)" + }, + "type": "expr" + } + }, + "props.filter.enabled": { + "binding": { + "config": { + "path": "../TableHeader/TableActions/FilterCheck.props.selected" + }, + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tif not getattr(currentValue, \u0027value\u0027, None):\n\t\t# clear filter text when filter is disabled\n\t\tself.props.filter.text \u003d \u0027\u0027\n\t\t" + } + } + }, + "props": { + "cells": { + "allowEditOn": "long-press", + "style": { + "fontSize": 12 + } + }, + "filter": {}, + "pager": { + "initialOption": 100, + "options": [ + 25, + 50, + 100, + 500, + 1000 + ] + }, + "style": { + "overflow": "visible" + } + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "overflow": "visible" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "activate-filter", + "pageScope": true, + "script": "\t# implement your handler here\n\tfilter_position \u003d payload[\u0027id\u0027]\n\tsystem.perspective.print(filter_position)\n\tadd \u003d True\n\tfor filter in self.view.custom.filters.active:\n\t\tif filter.id \u003d\u003d filter_position:\n\t\t\tadd \u003d False\n\tif add:\n\t\tfor filter in self.view.custom.filters.deactive:\n\t\t\tif filter.id \u003d\u003d filter_position:\t\t\t\t\n\t\t\t\tself.view.custom.filters.active.append(filter)", + "sessionScope": true, + "viewScope": false + }, + { + "messageType": "deactivate-filter", + "pageScope": true, + "script": "\tfilter_position \u003d payload[\u0027id\u0027]\n\tsystem.perspective.print(filter_position)\n\t\n\tif filter_position \u003d\u003d -1 :\n\t\tself.view.custom.filters.active \u003d []\n\telse:\n\t\tfor index, filter in enumerate(self.view.custom.filters.active):\n\t\t\tif filter.id \u003d\u003d filter_position:\n\t\t\t\tsystem.perspective.print(filter.id)\n\t\t\t\tself.view.custom.filters.active.pop(index)\n\n#\tfor filter in self.view.custom.filter_menu_data:\n#\t\tif filter.filter_id \u003d\u003d filter_position:\n#\t\t\tsystem.perspective.print(filter.filter_id)\n#\t\t\tfilter.active \u003d False\n#\t\t\tbreak", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "column-visibility", + "pageScope": true, + "script": "\t# implement your handler here\n\ttable_columns \u003d self.getChild(\"Table\").props.columns\n\tfor table_column in table_columns:\n\t\t#if payload.keys()[0] \u003d\u003d table_column[\u0027field\u0027]:\n\t\tif payload.keys()[0] \u003d\u003d table_column[\u0027header\u0027][\u0027title\u0027]:\n\t\t\ttable_column.visible \u003d payload.values()[0]\n", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Query_Options/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Query_Options/resource.json new file mode 100644 index 0000000..2df2e26 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Query_Options/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "eac7cc93eb116e5b7b75c2a35599e533d5bce56505a610ad0263f68553ee74ce" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Query_Options/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Query_Options/thumbnail.png new file mode 100644 index 0000000..bc0f83b Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Query_Options/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Query_Options/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Query_Options/view.json new file mode 100644 index 0000000..030be53 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Audit/Query_Options/view.json @@ -0,0 +1,1954 @@ +{ + "custom": { + "api_region_name": "na", + "bucket_options": [ + { + "label": "Image Files", + "value": "na-ignition-image-repo" + }, + { + "label": "Source Files", + "value": "na-ignition-image-source" + } + ], + "copy_option_options": [ + { + "label": "Both", + "value": "both" + }, + { + "label": "SVG", + "value": "svg" + }, + { + "label": "DRAWIO", + "value": "drawio" + } + ], + "default_query_params": { + "copy_option": null, + "destination_bucket": null, + "destination_site": null, + "destination_view": "", + "end_time": null, + "error_occurred": null, + "operation": null, + "source_bucket": null, + "source_site": null, + "source_view": "", + "start_time": null + }, + "destination_view_options_by_site_and_bucket": [], + "destination_view_suffix": null, + "destination_whid_options": [], + "error_occurred_options": [ + { + "label": "True", + "value": true + }, + { + "label": "False", + "value": false + } + ], + "operation_options": [ + { + "label": "Copy Single", + "value": "copy_single" + }, + { + "label": "Upload", + "value": "upload" + }, + { + "label": "Delete", + "value": "delete" + }, + { + "label": "Add New Site", + "value": "add_new_site" + } + ], + "source_view_options_by_site_and_bucket": [], + "source_view_suffix": null, + "source_whid_options": [], + "stage_config": { + "account_id": "925510716640", + "endpoint": "https://scada-s3-management.narme-scada.rme.amazon.dev/", + "lambda_name": "RMESDScadaS3ManagementFlaskLambda-prod", + "region": "us-east-2", + "repo_bucket": "na-ignition-image-repo", + "s3_region": "us-east-1", + "source_bucket": "na-ignition-image-source" + } + }, + "params": { + "query_params": { + "copy_option": null, + "destination_bucket": null, + "destination_site": null, + "destination_view": "", + "end_time": null, + "error_occurred": null, + "operation": null, + "source_bucket": null, + "source_site": null, + "source_view": "", + "start_time": null, + "username": "" + } + }, + "propConfig": { + "custom.api_region_name": { + "binding": { + "config": { + "path": "session.custom.aws.prefix" + }, + "type": "property" + }, + "persistent": true + }, + "custom.bucket_options": { + "binding": { + "config": { + "path": "view.custom.stage_config" + }, + "transforms": [ + { + "code": "\treturn [{\u0027value\u0027: value.repo_bucket, \u0027label\u0027: \u0027Image Files\u0027},\n\t\t\t{\u0027value\u0027: value.source_bucket, \u0027label\u0027: \u0027Source Files\u0027}]", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.copy_option_options": { + "persistent": true + }, + "custom.default_query_params": { + "persistent": true + }, + "custom.default_query_params.username": { + "binding": { + "config": { + "path": "session.props.auth.user.userName" + }, + "type": "property" + } + }, + "custom.destination_view_options_by_site_and_bucket": { + "binding": { + "config": { + "expression": "{view.params.query_params.destination_site}+{view.params.query_params.destination_bucket}" + }, + "transforms": [ + { + "code": "\tbucket \u003d self.params.query_params.destination_bucket\n\tsite \u003d self.params.query_params.destination_site\n\tif bucket and site:\n\t\tfrom AWS.s3 import S3Manager\n\t\tfrom helper.helper import sanitize_tree\n\t\tfrom pprint import pformat\n\t\t\n\t\tapi_stage \u003d \u0027prod\u0027\n\t\tusername \u003d self.session.props.auth.user.userName\n\t\tapi_region_name \u003d self.view.custom.api_region_name\n\t\t\n\t\ts3m \u003d S3Manager(api_stage, api_region_name, username)\n\t\tsuffix \u003d self.custom.destination_view_suffix\n\t\tfiles \u003d sanitize_tree(s3m.fetch_object_list_by_site_and_bucket(site, bucket))\n\t\treturn [{\u0027value\u0027: x[\u0027Filename\u0027].replace(suffix,\u0027\u0027), \n\t\t\t\t\u0027label\u0027: x[\u0027Filename\u0027].replace(suffix,\u0027\u0027)} for x in files]\n\treturn []", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.destination_view_suffix": { + "binding": { + "config": { + "path": "view.params.query_params.destination_bucket" + }, + "transforms": [ + { + "code": "\tif value:\n\t\tstage_config \u003d self.custom.stage_config\n\t\tif value \u003d\u003d stage_config.get(\u0027repo_bucket\u0027, None):\n\t\t\treturn \".svg\"\n\t\tif value \u003d\u003d stage_config.get(\"source_bucket\", None):\n\t\t\treturn \".drawio\"\n\treturn value", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.destination_whid_options": { + "binding": { + "config": { + "path": "view.params.query_params.destination_bucket" + }, + "transforms": [ + { + "code": "\tif value:\n\t\tfrom AWS.s3 import S3Manager\n\t\t\n\t\tapi_stage \u003d \u0027prod\u0027\n\t\tusername \u003d self.session.props.auth.user.userName\n\t\tapi_region_name \u003d self.custom.api_region_name\n\t\t\n\t\ts3m \u003d S3Manager(\u0027prod\u0027, api_region_name, username)\n\t\t\n\t\treturn [{\u0027value\u0027: x, \u0027label\u0027: x} for x in s3m.fetch_site_list(value)]\n\treturn []", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.error_occurred_options": { + "persistent": true + }, + "custom.operation_options": { + "binding": { + "config": { + "expression": "1" + }, + "transforms": [ + { + "code": "\tfrom AWS.s3 import OPERATION_MAP\n\treturn [{\u0027value\u0027:k, \u0027label\u0027:k.replace(\u0027_\u0027,\u0027 \u0027).title()} \n\t\t\tfor k,v in OPERATION_MAP.iteritems()\n\t\t\tif v.get(\u0027method\u0027, \u0027\u0027) in (\u0027PUT\u0027, \u0027POST\u0027, \u0027DELETE\u0027)\n\t\t\tand k not in (\u0027query_audit_table\u0027, )]", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.source_view_options_by_site_and_bucket": { + "binding": { + "config": { + "expression": "{view.params.query_params.source_site}+{view.params.query_params.source_bucket}" + }, + "transforms": [ + { + "code": "\tbucket \u003d self.params.query_params.source_bucket\n\tsite \u003d self.params.query_params.source_site\n\tif bucket and site:\n\t\tfrom AWS.s3 import S3Manager\n\t\tfrom helper.helper import sanitize_tree\n\t\tfrom pprint import pformat\n\t\t\n\t\tapi_stage \u003d \u0027prod\u0027\n\t\tusername \u003d self.session.props.auth.user.userName\n\t\tapi_region_name \u003d self.view.custom.api_region_name\n\t\t\n\t\ts3m \u003d S3Manager(api_stage, api_region_name, username)\n\t\tsuffix \u003d self.custom.source_view_suffix\n\t\tfiles \u003d sanitize_tree(s3m.fetch_object_list_by_site_and_bucket(site, bucket))\n\t\treturn [{\u0027value\u0027: x[\u0027Filename\u0027].replace(suffix,\u0027\u0027), \n\t\t\t\t\u0027label\u0027: x[\u0027Filename\u0027].replace(suffix,\u0027\u0027)} for x in files]\n\treturn []", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.source_view_suffix": { + "binding": { + "config": { + "path": "view.params.query_params.source_bucket" + }, + "transforms": [ + { + "code": "\tif value:\n\t\tstage_config \u003d self.custom.stage_config\n\t\tif value \u003d\u003d stage_config.get(\u0027repo_bucket\u0027, None):\n\t\t\treturn \".svg\"\n\t\tif value \u003d\u003d stage_config.get(\"source_bucket\", None):\n\t\t\treturn \".drawio\"\n\treturn value", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.source_whid_options": { + "binding": { + "config": { + "path": "view.params.query_params.source_bucket" + }, + "transforms": [ + { + "code": "\tif value:\n\t\tfrom AWS.s3 import S3Manager\n\t\t\n\t\tapi_stage \u003d \u0027prod\u0027\n\t\tusername \u003d self.session.props.auth.user.userName\n\t\tapi_region_name \u003d self.custom.api_region_name\n\t\t\n\t\ts3m \u003d S3Manager(\u0027prod\u0027, api_region_name, username)\n\t\t\n\t\treturn [{\u0027value\u0027: x, \u0027label\u0027: x} for x in s3m.fetch_site_list(value)]\n\treturn []", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.stage_config": { + "binding": { + "config": { + "expression": "{view.custom.api_region_name}" + }, + "transforms": [ + { + "code": "\treturn AWS.s3.STAGE_CONFIG[\u0027prod\u0027][value]", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "params.query_params": { + "onChange": { + "enabled": null, + "script": "\tif not missedEvents and origin in (\u0027Binding\u0027, \u0027Script\u0027, \u0027BindingWriteback\u0027):\n\t\tpayload \u003d currentValue.value\n\t\tsystem.perspective.sendMessage(\u0027audit_table_query_params_changed\u0027, payload, scope\u003d\u0027session\u0027)\n\t\t" + }, + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 600 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "shrink": 0 + }, + "props": { + "style": { + "borderStyle": "none", + "classes": "Framework/Card/Title_transparent" + }, + "text": "Select Query Params" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# reset query params to default values \n\t# (stored in `view.custom.default_query_params`)\n\tself.view.params.query_params \u003d self.view.custom.default_query_params" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button", + "tooltip": { + "enabled": true, + "location": "bottom-right", + "text": "Clear Selections" + } + }, + "position": { + "shrink": 0 + }, + "props": { + "image": { + "icon": { + "path": "material/clear_all" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# refresh audit table query via message handler\n\tsystem.perspective.sendMessage(\u0027refresh_audit_table_data\u0027, scope\u003d\u0027session\u0027)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Refresh Button", + "tooltip": { + "enabled": true, + "location": "bottom-right", + "text": "Refresh Data" + } + }, + "position": { + "shrink": 0 + }, + "props": { + "image": { + "icon": { + "path": "material/refresh" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "grow": 1 + }, + "props": { + "justify": "flex-end" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer Header" + }, + "position": { + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Title_transparent", + "marginBottom": "2px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Operation" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": "view.custom.operation_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.operation" + }, + "type": "property" + } + } + }, + "props": { + "dropdownOptionStyle": { + "overflowWrap": "break-word", + "whiteSpace": "normal" + }, + "multiSelect": true, + "showClearIcon": true + }, + "type": "ia.input.dropdown" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.operation \u003d None\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.operation})\r\n\u0026\u0026{view.params.query_params.operation}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Operation" + }, + "position": { + "basis": "335px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Copy Option" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": "view.custom.copy_option_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.copy_option" + }, + "type": "property" + } + } + }, + "props": { + "dropdownOptionStyle": { + "overflowWrap": "break-word", + "whiteSpace": "normal" + }, + "showClearIcon": true + }, + "type": "ia.input.dropdown" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.copy_option \u003d None\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.copy_option})\r\n\u0026\u0026{view.params.query_params.copy_option}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Copy Option", + "visible": false + }, + "position": { + "basis": "335px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Username" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "TextField" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.username" + }, + "type": "property" + } + } + }, + "props": { + "placeholder": "Enter username..." + }, + "type": "ia.input.text-field" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.username \u003d None\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.username})\r\n\u0026\u0026{view.params.query_params.username}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Username" + }, + "position": { + "basis": "335px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Error Occurred?" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": "view.custom.error_occurred_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.error_occurred" + }, + "type": "property" + } + } + }, + "props": { + "dropdownOptionStyle": { + "overflowWrap": "break-word", + "whiteSpace": "normal" + }, + "showClearIcon": true + }, + "type": "ia.input.dropdown" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.error_occurred \u003d None\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.error_occurred})\r\n\u0026\u0026{view.params.query_params.error_occurred}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Error Occurred" + }, + "position": { + "basis": "335px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Dest. Bucket" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": "view.custom.bucket_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.destination_bucket" + }, + "type": "property" + } + } + }, + "props": { + "dropdownOptionStyle": { + "overflowWrap": "break-word", + "whiteSpace": "normal" + }, + "showClearIcon": true + }, + "type": "ia.input.dropdown" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.destination_bucket \u003d None\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.destination_bucket})\r\n\u0026\u0026{view.params.query_params.destination_bucket}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Destination Bucket" + }, + "position": { + "basis": "335px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Source Bucket" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": "view.custom.bucket_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.source_bucket" + }, + "type": "property" + } + } + }, + "props": { + "dropdownOptionStyle": { + "overflowWrap": "break-word", + "whiteSpace": "normal" + }, + "showClearIcon": true + }, + "type": "ia.input.dropdown" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.source_bucket \u003d None\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.source_bucket})\r\n\u0026\u0026{view.params.query_params.source_bucket}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Source Bucket" + }, + "position": { + "basis": "335px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Dest. Site" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.destination_bucket})\r\n\u0026\u0026len({view.params.query_params.destination_bucket})\u003e0" + }, + "type": "expr" + } + }, + "props.options": { + "binding": { + "config": { + "path": "view.custom.destination_whid_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.destination_site" + }, + "type": "property" + } + } + }, + "props": { + "dropdownOptionStyle": { + "overflowWrap": "break-word", + "whiteSpace": "normal" + }, + "showClearIcon": true + }, + "type": "ia.input.dropdown" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.destination_site \u003d None\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.destination_site})\r\n\u0026\u0026{view.params.query_params.destination_site}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Destination Site" + }, + "position": { + "basis": "335px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Source Site" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.source_bucket})\r\n\u0026\u0026len({view.params.query_params.source_bucket})\u003e0" + }, + "type": "expr" + } + }, + "props.options": { + "binding": { + "config": { + "path": "view.custom.source_whid_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.source_site" + }, + "type": "property" + } + } + }, + "props": { + "dropdownOptionStyle": { + "overflowWrap": "break-word", + "whiteSpace": "normal" + }, + "showClearIcon": true + }, + "type": "ia.input.dropdown" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.source_site \u003d None\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.source_site})\r\n\u0026\u0026{view.params.query_params.source_site}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Source Site" + }, + "position": { + "basis": "335px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_2" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Dest. View" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "len({view.custom.destination_view_options_by_site_and_bucket})\u003e0" + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.destination_bucket})\r\n\u0026\u0026len({view.params.query_params.destination_bucket})\u003e0\r\n\u0026\u0026!isNull({view.params.query_params.destination_site})\r\n\u0026\u0026len({view.params.query_params.destination_site})\u003e0" + }, + "type": "expr" + } + }, + "props.options": { + "binding": { + "config": { + "path": "view.custom.destination_view_options_by_site_and_bucket" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.destination_view" + }, + "type": "property" + } + } + }, + "props": { + "dropdownOptionStyle": { + "overflowWrap": "break-word", + "whiteSpace": "normal" + }, + "showClearIcon": true + }, + "type": "ia.input.dropdown" + }, + { + "meta": { + "name": "TextField" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "len({view.custom.destination_view_options_by_site_and_bucket})\u003d0" + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.destination_bucket})\r\n\u0026\u0026len({view.params.query_params.destination_bucket})\u003e0\r\n\u0026\u0026!isNull({view.params.query_params.destination_site})\r\n\u0026\u0026len({view.params.query_params.destination_site})\u003e0" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.destination_view" + }, + "type": "property" + } + } + }, + "props": { + "placeholder": "Enter View..." + }, + "type": "ia.input.text-field" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.destination_view \u003d \u0027\u0027\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.destination_view})\r\n\u0026\u0026{view.params.query_params.destination_view}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Destination View" + }, + "position": { + "basis": "335px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Source View" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "len({view.custom.source_view_options_by_site_and_bucket})\u003e0" + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.source_bucket})\r\n\u0026\u0026len({view.params.query_params.source_bucket})\u003e0\r\n\u0026\u0026!isNull({view.params.query_params.source_site})\r\n\u0026\u0026len({view.params.query_params.source_site})\u003e0" + }, + "type": "expr" + } + }, + "props.options": { + "binding": { + "config": { + "path": "view.custom.source_view_options_by_site_and_bucket" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.source_view" + }, + "type": "property" + } + } + }, + "props": { + "dropdownOptionStyle": { + "overflowWrap": "break-word", + "whiteSpace": "normal" + }, + "multiSelect": true, + "showClearIcon": true + }, + "type": "ia.input.dropdown" + }, + { + "meta": { + "name": "TextField" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "len({view.custom.source_view_options_by_site_and_bucket})\u003d0" + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.source_bucket})\r\n\u0026\u0026len({view.params.query_params.source_bucket})\u003e0\r\n\u0026\u0026!isNull({view.params.query_params.source_site})\r\n\u0026\u0026len({view.params.query_params.source_site})\u003e0" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.source_view" + }, + "type": "property" + } + } + }, + "props": { + "placeholder": "Enter View..." + }, + "type": "ia.input.text-field" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.source_view \u003d \u0027\u0027\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.source_view})\r\n\u0026\u0026{view.params.query_params.source_view}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Source View" + }, + "position": { + "basis": "335px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_3" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Start Time" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "DateTimeInput" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "props.value": { + "binding": { + "config": { + "path": "view.params.query_params.start_time" + }, + "transforms": [ + { + "code": "\tif value:\n\t\ttry:\n\t\t\treturn system.date.parse(value, \u0027yyyy-MM-dd HH:mm:ss\u0027)\n\t\texcept:\n\t\t\treturn None\n\treturn value", + "type": "script" + } + ], + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tif not missedEvents and origin in (\u0027Browser\u0027,):\n\t\tif currentValue.value:\n\t\t\tdt \u003d currentValue.value\n\t\t\tdt_str \u003d system.date.format(dt, \u0027yyyy-MM-dd HH:mm:ss\u0027)\n\t\t\tself.view.params.query_params.start_time \u003d dt_str" + } + } + }, + "props": { + "format": "YYYY-MM-DD HH:mm:ss", + "formattedValue": null, + "placeholder": "Select start time" + }, + "type": "ia.input.date-time-input" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.start_time \u003d None\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.start_time})\r\n\u0026\u0026{view.params.query_params.start_time}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Start Time" + }, + "position": { + "basis": "335px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "End Time" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "DateTimeInput" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "props.value": { + "binding": { + "config": { + "path": "view.params.query_params.end_time" + }, + "transforms": [ + { + "code": "\tif value:\n\t\ttry:\n\t\t\treturn system.date.parse(value, \u0027yyyy-MM-dd HH:mm:ss\u0027)\n\t\texcept:\n\t\t\treturn None\n\treturn value", + "type": "script" + } + ], + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tif not missedEvents and origin in (\u0027Browser\u0027,):\n\t\tif currentValue.value:\n\t\t\tdt \u003d currentValue.value\n\t\t\tdt_str \u003d system.date.format(dt, \u0027yyyy-MM-dd HH:mm:ss\u0027)\n\t\t\tself.view.params.query_params.end_time \u003d dt_str" + } + } + }, + "props": { + "format": "YYYY-MM-DD HH:mm:ss", + "formattedValue": null, + "placeholder": "Select end time" + }, + "type": "ia.input.date-time-input" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.end_time \u003d None\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.end_time})\r\n\u0026\u0026{view.params.query_params.end_time}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "End Time" + }, + "position": { + "basis": "335px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_4" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/copy/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/copy/resource.json new file mode 100644 index 0000000..e90dc0b --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/copy/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "de6caa97b915c7345ca2436f9b302d5ce8c30843587e3c09e00b6e0494689951" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/copy/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/copy/thumbnail.png new file mode 100644 index 0000000..9ef8a5a Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/copy/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/copy/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/copy/view.json new file mode 100644 index 0000000..8cca7fc --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/copy/view.json @@ -0,0 +1,2552 @@ +{ + "custom": { + "bucket": "maps.c4.rme.logistics.a2z.com-441697794360", + "current_flow_view": "AFE 1 MINISORTER", + "current_stage": "prod", + "enabled_whids": [ + "ABQ1", + "AGS1", + "AMA1", + "AUS2", + "BDL4", + "BOS3", + "DEN4", + "DEN8", + "DET3", + "DET6", + "ELP1", + "FAR1", + "FAT2", + "FOE1", + "FSD1", + "FTW5", + "FWA6", + "GEG2", + "HOU6", + "HOU8", + "HSV1", + "ICT2", + "IGQ1", + "IGQ2", + "ILG1", + "LFT1", + "LIT1", + "LIT2", + "LUK2", + "MLI1", + "MQY1", + "MTN1", + "OKC2", + "ORD5", + "ORF3", + "PAE2", + "RIC4", + "ROC1", + "SAN3", + "SAT3", + "SAT4", + "SAV4", + "SCK6", + "SMF6", + "STL3", + "SYR1", + "TEB4", + "TLH2", + "TPA4", + "TYS1", + "YEG2", + "YOO1", + "YOW3" + ], + "flow_view": "AFE 1 MINISORTER", + "flow_view_copy_operation": null, + "flow_view_copy_option": "both", + "flow_view_copy_tooltip": "", + "flow_view_destination": "AFE 1 MINISORTER", + "flow_view_destination_options": [ + { + "label": "AFE 1 MINISORTER", + "value": "AFE 1 MINISORTER" + }, + { + "label": "AFE TRAY SORTERS", + "value": "AFE TRAY SORTERS" + }, + { + "label": "AR FIELD", + "value": "AR FIELD" + }, + { + "label": "EMPTY TOTE LANES", + "value": "EMPTY TOTE LANES" + }, + { + "label": "INBOUND SORTER", + "value": "INBOUND SORTER" + }, + { + "label": "OUTBOUND", + "value": "OUTBOUND" + }, + { + "label": "PACK", + "value": "PACK" + }, + { + "label": "RSP LEVEL 2", + "value": "RSP LEVEL 2" + }, + { + "label": "RSP LEVEL 3", + "value": "RSP LEVEL 3" + }, + { + "label": "RSP LEVEL 4", + "value": "RSP LEVEL 4" + }, + { + "label": "RSP LEVEL 5", + "value": "RSP LEVEL 5" + }, + { + "label": "SHIP SORTER", + "value": "SHIP SORTER" + }, + { + "label": "SMARTPAC", + "value": "SMARTPAC" + }, + { + "label": "TOTE SORTER", + "value": "TOTE SORTER" + }, + { + "label": "TRANSHIP SORTER", + "value": "TRANSHIP SORTER" + }, + { + "label": "WASTE", + "value": "WASTE" + } + ], + "flow_view_edit_mode": { + "active": false, + "admin_enabled": true, + "enabled": true, + "reviewer_enabled": true, + "sadmin_enabled": false + }, + "flow_view_file_suffix": "_FlowView.svg", + "flow_view_options": [ + { + "label": "AFE 1 MINISORTER", + "value": "AFE 1 MINISORTER" + }, + { + "label": "AFE TRAY SORTERS", + "value": "AFE TRAY SORTERS" + }, + { + "label": "AR FIELD", + "value": "AR FIELD" + }, + { + "label": "EMPTY TOTE LANES", + "value": "EMPTY TOTE LANES" + }, + { + "label": "INBOUND SORTER", + "value": "INBOUND SORTER" + }, + { + "label": "OUTBOUND", + "value": "OUTBOUND" + }, + { + "label": "PACK", + "value": "PACK" + }, + { + "label": "RSP LEVEL 2", + "value": "RSP LEVEL 2" + }, + { + "label": "RSP LEVEL 3", + "value": "RSP LEVEL 3" + }, + { + "label": "RSP LEVEL 4", + "value": "RSP LEVEL 4" + }, + { + "label": "RSP LEVEL 5", + "value": "RSP LEVEL 5" + }, + { + "label": "SHIP SORTER", + "value": "SHIP SORTER" + }, + { + "label": "SMARTPAC", + "value": "SMARTPAC" + }, + { + "label": "TOTE SORTER", + "value": "TOTE SORTER" + }, + { + "label": "TRANSHIP SORTER", + "value": "TRANSHIP SORTER" + }, + { + "label": "WASTE", + "value": "WASTE" + } + ], + "flow_view_source": "AFE 1 MINISORTER", + "flow_view_source_options": [ + { + "label": "AFE 1 MINISORTER", + "value": "AFE 1 MINISORTER" + }, + { + "label": "AFE TRAY SORTERS", + "value": "AFE TRAY SORTERS" + }, + { + "label": "AR FIELD", + "value": "AR FIELD" + }, + { + "label": "EMPTY TOTE LANES", + "value": "EMPTY TOTE LANES" + }, + { + "label": "INBOUND SORTER", + "value": "INBOUND SORTER" + }, + { + "label": "OUTBOUND", + "value": "OUTBOUND" + }, + { + "label": "PACK", + "value": "PACK" + }, + { + "label": "RSP LEVEL 2", + "value": "RSP LEVEL 2" + }, + { + "label": "RSP LEVEL 3", + "value": "RSP LEVEL 3" + }, + { + "label": "RSP LEVEL 4", + "value": "RSP LEVEL 4" + }, + { + "label": "RSP LEVEL 5", + "value": "RSP LEVEL 5" + }, + { + "label": "SHIP SORTER", + "value": "SHIP SORTER" + }, + { + "label": "SMARTPAC", + "value": "SMARTPAC" + }, + { + "label": "TOTE SORTER", + "value": "TOTE SORTER" + }, + { + "label": "TRANSHIP SORTER", + "value": "TRANSHIP SORTER" + }, + { + "label": "WASTE", + "value": "WASTE" + } + ], + "instances_file_prefix": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/", + "instances_file_suffix": ".json", + "instances_files": [ + { + "ETag": "\"d5ab88e5aac79f0270c4df38fc76211b\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/AFE 1 MINISORTER.json", + "LastModified": "2023-07-06 19:13:31", + "Size": 169491, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"2d52b3ac56baf2c347b3cc5a83b3ba41\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/AFE TRAY SORTERS.json", + "LastModified": "2023-07-06 19:11:33", + "Size": 52706, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"aef77756bf27a4660051d2965d7238b4\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/AR FIELD.json", + "LastModified": "2023-07-08 01:54:18", + "Size": 459044, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"d4824a32702674453e14ea98e98a0392\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/EMPTY TOTE LANES.json", + "LastModified": "2023-07-06 19:08:48", + "Size": 30929, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"0dc3e31b34b442cc8a32611766ad829b\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/INBOUND SORTER.json", + "LastModified": "2023-07-07 14:56:13", + "Size": 85953, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"31678c5ee092b6cd6b066fcfe34d0637\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/OUTBOUND.json", + "LastModified": "2023-07-08 01:53:03", + "Size": 217082, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"897aed13d0ecb923a0642251375ee2e4\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/PACK.json", + "LastModified": "2023-07-07 14:51:27", + "Size": 96022, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"6b66dcbf14174ef5cb4488beb9c6b95d\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/RSP LEVEL 2.json", + "LastModified": "2023-07-07 14:46:03", + "Size": 38208, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"03e388834bcb2960fd20a81ba93be712\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/RSP LEVEL 3.json", + "LastModified": "2023-07-07 14:46:21", + "Size": 38439, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"96b1d70d6b14e9f9a03cbf1fde7f3258\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/RSP LEVEL 4.json", + "LastModified": "2023-07-07 14:46:34", + "Size": 38333, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"6c8b4a21227a76151bfca40c25abc186\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/RSP LEVEL 5.json", + "LastModified": "2023-07-07 14:46:46", + "Size": 38273, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"f2c10f54de8dbc30179f8cef737825ec\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/SHIP SORTER.json", + "LastModified": "2023-07-06 19:10:26", + "Size": 25374, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"99d01fcc3f3c62e32c5a4c98b320b91f\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/SMARTPAC.json", + "LastModified": "2023-07-06 19:07:29", + "Size": 19099, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"7a117bc9cf00e644518b06981e736f52\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/TOTE SORTER.json", + "LastModified": "2023-07-07 14:41:36", + "Size": 82727, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"32c23ced5bb7a4ff7d0f166f85f006dd\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/TRANSHIP SORTER.json", + "LastModified": "2023-07-08 01:47:48", + "Size": 13327, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"f0e92545033d5f070cd8884c7a16dac1\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/WASTE.json", + "LastModified": "2023-07-08 01:47:36", + "Size": 7784, + "StorageClass": "STANDARD" + } + ], + "loading": false, + "migrate_enabled": false, + "selected_flow_view": "OUTBOUND", + "site_files": [ + { + "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/", + "LastModified": "2023-06-22 15:10:22", + "Size": 0, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"3b31b83ba6617e83ef2a98edcedf9d9d\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/AFE 1 MINISORTER_FlowView.svg", + "LastModified": "2023-07-06 19:13:31", + "Size": 319635, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"db37b5cb4a0a74b4a46e3c65f968fbbf\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/AFE TRAY SORTERS_FlowView.svg", + "LastModified": "2023-07-06 19:11:33", + "Size": 105788, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"cdd14f701d2256a26ecad94e7c118f30\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/AR FIELD_FlowView.svg", + "LastModified": "2023-07-08 01:54:18", + "Size": 448282, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"4086b694863b38489bd980a40a3d686e\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/EMPTY TOTE LANES_FlowView.svg", + "LastModified": "2023-07-06 19:08:47", + "Size": 47625, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"9974714836554c5aa21683db6d7190a8\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/INBOUND SORTER_FlowView.svg", + "LastModified": "2023-07-07 14:56:13", + "Size": 170813, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"e86f2757a16dce8aa9160b4508f06257\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/OUTBOUND_FlowView.svg", + "LastModified": "2023-07-08 01:53:03", + "Size": 410568, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"8f64bed5643c9db4f7c0a57d506fe819\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/PACK_FlowView.svg", + "LastModified": "2023-07-07 14:51:27", + "Size": 185917, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"f1e70ba02a7b9e66a6391b67fd4a9166\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/RSP LEVEL 2_FlowView.svg", + "LastModified": "2023-07-07 14:46:03", + "Size": 105170, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"35aa4d02852470107a6af6a5ca87e7d3\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/RSP LEVEL 3_FlowView.svg", + "LastModified": "2023-07-07 14:46:21", + "Size": 105126, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"f47a62e8f45dc6d322a242ef7a12612a\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/RSP LEVEL 4_FlowView.svg", + "LastModified": "2023-07-07 14:46:34", + "Size": 105122, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"496a0b6c937eef0bb3fd62a4e35b98da\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/RSP LEVEL 5_FlowView.svg", + "LastModified": "2023-07-07 14:46:46", + "Size": 105118, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"8f8b7b0fff1b9fb3c6f04b6a8a3ddc7e\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/SHIP SORTER_FlowView.svg", + "LastModified": "2023-07-06 19:10:26", + "Size": 67640, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"e8f87755974bd51d7e9b287daa1e9c57\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/SMARTPAC_FlowView.svg", + "LastModified": "2023-07-06 19:07:28", + "Size": 36300, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"2923edb101a98c30ad62429ac22d423c\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/TOTE SORTER_FlowView.svg", + "LastModified": "2023-07-07 14:41:36", + "Size": 167519, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"6ec75cac9a4da963f90fa05e765c67e5\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/TRANSHIP SORTER_FlowView.svg", + "LastModified": "2023-07-08 01:47:48", + "Size": 39505, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"62b9a05376699daab936fe799139435f\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/WASTE_FlowView.svg", + "LastModified": "2023-07-08 01:47:36", + "Size": 19002, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/", + "LastModified": "2023-06-22 15:10:28", + "Size": 0, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"d5ab88e5aac79f0270c4df38fc76211b\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/AFE 1 MINISORTER.json", + "LastModified": "2023-07-06 19:13:31", + "Size": 169491, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"2d52b3ac56baf2c347b3cc5a83b3ba41\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/AFE TRAY SORTERS.json", + "LastModified": "2023-07-06 19:11:33", + "Size": 52706, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"aef77756bf27a4660051d2965d7238b4\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/AR FIELD.json", + "LastModified": "2023-07-08 01:54:18", + "Size": 459044, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"d4824a32702674453e14ea98e98a0392\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/EMPTY TOTE LANES.json", + "LastModified": "2023-07-06 19:08:48", + "Size": 30929, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"0dc3e31b34b442cc8a32611766ad829b\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/INBOUND SORTER.json", + "LastModified": "2023-07-07 14:56:13", + "Size": 85953, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"31678c5ee092b6cd6b066fcfe34d0637\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/OUTBOUND.json", + "LastModified": "2023-07-08 01:53:03", + "Size": 217082, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"897aed13d0ecb923a0642251375ee2e4\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/PACK.json", + "LastModified": "2023-07-07 14:51:27", + "Size": 96022, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"6b66dcbf14174ef5cb4488beb9c6b95d\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/RSP LEVEL 2.json", + "LastModified": "2023-07-07 14:46:03", + "Size": 38208, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"03e388834bcb2960fd20a81ba93be712\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/RSP LEVEL 3.json", + "LastModified": "2023-07-07 14:46:21", + "Size": 38439, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"96b1d70d6b14e9f9a03cbf1fde7f3258\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/RSP LEVEL 4.json", + "LastModified": "2023-07-07 14:46:34", + "Size": 38333, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"6c8b4a21227a76151bfca40c25abc186\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/RSP LEVEL 5.json", + "LastModified": "2023-07-07 14:46:46", + "Size": 38273, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"f2c10f54de8dbc30179f8cef737825ec\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/SHIP SORTER.json", + "LastModified": "2023-07-06 19:10:26", + "Size": 25374, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"99d01fcc3f3c62e32c5a4c98b320b91f\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/SMARTPAC.json", + "LastModified": "2023-07-06 19:07:29", + "Size": 19099, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"7a117bc9cf00e644518b06981e736f52\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/TOTE SORTER.json", + "LastModified": "2023-07-07 14:41:36", + "Size": 82727, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"32c23ced5bb7a4ff7d0f166f85f006dd\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/TRANSHIP SORTER.json", + "LastModified": "2023-07-08 01:47:48", + "Size": 13327, + "StorageClass": "STANDARD" + }, + { + "ETag": "\"f0e92545033d5f070cd8884c7a16dac1\"", + "Key": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/instance_configs/WASTE.json", + "LastModified": "2023-07-08 01:47:36", + "Size": 7784, + "StorageClass": "STANDARD" + } + ], + "site_folder": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/", + "site_folder_destination": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/", + "site_folder_source": "na-rme-scada-maps-hc/FlowViews-prod/YEG2/", + "stage_destination": "prod", + "stage_map": { + "alpha": { + "endpoint": "https://alpha.rmesdflowview.c4.rme.amazon.dev/", + "region": "us-west-2" + }, + "beta": { + "endpoint": "https://beta.rmesdflowview.c4.rme.amazon.dev/", + "region": "us-east-1" + }, + "prod": { + "endpoint": "https://rmesdflowview.c4.rme.amazon.dev/", + "region": "us-east-2" + } + }, + "stage_options": [ + { + "label": "Prod", + "value": "prod" + }, + { + "label": "Beta", + "value": "beta" + }, + { + "label": "Alpha", + "value": "alpha" + } + ], + "stage_source": "prod", + "title_text": "FlowView Management", + "whid": "YEG2", + "whid_destination": "YEG2", + "whid_destination_options": [ + { + "label": "ABQ1", + "value": "ABQ1" + }, + { + "label": "AGS1", + "value": "AGS1" + }, + { + "label": "AMA1", + "value": "AMA1" + }, + { + "label": "AUS2", + "value": "AUS2" + }, + { + "label": "BDL4", + "value": "BDL4" + }, + { + "label": "BOS3", + "value": "BOS3" + }, + { + "label": "DEN4", + "value": "DEN4" + }, + { + "label": "DEN8", + "value": "DEN8" + }, + { + "label": "DET3", + "value": "DET3" + }, + { + "label": "DET6", + "value": "DET6" + }, + { + "label": "ELP1", + "value": "ELP1" + }, + { + "label": "FAR1", + "value": "FAR1" + }, + { + "label": "FAT2", + "value": "FAT2" + }, + { + "label": "FOE1", + "value": "FOE1" + }, + { + "label": "FSD1", + "value": "FSD1" + }, + { + "label": "FTW5", + "value": "FTW5" + }, + { + "label": "FWA6", + "value": "FWA6" + }, + { + "label": "GEG2", + "value": "GEG2" + }, + { + "label": "HOU6", + "value": "HOU6" + }, + { + "label": "HOU8", + "value": "HOU8" + }, + { + "label": "HSV1", + "value": "HSV1" + }, + { + "label": "ICT2", + "value": "ICT2" + }, + { + "label": "IGQ1", + "value": "IGQ1" + }, + { + "label": "IGQ2", + "value": "IGQ2" + }, + { + "label": "ILG1", + "value": "ILG1" + }, + { + "label": "LFT1", + "value": "LFT1" + }, + { + "label": "LIT1", + "value": "LIT1" + }, + { + "label": "LIT2", + "value": "LIT2" + }, + { + "label": "LUK2", + "value": "LUK2" + }, + { + "label": "MLI1", + "value": "MLI1" + }, + { + "label": "MQY1", + "value": "MQY1" + }, + { + "label": "MTN1", + "value": "MTN1" + }, + { + "label": "OKC2", + "value": "OKC2" + }, + { + "label": "ORD5", + "value": "ORD5" + }, + { + "label": "ORF3", + "value": "ORF3" + }, + { + "label": "PAE2", + "value": "PAE2" + }, + { + "label": "RIC4", + "value": "RIC4" + }, + { + "label": "ROC1", + "value": "ROC1" + }, + { + "label": "SAN3", + "value": "SAN3" + }, + { + "label": "SAT3", + "value": "SAT3" + }, + { + "label": "SAT4", + "value": "SAT4" + }, + { + "label": "SAV4", + "value": "SAV4" + }, + { + "label": "SCK6", + "value": "SCK6" + }, + { + "label": "SMF6", + "value": "SMF6" + }, + { + "label": "STL3", + "value": "STL3" + }, + { + "label": "SYR1", + "value": "SYR1" + }, + { + "label": "TEB4", + "value": "TEB4" + }, + { + "label": "TLH2", + "value": "TLH2" + }, + { + "label": "TPA4", + "value": "TPA4" + }, + { + "label": "TYS1", + "value": "TYS1" + }, + { + "label": "YEG2", + "value": "YEG2" + }, + { + "label": "YOO1", + "value": "YOO1" + }, + { + "label": "YOW3", + "value": "YOW3" + } + ], + "whid_options": [ + { + "label": "ABQ1", + "value": "ABQ1" + }, + { + "label": "AGS1", + "value": "AGS1" + }, + { + "label": "AMA1", + "value": "AMA1" + }, + { + "label": "AUS2", + "value": "AUS2" + }, + { + "label": "BDL4", + "value": "BDL4" + }, + { + "label": "BOS3", + "value": "BOS3" + }, + { + "label": "DEN4", + "value": "DEN4" + }, + { + "label": "DEN8", + "value": "DEN8" + }, + { + "label": "DET3", + "value": "DET3" + }, + { + "label": "DET6", + "value": "DET6" + }, + { + "label": "ELP1", + "value": "ELP1" + }, + { + "label": "FAR1", + "value": "FAR1" + }, + { + "label": "FAT2", + "value": "FAT2" + }, + { + "label": "FOE1", + "value": "FOE1" + }, + { + "label": "FSD1", + "value": "FSD1" + }, + { + "label": "FTW5", + "value": "FTW5" + }, + { + "label": "FWA6", + "value": "FWA6" + }, + { + "label": "GEG2", + "value": "GEG2" + }, + { + "label": "HOU6", + "value": "HOU6" + }, + { + "label": "HOU8", + "value": "HOU8" + }, + { + "label": "HSV1", + "value": "HSV1" + }, + { + "label": "ICT2", + "value": "ICT2" + }, + { + "label": "IGQ1", + "value": "IGQ1" + }, + { + "label": "IGQ2", + "value": "IGQ2" + }, + { + "label": "ILG1", + "value": "ILG1" + }, + { + "label": "LFT1", + "value": "LFT1" + }, + { + "label": "LIT1", + "value": "LIT1" + }, + { + "label": "LIT2", + "value": "LIT2" + }, + { + "label": "LUK2", + "value": "LUK2" + }, + { + "label": "MLI1", + "value": "MLI1" + }, + { + "label": "MQY1", + "value": "MQY1" + }, + { + "label": "MTN1", + "value": "MTN1" + }, + { + "label": "OKC2", + "value": "OKC2" + }, + { + "label": "ORD5", + "value": "ORD5" + }, + { + "label": "ORF3", + "value": "ORF3" + }, + { + "label": "PAE2", + "value": "PAE2" + }, + { + "label": "RIC4", + "value": "RIC4" + }, + { + "label": "ROC1", + "value": "ROC1" + }, + { + "label": "SAN3", + "value": "SAN3" + }, + { + "label": "SAT3", + "value": "SAT3" + }, + { + "label": "SAT4", + "value": "SAT4" + }, + { + "label": "SAV4", + "value": "SAV4" + }, + { + "label": "SCK6", + "value": "SCK6" + }, + { + "label": "SMF6", + "value": "SMF6" + }, + { + "label": "STL3", + "value": "STL3" + }, + { + "label": "SYR1", + "value": "SYR1" + }, + { + "label": "TEB4", + "value": "TEB4" + }, + { + "label": "TLH2", + "value": "TLH2" + }, + { + "label": "TPA4", + "value": "TPA4" + }, + { + "label": "TYS1", + "value": "TYS1" + }, + { + "label": "YEG2", + "value": "YEG2" + }, + { + "label": "YOO1", + "value": "YOO1" + }, + { + "label": "YOW3", + "value": "YOW3" + } + ], + "whid_source": "YEG2", + "whid_source_options": [ + { + "label": "ABQ1", + "value": "ABQ1" + }, + { + "label": "AGS1", + "value": "AGS1" + }, + { + "label": "AMA1", + "value": "AMA1" + }, + { + "label": "AUS2", + "value": "AUS2" + }, + { + "label": "BDL4", + "value": "BDL4" + }, + { + "label": "BOS3", + "value": "BOS3" + }, + { + "label": "DEN4", + "value": "DEN4" + }, + { + "label": "DEN8", + "value": "DEN8" + }, + { + "label": "DET3", + "value": "DET3" + }, + { + "label": "DET6", + "value": "DET6" + }, + { + "label": "ELP1", + "value": "ELP1" + }, + { + "label": "FAR1", + "value": "FAR1" + }, + { + "label": "FAT2", + "value": "FAT2" + }, + { + "label": "FOE1", + "value": "FOE1" + }, + { + "label": "FSD1", + "value": "FSD1" + }, + { + "label": "FTW5", + "value": "FTW5" + }, + { + "label": "FWA6", + "value": "FWA6" + }, + { + "label": "GEG2", + "value": "GEG2" + }, + { + "label": "HOU6", + "value": "HOU6" + }, + { + "label": "HOU8", + "value": "HOU8" + }, + { + "label": "HSV1", + "value": "HSV1" + }, + { + "label": "ICT2", + "value": "ICT2" + }, + { + "label": "IGQ1", + "value": "IGQ1" + }, + { + "label": "IGQ2", + "value": "IGQ2" + }, + { + "label": "ILG1", + "value": "ILG1" + }, + { + "label": "LFT1", + "value": "LFT1" + }, + { + "label": "LIT1", + "value": "LIT1" + }, + { + "label": "LIT2", + "value": "LIT2" + }, + { + "label": "LUK2", + "value": "LUK2" + }, + { + "label": "MLI1", + "value": "MLI1" + }, + { + "label": "MQY1", + "value": "MQY1" + }, + { + "label": "MTN1", + "value": "MTN1" + }, + { + "label": "OKC2", + "value": "OKC2" + }, + { + "label": "ORD5", + "value": "ORD5" + }, + { + "label": "ORF3", + "value": "ORF3" + }, + { + "label": "PAE2", + "value": "PAE2" + }, + { + "label": "RIC4", + "value": "RIC4" + }, + { + "label": "ROC1", + "value": "ROC1" + }, + { + "label": "SAN3", + "value": "SAN3" + }, + { + "label": "SAT3", + "value": "SAT3" + }, + { + "label": "SAT4", + "value": "SAT4" + }, + { + "label": "SAV4", + "value": "SAV4" + }, + { + "label": "SCK6", + "value": "SCK6" + }, + { + "label": "SMF6", + "value": "SMF6" + }, + { + "label": "STL3", + "value": "STL3" + }, + { + "label": "SYR1", + "value": "SYR1" + }, + { + "label": "TEB4", + "value": "TEB4" + }, + { + "label": "TLH2", + "value": "TLH2" + }, + { + "label": "TPA4", + "value": "TPA4" + }, + { + "label": "TYS1", + "value": "TYS1" + }, + { + "label": "YEG2", + "value": "YEG2" + }, + { + "label": "YOO1", + "value": "YOO1" + }, + { + "label": "YOW3", + "value": "YOW3" + } + ] + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\t# initialize form via message handler\n\tsystem.perspective.sendMessage(\u0027request_initialize_form\u0027, scope\u003d\u0027view\u0027)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "selected_flow_view": "OUTBOUND", + "selected_site": "MTN1", + "selected_stage": "prod" + }, + "propConfig": { + "custom.bucket": { + "binding": { + "config": { + "path": "session.custom.flow_view_config.site_config.s3.bucket_name" + }, + "type": "property" + }, + "persistent": true + }, + "custom.current_flow_view": { + "binding": { + "config": { + "path": "session.custom.flow_view_config.site_config.selected_flow_view" + }, + "type": "property" + }, + "persistent": true + }, + "custom.current_stage": { + "binding": { + "config": { + "path": "session.custom.flow_view_config.stage_config.stage" + }, + "type": "property" + }, + "persistent": true + }, + "custom.enabled_whids": { + "binding": { + "config": { + "path": "session.custom.flow_view_config.site_config.enabled_whids" + }, + "type": "property" + }, + "persistent": true + }, + "custom.flow_view": { + "binding": { + "config": { + "path": "session.custom.flow_view_config.site_config.selected_flow_view" + }, + "type": "property" + }, + "persistent": true + }, + "custom.flow_view_copy_operation": { + "binding": { + "config": { + "expression": "if(isNull({view.custom.stage_source})||!len({view.custom.stage_source})\r\n\t||isNull({view.custom.stage_destination})||!len({view.custom.stage_destination})\r\n//\t||{view.custom.stage_source}\u003d{view.custom.stage_destination}\r\n\t||({view.custom.stage_source}\u003d{view.custom.stage_destination}\r\n\t\t\u0026\u0026{view.custom.whid_source}\u003d{view.custom.whid_destination}\r\n\t\t\u0026\u0026{view.custom.flow_view_source}\u003d{view.custom.flow_view_destination})\r\n\t,null,\r\n\tif({view.custom.whid_source}\u003d\u0027ALL\u0027,\u0027migrate_stages\u0027,\r\n\tif({view.custom.whid_source}\u003d{view.custom.whid_destination}\r\n\t\t\u0026\u0026{view.custom.flow_view_source}\u003d\u0027ALL\u0027,\u0027migrate_stages\u0027,\r\n\tif({view.custom.flow_view_source}\u003d\u0027ALL\u0027,\u0027migrate_sites\u0027,\r\n\t\u0027migrate_flowviews\u0027))))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.flow_view_copy_option": { + "persistent": true + }, + "custom.flow_view_copy_tooltip": { + "binding": { + "config": { + "expression": "{view.custom.stage_source}+{view.custom.stage_destination}\r\n+{view.custom.whid_source}+{view.custom.whid_destination}\r\n+{view.custom.flow_view_source}+{view.custom.flow_view_destination}\r\n+{view.custom.flow_view_copy_operation}+{view.custom.flow_view_copy_option}" + }, + "transforms": [ + { + "code": "\toperation \u003d self.custom.flow_view_copy_operation\n\tif not operation:\n\t\treturn \u0027\u0027\n\tsrc_stage \u003d self.custom.stage_source\n\tdest_stage \u003d self.custom.stage_destination\n\tsrc_whid \u003d self.custom.whid_source\n\tdest_whid \u003d self.custom.whid_destination\n\tsrc_flowview \u003d self.custom.flow_view_source\n\tdest_flowview \u003d self.custom.flow_view_destination\n\tcopy_option \u003d self.custom.flow_view_copy_option\n\tmsg \u003d \u0027\u0027\n\tif operation \u003d\u003d \u0027migrate_stages\u0027:\n\t\tmsg \u003d (\u0027Migrate all flow view files for whid: %s \\n\u0027\n\t\t\t\u0027From %s stage to %s stage? \\n\u0027\n\t\t\t\u0027This operation may take several minutes\u0027) % (\n\t\t\tsrc_whid, src_stage, dest_stage)\n\telif operation \u003d\u003d \u0027migrate_sites\u0027:\n\t\tmsg \u003d (\u0027Migrate all flow view files for whid: %s to whid: %s \\n\u0027\n\t\t\t\u0027From %s stage to %s stage? \\n\u0027\n\t\t\t\u0027This operation may take several minutes\u0027) % (\n\t\t\tsrc_whid, dest_whid, src_stage, dest_stage)\n\telif operation \u003d\u003d \u0027migrate_flowviews\u0027:\n\t\tif copy_option \u003d\u003d \u0027both\u0027:\n\t\t\tcopy_prompt \u003d \u0027both svg image and config json files\u0027\n\t\telif copy_option \u003d\u003d \u0027svg\u0027:\n\t\t\tcopy_prompt \u003d \u0027svg image file\u0027\n\t\telse:\n\t\t\tcopy_prompt \u003d \u0027config json file\u0027\n\t\tmsg \u003d (\u0027Copy %s for flowview: %s to flowview: %s \\n\u0027\n\t\t\t\u0027From whid: %s to whid: %s \\n\u0027\n\t\t\t\u0027From %s stage to %s stage?\u0027) % (\n\t\t\tcopy_prompt, src_flowview, dest_flowview, \n\t\t\tsrc_whid, dest_whid, src_stage, dest_stage)\n\treturn msg", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.flow_view_destination": { + "persistent": true + }, + "custom.flow_view_destination_options": { + "binding": { + "config": { + "expression": "{view.custom.bucket}+{view.custom.site_folder_destination}" + }, + "transforms": [ + { + "code": "\tfrom s3 import S3API\n\tbucket \u003d self.custom.bucket\n\tprefix \u003d self.custom.site_folder_destination\n\tstage \u003d self.custom.current_stage\n\tusername \u003d self.session.props.auth.user.userName\n\t# DEVNOTE 2023-04-21: force API call to prod\n#\ts3m \u003d S3API(stage, username)\n\t# fetch all files in site folder\n\ts3m \u003d S3API(\u0027prod\u0027, username)\n\tsite_files \u003d s3m.list_objects(prefix\u003dprefix, bucket\u003dbucket)\n\t# parse out flow-view files from the site files\n\tsuffix \u003d self.custom.flow_view_file_suffix\n\tflow_view_files \u003d [x for x in site_files if x[\u0027Key\u0027].startswith(prefix) \n\t\t\t\t\t\tand x[\u0027Key\u0027].endswith(suffix)]\n\t# build-out options from flow-view files, prepending with \u0027ALL\u0027 if user is sadmin\n\tif self.custom.flow_view_edit_mode.sadmin_enabled:\n\t\toptions \u003d [{\u0027value\u0027: \u0027ALL\u0027, \u0027label\u0027: \u0027ALL\u0027}]\n\telse:\n\t\toptions \u003d []\n\toptions.extend([{\u0027value\u0027: x[\u0027Key\u0027].replace(prefix,\u0027\u0027).replace(suffix,\u0027\u0027), \n\t\t\t\u0027label\u0027: x[\u0027Key\u0027].replace(prefix,\u0027\u0027).replace(suffix,\u0027\u0027)} \n\t\t\tfor x in flow_view_files])\n\treturn options", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.flow_view_edit_mode": { + "binding": { + "config": { + "path": "session.custom.flow_view_config.edit_mode" + }, + "type": "property" + }, + "persistent": true + }, + "custom.flow_view_file_suffix": { + "binding": { + "config": { + "path": "session.custom.flow_view_config.site_config.s3.flow_view_file_suffix" + }, + "type": "property" + }, + "persistent": true + }, + "custom.flow_view_files": { + "binding": { + "config": { + "path": "view.custom.site_files" + }, + "transforms": [ + { + "code": "\tprefix \u003d self.custom.site_folder\n\tsuffix \u003d self.custom.flow_view_file_suffix\n\treturn [x for x in value \n\t\tif x.Key.startswith(prefix) and x.Key.endswith(suffix)]", + "type": "script" + } + ], + "type": "property" + } + }, + "custom.flow_view_options": { + "binding": { + "config": { + "path": "view.custom.flow_view_files" + }, + "transforms": [ + { + "code": "\tprefix \u003d self.custom.site_folder\n\tsuffix \u003d self.custom.flow_view_file_suffix\n\tif self.custom.flow_view_edit_mode.sadmin_enabled:\n\t\toptions \u003d [{\u0027value\u0027: \u0027ALL\u0027, \u0027label\u0027: \u0027ALL\u0027}]\n\telse:\n\t\toptions \u003d []\n\toptions.extend([{\u0027value\u0027: x.Key.replace(prefix,\u0027\u0027).replace(suffix,\u0027\u0027), \n\t\t\t\u0027label\u0027: x.Key.replace(prefix,\u0027\u0027).replace(suffix,\u0027\u0027)} \n\t\t\tfor x in value])\n\treturn options", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.flow_view_source": { + "persistent": true + }, + "custom.flow_view_source_options": { + "binding": { + "config": { + "expression": "{view.custom.bucket}+{view.custom.site_folder_source}" + }, + "transforms": [ + { + "code": "\tfrom s3 import S3API\n\tbucket \u003d self.custom.bucket\n\tprefix \u003d self.custom.site_folder_source\n\tstage \u003d self.custom.current_stage\n\tusername \u003d self.session.props.auth.user.userName\n\t# DEVNOTE 2023-04-21: force API call to prod\n#\ts3m \u003d S3API(stage, username)\n\t# fetch all files in site folder\n\ts3m \u003d S3API(\u0027prod\u0027, username)\n\tsite_files \u003d s3m.list_objects(prefix\u003dprefix, bucket\u003dbucket)\n\t# parse out flow-view files from the site files\n\tsuffix \u003d self.custom.flow_view_file_suffix\n\tflow_view_files \u003d [x for x in site_files if x[\u0027Key\u0027].startswith(prefix) \n\t\t\t\t\t\tand x[\u0027Key\u0027].endswith(suffix)]\n\t# build-out options from flow-view files, prepending with \u0027ALL\u0027 if user is sadmin\n\tif self.custom.flow_view_edit_mode.sadmin_enabled:\n\t\toptions \u003d [{\u0027value\u0027: \u0027ALL\u0027, \u0027label\u0027: \u0027ALL\u0027}]\n\telse:\n\t\toptions \u003d []\n\toptions.extend([{\u0027value\u0027: x[\u0027Key\u0027].replace(prefix,\u0027\u0027).replace(suffix,\u0027\u0027), \n\t\t\t\u0027label\u0027: x[\u0027Key\u0027].replace(prefix,\u0027\u0027).replace(suffix,\u0027\u0027)} \n\t\t\tfor x in flow_view_files])\n\treturn options", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.instances_file_prefix": { + "binding": { + "config": { + "expression": "stringFormat(\u0027%sinstance_configs/\u0027,{view.custom.site_folder})" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.instances_file_suffix": { + "persistent": true + }, + "custom.instances_files": { + "binding": { + "config": { + "path": "view.custom.site_files" + }, + "transforms": [ + { + "code": "\tprefix \u003d self.custom.instances_file_prefix\n\tsuffix \u003d self.custom.instances_file_suffix\n\treturn [x for x in value \n\t\tif x.Key.startswith(prefix) and x.Key.endswith(suffix)]", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.loading": { + "persistent": true + }, + "custom.migrate_enabled": { + "binding": { + "config": { + "expression": "!isNull({view.custom.flow_view_copy_operation})\r\n\u0026\u0026\r\n({view.custom.flow_view_edit_mode.sadmin_enabled}\r\n||({view.custom.flow_view_edit_mode.admin_enabled}\r\n\t\u0026\u0026{view.custom.flow_view_copy_operation}\u003d\u0027migrate_flowviews\u0027)\r\n)" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.selected_flow_view": { + "persistent": true + }, + "custom.site_files": { + "binding": { + "config": { + "expression": "{view.custom.bucket}+{view.custom.site_folder}" + }, + "transforms": [ + { + "code": "\tfrom s3 import S3API\n\tbucket \u003d self.custom.bucket\n\tobj_key \u003d self.custom.site_folder\n\tstage \u003d self.custom.current_stage\n\tusername \u003d self.session.props.auth.user.userName\n\t# DEVNOTE 2023-04-21: force API call to prod\n#\ts3m \u003d S3API(stage, username)\n\ts3m \u003d S3API(\u0027prod\u0027, username)\n\treturn s3m.list_objects(prefix\u003dobj_key, bucket\u003dbucket)", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.site_folder": { + "binding": { + "config": { + "path": "session.custom.flow_view_config.site_config.s3.site_obj_prefix" + }, + "type": "property" + }, + "persistent": true + }, + "custom.site_folder_destination": { + "binding": { + "config": { + "expression": "stringFormat(\u0027na-rme-scada-maps-hc/FlowViews-%s/%s/\u0027,\r\n\t{view.custom.stage_destination},{view.custom.whid_destination})" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.site_folder_source": { + "binding": { + "config": { + "expression": "stringFormat(\u0027na-rme-scada-maps-hc/FlowViews-%s/%s/\u0027,\r\n\t{view.custom.stage_source},{view.custom.whid_source})" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.stage_destination": { + "persistent": true + }, + "custom.stage_map": { + "binding": { + "config": { + "path": "session.custom.flow_view_config.stage_config.map" + }, + "type": "property" + }, + "persistent": true + }, + "custom.stage_options": { + "binding": { + "config": { + "path": "view.custom.stage_map" + }, + "transforms": [ + { + "code": "\treturn [{\u0027value\u0027: x, \u0027label\u0027: x.capitalize()} for x in value]", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.stage_source": { + "persistent": true + }, + "custom.title_text": { + "persistent": true + }, + "custom.whid": { + "binding": { + "config": { + "path": "session.custom.flow_view_config.site_config.whid" + }, + "type": "property" + }, + "persistent": true + }, + "custom.whid_destination": { + "persistent": true + }, + "custom.whid_destination_options": { + "binding": { + "config": { + "path": "view.custom.stage_destination" + }, + "transforms": [ + { + "code": "\tfrom s3 import S3API\n\tusername \u003d self.session.props.auth.user.userName\n\t# DEVNOTE 2023-04-21: force API call to prod\n#\ts3m \u003d S3API(api_stage\u003dvalue, username\u003dusername)\n\ts3m \u003d S3API(\u0027prod\u0027, username)\n\tbucket \u003d self.custom.bucket\n\treturn s3m.fetch_site_list_by_stage(bucket, value)\n\t", + "type": "script" + }, + { + "code": "\tif self.custom.flow_view_edit_mode.sadmin_enabled:\n\t\toptions \u003d [{\u0027value\u0027: \u0027ALL\u0027, \u0027label\u0027: \u0027ALL\u0027}]\n\telse:\n\t\toptions \u003d []\n\toptions.extend([{\u0027value\u0027: x, \u0027label\u0027: x} for x in value])\n\treturn options", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.whid_options": { + "binding": { + "config": { + "path": "view.custom.enabled_whids" + }, + "transforms": [ + { + "code": "\tif self.custom.flow_view_edit_mode.sadmin_enabled:\n\t\toptions \u003d [{\u0027value\u0027: \u0027ALL\u0027, \u0027label\u0027: \u0027ALL\u0027}]\n\telse:\n\t\toptions \u003d []\n\toptions.extend([{\u0027value\u0027: x, \u0027label\u0027: x} for x in value])\n\treturn options\n", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.whid_source": { + "persistent": true + }, + "custom.whid_source_options": { + "binding": { + "config": { + "path": "view.custom.stage_source" + }, + "transforms": [ + { + "code": "\tfrom s3 import S3API\n\tusername \u003d self.session.props.auth.user.userName\n\t# DEVNOTE 2023-04-21: force API call to prod\n#\ts3m \u003d S3API(api_stage\u003dvalue, username\u003dusername)\n\ts3m \u003d S3API(\u0027prod\u0027, username)\n\tbucket \u003d self.custom.bucket\n\treturn s3m.fetch_site_list_by_stage(bucket, value)\n\t", + "type": "script" + }, + { + "code": "\tif self.custom.flow_view_edit_mode.sadmin_enabled:\n\t\toptions \u003d [{\u0027value\u0027: \u0027ALL\u0027, \u0027label\u0027: \u0027ALL\u0027}]\n\telse:\n\t\toptions \u003d []\n\toptions.extend([{\u0027value\u0027: x, \u0027label\u0027: x} for x in value])\n\treturn options", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "params.selected_flow_view": { + "paramDirection": "input", + "persistent": true + }, + "params.selected_site": { + "paramDirection": "input", + "persistent": true + }, + "params.selected_stage": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 140, + "width": 900 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Source Stage:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown", + "tooltip": { + "location": "bottom", + "style": { + "whiteSpace": "pre" + }, + "text": "Click here to select a different \nstage folder to manage" + } + }, + "position": { + "basis": "150px", + "shrink": 0 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": "view.custom.stage_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.custom.stage_source" + }, + "type": "property" + } + } + }, + "props": { + "search": { + "searchParam": "ou" + }, + "style": { + "margin": "2px", + "marginRight": "5px" + } + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "FlexContainer Source" + }, + "position": { + "basis": "50%", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Destination Stage:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown", + "tooltip": { + "location": "bottom", + "style": { + "whiteSpace": "pre" + }, + "text": "Click here to select a different \nstage folder to manage" + } + }, + "position": { + "basis": "150px", + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "{view.custom.flow_view_edit_mode.admin_enabled}\r\n||{view.custom.flow_view_edit_mode.sadmin_enabled}" + }, + "type": "expr" + } + }, + "props.options": { + "binding": { + "config": { + "path": "view.custom.stage_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.custom.stage_destination" + }, + "type": "property" + } + } + }, + "props": { + "search": { + "searchParam": "ou" + }, + "style": { + "margin": "2px", + "marginRight": "5px" + } + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "FlexContainer Destination" + }, + "position": { + "basis": "50%", + "shrink": 0 + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer Stages" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Source WHID:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown", + "tooltip": { + "location": "bottom", + "style": { + "whiteSpace": "pre" + }, + "text": "Click here to select a different \nstage folder to manage" + } + }, + "position": { + "basis": "150px", + "shrink": 0 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": "view.custom.whid_source_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.custom.whid_source" + }, + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tif not missedEvents and origin \u003d\u003d \u0027Browser\u0027:\n\t\tif currentValue.value:\n\t\t\tself.view.custom.whid_destination \u003d currentValue.value\n\t\t" + } + } + }, + "props": { + "search": { + "searchParam": "smf" + }, + "style": { + "margin": "2px", + "marginRight": "5px" + } + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "FlexContainer Source" + }, + "position": { + "basis": "50%", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Destination WHID:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown", + "tooltip": { + "location": "bottom", + "style": { + "whiteSpace": "pre" + }, + "text": "Click here to select a different \nstage folder to manage" + } + }, + "position": { + "basis": "150px", + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "view.custom.flow_view_edit_mode.sadmin_enabled" + }, + "type": "property" + } + }, + "props.options": { + "binding": { + "config": { + "path": "view.custom.whid_destination_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.custom.whid_destination" + }, + "type": "property" + } + } + }, + "props": { + "search": { + "searchParam": "sm" + }, + "style": { + "margin": "2px", + "marginRight": "5px" + } + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "FlexContainer Destination" + }, + "position": { + "basis": "50%", + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "!isNull({view.custom.whid_source})\r\n\u0026\u0026len({view.custom.whid_source})\r\n\u0026\u0026{view.custom.whid_source}!\u003d\u0027ALL\u0027" + }, + "type": "expr" + } + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer Whids" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Source Flowview:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown", + "tooltip": { + "location": "bottom", + "style": { + "whiteSpace": "pre" + }, + "text": "Click here to select a different \nstage folder to manage" + } + }, + "position": { + "basis": "250px", + "shrink": 0 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": "view.custom.flow_view_source_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.custom.flow_view_source" + }, + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tif not missedEvents and origin \u003d\u003d \u0027Browser\u0027:\n\t\tif currentValue.value:\n\t\t\tself.view.custom.flow_view_destination \u003d currentValue.value\n\t" + } + } + }, + "props": { + "search": { + "searchParam": "ou" + }, + "style": { + "margin": "2px", + "marginRight": "5px" + } + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "FlexContainer Source" + }, + "position": { + "basis": "50%", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Destination Flowview:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown", + "tooltip": { + "location": "bottom", + "style": { + "whiteSpace": "pre" + }, + "text": "Click here to select a different \nstage folder to manage" + } + }, + "position": { + "basis": "250px", + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "view.custom.flow_view_edit_mode.sadmin_enabled" + }, + "type": "property" + } + }, + "props.options": { + "binding": { + "config": { + "path": "view.custom.flow_view_destination_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.custom.flow_view_destination" + }, + "type": "property" + } + } + }, + "props": { + "search": { + "searchParam": "ou" + }, + "style": { + "margin": "2px", + "marginRight": "5px" + } + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "FlexContainer Destination" + }, + "position": { + "basis": "50%", + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "!isNull({view.custom.flow_view_source})\r\n\u0026\u0026len({view.custom.flow_view_source})\r\n\u0026\u0026{view.custom.flow_view_source}!\u003d\u0027ALL\u0027" + }, + "type": "expr" + } + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer Flowviews" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Copy:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "RadioGroup" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "!isNull({view.custom.flow_view_source})\r\n\u0026\u0026len({view.custom.flow_view_source})" + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "expression": "{view.custom.flow_view_edit_mode.admin_enabled}\r\n||{view.custom.flow_view_edit_mode.sadmin_enabled}" + }, + "type": "expr" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.custom.flow_view_copy_option" + }, + "type": "property" + } + } + }, + "props": { + "radioStyle": { + "fontSize": "12px" + }, + "radios": [ + { + "selected": true, + "text": "Both Files", + "value": "both" + }, + { + "selected": false, + "text": "SVG only", + "value": "svg" + }, + { + "selected": false, + "text": "JSON only", + "value": "json" + } + ] + }, + "type": "ia.input.radio-group" + } + ], + "meta": { + "name": "FlexContainer Radios" + }, + "position": { + "basis": "50%", + "shrink": 0 + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.sendMessage(\u0027request_initialize_form\u0027, scope\u003d\u0027view\u0027)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Form" + }, + "position": { + "shrink": 0 + }, + "props": { + "image": { + "icon": { + "path": "material/refresh" + } + }, + "primary": false, + "style": { + "margin": "2px", + "padding": "4px" + }, + "text": "Reset Form" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# call-up the confirm dialog to allow the user to decide if they\n\t# really want to copy/migrate the flow-view files in S3\n\tself.show_confirm_dialog({})" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Copy Files", + "tooltip": { + "enabled": true, + "location": "bottom", + "style": { + "whiteSpace": "pre" + } + } + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "path": "view.custom.flow_view_copy_tooltip" + }, + "type": "property" + } + }, + "props.enabled": { + "binding": { + "config": { + "path": "view.custom.migrate_enabled" + }, + "type": "property" + } + } + }, + "props": { + "image": { + "height": 20, + "icon": { + "path": "material/file_copy" + }, + "width": 20 + }, + "style": { + "margin": "2px", + "padding": "4px" + }, + "text": "Copy Files" + }, + "scripts": { + "customMethods": [ + { + "name": "show_success_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"success\", \n\t\t\"Flow View Files Copied\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"right\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t" + }, + { + "name": "show_warning_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"warning\", \n\t\t\"Flow View Files NOT Copied\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"right\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t\t" + }, + { + "name": "show_error_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"error\", \n\t\t\"Flow View Files Copy Error!\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"right\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t\t" + }, + { + "name": "update_bindings", + "params": [], + "script": "\t\"\"\"\n\t\tAfter data saved to S3, refresh session and view bindings\n\t\"\"\"\n\tself.view.custom.loading \u003d False\n\t\t" + }, + { + "name": "copy_operation", + "params": [], + "script": "\t\"\"\"\n\t\tCall s3.S3API().migrate_*() method using user selections\n\t* \u003d [\u0027stages\u0027, \u0027sites\u0027, \u0027flowviews\u0027] depending on user selections\n\t\"\"\"\n\tfrom s3 import S3API\n\tfrom pprint import pformat\n\tfrom helper.helper import sanitize_tree\n\t\n\tstage \u003d self.session.custom.flow_view_config.stage_config.stage\n\tusername \u003d self.session.props.auth.user.userName\n\t# DEVNOTE 2023-04-21: force API call to prod\n#\ts3m \u003d S3API(stage, username)\n\ts3m \u003d S3API(\u0027prod\u0027, username)\n\t# grab local variables from view custom props\n\tsrc_stage \u003d self.view.custom.stage_source\n\tdest_stage \u003d self.view.custom.stage_destination\n\tsrc_whid \u003d self.view.custom.whid_source\n\tdest_whid \u003d self.view.custom.whid_destination\n\tsrc_flowview \u003d self.view.custom.flow_view_source\n\tdest_flowview \u003d self.view.custom.flow_view_destination\n\tcopy_option \u003d self.view.custom.flow_view_copy_option\n\toperation \u003d self.view.custom.flow_view_copy_operation\n\t# pack up params based on operation selected\n\tparams \u003d {}\n\tif operation \u003d\u003d \u0027migrate_stages\u0027:\n\t\t# Lambda expects None for whid param if migrating all stage folder contents\n\t\tif src_whid \u003d\u003d \u0027ALL\u0027:\n\t\t\tsrc_whid \u003d None\n\t\tparams \u003d {\u0027src_stage\u0027: src_stage, \u0027dest_stage\u0027: dest_stage, \u0027whid\u0027: src_whid}\n\telif operation \u003d\u003d \u0027migrate_sites\u0027:\n\t\tparams \u003d {\u0027src_stage\u0027: src_stage, \u0027dest_stage\u0027: dest_stage,\n\t\t\t\t\t\u0027src_whid\u0027: src_whid, \u0027dest_whid\u0027: dest_whid}\n\telif operation \u003d\u003d \u0027migrate_flowviews\u0027:\n\t\tparams \u003d {\u0027src_stage\u0027: src_stage, \u0027dest_stage\u0027: dest_stage,\n\t\t\t\t\t\u0027src_whid\u0027: src_whid, \u0027dest_whid\u0027: dest_whid,\n\t\t\t\t\t\u0027src_flowview\u0027: src_flowview, \u0027dest_flowview\u0027: dest_flowview,\n\t\t\t\t\t\u0027copy_option\u0027: copy_option}\n\ttry:\n\t\tresp \u003d getattr(s3m, operation)(**params)\n\t\tmsg \u003d pformat(sanitize_tree(resp))\n\t\tsystem.perspective.print(msg)\n\t\tself.show_success_dialog(msg)\n\t\tself.update_bindings()\n\texcept:\n\t\timport traceback\n\t\tmsg \u003d \u0027Error executing %s operation! \\nError: %s\u0027 % (\n\t\t\t\toperation, traceback.format_exc())\n\t\tsystem.perspective.print(msg)\n\t\tself.show_error_dialog(msg)\n\t" + }, + { + "name": "show_confirm_dialog", + "params": [ + "payload\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add payload of data to pass to the popup\n\toperation \u003d self.view.custom.flow_view_copy_operation\n\tsrc_stage \u003d self.view.custom.stage_source\n\tdest_stage \u003d self.view.custom.stage_destination\n\tsrc_whid \u003d self.view.custom.whid_source\n\tdest_whid \u003d self.view.custom.whid_destination\n\tsrc_flowview \u003d self.view.custom.flow_view_source\n\tdest_flowview \u003d self.view.custom.flow_view_destination\n\tcopy_option \u003d self.view.custom.flow_view_copy_option\n\tmsg \u003d \u0027\u0027\n\tif operation \u003d\u003d \u0027migrate_stages\u0027:\n\t\tmsg \u003d (\u0027Migrate all flow view files for whid: %s \\n\u0027\n\t\t\t\u0027From %s stage to %s stage? \\n\u0027\n\t\t\t\u0027This operation may take several minutes\u0027) % (\n\t\t\tsrc_whid, src_stage, dest_stage)\n\telif operation \u003d\u003d \u0027migrate_sites\u0027:\n\t\tmsg \u003d (\u0027Migrate all flow view files for whid: %s to whid: %s \\n\u0027\n\t\t\t\u0027From %s stage to %s stage? \\n\u0027\n\t\t\t\u0027This operation may take several minutes\u0027) % (\n\t\t\tsrc_whid, dest_whid, src_stage, dest_stage)\n\telif operation \u003d\u003d \u0027migrate_flowviews\u0027:\n\t\tif copy_option \u003d\u003d \u0027both\u0027:\n\t\t\tcopy_prompt \u003d \u0027both svg image and config json files\u0027\n\t\telif copy_option \u003d\u003d \u0027svg\u0027:\n\t\t\tcopy_prompt \u003d \u0027svg image file\u0027\n\t\telse:\n\t\t\tcopy_prompt \u003d \u0027config json file\u0027\n\t\tmsg \u003d (\u0027Copy %s for flowview: %s to flowview: %s \\n\u0027\n\t\t\t\u0027From whid: %s to whid: %s \\n\u0027\n\t\t\t\u0027From %s stage to %s stage?\u0027) % (\n\t\t\tcopy_prompt, src_flowview, dest_flowview, \n\t\t\tsrc_whid, dest_whid, src_stage, dest_stage)\n\tpayload \u003d {}\t\t\n\tAlerts.showAlert(\n\t\t\"info\", \n\t\t\"Copy Flow View Files?\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"Continue\", \n\t\t\"Cancel\", \n\t\t\"file_copy\", \n\t\t\"\", \n\t\t\"right\", \n\t\t\"confirm_copy_operation\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\tpayload\n\t)\n\t\t\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "confirm_copy_operation", + "pageScope": true, + "script": "\tsystem.perspective.closePopup(\u0027alertDialog\u0027)\n\t# call the copy_operation custom method\n\tself.copy_operation()\n\t\t", + "sessionScope": true, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer Buttons" + }, + "position": { + "basis": "50%", + "shrink": 0 + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer Controls" + }, + "position": { + "shrink": 0 + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "scripts": { + "customMethods": [ + { + "name": "update_instance_position", + "params": [ + "payload\u003dNone" + ], + "script": "\t\"\"\"\n\t\tupdate instance position based on payload received\n\t:param payload: dict; payload of values to update from message handler\n\t\"\"\"\n\tfrom helper.helper import sanitize_tree\n\tpos_keys \u003d [\u0027top\u0027,\u0027left\u0027,\u0027width\u0027,\u0027height\u0027]\n\tif not isinstance(payload, dict):\n\t\tmsg \u003d \u0027payload to update_instance_position must be a dictionary object!\u0027\n\t\tsystem.perspective.print(msg)\n\t\tself.show_error_dialog(msg)\n\t\treturn\n\tbad_keys \u003d [k for k in payload.keys() if k not in pos_keys]\n\tif len(bad_keys):\n\t\tmsg \u003d (\u0027Invalid keys: %s found in payload, \u0027,\n\t\t\t\t\u0027cannot be applied to instance.position.\\nValid keys: %s\u0027) % (\n\t\t\t\tbad_keys, pos_keys)\n\t\tsystem.perpsective.print(msg)\n\t\tself.show_error_dialog(msg)\n\t\treturn\n\tinstance \u003d sanitize_tree(self.view.params.instance)\n\tinstance.update(payload)\n\tself.view.params.instance \u003d instance\n\t" + }, + { + "name": "show_confirm_dialog", + "params": [], + "script": "\t# ~~ 12 PARAMETERS ~~\n\t\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t\t# show close button\t\t(default \u003d true) boolean\n\t\t# btn text primary\t\t(default \u003d \"Primary\")\n\t\t# btn text secondary\t(default \u003d \"Secondary\")\n\t\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t\n\t\tmsg \u003d \"Update Instance Configuration for MP%s?\" % (self.view.params.instance.viewParams.mhe_id)\n\t\tAlerts.showAlert(\n\t\t\t\"info\", \n\t\t\t\"Update Instance Config?\", \n\t\t\tmsg, \n\t\t\t\"true\",\n\t\t\t\"Continue\", \n\t\t\t\"Cancel\", \n\t\t\t\"chevron_right\", \n\t\t\t\"\", \n\t\t\t\"right\", \n\t\t\t\"confirm_update_instance_config\", \n\t\t\t\"closePopup\", \n\t\t\t\"closePopup\"\n\t\t)\n\t\t" + }, + { + "name": "update_instance_config", + "params": [], + "script": "\t\"\"\"\n\t\tUpdate the instance config on the parent container\n\t\"\"\"\n\tfrom helper.helper import sanitize_tree\n\tfrom pprint import pformat" + }, + { + "name": "show_success_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"success\", \n\t\t\"Instance Updated\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"right\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t" + }, + { + "name": "show_warning_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 12 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\n\tAlerts.showAlert(\n\t\t\"warning\", \n\t\t\"Instance Not Updated\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"right\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\"\n\t)\n\t\t" + }, + { + "name": "show_error_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 12 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\n\tAlerts.showAlert(\n\t\t\"error\", \n\t\t\"Instance Update Error!\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"right\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\"\n\t)\n\t\t" + }, + { + "name": "update_bindings", + "params": [], + "script": "\tself.view.custom.loading \u003d False\n\t\t" + }, + { + "name": "initialize_form", + "params": [], + "script": "\t# initialize flow-view selections\n\tselected_flow_view \u003d self.session.custom.flow_view_config.site_config.selected_flow_view\n\tself.view.custom.flow_view_source \u003d selected_flow_view\n\tself.view.custom.flow_view_destination \u003d selected_flow_view\n\t# initialize WHID selections\n\tselected_whid \u003d self.session.custom.flow_view_config.site_config.whid\n\tself.view.custom.whid_source \u003d selected_whid\n\tself.view.custom.whid_destination \u003d selected_whid\n\t# initialize stage selections\n\tselected_stage \u003d self.session.custom.flow_view_config.stage_config.stage\n\tself.view.custom.stage_source \u003d selected_stage\n\tself.view.custom.stage_destination \u003d selected_stage\n\t# initialize the flow view copy option\n\tself.view.custom.flow_view_copy_option \u003d \u0027both\u0027\n\t\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "request_initialize_form", + "pageScope": false, + "script": "\t# initialize form on call\n\tself.initialize_form()", + "sessionScope": true, + "viewScope": true + } + ] + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/file/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/file/resource.json new file mode 100644 index 0000000..5857212 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/file/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-25T17:46:20Z" + }, + "lastModificationSignature": "810c3d7ef36f8aba8a13423a2ae557768926a41253203e423c3b2a08fe69ea21" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/file/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/file/thumbnail.png new file mode 100644 index 0000000..c4431bb Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/file/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/file/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/file/view.json new file mode 100644 index 0000000..049ccde --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/file/view.json @@ -0,0 +1,2092 @@ +{ + "custom": { + "api_region_name": "eu", + "default_file_config": { + "ETag": "?", + "LastModified": "?", + "Size": 0, + "StorageClass": "?" + }, + "dummy": [], + "file_not_found": true, + "file_options": [], + "loading": false, + "selected_file": "", + "selected_file_config": { + "ETag": "?", + "Filename": ".svg", + "Key": ".svg", + "LastModified": "?", + "Size": 0, + "StorageClass": "?" + }, + "stage_config": { + "account_id": "006306898152", + "api_call_role": "arn:aws:iam::609617486056:role/RMESDScadaS3ManagementAPIcallRole-prod-eu-west-1", + "endpoint": "https://eu-west-1.scada-s3-management.scada.eurme.amazon.dev/", + "lambda_name": "RMESDScadaS3ManagementFlaskLambda-prod", + "region": "eu-west-1", + "repo_bucket": "ignition-image-repo", + "s3_region": "eu-west-1", + "source_bucket": "ignition-image-source" + } + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tself.custom.selected_file \u003d self.params.selected_file" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "bucket": "", + "enables": { + "delete": true, + "download": true, + "file": true, + "object_key": false, + "upload": true + }, + "files": [], + "prefix": "", + "selected_file": "", + "suffix": ".svg", + "upload_file_types": [ + "svg" + ], + "whid": "" + }, + "propConfig": { + "custom.api_region_name": { + "binding": { + "config": { + "path": "session.custom.aws.prefix" + }, + "type": "property" + }, + "persistent": true + }, + "custom.default_file_config": { + "persistent": true + }, + "custom.default_file_config.Filename": { + "binding": { + "config": { + "expression": "{view.params.selected_file}+{view.params.suffix}" + }, + "type": "expr" + } + }, + "custom.default_file_config.Key": { + "binding": { + "config": { + "expression": "{view.params.prefix}+{view.params.selected_file}+{view.params.suffix}" + }, + "type": "expr" + } + }, + "custom.dummy": { + "persistent": true + }, + "custom.file_not_found": { + "binding": { + "config": { + "expression": "{view.custom.selected_file_config.Size}\u003d0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.file_options": { + "binding": { + "config": { + "path": "view.params.files" + }, + "transforms": [ + { + "code": "\tprefix \u003d self.params.prefix\n\tsuffix \u003d self.params.suffix\n\treturn [{\u0027value\u0027: x.Filename, \n\t\t\u0027label\u0027: x.Filename} \n\t\tfor x in value]", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.loading": { + "persistent": true + }, + "custom.selected_file": { + "persistent": true + }, + "custom.selected_file_config": { + "binding": { + "config": { + "expression": "{view.custom.selected_file}+toStr({view.custom.file_options})" + }, + "transforms": [ + { + "code": "\tdef_file_config \u003d self.custom.default_file_config\n\treturn next((x for x in self.params.files if x.Filename \u003d\u003d self.custom.selected_file), def_file_config)", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.stage_config": { + "binding": { + "config": { + "expression": "{view.custom.api_region_name}" + }, + "transforms": [ + { + "code": "\treturn AWS.s3.STAGE_CONFIG[\u0027prod\u0027][value]", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "params.bucket": { + "paramDirection": "input", + "persistent": true + }, + "params.enables": { + "paramDirection": "input", + "persistent": true + }, + "params.files": { + "paramDirection": "input", + "persistent": true + }, + "params.prefix": { + "paramDirection": "input", + "persistent": true + }, + "params.selected_file": { + "onChange": { + "enabled": null, + "script": "\tif not missedEvents:\n\t\tselection \u003d self.getChild(\"root\").getChild(\"FlexContainer\").getChild(\"Table\").props.selection\n\t\tif currentValue.value:\n\t\t\tif not currentValue.value.endswith(self.params.suffix):\n\t\t\t\tself.custom.selected_file \u003d currentValue.value + self.params.suffix\n\t\t\telse:\n\t\t\t\tself.custom.selected_file \u003d currentValue.value\n\t\t\t# now select the correct row in table that matches selection\n\t\t\tfilename \u003d self.custom.selected_file\n\t\t\tselected_row, selected_data \u003d None, []\n\t\t\tfor index, row in enumerate(self.params.files):\n\t\t\t\tif row.Filename \u003d\u003d filename:\n\t\t\t\t\tselected_row \u003d index\n\t\t\t\t\tselected_data.append(row)\n\t\t\t\t\tbreak\n\t\t\tselection.data \u003d selected_data\n\t\t\tselection.selectedRow \u003d selected_row\n\t\telse:\n\t\t\t# file is none, clear out file selection\n\t\t\t# I know, why are we setting to -1, then None? it\u0027s an ignition persp table bug\n\t\t\t# as of 8.1.20. It works...\n\t\t\tselection.selectedRow \u003d -1\n\t\t\tselection.selectedColumn \u003d -1\n\t\t\tselection.selectedRow \u003d None\n\t\t\tselection.selectedColumn \u003d None\n\t" + }, + "paramDirection": "input", + "persistent": true + }, + "params.suffix": { + "paramDirection": "input", + "persistent": true + }, + "params.upload_file_types": { + "paramDirection": "input", + "persistent": true + }, + "params.whid": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 600, + "width": 550 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Select File:" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# when user selects new file, send message to update selected image on parent view\n\tif self.props.value:\n\t\tsuffix \u003d self.view.params.suffix\n\t\tselected_image \u003d self.props.value.replace(suffix, \u0027\u0027)\n\t\tpayload \u003d {\u0027image\u0027: selected_image}\n\t\tsystem.perspective.sendMessage(\u0027update_selected_image\u0027, payload, scope\u003d\u0027session\u0027)\n\t\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Dropdown", + "tooltip": { + "location": "bottom", + "style": { + "whiteSpace": "pre" + }, + "text": "Click here to select a different \nstage folder to manage" + } + }, + "position": { + "basis": "175px", + "grow": 1, + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "{view.params.enables.file}\u0026\u0026try(len({view.params.files})\u003e0,false)" + }, + "type": "expr" + } + }, + "props.options": { + "binding": { + "config": { + "path": "view.custom.file_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.custom.selected_file" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "margin": "2px", + "marginRight": "5px" + } + }, + "type": "ia.input.dropdown" + }, + { + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "\tself.upload_file(event\u003devent)\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "26px", + "shrink": 0 + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "stringFormat(\u0027Upload new version of %s\u0027,{view.custom.selected_file})" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "expression": "{view.params.enables.upload}\u0026\u0026!{view.custom.file_not_found}" + }, + "type": "expr" + } + }, + "props.supportedFileTypes": { + "binding": { + "config": { + "path": "view.params.upload_file_types" + }, + "type": "property" + } + } + }, + "props": { + "fileSizeLimit": 20, + "fileUploadIcon": { + "style": { + "borderStyle": "none", + "classes": "Input/Button/Secondary_minimal", + "margin": "-5px" + } + }, + "maxUploads": 1 + }, + "scripts": { + "customMethods": [ + { + "name": "update_bindings", + "params": [], + "script": "\t\"\"\"\n\t\tAfter data saved to S3, refresh session and view bindings\n\t\"\"\"\n\t\n\tself.view.custom.loading \u003d False\n\t# reset file upload component to default state\n\tself.clearUploads()\n\t# send message to update files param on parent view\n\tbucket \u003d self.view.params.bucket\n\tsystem.perspective.sendMessage(\u0027update_file_binding\u0027, {\u0027bucket\u0027: bucket}, scope\u003d\u0027session\u0027)\n\t" + }, + { + "name": "show_success_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"success\", \n\t\t\"File Uploaded\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t" + }, + { + "name": "show_warning_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"warning\", \n\t\t\"File NOT Uploaded\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t" + }, + { + "name": "show_error_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"error\", \n\t\t\"File Upload Error!\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t\t" + }, + { + "name": "upload_file", + "params": [ + "event\u003dNone" + ], + "script": "\tfrom AWS.s3 import S3Manager\n\tfrom pprint import pformat\n\tsystem.perspective.print(\u0027FileUpload component upload_file custom method reached...\u0027)\n\tself.view.custom.loading \u003d True\n\ttry:\n\t\tapi_stage \u003d \u0027prod\u0027\n\t\tusername \u003d self.session.props.auth.user.userName\n\t\tapi_region_name \u003d self.view.custom.api_region_name\n\t\tbucket \u003d self.view.params.bucket\n\t\tobj_key \u003d self.view.custom.selected_file_config.Key\n\t\tregion \u003d self.view.custom.stage_config.s3_region\n\t\texisting_filename \u003d self.view.custom.selected_file_config.Filename\n\t\tfilename \u003d event.file.name\n\t\t# verify that uploaded file name matches existing file name. Throw error if not.\n\t\tif filename !\u003d existing_filename:\n\t\t\tmsg \u003d \u0027File uploaded does not have the same name as target object key. Please check spelling and that you selected the correct file to upload. Target filename: %s. Received: %s\u0027 % (\n\t\t\t\t\texisting_filename, filename)\n\t\t\tself.show_error_dialog(msg)\n\t\t\tself.view.custom.loading \u003d False\n\t\t\tself.clearUploads()\n\t\t\treturn\n\t\tsystem.perspective.print(\u0027obj_key to upload: %s\u0027 % obj_key)\n\t\tobj_data \u003d event.file.getString()\n\t\tsystem.perspective.print(\u0027obj_data length: %s\u0027 % len(obj_data))\n\n\t\ts3m \u003d S3Manager(api_stage, api_region_name, username)\n\t\ttry:\n\t\t\tresp \u003d s3m.upload(\n\t\t\t\tobj_data\u003dobj_data,\n\t\t\t\tobj_key\u003dobj_key,\n\t\t\t\tbucket\u003dbucket,\n\t\t\t\tregion\u003dregion\n\t\t\t)\n\t\t\tresp_code \u003d resp.get(\u0027code\u0027, None)\n\t\t\tif (resp_code and resp_code !\u003d 200) or (not resp_code and \u0027message\u0027 in resp):\n\t\t\t\t# this means the API encountered an error, annunciate the error here\n\t\t\t\tmsg \u003d \u0027API encountered error uploading %s to %s bucket. \\nResponse: %s\u0027 % (obj_key, bucket, pformat(resp))\n\t\t\t\tsystem.perspective.print(msg)\n\t\t\t\tself.view.custom.loading \u003d False\n\t\t\t\tself.show_error_dialog(msg)\n\t\t\t\tself.clearUploads()\n\t\t\t\treturn\n\t\t\tmsg \u003d \u0027Successfully uploaded %s object in %s bucket!\\nResponse: %s\u0027 % (obj_key, bucket, pformat(resp))\n\t\t\tsystem.perspective.print(msg)\n\t\t\tself.show_success_dialog(msg)\n\t\t\tself.update_bindings()\n\t\texcept:\n\t\t\timport traceback\n\t\t\tmsg \u003d \u0027Error uploading %s object in %s bucket: %s\u0027 % (obj_key, bucket, traceback.format_exc())\n\t\t\tsystem.perspective.print(msg)\n\t\t\tself.view.custom.loading \u003d False\n\t\t\tself.show_error_dialog(msg)\n\t\t\tself.clearUploads()\n\texcept:\n\t\timport traceback\n\t\tmsg \u003d \u0027General Error uploading %s object in %s bucket: %s\u0027 % (obj_key, bucket, traceback.format_exc())\n\t\tsystem.perspective.print(msg)\n\t\tself.view.custom.loading \u003d False\n\t\tself.show_error_dialog(msg)\n\t\tself.clearUploads()\n\t\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [] + }, + "type": "ia.input.fileupload" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tfrom AWS.s3 import S3Manager\n\tfrom pprint import pformat\n\timport json\n\t\n\tapi_stage \u003d \u0027prod\u0027\n\tusername \u003d self.session.props.auth.user.userName\n\tapi_region_name \u003d self.view.custom.api_region_name\n\tbucket \u003d self.view.params.bucket\n\tobj_key \u003d self.view.custom.selected_file_config.Key\n\tregion \u003d self.view.custom.stage_config.s3_region\n\tfilename \u003d self.view.custom.selected_file_config.Filename\n\t\n\ts3m \u003d S3Manager(api_stage, api_region_name, username)\n\tdata \u003d None\n\ttry:\n\t\tresp \u003d s3m.download(bucket\u003dbucket, obj_key\u003dobj_key, region\u003dregion)\n\t\ttry:\n\t\t\tresp_code \u003d resp.get(\u0027code\u0027, None)\n\t\texcept AttributeError:\n\t\t\tresp_code \u003d None\n\t\tif (resp_code and resp_code !\u003d 200) or (not resp_code and \u0027message\u0027 in resp):\n\t\t\t# this means the API encountered an error, annunciate the error here\n\t\t\tmsg \u003d \u0027API encountered error downloading %s on %s bucket. \\nResponse: %s\u0027 % (obj_key, bucket, pformat(sanitize_tree(resp)))\n\t\t\tsystem.perspective.print(msg)\n\t\t\tself.show_error_dialog(msg)\n\t\t\treturn\n\t\tif isinstance(resp, dict) or isinstance(resp, list):\n\t\t\tdata \u003d json.dumps(resp, indent\u003d2)\n\t\telse:\n\t\t\tdata \u003d resp\n\texcept:\n\t\timport traceback\n\t\tmsg \u003d \u0027error downloading %s obj: %s\u0027 % (obj_key, traceback.format_exc())\n\t\tsystem.perspective.print(msg)\n\t\tself.show_error_dialog(msg)\n\tif data:\n\t\tsystem.perspective.download(filename, data)\n\telse:\n\t\tsystem.perspective.print(\u0027no data for %s obj!\u0027 % obj_key)\n\t\tself.show_error_dialog(msg)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Download Button", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "26px", + "shrink": 0 + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "stringFormat(\u0027Download copy of %s\u0027,{view.custom.selected_file})" + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "expression": "{view.params.enables.download}\u0026\u0026!{view.custom.file_not_found}" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/cloud_download" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal", + "margin": "2px" + }, + "text": "" + }, + "scripts": { + "customMethods": [ + { + "name": "show_error_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"error\", \n\t\t\"File Download Error!\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t\t\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [] + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.show_confirm_dialog()" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Delete Button", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "26px", + "shrink": 0 + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "stringFormat(\u0027Delete record of %s file from %s bucket\u0027,\r\n\t{view.custom.selected_file},{view.params.bucket})" + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "expression": "{view.params.enables.delete}\u0026\u0026!{view.custom.file_not_found}" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/delete_forever" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal", + "margin": "2px" + }, + "text": "" + }, + "scripts": { + "customMethods": [ + { + "name": "show_success_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"success\", \n\t\t\"File Deleted\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t\t" + }, + { + "name": "show_warning_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"warning\", \n\t\t\"File NOT Deleted\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t\t" + }, + { + "name": "show_error_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"error\", \n\t\t\"File Delete Error!\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t\t" + }, + { + "name": "show_confirm_dialog", + "params": [ + "payload\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add payload of data to pass to the popup\n\tmsg \u003d (\u0027Are you sure you want to delete %s file from %s S3 bucket? THIS OPERATION CANNOT BE UNDONE!\u0027) % (\n\t\tself.view.custom.selected_file, self.view.params.bucket)\n\tpayload \u003d {\u0027bucket\u0027: self.view.params.bucket}\t\t\n\tAlerts.showAlert(\n\t\t\"info\", \n\t\t\"Delete from S3?\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"Continue\", \n\t\t\"Cancel\", \n\t\t\"delete_forever\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"confirm_delete_file\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\tpayload\n\t)\n\t\t\t" + }, + { + "name": "update_bindings", + "params": [], + "script": "\t\"\"\"\n\t\tAfter deleted from S3, refresh session and view bindings\n\t\"\"\"\n\tself.view.custom.loading \u003d False\n\t# send message to update files param on parent view\n\tbucket \u003d self.view.params.bucket\n\tsystem.perspective.sendMessage(\u0027update_file_binding\u0027, {\u0027bucket\u0027: bucket}, scope\u003d\u0027session\u0027)\n\t" + }, + { + "name": "delete_file", + "params": [], + "script": "\t\"\"\"\n\t\tCall AWS.s3.S3Manager.delete() method with user selections\n\t\"\"\"\n\tfrom AWS.s3 import S3Manager\n\tfrom pprint import pformat\n\tfrom helper.helper import sanitize_tree\n\t\n\tapi_region_name \u003d self.view.custom.api_region_name\n\tusername \u003d self.session.props.auth.user.userName\n\tself.view.custom.loading \u003d True\n\n\ts3m \u003d S3Manager(\u0027prod\u0027, api_region_name, username)\n\n\tbucket \u003d self.view.params.bucket\n\tobj_key \u003d self.view.custom.selected_file_config.Key\n\toperation \u003d \u0027delete\u0027\n\tparams \u003d {\u0027obj_key\u0027: obj_key, \u0027bucket\u0027: bucket}\n\ttry:\n\t\tresp \u003d getattr(s3m, operation)(**params)\n\t\tresp_code \u003d resp.get(\u0027code\u0027, None)\n\t\tif (resp_code and resp_code !\u003d 200) or (not resp_code and \u0027message\u0027 in resp):\n\t\t\t# this means the API encountered an error, annunciate the error here\n\t\t\tmsg \u003d \u0027API encountered error deleting %s on %s bucket. \\nResponse: %s\u0027 % (obj_key, bucket, pformat(sanitize_tree(resp)))\n\t\t\tsystem.perspective.print(msg)\n\t\t\tself.view.custom.loading \u003d False\n\t\t\tself.show_error_dialog(msg)\n\t\t\treturn\n\t\tmsg \u003d pformat(sanitize_tree(resp))\n\t\tsystem.perspective.print(msg)\n\t\tself.show_success_dialog(msg)\n\t\tself.update_bindings()\n\texcept:\n\t\timport traceback\n\t\tmsg \u003d \u0027Error executing %s operation! \\nError: %s\u0027 % (\n\t\t\t\toperation, traceback.format_exc())\n\t\tsystem.perspective.print(msg)\n\t\tself.view.custom.loading \u003d False\n\t\tself.show_error_dialog(msg)\n\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "confirm_delete_file", + "pageScope": false, + "script": "\tsystem.perspective.closePopup(\u0027alertDialog\u0027)\n\tif payload is not None:\n\t\tbucket_requested \u003d payload.get(\u0027bucket\u0027, None)\n\t\tif bucket_requested and bucket_requested \u003d\u003d self.view.params.bucket:\n\t\t\t# call the delete custom method\n\t\t\tself.delete_file()", + "sessionScope": true, + "viewScope": true + } + ] + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer File Selection" + }, + "position": { + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Cards/Row" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Object Key (uri):" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "label_LeftAlign" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.params.text": { + "binding": { + "config": { + "path": "view.custom.selected_file_config.Key" + }, + "type": "property" + } + } + }, + "props": { + "path": "Objects/Templates/Labels/label_LeftAlign", + "style": { + "classes": "Framework/Card/Value" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer Object Key" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "!{view.custom.file_not_found}" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "Framework/Cards/Row" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Last Modified:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "label_LeftAlign" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.params.text": { + "binding": { + "config": { + "path": "view.custom.selected_file_config.LastModified" + }, + "type": "property" + } + } + }, + "props": { + "path": "Objects/Templates/Labels/label_LeftAlign", + "style": { + "classes": "Framework/Card/Value" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer Last Modified" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "!{view.custom.file_not_found}" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "Framework/Cards/Row" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "File Size (KB):" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "label_LeftAlign" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.params.text": { + "binding": { + "config": { + "expression": "round({view.custom.selected_file_config.Size}/1024.0,2)" + }, + "type": "expr" + } + } + }, + "props": { + "path": "Objects/Templates/Labels/label_LeftAlign", + "style": { + "classes": "Framework/Card/Value" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer File Size" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Storage Class:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "label_LeftAlign" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.params.text": { + "binding": { + "config": { + "path": "view.custom.selected_file_config.StorageClass" + }, + "type": "property" + } + } + }, + "props": { + "path": "Objects/Templates/Labels/label_LeftAlign", + "style": { + "classes": "Framework/Card/Value" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer Storage Class" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer File Detail" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "!{view.custom.file_not_found}" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "Framework/Cards/Row" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# build out the stage, site, flow-view, and copy_option from the object-key in row\n\tobj_key \u003d self.view.custom.selected_file_config.Key\n\tfilename \u003d self.view.custom.selected_file_config.Filename\n\tsuffix \u003d self.view.params.suffix\n\tpath \u003d obj_key.split(\u0027/\u0027)\n\tsite \u003d path[1]\n\tview \u003d filename.replace(suffix,\u0027\u0027)\n\tbucket \u003d self.view.params.bucket\n\t# build out query_params from row values\n\t# view, site, and bucket are multi-select dropdowns so need to be cast as lists\n\tnull \u003d None\n\tquery_params \u003d {\n\t\t\"copy_option\": null,\n\t\t\"destination_bucket\": bucket,\n\t\t\"destination_site\": site,\n\t\t\"destination_view\": view,\n\t\t\"end_time\": null,\n\t\t\"error_occurred\": null,\n\t\t\"operation\": null,\n\t\t\"source_bucket\": null,\n\t\t\"source_site\": null,\n\t\t\"source_view\": null,\n\t\t\"start_time\": null,\n\t\t\"username\": \"\"\n\t}\n\t# Open audit log viewer\n\tview_path \u003d \u0027PopUp-Views/S3/Audit/Log_Viewer\u0027\n\tparams \u003d {\u0027query_params\u0027: query_params}\n\tsystem.perspective.openPopup(\u0027Audit Log Viewer\u0027, view_path, \n\t\t\t\t\t\t\t\tparams, \u0027SCADA S3 Audit Logs\u0027)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Audit Logs Button", + "tooltip": { + "enabled": true, + "location": "bottom", + "text": "View Audit Logs for this file" + } + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!{view.custom.file_not_found}" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/table_view" + } + }, + "primary": false, + "style": { + "margin": "2px", + "paddingLeft": "4px", + "paddingRight": "4px" + }, + "text": "Audit Logs" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# build out the stage, site, flow-view, and copy_option from the object-key in row\n\tobj_key \u003d self.view.custom.selected_file_config.Key\n\tfilename \u003d self.view.custom.selected_file_config.Filename\n\tsuffix \u003d self.view.params.suffix\n\tpath \u003d obj_key.split(\u0027/\u0027)\n\tsite \u003d path[1]\n\tview \u003d filename.replace(suffix,\u0027\u0027)\n\tbucket \u003d self.view.params.bucket\n\t# build out query_params from row values\n\tquery_params \u003d {\n\t\t\"view\": view,\n\t\t\"object_key\": obj_key,\n\t\t\"site\": site,\n\t\t\"bucket\": bucket\n\t}\n\t# Open version history log viewer\n\tview_path \u003d \u0027PopUp-Views/S3/Versions/Log_Viewer\u0027\n\tparams \u003d {\u0027query_params\u0027: query_params}\n\tsystem.perspective.openPopup(\u0027Version Log Viewer\u0027, view_path, \n\t\t\t\t\t\t\t\tparams, \u0027SCADA S3 Version History Log Viewer\u0027)\n\t\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Version History Button", + "tooltip": { + "text": "View Version History for this file" + } + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!{view.custom.file_not_found}" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/history" + } + }, + "primary": false, + "style": { + "margin": "2px", + "paddingLeft": "4px", + "paddingRight": "4px" + }, + "text": "Version History" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "75px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Upload New File:" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onFileReceived": { + "config": { + "script": "\tself.upload_file(event\u003devent)\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FileUpload", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "25%", + "shrink": 0 + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "stringFormat(\u0027Upload new file to %s S3 bucket\u0027,{view.params.bucket})" + }, + "type": "expr" + } + }, + "position.display": { + "binding": { + "config": { + "path": "view.params.enables.upload" + }, + "type": "property" + } + }, + "props.supportedFileTypes": { + "binding": { + "config": { + "path": "view.params.upload_file_types" + }, + "type": "property" + } + } + }, + "props": { + "fileSizeLimit": 100, + "fileUploadIcon": { + "style": { + "classes": "" + } + }, + "maxUploads": 1, + "style": { + "backgroundColor": "var(--neutral-30)", + "borderStyle": "none", + "classes": "FadeInFast, background, background-none", + "cursor": "pointer", + "margin": "2px", + "max-height": "40px", + "overflow": "visible" + } + }, + "scripts": { + "customMethods": [ + { + "name": "update_bindings", + "params": [], + "script": "\t\"\"\"\n\t\tAfter data saved to S3, refresh session and view bindings\n\t\"\"\"\n\t\n\tself.view.custom.loading \u003d False\n\t# reset file upload component to default state\n\tself.clearUploads()\n\t# send message to update files param on parent view\n\tbucket \u003d self.view.params.bucket\n\tsystem.perspective.sendMessage(\u0027update_file_binding\u0027, {\u0027bucket\u0027: bucket}, scope\u003d\u0027session\u0027)\n\t" + }, + { + "name": "show_success_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"success\", \n\t\t\"File Uploaded\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t" + }, + { + "name": "show_warning_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"warning\", \n\t\t\"File NOT Uploaded\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t" + }, + { + "name": "show_error_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"error\", \n\t\t\"File Upload Error!\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t\t" + }, + { + "name": "upload_file", + "params": [ + "event\u003dNone" + ], + "script": "\tfrom AWS.s3 import S3Manager\n\tfrom pprint import pformat\n\t\n\tself.view.custom.loading \u003d True\n\ttry:\n\t\tapi_stage \u003d \u0027prod\u0027\n\t\tusername \u003d self.session.props.auth.user.userName\n\t\tapi_region_name \u003d self.view.custom.api_region_name\n\t\tbucket \u003d self.view.params.bucket\n\t\tdefault_obj_key \u003d self.view.custom.default_file_config.Key\n\t\tdefault_filename \u003d self.view.custom.default_file_config.Filename\n\t\tregion \u003d self.view.custom.stage_config.s3_region\n\t\tfilename \u003d event.file.name\n\t\t# check if file already exists in S3 site folder, throw error if so\n\t\tif any(x.Filename \u003d\u003d filename for x in self.view.params.files):\n\t\t\tmsg \u003d \u0027%s file already exists in the site folder. Please use the upload button next to the file select dropdown or select a new file to upload\u0027 % filename\n\t\t\tself.show_error_dialog(msg)\n\t\t\tself.view.custom.loading \u003d False\n\t\t\tself.clearUploads()\n\t\t\treturn\n\t\tobj_key \u003d default_obj_key.replace(default_filename, filename)\n\t\tobj_data \u003d event.file.getString()\n\t\t\n\t\ts3m \u003d S3Manager(api_stage, api_region_name, username)\n\t\ttry:\n\t\t\tresp \u003d s3m.upload(\n\t\t\t\tobj_data\u003dobj_data,\n\t\t\t\tobj_key\u003dobj_key,\n\t\t\t\tbucket\u003dbucket,\n\t\t\t\tregion\u003dregion\n\t\t\t)\n\t\t\tresp_code \u003d resp.get(\u0027code\u0027, None)\n\t\t\tif (resp_code and resp_code !\u003d 200) or (not resp_code and \u0027message\u0027 in resp):\n\t\t\t\t# this means the API encountered an error, annunciate the error here\n\t\t\t\tmsg \u003d \u0027API encountered error uploading %s to %s bucket. \\nResponse: %s\u0027 % (obj_key, bucket, pformat(resp))\n\t\t\t\tsystem.perspective.print(msg)\n\t\t\t\tself.view.custom.loading \u003d False\n\t\t\t\tself.show_error_dialog(msg)\n\t\t\t\tself.clearUploads()\n\t\t\t\treturn\n\t\t\tmsg \u003d \u0027Successfully uploaded %s object in %s bucket!\\nResponse: %s\u0027 % (obj_key, bucket, pformat(resp))\n\t\t\tsystem.perspective.print(msg)\n\t\t\tself.show_success_dialog(msg)\n\t\t\tself.update_bindings()\n\t\texcept:\n\t\t\timport traceback\n\t\t\tmsg \u003d \u0027Error uploading %s object in %s bucket: %s\u0027 % (obj_key, bucket, traceback.format_exc())\n\t\t\tsystem.perspective.print(msg)\n\t\t\tself.view.custom.loading \u003d False\n\t\t\tself.show_error_dialog(msg)\n\t\t\tself.clearUploads()\n\texcept:\n\t\timport traceback\n\t\tmsg \u003d \u0027General Error uploading %s object in %s bucket: %s\u0027 % (obj_key, bucket, traceback.format_exc())\n\t\tsystem.perspective.print(msg)\n\t\tself.view.custom.loading \u003d False\n\t\tself.show_error_dialog(msg)\n\t\tself.clearUploads()\n\t\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [] + }, + "type": "ia.input.fileupload" + } + ], + "meta": { + "name": "FlexContainer Log Buttons" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Title" + }, + "position": { + "basis": "100%" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "expression": "stringFormat(\u0027%s Object%s\u0027, len({view.params.files}), \r\n\tif(len({view.params.files})\u003d1,\u0027\u0027,\u0027s\u0027))" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "Title/Text", + "fontSize": 14, + "overflow": "visible" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Title" + }, + "position": { + "basis": "50%" + }, + "props": { + "style": { + "fontSize": 1, + "marginLeft": 10, + "overflow": "visible" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "FilterCheck", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "Enable Table Search" + } + }, + "position": { + "basis": "108px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "LEN({..../Table.props.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "checkedIcon": { + "style": { + "fontSize": 16 + } + }, + "indeterminateIcon": { + "style": { + "fontSize": 16 + } + }, + "style": { + "fontSize": 12 + }, + "text": "Search?", + "textPosition": "left", + "uncheckedIcon": { + "style": { + "fontSize": 16 + } + } + }, + "type": "ia.input.checkbox" + }, + { + "meta": { + "name": "Spacer1" + }, + "position": { + "basis": "1px" + }, + "props": { + "style": { + "classes": "General/Divider" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tself.view.custom.selected_file \u003d \u0027\u0027\n\ttable \u003d self.parent.parent.parent.getChild(\"Table\")\n\t# ignition perspective has a bug with table where the only way to \n\t# actually de-select and remove the row highlight is to set the\n\t# row and column to -1 and THEN None\n\t# this will automatically clear the selection.data array\n\ttable.props.selection.selectedRow \u003d -1\n\ttable.props.selection.selectedColumn \u003d -1\n\ttable.props.selection.selectedRow \u003d None\n\ttable.props.selection.selectedColumn \u003d None" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "ClearSelectionButton", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "Clear Selection" + } + }, + "position": { + "basis": "31px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "len({..../Table.props.selection.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "path": "material/clear", + "style": { + "classes": "General/Button" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Spacer2" + }, + "position": { + "basis": "1px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "../ClearSelectionButton.position.display" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "General/Divider" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "draggable": false, + "id": "ColumnSelection", + "modal": true, + "overlayDismiss": true, + "position": { + "relativeLocation": "bottom-left" + }, + "positionType": "relative", + "resizable": true, + "showCloseIcon": true, + "type": "toggle", + "viewParams": { + "Columns": "{/root/FlexContainer/TableHeader/TableActions/ColumnSelectionButton.custom.Columns}" + }, + "viewPath": "Objects/PowerTable/ColumnSelection", + "viewportBound": false + }, + "scope": "C", + "type": "popup" + } + } + }, + "meta": { + "name": "ColumnSelectionButton", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "+/- Columns" + } + }, + "position": { + "basis": "29px" + }, + "propConfig": { + "custom.Columns": { + "binding": { + "config": { + "path": "..../Table.props.columns" + }, + "transforms": [ + { + "code": "\tcolumns \u003d {}\n\tif len(value) \u003e 0:\n\t\tfor column in value:\n\t\t\t#field \u003d column.field\n\t\t\tfield \u003d column.header.title\n\t\t\tif field \u003d\u003d \u0027\u0027:\n\t\t\t\tfield \u003d \u0027None\u0027\n\t\t\tcolumns[field] \u003d column.visible\n\treturn columns", + "type": "script" + } + ], + "type": "property" + } + }, + "position.display": { + "binding": { + "config": { + "expression": "LEN({..../Table.props.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "path": "material/view_column", + "style": { + "classes": "General/Button", + "fontSize": 12, + "marginBottom": 5, + "marginTop": 5 + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Spacer4" + }, + "position": { + "basis": "1px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "LEN({..../Table.props.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "General/Divider" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tself.view.custom.filters.selection_active \u003d not self.view.custom.filters.selection_active" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FilterButton", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "Filter Table" + } + }, + "position": { + "basis": "29px", + "display": false + }, + "props": { + "path": "material/filter_list", + "style": { + "classes": "General/Button", + "fontSize": 12, + "marginBottom": 5, + "marginTop": 5 + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Spacer3" + }, + "position": { + "basis": "1px" + }, + "props": { + "style": { + "classes": "General/Divider" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\n\tcsv_headers \u003d []\n\tcsv_data \u003d []\n\tsystem.perspective.print(\u0027DOWNLOADING TABLE DATA\u0027)\n\tsource_data \u003d self.parent.parent.parent.getChild(\"Table\").props.data\n\theaders \u003d source_data[0].keys()\n\t\n\tif \u0027style\u0027 in headers and \u0027value\u0027 in headers and len(headers) \u003d\u003d 2:\n\t\tdata \u003d [row[\u0027value\u0027] for row in source_data]\n\telse:\n\t\tdata \u003d source_data\n\t\t\n\tfor record in data:\n\t\tif len(csv_headers) \u003d\u003d 0:\n\t\t\tcsv_headers \u003d record.keys()\n\t\t\tcsv_headers.sort()\n\t\t\tcsv_headers \u003d [str(i) for i in csv_headers]\n\t\tcsv_row \u003d []\n\t\tfor index in range(len(record)):\n\t\t\tcsv_row.append(str(record[csv_headers[index]]))\n\t\tcsv_data.append(csv_row)\n\t\n\ttry:\n\t\tcsv_dataset \u003d system.dataset.toDataSet(csv_headers, csv_data)\n\texcept Exception, e:\n\t\tsystem.perspective.print(str(e))\n\tcsv_export \u003d system.dataset.toCSV(csv_dataset)\n\tfilename \u003d \u0027{0}.csv\u0027.format(str(system.date.now()).replace(\u0027 \u0027, \u0027_\u0027))\n\tsystem.perspective.download(filename, csv_export)\n\t\n\tsystem.perspective.print(\u0027DONE DOWNLOADING TABLE DATA\u0027)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "SettingsButton", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "Download Table Contents" + } + }, + "position": { + "basis": "30px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "LEN({..../Table.props.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "path": "material/cloud_download", + "style": { + "classes": "General/Button", + "marginRight": 10 + } + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "TableActions", + "tooltip": { + "location": "top-right" + } + }, + "position": { + "grow": 1 + }, + "props": { + "justify": "flex-end" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "TableHeader" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "space-between", + "style": { + "borderBottomStyle": "solid", + "borderBottomWidth": 1, + "cursor": "pointer" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "component": { + "onSelectionChange": { + "config": { + "script": "\t# validate the selection data is not null\n\tif self.props.selection.data:\n\t\tfilename \u003d self.props.selection.data[0].Filename\n\t\tself.view.custom.selected_file \u003d filename\n\t\t# send message to update selected file on parent container\n\t\tsuffix \u003d self.view.params.suffix\n\t\tpayload \u003d {\u0027image\u0027: filename.replace(suffix, \u0027\u0027)}\n\t\tsystem.perspective.sendMessage(\u0027update_selected_image\u0027, payload, scope\u003d\u0027session\u0027)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Table" + }, + "position": { + "basis": "370px", + "shrink": 0 + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "path": "view.params.files" + }, + "type": "property" + } + }, + "props.filter.enabled": { + "binding": { + "config": { + "path": "../TableHeader/TableActions/FilterCheck.props.selected" + }, + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tif not getattr(currentValue, \u0027value\u0027, None):\n\t\t# clear filter text when filter is disabled\n\t\tself.props.filter.text \u003d \u0027\u0027\n\t\t" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Filename", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Filename" + }, + "justify": "center", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Size", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Size (bytes)" + }, + "justify": "center", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "LastModified", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Last Updated" + }, + "justify": "center", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Key", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Key" + }, + "justify": "center", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "ETag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "ETag" + }, + "justify": "center", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "StorageClass", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Storage Class" + }, + "justify": "center", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + } + ], + "filter": {}, + "style": { + "margin": "10px" + } + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "100%", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "activate-filter", + "pageScope": true, + "script": "\t# implement your handler here\n\tfilter_position \u003d payload[\u0027id\u0027]\n\tsystem.perspective.print(filter_position)\n\tadd \u003d True\n\tfor filter in self.view.custom.filters.active:\n\t\tif filter.id \u003d\u003d filter_position:\n\t\t\tadd \u003d False\n\tif add:\n\t\tfor filter in self.view.custom.filters.deactive:\n\t\t\tif filter.id \u003d\u003d filter_position:\t\t\t\t\n\t\t\t\tself.view.custom.filters.active.append(filter)", + "sessionScope": true, + "viewScope": false + }, + { + "messageType": "deactivate-filter", + "pageScope": true, + "script": "\tfilter_position \u003d payload[\u0027id\u0027]\n\tsystem.perspective.print(filter_position)\n\t\n\tif filter_position \u003d\u003d -1 :\n\t\tself.view.custom.filters.active \u003d []\n\telse:\n\t\tfor index, filter in enumerate(self.view.custom.filters.active):\n\t\t\tif filter.id \u003d\u003d filter_position:\n\t\t\t\tsystem.perspective.print(filter.id)\n\t\t\t\tself.view.custom.filters.active.pop(index)\n\n#\tfor filter in self.view.custom.filter_menu_data:\n#\t\tif filter.filter_id \u003d\u003d filter_position:\n#\t\t\tsystem.perspective.print(filter.filter_id)\n#\t\t\tfilter.active \u003d False\n#\t\t\tbreak", + "sessionScope": true, + "viewScope": false + }, + { + "messageType": "column-visibility", + "pageScope": true, + "script": "\t# implement your handler here\n\ttable_columns \u003d self.getChild(\"FlexContainer\").getChild(\"Table\").props.columns\n\tfor table_column in table_columns:\n\t\t#if payload.keys()[0] \u003d\u003d table_column[\u0027field\u0027]:\n\t\tif payload.keys()[0] \u003d\u003d table_column[\u0027header\u0027][\u0027title\u0027]:\n\t\t\ttable_column.visible \u003d payload.values()[0]", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/manage/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/manage/resource.json new file mode 100644 index 0000000..ec122ac --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/manage/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-25T17:46:20Z" + }, + "lastModificationSignature": "cea27ae891334f89d45de5e45f76f001b03fbb52b369564d42a494879293176e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/manage/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/manage/thumbnail.png new file mode 100644 index 0000000..6c1f3dc Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/manage/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/manage/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/manage/view.json new file mode 100644 index 0000000..c3d30df --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/manage/view.json @@ -0,0 +1,1041 @@ +{ + "custom": { + "api_region_name": "eu", + "developer_user": true, + "enable_add_new_site": true, + "enabled_whids": [ + "DNK7", + "EWR4" + ], + "expanded": false, + "loading": false, + "new_site_is_not_in_S3": true, + "new_site_to_add": "EWR4", + "show_add_new_site": false, + "stage_config": { + "account_id": "006306898152", + "api_call_role": "arn:aws:iam::609617486056:role/RMESDScadaS3ManagementAPIcallRole-prod-eu-west-1", + "endpoint": "https://eu-west-1.scada-s3-management.scada.eurme.amazon.dev/", + "lambda_name": "RMESDScadaS3ManagementFlaskLambda-prod", + "region": "eu-west-1", + "repo_bucket": "ignition-image-repo", + "s3_region": "eu-west-1", + "source_bucket": "ignition-image-source" + }, + "whid": "", + "whids_in_s3": [ + "BOS3", + "BRS1", + "CGN9", + "DAO1", + "DAO3", + "DAR2", + "DBE2", + "DBH3", + "DBI7", + "DBT3", + "DCT7", + "DCT9", + "DCZ3", + "DCZ4", + "DEH1", + "DER1", + "DER2", + "DER3", + "DER5", + "DFV1", + "DHA1", + "DHE3", + "DHE4", + "DHE6", + "DIF2", + "DIF6", + "DIP1", + "DLO1", + "DLO2", + "DLO3", + "DLO4", + "DLO5", + "DLO7", + "DLZ1", + "DLZ2", + "DLZ3", + "DMA3", + "DMA4", + "DMA6", + "DMV1", + "DMV3", + "DMZ2", + "DMZ4", + "DNC1", + "DNC2", + "DNE2", + "DNG2", + "DNM7", + "DNP1", + "DNX3", + "DNZ2", + "DPI3", + "DPU1", + "DRM2", + "DSI2", + "DSO2", + "DSY6", + "DTC2", + "DVN1", + "DVN2", + "DVN5", + "DWN2", + "IST2", + "MAD6", + "MAN2", + "QCB6" + ] + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tself.custom.expanded \u003d False\n\tself.custom.new_site_to_add \u003d self.params.selected_whid" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "enables": {}, + "selected_whid": "EWR4" + }, + "propConfig": { + "custom.api_region_name": { + "binding": { + "config": { + "path": "session.custom.aws.prefix" + }, + "type": "property" + }, + "persistent": true + }, + "custom.developer_user": { + "binding": { + "config": { + "expression": "isAuthorized(false, \u0027Authenticated/Roles/eurme-ignition-developers\u0027)" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.enable_add_new_site": { + "binding": { + "config": { + "expression": "isAuthorized(false, \u0027Authenticated/Roles/rme-c4\u0027, \u0027Authenticated/Roles/narme-ignition-developers\u0027,\r\n\t\t\t\u0027Authenticated/Roles/eurme-ignition-developers\u0027)\r\n" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.enabled_whids": { + "binding": { + "config": { + "expression": "{session.custom.fc}" + }, + "transforms": [ + { + "code": "\tchild_projects \u003d config.project_config.get_child_scada_projects()\n\treturn [x.replace(\u0027_SCADA\u0027,\u0027\u0027) for x in child_projects]", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.expanded": { + "persistent": true + }, + "custom.loading": { + "persistent": true + }, + "custom.new_site_is_not_in_S3": { + "binding": { + "config": { + "expression": "{view.custom.new_site_to_add}+toStr({view.custom.whids_in_s3})" + }, + "transforms": [ + { + "code": "\tnew_site \u003d self.custom.new_site_to_add\n\twhids \u003d self.custom.whids_in_s3\n\tif new_site and new_site not in whids:\n\t\treturn True\n\treturn False", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.new_site_to_add": { + "persistent": true + }, + "custom.show_add_new_site": { + "persistent": true + }, + "custom.stage_config": { + "binding": { + "config": { + "expression": "{view.custom.api_region_name}" + }, + "transforms": [ + { + "code": "\treturn AWS.s3.STAGE_CONFIG[\u0027prod\u0027][value]", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.whid": { + "binding": { + "config": { + "path": "session.custom.fc" + }, + "type": "property" + }, + "persistent": true + }, + "custom.whids_in_s3": { + "binding": { + "config": { + "expression": "{session.custom.fc}" + }, + "transforms": [ + { + "code": "\tfrom AWS.s3 import S3Manager\n\t\n\tusername \u003d self.session.props.auth.user.userName\n\tapi_region_name \u003d self.custom.api_region_name\n\t\n\ts3m \u003d S3Manager(\u0027prod\u0027, api_region_name, username)\n\n\tbucket \u003d self.custom.stage_config.repo_bucket\n\treturn s3m.fetch_site_list(bucket)\n", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "params.enables": { + "paramDirection": "input", + "persistent": true + }, + "params.selected_whid": { + "onChange": { + "enabled": null, + "script": "\tself.custom.new_site_to_add \u003d getattr(currentValue, \u0027value\u0027, \u0027\u0027)" + }, + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 330, + "width": 600 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "S3 Image Bucket:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "label_LeftAlign" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "!{view.params.enables.bucket}" + }, + "type": "expr" + } + }, + "props.params.text": { + "binding": { + "config": { + "path": "view.custom.stage_config.repo_bucket" + }, + "type": "property" + } + } + }, + "props": { + "path": "Objects/Templates/Labels/label_LeftAlign", + "style": { + "classes": "Framework/Card/Value" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer Image Bucket" + }, + "position": { + "basis": "26px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "S3 Source Bucket:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "label_LeftAlign" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "!{view.params.enables.bucket}" + }, + "type": "expr" + } + }, + "props.params.text": { + "binding": { + "config": { + "path": "view.custom.stage_config.source_bucket" + }, + "type": "property" + } + } + }, + "props": { + "path": "Objects/Templates/Labels/label_LeftAlign", + "style": { + "classes": "Framework/Card/Value" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer Source Bucket" + }, + "position": { + "basis": "26px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Child Projects:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "label_LeftAlign" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.params.text": { + "binding": { + "config": { + "expression": "len({view.custom.enabled_whids})" + }, + "type": "expr" + } + } + }, + "props": { + "path": "Objects/Templates/Labels/label_LeftAlign", + "style": { + "classes": "Framework/Card/Value" + } + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "100px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Sites in S3:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "label_LeftAlign_0" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.params.text": { + "binding": { + "config": { + "expression": "len({view.custom.whids_in_s3})" + }, + "type": "expr" + } + } + }, + "props": { + "path": "Objects/Templates/Labels/label_LeftAlign", + "style": { + "classes": "Framework/Card/Value" + } + }, + "type": "ia.display.view" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.custom.expanded \u003d not self.view.custom.expanded" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "propConfig": { + "props.image.icon.path": { + "binding": { + "config": { + "expression": "if({view.custom.expanded}, \u0027material/expand_less\u0027, \u0027material/expand_more\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": {} + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "grow": 1, + "shrink": 0 + }, + "props": { + "justify": "flex-end" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer Sites" + }, + "position": { + "basis": "26px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Site to Add:" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "label_LeftAlign" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.params.text": { + "binding": { + "config": { + "path": "view.custom.new_site_to_add" + }, + "type": "property" + } + } + }, + "props": { + "path": "Objects/Templates/Labels/label_LeftAlign", + "style": { + "classes": "Framework/Card/Value" + } + }, + "type": "ia.display.view" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# show confirm dialog for user before adding site\n\tself.show_confirm_dialog()\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button Add New Site", + "tooltip": { + "location": "bottom", + "style": { + "whiteSpace": "pre" + } + } + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "meta.tooltip.enabled": { + "binding": { + "config": { + "path": "this.props.enabled" + }, + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "stringFormat(\u0027Add %s site folder to the image and source buckets:\\n[%s, %s]\u0027,\r\n\t{view.custom.new_site_to_add},{view.custom.stage_config.repo_bucket},\r\n\t{view.custom.stage_config.source_bucket})" + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.custom.new_site_to_add})\r\n\u0026\u0026len({view.custom.new_site_to_add})\r\n\u0026\u0026{view.custom.new_site_is_not_in_S3}\r\n\u0026\u0026{view.custom.developer_user}" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/library_add" + } + }, + "style": { + "margin": "2px" + }, + "text": "Add Site" + }, + "scripts": { + "customMethods": [ + { + "name": "show_success_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"success\", \n\t\t\"New Site Added\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t\t" + }, + { + "name": "show_warning_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"warning\", \n\t\t\"New Site NOT Added\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t\t" + }, + { + "name": "show_error_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"error\", \n\t\t\"New Site Add Error!\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t\t" + }, + { + "name": "show_confirm_dialog", + "params": [ + "payload\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add payload of data to pass to the popup\n\tmsg \u003d (\u0027Are you sure you want to add %s site to S3? \u0027\n\t\t\u0027\\nThis will create a new folder in the in each of the image repo and source file S3 buckets\u0027) % (\n\t\tself.view.custom.new_site_to_add)\n\tpayload \u003d {}\t\t\n\tAlerts.showAlert(\n\t\t\"info\", \n\t\t\"Add New Site to S3?\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"Continue\", \n\t\t\"Cancel\", \n\t\t\"library_add\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"confirm_add_new_site\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\tpayload\n\t)\n\t\t\t" + }, + { + "name": "update_bindings", + "params": [], + "script": "\t\"\"\"\n\t\tAfter data saved to S3, refresh session and view bindings\n\t\"\"\"\n\tself.view.refreshBinding(\u0027custom.enabled_whids\u0027)\n\tself.view.refreshBinding(\u0027custom.whids_in_s3\u0027)\n\tproject_table \u003d self.parent.parent.getChild(\"FlexContainer Tables\").getChild(\"FlexContainer Projects\").getChild(\"Table\")\n\tproject_table.refreshBinding(\u0027props.data\u0027)\n\tsystem.perspective.sendMessage(\u0027update_enabled_whids\u0027, {}, scope\u003d\u0027session\u0027)\n\tself.view.custom.new_site_to_add \u003d None\n\tself.view.custom.loading \u003d False\n\t\t" + }, + { + "name": "add_new_site", + "params": [], + "script": "\t\"\"\"\n\t\tCall AWS.s3.S3Manager.add_new_site() method with user selections\n\t\"\"\"\n\tfrom AWS.s3 import S3Manager\n\tfrom pprint import pformat\n\tfrom helper.helper import sanitize_tree\n\t\n\tapi_region_name \u003d self.view.custom.api_region_name\n\tusername \u003d self.session.props.auth.user.userName\n\tsite \u003d self.view.custom.new_site_to_add\n\tself.view.custom.loading \u003d True\n\n\ts3m \u003d S3Manager(\u0027prod\u0027, api_region_name, username)\n\t# Setting `bucket` \u003d \u0027both\u0027 will add the site folder to both the image and source buckets\n\tbucket \u003d \u0027both\u0027\n\toperation \u003d \u0027add_new_site\u0027\n\tparams \u003d {\u0027site\u0027: site, \u0027bucket\u0027: bucket}\n\ttry:\n\t\tresp \u003d getattr(s3m, operation)(**params)\n\t\tmsg \u003d pformat(sanitize_tree(resp))\n\t\tsystem.perspective.print(msg)\n\t\tresp_code \u003d resp.get(\u0027code\u0027, None)\n\t\tif (resp_code and resp_code !\u003d 200) or (not resp_code and \u0027message\u0027 in resp):\n\t\t\t# \u0027code\u0027 in resp indicates API encountered and returned an error\n\t\t\tself.show_error_dialog(msg)\n\t\t\tself.view.custom.loading \u003d False\n\t\telse:\n\t\t\tself.show_success_dialog(msg)\n\t\t\tself.update_bindings()\n\texcept:\n\t\timport traceback\n\t\tmsg \u003d \u0027Error executing %s operation! \\nError: %s\u0027 % (\n\t\t\t\toperation, traceback.format_exc())\n\t\tsystem.perspective.print(msg)\n\t\tself.view.custom.loading \u003d False\n\t\tself.show_error_dialog(msg)\n\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "confirm_add_new_site", + "pageScope": false, + "script": "\tsystem.perspective.closePopup(\u0027alertDialog\u0027)\n\t# call the add_new_site custom method\n\tself.add_new_site()\n\t\t\t", + "sessionScope": true, + "viewScope": true + } + ] + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer Add New Site" + }, + "position": { + "basis": "32px", + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{view.custom.developer_user}\r\n\u0026\u0026!isNull({view.custom.new_site_to_add})\r\n\u0026\u0026{view.custom.new_site_is_not_in_S3}" + }, + "type": "expr" + } + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "events": { + "component": { + "onSelectionChange": { + "config": { + "script": "\t# validate the selection data is not null\n\tif self.props.selection.data:\n\t\tproject \u003d self.props.selection.data[0].Project\n\t\tif getattr(project, \u0027value\u0027, None):\n\t\t\t# if this returns something, the row is styled, grab the value\n\t\t\tproject \u003d project.get(\u0027value\u0027)\n\t\tproject_site \u003d project.replace(\"_SCADA\", \"\")\n\t\tself.view.custom.new_site_to_add \u003d project_site\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Table" + }, + "position": { + "basis": "200px", + "shrink": 0 + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "expression": "toStr({view.custom.enabled_whids})+toStr({view.custom.whids_in_s3})" + }, + "transforms": [ + { + "code": "\tenabled_whids \u003d self.view.custom.enabled_whids\n\twhids_in_s3 \u003d self.view.custom.whids_in_s3\n\tdata \u003d [{\u0027Project\u0027: x + \u0027_SCADA\u0027} for x in enabled_whids]\n\tfor row in data:\n\t\tproject \u003d row[\u0027Project\u0027]\n\t\twhid \u003d project.replace(\u0027_SCADA\u0027,\u0027\u0027)\n\t\tif whid not in whids_in_s3:\n\t\t\tstyle \u003d {\u0027backgroundColor\u0027: \u0027#FFFF00\u0027}\n\t\t\trow[\u0027Project\u0027] \u003d {\u0027value\u0027: project, \u0027style\u0027: style}\n\treturn data", + "type": "script" + } + ], + "type": "expr" + } + }, + "props.filter.enabled": { + "onChange": { + "enabled": null, + "script": "\tif not getattr(currentValue, \u0027value\u0027, None):\n\t\t# clear filter text when filter is disabled\n\t\tself.props.filter.text \u003d \u0027\u0027\n\t\t" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Project", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Child Project" + }, + "justify": "center", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "style": { + "margin": "5px" + } + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "FlexContainer Projects" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Table" + }, + "position": { + "basis": "200px", + "shrink": 0 + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "path": "view.custom.whids_in_s3" + }, + "transforms": [ + { + "code": "\treturn [{\u0027WHID\u0027: x} for x in value]", + "type": "script" + } + ], + "type": "property" + } + }, + "props.filter.enabled": { + "onChange": { + "enabled": null, + "script": "\tif not getattr(currentValue, \u0027value\u0027, None):\n\t\t# clear filter text when filter is disabled\n\t\tself.props.filter.text \u003d \u0027\u0027\n\t\t" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "WHID", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "FC" + }, + "justify": "center", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "style": { + "margin": "5px" + } + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "FlexContainer Site Folders" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer Tables" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer Projects vs Folders" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.custom.expanded" + }, + "type": "property" + } + } + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "100%", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/site/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/site/resource.json new file mode 100644 index 0000000..327cb93 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/site/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "008cfd8ad0041b228fc19fdb399fb3f145b0d7963cdc789a5aada7c6f83c546a" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/site/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/site/thumbnail.png new file mode 100644 index 0000000..8e0b6ad Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/site/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/site/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/site/view.json new file mode 100644 index 0000000..3c52e6a --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Management/site/view.json @@ -0,0 +1,456 @@ +{ + "custom": { + "api_region_name": "eu", + "enabled_whids": [ + "DNK7", + "EWR4" + ], + "stage_config": { + "account_id": "006306898152", + "api_call_role": "arn:aws:iam::609617486056:role/RMESDScadaS3ManagementAPIcallRole-prod-eu-west-1", + "endpoint": "https://eu-west-1.scada-s3-management.scada.eurme.amazon.dev/", + "lambda_name": "RMESDScadaS3ManagementFlaskLambda-prod", + "region": "eu-west-1", + "repo_bucket": "ignition-image-repo", + "s3_region": "eu-west-1", + "source_bucket": "ignition-image-source" + }, + "whid_options": [ + { + "label": "DNK7", + "value": "DNK7" + }, + { + "label": "EWR4", + "value": "EWR4" + } + ], + "whids_in_s3": [ + "BOS3", + "BRS1", + "CGN9", + "DAO1", + "DAO3", + "DAR2", + "DBE2", + "DBH3", + "DBI7", + "DBT3", + "DCT7", + "DCT9", + "DCZ3", + "DCZ4", + "DEH1", + "DER1", + "DER2", + "DER3", + "DER5", + "DFV1", + "DHA1", + "DHE3", + "DHE4", + "DHE6", + "DIF2", + "DIF6", + "DIP1", + "DLO1", + "DLO2", + "DLO3", + "DLO4", + "DLO5", + "DLO7", + "DLZ1", + "DLZ2", + "DLZ3", + "DMA3", + "DMA4", + "DMA6", + "DMV1", + "DMV3", + "DMZ2", + "DMZ4", + "DNC1", + "DNC2", + "DNE2", + "DNG2", + "DNM7", + "DNP1", + "DNX3", + "DNZ2", + "DPI3", + "DPU1", + "DRM2", + "DSI2", + "DSO2", + "DSY6", + "DTC2", + "DVN1", + "DVN2", + "DVN5", + "DWN2", + "IST2", + "MAD6", + "MAN2", + "QCB6" + ] + }, + "params": { + "enables": { + "site": true + }, + "image_count": 0, + "selected_whid": "EWR4", + "source_count": 0 + }, + "propConfig": { + "custom.api_region_name": { + "binding": { + "config": { + "path": "session.custom.aws.prefix" + }, + "type": "property" + }, + "persistent": true + }, + "custom.enabled_whids": { + "binding": { + "config": { + "expression": "{session.custom.fc}" + }, + "transforms": [ + { + "code": "\tchild_projects \u003d config.project_config.get_child_scada_projects()\n\treturn [x.replace(\u0027_SCADA\u0027,\u0027\u0027) for x in child_projects]", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.stage_config": { + "binding": { + "config": { + "expression": "{view.custom.api_region_name}" + }, + "transforms": [ + { + "code": "\treturn AWS.s3.STAGE_CONFIG[\u0027prod\u0027][value]", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.whid_options": { + "binding": { + "config": { + "path": "view.custom.enabled_whids" + }, + "transforms": [ + { + "code": "\treturn [{\u0027value\u0027: x, \u0027label\u0027: x} for x in value]", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.whids_in_s3": { + "binding": { + "config": { + "expression": "{session.custom.fc}" + }, + "transforms": [ + { + "code": "\tfrom AWS.s3 import S3Manager\n\t\n\tusername \u003d self.session.props.auth.user.userName\n\tapi_region_name \u003d self.custom.api_region_name\n\t\n\ts3m \u003d S3Manager(\u0027prod\u0027, api_region_name, username)\n\t\n\tbucket \u003d self.custom.stage_config.repo_bucket\n\treturn s3m.fetch_site_list(bucket)", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "params.enables": { + "paramDirection": "input", + "persistent": true + }, + "params.image_count": { + "paramDirection": "input", + "persistent": true + }, + "params.selected_whid": { + "paramDirection": "input", + "persistent": true + }, + "params.source_count": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 78, + "width": 400 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Site:" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tselected_whid \u003d self.props.value\n\tsystem.perspective.sendMessage(\u0027update_selected_whid\u0027, \n\t\t\t\t\t\t\t\t{\u0027whid\u0027: selected_whid}, \n\t\t\t\t\t\t\t\tscope\u003d\u0027session\u0027)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Dropdown", + "tooltip": { + "location": "bottom", + "style": { + "whiteSpace": "pre" + }, + "text": "Click here to select a different \nstage folder to manage" + } + }, + "position": { + "basis": "175px", + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "view.params.enables.site" + }, + "type": "property" + } + }, + "props.options": { + "binding": { + "config": { + "path": "view.custom.whid_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "path": "view.params.selected_whid" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "margin": "2px", + "marginRight": "26px" + } + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "FlexContainer Site Selection" + }, + "position": { + "basis": "26px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Images (SVG):" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "label_LeftAlign" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.params.text": { + "binding": { + "config": { + "path": "view.params.image_count" + }, + "type": "property" + } + } + }, + "props": { + "path": "Objects/Templates/Labels/label_LeftAlign", + "style": { + "classes": "Framework/Card/Value" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer Images" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label Text/RightAlign_with_Padding", + "paddingLeft": "5px" + }, + "text": "Source (DRAWIO):" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "label_LeftAlign" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.params.text": { + "binding": { + "config": { + "path": "view.params.source_count" + }, + "type": "property" + } + } + }, + "props": { + "path": "Objects/Templates/Labels/label_LeftAlign", + "style": { + "classes": "Framework/Card/Value" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer Source" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer File Counts" + }, + "position": { + "basis": "26px", + "shrink": 0 + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "100%", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "scripts": { + "customMethods": [ + { + "name": "update_wo_view_param", + "params": [ + "d\u003dNone" + ], + "script": "\t# helper \"sanitize_tree\" function to make work order view param mutable\n\tfrom helper.helper import sanitize_tree\n\twork_order \u003d sanitize_tree(self.view.params.work_order)\n\t# sanity-check the update dict \"d\"\n\tif d is None or not isinstance(d, dict): d \u003d {}\n\t# update the embedded object inside the work order view param\n\twork_order.get(\u0027data\u0027, {}).get(\u0027WorkOrder\u0027, {}).update(d)\n\t# write the updated work_order object back to view param\n\tself.view.params.work_order \u003d work_order\n\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update_enabled_whids", + "pageScope": false, + "script": "\t# implement your handler here\n\tself.view.refreshBinding(\u0027custom.enabled_whids\u0027)\n\tself.view.refreshBinding(\u0027custom.whids_in_s3\u0027)", + "sessionScope": true, + "viewScope": true + } + ] + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Log_Table/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Log_Table/resource.json new file mode 100644 index 0000000..77dbbfc --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Log_Table/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "ea11502a716c44c90bed3457bbcfc1dc91af0ea9b10af01c6d882871fdb63b64" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Log_Table/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Log_Table/thumbnail.png new file mode 100644 index 0000000..a964610 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Log_Table/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Log_Table/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Log_Table/view.json new file mode 100644 index 0000000..0c15c08 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Log_Table/view.json @@ -0,0 +1,1139 @@ +{ + "custom": { + "api_region_name": "na", + "filter_menu_data": [ + { + "filters": [ + { + "color": "#8B008B", + "column": "test1", + "group": 1, + "id": 0, + "text": "value1" + } + ], + "group_name": "test1", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "filters": [ + { + "color": "#00CED1", + "column": "test2", + "group": 2, + "id": 1, + "text": "value2" + } + ], + "group_name": "test2", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + } + ], + "filtered_table_data": [], + "filters": { + "active": [], + "default_colors": [ + "#8B008B", + "#00CED1", + "#FF8C00", + "#708090", + "#DC143C", + "#FFDEAD", + "#7B68EE", + "#4169E1", + "#F4A460", + "#9ACD32" + ], + "number_of_groups": "value", + "selection_active": false + }, + "stage_config": { + "account_id": "925510716640", + "endpoint": "https://scada-s3-management.narme-scada.rme.amazon.dev/", + "lambda_name": "RMESDScadaS3ManagementFlaskLambda-prod", + "region": "us-east-2", + "repo_bucket": "na-ignition-image-repo", + "s3_region": "us-east-1", + "source_bucket": "na-ignition-image-source" + }, + "table_data": [], + "use_filtered_table": false + }, + "params": { + "DoubleClick": { + "Enabled": false, + "MP": "MP", + "Sts": "STATUS", + "TextCode": "TEXT_CODE", + "WHID": "WHID" + }, + "NavigationSettings": { + "BaseUrl": "", + "Column": "", + "Enabled": false + }, + "SelectedRow": [], + "VisibleColCount": 5, + "filters": [ + { + "column": "test1", + "group": 1, + "text": "value1" + }, + { + "column": "test2", + "group": 2, + "text": "value2" + } + ], + "header_order": [ + { + "field": "VersionId", + "title": "VERSION ID", + "visible": true + }, + { + "field": "LastModified", + "title": "LAST MODIFIED", + "visible": true + }, + { + "field": "Size", + "title": "SIZE (Bytes)", + "visible": true + }, + { + "field": "IsLatest", + "title": "IS LATEST?", + "visible": true + }, + { + "field": "Key", + "title": "OBJECT KEY", + "visible": true + }, + { + "field": "StorageClass", + "title": "STORAGE CLASS", + "visible": false + }, + { + "field": "ETag", + "title": "ETAG", + "visible": false + } + ], + "key_to_read_from": "use_param", + "puToDismiss": "", + "table_data": [], + "title": "SCADA S3 Version History" + }, + "propConfig": { + "custom.api_region_name": { + "binding": { + "config": { + "path": "session.custom.aws.prefix" + }, + "type": "property" + }, + "persistent": true + }, + "custom.filter_menu_data": { + "binding": { + "config": { + "path": "view.custom.filters.deactive" + }, + "transforms": [ + { + "code": "\tinstances \u003d []\n\tgroups \u003d {}\n\tfor filter in value:\n\t \tif not groups.has_key(filter.column):\n\t \t\tgroups[filter.column] \u003d []\n\t \tgroups[filter.column].append(filter)\n\tfor key in groups:\n\t\tinstance \u003d {\"instanceStyle\": {\n\t \t\t\t\"classes\": \"\"},\n\t \t\t\t \"instancePosition\": {}}\n\t \tgroups[key].sort()\n\t \tinstance[\u0027filters\u0027] \u003d groups[key]\n\t \tinstance[\u0027group_name\u0027] \u003d key\n\t \tinstances.append(instance)\n\treturn instances", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.filtered_table_data": { + "binding": { + "config": { + "expression": "if({view.custom.table_data} !\u003d {view.custom.filters.active},\r\n{view.custom.filters.active},\r\n{view.custom.filters.active})" + }, + "transforms": [ + { + "code": "\tfiltered_table \u003d []\n\tif len(value) \u003e 0:\n\t\tfilter_lookup \u003d {}\n\t\tfor act_filter in value:\n\t\t\tif act_filter[\u0027column\u0027] not in filter_lookup:\n\t\t\t\tfilter_lookup[act_filter[\u0027column\u0027]] \u003d []\n\t\t\tfilter_lookup[act_filter[\u0027column\u0027]].append(act_filter[\u0027text\u0027])\n\t\tfor row in self.custom.table_data:\n\t\t\tsystem.perspective.print(row)\n\t\t\tshould_filter \u003d {}\t\t\n\t\t\t# Handles stylized rows\t\n\t\t\tif \u0027style\u0027 in row and \u0027value\u0027 in row and len(row) \u003d\u003d2:\n\t\t\t\t#for column in row:\n\t\t\t\t\t#system.perspective.print(\u0027value:%s\u0027%column)\n\t\t\t\t\tdata_columns \u003d row[\u0027value\u0027]\n\t\t\t\t\tfor s_column in data_columns:\n\t\t\t\t\t\tif s_column in filter_lookup:\n\t\t\t\t\t\t\tif data_columns[s_column] in filter_lookup[s_column]:\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tshould_filter[s_column] \u003d True\n\t\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t\tshould_filter[s_column] \u003d False\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\tshould_filter[s_column] \u003d False\t\n\t\t\telse:\n\t\t\t\tfor column in row:\n\t\t\t\t\tif column in filter_lookup:\n\t\t\t\t\t\tif row[column] in filter_lookup[column]:\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tshould_filter[column] \u003d True\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\tshould_filter[column] \u003d False\n\t\t\t\t\telse:\n\t\t\t\t\t\tshould_filter[column] \u003d False\n\t\t\tif sum(should_filter.values()) \u003d\u003d len(filter_lookup.keys()):\n\t\t\t\tfiltered_table.append(row)\n\n\treturn filtered_table", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.filters": { + "persistent": true + }, + "custom.filters.deactive": { + "binding": { + "config": { + "path": "view.params.filters" + }, + "transforms": [ + { + "code": "\t\n\tfilters \u003d []\n\tgroups \u003d []\n\tfor index, filter in enumerate(value):\n\t\tnew_filter \u003d {}\t\n\t\tif not filter.has_key(\u0027group\u0027):\n\t\t\tnew_filter[\u0027group\u0027] \u003d 0\n\t\telse:\n\t\t\tnew_filter[\u0027group\u0027] \u003d filter.group\n\t\tif not filter.has_key(\u0027color\u0027):\n\t\t\tif new_filter[\u0027group\u0027] not in groups:\n\t\t\t\tgroups.append(new_filter[\u0027group\u0027])\n\t\t\tnew_filter[\u0027color\u0027] \u003d self.custom.filters.default_colors[groups.index(new_filter[\u0027group\u0027])]\n\t\telse:\n\t\t\tnew_filter[\u0027color\u0027] \u003d filter.color\n\t\tif not filter.has_key(\u0027text\u0027):\n\t\t\tnew_filter[\u0027text\u0027] \u003d \u0027Filter \u0027 + str(index)\n\t\telse:\n\t\t\tnew_filter[\u0027text\u0027] \u003d filter.text\n\t\tif not filter.has_key(\u0027column\u0027):\n\t\t\tnew_filter[\u0027column\u0027] \u003d 0\n\t\telse:\n\t\t\tnew_filter[\u0027column\u0027] \u003d filter.column\n\t\tnew_filter[\u0027id\u0027] \u003d index\n\t\tfilters.append(new_filter)\t\t\t\t\n\treturn filters", + "type": "script" + } + ], + "type": "property" + } + }, + "custom.stage_config": { + "binding": { + "config": { + "expression": "{view.custom.api_region_name}" + }, + "transforms": [ + { + "code": "\treturn AWS.s3.STAGE_CONFIG[\u0027prod\u0027][value]", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.table_data": { + "binding": { + "config": { + "expression": "if({view.params.key_to_read_from} \u003d \u0027use_param\u0027,\r\n{view.params.table_data},\r\nproperty(concat(\u0027session.custom.tableComponentData.\u0027,{view.params.key_to_read_from})))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.use_filtered": { + "persistent": true + }, + "custom.use_filtered_table": { + "binding": { + "config": { + "path": "view.custom.filtered_table_data" + }, + "transforms": [ + { + "code": "\treturn len(value) \u003e 0", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "params.DoubleClick": { + "paramDirection": "input", + "persistent": true + }, + "params.NavigationSettings": { + "paramDirection": "input", + "persistent": true + }, + "params.SelectedRow": { + "binding": { + "config": { + "path": "/root/Table.props.selection.data" + }, + "type": "property" + }, + "paramDirection": "output", + "persistent": true + }, + "params.VisibleColCount": { + "paramDirection": "input", + "persistent": true + }, + "params.filters": { + "paramDirection": "input", + "persistent": true + }, + "params.header_order": { + "paramDirection": "input", + "persistent": true + }, + "params.key_to_read_from": { + "paramDirection": "input", + "persistent": true + }, + "params.puToDismiss": { + "paramDirection": "input", + "persistent": true + }, + "params.table_data": { + "paramDirection": "input", + "persistent": true + }, + "params.title": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 844 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Title" + }, + "position": { + "basis": "100%" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.title" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Title/Text", + "fontSize": 14, + "overflow": "visible" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Title" + }, + "position": { + "basis": "50%" + }, + "props": { + "style": { + "fontSize": 1, + "marginLeft": 10, + "overflow": "visible" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "FilterCheck", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "Enable Table Search" + } + }, + "position": { + "basis": "108px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "LEN({..../Table.props.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "checkedIcon": { + "style": { + "fontSize": 16 + } + }, + "indeterminateIcon": { + "style": { + "fontSize": 16 + } + }, + "style": { + "fontSize": 12 + }, + "text": "Search?", + "textPosition": "left", + "uncheckedIcon": { + "style": { + "fontSize": 16 + } + } + }, + "type": "ia.input.checkbox" + }, + { + "meta": { + "name": "Spacer1" + }, + "position": { + "basis": "1px" + }, + "props": { + "style": { + "classes": "General/Divider" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\ttable \u003d self.parent.parent.parent.getChild(\"Table\")\n\t# ignition perspective has a bug with table where the only way to \n\t# actually de-select and remove the row highlight is to set the\n\t# row and column to -1 and THEN None\n\t# this will automatically clear the selection.data array\n\ttable.props.selection.selectedRow \u003d -1\n\ttable.props.selection.selectedColumn \u003d -1\n\ttable.props.selection.selectedRow \u003d None\n\ttable.props.selection.selectedColumn \u003d None" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "ClearSelectionButton", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "Clear Selection" + } + }, + "position": { + "basis": "31px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "len({..../Table.props.selection.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "path": "material/clear", + "style": { + "classes": "General/Button" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Spacer2" + }, + "position": { + "basis": "1px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "../ClearSelectionButton.position.display" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "General/Divider" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "draggable": false, + "id": "ColumnSelection", + "modal": true, + "overlayDismiss": true, + "position": { + "relativeLocation": "bottom-left" + }, + "positionType": "relative", + "resizable": true, + "showCloseIcon": true, + "type": "toggle", + "viewParams": { + "Columns": "{/root/TableHeader/TableActions/ColumnSelectionButton.custom.Columns}" + }, + "viewPath": "Objects/PowerTable/ColumnSelection", + "viewportBound": false + }, + "scope": "C", + "type": "popup" + } + } + }, + "meta": { + "name": "ColumnSelectionButton", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "+/- Columns" + } + }, + "position": { + "basis": "29px" + }, + "propConfig": { + "custom.Columns": { + "binding": { + "config": { + "path": "..../Table.props.columns" + }, + "transforms": [ + { + "code": "\tcolumns \u003d {}\n\tif len(value) \u003e 0:\n\t\tfor column in value:\n\t\t\t#field \u003d column.field\n\t\t\tfield \u003d column.header.title\n\t\t\tif field \u003d\u003d \u0027\u0027:\n\t\t\t\tfield \u003d \u0027None\u0027\n\t\t\tcolumns[field] \u003d column.visible\n\treturn columns", + "type": "script" + } + ], + "type": "property" + } + }, + "position.display": { + "binding": { + "config": { + "expression": "LEN({..../Table.props.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "path": "material/view_column", + "style": { + "classes": "General/Button", + "fontSize": 12, + "marginBottom": 5, + "marginTop": 5 + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Spacer4" + }, + "position": { + "basis": "1px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "LEN({..../Table.props.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "General/Divider" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tself.view.custom.filters.selection_active \u003d not self.view.custom.filters.selection_active" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "FilterButton", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "Filter Table" + } + }, + "position": { + "basis": "29px", + "display": false + }, + "props": { + "path": "material/filter_list", + "style": { + "classes": "General/Button", + "fontSize": 12, + "marginBottom": 5, + "marginTop": 5 + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Spacer3" + }, + "position": { + "basis": "1px" + }, + "props": { + "style": { + "classes": "General/Divider" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\n\tcsv_headers \u003d []\n\tcsv_data \u003d []\n\tsystem.perspective.print(\u0027DOWNLOADING TABLE DATA\u0027)\n\tsource_data \u003d self.parent.parent.parent.getChild(\"Table\").props.data\n\theaders \u003d source_data[0].keys()\n\t\n\tif \u0027style\u0027 in headers and \u0027value\u0027 in headers and len(headers) \u003d\u003d 2:\n\t\tdata \u003d [row[\u0027value\u0027] for row in source_data]\n\telse:\n\t\tdata \u003d source_data\n\t\t\n\tfor record in data:\n\t\tif len(csv_headers) \u003d\u003d 0:\n\t\t\tcsv_headers \u003d record.keys()\n\t\t\tcsv_headers.sort()\n\t\t\tcsv_headers \u003d [str(i) for i in csv_headers]\n\t\tcsv_row \u003d []\n\t\tfor index in range(len(record)):\n\t\t\tcsv_row.append(str(record[csv_headers[index]]))\n\t\tcsv_data.append(csv_row)\n\t\n\ttry:\n\t\tcsv_dataset \u003d system.dataset.toDataSet(csv_headers, csv_data)\n\texcept Exception, e:\n\t\tsystem.perspective.print(str(e))\n\tcsv_export \u003d system.dataset.toCSV(csv_dataset)\n\tfilename \u003d \u0027{0}.csv\u0027.format(str(system.date.now()).replace(\u0027 \u0027, \u0027_\u0027))\n\tsystem.perspective.download(filename, csv_export)\n\t\n\tsystem.perspective.print(\u0027DONE DOWNLOADING TABLE DATA\u0027)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "SettingsButton", + "tooltip": { + "enabled": true, + "location": "top-left", + "text": "Download Table Contents" + } + }, + "position": { + "basis": "30px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "LEN({..../Table.props.data})\u003e0" + }, + "type": "expr" + } + } + }, + "props": { + "path": "material/cloud_download", + "style": { + "classes": "General/Button", + "marginRight": 10 + } + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "TableActions", + "tooltip": { + "location": "top-right" + } + }, + "position": { + "grow": 1 + }, + "props": { + "justify": "flex-end" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "TableHeader" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "space-between", + "style": { + "borderBottomStyle": "solid", + "borderBottomWidth": 1, + "cursor": "pointer" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "FilterMenu" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.instances": { + "binding": { + "config": { + "path": "view.custom.filter_menu_data" + }, + "type": "property" + } + } + }, + "props": { + "alignContent": "flex-start", + "alignItems": "flex-start", + "path": "Components/PowerTable/FilterMenuGroup", + "style": { + "overflow": "visible" + }, + "useDefaultViewHeight": false, + "useDefaultViewWidth": false, + "wrap": "wrap" + }, + "type": "ia.display.flex-repeater" + } + ], + "meta": { + "name": "FilterSelection" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.custom.filters.selection_active" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderBottomStyle": "solid", + "borderBottomWidth": 1, + "classes": "Menu/Menu", + "overflow": "visible", + "paddingLeft": 10, + "paddingRight": 10 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "FiltersLabel" + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.custom.filters.active" + }, + "transforms": [ + { + "code": "\t\n\treturn \u0027\u0027.join([\u0027FILTERS (\u0027, str(len(value)), \u0027):\u0027])", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Menu/Menu Page/Text", + "fontSize": 10, + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "FiltersCarousel" + }, + "propConfig": { + "props.views": { + "binding": { + "config": { + "path": "view.custom.filters.active" + }, + "transforms": [ + { + "code": "\n\tviews \u003d []\n\tfor filter in value:\n\t\tcarousel_view \u003d {\n\t\t\t\u0027viewPath\u0027:\u0027Components/PowerTable/FilterTile\u0027,\n\t\t\t\u0027direction\u0027 : \u0027row\u0027,\n\t\t\t\u0027viewParams\u0027: {},\n\t\t\t\u0027justify\u0027:\u0027flex-start\u0027,\n\t\t\t\u0027alignItems\u0027: \u0027center\u0027}\n\t\tcarousel_view[\u0027viewParams\u0027][\u0027color\u0027] \u003d filter[\u0027color\u0027]\n\t\tcarousel_view[\u0027viewParams\u0027][\u0027text\u0027] \u003d filter[\u0027text\u0027]\t\n\t\tcarousel_view[\u0027viewParams\u0027][\u0027id\u0027] \u003d filter[\u0027id\u0027]\t\n\t\t\n\t\tviews.append(carousel_view)\n\treturn views", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "appearance": { + "arrows": { + "next": { + "style": { + "marginRight": 5 + } + }, + "previous": { + "style": { + "marginLeft": 5 + } + } + }, + "dots": { + "enabled": false + }, + "slidePadding": 3, + "slidesToShow": 5, + "useDefaultViewHeight": true, + "useDefaultViewWidth": true + }, + "style": { + "overflow": "visible", + "textAlign": "left" + } + }, + "type": "ia.display.carousel" + } + ], + "meta": { + "name": "Left" + }, + "position": { + "basis": "90%" + }, + "props": { + "style": { + "overflow": "visible" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.custom.filters.active \u003d []\n\tsystem.perspective.sendMessage(\u0027deactivate-filter\u0027, payload \u003d {\u0027id\u0027:-1}, scope \u003d \u0027page\u0027)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "ClearButton" + }, + "position": { + "basis": "51px" + }, + "props": { + "primary": false, + "style": { + "classes": "Menu/Item", + "fontSize": 12, + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + }, + "text": "Clear", + "textStyle": { + "classes": "Page/Text" + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Right" + }, + "position": { + "basis": "10%" + }, + "props": { + "justify": "flex-end", + "style": { + "overflow": "visible" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Filters" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.custom.filters.active" + }, + "transforms": [ + { + "code": "\treturn len(value) \u003e 0", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "overflow": "visible" + } + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "ReulstLengthLabel" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.custom.filters.active" + }, + "transforms": [ + { + "code": "\treturn len(value) \u003e 0", + "type": "script" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "../Table.props.data" + }, + "transforms": [ + { + "code": "\treturn \u0027\u0027.join([str(len(value)), \u0027 results within filters\u0027])", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Menu/Item Page/Text", + "fontSize": 12, + "paddingLeft": 5, + "textTransform": "lowercase" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "pager" + }, + "position": { + "basis": "35px", + "display": false, + "shrink": 0 + }, + "propConfig": { + "props.params.number_of_pages": { + "binding": { + "config": { + "expression": "len({../Table.custom.raw_data})" + }, + "type": "expr" + } + }, + "props.params.options_for_pagers": { + "binding": { + "config": { + "path": "../Table.props.pager.options" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "number_of_items_per_page": 100, + "page_selected": 0 + }, + "path": "Components/PowerTable/pager" + }, + "type": "ia.display.view" + }, + { + "events": { + "component": { + "onRowDoubleClick": { + "config": { + "script": "\t# grab row JSON from double-click\n\td \u003d event.value\n\t# build out the stage, site, flow-view, and copy_option from the object-key in row\n\tobj_key \u003d d.Key\n\tpath \u003d obj_key.split(\u0027/\u0027)\n\tsite \u003d path[1]\n\tfilename \u003d path[-1]\n\tview \u003d filename.replace(\".svg\",\"\").replace(\".drawio\",\"\")\n\t# from filename suffix, fetch bucket name from \"stage_config\" custom prop\n\tstage_config \u003d self.view.custom.stage_config\n\tbucket \u003d None\n\tif filename.endswith(\".svg\"):\n\t\tbucket \u003d stage_config.repo_bucket\n\tif filename.endswith(\".drawio\"):\n\t\tbucket \u003d stage_config.source_bucket\n\t# build out query_params from row values\n\t# flowview, site, and stage are multi-select dropdowns so need to be cast as lists\n\tnull \u003d None\n\tquery_params \u003d {\n\t\t\"copy_option\": null,\n\t\t\"destination_view\": view,\n\t\t\"destination_site\": site,\n\t\t\"destination_bucket\": bucket,\n\t\t\"end_time\": null,\n\t\t\"error_occurred\": null,\n\t\t\"operation\": null,\n\t\t\"source_view\": \"\",\n\t\t\"source_site\": null,\n\t\t\"source_bucket\": null,\n\t\t\"start_time\": null,\n\t\t\"username\": \"\"\n\t}\n\t# Open audit log viewer\n\tview_path \u003d \u0027PopUp-Views/S3/Audit/Log_Viewer\u0027\n\tparams \u003d {\u0027query_params\u0027: query_params}\n\tsystem.perspective.openPopup(\u0027Audit Log Viewer\u0027, view_path, \n\t\t\t\t\t\t\t\tparams, \u0027SCADA S3 Audit Logs\u0027)\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Table" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "custom.raw_data": { + "binding": { + "config": { + "expression": "IF({../pager.props.params.number_of_items_per_page} \u003e 0,\r\nIF(LEN({view.custom.filters.active})\u003d0, {view.custom.table_data}, {view.custom.filtered_table_data}),\u0027\u0027)" + }, + "transforms": [ + { + "code": "\tlist_of_data \u003d []\n\tsingle_list \u003d []\n\tfor item in value:\n\t\tif len(single_list) \u003c self.getSibling(\"pager\").props.params.number_of_items_per_page:\n\t\t\tsingle_list.append(item)\n\t\telse:\n\t\t\tlist_of_data.append(single_list)\n\t\t\tsingle_list \u003d []\n\t\t\tsingle_list.append(item)\n\tif len(single_list) \u003e 0:\n\t\tlist_of_data.append(single_list)\n\treturn list_of_data", + "type": "script" + } + ], + "type": "expr" + } + }, + "props.columns": { + "binding": { + "config": { + "path": "view.custom.table_data" + }, + "transforms": [ + { + "code": "\tfrom helper.helper import sanitize_tree\n\tcolumns \u003d []\n\tif len(value) \u003e 0:\n\t\trequestedHeaders \u003d sanitize_tree(self.view.params.header_order)\n\t\tfrom pprint import pformat\n#\t\tsystem.perspective.print(pformat(requestedHeaders))\n\t\theaders \u003d []\n\t\tif len(requestedHeaders) \u003e 0:\n\t\t\tfor item in requestedHeaders:\n\t\t\t\tif \u0027style\u0027 in value[0].keys() and \u0027value\u0027 in value[0].keys() and len(value[0].keys()) \u003d\u003d2:\n\t\t\t\t\tif item in value[0][\u0027value\u0027].keys():\n\t\t\t\t\t\theaders.append(item)\n\t\t\t\telse:\n\t\t\t\t\tif item in value[0].keys():\n\t\t\t\t\t\theaders.append(item)\n\t\t\t\t\tif isinstance(item, dict) and \u0027field\u0027 in item and item[\u0027field\u0027] in value[0].keys():\n\t\t\t\t\t\theaders.append(item)\n\t\tif len(headers) \u003d\u003d 0:\n\t\t\theaders \u003d value[0].keys()\n\t\tfor header in headers:\t\n\t\t\tfield \u003d header\n\t\t\tvisible \u003d True\n\t\t\ttry:\n\t\t\t\ttitle \u003d str(header).replace(\u0027_\u0027, \u0027 \u0027).upper()\n\t\t\texcept:\n\t\t\t\ttitle \u003d \u0027\u0027\n\t\t\tif isinstance(header, dict):\n\t\t\t\tfield \u003d header.get(\u0027field\u0027, \u0027\u0027)\n\t\t\t\tvisible \u003d header.get(\u0027visible\u0027, True)\n\t\t\t\ttitle \u003d header.get(\u0027title\u0027, field.replace(\u0027_\u0027, \u0027 \u0027).upper())\n\t\t\tcolumn \u003d {\n\t\t\t \"field\": field,\n\t\t\t \"visible\": visible,\n\t\t\t \"editable\": True,\n\t\t\t \"render\": \"auto\",\n\t\t\t \"justify\": \"center\",\n\t\t\t \"align\": \"center\",\n\t\t\t \"resizable\": True,\n\t\t\t \"sortable\": True,\n\t\t\t \"sort\": \"none\",\n\t\t\t \"viewPath\": \"\",\n\t\t\t \"viewParams\": {},\n\t\t\t \"boolean\": \"checkbox\",\n\t\t\t \"number\": \"value\",\n\t\t\t \"progressBar\": {\n\t\t\t\t\"max\": 100,\n\t\t\t\t\"min\": 0,\n\t\t\t\t\"bar\": {\n\t\t\t\t \"color\": \"\",\n\t\t\t\t \"style\": {\n\t\t\t\t\t\"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"track\": {\n\t\t\t\t \"color\": \"\",\n\t\t\t\t \"style\": {\n\t\t\t\t\t\"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"value\": {\n\t\t\t\t \"enabled\": True,\n\t\t\t\t \"format\": \"0,0.##\",\n\t\t\t\t \"justify\": \"center\",\n\t\t\t\t \"style\": {\n\t\t\t\t\t\"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t },\n\t\t\t \"toggleSwitch\": {\n\t\t\t\t\"color\": {\n\t\t\t\t \"selected\": \"\",\n\t\t\t\t \"unselected\": \"\"\n\t\t\t\t}\n\t\t\t },\n\t\t\t \"numberFormat\": \"0,0.##\",\n\t\t\t \"dateFormat\": \"MM/DD/YYYY\",\n\t\t\t \"width\": \"\",\n\t\t\t \"strictWidth\": False,\n\t\t\t \"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t },\n\t\t\t \"header\": {\n\t\t\t\t\"title\": title,\n\t\t\t\t\"justify\": \"center\",\n\t\t\t\t\"align\": \"center\",\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\",\n\t\t\t\t \u0027fontSize\u0027:\u002712px\u0027\n\t\t\t\t}\n\t\t\t },\n\t\t\t \"footer\": {\n\t\t\t\t\"title\": \"\",\n\t\t\t\t\"justify\": \"left\",\n\t\t\t\t\"align\": \"center\",\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\t\t\t\n\t\t\tcolumns.append(column)\n#\t\tif self.view.params.header_order !\u003d [] and len(headers) \u003d\u003d len(self.view.params.header_order):\n#\t\t\tnew_columns \u003d [None] * len(columns)\n#\t\t\tfor column in columns:\n#\t\t\t\tindex \u003d self.view.params.header_order.index(column[\u0027field\u0027])\n#\t\t\t\tnew_columns[index] \u003d column\n#\t\t\tcolumns \u003d new_columns\n\treturn columns", + "type": "script" + } + ], + "type": "property" + } + }, + "props.data": { + "binding": { + "config": { + "expression": "IF({../pager.props.params.number_of_items_per_page} \u003e 0,\r\nIF(LEN({view.custom.filters.active})\u003d0, {view.custom.table_data}, {view.custom.filtered_table_data}),\u0027\u0027)" + }, + "type": "expr" + } + }, + "props.filter.enabled": { + "binding": { + "config": { + "path": "../TableHeader/TableActions/FilterCheck.props.selected" + }, + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tif not getattr(currentValue, \u0027value\u0027, None):\n\t\t# clear filter text when filter is disabled\n\t\tself.props.filter.text \u003d \u0027\u0027\n\t\t" + } + } + }, + "props": { + "cells": { + "allowEditOn": "long-press", + "style": { + "fontSize": 12 + } + }, + "filter": {}, + "pager": { + "initialOption": 100, + "options": [ + 25, + 50, + 100, + 500, + 1000 + ] + }, + "style": { + "overflow": "visible" + } + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "overflow": "visible" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "activate-filter", + "pageScope": true, + "script": "\t# implement your handler here\n\tfilter_position \u003d payload[\u0027id\u0027]\n\tsystem.perspective.print(filter_position)\n\tadd \u003d True\n\tfor filter in self.view.custom.filters.active:\n\t\tif filter.id \u003d\u003d filter_position:\n\t\t\tadd \u003d False\n\tif add:\n\t\tfor filter in self.view.custom.filters.deactive:\n\t\t\tif filter.id \u003d\u003d filter_position:\t\t\t\t\n\t\t\t\tself.view.custom.filters.active.append(filter)", + "sessionScope": true, + "viewScope": false + }, + { + "messageType": "deactivate-filter", + "pageScope": true, + "script": "\tfilter_position \u003d payload[\u0027id\u0027]\n\tsystem.perspective.print(filter_position)\n\t\n\tif filter_position \u003d\u003d -1 :\n\t\tself.view.custom.filters.active \u003d []\n\telse:\n\t\tfor index, filter in enumerate(self.view.custom.filters.active):\n\t\t\tif filter.id \u003d\u003d filter_position:\n\t\t\t\tsystem.perspective.print(filter.id)\n\t\t\t\tself.view.custom.filters.active.pop(index)\n\n#\tfor filter in self.view.custom.filter_menu_data:\n#\t\tif filter.filter_id \u003d\u003d filter_position:\n#\t\t\tsystem.perspective.print(filter.filter_id)\n#\t\t\tfilter.active \u003d False\n#\t\t\tbreak", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "column-visibility", + "pageScope": true, + "script": "\t# implement your handler here\n\ttable_columns \u003d self.getChild(\"Table\").props.columns\n\tfor table_column in table_columns:\n\t\t#if payload.keys()[0] \u003d\u003d table_column[\u0027field\u0027]:\n\t\tif payload.keys()[0] \u003d\u003d table_column[\u0027header\u0027][\u0027title\u0027]:\n\t\t\ttable_column.visible \u003d payload.values()[0]\n", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Query_Options/resource.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Query_Options/resource.json new file mode 100644 index 0000000..bae3958 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Query_Options/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "7903445fab505d3339d6d97c7ad5b2513699d87a88f8618f0e6cea428e0cda72" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Query_Options/thumbnail.png b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Query_Options/thumbnail.png new file mode 100644 index 0000000..510a0a1 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Query_Options/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Query_Options/view.json b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Query_Options/view.json new file mode 100644 index 0000000..7eb98ea --- /dev/null +++ b/com.inductiveautomation.perspective/views/Objects/Templates/S3/Versions/Query_Options/view.json @@ -0,0 +1,773 @@ +{ + "custom": { + "api_region_name": "na", + "bucket_options": [ + { + "label": "Image Files", + "value": "na-ignition-image-repo" + }, + { + "label": "Source Files", + "value": "na-ignition-image-source" + } + ], + "default_query_params": { + "bucket": null, + "object_key": null, + "site": null, + "view": null + }, + "destination_view_suffix": null, + "object_key": null, + "stage_config": { + "account_id": "925510716640", + "endpoint": "https://scada-s3-management.narme-scada.rme.amazon.dev/", + "lambda_name": "RMESDScadaS3ManagementFlaskLambda-prod", + "region": "us-east-2", + "repo_bucket": "na-ignition-image-repo", + "s3_region": "us-east-1", + "source_bucket": "na-ignition-image-source" + }, + "view_options_by_site_and_bucket": [], + "view_suffix": null, + "whid_options": [] + }, + "params": { + "query_params": { + "bucket": null, + "object_key": null, + "site": null, + "view": null + } + }, + "propConfig": { + "custom.api_region_name": { + "binding": { + "config": { + "path": "session.custom.aws.prefix" + }, + "type": "property" + }, + "persistent": true + }, + "custom.bucket_options": { + "binding": { + "config": { + "path": "view.custom.stage_config" + }, + "transforms": [ + { + "code": "\treturn [{\u0027value\u0027: value.repo_bucket, \u0027label\u0027: \u0027Image Files\u0027},\n\t\t\t{\u0027value\u0027: value.source_bucket, \u0027label\u0027: \u0027Source Files\u0027}]", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.default_query_params": { + "persistent": true + }, + "custom.object_key": { + "binding": { + "config": { + "path": "view.params.query_params" + }, + "transforms": [ + { + "code": "\tstage_config \u003d self.custom.stage_config\n\tbucket \u003d self.params.query_params.bucket\n\tsite \u003d self.params.query_params.site\n\tview \u003d self.params.query_params.view\n\tif bucket and site and view:\n\t\tif bucket \u003d\u003d stage_config.repo_bucket:\n\t\t\tsuffix \u003d \u0027.svg\u0027\n\t\t\tsubfolder \u003d \u0027images\u0027\n\t\telse:\n\t\t\tsuffix \u003d \u0027.drawio\u0027\n\t\t\tsubfolder \u003d \u0027source\u0027\n\t\treturn \"SCADA/%s/%s/%s%s\" % (site, subfolder, view, suffix)\n\telse:\n\t\treturn None\n", + "type": "script" + } + ], + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\td \u003d self.params.query_params\n\tif getattr(currentValue, \u0027value\u0027, None):\n\t\tself.params.query_params.object_key \u003d currentValue.value\n\t" + }, + "persistent": true + }, + "custom.stage_config": { + "binding": { + "config": { + "expression": "{view.custom.api_region_name}" + }, + "transforms": [ + { + "code": "\treturn AWS.s3.STAGE_CONFIG[\u0027prod\u0027][value]", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.view_options_by_site_and_bucket": { + "binding": { + "config": { + "expression": "{view.params.query_params.site}+{view.params.query_params.bucket}" + }, + "transforms": [ + { + "code": "\tbucket \u003d self.params.query_params.bucket\n\tsite \u003d self.params.query_params.site\n\tif bucket and site:\n\t\tfrom AWS.s3 import S3Manager\n\t\tfrom helper.helper import sanitize_tree\n\t\tfrom pprint import pformat\n\t\t\n\t\tapi_stage \u003d \u0027prod\u0027\n\t\tusername \u003d self.session.props.auth.user.userName\n\t\tapi_region_name \u003d self.view.custom.api_region_name\n\t\t\n\t\ts3m \u003d S3Manager(api_stage, api_region_name, username)\n\t\tsuffix \u003d self.custom.view_suffix\n\t\tfiles \u003d sanitize_tree(s3m.fetch_object_list_by_site_and_bucket(site, bucket))\n\t\treturn [{\u0027value\u0027: x[\u0027Filename\u0027].replace(suffix,\u0027\u0027), \n\t\t\t\t\u0027label\u0027: x[\u0027Filename\u0027].replace(suffix,\u0027\u0027)} for x in files]\n\treturn []", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.view_suffix": { + "binding": { + "config": { + "path": "view.params.query_params.bucket" + }, + "transforms": [ + { + "code": "\tif value:\n\t\tstage_config \u003d self.custom.stage_config\n\t\tif value \u003d\u003d stage_config.get(\u0027repo_bucket\u0027, None):\n\t\t\treturn \".svg\"\n\t\tif value \u003d\u003d stage_config.get(\"source_bucket\", None):\n\t\t\treturn \".drawio\"\n\treturn value", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.whid_options": { + "binding": { + "config": { + "path": "view.params.query_params.bucket" + }, + "transforms": [ + { + "code": "\tif value:\n\t\tfrom AWS.s3 import S3Manager\n\t\t\n\t\tapi_stage \u003d \u0027prod\u0027\n\t\tusername \u003d self.session.props.auth.user.userName\n\t\tapi_region_name \u003d self.custom.api_region_name\n\t\t\n\t\ts3m \u003d S3Manager(\u0027prod\u0027, api_region_name, username)\n\t\t\n\t\treturn [{\u0027value\u0027: x, \u0027label\u0027: x} for x in s3m.fetch_site_list(value)]\n\treturn []", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "params.query_params": { + "onChange": { + "enabled": null, + "script": "\tif not missedEvents and origin in (\u0027Binding\u0027, \u0027Script\u0027, \u0027BindingWriteback\u0027):\n\t\tpayload \u003d currentValue.value\n\t\tsystem.perspective.sendMessage(\u0027list_versions_query_params_changed\u0027, payload, scope\u003d\u0027session\u0027)\n\t\t" + }, + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 600 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "shrink": 0 + }, + "props": { + "style": { + "borderStyle": "none", + "classes": "Framework/Card/Title_transparent" + }, + "text": "Select Query Params" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# reset query params to default values \n\t# (stored in `view.custom.default_query_params`)\n\tself.view.params.query_params \u003d self.view.custom.default_query_params" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button", + "tooltip": { + "enabled": true, + "location": "bottom-right", + "text": "Clear Selections" + } + }, + "position": { + "shrink": 0 + }, + "props": { + "image": { + "icon": { + "path": "material/clear_all" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t# refresh version table query via message handler\n\tsystem.perspective.sendMessage(\u0027refresh_version_table_data\u0027, scope\u003d\u0027session\u0027)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Refresh Button", + "tooltip": { + "enabled": true, + "location": "bottom-right", + "text": "Refresh Data" + } + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.bucket})\r\n\u0026\u0026!isNull({view.params.query_params.site})\r\n\u0026\u0026!isNull({view.params.query_params.view})\r\n\u0026\u0026!isNull({view.params.query_params.object_key})" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/refresh" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "grow": 1 + }, + "props": { + "justify": "flex-end" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer Header" + }, + "position": { + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Title_transparent", + "marginBottom": "2px" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Bucket" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "540px", + "grow": 1 + }, + "propConfig": { + "props.options": { + "binding": { + "config": { + "path": "view.custom.bucket_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.bucket" + }, + "type": "property" + } + } + }, + "props": { + "dropdownOptionStyle": { + "overflowWrap": "break-word", + "whiteSpace": "normal" + }, + "showClearIcon": true + }, + "type": "ia.input.dropdown" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.bucket \u003d None\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.bucket})\r\n\u0026\u0026{view.params.query_params.bucket}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Bucket" + }, + "position": { + "basis": "100%", + "grow": 1 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Site" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "540px", + "grow": 1 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.bucket})\r\n\u0026\u0026len({view.params.query_params.bucket})\u003e0" + }, + "type": "expr" + } + }, + "props.options": { + "binding": { + "config": { + "path": "view.custom.whid_options" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.site" + }, + "type": "property" + } + } + }, + "props": { + "dropdownOptionStyle": { + "overflowWrap": "break-word", + "whiteSpace": "normal" + }, + "showClearIcon": true + }, + "type": "ia.input.dropdown" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.site \u003d None\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.site})\r\n\u0026\u0026{view.params.query_params.site}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Site" + }, + "position": { + "basis": "100%", + "grow": 1 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_2" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "View" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "540px", + "grow": 1 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.bucket})\r\n\u0026\u0026len({view.params.query_params.bucket})\u003e0\r\n\u0026\u0026!isNull({view.params.query_params.site})\r\n\u0026\u0026len({view.params.query_params.site})\u003e0" + }, + "type": "expr" + } + }, + "props.options": { + "binding": { + "config": { + "path": "view.custom.view_options_by_site_and_bucket" + }, + "type": "property" + } + }, + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.query_params.view" + }, + "type": "property" + } + } + }, + "props": { + "dropdownOptionStyle": { + "overflowWrap": "break-word", + "whiteSpace": "normal" + }, + "showClearIcon": true + }, + "type": "ia.input.dropdown" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.params.query_params.view \u003d None\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Clear Button" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "!isNull({view.params.query_params.view})\r\n\u0026\u0026{view.params.query_params.view}!\u003d\u0027\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/clear" + } + }, + "primary": false, + "style": { + "classes": "Input/Button/Secondary_minimal" + }, + "text": "" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "View" + }, + "position": { + "basis": "100%", + "grow": 1 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_3" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "125px", + "shrink": 0 + }, + "props": { + "style": { + "classes": "Framework/Card/Label", + "textAlign": "right" + }, + "text": "Object Key" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.query_params.object_key" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Framework/Card/Value", + "textAlign": "left" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Object Key" + }, + "position": { + "basis": "100%", + "grow": 1 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_4" + }, + "position": { + "shrink": 0 + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Command-Authenticate/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Command-Authenticate/resource.json new file mode 100644 index 0000000..f51e02d --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Command-Authenticate/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-05-16T14:07:14Z" + }, + "lastModificationSignature": "5ba5f4a3894c68eeed86c821495f3d891d998677db1cb0830e0b7a09e0215d34" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Command-Authenticate/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Command-Authenticate/thumbnail.png new file mode 100644 index 0000000..ba1ce92 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Command-Authenticate/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Command-Authenticate/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Command-Authenticate/view.json new file mode 100644 index 0000000..83e5cc2 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Command-Authenticate/view.json @@ -0,0 +1,184 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 240, + "width": 400 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Header" + }, + "position": { + "height": 32, + "width": 400 + }, + "props": { + "style": { + "background-color": "#555555", + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "Command Authentication" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Password Label" + }, + "position": { + "height": 32, + "width": 152, + "x": 115.5, + "y": 68 + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-White-12pt", + "fontSize": 18 + }, + "text": "Enter Username" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "PasswordField" + }, + "position": { + "height": 32, + "width": 229, + "x": 85.5, + "y": 116 + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "fontSize": 16 + } + }, + "type": "ia.input.password-field" + }, + { + "meta": { + "name": "Error Label", + "visible": false + }, + "position": { + "height": 32, + "width": 270, + "x": 56.5, + "y": 143 + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "color": "#FF8000", + "fontSize": 16, + "textAlign": "center" + }, + "text": "Login does not match" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tusername \u003d self.session.props.auth.user.userName\n\tlogin \u003d self.getSibling(\"PasswordField\").props.text\n\t\n\tif username \u003d\u003d login.lower():\n\t\tuser_valid \u003d True\n\telse:\n\t\tuser_valid \u003d False\n\t\n\trme_role \u003d self.session.custom.fc +\"-rme-c2c-all\"\n\tadmin_role \u003d \"eurme-ignition-admins\"\n\troles \u003d (self.session.props.auth.user.roles)\n\tif (rme_role.lower() in roles \n\tor rme_role.upper() in roles) or admin_role in roles:\n\t\thas_role \u003d True\n\telse:\n\t\thas_role \u003d False\n\t\n\tif user_valid and has_role:\n\t\tself.session.custom.command_auth.auth_time \u003d system.date.now()\n\t\tself.session.custom.command_auth.enabled \u003d True\n\t\tsystem.perspective.closePopup(\u0027\u0027)\n\telse:\n\t\tself.getSibling(\"Error Label\").meta.visible \u003d True" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Authenticate" + }, + "position": { + "height": 34, + "width": 120, + "x": 71, + "y": 191 + }, + "props": { + "image": { + "height": 20, + "width": 20 + }, + "style": { + "backgroundColor": "#555555", + "classes": "Background-Styles/Controller" + }, + "text": "Authenticate" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.closePopup(\u0027\u0027)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Cancel" + }, + "position": { + "height": 34, + "width": 120, + "x": 209, + "y": 191 + }, + "props": { + "image": { + "height": 20, + "width": 20 + }, + "style": { + "backgroundColor": "#555555", + "classes": "Background-Styles/Controller" + }, + "text": "Cancel" + }, + "type": "ia.input.button" + } + ], + "custom": { + "tags_data": { + "$": [ + "ds", + 192, + 1671029641714 + ], + "$columns": [ + { + "data": [], + "name": "Tags", + "type": "String" + } + ] + } + }, + "meta": { + "name": "root" + }, + "props": { + "style": { + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East/resource.json new file mode 100644 index 0000000..5de24c0 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-05-13T15:36:14Z" + }, + "lastModificationSignature": "a90cb76f89d400f2fc12d26c1c27cb534cf2a776e48b0b8631c62f465b395d12" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East/thumbnail.png new file mode 100644 index 0000000..a54fd85 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East/view.json new file mode 100644 index 0000000..e4d037f --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East/view.json @@ -0,0 +1,1099 @@ +{ + "custom": { + "PLC_list": null, + "running_state": -1, + "state": 5, + "views_data": [] + }, + "params": { + "tagProps": [ + "PLC01/PS1-9/101SN01_ES", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.PLC_list": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" + }, + "transforms": [ + { + "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", + "type": "script" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.running_state": { + "binding": { + "config": { + "expression": "try(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),-1)\t\r\n" + }, + "transforms": [ + { + "expression": "if({value} !\u003d -1, try(jsonGet({value},\"state\"),4),{value})", + "type": "expression" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "if(isNull({value}), 0, {value})", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.views_data": { + "binding": { + "config": { + "struct": { + "equipment_id": "{view.params.tagProps[0]}" + }, + "waitOnAll": true + }, + "transforms": [ + { + "code": "\tproject_info \u003d system.perspective.getProjectInfo()\n\t#self.custom.views_data \u003d project_info\n\tviews \u003d project_info.get(\"views\")\n\t#equipment_id \u003d self.view.params.tagProps[0]\n\tviews_data \u003d [i for i in views if i[\"path\"].startswith(\"Custom-Views/\"+ value.equipment_id)]\n\t#self.custom.views_data \u003d views_data\n\t\n\treturn views_data", + "type": "script" + } + ], + "type": "expr-struct" + }, + "persistent": true + }, + "params.tagProps": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "width": 400 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "color": "#FFFF", + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "paddingLeft": 10 + } + }, + "type": "ia.display.label" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.closeDock(\u0027Docked-East\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Icon", + "tooltip": { + "enabled": true, + "style": { + "cursor": "pointer" + }, + "text": "Close faceplate" + } + }, + "props": { + "path": "material/close", + "style": { + "cursor": "pointer", + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + } + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "200px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "session.custom.command_auth.enabled" + }, + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "\u0027Control Enabled Timeout: \\n\u0027 + ({session.custom.command_auth.timeout_sp} - {session.custom.command_auth.auth_timeout}) + \u0027 seconds\u0027" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "color": "#000000", + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5, + "whiteSpace": "pre" + }, + "textStyle": { + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tif self.session.custom.command_auth.enabled:\n\t\t\tself.session.custom.command_auth.enabled \u003d False\n\telse:\n\t\t#self.session.custom.command_auth.enabled \u003d True\n\t\tsystem.perspective.openPopup(\u0027command-auth\u0027, \u0027PopUp-Views/Command-Authenticate\u0027, showCloseIcon \u003d False, draggable \u003d False, modal \u003d True, overlayDismiss \u003d True)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0", + "tooltip": { + "enabled": true, + "location": "bottom", + "style": { + "whiteSpace": "pre" + } + } + }, + "position": { + "basis": "170px", + "shrink": 0 + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "//if({this.props.enabled}, \u0027Re-Authenticate to Enable Command Controls\u0027, \u0027Insufficient Privileges - User Role Required: \u0027 + {session.custom.fc} + \u0027-rme-all\u0027)\r\nif({session.custom.command_auth.enabled},\u0027Click to Disable Controls.\u0027, \u0027Re-Authenticate to Enable Command Controls \\nUser Role Required: \u0027 + {session.custom.fc} + \u0027-rme-all\u0027)" + }, + "type": "expr" + } + }, + "props.image.icon.path": { + "binding": { + "config": { + "expression": "if({session.custom.command_auth.enabled},\u0027material/lock_open\u0027,\u0027material/lock\u0027)" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "if({session.custom.command_auth.enabled},\u0027Disable Controls\u0027,\u0027Enable Controls\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "icon": {} + }, + "primary": false, + "style": { + "marginBottom": 5, + "marginRight": 25, + "marginTop": 5 + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "50px" + }, + "props": { + "justify": "flex-end" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "basis": "400px", + "shrink": 0 + }, + "propConfig": { + "props.params.value.tagProps[0]": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "value": { + "tagProps": [ + null, + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + } + }, + "path": "Symbol-Views/Controller-Views/CommandControlActions" + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "50px" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "100px", + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "code": "\n\tplcList \u003d self.view.custom.PLC_list\n\n\tshowCommand \u003d False\n\n\tfor i in plcList:\n\t\tif value \u003d\u003d i:\n\t\t\tshowCommand \u003d True\n\n\treturn showCommand", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "direction": "column", + "style": { + "classes": "Buttons/Clear-Background" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "Labels/Label_1", + "marginTop": 20 + }, + "text": "No Active Alarms" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "AlarmTable" + }, + "position": { + "basis": "733px", + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if({this.props.params.length_of_table_data} \u003e 0, True, False)" + }, + "type": "expr" + } + }, + "props.params.tagProps[0]": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "alarm_states": [ + "Shelved", + "Active", + "Not Active" + ], + "length_of_table_data": 0, + "show_severity_column": true, + "show_state_column": true, + "table_type": "Docked-East", + "tagProps": [ + null + ] + }, + "path": "Alarm-Views/AlarmTable" + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "Active_tab" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "NameField" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "NAME" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "DeviceName" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "backgroundColor": "#FFFFFF", + "classes": "Text-Styles/Ariel-Bold-12pt", + "paddingLeft": 10 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Name" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "NameField" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "PRIORITY" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Priority" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d False, {view.custom.state}, {view.custom.state} + 300) " + }, + "transforms": [ + { + "fallback": "State-Styles/Background-Fill/State0", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "State-Styles/Background-Fill/State1" + }, + { + "input": 2, + "output": "State-Styles/Background-Fill/State2" + }, + { + "input": 3, + "output": "State-Styles/Background-Fill/State3" + }, + { + "input": 4, + "output": "State-Styles/Background-Fill/State4" + }, + { + "input": 5, + "output": "State-Styles/Background-Fill/State5" + }, + { + "input": 6, + "output": "State-Styles/Background-Fill/State6" + }, + { + "input": 0, + "output": "State-Styles/Background-Fill/State0" + }, + { + "input": 301, + "output": "State-Styles/Alt-Background-Fill/State1" + }, + { + "input": 302, + "output": "State-Styles/Alt-Background-Fill/State2" + }, + { + "input": 303, + "output": "State-Styles/Alt-Background-Fill/State3" + }, + { + "input": 304, + "output": "State-Styles/Alt-Background-Fill/State4" + }, + { + "input": 305, + "output": "State-Styles/Alt-Background-Fill/State5" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "props.tag_path_to_lookup": { + "binding": { + "config": { + "expression": "\"[\\\"\" + {view.params.tagProps[0]} + \"\\\"]\"" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "{view.custom.state}" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "Stopped" + }, + { + "input": 1, + "output": "High Priority" + }, + { + "input": 2, + "output": "Medium Priority" + }, + { + "input": 3, + "output": "Low Priority" + }, + { + "input": 4, + "output": "Diagnostic" + }, + { + "input": 5, + "output": "Healthy" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "style": { + "paddingLeft": 10, + "textAlign": "left" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Priority" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "NameField" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "RUNNING STATUS" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Priority" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired},\r\n{view.custom.running_state} + 300, {view.custom.running_state})" + }, + "transforms": [ + { + "fallback": "State-Styles/Background-Fill/StateUnknown", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "State-Styles/Background-Fill/State1" + }, + { + "input": 2, + "output": "State-Styles/Background-Fill/State0" + }, + { + "input": 3, + "output": "State-Styles/Background-Fill/State5" + }, + { + "input": 301, + "output": "State-Styles/Background-Fill/State1" + }, + { + "input": 302, + "output": "State-Styles/Background-Fill/State0" + }, + { + "input": 303, + "output": "State-Styles/Alt-Background-Fill/State5" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "props.tag_path_to_lookup": { + "binding": { + "config": { + "expression": "\"[\\\"\" + {view.params.tagProps[0]} + \"\\\"]\"" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "{view.custom.running_state}" + }, + "transforms": [ + { + "fallback": "Unknown", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Faulted" + }, + { + "input": 2, + "output": "Stopped" + }, + { + "input": 3, + "output": "Running" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "style": { + "paddingLeft": 10, + "textAlign": "left" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Running Status" + }, + "position": { + "basis": "35px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{view.custom.running_state} \u003e -1" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "100px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Info_tab" + }, + "position": { + "tabIndex": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "len({../Views_list.props.data}) \u003d 0" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "Labels/Label_1", + "marginTop": 20 + }, + "text": "No Configured Custom Views" + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onRowDoubleClick": [ + { + "config": { + "script": "\trow \u003d event.value\n\tcustom_view \u003d row.get(\"path\",\"none\")\n\tif custom_view !\u003d \"None\":\n\t\tequipment_id \u003d custom_view.split(\"/\")[1]\n\t\turl_to_navigate \u003d \"/CustomView/%s/\" % (equipment_id,)\n\t\tsystem.perspective.navigate(page \u003d url_to_navigate)\n\t\tsystem.perspective.sendMessage(\"plc-to-display\", payload \u003d {\"device\":\"none\",\"show_controls\":False,\"area\":\"none\"}, scope \u003d \"page\")\n\t\tsystem.perspective.closePopup(id\u003d \"StatusPopUP\")\n\t\tself.parent.parent.parent.getChild(\"tabs\").props.currentTabIndex \u003d 0\n\t\t\n\t" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "draggable": true, + "id": "W1H0Nole", + "modal": false, + "overlayDismiss": false, + "resizable": true, + "showCloseIcon": true, + "title": "InfoPopUp", + "type": "close", + "viewPath": "PopUp-Views/Controller-Equipment/Information", + "viewportBound": false + }, + "scope": "C", + "type": "popup" + } + ] + } + }, + "meta": { + "name": "Views_list" + }, + "position": { + "basis": "915px", + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "len({this.props.data}) \u003e 0" + }, + "type": "expr" + } + }, + "props.data": { + "binding": { + "config": { + "path": "view.custom.views_data" + }, + "type": "property" + } + } + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "Views_tab" + }, + "position": { + "tabIndex": 2 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "classes": "Labels/Label_1", + "marginTop": 20 + }, + "text": "For Future Development" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "OEE_tab" + }, + "position": { + "tabIndex": 3 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "tabs" + }, + "position": { + "grow": 1 + }, + "props": { + "menuType": "modern", + "tabSize": { + "width": 1000 + }, + "tabStyle": { + "active": { + "classes": "", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "paddingLeft": 10 + }, + "inactive": { + "classes": "", + "color": "#B8B8B8", + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "paddingLeft": 10 + } + }, + "tabs": [ + "Alarms", + "Info", + "Views", + "KPI\u0027s" + ] + }, + "type": "ia.container.tab" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "670px", + "grow": 1 + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "800px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "classes": "Buttons/Button-Menu" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information/resource.json new file mode 100644 index 0000000..3c17ef6 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol@amazon.co.uk", + "timestamp": "2022-08-12T12:01:32Z" + }, + "lastModificationSignature": "c66773013ad855e48d0803e226e5396a760eaceeeb8ff89e1f4cba7f551125a6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information/thumbnail.png new file mode 100644 index 0000000..0117979 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information/view.json new file mode 100644 index 0000000..d2127d3 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information/view.json @@ -0,0 +1,4965 @@ +{ + "custom": {}, + "params": { + "tagProps": [ + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "params.tagProps": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 447, + "width": 917 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Spacer1" + }, + "position": { + "basis": "20px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "NameField" + }, + "position": { + "basis": "50px" + }, + "props": { + "text": "NAME" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Spacer" + }, + "position": { + "basis": "100px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "DeviceName" + }, + "position": { + "basis": "205px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Name" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Spacer1" + }, + "position": { + "basis": "20px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "NameField" + }, + "position": { + "basis": "50px" + }, + "props": { + "text": "STATUS" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Spacer" + }, + "position": { + "basis": "100px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Priority" + }, + "position": { + "basis": "205px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "{/root.custom.state}" + }, + "transforms": [ + { + "fallback": "State-Styles/State0", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "State-Styles/Background-Fill/State1" + }, + { + "input": 2, + "output": "State-Styles/Background-Fill/State2" + }, + { + "input": 3, + "output": "State-Styles/Background-Fill/State3" + }, + { + "input": 4, + "output": "State-Styles/Background-Fill/State4" + }, + { + "input": 5, + "output": "State-Styles/Background-Fill/State5" + }, + { + "input": 6, + "output": "State-Styles/Background-Fill/State6" + }, + { + "input": 0, + "output": "State-Styles/State0" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "{/root.custom.state}" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Aborted" + }, + { + "input": 2, + "output": "Stopped" + }, + { + "input": 3, + "output": "Process alarm" + }, + { + "input": 4, + "output": "Warning" + }, + { + "input": 5, + "output": "Running" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "style": { + "textAlign": "left" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Priority" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "NameField" + }, + "position": { + "basis": "82px" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Priority_0" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "100px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Info_tab" + }, + "position": { + "tabIndex": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "custom": { + "delay": 2000 + }, + "events": { + "component": { + "onRowDoubleClick": { + "config": { + "script": "\tnavigation.alarm_navigation.navigate_to_alarm(self, event)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "AlarmTable" + }, + "position": { + "basis": "623px", + "grow": 1 + }, + "propConfig": { + "custom.run_update": { + "binding": { + "config": { + "path": "view.params.tagProps[9]" + }, + "type": "property" + } + }, + "custom.update": { + "binding": { + "config": { + "expression": "now({this.custom.delay})" + }, + "type": "expr" + }, + "onChange": { + "enabled": null, + "script": "\timport time\n\tfrom datetime import datetime\n\tstartTime \u003d datetime.now()\n\t\n\tdef convert(duration):\n\t\tsecs \u003d duration/1000\n\t\treturn time.strftime(\"%H:%M:%S\", time.gmtime(secs))\n\t\n\tdef empty_table():\n\t\treturn [[]]\n\n\talarms_data \u003d []\n\talarms_critical \u003d []\n\talarms_high \u003d []\n\talarms_medium \u003d []\n\talarms_low \u003d []\n\talarms_diagnostic \u003d []\n\talarm_temp_dict \u003d {}\n\tstyle_props_critical \u003d {\"classes\":\"Alarms-Styles/Critical\"}\n\tstyle_props_high \u003d {\"classes\":\"Alarms-Styles/High\"}\n\tstyle_props_medium \u003d {\"classes\":\"Alarms-Styles/Medium\"}\n\tstyle_props_low \u003d {\"classes\":\"Alarms-Styles/Low\"}\n\tstyle_props_diagnostic \u003d {\"classes\":\"Alarms-Styles/Diagnostic\"}\n\n\tif self.custom.run_update:\n\t\tif system.tag.exists(\"System/ActiveAlarms\"):\n\t\t\t\t\n\t\t\talarm_data \u003d system.tag.readBlocking([\"System/ActiveAlarms\"])\n\t\t\talarm_data \u003d alarm_data[0].value\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(alarm_data)\n\t\t\tdevice_name \u003d self.view.params.tagProps[0]\n\t\n\t\t\tif len(decode_alarm_data) \u003e 0:\n\t\n\t\t\t\tfor i in decode_alarm_data:\n\t\t\t\t\tif str(decode_alarm_data[i][\"DisplayPath\"]).startswith(device_name):\n\t\t\t\t\t\tif decode_alarm_data[i].get(\"Priority\") \u003d\u003d 4:\n\t\t\t\t\t\t\tstyle_class \u003d style_props_critical\n\t\t\t\t\t\t\tseverity \u003d \"4. Critical\"\n\t\t\t\t\t\t\tkey \u003d \"Critical\"\n\t\t\t\t\t\t\t\n\t\t\t\t\t\telif decode_alarm_data[i].get(\"Priority\") \u003d\u003d 3:\n\t\t\t\t\t\t\tstyle_class \u003d style_props_high\n\t\t\t\t\t\t\tseverity \u003d \"3. High\"\n\t\t\t\t\t\t\tkey \u003d \"High\"\n\t\t\t\t\t\t\t\n\t\t\t\t\t\telif decode_alarm_data[i].get(\"Priority\") \u003d\u003d 2:\n\t\t\t\t\t\t\tstyle_class \u003d style_props_medium\n\t\t\t\t\t\t\tseverity \u003d \"2. Medium\"\n\t\t\t\t\t\t\tkey \u003d \"Medium\"\n\t\t\t\t\t\t\t\n\t\t\t\t\t\telif decode_alarm_data[i].get(\"Priority\") \u003d\u003d 1:\n\t\t\t\t\t\t\tstyle_class \u003d style_props_low\n\t\t\t\t\t\t\tseverity \u003d \"1. Low\"\n\t\t\t\t\t\t\tkey \u003d \"Low\"\n\t\t\t\t\t\t\t\n\t\t\t\t\t\telif decode_alarm_data[i].get(\"Priority\") \u003d\u003d 0:\n\t\t\t\t\t\t\tstyle_class \u003d style_props_diagnostic\n\t\t\t\t\t\t\tseverity \u003d \"0. Warning\"\n\t\t\t\t\t\t\tkey \u003d \"Diagnostic\"\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tduration \u003d decode_alarm_data[i].get(\"Duration\")\n\t\t\t\t\t\tconverted_time \u003d convert(duration)\n\t\t\t\t\t\tdisplay_path \u003d decode_alarm_data[i].get(\"DisplayPath\")\n\t\t\t\t\t\ttime_stamp \u003d decode_alarm_data[i].get(\"TimeStamp\")\n\t\t\t\t\t\tudt_path \u003d decode_alarm_data[i].get(\"UDT_tag\")\n\t\t\t\t\t\tvendor_id \u003d decode_alarm_data[i].get(\"AddInfo\")\n\t\t\t\t\t\tname \u003d decode_alarm_data[i].get(\"Name\")\n\t\t\t\t\t\talarm_id \u003d i\n\t\t\t\t\t\t\n\t\t\t\t\t\trow\u003d row_builder.build_row(DisplayPath \u003d display_path, Duration \u003d converted_time,\n\t\t\t\t\t\tSeverity \u003d severity, Timestamp \u003d time_stamp, VendorId \u003d vendor_id,\n\t\t\t\t\t\tName \u003d name, AlarmId \u003d alarm_id, StyleClass \u003d style_class)\n\t\t\t\t\t\t\n\t\t\t\t\t\tif alarm_temp_dict.get(udt_path,\"None\") \u003d\u003d \"None\":\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\talarm_temp_dict[udt_path]\u003d {}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif alarm_temp_dict.get(udt_path,{}).get(key,\"None\") \u003d\u003d \"None\":\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\talarm_temp_dict[udt_path][key]\u003d[]\n\t\t\t\t\t\t\n\t#\t\t\t\t\t\tsystem.perspective.print(alarm_temp_dict)\n\t\t\t\t\t\talarm_temp_dict[udt_path][key].append(row)\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor i in alarm_temp_dict:\n\t#\t\t\t\t\tsystem.perspective.print(alarm_temp_dict[i].get(\"Critical\",\"None\"))\t\t\t\t\n\t\t\t\t\tif alarm_temp_dict[i].get(\"Critical\",\"None\") !\u003d \"None\":\n\t\t\t\t\t\talarms_critical +\u003d alarm_temp_dict[i].get(\"Critical\")\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\telif alarm_temp_dict[i].get(\"High\",\"None\") !\u003d \"None\":\n\t\t\t\t\t\talarms_high +\u003d alarm_temp_dict[i].get(\"High\")\n\t\t\t\t\t\n\t\t\t\t\telif alarm_temp_dict[i].get(\"Medium\",\"None\") !\u003d \"None\":\n\t\t\t\t\t\talarms_medium +\u003d alarm_temp_dict[i].get(\"Medium\")\n\t\t\t\t\t\n\t\t\t\t\telif alarm_temp_dict[i].get(\"Low\",\"None\") !\u003d \"None\":\n\t\t\t\t\t\talarms_low +\u003d alarm_temp_dict[i].get(\"Low\")\n\t\t\t\t\t\n\t\t\t\t\telif alarm_temp_dict[i].get(\"Diagnostic\",\"None\") !\u003d \"None\":\n\t\t\t\t\t\talarms_diagnostic +\u003d alarm_temp_dict[i].get(\"Diagnostic\")\n\t\t\t\t\t\t\n\t\t\t\talarms_data \u003d alarms_critical + alarms_high + alarms_medium + alarms_low + alarms_diagnostic\n\t#\t\t\t\tsystem.perspective.print(alarms_data)\n\t\t\t\tself.props.data \u003d alarms_data\n\t\t\t\t\t\n\t\t\t\t\n\t\telse:\n\t\t\tself.props.data \u003d empty_table()" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Name", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 100 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Duration", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 50 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Severity", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 50 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Timestamp", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "VendorId", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "AlarmId", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": false, + "width": "" + } + ], + "data": [ + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "9ffc0e5d-8cf1-4a0d-9521-594bd55387cd" + }, + "DisplayPath": { + "value": "PLC01_1510_11_49/OPC/inAlarms0/5_Chute not active" + }, + "Duration": { + "value": "00:06:59" + }, + "Name": { + "value": "5_Chute not active" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:54:32" + }, + "VendorId": { + "value": "\u003d01+1510.11.49" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "29a021f5-cd24-4cc3-bc8b-50ba99e5fb0a" + }, + "DisplayPath": { + "value": "PLC60_1220_44_01/OPC/inAlarms0/0_Photo eye blocked" + }, + "Duration": { + "value": "02:17:50" + }, + "Name": { + "value": "0_Photo eye blocked" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 09:43:40" + }, + "VendorId": { + "value": "\u003d60+1220.44.01-B206.0" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "f0b4bb7e-8a90-4a37-b2b1-1b40a8b22da9" + }, + "DisplayPath": { + "value": "PLC09_1010_51_02/OPC/inAlarms0/0_Photo eye blocked" + }, + "Duration": { + "value": "01:19:36" + }, + "Name": { + "value": "0_Photo eye blocked" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 10:41:55" + }, + "VendorId": { + "value": "\u003d09+1010.51.02-B811.6" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "31041a1d-0e60-49df-8343-4dc8fd71addc" + }, + "DisplayPath": { + "value": "PLC08_2050_15_09/OPC/inAlarms0/8_Slack chain detection" + }, + "Duration": { + "value": "12:06:12" + }, + "Name": { + "value": "8_Slack chain detection" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-11 23:55:18" + }, + "VendorId": { + "value": "\u003d08+2050.15.09" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "0af8e42f-3b41-4dd0-a5c9-31457343d138" + }, + "DisplayPath": { + "value": "PLC40_1300_01_01/OPC/inAlarms0/0_Error rate at update too high" + }, + "Duration": { + "value": "03:51:00" + }, + "Name": { + "value": "0_Error rate at update too high" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 08:10:30" + }, + "VendorId": { + "value": "\u003d40+1300.01.01-B602.2" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "279c06bb-fa62-452f-8cb6-7821e26db4b9" + }, + "DisplayPath": { + "value": "PLC02_1510_11_01/OPC/inAlarms0/5_Chute not active" + }, + "Duration": { + "value": "02:29:59" + }, + "Name": { + "value": "5_Chute not active" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-10 09:31:32" + }, + "VendorId": { + "value": "\u003d02+1510.11.01" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "e7fa9539-2805-4f6f-8906-3aa3ccbb5baa" + }, + "DisplayPath": { + "value": "PLC51_1211_91_02/OPC/inAlarms0/1_Local motor starter error" + }, + "Duration": { + "value": "00:05:26" + }, + "Name": { + "value": "1_Local motor starter error" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:56:04" + }, + "VendorId": { + "value": "\u003d51+1211.91.02-M1" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "cd60a658-cc9e-4c6c-a344-02f64cac30d3" + }, + "DisplayPath": { + "value": "PLC70/OPC/inAlarms0/23_Power supply contactor error" + }, + "Duration": { + "value": "02:29:59" + }, + "Name": { + "value": "23_Power supply contactor error" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-10 09:31:31" + }, + "VendorId": { + "value": "\u003d70+S01-KM003" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "e48406f1-f292-4e31-9eb6-16a04441b3aa" + }, + "DisplayPath": { + "value": "PLC71/OPC/inAlarms0/0_Profinet node fault" + }, + "Duration": { + "value": "02:29:59" + }, + "Name": { + "value": "0_Profinet node fault" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-10 09:31:32" + }, + "VendorId": { + "value": "\u003d71+PN212-A001" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "7187a1cd-c430-4dd4-bf8b-44edb5fe2206" + }, + "DisplayPath": { + "value": "PLC71/OPC/inAlarms0/2_ASI-Gateway error" + }, + "Duration": { + "value": "02:29:59" + }, + "Name": { + "value": "2_ASI-Gateway error" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-10 09:31:32" + }, + "VendorId": { + "value": "\u003d71+S01-A001" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "3f4afc70-4fd2-41b6-89e8-394644027469" + }, + "DisplayPath": { + "value": "PLC71/OPC/inAlarms0/4_ASI-Gateway error" + }, + "Duration": { + "value": "02:29:59" + }, + "Name": { + "value": "4_ASI-Gateway error" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-10 09:31:32" + }, + "VendorId": { + "value": "\u003d71+S01-A002" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "015c963c-eb92-4d86-b322-ef5ffaecd98d" + }, + "DisplayPath": { + "value": "PLC09_1010_23_33/OPC/inAlarms0/0_Photo eye blocked" + }, + "Duration": { + "value": "00:17:41" + }, + "Name": { + "value": "0_Photo eye blocked" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:43:49" + }, + "VendorId": { + "value": "\u003d09+1010.23.33-B222.0" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "e647c74c-a952-45bb-b18b-8e6c32fee8ef" + }, + "DisplayPath": { + "value": "PLC60_1220_44_05/OPC/inAlarms0/0_Photo eye blocked" + }, + "Duration": { + "value": "04:24:23" + }, + "Name": { + "value": "0_Photo eye blocked" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 07:37:08" + }, + "VendorId": { + "value": "\u003d60+1220.44.05-B206.4" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "0bc4bfed-efed-4310-ba28-e43fcf8df3e4" + }, + "DisplayPath": { + "value": "ARSAW1408/OPC/inAlarms2/6_Photo eye blocked" + }, + "Duration": { + "value": "00:04:06" + }, + "Name": { + "value": "6_Photo eye blocked" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:57:24" + }, + "VendorId": { + "value": "\u003dARSAW1408+05.22-B109.6" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "c62ab15f-7552-4ee8-bb3a-75ec1fb471ef" + }, + "DisplayPath": { + "value": "PLC1000_1100_06_91/OPC/inAlarms0/2_No-Read rate at reading system too high" + }, + "Duration": { + "value": "00:10:44" + }, + "Name": { + "value": "2_No-Read rate at reading system too high" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:50:46" + }, + "VendorId": { + "value": "\u003dP1000+1100.06.91.E01-U1" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "030d8d08-02a9-4dfa-a4a4-80d4300e9a1e" + }, + "DisplayPath": { + "value": "ARSAW1404/OPC/inAlarms2/2_Photo eye blocked" + }, + "Duration": { + "value": "00:06:24" + }, + "Name": { + "value": "2_Photo eye blocked" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:55:07" + }, + "VendorId": { + "value": "\u003dARSAW1404+05.13-B111.1" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "3a194b9f-8fdf-4b1e-b728-33174d7b3f04" + }, + "DisplayPath": { + "value": "ARSAW1404/OPC/inAlarms2/3_Photo eye blocked" + }, + "Duration": { + "value": "00:05:56" + }, + "Name": { + "value": "3_Photo eye blocked" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:55:34" + }, + "VendorId": { + "value": "\u003dARSAW1404+05.14-B111.2" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "47014921-2fe8-4c02-8658-27bf3d2bc0d3" + }, + "DisplayPath": { + "value": "PLC02_1510_11_14/OPC/inAlarms0/5_Chute not active" + }, + "Duration": { + "value": "00:11:34" + }, + "Name": { + "value": "5_Chute not active" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:49:56" + }, + "VendorId": { + "value": "\u003d02+1510.11.14" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "d53caa27-7164-446b-8673-3ce152946046" + }, + "DisplayPath": { + "value": "PLC1000_1100_06_01/OPC/inAlarms0/0_Error rate at update too high" + }, + "Duration": { + "value": "00:01:46" + }, + "Name": { + "value": "0_Error rate at update too high" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:59:44" + }, + "VendorId": { + "value": "\u003dP1000+1100.06.01-B202.2" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "29c088ad-f890-4e99-8452-45792542255d" + }, + "DisplayPath": { + "value": "PLC01_1510_11_32/OPC/inAlarms0/5_Chute not active" + }, + "Duration": { + "value": "00:13:37" + }, + "Name": { + "value": "5_Chute not active" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:47:53" + }, + "VendorId": { + "value": "\u003d01+1510.11.32" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "66d7fd3a-ade4-4d6b-98bd-f3e782ee94da" + }, + "DisplayPath": { + "value": "PLC01_1510_11_35/OPC/inAlarms0/5_Chute not active" + }, + "Duration": { + "value": "00:10:21" + }, + "Name": { + "value": "5_Chute not active" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:51:09" + }, + "VendorId": { + "value": "\u003d01+1510.11.35" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "43f91251-1782-49c3-b45a-0c70978778a1" + }, + "DisplayPath": { + "value": "PLC66_1220_63_40/OPC/inAlarms0/7_Photo eye blocked" + }, + "Duration": { + "value": "00:02:49" + }, + "Name": { + "value": "7_Photo eye blocked" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:58:41" + }, + "VendorId": { + "value": "\u003d66+1220.63.40-B205.4" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "d4c3e86d-5cab-47de-8562-48b4fc5c063b" + }, + "DisplayPath": { + "value": "ARSAW1501/OPC/inAlarms2/2_Photo eye blocked" + }, + "Duration": { + "value": "00:25:20" + }, + "Name": { + "value": "2_Photo eye blocked" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:36:10" + }, + "VendorId": { + "value": "\u003dARSAW1501+05.13-B111.1" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "a992380e-6a60-4388-9fc1-b76b052a3641" + }, + "DisplayPath": { + "value": "PLC02_1510_87_15/OPC/inAlarms0/5_Chute not active" + }, + "Duration": { + "value": "00:17:01" + }, + "Name": { + "value": "5_Chute not active" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:44:29" + }, + "VendorId": { + "value": "\u003d02+1510.87.15" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "4457c4eb-9a49-463b-ba28-362fda48ce12" + }, + "DisplayPath": { + "value": "PLC20_1200_22_01/OPC/inAlarms0/5_Chain over length detection" + }, + "Duration": { + "value": "04:43:25" + }, + "Name": { + "value": "5_Chain over length detection" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 07:18:05" + }, + "VendorId": { + "value": "\u003d20+1200.22.01" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "706a7319-3b58-4e57-ad89-d97f8aee67c1" + }, + "DisplayPath": { + "value": "PLC09_1010_13_31/OPC/inAlarms0/0_Photo eye blocked" + }, + "Duration": { + "value": "00:11:09" + }, + "Name": { + "value": "0_Photo eye blocked" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-12 11:50:21" + }, + "VendorId": { + "value": "\u003d09+1010.13.31-B122.6" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "AlarmId": { + "value": "70bbd7ad-80fb-4c24-9a95-9d93ab13c85f" + }, + "DisplayPath": { + "value": "PLC66_1220_64_07/OPC/inAlarms0/0_Photo eye blocked" + }, + "Duration": { + "value": "02:30:02" + }, + "Name": { + "value": "0_Photo eye blocked" + }, + "Severity": { + "value": "3. High" + }, + "Timestamp": { + "value": "2022-08-10 09:31:28" + }, + "VendorId": { + "value": "\u003d66+1220.64.07-B206.6" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Medium" + }, + "value": { + "AlarmId": { + "value": "645b753f-c602-4e63-a841-e54160a602ba" + }, + "DisplayPath": { + "value": "SLAM302/OPC/ActiveEvents_0/Both Printers 1 Label Stop" + }, + "Duration": { + "value": "01:41:34" + }, + "Name": { + "value": "Both Printers 1 Label Stop" + }, + "Severity": { + "value": "2. Medium" + }, + "Timestamp": { + "value": "2022-08-12 10:19:56" + }, + "VendorId": { + "value": "" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Medium" + }, + "value": { + "AlarmId": { + "value": "ddf12c1a-3faa-48c8-a3c9-62105eade741" + }, + "DisplayPath": { + "value": "SLAM305/OPC/ActiveEvents_1/Printer 2 Fault" + }, + "Duration": { + "value": "01:22:45" + }, + "Name": { + "value": "Printer 2 Fault" + }, + "Severity": { + "value": "2. Medium" + }, + "Timestamp": { + "value": "2022-08-12 10:38:45" + }, + "VendorId": { + "value": "" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Medium" + }, + "value": { + "AlarmId": { + "value": "27d184d3-66b7-4309-a045-b7830a662fc9" + }, + "DisplayPath": { + "value": "SLAM305/OPC/ActiveEvents_0/Printer 1 Fault" + }, + "Duration": { + "value": "01:22:45" + }, + "Name": { + "value": "Printer 1 Fault" + }, + "Severity": { + "value": "2. Medium" + }, + "Timestamp": { + "value": "2022-08-12 10:38:45" + }, + "VendorId": { + "value": "" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Medium" + }, + "value": { + "AlarmId": { + "value": "8017709f-b8b6-4d83-9d30-b4d858c5c522" + }, + "DisplayPath": { + "value": "PLC1000_1100_35_01/OPC/inAlarms0/2_Stop button pushed" + }, + "Duration": { + "value": "00:03:01" + }, + "Name": { + "value": "2_Stop button pushed" + }, + "Severity": { + "value": "2. Medium" + }, + "Timestamp": { + "value": "2022-08-12 11:58:29" + }, + "VendorId": { + "value": "\u003dP1000+1100.35.01.B01-KA2.11A-S521.2" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "563c8152-fde4-4616-b5e3-3cb1a004bb75" + }, + "DisplayPath": { + "value": "PLC09_1010_32_40/OPC/inAlarms0/6_Full 25%" + }, + "Duration": { + "value": "23:25:42" + }, + "Name": { + "value": "6_Full 25%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-11 12:35:48" + }, + "VendorId": { + "value": "\u003d09+1010.32.40-B304.6" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "78f1c489-0e24-423c-a2cb-7614d18c8e4b" + }, + "DisplayPath": { + "value": "PLC09_1010_32_40/OPC/inAlarms0/2_Full 75%" + }, + "Duration": { + "value": "12:00:57" + }, + "Name": { + "value": "2_Full 75%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 00:00:33" + }, + "VendorId": { + "value": "\u003d09+1010.32.40-B304.4" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "fbbb85b0-d18d-4d36-8168-94b0187b3809" + }, + "DisplayPath": { + "value": "PLC09_1010_32_40/OPC/inAlarms0/4_Full 50%" + }, + "Duration": { + "value": "02:29:58" + }, + "Name": { + "value": "4_Full 50%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-10 09:31:32" + }, + "VendorId": { + "value": "\u003d09+1010.32.40-B304.5" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "921e2af7-cd0a-481a-aa63-062881e93aa6" + }, + "DisplayPath": { + "value": "PLC09_1010_32_40/OPC/inAlarms0/0_Full 100%" + }, + "Duration": { + "value": "00:10:33" + }, + "Name": { + "value": "0_Full 100%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:50:57" + }, + "VendorId": { + "value": "\u003d09+1010.32.40-B304.2" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "14d1d1d8-0c28-4c96-95cb-4aeb5d326b0e" + }, + "DisplayPath": { + "value": "SLAM306/OPC/ActiveEvents_0/Upstream Not Running" + }, + "Duration": { + "value": "00:05:16" + }, + "Name": { + "value": "Upstream Not Running" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:56:14" + }, + "VendorId": { + "value": "" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "89bba546-f28d-489d-8a5d-908990fc0c2c" + }, + "DisplayPath": { + "value": "PLC09_1010_12_40/OPC/inAlarms0/6_Full 25%" + }, + "Duration": { + "value": "00:33:01" + }, + "Name": { + "value": "6_Full 25%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:28:29" + }, + "VendorId": { + "value": "\u003d09+1010.12.40-B104.6" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "c06c4c9a-693b-4e44-b28d-1cc883f46581" + }, + "DisplayPath": { + "value": "PLC09_1010_12_40/OPC/inAlarms0/4_Full 50%" + }, + "Duration": { + "value": "01:23:43" + }, + "Name": { + "value": "4_Full 50%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 10:37:48" + }, + "VendorId": { + "value": "\u003d09+1010.12.40-B104.5" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "33550149-53b7-4490-8d39-06c9cee5ce63" + }, + "DisplayPath": { + "value": "PLC09_1010_12_40/OPC/inAlarms0/2_Full 75%" + }, + "Duration": { + "value": "01:19:44" + }, + "Name": { + "value": "2_Full 75%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 10:41:47" + }, + "VendorId": { + "value": "\u003d09+1010.12.40-B104.4" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "15b4dc66-968b-4b13-9fdd-43e1e887e4b1" + }, + "DisplayPath": { + "value": "PLC09_1010_12_40/OPC/inAlarms0/0_Full 100%" + }, + "Duration": { + "value": "00:04:37" + }, + "Name": { + "value": "0_Full 100%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:56:53" + }, + "VendorId": { + "value": "\u003d09+1010.12.40-B104.2" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "5bf89243-965b-4049-a5b4-65e0cdffbf9a" + }, + "DisplayPath": { + "value": "PLC1000_1100_10_25/OPC/inAlarms0/0_Full 25%" + }, + "Duration": { + "value": "00:01:10" + }, + "Name": { + "value": "0_Full 25%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 12:00:20" + }, + "VendorId": { + "value": "\u003dP1000+1100.10.25-B323.1" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "63c21fc9-5b3a-4f3f-9076-90145af9d833" + }, + "DisplayPath": { + "value": "PLC1000_1100_32_13/OPC/inAlarms0/0_Full 75%" + }, + "Duration": { + "value": "00:00:38" + }, + "Name": { + "value": "0_Full 75%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 12:00:52" + }, + "VendorId": { + "value": "\u003dP1000+1100.32.13-B503.4" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "08756b9a-24cd-4f90-b7a2-98d0d74b873d" + }, + "DisplayPath": { + "value": "PLC1000_1100_04_25/OPC/inAlarms0/0_Full 25%" + }, + "Duration": { + "value": "00:02:00" + }, + "Name": { + "value": "0_Full 25%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:59:30" + }, + "VendorId": { + "value": "\u003dP1000+1100.04.25-B122.0" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "46ca2c01-03cd-47c2-9576-feb03e4ef9ca" + }, + "DisplayPath": { + "value": "PLC1000_1100_10_17/OPC/inAlarms0/0_Full 50%" + }, + "Duration": { + "value": "00:00:58" + }, + "Name": { + "value": "0_Full 50%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 12:00:32" + }, + "VendorId": { + "value": "\u003dP1000+1100.10.17-B321.1" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "349731d9-7024-41d8-8345-9438180bfafe" + }, + "DisplayPath": { + "value": "PLC1000_1100_04_17/OPC/inAlarms0/0_Full 50%" + }, + "Duration": { + "value": "00:01:34" + }, + "Name": { + "value": "0_Full 50%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:59:56" + }, + "VendorId": { + "value": "\u003dP1000+1100.04.17-B121.0" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "e21645ca-8629-4117-8f6c-ac980405c027" + }, + "DisplayPath": { + "value": "PLC1000_1100_23_30/OPC/inAlarms0/0_Full 25%" + }, + "Duration": { + "value": "00:25:44" + }, + "Name": { + "value": "0_Full 25%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:35:46" + }, + "VendorId": { + "value": "\u003dP1000+1100.23.30-B412.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "cb7576ba-218a-4630-98e2-cf8a99313f43" + }, + "DisplayPath": { + "value": "PLC09_3040_22_60/OPC/inAlarms0/2_Full 25%" + }, + "Duration": { + "value": "00:15:03" + }, + "Name": { + "value": "2_Full 25%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:46:27" + }, + "VendorId": { + "value": "\u003d09+3040.22.60-B721.4" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "b2802772-4aed-4722-b300-812843fd49d8" + }, + "DisplayPath": { + "value": "PLC1000_1100_33_10/OPC/inAlarms0/0_Full 50%" + }, + "Duration": { + "value": "00:00:38" + }, + "Name": { + "value": "0_Full 50%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 12:00:52" + }, + "VendorId": { + "value": "\u003dP1000+1100.33.10-B509.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "1fd3ac98-2636-4ba1-8ff5-2edef1b446f2" + }, + "DisplayPath": { + "value": "PLC09_2040_22_60/OPC/inAlarms0/0_Full 50%" + }, + "Duration": { + "value": "00:00:55" + }, + "Name": { + "value": "0_Full 50%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 12:00:35" + }, + "VendorId": { + "value": "\u003d09+2040.22.60-B621.2" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "f5303a9d-3b13-482b-a73d-0c31f8138ea5" + }, + "DisplayPath": { + "value": "PLC09_2040_22_60/OPC/inAlarms0/2_Full 25%" + }, + "Duration": { + "value": "03:19:12" + }, + "Name": { + "value": "2_Full 25%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 08:42:19" + }, + "VendorId": { + "value": "\u003d09+2040.22.60-B621.4" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "cb8ee399-0e56-48ad-b1df-2b9a3a7c4acf" + }, + "DisplayPath": { + "value": "PLC09_1010_22_40/OPC/inAlarms0/4_Full 50%" + }, + "Duration": { + "value": "00:31:56" + }, + "Name": { + "value": "4_Full 50%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:29:34" + }, + "VendorId": { + "value": "\u003d09+1010.22.40-B204.5" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "fc2ea1bd-3565-4c2e-b401-9c66dea60498" + }, + "DisplayPath": { + "value": "PLC09_1010_22_40/OPC/inAlarms0/0_Full 100%" + }, + "Duration": { + "value": "00:01:07" + }, + "Name": { + "value": "0_Full 100%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 12:00:23" + }, + "VendorId": { + "value": "\u003d09+1010.22.40-B204.2" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "714b2ff3-75d9-4980-9f5f-02ab18a1ec78" + }, + "DisplayPath": { + "value": "PLC09_1010_22_40/OPC/inAlarms0/6_Full 25%" + }, + "Duration": { + "value": "00:32:55" + }, + "Name": { + "value": "6_Full 25%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:28:35" + }, + "VendorId": { + "value": "\u003d09+1010.22.40-B204.6" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "f3a117e7-bd0c-4d71-8000-3e739f332484" + }, + "DisplayPath": { + "value": "PLC09_1010_22_40/OPC/inAlarms0/2_Full 75%" + }, + "Duration": { + "value": "00:07:37" + }, + "Name": { + "value": "2_Full 75%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:53:53" + }, + "VendorId": { + "value": "\u003d09+1010.22.40-B204.4" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "e2baa964-eb4c-4a92-933d-3b5e2d1664e0" + }, + "DisplayPath": { + "value": "PLC1000_1100_33_22/OPC/inAlarms0/0_Full 25%" + }, + "Duration": { + "value": "00:02:35" + }, + "Name": { + "value": "0_Full 25%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:58:55" + }, + "VendorId": { + "value": "\u003dP1000+1100.33.22-B512.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "3a380b2a-08f4-4fff-97f9-961e70d55736" + }, + "DisplayPath": { + "value": "PLC1000_1100_08_19/OPC/inAlarms0/0_Full 25%" + }, + "Duration": { + "value": "00:03:05" + }, + "Name": { + "value": "0_Full 25%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:58:25" + }, + "VendorId": { + "value": "\u003dP1000+1100.08.19-B305.5" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "AlarmId": { + "value": "8e868e64-edcb-405f-b8af-dfbb81344088" + }, + "DisplayPath": { + "value": "PLC1000_1100_08_13/OPC/inAlarms0/0_Full 50%" + }, + "Duration": { + "value": "00:03:01" + }, + "Name": { + "value": "0_Full 50%" + }, + "Severity": { + "value": "1. Low" + }, + "Timestamp": { + "value": "2022-08-12 11:58:29" + }, + "VendorId": { + "value": "\u003dP1000+1100.08.13-B304.1" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "854d4883-9957-40dc-8590-5bdf800cd9ec" + }, + "DisplayPath": { + "value": "PLC01_1510_11_45/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "01:03:05" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 10:58:25" + }, + "VendorId": { + "value": "\u003d01+1510.11.45-B211.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "4e0e235c-40b2-43e1-8df0-05acd23f42cc" + }, + "DisplayPath": { + "value": "PLC01_1510_11_44/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "02:26:44" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 09:34:46" + }, + "VendorId": { + "value": "\u003d01+1510.11.44-B211.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "7f19e592-3937-4b82-b1a0-080f18028e58" + }, + "DisplayPath": { + "value": "PLC01_1510_11_47/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:17:59" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:43:31" + }, + "VendorId": { + "value": "\u003d01+1510.11.47-B212.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "40d2a84f-674c-4e2e-b1f3-cda897a7edc5" + }, + "DisplayPath": { + "value": "FSC10_OFZ_1500_73_CH_1500_73_04/OPC/inAlarms0/3.Chute Full" + }, + "Duration": { + "value": "00:10:26" + }, + "Name": { + "value": "3.Chute Full" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:51:04" + }, + "VendorId": { + "value": "CH-1500.73.04" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "0454374e-7fbf-49d9-b1cc-7f639a953a8d" + }, + "DisplayPath": { + "value": "PLC01_1510_11_48/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:26:03" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:35:27" + }, + "VendorId": { + "value": "\u003d01+1510.11.48-B213.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "3dd7ef75-ab85-4614-a3ac-372003761dda" + }, + "DisplayPath": { + "value": "FSC10_OFZ_1500_73_CH_1500_73_01/OPC/inAlarms0/3.Chute Full" + }, + "Duration": { + "value": "00:13:42" + }, + "Name": { + "value": "3.Chute Full" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:47:48" + }, + "VendorId": { + "value": "CH-1500.73.01" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "d3da023c-ce0e-4cbc-8201-f3976d89e128" + }, + "DisplayPath": { + "value": "PLC02_1510_88_11/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:06:35" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:54:56" + }, + "VendorId": { + "value": "\u003d02+1510.88.11-B323.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "d45a6985-c242-4645-b3ac-ab34e5a2462b" + }, + "DisplayPath": { + "value": "PLC65_1220_53_40/OPC/inAlarms0/4_Full 50%" + }, + "Duration": { + "value": "00:04:48" + }, + "Name": { + "value": "4_Full 50%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:56:42" + }, + "VendorId": { + "value": "\u003d65+1220.53.40-B205.4" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "374d4319-4ae0-4111-8093-880f26803e23" + }, + "DisplayPath": { + "value": "PLC65_1220_53_40/OPC/inAlarms0/6_Full 25%" + }, + "Duration": { + "value": "01:40:44" + }, + "Name": { + "value": "6_Full 25%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 10:20:46" + }, + "VendorId": { + "value": "\u003d65+1220.53.40-B205.5" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "22bff280-17a1-4e40-bf84-a35fb602c8c7" + }, + "DisplayPath": { + "value": "PLC01_1510_11_41/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:34:06" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:27:24" + }, + "VendorId": { + "value": "\u003d01+1510.11.41-B209.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "7b1adf51-09b5-44ca-aadd-f883865350e5" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_382/OPC/inAlarms0/18.Item Blocked for Sorting" + }, + "Duration": { + "value": "01:27:29" + }, + "Name": { + "value": "18.Item Blocked for Sorting" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 10:34:01" + }, + "VendorId": { + "value": "CAS-1500.01.382" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "438cb2f7-4b48-468f-9e18-39a03b093f5c" + }, + "DisplayPath": { + "value": "PLC71_1260_73_40/OPC/inAlarms0/0_Full 100%" + }, + "Duration": { + "value": "02:29:59" + }, + "Name": { + "value": "0_Full 100%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:31" + }, + "VendorId": { + "value": "\u003d71+1260.73.40-B206.2" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "85680dc1-f7ba-4da9-9d60-ba600b049882" + }, + "DisplayPath": { + "value": "PLC01_1510_11_59/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:00:23" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:01:07" + }, + "VendorId": { + "value": "\u003d01+1510.11.59-B220.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "13e31396-f540-4b19-9d68-a55ba579e03b" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_138/OPC/inAlarms0/18.Item Blocked for Sorting" + }, + "Duration": { + "value": "00:00:02" + }, + "Name": { + "value": "18.Item Blocked for Sorting" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:01:28" + }, + "VendorId": { + "value": "CAS-1500.01.138" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "ea6d6012-5d3d-42e5-8396-f1f2b6a95476" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_255/OPC/inAlarms0/16.CAS automatic offline" + }, + "Duration": { + "value": "00:24:47" + }, + "Name": { + "value": "16.CAS automatic offline" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 11:36:43" + }, + "VendorId": { + "value": "CAS-1500.01.255" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "397c2848-56a9-4c5f-8fc9-830395c649e2" + }, + "DisplayPath": { + "value": "PLC01_1510_11_50/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:00:59" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:00:31" + }, + "VendorId": { + "value": "\u003d01+1510.11.50-B214.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "eae02a75-c090-4863-b71e-0966519e1a04" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_010/OPC/inAlarms0/18.Item Blocked for Sorting" + }, + "Duration": { + "value": "00:00:37" + }, + "Name": { + "value": "18.Item Blocked for Sorting" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:00:53" + }, + "VendorId": { + "value": "CAS-1500.01.010" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "cbb9023a-17f8-42c7-83d2-e433bb9ec8b7" + }, + "DisplayPath": { + "value": "PLC01_1510_11_51/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:55:15" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:06:16" + }, + "VendorId": { + "value": "\u003d01+1510.11.51-B214.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "43fc342e-6b83-410d-9bab-ee00e1be9bbe" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_493/OPC/inAlarms0/16.CAS automatic offline" + }, + "Duration": { + "value": "00:24:36" + }, + "Name": { + "value": "16.CAS automatic offline" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 11:36:55" + }, + "VendorId": { + "value": "CAS-1500.01.493" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "1b509e3c-efa5-4201-b23f-4b33f9d64c17" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_493/OPC/inAlarms0/18.Item Blocked for Sorting" + }, + "Duration": { + "value": "00:00:23" + }, + "Name": { + "value": "18.Item Blocked for Sorting" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:01:07" + }, + "VendorId": { + "value": "CAS-1500.01.493" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "6dd055ef-d8b3-4eb9-b7c6-cd3cdec1998a" + }, + "DisplayPath": { + "value": "FSC10_IFZ_1500_56_CH_1500_56_09/OPC/inAlarms0/1.Bin contains item" + }, + "Duration": { + "value": "00:04:00" + }, + "Name": { + "value": "1.Bin contains item" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:57:30" + }, + "VendorId": { + "value": "CH-1500.56.09" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "5e625e5b-8f9b-4608-91f1-f01fda8d3f66" + }, + "DisplayPath": { + "value": "PLC66_1220_26_20/OPC/inAlarms0/0_Full 25%" + }, + "Duration": { + "value": "00:00:18" + }, + "Name": { + "value": "0_Full 25%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:01:12" + }, + "VendorId": { + "value": "\u003d66+1220.26.20-B122.2" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "755fd504-7ed5-4583-a2ae-43c48a7cdc93" + }, + "DisplayPath": { + "value": "PLC03_1251_32_03/OPC/inAlarms0/0_Full 100%" + }, + "Duration": { + "value": "02:29:58" + }, + "Name": { + "value": "0_Full 100%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:32" + }, + "VendorId": { + "value": "\u003d03+1251.32.03-B204.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "4f86d055-66b7-4a68-b4c1-9cf704674418" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_206/OPC/inAlarms0/16.CAS automatic offline" + }, + "Duration": { + "value": "00:24:48" + }, + "Name": { + "value": "16.CAS automatic offline" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 11:36:42" + }, + "VendorId": { + "value": "CAS-1500.01.206" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "c297c3da-c8d3-4035-b734-b4aeb855a353" + }, + "DisplayPath": { + "value": "PLC64_1230_43_40/OPC/inAlarms0/6_Full 25%" + }, + "Duration": { + "value": "02:41:22" + }, + "Name": { + "value": "6_Full 25%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 09:20:08" + }, + "VendorId": { + "value": "\u003d64+1230.43.40-B205.5" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "670a4052-ee28-4124-9d96-8c679b19ee1b" + }, + "DisplayPath": { + "value": "PLC64_1230_43_40/OPC/inAlarms0/4_Full 50%" + }, + "Duration": { + "value": "00:03:07" + }, + "Name": { + "value": "4_Full 50%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:58:23" + }, + "VendorId": { + "value": "\u003d64+1230.43.40-B205.4" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "fa29dd21-fcd5-43b0-babd-4743e6f37226" + }, + "DisplayPath": { + "value": "PLC64_1230_43_40/OPC/inAlarms0/2_Full 75%" + }, + "Duration": { + "value": "02:41:00" + }, + "Name": { + "value": "2_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 09:20:30" + }, + "VendorId": { + "value": "\u003d64+1230.43.40-B204.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "bcf1f256-7cc7-46eb-95e1-425bf8b34dec" + }, + "DisplayPath": { + "value": "PLC64_1230_43_40/OPC/inAlarms0/0_Full 100%" + }, + "Duration": { + "value": "00:01:20" + }, + "Name": { + "value": "0_Full 100%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:00:10" + }, + "VendorId": { + "value": "\u003d64+1230.43.40-B204.2" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "9cbe00a0-c9f9-4167-85e4-8e71c015bc47" + }, + "DisplayPath": { + "value": "PLC01_1510_81_03/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "02:29:58" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:32" + }, + "VendorId": { + "value": "\u003d01+1510.81.03-B303.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "0b49a15e-5338-4fea-abb2-64694c6be89a" + }, + "DisplayPath": { + "value": "PLC01_1510_81_04/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:04:25" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:57:05" + }, + "VendorId": { + "value": "\u003d01+1510.81.04-B303.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "e4a40063-c29d-4d52-91bc-02f89b0db027" + }, + "DisplayPath": { + "value": "PLC01_1510_81_05/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:05:23" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:56:07" + }, + "VendorId": { + "value": "\u003d01+1510.81.05-B304.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "4f803ae4-b11a-414a-b540-1d26de70d332" + }, + "DisplayPath": { + "value": "PLC01_1510_81_05/OPC/inAlarms0/1_Full 100%" + }, + "Duration": { + "value": "00:00:31" + }, + "Name": { + "value": "1_Full 100%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:00:59" + }, + "VendorId": { + "value": "\u003d01+1510.81.05-B304.2" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "286b8c5f-08c7-490e-bc83-6e695e8a9cf8" + }, + "DisplayPath": { + "value": "PLC01_1510_81_01/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "23:49:59" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-11 12:11:31" + }, + "VendorId": { + "value": "\u003d01+1510.81.01-B302.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "3a586506-b523-493f-8979-3418052bb5fe" + }, + "DisplayPath": { + "value": "PLC01_1510_81_02/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "02:29:58" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:32" + }, + "VendorId": { + "value": "\u003d01+1510.81.02-B302.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "29742c35-ec12-4660-b080-d8a347e65f4f" + }, + "DisplayPath": { + "value": "PLC60_1220_43_40/OPC/inAlarms0/4_Full 50%" + }, + "Duration": { + "value": "12:30:12" + }, + "Name": { + "value": "4_Full 50%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-11 23:31:18" + }, + "VendorId": { + "value": "\u003d60+1220.43.40-B205.4" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "f08d921d-38cc-4356-b762-b031986cd4d3" + }, + "DisplayPath": { + "value": "PLC60_1220_43_40/OPC/inAlarms0/2_Full 75%" + }, + "Duration": { + "value": "03:02:44" + }, + "Name": { + "value": "2_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 08:58:46" + }, + "VendorId": { + "value": "\u003d60+1220.43.40-B204.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "da2bd9bf-2361-4f69-90db-ec1e432dfbd2" + }, + "DisplayPath": { + "value": "PLC60_1220_43_40/OPC/inAlarms0/0_Full 100%" + }, + "Duration": { + "value": "00:00:24" + }, + "Name": { + "value": "0_Full 100%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:01:06" + }, + "VendorId": { + "value": "\u003d60+1220.43.40-B204.2" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "e87e2a68-96ea-4ff5-b6db-09160dc7dbf2" + }, + "DisplayPath": { + "value": "PLC60_1220_43_40/OPC/inAlarms0/6_Full 25%" + }, + "Duration": { + "value": "12:41:17" + }, + "Name": { + "value": "6_Full 25%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-11 23:20:14" + }, + "VendorId": { + "value": "\u003d60+1220.43.40-B205.5" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "dff5603a-642d-4b5b-95fa-d4f87cf849a0" + }, + "DisplayPath": { + "value": "FSC10_OFZ_1500_73_CH_1500_73_18/OPC/inAlarms0/3.Chute Full" + }, + "Duration": { + "value": "00:07:05" + }, + "Name": { + "value": "3.Chute Full" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:54:25" + }, + "VendorId": { + "value": "CH-1500.73.18" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "94f23ca5-a383-4f4e-8b92-8b2b92d3364a" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_030/OPC/inAlarms0/18.Item Blocked for Sorting" + }, + "Duration": { + "value": "00:00:44" + }, + "Name": { + "value": "18.Item Blocked for Sorting" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:00:46" + }, + "VendorId": { + "value": "CAS-1500.01.030" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "4652cb60-2cb8-44a8-99cc-3ae1c0462099" + }, + "DisplayPath": { + "value": "FSC10_OFZ_1500_73_CH_1500_73_10/OPC/inAlarms0/3.Chute Full" + }, + "Duration": { + "value": "00:08:32" + }, + "Name": { + "value": "3.Chute Full" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:52:58" + }, + "VendorId": { + "value": "CH-1500.73.10" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "946a62fa-dfb6-416e-9960-f44a0721e1cd" + }, + "DisplayPath": { + "value": "FSC10_OFZ_1500_71_CH_1500_71_01/OPC/inAlarms0/3.Chute Full" + }, + "Duration": { + "value": "00:24:55" + }, + "Name": { + "value": "3.Chute Full" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 11:36:35" + }, + "VendorId": { + "value": "CH-1500.71.01" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "c00c25ea-e79e-4d73-b5f6-82c9d4a0b865" + }, + "DisplayPath": { + "value": "FSC10_OFZ_1500_40_AM1/Expressions/Quality/Tag quality error" + }, + "Duration": { + "value": "00:24:55" + }, + "Name": { + "value": "Tag quality error" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 11:36:35" + }, + "VendorId": { + "value": "\"One or more tags has bad quality.\"" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "8bc107e6-e1ca-4b63-9608-f1e17067b48f" + }, + "DisplayPath": { + "value": "M1000/Expressions/Quality/Tag quality error" + }, + "Duration": { + "value": "02:30:16" + }, + "Name": { + "value": "Tag quality error" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:14" + }, + "VendorId": { + "value": "\"One or more tags has bad quality.\"" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "f9b13207-66be-4d89-837b-c7468667c273" + }, + "DisplayPath": { + "value": "FSC10_OFZ_1500_79_CH_1500_79_15/OPC/inAlarms0/3.Chute Full" + }, + "Duration": { + "value": "00:17:07" + }, + "Name": { + "value": "3.Chute Full" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:44:23" + }, + "VendorId": { + "value": "CH-1500.79.15" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "00a1494e-b5bd-445a-89cc-9092f3eb1125" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_229/OPC/inAlarms0/18.Item Blocked for Sorting" + }, + "Duration": { + "value": "00:00:35" + }, + "Name": { + "value": "18.Item Blocked for Sorting" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:00:55" + }, + "VendorId": { + "value": "CAS-1500.01.229" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "a9d01ff6-e4c6-42ab-a317-57d5fa104d0a" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_503/OPC/inAlarms0/18.Item Blocked for Sorting" + }, + "Duration": { + "value": "00:00:07" + }, + "Name": { + "value": "18.Item Blocked for Sorting" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:01:23" + }, + "VendorId": { + "value": "CAS-1500.01.503" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "55a32ec8-90a8-494f-8635-f1bef05f68e9" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_224/OPC/inAlarms0/16.CAS automatic offline" + }, + "Duration": { + "value": "00:24:48" + }, + "Name": { + "value": "16.CAS automatic offline" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 11:36:42" + }, + "VendorId": { + "value": "CAS-1500.01.224" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "cbfadbdb-ac4a-40da-abbd-def9685097ed" + }, + "DisplayPath": { + "value": "PLC03_1251_50_15/OPC/inAlarms0/1_Plug not plugged" + }, + "Duration": { + "value": "02:30:02" + }, + "Name": { + "value": "1_Plug not plugged" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:28" + }, + "VendorId": { + "value": "\u003d03+1251.50.15-G1" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "ecfc9406-f3d3-4876-88bb-04390af3ceda" + }, + "DisplayPath": { + "value": "PLC03_1251_50_12/OPC/inAlarms0/1_Plug not plugged" + }, + "Duration": { + "value": "02:29:59" + }, + "Name": { + "value": "1_Plug not plugged" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:32" + }, + "VendorId": { + "value": "\u003d03+1251.50.12-G1" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "e7eb3c1b-3b7e-45d5-adeb-684e1674a078" + }, + "DisplayPath": { + "value": "FSC10_OFZ_1500_75_CH_1500_75_05/OPC/inAlarms0/3.Chute Full" + }, + "Duration": { + "value": "00:00:35" + }, + "Name": { + "value": "3.Chute Full" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:00:55" + }, + "VendorId": { + "value": "CH-1500.75.05" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "d149d26e-b48b-4d19-984f-b2219c80b591" + }, + "DisplayPath": { + "value": "PLC03_1251_50_09/OPC/inAlarms0/1_Plug not plugged" + }, + "Duration": { + "value": "02:29:59" + }, + "Name": { + "value": "1_Plug not plugged" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:32" + }, + "VendorId": { + "value": "\u003d03+1251.50.09-G1" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "7d24df29-18c5-44be-bba5-15a5ad3df72e" + }, + "DisplayPath": { + "value": "FSC10_OFZ_1500_71_CH_1500_71_14/OPC/inAlarms0/3.Chute Full" + }, + "Duration": { + "value": "00:11:41" + }, + "Name": { + "value": "3.Chute Full" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:49:50" + }, + "VendorId": { + "value": "CH-1500.71.14" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "990229a8-4019-4fa5-9785-04834affaea6" + }, + "DisplayPath": { + "value": "PLC66_1220_24_30/OPC/inAlarms0/4_Full 50%" + }, + "Duration": { + "value": "00:30:41" + }, + "Name": { + "value": "4_Full 50%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:30:49" + }, + "VendorId": { + "value": "\u003d66+1220.24.30-B119.0" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "fd270f76-7a6a-453a-b22d-10ed814270d5" + }, + "DisplayPath": { + "value": "PLC47_1210_08_01/OPC/inAlarms0/2_Area is not empty" + }, + "Duration": { + "value": "01:46:57" + }, + "Name": { + "value": "2_Area is not empty" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 10:14:33" + }, + "VendorId": { + "value": "\u003d47+1210.08.01-BE307.0" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "8df1dbd6-c1e1-42db-9698-fd89563916b1" + }, + "DisplayPath": { + "value": "PLC02_1510_11_30/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:00:31" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:00:59" + }, + "VendorId": { + "value": "\u003d02+1510.11.30-B220.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "53e2d15e-23bf-4a87-91b0-c1789a2d86aa" + }, + "DisplayPath": { + "value": "PLC25_1210_01_01/OPC/inAlarms0/2_Area is not empty" + }, + "Duration": { + "value": "04:12:43" + }, + "Name": { + "value": "2_Area is not empty" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 07:48:47" + }, + "VendorId": { + "value": "\u003d25+1210.01.01-BE307.0" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "7cbb5255-339e-463d-9917-aeb232fc2337" + }, + "DisplayPath": { + "value": "FSC10_IFZ_1500_54_CH_1500_54_09/OPC/inAlarms0/1.Bin contains item" + }, + "Duration": { + "value": "00:01:13" + }, + "Name": { + "value": "1.Bin contains item" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:00:17" + }, + "VendorId": { + "value": "CH-1500.54.09" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "891eda89-5a56-4da2-835d-00da69673cc6" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_450/OPC/inAlarms0/16.CAS automatic offline" + }, + "Duration": { + "value": "00:24:38" + }, + "Name": { + "value": "16.CAS automatic offline" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 11:36:52" + }, + "VendorId": { + "value": "CAS-1500.01.450" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "dfa68a57-ceb1-4c51-ad44-4d3e3768cde9" + }, + "DisplayPath": { + "value": "PLC70_1260_31_02/OPC/inAlarms0/1_Plug not plugged" + }, + "Duration": { + "value": "02:29:59" + }, + "Name": { + "value": "1_Plug not plugged" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:31" + }, + "VendorId": { + "value": "\u003d70+1260.31.02-G1" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "98aaaa33-9f9b-4685-83c4-ab226638dbd3" + }, + "DisplayPath": { + "value": "FSC10_IFZ_1500_60_BF_1500_60_01/OPC/inAlarms0/5.Speed difference" + }, + "Duration": { + "value": "00:00:01" + }, + "Name": { + "value": "5.Speed difference" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:01:30" + }, + "VendorId": { + "value": "BF-1500.60.01" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "9f44974d-29a8-4cda-8c05-1ac3c36bfa25" + }, + "DisplayPath": { + "value": "PLC08_1280_14_40/OPC/inAlarms0/2_Full 50%" + }, + "Duration": { + "value": "02:29:59" + }, + "Name": { + "value": "2_Full 50%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:31" + }, + "VendorId": { + "value": "\u003d08+1280.14.40-B219.5" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "bdee063d-e1e5-4900-bfed-550c8376f3e4" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_609/OPC/inAlarms0/16.CAS automatic offline" + }, + "Duration": { + "value": "00:24:32" + }, + "Name": { + "value": "16.CAS automatic offline" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 11:36:58" + }, + "VendorId": { + "value": "CAS-1500.01.609" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "2fd54271-08f9-41e5-b740-84b1532ab584" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_128/OPC/inAlarms0/18.Item Blocked for Sorting" + }, + "Duration": { + "value": "00:00:59" + }, + "Name": { + "value": "18.Item Blocked for Sorting" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:00:31" + }, + "VendorId": { + "value": "CAS-1500.01.128" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "133b5915-dcf7-4565-becb-9ced98576d96" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_128/OPC/inAlarms0/16.CAS automatic offline" + }, + "Duration": { + "value": "00:24:50" + }, + "Name": { + "value": "16.CAS automatic offline" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 11:36:40" + }, + "VendorId": { + "value": "CAS-1500.01.128" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "d6f2a2ce-d65b-4d7b-aaed-859ea44cebb0" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_487/OPC/inAlarms0/18.Item Blocked for Sorting" + }, + "Duration": { + "value": "00:06:01" + }, + "Name": { + "value": "18.Item Blocked for Sorting" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:55:29" + }, + "VendorId": { + "value": "CAS-1500.01.487" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "d30d38ae-95c6-40a2-8adb-d653932c90f4" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_488/OPC/inAlarms0/18.Item Blocked for Sorting" + }, + "Duration": { + "value": "00:06:00" + }, + "Name": { + "value": "18.Item Blocked for Sorting" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:55:30" + }, + "VendorId": { + "value": "CAS-1500.01.488" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "22a6a9e5-3f5d-45ea-8d9d-1023baaf380b" + }, + "DisplayPath": { + "value": "PLC02_1510_11_07/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:03:10" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:58:20" + }, + "VendorId": { + "value": "\u003d02+1510.11.07-B208.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "eba08435-1562-4299-9c1b-68b772151c1a" + }, + "DisplayPath": { + "value": "FSC10_OFZ_1500_78_CH_1500_78_05/OPC/inAlarms0/3.Chute Full" + }, + "Duration": { + "value": "00:02:44" + }, + "Name": { + "value": "3.Chute Full" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:58:46" + }, + "VendorId": { + "value": "CH-1500.78.05" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "295e057f-99ec-46b3-83d0-01f175608357" + }, + "DisplayPath": { + "value": "FSC10_ACZ_1500_57_BF_1500_57_02/OPC/inAlarms0/5.Speed difference" + }, + "Duration": { + "value": "00:04:40" + }, + "Name": { + "value": "5.Speed difference" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:56:51" + }, + "VendorId": { + "value": "BF-1500.57.02" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "051823b0-7e26-45f6-b05d-57c1919387a4" + }, + "DisplayPath": { + "value": "INBOUND/RECEIVE/Test_Tag/Expressions/Quality/Tag quality error" + }, + "Duration": { + "value": "02:30:15" + }, + "Name": { + "value": "Tag quality error" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:15" + }, + "VendorId": { + "value": "\"One or more tags has bad quality.\"" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "beddd156-0145-4827-9081-933c65b80b1b" + }, + "DisplayPath": { + "value": "PLC02_1510_11_10/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:00:15" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:01:15" + }, + "VendorId": { + "value": "\u003d02+1510.11.10-B209.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "2b4f72a0-f52b-46f4-a32e-a5b9ad2f6adb" + }, + "DisplayPath": { + "value": "PLC02_1510_11_15/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "01:08:02" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 10:53:28" + }, + "VendorId": { + "value": "\u003d02+1510.11.15-B212.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "9b95634f-1f6d-4c7f-8099-1abdaea31058" + }, + "DisplayPath": { + "value": "PLC03_1251_22_03/OPC/inAlarms0/0_Full 100%" + }, + "Duration": { + "value": "02:29:58" + }, + "Name": { + "value": "0_Full 100%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:32" + }, + "VendorId": { + "value": "\u003d03+1251.22.03-B202.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "c3f32389-61f0-4687-a00c-50b49015d028" + }, + "DisplayPath": { + "value": "FSC10_IFZ_1500_30_CH_1500_30_09/OPC/inAlarms0/1.Bin contains item" + }, + "Duration": { + "value": "00:19:55" + }, + "Name": { + "value": "1.Bin contains item" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:41:35" + }, + "VendorId": { + "value": "CH-1500.30.09" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "f8381bfa-7e1a-4850-b641-94087a4a5c35" + }, + "DisplayPath": { + "value": "PLC01_1510_82_14/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:00:15" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:01:15" + }, + "VendorId": { + "value": "\u003d01+1510.82.14-B324.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "45624aff-c8e3-4510-8d0a-4dcb7bf9ba13" + }, + "DisplayPath": { + "value": "PLC01_1510_11_34/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:00:27" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:01:03" + }, + "VendorId": { + "value": "\u003d01+1510.11.34-B206.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "07102021-c79e-4828-9475-28db828a2365" + }, + "DisplayPath": { + "value": "PLC02_1510_87_12/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:00:47" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 12:00:43" + }, + "VendorId": { + "value": "\u003d02+1510.87.12-B307.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "9604e5b3-14e0-400e-96e1-f22a70a91b00" + }, + "DisplayPath": { + "value": "FSC10_TRZ_1500_01_CAS_1500_01_352/OPC/inAlarms0/16.CAS automatic offline" + }, + "Duration": { + "value": "00:24:43" + }, + "Name": { + "value": "16.CAS automatic offline" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 11:36:47" + }, + "VendorId": { + "value": "CAS-1500.01.352" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "3ebfbb2a-a78a-4599-b3ff-c84058ed4525" + }, + "DisplayPath": { + "value": "PLC03_1251_50_06/OPC/inAlarms0/1_Plug not plugged" + }, + "Duration": { + "value": "02:29:59" + }, + "Name": { + "value": "1_Plug not plugged" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:32" + }, + "VendorId": { + "value": "\u003d03+1251.50.06-G1" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "3307a2c0-be8d-4f86-812a-13e4be1d9709" + }, + "DisplayPath": { + "value": "PLC02_1510_11_24/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:11:20" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:50:10" + }, + "VendorId": { + "value": "\u003d02+1510.11.24-B216.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "fb3dd482-20cc-4fbe-9451-4f3b90672994" + }, + "DisplayPath": { + "value": "PLC02_1510_87_06/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:02:42" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:58:48" + }, + "VendorId": { + "value": "\u003d02+1510.87.06-B304.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "6b78811d-b0c7-4d8a-9f36-9781a103f126" + }, + "DisplayPath": { + "value": "PLC02_1510_11_23/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "01:09:41" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 10:51:49" + }, + "VendorId": { + "value": "\u003d02+1510.11.23-B216.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "3b027050-6f4e-4ea7-9c66-43d9bbb8ab67" + }, + "DisplayPath": { + "value": "PLC02_1510_11_27/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:40:01" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:21:30" + }, + "VendorId": { + "value": "\u003d02+1510.11.27-B219.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "c3ec2aca-77d0-4bdc-88c4-21b65873182b" + }, + "DisplayPath": { + "value": "PLC02_1510_11_26/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:08:53" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:52:38" + }, + "VendorId": { + "value": "\u003d02+1510.11.26-B218.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "134ccefa-2375-4e82-92ea-50641d5cc51d" + }, + "DisplayPath": { + "value": "PLC01_1510_82_01/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "02:29:58" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-10 09:31:32" + }, + "VendorId": { + "value": "\u003d01+1510.82.01-B318.3" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "d50e3617-282b-48ce-aead-ecef5ae33d7a" + }, + "DisplayPath": { + "value": "PLC01_1510_82_02/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:07:11" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:54:19" + }, + "VendorId": { + "value": "\u003d01+1510.82.02-B318.7" + } + } + }, + { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "AlarmId": { + "value": "ec0a50f8-79e8-4233-b7ae-ebf6d00e7d10" + }, + "DisplayPath": { + "value": "PLC01_1510_82_03/OPC/inAlarms0/3_Full 75%" + }, + "Duration": { + "value": "00:47:03" + }, + "Name": { + "value": "3_Full 75%" + }, + "Severity": { + "value": "0. Warning" + }, + "Timestamp": { + "value": "2022-08-12 11:14:27" + }, + "VendorId": { + "value": "\u003d01+1510.82.03-B319.3" + } + } + } + ], + "resizeMode": "fixed", + "rows": { + "highlight": { + "color": "#FFFF47" + } + }, + "selection": { + "mode": "multiple interval" + }, + "virtualized": false + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "Active_tab" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "component": { + "onRowDoubleClick": [ + { + "config": { + "script": "\trow \u003d event.value\n\tcustom_view \u003d row.get(\"path\",\"none\")\n\tif custom_view !\u003d \"None\":\n\t\tequipment_id \u003d custom_view.split(\"/\")[1]\n\t\turl_to_navigate \u003d \"/CustomView/%s/\" % (equipment_id,)\n\t\tsystem.perspective.navigate(page \u003d url_to_navigate)\n\t\tsystem.perspective.sendMessage(\"plc-to-display\", payload \u003d {\"device\":\"none\",\"show_controls\":False,\"area\":\"none\"}, scope \u003d \"page\")\n\t\tsystem.perspective.closePopup(id\u003d \"StatusPopUP\")\n\t" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "draggable": true, + "id": "W1H0Nole", + "modal": false, + "overlayDismiss": false, + "resizable": true, + "showCloseIcon": true, + "title": "InfoPopUp", + "type": "close", + "viewPath": "PopUp-Views/Controller-Equipment/Information", + "viewportBound": false + }, + "scope": "C", + "type": "popup" + } + ] + } + }, + "meta": { + "name": "Views_list" + }, + "position": { + "basis": "915px", + "grow": 1 + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "path": "/root.custom.views_data" + }, + "type": "property" + } + } + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "Views" + }, + "position": { + "tabIndex": 2 + }, + "type": "ia.container.flex" + } + ], + "custom": { + "views_data": [ + { + "path": "Custom-Views/Detail" + } + ] + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tproject_info \u003d system.perspective.getProjectInfo()\n\tself.custom.views_data \u003d project_info\n\tviews \u003d project_info.get(\"views\")\n\tequipment_id \u003d self.view.params.tagProps[0]\n\tviews_data \u003d [i for i in views if i[\"path\"].startswith(\"Custom-Views/\"+ equipment_id)]\n\tself.custom.views_data \u003d views_data\n\t\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true + } + }, + "propConfig": { + "custom.active_alarms": { + "binding": { + "config": { + "expression": "{./Active_tab/AlarmTable.props.data}" + }, + "transforms": [ + { + "code": "\treturn len(value)", + "type": "script" + } + ], + "type": "expr" + } + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}" + }, + "tagPath": "{0}/Expressions/Status" + }, + "type": "tag" + } + } + }, + "props": { + "menuStyle": { + "fontWeight": "bold" + }, + "tabs": [ + "Alarms", + "Info", + "Views" + ] + }, + "type": "ia.container.tab" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/resource.json new file mode 100644 index 0000000..0144c08 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "ankikarw", + "timestamp": "2024-04-01T21:08:27Z" + }, + "lastModificationSignature": "b49deac362b22f0e5b53c700a611567596c21145e0430170672d4179aa6df5b4" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/thumbnail.png new file mode 100644 index 0000000..c95f281 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/view.json new file mode 100644 index 0000000..48deb28 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/view.json @@ -0,0 +1,894 @@ +{ + "custom": { + "activityLogger": { + "alt_pageid": "home" + } + }, + "params": { + "viewFocus": "value" + }, + "propConfig": { + "custom.activityLogger": { + "persistent": true + }, + "custom.activityLogger.pageid": { + "binding": { + "config": { + "expression": "{page.props.path}" + }, + "transforms": [ + { + "code": "\tif value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n\t\treturn self.custom.activityLogger.alt_pageid.lower()\n\telse:\n\t\treturn value[1:].lower()", + "type": "script" + } + ], + "type": "expr" + } + }, + "custom.activityLogger.start_time": { + "binding": { + "config": { + "expression": "now()" + }, + "type": "expr" + } + }, + "params.viewFocus": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 326, + "width": 400 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "36px", + "shrink": 0 + }, + "props": { + "style": { + "background-color": "#555555", + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "Status Filters" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "custom": { + "buttonid": "status_filters/all" + }, + "events": { + "component": { + "onActionPerformed": [ + { + "config": { + "script": "\tpayload \u003d {}\n\tif self.props.selected:\n\t\tvalue \u003d True\n\telse:\n\t\tvalue \u003d False\n\t\n\tpayload[\"data\"] \u003d value\n\t\n\tsystem.perspective.sendMessage(\"select-all-filters\", \n\t\t\t\t\t\t\t\t\tpayload \u003d payload, \n\t\t\t\t\t\t\t\t\tscope \u003d \"view\")" + }, + "scope": "G", + "type": "script" + }, + { + "config": { + "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + } + ] + } + }, + "meta": { + "name": "Select-All", + "tooltip": { + "delay": 250 + } + }, + "position": { + "basis": "36px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" + }, + "enabled": false, + "type": "expr" + } + }, + "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)" + }, + "type": "expr" + } + } + }, + "props": { + "checkedIcon": { + "color": { + "disabled": "#FFFFFF", + "enabled": "#FFFFFF" + } + }, + "style": { + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": 12, + "fontWeight": "bold", + "marginLeft": 10, + "marginRight": 10 + }, + "text": "Select All" + }, + "type": "ia.input.checkbox" + }, + { + "custom": { + "buttonid": "status_filters/low_alarms" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Low Alarms", + "tooltip": { + "delay": 250 + } + }, + "position": { + "basis": "36px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" + }, + "enabled": false, + "type": "expr" + } + }, + "props.selected": { + "binding": { + "config": { + "bidirectional": true, + "path": "session.custom.alarm_filter.show_low_alarm" + }, + "type": "property" + } + } + }, + "props": { + "checkedIcon": { + "color": { + "disabled": "#FFFFFF", + "enabled": "#FFFFFF" + } + }, + "style": { + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": 12, + "fontWeight": "bold", + "marginLeft": 10, + "marginRight": 10 + }, + "text": "Show Low Alarms" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "select-all-filters", + "pageScope": false, + "script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data\n\tsystem.perspective.print(data)", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.checkbox" + }, + { + "custom": { + "buttonid": "status_filters/diagnostic_alarms" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Diagnostic", + "tooltip": { + "delay": 250 + } + }, + "position": { + "basis": "36px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" + }, + "enabled": false, + "type": "expr" + } + }, + "props.selected": { + "binding": { + "config": { + "bidirectional": true, + "path": "session.custom.alarm_filter.show_diagnostic" + }, + "type": "property" + } + } + }, + "props": { + "checkedIcon": { + "color": { + "disabled": "#FFFFFF", + "enabled": "#FFFFFF" + } + }, + "style": { + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": 12, + "fontWeight": "bold", + "marginLeft": 10, + "marginRight": 10 + }, + "text": "Show Diagnostic Alarms" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "select-all-filters", + "pageScope": false, + "script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.checkbox" + }, + { + "custom": { + "buttonid": "status_filters/running_status" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Running", + "tooltip": { + "delay": 250 + } + }, + "position": { + "basis": "36px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" + }, + "enabled": false, + "type": "expr" + } + }, + "props.selected": { + "binding": { + "config": { + "bidirectional": true, + "path": "session.custom.alarm_filter.show_running" + }, + "type": "property" + } + } + }, + "props": { + "checkedIcon": { + "color": { + "disabled": "#FFFFFF", + "enabled": "#FFFFFF" + } + }, + "style": { + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": 12, + "fontWeight": "bold", + "marginLeft": 10, + "marginRight": 10 + }, + "text": "Show Running Status" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "select-all-filters", + "pageScope": false, + "script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.checkbox" + }, + { + "custom": { + "buttonid": "status_filters/estops_pullChords" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "E-Stops", + "tooltip": { + "delay": 250 + } + }, + "position": { + "basis": "36px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" + }, + "enabled": false, + "type": "expr" + } + }, + "props.selected": { + "binding": { + "config": { + "bidirectional": true, + "path": "session.custom.alarm_filter.show_safety" + }, + "type": "property" + } + } + }, + "props": { + "checkedIcon": { + "color": { + "disabled": "#FFFFFF", + "enabled": "#FFFFFF" + } + }, + "style": { + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": 12, + "fontWeight": "bold", + "marginLeft": 10, + "marginRight": 10 + }, + "text": "Show E-Stops \u0026 Pull Chords" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "select-all-filters", + "pageScope": false, + "script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.checkbox" + }, + { + "custom": { + "buttonid": "status_filters/gateways" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Show-Gateways", + "tooltip": { + "delay": 250 + } + }, + "position": { + "basis": "36px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" + }, + "enabled": false, + "type": "expr" + } + }, + "props.selected": { + "binding": { + "config": { + "bidirectional": true, + "path": "session.custom.alarm_filter.show_gateways" + }, + "type": "property" + } + } + }, + "props": { + "checkedIcon": { + "color": { + "disabled": "#FFFFFF", + "enabled": "#FFFFFF" + } + }, + "style": { + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": 12, + "fontWeight": "bold", + "marginLeft": 10, + "marginRight": 10 + }, + "text": "Show Gateways" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "select-all-filters", + "pageScope": false, + "script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.input.checkbox" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "grow": 1 + }, + "props": { + "direction": "column", + "justify": "space-between" + }, + "type": "ia.container.flex" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.closePopup(\u0027\u0027)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "props": { + "box-shadow": "5px 5px 5px", + "style": { + "backgroundColor": "#555555", + "classes": "Background-Styles/Controller", + "marginBottom": 5, + "marginLeft": 20, + "marginRight": 20, + "marginTop": 5 + }, + "text": "Close" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Status" + }, + "position": { + "basis": "200px", + "shrink": 0 + }, + "props": { + "direction": "column", + "style": { + "borderColor": "#FFFFFF", + "borderStyle": "solid", + "borderWidth": 1 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "36px", + "shrink": 0 + }, + "props": { + "style": { + "background-color": "#555555", + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "Accessibility" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "custom": { + "buttonid": "accessibility/color_blind_icons" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tif self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Alt Colours" + }, + "position": { + "basis": "36px" + }, + "propConfig": { + "props.selected": { + "binding": { + "config": { + "bidirectional": true, + "path": "session.custom.colours.colour_impaired" + }, + "type": "property" + } + } + }, + "props": { + "checkedIcon": { + "color": { + "disabled": "#FFFFFF", + "enabled": "#FFFFFF" + } + }, + "style": { + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": 12, + "fontWeight": "bold", + "marginLeft": 10, + "marginRight": 10 + }, + "text": "Colour-Blind Friendly Icons" + }, + "type": "ia.input.checkbox" + }, + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "props": { + "style": { + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": 12, + "fontWeight": "bold", + "marginLeft": 10, + "marginRight": 10 + }, + "text": "Magnification:" + }, + "type": "ia.display.label" + }, + { + "custom": { + "buttonid": "accessibility/magnify" + }, + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "80px", + "shrink": 0 + }, + "propConfig": { + "props.value": { + "binding": { + "config": { + "bidirectional": true, + "path": "session.custom.alarm_filter.magnificaiton" + }, + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\ttry:\n\t\tif previousValue.value !\u003d currentValue.value:\n\t\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, self.custom.buttonid)\n\texcept:\n\t\tpass" + } + } + }, + "props": { + "options": [ + { + "label": "x1", + "value": "x1" + }, + { + "label": "x2", + "value": "x2" + }, + { + "label": "x3", + "value": "x3" + }, + { + "label": "None", + "value": "None" + } + ], + "placeholder": { + "text": "" + }, + "style": { + "marginBottom": 3, + "marginTop": 3 + } + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "36px" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": 80 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "36px", + "shrink": 0 + }, + "props": { + "style": { + "background-color": "#555555", + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "Home Card View" + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "custom": { + "buttonid": "status_filters/orderby" + }, + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tif self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Order-By" + }, + "position": { + "basis": "36px" + }, + "propConfig": { + "props.selected": { + "binding": { + "config": { + "bidirectional": true, + "path": "session.custom.alarm_filter.orderby" + }, + "type": "property" + } + } + }, + "props": { + "checkedIcon": { + "color": { + "disabled": "#FFFFFF", + "enabled": "#FFFFFF" + } + }, + "style": { + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": 12, + "fontWeight": "bold", + "marginLeft": 10, + "marginRight": 10 + }, + "text": "Order Cards By Area" + }, + "type": "ia.input.checkbox" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px", + "display": false + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.viewFocus" + }, + "transforms": [ + { + "code": "#\tvalue \u003d value.split(\u0027/\u0027)\n#\tvalue \u003d value.pop()\n\n\treturn value", + "type": "script" + } + ], + "type": "property" + } + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": 65, + "grow": 1 + }, + "props": { + "direction": "column", + "justify": "space-between" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Accessibility" + }, + "position": { + "basis": "200px", + "shrink": 0 + }, + "props": { + "direction": "column", + "style": { + "borderColor": "#FFFFFF", + "borderStyle": "solid", + "borderWidth": 1 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "style": { + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Device/Information-Device/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Device/Information-Device/resource.json new file mode 100644 index 0000000..0afb79a --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Device/Information-Device/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-03-04T08:53:36Z" + }, + "lastModificationSignature": "5171ce5fe999345055760312545ae6acbd6adeb940d62bd40dc53c7eace669da" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Device/Information-Device/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Device/Information-Device/thumbnail.png new file mode 100644 index 0000000..748c252 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Device/Information-Device/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Device/Information-Device/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Device/Information-Device/view.json new file mode 100644 index 0000000..d00b2ad --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Device/Information-Device/view.json @@ -0,0 +1,447 @@ +{ + "custom": {}, + "params": { + "tagProps": [ + "", + "", + "PLC", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "params.tagProps": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 148, + "width": 362 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Spacer1" + }, + "position": { + "basis": "20px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "NameField" + }, + "position": { + "basis": "50px" + }, + "props": { + "text": "NAME" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Spacer" + }, + "position": { + "basis": "100px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "DeviceName" + }, + "position": { + "basis": "205px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "/root.custom.name" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Name" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Spacer1" + }, + "position": { + "basis": "20px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "NameField" + }, + "position": { + "basis": "50px" + }, + "props": { + "text": "PRIORITY" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Spacer" + }, + "position": { + "basis": "100px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Priority" + }, + "position": { + "basis": "205px" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "{/root.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": "Alarms-Styles/Critical" + }, + { + "input": 3, + "output": "Alarms-Styles/High" + }, + { + "input": 2, + "output": "Alarms-Styles/Medium" + }, + { + "input": 1, + "output": "Alarms-Styles/Low" + }, + { + "input": 0, + "output": "Alarms-Styles/Diagnostic" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "path": "/root.custom.priority" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": "Critical" + }, + { + "input": 3, + "output": "High" + }, + { + "input": 2, + "output": "Medium" + }, + { + "input": 1, + "output": "Low" + }, + { + "input": 0, + "output": "Warning" + }, + { + "input": 5, + "output": "No active alarms" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "textAlign": "left" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Priority" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Spacer1" + }, + "position": { + "basis": "20px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "NameField" + }, + "position": { + "basis": "50px" + }, + "props": { + "text": "TIMESTAMP" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Spacer" + }, + "position": { + "basis": "100px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "DeviceName" + }, + "position": { + "basis": "205px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "/root.custom.timestamp" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "EventTime" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Spacer1" + }, + "position": { + "basis": "20px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "NameField" + }, + "position": { + "basis": "50px" + }, + "props": { + "text": "DURATION" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Spacer" + }, + "position": { + "basis": "91px" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Spacer_0" + }, + "position": { + "basis": "199px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "/root.custom.duration" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "EventTime_0" + }, + "position": { + "basis": "40px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + } + ], + "custom": { + "delay": 2000, + "duration": "", + "enable": true, + "name": "", + "priority": "", + "timestamp": "" + }, + "meta": { + "name": "root" + }, + "propConfig": { + "custom.active_bit": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "1": "{view.params.tagProps[1]}" + }, + "tagPath": "{0}/Alarms/{1}.IsActive" + }, + "type": "tag" + } + }, + "custom.shelved_bit": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "1": "{view.params.tagProps[1]}" + }, + "tagPath": "{0}/Alarms/{1}.IsShelved" + }, + "type": "tag" + } + }, + "custom.update": { + "binding": { + "config": { + "expression": "now({this.custom.delay})" + }, + "type": "expr" + }, + "onChange": { + "enabled": null, + "script": "\tif self.custom.enable:\n\t\t\n\t\timport time\n\t\t\n\t\tdef convert(millis):\n\t\t\tmillis \u003d int(millis)\n\t\t\tseconds\u003d(millis/1000)%60\n\t\t\tseconds \u003d int(seconds)\n\t\t\tminutes\u003d(millis/(1000*60))%60\n\t\t\tminutes \u003d int(minutes)\n\t\t\thours\u003d(millis/(1000*60*60))\n\t\t\treturn(\"%d:%d:%d\" % (hours, minutes, seconds))\n\t\t\n\t\tdef update_custom_properties(name, timestamp, duration, priority):\n\t\t\tself.custom.name \u003d name\n\t\t\tself.custom.timestamp \u003d timestamp\n\t\t\tself.custom.duration \u003d duration\n\t\t\tself.custom.priority \u003d priority\n\t\t\n\t\tdef get_alarms():\n\t\t\talarm_dict \u003d system.tag.readBlocking(\"System/ActiveAlarms\")\n\t\t\talarms_decoded \u003d system.util.jsonDecode(alarm_dict[0].value)\n\t\t\treturn alarms_decoded\n\t\t\t\n\t\tdef get_tag_config():\n\t\t\tname \u003d\"\"\n\t\t\tpath \u003d self.view.params.tagProps[0]\n\t\t\tif system.tag.exists(path) and path !\u003d \"\":\n\t\t\t\ttag_config \u003d system.tag.getConfiguration(path)[0]\n\t\t\t\talarms \u003d tag_config.get(\"alarms\")\n\t\t\t\tfor alarm in alarms:\n\t\t\t\t\tif alarm.get(\"name\") \u003d\u003d self.view.params.tagProps[1]:\n\t\t\t\t\t\tname \u003d alarm.get(\"AdditionalInfo\")\n\t\t\t\t\t\tbreak\n\t\t\t\ttimestamp \u003d \"N/A\"\n\t\t\t\tduration \u003d \"N/A\"\n\t\t\t\tpriority \u003d 5\n\t\t\t\tupdate_custom_properties(name, timestamp, duration, priority)\n\t\t\t\t\t\n\t\tdef get_active_alarm():\n\t\t\ttagPath \u003d self.view.params.tagProps[0]\n\t\t\tprops_alarm_name \u003d str(self.view.params.tagProps[1])\n\t\t\ttag_display_path \u003d tagPath + \"/\" + props_alarm_name\n\t\t\talarms \u003d get_alarms()\n\t\t\tfor i in alarms:\n\t\t\t\tdisplaypath \u003d alarms[i].get(\"DisplayPath\")\n\t\t\t\talarm_name \u003d alarms[i].get(\"Name\")\n\t\t\t\tsystem.perspective.print(displaypath)\n\t\t\t\tif tag_display_path \u003d\u003d displaypath:\n\t\t\t\t\tname \u003d alarms[i].get(\"AddInfo\")\n\t\t\t\t\ttimestamp \u003d alarms[i].get(\"TimeStamp\")\n\t\t\t\t\tduration \u003d alarms[i].get(\"Duration\")\n\t\t\t\t\tduration \u003d convert(duration)\n\t\t\t\t\tpriority \u003d alarms[i].get(\"Priority\")\n\t\t\t\t\tupdate_custom_properties(name, timestamp, duration, priority)\n\t\t\t\t\tbreak\n\t\t\t\t\t\n\t\tif self.custom.active_bit and not self.custom.shelved_bit:\n\t\t\tget_active_alarm()\n\t\t\t\n\t\telse:\n\t\t\talarms \u003d get_tag_config()" + } + } + }, + "props": { + "direction": "column", + "style": { + "borderRadius": "10x", + "borderStyle": "solid", + "classes": "PopUp-Styles/Information-Device" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/EditItem/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/EditItem/resource.json new file mode 100644 index 0000000..bbc3a18 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/EditItem/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "dmamani", + "timestamp": "2024-01-23T18:10:43Z" + }, + "lastModificationSignature": "1b96542d60ef0dde6c1268ffafddbbde56f196c33fe7d4c32d616e0e835b8165" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/EditItem/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/EditItem/thumbnail.png new file mode 100644 index 0000000..e9a8b4b Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/EditItem/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/EditItem/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/EditItem/view.json new file mode 100644 index 0000000..e027654 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/EditItem/view.json @@ -0,0 +1,1004 @@ +{ + "custom": {}, + "params": { + "btnActionClose": "closePopup", + "btnActionPrimary": "closePopup", + "btnActionSecondary": "closePopup", + "btnIconAlignment": "left", + "btnIconPrimary": "chevron_right", + "btnIconSecondary": "", + "btnTextPrimary": "Primary", + "btnTextSecondary": "Secondary", + "editField1": "editField", + "editField2": "", + "editField3": "", + "field1Description": "Description goes here.", + "field2Description": "Description goes here.", + "field3Description": "Description goes here.", + "key": "value", + "message": "Message goes here.", + "path": "", + "payload": { + "key": "The payload to return to the caller would go here. DLC 2021-09-23" + }, + "showCloseBtn": true, + "state": "info", + "title": "title", + "userRole": true + }, + "propConfig": { + "params.btnActionClose": { + "paramDirection": "input", + "persistent": true + }, + "params.btnActionPrimary": { + "paramDirection": "inout", + "persistent": true + }, + "params.btnActionSecondary": { + "paramDirection": "inout", + "persistent": true + }, + "params.btnIconAlignment": { + "paramDirection": "inout" + }, + "params.btnIconPrimary": { + "paramDirection": "inout", + "persistent": true + }, + "params.btnIconSecondary": { + "paramDirection": "inout", + "persistent": true + }, + "params.btnIconSecondary_1": { + "paramDirection": "input", + "persistent": true + }, + "params.btnIconSecondary_2": { + "paramDirection": "input", + "persistent": true + }, + "params.btnIconSecondary_3": { + "paramDirection": "input", + "persistent": true + }, + "params.btnTextPrimary": { + "paramDirection": "inout" + }, + "params.btnTextSecondary": { + "paramDirection": "inout" + }, + "params.buttons.key": { + "paramDirection": "input", + "persistent": true + }, + "params.editField1": { + "paramDirection": "input", + "persistent": true + }, + "params.editField2": { + "paramDirection": "input", + "persistent": true + }, + "params.editField3": { + "paramDirection": "input", + "persistent": true + }, + "params.field1Description": { + "paramDirection": "input", + "persistent": true + }, + "params.field2Description": { + "paramDirection": "input", + "persistent": true + }, + "params.field3Description": { + "paramDirection": "input", + "persistent": true + }, + "params.key": { + "paramDirection": "input", + "persistent": true + }, + "params.message": { + "paramDirection": "input", + "persistent": true + }, + "params.path": { + "paramDirection": "input", + "persistent": true + }, + "params.payload": { + "paramDirection": "input", + "persistent": true + }, + "params.showCloseBtn": { + "paramDirection": "input", + "persistent": true + }, + "params.state": { + "paramDirection": "input", + "persistent": true + }, + "params.title": { + "paramDirection": "input", + "persistent": true + }, + "params.userRole": { + "binding": { + "config": { + "path": "session.props.auth.user.roles" + }, + "transforms": [ + { + "code": "\tif any(item \u003d\u003d \"eurme-ignition-admins\" for item in value):\n\t\treturn True\n\telse:\n\t\treturn False\n\t\t\n", + "type": "script" + } + ], + "type": "property" + }, + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 675, + "width": 858 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "iconMain" + }, + "position": { + "basis": "32px", + "display": false, + "shrink": 0 + }, + "propConfig": { + "props.color": { + "binding": { + "config": { + "expression": "{view.params.state}" + }, + "transforms": [ + { + "fallback": "var(--info)", + "inputType": "scalar", + "mappings": [ + { + "input": "warning", + "output": "var(--warning)" + }, + { + "input": "success", + "output": "var(--success)" + }, + { + "input": "error", + "output": "var(--error)" + }, + { + "input": "info", + "output": "var(--info)" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "expr" + } + }, + "props.path": { + "binding": { + "config": { + "expression": "{view.params.state}" + }, + "transforms": [ + { + "fallback": "material/info", + "inputType": "scalar", + "mappings": [ + { + "input": "warning", + "output": "material/warning" + }, + { + "input": "info", + "output": "material/info" + }, + { + "input": "error", + "output": "material/error" + }, + { + "input": "success", + "output": "material/check_circle" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "Utilities/m-r-16" + } + }, + "type": "ia.display.icon" + }, + { + "children": [ + { + "meta": { + "name": "title" + }, + "position": { + "grow": 1, + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{this.props.text}" + }, + "transforms": [ + { + "fallback": true, + "inputType": "scalar", + "mappings": [ + { + "input": "", + "output": false + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "expr" + } + }, + "props.style.color": { + "binding": { + "config": { + "path": "view.params.state" + }, + "enabled": false, + "transforms": [ + { + "fallback": "var(--info)", + "inputType": "scalar", + "mappings": [ + { + "input": "info", + "output": "var(--info)" + }, + { + "input": "success", + "output": "var(--success)" + }, + { + "input": "error", + "output": "var(--error)" + }, + { + "input": "warning", + "output": "var(--warning)" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.title" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Alerts/alertTitle", + "color": "#FFFFFF" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "message" + }, + "position": { + "grow": 1, + "shrink": 0 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.message" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Alerts/alertMessage" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "BreakpointContainer_0" + }, + "position": { + "basis": "20px" + }, + "type": "ia.container.breakpt" + }, + { + "meta": { + "name": "message_0" + }, + "position": { + "grow": 1, + "shrink": 0 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.field1Description" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Alerts/alertMessage" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Field1" + }, + "position": { + "basis": "30px", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.editField1" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "textAlign": "start" + } + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "BreakpointContainer_1" + }, + "position": { + "basis": "20px" + }, + "type": "ia.container.breakpt" + }, + { + "meta": { + "name": "message_1" + }, + "position": { + "grow": 1, + "shrink": 0 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.field2Description" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Alerts/alertMessage" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Field2" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.editField2" + }, + "type": "property" + } + } + }, + "props": { + "resize": "both" + }, + "type": "ia.input.text-area" + }, + { + "meta": { + "name": "BreakpointContainer" + }, + "position": { + "basis": "20px" + }, + "type": "ia.container.breakpt" + }, + { + "meta": { + "name": "message_2" + }, + "position": { + "grow": 1, + "shrink": 0 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.field3Description" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Alerts/alertMessage" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Field3" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.editField3" + }, + "type": "property" + } + } + }, + "props": { + "resize": "both" + }, + "type": "ia.input.text-area" + } + ], + "meta": { + "name": "content" + }, + "position": { + "grow": 1 + }, + "props": { + "direction": "column", + "style": { + "classes": "Utilities/m-r-16" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tmessageType \u003d self.view.params.btnActionClose\t\n\tsystem.perspective.sendMessage(messageType, scope \u003d \"session\")" + }, + "scope": "G", + "type": "script" + }, + "onTouchStart": { + "config": { + "script": "\tmessageType \u003d self.view.params.btnActionClose\t\t\n\tpayload \u003d self.view.params.payload\t\t## Added 2021-09-23 to return to caller view\n\tsystem.perspective.sendMessage(messageType, payload, scope \u003d \"session\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "iconClose" + }, + "position": { + "basis": "16px", + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.params.showCloseBtn" + }, + "type": "property" + } + } + }, + "props": { + "path": "material/close", + "style": { + "classes": "Alerts/alertClose" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "closePopup", + "pageScope": false, + "script": "\t# closes the last focused popup\n\tsystem.perspective.closePopup(\u0027alertDialog\u0027)", + "sessionScope": true, + "viewScope": false + } + ] + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "body" + }, + "position": { + "basis": "150px", + "grow": 1 + }, + "props": { + "alignItems": "flex-start", + "justify": "center", + "style": { + "boxSizing": "content-box", + "classes": "Utilities/p-16" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tmessageType \u003d self.view.params.btnActionSecondary\t\t\n\tpayload \u003d self.view.params.payload\t\t## Added 2021-09-23 to return to caller view\n\tsystem.perspective.sendMessage(messageType, payload, scope \u003d \"session\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "actionSecondary" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": true, + "inputType": "scalar", + "mappings": [ + { + "input": "", + "output": false + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.image.icon.path": { + "binding": { + "config": { + "expression": "\"material/\" + {view.params.btnIconSecondary}" + }, + "transforms": [ + { + "code": "\tif str(value) \u003d\u003d \"material/\":\n\t\treturn \"\"\n\telse:\n\t\treturn value", + "type": "script" + } + ], + "type": "expr" + } + }, + "props.image.position": { + "binding": { + "config": { + "path": "view.params.btnIconAlignment" + }, + "type": "property" + } + }, + "props.image.style.fill": { + "binding": { + "config": { + "path": "view.params.state" + }, + "transforms": [ + { + "fallback": "#222222", + "inputType": "scalar", + "mappings": [ + { + "input": "info", + "output": "#17599C" + }, + { + "input": "success", + "output": "#117539" + }, + { + "input": "warning", + "output": "#C26700" + }, + { + "input": "error", + "output": "#A62D19" + } + ], + "outputType": "color", + "type": "map" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.params.state" + }, + "enabled": false, + "transforms": [ + { + "fallback": "Alerts/alertBtn2 Utilities/m-r-8 Utilities/p-rl-8", + "inputType": "scalar", + "mappings": [ + { + "input": "error", + "output": "Alerts/states/errorBtn2 Utilities/m-r-8 Utilities/p-rl-8" + }, + { + "input": "warning", + "output": "Alerts/states/warningBtn2 Utilities/m-r-8 Utilities/p-rl-8" + }, + { + "input": "info", + "output": "Alerts/states/infoBtn2 Utilities/m-r-8 Utilities/p-rl-8" + }, + { + "input": "success", + "output": "Alerts/states/successBtn2 Utilities/m-r-8 Utilities/p-rl-8" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "{view.params.btnTextSecondary}" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "height": 20, + "icon": {}, + "width": 20 + }, + "primary": false, + "style": { + "classes": "Alerts/alertButtonSecondary", + "margin": "5px", + "marginRight": "30px" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "closePopup", + "pageScope": false, + "script": "\t# closes the last focused popup\n\tsystem.perspective.closePopup(\u0027alertDialog\u0027)", + "sessionScope": true, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\t#############################################################################################\n\t# Purpose:\tSubmits Current form data to the selected destination from the parameters.\t\t#\n\t#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#\n\t# Login: \t\t\tDate:\t\t\t\t#Comment:\t\t\t\t\t\t\t\tVersion:\t# \n\t# dmamani\t\t\t1/4/23\t\t\t\tRelease to Production\t\t\t\t\tV1\t\t\t#\n\t# \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#\n\t#############################################################################################\n\timport os\n\timport boto3\n\tfrom pprint import pprint, pformat\n\tfrom SymbolLibrary import fetch_library, list_backups, write_library, update_symbol_library, rollback\n\t\n\tsystem.perspective.print(self.session.props.auth.user.roles)\n\t\n\tif not self.view.params.userRole: \n\t\tmsg \u003d \"Contact MAP Team\tCTI: Distribution Center \u003e Maintenance Automation Platform \u003e SCADA Issue\" \n\t\tself.show_error_dialog(msg)\n\t\tsystem.perspective.closePopup(\u0027editItem\u0027)\n\t\treturn\n\n\tsymbolpath \u003d self.view.params.path\n\tcurrentuser \u003d self.session.props.auth.user.id\n\tcurrentcategory \u003d self.view.params.editField1\n\tcurrentinfo \u003d self.view.params.editField2\n\tcurrentdesc \u003d self.view.params.editField3\n\n\tresp \u003d update_symbol_library(symbolpath, category\u003dcurrentcategory, info\u003dcurrentinfo, description\u003dcurrentdesc, username\u003dcurrentuser)\n\tmsg \u003d pformat(resp)\n\t\n\tself.show_success_dialog(msg)\n\tsystem.perspective.print(msg)\n\tsystem.perspective.print(fetch_library(username\u003dcurrentuser))\n\tsystem.perspective.print(symbolpath)\n\tsystem.perspective.print(self.session.props.auth.user.id)\n\t\n\tsystem.perspective.sendMessage(\"UserClickRefresh\", scope \u003d \"page\")\n\tsystem.perspective.closePopup(\u0027editItem\u0027)\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "actionPrimary" + }, + "position": { + "basis": "109px", + "shrink": 0 + }, + "propConfig": { + "props.image.icon.path": { + "binding": { + "config": { + "expression": "\"material/\" + {view.params.btnIconPrimary}" + }, + "transforms": [ + { + "code": "\tif str(value) \u003d\u003d \"material/\":\n\t\treturn \"\"\n\telse:\n\t\treturn value", + "type": "script" + } + ], + "type": "expr" + } + }, + "props.image.position": { + "binding": { + "config": { + "path": "view.params.btnIconAlignment" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.params.state" + }, + "enabled": false, + "transforms": [ + { + "fallback": "Alerts/alertBtn1 Utilities/p-rl-8", + "inputType": "scalar", + "mappings": [ + { + "input": "error", + "output": "Alerts/states/errorBtn1 Utilities/p-rl-8" + }, + { + "input": "warning", + "output": "Alerts/states/warningBtn1 Utilities/p-rl-8" + }, + { + "input": "info", + "output": "Alerts/states/infoBtn1 Utilities/p-rl-8" + }, + { + "input": "success", + "output": "Alerts/states/successBtn1 Utilities/p-rl-8" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.btnTextPrimary" + }, + "type": "property" + } + } + }, + "props": { + "image": { + "height": 20, + "icon": {}, + "style": { + "margin": 5 + }, + "width": 20 + }, + "style": { + "classes": "Alerts/alertButton", + "margin": "5px" + }, + "textStyle": { + "textAlign": "center" + } + }, + "scripts": { + "customMethods": [ + { + "name": "show_success_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"success\", \n\t\t\"Update Symbol Library Results\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t\t\t" + }, + { + "name": "show_error_dialog", + "params": [ + "msg\u003dNone" + ], + "script": "\t# ~~ 13 PARAMETERS ~~\n\t# state\t\t\t\t\t(default \u003d info) empty string uses generic gray styling\n\t# title \t\t\t\t(default \u003d Alert Title) empty string sets the title visibility to false\n\t# message \t\t\t\t(default \u003d Alert message goes here.)\n\t# show close button\t\t(default \u003d true) boolean\n\t# btn text primary\t\t(default \u003d \"Primary\")\n\t# btn text secondary\t(default \u003d \"Secondary\")\n\t# btn icon primary \t\t(default \u003d chevron_right) do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon secondary \t(default \u003d \"\") do not include \u0027material/\u0027 in the path, just the icon name\n\t# btn icon alignment\t(default \u003d \"right\") left or right\n\t# btn primary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn secondary action\t(default \u003d \"\") add message handlers on this button to enable other script actions\n\t# btn close action\t\t(default \u003d \"\") add message handlers on this icon to enable other script actions\n\t# payload\t\t\t\t(default \u003d {}) add a payload here to return to the target message handler\n\t\n\tAlerts.showAlert(\n\t\t\"error\", \n\t\t\"Not Authorized\", \n\t\tmsg, \n\t\t\"true\",\n\t\t\"OK\", \n\t\t\"CLOSE\", \n\t\t\"\", \n\t\t\"\", \n\t\t\"left\", \n\t\t\"closePopup\", \n\t\t\"closePopup\", \n\t\t\"closePopup\",\n\t\t{}\n\t)\n\t\t\t\t\t\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "closePopup", + "pageScope": false, + "script": "\t# closes the last focused popup\n\tsystem.perspective.closePopup(\u0027alertDialog\u0027)", + "sessionScope": true, + "viewScope": false + }, + { + "messageType": "logout", + "pageScope": false, + "script": "\tsystem.perspective.logout()", + "sessionScope": true, + "viewScope": false + } + ] + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "footer" + }, + "position": { + "basis": "56px", + "shrink": 0 + }, + "props": { + "justify": "flex-end", + "style": { + "backgroundColor": "var(--neutral-30)", + "borderTop": "1px solid var(--neutral-50)", + "classes": "Utilities/p-8" + } + }, + "type": "ia.container.flex" + } + ], + "events": { + "dom": { + "onFocus": { + "config": { + "script": "\tmessageType \u003d \u0027alertFocus\u0027\n\tsystem.perspective.sendMessage(messageType)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "dialog" + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "{view.params.state}" + }, + "transforms": [ + { + "fallback": "Alerts/alertDefault", + "inputType": "scalar", + "mappings": [ + { + "input": "info", + "output": "Alerts/states/info" + }, + { + "input": "warning", + "output": "Alerts/states/warning" + }, + { + "input": "error", + "output": "Alerts/states/error" + }, + { + "input": "success", + "output": "Alerts/states/success" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "direction": "column", + "style": { + "maxHeight": "none" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Error/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Error/resource.json new file mode 100644 index 0000000..e3dc2dc --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Error/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-08-01T07:51:23Z" + }, + "lastModificationSignature": "fb53c7091f9850bdb638f4695f4eb45ec522dce53277f6de61f84ddc4883a5d5" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Error/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Error/thumbnail.png new file mode 100644 index 0000000..7748339 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Error/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Error/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Error/view.json new file mode 100644 index 0000000..e5619d2 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Error/view.json @@ -0,0 +1,97 @@ +{ + "custom": {}, + "params": { + "Error_message": "none" + }, + "propConfig": { + "params.Error_message": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 242 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "200px" + }, + "props": { + "color": "#FFFFFF", + "path": "material/error_outline", + "style": { + "backgroundColor": "#555555" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "250px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.Error_message" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "backgroundColor": "#000000" + }, + "textStyle": { + "color": "#FFFFFF", + "fontWeight": "bold", + "margin": 10, + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "200px" + }, + "props": { + "direction": "column", + "style": { + "borderColor": "#FFFFFF", + "borderStyle": "solid", + "borderWidth": "1px" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Error" + }, + "props": { + "direction": "column", + "style": { + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-popup-view/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-popup-view/resource.json new file mode 100644 index 0000000..3d87963 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-popup-view/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:53:16Z" + }, + "lastModificationSignature": "303def7fe12ea44ec66206e1197a6f38778882d157f467f3bd8c87abf57a093f" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-popup-view/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-popup-view/thumbnail.png new file mode 100644 index 0000000..94ae117 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-popup-view/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-popup-view/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-popup-view/view.json new file mode 100644 index 0000000..1a47bff --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-popup-view/view.json @@ -0,0 +1,954 @@ +{ + "custom": { + "data": "value" + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tproject_info \u003d system.perspective.getProjectInfo()\n\tviews \u003d project_info.get(\u0027views\u0027,[])\n\tfilter_criterion \u003d \"Symbol-Views\"\n\tfilter_criterion2 \u003d \"Symbol-Library-Views\"\n\tfilter_criterion3 \u003d \"Controller-Views\"\n\tfilter_criterion4 \u003d \"Device-Views\"\n\tfiltered_views \u003d [\n\t\tview for view in views \n\t\t\t\n\t\tif filter_criterion in view.get(\u0027path\u0027,\u0027\u0027) \n\t\tand not filter_criterion2 in view.get(\u0027path\u0027,\u0027\u0027) \n\t\tand not filter_criterion3 in view.get(\u0027path\u0027,\u0027\u0027)\n\t\tand not filter_criterion4 in view.get(\u0027path\u0027,\u0027\u0027)\n\t\t]\n\tjson_structure \u003d []\n\tfor view in filtered_views:\n\t\t\n\t\tif \u0027Test\u0027 not in view[\u0027path\u0027]:\n\t\t\tinstance \u003d {\n\t\t\t\t\"instanceStyle\": {\n\t\t\t\t\t\"classes\": \"\"\n\t\t\t\t},\n\t\t\t\t\"instancePosition\": {},\n\t\t\t\t\"Path\": view.get(\u0027path\u0027,\u0027\u0027),\n\t\t\t\t\"forceRunning\":3,\n\t\t\t\t\"forceFault\": None,\n\t\t\t\t\"has_state\":True\n\t\t\t}\n\t\t\tjson_structure.append(instance)\n\t\t\n\tjson_result \u003d system.util.jsonEncode(json_structure)\n\tself.params.Dataset \u003d filtered_views\n\tself.params.FilteredViews \u003d json_structure\n\tself.session.custom.alarm_filter.show_running \u003d True\n\tself.session.custom.alarm_filter.show_safety \u003d True\n\tself.session.custom.alarm_filter.show_diagnostic \u003d True\n\tself.session.custom.alarm_filter.show_gateways \u003d True\n\tself.session.custom.alarm_filter.show_low_alarm \u003d True\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "Dataset": [ + { + "path": "Symbol-Views/Equipment-Views/ARSAW" + }, + { + "path": "Symbol-Views/Equipment-Views/AUS" + }, + { + "path": "Symbol-Views/Equipment-Views/Camera" + }, + { + "path": "Symbol-Views/Equipment-Views/CognexCamera" + }, + { + "path": "Symbol-Views/Equipment-Views/ControlCabinet" + }, + { + "path": "Symbol-Views/Equipment-Views/Estop" + }, + { + "path": "Symbol-Views/Equipment-Views/GoodsLift" + }, + { + "path": "Symbol-Views/Equipment-Views/JAM" + }, + { + "path": "Symbol-Views/Equipment-Views/Light_Curtain" + }, + { + "path": "Symbol-Views/Equipment-Views/Main_Panel" + }, + { + "path": "Symbol-Views/Equipment-Views/Network" + }, + { + "path": "Symbol-Views/Equipment-Views/Pointer" + }, + { + "path": "Symbol-Views/Equipment-Views/PressureSwitch" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord_End" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord_Line" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord_Line_Vertical" + }, + { + "path": "Symbol-Views/Equipment-Views/RFID" + }, + { + "path": "Symbol-Views/Equipment-Views/Robot" + }, + { + "path": "Symbol-Views/Equipment-Views/SLAMs" + }, + { + "path": "Symbol-Views/Equipment-Views/SafetyGate" + }, + { + "path": "Symbol-Views/Equipment-Views/Stacker_Destacker" + }, + { + "path": "Symbol-Views/Equipment-Views/Status" + }, + { + "path": "Symbol-Views/Equipment-Views/StatusNonPowered" + }, + { + "path": "Symbol-Views/Equipment-Views/StatusNonPowered_NS" + }, + { + "path": "Symbol-Views/Equipment-Views/Status_NS" + }, + { + "path": "Symbol-Views/Equipment-Views/THEA" + }, + { + "path": "Symbol-Views/Equipment-Views/Test" + } + ], + "FilteredViews": [ + { + "Path": "Symbol-Views/Equipment-Views/ARSAW", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/AUS", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Camera", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/CognexCamera", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/ControlCabinet", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Estop", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/GoodsLift", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/JAM", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Light_Curtain", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Main_Panel", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Network", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Pointer", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PressureSwitch", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PullChord", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PullChord_End", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PullChord_Line", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PullChord_Line_Vertical", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/RFID", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Robot", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/SLAMs", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/SafetyGate", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Stacker_Destacker", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Status", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/StatusNonPowered", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/StatusNonPowered_NS", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Status_NS", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/THEA", + "forceFault": null, + "forceRunning": 3, + "has_state": true, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + } + ] + }, + "propConfig": { + "custom.data": { + "persistent": true + }, + "params.Dataset": { + "paramDirection": "output" + }, + "params.FilteredViews": { + "paramDirection": "output" + } + }, + "props": { + "defaultSize": { + "height": 309, + "width": 378 + }, + "theme": "dark" + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Table" + }, + "propConfig": { + "props.data[1].Color.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state0" + }, + "type": "property" + } + }, + "props.data[2].Color.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state5" + }, + "type": "property" + } + }, + "props.data[2].Color.style.color": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired}\u003d true, \u0027#000000\u0027,\u0027#FFFFFF\u0027) " + }, + "type": "expr" + } + }, + "props.data[4].Color.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state5" + }, + "type": "property" + } + }, + "props.data[4].Color.style.color": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired}\u003d true, \u0027#000000\u0027,\u0027#FFFFFF\u0027) " + }, + "type": "expr" + } + }, + "props.data[5].Color.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state4" + }, + "type": "property" + } + }, + "props.data[6].Color.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state3" + }, + "type": "property" + } + }, + "props.data[7].Color.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state2" + }, + "type": "property" + } + }, + "props.data[8].Color.style.backgroundColor": { + "binding": { + "config": { + "path": "session.custom.colours.state1" + }, + "type": "property" + } + } + }, + "props": { + "cells": { + "style": { + "paddingLeft": 5 + } + }, + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Color", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": false, + "strictWidth": true, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 85 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Description", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": false, + "strictWidth": false, + "style": { + "borderLeftStyle": "solid", + "borderLeftWidth": 1, + "borderRightStyle": "solid", + "borderRightWidth": 1, + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 100 + } + ], + "data": [ + { + "Color": { + "align": "center", + "justify": "left", + "style": { + "backgroundColor": "", + "borderBottomStyle": "solid", + "borderBottomWidth": 1, + "borderLeftStyle": "hidden", + "borderRightStyle": "hidden", + "classes": "", + "font-weight": "bold" + }, + "value": "State" + }, + "Description": { + "align": "center", + "editable": false, + "justify": "left", + "style": { + "backgroundColor": "", + "borderBottomStyle": "solid", + "borderBottomWidth": 1, + "borderLeftStyle": "hidden", + "classes": "some-class", + "font-weight": "bold" + }, + "value": "Description" + } + }, + { + "Color": { + "align": "center", + "justify": "left", + "style": { + "classes": "", + "color": "#000000" + }, + "value": "Stopped" + }, + "Description": "MHE is stopped (State2)" + }, + { + "Color": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "value": "Running" + }, + "Description": "MHE is running (State 3)" + }, + { + "Color": { + "align": "center", + "justify": "left", + "style": { + "backgroundColor": "", + "borderBottomStyle": "solid", + "borderBottomWidth": 1, + "borderLeftStyle": "hidden", + "borderRightStyle": "hidden", + "borderTopStyle": "solid", + "borderTopWidth": 1, + "classes": "", + "font-weight": "bold" + }, + "value": "Priority" + }, + "Description": { + "align": "center", + "editable": false, + "justify": "left", + "style": { + "backgroundColor": "", + "borderBottomStyle": "solid", + "borderBottomWidth": 1, + "borderLeftStyle": "hidden", + "borderTopStyle": "solid", + "borderTopWidth": 1, + "classes": "", + "font-weight": "bold" + }, + "value": "Description" + } + }, + { + "Color": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "value": "Healthy" + }, + "Description": "Healthy, no active alarms" + }, + { + "Color": { + "align": "center", + "justify": "left", + "style": { + "classes": "", + "color": "#000000" + }, + "value": "Diagnostic" + }, + "Description": "Diagnostic Information" + }, + { + "Color": { + "align": "center", + "borderLeftColor": "white", + "justify": "left", + "style": { + "classes": "", + "color": "#000000" + }, + "value": "Low" + }, + "Description": "Running at reduced capacity", + "Status": "Low" + }, + { + "Color": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "value": "Medium" + }, + "Description": "Controlled Stop" + }, + { + "Color": { + "align": "center", + "justify": "left", + "style": { + "classes": "some-class" + }, + "value": "High" + }, + "Description": "Uncontrolled Stop" + } + ], + "dragOrderable": false, + "enableHeader": false, + "headerStyle": { + "backgroundColor": "#2B2B2B", + "color": "#FFFFFF", + "textIndent": "0px" + }, + "pager": { + "bottom": false + }, + "rows": { + "highlight": { + "color": "#FFFFFF", + "enabled": false + }, + "style": { + "classes": "Background-Styles/Controller" + } + }, + "selection": { + "enableRowSelection": false, + "style": { + "fontWeight": "bold" + } + } + }, + "type": "ia.display.table" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "basis": "320px" + }, + "propConfig": { + "props.params.Dataset": { + "binding": { + "config": { + "path": "view.params.Dataset" + }, + "type": "property" + } + }, + "props.params.FilteredViews": { + "binding": { + "config": { + "path": "view.params.FilteredViews" + }, + "type": "property" + } + } + }, + "props": { + "path": "PopUp-Views/Legend_Popup/Legend-table" + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer_6" + }, + "position": { + "basis": "800px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "tabIndex": 1 + }, + "props": { + "direction": "column", + "style": { + "overflow": "visible" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "TabContainer" + }, + "position": { + "basis": "1377px" + }, + "propConfig": { + "props.tabs[0]": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired}\u003dTrue, \u0027Alt Color\u0027, \u0027Color\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "menuStyle": { + "fontWeight": "bold" + }, + "style": { + "classes": "Background-Styles/Controller" + }, + "tabs": [ + null, + "Icons" + ] + }, + "type": "ia.container.tab" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "backgroundColor": "#3B3B3B", + "opacity": 1 + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-row/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-row/resource.json new file mode 100644 index 0000000..fba9106 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-row/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:53:16Z" + }, + "lastModificationSignature": "a7dd552ea8649910f6c690743b6db82e3d233bac51fad9869d7e20d981f3bc01" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-row/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-row/thumbnail.png new file mode 100644 index 0000000..f2e1098 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-row/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-row/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-row/view.json new file mode 100644 index 0000000..855523d --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-row/view.json @@ -0,0 +1,204 @@ +{ + "custom": {}, + "params": { + "Name": "", + "Path": "", + "forceFault": null, + "forceRunning": null + }, + "propConfig": { + "params.Name": { + "binding": { + "config": { + "path": "view.params.Path" + }, + "transforms": [ + { + "code": "\tstring \u003d value \n\tparts \u003d string.split(\"/\")\n\td \u003d parts[-1]\n\treturn d\n\treturn value", + "type": "script" + } + ], + "type": "property" + }, + "paramDirection": "inout", + "persistent": true + }, + "params.Path": { + "paramDirection": "inout", + "persistent": true + }, + "params.forceFault": { + "paramDirection": "inout", + "persistent": true + }, + "params.forceRunning": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 44, + "width": 357 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "basis": 35 + }, + "propConfig": { + "props.params.forceFaultStatus": { + "binding": { + "config": { + "path": "view.params.forceFault" + }, + "type": "property" + } + }, + "props.params.forceRunningStatus": { + "binding": { + "config": { + "path": "view.params.forceRunning" + }, + "type": "property" + } + }, + "props.params.tagProps[0]": { + "binding": { + "config": { + "path": "view.params.Name" + }, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "view.params.Path" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "directionLeft": false, + "tagProps": [ + null, + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "style": { + "overflow": "hidden", + "pointerEvents": "None" + } + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "88px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden", + "paddingLeft": 5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "50px", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.Name" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 5 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "45px", + "shrink": 0 + }, + "props": { + "style": { + "backgroundColor": "#3B3B3B", + "borderColor": "#CAC3C3", + "borderStyle": "solid", + "borderWidth": 1, + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-table/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-table/resource.json new file mode 100644 index 0000000..5da1bf0 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-table/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:53:16Z" + }, + "lastModificationSignature": "db906e8aff94cfb46ecaedaee7a5ffab45244f15cf2fadaaca60b78cbf915175" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-table/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-table/thumbnail.png new file mode 100644 index 0000000..8aaa1e2 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-table/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-table/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-table/view.json new file mode 100644 index 0000000..00c9572 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-table/view.json @@ -0,0 +1,387 @@ +{ + "custom": {}, + "params": { + "Dataset": [ + { + "path": "Symbol-Views/Device-Views/Estop" + }, + { + "path": "Symbol-Views/Equipment-Views/ARSAW" + }, + { + "path": "Symbol-Views/Equipment-Views/AUS" + }, + { + "path": "Symbol-Views/Equipment-Views/Camera" + }, + { + "path": "Symbol-Views/Equipment-Views/ControlCabinet" + }, + { + "path": "Symbol-Views/Equipment-Views/Estop" + }, + { + "path": "Symbol-Views/Equipment-Views/GoodsLift" + }, + { + "path": "Symbol-Views/Equipment-Views/JAM" + }, + { + "path": "Symbol-Views/Equipment-Views/Light_Curtain" + }, + { + "path": "Symbol-Views/Equipment-Views/Main_Panel" + }, + { + "path": "Symbol-Views/Equipment-Views/Network" + }, + { + "path": "Symbol-Views/Equipment-Views/Pointer" + }, + { + "path": "Symbol-Views/Equipment-Views/PressureSwitch" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord_End" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord_Line" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord_Line_Vertical" + }, + { + "path": "Symbol-Views/Equipment-Views/RFID" + }, + { + "path": "Symbol-Views/Equipment-Views/Robot" + }, + { + "path": "Symbol-Views/Equipment-Views/SLAMs" + }, + { + "path": "Symbol-Views/Equipment-Views/SafetyGate" + }, + { + "path": "Symbol-Views/Equipment-Views/Stacker_Destacker" + }, + { + "path": "Symbol-Views/Equipment-Views/Status" + }, + { + "path": "Symbol-Views/Equipment-Views/StatusNonPowered" + }, + { + "path": "Symbol-Views/Equipment-Views/StatusNonPowered_NS" + }, + { + "path": "Symbol-Views/Equipment-Views/Status_NS" + }, + { + "path": "Symbol-Views/Equipment-Views/THEA" + }, + { + "path": "Symbol-Views/Equipment-Views/Test" + } + ], + "FilteredViews": [ + { + "Path": "Symbol-Views/Equipment-Views/ARSAW", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/AUS", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Camera", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/ControlCabinet", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Estop", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/GoodsLift", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/JAM", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Light_Curtain", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Main_Panel", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Network", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Pointer", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PressureSwitch", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PullChord", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PullChord_End", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PullChord_Line", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PullChord_Line_Vertical", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/RFID", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Robot", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/SLAMs", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/SafetyGate", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Stacker_Destacker", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Status", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/StatusNonPowered", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/StatusNonPowered_NS", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Status_NS", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/THEA", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Test", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + } + ] + }, + "propConfig": { + "params.Dataset": { + "paramDirection": "input" + }, + "params.FilteredViews": { + "paramDirection": "input" + } + }, + "props": { + "defaultSize": { + "height": 324, + "width": 386 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "FlexRepeater" + }, + "position": { + "basis": "320px" + }, + "propConfig": { + "props.instances": { + "binding": { + "config": { + "path": "view.params.FilteredViews" + }, + "type": "property" + } + } + }, + "props": { + "direction": "column", + "path": "PopUp-Views/Legend_Popup/Legend-row", + "style": { + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.display.flex-repeater" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup-Entry/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup-Entry/resource.json new file mode 100644 index 0000000..ad4deac --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup-Entry/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-05-07T17:12:34Z" + }, + "lastModificationSignature": "842030a943da01e7d61c38fb8456ebd4a01be66ecc3c69733ecd3aa2ed852754" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup-Entry/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup-Entry/thumbnail.png new file mode 100644 index 0000000..c71a51c Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup-Entry/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup-Entry/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup-Entry/view.json new file mode 100644 index 0000000..6070270 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup-Entry/view.json @@ -0,0 +1,522 @@ +{ + "custom": {}, + "params": { + "body": "", + "link1": "", + "link1title": "", + "link2": "", + "link2title": "", + "priority": "", + "title": "" + }, + "propConfig": { + "params.body": { + "paramDirection": "inout", + "persistent": true + }, + "params.link1": { + "paramDirection": "inout", + "persistent": true + }, + "params.link1title": { + "paramDirection": "inout", + "persistent": true + }, + "params.link2": { + "paramDirection": "inout", + "persistent": true + }, + "params.link2title": { + "paramDirection": "inout", + "persistent": true + }, + "params.priority": { + "paramDirection": "inout", + "persistent": true + }, + "params.title": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 227, + "width": 600 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "title" + }, + "position": { + "basis": "50px", + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{this.props.text}" + }, + "transforms": [ + { + "fallback": true, + "inputType": "scalar", + "mappings": [ + { + "input": "", + "output": false + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "expr" + } + }, + "props.style.color": { + "binding": { + "config": { + "path": "view.params.state" + }, + "enabled": false, + "transforms": [ + { + "fallback": "var(--info)", + "inputType": "scalar", + "mappings": [ + { + "input": "info", + "output": "var(--info)" + }, + { + "input": "success", + "output": "var(--success)" + }, + { + "input": "error", + "output": "var(--error)" + }, + { + "input": "warning", + "output": "var(--warning)" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.title" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Alerts/alertTitle", + "color": "#FFFFFF", + "marginLeft": 5 + }, + "textStyle": { + "paddingLeft": 5, + "paddingRight": 5 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "TopRow" + }, + "position": { + "basis": "40px" + }, + "props": { + "style": { + "backgroundColor": "#555555" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Body-Label" + }, + "position": { + "basis": "80px", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.body" + }, + "type": "property" + } + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "BodyRow" + }, + "position": { + "basis": "90px", + "grow": 1 + }, + "props": { + "style": { + "marginBottom": 2.5, + "marginLeft": 10, + "marginRight": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tlink \u003d self.view.params.link1\n\t\n\tsystem.perspective.navigate(url\u003dlink, newTab\u003dTrue)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Icon", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "30px" + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "path": "view.params.link1" + }, + "type": "property" + } + } + }, + "props": { + "path": "material/open_in_new", + "style": { + "marginLeft": 10, + "marginRight": 10 + } + }, + "type": "ia.display.icon" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tlink \u003d self.view.params.link1\n\t\n\tsystem.perspective.navigate(url\u003dlink, newTab\u003dTrue)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Link1-Label", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "50px", + "grow": 1 + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "path": "view.params.link1" + }, + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.link1title" + }, + "type": "property" + } + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "URL1Row" + }, + "position": { + "basis": "40px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.params.link1title" + }, + "transforms": [ + { + "code": "\tif len(value)\u003e0:\n\t\tvalue \u003d True\n\telse:\n\t\tvalue \u003d False\n\treturn value", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "backgroundColor": "#555555", + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tlink \u003d self.view.params.link2\n\t\n\tsystem.perspective.navigate(url\u003dlink, newTab\u003dTrue)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Icon", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "30px" + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "path": "view.params.link2" + }, + "type": "property" + } + } + }, + "props": { + "path": "material/open_in_new", + "style": { + "marginLeft": 10, + "marginRight": 10 + } + }, + "type": "ia.display.icon" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tlink \u003d self.view.params.link2\n\t\n\tsystem.perspective.navigate(url\u003dlink, newTab\u003dTrue)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Link2-Label", + "tooltip": { + "enabled": true + } + }, + "position": { + "basis": "50px", + "grow": 1 + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "path": "view.params.link2" + }, + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.link2title" + }, + "type": "property" + } + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "URL2Row" + }, + "position": { + "basis": "40px" + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "path": "view.params.link2title" + }, + "transforms": [ + { + "code": "\tif len(value)\u003e0:\n\t\tvalue \u003d True\n\telse:\n\t\tvalue \u003d False\n\treturn value", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "backgroundColor": "#555555" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "content" + }, + "position": { + "basis": "500px", + "grow": 1 + }, + "props": { + "direction": "column", + "style": { + "classes": "Utilities/m-r-16" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "body" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "props": { + "alignItems": "flex-start", + "justify": "center", + "style": { + "boxSizing": "content-box", + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "propConfig": { + "props.style.borderLeftColor": { + "binding": { + "config": { + "path": "view.params.priority" + }, + "transforms": [ + { + "fallback": "state5", + "inputType": "scalar", + "mappings": [ + { + "input": "Healthy", + "output": "state5" + }, + { + "input": "Diagnostic", + "output": "state4" + }, + { + "input": "Low", + "output": "state3" + }, + { + "input": "Medium", + "output": "state2" + }, + { + "input": "High", + "output": "state1" + } + ], + "outputType": "scalar", + "type": "map" + }, + { + "code": "\tprefix \u003d self.session.custom.colours[value]\n\treturn prefix", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "borderBottomStyle": "none", + "borderLeftStyle": "solid", + "borderLeftWidth": 5, + "borderRightStyle": "none", + "borderTopStyle": "none", + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup/resource.json new file mode 100644 index 0000000..2bfcf2e --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-05-07T17:12:34Z" + }, + "lastModificationSignature": "21a7104c5ac7b817c409b16b3d2bfbe874d91c78277aef5b51ff6c3c5f3374bb" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup/thumbnail.png new file mode 100644 index 0000000..75a0393 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup/view.json new file mode 100644 index 0000000..e539819 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Popup/view.json @@ -0,0 +1,176 @@ +{ + "custom": { + "activityLogger": { + "alt_pageid": "notifyToolPopup", + "start_time": { + "$": [ + "ts", + 192, + 1715013953223 + ], + "$ts": 1715013953223 + } + } + }, + "events": { + "system": { + "onShutdown": { + "config": { + "script": "\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)" + }, + "scope": "G", + "type": "script" + }, + "onStartup": { + "config": { + "script": "\tself.custom.activityLogger.start_time \u003d system.date.now()" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "entryCount": "", + "instances": [] + }, + "propConfig": { + "custom.activityLogger": { + "persistent": true + }, + "custom.activityLogger.pageid": { + "binding": { + "config": { + "path": "page.props.path" + }, + "transforms": [ + { + "code": " if value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n return self.custom.activityLogger.alt_pageid.lower()\n else:\n return value[1:].lower()\n\treturn value", + "type": "script" + } + ], + "type": "property" + } + }, + "params.entryCount": { + "paramDirection": "input", + "persistent": true + }, + "params.instances": { + "paramDirection": "input", + "persistent": true + }, + "props.defaultSize.height": { + "binding": { + "config": { + "path": "view.params.entryCount" + }, + "transforms": [ + { + "fallback": 475, + "inputType": "range", + "mappings": [ + { + "input": { + "max": 1, + "min": 0 + }, + "output": 227 + }, + { + "input": { + "max": 2, + "min": 2 + }, + "output": 456 + }, + { + "input": { + "max": 99, + "min": 3 + }, + "output": 475 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.defaultSize.width": { + "binding": { + "config": { + "path": "view.params.entryCount" + }, + "transforms": [ + { + "fallback": 620, + "inputType": "range", + "mappings": [ + { + "input": { + "max": 2, + "min": 0 + }, + "output": 600 + }, + { + "input": { + "max": 99, + "min": 3 + }, + "output": 620 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "defaultSize": {} + }, + "root": { + "children": [ + { + "meta": { + "name": "FlexRepeater" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.instances": { + "binding": { + "config": { + "path": "view.params.instances" + }, + "type": "property" + } + } + }, + "props": { + "direction": "column", + "path": "PopUp-Views/Notify-Tool/Notify-Popup-Entry" + }, + "type": "ia.display.flex-repeater" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Submit-Popup/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Submit-Popup/resource.json new file mode 100644 index 0000000..0bdf247 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Submit-Popup/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-05-07T17:12:34Z" + }, + "lastModificationSignature": "7196ed6d8dfeeb06b5ea15c8f7a6d8e724abbf1059f2edfaf8fb3e1ef710ed8b" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Submit-Popup/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Submit-Popup/thumbnail.png new file mode 100644 index 0000000..6588049 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Submit-Popup/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Submit-Popup/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Submit-Popup/view.json new file mode 100644 index 0000000..7497e54 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Notify-Tool/Notify-Submit-Popup/view.json @@ -0,0 +1,396 @@ +{ + "custom": {}, + "params": { + "body": "", + "link1": "", + "link1title": "", + "link2": "", + "link2title": "", + "title": "" + }, + "propConfig": { + "params.body": { + "paramDirection": "inout", + "persistent": true + }, + "params.link1": { + "paramDirection": "inout", + "persistent": true + }, + "params.link1title": { + "paramDirection": "inout", + "persistent": true + }, + "params.link2": { + "paramDirection": "inout", + "persistent": true + }, + "params.link2title": { + "paramDirection": "inout", + "persistent": true + }, + "params.title": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 310, + "width": 600 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "title" + }, + "position": { + "basis": "50px", + "grow": 1, + "shrink": 0 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{this.props.text}" + }, + "transforms": [ + { + "fallback": true, + "inputType": "scalar", + "mappings": [ + { + "input": "", + "output": false + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "expr" + } + }, + "props.style.color": { + "binding": { + "config": { + "path": "view.params.state" + }, + "enabled": false, + "transforms": [ + { + "fallback": "var(--info)", + "inputType": "scalar", + "mappings": [ + { + "input": "info", + "output": "var(--info)" + }, + { + "input": "success", + "output": "var(--success)" + }, + { + "input": "error", + "output": "var(--error)" + }, + { + "input": "warning", + "output": "var(--warning)" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.title" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Alerts/alertTitle", + "color": "#FFFFFF" + }, + "textStyle": { + "paddingLeft": 5, + "paddingRight": 5 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "TopRow" + }, + "position": { + "basis": "40px", + "display": false + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Body-TextArea" + }, + "position": { + "basis": "160px", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.body" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderStyle": "solid", + "fontFamily": "Arial" + } + }, + "type": "ia.input.text-area" + } + ], + "meta": { + "name": "BodyRow" + }, + "position": { + "basis": "300px", + "grow": 1 + }, + "props": { + "style": { + "marginBottom": 2.5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "URL1TextField" + }, + "position": { + "basis": "32px", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.link1" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderStyle": "solid", + "marginBottom": 2.5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 2.5 + } + }, + "type": "ia.input.text-field" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tlink \u003d self.view.params.link1\n\t\n\tsystem.perspective.navigate(url\u003dlink, newTab\u003dTrue)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "120px" + }, + "props": { + "image": { + "icon": { + "path": "material/open_in_new" + } + }, + "style": { + "backgroundColor": "#555555", + "classes": "Background-Styles/Controller", + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 10, + "marginTop": 5 + }, + "text": "Open" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "URL1Row" + }, + "position": { + "basis": "40px", + "display": false + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "URL2TextField" + }, + "position": { + "basis": "32px", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.link2" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "borderStyle": "solid", + "marginBottom": 2.5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 2.5 + } + }, + "type": "ia.input.text-field" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tlink \u003d self.view.params.link2\n\t\n\tsystem.perspective.navigate(url\u003dlink, newTab\u003dTrue)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "basis": "120px" + }, + "props": { + "image": { + "icon": { + "path": "material/open_in_new" + } + }, + "style": { + "backgroundColor": "#555555", + "classes": "Background-Styles/Controller", + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 10, + "marginTop": 5 + }, + "text": "Open" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "URL2Row" + }, + "position": { + "basis": "40px", + "display": false + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "content" + }, + "position": { + "basis": "600px", + "grow": 1 + }, + "props": { + "direction": "column", + "style": { + "classes": "Utilities/m-r-16" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "body" + }, + "position": { + "basis": "600px", + "grow": 1 + }, + "props": { + "alignItems": "flex-start", + "justify": "center", + "style": { + "boxSizing": "content-box", + "classes": "Utilities/p-16" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Permissions Error/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Permissions Error/resource.json new file mode 100644 index 0000000..7a9d9ee --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Permissions Error/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-03-31T15:25:39Z" + }, + "lastModificationSignature": "dbb9d1be00fc17ec677230a2f5090b9789fc54e0455b10065c77293172e7e524" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Permissions Error/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Permissions Error/thumbnail.png new file mode 100644 index 0000000..40f5bd3 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Permissions Error/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Permissions Error/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Permissions Error/view.json new file mode 100644 index 0000000..b25c166 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Permissions Error/view.json @@ -0,0 +1,46 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 54, + "width": 400 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "49px" + }, + "props": { + "color": "#FF4747", + "path": "material/not_interested" + }, + "type": "ia.display.icon" + }, + { + "custom": { + "key": "value" + }, + "meta": { + "name": "Label" + }, + "position": { + "basis": "337px" + }, + "props": { + "text": "User does not have the required role." + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "root" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/S3/Audit/Log_Viewer/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/S3/Audit/Log_Viewer/resource.json new file mode 100644 index 0000000..fceebeb --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/S3/Audit/Log_Viewer/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "de0f2e8a3d7e7961e058e7792dae6772ad05918341af7721abcfa18bb0894a93" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/S3/Audit/Log_Viewer/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/S3/Audit/Log_Viewer/thumbnail.png new file mode 100644 index 0000000..739748b Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/S3/Audit/Log_Viewer/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/S3/Audit/Log_Viewer/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/S3/Audit/Log_Viewer/view.json new file mode 100644 index 0000000..3ade6ba --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/S3/Audit/Log_Viewer/view.json @@ -0,0 +1,239 @@ +{ + "custom": { + "api_region_name": "na", + "loading": false, + "query_params": { + "copy_option": null, + "destination_bucket": null, + "destination_site": null, + "destination_view": null, + "end_time": null, + "error_occurred": null, + "operation": null, + "source_bucket": null, + "source_site": null, + "source_view": null, + "start_time": null, + "username": "" + }, + "raw_data": [] + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tquery_params \u003d self.params.query_params\n\tself.custom.query_params \u003d query_params\n\tsystem.perspective.sendMessage(\u0027refresh_audit_table_data\u0027, scope\u003d\u0027view\u0027)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "query_params": { + "copy_option": null, + "destination_bucket": null, + "destination_site": null, + "destination_view": null, + "end_time": null, + "error_occurred": null, + "operation": null, + "source_bucket": null, + "source_site": null, + "source_view": null, + "start_time": null, + "username": "" + } + }, + "propConfig": { + "custom.api_region_name": { + "binding": { + "config": { + "path": "session.custom.aws.prefix" + }, + "type": "property" + }, + "persistent": true + }, + "custom.loading": { + "persistent": true + }, + "custom.query_params": { + "persistent": true + }, + "custom.raw_data": { + "persistent": true + }, + "params.query_params": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "width": 1200 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Query Params" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "props.params.params.query_params": { + "binding": { + "config": { + "path": "view.custom.query_params" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "open_expanded": false, + "params": {}, + "path": "Objects/Templates/S3/Audit/Query_Options", + "show_box_shadow_on_expanded": true, + "title": "Query Params", + "useDefaultHeight": false, + "useDefaultWidth": false + }, + "path": "Framework/Card/Card_Collapsible_Transparent" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Log Table" + }, + "position": { + "basis": "100%" + }, + "propConfig": { + "props.params.table_data": { + "binding": { + "config": { + "path": "view.custom.raw_data" + }, + "type": "property" + } + }, + "props.params.title": { + "binding": { + "config": { + "expression": "\u0027SCADA S3 Audit Logs - \u0027+\r\nif({view.custom.loading}, \u0027Loading...\u0027, stringFormat(\u0027%d Record(s)\u0027, len({view.custom.raw_data})))" + }, + "type": "expr" + } + } + }, + "props": { + "params": { + "NavigationSettings": { + "BaseUrl": "/singleMP/main", + "Column": "mp_name", + "Enabled": false + }, + "SelectedRow": [], + "filters": [], + "header_order": [ + "timestamp", + "username", + "operation", + { + "field": "destination_bucket", + "visible": true + }, + "destination_site", + "destination_view", + { + "field": "destination_object_key", + "visible": false + }, + { + "field": "destination_version_id", + "visible": false + }, + "expires", + { + "field": "source_bucket", + "visible": true + }, + "source_site", + "source_view", + { + "field": "source_object_key", + "visible": false + }, + { + "field": "source_version_id", + "visible": false + }, + { + "field": "response", + "visible": false + }, + "error_occurred", + { + "field": "error_message", + "visible": true + }, + { + "field": "audit_id", + "visible": false + }, + { + "field": "copy_option", + "visible": false + }, + { + "field": "ttl", + "visible": false + } + ] + }, + "path": "Objects/Templates/S3/Audit/Log_Table" + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "scripts": { + "customMethods": [ + { + "name": "refresh_audit_table_data", + "params": [], + "script": "\t# refresh the audit table query\n\tfrom helper.helper import sanitize_tree\n\tfrom AWS.s3 import S3Manager\n\t\n\tself.view.custom.loading \u003d True\n\tapi_stage \u003d \u0027prod\u0027\n\tusername \u003d self.session.props.auth.user.userName\n\tapi_region_name \u003d self.view.custom.api_region_name\n\ts3m \u003d S3Manager(api_stage, api_region_name, username)\n\t\n\tparams \u003d sanitize_tree(self.view.custom.query_params)\n\tresp \u003d s3m.query_audit_table(return_items_only\u003dTrue, **params)\n\t# sort records in descending order by timestamp (newest first)\n\tself.view.custom.raw_data \u003d sorted(resp, key\u003dlambda d: d[\u0027timestamp\u0027], reverse\u003dTrue)\n\tself.view.custom.loading \u003d False\n\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "audit_table_query_params_changed", + "pageScope": false, + "script": "\t# update the `view.custom.query_params` object from received payload\n\tfrom helper.helper import sanitize_tree\n\td \u003d sanitize_tree(payload)\n\tdct \u003d sanitize_tree(self.view.custom.query_params)\n\tdct.update(d)\n\tself.view.custom.query_params \u003d dct\n\t", + "sessionScope": true, + "viewScope": true + }, + { + "messageType": "refresh_audit_table_data", + "pageScope": false, + "script": "\t# implement your handler here\n\tself.refresh_audit_table_data()\n\t", + "sessionScope": true, + "viewScope": true + } + ] + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/S3/Versions/Log_Viewer/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/S3/Versions/Log_Viewer/resource.json new file mode 100644 index 0000000..36d0b50 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/S3/Versions/Log_Viewer/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "lastModificationSignature": "5d46e7aa866039d4e16c72fb58a3c31a33014bca5a4bf642a8af9b0c87cb73f6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/S3/Versions/Log_Viewer/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/S3/Versions/Log_Viewer/thumbnail.png new file mode 100644 index 0000000..bfde933 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/S3/Versions/Log_Viewer/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/S3/Versions/Log_Viewer/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/S3/Versions/Log_Viewer/view.json new file mode 100644 index 0000000..2a7d0d3 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/S3/Versions/Log_Viewer/view.json @@ -0,0 +1,238 @@ +{ + "custom": { + "api_region_name": "na", + "loading": false, + "operation_options": [ + { + "label": "Copy Single", + "value": "copy_single" + }, + { + "label": "Upload", + "value": "upload" + }, + { + "label": "Delete", + "value": "delete" + }, + { + "label": "Add New Site", + "value": "add_new_site" + } + ], + "query_params": { + "bucket": null, + "object_key": null, + "site": null, + "view": null + }, + "raw_data": [] + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tquery_params \u003d self.params.query_params\n\tself.custom.query_params \u003d query_params\n\tif query_params.get(\u0027bucket\u0027, None) and query_params.get(\u0027site\u0027, None) and query_params.get(\u0027view\u0027, None):\n\t\tsystem.perspective.sendMessage(\u0027refresh_version_table_data\u0027, scope\u003d\u0027view\u0027)\n\telse:\n\t\tself.custom.raw_data \u003d []\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "query_params": { + "bucket": null, + "object_key": null, + "site": null, + "view": null + } + }, + "propConfig": { + "custom.api_region_name": { + "binding": { + "config": { + "path": "session.custom.aws.prefix" + }, + "type": "property" + }, + "persistent": true + }, + "custom.loading": { + "persistent": true + }, + "custom.operation_options": { + "binding": { + "config": { + "expression": "1" + }, + "transforms": [ + { + "code": "\tfrom AWS.s3 import OPERATION_MAP\n\treturn [{\u0027value\u0027:k, \u0027label\u0027:k.replace(\u0027_\u0027,\u0027 \u0027).title()} \n\t\t\tfor k,v in OPERATION_MAP.iteritems()\n\t\t\tif v.get(\u0027method\u0027, \u0027\u0027) in (\u0027PUT\u0027, \u0027POST\u0027, \u0027DELETE\u0027)\n\t\t\tand k not in (\u0027query_audit_table\u0027, )]", + "type": "script" + } + ], + "type": "expr" + }, + "persistent": true + }, + "custom.query_params": { + "persistent": true + }, + "custom.raw_data": { + "persistent": true + }, + "params.query_params": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "width": 1200 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Query Params" + }, + "position": { + "shrink": 0 + }, + "propConfig": { + "props.params.params.query_params": { + "binding": { + "config": { + "path": "view.custom.query_params" + }, + "type": "property" + } + } + }, + "props": { + "params": { + "open_expanded": false, + "params": {}, + "path": "Objects/Templates/S3/Versions/Query_Options", + "show_box_shadow_on_expanded": true, + "title": "Query Params", + "useDefaultHeight": false, + "useDefaultWidth": false + }, + "path": "Framework/Card/Card_Collapsible_Transparent" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Log Table" + }, + "position": { + "basis": "100%" + }, + "propConfig": { + "props.params.table_data": { + "binding": { + "config": { + "path": "view.custom.raw_data" + }, + "type": "property" + } + }, + "props.params.title": { + "binding": { + "config": { + "expression": "if(!isNull({view.custom.query_params.site})\u0026\u0026!isNull({view.custom.query_params.view}),\r\n\treplace(stringFormat(\u0027%s Version History - \u0027,\r\n\t\t{view.custom.query_params.object_key}),\r\n\t\t\u0027SCADA/\u0027,\u0027\u0027)+\r\n\tif({view.custom.loading}, \u0027Loading...\u0027, stringFormat(\u0027%d Record(s)\u0027, len({view.custom.raw_data}))),\r\n\t\u0027Select View to view version history\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "params": { + "NavigationSettings": { + "BaseUrl": "/singleMP/main", + "Column": "mp_name", + "Enabled": false + }, + "SelectedRow": [], + "filters": [], + "header_order": [ + { + "field": "VersionId", + "title": "VERSION ID", + "visible": true + }, + { + "field": "LastModified", + "title": "LAST MODIFIED", + "visible": true + }, + { + "field": "Size", + "title": "SIZE (Bytes)", + "visible": true + }, + { + "field": "IsLatest", + "title": "IS LATEST?", + "visible": true + }, + { + "field": "Key", + "title": "OBJECT KEY", + "visible": true + }, + { + "field": "StorageClass", + "title": "STORAGE CLASS", + "visible": false + }, + { + "field": "ETag", + "title": "ETAG", + "visible": false + } + ] + }, + "path": "Objects/Templates/S3/Versions/Log_Table" + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "scripts": { + "customMethods": [ + { + "name": "refresh_version_table_data", + "params": [], + "script": "\tquery_params \u003d self.view.custom.query_params\n\tif query_params.bucket and query_params.site and query_params.view:\n\t\t# refresh the audit table query\n\t\tfrom AWS.s3 import S3Manager\n\t\t\n\t\tself.view.custom.loading \u003d True\n\t\tapi_stage \u003d \u0027prod\u0027\n\t\tusername \u003d self.session.props.auth.user.userName\n\t\tapi_region_name \u003d self.view.custom.api_region_name\n\t\ts3m \u003d S3Manager(api_stage, api_region_name, username)\n\t\t\n\t\tbucket \u003d self.view.custom.query_params.bucket\n\t\tobj_key \u003d self.view.custom.query_params.object_key\n\t\tresp \u003d s3m.list_object_versions(bucket, obj_key)\n\t\tself.view.custom.raw_data \u003d resp\n\t\tself.view.custom.loading \u003d False\n\telse:\n\t\tself.view.custom.raw_data \u003d []\n\t" + } + ], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "list_versions_query_params_changed", + "pageScope": false, + "script": "\t# update the `view.custom.query_params` object from received payload\n\tfrom helper.helper import sanitize_tree\n\td \u003d sanitize_tree(payload)\n\tdct \u003d sanitize_tree(self.view.custom.query_params)\n\tdct.update(d)\n\tself.view.custom.query_params \u003d dct\n\tif dct.get(\u0027bucket\u0027,None) and dct.get(\u0027site\u0027,None) and dct.get(\u0027view\u0027,None):\n\t\tself.refresh_version_table_data()\n\telse:\n\t\tself.view.custom.raw_data \u003d []\n\t", + "sessionScope": true, + "viewScope": true + }, + { + "messageType": "refresh_version_table_data", + "pageScope": false, + "script": "\t# implement your handler here\n\tself.refresh_version_table_data()\n\t", + "sessionScope": true, + "viewScope": true + } + ] + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Search/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/Search/resource.json new file mode 100644 index 0000000..5abc060 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Search/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "ankikarw", + "timestamp": "2024-04-01T21:09:43Z" + }, + "lastModificationSignature": "784a33c75ca0b03f25394bb67de37d3c93196d7415c424cc51592df62adb7fd3" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Search/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/Search/thumbnail.png new file mode 100644 index 0000000..39882b5 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/Search/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/Search/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/Search/view.json new file mode 100644 index 0000000..fd0f4f0 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/Search/view.json @@ -0,0 +1,371 @@ +{ + "custom": { + "activityLogger": { + "alt_pageid": "search", + "buttonid": "search", + "start_time": { + "$": [ + "ts", + 192, + 1710275608985 + ], + "$ts": 1710275608985 + } + } + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tbuttonid \u003d self.custom.activityLogger.buttonid\n\tself.custom.activityLogger.start_time \u003d system.date.now()\n\tactivityLog.productMetrics.callLogger(self, \u0027click\u0027, buttonid)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": {}, + "propConfig": { + "custom.activityLogger": { + "persistent": true + }, + "custom.activityLogger.pageid": { + "binding": { + "config": { + "expression": "{page.props.path}" + }, + "transforms": [ + { + "code": "\tif value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n\t\treturn self.custom.activityLogger.alt_pageid.lower()\n\telse:\n\t\treturn value[1:].lower()", + "type": "script" + } + ], + "type": "expr" + } + } + }, + "props": { + "defaultSize": { + "height": 294, + "width": 500 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "77px" + }, + "props": { + "style": { + "backgroundColor": "#555555", + "color": "#FFFFFF", + "fontWeight": "bold", + "textIndent": "15px" + }, + "text": "Search" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "30px" + }, + "props": { + "color": "#FFFFFF", + "path": "material/search" + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "45px" + }, + "props": { + "style": { + "backgroundColor": "#555555" + } + }, + "type": "ia.container.flex" + }, + { + "events": { + "component": { + "onRowDoubleClick": { + "config": { + "script": "\trow \u003d event.value\n\tsource_id \u003d row.get(\"SourceId\") \n\tconfig.project_config.source_id_lookup(self, source_id)\n\tsystem.perspective.closePopup(id \u003d \"Search\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Table" + }, + "position": { + "basis": "294px" + }, + "props": { + "cells": { + "style": { + "textIndent": "15px" + } + }, + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "SourceId", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": false, + "sort": "none", + "sortable": false, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 200 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Page", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "data": { + "$": [ + "ds", + 192, + 1710275544545 + ], + "$columns": [ + { + "data": [], + "name": "SourceId", + "type": "String" + }, + { + "data": [], + "name": "Page", + "type": "String" + } + ] + }, + "filter": { + "enabled": true, + "style": { + "backgroundColor": "#2B2B2B", + "color": "#FFFFFF" + } + }, + "headerStyle": { + "backgroundColor": "#2B2B2B", + "color": "#FFFFFF", + "textIndent": "15px" + }, + "pager": { + "style": { + "backgroundColor": "#2B2B2B", + "color": "#FFFFFF", + "fontWeight": "bold" + } + }, + "rows": { + "highlight": { + "color": "#FFFFFF" + }, + "style": { + "classes": "Background-Styles/Controller" + } + }, + "virtualized": false + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "search-devices", + "pageScope": true, + "script": "\tself.props.data \u003d payload.get(\"dataset\")", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.table" + } + ], + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tids \u003d config.project_config.global_project_page_ids\n\tdata \u003d []\n\tfor k,v in ids.items():\n\t items \u003d [str(k),str(v)]\n\t data.append(items)\n\theader \u003d [\"SourceId\", \"Page\"]\n\tdataset \u003d system.dataset.toDataSet(header, data)\n\tself.getChild(\"Table\").props.data \u003d dataset" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/UserInfo/resource.json b/com.inductiveautomation.perspective/views/PopUp-Views/UserInfo/resource.json new file mode 100644 index 0000000..6fa8788 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/UserInfo/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-03-31T15:17:07Z" + }, + "lastModificationSignature": "74b8cadcd9f38ec29b6043e00c2cb1981e47ffb86b860a774834c97a444a8991" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/UserInfo/thumbnail.png b/com.inductiveautomation.perspective/views/PopUp-Views/UserInfo/thumbnail.png new file mode 100644 index 0000000..7665d12 Binary files /dev/null and b/com.inductiveautomation.perspective/views/PopUp-Views/UserInfo/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/PopUp-Views/UserInfo/view.json b/com.inductiveautomation.perspective/views/PopUp-Views/UserInfo/view.json new file mode 100644 index 0000000..9a95243 --- /dev/null +++ b/com.inductiveautomation.perspective/views/PopUp-Views/UserInfo/view.json @@ -0,0 +1,138 @@ +{ + "custom": {}, + "params": { + "Message": { + "acceptPB": "value", + "cancelPB": "value", + "iconPath": "value", + "labelText": "value", + "okFunc": "value" + } + }, + "propConfig": { + "params.Message": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 251, + "width": 299 + } + }, + "root": { + "children": [ + { + "custom": { + "iD": "value" + }, + "meta": { + "name": "Button", + "visible": false + }, + "position": { + "height": 34, + "width": 80, + "x": 22, + "y": 203 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.Message.acceptPB" + }, + "type": "property" + } + } + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Button_0" + }, + "position": { + "height": 34, + "width": 80, + "x": 177, + "y": 203 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "if({this.props.text} \u003d \"hide\",false, true)" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.Message.cancelPB" + }, + "type": "property" + } + } + }, + "props": { + "primary": false + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "height": 146, + "width": 251, + "x": 22, + "y": 40 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.Message.labelText" + }, + "type": "property" + } + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Icon" + }, + "position": { + "height": 30, + "width": 30, + "x": 132.5, + "y": 10 + }, + "propConfig": { + "props.path": { + "binding": { + "config": { + "path": "view.params.Message.iconPath" + }, + "type": "property" + } + } + }, + "props": { + "color": "#EE5B5B" + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "root" + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/State-Views/State-Table/resource.json b/com.inductiveautomation.perspective/views/State-Views/State-Table/resource.json new file mode 100644 index 0000000..31467cf --- /dev/null +++ b/com.inductiveautomation.perspective/views/State-Views/State-Table/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-05-25T15:07:31Z" + }, + "lastModificationSignature": "69262600045d70be5f9f4f51bf6b16951f1fc7e6b72694a70ef31f9db5a57a82" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/State-Views/State-Table/thumbnail.png b/com.inductiveautomation.perspective/views/State-Views/State-Table/thumbnail.png new file mode 100644 index 0000000..1d8f5b7 Binary files /dev/null and b/com.inductiveautomation.perspective/views/State-Views/State-Table/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/State-Views/State-Table/view.json b/com.inductiveautomation.perspective/views/State-Views/State-Table/view.json new file mode 100644 index 0000000..5c8a4fc --- /dev/null +++ b/com.inductiveautomation.perspective/views/State-Views/State-Table/view.json @@ -0,0 +1,376 @@ +{ + "custom": {}, + "params": {}, + "props": {}, + "root": { + "children": [ + { + "custom": { + "delay": 2000, + "duration_filter": "value", + "run_update": true, + "source_id_filter": "value", + "state_filter": "value", + "time_from_filter": "value", + "time_to_filter": "value" + }, + "events": { + "component": { + "onRowClick": { + "config": { + "script": "\trow \u003d event.value\n\tmhe_id \u003d row.get(\"SourceId\")\n\tnavigation.amzl_navigation.navigate_to_alarm(self, mhe_id)\n\tsystem.perspective.alterDock(\"Docked-South\", { \"handleIcon\": \"material/play_arrow\" } )\n#\tsystem.perspective.openDock(\"Docked-South\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Table" + }, + "position": { + "basis": "400px" + }, + "propConfig": { + "custom.update": { + "binding": { + "config": { + "expression": "now({this.custom.delay})" + }, + "type": "expr" + }, + "onChange": { + "enabled": null, + "script": "\t\n empty_row \u003d row_builder.build_row(\n Duration \u003d \"\",\n Timestamp \u003d \"\",\n Source \u003d \"\")\n no_filter \u003d False\n \n if self.custom.run_update and system.tag.exists(\"System/state_messages\"):\n \n tags_to_read \u003d system.tag.readBlocking([\"System/state_messages\",\"Configuration/DetailedViews\"])\n decode_state_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n detailed_view_decoded \u003d system.util.jsonDecode(tags_to_read[1].value)\n if len(decode_state_data) \u003e 0:\n \n state_data \u003d state.state_tables.get_state_table(decode_state_data)\t\t\n self.props.data \u003d state_data\n else:\n self.props.data \u003d [empty_row]\n else:\n self.props.data \u003d [empty_row]" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "SourceId", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Duration", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY HH:mm:ss", + "editable": false, + "field": "TimeStamp", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "State", + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "data": [ + { + "style": null, + "value": { + "Duration": { + "value": "" + }, + "Source": { + "value": "" + }, + "Timestamp": { + "value": "" + } + } + } + ], + "headerStyle": { + "classes": "Background-Styles/Controller" + }, + "pager": { + "activePage": 4, + "bottom": false + }, + "selection": { + "data": [ + { + "style": null, + "value": { + "Duration": { + "value": "" + }, + "Source": { + "value": "" + }, + "Timestamp": { + "value": "" + } + } + } + ], + "selectedColumn": "SourceId", + "selectedRow": 0 + } + }, + "type": "ia.display.table" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControl/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControl/resource.json new file mode 100644 index 0000000..2bf87f0 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControl/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-07-03T14:31:43Z" + }, + "lastModificationSignature": "109e8535cc6b3fd0cd1cc7e8601b26765e6bb00a938f99792355ffa8f26dbd9d" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControl/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControl/thumbnail.png new file mode 100644 index 0000000..7fdedb5 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControl/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControl/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControl/view.json new file mode 100644 index 0000000..9851204 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControl/view.json @@ -0,0 +1,592 @@ +{ + "custom": {}, + "params": { + "tagProps": [ + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "params.tagProps": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 212, + "width": 336 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "60px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "backgroundColor": "#555555", + "borderBottomLeftRadius": 5, + "borderBottomRightRadius": 5, + "borderTopLeftRadius": 5, + "borderTopRightRadius": 5, + "marginLeft": 0, + "marginRight": 0, + "marginTop": 0 + }, + "textStyle": { + "textAlign": "start", + "textIndent": 10 + } + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "50px" + }, + "props": { + "style": { + "marginLeft": 10 + }, + "text": "AREA", + "textStyle": { + "fontFamily": "Roboto", + "fontSize": 12 + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "195px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}" + }, + "tagPath": "{0}/Config/cfg" + }, + "transforms": [ + { + "code": " decode \u003d system.util.jsonDecode(value)\n area \u003d decode.get(\"Area\")\n sub_area \u003d decode.get(\"SubArea\")\n area_label \u003d str(area) + \"/\" + str(sub_area)\n return area_label\n\t", + "type": "script" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "marginLeft": 50 + }, + "textStyle": { + "fontSize": 12 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "80px" + }, + "props": { + "style": { + "borderBottomColor": "#555555", + "borderBottomStyle": "solid", + "borderBottomWidth": 0.5, + "borderLeftColor": "#555555", + "borderLeftStyle": "none", + "borderLeftWidth": 0.5, + "borderRightColor": "#555555", + "borderRightStyle": "none", + "borderRightWidth": 0.5, + "borderTopColor": "#555555", + "borderTopStyle": "solid", + "borderTopWidth": 0.5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "50px" + }, + "props": { + "style": { + "marginLeft": 10 + }, + "text": "STATUS", + "textStyle": { + "fontFamily": "Roboto", + "fontSize": 12 + } + }, + "type": "ia.display.label" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tself.session.custom.covert \u003d False\n\tnavigation.navigate_to_page.detailed_view(self, self.view.params.tagProps[0],self.view.params.tagProps[0], self.view.params.tagProps[3])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Label" + }, + "position": { + "basis": "236px" + }, + "propConfig": { + "custom.status": { + "binding": { + "config": { + "path": "/root.custom.status" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "this.custom.status" + }, + "transforms": [ + { + "fallback": "State-Styles/State0", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "State-Styles/Background-Fill/State1" + }, + { + "input": 2, + "output": "State-Styles/Background-Fill/State2" + }, + { + "input": 3, + "output": "State-Styles/Background-Fill/State3" + }, + { + "input": 4, + "output": "State-Styles/Background-Fill/State4" + }, + { + "input": 5, + "output": "State-Styles/Background-Fill/State5" + }, + { + "input": 6, + "output": "State-Styles/Background-Fill/State6" + }, + { + "input": 0, + "output": "State-Styles/State0" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "this.custom.status" + }, + "transforms": [ + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 5, + "output": "HEALTHY" + }, + { + "input": 4, + "output": "DIAGNOSTIC" + }, + { + "input": 3, + "output": "PROCESS" + }, + { + "input": 2, + "output": "STOPPED" + }, + { + "input": 1, + "output": "FAULTED" + }, + { + "input": 6, + "output": null + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "borderBottomLeftRadius": 5, + "borderBottomRightRadius": 5, + "borderColor": "#555555", + "borderStyle": "solid", + "borderTopLeftRadius": 5, + "borderTopRightRadius": 5, + "borderWidth": 2, + "marginBottom": 10, + "marginLeft": 50, + "marginRight": 10, + "marginTop": 10 + }, + "textStyle": { + "fontSize": 12, + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "80px" + }, + "props": { + "style": { + "borderBottomColor": "#555555", + "borderBottomStyle": "solid", + "borderBottomWidth": 0.5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\ttags_to_read \u003d system.tag.readBlocking([\"Configuration/FC\"])\n\twhid \u003d tags_to_read[0].value\n\tcommandTarget\u003dself.view.params.tagProps[0]\n\tCommands.button_commands.send_request(whid, id, action)\n\tactionCode \u003d 1 #Start\n\tfunctionParameters\u003d{}\n\tfunctionParameters[\"commandTarget\"] \u003d commandTarget\n\tfunctionParameters[\"commandCode\"] \u003d actionCode\n\tfunctionParameters[\"commandParams\"] \u003d \"\"\n\tCommands.button_commands.send_request(whid,actionCode,functionParameters)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Start" + }, + "position": { + "basis": "80px" + }, + "props": { + "image": { + "height": 32, + "icon": { + "path": "material/not_started" + }, + "position": "top", + "width": 32 + }, + "style": { + "classes": "Background-Styles/Controller", + "marginBottom": 15, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 15 + }, + "text": "", + "textStyle": { + "fontSize": 12, + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\ttags_to_read \u003d system.tag.readBlocking([\"Configuration/FC\"])\n\twhid \u003d tags_to_read[0].value\n\tcommandTarget\u003dself.view.params.tagProps[0]\n\tCommands.button_commands.send_request(whid, id, action)\n\tactionCode \u003d 2 #Stop\n\tfunctionParameters\u003d{}\n\tfunctionParameters[\"commandTarget\"] \u003d commandTarget\n\tfunctionParameters[\"commandCode\"] \u003d actionCode\n\tfunctionParameters[\"commandParams\"] \u003d \"\"\n\tCommands.button_commands.send_request(whid,actionCode,functionParameters)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Stop" + }, + "position": { + "basis": "80px" + }, + "props": { + "image": { + "height": 32, + "icon": { + "path": "material/stop_circle" + }, + "position": "top", + "width": 32 + }, + "style": { + "classes": "Background-Styles/Controller", + "marginBottom": 15, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 15 + }, + "text": "", + "textStyle": { + "fontSize": 12, + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\ttags_to_read \u003d system.tag.readBlocking([\"Configuration/FC\"])\n\twhid \u003d tags_to_read[0].value\n\tcommandTarget\u003dself.view.params.tagProps[0]\n\tCommands.button_commands.send_request(whid, id, action)\n\tactionCode \u003d 3 #Reset\n\tfunctionParameters\u003d{}\n\tfunctionParameters[\"commandTarget\"] \u003d commandTarget\n\tfunctionParameters[\"commandCode\"] \u003d actionCode\n\tfunctionParameters[\"commandParams\"] \u003d \"\"\n\tCommands.button_commands.send_request(whid,actionCode,functionParameters)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Reset" + }, + "position": { + "basis": "80px" + }, + "props": { + "image": { + "height": 32, + "icon": { + "path": "material/refresh" + }, + "position": "top", + "width": 32 + }, + "style": { + "classes": "Background-Styles/Controller", + "marginBottom": 15, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 15 + }, + "text": "", + "textStyle": { + "fontSize": 12, + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "JAM_Reset" + }, + "position": { + "basis": "80px" + }, + "props": { + "enabled": false, + "image": { + "height": 32, + "icon": { + "path": "material/sync_problem" + }, + "position": "top", + "width": 32 + }, + "style": { + "classes": "Background-Styles/Controller", + "marginBottom": 15, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 15 + }, + "text": "", + "textStyle": { + "fontSize": 12, + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "333px" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_3" + }, + "position": { + "basis": "160px" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "propConfig": { + "custom.has_role": { + "binding": { + "config": { + "expression": "{session.custom.fc}" + }, + "transforms": [ + { + "code": "\trme_role \u003d value +\"-rme-all\"\n\troles \u003d (self.session.props.auth.user.roles)\n\tif (rme_role.lower() in roles \n\tor rme_role.upper() in roles):\n\t\treturn True\n\telse:\n\t\treturn False", + "type": "script" + } + ], + "type": "expr" + } + }, + "custom.status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "if(isNull({value}), 0, {value})", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "direction": "column", + "style": { + "animationFillMode": "both", + "borderBottomLeftRadius": 10, + "borderBottomRightRadius": 10, + "borderColor": "#555555", + "borderStyle": "solid", + "borderTopLeftRadius": 10, + "borderTopRightRadius": 10, + "borderWidth": 1, + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/resource.json new file mode 100644 index 0000000..0c76b7c --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-05-29T19:41:57Z" + }, + "lastModificationSignature": "8d6add803db1b8d4da51259b1b234901cfd395e9c0a00acc81a7c1c6abdec674" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/thumbnail.png new file mode 100644 index 0000000..1739b2a Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/view.json new file mode 100644 index 0000000..ef23621 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/view.json @@ -0,0 +1,431 @@ +{ + "custom": {}, + "params": { + "value": { + "tagProps": [ + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + } + }, + "propConfig": { + "params.value": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 50, + "width": 300 + } + }, + "root": { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\ttags_to_read \u003d system.tag.readBlocking([\"Configuration/FC\"])\n\twhid \u003d tags_to_read[0].value\n\tid \u003d self.view.params.value.tagProps[0]\n\tcommandTarget\u003dstr(id)+\"/0\"#PLC01/0 --\u003etarget is the plc\n\tcommandParams\u003d\"\"\n\tif whid\u003d\u003d\"MAN2\" or whid\u003d\u003d\"BRS1\" or whid\u003d\u003d\"MAD6\":\n\t\tcommandTarget\u003d\"databridge/0\"\n\t\tcommandParams\u003d\"PLC\u003d\"+str(id)#this tells the target to data bridge\n\taction \u003d 1\n\tparameters\u003d{\"commandTarget\":commandTarget,\n\t\t\t\t\"commandCode\":1,\n\t\t\t\t\"commandTimestamp\":system.date.toMillis(system.date.now()),\n\t\t\t\t\"commandParams\":commandParams}\n\tCommands.button_commands.send_request(whid, action, parameters)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Start", + "tooltip": { + "enabled": true, + "location": "top-left" + } + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027Start \u0027 + {view.params.value.tagProps[0]},\"Re-Authentication Required - Press \u0027Enable Controls\u0027 button and re-enter password\")" + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "expression": "{session.custom.command_auth.enabled} \u0026\u0026 {parent.custom.has_role}" + }, + "type": "expr" + } + }, + "props.image.icon.color": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027#4A4A4A\u0027,\u0027#979797\u0027)" + }, + "type": "expr" + } + }, + "props.style.borderStyle": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "path": "material/not_started" + }, + "position": "top", + "width": 32 + }, + "style": { + "backgroundColor": "#D4D4D4", + "borderColor": "#4A4A4A", + "borderWidth": 2, + "classes": "\n", + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + }, + "text": "", + "textStyle": { + "fontSize": 12, + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\ttags_to_read \u003d system.tag.readBlocking([\"Configuration/FC\"])\n\twhid \u003d tags_to_read[0].value\n\tid \u003d self.view.params.value.tagProps[0]\n\tcommandTarget\u003dstr(id)+\"/0\"#PLC01/0 --\u003etarget is the plc\n\tcommandParams\u003d\"\"\n\tif whid\u003d\u003d\"MAN2\" or whid\u003d\u003d\"BRS1\" or whid\u003d\u003d\"MAD6\":\n\t\tcommandTarget\u003d\"databridge/0\"\n\t\tcommandParams\u003d\"PLC\u003d\"+str(id)#this tells the target to data bridge\n\taction \u003d 3\n\tparameters\u003d{\"commandTarget\":commandTarget,\n\t\t\t\t\"commandCode\":3,\n\t\t\t\t\"commandTimestamp\":system.date.toMillis(system.date.now()),\n\t\t\t\t\"commandParams\":commandParams}\n\tCommands.button_commands.send_request(whid, action, parameters)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Reset", + "tooltip": { + "enabled": true, + "location": "top-left" + } + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027Reset \u0027 + {view.params.value.tagProps[0]},\"Re-Authentication Required - Press \u0027Enable Controls\u0027 button and re-enter password\") " + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "expression": "{session.custom.command_auth.enabled} \u0026\u0026 {parent.custom.has_role}" + }, + "type": "expr" + } + }, + "props.image.icon.color": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027#4A4A4A\u0027,\u0027#979797\u0027)" + }, + "type": "expr" + } + }, + "props.style.borderStyle": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "path": "material/refresh" + }, + "position": "top", + "width": 32 + }, + "style": { + "backgroundColor": "#D4D4D4", + "borderColor": "#4A4A4A", + "borderWidth": 2, + "classes": "\n", + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + }, + "text": "", + "textStyle": { + "fontSize": 12, + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "JAM_Reset", + "tooltip": { + "enabled": true, + "location": "top-left" + } + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027Jam Reset \u0027 + {view.params.value.tagProps[0]},\"Re-Authentication Required - Press \u0027Enable Controls\u0027 button and re-enter password\")" + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "expression": "{session.custom.command_auth.enabled} \u0026\u0026 {parent.custom.has_role}" + }, + "type": "expr" + } + }, + "props.image.icon.color": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027#4A4A4A\u0027,\u0027#979797\u0027)" + }, + "type": "expr" + } + }, + "props.style.borderStyle": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "path": "material/sync_problem" + }, + "position": "top", + "width": 32 + }, + "style": { + "backgroundColor": "#D4D4D4", + "borderColor": "#4A4A4A", + "borderWidth": 2, + "classes": "\n", + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + }, + "text": "", + "textStyle": { + "fontSize": 12, + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\ttags_to_read \u003d system.tag.readBlocking([\"Configuration/FC\"])\n\twhid \u003d tags_to_read[0].value\n\tid \u003d self.view.params.value.tagProps[0]\n\tcommandTarget\u003dstr(id)+\"/0\"#PLC01/0 --\u003etarget is the plc\n\tcommandParams\u003d\"\"\n\tif whid\u003d\u003d\"MAN2\" or whid\u003d\u003d\"BRS1\" or whid\u003d\u003d\"MAD6\":\n\t\tcommandTarget\u003d\"databridge/0\"\n\t\tcommandParams\u003d\"PLC\u003d\"+str(id)#this tells the target to data bridge\n\taction \u003d 2\n\tparameters\u003d{\"commandTarget\":commandTarget,\n\t\t\t\t\"commandCode\":2,\n\t\t\t\t\"commandTimestamp\":system.date.toMillis(system.date.now()),\n\t\t\t\t\"commandParams\":commandParams}\n\tCommands.button_commands.send_request(whid, action, parameters)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Stop", + "tooltip": { + "enabled": true, + "location": "top-left" + } + }, + "position": { + "basis": "80px" + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027Stop \u0027 + {view.params.value.tagProps[0]},\"Re-Authentication Required - Press \u0027Enable Controls\u0027 button and re-enter password\") " + }, + "type": "expr" + } + }, + "props.enabled": { + "binding": { + "config": { + "expression": "{session.custom.command_auth.enabled} \u0026\u0026 {parent.custom.has_role}" + }, + "type": "expr" + } + }, + "props.image.icon.color": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027#4A4A4A\u0027,\u0027#979797\u0027)" + }, + "type": "expr" + } + }, + "props.style.borderStyle": { + "binding": { + "config": { + "expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)" + }, + "type": "expr" + } + } + }, + "props": { + "image": { + "height": 32, + "icon": { + "path": "material/stop_circle" + }, + "position": "top", + "width": 32 + }, + "style": { + "backgroundColor": "#D4D4D4", + "borderColor": "#4A4A4A", + "borderWidth": 2, + "classes": "\n", + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + }, + "text": "", + "textStyle": { + "fontSize": 12, + "fontWeight": "bold", + "textAlign": "center" + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "root" + }, + "propConfig": { + "custom.has_role": { + "binding": { + "config": { + "expression": "{session.custom.fc}" + }, + "transforms": [ + { + "code": "\trme_role \u003d value +\"-rme-c2c-all\"\n\troles \u003d (self.session.props.auth.user.roles)\n\tif (rme_role.lower() in roles \n\tor rme_role.upper() in roles \n\tor \"eurme-ignition-admins\" in roles):\n\t\treturn True\n\telse:\n\t\treturn False", + "type": "script" + } + ], + "type": "expr" + } + }, + "custom.status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "if(isNull({value}), 0, {value})", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlAlarms/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlAlarms/resource.json new file mode 100644 index 0000000..b2e38c9 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlAlarms/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-07-03T14:31:43Z" + }, + "lastModificationSignature": "467f7ec7ceda1379e989bf4e45f6544160299c54a308dcfc57bd909b82c6e7c2" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlAlarms/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlAlarms/thumbnail.png new file mode 100644 index 0000000..f9f3846 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlAlarms/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlAlarms/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlAlarms/view.json new file mode 100644 index 0000000..c03ab77 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlAlarms/view.json @@ -0,0 +1,367 @@ +{ + "custom": { + "counts": { + "Critical": 0, + "Diagnostic": 0, + "High": 0, + "Low": 0, + "Medium": 0, + "Total": 0 + } + }, + "params": { + "value": { + "tagProps": [ + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + } + }, + "propConfig": { + "custom.counts": { + "binding": { + "config": { + "struct": { + "PLC": "{view.params.value.tagProps[0]}", + "device_count": "tag(\u0027[\u0027+ {session.custom.fc} +\u0027_SCADA_TAG_PROVIDER]System/device_count\u0027)" + }, + "waitOnAll": true + }, + "transforms": [ + { + "code": "\tcount_dict \u003d system.util.jsonDecode(value.device_count)\n\tvalues \u003d count_dict.get(value.PLC)\n\tif values !\u003d None:\n\t\tvalues[\u0027Total\u0027] \u003d values[\u0027Critical\u0027] + values[\u0027High\u0027] + values[\u0027Medium\u0027] + values[\u0027Low\u0027] + values[\u0027Diagnostic\u0027]\n\t\treturn values\n\telse:\n\t\treturn {\"Critical\":0,\"High\":0,\"Medium\":0,\"Low\":0,\"Diagnostic\":0, \"Total\":0}", + "type": "script" + } + ], + "type": "expr-struct" + }, + "persistent": true + }, + "params.value": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 50, + "width": 300 + } + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "textAlign": "center" + }, + "text": "High" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "textAlign": "center" + }, + "text": "Med" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "textAlign": "center" + }, + "text": "Low" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "textAlign": "center" + }, + "text": "Diag" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_4" + }, + "position": { + "basis": "32px" + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "textAlign": "center" + }, + "text": "Total" + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "25px" + }, + "props": { + "justify": "space-between" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "32px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.custom.counts.High" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "32px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.custom.counts.Medium" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "32px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.custom.counts.Low" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "32px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.custom.counts.Diagnostic" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "textAlign": "center" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_4" + }, + "position": { + "basis": "32px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.custom.counts.Total" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "25px" + }, + "props": { + "justify": "space-between" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "propConfig": { + "custom.has_role": { + "binding": { + "config": { + "expression": "{session.custom.fc}" + }, + "transforms": [ + { + "code": "\trme_role \u003d value +\"-rme-all\"\n\troles \u003d (self.session.props.auth.user.roles)\n\tif (rme_role.lower() in roles \n\tor rme_role.upper() in roles):\n\t\treturn True\n\telse:\n\t\treturn False", + "type": "script" + } + ], + "type": "expr" + } + }, + "custom.status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "if(isNull({value}), 0, {value})", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlStatus/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlStatus/resource.json new file mode 100644 index 0000000..8cf2faa --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlStatus/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "hrtste", + "timestamp": "2023-07-10T13:53:10Z" + }, + "lastModificationSignature": "604429b2c9763ce01cf379a55e79df5ef605b3944f6f10d8e88e0e8e10398180" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlStatus/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlStatus/thumbnail.png new file mode 100644 index 0000000..72d1c16 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlStatus/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlStatus/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlStatus/view.json new file mode 100644 index 0000000..1e5a023 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlStatus/view.json @@ -0,0 +1,249 @@ +{ + "custom": {}, + "params": { + "value": { + "tagProps": [ + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + } + }, + "propConfig": { + "params.value": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 50, + "width": 300 + } + }, + "root": { + "children": [ + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tnavigation.navigate_to_page.detailed_view(self, self.view.params.value.tagProps[0],self.view.params.value.tagProps[0], self.view.params.value.tagProps[3])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Label" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "custom.status": { + "binding": { + "config": { + "path": "/root.custom.status" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "this.custom.status" + }, + "transforms": [ + { + "fallback": "State-Styles/State0", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "State-Styles/Background-Fill/State1" + }, + { + "input": 2, + "output": "State-Styles/Background-Fill/State2" + }, + { + "input": 3, + "output": "State-Styles/Background-Fill/State3" + }, + { + "input": 4, + "output": "State-Styles/Background-Fill/State4" + }, + { + "input": 5, + "output": "State-Styles/Background-Fill/State5" + }, + { + "input": 6, + "output": "State-Styles/Background-Fill/State6" + }, + { + "input": 0, + "output": "State-Styles/State0" + } + ], + "outputType": "style-list", + "type": "map" + }, + { + "expression": "if({session.custom.colours.colour_impaired},{value}+\u0027_Alt\u0027,{value})", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "this.custom.status" + }, + "transforms": [ + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 5, + "output": "HEALTHY" + }, + { + "input": 4, + "output": "DIAGNOSTIC" + }, + { + "input": 3, + "output": "PROCESS DEGRADED" + }, + { + "input": 2, + "output": "STOPPED" + }, + { + "input": 1, + "output": "FAULTED" + }, + { + "input": 6, + "output": null + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "borderColor": "#555555", + "borderStyle": "none", + "cursor": "pointer", + "marginBottom": 8, + "marginTop": 8 + }, + "textStyle": { + "fontSize": 12, + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "root" + }, + "propConfig": { + "custom.has_role": { + "binding": { + "config": { + "expression": "{session.custom.fc}" + }, + "transforms": [ + { + "code": "\trme_role \u003d value +\"-rme-all\"\n\troles \u003d (self.session.props.auth.user.roles)\n\tif (rme_role.lower() in roles \n\tor rme_role.upper() in roles):\n\t\treturn True\n\telse:\n\t\treturn False", + "type": "script" + } + ], + "type": "expr" + } + }, + "custom.status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.value.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "if(isNull({value}), 0, {value})", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "custom.tag_path_to_lookup": { + "binding": { + "config": { + "expression": " \"[\\\"\" + {view.params.value.tagProps[0]} + \"\\\"]\"" + }, + "type": "expr" + } + } + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControlCabinet/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControlCabinet/resource.json new file mode 100644 index 0000000..fdba397 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControlCabinet/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "whealja@amazon.co.uk", + "timestamp": "2022-08-24T09:52:18Z" + }, + "lastModificationSignature": "e5327eea9c46bd28be37b64dc573d805ff93914918e20315096394deacfb1b83" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControlCabinet/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControlCabinet/thumbnail.png new file mode 100644 index 0000000..b14d22e Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControlCabinet/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControlCabinet/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControlCabinet/view.json new file mode 100644 index 0000000..2aa006e --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControlCabinet/view.json @@ -0,0 +1,273 @@ +{ + "custom": {}, + "params": { + "Display": "value", + "status": null, + "tagProps": [ + "F01", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "params.Display": { + "paramDirection": "input", + "persistent": true + }, + "params.status": { + "binding": { + "config": { + "path": "/root/FlexContainer_1/PLC_Status.props.status" + }, + "type": "property" + }, + "paramDirection": "output", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 110, + "width": 200 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Filler" + }, + "position": { + "basis": "5px", + "shrink": 0 + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "32px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.tagProps[3]" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "fontFamily": "Helvetica", + "fontSize": 15, + "fontStyle": "italic", + "fontWeight": "bold", + "textAlign": "center", + "textTransform": "uppercase" + } + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "meta": { + "name": "Filler" + }, + "position": { + "basis": "5px", + "grow": 1 + }, + "type": "ia.display.label" + }, + { + "events": { + "dom": { + "onDoubleClick": { + "config": { + "script": "\tnavigation.navigate_to_page.detailed_view(self, self.view.params.tagProps[0],self.view.params.tagProps[0], self.view.params.tagProps[3])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "PLC_Status" + }, + "position": { + "basis": "150px" + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "path": "view.params.Display" + }, + "type": "property" + } + }, + "props.status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}" + }, + "tagPath": "{0}/Expressions/Status" + }, + "type": "tag" + }, + "onChange": { + "enabled": null, + "script": "\tpayload \u003d {}\n\tpayload[\"status\"] \u003d self.props.status\n\tsystem.perspective.sendMessage(\"update-controller-status\", payload \u003d payload, scope \u003d \"view\")" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "this.props.status" + }, + "transforms": [ + { + "fallback": "State-Styles/State0", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "State-Styles/Background-Fill/State1" + }, + { + "input": 2, + "output": "State-Styles/Background-Fill/State2" + }, + { + "input": 3, + "output": "State-Styles/Background-Fill/State3" + }, + { + "input": 4, + "output": "State-Styles/Background-Fill/State4" + }, + { + "input": 5, + "output": "State-Styles/Background-Fill/State5" + }, + { + "input": 6, + "output": "State-Styles/Background-Fill/State6" + }, + { + "input": 0, + "output": "State-Styles/State0" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "alignItems": "center", + "borderBottomLeftRadius": 5, + "borderBottomRightRadius": 5, + "borderStyle": "solid", + "borderStyleTop": "groove", + "borderTopLeftRadius": 5, + "borderTopRightRadius": 5, + "borderWidth": "0.5px", + "fontFamily": "Arial", + "fontSize": "22px", + "fontWeight": "bolder" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Filler_0" + }, + "position": { + "basis": "5px", + "grow": 1 + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "40px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "1px", + "shrink": 0 + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "root" + }, + "propConfig": { + "custom.pageId": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}" + }, + "tagPath": "{0}/Parameters.PageId" + }, + "type": "tag" + } + } + }, + "props": { + "direction": "column", + "style": { + "backgroundColor": "#AAAAAA", + "borderColor": "#A6A3A3", + "borderStyle": "ridge" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/resource.json new file mode 100644 index 0000000..fa67a50 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-08-22T08:42:25Z" + }, + "lastModificationSignature": "50d6c09c2b96eafcd70b5393a5430b7187d339ed5a25761f64d7b68d9727a6b4" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/thumbnail.png new file mode 100644 index 0000000..da58939 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/view.json new file mode 100644 index 0000000..0759166 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/view.json @@ -0,0 +1,897 @@ +{ + "custom": {}, + "params": { + "Counts": { + "Diag": 0, + "High": 0, + "Low": 0, + "Medium": 0 + }, + "Status": "", + "tagProps": [ + "PLC03", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "params.Counts": { + "paramDirection": "input", + "persistent": true + }, + "params.Status": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 212, + "width": 336 + }, + "key": "value" + }, + "root": { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "400px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "type": "property" + } + } + }, + "props": { + "textStyle": { + "textIndent": "10px" + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "JAM", + "tooltip": { + "enabled": true, + "text": "Jams" + } + }, + "position": { + "basis": "24px", + "shrink": 0 + }, + "props": { + "path": "Symbol-Views/Equipment-Views/JAM", + "style": { + "marginRight": "5px" + } + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "10px", + "grow": 1 + }, + "props": { + "style": { + "marginRight": "10px" + }, + "text": 0, + "textStyle": { + "textAlign": "end" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "60px" + }, + "props": { + "style": { + "backgroundColor": "#555555", + "key": "value" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "50px" + }, + "props": { + "style": { + "marginLeft": 10 + }, + "text": "AREA", + "textStyle": { + "fontFamily": "Roboto", + "fontSize": 12 + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "195px" + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "/root.custom.area_display" + }, + "type": "property" + } + } + }, + "props": { + "style": { + "marginLeft": 50 + }, + "textStyle": { + "fontSize": 12 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "80px" + }, + "props": { + "style": { + "borderBottomColor": "#555555", + "borderBottomStyle": "solid", + "borderBottomWidth": 0.5, + "borderLeftColor": "#555555", + "borderLeftStyle": "none", + "borderLeftWidth": 0.5, + "borderRightColor": "#555555", + "borderRightStyle": "none", + "borderRightWidth": 0.5, + "borderTopColor": "#555555", + "borderTopStyle": "solid", + "borderTopWidth": 0.5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "50px" + }, + "props": { + "style": { + "marginLeft": 10 + }, + "text": "STATUS", + "textStyle": { + "fontFamily": "Roboto", + "fontSize": 12 + } + }, + "type": "ia.display.label" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tself.session.custom.covert\u003d False\n\tnavigation.navigate_to_page.detailed_view(self, self.view.params.tagProps[0],self.view.params.tagProps[0], self.view.params.tagProps[3])" + }, + "enabled": false, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Label" + }, + "position": { + "basis": "236px" + }, + "propConfig": { + "custom.status": { + "binding": { + "config": { + "path": "/root.custom.status" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "this.custom.status" + }, + "transforms": [ + { + "fallback": "State-Styles/State0", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "State-Styles/Background-Fill/State1" + }, + { + "input": 2, + "output": "State-Styles/Background-Fill/State2" + }, + { + "input": 3, + "output": "State-Styles/Background-Fill/State3" + }, + { + "input": 4, + "output": "State-Styles/Background-Fill/State4" + }, + { + "input": 5, + "output": "State-Styles/Background-Fill/State5" + }, + { + "input": 6, + "output": "State-Styles/Background-Fill/State6" + }, + { + "input": 0, + "output": "State-Styles/State0" + } + ], + "outputType": "style-list", + "type": "map" + }, + { + "expression": "if({session.custom.colours.colour_impaired},{value}+\u0027_Alt\u0027,{value})", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "path": "this.custom.status" + }, + "transforms": [ + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 5, + "output": "HEALTHY" + }, + { + "input": 4, + "output": "DIAGNOSTIC" + }, + { + "input": 3, + "output": "PROCESS DEGRADED" + }, + { + "input": 2, + "output": "STOPPED" + }, + { + "input": 1, + "output": "FAULTED" + }, + { + "input": 6, + "output": null + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "borderBottomLeftRadius": 5, + "borderBottomRightRadius": 5, + "borderColor": "#555555", + "borderStyle": "solid", + "borderTopLeftRadius": 5, + "borderTopRightRadius": 5, + "borderWidth": 2, + "marginBottom": 10, + "marginLeft": 50, + "marginRight": 10, + "marginTop": 10 + }, + "textStyle": { + "fontSize": 12, + "textAlign": "center" + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "80px" + }, + "props": { + "style": { + "borderBottomColor": "#555555", + "borderBottomStyle": "solid", + "borderBottomWidth": 0.5 + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "25px" + }, + "props": { + "path": "material/notifications_active", + "style": { + "marginLeft": 10 + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "100px" + }, + "props": { + "style": { + "marginLeft": 10 + }, + "text": "ACTIVE ALARMS", + "textStyle": { + "fontFamily": "Roboto", + "fontSize": 12 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_3" + }, + "position": { + "basis": "80px" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": "High", + "textStyle": { + "fontSize": 10 + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": "Medium", + "textStyle": { + "fontSize": 10 + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": "Low", + "textStyle": { + "fontSize": 10 + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": "Diag", + "textStyle": { + "fontSize": 10 + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_4" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": "Total", + "textStyle": { + "fontSize": 10 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "200px" + }, + "props": { + "justify": "space-between" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Label_0" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": 0, + "textStyle": { + "fontSize": 10, + "textAlign": "center" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-alarm-count", + "pageScope": false, + "script": "\thigh \u003d payload.get(\"High\",0)\n\tself.props.text \u003d high", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": 0, + "textStyle": { + "fontSize": 10, + "textAlign": "center" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-alarm-count", + "pageScope": false, + "script": "\tmedium \u003d payload.get(\"Medium\",0)\n\tself.props.text \u003d medium", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_2" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": 0, + "textStyle": { + "fontSize": 10, + "textAlign": "center" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-alarm-count", + "pageScope": false, + "script": "\tlow \u003d payload.get(\"Low\",0)\n\tself.props.text \u003d low", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_3" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": 0, + "textStyle": { + "fontSize": 10, + "textAlign": "center" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-alarm-count", + "pageScope": false, + "script": "\tdiag \u003d payload.get(\"Diagnostic\",0)\n\tself.props.text \u003d diag", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Label_4" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": 0, + "textStyle": { + "fontSize": 10, + "textAlign": "center" + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-alarm-count", + "pageScope": false, + "script": "\tcritical \u003d payload.get(\"Critical\",0)\n\thigh \u003d payload.get(\"High\",0)\n\tmed \u003d payload.get(\"Medium\",0)\n\tlow \u003d payload.get(\"Low\",0)\n\tdiag \u003d payload.get(\"Diagnostic\",0)\n\t\n\ttotal \u003d critical + high + med + low + diag\n\tself.props.text \u003d total\n\t", + "sessionScope": false, + "viewScope": true + } + ] + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "200px" + }, + "props": { + "justify": "space-between" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "334px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_2" + }, + "position": { + "basis": "80px" + }, + "props": { + "style": { + "marginBottom": 5, + "marginLeft": 10, + "marginRight": 10 + } + }, + "type": "ia.container.flex" + } + ], + "custom": { + "counts": { + "Critical": 0 + } + }, + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tself.session.custom.covert\u003d False\n\twhid \u003d self.session.custom.fc\n\tsession_id \u003d self.session.props.id\n\tpage_id \u003d \"Detailed-View: \" + self.view.params.tagProps[0]\n\tCommands.analytics.send_page_details(whid, session_id, page_id)\n\tnavigation.navigate_to_page.detailed_view(self, self.view.params.tagProps[0],self.view.params.tagProps[0], self.view.params.tagProps[3])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root" + }, + "propConfig": { + "custom.Total": { + "binding": { + "config": { + "expression": "{view.params.Counts.High} + {view.params.Counts.Medium} + {view.params.Counts.Low} + {view.params.Counts.Diag}" + }, + "type": "expr" + } + }, + "custom.area": { + "binding": { + "config": { + "expression": "jsonGet({this.custom.plc_dict}, \"Area\")" + }, + "type": "expr" + } + }, + "custom.area_display": { + "binding": { + "config": { + "expression": "if(len({this.custom.sub_area})\u003e0,\r\nconcat({this.custom.area} + \"/\" + {this.custom.sub_area}),\r\n{this.custom.area})" + }, + "type": "expr" + } + }, + "custom.counts": { + "onChange": { + "enabled": null, + "script": "\tsystem.perspective.sendMessage(\"update-alarm-count\", self.custom.counts, \"view\")" + } + }, + "custom.counts.Diagnostic": { + "binding": { + "config": { + "path": "view.params.Counts.Diag" + }, + "type": "property" + } + }, + "custom.counts.High": { + "binding": { + "config": { + "path": "view.params.Counts.High" + }, + "type": "property" + } + }, + "custom.counts.Low": { + "binding": { + "config": { + "path": "view.params.Counts.Low" + }, + "type": "property" + } + }, + "custom.counts.Medium": { + "binding": { + "config": { + "path": "view.params.Counts.Medium" + }, + "type": "property" + } + }, + "custom.plc_dict": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" + }, + "transforms": [ + { + "expression": "jsonGet({value}, {view.params.tagProps[0]})", + "type": "expression" + } + ], + "type": "tag" + } + }, + "custom.provider": { + "binding": { + "config": { + "expression": "\"[\"+{session.custom.fc}+\"_SCADA_TAG_PROVIDER]\"" + }, + "type": "expr" + } + }, + "custom.status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "if(isNull({value}), 0, {value})", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "custom.sub_area": { + "binding": { + "config": { + "expression": "jsonGet({this.custom.plc_dict}, \"SubArea\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "expression": "if({session.custom.covert} \u003d False \u0026\u0026 {this.custom.status} \u003d 5, False, True)" + }, + "type": "expr" + } + } + }, + "props": { + "direction": "column", + "style": { + "animationFillMode": "both", + "borderBottomLeftRadius": 10, + "borderBottomRightRadius": 10, + "borderColor": "#555555", + "borderStyle": "solid", + "borderTopLeftRadius": 10, + "borderTopRightRadius": 10, + "borderWidth": 1, + "box-shadow": "5px 5px 5px grey", + "classes": "Background-Styles/Controller", + "cursor": "pointer" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus/resource.json new file mode 100644 index 0000000..71eb240 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "whealja@amazon.co.uk", + "timestamp": "2022-08-02T14:31:43Z" + }, + "lastModificationSignature": "b39e1dca7d6cae2896d78bf1222da0163466c07908a56c0d2d5eb616905ad237" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus/thumbnail.png new file mode 100644 index 0000000..6ddabce Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus/view.json new file mode 100644 index 0000000..4f60c4b --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus/view.json @@ -0,0 +1,280 @@ +{ + "custom": {}, + "params": { + "tagProps": [ + "PLC15/OPC/inAlarms0", + "1_Profinet node fault", + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + }, + "params.tagProps[0]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[1]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[2]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[3]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[4]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[5]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[6]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[7]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[8]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[9]": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 40, + "width": 40 + }, + "styles": "value" + }, + "root": { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "264px" + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "if({parent.custom.state}\u003d1||{parent.custom.covert_mode}||{parent.custom.isMatch}\u003e0,true,false)" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "{parent.custom.ref_state}" + }, + "overlayOptOut": true, + "transforms": [ + { + "fallback": "State-Styles/State106", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "State-Styles/State0" + }, + { + "input": 1, + "output": "State-Styles/State1" + }, + { + "input": 2, + "output": "State-Styles/State2" + }, + { + "input": 3, + "output": "State-Styles/State3" + }, + { + "input": 4, + "output": "State-Styles/State4" + }, + { + "input": 5, + "output": "State-Styles/State5" + }, + { + "input": 6, + "output": "State-Styles/State6" + }, + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "path": "material/place" + }, + "type": "ia.display.icon" + } + ], + "events": { + "dom": { + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"DevicePopUP\", \"PopUp-Views/Device/Information-Device\", params \u003d{\"tagProps\":tagProps},resizable \u003d 1)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root" + }, + "propConfig": { + "custom.alarm_active": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "1": "{view.params.tagProps[1]}" + }, + "tagPath": "{0}/Alarms/{1}.IsActive" + }, + "type": "tag" + } + }, + "custom.alarm_priority_int": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "1": "{view.params.tagProps[1]}" + }, + "tagPath": "{0}/Alarms/{1}.Priority" + }, + "transforms": [ + { + "expression": "case({value},\n\"Critical\",1,\n\"High\",1,\n\"Medium\",2,\n\"Low\",3,\n\"Diagnostic\",4,0)", + "type": "expression" + } + ], + "type": "tag" + } + }, + "custom.alarm_shelved": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "1": "{view.params.tagProps[1]}" + }, + "tagPath": "{0}/Alarms/{1}.IsShelved" + }, + "type": "tag" + } + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "session.custom.covert" + }, + "type": "property" + } + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({session.custom.deviceSearchId} \u003d {this.custom.search_path},1,0)" + }, + "type": "expr" + }, + "onChange": { + "enabled": null, + "script": "\tif currentValue.value \u003d\u003d 1:\n\t\tself.print(self.custom.search_path)\n\t\tself.session.custom.searchId \u003d \"\"" + }, + "persistent": false + }, + "custom.ref_state": { + "binding": { + "config": { + "expression": "if({this.custom.state}\u003d1 \u0026\u0026 {this.custom.isMatch}\u003d1,{this.custom.alarm_priority_int} + 100,\nif({this.custom.state}\u003d1 \u0026\u0026 {this.custom.isMatch}\u003d0,{this.custom.alarm_priority_int},\nif({this.custom.state}\u003d0 \u0026\u0026 {this.custom.isMatch}\u003d1,105,5)))" + }, + "type": "expr" + } + }, + "custom.search_path": { + "binding": { + "config": { + "expression": "{view.params.tagProps[0]}+\"/\"+{view.params.tagProps[1]}" + }, + "type": "expr" + } + }, + "custom.state": { + "binding": { + "config": { + "expression": "if({this.custom.alarm_shelved},0,\nif({this.custom.alarm_active},1,0))" + }, + "type": "expr" + } + } + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus_old/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus_old/resource.json new file mode 100644 index 0000000..47f3b0b --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus_old/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-01-24T19:38:36Z" + }, + "lastModificationSignature": "eae60c9243ae8b21289741e0102bcc8fc0675be38d5b9bd273616d7bb367acc0" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus_old/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus_old/thumbnail.png new file mode 100644 index 0000000..6e09c62 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus_old/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus_old/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus_old/view.json new file mode 100644 index 0000000..4e694c2 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus_old/view.json @@ -0,0 +1,262 @@ +{ + "custom": {}, + "params": { + "tagProps": [ + "\"\"", + 1, + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + }, + "params.tagProps[0]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[1]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[2]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[3]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[4]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[5]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[6]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[7]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[8]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[9]": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 40, + "width": 40 + }, + "styles": "value" + }, + "root": { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "264px" + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "if({parent.custom.state}\u003d1||{parent.custom.covert_mode}||{parent.custom.isMatch}\u003e0,true,false)" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "{parent.custom.ref_state}" + }, + "overlayOptOut": true, + "transforms": [ + { + "fallback": "EmergencyStop-Styles/EstopDeactivated", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "State-Styles/State1" + }, + { + "input": 2, + "output": "State-Styles/State2" + }, + { + "input": 3, + "output": "State-Styles/State3" + }, + { + "input": 4, + "output": "State-Styles/State4" + }, + { + "input": 5, + "output": "State-Styles/State5" + }, + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "path": "material/location_on" + }, + "type": "ia.display.icon" + } + ], + "events": { + "dom": { + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"DevicePopUP\", \"PopUp-Views/Device/Information-Device\", params \u003d{\"tagProps\":tagProps},resizable \u003d 1)\n\tsystem.perspective.print(tagProps)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root" + }, + "propConfig": { + "custom.alarmId": { + "binding": { + "config": { + "path": "session.custom.deviceSearchId" + }, + "type": "property" + } + }, + "custom.bit_position": { + "binding": { + "config": { + "path": "view.params.tagProps[1]" + }, + "type": "property" + } + }, + "custom.bit_value": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}" + }, + "tagPath": "{0}" + }, + "type": "tag" + } + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "session.custom.covert" + }, + "type": "property" + } + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({this.custom.alarmId} \u003d {this.custom.search_path},1,0)" + }, + "type": "expr" + }, + "onChange": { + "enabled": null, + "script": "\tif currentValue.value \u003d\u003d 1:\n\t\tself.session.custom.searchId \u003d \"\"" + } + }, + "custom.priority": { + "binding": { + "config": { + "expression": "{view.params.tagProps[0]}" + }, + "transforms": [ + { + "code": "\tif \"AlarmCritical\" in value:\n\t\treturn 1\n\telif \"AlarmHigh\" in value:\n\t\treturn 1\n\telif \"AlarmMedium\" in value:\n\t\treturn 2\n\telif \"AlarmLow\" in value:\n\t\treturn 3\n\telif \"AlarmInfo\" in value:\n\t\treturn 4\n\telse:\n\t\treturn 5", + "type": "script" + } + ], + "type": "expr" + } + }, + "custom.ref_state": { + "binding": { + "config": { + "expression": "if({this.custom.state}\u003d1 \u0026\u0026 {this.custom.isMatch} \u003d 1,{this.custom.priority}+100,\nif({this.custom.state}\u003d1 \u0026\u0026 {this.custom.isMatch} \u003d 0,{this.custom.priority},\nif({this.custom.state}\u003d0 \u0026\u0026 {this.custom.isMatch} \u003d 1,{this.custom.priority}+100,5)))\n\n" + }, + "type": "expr" + } + }, + "custom.search_path": { + "binding": { + "config": { + "expression": "{view.params.tagProps[0]}+\"/\"+{view.params.tagProps[1]}" + }, + "type": "expr" + } + }, + "custom.state": { + "binding": { + "config": { + "expression": "getBit({this.custom.bit_value},{this.custom.bit_position})" + }, + "type": "expr" + } + } + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/Estop/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/Estop/resource.json new file mode 100644 index 0000000..d7a577f --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/Estop/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-02-21T17:18:20Z" + }, + "lastModificationSignature": "e61a352416c49ad59f6fdc4d2b3ab7bcce23bc50bd435f37d817c1fb02ea617f" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/Estop/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/Estop/thumbnail.png new file mode 100644 index 0000000..6e09c62 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/Estop/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/Estop/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/Estop/view.json new file mode 100644 index 0000000..82ad1aa --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/Estop/view.json @@ -0,0 +1,227 @@ +{ + "custom": {}, + "params": { + "tagProps": [ + "", + "", + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + }, + "params.tagProps[0]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[1]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[2]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[3]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[4]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[5]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[6]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[7]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[8]": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps[9]": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 40, + "width": 40 + }, + "styles": "value" + }, + "root": { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "basis": "264px" + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "if({parent.custom.state}\u003d1||{parent.custom.covert_mode}||{parent.custom.isMatch}\u003e0,true,false)" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "{parent.custom.ref_state}" + }, + "overlayOptOut": true, + "transforms": [ + { + "fallback": "EmergencyStop-Styles/EstopDeactivated", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "EmergencyStop-Styles/EstopDeactivated" + }, + { + "input": 1, + "output": "EmergencyStop-Styles/EstopActivated" + }, + { + "input": 101, + "output": "EmergencyStop-Styles/EstopActivated101" + }, + { + "input": 100, + "output": "EmergencyStop-Styles/EstopDeactivated100" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "path": "material/lens" + }, + "type": "ia.display.icon" + } + ], + "custom": { + "status": "value" + }, + "events": { + "dom": { + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"DevicePopUP\", \"PopUp-Views/Device/Information-Device\", params \u003d{\"tagProps\":tagProps},resizable \u003d 1)\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root" + }, + "propConfig": { + "custom.alarm_active": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "1": "{view.params.tagProps[1]}" + }, + "tagPath": "{0}/Alarms/{1}.IsActive" + }, + "type": "tag" + } + }, + "custom.alarm_shelved": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "1": "{view.params.tagProps[1]}" + }, + "tagPath": "{0}/Alarms/{1}.IsShelved" + }, + "type": "tag" + } + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "session.custom.covert" + }, + "type": "property" + } + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({session.custom.deviceSearchId} \u003d {this.custom.search_path},1,0)" + }, + "type": "expr" + }, + "onChange": { + "enabled": null, + "script": "\tif currentValue.value \u003d\u003d 1:\n\t\tself.print(self.custom.search_path)\n\t\tself.session.custom.searchId \u003d \"\"" + }, + "persistent": false + }, + "custom.ref_state": { + "binding": { + "config": { + "expression": "if({this.custom.state}\u003d1 \u0026\u0026 {this.custom.isMatch}\u003d1,101,\nif({this.custom.state}\u003d1 \u0026\u0026 {this.custom.isMatch}\u003d0,1,\nif({this.custom.state}\u003d0 \u0026\u0026 {this.custom.isMatch}\u003d1,100,0)))" + }, + "type": "expr" + } + }, + "custom.search_path": { + "binding": { + "config": { + "expression": "{view.params.tagProps[0]}+\"/\"+{view.params.tagProps[1]}" + }, + "type": "expr" + } + }, + "custom.state": { + "binding": { + "config": { + "expression": "if({this.custom.alarm_shelved}\u003dTrue,0,\nif({this.custom.alarm_active}\u003dTrue,1,0))" + }, + "type": "expr" + } + } + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ARSAW/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ARSAW/resource.json new file mode 100644 index 0000000..b3f91cf --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ARSAW/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "17a70fb4569e236f5764bcd5fc2d75cff0c4223bdc6f8367e74d4a2b420eec59" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ARSAW/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ARSAW/thumbnail.png new file mode 100644 index 0000000..f718d6b Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ARSAW/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ARSAW/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ARSAW/view.json new file mode 100644 index 0000000..82b52a1 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ARSAW/view.json @@ -0,0 +1,537 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running_status": 0, + "searchId": "value", + "state": 5, + "state_string": "Unknown" + }, + "params": { + "directionLeft": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))\n\n" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.directionLeft": { + "paramDirection": "input", + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "ARSAW" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "m 25,50.5 a 25,25 0 0 1 -25,-25 25,25 0 0 1 25,-25 25,25 0 0 1 25,25 25,25 0 0 1 -25,25 z", + "fill": {}, + "name": "Circle", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "M 8.3000002,34.740002 H 31.04 v 4.26 H 8.3000002 Z M 26.77,12 h 4.260001 V 34.74 H 26.77 Z M 16.110001,12 H 24.64 v 17.049999 h -8.529999 z m 17.059997,0 h 8.53 v 17.049999 h -8.53 z", + "fill": { + "paint": "#000000" + }, + "name": "ARSAW", + "type": "path" + } + ], + "style": {}, + "viewBox": "-0.5 -0.5 51 52" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/AUS/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/AUS/resource.json new file mode 100644 index 0000000..c2b48b3 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/AUS/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "b9f4c908ee155467b3b761426213fee5d78df47d4383d4fe792dd2ef30e536c7" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/AUS/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/AUS/thumbnail.png new file mode 100644 index 0000000..c8dc790 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/AUS/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/AUS/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/AUS/view.json new file mode 100644 index 0000000..7c241de --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/AUS/view.json @@ -0,0 +1,608 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "running_status": 0, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "AUS" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[1].elements[0].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "cx": "69.035934", + "cy": "129.08073", + "fill": {}, + "id": "path509", + "name": "path509", + "rx": "9.5693493", + "ry": "9.4979048", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": 1 + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "ellipse" + }, + { + "d": "m 64.008851,131.72656 2.143125,-5.29166 h 0.833438 l 2.129896,5.29166 h -0.833438 l -0.502708,-1.30968 h -2.434167 l -0.502708,1.30968 z m 1.600729,-1.9976 h 1.905 l -0.926041,-2.4474 h -0.05292 z m 4.590521,1.9976 v -0.82021 l 3.082396,-3.78354 h -2.844271 v -0.68791 h 3.598334 v 0.83343 l -3.055938,3.77032 h 3.082396 v 0.68791 z m -2.169583,-6.6675 1.27,-1.27 1.27,1.27 z m 1.27,9.31334 -1.27,-1.27 h 2.54 z", + "id": "path6803", + "name": "path6803", + "stroke": { + "width": "0.264583" + }, + "type": "path" + } + ], + "id": "g2552", + "name": "g2552", + "stroke": { + "dasharray": "none", + "width": 1 + }, + "type": "group" + } + ], + "id": "layer1", + "name": "layer1", + "transform": "translate(-58.814035,-118.93028)", + "type": "group" + } + ], + "style": {}, + "viewBox": "0 0 20.443798 20.300909" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Camera/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Camera/resource.json new file mode 100644 index 0000000..d100892 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Camera/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "05c05854aae590a0ccbe36411d973667f65e8f75dfa800df84701aeccd06f2b1" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Camera/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Camera/thumbnail.png new file mode 100644 index 0000000..67faf6d Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Camera/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Camera/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Camera/view.json new file mode 100644 index 0000000..14a2b6c --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Camera/view.json @@ -0,0 +1,727 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running_status": 4, + "searchId": "value", + "state": 5, + "state_string": "Unknown", + "tag_path_to_lookup": "[\"value\"]" + }, + "params": { + "directionLeft": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "expression": "coalesce(try(jsonGet(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),\"state\"),null),{view.params.forceRunningStatus},4)" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.tag_path_to_lookup": { + "binding": { + "config": { + "expression": "\"[\\\"\" + {view.params.tagProps[0]} + \"\\\"]\"" + }, + "type": "expr" + }, + "persistent": true + }, + "params.directionLeft": { + "paramDirection": "input", + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 25, + "width": 40 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Camera" + }, + "position": { + "height": 1, + "width": 1, + "x": 0.0015, + "y": 0.0004 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "!{view.params.directionLeft}" + }, + "type": "expr" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "M 0,0 H 39 V 24 H 0 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "M 34,17 26,12 34,7 Z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "M 9.7399998,7 H 25 V 17 H 9.7399998 Z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 5,7 h 3 v 5 H 5 Z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + } + ], + "style": {}, + "viewBox": "-0.5 -0.5 40 25" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Camera_Left" + }, + "position": { + "height": 1, + "width": 1, + "x": 0.0015, + "y": 0.0004 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "{view.params.directionLeft}" + }, + "type": "expr" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "M 0,0 H 39 V 24 H 0 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 31,7 h 3 v 5 h -3 z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "M 13.74,7 H 29 V 17 H 13.74 Z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 5.556602,17 8,-5 -8,-5 z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + } + ], + "style": {}, + "viewBox": "-0.5 -0.5 40 25" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "40:25", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/CognexCamera/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/CognexCamera/resource.json new file mode 100644 index 0000000..d100892 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/CognexCamera/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "05c05854aae590a0ccbe36411d973667f65e8f75dfa800df84701aeccd06f2b1" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/CognexCamera/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/CognexCamera/thumbnail.png new file mode 100644 index 0000000..67faf6d Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/CognexCamera/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/CognexCamera/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/CognexCamera/view.json new file mode 100644 index 0000000..14a2b6c --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/CognexCamera/view.json @@ -0,0 +1,727 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running_status": 4, + "searchId": "value", + "state": 5, + "state_string": "Unknown", + "tag_path_to_lookup": "[\"value\"]" + }, + "params": { + "directionLeft": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "expression": "coalesce(try(jsonGet(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),\"state\"),null),{view.params.forceRunningStatus},4)" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.tag_path_to_lookup": { + "binding": { + "config": { + "expression": "\"[\\\"\" + {view.params.tagProps[0]} + \"\\\"]\"" + }, + "type": "expr" + }, + "persistent": true + }, + "params.directionLeft": { + "paramDirection": "input", + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 25, + "width": 40 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Camera" + }, + "position": { + "height": 1, + "width": 1, + "x": 0.0015, + "y": 0.0004 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "!{view.params.directionLeft}" + }, + "type": "expr" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "M 0,0 H 39 V 24 H 0 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "M 34,17 26,12 34,7 Z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "M 9.7399998,7 H 25 V 17 H 9.7399998 Z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 5,7 h 3 v 5 H 5 Z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + } + ], + "style": {}, + "viewBox": "-0.5 -0.5 40 25" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Camera_Left" + }, + "position": { + "height": 1, + "width": 1, + "x": 0.0015, + "y": 0.0004 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "{view.params.directionLeft}" + }, + "type": "expr" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "M 0,0 H 39 V 24 H 0 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 31,7 h 3 v 5 h -3 z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "M 13.74,7 H 29 V 17 H 13.74 Z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 5.556602,17 8,-5 -8,-5 z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + } + ], + "style": {}, + "viewBox": "-0.5 -0.5 40 25" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "40:25", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/resource.json new file mode 100644 index 0000000..3a1b636 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "a4846f973618cb5367365a666cd66c4731a8fe9982fd49195072d091c4d45859" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/thumbnail.png new file mode 100644 index 0000000..2536462 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/view.json new file mode 100644 index 0000000..c0e179f --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/view.json @@ -0,0 +1,551 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running_status": 0, + "searchId": "value", + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "has_state": false, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_gateways},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm}||{session.custom.alarm_filter.show_gateways},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic}||{session.custom.alarm_filter.show_gateways},\r\n\t\t5, {session.custom.alarm_filter.show_gateways},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.has_state": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 47, + "width": 68 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "ControlCabinet" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "M 0 40 L 0 0 L 61 40 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#4c4c4c", + "width": 4 + }, + "transform": "rotate(-180,30.5,20)", + "type": "path" + }, + { + "d": "M 0 40 L 0 0 L 61 40 Z", + "fill": { + "paint": "#4C4C4C" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 4 + }, + "type": "path" + } + ], + "preserveAspectRatio": "none", + "style": {}, + "viewBox": "-0.5 -0.5 62 41" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "view.custom.display_icon" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "68:47", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Estop/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Estop/resource.json new file mode 100644 index 0000000..8919e90 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Estop/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "e949d5a7bb5ce75a53742f6c15b7979087dbb689582de3aafcc4704b0a7a98e3" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Estop/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Estop/thumbnail.png new file mode 100644 index 0000000..f32fa3b Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Estop/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Estop/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Estop/view.json new file mode 100644 index 0000000..9c7decd --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Estop/view.json @@ -0,0 +1,525 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "searchId": "value", + "state": 5 + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "this.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))\n" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 25, + "width": 25 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Estop", + "tooltip": { + "style": { + "fontSize": 16 + } + } + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[0].fill.paint": { + "binding": { + "config": { + "expression": "\u0027#AAAAAA\u0027" + }, + "transforms": [ + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "expr" + } + }, + "props.elements[1].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state1},\r\n3,{session.custom.colours.state1},\r\n4,{session.custom.colours.state1},\r\n{session.custom.colours.state5}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "M 0,0 H 20 V 20 H 0 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1.5 + }, + "type": "path" + }, + { + "d": "m 17,10.5 a 7,7 0 0 1 -7,7 7,7 0 0 1 -7,-7 7,7 0 0 1 7,-7 7,7 0 0 1 7,7 z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + } + ], + "style": {}, + "viewBox": "0 0 20 20" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "view.custom.display_icon" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/GoodsLift/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/GoodsLift/resource.json new file mode 100644 index 0000000..cbcd7cc --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/GoodsLift/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "1435fe6375e679351a81033e23eecea8c8c61f1dba121ca430c0de7f01a22c45" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/GoodsLift/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/GoodsLift/thumbnail.png new file mode 100644 index 0000000..6abef4e Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/GoodsLift/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/GoodsLift/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/GoodsLift/view.json new file mode 100644 index 0000000..6331de9 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/GoodsLift/view.json @@ -0,0 +1,627 @@ +{ + "custom": { + "FillColour": "value", + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "running_status": 0, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.FillColour": { + "persistent": true + }, + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))\n" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Goods_Lift" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[1].elements[0].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "cx": "69.035934", + "cy": "129.08073", + "fill": {}, + "id": "path509", + "name": "path509", + "rx": "9.5693493", + "ry": "9.4979048", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": 0.5 + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "ellipse" + }, + { + "d": "m 67.713019,128.18115 1.322917,-0.66146 1.322917,0.66146 v -3.06917 h -2.645834 z m -1.322916,3.54542 v -1.05833 h 2.645833 v 1.05833 z m -1.322918,2.11667 q -0.3175,0 -0.555625,-0.23812 -0.238125,-0.23813 -0.238125,-0.55563 v -7.93751 q 0,-0.3175 0.238125,-0.55562 0.238125,-0.23813 0.555625,-0.23813 h 7.937499 q 0.3175,0 0.55563,0.23813 0.23812,0.23812 0.23812,0.55562 v 7.93751 q 0,0.3175 -0.23812,0.55563 -0.23813,0.23812 -0.55563,0.23812 z m 0,-8.73126 v 7.93751 z m 0,7.93751 h 7.937499 v -7.93751 h -1.852081 v 4.3524 l -2.116667,-1.05834 -2.116666,1.05834 v -4.3524 h -1.852085 z", + "id": "path132", + "name": "path132", + "stroke": { + "dasharray": "none", + "width": 0 + }, + "type": "path" + }, + { + "d": "m 66.429788,123.74768 -0.568854,-0.56885 3.175,-3.175 3.175,3.16177 -0.568855,0.56885 -2.606145,-2.60614 z", + "id": "path2154", + "name": "path2154", + "stroke": { + "width": 0.264583 + }, + "type": "path" + }, + { + "d": "m 71.642074,134.41379 0.56886,0.56885 -3.175,3.175 -3.175,-3.16177 0.56885,-0.56885 2.60615,2.60614 z", + "id": "path2154-5", + "name": "path2154-5", + "stroke": { + "width": 0.264583 + }, + "type": "path" + } + ], + "id": "g2552", + "name": "g2552", + "type": "group" + } + ], + "id": "layer1", + "name": "layer1", + "transform": "translate(-58.814035,-118.93028)", + "type": "group" + } + ], + "style": {}, + "viewBox": "0 0 20.443798 20.300909" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/JAM/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/JAM/resource.json new file mode 100644 index 0000000..8a812f9 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/JAM/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-08-01T07:52:07Z" + }, + "lastModificationSignature": "c49cb5db74f2e34614dd236f4b0306b6b55d998a425b7dd56ac5cd36b29fac9d" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/JAM/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/JAM/thumbnail.png new file mode 100644 index 0000000..9ace1cc Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/JAM/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/JAM/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/JAM/view.json new file mode 100644 index 0000000..fd3376e --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/JAM/view.json @@ -0,0 +1,76 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 24, + "width": 24 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "troubleshoot_white_24dp" + }, + "position": { + "height": 1, + "width": 1 + }, + "props": { + "elements": [ + { + "elements": [ + { + "fill": { + "paint": "transparent" + }, + "height": "24", + "name": "rect", + "type": "rect", + "width": "24" + } + ], + "name": "group", + "type": "group" + }, + { + "elements": [ + { + "elements": [ + { + "d": "M22,20.59l-4.69-4.69C18.37,14.55,19,12.85,19,11c0-4.42-3.58-8-8-8c-4.08,0-7.44,3.05-7.93,7h2.02C5.57,7.17,8.03,5,11,5 c3.31,0,6,2.69,6,6s-2.69,6-6,6c-2.42,0-4.5-1.44-5.45-3.5H3.4C4.45,16.69,7.46,19,11,19c1.85,0,3.55-0.63,4.9-1.69L20.59,22 L22,20.59z", + "name": "path", + "type": "path" + }, + { + "name": "polygon", + "points": "8.43,9.69 9.65,15 11.29,15 12.55,11.22 13.5,13.5 15.5,13.5 15.5,12 14.5,12 13.25,9 11.71,9 10.59,12.37 9.35,7 7.7,7 6.45,11 1,11 1,12.5 7.55,12.5", + "type": "polygon" + } + ], + "name": "group", + "type": "group" + } + ], + "name": "group", + "type": "group" + } + ], + "fill": { + "paint": "#FFFFFF" + }, + "viewBox": "0 0 24 24" + }, + "type": "ia.shapes.svg" + } + ], + "meta": { + "name": "root" + }, + "props": { + "mode": "percent" + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Kobukuro/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Kobukuro/resource.json new file mode 100644 index 0000000..48ce4a1 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Kobukuro/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "hrtste", + "timestamp": "2024-04-16T08:26:22Z" + }, + "lastModificationSignature": "5b429796b30bdd69c32e9fb638d65e343f7ff3ce4ec839b995d2eabc8a1ff206" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Kobukuro/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Kobukuro/thumbnail.png new file mode 100644 index 0000000..474f8d6 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Kobukuro/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Kobukuro/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Kobukuro/view.json new file mode 100644 index 0000000..459bb13 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Kobukuro/view.json @@ -0,0 +1,1021 @@ +{ + "custom": { + "FillColour": "value", + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "running_status": 0, + "searchId": "PLC01", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.FillColour": { + "persistent": true + }, + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "KPS_Symbol" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[10].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[11].elements[0].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[11].elements[1].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[11].elements[2].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[4].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[4].elements[1].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[5].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[6].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\n{view.custom.state} + 100 + {view.custom.isMatch},\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "d": "M 2.5706316,14.829176 A 8.6886292,8.8029537 0 0 1 3.7045976,2.4348857 8.6886292,8.8029537 0 0 1 15.938255,3.5801235 8.6886292,8.8029537 0 0 1 14.811492,15.975088 8.6886292,8.8029537 0 0 1 2.5771713,14.837148", + "fill": {}, + "id": "path392", + "name": "path392", + "stroke": { + "dasharray": "none", + "miterlimit": "4", + "paint": "#000000", + "width": "0.301" + }, + "type": "path" + }, + { + "d": "m 9.5390129,4.6864138 v 4.054911", + "fill": { + "paint": "#ffffff" + }, + "id": "path5019", + "name": "path5019", + "stroke": { + "width": "0.995" + }, + "style": { + "InkscapeStroke": "none", + "color": "#000000" + }, + "type": "path" + }, + { + "d": "M 9.4725388,4.3208071 V 10.203752", + "fill": { + "paint": "#ffffff" + }, + "id": "path5287", + "name": "path5287", + "stroke": { + "width": "0.264583" + }, + "style": { + "InkscapeStroke": "none", + "color": "#000000" + }, + "type": "path" + }, + { + "elements": [ + { + "d": "m 3.5355633,13.180222 a 1.7980549,1.7980549 0 0 1 0.2346668,-2.531606 1.7980549,1.7980549 0 0 1 2.5316754,0.233921 1.7980549,1.7980549 0 0 1 -0.2331762,2.531744 1.7980549,1.7980549 0 0 1 -2.5318126,-0.23243", + "fill": { + "opacity": "1" + }, + "id": "path5410", + "name": "path5410", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.264583" + }, + "type": "path" + }, + { + "d": "m 4.4777183,12.373384 a 0.50880533,0.50880533 0 0 1 0.066405,-0.716383 0.50880533,0.50880533 0 0 1 0.7164019,0.06619 0.50880533,0.50880533 0 0 1 -0.065983,0.716422 0.50880533,0.50880533 0 0 1 -0.7164408,-0.06577", + "fill": { + "opacity": "1" + }, + "id": "path5410-5", + "name": "path5410-5", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.264583" + }, + "type": "path" + } + ], + "id": "g5618", + "name": "g5618", + "transform": "translate(-0.53179165,0.03323698)", + "type": "group" + }, + { + "d": "M 4.2949151,5.1775781 A 0.50880533,0.50880533 0 0 1 4.3613201,4.4611957 0.50880533,0.50880533 0 0 1 5.0777219,4.5273898 0.50880533,0.50880533 0 0 1 5.0117388,5.2438111 0.50880533,0.50880533 0 0 1 4.2952981,5.1780389", + "fill": { + "opacity": "1" + }, + "id": "path5410-5-0", + "name": "path5410-5-0", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.264583" + }, + "type": "path" + }, + { + "d": "m 12.182905,4.9268147 a 0.81870443,0.81870443 0 0 1 0.106851,-1.1527109 0.81870443,0.81870443 0 0 1 1.152742,0.106511 0.81870443,0.81870443 0 0 1 -0.106172,1.1527735 0.81870443,0.81870443 0 0 1 -1.152804,-0.1058322", + "fill": { + "opacity": "1" + }, + "id": "path5410-5-0-4", + "name": "path5410-5-0-4", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.264583" + }, + "type": "path" + }, + { + "d": "M 6.1038118,11.509128 4.1664144,4.9099388", + "fill": { + "opacity": "1", + "paint": "#ffffff" + }, + "id": "path5480", + "name": "path5480", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.226268" + }, + "type": "path" + }, + { + "d": "M 15.295408,12.27744 13.587526,4.1416262", + "fill": { + "opacity": "1", + "paint": "#ffffff" + }, + "id": "path5480-7", + "name": "path5480-7", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.235884" + }, + "type": "path" + }, + { + "d": "M 4.754402,4.3462292 12.628538,3.5974087", + "fill": { + "opacity": "1", + "paint": "#ffffff" + }, + "id": "path5482", + "name": "path5482", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.271714" + }, + "type": "path" + }, + { + "fill": { + "opacity": 1 + }, + "height": "0.96387237", + "id": "rect5506", + "name": "rect5506", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.264583" + }, + "transform": "rotate(-17.383769)", + "type": "rect", + "width": "9.3728275", + "x": "1.5237854", + "y": "16.281492" + }, + { + "elements": [ + { + "elements": [ + { + "fill": { + "opacity": "1" + }, + "height": "4.0549111", + "id": "rect5508", + "name": "rect5508", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.264583" + }, + "type": "rect", + "width": "4.9855466", + "x": "6.6806326", + "y": "6.6806326" + }, + { + "elements": [ + { + "fill": { + "opacity": "1", + "paint": "#000000" + }, + "id": "tspan5562", + "name": "tspan5562", + "stroke": { + "dasharray": "none", + "width": "0.128701" + }, + "text": "K", + "type": "tspan", + "x": "7.4878073", + "y": "10.346892" + } + ], + "fill": { + "opacity": "1", + "paint": "#000000" + }, + "id": "text5564", + "name": "text5564", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.128701" + }, + "style": { + "fontSize": "3.94435px" + }, + "transform": "scale(1.029236,0.97159447)", + "type": "text", + "x": "7.4878073", + "y": "10.346892" + } + ], + "id": "g5623", + "name": "g5623", + "transform": "translate(0.26589582,0.03323698)", + "type": "group" + }, + { + "fill": { + "opacity": "1" + }, + "height": "0.69797659", + "id": "rect5625", + "name": "rect5625", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.264583" + }, + "type": "rect", + "width": "4.9855466", + "x": "6.9465284", + "y": "6.0158935" + }, + { + "fill": { + "opacity": "1" + }, + "height": "0.69797659", + "id": "rect5625-3", + "name": "rect5625-3", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.264583" + }, + "type": "rect", + "width": "4.9855466", + "x": "6.9465284", + "y": "10.718925" + } + ], + "id": "g5655", + "name": "g5655", + "type": "group" + } + ], + "style": {}, + "viewBox": "0 0 18.520832 18.520834" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Lift/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Lift/resource.json new file mode 100644 index 0000000..c7e6435 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Lift/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "hrtste", + "timestamp": "2024-04-16T08:26:26Z" + }, + "lastModificationSignature": "eba12a3de66eaf32e03589e56e998e806c8c3d42febd9a5b29d25bbc072d2de3" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Lift/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Lift/thumbnail.png new file mode 100644 index 0000000..d0564db Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Lift/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Lift/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Lift/view.json new file mode 100644 index 0000000..7097455 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Lift/view.json @@ -0,0 +1,687 @@ +{ + "custom": { + "FillColour": "value", + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "running_status": 0, + "searchId": "PLC01", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.FillColour": { + "persistent": true + }, + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "LIFT_Symbol" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[1].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[4].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[4].elements[1].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\n{view.custom.state} + 100 + {view.custom.isMatch},\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "d": "M 2.5706316,14.829176 A 8.6886292,8.8029537 0 0 1 3.7045976,2.4348857 8.6886292,8.8029537 0 0 1 15.938255,3.5801235 8.6886292,8.8029537 0 0 1 14.811492,15.975088 8.6886292,8.8029537 0 0 1 2.5771713,14.837148", + "fill": {}, + "id": "path392", + "name": "path392", + "stroke": { + "dasharray": "none", + "miterlimit": "4", + "paint": "#000000", + "width": "0.301" + }, + "type": "path" + }, + { + "d": "m 9.5390129,4.6864138 v 4.054911", + "fill": { + "paint": "#ffffff" + }, + "id": "path5019", + "name": "path5019", + "stroke": { + "width": "0.995" + }, + "style": { + "InkscapeStroke": "none", + "color": "#000000" + }, + "type": "path" + }, + { + "d": "M 9.4725388,4.3208071 V 10.203752", + "fill": { + "paint": "#ffffff" + }, + "id": "path5287", + "name": "path5287", + "stroke": { + "width": "0.264583" + }, + "style": { + "InkscapeStroke": "none", + "color": "#000000" + }, + "type": "path" + }, + { + "elements": [ + { + "d": "M 5.5505752,8.3092441 H 12.962422 L 9.2349587,2.4863396 Z", + "fill": { + "opacity": "1" + }, + "id": "path5305", + "name": "path5305", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.656167" + }, + "type": "path" + }, + { + "d": "M 5.5653282,10.042435 H 12.977175 L 9.2497117,15.865339 Z", + "fill": { + "opacity": "1" + }, + "id": "path5305-1", + "name": "path5305-1", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "miterlimit": "4", + "opacity": "1", + "paint": "#000000", + "width": "0.656167" + }, + "type": "path" + } + ], + "id": "g5310", + "name": "g5310", + "type": "group" + } + ], + "style": {}, + "viewBox": "0 0 18.520832 18.520834" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Light_Curtain/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Light_Curtain/resource.json new file mode 100644 index 0000000..6ac686e --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Light_Curtain/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "ebfbd6ad24e5c05258f2b0888638cee2c14da4a97c0eb6811bbdb28bac30bdc8" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Light_Curtain/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Light_Curtain/view.json new file mode 100644 index 0000000..fdef339 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Light_Curtain/view.json @@ -0,0 +1,497 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "searchId": "value", + "state": 5 + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "this.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)\r\n", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 10, + "width": 40 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Light_Curtain", + "tooltip": { + "style": { + "fontSize": 16 + } + } + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[0].fill.paint": { + "binding": { + "config": { + "expression": "\u0027#AAAAAA\u0027" + }, + "transforms": [ + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "expr" + } + }, + "props.elements[1].stroke.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state1},\r\n3,{session.custom.colours.state1},\r\n4,{session.custom.colours.state1},\r\n{session.custom.colours.state5}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "m 32.5,0 h 8 v 8 h -8 z m -32,0 h 8 v 8 h -8 z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 9,4 c 7.666668,0 15.333332,0 23,0", + "name": "path", + "stroke": { + "width": 3 + }, + "type": "path" + } + ], + "style": {}, + "viewBox": "-0.5 -0.5 42 9" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "view.custom.display_icon" + }, + "type": "property" + } + } + }, + "props": { + "aspectRatio": "40:10", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Main_Panel/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Main_Panel/resource.json new file mode 100644 index 0000000..141e8fe --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Main_Panel/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "9dc0111fef718853aaaa43830cee3d0574b280df73502b969989309f763ba80e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Main_Panel/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Main_Panel/thumbnail.png new file mode 100644 index 0000000..5752b0b Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Main_Panel/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Main_Panel/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Main_Panel/view.json new file mode 100644 index 0000000..5a387ea --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Main_Panel/view.json @@ -0,0 +1,522 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running_status": 0, + "searchId": "value", + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "has_state": false, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.has_state": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 40, + "width": 30 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Icon_0" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "color": "#000000", + "path": "material/offline_bolt", + "style": { + "borderColor": "#000000", + "borderStyle": "solid", + "borderWidth": "2px" + } + }, + "type": "ia.display.icon" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "40:60", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Network/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Network/resource.json new file mode 100644 index 0000000..1c2f7fe --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Network/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "2c29dd6ee8ccedcef288e97284e0820867d8585eb4477f0135d3881344b154cc" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Network/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Network/thumbnail.png new file mode 100644 index 0000000..529c16e Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Network/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Network/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Network/view.json new file mode 100644 index 0000000..99c639f --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Network/view.json @@ -0,0 +1,589 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running_status": 0, + "searchId": "value", + "state": 5, + "state_string": "Unknown" + }, + "params": { + "directionLeft": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.directionLeft": { + "paramDirection": "input", + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 25, + "width": 40 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Network" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "m 0,0 c 13.333333,0 26.666667,0 40,0 0,8.3333333 0,16.666667 0,25 C 26.666667,25 13.333333,25 0,25 0,16.666667 0,8.3333333 0,0 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 24,6 a 4,4 0 0 1 -4,4 4,4 0 0 1 -4,-4 4,4 0 0 1 4,-4 4,4 0 0 1 4,4 z m 4,12 h 8 v 5 h -8 z m -12,0 h 8 v 5 H 16 Z M 4,18 h 8 v 5 H 4 Z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 20,10 c 0,2.666667 0,5.333333 0,8", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 7.5,14 c 8.333333,0 16.666667,0 25,0", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 8,14 c 0,1.333333 0,2.666667 0,4", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 32,14 c 0,1.333333 0,2.666667 0,4", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + } + ], + "style": {}, + "viewBox": "-0.5 -0.5 41 26" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "40:25", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PPI/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PPI/resource.json new file mode 100644 index 0000000..fc810fd --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PPI/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "rolfed", + "timestamp": "2024-04-02T15:29:53Z" + }, + "lastModificationSignature": "967b6cd36636e63f666f6707ddceb1b622655566aff8d4b2637511142f05ddd0" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PPI/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PPI/thumbnail.png new file mode 100644 index 0000000..e2c3bc9 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PPI/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PPI/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PPI/view.json new file mode 100644 index 0000000..4e75888 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PPI/view.json @@ -0,0 +1,656 @@ +{ + "custom": { + "FillColour": "value", + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "running_status": 0, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.FillColour": { + "persistent": true + }, + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "PPI" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[1].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "id": "defs1", + "name": "defs1", + "type": "defs" + }, + { + "elements": [ + { + "cx": "6.6145835", + "cy": "6.6145835", + "fill": {}, + "id": "path1", + "name": "path1", + "r": "6.019948", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.264583" + }, + "type": "circle" + }, + { + "d": "m 2.1166666,8.5242134 h 3.175", + "fill": { + "paint": "transparent" + }, + "id": "path2", + "name": "path2", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.264583" + }, + "type": "path" + }, + { + "d": "M 7.9374999,8.5242134 H 11.112492", + "fill": { + "paint": "transparent" + }, + "id": "path3", + "name": "path3", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.264583" + }, + "type": "path" + }, + { + "d": "M 5.1593748,4.183724 V 8.4170573", + "fill": { + "paint": "transparent" + }, + "id": "path5", + "name": "path5", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.264583" + }, + "type": "path" + }, + { + "d": "m 8.2020833,4.1405926 h -3.175", + "fill": { + "paint": "transparent" + }, + "id": "path6", + "name": "path6", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.264583" + }, + "type": "path" + }, + { + "d": "M 8.0697914,4.183724 V 8.4170573", + "fill": { + "paint": "transparent" + }, + "id": "path7", + "name": "path7", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.264583" + }, + "type": "path" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "style": {}, + "viewBox": "0 0 13.229166 13.229167" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell2_Lift/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell2_Lift/resource.json new file mode 100644 index 0000000..441c6d2 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell2_Lift/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "rolfed", + "timestamp": "2024-04-02T15:29:53Z" + }, + "lastModificationSignature": "6322d531d5293a0d585b6691d01bbc43d93af0791f9dbdbe68c2babeeed9d8d4" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell2_Lift/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell2_Lift/thumbnail.png new file mode 100644 index 0000000..0a39122 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell2_Lift/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell2_Lift/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell2_Lift/view.json new file mode 100644 index 0000000..8ce7640 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell2_Lift/view.json @@ -0,0 +1,603 @@ +{ + "custom": { + "FillColour": "value", + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "running_status": 0, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.FillColour": { + "persistent": true + }, + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Photocell 2 (Lift)" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[1].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "id": "defs1", + "name": "defs1", + "type": "defs" + }, + { + "elements": [ + { + "d": "m 12.584327,-6.5 a 6.0843272,6.0843277 0 0 1 -3.0421635,5.2691824 6.0843272,6.0843277 0 0 1 -6.0843273,-1e-7 A 6.0843272,6.0843277 0 0 1 0.41567278,-6.5", + "fill": {}, + "id": "path1", + "name": "path1", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.264583" + }, + "transform": "scale(1,-1)", + "type": "path" + }, + { + "cx": "6.5", + "cy": "6.5", + "fill": { + "opacity": "1", + "paint": "#000000" + }, + "id": "path2", + "name": "path2", + "rx": "0.54629576", + "ry": "0.54629594", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.230325" + }, + "type": "ellipse" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "style": {}, + "viewBox": "0 0 13.229166 13.229167" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell_Lift/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell_Lift/resource.json new file mode 100644 index 0000000..9dd55ab --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell_Lift/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "rolfed", + "timestamp": "2024-04-02T15:29:53Z" + }, + "lastModificationSignature": "e8bd850aad252e5ca71f38f5ed26d48135bec62a55b40a20026fb43368185f32" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell_Lift/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell_Lift/thumbnail.png new file mode 100644 index 0000000..01020b0 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell_Lift/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell_Lift/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell_Lift/view.json new file mode 100644 index 0000000..1feb135 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Photocell_Lift/view.json @@ -0,0 +1,604 @@ +{ + "custom": { + "FillColour": "value", + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "running_status": 0, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.FillColour": { + "persistent": true + }, + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Photocell (Lift)" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[1].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 202, + "output": "State-Styles/State201" + }, + { + "input": 201, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "id": "defs1", + "name": "defs1", + "type": "defs" + }, + { + "elements": [ + { + "cx": "6.6145835", + "cy": "6.6145835", + "fill": {}, + "id": "path1", + "name": "path1", + "r": "6.0761814", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.264583" + }, + "type": "circle" + }, + { + "cx": "6.6145835", + "cy": "6.6145835", + "fill": { + "opacity": "1", + "paint": "#000000" + }, + "id": "path2", + "name": "path2", + "rx": "0.5251264", + "ry": "0.52512622", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.272664" + }, + "type": "ellipse" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "style": {}, + "viewBox": "0 0 13.229166 13.229167" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PinDetection/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PinDetection/resource.json new file mode 100644 index 0000000..a4a65c9 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PinDetection/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "rolfed", + "timestamp": "2024-04-02T15:29:53Z" + }, + "lastModificationSignature": "5555efbea4e47c321e7f6fb50ecd572a7f7bf0e31b0a8c5aaffc057667918ae1" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PinDetection/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PinDetection/thumbnail.png new file mode 100644 index 0000000..aee0c35 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PinDetection/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PinDetection/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PinDetection/view.json new file mode 100644 index 0000000..cdf5608 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PinDetection/view.json @@ -0,0 +1,614 @@ +{ + "custom": { + "FillColour": "value", + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "running_status": 0, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.FillColour": { + "persistent": true + }, + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Pin Detection" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[1].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "id": "defs1", + "name": "defs1", + "type": "defs" + }, + { + "elements": [ + { + "cx": "6.6145835", + "cy": "6.6145835", + "fill": {}, + "id": "path1", + "name": "path1", + "r": "6.0570302", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.264583" + }, + "type": "circle" + }, + { + "d": "M 1.4878915,9.8402065 9.8014876,1.4637334", + "fill": { + "paint": "transparent" + }, + "id": "path2", + "name": "path2", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.264726" + }, + "type": "path" + }, + { + "d": "M 3.5515604,11.84005 11.75248,3.4068377", + "fill": { + "paint": "transparent" + }, + "id": "path3", + "name": "path3", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.258089" + }, + "type": "path" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "style": {}, + "viewBox": "0 0 13.229166 13.229167" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Pointer/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Pointer/resource.json new file mode 100644 index 0000000..9d1e4ff --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Pointer/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "90144af50b50cbb62856deb3e176523b40f5215622d51e5e3f7072c2d9f8b60b" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Pointer/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Pointer/thumbnail.png new file mode 100644 index 0000000..e733f25 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Pointer/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Pointer/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Pointer/view.json new file mode 100644 index 0000000..b35c404 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Pointer/view.json @@ -0,0 +1,571 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "display_icon": true, + "error": false, + "isMatch": 0, + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown", + "visible_status": false + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + } + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {view.custom.isMatch}\u003e0,\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {view.custom.isMatch}\u003e0,\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.visible_status": { + "binding": { + "config": { + "expression": "{view.custom.state} !\u003d 5" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 79, + "width": 49 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "pointer_symbol_3" + }, + "propConfig": { + "props.elements[1].elements[0].elements[0].elements[1].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \n{session.custom.colours}[\"Fallback\"],\n{session.custom.colours}[\"state\"+{value}])", + "type": "expression" + } + ], + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "elements": [ + { + "d": "m 10.648338,6.5392075 c 0,2.2076808 -1.7019291,4.4141715 -3.90961,4.4141715 -2.2076807,0 -4.0851094,-2.2064908 -4.0851094,-4.4141715 -1e-7,-2.2076807 1.7896788,-3.9973596 3.9973595,-3.9973596 2.2076809,-2e-7 3.9973599,1.7896787 3.9973599,3.9973596 z", + "fill": { + "opacity": "1", + "paint": "transparent" + }, + "id": "path7858", + "name": "path7858", + "stroke": { + "dasharray": "none", + "opacity": "1", + "paint": "#000000", + "width": "0.523875" + }, + "style": { + "color": "#000000" + }, + "type": "path" + }, + { + "d": "m 6.6503906,0.5703125 c -3.2732983,0 -5.96874998,2.6954516 -5.96874998,5.96875 0,3.2732984 6.23199968,11.0143705 6.23199968,11.0143705 0,0 5.7055007,-7.7410721 5.7055007,-11.0143705 0,-3.2732984 -2.695452,-5.96875 -5.9687504,-5.96875 z m 0,3.9433594 c 1.1420587,0 2.0253907,0.883332 2.0253907,2.0253906 0,1.1420586 -0.883332,2.0253906 -2.0253907,2.0253906 C 5.508332,8.5644531 4.625,7.6811211 4.625,6.5390625 4.625,5.3970039 5.508332,4.5136719 6.6503906,4.5136719 Z", + "fill": { + "opacity": "1" + }, + "id": "path7860", + "name": "path7860", + "stroke": { + "dasharray": "none", + "opacity": "1", + "paint": "#000000", + "width": "0.523875" + }, + "style": { + "color": "#000000" + }, + "type": "path" + } + ], + "fill": { + "opacity": "1", + "paint": "transparent" + }, + "id": "path7854", + "name": "path7854", + "stroke": { + "dasharray": "none", + "opacity": "1", + "paint": "#000000", + "width": "0.523875" + }, + "type": "group" + } + ], + "id": "path4106", + "name": "path4106", + "type": "group" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "viewBox": "0 0 13.229166 18.520834" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.Fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if(isNull({view.custom.alarm_message}),\n\"Source Id: \" + {view.params.tagProps[0]} + \n\", Priority: \" + {view.custom.priority_string} + \n\", State: \" + {view.custom.state_string},\n\"Source Id: \" + {view.params.tagProps[0]} + \n\", Alarm: \" + {view.custom.alarm_message} +\n\", Priority: \" + {view.custom.priority_string} + \n\", State: \" + {view.custom.state_string})" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "view.custom.display_icon" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "justify": "center", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PressureSwitch/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PressureSwitch/resource.json new file mode 100644 index 0000000..39fefe2 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PressureSwitch/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "9146c180d45dd6e766cfe3d4456c7ebf3cd7ecdde7e22c2a2cb601d9e4247b91" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PressureSwitch/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PressureSwitch/thumbnail.png new file mode 100644 index 0000000..e3d6bcf Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PressureSwitch/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PressureSwitch/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PressureSwitch/view.json new file mode 100644 index 0000000..f28613d --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PressureSwitch/view.json @@ -0,0 +1,648 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running_status": 0, + "searchId": "value", + "state": 5, + "state_string": "Unknown" + }, + "params": { + "directionLeft": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.directionLeft": { + "paramDirection": "input", + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 25, + "width": 25 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "PressureSwitch_2" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[1].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "elements": [ + { + "elements": [ + { + "id": "stop1507", + "name": "stop1507", + "offset": "0", + "stopColor": "#020101", + "stopOpacity": "1", + "style": { + "stopColor": "#020101", + "stopOpacity": "1" + }, + "type": "stop" + } + ], + "id": "linearGradient1509", + "name": "linearGradient1509", + "type": "linearGradient" + }, + { + "gradientTransform": "matrix(1.0156665,0,0,0.98457489,-0.22712617,-0.22017344)", + "gradientUnits": "userSpaceOnUse", + "href": "#linearGradient1509", + "id": "linearGradient3055", + "name": "linearGradient3055", + "type": "linearGradient", + "x1": "2.4719212", + "x2": "5.6080947", + "y1": "4.8826461", + "y2": "4.8826461" + } + ], + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "fill": { + "opacity": 1 + }, + "height": "11.216189", + "id": "rect5779", + "name": "rect5779", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": 1.2 + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "rect", + "width": "11.21619", + "x": "7.7715612e-16", + "y": "0" + }, + { + "elements": [ + { + "fill": { + "opacity": "1", + "url": "url(#linearGradient3055)" + }, + "id": "tspan1453", + "name": "tspan1453", + "stroke": { + "dasharray": "none", + "width": "0.116835" + }, + "text": "P", + "type": "tspan", + "x": "0.99078566", + "y": "9.0214157" + } + ], + "fill": { + "opacity": "1", + "url": "url(#linearGradient3055)" + }, + "id": "text1455", + "name": "text1455", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": "0.116835" + }, + "style": { + "InkscapeFontSpecification": "\u0027Arial Narrow, Normal\u0027", + "fontFamily": "\u0027Arial Narrow\u0027", + "fontSize": "9.7785px", + "paintOrder": "stroke fill markers" + }, + "text": "P", + "transform": "scale(0.98457515,1.0156665)", + "type": "text", + "x": "0.99078566", + "y": "9.0214157" + }, + { + "d": "M 7.1327097,2.9635882 9.9122555,5.8103519 6.9937326,8.2419488", + "fill": { + "opacity": "0.0131332", + "paint": "#020101" + }, + "id": "path3213", + "name": "path3213", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": "0.663625" + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "path" + } + ], + "id": "layer1", + "name": "layer1", + "transform": "translate(0.22362278,0.22362278)", + "type": "group" + } + ], + "preserveAspectRatio": "none", + "style": {}, + "viewBox": "0 0 11.663437 11.663435" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/resource.json new file mode 100644 index 0000000..e38d80e --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "610bf0ddc2a5a74eee1dd35bd51508e7d2caa659ee7e3abf88b680a3bb57e52e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/thumbnail.png new file mode 100644 index 0000000..b30742b Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/view.json new file mode 100644 index 0000000..c513773 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/view.json @@ -0,0 +1,586 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "searchId": "value", + "state": 5 + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "this.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 38, + "width": 25 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "PullChord_Part2" + }, + "position": { + "height": 1, + "width": 1, + "x": 0.0015, + "y": 0.0005 + }, + "propConfig": { + "props.elements[0].fill.paint": { + "binding": { + "config": { + "expression": "\u0027#AAAAAA\u0027" + }, + "transforms": [ + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "expr" + } + }, + "props.elements[1].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state1},\r\n3,{session.custom.colours.state1},\r\n4,{session.custom.colours.state1},\r\n{session.custom.colours.state5}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[2].visibility": { + "binding": { + "config": { + "path": "view.custom.error" + }, + "transforms": [ + { + "expression": "if(!{value} \u0026\u0026 {view.custom.display_icon}, \u0027visible\u0027, \u0027hidden\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[3].visibility": { + "binding": { + "config": { + "path": "view.custom.error" + }, + "transforms": [ + { + "expression": "if({value} \u0026\u0026 {view.custom.display_icon}, \u0027visible\u0027, \u0027hidden\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "M 0.01621377,0.01595147 H 25.93719 V 41.138171 H 0.01621377 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 20.752995,30.343588 a 7.2578735,7.1963887 0 0 1 -7.257873,7.196389 7.2578735,7.1963887 0 0 1 -7.2578736,-7.196389 7.2578735,7.1963887 0 0 1 7.2578736,-7.196389 7.2578735,7.1963887 0 0 1 7.257873,7.196389 z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 13.785537,6.4238337 -7.0747349,-3.1261989 -0.985,1.7060701 6.2447349,4.563801 z", + "fill": { + "paint": "#0000FF" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 12.141737,10.447495 -5.3573679,5.578853 1.2662916,1.509108 6.4243953,-4.30722 z", + "fill": { + "paint": "#0000FF" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 21.18,10 a 5,5 0 0 1 -5,5 5,5 0 0 1 -5,-5 5,5 0 0 1 5,-5 5,5 0 0 1 5,5 z", + "fill": { + "paint": "#0000FF" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + } + ], + "style": {}, + "viewBox": "-0.5 -0.5 27 42" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "view.custom.display_icon" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "25:38", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/resource.json new file mode 100644 index 0000000..4f306fc --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "e67d0fe28f4074d176e81f9ce529e605be05cc6da82bc15174a52beb29f46bca" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/view.json new file mode 100644 index 0000000..9e5f0ea --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/view.json @@ -0,0 +1,485 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "searchId": "value", + "state": 5 + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "this.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 25, + "width": 10 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "PullChord_Part2" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "M 0.01621377,0.01595147 H 25.93719 V 41.138171 H 0.01621377 Z", + "fill": { + "paint": "#D5D5D5" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + } + ], + "preserveAspectRatio": "none", + "style": {}, + "viewBox": "-0.5 -0.5 27 42" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "view.custom.display_icon" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "10:25", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/resource.json new file mode 100644 index 0000000..7045adb --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "7487a3ba630459c9eb5e3e9aaebf00655a122d6796ea52dc6568370506b69d58" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/view.json new file mode 100644 index 0000000..113bd45 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/view.json @@ -0,0 +1,555 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "searchId": "value", + "state": 5 + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "this.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 10, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "PullChord_Line2" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[0].visibility": { + "binding": { + "config": { + "path": "view.custom.error" + }, + "transforms": [ + { + "expression": "if({value}, \u0027visible\u0027,\u0027hidden\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].visibility": { + "binding": { + "config": { + "path": "view.custom.error" + }, + "transforms": [ + { + "expression": "if({value}, \u0027visible\u0027,\u0027hidden\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[2].stroke.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state1},\r\n3,{session.custom.colours.state1},\r\n4,{session.custom.colours.state1},\r\n\u0027#000000\u0027\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "m -0.38931298,0.28431365 c 33.95623398,0 67.91246898,0 101.86870298,0", + "fill": { + "paint": "#FFFFFF" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m -0.38931298,10.850587 c 33.95623398,0 67.91246898,0 101.86870298,0", + "fill": { + "paint": "#FFFFFF" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m -0.38931298,5.5674501 c 33.95623398,0 67.91246898,0 101.86870298,0", + "fill": { + "paint": "#FFFFFF" + }, + "name": "path", + "opacity": 1, + "stroke": { + "dasharray": "8, 8, 8", + "dashoffset": "\"20\"", + "key": "\"2.15848\"", + "miterlimit": "\"10\"", + "width": 3 + }, + "type": "path" + } + ], + "preserveAspectRatio": "none", + "style": {}, + "viewBox": "-0.5 -0.5 102 12" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "view.custom.display_icon" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "mode": "percent", + "style": { + "cursor": "pointer", + "overflow": "visible" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/resource.json new file mode 100644 index 0000000..67876ae --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "ce9a816f41d3b2e0552f8f0195169e0d160eb15e69a3bc341e40e2cfd4ba483e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/view.json new file mode 100644 index 0000000..1bb31fc --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/view.json @@ -0,0 +1,555 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "searchId": "value", + "state": 5 + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "this.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 10 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "PullChord_Line" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[0].visibility": { + "binding": { + "config": { + "path": "view.custom.error" + }, + "transforms": [ + { + "expression": "if({value}, \u0027visible\u0027,\u0027hidden\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].visibility": { + "binding": { + "config": { + "path": "view.custom.error" + }, + "transforms": [ + { + "expression": "if({value}, \u0027visible\u0027,\u0027hidden\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[2].stroke.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state1},\r\n3,{session.custom.colours.state1},\r\n4,{session.custom.colours.state1},\r\n\u0027#000000\u0027\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "m 0.22819265,-0.5 c 0,33.992373 0,67.984747 0,101.97712", + "fill": { + "paint": "#FFFFFF" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 10.792046,-0.5 c 0,33.992373 0,67.984747 0,101.97712", + "fill": { + "paint": "#FFFFFF" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 5.5101192,-0.5 c 0,33.992373 0,67.984747 0,101.97712", + "fill": { + "paint": "#FFFFFF" + }, + "name": "path", + "opacity": 1, + "stroke": { + "dasharray": "8, 8, 8", + "dashoffset": "\"20\"", + "key": "\"2.15848\"", + "miterlimit": "\"10\"", + "width": 2 + }, + "type": "path" + } + ], + "preserveAspectRatio": "none", + "style": {}, + "viewBox": "-0.5 -0.5 12 102" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "view.custom.display_icon" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "mode": "percent", + "style": { + "cursor": "pointer", + "overflow": "visible" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/RFID/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/RFID/resource.json new file mode 100644 index 0000000..76aa9bb --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/RFID/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "1281798360b4e8d9ac8ef5e500e764b7371d12f337f0c3d4835866b9768ae4c6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/RFID/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/RFID/thumbnail.png new file mode 100644 index 0000000..38b785b Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/RFID/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/RFID/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/RFID/view.json new file mode 100644 index 0000000..a13432a --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/RFID/view.json @@ -0,0 +1,449 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running_status": 0, + "searchId": "value", + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "expression": "coalesce(try(jsonGet(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),\"state\"),null),{view.params.forceRunningStatus},0)" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 48, + "width": 48 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "RFID_0" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "elements": [ + { + "d": "M6.35 0.2507 C4.0842 0.2507 1.9091 1.5163 0.3079 3.7675 L1.174 4.9681 C2.6039 2.9621 4.477 1.9591 6.35 1.9591 C8.223 1.9591 10.0961 2.9621 11.526 4.9681 L12.3921 3.7675 C10.7909 1.5163 8.6158 0.2507 6.35 0.2507 ZM6.35 3.6831 C4.7961 3.6831 3.2421 4.5117 2.0526 6.1688 L2.8834 7.4219 C3.7997 6.1213 5.0484 5.3909 6.35 5.3909 C7.6516 5.3909 8.9003 6.1213 9.8166 7.4219 L10.6474 6.1688 C9.4579 4.5117 7.9039 3.6831 6.35 3.6831 ZM6.35 7.1155 C5.4135 7.1155 4.477 7.617 3.762 8.6201 L4.6179 9.8557 C5.0761 9.2079 5.698 8.8427 6.35 8.8427 C7.002 8.8427 7.6239 9.2079 8.0821 9.8557 L8.938 8.6201 C8.223 7.617 7.2865 7.1155 6.35 7.1155 ZM6.35 10.5667 C6.0416 10.5667 5.7332 10.7299 5.4966 11.0563 L6.35 12.257 L7.2034 11.0563 C6.9668 10.7299 6.6584 10.5667 6.35 10.5667 Z", + "name": "path", + "stroke": { + "paint": "transparent" + }, + "type": "path" + } + ], + "fill": { + "opacity": 1 + }, + "name": "group", + "stroke": { + "opacity": "0.502", + "paint": "rgb(128,128,128)" + }, + "type": "group" + } + ], + "style": {}, + "viewBox": "0 0 12.7 12.7" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": {} + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "expression": "{view.custom.display_icon}" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Robot/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Robot/resource.json new file mode 100644 index 0000000..c2173e4 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Robot/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "87c7c8ba84a0e3328f3c3c12ab0cb524316742748d40cfc0b20d8998567195c6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Robot/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Robot/thumbnail.png new file mode 100644 index 0000000..f425560 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Robot/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Robot/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Robot/view.json new file mode 100644 index 0000000..38ee3c7 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Robot/view.json @@ -0,0 +1,578 @@ +{ + "custom": { + "FillColour": "value", + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "running_status": 0, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.FillColour": { + "persistent": true + }, + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Robot" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "m 25,50.5 a 25,25 0 0 1 -25,-25 25,25 0 0 1 25,-25 25,25 0 0 1 25,25 25,25 0 0 1 -25,25 z", + "fill": {}, + "name": "Circle", + "stroke": { + "paint": "#000000", + "width": 1 + }, + "type": "path" + }, + { + "d": "m 44.389999,19.040001 h 1.34 v 5.36 h -1.34 z M 36.349998,27.08 h 5.360001 v 1.34 h -5.360001 z m 4.689681,-7.370001 A 4.0196781,4.0196781 0 0 1 37.02,23.729677 4.0196781,4.0196781 0 0 1 33.000322,19.709999 4.0196781,4.0196781 0 0 1 37.02,15.690321 4.0196781,4.0196781 0 0 1 41.039679,19.709999 Z M 31.989677,12.52 A 4.0196781,4.0196781 0 0 1 27.969999,16.539679 4.0196781,4.0196781 0 0 1 23.950321,12.52 4.0196781,4.0196781 0 0 1 27.969999,8.5003223 4.0196781,4.0196781 0 0 1 31.989677,12.52 Z m 6.46398,5.472982 -3.445342,4.105998 -9.881972,-8.29196 3.445341,-4.1059977 z m -2.103659,1.717017 h 1.340001 v 8.04 H 36.349998 Z M 37.02,19.040001 h 8.04 v 1.34 H 37.02 Z M 20.329678,26.41 A 4.0196781,4.0196781 0 0 1 16.309999,30.429678 4.0196781,4.0196781 0 0 1 12.290321,26.41 4.0196781,4.0196781 0 0 1 16.309999,22.390322 4.0196781,4.0196781 0 0 1 20.329678,26.41 Z m 5.409585,-15.990011 4.105999,3.445342 -11.004525,13.114681 -4.105998,-3.445341 z M 13.63,26.41 h 5.36 V 37.139999 H 13.63 Z M 8.2799997,37.139999 H 24.36 V 42.5 H 8.2799997 Z", + "fill": { + "paint": "#000000" + }, + "name": "Robot", + "type": "path" + } + ], + "style": {}, + "viewBox": "-0.5 -0.5 51 52" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SLAMs/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SLAMs/resource.json new file mode 100644 index 0000000..91988de --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SLAMs/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "b1340536dace4e1e661d8c9bd90488fdfcda77f5460d6024d6f914619a29f078" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SLAMs/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SLAMs/thumbnail.png new file mode 100644 index 0000000..c03fd91 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SLAMs/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SLAMs/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SLAMs/view.json new file mode 100644 index 0000000..6091991 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SLAMs/view.json @@ -0,0 +1,628 @@ +{ + "custom": { + "FillColour": "value", + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "running_status": 0, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.FillColour": { + "persistent": true + }, + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "SLAM" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "position.rotate.angle": { + "binding": { + "config": { + "path": "view.params.directionLeft" + }, + "enabled": false, + "transforms": [ + { + "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "M 25.072251,49.491677 C 8.305025,50.18642 -4.5893078,30.832553 2.4672281,15.562464 8.2437711,-0.23935905 31.006999,-4.7804171 42.373386,7.6015452 54.088036,18.389216 50.750821,39.438697 36.798277,46.490083 33.221446,48.453809 29.149949,49.49602 25.072251,49.491677 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1.5 + }, + "type": "path" + }, + { + "d": "m 25.27,19.376563 c -3.799453,0.197118 -4.03784,-6.218759 0,-6.053125 3.946982,-0.08033 3.946979,6.133451 0,6.053125 z m 7,0 c -3.799453,0.197118 -4.03784,-6.218759 0,-6.053125 3.946982,-0.08033 3.946979,6.133451 0,6.053125 z m -0.240001,-0.316562 c 0,2.383333 0,4.766667 0,7.15 -2.173333,0 -4.346667,0 -6.52,0 0,-2.383333 0,-4.766667 0,-7.15 2.173333,0 4.346667,0 6.52,0 z M 17.07,23.24 c 0,4.116667 0,8.233333 0,12.35 -0.666667,0 -1.333333,0 -2,0 0,-4.116667 0,-8.233333 0,-12.35 0.666667,0 1.333333,0 2,0 z m 25.119999,4.220001 c 0,1.3 0,2.6 0,3.9 -8.69,0 -17.38,0 -26.07,0 0,-1.3 0,-2.6 0,-3.9 8.69,0 17.38,0 26.07,0 z M 12.079999,8.75 c 0,10.833333 0,21.666667 0,32.5 -1.086667,0 -2.173333,0 -3.26,0 0,-10.833333 0,-21.666667 0,-32.5 1.086667,0 2.173333,0 3.26,0 z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 0.5 + }, + "type": "path" + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 51 51" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "SLAMs" + }, + "position": { + "height": 0.005, + "width": 0.005, + "x": 0.0225, + "y": 0.0277 + }, + "props": { + "params": { + "tagProps": [ + "", + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "path": "Symbol-Views/Equipment-Views/SLAMs" + }, + "type": "ia.display.view" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SafetyGate/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SafetyGate/resource.json new file mode 100644 index 0000000..20e3195 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SafetyGate/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "68f40942c9ba754c2476adc760face6736216d9b78414f0bdc7753f4b48d075e" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SafetyGate/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SafetyGate/thumbnail.png new file mode 100644 index 0000000..083d011 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SafetyGate/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SafetyGate/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SafetyGate/view.json new file mode 100644 index 0000000..41879b1 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SafetyGate/view.json @@ -0,0 +1,736 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "searchId": "value", + "state": 5 + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "this.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 25, + "width": 25 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Closed" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "{view.custom.state} \u003d 5" + }, + "type": "expr" + } + }, + "position.rotate.angle": { + "binding": { + "config": { + "path": "view.params.directionLeft" + }, + "enabled": false, + "transforms": [ + { + "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "M 8.6500001,0 H 26.15 c 2.0775,0 3.75,1.6725 3.75,3.75 v 22.5 C 29.9,28.3275 28.2275,30 26.15,30 H 8.6500001 c -2.0775,0 -3.75,-1.6725 -3.75,-3.75 V 3.75 c 0,-2.0775 1.6725,-3.75 3.75,-3.75 z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1.5 + }, + "type": "path" + }, + { + "d": "m 12,15 a 1,1 0 0 1 -1,1 1,1 0 0 1 -1,-1 1,1 0 0 1 1,-1 1,1 0 0 1 1,1 z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1.5 + }, + "type": "path" + }, + { + "d": "m -0.1,28 h 34 v 3 h -34 z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1.5 + }, + "type": "path" + }, + { + "d": "M 12 14.97 L 13.7 14.97 Q 15.4 14.97 15.4 14.97 L 15.4 14.97", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1.5 + }, + "type": "path" + } + ], + "preserveAspectRatio": "xMidYMin", + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 35 32" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Open" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "{view.custom.state} !\u003d 5" + }, + "type": "expr" + } + }, + "position.rotate.angle": { + "binding": { + "config": { + "path": "view.params.directionLeft" + }, + "enabled": false, + "transforms": [ + { + "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state1},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state1},\r\n3,{session.custom.colours.state1},\r\n4,{session.custom.colours.state1},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "d": "m 8.75,0 h 17.5 C 28.3275,0 30,1.6725 30,3.75 v 22.5 C 30,28.3275 28.3275,30 26.25,30 H 8.75 C 6.6725,30 5,28.3275 5,26.25 V 3.75 C 5,1.6725 6.6725,0 8.75,0 Z", + "fill": { + "paint": "#D5D5D5" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1.5 + }, + "type": "path" + }, + { + "d": "m 13,0 h 14 c 1.662,0 3,1.338 3,3 v 24 c 0,1.662 -1.338,3 -3,3 H 13 c -1.662,0 -3,-1.338 -3,-3 V 3 c 0,-1.662 1.338,-3 3,-3 z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1.5 + }, + "type": "path" + }, + { + "d": "m 16.1,15 a 1,1 0 0 1 -1,1 1,1 0 0 1 -1,-1 1,1 0 0 1 1,-1 1,1 0 0 1 1,1 z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1.5 + }, + "type": "path" + }, + { + "d": "M 15 15 L 18 18", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1.5 + }, + "type": "path" + }, + { + "d": "m 0,28 h 34 v 3 H 0 Z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1.5 + }, + "type": "path" + } + ], + "preserveAspectRatio": "xMidYMin", + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 35 32" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "view.custom.display_icon" + }, + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SmartPac/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SmartPac/resource.json new file mode 100644 index 0000000..3447e8e --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SmartPac/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "rolfed", + "timestamp": "2024-04-02T15:29:53Z" + }, + "lastModificationSignature": "32f348da4c2c3f94d893b75e00b3d745d1c09ff143a9d9746b64ed2fc329a2c5" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SmartPac/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SmartPac/thumbnail.png new file mode 100644 index 0000000..303adf5 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SmartPac/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SmartPac/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SmartPac/view.json new file mode 100644 index 0000000..3979a58 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SmartPac/view.json @@ -0,0 +1,659 @@ +{ + "custom": { + "FillColour": "value", + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "running_status": 0, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.FillColour": { + "persistent": true + }, + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "SmartPac" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[1].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "id": "defs1", + "name": "defs1", + "type": "defs" + }, + { + "elements": [ + { + "cx": "6.614583", + "cy": "6.614583", + "fill": {}, + "id": "path1", + "name": "path1", + "rx": "6.2085829", + "ry": "6.2085834", + "stroke": { + "dasharray": "none", + "linecap": "round", + "paint": "#000000", + "width": "0.282833" + }, + "type": "ellipse" + }, + { + "cx": "9.5583372", + "cy": "6.7405353", + "fill": { + "paint": "transparent" + }, + "id": "path3", + "name": "path3", + "rx": "2.1170385", + "ry": "2.1170387", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "linejoin": "miter", + "paint": "#000000", + "width": "0.263839" + }, + "type": "ellipse" + }, + { + "cx": "3.6387777", + "cy": "6.7405353", + "fill": { + "paint": "transparent" + }, + "id": "ellipse3", + "name": "ellipse3", + "rx": "2.1170385", + "ry": "2.1170387", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "linejoin": "miter", + "paint": "#000000", + "width": "0.263839" + }, + "type": "ellipse" + }, + { + "d": "m 6.614583,6.0733902 2e-7,3.9748358", + "fill": { + "paint": "transparent" + }, + "id": "path4", + "name": "path4", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "linejoin": "miter", + "paint": "#000000", + "width": "0.278874" + }, + "type": "path" + }, + { + "d": "m 6.6145826,3.367424 2.3434352,4.0589491 -4.6868706,-2e-7 z", + "fill": { + "paint": "transparent" + }, + "id": "path5", + "name": "path5", + "stroke": { + "dasharray": "none", + "linecap": "butt", + "linejoin": "miter", + "paint": "#000000", + "width": "0.28489252" + }, + "transform": "matrix(-1.0350965,0,0,-0.83326286,13.461314,8.9334953)", + "type": "path" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "style": {}, + "viewBox": "0 0 13.229167 13.229166" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Spiral/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Spiral/resource.json new file mode 100644 index 0000000..6904fc6 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Spiral/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "hrtste", + "timestamp": "2024-06-06T13:12:27Z" + }, + "lastModificationSignature": "bac27f0b650794079c0f1b51396a3efa93804fa490141a95c21d6781fd1eac07" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Spiral/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Spiral/thumbnail.png new file mode 100644 index 0000000..6917db6 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Spiral/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Spiral/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Spiral/view.json new file mode 100644 index 0000000..9129458 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Spiral/view.json @@ -0,0 +1,732 @@ +{ + "custom": { + "FillColour": "value", + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "running_status": 0, + "searchId": "PLC01", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.FillColour": { + "persistent": true + }, + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Spiral" + }, + "position": { + "height": 0.005, + "width": 0.005, + "x": 0.0225, + "y": 0.0277 + }, + "props": { + "params": { + "tagProps": [ + "", + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "path": "Symbol-Views/Equipment-Views/Spiral" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Spiral_Symbol" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[1].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "cx": "6.6145835", + "cy": "6.6145835", + "fill": {}, + "id": "path234", + "name": "path234", + "r": "6.303678", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.23" + }, + "type": "circle" + }, + { + "cx": "6.6145835", + "cy": "6.6145835", + "fill": { + "paint": "transparent" + }, + "id": "path234-7", + "name": "path234-7", + "r": "3.313657", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.221" + }, + "type": "circle" + }, + { + "d": "M 6.6188113,9.8749524 6.6103553,3.3542142", + "fill": { + "paint": "transparent" + }, + "id": "path3429", + "name": "path3429", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.218" + }, + "type": "path" + }, + { + "d": "M 4.978764,9.47052 8.23181,3.819167", + "fill": { + "paint": "transparent" + }, + "id": "path3429-8", + "name": "path3429-8", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.218" + }, + "type": "path" + }, + { + "d": "M 3.818909,8.2200703 9.461806,4.9523781", + "fill": { + "paint": "transparent" + }, + "id": "path3429-8-2", + "name": "path3429-8-2", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.218" + }, + "type": "path" + }, + { + "d": "M 3.3168328,6.6175189 9.837571,6.6090589", + "fill": { + "paint": "transparent" + }, + "id": "path3429-8-2-6", + "name": "path3429-8-2-6", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.218" + }, + "type": "path" + }, + { + "d": "M 3.7180036,4.9712623 6.8282074,6.7528116", + "fill": { + "paint": "transparent" + }, + "id": "path3429-8-2-6-5", + "name": "path3429-8-2-6-5", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.219869" + }, + "type": "path" + }, + { + "d": "M 4.9523763,3.7647768 8.2200718,9.4076712", + "fill": { + "paint": "transparent" + }, + "id": "path3429-8-2-6-5-5", + "name": "path3429-8-2-6-5-5", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.218" + }, + "type": "path" + }, + { + "cx": "6.6145835", + "cy": "6.6145835", + "fill": { + "opacity": "1", + "paint": "#fefefe" + }, + "id": "path234-7-0", + "name": "path234-7-0", + "r": "0.26523831", + "stroke": { + "dasharray": "none", + "paint": "#000000", + "width": "0.218" + }, + "type": "circle" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "style": {}, + "viewBox": "0 0 13.229166 13.229167" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Stacker_Destacker/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Stacker_Destacker/resource.json new file mode 100644 index 0000000..8b6c5dc --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Stacker_Destacker/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "026c90ec69e3ece88f6e209e04ab53220c21f18b8a334cb12826ed100508cdb1" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Stacker_Destacker/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Stacker_Destacker/thumbnail.png new file mode 100644 index 0000000..f6ddfae Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Stacker_Destacker/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Stacker_Destacker/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Stacker_Destacker/view.json new file mode 100644 index 0000000..e772522 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Stacker_Destacker/view.json @@ -0,0 +1,598 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "running_status": 0, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown" + }, + "params": { + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "SLAM" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[0].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "elements": [ + { + "d": "M 50.120001,25 C 50.827803,42.132141 31.110082,55.307098 15.552912,48.096988 -0.54598581,42.194727 -5.1724173,18.93609 7.4423281,7.3223305 18.432808,-4.6472699 39.878022,-1.2374264 47.061975,13.018775 49.062621,16.67345 50.124426,20.833557 50.120001,25 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 1.5 + }, + "type": "path" + }, + { + "d": "m 18.74,8 c 4.25,0 8.5,0 12.75,0 0,0.5666667 0,1.1333333 0,1.7 -4.25,0 -8.5,0 -12.75,0 0,-0.5666667 0,-1.1333333 0,-1.7 z m 0,2.68 c 4.25,0 8.5,0 12.75,0 0,0.566667 0,1.133333 0,1.7 -4.25,0 -8.5,0 -12.75,0 0,-0.566667 0,-1.133333 0,-1.7 z m 0,2.69 c 4.25,0 8.5,0 12.75,0 0,0.566667 0,1.133333 0,1.7 -4.25,0 -8.5,0 -12.75,0 0,-0.566667 0,-1.133333 0,-1.7 z m 0,2.679999 c 4.25,0 8.5,0 12.75,0 0,0.566667 0,1.133333 0,1.7 -4.25,0 -8.5,0 -12.75,0 0,-0.566667 0,-1.133333 0,-1.7 z M 31.5,18.73 c -0.426667,3.296667 -0.853333,6.593333 -1.28,9.89 -3.4,0 -6.8,0 -10.2,0 -0.423333,-3.296667 -0.846667,-6.593333 -1.27,-9.89 4.25,0 8.5,0 12.75,0 z m 0,13.39 c -0.426667,3.296667 -0.853333,6.593333 -1.28,9.89 -3.4,0 -6.8,0 -10.2,0 -0.423333,-3.296667 -0.846667,-6.593333 -1.27,-9.89 4.25,0 8.5,0 12.75,0 z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 0.5 + }, + "type": "path" + }, + { + "d": "m 10.24,8 c 1.416667,0 2.833333,0 4.25,0 0,11.333333 0,22.666667 0,34 -1.416667,0 -2.833333,0 -4.25,0 0,-11.333333 0,-22.666667 0,-34 z m 4.25,12.75 c 7.083333,0 14.166667,0 21.25,0 0,0.566667 0,1.133333 0,1.7 -7.083333,0 -14.166667,0 -21.25,0 0,-0.566667 0,-1.133333 0,-1.7 z M 35.740002,8 c 1.416667,0 2.833333,0 4.25,0 0,11.333333 0,22.666667 0,34 -1.416667,0 -2.833333,0 -4.25,0 0,-11.333333 0,-22.666667 0,-34 z", + "fill": { + "paint": "#000000" + }, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 0.5 + }, + "type": "path" + } + ], + "transform": "matrix(0.98146771,0,0,0.97925914,0.29387469,0.4508585)", + "type": "group" + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 51 51" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status/resource.json new file mode 100644 index 0000000..daadb15 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "3653c5f54227e4a2a236203bd319fc03fe803468480a593ecf4784dd04ed2e76" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status/view.json new file mode 100644 index 0000000..87d71c8 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status/view.json @@ -0,0 +1,931 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown", + "visible_status": false + }, + "params": { + "directionLeft": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + } + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {view.custom.isMatch}\u003e0,\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {view.custom.isMatch}\u003e0,\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.visible_status": { + "binding": { + "config": { + "expression": "{view.custom.state} !\u003d 5" + }, + "type": "expr" + }, + "persistent": true + }, + "params.directionLeft": { + "paramDirection": "input", + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 20, + "width": 29 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "ErrorStatus", + "tooltip": { + "style": { + "fontSize": 16 + } + } + }, + "position": { + "grow": 1 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionLeft}" + }, + "type": "expr" + } + }, + "position.display": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionLeft} \u0026\u0026 {view.custom.show_error}" + }, + "type": "expr" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].fill.paint": { + "binding": { + "config": { + "path": "view.custom.running_status" + }, + "transforms": [ + { + "expression": "case(\t{value}, \r\n\t\t1, {session.custom.colours.state0},\r\n\t\t2, {session.custom.colours.state0},\r\n\t\t3, {session.custom.colours.state5},\r\n\t\t\u0027#000000\u0027\r\n\t)", + "type": "expression" + }, + { + "expression": "if({session.custom.alarm_filter.show_running},{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].stroke.width": { + "binding": { + "config": { + "expression": "if({session.custom.alarm_filter.show_running},2,0)" + }, + "type": "expr" + } + }, + "props.elements[2].fill": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\t\u0027#000000\u0027),\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[2].text": { + "binding": { + "config": { + "path": "view.custom.priority" + }, + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 32 2 L 62 32 L 32 62 L 2 32 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 2 + }, + "type": "path" + }, + { + "d": "M 38 2 L 57.96 2 L 57.96 2 L 88 32 L 57.96 62 L 57.96 62 L 38 62 L 67.96 32 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000" + }, + "type": "path" + }, + { + "style": { + "classes": "", + "fontSize": 42, + "fontWeight": "bolder" + }, + "type": "text", + "x": 20, + "y": 44.5 + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "0.5 0.5 89 64" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "ErrorStatus_Left" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionLeft}" + }, + "type": "expr" + } + }, + "position.display": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionLeft} \u0026\u0026 {view.custom.show_error}" + }, + "type": "expr" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].fill.paint": { + "binding": { + "config": { + "path": "view.custom.running_status" + }, + "transforms": [ + { + "expression": "case(\t{value}, \r\n\t\t1, {session.custom.colours.state0},\r\n\t\t2, {session.custom.colours.state0},\r\n\t\t3, {session.custom.colours.state5},\r\n\t\t\u0027#000000\u0027\r\n\t)", + "type": "expression" + }, + { + "expression": "if({session.custom.alarm_filter.show_running},{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].stroke.width": { + "binding": { + "config": { + "expression": "if({session.custom.alarm_filter.show_running},2,0)" + }, + "type": "expr" + } + }, + "props.elements[2].fill": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\t\u0027#000000\u0027),\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[2].text": { + "binding": { + "config": { + "path": "view.custom.priority" + }, + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 56,2 C 66,12 76,22 86,32 76,42 66,52 56,62 46,52 36,42 26,32 36,22 46,12 56,2 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 2 + }, + "type": "path" + }, + { + "d": "M 50,2 C 43.346667,2 36.693333,2 30.04,2 20.026667,12 10.013333,22 0,32 10.013333,42 20.026667,52 30.04,62 36.693333,62 43.346667,62 50,62 40.013333,52 30.026667,42 20.04,32 30.026667,22 40.013333,12 50,2 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000" + }, + "type": "path" + }, + { + "style": { + "classes": "", + "fontSize": 42, + "fontWeight": "bolder", + "textOrientation": "upright", + "writingMode": "horizontal-tb" + }, + "type": "text", + "x": 44.5, + "y": 44.5 + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "0.5 0.5 89 64" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "RunningStatus" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026! {view.params.directionLeft},True, False)" + }, + "type": "expr" + } + }, + "position.rotate.angle": { + "binding": { + "config": { + "path": "view.params.directionLeft" + }, + "transforms": [ + { + "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.running_status" + }, + "transforms": [ + { + "expression": "case(\t{value}, \r\n\t\t1, {session.custom.colours.state0},\r\n\t\t2, {session.custom.colours.state0},\r\n\t\t3, {session.custom.colours.state5},\r\n\t\t\u0027#000000\u0027\r\n\t)\r\n\t\t\r\n", + "type": "expression" + } + ], + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 0 0 L 40 0 L 40 0 L 70 30 L 40 60 L 40 60 L 0 60 L 30 30 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#4c4c4c", + "width": "2" + }, + "type": "path" + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-1.5 -1.5 73 63" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "RunningStatus_Left" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026\u0026 {view.params.directionLeft},True, False)" + }, + "type": "expr" + } + }, + "position.rotate.angle": { + "binding": { + "config": { + "path": "view.params.directionLeft" + }, + "transforms": [ + { + "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.running_status" + }, + "transforms": [ + { + "expression": "case(\t{value}, \r\n\t\t1, {session.custom.colours.state0},\r\n\t\t2, {session.custom.colours.state0},\r\n\t\t3, {session.custom.colours.state5},\r\n\t\t\u0027#000000\u0027\r\n\t)\r\n\t\t\r\n", + "type": "expression" + } + ], + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 70,60 C 56.666667,60 43.333333,60 30,60 20,50 10,40 0,30 10,20 20,10 30,0 43.333333,0 56.666667,0 70,0 60,10 50,20 40,30 50,40 60,50 70,60 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#4c4c4c", + "width": "2" + }, + "type": "path" + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 71 61" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.Fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "view.custom.display_icon" + }, + "type": "property" + } + }, + "props.style.borderStyle": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "solid" + }, + { + "input": false, + "output": "none" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "justify": "center", + "style": { + "borderColor": "#FF0000", + "borderWidth": "2px", + "cursor": "pointer" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered/resource.json new file mode 100644 index 0000000..d552219 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "1ebcf3e6b3c3dfb4f04fd0e1ec799e01f88d82512e6366007caf21da025b9728" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered/view.json new file mode 100644 index 0000000..5a47f4f --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered/view.json @@ -0,0 +1,887 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown", + "visible_status": false + }, + "params": { + "directionLeft": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + } + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {view.custom.isMatch}\u003e0,\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {view.custom.isMatch}\u003e0,\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.visible_status": { + "binding": { + "config": { + "expression": "{view.custom.state} !\u003d 5" + }, + "type": "expr" + }, + "persistent": true + }, + "params.directionLeft": { + "paramDirection": "input", + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 20, + "width": 29 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "ErrorStatus", + "tooltip": { + "style": { + "fontSize": 16 + } + } + }, + "position": { + "grow": 1 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionLeft}" + }, + "type": "expr" + } + }, + "position.display": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionLeft} \u0026\u0026 {view.custom.show_error}" + }, + "type": "expr" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].fill.paint": { + "binding": { + "config": { + "expression": "if({view.custom.show_running}, \"#FFFFFF\", \"#00000000\")" + }, + "type": "expr" + } + }, + "props.elements[1].stroke.width": { + "binding": { + "config": { + "expression": "if({session.custom.alarm_filter.show_running},2,0)" + }, + "type": "expr" + } + }, + "props.elements[2].fill": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\t\u0027#000000\u0027),\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[2].text": { + "binding": { + "config": { + "path": "view.custom.priority" + }, + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 32 2 L 62 32 L 32 62 L 2 32 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 2 + }, + "type": "path" + }, + { + "d": "M 38 2 L 57.96 2 L 57.96 2 L 88 32 L 57.96 62 L 57.96 62 L 38 62 L 67.96 32 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000" + }, + "type": "path" + }, + { + "style": { + "classes": "", + "fontSize": 42, + "fontWeight": "bolder" + }, + "type": "text", + "x": 20, + "y": 44.5 + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "0.5 0.5 89 64" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "ErrorStatus_Left" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionLeft}" + }, + "type": "expr" + } + }, + "position.display": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionLeft} \u0026\u0026 {view.custom.show_error}" + }, + "type": "expr" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].fill.paint": { + "binding": { + "config": { + "expression": "if({view.custom.show_running}, \"#FFFFFF\", \"#00000000\")" + }, + "type": "expr" + } + }, + "props.elements[1].stroke.width": { + "binding": { + "config": { + "expression": "if({session.custom.alarm_filter.show_running},2,0)" + }, + "type": "expr" + } + }, + "props.elements[2].fill": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\t\u0027#000000\u0027),\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[2].text": { + "binding": { + "config": { + "path": "view.custom.priority" + }, + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 56,2 C 66,12 76,22 86,32 76,42 66,52 56,62 46,52 36,42 26,32 36,22 46,12 56,2 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 2 + }, + "type": "path" + }, + { + "d": "M 50,2 C 43.346667,2 36.693333,2 30.04,2 20.026667,12 10.013333,22 0,32 10.013333,42 20.026667,52 30.04,62 36.693333,62 43.346667,62 50,62 40.013333,52 30.026667,42 20.04,32 30.026667,22 40.013333,12 50,2 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000" + }, + "type": "path" + }, + { + "style": { + "classes": "", + "fontSize": 42, + "fontWeight": "bolder", + "textOrientation": "upright", + "writingMode": "horizontal-tb" + }, + "type": "text", + "x": 44.5, + "y": 44.5 + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "0.5 0.5 89 64" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "RunningStatus" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026! {view.params.directionLeft},True, False)" + }, + "type": "expr" + } + }, + "position.rotate.angle": { + "binding": { + "config": { + "path": "view.params.directionLeft" + }, + "transforms": [ + { + "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", + "type": "expression" + } + ], + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 0 0 L 40 0 L 40 0 L 70 30 L 40 60 L 40 60 L 0 60 L 30 30 Z", + "fill": { + "paint": "#FFFFFF" + }, + "name": "path", + "stroke": { + "paint": "#4c4c4c", + "width": 3 + }, + "type": "path" + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-1.5 -1.5 73 63" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "RunningStatus_Left" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026\u0026 {view.params.directionLeft},True, False)" + }, + "type": "expr" + } + }, + "position.rotate.angle": { + "binding": { + "config": { + "path": "view.params.directionLeft" + }, + "transforms": [ + { + "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", + "type": "expression" + } + ], + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 70,60 C 56.666667,60 43.333333,60 30,60 20,50 10,40 0,30 10,20 20,10 30,0 43.333333,0 56.666667,0 70,0 60,10 50,20 40,30 50,40 60,50 70,60 Z", + "fill": { + "paint": "#FFFFFF" + }, + "name": "path", + "stroke": { + "paint": "#4c4c4c", + "width": 3 + }, + "type": "path" + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 71 61" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.Fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "view.custom.display_icon" + }, + "type": "property" + } + }, + "props.style.borderStyle": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "solid" + }, + { + "input": false, + "output": "none" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "justify": "center", + "style": { + "borderColor": "#FF0000", + "borderWidth": "2px", + "cursor": "pointer" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered_NS/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered_NS/resource.json new file mode 100644 index 0000000..9ae9d39 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered_NS/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "5ab3f89ce6719a3e3839c7daa9868c15e7c463afcd4133e513b06ef92e83594a" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered_NS/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered_NS/view.json new file mode 100644 index 0000000..220ba6c --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered_NS/view.json @@ -0,0 +1,888 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown", + "visible_status": false + }, + "params": { + "directionDown": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + } + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {view.custom.isMatch}\u003e0,\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {view.custom.isMatch}\u003e0,\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.visible_status": { + "binding": { + "config": { + "expression": "{view.custom.state} !\u003d 5" + }, + "type": "expr" + }, + "persistent": true + }, + "params.directionDown": { + "paramDirection": "input", + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 29, + "width": 20 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "ErrorStatus", + "tooltip": { + "style": { + "fontSize": 16 + } + } + }, + "position": { + "grow": 1 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionDown}" + }, + "type": "expr" + } + }, + "position.display": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionDown} \u0026\u0026 {view.custom.show_error}" + }, + "type": "expr" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].fill.paint": { + "binding": { + "config": { + "expression": "if({view.custom.show_running}, \"#FFFFFF\", \"#00000000\")" + }, + "type": "expr" + } + }, + "props.elements[1].stroke.width": { + "binding": { + "config": { + "expression": "if({session.custom.alarm_filter.show_running},2,0)" + }, + "type": "expr" + } + }, + "props.elements[2].fill": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\t\u0027#000000\u0027),\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[2].text": { + "binding": { + "config": { + "path": "view.custom.priority" + }, + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 31,26 C 41,36 51,46 61,56 51,66 41,76 31,86 21,76 11,66 1,56 11,46 21,36 31,26 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 2 + }, + "type": "path" + }, + { + "d": "M 61,50 C 61,43.346667 61,36.693333 61,30.04 51,20.026667 41,10.013333 31,0 21,10.013333 11,20.026667 1,30.04 1,36.693333 1,43.346667 1,50 11,40.013333 21,30.026667 31,20.04 41,30.026667 51,40.013333 61,50 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000" + }, + "type": "path" + }, + { + "style": { + "classes": "", + "fontSize": 42, + "fontWeight": "bolder" + }, + "type": "text", + "x": 20, + "y": 70 + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 64 89" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "ErrorStatus_Down" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionDown}" + }, + "type": "expr" + } + }, + "position.display": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionDown} \u0026\u0026 {view.custom.show_error}" + }, + "type": "expr" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].fill.paint": { + "binding": { + "config": { + "expression": "if({view.custom.show_running}, \"#FFFFFF\", \"#00000000\")" + }, + "type": "expr" + } + }, + "props.elements[1].stroke.width": { + "binding": { + "config": { + "expression": "if({session.custom.alarm_filter.show_running},2,0)" + }, + "type": "expr" + } + }, + "props.elements[2].fill": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\t\u0027#000000\u0027),\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[2].text": { + "binding": { + "config": { + "path": "view.custom.priority" + }, + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 32,2 C 42,12 52,22 62,32 52,42 42,52 32,62 22,52 12,42 2,32 12,22 22,12 32,2 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 2 + }, + "type": "path" + }, + { + "d": "M 2,38 C 2,44.653333 2,51.306667 2,57.96 12,67.973333 22,77.986667 32,88 42,77.986667 52,67.973333 62,57.96 62,51.306667 62,44.653333 62,38 52,47.986667 42,57.973333 32,67.96 22,57.973333 12,47.986667 2,38 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000" + }, + "type": "path" + }, + { + "style": { + "classes": "", + "fontSize": 42, + "fontWeight": "bolder", + "textOrientation": "upright", + "writingMode": "horizontal-tb" + }, + "type": "text", + "x": 20, + "y": 44.5 + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 65 89" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "RunningStatus" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026! {view.params.directionDown},True,False)" + }, + "type": "expr" + } + }, + "position.rotate.angle": { + "binding": { + "config": { + "path": "view.params.directionLeft" + }, + "transforms": [ + { + "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", + "type": "expression" + } + ], + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 0,70 C 0,56.666667 0,43.333333 0,30 10,20 20,10 30,0 40,10 50,20 60,30 60,43.333333 60,56.666667 60,70 50,60 40,50 30,40 20,50 10,60 0,70 Z", + "fill": { + "paint": "#FFFFFF" + }, + "name": "path", + "stroke": { + "paint": "#4c4c4c", + "width": 3 + }, + "type": "path" + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 61 71" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "RunningStatus_Down" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026\u0026 {view.params.directionDown},True,False)" + }, + "type": "expr" + } + }, + "position.rotate.angle": { + "binding": { + "config": { + "path": "view.params.directionLeft" + }, + "transforms": [ + { + "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", + "type": "expression" + } + ], + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "m 60,0 c 0,13.333333 0,26.666667 0,40 C 50,50 40,60 30,70 20,60 10,50 0,40 0,26.666667 0,13.333333 0,0 10,10 20,20 30,30 40,20 50,10 60,0 Z", + "fill": { + "paint": "#FFFFFF" + }, + "name": "path", + "stroke": { + "paint": "#4c4c4c", + "width": 3 + }, + "type": "path" + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 61 71" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "view.custom.display_icon" + }, + "type": "property" + } + }, + "props.style.borderStyle": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "solid" + }, + { + "input": false, + "output": "none" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "direction": "column", + "justify": "center", + "style": { + "borderColor": "#FF0000", + "borderWidth": "2px", + "cursor": "pointer" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status_NS/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status_NS/resource.json new file mode 100644 index 0000000..08cc584 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status_NS/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "231b4561d069183e37b3ef2b152cc139d23acbba09e09d6c34399ca805109749" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status_NS/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status_NS/view.json new file mode 100644 index 0000000..68b36c5 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status_NS/view.json @@ -0,0 +1,932 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running": false, + "searchId": "value", + "show_error": false, + "show_running": true, + "state": 5, + "state_string": "Unknown", + "visible_status": false + }, + "params": { + "directionDown": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running": { + "binding": { + "config": { + "expression": "{view.custom.running_status} \u003d 3" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + } + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.show_error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {view.custom.isMatch}\u003e0,\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {view.custom.isMatch}\u003e0,\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.show_running": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.visible_status": { + "binding": { + "config": { + "expression": "{view.custom.state} !\u003d 5" + }, + "type": "expr" + }, + "persistent": true + }, + "params.directionDown": { + "paramDirection": "input", + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 29, + "width": 20 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "ErrorStatus", + "tooltip": { + "style": { + "fontSize": 16 + } + } + }, + "position": { + "grow": 1 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionDown}" + }, + "type": "expr" + } + }, + "position.display": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionDown} \u0026\u0026 {view.custom.show_error}" + }, + "type": "expr" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].fill.paint": { + "binding": { + "config": { + "path": "view.custom.running_status" + }, + "transforms": [ + { + "expression": "case(\t{value}, \r\n\t\t1, {session.custom.colours.state0},\r\n\t\t2, {session.custom.colours.state0},\r\n\t\t3, {session.custom.colours.state5},\r\n\t\t\u0027#000000\u0027\r\n\t)", + "type": "expression" + }, + { + "expression": "if({session.custom.alarm_filter.show_running},{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].stroke.width": { + "binding": { + "config": { + "expression": "if({session.custom.alarm_filter.show_running},2,0)" + }, + "type": "expr" + } + }, + "props.elements[2].fill": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\t\u0027#000000\u0027),\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[2].text": { + "binding": { + "config": { + "path": "view.custom.priority" + }, + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 31,26 C 41,36 51,46 61,56 51,66 41,76 31,86 21,76 11,66 1,56 11,46 21,36 31,26 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 2 + }, + "type": "path" + }, + { + "d": "M 61,50 C 61,43.346667 61,36.693333 61,30.04 51,20.026667 41,10.013333 31,0 21,10.013333 11,20.026667 1,30.04 1,36.693333 1,43.346667 1,50 11,40.013333 21,30.026667 31,20.04 41,30.026667 51,40.013333 61,50 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000" + }, + "type": "path" + }, + { + "style": { + "classes": "", + "fontSize": 42, + "fontWeight": "bolder" + }, + "type": "text", + "x": 20, + "y": 70 + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 64 89" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "ErrorStatus_Down" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionDown}" + }, + "type": "expr" + } + }, + "position.display": { + "binding": { + "config": { + "expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionDown} \u0026\u0026 {view.custom.show_error}" + }, + "type": "expr" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].fill.paint": { + "binding": { + "config": { + "path": "view.custom.running_status" + }, + "transforms": [ + { + "expression": "case(\t{value}, \r\n\t\t1, {session.custom.colours.state0},\r\n\t\t2, {session.custom.colours.state0},\r\n\t\t3, {session.custom.colours.state5},\r\n\t\t\u0027#000000\u0027\r\n\t)", + "type": "expression" + }, + { + "expression": "if({session.custom.alarm_filter.show_running},{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[1].stroke.width": { + "binding": { + "config": { + "expression": "if({session.custom.alarm_filter.show_running},2,0)" + }, + "type": "expr" + } + }, + "props.elements[2].fill": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\t\u0027#000000\u0027),\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[2].text": { + "binding": { + "config": { + "path": "view.custom.priority" + }, + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 32,2 C 42,12 52,22 62,32 52,42 42,52 32,62 22,52 12,42 2,32 12,22 22,12 32,2 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000", + "width": 2 + }, + "type": "path" + }, + { + "d": "M 2,38 C 2,44.653333 2,51.306667 2,57.96 12,67.973333 22,77.986667 32,88 42,77.986667 52,67.973333 62,57.96 62,51.306667 62,44.653333 62,38 52,47.986667 42,57.973333 32,67.96 22,57.973333 12,47.986667 2,38 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#000000" + }, + "type": "path" + }, + { + "style": { + "classes": "", + "fontSize": 42, + "fontWeight": "bolder", + "textOrientation": "upright", + "writingMode": "horizontal-tb" + }, + "type": "text", + "x": 20, + "y": 44.5 + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 65 89" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "RunningStatus" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026! {view.params.directionDown},True,False)" + }, + "type": "expr" + } + }, + "position.rotate.angle": { + "binding": { + "config": { + "path": "view.params.directionLeft" + }, + "transforms": [ + { + "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.running_status" + }, + "transforms": [ + { + "expression": "case(\t{value}, \r\n\t\t1, {session.custom.colours.state0},\r\n\t\t2, {session.custom.colours.state0},\r\n\t\t3, {session.custom.colours.state5},\r\n\t\t\u0027#000000\u0027\r\n\t)\r\n\t\t\r\n", + "type": "expression" + } + ], + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 0,70 C 0,56.666667 0,43.333333 0,30 10,20 20,10 30,0 40,10 50,20 60,30 60,43.333333 60,56.666667 60,70 50,60 40,50 30,40 20,50 10,60 0,70 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#4c4c4c", + "width": "2" + }, + "type": "path" + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 61 71" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "RunningStatus_Down" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026\u0026 {view.params.directionDown},True,False)" + }, + "type": "expr" + } + }, + "position.rotate.angle": { + "binding": { + "config": { + "path": "view.params.directionLeft" + }, + "transforms": [ + { + "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.running_status" + }, + "transforms": [ + { + "expression": "case(\t{value}, \r\n\t\t1, {session.custom.colours.state0},\r\n\t\t2, {session.custom.colours.state0},\r\n\t\t3, {session.custom.colours.state5},\r\n\t\t\u0027#000000\u0027\r\n\t)\r\n\t\t\r\n", + "type": "expression" + } + ], + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "m 60,0 c 0,13.333333 0,26.666667 0,40 C 50,50 40,60 30,70 20,60 10,50 0,40 0,26.666667 0,13.333333 0,0 10,10 20,20 30,30 40,20 50,10 60,0 Z", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#4c4c4c", + "width": "2" + }, + "type": "path" + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-0.5 -0.5 61 71" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "view.custom.display_icon" + }, + "type": "property" + } + }, + "props.style.borderStyle": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "solid" + }, + { + "input": false, + "output": "none" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "direction": "column", + "justify": "center", + "style": { + "borderColor": "#FF0000", + "borderWidth": "2px", + "cursor": "pointer" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/THEA/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/THEA/resource.json new file mode 100644 index 0000000..f55e887 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/THEA/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "c1252105d6090b7b6a8b04d518dffbfacdda86a03078de6ed04bfec00613731d" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/THEA/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/THEA/thumbnail.png new file mode 100644 index 0000000..2505281 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/THEA/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/THEA/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/THEA/view.json new file mode 100644 index 0000000..7c71dff --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/THEA/view.json @@ -0,0 +1,623 @@ +{ + "custom": { + "alarm_message": null, + "covert_mode": true, + "disconnected": false, + "display_icon": true, + "error": false, + "isMatch": 0, + "plc": "value", + "priority": 0, + "priority_string": "No active alarms", + "running_status": 0, + "searchId": "value", + "state": 5, + "state_string": "Unknown" + }, + "params": { + "directionLeft": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.alarm_message": { + "persistent": true + }, + "custom.covert_mode": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.disconnected": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}", + "plc": "{view.custom.plc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + }, + "transforms": [ + { + "expression": "if(isNull({value}), False, {value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.display_icon": { + "binding": { + "config": { + "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.error": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.isMatch": { + "binding": { + "config": { + "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": 0, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": 4 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 4, + "output": 1 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.running_status": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceRunningStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 4, + "output": 1 + }, + { + "input": 3, + "output": 2 + }, + { + "input": 2, + "output": 3 + }, + { + "input": 1, + "output": 4 + }, + { + "input": 0, + "output": 5 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, + "params.directionLeft": { + "paramDirection": "input", + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 100, + "width": 100 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "THEA" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.elements[1].elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])", + "type": "expression" + }, + { + "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", + "type": "expression" + } + ], + "type": "property" + } + }, + "props.style.classes": { + "binding": { + "config": { + "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + }, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": 101, + "output": "State-Styles/State101" + }, + { + "input": 102, + "output": "State-Styles/State102" + }, + { + "input": 103, + "output": "State-Styles/State103" + }, + { + "input": 104, + "output": "State-Styles/State104" + }, + { + "input": 105, + "output": "State-Styles/State105" + }, + { + "input": 106, + "output": "State-Styles/State106" + }, + { + "input": 201, + "output": "State-Styles/State201" + }, + { + "input": 202, + "output": "State-Styles/State202" + }, + { + "input": 203, + "output": "State-Styles/State203" + }, + { + "input": 204, + "output": "State-Styles/State204" + }, + { + "input": 205, + "output": "State-Styles/State205" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + } + }, + "props": { + "elements": [ + { + "id": "defs963", + "name": "defs963", + "type": "defs" + }, + { + "elements": [ + { + "d": "M 108.69378,77.205299 A 30.372795,30.372799 0 0 1 78.350262,107.57808 30.372795,30.372799 0 0 1 47.948245,77.263855 30.372795,30.372799 0 0 1 78.23315,46.832627 a 30.372795,30.372799 0 0 1 30.4604,30.255561", + "fill": {}, + "id": "path2823", + "name": "path2823", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "miterlimit": "4", + "paint": "#000000", + "width": "2.30899" + }, + "style": { + "paintOrder": "markers fill stroke" + }, + "type": "path" + }, + { + "elements": [ + { + "elements": [ + { + "elements": [ + { + "d": "m 308.1,277.95 c 0,35.7 -28.9,64.6 -64.6,64.6 -35.7,0 -64.6,-28.9 -64.6,-64.6 0,-35.7 28.9,-64.6 64.6,-64.6 35.7,0 64.6,28.9 64.6,64.6 z m 132.2,-161.9 c 25.8,0 46.7,20.9 46.7,46.7 v 122.4 103.8 c 0,27.5 -22.3,49.8 -49.8,49.8 H 49.8 C 22.3,438.75 0,416.45 0,388.95 v -103.9 -122.3 0 c 0,-25.8 20.9,-46.7 46.7,-46.7 h 93.4 l 4.4,-18.6 c 6.7,-28.8 32.4,-49.2 62,-49.2 h 74.1 c 29.6,0 55.3,20.4 62,49.2 l 4.3,18.6 z m -342.9,67.4 c 0,-12.9 -10.5,-23.4 -23.4,-23.4 -13,0 -23.5,10.5 -23.5,23.4 0,12.9 10.5,23.4 23.4,23.4 13,0.1 23.5,-10.4 23.5,-23.4 z m 261.3,94.5 c 0,-63.6 -51.6,-115.2 -115.2,-115.2 -63.6,0 -115.2,51.6 -115.2,115.2 0,63.6 51.6,115.2 115.2,115.2 63.6,0 115.2,-51.6 115.2,-115.2 z", + "id": "path954", + "name": "path954", + "type": "path" + } + ], + "id": "g956", + "name": "g956", + "type": "group" + } + ], + "id": "g958", + "name": "g958", + "transform": "matrix(0.10552692,0,0,0.1049851,58.573883,61.035557)", + "type": "group" + }, + { + "elements": [ + { + "id": "tspan1770", + "name": "tspan1770", + "stroke": { + "width": "0.60875" + }, + "style": { + "InkscapeFontSpecification": "\u0027sans-serif Bold\u0027", + "fontFamily": "sans-serif", + "fontSize": "12.9867px", + "fontStretch": "normal", + "fontStyle": "normal", + "fontVariant": "normal", + "fontWeight": "bold" + }, + "text": "THEA", + "type": "tspan", + "x": "64.152344", + "y": "64.152351" + } + ], + "id": "text1772", + "name": "text1772", + "stroke": { + "width": "0.60875" + }, + "style": { + "InkscapeFontSpecification": "\u0027sans-serif Bold\u0027", + "fontFamily": "sans-serif", + "fontSize": "12.9867px", + "fontStretch": "normal", + "fontStyle": "normal", + "fontVariant": "normal", + "fontWeight": "bold", + "lineHeight": "1.25" + }, + "type": "text", + "x": "64.152344", + "y": "64.152351" + } + ], + "id": "g2695", + "name": "g2695", + "transform": "matrix(0.78290367,0,0,0.78703031,12.345936,11.651649)", + "type": "group" + } + ], + "id": "g3222", + "name": "g3222", + "transform": "matrix(0.45169465,0,0,0.44391375,-20.878644,-19.304276)", + "type": "group" + } + ], + "fill": { + "paint": "#000000" + }, + "style": {}, + "viewBox": "0 0 29.22 29.22" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.backgroundColor": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/Diagnostic" + }, + { + "input": 2, + "output": "Alarms-Styles/Low" + }, + { + "input": 3, + "output": "Alarms-Styles/Medium" + }, + { + "input": 4, + "output": "Alarms-Styles/High" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.style.color": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "type": "expression" + } + ], + "type": "property" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + }, + "type": "expr" + } + }, + "props.style.classes": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "transforms": [ + { + "fallback": "Disconnects/Device-Connected", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Disconnects/Device-Disconnected" + }, + { + "input": false, + "output": "Disconnects/Device-Connected" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "aspectRatio": "1:1", + "mode": "percent", + "style": { + "cursor": "pointer" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Test/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Test/resource.json new file mode 100644 index 0000000..bfd15de --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Test/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-24T18:54:32Z" + }, + "lastModificationSignature": "f6dabe463c6cf3ddbf10d69b05e49fb8f99e2bab393db27325530d6ad7bc2a21" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Test/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Test/thumbnail.png new file mode 100644 index 0000000..bb9e913 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Test/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Test/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Test/view.json new file mode 100644 index 0000000..ed00255 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Test/view.json @@ -0,0 +1,58 @@ +{ + "custom": {}, + "params": {}, + "props": {}, + "root": { + "children": [ + { + "meta": { + "name": "Icon" + }, + "position": { + "height": 100, + "width": 101, + "x": 148, + "y": 179 + }, + "props": { + "color": "#AC0065", + "path": "material/location_on", + "style": { + "backgroundImage": "", + "classes": "State-Styles/AAA-Style", + "fill": "url(\"/system/images/Backgrounds/hexagons1.svg\")" + } + }, + "type": "ia.display.icon" + }, + { + "meta": { + "name": "Dropdown" + }, + "position": { + "height": 63, + "width": 325, + "x": 157, + "y": 72 + }, + "props": { + "options": [ + { + "label": "This is selected", + "value": "This is selected" + } + ], + "placeholder": { + "text": "" + }, + "value": "This is selected" + }, + "type": "ia.input.dropdown" + } + ], + "meta": { + "name": "root" + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Selected-Symbol-Description/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Selected-Symbol-Description/resource.json new file mode 100644 index 0000000..19f35f2 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Selected-Symbol-Description/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "dmamani", + "timestamp": "2024-01-22T16:06:37Z" + }, + "lastModificationSignature": "7cd833d2c4f5b462f1895fe5812f974ffd26f261ac27df9a6dac5e794407cef4" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Selected-Symbol-Description/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Selected-Symbol-Description/thumbnail.png new file mode 100644 index 0000000..ccc615e Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Selected-Symbol-Description/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Selected-Symbol-Description/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Selected-Symbol-Description/view.json new file mode 100644 index 0000000..9c3a5c9 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Selected-Symbol-Description/view.json @@ -0,0 +1,45 @@ +{ + "custom": {}, + "params": { + "Description": "" + }, + "propConfig": { + "params.Description": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": {}, + "root": { + "children": [ + { + "meta": { + "name": "Description" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.source": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.Description" + }, + "type": "property" + } + } + }, + "type": "ia.display.markdown" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Filter-View/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Filter-View/resource.json new file mode 100644 index 0000000..ace6e9b --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Filter-View/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "dmamani", + "timestamp": "2024-01-23T23:20:40Z" + }, + "lastModificationSignature": "d9ac1a9b586f72361d37e524d4dd39456a29f05d5edbc6e49caa909a95a7afe0" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Filter-View/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Filter-View/thumbnail.png new file mode 100644 index 0000000..c8b12b7 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Filter-View/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Filter-View/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Filter-View/view.json new file mode 100644 index 0000000..26801a2 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Filter-View/view.json @@ -0,0 +1,109 @@ +{ + "custom": {}, + "params": { + "Categories": [], + "SelectedRow": null + }, + "propConfig": { + "params.Categories": { + "paramDirection": "inout", + "persistent": true + }, + "params.SelectedRow": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 390 + } + }, + "root": { + "children": [ + { + "events": { + "component": { + "onRowClick": { + "config": { + "script": "\tparams \u003d {\u0027UserClickData\u0027: self.props.selection.data[0].Category}\n\tsystem.perspective.sendMessage(\"UserClickCategory\", payload \u003d params, scope \u003d \"page\")\n\tsystem.perspective.print(params)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Table" + }, + "position": { + "basis": "400px" + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.Categories" + }, + "type": "property" + } + }, + "props.selection.data[0].Category": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.SelectedRow" + }, + "type": "property" + } + } + }, + "props": { + "enableHeader": false, + "filter": { + "enabled": true + } + }, + "type": "ia.display.table" + } + ], + "meta": { + "contextMenu": { + "items": [ + { + "children": [], + "icon": { + "color": "", + "path": "", + "style": {} + }, + "link": { + "target": "self", + "url": "" + }, + "message": { + "payload": {}, + "scope": "page", + "type": "" + }, + "method": { + "name": "", + "params": {} + }, + "style": { + "classes": "" + }, + "text": "menu-item", + "type": "link" + } + ] + }, + "name": "root" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Icons-View/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Icons-View/resource.json new file mode 100644 index 0000000..9a8ebca --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Icons-View/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "dmamani", + "timestamp": "2024-01-22T16:06:37Z" + }, + "lastModificationSignature": "f92ab33fdb2300cbc7961ac9892e5071ed567ce6b3d4d35453944d9df27d6e50" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Icons-View/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Icons-View/thumbnail.png new file mode 100644 index 0000000..1cd1d73 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Icons-View/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Icons-View/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Icons-View/view.json new file mode 100644 index 0000000..98e8b42 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Icons-View/view.json @@ -0,0 +1,384 @@ +{ + "custom": {}, + "params": { + "Dataset": [ + { + "path": "Symbol-Views/Device-Views/DeviceStatus" + }, + { + "path": "Symbol-Views/Device-Views/DeviceStatus_old" + }, + { + "path": "Symbol-Views/Device-Views/Estop" + }, + { + "path": "Symbol-Views/Equipment-Views/ARSAW" + }, + { + "path": "Symbol-Views/Equipment-Views/AUS" + }, + { + "path": "Symbol-Views/Equipment-Views/Camera" + }, + { + "path": "Symbol-Views/Equipment-Views/ControlCabinet" + }, + { + "path": "Symbol-Views/Equipment-Views/Estop" + }, + { + "path": "Symbol-Views/Equipment-Views/GoodsLift" + }, + { + "path": "Symbol-Views/Equipment-Views/JAM" + }, + { + "path": "Symbol-Views/Equipment-Views/Light_Curtain" + }, + { + "path": "Symbol-Views/Equipment-Views/Main_Panel" + }, + { + "path": "Symbol-Views/Equipment-Views/Network" + }, + { + "path": "Symbol-Views/Equipment-Views/Pointer" + }, + { + "path": "Symbol-Views/Equipment-Views/PressureSwitch" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord_End" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord_Line" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord_Line_Vertical" + }, + { + "path": "Symbol-Views/Equipment-Views/RFID" + }, + { + "path": "Symbol-Views/Equipment-Views/Robot" + }, + { + "path": "Symbol-Views/Equipment-Views/SLAMs" + }, + { + "path": "Symbol-Views/Equipment-Views/SafetyGate" + }, + { + "path": "Symbol-Views/Equipment-Views/Stacker_Destacker" + }, + { + "path": "Symbol-Views/Equipment-Views/Status" + }, + { + "path": "Symbol-Views/Equipment-Views/StatusNonPowered" + }, + { + "path": "Symbol-Views/Equipment-Views/StatusNonPowered_NS" + }, + { + "path": "Symbol-Views/Equipment-Views/Status_NS" + }, + { + "path": "Symbol-Views/Equipment-Views/THEA" + }, + { + "path": "Symbol-Views/Equipment-Views/Test" + } + ], + "FilteredViews": [ + { + "Name": "ARSAW", + "Path": "Symbol-Views/Equipment-Views/ARSAW", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "AUS", + "Path": "Symbol-Views/Equipment-Views/AUS", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "Camera", + "Path": "Symbol-Views/Equipment-Views/Camera", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "ControlCabinet", + "Path": "Symbol-Views/Equipment-Views/ControlCabinet", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "Estop", + "Path": "Symbol-Views/Equipment-Views/Estop", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "GoodsLift", + "Path": "Symbol-Views/Equipment-Views/GoodsLift", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "JAM", + "Path": "Symbol-Views/Equipment-Views/JAM", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "Light_Curtain", + "Path": "Symbol-Views/Equipment-Views/Light_Curtain", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "Main_Panel", + "Path": "Symbol-Views/Equipment-Views/Main_Panel", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "Network", + "Path": "Symbol-Views/Equipment-Views/Network", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "Pointer", + "Path": "Symbol-Views/Equipment-Views/Pointer", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "PressureSwitch", + "Path": "Symbol-Views/Equipment-Views/PressureSwitch", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "PullChord", + "Path": "Symbol-Views/Equipment-Views/PullChord", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "PullChord_End", + "Path": "Symbol-Views/Equipment-Views/PullChord_End", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "PullChord_Line", + "Path": "Symbol-Views/Equipment-Views/PullChord_Line", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "PullChord_Line_Vertical", + "Path": "Symbol-Views/Equipment-Views/PullChord_Line_Vertical", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "RFID", + "Path": "Symbol-Views/Equipment-Views/RFID", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "Robot", + "Path": "Symbol-Views/Equipment-Views/Robot", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "SLAMs", + "Path": "Symbol-Views/Equipment-Views/SLAMs", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "SafetyGate", + "Path": "Symbol-Views/Equipment-Views/SafetyGate", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "Stacker_Destacker", + "Path": "Symbol-Views/Equipment-Views/Stacker_Destacker", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "Status", + "Path": "Symbol-Views/Equipment-Views/Status", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "StatusNonPowered", + "Path": "Symbol-Views/Equipment-Views/StatusNonPowered", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "StatusNonPowered_NS", + "Path": "Symbol-Views/Equipment-Views/StatusNonPowered_NS", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "Status_NS", + "Path": "Symbol-Views/Equipment-Views/Status_NS", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Name": "THEA", + "Path": "Symbol-Views/Equipment-Views/THEA", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + } + ], + "SelectedValue": "", + "key": "" + }, + "propConfig": { + "params.Dataset": { + "paramDirection": "input", + "persistent": true + }, + "params.FilteredViews": { + "paramDirection": "input", + "persistent": true + }, + "params.SelectedValue": { + "paramDirection": "inout", + "persistent": true + }, + "params.key": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 650, + "width": 1165 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "ViewRepeater" + }, + "position": { + "basis": "1px", + "grow": 1 + }, + "propConfig": { + "props.instances": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.FilteredViews" + }, + "type": "property" + } + } + }, + "props": { + "alignContent": "flex-start", + "alignItems": "flex-start", + "elementPosition": { + "basis": "auto" + }, + "elementStyle": { + "classes": "Framework/Cards/Title" + }, + "justify": "center", + "path": "Symbol-Views/Symbol-Library-Views/Symbol", + "style": { + "gap": "20px", + "overflow": "hidden" + }, + "wrap": "wrap" + }, + "type": "ia.display.flex-repeater" + } + ], + "meta": { + "name": "root" + }, + "props": { + "alignItems": "center", + "justify": "space-evenly", + "wrap": "wrap" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Information-View/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Information-View/resource.json new file mode 100644 index 0000000..e16474e --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Information-View/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "dmamani", + "timestamp": "2024-01-22T16:06:37Z" + }, + "lastModificationSignature": "350db1b8a0e056a423e65bce5ad2234b1c91d167ffe7331f75d27ac283093ec5" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Information-View/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Information-View/thumbnail.png new file mode 100644 index 0000000..575140c Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Information-View/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Information-View/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Information-View/view.json new file mode 100644 index 0000000..4e10d2d --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol-Information-View/view.json @@ -0,0 +1,46 @@ +{ + "custom": {}, + "params": { + "Information": "" + }, + "propConfig": { + "params.Information": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": {}, + "root": { + "children": [ + { + "meta": { + "name": "Markdown" + }, + "position": { + "basis": "200px", + "grow": 1 + }, + "propConfig": { + "props.source": { + "binding": { + "config": { + "bidirectional": true, + "path": "view.params.Information" + }, + "type": "property" + } + } + }, + "type": "ia.display.markdown" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "justify": "space-evenly" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol/resource.json new file mode 100644 index 0000000..ae8a606 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "dmamani", + "timestamp": "2024-01-22T16:40:00Z" + }, + "lastModificationSignature": "b1c6b7a732e7621b2fa95398d0bddc40a4657536c15035ced3472dd6e9bbf0a0" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol/thumbnail.png new file mode 100644 index 0000000..ef83536 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol/view.json new file mode 100644 index 0000000..d1e6e65 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/Symbol/view.json @@ -0,0 +1,155 @@ +{ + "custom": {}, + "params": { + "Name": "", + "Path": "", + "forceFault": null, + "forceRunning": null + }, + "propConfig": { + "params.Name": { + "binding": { + "config": { + "path": "view.params.Path" + }, + "transforms": [ + { + "code": "\tstring \u003d value \n\tparts \u003d string.split(\"/\")\n\td \u003d parts[-1]\n\treturn d\n\treturn value", + "type": "script" + } + ], + "type": "property" + }, + "paramDirection": "inout", + "persistent": true + }, + "params.Path": { + "paramDirection": "inout", + "persistent": true + }, + "params.forceFault": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunning": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 131, + "width": 120 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "EmbeddedView", + "tooltip": {} + }, + "position": { + "basis": "100px", + "grow": 1 + }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "path": "view.params.Path" + }, + "type": "property" + } + }, + "props.params.forceFaultStatus": { + "binding": { + "config": { + "path": "view.params.forceFault" + }, + "type": "property" + } + }, + "props.params.forceRunningStatus": { + "binding": { + "config": { + "path": "view.params.forceRunning" + }, + "type": "property" + } + }, + "props.path": { + "binding": { + "config": { + "path": "view.params.Path" + }, + "type": "property" + } + } + }, + "props": { + "key": "value", + "style": { + "height": "80px", + "pointerEvents": "none", + "width": "80px" + } + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "1px", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.Name" + }, + "type": "property" + } + } + }, + "props": { + "alignVertical": "top", + "textStyle": { + "fontSize": 8, + "overflowWrap": "break-word", + "textAlign": "center", + "textOverflow": "ellipsis" + } + }, + "type": "ia.display.label" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\t# Send message for and print on system the selected path. \n\tparams \u003d {\u0027UserClickPath\u0027: self.view.params.Path, \u0027UserClickSymbolName\u0027 : self.view.params.Name}\n\tsystem.perspective.sendMessage(\"UserClickInfo\", payload \u003d params, scope \u003d \"page\")\n\tsystem.perspective.print(params)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root" + }, + "props": { + "alignItems": "center", + "direction": "column", + "justify": "center", + "style": { + "classes": "Background-Styles/Grey-Background", + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/SymbolLibraryMain/resource.json b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/SymbolLibraryMain/resource.json new file mode 100644 index 0000000..28de66f --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/SymbolLibraryMain/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-26T14:19:01Z" + }, + "lastModificationSignature": "5e118f08c6c4cae5cbe3b1232ad78701a2ea115b78ca04f19a4af7059e7f321b" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/SymbolLibraryMain/thumbnail.png b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/SymbolLibraryMain/thumbnail.png new file mode 100644 index 0000000..218c775 Binary files /dev/null and b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/SymbolLibraryMain/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/SymbolLibraryMain/view.json b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/SymbolLibraryMain/view.json new file mode 100644 index 0000000..3f0cd71 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Symbol-Views/Symbol-Library-Views/SymbolLibraryMain/view.json @@ -0,0 +1,1142 @@ +{ + "custom": { + "key": { + "alt_pageid": "library", + "pageid": "library", + "start_time": { + "$": [ + "ts", + 192, + 1702653666845 + ], + "$ts": 1702653102761 + } + } + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\t#############################################################################################\n\t# Purpose:\tThis script searches the current views in the parent project. Script compares \t#\n\t#\t\t\tthe information from S3 to make sure the correct paths and information is\t\t#\n\t#\t\t\tdisplayed to the child objects. Where the path is the key for the JSON\t\t\t#\n\t# Login: \t\t\tDate:\t\t\t\t#Comment:\t\t\t\t\t\t\t\tVersion:\t# \n\t# dmamani\t\t\t1/4/23\t\t\t\tRelease to Production\t\t\t\t\tV1\t\t\t#\n\t# \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#\n\t#############################################################################################\n\t\t\n\t# - Params to Force Filters to show all symbols on the custom properties\n\tself.session.custom.alarm_filter.show_running \u003d True\n\tself.session.custom.alarm_filter.show_safety \u003d True\n\tself.session.custom.alarm_filter.show_diagnostic \u003d True\n\tself.session.custom.alarm_filter.show_gateways \u003d True\n\tself.session.custom.alarm_filter.show_low_alarm \u003d True\n\tfrom SymbolLibrary import list_categories, fetch_library, update_symbol_library\n\t# - Default Symbol JSON structure definitions\n\tdefault_symbol_info \u003d {\"description\": \"\",\t\"name\": \"\",\t\"category\": \"\",\"info\": \"\"} \n\t# - Get all Symbol Views and write them to tags\n\tproject_info \u003d system.perspective.getProjectInfo()\n\tviews \u003d project_info.get(\u0027views\u0027,[])\n\t# - Define criterias\n\tfilter_criterion \u003d \"Symbol-Views\"\n\tfilter_criterion2 \u003d \"Symbol-Library-Views\"\n\tfilter_criterion3 \u003d \"Controller-Views\"\n\tfilter_criterion4 \u003d \"Symbol-Views/Equipment-Views/Test\"\n\t# - Filter views that are not necessary for the symbol library and ensure the correct path\n\tfiltered_views \u003d [\n\t\tview for view in views \n\t\tif filter_criterion in view.get(\u0027path\u0027,\u0027\u0027) \n\t\tand not filter_criterion2 in view.get(\u0027path\u0027,\u0027\u0027) \n\t\tand not filter_criterion3 in view.get(\u0027path\u0027,\u0027\u0027)\n\t\tand not filter_criterion4 in view.get(\u0027path\u0027,\u0027\u0027)\n\t\t]\n\t# - Create JSON from the list \n\tjson_structure \u003d []\n\tsymbol_view_list \u003d []\n\tfor view in filtered_views:\n\t\tinstance \u003d {\n\t\t\t\"instanceStyle\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t},\n\t\t\t\"instancePosition\": {},\n\t\t\t\"Path\": view.get(\u0027path\u0027,\u0027\u0027),\n\t\t\t\"forceRunning\": 3,\n\t\t\t\"forceFault\": None\n\t\t}\n\t\tjson_structure.append(instance)\n\t\tsymbol_view_list.append(view.get(\u0027path\u0027,\u0027\u0027))\n\tjson_structure.sort(key \u003d lambda x:x[\u0027Path\u0027].split(\"/\")[len(x[\u0027Path\u0027].split(\"/\"))-1])\n\t# - Encode JSON for igniton variables to populate correctly\n\tjson_result \u003d system.util.jsonEncode(json_structure)\n\tself.params.Dataset \u003d filtered_views\n\tself.params.FilteredViews \u003d json_structure\n\tsystem.perspective.print(filtered_views)\n\t\n\t# - Get all Symbol Categories from JSON Dictionary\t\n\tremote_json \u003d fetch_library(username\u003dself.session.props.auth.user.userName)\n\tfor path in json_structure:\n\t\tif path[\"Path\"] not in remote_json:\n\t\t\tupdate_symbol_library(path[\"Path\"], username\u003dself.session.props.auth.user.userName, **default_symbol_info)\n\t\t\tremote_json[path[\"Path\"]] \u003d default_symbol_info\n\t# - Remove by key in case symbol does not exist in Folder Structure\n\tself.params.SymbolLibrary \u003d {k: v for k, v in remote_json.items() if k in symbol_view_list}\n\tcategory_data \u003d [{\"Category\": category} for category in list_categories(self.params.SymbolLibrary)]\n\tself.params.CategoryList \u003d category_data\n" + }, + "scope": "G", + "type": "script" + } + } + }, + "params": { + "CategoryList": [ + { + "Category": "ALL" + }, + { + "Category": "Control" + }, + { + "Category": "Device Status" + }, + { + "Category": "Equipment Status" + }, + { + "Category": "Field Device" + }, + { + "Category": "Machine" + }, + { + "Category": "Network" + }, + { + "Category": "Not in use" + }, + { + "Category": "Safety" + } + ], + "SelectedCategory": "", + "SelectedDescription": "", + "SelectedInfo": "", + "SelectedPath": "", + "SelectedRow": "ALL", + "SymbolDetails": { + "ARSAW": { + "category": "", + "description": "", + "info": "Test", + "path": "Symbol-Views/Equipment-Views/ARSAW" + }, + "AUS": { + "category": "A", + "description": "AUS DESCRIPTION AUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTIONAUS DESCRIPTION", + "info": "AUS INFO AUS INFO AUS INFO AUS INFO AUS INFO AUS INFO AUS INFO AUS INFO AUS INFO AUS INFO ", + "path": "Symbol-Views/Equipment-Views/AUS" + }, + "Camera": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/Camera" + }, + "ControlCabinet": { + "category": "", + "description": "", + "info": "### Symbol Information\nDate Created: 12/20/21\n\nCreated By: amazonuser\n\nSize: 10X10", + "path": "Symbol-Views/Equipment-Views/ControlCabinet" + }, + "DeviceStatus": { + "category": "B", + "description": "", + "info": "", + "path": "Symbol-Views/Device-Views/DeviceStatus" + }, + "DeviceStatus_old": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Device-Views/DeviceStatus_old" + }, + "Estop": { + "category": "C", + "description": "E-stop description, E-stop description, E-stop description, E-stop description, E-stop description", + "info": "E-stop info, E-stop info, E-stop info, E-stop info, E-stop info, E-stop info, E-stop info", + "path": "Symbol-Views/Equipment-Views/Estop" + }, + "GoodsLift": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/GoodsLift" + }, + "JAM": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/JAM" + }, + "Light_Curtain": { + "category": "B", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/Light_Curtain" + }, + "Main_Panel": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/Main_Panel" + }, + "Network": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/Network" + }, + "Pointer": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/Pointer" + }, + "PressureSwitch": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/PressureSwitch" + }, + "PullChord": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/PullChord" + }, + "PullChord_End": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/PullChord_End" + }, + "PullChord_Line": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/PullChord_Line" + }, + "PullChord_Line_Vertical": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/PullChord_Line_Vertical" + }, + "RFID": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/RFID" + }, + "Robot": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/Robot" + }, + "SLAMs": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/SLAMs" + }, + "SafetyGate": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/SafetyGate" + }, + "Stacker_Destacker": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/Stacker_Destacker" + }, + "Status": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/Status" + }, + "StatusNonPowered": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/StatusNonPowered" + }, + "StatusNonPowered_NS": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/StatusNonPowered_NS" + }, + "Status_NS": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/Status_NS" + }, + "THEA": { + "category": "", + "description": "", + "info": "", + "path": "Symbol-Views/Equipment-Views/THEA" + } + }, + "SymbolLibrary": { + "Symbol-Views/Device-Views/DeviceStatus": { + "category": "Device Status", + "description": "The Area status symbol, displaying different colors for running state\n\n", + "info": "### Device Status\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- width: 0.0146, height: 0.0565\n\n### Symbol Category\nDevice Status ", + "name": "DeviceStatus" + }, + "Symbol-Views/Device-Views/DeviceStatus_old": { + "category": "Not in use", + "description": "Deprecated", + "info": "### Symbol Information \n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- width: 0.0146, height: 0.0565\n\n### Symbol Category\nNot In use", + "name": "DeviceStatus_old" + }, + "Symbol-Views/Device-Views/Estop": { + "category": "Safety", + "description": "Standard symbol for an e-stop device in the field or on the control cabinet Initiated by a human action and is intended to shut down equipment in the case of an emergency. The emergency stop device is a manual control device. It is the method of initiating the emergency stop function.", + "info": "### Symbol Information \n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.0104, Height: 0.0185\n\n### Symbol Category\nSafety", + "name": "Estop" + }, + "Symbol-Views/Equipment-Views/ARSAW": { + "category": "Machine", + "description": "Amazon Robotics Semi Automated Workstation or ARSAW is a machine used in Amazon Robotics (AR) sortable buildings for the primary purpose of picking inventory items from the AR fields. An associate would pick items assigned to them on a VDU screen which would be scanned and transferred to pre-scanned totes stacked in a row along a flow rack. There are 5 totes per flow rack, once each tote is filled, it can be pushed through to the take away conveyor to be lifted by a four position carriage system. The tote would be then transferred across to a trunk conveyor for subsequent order consolidation.", + "info": "### ARSAW\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nMachine ", + "name": "ARSAW" + }, + "Symbol-Views/Equipment-Views/AUS": { + "category": "Machine", + "description": "Amazon Universal Sorter (AUS); a modular high-density matrix sorter which includes integrated container management. The AUS is wholly owned by Amazon and developed using commodity components which are already being maintained by RME", + "info": "### AUS\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nMachine ", + "name": "AUS" + }, + "Symbol-Views/Equipment-Views/Camera": { + "category": "Field Device", + "description": "Generic Camera Symbol for any Cameras used in the process flow of product", + "info": "### Camera\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nField Device", + "name": "Camera" + }, + "Symbol-Views/Equipment-Views/CognexCamera": { + "category": "Device Status", + "description": "OR ELSE", + "info": "DELETE THIS ", + "name": "" + }, + "Symbol-Views/Equipment-Views/ControlCabinet": { + "category": "Control", + "description": "Generic Control Cabinet for any panel used in the design ", + "info": "### Control Cabinet\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Remote control cabinets must use the following dimensions for smaller gateways width: 0.0104, height: 0.0185.\n- For larger remote panels width:0.013, height: 0.0185.\n\n### Symbol Category\nControl", + "name": "ControlCabinet" + }, + "Symbol-Views/Equipment-Views/Estop": { + "category": "Safety", + "description": "Standard symbol for an e-stop device in the field or on the control cabinet Initiated by a human action and is intended to shut down equipment in the case of an emergency. The emergency stop device is a manual control device. It is the method of initiating the emergency stop function..", + "info": "### E-STOP\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.0104, Height: 0.0185\n\n### Symbol Category\nSafety", + "name": "Estop" + }, + "Symbol-Views/Equipment-Views/GoodsLift": { + "category": "Machine", + "description": "Goods lifts or \"vertical reciprocating conveyors\" (VRCs) are systems which functionality is to move inventory or non-inventory between floor levels. In TNS buildings, they are a key player in the building throughput, as they are intended and used to move inventory to fill or empty the TNS pick tower. \n\nIn ARS buildings, they are used to move non-inventory (spares), non-conveyable items or even inventory as a contingency to conveyor capacity in the event of equipment failure. ", + "info": "### Goodslift\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nMachine ", + "name": "GoodsLift" + }, + "Symbol-Views/Equipment-Views/JAM": { + "category": "Device Status", + "description": "Jam indicator that initiate downtime events. ", + "info": "### Jam\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- width: 0.0146, height: 0.0565\n\n### Symbol Category\nDevice Status", + "name": "JAM" + }, + "Symbol-Views/Equipment-Views/Light_Curtain": { + "category": "Safety", + "description": "A safety device used when light beams are obstructed and the outputs turn off, which signals a stop to the associated hazardous movement(s).", + "info": "### Light Curtain\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.0104, Height: 0.0185\n\n### Symbol Category\nSafety", + "name": "Light_Curtain" + }, + "Symbol-Views/Equipment-Views/Main_Panel": { + "category": "Control", + "description": "Generic Control Cabinet for any panel used in the design ", + "info": "### Panel\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- width:0.013, height: 0.0185.\n\n### Symbol Category\nControl", + "name": "Main_Panel" + }, + "Symbol-Views/Equipment-Views/Network": { + "category": "Network", + "description": "Symbol used to display a Network Panel used in industrial control environments or as a remote network panel for other devices that need to be in the same network. ", + "info": "### Camera\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nField Device", + "name": "Network" + }, + "Symbol-Views/Equipment-Views/Pointer": { + "category": "Device Status", + "description": "The Pointer status symbol, displaying different colors for running state.\n\n", + "info": "### Pointer\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- width: 0.0146, height: 0.0565\n\n### Symbol Category\nDevice Status ", + "name": "Pointer" + }, + "Symbol-Views/Equipment-Views/PressureSwitch": { + "category": "Field Device", + "description": "Symbol for Pressure switches in the field, controlling the activation and deactivation of pumps in fluid systems when pressure thresholds are reached. They are also used in process control systems for maintaining steady pneumatic or mechanical pressure.", + "info": "### Pressure Switch\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- width:0.013, height: 0.0185.\n\n### Symbol Category\nField Device", + "name": "PressureSwitch" + }, + "Symbol-Views/Equipment-Views/PullChord": { + "category": "Safety", + "description": "Cable-pull safety rope switches allow operators to initiate an E-stop from any point along the installed cable length, providing protection for exposed conveyors or machines, or wherever equipment cannot be protected by guards.", + "info": "### Pullchord\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nSafety", + "name": "PullChord" + }, + "Symbol-Views/Equipment-Views/PullChord_End": { + "category": "Safety", + "description": "Cable-pull safety rope switches allow operators to initiate an E-stop from any point along the installed cable length, providing protection for exposed conveyors or machines, or wherever equipment cannot be protected by guards.", + "info": "### Pull Chord - END\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nMachine ", + "name": "PullChord_End" + }, + "Symbol-Views/Equipment-Views/PullChord_Line": { + "category": "Safety", + "description": "Cable-pull safety rope switches allow operators to initiate an E-stop from any point along the installed cable length, providing protection for exposed conveyors or machines, or wherever equipment cannot be protected by guards.", + "info": "### Pullchord Line\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nSafety", + "name": "PullChord_Line" + }, + "Symbol-Views/Equipment-Views/PullChord_Line_Vertical": { + "category": "Safety", + "description": "Cable-pull safety rope switches allow operators to initiate an E-stop from any point along the installed cable length, providing protection for exposed conveyors or machines, or wherever equipment cannot be protected by guards.", + "info": "\n### Pullchord\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nSafety", + "name": "PullChord_Line_Vertical" + }, + "Symbol-Views/Equipment-Views/RFID": { + "category": "Field Device", + "description": "Symbols for RFID devices. There is a device that reads information contained in a wireless device or “tag” from a distance without making any physical contact or requiring a line of sight.", + "info": "###RFID \n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- width: 0.0146, height: 0.0565\n\n### Symbol Category\nField Device", + "name": "RFID" + }, + "Symbol-Views/Equipment-Views/Robot": { + "category": "Machine", + "description": "Symbol for Robots used in FC\u0027s. One example would be the RWC4. Robotic Work Cell 4 (RWC4) is the Robotic Tote Palletizer seen in IXDs and FCs which is a robotic arm that eliminates the manual tote stacking process at the end of Transship lanes by physically and virtually palletizing totes by destination. In addition to the process efficiency gains, a RWC4 improves Amazonian safety by minimizing the bending/twisting motion associated with manual palletizing. ", + "info": "###Robot\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nMachine ", + "name": "Robot" + }, + "Symbol-Views/Equipment-Views/SLAMs": { + "category": "Machine", + "description": "Symbol used for SLAMs in FC\u0027s. SLAM (Scan/Label/Apply/Manifest) line is to collect package data including weight, dimensions, and barcode data, transmit this data to the Warehouse Management System (WMS) which performs various pre-ship validations to ensure the package has the correct items, labeling, and packaging. If all validations pass, a shipping label is printed and applied to the package via a Label Print and Apply unit (LPA), also called the printer assembly. Finally, the SPOO and shipping labels are scanned to confirm that the correct shipping label has been applied to the package. If the package fails any portion of the verification process it will be rejected at the kick-out line. ", + "info": "### SLAM \n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nMachine ", + "name": "SLAMs" + }, + "Symbol-Views/Equipment-Views/SafetyGate": { + "category": "Safety", + "description": "Access gate symbol that provides protection from falling regardless of the position of the doors.", + "info": "### Safety Gate\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nSafety", + "name": "SafetyGate" + }, + "Symbol-Views/Equipment-Views/Stacker_Destacker": { + "category": "", + "description": "", + "info": "### Tote Stacker \u0026 Destacker\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nMachine ", + "name": "Stacker_Destacker" + }, + "Symbol-Views/Equipment-Views/Status": { + "category": "Equipment Status", + "description": "", + "info": "### Status\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- width: 0.0146, height: 0.0565\n\n### Symbol Category\nEquipment Status ", + "name": "Status" + }, + "Symbol-Views/Equipment-Views/StatusNonPowered": { + "category": "Equipment Status", + "description": "Test ", + "info": "### Status Non Powered\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- width: 0.0146, height: 0.0565\n\n### Symbol Category\nEquipment Status ", + "name": "StatusNonPowered" + }, + "Symbol-Views/Equipment-Views/StatusNonPowered_NS": { + "category": "Equipment Status", + "description": "", + "info": "### Status Non Powered North and South\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- width: 0.0146, height: 0.0565\n\n### Symbol Category\nEquipment Status ", + "name": "StatusNonPowered_NS" + }, + "Symbol-Views/Equipment-Views/Status_NS": { + "category": "Equipment Status", + "description": "", + "info": "### Status North and South \n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- width: 0.0146, height: 0.0565\n\n### Symbol Category\nEquipment Status ", + "name": "Status_NS" + }, + "Symbol-Views/Equipment-Views/THEA": { + "category": "Machine", + "description": "THEA ", + "info": "### THEA\n\nDate Created: \n- 12/20/21\n\nCreated By: \n- MAP Team\n\nDimensions: \n- Width: 0.026, height :0.0463\n\n### Symbol Category\nMachine ", + "name": "THEA" + } + } + }, + "propConfig": { + "custom.key": { + "persistent": true + }, + "params.CategoryList": { + "binding": { + "config": { + "bidirectional": true, + "path": "/root/Dashboard.props.widgets[0].viewParams.Categories" + }, + "type": "property" + }, + "paramDirection": "inout", + "persistent": true + }, + "params.Dataset": { + "binding": { + "config": { + "path": "/root/Dashboard.props.widgets[3].viewParams.Dataset" + }, + "type": "property" + } + }, + "params.FilteredViews": { + "binding": { + "config": { + "bidirectional": true, + "path": "/root/Dashboard.props.widgets[3].viewParams.FilteredViews" + }, + "type": "property" + } + }, + "params.SelectedCategory": { + "paramDirection": "input", + "persistent": true + }, + "params.SelectedDescription": { + "binding": { + "config": { + "bidirectional": true, + "path": "/root/Dashboard.props.widgets[1].viewParams.Description" + }, + "type": "property" + }, + "paramDirection": "inout", + "persistent": true + }, + "params.SelectedInfo": { + "binding": { + "config": { + "bidirectional": true, + "path": "/root/Dashboard.props.widgets[2].viewParams.Information" + }, + "type": "property" + }, + "paramDirection": "inout", + "persistent": true + }, + "params.SelectedPath": { + "paramDirection": "input", + "persistent": true + }, + "params.SelectedRow": { + "onChange": { + "enabled": null, + "script": "\tfrom SymbolLibrary import search_items\n\tsystem.perspective.print(currentValue.value)\n\titems \u003d [{\t\"instanceStyle\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t\t},\n\t\t\t\t\t\"instancePosition\": {},\n\t\t\t\t\t\"forceRunning\": 3,\n\t\t\t\t\t\"forceFault\": None,\n\t\t\t\t\"Path\": item} for item in search_items(self.params.SymbolLibrary,currentValue.value)]\n\tsystem.perspective.print(items)\n\tself.params.FilteredViews \u003d items\n\t\n\t" + }, + "paramDirection": "inout", + "persistent": true + }, + "params.SymbolDetails": { + "binding": { + "config": { + "path": "" + }, + "enabled": false, + "transforms": [ + { + "code": "\tfrom SymbolLibrary import library_items\n\treturn library_items", + "type": "script" + } + ], + "type": "property" + }, + "paramDirection": "inout", + "persistent": true + }, + "params.SymbolLibrary": { + "binding": { + "config": { + "path": "/root/Dashboard.props.widgets[3].viewParams.SymbolLibrary" + }, + "type": "property" + }, + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 786, + "width": 1196 + } + }, + "root": { + "children": [ + { + "events": { + "dom": { + "onDoubleClick": { + "config": { + "draggable": true, + "id": "editItem", + "modal": false, + "overlayDismiss": false, + "resizable": true, + "showCloseIcon": true, + "type": "open", + "viewParams": { + "btnTextPrimary": "Submit Changes", + "btnTextSecondary": "", + "editField1": "{view.params.SelectedCategory}", + "editField2": "{view.params.SelectedInfo}", + "editField3": "{view.params.SelectedDescription}", + "field1Description": "Category", + "field2Description": "Information", + "field3Description": "Description", + "message": " ", + "path": "{view.params.SelectedPath}", + "showCloseBtn": "False", + "title": "Update Symbol Details" + }, + "viewPath": "PopUp-Views/EditItem", + "viewportBound": false + }, + "scope": "C", + "type": "popup" + } + } + }, + "meta": { + "name": "Dashboard" + }, + "position": { + "basis": "400px", + "grow": 1 + }, + "propConfig": { + "props.widgets[0].viewParams.Dataset": { + "binding": { + "config": { + "path": "view.params.Dataset" + }, + "type": "property" + } + } + }, + "props": { + "editingToggle": false, + "stretch": { + "rowCount": 5 + }, + "widgets": [ + { + "body": { + "style": { + "classes": "" + } + }, + "header": { + "enabled": true, + "style": { + "classes": "" + }, + "title": "Category" + }, + "isConfigurable": false, + "minSize": { + "columnSpan": 1, + "rowSpan": 1 + }, + "name": "Category", + "position": { + "columnEnd": 3, + "columnStart": 1, + "rowEnd": 3, + "rowStart": 1 + }, + "style": { + "classes": "" + }, + "viewParams": { + "Categories": [ + { + "Category": "ALL" + }, + { + "Category": "Control" + }, + { + "Category": "Device Status" + }, + { + "Category": "Equipment Status" + }, + { + "Category": "Field Device" + }, + { + "Category": "Machine" + }, + { + "Category": "Network" + }, + { + "Category": "Not in use" + }, + { + "Category": "Safety" + } + ], + "SelectedRow": "" + }, + "viewPath": "Symbol-Views/Symbol-Library-Views/Symbol-Filter-View" + }, + { + "body": { + "style": { + "classes": "" + } + }, + "header": { + "enabled": true, + "style": { + "classes": "" + }, + "title": "Symbol Description" + }, + "isConfigurable": false, + "minSize": { + "columnSpan": 1, + "rowSpan": 1 + }, + "name": "Description", + "position": { + "columnEnd": 9, + "columnStart": 3, + "rowEnd": 6, + "rowStart": 4 + }, + "style": { + "classes": "" + }, + "viewParams": { + "Description": "" + }, + "viewPath": "Symbol-Views/Symbol-Library-Views/Selected-Symbol-Description" + }, + { + "body": { + "style": { + "classes": "" + } + }, + "header": { + "enabled": true, + "style": { + "classes": "" + }, + "title": "Symbol Information" + }, + "isConfigurable": false, + "minSize": { + "columnSpan": 1, + "rowSpan": 1 + }, + "name": "Information", + "position": { + "columnEnd": 3, + "columnStart": 1, + "rowEnd": 6, + "rowStart": 3 + }, + "style": { + "classes": "" + }, + "viewParams": { + "Information": "" + }, + "viewPath": "Symbol-Views/Symbol-Library-Views/Symbol-Information-View" + }, + { + "body": { + "style": { + "classes": "" + } + }, + "header": { + "enabled": true, + "style": { + "classes": "" + }, + "title": "Symbol Library - All Available Symbols" + }, + "isConfigurable": false, + "minSize": { + "columnSpan": 1, + "rowSpan": 1 + }, + "name": "Description", + "position": { + "columnEnd": 9, + "columnStart": 3, + "rowEnd": 4, + "rowStart": 1 + }, + "style": { + "classes": "" + }, + "viewParams": { + "Dataset": [ + { + "path": "Symbol-Views/Device-Views/DeviceStatus" + }, + { + "path": "Symbol-Views/Device-Views/DeviceStatus_old" + }, + { + "path": "Symbol-Views/Device-Views/Estop" + }, + { + "path": "Symbol-Views/Equipment-Views/ARSAW" + }, + { + "path": "Symbol-Views/Equipment-Views/AUS" + }, + { + "path": "Symbol-Views/Equipment-Views/Camera" + }, + { + "path": "Symbol-Views/Equipment-Views/ControlCabinet" + }, + { + "path": "Symbol-Views/Equipment-Views/Estop" + }, + { + "path": "Symbol-Views/Equipment-Views/GoodsLift" + }, + { + "path": "Symbol-Views/Equipment-Views/JAM" + }, + { + "path": "Symbol-Views/Equipment-Views/Light_Curtain" + }, + { + "path": "Symbol-Views/Equipment-Views/Main_Panel" + }, + { + "path": "Symbol-Views/Equipment-Views/Network" + }, + { + "path": "Symbol-Views/Equipment-Views/Pointer" + }, + { + "path": "Symbol-Views/Equipment-Views/PressureSwitch" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord_End" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord_Line" + }, + { + "path": "Symbol-Views/Equipment-Views/PullChord_Line_Vertical" + }, + { + "path": "Symbol-Views/Equipment-Views/RFID" + }, + { + "path": "Symbol-Views/Equipment-Views/Robot" + }, + { + "path": "Symbol-Views/Equipment-Views/SLAMs" + }, + { + "path": "Symbol-Views/Equipment-Views/SafetyGate" + }, + { + "path": "Symbol-Views/Equipment-Views/Stacker_Destacker" + }, + { + "path": "Symbol-Views/Equipment-Views/Status" + }, + { + "path": "Symbol-Views/Equipment-Views/StatusNonPowered" + }, + { + "path": "Symbol-Views/Equipment-Views/StatusNonPowered_NS" + }, + { + "path": "Symbol-Views/Equipment-Views/Status_NS" + }, + { + "path": "Symbol-Views/Equipment-Views/THEA" + }, + { + "path": "Symbol-Views/Equipment-Views/Test" + } + ], + "FilteredViews": [ + { + "Path": "Symbol-Views/Equipment-Views/ARSAW", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/AUS", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Camera", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/CognexCamera", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/ControlCabinet", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Device-Views/DeviceStatus", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Device-Views/DeviceStatus_old", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Device-Views/Estop", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Estop", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/GoodsLift", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/JAM", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Light_Curtain", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Main_Panel", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Network", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Pointer", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PressureSwitch", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PullChord", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PullChord_End", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PullChord_Line", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/PullChord_Line_Vertical", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/RFID", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Robot", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/SLAMs", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/SafetyGate", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Stacker_Destacker", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Status", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/StatusNonPowered", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/StatusNonPowered_NS", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/Status_NS", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "Symbol-Views/Equipment-Views/THEA", + "forceFault": null, + "forceRunning": 3, + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + } + ], + "SelectedValue": "", + "SymbolLibrary": "", + "key": "" + }, + "viewPath": "Symbol-Views/Symbol-Library-Views/Symbol-Icons-View" + } + ] + }, + "type": "ia.display.dashboard" + } + ], + "meta": { + "name": "root" + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "UserClickInfo", + "pageScope": true, + "script": "\tfrom pprint import pformat\n\tSymbolPath \u003d payload[\"UserClickPath\"]\n\tsystem.perspective.print(pformat(self.view.params.SymbolLibrary[SymbolPath]))\n\tself.view.params.SelectedInfo \u003d self.view.params.SymbolLibrary[SymbolPath][\u0027info\u0027]\n\tself.view.params.SelectedDescription \u003d self.view.params.SymbolLibrary[SymbolPath][\u0027description\u0027]\n\tself.view.params.SelectedPath \u003d SymbolPath \n\tself.view.params.SelectedCategory \u003d self.view.params.SymbolLibrary[SymbolPath][\u0027category\u0027]\n\tsystem.perspective.print(SymbolPath)\n", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "UserClickCategory", + "pageScope": true, + "script": "\n\tSelectedRow \u003d payload[\"UserClickData\"]\n\tself.view.params.SelectedRow \u003d SelectedRow", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "UserClickRefresh", + "pageScope": true, + "script": "\tfrom SymbolLibrary import list_categories, fetch_library\n\t\n\t#Get all Symbol Views and write them to tags\n\tproject_info \u003d system.perspective.getProjectInfo()\n\tviews \u003d project_info.get(\u0027views\u0027,[])\n\t# - Define criterias\n\tfilter_criterion \u003d \"Symbol-Views\"\n\tfilter_criterion2 \u003d \"Symbol-Library-Views\"\n\tfilter_criterion3 \u003d \"Controller-Views\"\n\tfilter_criterion4 \u003d \"Symbol-Views/Equipment-Views/Test\"\n\t# - Filter views that are not necessary for the symbol library and ensure the correct path\n\tfiltered_views \u003d [\n\t\tview for view in views \n\t\tif filter_criterion in view.get(\u0027path\u0027,\u0027\u0027) \n\t\tand not filter_criterion2 in view.get(\u0027path\u0027,\u0027\u0027) \n\t\tand not filter_criterion3 in view.get(\u0027path\u0027,\u0027\u0027)\n\t\tand not filter_criterion4 in view.get(\u0027path\u0027,\u0027\u0027)\n\t\t]\n\t# - Create JSON from the list \n\tjson_structure \u003d []\n\tsymbol_view_list \u003d []\n\tfor view in filtered_views:\n\t\tinstance \u003d {\n\t\t\t\"instanceStyle\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t},\n\t\t\t\"instancePosition\": {},\n\t\t\t\"Path\": view.get(\u0027path\u0027,\u0027\u0027),\n\t\t\t\"forceRunning\": 3,\n\t\t\t\"forceFault\": None\n\t\t}\n\t\tjson_structure.append(instance)\n\t\tsymbol_view_list.append(view.get(\u0027path\u0027,\u0027\u0027))\n\tjson_structure.sort(key \u003d lambda x:x[\u0027Path\u0027].split(\"/\")[len(x[\u0027Path\u0027].split(\"/\"))-1])\t\n\t# - Encode JSON for igniton variables to populate correctly\n\tjson_result \u003d system.util.jsonEncode(json_structure)\n\tself.view.params.Dataset \u003d filtered_views\n\tself.view.params.FilteredViews \u003d json_structure\n\tsystem.perspective.print(filtered_views)\n\t\n\t# - Get all Symbol Categories from JSON Dictionary\t\n\tremote_json \u003d fetch_library(username\u003dself.session.props.auth.user.userName)\n\tself.view.params.SymbolLibrary \u003d {k: v for k, v in remote_json.items() if k in symbol_view_list}\n\tcategory_data \u003d [{\"Category\": category} for category in list_categories(self.view.params.SymbolLibrary)]\n\tself.view.params.CategoryList \u003d category_data\n\tself.view.params.SelectedRow \u003d \u0027ALL\u0027\n\tself.view.params.SelectedDescription \u003d \"\"\n\tself.view.params.SelectedInfo \u003d \"\"", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Test/resource.json b/com.inductiveautomation.perspective/views/Test/resource.json new file mode 100644 index 0000000..59eff6a --- /dev/null +++ b/com.inductiveautomation.perspective/views/Test/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "view.json", + "thumbnail.png" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-08-16T14:01:05Z" + }, + "lastModificationSignature": "54d4caf4abf9d920b8a17c9508c04ebae603cd56c88f63addb3bb25ffdee9f20" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.perspective/views/Test/thumbnail.png b/com.inductiveautomation.perspective/views/Test/thumbnail.png new file mode 100644 index 0000000..62a1fbf Binary files /dev/null and b/com.inductiveautomation.perspective/views/Test/thumbnail.png differ diff --git a/com.inductiveautomation.perspective/views/Test/view.json b/com.inductiveautomation.perspective/views/Test/view.json new file mode 100644 index 0000000..dc4ed85 --- /dev/null +++ b/com.inductiveautomation.perspective/views/Test/view.json @@ -0,0 +1,4007 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tlogger \u003d system.util.getLogger(\"Command.send_request\")\n\tlogger.info(\"UI : runAction called\")\n\tsourceId \u003d str(self.getSibling(\"TextField\").props.text)\n\twhid \u003d\"DNG2\"\n\taction \u003d \"shelve\"\n\tparameters\u003d{}\n\tparameters[\"sourceId\"] \u003d sourceId\n\tparameters[\"siteId\"] \u003d whid\n\tlogger.info(\"UI : sending command\")\n\tCommands.button_commands.send_request(action,parameters)\n\tlogger.info(\"UI : command sent\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "height": 0.0315, + "width": 0.0417, + "x": 0.0203, + "y": 0.1009 + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "text": "Shelve" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "TextField" + }, + "position": { + "height": 0.0296, + "width": 0.0781, + "x": 0.0672, + "y": 0.1019 + }, + "props": { + "text": "PLC09/L1_8/ES1" + }, + "type": "ia.input.text-field" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tlogger \u003d system.util.getLogger(\"Command.send_request\")\n\tlogger.info(\"UI : runAction called\")\n\tsourceId \u003d str(self.getSibling(\"TextField\").props.text)\n\twhid \u003d\"DNG2\"\n\taction \u003d \"unshelve\"\n\tparameters\u003d{}\n\tparameters[\"sourceId\"] \u003d sourceId\n\tparameters[\"siteId\"] \u003d whid\n\tlogger.info(\"UI : sending command\")\n\tCommands.button_commands.send_request(action,parameters)\n\tlogger.info(\"UI : command sent\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_0" + }, + "position": { + "height": 0.0315, + "width": 0.0417, + "x": 0.0203, + "y": 0.1417 + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "text": "unShelve" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "TextField_0" + }, + "position": { + "height": 0.0296, + "width": 0.0781, + "x": 0.0672, + "y": 0.1426 + }, + "props": { + "text": "PLC09/L1_8/ES1" + }, + "type": "ia.input.text-field" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tlogger \u003d system.util.getLogger(\"Command.send_request\")\n\tlogger.info(\"UI : runAction called\")\n\tcommandTarget \u003d str(self.getSibling(\"TextField\").props.text)\n\twhid \u003d\"DNG2\"\n\taction \u003d \"command\"\n\tparameters\u003d{}\n\tparameters[\"siteId\"] \u003d whid\n\tparameters[\"commandTarget\"] \u003d commandTarget\n\tparameters[\"commandCode\"] \u003d 1\n\tparameters[\"commandParams\"] \u003d \u0027\u0027\n\tparameters[\"commandToken\"] \u003d \u0027\u0027\n\tparameters[\"commandTimeout\"] \u003d 2000\n\tlogger.info(\"UI : sending command\")\n\tCommands.button_commands.send_request(action,parameters)\n\tlogger.info(\"UI : command sent\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_1" + }, + "position": { + "height": 0.0315, + "width": 0.0417, + "x": 0.0203, + "y": 0.1824 + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "text": "Start" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "TextField_1" + }, + "position": { + "height": 0.0296, + "width": 0.0781, + "x": 0.0672, + "y": 0.1833 + }, + "props": { + "text": "PLC09/L1_8/ES1" + }, + "type": "ia.input.text-field" + }, + { + "meta": { + "name": "TextField_2" + }, + "position": { + "height": 0.0296, + "width": 0.0781, + "x": 0.0672, + "y": 0.224 + }, + "props": { + "text": "PLC09/L1_8/ES1" + }, + "type": "ia.input.text-field" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tlogger \u003d system.util.getLogger(\"Command.send_request\")\n\tlogger.info(\"UI : runAction called\")\n\tcommandTarget \u003d str(self.getSibling(\"TextField\").props.text)\n\twhid \u003d\"DNG2\"\n\taction \u003d \"command\"\n\tparameters\u003d{}\n\tparameters[\"siteId\"] \u003d whid\n\tparameters[\"commandTarget\"] \u003d commandTarget\n\tparameters[\"commandCode\"] \u003d 2\n\tparameters[\"commandParams\"] \u003d \u0027\u0027\n\tparameters[\"commandToken\"] \u003d \u0027\u0027\n\tparameters[\"commandTimeout\"] \u003d 2000\n\tlogger.info(\"UI : sending command\")\n\tCommands.button_commands.send_request(action,parameters)\n\tlogger.info(\"UI : command sent\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_2" + }, + "position": { + "height": 0.0315, + "width": 0.0417, + "x": 0.0203, + "y": 0.2231 + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "text": "Stop" + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tlogger \u003d system.util.getLogger(\"Command.send_request\")\n\tlogger.info(\"UI : runAction called\")\n\tcommandTarget \u003d str(self.getSibling(\"TextField\").props.text)\n\twhid \u003d\"DNG2\"\n\taction \u003d \"command\"\n\tparameters\u003d{}\n\tparameters[\"siteId\"] \u003d whid\n\tparameters[\"commandTarget\"] \u003d commandTarget\n\tparameters[\"commandCode\"] \u003d 3\n\tparameters[\"commandParams\"] \u003d \u0027\u0027\n\tparameters[\"commandToken\"] \u003d \u0027\u0027\n\tparameters[\"commandTimeout\"] \u003d 2000\n\tlogger.info(\"UI : sending command\")\n\tCommands.button_commands.send_request(action,parameters)\n\tlogger.info(\"UI : command sent\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_3" + }, + "position": { + "height": 0.0315, + "width": 0.0417, + "x": 0.0203, + "y": 0.2639 + }, + "props": { + "image": { + "icon": { + "color": "#AAAAAA" + } + }, + "text": "Reset" + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "TextField_3" + }, + "position": { + "height": 0.0296, + "width": 0.0781, + "x": 0.0672, + "y": 0.2648 + }, + "props": { + "text": "PLC09/L1_8/ES1" + }, + "type": "ia.input.text-field" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "config": { + "backgroundColor": "AUTO", + "type": "ANY", + "uuid": "1957745e-fa42-4f8f-bfa1-f22d7ca47707" + }, + "context": {} + }, + "scope": "C", + "type": "native/barcode" + } + } + }, + "meta": { + "name": "Barcode" + }, + "position": { + "height": 0.162, + "width": 0.1042, + "x": 0.1979, + "y": 0.4962 + }, + "props": { + "type": "qrcode" + }, + "type": "ia.display.barcode" + }, + { + "meta": { + "name": "BarcodeScannerInput" + }, + "position": { + "height": 0.0741, + "width": 0.0729, + "x": 0.162, + "y": 0.0295 + }, + "type": "ia.input.barcodescannerinput" + }, + { + "meta": { + "name": "Priority4" + }, + "position": { + "height": 0.05, + "width": 0.0302, + "x": 0.0922, + "y": 0.3657 + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "elements": [ + { + "fill": { + "paint": "transparent" + }, + "height": "920", + "id": "rect522", + "name": "rect522", + "stroke": { + "paint": "#000000" + }, + "type": "rect", + "width": "600", + "x": "0", + "y": "0" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect524", + "name": "rect524", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "80", + "x": "0", + "y": "65" + }, + { + "id": "g530", + "name": "g530", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect532", + "name": "rect532", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "80", + "x": "0", + "y": "385" + }, + { + "id": "g538", + "name": "g538", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect540", + "name": "rect540", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "80", + "x": "0", + "y": "545" + }, + { + "id": "g546", + "name": "g546", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect548", + "name": "rect548", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "80", + "x": "0", + "y": "305" + }, + { + "id": "g554", + "name": "g554", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect556", + "name": "rect556", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "80", + "x": "0", + "y": "225" + }, + { + "id": "g562", + "name": "g562", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect564", + "name": "rect564", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "80", + "x": "0", + "y": "145" + }, + { + "id": "g570", + "name": "g570", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect572", + "name": "rect572", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "80", + "x": "0", + "y": "465" + }, + { + "id": "g578", + "name": "g578", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect580", + "name": "rect580", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "90", + "x": "0", + "y": "625" + }, + { + "id": "g586", + "name": "g586", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect588", + "name": "rect588", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "80", + "x": "151", + "y": "10" + }, + { + "id": "g594", + "name": "g594", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect596", + "name": "rect596", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "244", + "x": "320", + "y": "10" + }, + { + "id": "g602", + "name": "g602", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 397,60 h 39.99 v 0 L 467,90 436.99,120 v 0 H 397 l 30.04,-30 z", + "fill": { + "paint": "#007dfa" + }, + "id": "path604", + "name": "path604", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 397,140 h 39.99 v 0 l 30.01,30 -30.01,30 v 0 H 397 l 30.04,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path606", + "name": "path606", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,230 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#ff0000" + }, + "id": "path608", + "name": "path608", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g614", + "name": "g614", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 425,230 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path616", + "name": "path616", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,310 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#f00077" + }, + "id": "path618", + "name": "path618", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g624", + "name": "g624", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 425,310 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path626", + "name": "path626", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,390 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#ff6000" + }, + "id": "path628", + "name": "path628", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g634", + "name": "g634", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 425,390 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#007dfa" + }, + "id": "path636", + "name": "path636", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,470 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#ff6000" + }, + "id": "path638", + "name": "path638", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g644", + "name": "g644", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 425,470 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path646", + "name": "path646", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,550 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#fcc400" + }, + "id": "path648", + "name": "path648", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g654", + "name": "g654", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 425,550 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#007dfa" + }, + "id": "path656", + "name": "path656", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,630 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#fcc400" + }, + "id": "path658", + "name": "path658", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g664", + "name": "g664", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 425,630 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path666", + "name": "path666", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 156,60 h 39.99 v 0 L 226,90 195.99,120 v 0 H 156 l 30.04,-30 z", + "fill": { + "paint": "#00cc00" + }, + "id": "path668", + "name": "path668", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "elements": [ + { + "d": "m -82.240706,284.83398 30,30 -30,30 -30.000004,-30 z", + "fill": { + "paint": "#ff0000" + }, + "id": "path670", + "name": "path670", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g676", + "name": "g676", + "transform": "translate(-255.67434,65.072266)", + "type": "group" + }, + { + "d": "m -76.240706,284.83398 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 h -19.96 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path678", + "name": "path678", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + } + ], + "id": "g1105", + "name": "g1105", + "transform": "matrix(0.52711014,0,0,0.67777713,-167.34865,118.01125)", + "type": "group" + }, + { + "d": "m 156,140 h 39.99 v 0 l 30.01,30 -30.01,30 v 0 H 156 l 30.04,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path680", + "name": "path680", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 170,300 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#ff8000" + }, + "id": "path682", + "name": "path682", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g688", + "name": "g688", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 176,300 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 176 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path690", + "name": "path690", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 170,380 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#ffff00" + }, + "id": "path692", + "name": "path692", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g698", + "name": "g698", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 176,380 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 176 l 29.96,-30 z", + "fill": { + "paint": "#00cc00" + }, + "id": "path700", + "name": "path700", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 170,460 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#ffff00" + }, + "id": "path702", + "name": "path702", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g708", + "name": "g708", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 176,460 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 176 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path710", + "name": "path710", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 170,540 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#7ea6e0" + }, + "id": "path712", + "name": "path712", + "stroke": { + "paint": "transparent" + }, + "type": "path" + }, + { + "id": "g718", + "name": "g718", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 176,540 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 176 l 29.96,-30 z", + "fill": { + "paint": "#00cc00" + }, + "id": "path720", + "name": "path720", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 170,620 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#7ea6e0" + }, + "id": "path722", + "name": "path722", + "stroke": { + "paint": "transparent" + }, + "type": "path" + }, + { + "id": "g728", + "name": "g728", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 176,620 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 176 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path730", + "name": "path730", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 170,620 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#007dfa" + }, + "id": "path732", + "name": "path732", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g738", + "name": "g738", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 170,540 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#007efc" + }, + "id": "path740", + "name": "path740", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g746", + "name": "g746", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect748", + "name": "rect748", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "48", + "y": "730" + }, + { + "id": "g754", + "name": "g754", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect756", + "name": "rect756", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "40", + "y": "770" + }, + { + "id": "g762", + "name": "g762", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect764", + "name": "rect764", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "40", + "y": "800" + }, + { + "id": "g770", + "name": "g770", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect772", + "name": "rect772", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "40", + "y": "830" + }, + { + "id": "g778", + "name": "g778", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect780", + "name": "rect780", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "40", + "y": "870" + }, + { + "id": "g786", + "name": "g786", + "transform": "translate(-0.5,-0.5)", + "type": "group" + } + ], + "id": "g788", + "name": "g788", + "type": "group" + } + ], + "id": "g940", + "name": "g940", + "transform": "matrix(0.26458333,0,0,0.26458333,60.284253,-81.332525)", + "type": "group" + } + ], + "id": "layer1", + "name": "layer1", + "transform": "translate(-0.25437278,-0.84333903)", + "type": "group" + } + ], + "viewBox": "0 0 12.191251 11.013321" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Priority2" + }, + "position": { + "height": 0.0907, + "width": 0.0536, + "x": 0.1979, + "y": 0.3565 + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "elements": [ + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect1457", + "name": "rect1457", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "244", + "x": "320", + "y": "10" + }, + { + "elements": [ + { + "d": "m 490.65035,981.01865 h 22.75736 v 0 l 34.25004,24.28225 -34.25004,24.2824 v 0 h -22.75736 l 34.15883,-24.2824 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path1591", + "name": "path1591", + "stroke": { + "miterlimit": "10", + "paint": "#000000", + "width": "0.960651" + }, + "type": "path" + }, + { + "d": "m 488.14248,983.11489 30.11426,22.40621 -30.11426,22.4061 -30.11426,-22.4061 z", + "fill": { + "paint": "#007dfa" + }, + "id": "path1593", + "name": "path1593", + "stroke": { + "miterlimit": "10", + "paint": "#000000", + "width": "0.865861" + }, + "type": "path" + }, + { + "id": "g1599", + "name": "g1599", + "transform": "matrix(1.1457588,0,0,0.97675093,83.234844,335.9194)", + "type": "group" + }, + { + "elements": [ + { + "elements": [ + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect3295", + "name": "rect3295", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "244", + "x": "320", + "y": "10" + }, + { + "id": "g3301", + "name": "g3301", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 397,60 h 39.99 v 0 L 467,90 436.99,120 v 0 H 397 l 30.04,-30 z", + "fill": { + "paint": "#007dfa" + }, + "id": "path3303", + "name": "path3303", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 397,140 h 39.99 v 0 l 30.01,30 -30.01,30 v 0 H 397 l 30.04,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path3305", + "name": "path3305", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,230 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#ff0000" + }, + "id": "path3307", + "name": "path3307", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g3313", + "name": "g3313", + "transform": "matrix(1.6699378,0,0,1.9507892,-317.91426,-208.76339)", + "type": "group" + }, + { + "d": "m 425,230 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path3315", + "name": "path3315", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,310 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#f00077" + }, + "id": "path3317", + "name": "path3317", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g3323", + "name": "g3323", + "transform": "translate(-24.489348,34.308074)", + "type": "group" + }, + { + "d": "m 425,310 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path3325", + "name": "path3325", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,390 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#ff6000" + }, + "id": "path3327", + "name": "path3327", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g3333", + "name": "g3333", + "transform": "translate(-0.5,-1.424355)", + "type": "group" + }, + { + "d": "m 425,390 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#007dfa" + }, + "id": "path3335", + "name": "path3335", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,470 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#ff6000" + }, + "id": "path3337", + "name": "path3337", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g3343", + "name": "g3343", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 425,470 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path3345", + "name": "path3345", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,550 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#fcc400" + }, + "id": "path3347", + "name": "path3347", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g3353", + "name": "g3353", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 425,550 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#007dfa" + }, + "id": "path3355", + "name": "path3355", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,630 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#fcc400" + }, + "id": "path3357", + "name": "path3357", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g3363", + "name": "g3363", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 425,630 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path3365", + "name": "path3365", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect3447", + "name": "rect3447", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "48", + "y": "730" + }, + { + "id": "g3453", + "name": "g3453", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect3455", + "name": "rect3455", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "40", + "y": "770" + }, + { + "id": "g3461", + "name": "g3461", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect3463", + "name": "rect3463", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "40", + "y": "800" + }, + { + "id": "g3469", + "name": "g3469", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect3471", + "name": "rect3471", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "40", + "y": "830" + }, + { + "id": "g3477", + "name": "g3477", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect3479", + "name": "rect3479", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "40", + "y": "870" + }, + { + "id": "g3485", + "name": "g3485", + "transform": "translate(-0.5,-0.5)", + "type": "group" + } + ], + "id": "g3487", + "name": "g3487", + "type": "group" + } + ], + "id": "g3639", + "name": "g3639", + "transform": "matrix(1.862586,0,0,1.2955924,-101.29241,402.21741)", + "type": "group" + } + ], + "id": "g1808", + "name": "g1808", + "transform": "matrix(0.53688798,0,0,0.77184771,-310.91046,-777.4312)", + "type": "group" + } + ], + "id": "g1649", + "name": "g1649", + "transform": "translate(-24.206493,-38.038774)", + "type": "group" + } + ], + "id": "g1801", + "name": "g1801", + "transform": "matrix(0.26458333,0,0,0.26458333,23.680108,16.682133)", + "type": "group" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "viewBox": "0 0 12.7 12.7" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Priority3" + }, + "position": { + "height": 0.0787, + "width": 0.0604, + "x": 0.0734, + "y": 0.4398 + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "elements": [ + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect1457", + "name": "rect1457", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "244", + "x": "320", + "y": "10" + }, + { + "elements": [ + { + "d": "m 490.65035,981.01865 h 22.75736 v 0 l 34.25004,24.28225 -34.25004,24.2824 v 0 h -22.75736 l 34.15883,-24.2824 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path1591", + "name": "path1591", + "stroke": { + "miterlimit": "10", + "paint": "#000000", + "width": "0.960651" + }, + "type": "path" + }, + { + "d": "m 488.14248,983.11489 30.11426,22.40621 -30.11426,22.4061 -30.11426,-22.4061 z", + "fill": { + "paint": "#007dfa" + }, + "id": "path1593", + "name": "path1593", + "stroke": { + "miterlimit": "10", + "paint": "#000000", + "width": "0.865861" + }, + "type": "path" + }, + { + "id": "g1599", + "name": "g1599", + "transform": "matrix(1.1457588,0,0,0.97675093,83.234844,335.9194)", + "type": "group" + }, + { + "elements": [ + { + "elements": [ + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect3295", + "name": "rect3295", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "244", + "x": "320", + "y": "10" + }, + { + "id": "g3301", + "name": "g3301", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 397,60 h 39.99 v 0 L 467,90 436.99,120 v 0 H 397 l 30.04,-30 z", + "fill": { + "paint": "#007dfa" + }, + "id": "path3303", + "name": "path3303", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 397,140 h 39.99 v 0 l 30.01,30 -30.01,30 v 0 H 397 l 30.04,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path3305", + "name": "path3305", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,230 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#ff0000" + }, + "id": "path3307", + "name": "path3307", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g3313", + "name": "g3313", + "transform": "matrix(1.6699378,0,0,1.9507892,-317.91426,-208.76339)", + "type": "group" + }, + { + "d": "m 425,230 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path3315", + "name": "path3315", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,310 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#f00077" + }, + "id": "path3317", + "name": "path3317", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g3323", + "name": "g3323", + "transform": "matrix(0.63064787,0,0,0.72984766,52.132513,218.46822)", + "type": "group" + }, + { + "d": "m 425,310 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path3325", + "name": "path3325", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,390 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#ff6000" + }, + "id": "path3327", + "name": "path3327", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g3333", + "name": "g3333", + "transform": "translate(38.223218,-57.895716)", + "type": "group" + }, + { + "d": "m 425,390 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#007dfa" + }, + "id": "path3335", + "name": "path3335", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,470 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#ff6000" + }, + "id": "path3337", + "name": "path3337", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g3343", + "name": "g3343", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 425,470 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path3345", + "name": "path3345", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,550 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#fcc400" + }, + "id": "path3347", + "name": "path3347", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g3353", + "name": "g3353", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 425,550 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#007dfa" + }, + "id": "path3355", + "name": "path3355", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "d": "m 419,630 30,30 -30,30 -30,-30 z", + "fill": { + "paint": "#fcc400" + }, + "id": "path3357", + "name": "path3357", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "id": "g3363", + "name": "g3363", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "d": "m 425,630 h 19.96 v 0 l 30.04,30 -30.04,30 v 0 H 425 l 29.96,-30 z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path3365", + "name": "path3365", + "stroke": { + "miterlimit": "10", + "paint": "#000000" + }, + "type": "path" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect3447", + "name": "rect3447", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "48", + "y": "730" + }, + { + "id": "g3453", + "name": "g3453", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect3455", + "name": "rect3455", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "40", + "y": "770" + }, + { + "id": "g3461", + "name": "g3461", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect3463", + "name": "rect3463", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "40", + "y": "800" + }, + { + "id": "g3469", + "name": "g3469", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect3471", + "name": "rect3471", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "40", + "y": "830" + }, + { + "id": "g3477", + "name": "g3477", + "transform": "translate(-0.5,-0.5)", + "type": "group" + }, + { + "fill": { + "paint": "transparent" + }, + "height": "30", + "id": "rect3479", + "name": "rect3479", + "stroke": { + "paint": "transparent" + }, + "type": "rect", + "width": "372", + "x": "40", + "y": "870" + }, + { + "id": "g3485", + "name": "g3485", + "transform": "translate(-0.5,-0.5)", + "type": "group" + } + ], + "id": "g3487", + "name": "g3487", + "type": "group" + } + ], + "id": "g3639", + "name": "g3639", + "transform": "matrix(1.862586,0,0,1.2955924,-101.29241,402.21741)", + "type": "group" + } + ], + "id": "g1808", + "name": "g1808", + "transform": "matrix(0.53688798,0,0,0.77184771,-310.91046,-777.4312)", + "type": "group" + } + ], + "id": "g1649", + "name": "g1649", + "transform": "translate(-24.206493,-38.038774)", + "type": "group" + } + ], + "id": "g1801", + "name": "g1801", + "transform": "matrix(0.26458333,0,0,0.26458333,23.680108,16.682133)", + "type": "group" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "viewBox": "0 0 12.7 12.7" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Priority5" + }, + "position": { + "height": 0.0593, + "width": 0.0464, + "x": 0.1297, + "y": 0.5157 + }, + "props": { + "elements": [ + { + "elements": [ + { + "elements": [ + { + "id": "stop8271", + "name": "stop8271", + "offset": "0", + "stopColor": "#ff0000", + "stopOpacity": "1", + "style": { + "stopColor": "#ff0000", + "stopOpacity": "1" + }, + "type": "stop" + }, + { + "id": "stop8273", + "name": "stop8273", + "offset": "1", + "stopColor": "#ff0000", + "stopOpacity": "0", + "style": { + "stopColor": "#ff0000", + "stopOpacity": "0" + }, + "type": "stop" + } + ], + "id": "linearGradient8275", + "name": "linearGradient8275", + "type": "linearGradient" + }, + { + "height": "12.373591", + "id": "rect7873", + "name": "rect7873", + "type": "rect", + "width": "6.960145", + "x": "-34.35881", + "y": "17.345123" + }, + { + "height": "19.333736", + "id": "rect7857", + "name": "rect7857", + "type": "rect", + "width": "8.617322", + "x": "12.925983", + "y": "13.478376" + }, + { + "height": "17.513809", + "id": "rect7801", + "name": "rect7801", + "type": "rect", + "width": "12.015919", + "x": "13.367897", + "y": "15.577467" + } + ], + "id": "defs7185", + "name": "defs7185", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "d": "M 29.64905,-0.00379873 59.301882,29.999999 29.64905,60.003797 -0.00378149,29.999999 Z", + "fill": { + "paint": "#ff0000" + }, + "id": "path7353", + "name": "path7353", + "stroke": { + "miterlimit": "10", + "paint": "#000000", + "width": "0.99426" + }, + "type": "path" + }, + { + "id": "g7359", + "name": "g7359", + "transform": "matrix(0.98842772,0,0,1.0001266,-0.49799535,-0.50386203)", + "type": "group" + }, + { + "d": "m 35.579616,-0.00379873 h 19.729018 v 0 L 85.001002,29.999999 55.308634,60.003797 v 0 H 35.579616 L 65.192911,29.999999 Z", + "fill": { + "paint": "#8c8c8c" + }, + "id": "path7361", + "name": "path7361", + "stroke": { + "miterlimit": "10", + "paint": "#000000", + "width": "0.99426" + }, + "type": "path" + }, + { + "fill": { + "paint": "transparent" + }, + "id": "text7799", + "name": "text7799", + "stroke": { + "linecap": "round", + "linejoin": "round", + "paint": "#000000", + "width": "1.88976" + }, + "style": { + "opacity": "0.745318", + "paintOrder": "stroke fill markers", + "shapeInside": "url(#rect7801)", + "whiteSpace": "pre" + }, + "text": "", + "transform": "matrix(1.8153486,0,0,1.5943188,-1.6050095,-7.7561459)", + "type": "text" + }, + { + "fill": { + "paint": "transparent" + }, + "id": "text7855", + "name": "text7855", + "stroke": { + "linecap": "round", + "linejoin": "round", + "paint": "#000000", + "width": "1.88976" + }, + "style": { + "opacity": "0.745318", + "paintOrder": "stroke fill markers", + "shapeInside": "url(#rect7857)", + "whiteSpace": "pre" + }, + "text": "", + "transform": "matrix(1.8153486,0,0,1.5943188,-1.6050095,-7.7561459)", + "type": "text" + }, + { + "elements": [ + { + "id": "tspan8587", + "name": "tspan8587", + "text": "1", + "type": "tspan", + "x": "-34.359375", + "y": "25.679114" + } + ], + "fill": { + "opacity": "0.99182", + "paint": "#050505" + }, + "id": "text7871", + "name": "text7871", + "stroke": { + "dasharray": "none", + "linecap": "round", + "linejoin": "round", + "paint": "#000000", + "width": "0.25802" + }, + "style": { + "InkscapeFontSpecification": "\u0027Arial Narrow, Normal\u0027", + "fontFamily": "\u0027Arial Narrow\u0027", + "fontSize": "9.25159px", + "fontStretch": "normal", + "fontStyle": "normal", + "fontVariant": "normal", + "fontVariantCaps": "normal", + "fontVariantEastAsian": "normal", + "fontVariantLigatures": "normal", + "fontVariantNumeric": "normal", + "fontWeight": "normal", + "opacity": "0.745318", + "paintOrder": "stroke fill markers", + "shapeInside": "url(#rect7873)", + "whiteSpace": "pre" + }, + "text": "1", + "transform": "matrix(7.0991451,0,0,4.6510814,257.54231,-73.971779)", + "type": "text" + } + ], + "id": "g7387", + "name": "g7387", + "transform": "matrix(0.14574795,0,0,0.16595384,0.23392684,1.2871622)", + "type": "group" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "viewBox": "0 0 12.7 12.7" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "EmbeddedView" + }, + "position": { + "height": 0.0426, + "width": 0.0245, + "x": 0.087, + "y": 0.6241 + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Custom" + }, + "position": { + "height": 0.037, + "width": 0.0208, + "x": 0.0552, + "y": 0.3444 + }, + "props": { + "params": { + "tagProps": [ + "PLC09/L1_8/ES1", + "sensor_door", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "path": "Symbol-Views/AMZL/Equipment-Views/Custom" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "Priority" + }, + "position": { + "height": 0.0287, + "rotate": { + "angle": "270deg" + }, + "width": 0.0177, + "x": 0.1879, + "y": 0.1273 + }, + "props": { + "path": "Symbol-Views/AMZL/Equipment-Views/Priority" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "RFID_0" + }, + "position": { + "height": 0.0361, + "width": 0.026, + "x": 0.2344, + "y": 0.7361 + }, + "props": { + "elements": [ + { + "elements": [ + { + "d": "M6.35 0.2507 C4.0842 0.2507 1.9091 1.5163 0.3079 3.7675 L1.174 4.9681 C2.6039 2.9621 4.477 1.9591 6.35 1.9591 C8.223 1.9591 10.0961 2.9621 11.526 4.9681 L12.3921 3.7675 C10.7909 1.5163 8.6158 0.2507 6.35 0.2507 ZM6.35 3.6831 C4.7961 3.6831 3.2421 4.5117 2.0526 6.1688 L2.8834 7.4219 C3.7997 6.1213 5.0484 5.3909 6.35 5.3909 C7.6516 5.3909 8.9003 6.1213 9.8166 7.4219 L10.6474 6.1688 C9.4579 4.5117 7.9039 3.6831 6.35 3.6831 ZM6.35 7.1155 C5.4135 7.1155 4.477 7.617 3.762 8.6201 L4.6179 9.8557 C5.0761 9.2079 5.698 8.8427 6.35 8.8427 C7.002 8.8427 7.6239 9.2079 8.0821 9.8557 L8.938 8.6201 C8.223 7.617 7.2865 7.1155 6.35 7.1155 ZM6.35 10.5667 C6.0416 10.5667 5.7332 10.7299 5.4966 11.0563 L6.35 12.257 L7.2034 11.0563 C6.9668 10.7299 6.6584 10.5667 6.35 10.5667 Z", + "name": "path", + "stroke": { + "paint": "transparent" + }, + "type": "path" + } + ], + "fill": { + "opacity": 1, + "paint": "#FF4747" + }, + "name": "group", + "stroke": { + "opacity": "0.502", + "paint": "rgb(128,128,128)" + }, + "type": "group" + } + ], + "viewBox": "0 0 12.7 12.7" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Goods_Lift" + }, + "position": { + "height": 0.0528, + "width": 0.026, + "x": 0.261, + "y": 0.1315 + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "cx": "69.035934", + "cy": "129.08073", + "fill": { + "paint": "#FF0000" + }, + "id": "path509", + "name": "path509", + "rx": "9.5693493", + "ry": "9.4979048", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": "1.3051" + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "ellipse" + }, + { + "d": "m 67.713019,128.18115 1.322917,-0.66146 1.322917,0.66146 v -3.06917 h -2.645834 z m -1.322916,3.54542 v -1.05833 h 2.645833 v 1.05833 z m -1.322918,2.11667 q -0.3175,0 -0.555625,-0.23812 -0.238125,-0.23813 -0.238125,-0.55563 v -7.93751 q 0,-0.3175 0.238125,-0.55562 0.238125,-0.23813 0.555625,-0.23813 h 7.937499 q 0.3175,0 0.55563,0.23813 0.23812,0.23812 0.23812,0.55562 v 7.93751 q 0,0.3175 -0.23812,0.55563 -0.23813,0.23812 -0.55563,0.23812 z m 0,-8.73126 v 7.93751 z m 0,7.93751 h 7.937499 v -7.93751 h -1.852081 v 4.3524 l -2.116667,-1.05834 -2.116666,1.05834 v -4.3524 h -1.852085 z", + "id": "path132", + "name": "path132", + "stroke": { + "dasharray": "none", + "width": "0" + }, + "type": "path" + }, + { + "d": "m 66.429788,123.74768 -0.568854,-0.56885 3.175,-3.175 3.175,3.16177 -0.568855,0.56885 -2.606145,-2.60614 z", + "id": "path2154", + "name": "path2154", + "stroke": { + "width": "0.264583" + }, + "type": "path" + }, + { + "d": "m 71.642074,134.41379 0.56886,0.56885 -3.175,3.175 -3.175,-3.16177 0.56885,-0.56885 2.60615,2.60614 z", + "id": "path2154-5", + "name": "path2154-5", + "stroke": { + "width": "0.264583" + }, + "type": "path" + } + ], + "id": "g2552", + "name": "g2552", + "type": "group" + } + ], + "id": "layer1", + "name": "layer1", + "transform": "translate(-58.814035,-118.93028)", + "type": "group" + } + ], + "viewBox": "0 0 20.443798 20.300909" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Goods_Lift_0" + }, + "position": { + "height": 0.0787, + "width": 0.051, + "x": 0.187, + "y": 0.2491 + }, + "props": { + "elements": [ + { + "elements": [ + { + "d": "M10.2219 0.6525 C4.9369 0.6525 0.6525 4.9049 0.6525 10.1505 C0.6525 15.396 4.9369 19.6484 10.2219 19.6484 C15.5069 19.6484 19.7912 15.396 19.7912 10.1505 C19.7912 4.9049 15.5069 0.6525 10.2219 0.6525 Z", + "name": "path", + "stroke": { + "paint": "transparent" + }, + "type": "path" + } + ], + "fill": { + "opacity": "0.502", + "paint": "rgb(128,128,128)" + }, + "name": "group", + "stroke": { + "opacity": "0.502", + "paint": "rgb(128,128,128)" + }, + "type": "group" + } + ], + "viewBox": "0 0 20.443798 20.300909" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Goods_Lift_1" + }, + "position": { + "height": 0.1611, + "width": 0.0839, + "x": 0.3557, + "y": 0.0426 + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "cx": "69.035934", + "cy": "129.08073", + "fill": { + "paint": "#ffffff" + }, + "id": "path509", + "name": "path509", + "rx": "9.5693493", + "ry": "9.4979048", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": "1" + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "ellipse" + }, + { + "d": "m 67.713019,128.18115 1.322917,-0.66146 1.322917,0.66146 v -3.06917 h -2.645834 z m -1.322916,3.54542 v -1.05833 h 2.645833 v 1.05833 z m -1.322918,2.11667 q -0.3175,0 -0.555625,-0.23812 -0.238125,-0.23813 -0.238125,-0.55563 v -7.93751 q 0,-0.3175 0.238125,-0.55562 0.238125,-0.23813 0.555625,-0.23813 h 7.937499 q 0.3175,0 0.55563,0.23813 0.23812,0.23812 0.23812,0.55562 v 7.93751 q 0,0.3175 -0.23812,0.55563 -0.23813,0.23812 -0.55563,0.23812 z m 0,-8.73126 v 7.93751 z m 0,7.93751 h 7.937499 v -7.93751 h -1.852081 v 4.3524 l -2.116667,-1.05834 -2.116666,1.05834 v -4.3524 h -1.852085 z", + "id": "path132", + "name": "path132", + "stroke": { + "dasharray": "none", + "width": "1" + }, + "type": "path" + }, + { + "d": "m 66.429788,123.74768 -0.568854,-0.56885 3.175,-3.175 3.175,3.16177 -0.568855,0.56885 -2.606145,-2.60614 z", + "id": "path2154", + "name": "path2154", + "stroke": { + "dasharray": "none", + "width": "1" + }, + "type": "path" + }, + { + "d": "m 71.642074,134.41379 0.56886,0.56885 -3.175,3.175 -3.175,-3.16177 0.56885,-0.56885 2.60615,2.60614 z", + "id": "path2154-5", + "name": "path2154-5", + "stroke": { + "dasharray": "none", + "width": "1" + }, + "type": "path" + } + ], + "id": "g2552", + "name": "g2552", + "stroke": { + "dasharray": "none", + "width": "1" + }, + "type": "group" + } + ], + "id": "layer1", + "name": "layer1", + "transform": "translate(-58.814035,-118.93028)", + "type": "group" + } + ], + "viewBox": "0 0 20.443798 20.300909" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "AUS" + }, + "position": { + "height": 0.0898, + "width": 0.0417, + "x": 0.5062, + "y": 0.3667 + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "cx": "69.035934", + "cy": "129.08073", + "fill": { + "paint": "#ffffff" + }, + "id": "path509", + "name": "path509", + "rx": "9.5693493", + "ry": "9.4979048", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": "1" + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "ellipse" + }, + { + "d": "m 64.008851,131.72656 2.143125,-5.29166 h 0.833438 l 2.129896,5.29166 h -0.833438 l -0.502708,-1.30968 h -2.434167 l -0.502708,1.30968 z m 1.600729,-1.9976 h 1.905 l -0.926041,-2.4474 h -0.05292 z m 4.590521,1.9976 v -0.82021 l 3.082396,-3.78354 h -2.844271 v -0.68791 h 3.598334 v 0.83343 l -3.055938,3.77032 h 3.082396 v 0.68791 z m -2.169583,-6.6675 1.27,-1.27 1.27,1.27 z m 1.27,9.31334 -1.27,-1.27 h 2.54 z", + "id": "path6803", + "name": "path6803", + "stroke": { + "width": "0.264583" + }, + "type": "path" + } + ], + "id": "g2552", + "name": "g2552", + "stroke": { + "dasharray": "none", + "width": "1" + }, + "type": "group" + } + ], + "id": "layer1", + "name": "layer1", + "transform": "translate(-58.814035,-118.93028)", + "type": "group" + } + ], + "viewBox": "0 0 20.443798 20.300909" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "GoodsLift" + }, + "position": { + "height": 0.0926, + "width": 0.0521, + "x": 0.3828, + "y": 0.3917 + }, + "props": { + "params": { + "tagProps": [ + "", + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "path": "Symbol-Views/Equipment-Views/GoodsLift" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "AUS_0" + }, + "position": { + "height": 0.0898, + "width": 0.0417, + "x": 0.4166, + "y": 0.5297 + }, + "props": { + "elements": [ + { + "elements": [ + { + "d": "M10.2219 0.6525 C4.9369 0.6525 0.6525 4.9049 0.6525 10.1505 C0.6525 15.396 4.9369 19.6484 10.2219 19.6484 C15.5069 19.6484 19.7912 15.396 19.7912 10.1505 C19.7912 4.9049 15.5069 0.6525 10.2219 0.6525 Z", + "name": "path", + "stroke": { + "paint": "transparent" + }, + "type": "path" + } + ], + "fill": { + "opacity": "0.502", + "paint": "rgb(128,128,128)" + }, + "name": "group", + "stroke": { + "opacity": "0.502", + "paint": "rgb(128,128,128)" + }, + "type": "group" + } + ], + "viewBox": "0 0 20.443798 20.300909" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "SLAMs" + }, + "position": { + "height": 0.0926, + "width": 0.0521, + "x": 0.2968, + "y": 0.2648 + }, + "props": { + "params": { + "tagProps": [ + "", + "", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "path": "Symbol-Views/Equipment-Views/SLAMs" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "jam-jar-icon" + }, + "position": { + "height": 0.0241, + "width": 0.0146, + "x": 0.0651, + "y": 0.7954 + }, + "props": { + "elements": [ + { + "d": "M20.34,21.47A83.51,83.51,0,0,0,9.12,28a18.88,18.88,0,0,0-3.75,3.35,17.9,17.9,0,0,0,3.08,1.41,15.17,15.17,0,0,0,4.62.86,12.37,12.37,0,0,0,5.09-1.58,19,19,0,0,1,7.4-2.21c2.68-.11,4.73.95,6.74,2a9.73,9.73,0,0,0,3.92,1.41,11.85,11.85,0,0,0,4.39-1.34,21,21,0,0,1,6.83-2,16.92,16.92,0,0,1,7.3,1.36,15.33,15.33,0,0,0,4.77,1.15A20.45,20.45,0,0,0,65,31.26a27.16,27.16,0,0,1,7.38-1.42,17.2,17.2,0,0,1,6.43,1.38,12,12,0,0,0,3.76.94,16.75,16.75,0,0,0,4.13-.51,17,17,0,0,0,2.16-.71,13.53,13.53,0,0,0-3.44-3.44,59.47,59.47,0,0,0-10.81-6Zm4.18,30.88H71.18a11.81,11.81,0,0,1,8.34,3.47v0A11.76,11.76,0,0,1,83,64.17V81.69A11.81,11.81,0,0,1,79.53,90h0a11.76,11.76,0,0,1-8.33,3.47H24.52a11.81,11.81,0,0,1-8.34-3.47v0a11.77,11.77,0,0,1-3.47-8.34V64.17a11.81,11.81,0,0,1,3.47-8.34h0a11.76,11.76,0,0,1,8.33-3.47ZM71.18,57H24.52a7.1,7.1,0,0,0-5.06,2.1h0a7.14,7.14,0,0,0-2.1,5.07V81.69a7.12,7.12,0,0,0,2.1,5.07h0a7.1,7.1,0,0,0,5.06,2.1H71.18a7.14,7.14,0,0,0,5.07-2.1h0a7.13,7.13,0,0,0,2.11-5.07V64.17a7.15,7.15,0,0,0-2.11-5.07h0A7.14,7.14,0,0,0,71.18,57ZM88.27,16.49l5.55.37a3.19,3.19,0,0,1-.43,6.36l-6.6-.44q.75.51,1.44,1c3.32,2.5,5.37,5.12,5.8,7.9a2.31,2.31,0,0,1-1.18,2.49,21.89,21.89,0,0,1-4.22,1.75A31.23,31.23,0,0,1,93.39,46,53.19,53.19,0,0,1,95,60.4v28h0c.17,10.13-2.24,18.14-7.35,24s-12.75,9.33-23.12,10.51a1.84,1.84,0,0,1-.41,0H32.27c-10-.39-17.24-3.75-22.38-9.31S2,100.6.75,91.72a2.73,2.73,0,0,1-.05-.5V62.14h0a53,53,0,0,1,2-17.06,29.52,29.52,0,0,1,3.88-8,24.66,24.66,0,0,1-5.49-2.89,2.33,2.33,0,0,1-1-2.66C.79,29.15,3,26.74,6.4,24.26a72,72,0,0,1,8.36-5.12,10.4,10.4,0,0,1-1.18-1h0a10.55,10.55,0,0,1,0-15h0A10.57,10.57,0,0,1,21.07,0H73a10.55,10.55,0,0,1,7.49,3.12h0a10.57,10.57,0,0,1,3.12,7.49,8.44,8.44,0,0,1-.05,1l8.25-3.75a3.18,3.18,0,0,1,2.64,5.79l-6.19,2.82ZM73,4.64H21.07a6,6,0,0,0-4.22,1.75h0a6,6,0,0,0,0,8.44h0a6,6,0,0,0,4.22,1.75H73a6,6,0,0,0,4.22-1.75h0a6,6,0,0,0,0-8.44h0A6,6,0,0,0,73,4.64ZM11.56,38.17a24.5,24.5,0,0,0-4.39,8.31A49.22,49.22,0,0,0,5.33,62.1v0h0v29c1.12,8,3.62,14.61,8,19.32s10.49,7.46,19.06,7.82H64c9.17-1,15.85-4,20.15-9s6.36-11.91,6.21-20.88v0h0v-28a48.93,48.93,0,0,0-1.45-13.16,26.53,26.53,0,0,0-5.52-10.43H82.6a15.52,15.52,0,0,1-5.32-1.23,13.74,13.74,0,0,0-4.8-1.1,23.74,23.74,0,0,0-6.14,1.23A23.73,23.73,0,0,1,59.49,37a18.89,18.89,0,0,1-6.27-1.4,13.21,13.21,0,0,0-5.38-1.13,17.34,17.34,0,0,0-5.38,1.69,15,15,0,0,1-6.27,1.72,13.09,13.09,0,0,1-6-1.92,9.48,9.48,0,0,0-4.44-1.48,15.42,15.42,0,0,0-5.64,1.79c-2.28,1.05-4.47,2.07-7.15,2-.46,0-.93,0-1.39-.09Z", + "name": "path", + "type": "path" + } + ], + "viewBox": "0 0 96.79 122.88" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "jar-solid (2)" + }, + "position": { + "height": 0.0324, + "width": 0.0182, + "x": 0.0829, + "y": 0.6945 + }, + "props": { + "elements": [ + { + "d": "M32 32C32 14.3 46.3 0 64 0H256c17.7 0 32 14.3 32 32s-14.3 32-32 32H64C46.3 64 32 49.7 32 32zM0 160c0-35.3 28.7-64 64-64H256c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V160zm96 64c-17.7 0-32 14.3-32 32v96c0 17.7 14.3 32 32 32H224c17.7 0 32-14.3 32-32V256c0-17.7-14.3-32-32-32H96z", + "name": "path", + "type": "path" + } + ], + "style": { + "color": "#FF8C00" + }, + "viewBox": "0 0 320 512" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "car_crash_white_24dp" + }, + "position": { + "height": 0.0222, + "width": 0.0125, + "x": 0.1294, + "y": 0.7574 + }, + "props": { + "elements": [ + { + "elements": [ + { + "fill": { + "paint": "transparent" + }, + "height": "24", + "name": "rect", + "type": "rect", + "width": "24" + } + ], + "name": "group", + "type": "group" + }, + { + "elements": [ + { + "elements": [ + { + "d": "M18,1c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5S20.76,1,18,1z M18.5,7h-1V3h1V7z M18.5,8v1h-1V8H18.5z M6,13.5 C6,12.67,6.67,12,7.5,12S9,12.67,9,13.5S8.33,15,7.5,15S6,14.33,6,13.5z M19,12.93c0.65-0.09,1.34-0.28,2-0.6h0V19 c0,0.55-0.45,1-1,1h-1c-0.55,0-1-0.45-1-1v-1H6v1c0,0.55-0.45,1-1,1H4c-0.55,0-1-0.45-1-1v-8l2.08-5.99C5.29,4.42,5.84,4,6.5,4 l4.79,0C11.1,4.63,11,5.31,11,6H6.85L5.81,9h5.86v0c0.36,0.75,0.84,1.43,1.43,2L5,11v5h14L19,12.93z M17.91,13 c-0.89-0.01-1.74-0.19-2.53-0.51C15.15,12.76,15,13.11,15,13.5c0,0.83,0.67,1.5,1.5,1.5s1.5-0.67,1.5-1.5 C18,13.32,17.97,13.16,17.91,13z", + "name": "path", + "type": "path" + } + ], + "name": "group", + "type": "group" + } + ], + "name": "group", + "type": "group" + } + ], + "fill": { + "paint": "#FFFFFF" + }, + "viewBox": "0 0 24 24" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "troubleshoot_white_24dp" + }, + "position": { + "height": 0.0222, + "width": 0.0125, + "x": 0.0078, + "y": 0.5194 + }, + "props": { + "elements": [ + { + "elements": [ + { + "fill": { + "paint": "transparent" + }, + "height": "24", + "name": "rect", + "type": "rect", + "width": "24" + } + ], + "name": "group", + "type": "group" + }, + { + "elements": [ + { + "elements": [ + { + "d": "M22,20.59l-4.69-4.69C18.37,14.55,19,12.85,19,11c0-4.42-3.58-8-8-8c-4.08,0-7.44,3.05-7.93,7h2.02C5.57,7.17,8.03,5,11,5 c3.31,0,6,2.69,6,6s-2.69,6-6,6c-2.42,0-4.5-1.44-5.45-3.5H3.4C4.45,16.69,7.46,19,11,19c1.85,0,3.55-0.63,4.9-1.69L20.59,22 L22,20.59z", + "name": "path", + "type": "path" + }, + { + "name": "polygon", + "points": "8.43,9.69 9.65,15 11.29,15 12.55,11.22 13.5,13.5 15.5,13.5 15.5,12 14.5,12 13.25,9 11.71,9 10.59,12.37 9.35,7 7.7,7 6.45,11 1,11 1,12.5 7.55,12.5", + "type": "polygon" + } + ], + "name": "group", + "type": "group" + } + ], + "name": "group", + "type": "group" + } + ], + "fill": { + "paint": "#FFFFFF" + }, + "viewBox": "0 0 24 24" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "PressureSwitch" + }, + "position": { + "height": 0.0231, + "width": 0.013, + "x": 0.3646, + "y": 0.6584 + }, + "props": { + "elements": [ + { + "name": "defs", + "type": "text" + }, + { + "elements": [ + { + "fill": { + "paint": "#FF4747" + }, + "height": "24", + "name": "rect", + "stroke": { + "paint": "rgb(0, 0, 0)" + }, + "type": "rect", + "width": "24", + "x": "0", + "y": "0" + }, + { + "name": "group", + "transform": "translate(-0.5 -0.5)", + "type": "group" + } + ], + "name": "group", + "type": "group" + } + ], + "style": { + "backgroundColor": " rgb(237, 237, 237)" + }, + "viewBox": "-0.5 -0.5 25 25" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "PressureSwitch_0" + }, + "position": { + "height": 0.0333, + "width": 0.0182, + "x": 0.3333, + "y": 0.5259 + }, + "props": { + "elements": [ + { + "elements": [ + { + "elements": [ + { + "id": "stop1507", + "name": "stop1507", + "offset": "0", + "stopColor": "#020101", + "stopOpacity": "1", + "style": { + "stopColor": "#020101", + "stopOpacity": "1" + }, + "type": "stop" + } + ], + "id": "linearGradient1509", + "name": "linearGradient1509", + "type": "linearGradient" + }, + { + "elements": [ + { + "id": "stop1391", + "name": "stop1391", + "offset": "0", + "stopColor": "#020101", + "stopOpacity": "1", + "style": { + "stopColor": "#020101", + "stopOpacity": "1" + }, + "type": "stop" + } + ], + "id": "linearGradient1393", + "name": "linearGradient1393", + "type": "linearGradient" + }, + { + "elements": [ + { + "id": "stop1381", + "name": "stop1381", + "offset": "0", + "stopColor": "#ffffff", + "stopOpacity": "1", + "style": { + "stopColor": "#ffffff", + "stopOpacity": "1" + }, + "type": "stop" + }, + { + "id": "stop1383", + "name": "stop1383", + "offset": "1", + "stopColor": "#ffffff", + "stopOpacity": "0", + "style": { + "stopColor": "#ffffff", + "stopOpacity": "0" + }, + "type": "stop" + } + ], + "id": "linearGradient1385", + "name": "linearGradient1385", + "type": "linearGradient" + }, + { + "gradientTransform": "scale(0.93677795,1.0674888)", + "gradientUnits": "userSpaceOnUse", + "href": "#linearGradient1509", + "id": "linearGradient3055", + "name": "linearGradient3055", + "type": "linearGradient", + "x1": "2.4719212", + "x2": "5.6080947", + "y1": "4.8826461", + "y2": "4.8826461" + } + ], + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "fill": { + "opacity": "1", + "url": "url(#linearGradient3055)" + }, + "id": "tspan1453", + "name": "tspan1453", + "stroke": { + "dasharray": "none", + "width": "0.263597" + }, + "text": "P", + "type": "tspan", + "x": "2.1310973", + "y": "7.0375786" + } + ], + "fill": { + "opacity": "1", + "url": "url(#linearGradient3055)" + }, + "id": "text1455", + "name": "text1455", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": 0.5 + }, + "style": { + "InkscapeFontSpecification": "\u0027Arial Narrow, Normal\u0027", + "fontFamily": "\u0027Arial Narrow\u0027", + "fontSize": "3.55804px", + "paintOrder": "stroke fill markers" + }, + "text": "P", + "transform": "scale(1.0674889,0.9367779)", + "type": "text", + "x": "2.1310973", + "y": "7.0375786" + }, + { + "fill": { + "opacity": "0.0131332", + "paint": "#020101" + }, + "height": "5.0202694", + "id": "rect2295", + "name": "rect2295", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": "0.278718" + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "rect", + "width": "5.0202694", + "x": "0.85620493", + "y": "2.8895655" + }, + { + "d": "M 5.8764744,5.3996999 H 8.910435", + "fill": { + "opacity": "0.0131332", + "paint": "#020101" + }, + "id": "path2444", + "name": "path2444", + "stroke": { + "dasharray": "0.535709, 0.535709", + "dashoffset": "0", + "linejoin": "round", + "paint": "#000000", + "width": "0.535709" + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "path" + }, + { + "d": "M 9.7533984,1.9768429 8.2352994,8.0007424 8.2115423,10.620118", + "fill": { + "opacity": "0.0131332", + "paint": "#020101" + }, + "id": "path2497", + "name": "path2497", + "stroke": { + "dasharray": "none", + "dashoffset": "0", + "linejoin": "round", + "paint": "#000000", + "width": "0.461924" + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "path" + }, + { + "d": "M 10.943707,2.4945992 H 8.2013803 l 10e-8,-1.69078389", + "fill": { + "opacity": "0.0131332", + "paint": "#020101" + }, + "id": "path2515", + "name": "path2515", + "stroke": { + "dasharray": "none", + "dashoffset": "0", + "linejoin": "round", + "paint": "#000000", + "width": "0.441581" + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "path" + }, + { + "fill": { + "opacity": "0.0131332", + "paint": "#020101" + }, + "height": "11.216189", + "id": "rect2517", + "name": "rect2517", + "stroke": { + "dasharray": "none", + "dashoffset": "0", + "linejoin": "round", + "paint": "#000000", + "width": "0.0883165" + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "rect", + "width": "11.216189", + "x": "6.1553953e-07", + "y": "0" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "viewBox": "0 0 11.21619 11.21619" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "PressureSwitch_1" + }, + "position": { + "height": 0.0259, + "width": 0.0151, + "x": 0.3302, + "y": 0.7852 + }, + "props": { + "elements": [ + { + "elements": [ + { + "elements": [ + { + "id": "stop1507", + "name": "stop1507", + "offset": "0", + "stopColor": "#020101", + "stopOpacity": "1", + "style": { + "stopColor": "#020101", + "stopOpacity": "1" + }, + "type": "stop" + } + ], + "id": "linearGradient1509", + "name": "linearGradient1509", + "type": "linearGradient" + }, + { + "gradientTransform": "scale(1.0156665,0.98457489)", + "gradientUnits": "userSpaceOnUse", + "href": "#linearGradient1509", + "id": "linearGradient3055", + "name": "linearGradient3055", + "type": "linearGradient", + "x1": "2.4719212", + "x2": "5.6080947", + "y1": "4.8826461", + "y2": "4.8826461" + } + ], + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "fill": { + "opacity": "1", + "url": "url(#linearGradient3055)" + }, + "id": "tspan1453", + "name": "tspan1453", + "stroke": { + "dasharray": "none", + "width": "0.724446" + }, + "text": "P", + "type": "tspan", + "x": "0.99078566", + "y": "9.0214157" + } + ], + "fill": { + "opacity": "1", + "url": "url(#linearGradient3055)" + }, + "id": "text1455", + "name": "text1455", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": "0.724446" + }, + "style": { + "InkscapeFontSpecification": "\u0027Arial Narrow, Normal\u0027", + "fontFamily": "\u0027Arial Narrow\u0027", + "fontSize": "9.7785px", + "paintOrder": "stroke fill markers" + }, + "text": "P", + "transform": "scale(0.98457515,1.0156665)", + "type": "text", + "x": "0.99078566", + "y": "9.0214157" + }, + { + "fill": { + "opacity": 1, + "paint": "#FF4747" + }, + "height": "11.216189", + "id": "rect5779", + "name": "rect5779", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": "0.447246" + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "rect", + "width": "11.21619", + "x": "7.7715612e-16", + "y": "0" + }, + { + "d": "M 7.1327097,2.9635882 9.9122555,5.8103519 6.9937326,8.2419488", + "fill": { + "opacity": "0.0131332", + "paint": "#020101" + }, + "id": "path3213", + "name": "path3213", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": "0.453321" + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "path" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "viewBox": "0 0 11.21619 11.21619" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "PressureSwitch_2" + }, + "position": { + "height": 0.0213, + "width": 0.0099, + "x": 0.4766, + "y": 0.7213 + }, + "props": { + "elements": [ + { + "elements": [ + { + "elements": [ + { + "id": "stop1507", + "name": "stop1507", + "offset": "0", + "stopColor": "#020101", + "stopOpacity": "1", + "style": { + "stopColor": "#020101", + "stopOpacity": "1" + }, + "type": "stop" + } + ], + "id": "linearGradient1509", + "name": "linearGradient1509", + "type": "linearGradient" + }, + { + "gradientTransform": "matrix(1.0156665,0,0,0.98457489,-0.22712617,-0.22017344)", + "gradientUnits": "userSpaceOnUse", + "href": "#linearGradient1509", + "id": "linearGradient3055", + "name": "linearGradient3055", + "type": "linearGradient", + "x1": "2.4719212", + "x2": "5.6080947", + "y1": "4.8826461", + "y2": "4.8826461" + } + ], + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "fill": { + "opacity": "0.0131332", + "paint": "#020101" + }, + "height": "11.216189", + "id": "rect5779", + "name": "rect5779", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": 1.2 + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "rect", + "width": "11.21619", + "x": "7.7715612e-16", + "y": "0" + }, + { + "elements": [ + { + "fill": { + "opacity": "1", + "url": "url(#linearGradient3055)" + }, + "id": "tspan1453", + "name": "tspan1453", + "stroke": { + "dasharray": "none", + "width": "0.116835" + }, + "text": "P", + "type": "tspan", + "x": "0.99078566", + "y": "9.0214157" + } + ], + "fill": { + "opacity": "1", + "url": "blue" + }, + "id": "text1455", + "name": "text1455", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": "0.116835" + }, + "style": { + "InkscapeFontSpecification": "\u0027Arial Narrow, Normal\u0027", + "fontFamily": "\u0027Arial Narrow\u0027", + "fontSize": "9.7785px", + "paintOrder": "stroke fill markers" + }, + "text": "P", + "transform": "scale(0.98457515,1.0156665)", + "type": "text", + "x": "0.99078566", + "y": "9.0214157" + }, + { + "d": "M 7.1327097,2.9635882 9.9122555,5.8103519 6.9937326,8.2419488", + "fill": { + "opacity": "0.0131332", + "paint": "#020101" + }, + "id": "path3213", + "name": "path3213", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "paint": "#000000", + "width": "0.663625" + }, + "style": { + "paintOrder": "stroke fill markers" + }, + "type": "path" + } + ], + "id": "layer1", + "name": "layer1", + "transform": "translate(0.22362278,0.22362278)", + "type": "group" + } + ], + "viewBox": "0 0 11.663437 11.663435" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "test3" + }, + "position": { + "height": 0.0213, + "width": 0.0187, + "x": 0.4052, + "y": 0.7953 + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "fill": { + "paint": "#000000" + }, + "id": "text2816", + "name": "text2816", + "stroke": { + "dasharray": "none", + "linejoin": "round", + "opacity": "1", + "paint": "#000000", + "width": 1 + }, + "style": { + "InkscapeFontSpecification": "\u0027Arial Narrow, Normal\u0027", + "fontFamily": "\u0027Arial Narrow\u0027", + "fontSize": "24.246px", + "paintOrder": "stroke fill markers" + }, + "text": "TEST", + "transform": "scale(0.95052221,1.0520533)", + "type": "text", + "x": "0.053112458", + "y": "29.578585" + } + ], + "id": "g2001", + "name": "g2001", + "transform": "matrix(0.26458333,0,0,0.26458333,2.0794599,4.809009)", + "type": "group" + } + ], + "id": "layer1", + "name": "layer1", + "transform": "translate(-1.9471683,-4.6767173)", + "type": "group" + } + ], + "style": { + "borderStyle": "solid", + "borderWidth": "1.5px" + }, + "viewBox": "0 0 12.964584 12.964583" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Pressure" + }, + "position": { + "height": 0.0926, + "width": 0.0516, + "x": 0.5297, + "y": 0.2824 + }, + "props": { + "elements": [ + { + "name": "defs", + "type": "defs" + }, + { + "elements": [ + { + "fill": { + "paint": "red" + }, + "height": "30", + "name": "rect", + "stroke": { + "paint": "#FF0000" + }, + "type": "rect", + "width": "30", + "x": "0", + "y": "0" + }, + { + "name": "group", + "transform": "translate(-0.5 -0.5)", + "type": "group" + } + ], + "name": "group", + "type": "group" + } + ], + "style": { + "backgroundColor": " rgb(255, 255, 255)" + }, + "viewBox": "-0.5 -0.5 31 31" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Pressure_0" + }, + "position": { + "height": 0.0287, + "width": 0.0161, + "x": 0.5729, + "y": 0.4787 + }, + "props": { + "elements": [ + { + "name": "defs", + "type": "defs" + }, + { + "elements": [ + { + "fill": { + "paint": "rgb(255, 255, 255)" + }, + "height": "30", + "name": "rect", + "stroke": { + "paint": "rgb(0, 0, 0)" + }, + "type": "rect", + "width": "30", + "x": "0", + "y": "0" + }, + { + "name": "group", + "transform": "translate(-0.5 -0.5)", + "type": "group" + } + ], + "name": "group", + "type": "group" + } + ], + "style": { + "backgroundColor": " rgb(255, 255, 255)" + }, + "viewBox": "-0.5 -0.5 31 31" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Pressure_1" + }, + "position": { + "height": 0.0287, + "width": 0.0161, + "x": 0.5968, + "y": 0.5268 + }, + "props": { + "elements": [ + { + "id": "defs132", + "name": "defs132", + "type": "defs" + }, + { + "elements": [ + { + "fill": { + "paint": "#ffffff" + }, + "height": "30", + "id": "rect134", + "name": "rect134", + "stroke": { + "paint": "#000000" + }, + "type": "rect", + "width": "30", + "x": "0", + "y": "0" + }, + { + "id": "g140", + "name": "g140", + "transform": "translate(-0.5,-0.5)", + "type": "group" + } + ], + "id": "g142", + "name": "g142", + "type": "group" + } + ], + "viewBox": "-0.5 -0.5 31 31" + }, + "type": "ia.shapes.svg" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tdef getPresignedURL(self, objectKey):\n\t\t\"\"\"\n\t\tGenerates a uri to retrieve images from an S3 bucket.\n\t\tBucket names are globally unique so different regions \n\t\tmust use a prefix for the bucket name. \n\t\tRegion and prefix are stored as custom session variables.\n\t\t\n\t\t\tArgs:\n\t\t \tself: Refrence to the object calling the function.\n\t\t \tparam2: key to the s3 object returned.\n\t\t\n\t\t\tReturns:\n\t\t \ts3 Url to display the image in S3.\n\t\t\n\t\t\tRaises:\n\t\t \tKeyError: None.\n\t\t\"\"\"\n\t\timport com.amazonaws.services.s3.AmazonS3ClientBuilder as AmazonS3ClientBuilder\n\t\timport com.amazonaws.services.s3.model.GeneratePresignedUrlRequest as GeneratePresignedUrlRequest\n\t\timport com.amazonaws.HttpMethod as HttpMethod\n\t\t\n\t\tbucket_names \u003d {\"eu\":\"ignition-image-repo\", \"na\":\"na-ignition-image-repo\", \n\t\t\t\t\t\t\"jp\":\"jp-ignition-image-repo\"}\n\t\t\t\n\t\ttry:\n\t\t\tclientRegion \u003d self.session.custom.s3.region\n\t\t\tprefix \u003d self.session.custom.s3.prefix\n\t\texcept:\n\t\t\tclientRegion \u003d \"eu-west-1\"\n\t\t\tprefix \u003d \"eu\" \n\n\t\tif not clientRegion:\n\t\t\tclientRegion \u003d \"eu-west-1\";\n\t\t\n\t\tbucketName \u003d bucket_names.get(prefix, \"ignition-image-repo\")\n\t\tsystem.perspective.print(clientRegion)\n\t\tsystem.perspective.print(bucketName)\n\t\t\n\t\t\n\t\ts3Client \u003d AmazonS3ClientBuilder.standard().withRegion(clientRegion).build();\n\t\tgeneratePresignedUrlRequest \u003d GeneratePresignedUrlRequest(bucketName, objectKey).withMethod(HttpMethod.GET);\n\t\turl \u003d s3Client.generatePresignedUrl(generatePresignedUrlRequest);\n\t\t\n\t\treturn url\n\tgetPresignedURL(self, \"SCADA/CGN9/images/CGN9_V2.svg\")" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_4" + }, + "position": { + "height": 0.0315, + "width": 0.0417, + "x": 0.5516, + "y": 0.1463 + }, + "type": "ia.input.button" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\n\tAWS.secrets_manager.get_secret(self)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_5" + }, + "position": { + "height": 0.0315, + "width": 0.0417, + "x": 0.537, + "y": 0.2222 + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "chute" + }, + "position": { + "height": 0.0324, + "width": 0.0047, + "x": 0.6302, + "y": 0.6944 + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "fill": { + "opacity": "1", + "paint": "#ffffff" + }, + "height": "9.259264", + "id": "rect144", + "name": "rect144", + "stroke": { + "dasharray": "none", + "opacity": "1", + "paint": "#000000", + "width": "0.15" + }, + "type": "rect", + "width": "2.3794692", + "x": "0.0016391517", + "y": "1.0313853e-08" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "viewBox": "0 0 2.3812499 9.2604166" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Status" + }, + "position": { + "height": 0.0185, + "width": 0.0151, + "x": 0.0911, + "y": 0.5769 + }, + "props": { + "params": { + "directionLeft": false, + "tagProps": [ + "PLC24/0511_43_02", + "PLC02", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "path": "Symbol-Views/Equipment-Views/Status" + }, + "type": "ia.display.view" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tsystem.perspective.print(config.project_config.get_project_config())" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button_6" + }, + "position": { + "height": 0.0315, + "width": 0.0417, + "x": 0.7234, + "y": 0.1704 + }, + "type": "ia.input.button" + }, + { + "meta": { + "name": "pointer_symbol_3" + }, + "position": { + "height": 0.0648, + "width": 0.026, + "x": 0.6281, + "y": 0.5963 + }, + "props": { + "elements": [ + { + "id": "defs2", + "name": "defs2", + "type": "defs" + }, + { + "elements": [ + { + "elements": [ + { + "elements": [ + { + "d": "m 10.648338,6.5392075 c 0,2.2076808 -1.7019291,4.4141715 -3.90961,4.4141715 -2.2076807,0 -4.0851094,-2.2064908 -4.0851094,-4.4141715 -1e-7,-2.2076807 1.7896788,-3.9973596 3.9973595,-3.9973596 2.2076809,-2e-7 3.9973599,1.7896787 3.9973599,3.9973596 z", + "fill": { + "opacity": "1", + "paint": "transparent" + }, + "id": "path7858", + "name": "path7858", + "stroke": { + "dasharray": "none", + "opacity": "1", + "paint": "#000000", + "width": "0.523875" + }, + "style": { + "color": "#000000" + }, + "type": "path" + }, + { + "d": "m 6.6503906,0.5703125 c -3.2732983,0 -5.96874998,2.6954516 -5.96874998,5.96875 0,3.2732984 6.23199968,11.0143705 6.23199968,11.0143705 0,0 5.7055007,-7.7410721 5.7055007,-11.0143705 0,-3.2732984 -2.695452,-5.96875 -5.9687504,-5.96875 z m 0,3.9433594 c 1.1420587,0 2.0253907,0.883332 2.0253907,2.0253906 0,1.1420586 -0.883332,2.0253906 -2.0253907,2.0253906 C 5.508332,8.5644531 4.625,7.6811211 4.625,6.5390625 4.625,5.3970039 5.508332,4.5136719 6.6503906,4.5136719 Z", + "fill": { + "opacity": "1", + "paint": "#000000" + }, + "id": "path7860", + "name": "path7860", + "stroke": { + "dasharray": "none", + "opacity": "1", + "paint": "#000000", + "width": "0.523875" + }, + "style": { + "color": "#000000" + }, + "type": "path" + } + ], + "fill": { + "opacity": "1", + "paint": "transparent" + }, + "id": "path7854", + "name": "path7854", + "stroke": { + "dasharray": "none", + "opacity": "1", + "paint": "#000000", + "width": "0.523875" + }, + "type": "group" + } + ], + "id": "path4106", + "name": "path4106", + "type": "group" + } + ], + "id": "layer1", + "name": "layer1", + "type": "group" + } + ], + "viewBox": "0 0 13.229166 18.520834" + }, + "type": "ia.shapes.svg" + }, + { + "meta": { + "name": "Icon" + }, + "position": { + "height": 0.0278, + "width": 0.0156, + "x": 0.4068, + "y": 0.3102 + }, + "props": { + "path": "material/hourglass_empty", + "style": { + "classes": "rotate" + } + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "root" + }, + "position": { + "x": -0.125, + "y": 0.0278 + }, + "props": { + "mode": "percent" + }, + "type": "ia.container.coord" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.vision/client-tags/data.bin b/com.inductiveautomation.vision/client-tags/data.bin new file mode 100644 index 0000000..399a4f7 Binary files /dev/null and b/com.inductiveautomation.vision/client-tags/data.bin differ diff --git a/com.inductiveautomation.vision/client-tags/resource.json b/com.inductiveautomation.vision/client-tags/resource.json new file mode 100644 index 0000000..eca335d --- /dev/null +++ b/com.inductiveautomation.vision/client-tags/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "C", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "data.bin" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-10-25T07:43:53Z" + }, + "lastModificationSignature": "9507094e62bcbd4b5c0d3a9ca915ea0954abe4004aa32cbc6a7d373cbe6de012" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.vision/login-properties/data.bin b/com.inductiveautomation.vision/login-properties/data.bin new file mode 100644 index 0000000..ac02e3d Binary files /dev/null and b/com.inductiveautomation.vision/login-properties/data.bin differ diff --git a/com.inductiveautomation.vision/login-properties/resource.json b/com.inductiveautomation.vision/login-properties/resource.json new file mode 100644 index 0000000..b7da9ba --- /dev/null +++ b/com.inductiveautomation.vision/login-properties/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "C", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "data.bin" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-11-24T13:55:44Z" + }, + "lastModificationSignature": "0066d6e08e8bb4a7b4004ff036e1cc20059cb343100f6663306727267350e4a6" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.vision/templates/Site Specific/Reset_Start_JamReset/data.bin b/com.inductiveautomation.vision/templates/Site Specific/Reset_Start_JamReset/data.bin new file mode 100644 index 0000000..460c28f Binary files /dev/null and b/com.inductiveautomation.vision/templates/Site Specific/Reset_Start_JamReset/data.bin differ diff --git a/com.inductiveautomation.vision/templates/Site Specific/Reset_Start_JamReset/resource.json b/com.inductiveautomation.vision/templates/Site Specific/Reset_Start_JamReset/resource.json new file mode 100644 index 0000000..fb615cf --- /dev/null +++ b/com.inductiveautomation.vision/templates/Site Specific/Reset_Start_JamReset/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "C", + "documentation": "", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "data.bin" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-03-28T14:21:52Z" + }, + "lastModificationSignature": "5ae3323c4a58d2268bd5df7bbdbae9a7f0836d6d2918471fafd90f03a5499b26" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.vision/templates/Site Specific/StatusControl_Bar_Has_Role/resource.json b/com.inductiveautomation.vision/templates/Site Specific/StatusControl_Bar_Has_Role/resource.json new file mode 100644 index 0000000..101668d --- /dev/null +++ b/com.inductiveautomation.vision/templates/Site Specific/StatusControl_Bar_Has_Role/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "C", + "documentation": "", + "version": 2, + "restricted": false, + "overridable": true, + "files": [ + "template.bin" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-03-28T16:42:16Z" + }, + "lastModificationSignature": "873318c449bc056ca3ea412c1226358696a9df9888362c23cfda3cd08dd41551" + } +} \ No newline at end of file diff --git a/com.inductiveautomation.vision/templates/Site Specific/StatusControl_Bar_Has_Role/template.bin b/com.inductiveautomation.vision/templates/Site Specific/StatusControl_Bar_Has_Role/template.bin new file mode 100644 index 0000000..6e5394b Binary files /dev/null and b/com.inductiveautomation.vision/templates/Site Specific/StatusControl_Bar_Has_Role/template.bin differ diff --git a/ignition/event-scripts/data.bin b/ignition/event-scripts/data.bin new file mode 100644 index 0000000..56ba51e Binary files /dev/null and b/ignition/event-scripts/data.bin differ diff --git a/ignition/event-scripts/resource.json b/ignition/event-scripts/resource.json new file mode 100644 index 0000000..01766c6 --- /dev/null +++ b/ignition/event-scripts/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "data.bin" + ], + "attributes": { + "lastModification": { + "actor": "iama", + "timestamp": "2024-04-11T17:40:08Z" + }, + "lastModificationSignature": "d844fab616a878fd8472c4b6f0bc0a0433de7e0404dc64629a56773ccb66ab63" + } +} \ No newline at end of file diff --git a/ignition/global-props/data.bin b/ignition/global-props/data.bin new file mode 100644 index 0000000..437e9aa Binary files /dev/null and b/ignition/global-props/data.bin differ diff --git a/ignition/global-props/resource.json b/ignition/global-props/resource.json new file mode 100644 index 0000000..80cc116 --- /dev/null +++ b/ignition/global-props/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "data.bin" + ], + "attributes": { + "lastModification": { + "actor": "admin", + "timestamp": "2025-04-08T08:08:33Z" + }, + "lastModificationSignature": "8c0dce8b2a0912f2db47461bcbee1774c1d52b7d50cac0a39362b7442b74c877" + } +} \ No newline at end of file diff --git a/ignition/named-query/StoredProcedures/GetHistoricalAlarms/data.bin b/ignition/named-query/StoredProcedures/GetHistoricalAlarms/data.bin new file mode 100644 index 0000000..512c672 Binary files /dev/null and b/ignition/named-query/StoredProcedures/GetHistoricalAlarms/data.bin differ diff --git a/ignition/named-query/StoredProcedures/GetHistoricalAlarms/resource.json b/ignition/named-query/StoredProcedures/GetHistoricalAlarms/resource.json new file mode 100644 index 0000000..40d0178 --- /dev/null +++ b/ignition/named-query/StoredProcedures/GetHistoricalAlarms/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "DG", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "data.bin" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2021-11-22T21:28:09Z" + }, + "lastModificationSignature": "1ce3d225e5a61a7b05dd7cfcd3611afd76f98520e6f3703ff149bc48304938d3" + } +} \ No newline at end of file diff --git a/ignition/script-python/AWS/build_url/code.py b/ignition/script-python/AWS/build_url/code.py new file mode 100644 index 0000000..8f2274d --- /dev/null +++ b/ignition/script-python/AWS/build_url/code.py @@ -0,0 +1,99 @@ +import datetime +import hashlib +import hmac + +try: + from urllib.parse import quote_plus +except ImportError: + from urllib import quote_plus + + +def sign(key, msg): + return hmac.new(key, msg.encode("utf-8"), hashlib.sha256).digest() + + +def getSignatureKey(key, dateStamp, regionName, serviceName): + kDate = sign(("AWS4" + key).encode("utf-8"), dateStamp) + kRegion = sign(kDate, regionName) + kService = sign(kRegion, serviceName) + kSigning = sign(kService, "aws4_request") + return kSigning + + +def build_querystring(access_key, session_key, algorithm, amz_date, credential_scope): + query_strings = { + "X-Amz-Algorithm": algorithm, + "X-Amz-Credential": quote_plus(access_key + "/" + credential_scope), + "X-Amz-Date": amz_date, + #"X-Amz-Security-Token": quote_plus(session_key), + "X-Amz-SignedHeaders": "host", + } + keys = list(query_strings.keys()) + keys.sort() + query = [] + for key in keys: + query.append("{}={}".format(key, query_strings[key])) + + canonical_query_string = "&".join( + query + #["{}={}".format(key, value) for key, value in query_strings.items()] + ) + return canonical_query_string + + +def make_websocket_connection(api_id, region, stage, credentials): + method = "GET" + service = "execute-api" + host = "{}.{}.{}.amazonaws.com".format(api_id, service, region) + canonical_uri = "/{}".format(stage) + access_key = credentials["AccessKey"] + secret_key = credentials["SecretKey"] + session_key = credentials["SessionKey"] + now = datetime.datetime.utcnow() + + amz_date = now.strftime("%Y%m%dT%H%M%SZ") + datestamp = now.strftime("%Y%m%d") + canonical_headers = "host:" + host + "\n" + signed_headers = "host" + algorithm = "AWS4-HMAC-SHA256" + credential_scope = "/".join([datestamp, region, service, "aws4_request"]) + + canonical_querystring = build_querystring( + access_key, session_key, algorithm, amz_date, credential_scope + ) + payload_hash = hashlib.sha256(("").encode("utf-8")).hexdigest() + canonical_request = "\n".join( + [ + method, + canonical_uri, + "", + #canonical_querystring, + canonical_headers, + signed_headers, + payload_hash, + ] + ) + string_to_sign = "\n".join( + [ + algorithm, + amz_date, + credential_scope, + hashlib.sha256(canonical_request.encode("utf-8")).hexdigest(), + ] + ) + signing_key = getSignatureKey(secret_key, datestamp, region, service) + signature = hmac.new( + signing_key, string_to_sign.encode("utf-8"), hashlib.sha256 + ).hexdigest() + canonical_querystring += "&X-Amz-Signature=" + signature + request_url = "wss://{}/{}".format(host, stage) + auth_header = algorithm + " Credential=" + access_key + "/" + credential_scope + ", SignedHeaders=" + signed_headers + ", Signature=" + signature + #print('-H "Authorization":"' + auth_header +'" -H "X-Amz-Date":"' + amz_date + '" -H "X-Amz-Security-Token":"' + session_key + '" ') + request_headers = { + "Authorization":auth_header, + "X-Amz-Date": amz_date, + "X-Amz-Security-Token": session_key + } + return request_url, request_headers + + diff --git a/ignition/script-python/AWS/build_url/resource.json b/ignition/script-python/AWS/build_url/resource.json new file mode 100644 index 0000000..400e4e7 --- /dev/null +++ b/ignition/script-python/AWS/build_url/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-03-14T07:26:30Z" + }, + "lastModificationSignature": "81b8552d95459c59f77dbece541196c67a840519aeb3d216769592c24ad1542c", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/AWS/build_url_http/code.py b/ignition/script-python/AWS/build_url_http/code.py new file mode 100644 index 0000000..1503a50 --- /dev/null +++ b/ignition/script-python/AWS/build_url_http/code.py @@ -0,0 +1,293 @@ +import sys, os, datetime, hashlib, hmac +from StringIO import StringIO +import gzip +import urllib +import urllib2 +import json + +def get_filters_2(**kwargs): + filter_stack = [] + canonical_querystring = "" + url_encoding = kwargs.get("url_encoding") + + sources = kwargs.get("sources") + if sources: + source_string = "SourceId=" + ",".join(sources) + filter_stack.append(source_string) + + devices = kwargs.get("devices") + if devices: + device_string = "Device=" + ",".join(devices) + filter_stack.append(device_string) + + priorities = kwargs.get("priorities") + if priorities: + priority_string = "Priority=" + ",".join(str(item) for item in priorities) + filter_stack.append(priority_string) + + types = kwargs.get("types") + if types: + type_string = ("Type=" + ",".join(str(item) for item in types)) + filter_stack.append(type_string) + + time_from = kwargs.get("start") + if time_from: + time_from_string = "StartTimestamp=" + str(time_from) + filter_stack.append(time_from_string) + + time_to = kwargs.get("end") + if time_to: + time_to_string = "EndTimestamp=" + str(time_to) + filter_stack.append(time_to_string) + + duration = kwargs.get("duration") + if duration: + duration_string = "MinimumDuration=" + str(duration) + filter_stack.append(duration_string) + if filter_stack: + if url_encoding: + canonical_querystring += "Filter=" + for i, j in enumerate(filter_stack): + if i == len(filter_stack)-1 and url_encoding == True: + canonical_querystring += urllib.quote(j, "") + elif i == len(filter_stack)-1: + canonical_querystring += j + elif url_encoding == True: + canonical_querystring += urllib.quote(j + "&", "") + else: + canonical_querystring += (j + "&") + + return canonical_querystring + +def get_filters(**kwargs): + #Build filter string, filters are passed as key word arguments into the function + #Check if any of the filters have been passed means we need to add Filter=. + #Each filter is then converted using the urllib_parse. + canonical_querystring = "" + sources = kwargs.get("sources") + devices = kwargs.get("devices") + priorities = kwargs.get("priorities") + types = kwargs.get("types") + time_from = kwargs.get("start") + time_to = kwargs.get("end") + duration = kwargs.get("duration") + url_encoding = kwargs.get("url_encoding") + filter_list = [sources, devices, priorities, types, time_from, time_to, duration] + if any(filter_list): + canonical_querystring = "Filter=" + if sources: + source_string = ("SourceId=" + ",".join(sources)) + if url_encoding == True: + canonical_querystring += urllib.quote(source_string + "&","") + else: + canonical_querystring += source_string + "&" + if devices: + device_string = ("Device=" + ",".join(devices)) + if url_encoding == True: + canonical_querystring += urllib.quote(device_string + "&","") + else: + canonical_querystring += device_string +"&" + if priorities: + priority_string = ("Priority=" + ",".join(str(item) for item in priorities)) + if url_encoding == True: + canonical_querystring += urllib.quote(priority_string + "&", "") + else: + canonical_querystring += priority_string +"&" + if types: + type_string = ("Type=" + ",".join(str(item) for item in types)) + if url_encoding == True: + canonical_querystring += urllib.quote(type_string + "&","") + else: + canonical_querystring += type_string +"&" + if time_from: + if url_encoding == True: + canonical_querystring += urllib.quote("StartTimestamp=" + str(time_from) + "&","") + else: + canonical_querystring += "StartTimestamp=" + str(time_from) +"&" + if time_to: + if url_encoding == True: + canonical_querystring += urllib.quote("EndTimestamp=" + str(time_to) + "&","") + else: + canonical_querystring += "EndTimestamp=" + str(time_to) +"&" + if duration: + if url_encoding == True: + canonical_querystring += urllib.quote("MinimumDuration=" + str(duration) + "&","") + else: + canonical_querystring += "MinimumDuration=" + str(duration) +"&" + system.perspective.print("filtered string = " + canonical_querystring ) + canonical_querystring = canonical_querystring.rstrip("&") + return canonical_querystring + +def get_response(response): + if response.info().get('Content-Encoding') == 'gzip': + buf = StringIO(response.read()) + f = gzip.GzipFile(fileobj=buf) + data = f.read() + return (response.getcode(), data) + else: + buf = StringIO(response.read()) + return(response.getcode(), buf.read()) + +def build_url(credentials, **kwargs): + # ************* REQUEST VALUES ************* + method = 'GET' + service = 'lambda' + + # This is a lookup in secrets to a return the function url for the lambda that needs called. + # This allows beta and prod to be dynamically retrived. + whid = kwargs.get("fc") + region = kwargs.get("region") + API_ID, STAGE, ACC_ID, FUNC_URL = AWS.secrets_manager.get_secret(str(whid), 'scada/api/endpoint') + api_id = FUNC_URL + host = "%s.%s-url.%s.on.aws" % (api_id, service, region) + endpoint = "https://%s" % (host) + + + # Key derivation functions. See: + # http://docs.aws.amazon.com/general/latest/gr/signature-v4-examples.html#signature-v4-examples-python + def sign(key, msg): + return hmac.new(key, msg.encode('utf-8'), hashlib.sha256).digest() + + def getSignatureKey(key, dateStamp, regionName, serviceName): + kDate = sign(('AWS4' + key).encode('utf-8'), dateStamp) + kRegion = sign(kDate, regionName) + kService = sign(kRegion, serviceName) + kSigning = sign(kService, 'aws4_request') + return kSigning + + # Read AWS access key from env. variables or configuration file. Best practice is NOT + # to embed credentials in code. +# access_key = os.environ.get('AWS_ACCESS_KEY_ID') +# access_key= 'ASIATVSVCYSV2JJJMDPP' +# secret_key = os.environ.get('AWS_SECRET_ACCESS_KEY') +# secret_key= 'Hc0G/0eACBlgplGSBnfsB98Y6DPqwpvyb4nc1Rvs' +# session_token = os.environ["AWS_SESSION_TOKEN"] +# session_token= 'IQoJb3JpZ2luX2VjEJr//////////wEaCWV1LXdlc3QtMSJHMEUCIQCbrPQoj4OM0SXIo6QtcNAblnplgXfvSYIcA+k8xkXmZwIgN1Pi7Nyc66T8p0HkZSMmuW8pu1qPEVJii41YgYCuiBYqngIIo///////////ARAAGgwyNTI1MDc3Njc5NzkiDKGV69tLNcKNVcoeryryARkU2Lmnj0aa+ilLOrg35FIb81jvmj6bpPR3+5zJ3Wna+vOBgz6cqphyn28+Q8Ryw/lzM6gM0vWH+gV26CuQZtKd1U4ETo9eL9QuluLBqLnZYfT5q+F9hzJy3OQQl0c3VvwcaCjOPrMdbvWnJGEoEZTKe7Xm5v3ok3huJDgKLEIVlE6Z4c2kKNy/N/JfbxB5a33A2eaE9YaGj1V0cQgUFCCkn9uDq8W4TzOPZ3NgKAyj8RoBR6KAC8gEtWXFEwwZR3ZMwYIXryEepcU7HQSHpp66JAFm/X5+HNxRe7WUwTETAveYMNi5ssFzl3rneKh9+U37MPW58psGOp0B11BghSma0KZHgCfXqdsgfGyD7/sBEyYE9wdnzmi8fOpel5EDQoUoYilRSXod2E9wlaXj3h8S+dtBJjGVqsIbHEIrW7WKOEYELxoW4VSDw5hDjZaUuZ5fA3z59c4CEeAz3v5EA6NN6+ulEb7/4pbWF8s3fezNk9T73NpmKnjaMFukcBX8DofesZGJFpfGij2Sx4hQ3qlmG91uac8kMw==' + access_key = credentials["AccessKey"] + secret_key = credentials["SecretKey"] + session_token = credentials["SessionKey"] + + + + if access_key is None or secret_key is None: + system.perspective.print('No access key is available.') + sys.exit() + + # Create a date for headers and the credential string + t = datetime.datetime.utcnow() + amz_date = t.strftime('%Y%m%dT%H%M%SZ') # Format date as YYYYMMDD'T'HHMMSS'Z' + datestamp = t.strftime('%Y%m%d') # Date w/o time, used in credential scope + system.perspective.print("creating header") + system.perspective.print("datestamp = " + str(datestamp) + " region = " + str(region) + "service = " + str(service)) + + # ************* TASK 1: CREATE A CANONICAL REQUEST ************* + # http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html + + # Because almost all information is being passed in the query string, + # the order of these steps is slightly different than examples that + # use an authorization header. + + # Step 1: Define the verb (GET, POST, etc.)--already done. + + # Step 2: Create canonical URI--the part of the URI from domain to query + # string (use '/' if no path) + fc = kwargs.get("fc") + canonical_uri = "/history/%s" % (fc) + + # Step 3: Create the canonical headers and signed headers. Header names + # must be trimmed and lowercase, and sorted in code point order from + # low to high. Note trailing \n in canonical_headers. + # signed_headers is the list of headers that are being included + # as part of the signing process. For requests that use query strings, + # only "host" is included in the signed headers. + canonical_headers = 'host:' + host + '\n' + signed_headers = 'host' + + # Match the algorithm to the hashing algorithm you use, either SHA-1 or + # SHA-256 (recommended) + algorithm = 'AWS4-HMAC-SHA256' + + credential_scope = datestamp + '/' + region + '/' + service + '/' + 'aws4_request' + + # Step 4: Create the canonical query string. In this example, request + # parameters are in the query string. Query string values must + # be URL-encoded (space=%20). The parameters must be sorted by name. + #canonical_querystring = 'Action=CreateUser&UserName=NewUser&Version=2010-05-08' + #canonical_querystring = 'NextToken=' + urllib.parse.quote("1669217267.5230844/PLC09/T00049",'') + '&PageSize=50' + #canonical_querystring = 'PageSize=50&PreviousToken=' + urllib.parse.quote('1669217267.5824845/PLC09/T00099','') + canonical_querystring = "" + #Build filter string, filters are passed as key word arguments int the function + #Check if any of the filters have been passed means we need to add Filter=. + #Each filter is then converted using the urllib_parse. + #Including client id for timestream api. + client_id = kwargs.get("client_id") + if client_id: + canonical_querystring += 'ClientId=' + client_id + '&' + PAGE_SIZE = "200" + filters= kwargs.get("filters","") + if filters != "": + canonical_querystring += filters + "&" + + next_token = kwargs.get("next_token") + + previous_token = kwargs.get("previous_token") + if next_token != None: + canonical_querystring += 'NextToken=' + urllib.quote(next_token,'') + '&' + system.perspective.print("created string " + canonical_querystring) + + if previous_token != None: + canonical_querystring += 'PreviousToken=' + urllib.quote(previous_token,'') + '&' + + else: + canonical_querystring += 'X-Amz-Algorithm=AWS4-HMAC-SHA256' + canonical_querystring += '&X-Amz-Credential=' + urllib.quote_plus(access_key + '/' + credential_scope) + canonical_querystring += '&X-Amz-Date=' + amz_date + #canonical_querystring += '&X-Amz-Expires=30' + canonical_querystring += "&X-Amz-Security-Token=" + urllib.quote_plus(session_token) + canonical_querystring += '&X-Amz-SignedHeaders=' + signed_headers + + + # Step 5: Create payload hash. For GET requests, the payload is an + # empty string (""). + payload_hash = hashlib.sha256(('').encode('utf-8')).hexdigest() + + # Step 6: Combine elements to create canonical request + canonical_request = method + '\n' + canonical_uri + '\n' + canonical_querystring + '\n' + canonical_headers + '\n' + signed_headers + '\n' + payload_hash + + + # ************* TASK 2: CREATE THE STRING TO SIGN************* + string_to_sign = algorithm + '\n' + amz_date + '\n' + credential_scope + '\n' + hashlib.sha256(canonical_request.encode('utf-8')).hexdigest() + + # ************* TASK 3: CALCULATE THE SIGNATURE ************* + # Create the signing key + signing_key = getSignatureKey(secret_key, datestamp, region, service) + + # Sign the string_to_sign using the signing_key + signature = hmac.new(signing_key, (string_to_sign).encode("utf-8"), hashlib.sha256).hexdigest() + + + # ************* TASK 4: ADD SIGNING INFORMATION TO THE REQUEST ************* + # The auth information can be either in a query string + # value or in a header named Authorization. This code shows how to put + # everything into a query string. + canonical_querystring += '&X-Amz-Signature=' + signature + + + # ************* SEND THE REQUEST ************* + # The 'host' header is added automatically by the Python 'request' lib. But it + # must exist as a header in the request. + request_url = endpoint + canonical_uri + "?" + canonical_querystring + + system.perspective.print('\nBEGIN REQUEST++++++++++++++++++++++++++++++++++++') + system.perspective.print('Request URL = ' + request_url) +# r = requests.get(request_url) + request = urllib2.Request(request_url) + request.add_header('Accept-encoding', 'gzip') + try: + response = urllib2.urlopen(request) + except urllib2.HTTPError as e: + return(e.code, None) + except urllib2.URLError as e: + return(e.reason, None) + return get_response(response) + diff --git a/ignition/script-python/AWS/build_url_http/resource.json b/ignition/script-python/AWS/build_url_http/resource.json new file mode 100644 index 0000000..449553a --- /dev/null +++ b/ignition/script-python/AWS/build_url_http/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2024-04-30T16:43:14Z" + }, + "lastModificationSignature": "89770b2e519d9de4af0a9bc0a98c603a0a1119b73d8ee06dab3113426aa78bba", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/AWS/create_tags/code.py b/ignition/script-python/AWS/create_tags/code.py new file mode 100644 index 0000000..60cc4c5 --- /dev/null +++ b/ignition/script-python/AWS/create_tags/code.py @@ -0,0 +1,31 @@ +def create_web_socket_tags(whid): + + logger = system.util.getLogger("%s-Create-Web-Socket-Tags" % (whid)) + if whid != "" and whid != None: + provider = "[%s_SCADA_TAG_PROVIDER]" % (whid) + tag_paths = {"aws_data":{"name":"aws_data", "valueSource": "memory", + "dataType": "String", "value" : "{}"}, + "close_socket":{"name":"close_socket", "valueSource": "memory", + "dataType": "Boolean", "value" : True}, + "device_count":{"name":"device_count", "valueSource": "memory", + "dataType": "String", "value" : "{}"}, + "IdToStatus":{"name":"IdToStatus", "valueSource": "memory", + "dataType": "String", "value" : "{}"}, + "wbsckt_heartbeat_interval":{"name":"wbsckt_heartbeat_interval", "valueSource": "memory", + "dataType": "DateTime", "value" : 0}, + "wbsckt_logging":{"name":"wbsckt_logging", "valueSource": "memory", + "dataType": "Boolean", "value" : False}, + "wbsckt_messages_send":{"name":"wbsckt_messages_send", "valueSource": "memory", + "dataType": "String", "value" : "{}"}, + "thread_id":{"name":"thread_id", "valueSource": "memory", + "dataType": "String", "value" : ""}, + "wbsckt_running":{"name":"wbsckt_running", "valueSource": "memory", + "dataType": "Boolean", "value" : False}, + "download":{"name":"download", "valueSource": "memory", + "dataType": "String", "value" : ""}} + + for k,v in tag_paths.items(): + if not system.tag.exists("%sSystem/%s" % (provider, k)): + base_path = "%s/System" % (provider) + system.tag.configure(base_path, v) + logger.info("Created tag %s" % (k)) \ No newline at end of file diff --git a/ignition/script-python/AWS/create_tags/resource.json b/ignition/script-python/AWS/create_tags/resource.json new file mode 100644 index 0000000..1c04f59 --- /dev/null +++ b/ignition/script-python/AWS/create_tags/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2024-01-03T17:07:33Z" + }, + "lastModificationSignature": "1900f5cd1c2c70666cba5b8af92471273e17aa46e8a08d6321e9a434626d826b", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/AWS/credentials/code.py b/ignition/script-python/AWS/credentials/code.py new file mode 100644 index 0000000..018e3d1 --- /dev/null +++ b/ignition/script-python/AWS/credentials/code.py @@ -0,0 +1,53 @@ +import com.amazonaws.auth.profile.ProfileCredentialsProvider as ProfileCredentialsProvider +import com.amazonaws.services.securitytoken.AWSSecurityTokenService as AWSSecurityTokenService +import com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClientBuilder as AWSSecurityTokenServiceClientBuilder +import com.amazonaws.auth.AWSStaticCredentialsProvider as AWSStaticCredentialsProvider +import com.amazonaws.services.securitytoken.model.GetCallerIdentityRequest as GetCallerIdentityRequest +import com.amazonaws.services.securitytoken.model.AssumeRoleRequest as AssumeRoleRequest + +class GetCredentials(): + ''' + Gets aws credentials for the provided path and region. + + ''' + + def __init__(self, path, profile, region): + self.path = path + self.profile = profile + self.region = region + self.credentials = self.get_credentials() + + def get_credentials(self): + '''Gets the credentials for the AWS account which the s3 bucket is in. + + Args: + + Returns: + credentials : The aws credentials for a given profile stored on the server. + ''' + credentials = ProfileCredentialsProvider(self.path, self.profile).getCredentials() + return credentials + +def assume_role(**kwargs): + aws_credentials_file_path = kwargs.get("credentials_file_path") + aws_profile_name = kwargs.get("profile_name") + aws_region = kwargs.get("region") + aws_arn = kwargs.get("arn") + aws_api_id = kwargs.get("api_id") + aws_stage = kwargs.get("stage") + aws_arn_role = kwargs.get("arn_role") + arn_role = "arn:aws:iam::%s:role/client-api-access-role" % (aws_arn) + #Query the credentials on the ec2 instance, they are found at CREDENTIALS_FILE_PATH +# aws = AWS.credentials.GetCredentials(aws_credentials_file_path, aws_profile_name, aws_region ) +# aws_creds = aws.get_credentials() + sts_client = AWSSecurityTokenServiceClientBuilder.standard().build() + identity_request = GetCallerIdentityRequest() + identity = sts_client.getCallerIdentity(identity_request) + assumeRoleRequest = AssumeRoleRequest().withRoleArn(arn_role).withRoleSessionName("Ignition8"); + response = sts_client.assumeRole(assumeRoleRequest); + session_creds = response.getCredentials(); + access_key = session_creds.getAccessKeyId() + secret_key = session_creds.getSecretAccessKey() + session_token = session_creds.getSessionToken() + credentials = {"AccessKey":access_key, "SecretKey":secret_key, "SessionKey":session_token} + return credentials diff --git a/ignition/script-python/AWS/credentials/resource.json b/ignition/script-python/AWS/credentials/resource.json new file mode 100644 index 0000000..5e69c53 --- /dev/null +++ b/ignition/script-python/AWS/credentials/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-07-25T08:46:09Z" + }, + "lastModificationSignature": "0e96067b7dd1ddc475651661cb663be93d5fa374cd2031b2f4daa7a9e3f49b6e", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/AWS/errors/code.py b/ignition/script-python/AWS/errors/code.py new file mode 100644 index 0000000..f84957e --- /dev/null +++ b/ignition/script-python/AWS/errors/code.py @@ -0,0 +1,11 @@ +import sys + +def error_handler(whid, logger_name): + logger_name = "%s-%s" % (whid, logger_name) + logger = system.util.getLogger(logger_name) + provider = "[%s_SCADA_TAG_PROVIDER]" % (whid) + exc_type, exc_obj, tb = sys.exc_info() + lineno = tb.tb_lineno + logger.error("Error: %s, %s, %s" % (lineno, exc_type, exc_obj)) + system.tag.writeBlocking([provider + "System/wbsckt_running"], [0]) + \ No newline at end of file diff --git a/ignition/script-python/AWS/errors/resource.json b/ignition/script-python/AWS/errors/resource.json new file mode 100644 index 0000000..b0ec04c --- /dev/null +++ b/ignition/script-python/AWS/errors/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-06-28T10:17:54Z" + }, + "hintScope": 2, + "lastModificationSignature": "5c4197d809da50686d0ccbd662a8f90e5f039f23ce465c1581d55b86d4e20556" + } +} \ No newline at end of file diff --git a/ignition/script-python/AWS/heartbeat/code.py b/ignition/script-python/AWS/heartbeat/code.py new file mode 100644 index 0000000..32b4840 --- /dev/null +++ b/ignition/script-python/AWS/heartbeat/code.py @@ -0,0 +1,16 @@ +def check_heartbeat(tag_provider, timeout): + current_time = system.date.now() + tag_path = "%sSystem/wbsckt_heartbeat_interval" % (tag_provider) + tag_to_read = system.tag.readBlocking([tag_path]) + heartbeat = tag_to_read[0].value + time_diff = system.date.secondsBetween(heartbeat, current_time) + if time_diff > timeout: + return True + else: + return False + + +def get_heartbeat(provider): + tag_to_write = "%sSystem/wbsckt_heartbeat_interval" % (provider) + current_time = system.date.now() + system.tag.writeAsync([tag_to_write], [current_time]) diff --git a/ignition/script-python/AWS/heartbeat/resource.json b/ignition/script-python/AWS/heartbeat/resource.json new file mode 100644 index 0000000..28c2e4f --- /dev/null +++ b/ignition/script-python/AWS/heartbeat/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2024-01-03T17:08:37Z" + }, + "lastModificationSignature": "6e1c22e408ad5be09f49b6225f9fc8a9bd275847ce78e6a636268e829695a632", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/AWS/message_types/code.py b/ignition/script-python/AWS/message_types/code.py new file mode 100644 index 0000000..56654e5 --- /dev/null +++ b/ignition/script-python/AWS/message_types/code.py @@ -0,0 +1,302 @@ +from datetime import datetime +import Queue +import copy + +"""Global variables required so we can use different event timer scripts to perform +the writing of tag values seperateley from the reading of messages on the web socket. +State tags messages are queued into the global_queue, where they are read on a different +thread by the Update class and writen to tags. All alarms are written to global_alarms. +The alarms are then read by the Visualisation.status class where they are transformed into +an alarm state and written to tags. """ + +global_alarms = {} +global_states = set([]) +global_queue = Queue.Queue(maxsize=100000) +global_first_connect = False + + +class A2C_MessageHandler(): + """ + Handles the incoming A2C messages. Stores values in memory as dictionaries + and then writes them to tags. + + Instance Attributes: + self.alarms: Holds the current active alarm data(dict). + self.state: Holds the current active state data(dict). + self.update_state: Flag, set when state data is available to write(bool) + self.update_alarms: Flag, set when alarm data is available to write(bool) + self.whid: Warehouse id for the site(str) + self.tag_provider: Tag provider to write tag values to(str) + self.A2C_MESSAGE_TYPES: Holds a reference to the methods called + for different message types(dict) + + Returns: + NA. + + Raises: + KeyError: NA. + """ + def __init__(self, whid): + global global_alarms + global global_first_connect + global_first_connect = False + global_alarms = {} + self.whid = whid + self.tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (self.whid) + self.logger = system.util.getLogger("%s-Web-Socket-Message-Handler" % (self.whid)) + tag_to_read = "%sSystem/wbsckt_logging" % (self.tag_provider) + self.check_logger_active = system.tag.readBlocking([tag_to_read])[0].value + self.A2C_MESSAGE_TYPES = { + "SCADAMetricsInterface.StateChange": self.handle_state_message, +# "SCADAMetricsInterface.Event": self.handle_alarm_message, + "CloudMetricsInterface.Event": self.handle_alarm_message, + "ScadaCloud.Download": self.handle_download_message, + "ScadaCloud.Connection": self.handle_cloud_connection} + + def message_logger(self, message): + if self.check_logger_active: + self.logger.info(message) + + def message_lookup(self, message_type, message): + try: + self.A2C_MESSAGE_TYPES[message_type](message) + except KeyError as e: + self.message_logger("Message type not found:" + + str(message)) + + def handle_message(self, message): + heartbeat_message = message.get("action") + message_type = message.get("payload", {}).get("payloadType") + format = message.get("payload", {}).get("format") + if message_type == "ScadaCloud.Batch": + messages = message.get("payload", {}).get("messages",[]) + for i in messages: + message_type = i.get("payload", {}).get("payloadType") + self.message_lookup(message_type, i) + elif message_type !="ScadaCloud.Batch" and not heartbeat_message: + self.message_lookup(message_type, message) + else: + self.message_logger("Heartbeat:" + str(message)) + tag_to_write = "%sSystem/wbsckt_heartbeat_interval" % (self.tag_provider) + current_time = system.date.now() + system.tag.writeAsync([tag_to_write], [current_time]) + + + def handle_alarm_message(self, message): + global global_alarms + header = message.get("header",{}) + payload = message.get("payload",{}) + source = header.get("sourceId") + alarm_message = payload.get("message") + alarm_type = payload.get("type") + timestamp = payload.get("timestamp") + priority = payload.get("priority") + alarm_id = payload.get("id") + shelve_expiry = payload.get("shelveExpiryEpoch",0) + state = payload.get("state") + if (isinstance(source, unicode) and isinstance(alarm_message, unicode) + and isinstance(alarm_type, int)and isinstance(timestamp, long) + and isinstance(priority, int) and isinstance(shelve_expiry, int) + and isinstance(state, int)) and isinstance(alarm_id, int): + scada_alarm_message = {"sourceId": source, + "message": alarm_message, + "type": alarm_type, + "timestamp": timestamp, + "priority": priority, + "id": alarm_id, + "shelveExpiryEpoch": shelve_expiry, + "state": state} + alarm_id = "%s/alarm/%s" % (source, alarm_id) + if state == 0: + removed_value = global_alarms.pop(alarm_id, "No key found") + self.message_logger("Value removed from aws_data: " + + str(removed_value) + ":" + str(alarm_id)) + else: + global_alarms[alarm_id] = scada_alarm_message + self.message_logger("Value added to aws_data: " + + str(scada_alarm_message)) + else: + self.message_logger("Incorrect type value in message fields: " + + str(message)) + + def handle_state_message(self, message): + global global_queue + header = message.get("header",{}) + payload = message.get("payload",{}) + source_id = header.get("sourceId") + state = payload.get("currentMachineState") + time_stamp = payload.get("timestamp") + if isinstance(source_id, unicode) and isinstance(state, int): + scada_state_message = {"timestamp": time_stamp, + "state":state} + global_queue.put([source_id, state]) + self.message_logger("State message written to queue: " + + str({source_id:scada_state_message})) + else: + self.message_logger("Incorrect type value in message fields: " + + str(message)) + + def handle_download_message(self, message): + url = message.get("payload", {}).get("downloadUrl", None) + session_id = message.get("payload", {}).get("sessionId", None) + download = {} + payload = {"session_id":session_id, "url": url} + download["data"] = [payload] + tag_to_write = "%sSystem/download" % (self.tag_provider) + json_payload = system.util.jsonEncode(download) + system.tag.writeAsync([tag_to_write], [json_payload]) + self.message_logger("Download message received: " + + str(message)) + def handle_cloud_connection(self, message): + global global_alarms + UNKNOWN = 3 + ACTIVE = 1 + header = message.get("header",{}) + payload = message.get("payload",{}) + component_type = payload.get("componentType") + timestamp = header.get("timestamp", 0) + event_type = payload.get("eventType") + component_id = payload.get("componentId") + scada_alarm_message = create_disconnect_message(component_id, timestamp, 1) + if event_type == "DISCONNECT": + self.message_logger(str(scada_alarm_message)) +# #Call disconnect routine with a value 3 which is an unknown state. + self.alarms_disconnect(component_id, UNKNOWN, scada_alarm_message) + if event_type == "CONNECT": + #Call disconnect routine with a value 1 which is an active state. + self.alarms_disconnect(component_id, ACTIVE, scada_alarm_message) + if event_type == "SYNC" and component_type == "PLC": + alarm_id = "%s/alarm/%s" % (component_id, message) + for k,v in global_alarms.items(): + if k.startswith(component_id): + global_alarms.pop(alarm_id, "No key found") + + def alarms_disconnect(self, component_id, value, message): + global global_alarms + #Set alarms in the global_alarms to an unknown state. + #If component id == "DATABRIDGE" set all alarms to unknown + SITE_DISCONNECTS = ["DATABRIDGE", self.whid] + if component_id in SITE_DISCONNECTS: + site_disconnect = True + source_id = "" + else: + source_id = component_id + site_disconnect = False + for k,v in global_alarms.items(): + device_name = k.split("/")[0] + if k.startswith(source_id) and device_name not in SITE_DISCONNECTS: + global_alarms[k]["state"] = value + alarm_id = "%s/alarm/%s" % (component_id, "Device disconnected") + #Set the alarms to true for device disconnects + if site_disconnect: + data_bridge_disconnect(self.whid, value, message, component_id) + else: + tag_path = "%s%s/DCN" % (self.tag_provider, source_id) + if value == 3: + create_disconnect_tags(self.whid, source_id) + global_alarms[alarm_id] = message + system.tag.writeBlocking([tag_path], [1]) + else: + global_alarms.pop(alarm_id, "No key found") + system.tag.writeBlocking([tag_path], [0]) + +def create_disconnect_message(component_id, timestamp, state): + alarm_message = {"sourceId": component_id, + "message": "Device disconnected", + "type": 0, + "timestamp":timestamp, + "priority": 4, + "shelveExpiryEpoch": 0, + "state": state} + return alarm_message + +def data_bridge_disconnect(whid, value, message, component_id): + global global_alarms + device_list = get_device_list(whid) + time_stamp = message.get("timestamp") + tags_to_write = [] + values_to_write = [] + if value == 3: + disconnect = True + else: + disconnect = False + for i in device_list: + create_disconnect_tags(whid, i) + alarm_id = "%s/alarm/%s" % (i, "Device disconnected") + tag_path = "[%s_SCADA_TAG_PROVIDER]%s/DCN" % (whid, i) + device_message = create_disconnect_message(i, time_stamp, 3) + tags_to_write.append(tag_path) + if disconnect: + global_alarms[alarm_id] = device_message + values_to_write.append(1) + else: + global_alarms.pop(alarm_id, "No key found") + values_to_write.append(0) + alarm_id = "%s/alarm/%s" % (component_id, "Device disconnected") + if disconnect: + global_alarms[alarm_id] = message + else: + global_alarms.pop(alarm_id, "No key found") + system.tag.writeAsync(tags_to_write, values_to_write) + +def get_device_list(whid): + provider = "[%s_SCADA_TAG_PROVIDER]" % (whid) + tag_path = "%sConfiguration/DetailedViews" % (provider) + tags_to_read = system.tag.readBlocking([tag_path]) + devices = system.util.jsonDecode(tags_to_read[0].value) + device_list = [] + for k,v in devices.items(): + for i in v: + device_list.append(i) + return device_list + +def create_disconnect_tags(whid, component_id): + logger_name = "%s-Create-Disconnect-Tags" % (whid) + logger = system.util.getLogger(logger_name) + base = "[%s_SCADA_TAG_PROVIDER]%s" % (whid, component_id) + if not system.tag.exists(base + "/DCN"): + tag = {"name": "DCN", + "valueSource": "memory", + "dataType": "Boolean", + "value": True} + create_tag = system.tag.configure(base, tag) + if not create_tag[0].isGood(): + logger.warn("Failed to create tag: " + str(source_id)) + +class Update(): + def __init__(self): + tags_to_read = system.tag.readBlocking(["Configuration/FC"]) + self.fc = tags_to_read[0].value + self.tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (self.fc) + self.tags_to_write = [] + self.values_to_write = [] + self.logger = system.util.getLogger("%s-Global variable reader" + % (self.fc)) + def read_messages_from_queue(self): + size = global_queue.qsize() + self.logger.info("Queue size: " + str(size)) + for i in range(0, size): + message = global_queue.get() + source_id ="%s%s/STATE" % (self.tag_provider, message[0]) + create_tags_in_place(source_id, message[1], self.logger) + self.tags_to_write.append(source_id) + self.values_to_write.append(message[1]) + + def write_tags(self): + alarm_path = "%sSystem/aws_data" % ( self.tag_provider) + alarm_data = system.util.jsonEncode(global_alarms) + self.tags_to_write.append(alarm_path) + self.values_to_write.append(alarm_data) + system.tag.writeBlocking(self.tags_to_write, self.values_to_write) + self.logger.info("State messages written: " + str(len(self.values_to_write))) + +def create_tags_in_place(source_id, value, logger): + base = source_id.replace("/STATE", "") + if not system.tag.exists(source_id): + tag = {"name": "STATE", + "valueSource": "memory", + "dataType": "Int1", + "value": value} + create_tag = system.tag.configure(base, tag) + if not create_tag[0].isGood(): + logger.warn("Failed to create tag: " + str(source_id)) \ No newline at end of file diff --git a/ignition/script-python/AWS/message_types/resource.json b/ignition/script-python/AWS/message_types/resource.json new file mode 100644 index 0000000..d72098b --- /dev/null +++ b/ignition/script-python/AWS/message_types/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-07-20T06:46:28Z" + }, + "lastModificationSignature": "c4ee22c6dbd2bbbd8ce428267e611350570675d37b3f9523b8bd60f3ab930aa7", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/AWS/s3/code.py b/ignition/script-python/AWS/s3/code.py new file mode 100644 index 0000000..9c230b5 --- /dev/null +++ b/ignition/script-python/AWS/s3/code.py @@ -0,0 +1,879 @@ +import com.amazonaws.services.s3.AmazonS3ClientBuilder as AmazonS3ClientBuilder +import com.amazonaws.services.s3.model.GeneratePresignedUrlRequest as GeneratePresignedUrlRequest +import com.amazonaws.HttpMethod as HttpMethod + +import boto3 +from botocore.client import BaseClient +from botocore.exceptions import ClientError +import json +from pprint import pformat +from urllib2_aws4auth import aws_urlopen, Request +from urllib2 import HTTPError +from urllib import urlencode +from helper.helper import sanitize_tree +from loggerConfig import getLogger + +REGION_NAME = 'us-east-1' +LOGGER = getLogger('S3Manager', 'debug') + +def getPresignedURL(self, objectKey): + """ + Generates a uri to retrieve images from an S3 bucket. + Bucket names are globally unique so different regions + must use a prefix for the bucket name. + Region and prefix are stored as custom session variables. + + Args: + self: Refrence to the object calling the function. + param2: key to the s3 object returned. + + Returns: + s3 Url to display the image in S3. + + Raises: + KeyError: None. + """ + + + bucket_names = {"eu":"ignition-image-repo", "na":"ignition-image-repo-na", + "jp":"jp-ignition-image-repo"} + +# aws = system.tag.readBlocking("Configuration/aws")[0].value +# aws = system.util.jsonDecode(aws) +# clientRegion = aws.get("region") +# prefix = aws.get("prefix") + clientRegion = self.session.custom.aws.region + prefix = self.session.custom.aws.prefix + + + bucketName = bucket_names.get(prefix, "ignition-image-repo") + + s3Client = AmazonS3ClientBuilder.standard().withRegion(clientRegion).build(); + generatePresignedUrlRequest = GeneratePresignedUrlRequest(bucketName, objectKey).withMethod(HttpMethod.GET); + url = s3Client.generatePresignedUrl(generatePresignedUrlRequest); + + return url + +S3_REPO_BUCKET_NAME = 'ignition-image-repo-na' +S3_SOURCE_BUCKET_NAME = 'ignition-image-source-na' +# api stage config +API_STAGES = ['beta', 'prod'] +API_REGIONS = ['na', 'eu'] +STAGE_CONFIG = { + 'beta': { + 'na': { + 'region': 'us-east-1', + 'lambda_name': 'RMESDScadaS3ManagementFlaskLambda-beta', + 'endpoint': 'https://us-east-1.beta.scada-s3-management.scada.eurme.amazon.dev/', + 'repo_bucket': 'ignition-image-repo-na', + 'source_bucket': 'ignition-image-source-na', + 's3_region': 'us-east-1', + 'account_id': '006306898152', + 'api_call_role': 'arn:aws:iam::604741092380:role/RMESDScadaS3ManagementAPIcallRole-beta-us-east-1' + }, + 'eu': { + 'region': 'eu-west-2', + 'lambda_name': 'RMESDScadaS3ManagementFlaskLambda-beta', + 'endpoint': 'https://eu-west-2.beta.scada-s3-management.scada.eurme.amazon.dev/', + 'repo_bucket': 'ignition-image-repo', + 'source_bucket': 'ignition-image-source', + 's3_region': 'eu-west-1', + 'account_id': '006306898152', + 'api_call_role': 'arn:aws:iam::604741092380:role/RMESDScadaS3ManagementAPIcallRole-beta-eu-west-2' + } + }, + 'prod': { + 'na': { + 'region': 'us-east-2', + 'lambda_name': 'RMESDScadaS3ManagementFlaskLambda-prod', + 'endpoint': 'https://us-east-2.scada-s3-management.scada.eurme.amazon.dev/', + 'repo_bucket': 'ignition-image-repo-na', + 'source_bucket': 'ignition-image-source-na', + 's3_region': 'us-east-1', + 'account_id': '006306898152', + 'api_call_role': 'arn:aws:iam::609617486056:role/RMESDScadaS3ManagementAPIcallRole-prod-us-east-2' + }, + 'eu': { + 'region': 'eu-west-1', + 'lambda_name': 'RMESDScadaS3ManagementFlaskLambda-prod', + 'endpoint': 'https://eu-west-1.scada-s3-management.scada.eurme.amazon.dev/', + 'repo_bucket': 'ignition-image-repo', + 'source_bucket': 'ignition-image-source', + 's3_region': 'eu-west-1', + 'account_id': '006306898152', + 'api_call_role': 'arn:aws:iam::609617486056:role/RMESDScadaS3ManagementAPIcallRole-prod-eu-west-1' + } + } +} +OPERATION_MAP = { + 'download': { + 'method': 'GET', + 'reqd_args': ['bucket', 'obj_key'] + }, + 'get_presigned_url': { + 'method': 'GET', + 'reqd_args': ['bucket', 'obj_key'] + }, + 'list_objects': { + 'method': 'GET', + 'reqd_args': ['bucket'] + }, + 'list_object_versions': { + 'method': 'GET', + 'reqd_args': ['bucket'] + }, + 'list_object_delete_markers': { + 'method': 'GET', + 'reqd_args': ['bucket'] + }, + 'delete': { + 'method': 'DELETE', + 'reqd_args': ['bucket', 'obj_key'] + }, + 'upload': { + 'method': 'PUT', + 'reqd_args': ['bucket', 'obj_key', 'obj_data'] + }, + 'add_new_site': { + 'method': 'PUT', + 'reqd_args': ['site', 'bucket'] + }, + 'copy_single': { + 'method': 'POST', + 'reqd_args': ['source_bucket', 'dest_bucket', 'source_key', 'dest_key'] + }, + 'fetch_site_list': { + 'method': 'GET', + 'reqd_args': ['bucket'] + }, + 'fetch_object_list_by_site_and_bucket': { + 'method': 'GET', + 'reqd_args': ['site', 'bucket'] + }, + 'fetch_upload_url': { + 'method': 'PUT', + 'reqd_args': ['bucket', 'obj_key', 'region', 'content_type'] + }, + 'query_audit_table': { + 'method': 'POST', + 'reqd_args': [] + } +} + +class S3Manager(object): + """ + This class contains convenience methods for working with S3 objects from Ignition python 2.7 + """ + + def __init__(self, api_stage='prod', api_region_name='na', username='', profile_name=None): + """ + Instantiates an S3 Class. + + :param api_stage: str; (default='prod') api target stage (and default S3 folder) + :param api_region_name: str; (default='na') api target region (and account) + :param username: str; ignition session username (from `session.props.auth.user.userName`) + :return: None + """ + self._logger = LOGGER + # sanitize api stage and region values + if api_stage not in API_STAGES: + self._logger.info("`api_stage` must be one of: %s, received: %s" % (API_STAGES, api_stage)) + api_stage = 'prod' + if api_region_name not in API_REGIONS: + self._logger.info("`api_region_name` must be one of: %s, received: %s" % (API_REGIONS, api_region_name)) + api_region_name = 'na' + self._api_stage = api_stage + self._api_region_name = api_region_name + # grab stage config for this instance from global object + self._stage_config = STAGE_CONFIG.get(api_stage, STAGE_CONFIG['prod']).get(api_region_name, STAGE_CONFIG['prod']['na']) + d = self._stage_config + self._api_region = d.get('region', 'us-east-2') + self._s3_region = d.get('s3_region', 'us-east-1') + self._repo_bucket = d.get('repo_bucket', 'ignition-image-repo-na') + self._source_bucket = d.get('source_bucket', 'ignition-image-source-na') + self._lambda_name = d.get('lambda_name', 'RMESDScadaS3ManagementFlaskLambda-prod') + self._account_id = d.get('account_id', '006306898152') + self._endpoint = d.get('endpoint', 'https://us-east-2.scada-s3-management.scada.eurme.amazon.dev/') + self._service = 'execute-api' + if profile_name: + self._creds = boto3.Session(profile_name=profile_name).get_credentials() + # Define an opener method. The opener will apply AWS Sigv4 signing to requests + self._opener = aws_urlopen( + self._creds.access_key, + self._creds.secret_key, + self._api_region, + self._service, + session_token=self._creds.token, + verify=False + ) + else: + # DEVNOTE: As the API has been segregated from the AWS account for the dev server, assume a dedicated role here + sts_client = boto3.Session().client('sts') + role_arn = d.get('api_call_role', None) + if role_arn: + response = sts_client.assume_role(RoleArn=role_arn, RoleSessionName='ignition-s3-mgmt-client') + creds = response['Credentials'] + # Define an opener method. The opener will apply AWS Sigv4 signing to requests + self._opener = aws_urlopen( + creds['AccessKeyId'], + creds['SecretAccessKey'], + self._api_region, + self._service, + session_token=creds['SessionToken'], + verify=False + ) + else: + # use native boto3 creds if 'api_call_role' not defined in STAGE_CONFIG + self._creds = boto3.Session(profile_name=profile_name).get_credentials() + self._opener = aws_urlopen( + self._creds.access_key, + self._creds.secret_key, + self._api_region, + self._service, + session_token=self._creds.token, + verify=False + ) + self._headers = {'Content-type': 'application/json', 'X-Remote-User': username} + + def _send(self, operation='download', params={}, print_resp=False, **kwargs): + """ + private method to compile and send the request to api endpoint + + :param operation: str; api endpoint method for request (See `OPERATION_MAP` for options) + :param params: dict; dictionary of parameters to pass to request (See `OPERATION_MAP` for reqd args) + :param print_resp: bool; if True, the associated logger will receive a print statement of the raw response, pprint.format'd + :return resp: dict; response object from api + """ + l = self._logger + if operation not in OPERATION_MAP.keys(): + msg = 'operation "%s" is not a valid S3Manager operation! Options: %s' % (operation, list(OPERATION_MAP.keys())) + l.error(msg) + raise InvalidOperationS3Manager(msg) + op_config = OPERATION_MAP[operation] + method = op_config['method'] + reqd_args = op_config['reqd_args'] + missing_args = [x for x in reqd_args if x not in params.keys()] + if len(missing_args): + msg = 'The following required args were not provided in params for "%s" operation: %s' % (operation, missing_args) + l.error(msg) + raise InvalidParametersS3Manager(msg) + if method in ('GET', 'DELETE'): + querystring = '?%s' % urlencode(params) + payload = None + url = self._endpoint + operation + querystring + else: + try: + payload = json.dumps(params) + l.debug('payload for %s operation successfully serialized' % operation) + except: + payload = urlencode(params) + l.debug('payload for %s operation not serialized using json.dumps(), instead used urlencode()' % operation) + url = self._endpoint + operation + # Create a request object + req = Request(url=url, method=method, headers=self._headers, data=payload) + # open the request and process the read + try: + # use self._opener to sign and send the prepared request + resp = self._opener(req) + data = json.loads(resp.read()) + if print_resp: + l.info('Response data: %s' % pformat(sanitize_tree(data))) + return data + except HTTPError, e: + try: + body = json.loads(e.fp.read()) + e_msg = body.get('message', e.reason) + msg = 'Error sending S3Manager request: %s. Message: %s' % (str(e), e_msg) + l.error(msg) + raise HTTPErrorS3Manager(e.code, e_msg) + except AttributeError, e2: + # failed to extract reason or code from urllib2.HTTPError for some reason + import traceback + msg = 'Failed to extract reason and/or error code from urllib2.HTTPError. Trace: %s' % traceback.format_exc() + l.error(msg) + msg = 'Error sending S3Manager request: %s' % (str(e)) + l.error(msg)# raise HTTPErrorS3Manager(e.code, msg) + raise HTTPErrorS3Manager(400, msg) + + def upload(self, obj_data, obj_key, bucket=None, content_type='', region=None, **kwargs): + """ + Method to upload a JSON object to S3. Converts S3 to a compressed binary parquet file, then writes + the file to S3. + + :param obj_data: JSON data object to upload to S3 + :param obj_key: Path and object name of the object to create in S3 + :param bucket: S3 bucket to write data to. + :param content_type: str; 'application/json' for json files, 'image/svg+xml' for svg files + :param region: AWS region that hosts the target S3 bucket. + :return: Boto3 `put_object` response + """ + l = self._logger + if not bucket: + # if no bucket provided, use repo bucket name from stage config + bucket = self._repo_bucket + if not region: + # if no region provided, use region name from stage config + region = self._s3_region + l.info('Uploading %s dataset to bucket %s' % (obj_key, bucket)) + l.debug('++ Storing data file in S3') + operation = 'upload' + # check the suffix of obj_key and auto-populate content_type accordingly + if obj_key.endswith('json'): + content_type = 'application/json' + elif obj_key.endswith('svg'): + content_type = 'image/svg+xml' + elif obj_key.endswith('drawio'): + content_type = 'binary/octet-stream' + try: + if isinstance(obj_data, dict): + # serialize the object to a JSON string + obj_data = json.dumps(obj_data) + msg = '++ Uploading. Successfully serialized (json dump) object data for %s' % obj_key + l.debug(msg) + else: + msg = 'Uploading. Type of incoming object data: %s' % type(obj_data) + l.debug(msg) + except: + import traceback + msg = '++ Uploading. Error trying to serialize (json dump) object data: %s' % traceback.format_exc() + l.error(msg) + return msg +# params = { +# 'bucket': bucket, +# 'obj_key': obj_key, +# 'obj_data': obj_data, +# 'content_type': content_type, +# 'region': region +# } +# try: +# resp = self._send(operation, params, print_resp=kwargs.get('print_resp', False)) +# l.debug('** Uploading Complete. Successfully uploaded %s' % obj_key) +# return resp +# except HTTPErrorS3Manager, e: +# return {'code': e.code, 'message': e.message} + # DEVNOTE: As there is a 10mb limitation on payload size to API gateway calls, going to use the + # `fetch_upload_url` method to get a presigned upload link and upload via system.net.httpPut + # so the above code will be commented out to use the below code + params = { + 'bucket': bucket, + 'obj_key': obj_key, + 'region': region, + 'content_type': content_type + } + try: + upload_url = self.fetch_upload_url(**params) + l.debug('** Fetching Upload URL Complete for object key: %s' % obj_key) + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + try: + # DEVNOTE: Test code below to upload to pre-signed S3 PUT url using urllib2_aws4auth module + # Create a request object using urllib2_aws4auth.Request and aws_urlopen methods + # see if this is limited like with the upload call to API gateway. + # system.net.httpPut call below is not limited + # Results: what works with `system.net.httpPut` fails with `urllib2_aws4auth` module (returns 400: BadRequest) + # if the file is > ~ 75 kb +# req = Request(url=upload_url, method='PUT', headers=self._headers, data=obj_data) +# resp = self._opener(req).read() +# msg = '** Successfully uploaded %s to %s bucket!\nResponse: %s' % (obj_key, bucket, pformat(resp)) + resp = system.net.httpPut(upload_url, putData=obj_data, contentType=content_type) + msg = '** Successfully uploaded %s to %s bucket!' % (obj_key, bucket) + l.debug(msg) + return {'code': 200, 'message': msg} + except Exception, e: + msg = '++ Error uploading %s to %s bucket: %s' % (obj_key, bucket, str(e)) + l.error(msg) + return {'code': 400, 'message': msg} + + def fetch_upload_url(self, obj_key, bucket=None, region=None, expiration=3600, content_type="image/svg+xml", **kwargs): + """ + Retrieves a pre-signed URL for the obj key and bucket and the `put_object` client method. + Caller then uses pre-signed URL to upload the file to S3 directly. + + :param obj_key: Path and object name of the object to create in S3 + :param bucket: S3 bucket to write data to. + :param region: AWS region that hosts the target S3 bucket. + :param expiration: int; number of seconds until the link expires (default = 3600, 1 hour) + :param content_type: str; the content-type of the object (default = 'image/svg+xml') + :return: str; presigned URL as string. + """ + l = self._logger + if not bucket: + # if no bucket provided, use repo bucket name from stage config + bucket = self._repo_bucket + if not region: + # if no region provided, use region name from stage config + region = self._s3_region + l.info('Fetching upload pre-signed URL for %s object in %s bucket' % (obj_key, bucket)) + operation = 'fetch_upload_url' + params = { + 'bucket': bucket, + 'obj_key': obj_key, + 'expiration': expiration, + 'region': region, + 'content_type': content_type + } + try: + resp = self._send(operation, params, print_resp=kwargs.get('print_resp', False)) + l.debug('** Fetching Upload URL Completed for %s' % obj_key) + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def add_new_site(self, site=None, bucket='both', **kwargs): + """ + Adds a new site folder to either repo, source, or both buckets + + :param site: str; name of site/WHID. Must be 4 chars in format of "ABC1" + :param bucket: str; name of the bucket (S3_REPO_BUCKET_NAME, S3_SOURCE_BUCKET_NAME, or 'both') to add site folder to + if = 'both', then site folder will be added to both buckets + :return: dict; {'message': str} summarizing the folder add operation + """ + l = self._logger + l.info('Adding site %s folder' % (site)) + operation = 'add_new_site' + params = {'site': site, 'bucket': bucket} + try: + resp = self._send(operation, params, print_resp=kwargs.get('print_resp', False)) + l.debug('** Adding Site Complete. Successfully added %s to %s bucket(s)' % (site, bucket)) + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def download(self, obj_key, bucket=None, region=None): + """ + Downloads a JSON object from S3. File is received as a compressed binary Parquet file + :param obj_key: Path and object name of the data stored in S3 + :param bucket: Bucket the target object is stored in. + :param region: AWS Region of the target bucket. + :return: JSON data object generated from the Parquet file stored in S3 + """ + l = self._logger + if not bucket: + # if no bucket provided, use repo bucket name from stage config + bucket = self._repo_bucket + if not region: + # if no region provided, use region name from stage config + region = self._s3_region + # - Only used for logging; extract dates and data source from the object key + obj_key_parts = obj_key.split('/') + l.info('-- Downloading %s object from bucket %s' % (obj_key, bucket)) + operation = 'download' + params = { + 'bucket': bucket, + 'obj_key': obj_key, + 'region': region + } + try: + resp = self._send(operation, params) + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def get_presigned_url(self, bucket=None, obj_key='', client_method='get_object', expiration=3600, region=None, content_type="text/plain"): + """ + Generate a presigned URL to object from S3. + Used primarily for retreiving image objects in Ignition + + :param obj_key: str; uri of object to fetch + :param bucket_: str; bucket name where object resides + :param client_method: str; (default = 'get_object') + :param expiration: int; number of seconds until the link expires (default = 3600, 1 hour) + :param content_type: str; the content-type of the object (default = 'text/plain') + :return: str; presigned URL as string. If no client_method or error, returns None. + """ + l = self._logger + if not bucket: + # if no bucket provided, use repo bucket name from stage config + bucket = self._repo_bucket + if not region: + # if no region provided, use region name from stage config + region = self._s3_region + if not content_type: + msg = 'content_type cannot be null!' + l.error(msg) + raise InvalidParametersS3Manager(msg) + l.info('Fetching pre-signed url for %s from bucket %s' % (obj_key, bucket)) + operation = 'get_presigned_url' + params = { + 'bucket': bucket, + 'obj_key': obj_key, + 'client_method': client_method, + 'expiration': expiration, + 'content_type': content_type + } + try: + resp = self._send(operation, params) + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def delete(self, obj_key, bucket=None, region=None): + """ + Deletes a JSON object from S3. File is flagged for deletion in the S3 bucket + :param obj_key: Path and object name of the data stored in S3 + :param bucket: Bucket the target object is stored in. + :param region: AWS Region of the target bucket. + :return: Boto3 `delete_object` response + """ + l = self._logger + if not bucket: + # if no bucket provided, use repo bucket name from stage config + bucket = self._repo_bucket + if not region: + # if no region provided, use region name from stage config + region = self._s3_region + l.info('Deleting %s object from bucket %s' % (obj_key, bucket)) + operation = 'delete' + params = { + 'bucket': bucket, + 'obj_key': obj_key, + 'region': region + } + try: + resp = self._send(operation, params) + l.debug('** Complete. Successfully deleted %s' % obj_key) + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def list_objects(self, bucket=None, prefix='', start_after='', region=None): + """ + Fetches a list of objects within a specified bucket, prefix, and starting point + + :param bucket: str; Bucket target object is located + :param prefix: str; Limits the response to keys that begin with the specified prefix + :param start_after: str; StartAfter is where you want Amazon S3 to start listing from. + Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket. + :param region: Region of the target S3 Bucket + :return: Boto3 `list_objects_v2.Contents` response. This consists of the following keys per object returned: + { + 'ETag': str; unique id, + 'Key': str; path to object in bucket, + 'LastModified': datetime.datetime(); time object last modified, + 'Size': int; size in bytes of the object, + 'StorageClass': str; type of storage used on the object + } + """ + l = self._logger + if not bucket: + # if no bucket provided, use repo bucket name from stage config + bucket = self._repo_bucket + if not region: + # if no region provided, use region name from stage config + region = self._s3_region + l.info('Fetching list of objects from bucket %s' % bucket) + operation = 'list_objects' + params = { + 'bucket': bucket, + 'prefix': prefix, + 'start_after': start_after, + 'region': region + } + try: + resp = self._send(operation, params) + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def list_object_versions(self, bucket=None, prefix='', region=None): + """ + Fetches a list of object versions within a specified bucket, prefix, and starting point + + :param bucket: str; Bucket target object is located + :param prefix: str; Limits the response to keys that begin with the specified prefix + :param region: Region of the target S3 Bucket + :return: Boto3 `list_object_versions.Versions` response. This consists of the following keys per object returned: + { + 'ETag': str; unique id, + 'IsLatest': bool; only true for the current version, + 'Key': str; path to object in bucket, + 'LastModified': datetime.datetime(); time object last modified, + 'Owner': {'DisplayName': str; name of owner/group, 'ID': str;,} + 'Size': int; size in bytes of the object, + 'StorageClass': str; type of storage used on the object, + 'VersionId': str; ID of object version + } + """ + l = self._logger + if not bucket: + # if no bucket provided, use repo bucket name from stage config + bucket = self._repo_bucket + if not region: + # if no region provided, use region name from stage config + region = self._s3_region + l.info('Fetching list of object versions from bucket %s' % bucket) + operation = 'list_object_versions' + params = { + 'bucket': bucket, + 'prefix': prefix, + 'region': region + } + try: + resp = self._send(operation, params) + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def list_object_delete_markers(self, bucket=None, prefix='', region=None): + """ + Fetches a list of object delete markers within a specified bucket, prefix, and starting point + + :param bucket: str; Bucket target object is located + :param prefix: str; Limits the response to keys that begin with the specified prefix + :param region: Region of the target S3 Bucket + :return: Boto3 `list_object_versions.DeleteMarkers` response. This consists of the following keys per object returned: + { + 'IsLatest': bool; only true for the current version, + 'Key': str; path to object in bucket, + 'LastModified': datetime.datetime(); time object last modified, + 'Owner': {'DisplayName': str; name of owner/group, 'ID': str;,} + 'VersionId': str; ID of object version + } + """ + l = self._logger + if not bucket: + # if no bucket provided, use repo bucket name from stage config + bucket = self._repo_bucket + if not region: + # if no region provided, use region name from stage config + region = self._s3_region + l.info('Fetching list of object delete markers from bucket %s' % bucket) + operation = 'list_object_delete_markers' + params = { + 'bucket': bucket, + 'prefix': prefix, + 'region': region + } + try: + resp = self._send(operation, params) + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def copy_single(self, source_bucket=None, dest_bucket=None, source_key='', dest_key='', region=None): + """ + Method to copy a single object from source bucket|key to destination bucket|key. + + :param source_bucket: str; Source bucket name to copy from + :param dest_bucket: str; Destination bucket name to copy to + :param source_key: str; Source object key name to copy + :param dest_key: str; Destination object key name to copy to + :param region: Region of the target S3 Bucket + :return: null or ClientError; returns null if successfully copied + """ + l = self._logger + if not source_bucket: + # if no source bucket provided, use repo bucket name from stage config + source_bucket = self._repo_bucket + if not dest_bucket: + # if no destination bucket provided, use repo bucket name from stage config + dest_bucket = self._repo_bucket + if not region: + # if no region provided, use region name from stage config + region = self._s3_region + l.info('Copying %s object from bucket %s to object %s in bucket %s' % (source_key, source_bucket, dest_key, dest_bucket)) + l.debug('++ Copying data in S3') + operation = 'copy_single' + params = { + 'source_bucket': source_bucket, + 'dest_bucket': dest_bucket, + 'source_key': source_key, + 'dest_key': dest_key, + 'region': region + } + try: + resp = self._send(operation, params) + l.debug('** Complete. Successfully copied object %s from bucket %s to object %s in bucket %s' % + (source_key, source_bucket, dest_key, dest_bucket)) + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def fetch_site_list(self, bucket=None): + """ + This method will compile a list of all sites configured in the requested S3 bucket + + :param bucket: str; the S3 bucket to fetch sites from. (Default = S3_REPO_BUCKET_NAME) + :return: list; array of whids present in the S3 bucket + """ + l = self._logger + if not bucket: + # if no bucket provided, use repo bucket name from stage config + bucket = self._repo_bucket + l.info('Requesting site list for bucket: %s' % bucket) + operation = 'fetch_site_list' + params = { + 'bucket': bucket + } + try: + resp = self._send(operation, params) + l.debug('** Complete. Successfully returned %d sites for bucket %s' % (len(resp), bucket)) + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def fetch_object_list_by_site_and_bucket(self, site='', bucket=None): + """ + This function fetches the list of file objects + from the S3 folder specified by the bucket and site args supplied. + + :param site: str; whid name of the site to fetch from + :param bucket: str; name of the bucket where the files reside + :return: Dict[str, Any]; {'instance_configs': Dict[str,Any], 'flow_views': List[str]} + """ + l = self._logger + if not bucket: + # if no bucket provided, use repo bucket name from stage config + bucket = self._repo_bucket + l.info('Requesting object list for site %s in bucket: %s' % (site, bucket)) + operation = 'fetch_object_list_by_site_and_bucket' + params = { + 'site': site, + 'bucket': bucket + } + try: + resp = self._send(operation, params) + l.debug('** Complete. Successfully returned object list for site %s on bucket %s' % (site, bucket)) + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def query_audit_table(self, start_time = None, end_time = None, operation = None, copy_option = None, + destination_bucket = None, destination_view = None, destination_object_key = None, + destination_site = None, destination_stage = None, destination_version_id = None, + error_message = None, error_occurred = None, expires = None, + source_bucket = None, source_view = None, source_object_key = None, source_site = None, + source_stage = None, source_version_id = None, timestamp = None, username = None, + return_items_only = True, **kwargs): + """ + Query/scan the audit table and return records matching the supplied parameters + + :param start_time: Optional[Union[str,datetime]]; if provided, will define the beginning of the + time range to filter on the `timestamp` column. `timestamp` column is a string in the format + "%Y-%m-%d %H:%M:%S" + :param end_time: Optional[Union[str,datetime]]; if provided, will define the beginning of the + time range to filter on the `timestamp` column. `timestamp` column is a string in the format + "%Y-%m-%d %H:%M:%S" + :param operation: Optional[Union[str,List,Dict]]; match on operation column + :param copy_option: Optional[Union[str,List,Dict]]; match on copy_option column ('svg', 'json', 'both') + :param destination_bucket: Optional[Union[str,List,Dict]]; match on destination_bucket column + :param destination_view: Optional[Union[str,List,Dict]]; match on destination_view column + :param destination_object_key: Optional[Union[str,List,Dict]]; match on destination_object_key column + :param destination_site: Optional[Union[str,List,Dict]]; match on destination_site column + :param destination_stage: Optional[Union[str,List,Dict]]; match on destination_stage column + :param destination_version_id: Optional[Union[str,List,Dict]]; match on destination_version_id column + :param error_message: Optional[Union[str,List,Dict]]; match on error_message column + :param error_occurred: Optional[Union[bool,List,Dict]]; match on error_error_occurred column + :param expires: Optional[Union[str,List,Dict]]; match/filter on expires column + :param source_bucket: Optional[Union[str,List,Dict]]; match on source_bucket column + :param source_view: Optional[Union[str,List,Dict]]; match on source_view column + :param source_object_key: Optional[Union[str,List,Dict]]; match on source_object_key column + :param source_site: Optional[Union[str,List,Dict]]; match on source_site column + :param source_stage: Optional[Union[str,List,Dict]]; match on source_stage column + :param source_version_id: Optional[Union[str,List,Dict]]; match on source_version_id column + :param timestamp: Optional[Union[str,List,Dict]]; match/filter on timestamp column + (overridden by `start_time` and `end_time` args) + :param username: Optional[Union[str,List,Dict]]; match on username column + :param return_items_only: bool; if true, strip the `Items` from boto3 response, + if false, return the entire response object + :returns: List[Dict[str,Any]]; array of items that match the scan filters supplied + """ + l = self._logger + # build params to send to Lambda using `locals()`. I know it's frowned upon but I'm not trying to type all that!! + params = {k:v for k,v in locals().items() if k not in ('self', 'l', 'kwargs') and v not in (None, '')} + # override `operation` arg for pass to `_send` method, as the value to query is already packed in `params` + operation = 'query_audit_table' + try: + resp = self._send(operation, params) + l.debug('** Complete. Successfully queried audit table using supplied query params') + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def check_user_site_permissions(self, whid = None, obj_key = None): + """ + Check if a given username has permissions to the site folder in the flow-view S3 bucket + + :param whid: str; warehouse id/site name to check + :param obj_key: str; [OPTIONAL] if provided, will check user permissions to the object key, rather than the whid + :return: Dict[str,Any]; { + 'code': int; 200 if the user has permissions, 403 if Forbidden to access + 'message': str; explanation to display, if needed. Will include necessary group memberships missing if Forbidden + } + """ + l = self._logger + operation = 'check_user_site_permissions' + params = {'whid': whid, 'obj_key': obj_key} + try: + resp = self._send(operation, params) + l.debug('** Complete. Successfully checked user site permissions on backend') + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def fetch_user_site_permissions_and_area_list(self, username = None, stage_name = 'beta'): + """ + Fetch the sites for which the user has flow-view write permissions for the given stage. + Also fetches the list of "area" names that flow-views can be created for + + :param username: str; user alias/id to fetch sites for + :param stage_name: str; stage folder of flow-view resources to check permissions on + :return: Dict[str,Any]; response object including a list of sites and area names. + { + "code": int; 200 if successful call, 4** if user not found, + "sites": List[str]; List of site names, + "areas": List[str]; List of valid flow-view area names + } + """ + l = self._logger + operation = 'fetch_user_site_permissions_and_area_list' + params = {'username': username, 'stage_name': stage_name} + try: + resp = self._send(operation, params) + l.debug('** Complete. Successfully fetched user site permissions and area list') + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + + def fetch_master_area_list(self): + """ + Download a master list of valid flow-view area names, stored in S3 + + :return: List[str]; returns list of area names + """ + l = self._logger + operation = 'fetch_master_area_list' + params = {} + try: + resp = self._send(operation, params) + l.debug('** Complete. Successfully fetched master area list') + return resp + except HTTPErrorS3Manager, e: + return {'code': e.code, 'message': e.message} + +class InvalidOperationS3Manager(Exception): + """ + Invalid operation requested for S3Manager class + """ + def __init__(self, code=400, msg='Invalid operation requested for S3Manager class'): + self.code = code + self.message = msg + + +class InvalidParametersS3Manager(Exception): + """ + Invalid parameters for S3Manager operation + """ + def __init__(self, code=400, msg='Invalid parameters for S3Manager operation'): + self.code = code + self.message = msg + + +class HTTPErrorS3Manager(Exception): + """ + HTTP Error for S3Manager Request + """ + def __init__(self, code=500, msg='HTTP Error Encountered Sending S3Manager Request'): + self.code = code + self.message = msg + \ No newline at end of file diff --git a/ignition/script-python/AWS/s3/resource.json b/ignition/script-python/AWS/s3/resource.json new file mode 100644 index 0000000..b8f77ee --- /dev/null +++ b/ignition/script-python/AWS/s3/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-25T17:46:20Z" + }, + "hintScope": 2, + "lastModificationSignature": "5a7b082c78cfdf0323520d25deb15b343d605711fb4d7a23b5e4d6cfaa333532" + } +} \ No newline at end of file diff --git a/ignition/script-python/AWS/secrets_manager/code.py b/ignition/script-python/AWS/secrets_manager/code.py new file mode 100644 index 0000000..5a3f367 --- /dev/null +++ b/ignition/script-python/AWS/secrets_manager/code.py @@ -0,0 +1,33 @@ +import json +import com.amazonaws.services.secretsmanager.AWSSecretsManager as AWSSecretsManager ; +import com.amazonaws.services.secretsmanager.AWSSecretsManagerClientBuilder as AWSSecretsManagerClientBuilder; +import com.amazonaws.services.secretsmanager.model.GetSecretValueRequest as GetSecretValueRequest; +import com.amazonaws.services.secretsmanager.model.GetSecretValueResult as GetSecretValueResult; + +def get_secret(whid, secret_name): + logger_name = "%s-Secrets Manager" % (whid) + logger = system.util.getLogger(logger_name) + logger.info("Getting secret from Secrets Manager") + ec2_name = system.tag.readBlocking(["[System]Gateway/SystemName"])[0].value + secretClient = AWSSecretsManagerClientBuilder.standard().build() + getSecretValueRequest = GetSecretValueRequest().withSecretId(secret_name) + + try: + getSecretValueResponse = secretClient.getSecretValue(getSecretValueRequest).getSecretString() + secrets_dict = json.loads(getSecretValueResponse) + beta_gateway_name = secrets_dict.get("beta-gateway-name") + if ec2_name == beta_gateway_name: + api_id = secrets_dict.get("beta-api-id") + stage = secrets_dict.get("beta-stage") + account_id = secrets_dict.get("beta-account-id") + function_url = secrets_dict.get("beta-history-function-url") + else: + api_id = secrets_dict.get("prod-api-id") + stage = secrets_dict.get("prod-stage") + account_id = secrets_dict.get("prod-account-id") + function_url = secrets_dict.get("prod-history-function-url") + return api_id, stage, account_id, function_url + except: + AWS.errors.error_handler(whid, "Secrets Manager") + + \ No newline at end of file diff --git a/ignition/script-python/AWS/secrets_manager/resource.json b/ignition/script-python/AWS/secrets_manager/resource.json new file mode 100644 index 0000000..4369205 --- /dev/null +++ b/ignition/script-python/AWS/secrets_manager/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "jmmclela", + "timestamp": "2023-11-14T22:31:40Z" + }, + "hintScope": 2, + "lastModificationSignature": "934f3557446acab5dc2cde093201ef9cafc777ac72469d011c854032c0f5a3ab" + } +} \ No newline at end of file diff --git a/ignition/script-python/AWS/wbsckt_abort/code.py b/ignition/script-python/AWS/wbsckt_abort/code.py new file mode 100644 index 0000000..e8d6d02 --- /dev/null +++ b/ignition/script-python/AWS/wbsckt_abort/code.py @@ -0,0 +1,54 @@ +import time + +def close_websckt(): + """ + This function disconnects the web socket and exits any loops. + Should be called when a project is saved or modified to stop + multiple threads running. + + Args: + None + + Returns: + N/A + + Raises: + N/A + """ + + fc = system.tag.readBlocking(["Configuration/FC"]) + fc_value = fc[0].value + tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (fc_value) + system.tag.writeBlocking([tag_provider + "System/close_socket"],[0]) + running = system.util.getGlobals().get(fc_value, {}).get("wbsckt_running", 0) + if running: + system.util.getGlobals()[fc_value]["wbsckt_running"] = False + system.tag.writeBlocking(tag_provider + "System/wbsckt_running", [0]) + time.sleep(2) + system.tag.writeBlocking([tag_provider + "System/close_socket"],[1]) + logger = system.util.getLogger("%s-WebSocket-Restart" % (fc)) + logger.info("Web-Socket closed due to restart, AWS.wbsckt_abort.close_websckt()") + +def check_web_socket(): + """ + This function checks to see if the "System/close_socket" tag is active + (boolean on) or inactive (boolean off). If the tag is active the web + socket will run, if it is inactive then the web socket will stop running. + This function is called from the main web socket gateway event. + Used to exit the web socket gateway event. + + Args: + None + + Returns: + True or False + + Raises: + N/A + """ + request_to_close = system.tag.readBlocking(["System/close_socket"]) + request_to_close_val = request_to_close[0].value + if not request_to_close_val: + return True + else: + return False diff --git a/ignition/script-python/AWS/wbsckt_abort/resource.json b/ignition/script-python/AWS/wbsckt_abort/resource.json new file mode 100644 index 0000000..6532f6a --- /dev/null +++ b/ignition/script-python/AWS/wbsckt_abort/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2024-01-03T17:07:56Z" + }, + "lastModificationSignature": "eff3963e3051fede56c53b722d7baf59b4b245bac4207db9be68500feac7abed", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/AWS/web_socket/code.py b/ignition/script-python/AWS/web_socket/code.py new file mode 100644 index 0000000..5ab8a80 --- /dev/null +++ b/ignition/script-python/AWS/web_socket/code.py @@ -0,0 +1,211 @@ +import java.net.http.WebSocketHandshakeException +from java.net.http import HttpClient; +from java.net.http import WebSocket; +from java.net import URI +from java.lang import Thread +import uuid +import json +import time + +#Check for a http client stored in the globals. +whid = system.tag.readBlocking(["Configuration/FC"])[0].value +client = system.util.getGlobals().get(whid, {}).get("http_client", None) +#Store the http client as a global variable to be reused on project saves. +if not client: + client = HttpClient.newHttpClient() + system.util.getGlobals()[whid]["http_client"] = client + +class Listener(WebSocket.Listener): + """ + Creates a Listener for receiving web socket messages. + The mehtods in this class are standard Java methods + that have been overidden to include additional functionality. onOpen, + onText, onClose and onError are called by the class whenthe web socket + is opened, when the web socket receives data, + when the web socket is closed, when the web socket encounters an error, + respectively. Messages are sent from the web socket by calling the sendText + method on the Listener object. + + Args: + whid: Warehouse id for the tag provider (string). + message_handler: A message handler object which parses + the messages received from the onText + method (class) + + Returns: + Listener object. + + Raises: + Error handling is performed by the onError method. + This method can be overidden with additional logic + for handling errors detected by the Listener object. + """ + def __init__(self, whid, message_handler): + self.whid = whid + self.alarms = {} + self.tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (self.whid) + self.logger = system.util.getLogger("%s-Web-Socket-Listener" % (self.whid)) + self.message = "" + self.message_handler = message_handler + + def onOpen(self, websocket): + #Generate uuid to help track the connection in aws. + uid = uuid.uuid4() + on_open_subscribe = json.dumps({"action": "subscribe", + "parameters": {"siteId": self.whid, + "clientName": str(uid)}} + ) + websocket.sendText(on_open_subscribe, True) + logger = system.util.getLogger("Web-Socket-OnOpen") + self.logger.info("message sent =" + str(on_open_subscribe)) + websocket.request(1) + + def onText(self, websocket, data, last): + self.message += str(data) + if not last: + websocket.request(1) + else: + json_message = json.loads(self.message) + self.message = "" + self.message_handler.handle_message(json_message) + websocket.request(1) + + def onClose(self, websocket, error): + self.logger.info("Onclose method " + str(error)) + + def onError(self, websocket, error): + self.logger.error("OnError method " + str(error)) + + +def web_socket_main(whid, provider, region, message_handler, secret_name): + """ + Main function for running a web socket. This function can + be called in an asynchronous thread and should only exit + when the socket has been closed or an error is encountered. + The function will create a web socket object and run in a + while loop to keep the socket connection open. + It will exit if an error is encounterd, the socket is manually + closed from the tag provider or the socket is closed. + + Args: + whid: Warehouse id for the tag provider (string). + provider: Tag provider that the web socket will use to write messages to/from (string). + region: The AWS region of the api endpoint. Usally the same region as the EC2 + running the web socket (string). + message_handler: message handler object used for parsing of the web socket messages (class). + secret_name : name of the secret to be passed into the web socket. This will retreive the api endpoint for AWS. + + Returns: + N/A. + Raises: + Secrets manager error + web socket error + """ + thread_name = str(Thread.getId(Thread.currentThread())) + system.tag.writeAsync([provider + "system/thread_id"],[thread_name]) + system.util.getGlobals()[whid]["wbsckt_running"] = True + system.tag.writeAsync([provider + "System/wbsckt_running"],[1]) + logger_name = "%s-web-socket-main" % (whid) + logger = system.util.getLogger(logger_name) + timer_end = None + timer_started = False + """The heartbeat is initalised with the current time on first connect + Each time a new heartbeat is recieved in AWS.message_types + the current time is written to the tag wbsckt_heartbeat_interval. + The websocket checks that a heartbeat has been recieved at least every 120 secs. + If a heartbeat is not recieved within the 120 sec duration the connection is closed and the loop will exit. + """ + AWS.heartbeat.get_heartbeat(provider) + tags_to_read = system.tag.readBlocking([provider + "System/wbsckt_heartbeat_interval"]) + wbsckt_heartbeat_interval = tags_to_read[0].value + #Return api endpoint from secrets manager. + API_ID, STAGE, ACC_ID, FUNC_URL = AWS.secrets_manager.get_secret(whid, secret_name) + + try: + credentials = AWS.credentials.assume_role(profile_name = "default", region = region, arn = ACC_ID, api_id = API_ID, stage = STAGE) + except: + AWS.errors.error_handler(whid, "AWS.credentials.assume_role") + return + + logger.info("Building URL ....") + url, headers = AWS.build_url.make_websocket_connection(API_ID, region, STAGE, credentials) + listener = AWS.web_socket.Listener(whid, message_handler) +# client = HttpClient.newHttpClient() + #set the client as global (stored in the system global variables). + global client + uri = URI.create(url) + logger.info(str(uri)) + logger.info("Building web-socket object ....") + wsBuilder = client.newWebSocketBuilder() + wsBuilder.header("Authorization", headers["Authorization"]) + wsBuilder.header("X-Amz-Date", headers["X-Amz-Date"]) + wsBuilder.header("X-Amz-Security-Token", headers["X-Amz-Security-Token"]) + + try: + wsObj = wsBuilder.buildAsync(uri, listener) + except: + AWS.errors.error_handler(whid, "Build web socket") + return + + web_socket = wsObj.get() + logger.info("Web socket object built, starting while loop ....") + running = 1 + + while True: + time.sleep(0.1) + if running == 1: + logger.info("While loop running ....") + running = 0 + + if AWS.heartbeat.check_heartbeat(provider, 70): + web_socket.sendClose(web_socket.NORMAL_CLOSURE, "Missing heartbeat") + logger.warn("socket closed , missing heartbeat") + web_socket.abort() + text_val = web_socket.sendText(str({"action":"abort"}), True) + break + + check_socket_closed_in_loop = AWS.wbsckt_abort.check_web_socket() + if check_socket_closed_in_loop: + web_socket.sendClose(web_socket.NORMAL_CLOSURE, "") + logger.info("socket close initiated") + # web_socket.abort() + text_val = web_socket.sendText(str({"action":"abort"}), True) + break + + if not timer_started: + timer_start = system.date.now() + timer_started = True + + timer_end = system.date.now() + time_diff = system.date.secondsBetween(timer_start, timer_end) + if time_diff >= wbsckt_heartbeat_interval: + send_heartbeat = True + timer_started = False + + if web_socket.isOutputClosed(): + logger.info("Websocket output closed") + break + + if web_socket.isInputClosed(): + logger.info("Websocket input closed") + break + + this_thread = system.tag.readBlocking(provider + "System/thread_id")[0].value + if this_thread != thread_name: + logger.warn("thread_id does not match current thread_id") + break + + tags_to_read = system.tag.readBlocking(["System/wbsckt_messages_send"]) + messages = system.util.jsonDecode(tags_to_read[0].value) + message_list = messages.get("message_list") + if message_list: + for i in message_list: + message_string = str(i) + formatted_string = message_string.replace("u'","'") + json_string = formatted_string.replace("'","\"") + web_socket.sendText(str(json_string), True) + logger.info("Message sent: " + str(json_string)) + system.tag.writeAsync(["System/wbsckt_messages_send"], "{}") + system.util.getGlobals()[whid]["wbsckt_running"] = False + web_socket.abort() + system.tag.writeBlocking([provider + "System/wbsckt_running"], [0]) \ No newline at end of file diff --git a/ignition/script-python/AWS/web_socket/resource.json b/ignition/script-python/AWS/web_socket/resource.json new file mode 100644 index 0000000..8d6ce88 --- /dev/null +++ b/ignition/script-python/AWS/web_socket/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2024-01-03T17:08:20Z" + }, + "lastModificationSignature": "5a18fd4c8b1e7e36931588bbbdc2757d380ef265ac9e7c4f3c14a5a3ee331059", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/AWS/web_socket_send/code.py b/ignition/script-python/AWS/web_socket_send/code.py new file mode 100644 index 0000000..2b69950 --- /dev/null +++ b/ignition/script-python/AWS/web_socket_send/code.py @@ -0,0 +1,21 @@ +import json + +class SendMessage(): + + def __init__(self, whid): + self.whid = whid + tag_path = "[%s_SCADA_TAG_PROVIDER]System/wbsckt_messages_send" % (whid) + tags_to_read = system.tag.readBlocking([tag_path]) + self.messages_to_send = system.util.jsonDecode(tags_to_read[0].value) + system.tag.writeBlocking([tag_path],[system.util.jsonEncode({})]) + self.message_list = {} + + def build_message_list(self): + if self.messages_to_send: + self.message_list = json.dumps(self.messages_to_send) + else: + self.message_list = None + + + + diff --git a/ignition/script-python/AWS/web_socket_send/resource.json b/ignition/script-python/AWS/web_socket_send/resource.json new file mode 100644 index 0000000..126bc06 --- /dev/null +++ b/ignition/script-python/AWS/web_socket_send/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol@amazon.co.uk", + "timestamp": "2022-07-11T20:22:46Z" + }, + "lastModificationSignature": "1ef21aee15ab7d94f66d670fcf45236316b1d4248612afa0bac7bdf33ac7bb67" + } +} \ No newline at end of file diff --git a/ignition/script-python/Alerts/code.py b/ignition/script-python/Alerts/code.py new file mode 100644 index 0000000..dd3e5d8 --- /dev/null +++ b/ignition/script-python/Alerts/code.py @@ -0,0 +1,17 @@ +def showAlert(state, title, message, showCloseBtn, btnTextPrimary, btnTextSecondary, btnIconPrimary, btnIconSecondary, btnIconAlignment="left", btnActionPrimary="", btnActionSecondary="", btnActionClose="", payload={}): + params = { + "state": state, + "title": title, + "message": message, + "showCloseBtn": showCloseBtn, + "btnTextPrimary": btnTextPrimary, + "btnTextSecondary": btnTextSecondary, + "btnIconPrimary": btnIconPrimary, + "btnIconSecondary": btnIconSecondary, + "btnIconAlignment": btnIconAlignment, + "btnActionPrimary": btnActionPrimary, + "btnActionSecondary": btnActionSecondary, + "btnActionClose": btnActionClose, + "payload": payload ## Added 2021-09-23 + } + system.perspective.openPopup(id="alertDialog", view="Alerts/alert", params=params, showCloseIcon=False, draggable=False, resizable=False, modal=True, overlayDismiss=True, btnActionPrimary="closePopup") diff --git a/ignition/script-python/Alerts/resource.json b/ignition/script-python/Alerts/resource.json new file mode 100644 index 0000000..b475503 --- /dev/null +++ b/ignition/script-python/Alerts/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "dmamani", + "timestamp": "2024-01-23T18:10:27Z" + }, + "lastModificationSignature": "7a1f5bf240b03932fa9f1da5ff719e54cd8aad2ba6ffe4a29842a4ac8980e496", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/Commands/analytics/code.py b/ignition/script-python/Commands/analytics/code.py new file mode 100644 index 0000000..fd6d3e2 --- /dev/null +++ b/ignition/script-python/Commands/analytics/code.py @@ -0,0 +1,15 @@ +def send_page_details(whid, session_id, pageId): + messages_to_send = {} + message_payload = {} + message_list = [] + time_stamp = system.date.toMillis(system.date.now()) + parameters = {"siteId":whid, "sessionId": session_id, + "pageId": pageId, "timestamp":time_stamp} + message_payload["parameters"] = parameters + message_payload["action"] = "pageview" +# message_payload["siteId"] = whid + message_list.append(message_payload) + messages_to_send["message_list"] = message_list + tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (whid) + system.tag.writeBlocking([tag_provider + "System/wbsckt_messages_send"], + [system.util.jsonEncode(messages_to_send)]) \ No newline at end of file diff --git a/ignition/script-python/Commands/analytics/resource.json b/ignition/script-python/Commands/analytics/resource.json new file mode 100644 index 0000000..5847823 --- /dev/null +++ b/ignition/script-python/Commands/analytics/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-01-20T09:41:32Z" + }, + "hintScope": 2, + "lastModificationSignature": "f54fb1db84154cd6d8ee801d292ca54d38af2d4849e1060cce4ec430872509c5" + } +} \ No newline at end of file diff --git a/ignition/script-python/Commands/button_commands/code.py b/ignition/script-python/Commands/button_commands/code.py new file mode 100644 index 0000000..3c9a383 --- /dev/null +++ b/ignition/script-python/Commands/button_commands/code.py @@ -0,0 +1,122 @@ +def send_request(whid,actionCode,parameters): + """ + Creates the request to send to the web socket from a button in SCADA. + Args: + whid = identifier of the warehouse ie MAN2 + actionCode : possible actionCode as per MAP data model (int values): + 0 -> Not used + 1 -> Start + 2 -> Stop + 3 -> Reset + 4 -> Get + 5 -> Set + 6 -> Enable + 7 -> Disable + parameters = dictionary with the parameters of the command + {"commandTarget":id, + "commandCode":action, + "commandTimestamp":time_stamp, + "commandParams":""} + Returns: + a messsage that inform the user about there status of the request + """ + import sys + try: + loggerName=whid+ "_SCADA" + logger = system.util.getLogger(loggerName) + tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (whid) + messages_to_send = {} + message_payload = {} + message_list = [] + returnMessage="" + time_stamp = system.date.toMillis(system.date.now()) + + payloadParams={} + if not parameters["commandTarget"] or parameters["commandTarget"] == "": + returnMessage = "Missing commandTarget parameter. Command can\'t be executed" + logger.trace(returnMessage) + return returnMessage + payloadParams["commandTarget"]=parameters["commandTarget"] + if not parameters["commandCode"] or parameters["commandCode"] == "": + returnMessage = "Missing commandCode parameter. Command can\'t be executed" + logger.trace(returnMessage) + return returnMessage + payloadParams["commandCode"]=parameters["commandCode"] + payloadParams["commandTimeout"]=2000 + payloadParams["commandTimestamp"]=time_stamp + payloadParams["commandParams"]=parameters["commandParams"] + + message_payload["parameters"] = payloadParams + message_payload["action"] = "command" + message_payload["siteId"] = whid + message_list.append(message_payload) + messages_to_send["message_list"] = message_list + system.tag.writeBlocking([tag_provider + "System/wbsckt_messages_send"], [system.util.jsonEncode(messages_to_send)]) + return "Message sent correctly" + + except: + exc_type, exc_obj, tb = sys.exc_info() + lineno = tb.tb_lineno + exceptionMessage=str(lineno)+" -> "+str(exc_type)+" -> "+str(exc_obj) + errorMessage = "Error while sending a command : "+exceptionMessage + logger.fatal(errorMessage) + return errorMessage + +def send_request_old_to_be_removed(whid, id, action): + + """ + Creates the request to send to the web socket from a button in SCADA. + + Args: + id =Unique material handling equipment id. + request = Type of request i.e Start, Stop, Reset. + Returns: + N/A + """ + """{"action": "command", "parameters": {"": "Reset", "siteId": "DNG2"}}""" + messages_to_send = {} + message_payload = {} + message_list = [] + time_stamp = system.date.toMillis(system.date.now()) + parameters = {"commandTarget":id, "commandCode":action, "commandTimestamp":time_stamp, + "commandToken":"", "commandTimeout":2000, "commandParams":""} + message_payload["parameters"] = parameters + message_payload["action"] = "command" + message_payload["siteId"] = whid + message_list.append(message_payload) + messages_to_send["message_list"] = message_list + tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (whid) + system.tag.writeBlocking([tag_provider + "System/wbsckt_messages_send"], + [system.util.jsonEncode(messages_to_send)]) + + +def send_download_request(whid, filters, session_id): + + """ + Creates the request to download alarm history + to the web socket from a button in SCADA. + + Args: + whid = four character whid for the project + filters = filter string for passing with the download request. + These a re similar to the url parameters but do not need encoding. + session_id = unique session id of the perspective session. + Returns: + N/A + Example: + {"action":"download", "parameters":{"siteId":"FED1", "sessionId":"bob2", + "filter": "MinimumDuration=360000&Type=1"}} + """ + messages_to_send = {} + message_payload = {} + message_list = [] + time_stamp = system.date.toMillis(system.date.now()) + parameters = {"siteId":whid, "sessionId": session_id, "filter": filters} + message_payload["parameters"] = parameters + message_payload["action"] = "download" +# message_payload["siteId"] = whid + message_list.append(message_payload) + messages_to_send["message_list"] = message_list + tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (whid) + system.tag.writeBlocking([tag_provider + "System/wbsckt_messages_send"], + [system.util.jsonEncode(messages_to_send)]) diff --git a/ignition/script-python/Commands/button_commands/resource.json b/ignition/script-python/Commands/button_commands/resource.json new file mode 100644 index 0000000..9e01f68 --- /dev/null +++ b/ignition/script-python/Commands/button_commands/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-01-19T16:21:04Z" + }, + "lastModificationSignature": "fd405bafcc137449ac9818d535f56c72a75d6c3b3f7013dd82718e19427e08c0", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/Commands/shelve_alarms/code.py b/ignition/script-python/Commands/shelve_alarms/code.py new file mode 100644 index 0000000..a26f93d --- /dev/null +++ b/ignition/script-python/Commands/shelve_alarms/code.py @@ -0,0 +1,31 @@ +def send_shelve_request(whid, ids, action, duration, messages): + + """ + Creates a alarm shelve request to send to the web socket from a button in SCADA. + + Args: + ids = List of strings. Unique material handling equipment ids. + request = String Type of request i.e Start, Stop, Reset. + Returns: + N/A + """ + """{"action": "shelve", "parameters": {"sourceId": "PLC01", "siteId": "DNG2", "durationMinutes": 2, + shelvedTime:""}}""" + messages_to_send = {} + message_list = [] + for i,j in enumerate(ids): + parameters = {} + message_payload = {} + parameters["sourceId"] = j + parameters["siteId"] = whid + parameters["id"] = messages[i] + if action == "shelve": + parameters["durationMinutes"] = duration + time_now = system.date.now() + parameters["shelvedTime"] = (system.date.toMillis(time_now)/1000) + message_payload["parameters"] = parameters + message_payload["action"] = action + message_list.append(message_payload) + messages_to_send["message_list"] = message_list + message_send_tag_path = "[%s_SCADA_TAG_PROVIDER]System/wbsckt_messages_send" % (whid) + system.tag.writeBlocking([message_send_tag_path],[system.util.jsonEncode(messages_to_send)]) diff --git a/ignition/script-python/Commands/shelve_alarms/resource.json b/ignition/script-python/Commands/shelve_alarms/resource.json new file mode 100644 index 0000000..d6f7f98 --- /dev/null +++ b/ignition/script-python/Commands/shelve_alarms/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-05-15T15:18:09Z" + }, + "lastModificationSignature": "3cc6d6da16acadaaa1c2d12218492b12b9cd6812c7c78cf8d4f9abaa79909428", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/DocStringTemplate/code.py b/ignition/script-python/DocStringTemplate/code.py new file mode 100644 index 0000000..d11998f --- /dev/null +++ b/ignition/script-python/DocStringTemplate/code.py @@ -0,0 +1,16 @@ +# This function is not intented to be called. This docstring template should be used on all function call. + +def docstring(): + """ + This is an example of Google style. + + Args: + param1: This is the first param. + param2: This is a second param. + + Returns: + This is a description of what is returned. + + Raises: + KeyError: Raises an exception. + """ diff --git a/ignition/script-python/DocStringTemplate/resource.json b/ignition/script-python/DocStringTemplate/resource.json new file mode 100644 index 0000000..ab22bf0 --- /dev/null +++ b/ignition/script-python/DocStringTemplate/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-04-26T12:37:38Z" + }, + "lastModificationSignature": "e3d335291c453a1a180e7900eb51042b49495a92256ea10921f736e4078c0306", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/FileHandler/downloader/code.py b/ignition/script-python/FileHandler/downloader/code.py new file mode 100644 index 0000000..f3228e2 --- /dev/null +++ b/ignition/script-python/FileHandler/downloader/code.py @@ -0,0 +1,96 @@ +# These scripts are use to download data from the igniton project into any file type. + + +def download_file(filename, data , converter): + """ + This script will download data from ignition perspective to the users computer. + + Args: + filename: The name of the file to be downloaded . + data: The data to be downloaded. May be a string, a byte[], or an InputStream. Strings will be written in UTF-8 encoding. + converter: This is a function that is used to convert the ignition data into the required format for the file. + If not conversion is required then pass a function that just returns original data. + + Returns: + None. + + Raises: + ValueError: Raises an Value erorr if no data or converter is provided. + """ + if not data: + raise ValueError("No data provided. Data is required to perform download ") + + if not converter: + raise ValueError("Please provide a data converter to transform the data") + + _data = converter(data) + system.perspective.download(filename, _data) + +def device_data_converter(data): + """ + This script converts a list of dicts to a dataset, it uses the first dict to set the column headers in the dataset. + + Args: + + data: List of dictionaries. + + Returns: + Ignition Data Set + + Raises: + None + """ + dataset = [] + for index,row in enumerate(data): + if index == 0: + header = row.keys() + row = [] + for i in header: + value = data[index][i] + row.append(value) + dataset.append(row) + + convert_data = system.dataset.toDataSet(header, dataset) + return system.dataset.toCSV(convert_data) + +def detailed_views_converter(data): + """ + This script converts a list of dicts to a dataset, it uses the first dict to set the column headers in the dataset. + + Args: + + data: List of dictionaries. + + Returns: + Ignition Data Set + + Raises: + None + """ + dataset = [] + for index,row in enumerate(data): + if index == 0: + header = row.keys() + row = [] + for i in header: + if i == "Devices": + value = array_to_string(data[index][i]) + else: + value = data[index][i] + row.append(value) + dataset.append(row) + + convert_data = system.dataset.toDataSet(header, dataset) + return system.dataset.toCSV(convert_data) + +def array_to_string(array , deliminator="#"): + converted = "" + if len(array) == 1: + return array[0] + for i , value in enumerate(array): + converted += value + if not i == len(array)-1: + converted += deliminator + + + return converted \ No newline at end of file diff --git a/ignition/script-python/FileHandler/downloader/resource.json b/ignition/script-python/FileHandler/downloader/resource.json new file mode 100644 index 0000000..0fdb9e0 --- /dev/null +++ b/ignition/script-python/FileHandler/downloader/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2024-05-23T11:48:44Z" + }, + "hintScope": 2, + "lastModificationSignature": "61634f4815f440496b3c48685393c8123ef710fe944496c420bc0e3a1c6a2dcd" + } +} \ No newline at end of file diff --git a/ignition/script-python/FileHandler/uploader/code.py b/ignition/script-python/FileHandler/uploader/code.py new file mode 100644 index 0000000..b440aeb --- /dev/null +++ b/ignition/script-python/FileHandler/uploader/code.py @@ -0,0 +1,64 @@ +import csv +from StringIO import StringIO + +def check_csv_file(event): + """ + This function checks if the CSV file was saved as CSV-UF8 settings if it has removes extra data bytes from the file. + + Args: + event : Containes the file data to be uploaded + + Returns: + a string representing the file that is to be uploaded. + + Raises: + None + """ + file_bytes = event.file.getBytes() + if bytearray.fromhex("ef bb bf") == bytearray(file_bytes[0:3]): + # Strip first three bytes + file_bytes = file_bytes[3:] + return file_bytes.tostring() + + +def add_device_btn_code(whid, event): + + reader = csv.DictReader(StringIO(FileHandler.uploader.check_csv_file(event))) + data ={} + def get_child(): + return { + "Area":"", + "SubArea":"" + } + + for i, v in enumerate(reader): + child = get_child() + child["Area"] = v["Area"] + child["SubArea"] = v["SubArea"] + data[v["Device"]]= child + + + system.tag.writeBlocking(["[%s_SCADA_TAG_PROVIDER]Configuration/PLC"%whid], system.util.jsonEncode(data)) + + return "Success" + +def add_detailed_view_btn_code(whid, event): + + reader = csv.DictReader(StringIO(FileHandler.uploader.check_csv_file(event))) + + data ={} + + def convert_dict_value_to_list(string): + device_list = [] + for i in string.replace("#", ",").split(","): + device_list.append(i.strip()) + return device_list + + for v in reader: + + data[v["DetailedView"]]= convert_dict_value_to_list(v["Devices"]) + + + system.tag.writeBlocking(["[%s_SCADA_TAG_PROVIDER]Configuration/DetailedViews"%whid], system.util.jsonEncode(data)) + + return "Success" \ No newline at end of file diff --git a/ignition/script-python/FileHandler/uploader/resource.json b/ignition/script-python/FileHandler/uploader/resource.json new file mode 100644 index 0000000..09ca2d9 --- /dev/null +++ b/ignition/script-python/FileHandler/uploader/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2024-05-23T11:48:43Z" + }, + "hintScope": 2, + "lastModificationSignature": "040f157b34b9a70fdb7dfc9b5c6b54395f48fd3db082da24908a2011a05d1b02" + } +} \ No newline at end of file diff --git a/ignition/script-python/Gateway/timer_scripts/code.py b/ignition/script-python/Gateway/timer_scripts/code.py new file mode 100644 index 0000000..138eeca --- /dev/null +++ b/ignition/script-python/Gateway/timer_scripts/code.py @@ -0,0 +1,59 @@ +def scada_web_socket_execute(): +#We read a list of tags at the beginning of the script for efficiency. + tags_to_read = system.tag.readBlocking(["Configuration/FC", "Configuration/aws"]) + whid = tags_to_read[0].value + aws_config = system.util.jsonDecode(tags_to_read[1].value) + region = aws_config.get("region") + logger = system.util.getLogger("%s-Web-Socket-Execute" % (whid)) + provider = "[%s_SCADA_TAG_PROVIDER]" % (whid) + AWS.create_tags.create_web_socket_tags(whid) + Latency.CreateLatencyTags.create_latency_tags(whid) # attempt to create latency lags + check_socket_closed_in_loop = AWS.wbsckt_abort.check_web_socket() + #Check the heartbeat and restart if not recieved within the specified time + check_heartbeat = AWS.heartbeat.check_heartbeat(provider, 120) + if check_heartbeat: + AWS.wbsckt_abort.close_websckt() + AWS.heartbeat.get_heartbeat(provider) + if whid == "" or whid == None: + raise ValueError("FC not configured. A project on the gateway is missing Configuration/FC id") + + elif not region: + raise ValueError("No aws region configured for project") + + elif check_socket_closed_in_loop: + logger.warn("Socket is closed check System/close_socket tag") + + else: + description = provider + "websocket api gateway" + set_global = system.util.getGlobals().setdefault(whid,{}) + running = system.util.getGlobals()[whid].get("wbsckt_running", 0) + if not running: + try: + message_handler = AWS.message_types.A2C_MessageHandler(whid) + args = [whid, provider, region, message_handler, "scada/api/endpoint"] + description = "%s-web-socket-api" + system.util.invokeAsynchronous(AWS.web_socket.web_socket_main, args, description ) + except: + AWS.errors.error_handler(whid, "Web-Socket-Execute") + +def update_execute(): + data = AWS.message_types.Update() + data.read_messages_from_queue() + data.write_tags() + +def status_execute(): + tags_to_read = system.tag.readBlocking(["Configuration/FC", "System/aws_data"]) + whid = tags_to_read[0].value + alarms_data = system.util.jsonDecode(tags_to_read[1].value) +# Alarm script + try: + if AWS.message_types.global_first_connect == False: + Visualisation.status.reset_alarms(whid) + Visualisation.status.global_previous_state = {} + AWS.message_types.global_first_connect = True + status = Visualisation.status.GetStatus(whid, alarms_data) + status.build_status() + status.write_data() + alarms.alarm_count.get_count(whid, alarms_data) + except: + AWS.errors.error_handler(whid, "Status-Visualisation-Script") \ No newline at end of file diff --git a/ignition/script-python/Gateway/timer_scripts/resource.json b/ignition/script-python/Gateway/timer_scripts/resource.json new file mode 100644 index 0000000..646816a --- /dev/null +++ b/ignition/script-python/Gateway/timer_scripts/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "iama", + "timestamp": "2024-04-11T17:40:47Z" + }, + "hintScope": 2, + "lastModificationSignature": "6a1c89ba2dd546d8818c1585c752e9f0cd936252bc930ebf7ad54d9b0490e19e" + } +} \ No newline at end of file diff --git a/ignition/script-python/Latency/CreateLatencyTags/code.py b/ignition/script-python/Latency/CreateLatencyTags/code.py new file mode 100644 index 0000000..daa117a --- /dev/null +++ b/ignition/script-python/Latency/CreateLatencyTags/code.py @@ -0,0 +1,53 @@ +def create_latency_tags(whid): + logger = system.util.getLogger("%s-Create-Latency-Tags" % (whid)) + if whid != "" and whid != None: + provider = "[%s_SCADA_TAG_PROVIDER]" % (whid) + tag_paths = {"avg_latency":{"name":"avg_latency", "valueSource": "memory", + "dataType": "String", "value" : ""}, + "aws_data_copy":{"name":"aws_data_copy", "valueSource": "reference", + "dataType": "String", "sourceTagPath": "[~]System/aws_data.value"}, + "first_pass":{"name":"first_pass", "valueSource": "memory", + "dataType": "Boolean", "value" : True}, + "last_alarm_change_ts":{"name":"last_alarm_change_ts", "valueSource": "memory", + "dataType": "DateTime", "formatString": "yyyy-MM-dd h:mm:ss aa"}, + "prev_key":{"name":"prev_key", "valueSource": "memory", + "dataType": "String", "value" : ""}, + "rolling_latency":{"name":"rolling_latency", "valueSource": "memory", + "dataType": "StringArray", "alarmEvalEnabled": True, + "value": [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" ],}} + + for k,v in tag_paths.items(): + if not system.tag.exists("%sLatency/%s" % (provider, k)): + base_path = "%s/Latency" % (provider) + system.tag.configure(base_path, v) + logger.info("Created tag %s" % (k)) \ No newline at end of file diff --git a/ignition/script-python/Latency/CreateLatencyTags/resource.json b/ignition/script-python/Latency/CreateLatencyTags/resource.json new file mode 100644 index 0000000..221dc2f --- /dev/null +++ b/ignition/script-python/Latency/CreateLatencyTags/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "iama", + "timestamp": "2024-04-11T17:40:20Z" + }, + "hintScope": 2, + "lastModificationSignature": "bd5f35a173e029987f79b06f8c86895bf99383a1e4f3fc457b4499ddd1a0c4d8" + } +} \ No newline at end of file diff --git a/ignition/script-python/Latency/LatencyAvgCalculation/code.py b/ignition/script-python/Latency/LatencyAvgCalculation/code.py new file mode 100644 index 0000000..e674279 --- /dev/null +++ b/ignition/script-python/Latency/LatencyAvgCalculation/code.py @@ -0,0 +1,24 @@ +def AvgCalc(): + ## Code to calc avg latency. + whid = system.tag.readBlocking(["Configuration/FC"])[0].value + + # Read tag value + tag_values = system.tag.readBlocking(['[%s_SCADA_TAG_PROVIDER]Latency/rolling_latency'% whid])[0].value + + # Convert string timestamps to milliseconds + timestamps = [int(value) for value in tag_values] + + if 0 in timestamps: + return + else: + # Calculate the average latency in milliseconds + avg_latency = round(sum(timestamps) / len(tag_values), 3) + zero_list = [0]*30 + circular_buffer = '[%s_SCADA_TAG_PROVIDER]Latency/rolling_latency.value'% whid + avg_latency_path ='[%s_SCADA_TAG_PROVIDER]Latency/avg_latency'% whid + + # clear array to all 0's so we can wait to trigger until 30 new records have happened and write new avg + system.tag.writeBlocking([avg_latency_path,circular_buffer], [avg_latency,zero_list]) # writing the avg_latency back to tag on purpose for visual. + + # Call Dynamodb write script, passing in site and latency to be written. + Latency.WriteToDynamo.DynamoWriter(whid,avg_latency) \ No newline at end of file diff --git a/ignition/script-python/Latency/LatencyAvgCalculation/resource.json b/ignition/script-python/Latency/LatencyAvgCalculation/resource.json new file mode 100644 index 0000000..4435d8f --- /dev/null +++ b/ignition/script-python/Latency/LatencyAvgCalculation/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "iama", + "timestamp": "2024-04-11T17:40:28Z" + }, + "hintScope": 2, + "lastModificationSignature": "13b2e0643af7aea0d242827a51028df54771f78c6555e92f56394b2bd986f6f9" + } +} \ No newline at end of file diff --git a/ignition/script-python/Latency/LatencyCalculation/code.py b/ignition/script-python/Latency/LatencyCalculation/code.py new file mode 100644 index 0000000..343918d --- /dev/null +++ b/ignition/script-python/Latency/LatencyCalculation/code.py @@ -0,0 +1,82 @@ +def latencyCalc(): + import json + import system + from java.lang import Exception as JException, Thread + import time + + whid = system.tag.readBlocking(["Configuration/FC"])[0].value + aws_data,first_pass = system.tag.readBlocking(['[%s_SCADA_TAG_PROVIDER]Latency/aws_data_copy'% whid,'[%s_SCADA_TAG_PROVIDER]Latency/first_pass'% whid]) + json_data = json.loads(aws_data.value) + first_pass = first_pass.value + ids = [] + + # in instances where aws_data tag has been reset + if not json_data: + system.tag.writeBlocking(['[%s_SCADA_TAG_PROVIDER]Latency/first_pass.value'% whid], [1]) + return + + #### check if this is the first time running. if it is, set the values in prev_key to get this kicked off and then set the flag tag to False. + if first_pass: + if not json_data: + return + for key in json_data: + ids.append(str(key)) + system.tag.writeBlocking(["[%s_SCADA_TAG_PROVIDER]Latency/prev_key"% whid,"[%s_SCADA_TAG_PROVIDER]Latency/first_pass"% whid],[ids,0]) + return + + # get a list of names that are new and can be used to calculate latency. + # added try except in here in case there is a time when new prev keys are present during first pass or a reset of the tag accidentely. + try: + prev_ids = set(system.util.jsonDecode(system.tag.readBlocking(['[%s_SCADA_TAG_PROVIDER]Latency/prev_key'% whid])[0].value)) + except: + system.tag.writeBlocking(['[%s_SCADA_TAG_PROVIDER]Latency/first_pass.value'% whid], 1) + return + to_be_processed = [] + new_to_be_processed = {} + for key in json_data: + if key not in prev_ids: + to_be_processed.append(str(key)) + + if to_be_processed: + new_to_be_processed = {key: json_data[key] for key in to_be_processed if key in json_data} + + #### This class will read the aws_data tag and calculate the latency of all the tags provided(newly added tags). + class TimestampLatencyCollector: + + def __init__(self): + self.latencies = [] + + def process_dict(self, data_dict): + import system + current_time_ms = system.date.toMillis(system.date.now()) # Current time in milliseconds + + for key, value in data_dict.items(): + timestamp_ms = data_dict[key]['timestamp'] + # Calculate latency in milliseconds + latency_ms = current_time_ms - timestamp_ms + self.latencies.append(latency_ms) + + if new_to_be_processed: + last_alarm_change = '[%s_SCADA_TAG_PROVIDER]Latency/last_alarm_change_ts.value'% whid + + # Create an instance of the TimestampLatencyCollector + collector = TimestampLatencyCollector() + + # Process the nested dictionary + collector.process_dict(new_to_be_processed) + + #read in circular buffer of latencies + circular_buffer_tag_path = '[%s_SCADA_TAG_PROVIDER]Latency/rolling_latency.value'% whid + circular_buffer = system.tag.readBlocking([circular_buffer_tag_path])[0].value + + for latency in collector.latencies: + circular_buffer.append(str(latency)) + + # keep only the last 30 entries. + circular_buffer = circular_buffer[-30:] + system.tag.writeBlocking([circular_buffer_tag_path,last_alarm_change], [circular_buffer,system.date.now()]) + + persistence = [] + for key in json_data: + persistence.append(str(key)) + system.tag.writeBlocking(["[%s_SCADA_TAG_PROVIDER]Latency/prev_key"% whid],[persistence]) \ No newline at end of file diff --git a/ignition/script-python/Latency/LatencyCalculation/resource.json b/ignition/script-python/Latency/LatencyCalculation/resource.json new file mode 100644 index 0000000..9bef8a6 --- /dev/null +++ b/ignition/script-python/Latency/LatencyCalculation/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "iama", + "timestamp": "2024-04-11T17:40:37Z" + }, + "hintScope": 2, + "lastModificationSignature": "3580d98a0c1a313beb5edfd65567781b8dea209ed405fce5b7b76337582a1a20" + } +} \ No newline at end of file diff --git a/ignition/script-python/Latency/WriteToDynamo/code.py b/ignition/script-python/Latency/WriteToDynamo/code.py new file mode 100644 index 0000000..d31f088 --- /dev/null +++ b/ignition/script-python/Latency/WriteToDynamo/code.py @@ -0,0 +1,77 @@ +def DynamoWriter(site,latency): + import json + from pprint import pformat + import boto3 + from datetime import datetime + from decimal import Decimal + import time + + LOGGER = system.util.getLogger('latency_to_dynamodb_log') + + # Get STAGE variable + + API_ID, STAGE, ACC_ID, FUNC_URL = AWS.secrets_manager.get_secret(str(site), 'scada/api/endpoint') + API_ID,ACC_ID,FUNC_URL = None, None, None # set these to None becuase they are not used in here but must be returned during the call. + + # Make sure STAGE is valid. no gamma stage configured + if STAGE not in ['alpha', 'beta', 'gamma', 'prod']: + STAGE = 'beta' + if STAGE == 'gamma': + STAGE = 'beta' + + STAGE_CONFIG = { + 'alpha':{ + 'region' : 'us-east-1', + 'roleArn' : 'arn:aws:iam::905418469996:role/ignition_to_aws_latency_alpha', + 'tableName' : 'SCADA_Latency_alpha' + }, + 'beta': { + 'region':'us-east-1', + 'roleArn': 'arn:aws:iam::381492071451:role/ignition_to_aws_latency_beta', + 'tableName' : 'SCADA_Latency_beta' + + }, + 'prod': { + 'region':'us-east-1', + 'roleArn': 'arn:aws:iam::891377003949:role/ignition_to_aws_latency_prod', + 'tableName' : 'SCADA_Latency_prod' + } + } + + + # create sts session to get credentials from EC2 + sts_client = boto3.client('sts') + region_name = STAGE_CONFIG.get(STAGE, 'alpha').get('region', 'us-east-1') + + assume_role_response = sts_client.assume_role( + RoleArn = STAGE_CONFIG.get(STAGE, 'alpha').get('roleArn', 'arn:aws:iam::905418469996:role/ignition_to_aws_latency_alpha_test'), + RoleSessionName = 'AssumeRole' + ) + + temp_credentials = assume_role_response['Credentials'] + + # create session using the temp creds + b3_session = boto3.Session( + aws_access_key_id = temp_credentials['AccessKeyId'], + aws_secret_access_key = temp_credentials['SecretAccessKey'], + aws_session_token = temp_credentials['SessionToken'], + region_name = 'us-east-1', + ) + + # create a dynamodb session + dynamodb = b3_session.resource('dynamodb') + table = dynamodb.Table(STAGE_CONFIG.get(STAGE, 'alpha').get('tableName', 'SCADA_Latency_alpha')) + + # write data directly to dynamodb table + try: + response = table.put_item(Item={ + 'site':site, + 'timestamp':int(time.time()*1000), + 'latency':str(round( int(Decimal(latency)) / 1000.0 , 3 ) ), + 'source':3, + 'TTL':int(time.time()+ (30*60) ) + } + ) + + except Exception as e: + LOGGER.error(str(e)) \ No newline at end of file diff --git a/ignition/script-python/Latency/WriteToDynamo/resource.json b/ignition/script-python/Latency/WriteToDynamo/resource.json new file mode 100644 index 0000000..256dd1c --- /dev/null +++ b/ignition/script-python/Latency/WriteToDynamo/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "iama", + "timestamp": "2024-04-11T17:40:54Z" + }, + "hintScope": 2, + "lastModificationSignature": "ed4aa23fbe0ec666a06a70b4188a17807df1d5087c7aa2627f4dd5ae4579a17f" + } +} \ No newline at end of file diff --git a/ignition/script-python/SymbolLibrary/code.py b/ignition/script-python/SymbolLibrary/code.py new file mode 100644 index 0000000..a355cbf --- /dev/null +++ b/ignition/script-python/SymbolLibrary/code.py @@ -0,0 +1,105 @@ +############################################################################################# +# Purpose: This package contains all the modules that get called by the symbol library # +# and edit item views. These modules MAKES calls to S3 under the SCADA account. # +# Some of these modules depend on the AWS > S3 manager. # +# Login: Date: #Comment: Version: # +# dmamani 1/4/23 Release to Production V1 # +# # +############################################################################################# + +from AWS.s3 import S3Manager +from datetime import datetime +from pprint import pprint +import json + +BUCKET_REGION = "us-east-1" +BUCKET_NAME = "map-ignition-parent-docs" +SYMBOL_LIBRARY_JSON = "symbol_library.json" + +def fetch_library(backup_path=SYMBOL_LIBRARY_JSON, username=None): + # - Create a client to interact with AWS S3 + s3 = S3Manager(username=username) + # - Fetch the object from S3. If backup path was provided, use that, otherwise fetch the primary file. Convert + # data response to a string + library_json = s3.download(backup_path or SYMBOL_LIBRARY_JSON, bucket=BUCKET_NAME, region=BUCKET_REGION) + return library_json + +def list_backups(username=None): + # - Create a client to interact with AWS S3 + s3 = S3Manager(username=username) + # - Fetch list of objects in S3 from the backups folder. List comp is used to convert response objects from + # aws to a simple list of S3 paths to each Backup object + backup_objects = [] + + for backup_object in s3.list_objects(bucket=BUCKET_NAME, region=BUCKET_REGION): + if backup_object['Key'] != SYMBOL_LIBRARY_JSON: + backup_objects.append(backup_object['Key']) + return sorted(backup_objects, reverse=True) + +def write_library(library, backup=True, username=None): + # - Check type of object to write. Raise exception if it isnt a dictionary + if not isinstance(library, dict): + raise ValueError("'library' argument must be a dictionary of the entire symbol " + "library dataset, not %" % type(library)) + # - Create a client to interact with AWS S3 + library = json.dumps(library).encode() + s3 = S3Manager(username=username) + if backup: + resp = s3.upload( + library, + "%s--%s" % (datetime.utcnow().strftime('%m-%d-%y %H:%M:%S.%f'), username), + bucket=BUCKET_NAME, + region=BUCKET_REGION, + content_type='application/json' + ) + resp = s3.upload(library, SYMBOL_LIBRARY_JSON, bucket=BUCKET_NAME, region=BUCKET_REGION, content_type='application/json') + return resp + +def update_symbol_library(path, username=None, **value): + # - Fetch the most recent library from S3 + current_lib = fetch_library(username=username) + # - Update the given path with the **value dictionary of key-value arguments + if path in current_lib: + current_lib[path].update(value) + else: + current_lib[path]=value + print(current_lib[path]) + print(value) + # - Write the modified library to S3 + resp = write_library(current_lib, username=username) + return resp + + +def delete_symbol(path, username=None): + current_lib = fetch_library(username=username) + try: + del current_lib[path] + return write_library(current_lib, username=username) + except KeyError: + raise Exception("path %s does not exist" % path) + +def rollback(backup_path, username=None): + # - Fetch the backup object + library = fetch_library(backup_path, username=username) + # - Write it to the primary location. Disable backup to prevent duplicate backups + write_library(library, backup=False, username=username) + + + # - Gets List of Categories +def list_categories(library_items): + # - Example of Entry: !!! insert example here bro + categories = list(set([entry["category"] for entry in library_items.values() if entry["category"]])) + categories = sorted(categories) + categories.insert(0,"ALL") + return categories + + # - Searches List of +def search_items(library_items, category): + if category == 'ALL' : + items = [name for name, entry in library_items.items()] + else: + items = [name for name, entry in library_items.items() if entry["category"] == category] + # - Obtains the last part of the path for example ( + items.sort(key = lambda x : x.split("/")[len(x.split("/"))-1]) + return items + \ No newline at end of file diff --git a/ignition/script-python/SymbolLibrary/resource.json b/ignition/script-python/SymbolLibrary/resource.json new file mode 100644 index 0000000..261a8b2 --- /dev/null +++ b/ignition/script-python/SymbolLibrary/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "dmamani", + "timestamp": "2024-01-23T18:10:53Z" + }, + "hintScope": 2, + "lastModificationSignature": "7437df488838d77f88ebfe9acb7c1ee162865c6a35599be3a6eac0cb7dc2c54d" + } +} \ No newline at end of file diff --git a/ignition/script-python/Visualisation/home_page/code.py b/ignition/script-python/Visualisation/home_page/code.py new file mode 100644 index 0000000..49ef45f --- /dev/null +++ b/ignition/script-python/Visualisation/home_page/code.py @@ -0,0 +1,92 @@ +def create_home_page(self): + self.session.custom.covert = True + fc = self.session.custom.fc + tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (fc) + data_to_read = system.tag.readBlocking([tag_provider+"Configuration/PLC"]) + data = system.util.jsonDecode(data_to_read[0].value) + try: devices_list = sorted(data.keys()) + except: devices_list = [] + + if len(devices_list)>0: + instances = [] + dashboard_devices = {} + for i in devices_list: + area = data[i]['Area'] + if len(data[i]['Area'])>0: + + dashboard_devices.update({i:area}) + else: + dashboard_devices.update({i:'unknown'}) + instances.append({ + "instanceStyle": { + "classes": "", + "margin": "5px" + }, + "instancePosition": {}, + "tagProps": [ + i, + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ],"Counts":{"Diag":0, "High":0, "Low":0, "Medium":0}, + "area":data[i]['Area'], + "subarea":data[i]['SubArea'] + }) + self.custom.Devices = sorted(dashboard_devices.items(), key=lambda x:x[1], reverse = False) + self.getChild("FlexRepeater").props.instances = sorted(instances, reverse = False) + +def get_counters(alarm_counters, controller): + counters = alarm_counters.get(controller,{"High":0, "Medium":0, "Low":0, "Diagnostic":0}) + return counters + + +def get_device_values(tag_provider, devices_list): + tag_paths_to_read = [] + read_values = [] + for device in devices_list: + tag_path = "%s%s/ALARMST" % (tag_provider, str(device[0])) + tag_paths_to_read.append(tag_path) + values = system.tag.readBlocking(tag_paths_to_read) + for i,j in enumerate(values): + value = values[i].value + if value == None: + read_values.append(0) + else: + read_values.append(value) + return read_values + + +def update_home_status(self): + orderBy = self.session.custom.alarm_filter.orderby + fc = self.session.custom.fc + tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (fc) + alarm_counters = system.tag.readBlocking([tag_provider + "System/device_count"])[0].value + counters_decoded = system.util.jsonDecode(alarm_counters) + if not counters_decoded: + counters_decoded = {} + devices_list = self.custom.Devices + values = get_device_values(tag_provider, devices_list) + + devices_only = [] + for device in devices_list: + devices_only.append(str(device[0])) + + if orderBy == True: + zipped_list = zip(values, devices_only) + else: + zipped_list = sorted(zip(values, devices_only), reverse = True) + + devices_sorted = [y for x, y in (zipped_list)] + for i,j in enumerate(devices_sorted): + counters = get_counters(counters_decoded, j) + self.getChild("FlexRepeater").props.instances[i].tagProps[0] = j + self.getChild("FlexRepeater").props.instances[i].Counts.Diag = counters.get("Diagnostic") + self.getChild("FlexRepeater").props.instances[i].Counts.Low = counters.get("Low") + self.getChild("FlexRepeater").props.instances[i].Counts.Medium = counters.get("Medium") + self.getChild("FlexRepeater").props.instances[i].Counts.High = counters.get("High") diff --git a/ignition/script-python/Visualisation/home_page/resource.json b/ignition/script-python/Visualisation/home_page/resource.json new file mode 100644 index 0000000..29e1080 --- /dev/null +++ b/ignition/script-python/Visualisation/home_page/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-01-12T19:53:31Z" + }, + "hintScope": 2, + "lastModificationSignature": "141c3651a88e792776a615e6409464bc57bf2b4e8f0c3ec8f53a0fdc98bf69f5" + } +} \ No newline at end of file diff --git a/ignition/script-python/Visualisation/status/code.py b/ignition/script-python/Visualisation/status/code.py new file mode 100644 index 0000000..204e23f --- /dev/null +++ b/ignition/script-python/Visualisation/status/code.py @@ -0,0 +1,162 @@ +global_previous_state = {} +class GetStatus(): + """This class calculates the highest priority + alarm active for all parts of the source id. It scans the active alarms list, + splits each source id and returns the highest priority alarm to a dict object id_to_status. + It stores the previuos state of the dict object and compares current to previous. + ALARMST tags are then updated if they have been removed, added or the value changed + Args: + whid : Warehouse id for the project/ tag provider(string) + alarm_data: Current active alarms(dict) + KeyError: N/A""" + def __init__(self, whid, alarm_data): + self.whid = whid + self.alarm_data = alarm_data + self.id_to_status = {} + self.tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (whid) + self.logger = system.util.getLogger("%s-Update-Visualisation" % (whid)) + + def update_status(self, item, priority): + if(self.id_to_status.get(item) is None or + self.id_to_status.get(item) < priority): + self.id_to_status[item] = priority + + def build_status(self): + for k, v in self.alarm_data.items(): + equipment, device, sub_device = "","","" + alarm_dict = v + source_id = alarm_dict.get("sourceId") + priority = alarm_dict.get("priority") + state = alarm_dict.get("state") + if state != 2: + id_elements = source_id.split("/") + controller = id_elements[0] + if len(id_elements) > 4: + self.logger.error("Incorrect length for source id") + else: + while True: + path = "/".join(id_elements) + self.update_status(path, priority) + id_elements.pop() + if len(id_elements) == 0: + break + global global_previous_state + self.calculate_diff() + global_previous_state = self.id_to_status + + def build_alarm_paths_and_values(self, keys, paths, values): + for item in keys: + value = self.id_to_status.get(item) + tag_path = "%s%s/%s" % (self.tag_provider, item, "ALARMST") + paths.append(tag_path) + values.append(value) + return paths, values + + def write_to_tags(self, message, paths, values): + system.tag.writeBlocking(paths, values) + self.logger.info(message + str(paths)) + + def calculate_diff(self): + set_previous_values = set(global_previous_state.keys()) + set_current_values = set(self.id_to_status.keys()) + intersect = set_current_values.intersection(set_previous_values) + removed_keys = set_previous_values - intersect + added_keys = set_current_values - intersect + changed_values = set(k for k in intersect if global_previous_state[k] != self.id_to_status[k]) + tag_paths_to_delete = [] + values_to_delete = [] + for i in removed_keys: + tag_path = "%s%s/%s" % (self.tag_provider, i, "ALARMST") + tag_paths_to_delete.append(tag_path) + values_to_delete.append(0) + + tag_paths_to_add, values_to_add = self.build_alarm_paths_and_values(added_keys, [], []) + for item in added_keys: + self.create_alarm_state_tags(self.tag_provider + item) + changed_tag_paths, changed_values = self.build_alarm_paths_and_values(changed_values, [], []) + + if changed_tag_paths: + self.write_to_tags("Changed paths = ", changed_tag_paths, changed_values) + + if tag_paths_to_add: + self.write_to_tags("Paths added = ", tag_paths_to_add, values_to_add) + + if tag_paths_to_delete: + self.write_to_tags("Deleted paths = ", tag_paths_to_delete, values_to_delete) + + def write_data(self): + status_encoded = system.util.jsonEncode(self.id_to_status) + system.tag.writeAsync([self.tag_provider + + "System/IdToStatus"], + [status_encoded] + ) + + def create_alarm_state_tags(self, source_id): + if not system.tag.exists(source_id +"/ALARMST"): + tag = {"name": "ALARMST", + "valueSource": "memory", + "dataType": "Int1", + "value": 0} + create_tag = system.tag.configure(source_id, tag) + if not create_tag[0].isGood(): + logger.warn("Failed to create tag: " + str(source_id)) + +def reset_tags(provider, query): + results = system.tag.query(provider, query) + tags_to_write = [] + values_to_write = [] + for i in results: + tags_to_write.append(str(i["fullPath"])) + values_to_write.append(0) + if tags_to_write: + system.tag.writeBlocking(tags_to_write, values_to_write) + +def reset_alarms(whid): + logger_name = "%s-Alarm-Reset" % (whid) + logger = system.util.getLogger(logger_name) + logger.warn("Alarms have been reset") + provider = "%s_SCADA_TAG_PROVIDER" % (whid) + limit = 100 + query = { + "options": { + "includeUdtMembers": True, + "includeUdtDefinitions": False + }, + "condition": { + "path": "*ALARMST*", + "attributes": { + "values": [], + "requireAll": True + } + }, + "returnProperties": [ + "tagType", + "quality" + ] + } + reset_tags(provider, query) + +def reset_disconnects(whid): + logger_name = "%s-Disconnects-Reset" % (whid) + logger = system.util.getLogger(logger_name) + provider = "%s_SCADA_TAG_PROVIDER" % (whid) + limit = 100 + query = { + "options": { + "includeUdtMembers": True, + "includeUdtDefinitions": False + }, + "condition": { + "path": "*DCN*", + "attributes": { + "values": [], + "requireAll": True + } + }, + "returnProperties": [ + "tagType", + "quality" + ] + } + reset_tags(provider, query) + logger.warn("DCN tags have been reset") diff --git a/ignition/script-python/Visualisation/status/resource.json b/ignition/script-python/Visualisation/status/resource.json new file mode 100644 index 0000000..f0b9d6c --- /dev/null +++ b/ignition/script-python/Visualisation/status/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-07-13T13:31:00Z" + }, + "lastModificationSignature": "4c8af7c413439f485844889a8b880542cd3773978e9286ddf5badfccc90727d8", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/Visualisation/status_2/code.py b/ignition/script-python/Visualisation/status_2/code.py new file mode 100644 index 0000000..f6f7490 --- /dev/null +++ b/ignition/script-python/Visualisation/status_2/code.py @@ -0,0 +1,66 @@ +#from logging import raiseExceptions + + +class GetStatus(): + + def __init__(self, whid, alarm_data): + self.alarm_data = alarm_data + self.priority_dict = {} + self.id_to_status = {} + self.tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (whid) + self.logger = system.util.getLogger("%s-Update-Visualisation" % (whid)) + + def convert_priority(self, priority): + #The alarm priority is converted into a status + #This is based on the highest active alarm priority + if str(priority) == "0": + return 4 + elif str(priority) == "1": + return 3 + elif str(priority) == "2": + return 2 + elif str(priority) == "3" or priority == "4": + return 1 + else: + return 6 + + def check_priority(self, alarm_id, priority): + #We check to see if the current priority is greater + #than the current priority in the priority_dict. This is + #because the status is based on the active alarm. With the + #highest priority. + controller_id = alarm_id.split("/")[0] + if self.priority_dict.get(controller_id) is None: + self.priority_dict[controller_id] = {} + self.priority_dict[controller_id][alarm_id] = self.convert_priority(priority) + + elif self.priority_dict[controller_id].get(alarm_id) is None: + self.priority_dict[controller_id][alarm_id] = self.convert_priority(priority) + + elif self.priority_dict[controller_id].get(alarm_id) < priority: + self.priority_dict[controller_id][alarm_id] = ( + self.convert_priority + (priority) + ) + + def run_status(self): + for i in self.alarm_data: + alarm_id = i + priority = self.alarm_data.get(i, {}).get("priority") + if priority != None: + self.check_priority(alarm_id, priority) + + def update_tags(self): + device_paths = [] + status_values = [] + if isinstance(self.priority_dict, dict): + for i in self.priority_dict: + device_path = "%sTags/%s/IdToStatus/json" % (self.tag_provider, i) + device_paths.append(device_path) + status_json = self.priority_dict.get(i) + status_values.append(system.util.jsonEncode(status_json, 4)) + self.logger.info("device paths " + str(device_paths)) + else: + raise TypeError("Not a python dictionary") + system.tag.writeAsync(device_paths, status_values) + diff --git a/ignition/script-python/Visualisation/status_2/resource.json b/ignition/script-python/Visualisation/status_2/resource.json new file mode 100644 index 0000000..0d6574c --- /dev/null +++ b/ignition/script-python/Visualisation/status_2/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-05-16T09:23:51Z" + }, + "lastModificationSignature": "2896b95e315e5d68113ce0ec3cdd09dd728dfe3095f71a55bb734f71e6d62b0f", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/activityLog/logger/code.py b/ignition/script-python/activityLog/logger/code.py new file mode 100644 index 0000000..b9ae40a --- /dev/null +++ b/ignition/script-python/activityLog/logger/code.py @@ -0,0 +1,83 @@ +from urllib2_aws4auth import aws_urlopen, Request +from urllib2 import HTTPError +from urllib import urlencode +import json +import boto3 +from pprint import pformat + +REGION = 'us-east-2' +SERVICE = 'execute-api' +ENDPOINT = 'https://l7o38q47a6.execute-api.us-east-2.amazonaws.com/default/ScadaProductMetrics' +LOGGER = system.util.getLogger('activityLog') + +def openSession(): + CREDS = boto3.Session().get_credentials() + AWS_ACCESS_KEY_ID = CREDS.access_key + AWS_SECRET_ACCESS_KEY = CREDS.secret_key + TOKEN = CREDS.token + + OPENER = aws_urlopen( + AWS_ACCESS_KEY_ID, + AWS_SECRET_ACCESS_KEY, + REGION, + SERVICE, + session_token=TOKEN, + verify=False) + return OPENER + +def createActivityDetails(session, resource_type, resource, current_page, start_time, end_time = None): + user = session.props.auth.user.userName + session_id = session.props.id + site = session.custom.fc + start_time = system.date.format(start_time, 'yyyy-MM-dd HH:mm:ss') + end_time = system.date.format(end_time, 'yyyy-MM-dd HH:mm:ss') if end_time != None else end_time + user_UTCoffset = session.props.device.timezone.utcOffset + activityDetails = {'username':user, + 'session_id':session_id, + 'site': site, + 'start_time': start_time, + 'end_time':end_time, + 'user_UTCoffset': user_UTCoffset, + 'resource_type': resource_type, + 'resource': resource, + 'current_page': current_page} + return activityDetails + +def logActivity(session, resource_type, resource, current_page, start_time, end_time = None): + activityDetails = createActivityDetails(session, resource_type, resource, current_page, start_time, end_time) + user = session.props.auth.user.userName + opener = openSession() + params = activityDetails + payload = json.dumps(params) + method = 'POST' + # in the headers the Ignition session username (session.props.auth.user.userName) must be supplied as 'X-Ignition-User' + headers = { + 'Content-type': 'application/json', + 'X-Ignition-User': user + } + req = Request(url=ENDPOINT, method=method, data=payload, headers=headers) + # open the request and process the read + try: + resp = opener(req) + response = json.loads(resp.read()) + error = None + print pformat(response) + except HTTPError, e: + error = str(e) + response = None + print error + LOGGER.info(error) + return {'error': error, 'response':response } + +def callLogger(self, resource_type, resource = None, current_page= None): + """ self is reference to the view. So if calling from shutdown script on the view, pass self. + If calling from a component, pass self.view""" + if self.session.custom.enable_activity_logging: + if self.session.props.device.type != 'designer': + end_time = system.date.now() if resource_type == 'page' else None + start_time = self.custom.activityLogger.start_time + pageid = self.custom.activityLogger.pageid + resource = pageid if resource == None else resource + current_page = pageid if current_page == None else current_page + logActivity(self.session, resource_type, resource, current_page, start_time, end_time) + \ No newline at end of file diff --git a/ignition/script-python/activityLog/logger/resource.json b/ignition/script-python/activityLog/logger/resource.json new file mode 100644 index 0000000..7272dd8 --- /dev/null +++ b/ignition/script-python/activityLog/logger/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "ankikarw", + "timestamp": "2023-11-15T18:47:23Z" + }, + "hintScope": 2, + "lastModificationSignature": "ff45baacdd34c3a77f4e85b4e5062dfa3cf52d1adad3b0bbaf876076d70982c8" + } +} \ No newline at end of file diff --git a/ignition/script-python/activityLog/productMetrics/code.py b/ignition/script-python/activityLog/productMetrics/code.py new file mode 100644 index 0000000..acbbb6b --- /dev/null +++ b/ignition/script-python/activityLog/productMetrics/code.py @@ -0,0 +1,223 @@ +from urllib2_aws4auth import aws_urlopen, Request +from urllib2 import HTTPError +from urllib import urlencode +import json +import system +import boto3 +from pprint import pformat + +STAGE = 'prod' +STAGE_CONFIG = { + 'alpha':{ + 'region':'us-east-1', + 'endpoint': 'https://0wuzuy9rx3.execute-api.us-east-1.amazonaws.com/prod/user-activity-logger' + }, + 'beta': { + 'region':'us-east-1', + 'endpoint': 'https://33ymuc1b2a.execute-api.us-east-1.amazonaws.com/prod/user-activity-logger' + }, + 'prod': { + 'region':'us-east-1', + 'endpoint': 'https://ahikprejp4.execute-api.us-east-1.amazonaws.com/prod/user-activity-logger' + } +} +REGION = STAGE_CONFIG.get(STAGE, 'alpha').get('region', 'us-east-1') +SERVICE = 'execute-api' +ENDPOINT = STAGE_CONFIG.get(STAGE, 'alpha').get('endpoint', 'https://0wuzuy9rx3.execute-api.us-east-1.amazonaws.com/prod/user-activity-logger') +LOGGER = system.util.getLogger('productMetrics') + +def openSession(): + CREDS = boto3.Session().get_credentials() + AWS_ACCESS_KEY_ID = CREDS.access_key + AWS_SECRET_ACCESS_KEY = CREDS.secret_key + TOKEN = CREDS.token + + OPENER = aws_urlopen( + AWS_ACCESS_KEY_ID, + AWS_SECRET_ACCESS_KEY, + REGION, + SERVICE, + session_token=TOKEN, + verify=False) + return OPENER + +def formatPayload(payload): + """Formats the payload based on what API expects to receive in the payload + Also adds in some defaults (nulls) for the optional fields in case they are skipped from the payload + Since defaults are not defined to required fields, will throw an error if they are not provided in the payload + Args: + payload (dict):all the fields that need to be sent to the API + + Returns: + dict: dict formatted correctly for the API call + """ + data = { + "project_id": "scada-activity-logger", #key used to log hashed user product metrics in backend, not the name of ignition project. + "stage": payload.get("stage"), + "plugin": "scada_activity_logger", + "payload": { + "username": payload.get("username"), + "session_id": payload.get("session_id"), + "site": payload.get("site"), + "start_time": payload.get("start_time"), + "end_time": payload.get("end_time", None), + "user_UTCoffset": payload.get("user_UTCoffset", None), + "resource_type": payload.get("resource_type"), + "resource": payload.get("resource"), + "current_page": payload.get("current_page"), + "concurrent_users": payload.get("concurrent_users", getConcurrentUsers()) + } + } + return data + +def getConcurrentUsers(): + """Get the number of concurrent user session for the current project + + Returns: + int: number of concurrent users + """ + project_name = system.project.getProjectName() + concurrent_users = len(system.perspective.getSessionInfo()) + return concurrent_users + +def createActivityPayload(viewObj, resource_type, resource = None, current_page= None): + """Creates the activity payload for hashed user product metrics + Typically called from view shutdown event script + Uses the info from the view's custom param named activity_logger and session params to build the payload + + Args: + viewObj: reference to the view (since custom param activity_logger is created on the view). If calling this function from a component pass self.view, if calling from view event scripts, pass self + resource_type (string): page/session/click + resource (string, optional): The resource that user interacted with. page name if interaction was with a page, feature/button name if it was a user click type interaction. Defaults to None. + current_page (string, optional): Page name that the user is on when the interaction takes place. Defaults to None. + + Returns: + dict: payload that needs to be formatted before sending to the API + """ + if viewObj.session.custom.product_metrics.enable and viewObj.session.props.device.type != 'designer': + # since viewObj is a reference to the view, viewObj.session is reference to session + session = viewObj.session + stage = session.props.gateway.address + user = session.props.auth.user.userName + session_id = session.props.id + site = session.custom.fc + start_time = system.date.format(viewObj.custom.activityLogger.start_time, 'yyyy-MM-dd HH:mm:ss') + end_time = None + user_UTCoffset = session.props.device.timezone.utcOffset + concurrent_users = getConcurrentUsers() + if resource_type == 'page': + end_time = system.date.format(system.date.now(), 'yyyy-MM-dd HH:mm:ss') + try: + pageid = viewObj.custom.activityLogger.pageid + resource = pageid if resource == None else resource + current_page = pageid if current_page == None else current_page + except: + pass + if resource_type == 'click': + start_time = system.date.format(system.date.now(), 'yyyy-MM-dd HH:mm:ss') + end_time = None + try: + pageid = viewObj.custom.activityLogger.pageid + # resource = pageid if resource == None else resource + current_page = pageid if current_page == None else current_page + except: + pass + + payload = { + "stage": stage, + "username": user, + "session_id": session_id, + "site": site, + "start_time": start_time, + "end_time": end_time, + "resource_type": resource_type, + "resource": resource, + "current_page": current_page, + "user_UTCoffset": user_UTCoffset, + "concurrent_users": concurrent_users + } + activityPayload = formatPayload(payload) + return activityPayload + else: + return None + +def callActivityLoggerAPI(activityPayload): + """Makes a post api call with the provided payload to log hashed user product metrics + Handles converting the payload from dict to json + + Args: + activityPayload (dict): Final payload that needs to be sent to the API + Function will convert the payload to json + """ + if activityPayload: + opener = openSession() + params = activityPayload + payload = json.dumps(params) + method = 'POST' + # in the headers the Ignition session username (session.props.auth.user.userName) must be supplied as 'X-Ignition-User' + headers = { + 'Content-type': 'application/json', + } + req = Request(url=ENDPOINT, method=method, data=payload, headers=headers) + # open the request and process the read + try: + resp = opener(req) + response = json.loads(resp.read()) + error = None + except HTTPError, e: + error = str(e) + response = None + system.perspective.print(error) + LOGGER.info(error) + return {'error': error, 'response':response } + +def callLogger(viewObj, resource_type, resource = None, current_page= None): + """Combines the createActivityPayload and callActivityLoggerAPI to log hashed user product metrics + Typically called from view shutdown event script + Uses the info from the view's custom param named activity_logger and session params to build the payload + """ + activityPayload = createActivityPayload(viewObj, resource_type, resource, current_page) + if activityPayload: + callActivityLoggerAPI(activityPayload) + + + +def testapi(): + print STAGE + user = 'ankikarw' + opener = openSession() + params = { + "project_id": "scada-activity-logger", + "stage": "api test alpha", + "plugin": "scada_activity_logger", + "payload": { + "username": "user", + "session_id": "1234567989", + "site": "EWR4", + "start_time": "2023-11-06 10:45:25", + "end_time": "2023-11-06 10:57:18", + "user_UTCoffset": "-8", + "resource_type": "page", + "resource": "home", + "current_page": "home", + "concurrent_users": "5" + } + } + payload = json.dumps(params) + method = 'POST' + headers = { + 'Content-type': 'application/json', + } + req = Request(url=ENDPOINT, method=method, data=payload, headers=headers) + # open the request and process the read + try: + resp = opener(req) + response = json.loads(resp.read()) + error = None + print response + except HTTPError, e: + error = str(e) + response = None + print error + LOGGER.info(error) + return {'error': error, 'response':response } \ No newline at end of file diff --git a/ignition/script-python/activityLog/productMetrics/resource.json b/ignition/script-python/activityLog/productMetrics/resource.json new file mode 100644 index 0000000..90d44d1 --- /dev/null +++ b/ignition/script-python/activityLog/productMetrics/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "ankikarw", + "timestamp": "2024-04-01T21:05:57Z" + }, + "hintScope": 2, + "lastModificationSignature": "31ab27a5d94875f5bfa04ec4fc85059f9dd19c44fc124bd1c20aaa35b9f54ab8" + } +} \ No newline at end of file diff --git a/ignition/script-python/alarms/alarm_count/code.py b/ignition/script-python/alarms/alarm_count/code.py new file mode 100644 index 0000000..f8810a1 --- /dev/null +++ b/ignition/script-python/alarms/alarm_count/code.py @@ -0,0 +1,24 @@ +def get_count(whid, alarm_data): + device_count = {} + provider = "[%s_SCADA_TAG_PROVIDER]" % (whid) + int_to_priority ={"5":"Critical", "4":"High", "3":"Medium", + "2":"Low", "1":"Diagnostic"} + for k,v in alarm_data.items(): + source_id = k + device_id = source_id.split("/")[0] + alarm_data = v + priority = str(v["priority"]) + priority_string = int_to_priority.get(priority, "Unknown") + check = device_count.get(device_id) + if check == None: + device_count[device_id] = {"Critical":0, "High":0, "Medium":0, "Low":0, "Diagnostic":0, "Unknown":0} + device_count[device_id][priority_string]+=1 + else: + device_count[device_id][priority_string]+=1 + counts_encoded = system.util.jsonEncode(device_count) + system.tag.writeAsync([provider+"System/device_count"],[counts_encoded]) + + + + + diff --git a/ignition/script-python/alarms/alarm_count/resource.json b/ignition/script-python/alarms/alarm_count/resource.json new file mode 100644 index 0000000..f3a70d3 --- /dev/null +++ b/ignition/script-python/alarms/alarm_count/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-05-31T14:39:36Z" + }, + "lastModificationSignature": "4424531aba455fb826ba21128ceb3ba9ad7370463c419805111a43f139a5acc1", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/alarms/alarm_filters/code.py b/ignition/script-python/alarms/alarm_filters/code.py new file mode 100644 index 0000000..8aa1a0f --- /dev/null +++ b/ignition/script-python/alarms/alarm_filters/code.py @@ -0,0 +1,64 @@ +def main_alarm_table(): + """ + Returns alarms states to filter + the main alarm table + + Args: + None + + Returns: + Returns a list of filters. + + Raises: + None + """ + return["Active", "Not Active"] + +def shelved_alarm_table(): + """ + Returns alarms states to filter + the shelved alarm table + + Args: + None + + Returns: + Returns a list of filters. + + Raises: + None + """ + return["Shelved"] + +def docked_alarm_table(): + """ + Returns alarms states to filter + the docked alarm table + + Args: + None + + Returns: + Returns a list of filters. + + Raises: + None + """ + return["Active", "Not Active", "Shelved"] + +def information_alarm_table(): + """ + Returns alarms states to filter + the information pop up + alarm table. + + Args: + None + + Returns: + Returns a list of filters. + + Raises: + None + """ + return["Active", "Not Active", "Shelved"] diff --git a/ignition/script-python/alarms/alarm_filters/resource.json b/ignition/script-python/alarms/alarm_filters/resource.json new file mode 100644 index 0000000..9cfe0bc --- /dev/null +++ b/ignition/script-python/alarms/alarm_filters/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T22:54:32Z" + }, + "lastModificationSignature": "5c3d5b7c302f499524327c0c42c520232767427c5cebcbc650ac00a99a400784", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/alarms/alarm_state/code.py b/ignition/script-python/alarms/alarm_state/code.py new file mode 100644 index 0000000..a6ea197 --- /dev/null +++ b/ignition/script-python/alarms/alarm_state/code.py @@ -0,0 +1,32 @@ +def get_alarm_state(state): + """ + This function returns a string representing the current alarm state from + a state argument enum 1 to 7. + Args: + state: Enum for current alarm state. + Returns: + String representing current alarm state. + + Raises: + KeyError: None. + """ + if state == 0: + return "Not Active" + elif state == 1: + return "Active" + elif state == 2: + return "Shelved" +# elif state == 4: +# return "Return to unacknowledged" +# elif state == 5: +# return "Shelved state" +# elif state == 6: +# return "Suppressed-by-design" +# elif state == 7: +# return "Out-of-service state" + else: + return "Unknown" + + + + diff --git a/ignition/script-python/alarms/alarm_state/resource.json b/ignition/script-python/alarms/alarm_state/resource.json new file mode 100644 index 0000000..294cad8 --- /dev/null +++ b/ignition/script-python/alarms/alarm_state/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T07:50:20Z" + }, + "lastModificationSignature": "d5ccb235feb6f908e00e4cbd66712e8625cd48650c1c4b2807145cafb198047c", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/alarms/alarm_tables/code.py b/ignition/script-python/alarms/alarm_tables/code.py new file mode 100644 index 0000000..d11dd64 --- /dev/null +++ b/ignition/script-python/alarms/alarm_tables/code.py @@ -0,0 +1,195 @@ +import time +from datetime import datetime +startTime = datetime.now() + +def convert(duration): + current_seconds = round(time.time()) + seconds_duration = (current_seconds - (duration/1000)) + m, s = divmod(seconds_duration, 60) + h, m = divmod(m, 60) + return seconds_duration + + +def get_timestamp(duration): + timestamp = system.date.fromMillis(duration) + return timestamp + +def check_device_in_device_list(device, device_list): + if len(device_list)== 0: + return True + for i in device_list: + if device.startswith(i): + return True + return False + +def edit_alarm_id(alarm_id): + new_alarm_id = alarm_id.replace("/", " / ") + return new_alarm_id + +def create_shelve_key(source_id, alarm_id): + """ + Creates a formatted key as Ignition ui + wont allow "/" and spaces to be stored as + key values. Formatting allows easy conversion + back to the origional sourceId and message string. + + Args: + source_id: The sourceId of the alarm. + message: The alarm message. + + Returns: + The formatted key.. + + Raises: + None. + """ + source_to_check = source_id.replace("/", "---") + key_to_check = source_to_check + "----" + str(alarm_id) + return key_to_check + +def unformat_shelve_key(shelved_key): + shelved_items = shelved_key.split("----") + source_to_check = shelved_items[0].replace("---", "/") + alarm_id = int(shelved_items[1]) + return source_to_check, alarm_id + + +def check_alarm_in_shelved_alarms(source_id, message, alarms_to_shelve): + key_to_check = create_shelve_key(source_id, message) + if key_to_check in alarms_to_shelve: + return key_to_check + return False + +def get_alarm_table(self, active_alarms, severity_filters, no_filter, + device_list, alarm_states, alt_colour, table_type): + alarms_data = [] + alarms_critical = [] + alarms_high = [] + alarms_medium = [] + alarms_low = [] + alarms_diagnostic = [] + alarms_disconnected = [] + alarm_temp_dict = {} + shelved_alarms_to_keep = {} + unshelved_alarms_to_keep = {} + shelve_alarms_dict = self.custom.alarms_to_shelve + unshelve_alarms_dict = self.custom.alarms_to_unshelve + if alt_colour: + style_props_critical = {"classes":"Alarms-Styles/Alt-Colours/Critical"} + style_props_high = {"classes":"Alarms-Styles/Alt-Colours/High"} + style_props_medium = {"classes":"Alarms-Styles/Alt-Colours/Medium"} + style_props_low = {"classes":"Alarms-Styles/Alt-Colours/Low"} + style_props_diagnostic = {"classes":"Alarms-Styles/Alt-Colours/Diagnostic"} + style_props_disconnected = {"classes":"Alarms-Styles/NoAlarm-Black"} + + else: + style_props_critical = {"classes":"Alarms-Styles/Critical"} + style_props_high = {"classes":"Alarms-Styles/High"} + style_props_medium = {"classes":"Alarms-Styles/Medium"} + style_props_low = {"classes":"Alarms-Styles/Low"} + style_props_diagnostic = {"classes":"Alarms-Styles/Diagnostic"} + style_props_disconnected = {"classes":"Alarms-Styles/NoAlarm-Black"} + + for i in active_alarms: + source_id = active_alarms[i].get("sourceId","Unknown") + alarm_id = active_alarms[i].get("id","Unknown") + severity = active_alarms[i].get("priority", 0) + family_type= active_alarms[i].get("type", 0) + site_id = active_alarms[i].get("siteId", "Unknown") + state = active_alarms[i].get("state", "Unknown") + state = alarms.alarm_state.get_alarm_state(state) + duration = active_alarms[i].get("timestamp", 0) + time_stamp = get_timestamp(duration) + active_duration = convert(duration) + message = active_alarms[i].get("message", "Unknown") + expiration_epoch = active_alarms[i].get("shelveExpiryEpoch") + duration_in_minutes = active_alarms[i].get("durationMinutes") + family_type_Dict={'1':'Jam','2':'Safety /Emergency','3':'Power circuit','4':'Communication', + '5':'Drive/Motor','6':'Pneumatic','7':'Mechanical','9':'Operational','10':'Scanner', + '11':'Controller','12':'Unexpected Container','20':'Miscellaneous','0':'Undefined'} + type_description= family_type_Dict.get(str(family_type)) + + if expiration_epoch != None: + expiration = system.date.fromMillis(expiration_epoch * 1000) + else: + expiration = "0" + + device_in_list = check_device_in_device_list(source_id, device_list) + if (int(severity) in severity_filters or no_filter == True) and ( + device_in_list == True and state in alarm_states): + if str(active_alarms[i].get("priority")) == "5": + style_class = style_props_critical + severity = "5. Critical" + key = "Critical" + alarm_list = alarms_critical + + elif str(active_alarms[i].get("priority")) == "4": + style_class = style_props_high + severity = "4. High" + key = "High" + alarm_list = alarms_high + + elif str(active_alarms[i].get("priority")) == "3": + style_class = style_props_medium + severity = "3. Medium" + key = "Medium" + alarm_list = alarms_medium + + elif str(active_alarms[i].get("priority")) == "2": + style_class = style_props_low + severity = "2. Low" + key = "Low" + alarm_list = alarms_low + + elif str(active_alarms[i].get("priority")) == "1": + style_class = style_props_diagnostic + severity = "1. Diagnostic" + key = "Diagnostic" + alarm_list = alarms_diagnostic + + elif str(active_alarms[i].get("priority")) == "6": + style_class = style_props_disconnected + severity = "Disconnected" + key = "Disconnected" + alarm_list = alarms_disconnected + + else: + style_class = style_props_diagnostic + severity = "Unknown" + key = "Diagnostic" + alarm_list = alarms_diagnostic + + if table_type == "Docked-East": + source_id = edit_alarm_id(source_id) + + shelve_alarm_id = check_alarm_in_shelved_alarms(source_id, alarm_id, shelve_alarms_dict) + if shelve_alarm_id: + shelved_alarms_to_keep[shelve_alarm_id] = "" + shelve_alarm = True + else: + shelve_alarm = False + + unshelve_alarm_id = check_alarm_in_shelved_alarms(source_id, alarm_id, unshelve_alarms_dict) + if unshelve_alarm_id: + unshelved_alarms_to_keep[unshelve_alarm_id] = "" + unshelve_alarm = True + else: + unshelve_alarm = False + + row = row_builder.build_row( SourceId = source_id, Priority = severity, Type = type_description, + Timestamp = time_stamp, State = state, + Message = message, Expiration = expiration, + Duration = active_duration, Alarm_id = alarm_id, Shelve = shelve_alarm, + Unshelve = unshelve_alarm, StyleClass = style_class) + alarm_list.append(row) + + + for k,v in shelve_alarms_dict.items(): + if k not in shelved_alarms_to_keep: + self.custom.alarms_to_shelve.pop(k) + + for k,v in unshelve_alarms_dict.items(): + if k not in unshelved_alarms_to_keep: + self.custom.alarms_to_unshelve.pop(k) + + return alarms_critical + alarms_high + alarms_medium + alarms_low + alarms_diagnostic + alarms_disconnected diff --git a/ignition/script-python/alarms/alarm_tables/resource.json b/ignition/script-python/alarms/alarm_tables/resource.json new file mode 100644 index 0000000..0a37b7b --- /dev/null +++ b/ignition/script-python/alarms/alarm_tables/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "vivsampa", + "timestamp": "2024-04-18T12:23:11Z" + }, + "lastModificationSignature": "d76f1f38b8db51a7eb7091ae65e259be7af183ce318f3f4f43588c24b9bfb548", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/alarms/shelve/code.py b/ignition/script-python/alarms/shelve/code.py new file mode 100644 index 0000000..3f2a8d7 --- /dev/null +++ b/ignition/script-python/alarms/shelve/code.py @@ -0,0 +1,31 @@ +def get_alarms_to_shelve(self): + """This function is used to perform the shelving function on + single or multiple alarms. It receives an alarm data dictionary + from a row in the alarm table and generates a shelving dict to trigger + a tag change script on the gateway. + + Args: + self: Reference to the component that is calling this function + + Returns: + Executes the shelving function. Does not return any results. + + Raises: + KeyError: Raises an exception. + """ + + selected_rows = self.custom.alarms_to_shelve + shelve_time = self.props.value + alarms_to_shelve = [] + messages_to_shelve = [] + for i in selected_rows: +# alarm_id = i.get("AlarmId") + alarm_id = i.get("value",{}).get("SourceId",{}).get("value") + alarm_id = alarm_id.replace(" ", "") + message = i.get("value",{}).get("Alarm_id",{}).get("value") + alarms_to_shelve.append(alarm_id) + messages_to_shelve.append(message) + duration = shelve_time + self.props.value = "" + return alarms_to_shelve ,messages_to_shelve, duration + diff --git a/ignition/script-python/alarms/shelve/resource.json b/ignition/script-python/alarms/shelve/resource.json new file mode 100644 index 0000000..f40b5ab --- /dev/null +++ b/ignition/script-python/alarms/shelve/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-05-15T15:15:28Z" + }, + "lastModificationSignature": "4999a5bd3ae82be98db5f46a1b96827aca4962c94f256df294706e2a92927628", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/config/project_config/code.py b/ignition/script-python/config/project_config/code.py new file mode 100644 index 0000000..c494368 --- /dev/null +++ b/ignition/script-python/config/project_config/code.py @@ -0,0 +1,124 @@ +import re +import os +import json +import sys +#Stores the page configuration for the project. +#This global variable is accesible form all gateway scoped events using "." notation +#congig.project_config.global_project_page_ids +global_project_page_ids = {} + + + +def get_project_config(): + """ + Function searches through the project directory Detailed-Views. + It looks for all the source ids on each Detailed-View and returns a + Dict with source ids as the keys and page ids as the values. + + Args: + param1: self. refrence to the object being called. + param2: source_id. The source_id of the alarm. + + Returns: + N/A. + + Raises: + KeyError: Will log an error message to the console if the basepath is not found. + logger = {whid}_get_project_config + """ + if not global_project_page_ids: + try: + basePath = os.getcwd().replace('\\','/') + '/data/projects/' + system.util.getProjectName() + '/com.inductiveautomation.perspective/views/Detailed-Views' + files = os.listdir(basePath) + files_found = True + except: + whid = system.tag.readBlocking("Configuration/FC")[0].value + logger = system.util.getLogger("%s-get_project_config" % (whid)) + exc_type, exc_obj, tb = sys.exc_info() + lineno = tb.tb_lineno +# logger.error("Error: %s, %s, %s" % (lineno, exc_type, exc_obj)) #JCM + files_found = False + if files_found: + for i in files: + jsonPath = basePath+'/'+str(i)+'/view.json' + with open(jsonPath, 'r') as f: + data= f.read() + obj = json.loads(data) + for child in obj['root']['children']: + tag_props = child.get("props",{}).get("params", {}).get("tagProps") + if tag_props: + source_id = tag_props[0] + global global_project_page_ids + global_project_page_ids[source_id] = i + +def open_pop_up(message): + error_message = message + system.perspective.openPopup("ErrorPopUP", "PopUp-Views/Error", + params ={"Error_message":error_message}, + showCloseIcon = False, modal = True, + viewportBound = True, + draggable = False, + overlayDismiss = True + ) + + + + +def navigate_to_url(self, source_id, page_id): + url_to_navigate = "/DetailedView/%s/%s" % (page_id, page_id) + navigation.amzl_navigation.set_session_variables(self, source_id, False) + system.perspective.navigate(page = url_to_navigate) + +def source_id_lookup(self, source_id): + """ + This function looks for the source_id in + the global_project_page_ids variable. + If found it returns the corrresponding page id. + If no page id is found it will search up the hierachy + of the source_id until it finds a match. It will then + navigate the user to the correct page and set the session + custom variable search_id. + + Args: + param1: self. refrence to the object being called. + param2: source_id. The source_id of the alarm. + + Returns: + N/A. + + Raises: + KeyError: N/A. + """ + logger = system.util.getLogger("Naviagtion function") +# logger.info(str(global_project_page_ids)) + page_id = global_project_page_ids.get(source_id) + found = False + if page_id: + found = True + navigate_to_url(self, source_id, page_id) + else: + items = source_id.split("/") + length_of_items = len(items)-1 + while length_of_items > 0: + items.pop() + source_id = "/".join(items) + page_id = global_project_page_ids.get(source_id) + if page_id: + found = True + navigate_to_url(self, source_id, page_id) + break + length_of_items -= 1 + if not found: + open_pop_up("No page id found") + +def get_child_scada_projects(): + """ + This function returns an alphabetically sorted list of + child SCADA projects, that inherit the SCADA_PERSPECTIVE_PARENT_PROJECT. + Each of these projects follow the naming convention "{WHID}_SCADA" + + :return: List[str]; List of project names on gateway + """ + pattern = '[A-Z]{3}[0-9]|K[A-Z]{3}_SCADA' + all_projects = system.project.getProjectNames() + return sorted([x for x in all_projects if re.match(pattern, x)]) diff --git a/ignition/script-python/config/project_config/resource.json b/ignition/script-python/config/project_config/resource.json new file mode 100644 index 0000000..b99d888 --- /dev/null +++ b/ignition/script-python/config/project_config/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:22Z" + }, + "hintScope": 2, + "lastModificationSignature": "3f2ca11462a2e171e0c7bd3e98b57649d6d7286e707957fb93ff6087a9ff1b58" + } +} \ No newline at end of file diff --git a/ignition/script-python/helper/code.py b/ignition/script-python/helper/code.py new file mode 100644 index 0000000..7b9f3df --- /dev/null +++ b/ignition/script-python/helper/code.py @@ -0,0 +1,284 @@ +class helper: + @staticmethod + def list_of_dict_to_dataset(dict_data,dict_column): #dict_data and dict_column are lists of dictionaries + import pprint + #get keys in the first dictionary in the list + #This is used to ensure only real fields are used in the column + if len(dict_data) != 0 and len(dict_column) != 0: + if isinstance(dict_data[0], dict) and isinstance(dict_column[0], dict): + pass + else: + raise TypeError('Dictionary','The items in lists are not Dictionaries.') + else: + raise TypeError('List','List provided is empty') + test = dict_data[0] + pprint.pprint(test) + d_keys = dict_data[0].keys() + + #create the column headers from provided dict_column + #but only if the column name is used as a dict in the data. + column_header = [] + pprint.pprint(dict_column) + for row in dict_column: + if row['field'] in d_keys: + column_header.append(row['field']) + pprint.pprint(column_header) + # create rows used as final list of lists for conversion to dataset + rows = [] + for di in dict_data: + #create individual row + row = [] + for column in column_header: + if di.has_key(column): + row.append(di[column]) + else: + row.append('') + #append each row to rows so all data is captured in a list of lists. + rows.append(row) + + #screate dataset from header and rows of data + dataset = system.dataset.toDataSet(column_header,rows) + return({'basic_dataset':dataset}) + + + + @staticmethod + def sanitize_tree(element): + """ + Arguments: + element: array/list or dict to be sanitized (remove Java "object wrappers") + Returns: + element: sanitized input array/list/dict + Usage: + from helper.helper import sanitize_tree + sanitizedTableData = sanitize_tree(myTable.props.data) + + ## This function loops recursively over a component property and converts all + ## siblings and children to base elements + """ + if hasattr(element, '__iter__'): + if hasattr(element, 'keys'): + return dict((helper.string_decode(k), helper.sanitize_tree(helper.string_decode(element[k]))) for k in element.keys()) + else: + return list(helper.sanitize_tree(helper.string_decode(x)) for x in element) + return element + + + + @staticmethod + def dataset_to_dict(dataset): #provide a basicdataset as input + #verify basic dataset was passed in + string_type = str(type(dataset)) + if string_type != "": + raise TypeError('Dataset','expected BaiscDataset type received %s'%(string_type)) + else: + raw_dataset = system.dataset.toPyDataSet(dataset) + #convert from PyDataSet to list of lists and header names. + headers = [((str(col).replace(' ','')).replace('_','')) for col in raw_dataset.getColumnNames()] + raw_dataset = [[col for col in row] for row in raw_dataset] + + #create needed empty lists to put dictionaries in + col_data = [] + data_data = [] + #create column names for column field of a table + for col in headers: + col_data.append({'field':col, + 'visible': True, + 'editable':False, + 'render':'auto', + 'justify':'auto', + 'align':'center', + 'resizable':True, + 'sortable':True, + 'sort':'none', + 'boolean':'checkbox', + 'number':'value', + 'numberFormat': '0,0.##', + 'dateFormat':'MM/DD/YYYY' + }) + #Create Data dictionaries used for data field of a table + data_counter = 0 + for row in raw_dataset: + data = {} + for col_num in range(len(row)): + data[headers[col_num]] = row[col_num] + data_data.append(data) + data_counter = data_counter+1 + #pass out list of dictionary, list of dictionary, string + return({'data':data_data,'column':col_data}) + + @staticmethod + def xyChartTransform(ds=None, columns=None): + ## This function is for use with the XY chart in Perspective + ## This component requires an array of dictionaries for the chart data structure, rather than an Ignition dataset + ## Each dict item should have the format of: {'Column_X': valueX, 'Column_Y': valueY} + ## ds = Ignition dataset, such as that returned by a SQL query binding + ## columns = list of column names to be included in the array of dicts returned by function. + ## NOTE: the first column name listed will be the X axis + ## If no column list passed in, the function will grab all names from the dataset + + ## NOTE: This function will return every column/value in the dataset as a dict key + rows = [] + if ds is None: + return rows ## return empty array if no dataset passed in + try: + data = system.dataset.toPyDataSet(ds) ## convert to python dataset + if columns is None: + columns = system.dataset.getColumnHeaders(ds) ## extract column names from dataset + for row in data: ## Loop over python dataset + d = {} ## initialize empty dictionary for each row + for c in columns: ## loop over column list + d[c] = row[c] ## add key for each column as key and assign value + rows.append(d) ## append new row + return rows + except: + return rows + + @staticmethod + def string_decode(v): + """ + Arguments: + v: value to be decoded (ignore if not unicode string) + Returns: + v: decoded value + Usage: + from helper.helper import string_decode + my_unicode_string = (u'hello world') + decoded_string = string_decode(my_unicode_string) + + ## This function is a helper for the sanitize_tree function, normally + """ + # vscode pylint v2.7.* will complain about this but it works, also works in Ignition v.8.1.* + if isinstance(v, unicode): + # replace any nasty em- or en-dashes with a more sane '-' short dash + # this should avoid most of the nested try:except: blocks below + if u'\u2013' in v: v = v.replace(u'\u2013', '-') + try: v = str(v) + except: + import traceback + from loggerConfig import getLogger + logger = getLogger('sanitize_tree_string_decode') + logger.warn(traceback.format_exc()) + try: + v = v.encode('utf-8') + v = str(v) + except: + logger.warn(traceback.format_exc()) + try: v.encode('ascii', 'ignore') + except: + logger.warn(traceback.format_exc()) + try: v = repr(v) + except: + logger.warn(traceback.format_exc()) + return v + return v + + @staticmethod + def centerJustifyTableColumns(columns=[]): + """ + ## This method takes a table column config object (array of dicts) and returns it with all columns and their headers set to center justified + Arguments: + columns: [array of dict] table column configuration + Returns: + columns: [array of dict] table column config, with all columns/headers center justified + Usage: + from helper.helper import centerJustifyTableColumns + myTable.props.columns = centerJustifyTableColumns(myTable.props.columns) + """ + try: + for column in columns: + try: + column['justify'] = 'center' + column['header']['justify'] = 'center' + except: continue + except: pass + return columns + + @staticmethod + def get_dropdown_options_from_dataset(ds=None, value_column=None, label_column=None): + """ + This method takes an ignition dataset object, and a name or index for "value" and "label" columns + and returns an array of dict objects for each row to use in the binding of perspective dropdown "options" prop. + Arguments: + ds: Ignition dataset object, ie from named SQL query + value_column: [string or integer] if string, the name of the column to represent the value when option is selected. + if integer, the column index for the value + label_column: [string or integer] if string, the name of the column to represent the label (display) for option selection. + if integer, the column index for the label + Returns: [{ + value: value to be assigned to dropdown "value" property when options selection + label: value to be displayed in the dropdown for each option + }] + Usage: + # in a script transform on the dropdown.props.options binding + from helper.helper import get_dropdown_options_from_dataset + options = get_dropdown_options_from_dataset( + ds=value, # from property/query binding above this transform + value_column='my_value_column_name', + label_column='my_label_column_name + ) + return options + """ + # Check required arguments for null values + if ds is None: + msg = 'No dataset passed in' + return {'error': msg} + if value_column is None: + msg = 'No value_column name or index passed in' + return {'error': msg} + if label_column is None: + msg = 'No label_column name or index passed in' + return {'error': msg} + # convert the ignition dataset to python dataset to iterate over + try: data = system.dataset.toPyDataSet(ds) + except: + import traceback + msg = 'Error converting dataset to python data: %s' % traceback.format_exc() + return {'error': msg} + # grab the column headers from input dataset + headers = system.dataset.getColumnHeaders(ds) + # verify both the value and label columns are in the list of column headers, if passed in as strings + # if passed in as integer indexes, make sure they are valid + if isinstance(value_column, str): + if value_column not in headers: + msg = 'value_column (%s) not in dataset column headers!' % value_column + return {'error': msg} + elif isinstance(value_column, int): + if value_column not in range(len(headers)): + msg = 'value_column index (%d) not valid!' % value_column + return {'error': msg} + else: # if not string or integer, invalid type + msg = 'invalid type for value_column (%s). Must be integer or string' % type(value_column) + return {'error': msg} + if isinstance(label_column, str): + if label_column not in headers: + msg = 'label_column (%s) not in dataset column headers!' % label_column + return {'error': msg} + elif isinstance(label_column, int): + if label_column not in range(len(headers)): + msg = 'label_column index (%d) not valid!' % label_column + return {'error': msg} + else: # if not string or integer, invalid type + msg = 'invalid type for label_column (%s). Must be integer or string' % type(label_column) + return {'error': msg} + # if passed all verification checks, build array of objects representing label/value pairs for each dataset row + options = [{'value': row[value_column], 'label': row[label_column]} for row in data] + return options + + @staticmethod + def keys_exists(element, *keys): + ''' + Check if *keys (nested) exists in `element` (dict). + ''' + if not isinstance(element, dict): + raise AttributeError('keys_exists() expects dict as first argument.') + if len(keys) == 0: + raise AttributeError('keys_exists() expects at least two arguments, one given.') + + _element = element + for key in keys: + try: + _element = _element[key] + except KeyError: + return False + return True \ No newline at end of file diff --git a/ignition/script-python/helper/resource.json b/ignition/script-python/helper/resource.json new file mode 100644 index 0000000..d845a1d --- /dev/null +++ b/ignition/script-python/helper/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "f83e7a75f7aafd346edb74d77981cf717264d8fae2d1598f67e02c3cfa4a7a53", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/import_file/csv/code.py b/ignition/script-python/import_file/csv/code.py new file mode 100644 index 0000000..3ee54c4 --- /dev/null +++ b/ignition/script-python/import_file/csv/code.py @@ -0,0 +1,20 @@ +def csv_import(): + """ + Opens a file and returns the data as a list . + + Args: + + Returns: + the .csv as a nested list. + + Raises: + KeyError: Raises an exception. + """ + newFile = system.file.openFile('gif') + +# with open(newFile,"r") as f: +# csv_reader = csv.reader(f) +# device_list = [] +# for line in csv_reader: +# device_list.append(line) +# return device_list diff --git a/ignition/script-python/import_file/csv/resource.json b/ignition/script-python/import_file/csv/resource.json new file mode 100644 index 0000000..2e2a7f1 --- /dev/null +++ b/ignition/script-python/import_file/csv/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "sipearso", + "timestamp": "2021-11-26T15:18:29Z" + }, + "lastModificationSignature": "6929af8e56e47d6eeb289eed7413e7e319c62d47344086b8a1a96ffa31f37370" + } +} \ No newline at end of file diff --git a/ignition/script-python/loggerConfig/code.py b/ignition/script-python/loggerConfig/code.py new file mode 100644 index 0000000..79e3b5d --- /dev/null +++ b/ignition/script-python/loggerConfig/code.py @@ -0,0 +1,34 @@ +import logging + +LOGGING_MAP_IDE = { + 'critical': {'level': logging.CRITICAL, 'value': 50}, + 'error': {'level': logging.ERROR, 'value': 40}, + 'warning': {'level': logging.WARNING, 'value': 30}, + 'info': {'level': logging.INFO, 'value': 20}, + 'debug': {'level': logging.DEBUG, 'value': 10}, + 'trace': {'level': 5, 'value': 5}, + 'notset': {'level': logging.NOTSET, 'value': 0} +} + +LOG_LEVELS = ['trace', 'debug', 'info', 'warn', 'error'] ## these are the valid logging levels for use with Ignition system.util.setLoggingLevel() function + +def getLoggerIDE(name='', level='info'): + ## insure basic logging is set-up + logging.basicConfig() + ## Grab a logger object for the given name + logger = logging.getLogger(name) + if level and level in LOGGING_MAP_IDE: + level = LOGGING_MAP_IDE[level]['level'] + logger.setLevel(level) + ## Check if any handler exists for this logger, if not, create a basic handler config. + ## TODO: Add a functionality to customize handlers, particularly for writing to Ignition gateway console or system.perspective.print() etc + # if not len(logger.handlers): logging.basicConfig() + return(logger) + +def getLogger(name='', level=None): + ## Grab a logger object for the given name from the Ignition system.util function + logger = None + if name not in ['', None]: logger = system.util.getLogger(name) + ## if logger created, level arg passed in and valid, set the logging level accordingly + if logger and level and level in LOG_LEVELS: system.util.setLoggingLevel(name, level) + return(logger) diff --git a/ignition/script-python/loggerConfig/resource.json b/ignition/script-python/loggerConfig/resource.json new file mode 100644 index 0000000..1542cce --- /dev/null +++ b/ignition/script-python/loggerConfig/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "duscoope", + "timestamp": "2024-01-19T19:06:21Z" + }, + "lastModificationSignature": "b0c9181a49b45a86f9fd17854ef70aa83ac317ab32d909d8d1004241e8f94cd6", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/messaging/message_handler/code.py b/ignition/script-python/messaging/message_handler/code.py new file mode 100644 index 0000000..b0112aa --- /dev/null +++ b/ignition/script-python/messaging/message_handler/code.py @@ -0,0 +1,147 @@ +def send_message(**kwargs): + fc = system.tag.readBlocking("Configuration/FC")[0].value + payload = kwargs + message_type = kwargs.get("message_type") + scope = kwargs.get("scope") + source = kwargs.get("source") + try: + system.perspective.sendMessage(message_type, payload = payload, scope = scope) + except: + system.perspective.print(source, destination="client") + +def update_device_filters(devices): + payload= {} + payload["data"] = devices + system.perspective.sendMessage("update-device-filters", payload = payload, scope = "page") + +def reset_historical_filters(action): + payload = {} + payload["data"] = action + system.perspective.sendMessage("reset-historical-filters", payload = payload, scope = "page") + +def update_source_id_filters(source_ids): + payload= {} + payload["data"] = source_ids + system.perspective.sendMessage("update-source_id-filters", payload = payload, scope = "page") + +def send_http_response_code(response): + payload= {} + payload["response"] = response + system.perspective.sendMessage("http-response-code", payload = payload, scope = "page") + +def update_historical(historical_data): + payload= {} + payload["data"] = historical_data + system.perspective.sendMessage("update-historical-data", payload = payload, scope = "page") + +def update_historical_first_request(historical_data): + payload = {} + payload["data"] = historical_data + payload["initial_data"] = historical_data + system.perspective.sendMessage("update-first-request", payload = payload, scope = "page") + +def load_initial_data(request): + #Pass a boolean to load the initial dataset. + payload = {} + payload["data"] = request + system.perspective.sendMessage("load_initial_data", payload = payload, scope = "page") + +def update_token_array(token_array): + payload = {} + payload["data"] = token_array + system.perspective.sendMessage("update-token-array", payload = payload, scope = "page") + +def show_historical_filters(action): + payload = {} + payload["data"] = action + system.perspective.sendMessage("show-historical-filters", + payload = payload, scope = "page") + +def update_initial_token(number): + payload = {} + payload["data"] = number + system.perspective.sendMessage("update-initial-tokens", payload = payload, scope = "page") + +def set_source_filters(self): + filters = self.props.value + payload = {} + payload["data"] = filters + system.perspective.sendMessage("set-source-filters", payload = payload, + scope = "page") + + +def set_type_filters(self): + filters = self.props.value + payload = {} + payload["data"] = filters + system.perspective.sendMessage("set-type-filters", payload = payload, + scope = "page") + +def set_priority_filters(self): + filters = self.props.value + payload = {} + payload["data"] = filters + system.perspective.sendMessage("set-priority-filters", payload = payload, + scope = "page") + +def set_device_filters(self): + filters = self.props.value + payload = {} + payload["data"] = filters + system.perspective.sendMessage("set-device-filters", payload = payload, + scope = "page") + +def set_message_filters(self): + filters = self.props.value + payload = {} + payload["data"] = filters + system.perspective.sendMessage("set-message-filters", payload = payload, + scope = "page") + +def set_time_from_filters(self): + "This filter sets the time from for history" + time = self.props.value + utc_offset = -self.session.props.device.timezone.utcOffset + #time = system.date.addHours(time, utc_offset) + epoch = system.date.toMillis(time) + payload = {} + payload["data"] = epoch + system.perspective.sendMessage("set-from-filters", payload = payload, + scope = "page") + +def set_time_to_filters(self): + "This filter sets the time to for history" + time = self.props.value + utc_offset = -self.session.props.device.timezone.utcOffset + #time = system.date.addHours(time, utc_offset) + epoch = system.date.toMillis(time) + payload = {} + payload["data"] = epoch + system.perspective.sendMessage("set-to-filters", payload = payload, + scope = "page") + +def set_duration_filters(self): + filters = self.props.value + ms = filters * 1000 + payload = {} + payload["data"] = ms + system.perspective.sendMessage("set-duration-filters", payload = payload, + scope = "page") + +def update_page_number(page): + payload = {} + payload["data"] = page + system.perspective.sendMessage("update-page-number", payload = payload, + scope = "page") + +def update_client_id(client_id): + payload = {} + payload["data"] = client_id + system.perspective.sendMessage("update-client-id", payload = payload, + scope = "page") + +#Generic message handler scoped at view level +def view_message_handler(message, message_type): + payload = {} + payload["data"] = message + system.perspective.sendMessage(message_type, payload, scope = "view") diff --git a/ignition/script-python/messaging/message_handler/resource.json b/ignition/script-python/messaging/message_handler/resource.json new file mode 100644 index 0000000..9ef72ee --- /dev/null +++ b/ignition/script-python/messaging/message_handler/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2024-04-30T16:44:47Z" + }, + "lastModificationSignature": "c6b459db3b4cb417620855a627b84b17ff716b73f28525d33b971e2d3774929b", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/navigation/additional_view/code.py b/ignition/script-python/navigation/additional_view/code.py new file mode 100644 index 0000000..c3bf108 --- /dev/null +++ b/ignition/script-python/navigation/additional_view/code.py @@ -0,0 +1,20 @@ +def navigate_to_additional_view(self): + """ + This function is used to navigate to a page from a navigation button. + This function can be used on any button that has a property called "self.custom.page_id" + which is the target page for the button. + Args: + self: Refrence to the object that is invoking this function. + + Returns: + This is a description of what is returned. + + Raises: + KeyError: Raises an exception. + """ + + page_id = self.custom.page_id + plc = page_id.split("-")[0] + url_to_navigate = "/DetailedView/%s/%s" % (page_id, plc) + system.perspective.navigate(page = url_to_navigate) + diff --git a/ignition/script-python/navigation/additional_view/resource.json b/ignition/script-python/navigation/additional_view/resource.json new file mode 100644 index 0000000..ec44d7f --- /dev/null +++ b/ignition/script-python/navigation/additional_view/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-04-14T12:54:34Z" + }, + "lastModificationSignature": "95a343bcc6337fdd4591df3976fcc5e4d91376ffb0f4607b3a202f4a069de78a" + } +} \ No newline at end of file diff --git a/ignition/script-python/navigation/alarm_navigation/code.py b/ignition/script-python/navigation/alarm_navigation/code.py new file mode 100644 index 0000000..939193b --- /dev/null +++ b/ignition/script-python/navigation/alarm_navigation/code.py @@ -0,0 +1,79 @@ +def set_session_variables(self, search_id, device_search_id): + """ + chnaged from:(self, search_id, device_search_id, plc_tag_path, display_cc, detailed_view) + This function is used to set the custom session variables in the perspective session. + + Args: + self: This is a reference to the object that is calling this function. + search_id: Type string, this should be a UDT name. + device_search_id: Type string, display path of the alarm. + Returns: + None. + + Raises: + None. + """ + self.session.custom.searchId = search_id + self.session.custom.deviceSearchId = device_search_id + +def navigate_to_alarm(self, event): + """ + This function is used to navigate to a detailed view when double + clicking a row in the active alarm table. It takes the Ignition alarm id + to return the alarm information from the "System/ActiveAlarms" tag. + + Args: + self: This is a reference to the object that is clicked on the screen. + event: This is a reference to the event that is clicked on the screen. + Returns: + None. + + Raises: + None. + """ + alarm_id = event.value.get("AlarmId") + tags_to_read = system.tag.readBlocking(["Configuration/DetailedViews","System/ActiveAlarms"]) + pages_decoded = system.util.jsonDecode(tags_to_read[0].value) + active_alarms = system.util.jsonDecode(tags_to_read[1].value) + UDT = active_alarms.get(alarm_id,{}).get("UDT_tag") + bit_position = active_alarms.get(alarm_id,{}).get("bitPosition") + name = active_alarms.get(alarm_id,{}).get("Name") + page_id = active_alarms.get(alarm_id,{}).get("PageId","None") + page = UDT.split("_")[0] + + if page_id != "None" and len(page_id)>0: + page_id = page_id.split("-")[0] + udt_to_read = "%s/Parameters.AREA" % (page_id) + else: + udt_to_read = "%s/Parameters.AREA" % (page) + system.perspective.print(udt_to_read) + read_area = system.tag.readBlocking([udt_to_read]) + area = read_area[0].value + + page_name = "/"+page + display_path = active_alarms.get(alarm_id,{}).get("DisplayPath") + check_keys = pages_decoded.get(page,0) + + if page_id != "None" and page_id != "": + page = page_id.split("-")[0] + url_to_navigate = "/DetailedView/%s/%s" % (page_id, page) + set_session_variables(self, UDT, display_path) + system.perspective.navigate(page = url_to_navigate) + system.perspective.sendMessage("plc-to-display", payload = {"device":page_id, "show_controls":True, "area":area}, scope = "page") + + elif check_keys != 0: + set_session_variables(self, UDT, display_path) + url_to_navigate = "/DetailedView/%s/%s" % (page, page) + system.perspective.navigate(page = url_to_navigate ) + system.perspective.sendMessage("plc-to-display", payload = {"device":page, "show_controls":True, "area":area}, scope = "page") + + else: + for i in pages_decoded: + page_list = pages_decoded[i] + if page in page_list: + set_session_variables(self, UDT, display_path) + url_to_navigate = "/DetailedView/%s/%s" % (i,i) + system.perspective.navigate(page = url_to_navigate) + system.perspective.sendMessage("plc-to-display", payload = {"device":i, "show_controls":True, "area":area}, scope = "page") + + diff --git a/ignition/script-python/navigation/alarm_navigation/resource.json b/ignition/script-python/navigation/alarm_navigation/resource.json new file mode 100644 index 0000000..1102e36 --- /dev/null +++ b/ignition/script-python/navigation/alarm_navigation/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-04-20T12:41:24Z" + }, + "lastModificationSignature": "2bd699e68d4a5dcf42381ba911dabc030ac92a81833a5ccb29c60755c7aff184" + } +} \ No newline at end of file diff --git a/ignition/script-python/navigation/amzl_navigation/code.py b/ignition/script-python/navigation/amzl_navigation/code.py new file mode 100644 index 0000000..636cdc5 --- /dev/null +++ b/ignition/script-python/navigation/amzl_navigation/code.py @@ -0,0 +1,65 @@ +def set_session_variables(self, search_id, covert): + """ + chnaged from:(self, search_id, device_search_id, plc_tag_path, display_cc, detailed_view) + This function is used to set the custom session variables in the perspective session. + + Args: + self: This is a reference to the object that is calling this function. + search_id: Type string, this should be a UDT name. + device_search_id: Type string, display path of the alarm. + Returns: + None. + + Raises: + None. + """ + self.session.custom.searchId = search_id + self.session.custom.covert = covert + + +def navigate_to_alarm(self, mhe_id): + """ + This function is used to navigate to the location of an alarm within SCADA + + Args: + self: This is a reference to the object that is clicked on the screen. + event: This is a reference to the event that is clicked on the screen. + Returns: + None. + + Raises: + Logs and error to the gateway if the Config/cfg tag is not found + or the LinkToPage field is empty. + """ + + config = "%s/Config/cfg" % (mhe_id) + tags_to_read = system.tag.readBlocking(["Configuration/FC", "Configuration/DetailedViews"]) + tag_provider = "[%s_SCADA_TAG_PROVIDER]" % (tags_to_read[0].value) + tags_config = system.tag.readBlocking([tag_provider + config]) + tag_config_value = system.util.jsonDecode(tags_config[0].value) + if tag_config_value: + link_to_page = tag_config_value.get("LinkToPage") + if link_to_page == None or len(link_to_page) == 0: + error_message = "No page id found in Cfg tag" + system.perspective.openPopup("ErrorPopUP", "PopUp-Views/Error", + params ={"Error_message":error_message}, + showCloseIcon = False, modal = True, + viewportBound = True, + draggable = False, + overlayDismiss = True + ) + else: + url_to_navigate = "/DetailedView/%s/%s" % (link_to_page, link_to_page) + #Update the session variables to flash the pointers. + set_session_variables(self, mhe_id, False) + system.perspective.navigate(page = url_to_navigate) + else: + error_message = "No cfg tag found" + system.perspective.openPopup("ErrorPopUP", "PopUp-Views/Error", + params ={"Error_message":error_message}, + showCloseIcon = False, modal = True, + viewportBound = True, + draggable = False, + overlayDismiss = True + ) + diff --git a/ignition/script-python/navigation/amzl_navigation/resource.json b/ignition/script-python/navigation/amzl_navigation/resource.json new file mode 100644 index 0000000..45e2965 --- /dev/null +++ b/ignition/script-python/navigation/amzl_navigation/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-07-18T13:39:02Z" + }, + "lastModificationSignature": "4c39cb637d43f3f8797c7d9e10244b36976f5ea8cae9783abba82fb2114fd142", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/navigation/basic_navigation/code.py b/ignition/script-python/navigation/basic_navigation/code.py new file mode 100644 index 0000000..65db1c1 --- /dev/null +++ b/ignition/script-python/navigation/basic_navigation/code.py @@ -0,0 +1,15 @@ +def detailed_view(page_id): + """ + This function is used to naviagte to a page from a navigation button + This function takes one parameter "page_id. This is the id of the page + the user wishes to navigate to. + + Args: + page_id : Target page the function will use to navigate to. + Returns: + None. + + Raises: + None. + """ + system.perspective.navigate(page_id) diff --git a/ignition/script-python/navigation/basic_navigation/resource.json b/ignition/script-python/navigation/basic_navigation/resource.json new file mode 100644 index 0000000..345e20d --- /dev/null +++ b/ignition/script-python/navigation/basic_navigation/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-03-01T15:56:08Z" + }, + "lastModificationSignature": "b0abc07e802ede432f83090730e0b6a126d928ec051bcbf03bd673486ff4d147" + } +} \ No newline at end of file diff --git a/ignition/script-python/navigation/navigate_to_page/code.py b/ignition/script-python/navigation/navigate_to_page/code.py new file mode 100644 index 0000000..e5bd1aa --- /dev/null +++ b/ignition/script-python/navigation/navigate_to_page/code.py @@ -0,0 +1,50 @@ +def detailed_view(self, tag_name, device_id, area): + """ + This function is used to naviagte to a detailed view + For example an on click event of a component. + The input paramter array to the component contains a reference to the PLC. + Detail view display all devices and equipement connected to a particular PLC. + The PLC ID is looked up in the "Configuration/DetailedViews" dictionary. + if found it navigates to the detailed view of the page_name {/}. + + Args: + self: This is a reference to the object that is clicked on the screen. + tag_name: Hold information on the particular event that call this function. + area : The area within the FC + Returns: + None. + + Raises: + None. + """ + device = tag_name.split("_") + device = device[0] + # Example: page_name = /F01 + pages = system.tag.readBlocking(["Configuration/DetailedViews"]) + pages_value = pages[0].value + pages_decoded = system.util.jsonDecode(pages_value) + for view , devices in pages_decoded.items(): + if device in devices: + self.session.custom.searchId = tag_name + self.session.custom.deviceSearchId = device_id + system.perspective.sendMessage("plc-to-display", payload = {"device":view,"show_controls":True,"area":area}, scope = "page") + url_to_navigate = "/DetailedView/%s/%s" % (view, view) + system.perspective.navigate(page = url_to_navigate) + return + +def navigate_to_deatiled_view(source): + page_id = config.project_config.get_project_config.global_project_page_ids.get(source) + if page_id: + url_to_navigate = "/DetailedView/%s/%s" % (page_id, page_id) + navigation.amzl_navigation.set_session_variables(self, page_id, False) + system.perspective.navigate(page = url_to_navigate) + elif not page_id: + data = source.split("/") + pass + + + + + + + \ No newline at end of file diff --git a/ignition/script-python/navigation/navigate_to_page/resource.json b/ignition/script-python/navigation/navigate_to_page/resource.json new file mode 100644 index 0000000..0b7bee6 --- /dev/null +++ b/ignition/script-python/navigation/navigate_to_page/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-06-04T19:02:35Z" + }, + "lastModificationSignature": "6b4a200928f142532837640b703b340cb01b94fcbcff9c3b0fe4282a61933153", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/navigation/search/code.py b/ignition/script-python/navigation/search/code.py new file mode 100644 index 0000000..078717c --- /dev/null +++ b/ignition/script-python/navigation/search/code.py @@ -0,0 +1,44 @@ +def generate_tag_config(self,event): + """This function generates the tag config in the search window. + + Args: + self: A reference to the object that is invoking this function. + event: A reference to the event object that is being called by this function.. + + Returns: + This is a description of what is returned. + + Raises: + None. + + """ + + tag = event.value.get("Tags") + fc = system.tag.read("Configuration/FC").value + path ="[%s_SCADA_TAG_PROVIDER]%s/OPC/" % (fc, tag) + results = system.tag.browse( path = path) + tag_list = results.getResults() + data = [i["fullPath"] for i in tag_list] + table_data = [] + for i in data: + config = system.tag.getConfiguration(i) + alarms = [x.get("alarms") for x in config] + try: + for alarm in alarms: + for x in alarm: +# replace = "[%s_SCADA_TAG_PROVIDER]" % (fc) + system.perspective.print(x) + full_path = str(i) + name = x.get("name") + additional_info = x.get("AdditionalInfo") + priority = x.get("priority") + bit_position = x.get("bitPosition") + row = row_builder.build_row(FullPath = full_path, AdditionalInfo = additional_info, + Priority = priority, Name = name, StyleClass = {"classes":"Alarms-Styles/NoAlarms"}) + table_data.append(row) + except: + system.perspective.print("object not iterable") +# self.getSibling("Table_0").props.data = table_data + payload = {} + payload["table_data"] = table_data + system.perspective.sendMessage("build-tag-config", payload = payload, scope = "view") diff --git a/ignition/script-python/navigation/search/resource.json b/ignition/script-python/navigation/search/resource.json new file mode 100644 index 0000000..541031d --- /dev/null +++ b/ignition/script-python/navigation/search/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-06-09T07:46:52Z" + }, + "lastModificationSignature": "59da7b166236816a76c9ea84f8e2c791a5ac6750b3a1757cec091de830ebd777", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/navigation/show_alarms/code.py b/ignition/script-python/navigation/show_alarms/code.py new file mode 100644 index 0000000..ffedf84 --- /dev/null +++ b/ignition/script-python/navigation/show_alarms/code.py @@ -0,0 +1,34 @@ +def show_alarm_from_docked_window(self,event): + #Get the alarm properties from the alarm object. + """ + Displays the currently active alarm from the south docked alarm table in the detailed view. + If the alarm is on a different page to the current page the function will navigate the user + to the correct page and show the alarm. + + Args: + self: Refrence to the object thats invoking this function. + event: Refrence to the event that is invoking this function. + + Returns: + The fucntion doses not return any values. + + Raises: + KeyError: None + """ + + + alarm_id = event.value.get("AlarmId") + tags_to_read = system.tag.readBlocking(["System/ActiveAlarms"]) + active_alarms = system.util.jsonDecode(tags_to_read[0].value) + UDT = active_alarms.get(alarm_id,{}).get("UDT_tag") + plc = UDT.split("_")[0] + name = active_alarms.get(alarm_id,{}).get("Name") + page_id = active_alarms.get(alarm_id,{}).get("PageId","None") + display_path = active_alarms.get(alarm_id,{}).get("DisplayPath") + + #Set the session custom variables to highlight the selected alarm. + self.session.custom.searchId = UDT + self.session.custom.deviceSearchId = display_path + + url_to_navigate = "/DetailedView/%s/%s" % (page_id, plc) + system.perspective.navigate(page = url_to_navigate) diff --git a/ignition/script-python/navigation/show_alarms/resource.json b/ignition/script-python/navigation/show_alarms/resource.json new file mode 100644 index 0000000..c66dbde --- /dev/null +++ b/ignition/script-python/navigation/show_alarms/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-04-14T12:55:43Z" + }, + "lastModificationSignature": "ea96ebccb9995e064092cc863c89afe10a2a6d97617fd7eb579497b1e09fd37f" + } +} \ No newline at end of file diff --git a/ignition/script-python/notifyTool/DeleteFromDynamo/code.py b/ignition/script-python/notifyTool/DeleteFromDynamo/code.py new file mode 100644 index 0000000..c47d627 --- /dev/null +++ b/ignition/script-python/notifyTool/DeleteFromDynamo/code.py @@ -0,0 +1,122 @@ +from urllib2_aws4auth import aws_urlopen, Request +from urllib2 import HTTPError +from urllib import urlencode +import json +import system +import boto3 +from pprint import pformat + +REGION ='us-west-2' + + +def openSession(): + CREDS = boto3.Session().get_credentials() + AWS_ACCESS_KEY_ID = CREDS.access_key + AWS_SECRET_ACCESS_KEY = CREDS.secret_key + TOKEN = CREDS.token + CREDSRETURN = {'AccessKeyId':AWS_ACCESS_KEY_ID, + 'SecretAccessKey':AWS_SECRET_ACCESS_KEY, + 'SessionToken':TOKEN} +# OPENER = aws_urlopen( +# AWS_ACCESS_KEY_ID, +# AWS_SECRET_ACCESS_KEY, +# REGION, +# SERVICE, +# session_token=TOKEN, +# verify=False) +# return OPENER + + return CREDSRETURN + + +def DynamoDeleter(PrimaryKey, publish): + import json + from pprint import pformat + import boto3 + from datetime import datetime + from decimal import Decimal + import time + + LOGGER = system.util.getLogger('notify_to_dynamodb_log') + + # Get STAGE variable + roleArn = 'arn:aws:iam::533266954132:role/ignition_to_aws_scada_notify' + STAGE = 'beta' + # Make sure STAGE is valid. no gamma stage configured + if STAGE not in ['alpha', 'beta', 'gamma', 'prod']: + STAGE = 'beta' + if STAGE == 'gamma': + STAGE = 'beta' + + STAGE_CONFIG = { + 'alpha':{ + 'region' : 'us-west-2', + 'roleArn' : roleArn, + 'tableName' : 'NotificationsEntries' + }, + 'beta': { + 'region':'us-west-2', + 'roleArn': roleArn, + 'tableName' : 'NotificationsEntries' + + }, + 'prod': { + 'region':'us-west-2', + 'roleArn': roleArn, + 'tableName' : 'NotificationsEntries' + } + } + + + # create sts session to get credentials from EC2 + sts_client = boto3.client('sts') + region_name = STAGE_CONFIG.get(STAGE, 'alpha').get('region', 'us-west-2') + + assume_role_response = sts_client.assume_role( + RoleArn = STAGE_CONFIG.get(STAGE, 'beta').get('roleArn', roleArn), + RoleSessionName = 'AssumeRole' + ) + + temp_credentials = assume_role_response['Credentials'] + + # create session using the temp creds + b3_session = boto3.Session( + aws_access_key_id = temp_credentials['AccessKeyId'], + aws_secret_access_key = temp_credentials['SecretAccessKey'], + aws_session_token = temp_credentials['SessionToken'], + region_name = 'us-west-2', + ) + + # create a dynamodb session + dynamodb = b3_session.resource('dynamodb') + table = dynamodb.Table(STAGE_CONFIG.get(STAGE, 'beta').get('tableName', 'NotificationsEntries')) +# response = client.scan( +# TableName='string', +# IndexName='string', +# AttributesToGet=[ +# 'string', +# ], +# Limit=123, + + # write data directly to dynamodb table + try: + response = table.delete_item(Key={ + 'PrimaryKey': PrimaryKey, + "publish": publish + }, + ConditionExpression="attribute_exists (PrimaryKey)") +# response = table.scan(ProjectionExpression="PrimaryKey, publish, expire, title") +# TableName='NotificationsEntries', +# IndexName='publish', +## ProjectionExpression =['publish', 'expire', 'title'], +# Limit=123) +# system.perspective.print(response) + system.perspective.print('Delete from NotificationsEntries DynamoDB Table Successful') + except Exception as e: + system.perspective.print('Delete from NotificationsEntries DynamoDB Table NOT Successful') + system.perspective.print(str(e)) + LOGGER.error(str(e)) + + + return response + \ No newline at end of file diff --git a/ignition/script-python/notifyTool/DeleteFromDynamo/resource.json b/ignition/script-python/notifyTool/DeleteFromDynamo/resource.json new file mode 100644 index 0000000..2e77ba2 --- /dev/null +++ b/ignition/script-python/notifyTool/DeleteFromDynamo/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-05-07T17:12:34Z" + }, + "hintScope": 2, + "lastModificationSignature": "f31b7f4dd5820a1d36a179dfdf9d6ddb41dd207de400a1b909aa0f42af89727a" + } +} \ No newline at end of file diff --git a/ignition/script-python/notifyTool/ReadFromDynamo/code.py b/ignition/script-python/notifyTool/ReadFromDynamo/code.py new file mode 100644 index 0000000..d4c5f78 --- /dev/null +++ b/ignition/script-python/notifyTool/ReadFromDynamo/code.py @@ -0,0 +1,118 @@ +from urllib2_aws4auth import aws_urlopen, Request +from urllib2 import HTTPError +from urllib import urlencode +import json +import system +import boto3 +from pprint import pformat + +REGION ='us-west-2' + + +def openSession(): + CREDS = boto3.Session().get_credentials() + AWS_ACCESS_KEY_ID = CREDS.access_key + AWS_SECRET_ACCESS_KEY = CREDS.secret_key + TOKEN = CREDS.token + CREDSRETURN = {'AccessKeyId':AWS_ACCESS_KEY_ID, + 'SecretAccessKey':AWS_SECRET_ACCESS_KEY, + 'SessionToken':TOKEN} +# OPENER = aws_urlopen( +# AWS_ACCESS_KEY_ID, +# AWS_SECRET_ACCESS_KEY, +# REGION, +# SERVICE, +# session_token=TOKEN, +# verify=False) +# return OPENER + + return CREDSRETURN + + +def DynamoReader(): + import json + from pprint import pformat + import boto3 + from datetime import datetime + from decimal import Decimal + import time + + LOGGER = system.util.getLogger('notify_to_dynamodb_log') + + # Get STAGE variable + roleArn = 'arn:aws:iam::533266954132:role/ignition_to_aws_scada_notify' + STAGE = 'beta' + # Make sure STAGE is valid. no gamma stage configured + if STAGE not in ['alpha', 'beta', 'gamma', 'prod']: + STAGE = 'beta' + if STAGE == 'gamma': + STAGE = 'beta' + + STAGE_CONFIG = { + 'alpha':{ + 'region' : 'us-west-2', + 'roleArn' : roleArn, + 'tableName' : 'NotificationsEntries' + }, + 'beta': { + 'region':'us-west-2', + 'roleArn': roleArn, + 'tableName' : 'NotificationsEntries' + + }, + 'prod': { + 'region':'us-west-2', + 'roleArn': roleArn, + 'tableName' : 'NotificationsEntries' + } + } + + + # create sts session to get credentials from EC2 + sts_client = boto3.client('sts') + region_name = STAGE_CONFIG.get(STAGE, 'alpha').get('region', 'us-west-2') + + assume_role_response = sts_client.assume_role( + RoleArn = STAGE_CONFIG.get(STAGE, 'beta').get('roleArn', roleArn), + RoleSessionName = 'AssumeRole' + ) + + temp_credentials = assume_role_response['Credentials'] + + # create session using the temp creds + b3_session = boto3.Session( + aws_access_key_id = temp_credentials['AccessKeyId'], + aws_secret_access_key = temp_credentials['SecretAccessKey'], + aws_session_token = temp_credentials['SessionToken'], + region_name = 'us-west-2', + ) + + # create a dynamodb session + dynamodb = b3_session.resource('dynamodb') + table = dynamodb.Table(STAGE_CONFIG.get(STAGE, 'beta').get('tableName', 'NotificationsEntries')) +# response = client.scan( +# TableName='string', +# IndexName='string', +# AttributesToGet=[ +# 'string', +# ], +# Limit=123, + + # write data directly to dynamodb table + try: + response = table.scan() +# response = table.scan(ProjectionExpression="PrimaryKey, publish, expire, title") +# TableName='NotificationsEntries', +# IndexName='publish', +## ProjectionExpression =['publish', 'expire', 'title'], +# Limit=123) +# system.perspective.print(response) + system.perspective.print('Read from NotificationsEntries DynamoDB Table Successful') + except Exception as e: + system.perspective.print('Read from NotificationsEntries DynamoDB Table NOT Successful') + system.perspective.print(str(e)) + LOGGER.error(str(e)) + + + return response + \ No newline at end of file diff --git a/ignition/script-python/notifyTool/ReadFromDynamo/resource.json b/ignition/script-python/notifyTool/ReadFromDynamo/resource.json new file mode 100644 index 0000000..237d874 --- /dev/null +++ b/ignition/script-python/notifyTool/ReadFromDynamo/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-05-07T17:12:34Z" + }, + "hintScope": 2, + "lastModificationSignature": "0bf728fdee031f6a6d1af399883757bb3355293a5ab332a5b017d709e3c607d8" + } +} \ No newline at end of file diff --git a/ignition/script-python/notifyTool/WriteToDynamo/code.py b/ignition/script-python/notifyTool/WriteToDynamo/code.py new file mode 100644 index 0000000..eed4f35 --- /dev/null +++ b/ignition/script-python/notifyTool/WriteToDynamo/code.py @@ -0,0 +1,103 @@ +from urllib2_aws4auth import aws_urlopen, Request +from urllib2 import HTTPError +from urllib import urlencode +import json +import system +import boto3 +from pprint import pformat + +REGION ='us-west-2' + + +def openSession(): + CREDS = boto3.Session().get_credentials() + AWS_ACCESS_KEY_ID = CREDS.access_key + AWS_SECRET_ACCESS_KEY = CREDS.secret_key + TOKEN = CREDS.token + CREDSRETURN = {'AccessKeyId':AWS_ACCESS_KEY_ID, + 'SecretAccessKey':AWS_SECRET_ACCESS_KEY, + 'SessionToken':TOKEN} +# OPENER = aws_urlopen( +# AWS_ACCESS_KEY_ID, +# AWS_SECRET_ACCESS_KEY, +# REGION, +# SERVICE, +# session_token=TOKEN, +# verify=False) +# return OPENER + + return CREDSRETURN + + +def DynamoWriter(payload): + import json + from pprint import pformat + import boto3 + from datetime import datetime + from decimal import Decimal + import time + + LOGGER = system.util.getLogger('notify_to_dynamodb_log') + roleArn = 'arn:aws:iam::533266954132:role/ignition_to_aws_scada_notify' + # Get STAGE variable + + STAGE = 'alpha' + # Make sure STAGE is valid. no gamma stage configured + if STAGE not in ['alpha', 'beta', 'gamma', 'prod']: + STAGE = 'beta' + if STAGE == 'gamma': + STAGE = 'beta' + + STAGE_CONFIG = { + 'alpha':{ + 'region' : 'us-west-2', + 'roleArn' : roleArn, + 'tableName' : 'NotificationsEntries' + }, + 'beta': { + 'region':'us-west-2', + 'roleArn': roleArn, + 'tableName' : 'NotificationsEntries' + + }, + 'prod': { + 'region':'us-west-2', + 'roleArn': roleArn, + 'tableName' : 'NotificationsEntries' + } + } + + + # create sts session to get credentials from EC2 + sts_client = boto3.client('sts') + region_name = STAGE_CONFIG.get(STAGE, 'beta').get('region', 'us-west-2') + + assume_role_response = sts_client.assume_role( + RoleArn = STAGE_CONFIG.get(STAGE, 'alpha').get('roleArn',roleArn), + RoleSessionName = 'AssumeRole' + ) +# arn:aws:iam::905418448057:role/ignition_to_aws_scada_notify + temp_credentials = assume_role_response['Credentials'] + + # create session using the temp creds + b3_session = boto3.Session( + aws_access_key_id = temp_credentials['AccessKeyId'], + aws_secret_access_key = temp_credentials['SecretAccessKey'], + aws_session_token = temp_credentials['SessionToken'], + region_name = 'us-west-2', + ) + + # create a dynamodb session + dynamodb = b3_session.resource('dynamodb') + table = dynamodb.Table(STAGE_CONFIG.get(STAGE, 'beta').get('tableName', 'NotificationsEntries')) + + + # write data directly to dynamodb table + try: + response = table.put_item(TableName='NotificationsEntries',Item= payload) +# system.perspective.print(response) + system.perspective.print('Write to NotificationsEntries DynamoDB Table Successful') + except Exception as e: + system.perspective.print('Write to NotificationsEntries DynamoDB Table NOT Successful') + system.perspective.print(str(e)) + LOGGER.error(str(e)) \ No newline at end of file diff --git a/ignition/script-python/notifyTool/WriteToDynamo/resource.json b/ignition/script-python/notifyTool/WriteToDynamo/resource.json new file mode 100644 index 0000000..41d0ef5 --- /dev/null +++ b/ignition/script-python/notifyTool/WriteToDynamo/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "cojonas", + "timestamp": "2024-05-07T17:12:34Z" + }, + "hintScope": 2, + "lastModificationSignature": "c411bbfc258390819ff2ff33d88fb7670f9c87e6123d16407cca432c018219d0" + } +} \ No newline at end of file diff --git a/ignition/script-python/row_builder/code.py b/ignition/script-python/row_builder/code.py new file mode 100644 index 0000000..2c04f42 --- /dev/null +++ b/ignition/script-python/row_builder/code.py @@ -0,0 +1,32 @@ +def build_row(**kwargs): + """ + Args: + Any number of arguments using kwargs key = value format. + Key StyleClass is used for adding formatting to the row. + StyleClass = {classes:value} + Returns: + A python dict with style formatting for perspective tables.. + + Raises: + KeyError: Raises an exception. + """ + row = {} + column ={} + for key,value in kwargs.items(): + if key != "StyleClass": + column[key]={"value":value} + row["value"]=column + style_class = kwargs.get("StyleClass") + row["style"] = style_class + return row + +def build_row_with_view(**kwargs): + row = {} + column ={} + for key,value in kwargs.items(): + if key != "StyleClass": + column[key]= value + row["value"]=column + style_class = kwargs.get("StyleClass") + row["style"] = style_class + return row diff --git a/ignition/script-python/row_builder/resource.json b/ignition/script-python/row_builder/resource.json new file mode 100644 index 0000000..4552604 --- /dev/null +++ b/ignition/script-python/row_builder/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2022-12-21T07:40:23Z" + }, + "lastModificationSignature": "7561ccc077472f2eee9a87ac7b46fbf9164c2c543aed768922fcb0ff954130b7", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/state/state_tables/code.py b/ignition/script-python/state/state_tables/code.py new file mode 100644 index 0000000..a188a79 --- /dev/null +++ b/ignition/script-python/state/state_tables/code.py @@ -0,0 +1,44 @@ +def get_state_table(active_states): + faulted = [] + stopped = [] + running = [] + style_class = {} + state_lookup = {1:"Faulted", 2:"Stopped", 3:"Running"} + for i in active_states: + source_id = i + time_stamp = active_states[i].get("timestamp","Unknown") + time_stamp_converted = alarms.alarm_tables.get_timestamp(time_stamp) + state = active_states[i].get("state","Unknown") + if time_stamp !=("Unknown"): + duration = alarms.alarm_tables.convert(int(time_stamp)) + else: + duration = 0 + state_list = [] + if state == 3: + state_list = running + style_class = {"classes":"State-Styles/State5"} + state = state_lookup.get(state, 6) + elif state == 2: + state_list = stopped + style_class = {"classes":"State-Styles/State2"} + state = state_lookup.get(state, 6) + elif state == 1: + state_list = faulted + style_class = {"classes":"State-Styles/State1"} + state = state_lookup.get(state, 6) + else: + pass + + state_row = row_builder.build_row_with_view(SourceId = source_id, + TimeStamp = time_stamp_converted, + Duration = duration, + State = state, + StyleClass = style_class ) + state_list.append(state_row) + + return faulted + stopped + running + + + + + diff --git a/ignition/script-python/state/state_tables/resource.json b/ignition/script-python/state/state_tables/resource.json new file mode 100644 index 0000000..13d14df --- /dev/null +++ b/ignition/script-python/state/state_tables/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-05-18T14:59:36Z" + }, + "lastModificationSignature": "28ca2cd3be7c8d95d39f209ee5d7f374636aadd767fdbca9ae719fc7910010c2", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/ignition/script-python/tags/tag_utilities/code.py b/ignition/script-python/tags/tag_utilities/code.py new file mode 100644 index 0000000..477561f --- /dev/null +++ b/ignition/script-python/tags/tag_utilities/code.py @@ -0,0 +1,38 @@ +def get_devices(fc): + tag_path = "[%s_SCADA_TAG_PROVIDER]Configuration/DetailedViews" % (fc) + tags_to_read = system.tag.readBlocking([tag_path]) + devices = system.util.jsonDecode(tags_to_read[0].value) + device_list = [] + for k,v in devices.items(): + for i in v: + device_list.append(i) + return(device_list) + +def reset_disconnect_tags(whid, device_list): + tags_to_write = [] + values_to_write = [] + for i in device_list: + tag_path = "[%s_SCADA_TAG_PROVIDER]%s/DCN" % (whid, i) + tags_to_write.append(tag_path) + values_to_write.append(0) + system.tag.writeAsync(tags_to_write, values_to_write) + +def get_tag_paths(fc): + tags_to_read = system.tag.readBlocking(["Configuration/FC"]) + fc = tags_to_read[0].value + results = system.tag.browse(path ="["+fc+"_SCADA_TAG_PROVIDER]", filter = {"recursive":True, "tagType": "Folder"}) + tag_list = results.getResults() + source_list = [] + items_to_exclude = ["Configuration", "System","_types_"] + for i in tag_list: + full_path = str(i["fullPath"]) + try: + source_id = full_path.split("]")[1] + except IndexError: + continue + if source_id not in items_to_exclude: + item_to_add = {"value": source_id, "label": source_id} + source_list.append(item_to_add) + return(source_list) + + diff --git a/ignition/script-python/tags/tag_utilities/resource.json b/ignition/script-python/tags/tag_utilities/resource.json new file mode 100644 index 0000000..c0db7b4 --- /dev/null +++ b/ignition/script-python/tags/tag_utilities/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "pllincol", + "timestamp": "2023-08-21T08:18:33Z" + }, + "lastModificationSignature": "84cf83bd1052e2d8d59a9f85a87d2dedc4eea3fe70308691716f48fe2d6f1bae", + "hintScope": 2 + } +} \ No newline at end of file diff --git a/project.json b/project.json new file mode 100644 index 0000000..b31952d --- /dev/null +++ b/project.json @@ -0,0 +1,6 @@ +{ + "title": "SCADA_PERSPECTIVE_PARENT_PROJECT_20250408075745", + "description": "", + "enabled": false, + "inheritable": true +} \ No newline at end of file