Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions plugins/EcoStruxureIT-DCE/v1/configValidation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"steps": [
{
"displayName": "Connect to Data Center Expert",
"dataStream": { "name": "rootDeviceGroup" },
"required": true,
"error": "Could not sign in to Data Center Expert. Check the Server URL is reachable from SquaredUp (or the on-premise agent), the username and password are correct, and enable Ignore certificate errors if the server uses a self-signed certificate.",
"success": "Connected to Data Center Expert."
},
{
"displayName": "Check device access",
"dataStream": { "name": "devices" },
"required": false,
"error": "Signed in, but no devices were returned. Check the user has access to at least one device group in Data Center Expert.",
"success": "Devices are accessible."
}
]
}
23 changes: 23 additions & 0 deletions plugins/EcoStruxureIT-DCE/v1/custom_types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
{
"name": "Device",
"sourceType": "Device",
"icon": "server",
"singular": "Device",
"plural": "Devices"
},
{
"name": "Device Group",
"sourceType": "Device Group",
"icon": "folder-tree",
"singular": "Device Group",
"plural": "Device Groups"
},
{
"name": "Sensor",
"sourceType": "Sensor",
"icon": "temperature-half",
"singular": "Sensor",
"plural": "Sensors"
}
]
174 changes: 174 additions & 0 deletions plugins/EcoStruxureIT-DCE/v1/dataStreams/alarmHistory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
{
"name": "alarmHistory",
"displayName": "Alarm History",
"description": "Resolved alarms that started within the timeframe, optionally filtered by device",
"tags": [
"Alerts",
"Device"
],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "v1/alarms/history",
"getArgs": [
{
"key": "startDateTime",
"value": "{{ String(new Date(timeframe.start).getTime()) }}"
},
{
"key": "endDateTime",
"value": "{{ String(new Date(timeframe.end).getTime()) }}"
}
],
"postRequestScript": "alarms.js",
"errorHandling": {
"type": "script",
"script": "errorHandling/dceError.js"
}
},
"matches": "none",
"ui": [
{
"type": "objects",
"name": "device",
"label": "Device(s) (optional)",
"matches": {
"sourceType": {
"type": "oneOf",
"values": [
"Device"
]
}
}
}
],
"metadata": [
{
"name": "description",
"displayName": "Alarm",
"shape": "string",
"role": "label"
},
{
"name": "severityText",
"displayName": "Severity",
"shape": [
"state",
{
"map": {
"error": [
"Critical",
"Failure",
"Error"
],
"warning": [
"Warning"
],
"unknown": [
"Information",
"Informational"
]
}
}
]
},
{
"name": "startTime",
"displayName": "Started",
"shape": "date",
"role": "timestamp"
},
{
"name": "resolveTime",
"displayName": "Resolved",
"shape": "date"
},
{
"name": "durationSeconds",
"displayName": "Duration",
"shape": [
"seconds",
{
"formatDuration": true
}
]
},
{
"name": "deviceName",
"displayName": "Device",
"sourceId": "deviceGuid",
"sourceType": "Device",
"objectPropertyPath": "name"
},
{
"name": "sensorName",
"displayName": "Sensor",
"sourceId": "sensorGuid",
"sourceType": "Sensor",
"objectPropertyPath": "name"
},
{
"name": "recommendedAction",
"displayName": "Recommended Action",
"shape": "string"
},
{
"name": "hidden",
"displayName": "Hidden",
"shape": "boolean"
},
{
"name": "alarmAlertSuppressed",
"displayName": "Alerts Suppressed",
"shape": "boolean"
},
{
"name": "manuallyResolvable",
"displayName": "Manually Resolvable",
"shape": "boolean",
"visible": false
},
{
"name": "commentCount",
"displayName": "Comments",
"shape": "number",
"visible": false
},
{
"name": "severity",
"displayName": "Severity Level",
"shape": "number",
"visible": false
},
{
"name": "isxcGuid",
"displayName": "Alarm ID",
"shape": "string",
"role": "id",
"visible": false
},
{
"name": "deviceGuid",
"displayName": "Device ID",
"shape": "string",
"visible": false
},
{
"name": "sensorGuid",
"displayName": "Sensor ID",
"shape": "string",
"visible": false
}
],
"defaultShaping": {
"sort": {
"by": [
[
"startTime",
"desc"
]
]
}
},
"timeframes": true
}
39 changes: 39 additions & 0 deletions plugins/EcoStruxureIT-DCE/v1/dataStreams/alarmSummary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "alarmSummary",
"displayName": "Alarm Summary",
"description": "Count of active alarms by severity for each device group (including its sub-groups)",
"tags": ["Alerts", "Device Group"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "v1/alarms/summary",
"postRequestScript": "alarmSummary.js",
"errorHandling": { "type": "script", "script": "errorHandling/dceError.js" }
},
"matches": "none",
"ui": [
{
"type": "objects",
"name": "deviceGroup",
"label": "Device group(s) (optional)",
"matches": {
"sourceType": { "type": "oneOf", "values": ["Device Group"] }
}
}
],
"metadata": [
{ "name": "deviceGroupName", "displayName": "Device Group", "sourceId": "deviceGroupGuid", "sourceType": "Device Group", "objectPropertyPath": "name", "role": "label" },
{ "name": "criticalAlarmCount", "displayName": "Critical", "shape": "number" },
{ "name": "warningAlarmCount", "displayName": "Warning", "shape": "number" },
{ "name": "infoAlarmCount", "displayName": "Informational", "shape": "number" },
{ "name": "totalAlarmCount", "displayName": "Total", "shape": "number", "role": "value" },
{
"name": "status",
"displayName": "Status",
"shape": ["state", { "map": { "success": ["success"], "warning": ["warning"], "error": ["error"] } }]
},
{ "name": "deviceGroupGuid", "displayName": "Device Group ID", "shape": "string", "role": "id", "visible": false }
],
"defaultShaping": { "sort": { "by": [["criticalAlarmCount", "desc"], ["warningAlarmCount", "desc"]] } },
"timeframes": false
}
Loading
Loading