Added Filters for Buttons

This commit is contained in:
b.makharadze 2025-06-06 18:10:04 +04:00
parent ca777e9ba1
commit c329e5a3b1
6 changed files with 87 additions and 10 deletions

View File

@ -3,6 +3,7 @@
"alarm_filter": {
"magnificaiton": "x2",
"orderby": false,
"show_buttons": true,
"show_camera_jams": true,
"show_diagnostic": true,
"show_fio": true,
@ -213,13 +214,13 @@
}
},
"props": {
"address": "192.168.5.149",
"address": "127.0.0.1",
"appBar": {
"togglePosition": "hidden"
},
"device": {},
"geolocation": {},
"locale": "en-US",
"timeZoneId": "America/Los_Angeles"
"timeZoneId": "Asia/Tbilisi"
}
}

View File

@ -367,6 +367,82 @@
},
"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": "Show-Buttons",
"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_buttons"
},
"type": "property"
}
}
},
"props": {
"checkedIcon": {
"color": {
"disabled": "#FFFFFF",
"enabled": "#FFFFFF"
}
},
"style": {
"color": "#FFFFFF",
"fontFamily": "Arial",
"fontSize": 12,
"fontWeight": "bold",
"marginLeft": 10,
"marginRight": 10
},
"text": "Show Buttons"
},
"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/estops_pullChords"

View File

@ -11,7 +11,7 @@
"priority_string": "No active alarms",
"searchId": "PLC01",
"state": 5,
"status": 1,
"status": 0,
"visible_status": false
},
"params": {
@ -476,7 +476,7 @@
"meta.visible": {
"binding": {
"config": {
"path": "view.custom.display_icon"
"path": "session.custom.alarm_filter.show_buttons"
},
"type": "property"
}

View File

@ -481,7 +481,7 @@
"meta.visible": {
"binding": {
"config": {
"path": "view.custom.display_icon"
"path": "session.custom.alarm_filter.show_safety"
},
"type": "property"
}

View File

@ -430,7 +430,7 @@
"meta.visible": {
"binding": {
"config": {
"path": "session.custom.alarm_filter.show_running"
"path": "session.custom.alarm_filter.show_buttons"
},
"type": "property"
}

View File

@ -1,6 +1,6 @@
{
"custom": {
"activated": true,
"activated": false,
"alarm_message": null,
"covert_mode": true,
"disconnected": false,
@ -14,8 +14,8 @@
"show_error": false,
"show_status": true,
"state": 5,
"status": 1,
"status_string": "Started",
"status": 0,
"status_string": "Unknown",
"visible_status": false
},
"params": {
@ -594,7 +594,7 @@
"meta.visible": {
"binding": {
"config": {
"path": "view.custom.display_icon"
"path": "session.custom.alarm_filter.show_buttons"
},
"type": "property"
}