made error popup, showing it whenever connection is lost. added database connection status on the header
This commit is contained in:
parent
f2faa4e57b
commit
5092681d92
@ -0,0 +1,124 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 208,
|
||||
"width": 450
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 360,
|
||||
"x": 90
|
||||
},
|
||||
"props": {
|
||||
"text": "Database Error",
|
||||
"textStyle": {
|
||||
"color": "#FF0000",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": "22px"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Icon"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 90
|
||||
},
|
||||
"props": {
|
||||
"color": "#FF1D00",
|
||||
"path": "material/error"
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"props": {
|
||||
"text": "An error occurred while connecting to the database."
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"props": {
|
||||
"text": "Network or database connection failed. Check your settings or contact IT support."
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"height": 99,
|
||||
"width": 450,
|
||||
"y": 48
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "flex-start",
|
||||
"direction": "column",
|
||||
"justify": "space-around",
|
||||
"style": {
|
||||
"paddingLeft": 5,
|
||||
"paddingRight": 5
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.closePopup(\"\")"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Button"
|
||||
},
|
||||
"position": {
|
||||
"height": 34,
|
||||
"width": 206,
|
||||
"x": 106,
|
||||
"y": 158
|
||||
},
|
||||
"props": {
|
||||
"primary": false,
|
||||
"text": "Dismiss"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -6,9 +6,9 @@
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1745914528657
|
||||
1747671282220
|
||||
],
|
||||
"$ts": 1745914528656
|
||||
"$ts": 1747671282219
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -442,6 +442,56 @@
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Icon_1",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"text": "Database Connection Status"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{[System]Gateway/Database/MariaDB/Available}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#FF0000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "#47FF47"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "#FF0000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": " db_tag_path \u003d \"[System]Gateway/Database/MariaDB/Available\"\n\t\n if not (system.tag.readBlocking([db_tag_path])[0].value):\n \tsystem.perspective.openPopup(\"errorPopup\",\u0027PopUp-Views/ErrorPopup\u0027)\n\t"
|
||||
},
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"color": "#47FF47",
|
||||
"path": "material/table_chart"
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"hasDelegate": true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user