Continued Setup
This commit is contained in:
BIN
project/dcframe1-hmi1/Core/ignition/event-scripts/data.bin
Normal file
BIN
project/dcframe1-hmi1/Core/ignition/event-scripts/data.bin
Normal file
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"scope": "G",
|
||||
"version": 1,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"data.bin"
|
||||
],
|
||||
"attributes": {
|
||||
"lastModificationSignature": "4915f24f3de693a1263d2987cdf2a675130d37eae7ec178cd9066b3e07846dc4",
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:39:10Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
project/dcframe1-hmi1/Core/ignition/global-props/data.bin
Normal file
BIN
project/dcframe1-hmi1/Core/ignition/global-props/data.bin
Normal file
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"scope": "A",
|
||||
"version": 1,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"data.bin"
|
||||
],
|
||||
"attributes": {
|
||||
"lastModificationSignature": "e0636654e57f50dbea12115d611b014427f30ef25e4f3c037c89f4625cf5becc",
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:49:02Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
SELECT
|
||||
DATE_FORMAT(CONVERT_TZ(e.EventTimeStamp, '+00:00', '-05:00'), '%m/%d/%Y %h:%i:%s %p') eventTime,
|
||||
e.SourceName as SourceName,
|
||||
e.Message as DisplayPath,
|
||||
REVERSE(INSERT(Reverse(Trim(CONCAT(CASE WHEN e.Active <> 0 THEN "Active, " ELSE "" END, CASE WHEN e.Acked <> 0 THEN "Acknowledged, " ELSE "" END, CASE WHEN e.Suppressed <> 0 THEN "Suppressed, " ELSE "" END, CASE WHEN e.Shelved <> 0 THEN "Shelved, " ELSE "" END))), 1, 1, "")) as States,
|
||||
CASE WHEN e.Priority = 0 THEN 'Diagnostic' WHEN e.Priority = 1 THEN 'Low' WHEN e.Priority = 2 THEN 'Medium' WHEN e.Priority = 3 THEN 'High' WHEN e.Priority = 4 THEN 'Critical' ELSE '' END Priority,
|
||||
e.Tag1Value eventValue,
|
||||
e.PersonID as ackUser
|
||||
FROM
|
||||
allevent e
|
||||
WHERE
|
||||
e.EventTimeStamp BETWEEN :startDate AND :endDate AND Priority BETWEEN :minPriority AND :maxPriority AND
|
||||
((:active AND e.Active = True) OR (:ack AND e.Acked = True))
|
||||
ORDER BY e.EventTimeStamp DESC
|
||||
LIMIT :limit
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"scope": "DG",
|
||||
"version": 2,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"query.sql"
|
||||
],
|
||||
"attributes": {
|
||||
"useMaxReturnSize": false,
|
||||
"autoBatchEnabled": false,
|
||||
"fallbackValue": "",
|
||||
"maxReturnSize": 100,
|
||||
"cacheUnit": "SEC",
|
||||
"type": "Query",
|
||||
"enabled": true,
|
||||
"cacheAmount": 1,
|
||||
"cacheEnabled": false,
|
||||
"database": "",
|
||||
"fallbackEnabled": false,
|
||||
"lastModificationSignature": "37fb1cc3397bcab6919db02c45977d1896722478e26671373824f5f6d6b1672b",
|
||||
"permissions": [
|
||||
{
|
||||
"zone": "",
|
||||
"role": ""
|
||||
}
|
||||
],
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:39:10Z"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "startDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "endDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "active",
|
||||
"sqlType": 6
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "clear",
|
||||
"sqlType": 6
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "ack",
|
||||
"sqlType": 6
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "limit",
|
||||
"sqlType": 2
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "minPriority",
|
||||
"sqlType": 2
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "maxPriority",
|
||||
"sqlType": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
SELECT
|
||||
DATE_FORMAT(e.eventTime, '%m/%d/%Y %h:%i:%s %p') eventTime,
|
||||
e.displayPath,
|
||||
SUBSTRING_INDEX(source, '/alm:', -1) name,
|
||||
e.eventType,
|
||||
CASE WHEN e.priority = 0 THEN 'Diagnostic' WHEN e.priority = 1 THEN 'Low' WHEN e.priority = 2 THEN 'Medium' WHEN e.priority = 3 THEN 'High' WHEN e.priority = 4 THEN 'Critical' ELSE '' END priority,
|
||||
COALESCE(COALESCE(COALESCE(d.intvalue, d.floatvalue), d.strvalue), '') eventValue,
|
||||
COALESCE(ack.strvalue, '') ackUser
|
||||
FROM
|
||||
alarm_events e
|
||||
LEFT JOIN alarm_event_data d ON d.id = e.id AND d.propname = 'eventValue'
|
||||
LEFT JOIN alarm_event_data ack ON ack.id = e.id AND ack.propname = 'ackUser'
|
||||
WHERE
|
||||
eventtime BETWEEN :startDate AND :endDate AND priority BETWEEN :minPriority AND :maxPriority AND
|
||||
((:active AND e.eventtype = 0) OR (:clear AND e.eventtype = 1) OR (:ack AND e.eventtype = 2))
|
||||
ORDER BY
|
||||
e.eventTime DESC
|
||||
LIMIT :limit
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"scope": "DG",
|
||||
"version": 2,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"query.sql"
|
||||
],
|
||||
"attributes": {
|
||||
"useMaxReturnSize": false,
|
||||
"autoBatchEnabled": false,
|
||||
"fallbackValue": "",
|
||||
"maxReturnSize": 100,
|
||||
"cacheUnit": "SEC",
|
||||
"type": "Query",
|
||||
"enabled": true,
|
||||
"cacheAmount": 1,
|
||||
"cacheEnabled": false,
|
||||
"database": "",
|
||||
"fallbackEnabled": false,
|
||||
"lastModificationSignature": "340378e09d18ae2e4dd37b9c252822113a192b186683064558c74ac671698700",
|
||||
"permissions": [
|
||||
{
|
||||
"zone": "",
|
||||
"role": ""
|
||||
}
|
||||
],
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:39:10Z"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "startDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "endDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "active",
|
||||
"sqlType": 6
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "clear",
|
||||
"sqlType": 6
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "ack",
|
||||
"sqlType": 6
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "limit",
|
||||
"sqlType": 2
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "minPriority",
|
||||
"sqlType": 2
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "maxPriority",
|
||||
"sqlType": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
SELECT
|
||||
(CASE a.priority
|
||||
WHEN 1 THEN "Low"
|
||||
WHEN 2 THEN "Medium"
|
||||
WHEN 3 THEN "High"
|
||||
WHEN 4 THEN "Critical"
|
||||
ELSE "Diagnostic"
|
||||
END) as "Priority",
|
||||
SUM(CASE WHEN c.eventtime IS NULL THEN 1 ELSE 0 END) active,
|
||||
SUM(CASE WHEN c.eventtime IS NULL THEN 0 ELSE 1 END) cleared,
|
||||
SUM(CASE WHEN k.eventtime IS NULL THEN 1 ELSE 0 END) unacknowledged,
|
||||
COUNT(*) total,
|
||||
AVG(CASE WHEN k.eventtime IS NULL THEN 0 ELSE TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(k.eventtime, CURRENT_TIMESTAMP)) END) acknowledgeTime,
|
||||
AVG(CASE WHEN c.eventtime IS NULL THEN 0 ELSE TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP)) END) clearTime,
|
||||
SUM(TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP))) totalTime
|
||||
FROM
|
||||
alarm_events a
|
||||
LEFT JOIN alarm_events c ON c.eventid = a.eventid AND c.eventtype = 1
|
||||
LEFT JOIN alarm_events k ON k.eventid = a.eventid AND k.eventtype = 2
|
||||
WHERE
|
||||
a.eventtime
|
||||
BETWEEN :startDate AND :endDate
|
||||
AND a.eventtype = 0
|
||||
GROUP BY
|
||||
a.priority
|
||||
ORDER BY
|
||||
a.priority ASC
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"scope": "DG",
|
||||
"version": 2,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"query.sql"
|
||||
],
|
||||
"attributes": {
|
||||
"useMaxReturnSize": false,
|
||||
"autoBatchEnabled": false,
|
||||
"fallbackValue": "",
|
||||
"maxReturnSize": 100,
|
||||
"cacheUnit": "SEC",
|
||||
"type": "Query",
|
||||
"enabled": true,
|
||||
"cacheAmount": 1,
|
||||
"cacheEnabled": false,
|
||||
"database": "",
|
||||
"fallbackEnabled": false,
|
||||
"lastModificationSignature": "42dd33c879db17f0e97a2a368ab2edabd5e05ac606f97563030207a183350c9a",
|
||||
"permissions": [
|
||||
{
|
||||
"zone": "",
|
||||
"role": ""
|
||||
}
|
||||
],
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:39:10Z"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "startDate",
|
||||
"sqlType": 7
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "endDate",
|
||||
"sqlType": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
SELECT
|
||||
a.priority,
|
||||
SUM(CASE WHEN c.eventtime IS NULL THEN 1 ELSE 0 END) active,
|
||||
SUM(CASE WHEN c.eventtime IS NULL THEN 0 ELSE 1 END) cleared,
|
||||
SUM(CASE WHEN k.eventtime IS NULL THEN 1 ELSE 0 END) unacknowledged,
|
||||
COUNT(*) total,
|
||||
AVG(CASE WHEN k.eventtime IS NULL THEN 0 ELSE TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(k.eventtime, CURRENT_TIMESTAMP)) END) acknowledgeTime,
|
||||
AVG(CASE WHEN c.eventtime IS NULL THEN 0 ELSE TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP)) END) clearTime,
|
||||
SUM(TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP))) totalTime
|
||||
FROM
|
||||
alarm_events a
|
||||
LEFT JOIN alarm_events c ON c.eventid = a.eventid AND c.eventtype = 1
|
||||
LEFT JOIN alarm_events k ON k.eventid = a.eventid AND k.eventtype = 2
|
||||
WHERE
|
||||
a.eventtime BETWEEN :startDate AND :endDate AND a.eventtype = 0
|
||||
GROUP BY
|
||||
a.priority
|
||||
ORDER BY
|
||||
a.priority ASC
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"scope": "DG",
|
||||
"version": 2,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"query.sql"
|
||||
],
|
||||
"attributes": {
|
||||
"useMaxReturnSize": false,
|
||||
"autoBatchEnabled": false,
|
||||
"fallbackValue": "",
|
||||
"maxReturnSize": 100,
|
||||
"cacheUnit": "SEC",
|
||||
"type": "Query",
|
||||
"enabled": true,
|
||||
"cacheAmount": 1,
|
||||
"cacheEnabled": false,
|
||||
"database": "",
|
||||
"fallbackEnabled": false,
|
||||
"lastModificationSignature": "1181d784ffa7fad34e065fed7f3facd2bf0f43f0da837d1c7ec1e43637bb3bc6",
|
||||
"permissions": [
|
||||
{
|
||||
"zone": "",
|
||||
"role": ""
|
||||
}
|
||||
],
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:39:10Z"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "startDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "endDate",
|
||||
"sqlType": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
SELECT
|
||||
HOUR(a.eventtime) label,
|
||||
COUNT(*) total,
|
||||
SUM(TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP))) duration
|
||||
FROM
|
||||
alarm_events a
|
||||
LEFT JOIN alarm_events c ON c.eventid = a.eventid AND c.eventtype = 1
|
||||
WHERE
|
||||
a.eventtime BETWEEN :startDate AND :endDate AND a.eventtype = 0
|
||||
GROUP BY
|
||||
HOUR(a.eventtime)
|
||||
ORDER BY
|
||||
HOUR(a.eventtime) ASC
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"scope": "DG",
|
||||
"version": 2,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"query.sql"
|
||||
],
|
||||
"attributes": {
|
||||
"useMaxReturnSize": false,
|
||||
"autoBatchEnabled": false,
|
||||
"fallbackValue": "",
|
||||
"maxReturnSize": 100,
|
||||
"cacheUnit": "SEC",
|
||||
"type": "Query",
|
||||
"enabled": true,
|
||||
"cacheAmount": 1,
|
||||
"cacheEnabled": false,
|
||||
"database": "",
|
||||
"fallbackEnabled": false,
|
||||
"lastModificationSignature": "19b2eab0c03356a913b1442e185d1f6c6c71b89b541b2a3fb3413fd448aa0901",
|
||||
"permissions": [
|
||||
{
|
||||
"zone": "",
|
||||
"role": ""
|
||||
}
|
||||
],
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:39:09Z"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "startDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "endDate",
|
||||
"sqlType": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
SELECT
|
||||
CASE WHEN a.displaypath = '' THEN 'Unknown' ELSE a.displaypath END displaypath,
|
||||
SUM(TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP))) duration
|
||||
FROM
|
||||
alarm_events a
|
||||
LEFT JOIN alarm_events c ON c.eventid = a.eventid AND c.eventtype = 1
|
||||
WHERE
|
||||
a.eventtime BETWEEN :startDate AND :endDate AND a.eventtype = 0
|
||||
GROUP BY
|
||||
a.displaypath
|
||||
ORDER BY
|
||||
duration DESC, a.displaypath ASC
|
||||
LIMIT :limit
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"scope": "DG",
|
||||
"version": 2,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"query.sql"
|
||||
],
|
||||
"attributes": {
|
||||
"useMaxReturnSize": false,
|
||||
"autoBatchEnabled": false,
|
||||
"fallbackValue": "",
|
||||
"maxReturnSize": 100,
|
||||
"cacheUnit": "SEC",
|
||||
"type": "Query",
|
||||
"enabled": true,
|
||||
"cacheAmount": 1,
|
||||
"cacheEnabled": false,
|
||||
"database": "",
|
||||
"fallbackEnabled": false,
|
||||
"lastModificationSignature": "e3f9129ad9bd3cdd0d5858d9b37c76aecaed9ff6a96d59a644a339a1fd01aec9",
|
||||
"permissions": [
|
||||
{
|
||||
"zone": "",
|
||||
"role": ""
|
||||
}
|
||||
],
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:39:10Z"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "startDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "endDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "limit",
|
||||
"sqlType": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
SELECT
|
||||
CASE WHEN a.displaypath = '' THEN 'Unknown' ELSE a.displaypath END displaypath,
|
||||
COUNT(*) cnt
|
||||
FROM
|
||||
alarm_events a
|
||||
WHERE
|
||||
a.eventtime BETWEEN :startDate AND :endDate AND a.eventtype = 0
|
||||
GROUP BY
|
||||
a.displaypath
|
||||
ORDER BY
|
||||
cnt DESC, a.displaypath ASC
|
||||
LIMIT :limit
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"scope": "DG",
|
||||
"version": 2,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"query.sql"
|
||||
],
|
||||
"attributes": {
|
||||
"useMaxReturnSize": false,
|
||||
"autoBatchEnabled": false,
|
||||
"fallbackValue": "",
|
||||
"maxReturnSize": 100,
|
||||
"cacheUnit": "SEC",
|
||||
"type": "Query",
|
||||
"enabled": true,
|
||||
"cacheAmount": 1,
|
||||
"cacheEnabled": false,
|
||||
"database": "",
|
||||
"fallbackEnabled": false,
|
||||
"lastModificationSignature": "9d1d4b1c60d608eee1beecc92dc694b8442cee78174daba9cecddbff6e5b52db",
|
||||
"permissions": [
|
||||
{
|
||||
"zone": "",
|
||||
"role": ""
|
||||
}
|
||||
],
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:39:10Z"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "startDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "endDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "limit",
|
||||
"sqlType": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
SELECT
|
||||
CASE WHEN a.displaypath = '' THEN 'Unknown' ELSE a.displaypath END displaypath,
|
||||
SUM(TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP))) total
|
||||
FROM
|
||||
alarm_events a
|
||||
LEFT JOIN alarm_events c ON c.eventid = a.eventid AND c.eventtype = 1
|
||||
WHERE
|
||||
a.eventtime BETWEEN :startDate AND :endDate AND a.eventtype = 0
|
||||
GROUP BY
|
||||
a.displaypath
|
||||
ORDER BY total DESC
|
||||
LIMIT 1
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"scope": "DG",
|
||||
"version": 2,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"query.sql"
|
||||
],
|
||||
"attributes": {
|
||||
"useMaxReturnSize": false,
|
||||
"autoBatchEnabled": false,
|
||||
"fallbackValue": "",
|
||||
"maxReturnSize": 100,
|
||||
"cacheUnit": "SEC",
|
||||
"type": "Query",
|
||||
"enabled": true,
|
||||
"cacheAmount": 1,
|
||||
"cacheEnabled": false,
|
||||
"database": "",
|
||||
"fallbackEnabled": false,
|
||||
"lastModificationSignature": "7f21d69c6d3e5b30e52bfa459986e75e506189b6e0961afef6b217ef63253be7",
|
||||
"permissions": [
|
||||
{
|
||||
"zone": "",
|
||||
"role": ""
|
||||
}
|
||||
],
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:39:10Z"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "startDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "endDate",
|
||||
"sqlType": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
SELECT
|
||||
CASE WHEN a.displaypath = '' THEN 'Unknown' ELSE a.displaypath END displaypath,
|
||||
COUNT(*) total
|
||||
FROM
|
||||
alarm_events a
|
||||
WHERE
|
||||
a.eventtime BETWEEN :startDate AND :endDate AND a.eventtype = 0
|
||||
GROUP BY
|
||||
a.displaypath
|
||||
ORDER BY total DESC
|
||||
LIMIT 1
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"scope": "DG",
|
||||
"version": 2,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"query.sql"
|
||||
],
|
||||
"attributes": {
|
||||
"useMaxReturnSize": false,
|
||||
"autoBatchEnabled": false,
|
||||
"fallbackValue": "",
|
||||
"maxReturnSize": 100,
|
||||
"cacheUnit": "SEC",
|
||||
"type": "Query",
|
||||
"enabled": true,
|
||||
"cacheAmount": 1,
|
||||
"cacheEnabled": false,
|
||||
"database": "",
|
||||
"fallbackEnabled": false,
|
||||
"lastModificationSignature": "6a0d458d37c835ed5aabdd20568c8356396b3857d80909ff823d321b50922001",
|
||||
"permissions": [
|
||||
{
|
||||
"zone": "",
|
||||
"role": ""
|
||||
}
|
||||
],
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:39:10Z"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "startDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "endDate",
|
||||
"sqlType": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
SELECT
|
||||
audit_events_id,
|
||||
TO_CHAR(event_timestamp, 'FMМM/FMDD/YY FMHH12:MI:SS AM') event_timestamp,
|
||||
actor,
|
||||
action,
|
||||
action_target,
|
||||
action_value,
|
||||
actor_host,
|
||||
status_code,
|
||||
originating_system,
|
||||
originating_context
|
||||
FROM
|
||||
audit_events
|
||||
WHERE
|
||||
event_timestamp BETWEEN :startDate AND :endDate AND
|
||||
(:search = '' OR (:search != '' AND (actor LIKE :search OR action LIKE :search OR action_target LIKE :search)))
|
||||
ORDER BY
|
||||
audit_events_id DESC
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"scope": "DG",
|
||||
"version": 2,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"query.sql"
|
||||
],
|
||||
"attributes": {
|
||||
"useMaxReturnSize": false,
|
||||
"autoBatchEnabled": false,
|
||||
"fallbackValue": "",
|
||||
"maxReturnSize": 100,
|
||||
"cacheUnit": "SEC",
|
||||
"type": "Query",
|
||||
"enabled": true,
|
||||
"cacheAmount": 1,
|
||||
"cacheEnabled": false,
|
||||
"database": "dcframe-db",
|
||||
"fallbackEnabled": false,
|
||||
"lastModificationSignature": "fe98a4bc761e86db97a3ad23e67e090bd580c5d65446829b6cdc0aee7c5518bb",
|
||||
"permissions": [
|
||||
{
|
||||
"zone": "",
|
||||
"role": ""
|
||||
}
|
||||
],
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:55:32Z"
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "startDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "endDate",
|
||||
"sqlType": 8
|
||||
},
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": "search",
|
||||
"sqlType": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
def verify(roles, security_level):
|
||||
verification_result = False
|
||||
|
||||
authentication_dictionary = {
|
||||
"securityDeviceConfigHMI": ["Administrator", "Maintenance", "Operations Supervisor",],
|
||||
"securityConfigSecurity": ["Administrator", "Maintenance", "Operations Supervisor",],
|
||||
"securityDeviceConfigBehavior": ["Administrator", "Maintenance", "Operations Supervisor",],
|
||||
"securityDeviceConfigTimers": ["Administrator", "Maintenance", "Operations Supervisor", "Operator"],
|
||||
"securityDeviceConfigFailTimers": ["Administrator", "Maintenance", "Operations Supervisor", "Operator"],
|
||||
"securityBypassFeedback": ["Administrator", "Maintenance", "Operations Supervisor",],
|
||||
"securityBypassInterlocks": ["Administrator", "Maintenance", "Operations Supervisor",],
|
||||
"securityDeviceConfigLimits": ["Administrator", "Maintenance", "Operations Supervisor", "Operator"],
|
||||
"securityDeviceConfigThresholds": ["Administrator", "Maintenance", "Operations Supervisor", "Operator"],
|
||||
"securityEnableSimulation": ["Administrator", "Maintenance", ],
|
||||
"securityEnterOperSettings": ["Administrator", "Maintenance", "Operations Supervisor", "Operator"],
|
||||
"securityOperateEquipment": ["Administrator", "Maintenance", "Operations Supervisor", "Operator"],
|
||||
"securityOverrideInputs": ["Administrator", "Maintenance", "Operations Supervisor",],
|
||||
"securityAlarmConfig": ["Administrator", "Maintenance", "Operations Supervisor",],
|
||||
"securityAlarmDisable": ["Administrator", "Maintenance", "Operations Supervisor",],
|
||||
"securityAlarmShelve": ["Administrator", "Maintenance", "Operations Supervisor", "Operator"],
|
||||
"securityCmdSrcMaint": ["Administrator", "Maintenance", ],
|
||||
"securityCmdSrcOperProg": ["Administrator", "Maintenance", "Operations Supervisor", "Operator"],
|
||||
"securityCmdSrcOutOfService": ["Administrator", "Maintenance", "Operations Supervisor",],
|
||||
"securityDeviceConfigTuning": ["Administrator", "Maintenance", "Operations Supervisor",],
|
||||
"userHasBasic": ["Administrator", "Maintenance", "Operations Supervisor", "Operator"],
|
||||
"userHasAdvanced": ["Administrator", "Maintenance", "Operations Supervisor",],
|
||||
}
|
||||
|
||||
try:
|
||||
level_roles = authentication_dictionary[security_level]
|
||||
string = ""
|
||||
|
||||
for role in roles:
|
||||
if role in level_roles:
|
||||
verification_result = True
|
||||
|
||||
except:
|
||||
verification_result = False
|
||||
|
||||
return verification_result
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"scope": "A",
|
||||
"version": 1,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"code.py"
|
||||
],
|
||||
"attributes": {
|
||||
"lastModificationSignature": "44718e8438f3d36d5d6463553d7d4dc03ff9d324d3b2c5a86952dc43f1284fe8",
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:39:10Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
# Encapsulation of system.perspective.openPopup
|
||||
# Use on button event script - Non-Resizable popup with close Icon.
|
||||
# This allows for feeding the path of the view and the params for the view.
|
||||
|
||||
def popupBtn(path, popUpParams, popUpTitle, showClose, resize):
|
||||
import random
|
||||
# Generate Page ID (random from 1 to 100)
|
||||
pgID = str(random.randint(1,100))
|
||||
popUpParams = dict(popUpParams)
|
||||
system.perspective.openPopup(pgID, path, params = popUpParams, title = popUpTitle, showCloseIcon = showClose, resizable = resize)
|
||||
|
||||
def hoverLblOpn(path, popUpParams, popUpTitle, showClose, resize, lblPos):
|
||||
pgID = "hoverLbl"
|
||||
popUpParams = dict(popUpParams)
|
||||
system.perspective.openPopup(pgID, path, params = popUpParams, title = popUpTitle, showCloseIcon = showClose, resizable = resize, position = lblPos)
|
||||
|
||||
def hoverLblCls():
|
||||
system.perspective.closePopup("hoverLbl")
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"scope": "A",
|
||||
"version": 1,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"code.py"
|
||||
],
|
||||
"attributes": {
|
||||
"lastModificationSignature": "b98496172f63149edff6bbf832da1967f01be0a33c2fe4b7b57b2d004c4b2717",
|
||||
"lastModification": {
|
||||
"actor": "admin",
|
||||
"timestamp": "2025-11-05T22:39:10Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user