From bb0e64286ec9d7eaaba67bc49f3f864c1cd42170 Mon Sep 17 00:00:00 2001 From: "gigi.mamaladze" Date: Sun, 19 Oct 2025 18:46:23 +0400 Subject: [PATCH] Updated Dumpers statistics --- .../views/Windows/Statistics/view.json | 1383 ++++++++++++++++- .../Dumper/Dumper Lane Count Graph/query.sql | 28 + .../Dumper Lane Count Graph/resource.json | 45 + .../Dumper Lane Percentage Graph/query.sql | 29 + .../resource.json | 45 + .../Dumper/Dumper Lane Rate Graph/query.sql | 16 + .../Dumper Lane Rate Graph/resource.json | 45 + 7 files changed, 1538 insertions(+), 53 deletions(-) create mode 100644 CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Count Graph/query.sql create mode 100644 CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Count Graph/resource.json create mode 100644 CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Percentage Graph/query.sql create mode 100644 CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Percentage Graph/resource.json create mode 100644 CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Rate Graph/query.sql create mode 100644 CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Rate Graph/resource.json diff --git a/CNO8_SCADA/com.inductiveautomation.perspective/views/Windows/Statistics/view.json b/CNO8_SCADA/com.inductiveautomation.perspective/views/Windows/Statistics/view.json index c98d98c..92104ea 100644 --- a/CNO8_SCADA/com.inductiveautomation.perspective/views/Windows/Statistics/view.json +++ b/CNO8_SCADA/com.inductiveautomation.perspective/views/Windows/Statistics/view.json @@ -1125,7 +1125,7 @@ "children": [ { "meta": { - "name": "Dumper cycles Count" + "name": "Dumper Cycles Count" }, "position": { "basis": "50%" @@ -1724,7 +1724,7 @@ }, { "meta": { - "name": "Dumper cycles Percentage" + "name": "Dumper Cycles Percentage" }, "position": { "basis": "50%" @@ -2323,7 +2323,7 @@ }, { "meta": { - "name": "Dumper cycles Rate" + "name": "Dumper Cycles Rate" }, "position": { "basis": "50%" @@ -2852,44 +2852,72 @@ }, { "meta": { - "name": "Dumper_cycles" + "name": "Dumper Cycles Count Graph" }, "position": { "basis": "50%" }, - "props": { - "dataSources": { - "example": [ - { - "Hour": "ULC1", - "ULC1": "29.41%", - "ULC2": 0, - "ULC3": 0, - "ULC4": 0 + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" }, - { - "Hour": "ULC2", - "ULC1": 0, - "ULC2": "23.53%", - "ULC3": 0, - "ULC4": 0 - }, - { - "Hour": "ULC3", - "ULC1": 0, - "ULC2": 0, - "ULC3": "23.53%", - "ULC4": 0 - }, - { - "Hour": "ULC4", - "ULC1": 0, - "ULC2": 0, - "ULC3": 0, - "ULC4": "23.53%" - } - ] + "transforms": [ + { + "fallback": false, + "inputType": "scalar", + "mappings": [ + { + "input": "Count", + "output": true + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } }, + "position.display": { + "binding": { + "config": { + "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" + }, + "transforms": [ + { + "fallback": false, + "inputType": "scalar", + "mappings": [ + { + "input": "Count", + "output": true + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.dataSources.data": { + "binding": { + "config": { + "parameters": { + "endtime": "{..../Period_not_Global_0/EndTime.props.value}", + "starttime": "{..../Period_not_Global_0/StartTime.props.value}" + }, + "queryPath": "Dumper/Dumper Lane Count Graph", + "returnFormat": "json" + }, + "type": "query" + } + } + }, + "props": { + "dataSources": {}, "legend": { "enabled": false }, @@ -2976,8 +3004,8 @@ } }, "data": { - "source": "example", - "x": "Hour", + "source": "data", + "x": "Dumper", "y": "ULC1" }, "defaultState": { @@ -3150,8 +3178,8 @@ "text": "ULC1 (#): [bold]{valueY}[/]" }, "visible": true, - "xAxis": "Hour", - "yAxis": "Total", + "xAxis": "Dumper", + "yAxis": "Dump_Count", "zIndex": 0 }, { @@ -3236,8 +3264,8 @@ } }, "data": { - "source": "example", - "x": "Hour", + "source": "data", + "x": "Dumper", "y": "ULC2" }, "defaultState": { @@ -3410,8 +3438,8 @@ "text": "ULC2 (#): [bold]{valueY}[/]" }, "visible": true, - "xAxis": "Hour", - "yAxis": "Total", + "xAxis": "Dumper", + "yAxis": "Dump_Count", "zIndex": 0 }, { @@ -3496,8 +3524,8 @@ } }, "data": { - "source": "example", - "x": "Hour", + "source": "data", + "x": "Dumper", "y": "ULC3" }, "defaultState": { @@ -3670,8 +3698,8 @@ "text": "ULC3 (#): [bold]{valueY}[/]" }, "visible": true, - "xAxis": "Hour", - "yAxis": "Total", + "xAxis": "Dumper", + "yAxis": "Dump_Count", "zIndex": 0 }, { @@ -3756,8 +3784,8 @@ } }, "data": { - "source": "example", - "x": "Hour", + "source": "data", + "x": "Dumper", "y": "ULC4" }, "defaultState": { @@ -3878,8 +3906,8 @@ "text": "ULC4 (#): [bold]{valueY}[/]" }, "visible": true, - "xAxis": "Hour", - "yAxis": "Total", + "xAxis": "Dumper", + "yAxis": "Dump_Count", "zIndex": 0 } ], @@ -3942,7 +3970,7 @@ "enabled": true, "text": "" }, - "name": "Hour", + "name": "Dumper", "render": "category", "tooltip": { "background": { @@ -4031,7 +4059,7 @@ "enabled": true, "text": "" }, - "name": "Total", + "name": "Dump_Count", "render": "value", "tooltip": { "background": { @@ -4063,6 +4091,1255 @@ ] }, "type": "ia.chart.xy" + }, + { + "meta": { + "name": "Dumper Cycles Percentage Graph" + }, + "position": { + "basis": "50%" + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" + }, + "transforms": [ + { + "fallback": false, + "inputType": "scalar", + "mappings": [ + { + "input": "Percentage", + "output": true + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "position.display": { + "binding": { + "config": { + "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" + }, + "transforms": [ + { + "fallback": false, + "inputType": "scalar", + "mappings": [ + { + "input": "Percentage", + "output": true + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.dataSources.data": { + "binding": { + "config": { + "parameters": { + "endtime": "{..../Period_not_Global_0/EndTime.props.value}", + "starttime": "{..../Period_not_Global_0/StartTime.props.value}" + }, + "queryPath": "Dumper/Dumper Lane Percentage Graph", + "returnFormat": "json" + }, + "type": "query" + } + } + }, + "props": { + "dataSources": {}, + "legend": { + "enabled": false + }, + "series": [ + { + "candlestick": { + "appearance": { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "fill": { + "color": "", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": "", + "min": "" + }, + "stacked": false, + "stroke": { + "color": "", + "opacity": 1, + "width": 1 + } + }, + "high": { + "x": "", + "y": "" + }, + "low": { + "x": "", + "y": "" + }, + "open": { + "x": "", + "y": "" + } + }, + "column": { + "appearance": { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "fill": { + "color": "", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": "", + "min": "" + }, + "height": null, + "stacked": true, + "stroke": { + "color": "", + "opacity": 1, + "width": 1 + }, + "width": null + }, + "open": { + "x": "", + "y": "" + } + }, + "data": { + "source": "data", + "x": "Dumper", + "y": "ULC1" + }, + "defaultState": { + "visible": true + }, + "hiddenInLegend": false, + "label": { + "text": "" + }, + "line": { + "appearance": { + "bullets": [ + { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "rotation": "", + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "enabled": false, + "fill": { + "color": "", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": 100, + "min": 2 + }, + "height": 10, + "label": { + "position": { + "dx": 0, + "dy": 0 + }, + "text": "{value}" + }, + "render": "circle", + "rotation": 0, + "stroke": { + "color": "", + "opacity": 1, + "width": 1 + }, + "tooltip": { + "background": { + "color": "", + "opacity": 1 + }, + "cornerRadius": 3, + "enabled": true, + "pointerLength": 4, + "text": "{name}: [bold]{valueY}[/]" + }, + "width": 10 + } + ], + "connect": true, + "fill": { + "color": "", + "opacity": 0 + }, + "minDistance": 0.5, + "stroke": { + "color": "", + "dashArray": "", + "opacity": 1, + "width": 3 + }, + "tensionX": 1, + "tensionY": 1 + }, + "open": { + "x": "", + "y": "" + } + }, + "name": "ULC1", + "render": "column", + "stepLine": { + "appearance": { + "bullets": [ + { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "rotation": "", + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "enabled": true, + "fill": { + "color": "", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": 100, + "min": 2 + }, + "height": 10, + "label": { + "position": { + "dx": 0, + "dy": 0 + }, + "text": "{value}" + }, + "render": "circle", + "rotation": 0, + "stroke": { + "color": "", + "opacity": 1, + "width": 1 + }, + "tooltip": { + "background": { + "color": "", + "opacity": 1 + }, + "cornerRadius": 3, + "enabled": true, + "pointerLength": 4, + "text": "{name}: [bold]{valueY}[/]" + }, + "width": 10 + } + ], + "connect": true, + "fill": { + "color": "", + "opacity": 0 + }, + "minDistance": 0.5, + "stroke": { + "color": "", + "dashArray": "", + "opacity": 1, + "width": 3 + }, + "tensionX": 1, + "tensionY": 1 + }, + "open": { + "x": "", + "y": "" + } + }, + "tooltip": { + "background": { + "color": "", + "opacity": 1 + }, + "cornerRadius": 3, + "enabled": true, + "pointerLength": 4, + "text": "ULC1 (%): [bold]{valueY}[/]" + }, + "visible": true, + "xAxis": "Dumper", + "yAxis": "Dump_Count", + "zIndex": 0 + }, + { + "candlestick": { + "appearance": { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "fill": { + "color": "", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": "", + "min": "" + }, + "stacked": false, + "stroke": { + "color": "", + "opacity": 1, + "width": 1 + } + }, + "high": { + "x": "", + "y": "" + }, + "low": { + "x": "", + "y": "" + }, + "open": { + "x": "", + "y": "" + } + }, + "column": { + "appearance": { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "fill": { + "color": "#FF0000", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": "", + "min": "" + }, + "height": null, + "stacked": true, + "stroke": { + "color": "#FF0000", + "opacity": 1, + "width": 1 + }, + "width": null + }, + "open": { + "x": "", + "y": "" + } + }, + "data": { + "source": "data", + "x": "Dumper", + "y": "ULC2" + }, + "defaultState": { + "visible": true + }, + "hiddenInLegend": false, + "label": { + "text": "" + }, + "line": { + "appearance": { + "bullets": [ + { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "rotation": "", + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "enabled": false, + "fill": { + "color": "", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": 100, + "min": 2 + }, + "height": 10, + "label": { + "position": { + "dx": 0, + "dy": 0 + }, + "text": "{value}" + }, + "render": "circle", + "rotation": 0, + "stroke": { + "color": "", + "opacity": 1, + "width": 1 + }, + "tooltip": { + "background": { + "color": "", + "opacity": 1 + }, + "cornerRadius": 3, + "enabled": true, + "pointerLength": 4, + "text": "{name}: [bold]{valueY}[/]" + }, + "width": 10 + } + ], + "connect": true, + "fill": { + "color": "", + "opacity": 0 + }, + "minDistance": 0.5, + "stroke": { + "color": "", + "dashArray": "", + "opacity": 1, + "width": 3 + }, + "tensionX": 1, + "tensionY": 1 + }, + "open": { + "x": "", + "y": "" + } + }, + "name": "ULC2", + "render": "column", + "stepLine": { + "appearance": { + "bullets": [ + { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "rotation": "", + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "enabled": true, + "fill": { + "color": "", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": 100, + "min": 2 + }, + "height": 10, + "label": { + "position": { + "dx": 0, + "dy": 0 + }, + "text": "{value}" + }, + "render": "circle", + "rotation": 0, + "stroke": { + "color": "", + "opacity": 1, + "width": 1 + }, + "tooltip": { + "background": { + "color": "", + "opacity": 1 + }, + "cornerRadius": 3, + "enabled": true, + "pointerLength": 4, + "text": "{name}: [bold]{valueY}[/]" + }, + "width": 10 + } + ], + "connect": true, + "fill": { + "color": "", + "opacity": 0 + }, + "minDistance": 0.5, + "stroke": { + "color": "", + "dashArray": "", + "opacity": 1, + "width": 3 + }, + "tensionX": 1, + "tensionY": 1 + }, + "open": { + "x": "", + "y": "" + } + }, + "tooltip": { + "background": { + "color": "", + "opacity": 1 + }, + "cornerRadius": 3, + "enabled": true, + "pointerLength": 4, + "text": "ULC2 (%): [bold]{valueY}[/]" + }, + "visible": true, + "xAxis": "Dumper", + "yAxis": "Dump_Count", + "zIndex": 0 + }, + { + "candlestick": { + "appearance": { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "fill": { + "color": "", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": "", + "min": "" + }, + "stacked": false, + "stroke": { + "color": "", + "opacity": 1, + "width": 1 + } + }, + "high": { + "x": "", + "y": "" + }, + "low": { + "x": "", + "y": "" + }, + "open": { + "x": "", + "y": "" + } + }, + "column": { + "appearance": { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "fill": { + "color": "#FF8C00", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": "", + "min": "" + }, + "height": null, + "stacked": true, + "stroke": { + "color": "#FF8C00", + "opacity": 1, + "width": 1 + }, + "width": null + }, + "open": { + "x": "", + "y": "" + } + }, + "data": { + "source": "data", + "x": "Dumper", + "y": "ULC3" + }, + "defaultState": { + "visible": true + }, + "hiddenInLegend": false, + "label": { + "text": "" + }, + "line": { + "appearance": { + "bullets": [ + { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "rotation": "", + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "enabled": false, + "fill": { + "color": "", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": 100, + "min": 2 + }, + "height": 10, + "label": { + "position": { + "dx": 0, + "dy": 0 + }, + "text": "{value}" + }, + "render": "circle", + "rotation": 0, + "stroke": { + "color": "", + "opacity": 1, + "width": 1 + }, + "tooltip": { + "background": { + "color": "", + "opacity": 1 + }, + "cornerRadius": 3, + "enabled": true, + "pointerLength": 4, + "text": "{name}: [bold]{valueY}[/]" + }, + "width": 10 + } + ], + "connect": true, + "fill": { + "color": "", + "opacity": 0 + }, + "minDistance": 0.5, + "stroke": { + "color": "", + "dashArray": "", + "opacity": 1, + "width": 3 + }, + "tensionX": 1, + "tensionY": 1 + }, + "open": { + "x": "", + "y": "" + } + }, + "name": "ULC3", + "render": "column", + "stepLine": { + "appearance": { + "bullets": [ + { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "rotation": "", + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "enabled": true, + "fill": { + "color": "", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": 100, + "min": 2 + }, + "height": 10, + "label": { + "position": { + "dx": 0, + "dy": 0 + }, + "text": "{value}" + }, + "render": "circle", + "rotation": 0, + "stroke": { + "color": "", + "opacity": 1, + "width": 1 + }, + "tooltip": { + "background": { + "color": "", + "opacity": 1 + }, + "cornerRadius": 3, + "enabled": true, + "pointerLength": 4, + "text": "{name}: [bold]{valueY}[/]" + }, + "width": 10 + } + ], + "connect": true, + "fill": { + "color": "", + "opacity": 0 + }, + "minDistance": 0.5, + "stroke": { + "color": "", + "dashArray": "", + "opacity": 1, + "width": 3 + }, + "tensionX": 1, + "tensionY": 1 + }, + "open": { + "x": "", + "y": "" + } + }, + "tooltip": { + "background": { + "color": "", + "opacity": 1 + }, + "cornerRadius": 3, + "enabled": true, + "pointerLength": 4, + "text": "ULC3 (%): [bold]{valueY}[/]" + }, + "visible": true, + "xAxis": "Dumper", + "yAxis": "Dump_Count", + "zIndex": 0 + }, + { + "candlestick": { + "appearance": { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "fill": { + "color": "", + "opacity": 0 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": "", + "min": "" + }, + "stacked": false, + "stroke": { + "color": "", + "opacity": 1, + "width": 3 + } + }, + "high": { + "x": "", + "y": "" + }, + "low": { + "x": "", + "y": "" + }, + "open": { + "x": "", + "y": "" + } + }, + "column": { + "appearance": { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "fill": { + "color": "#FF008B", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": "", + "min": "" + }, + "height": null, + "stacked": true, + "stroke": { + "color": "#FF008B", + "opacity": 1, + "width": 3 + }, + "width": null + }, + "open": { + "x": "", + "y": "" + } + }, + "data": { + "source": "data", + "x": "Dumper", + "y": "ULC4" + }, + "defaultState": { + "visible": true + }, + "hiddenInLegend": false, + "label": { + "text": "" + }, + "line": { + "appearance": { + "bullets": [], + "connect": true, + "fill": { + "color": "", + "opacity": 1 + }, + "minDistance": 0.5, + "stroke": { + "color": "", + "dashArray": "", + "opacity": 1, + "width": 3 + }, + "tensionX": 1, + "tensionY": 1 + }, + "open": { + "x": "", + "y": "" + } + }, + "name": "ULC4", + "render": "column", + "stepLine": { + "appearance": { + "bullets": [ + { + "deriveFieldsFromData": { + "fill": { + "color": "", + "opacity": "" + }, + "rotation": "", + "stroke": { + "color": "", + "opacity": "", + "width": "" + } + }, + "enabled": true, + "fill": { + "color": "", + "opacity": 1 + }, + "heatRules": { + "dataField": "", + "enabled": false, + "max": 100, + "min": 2 + }, + "height": 10, + "label": { + "position": { + "dx": 0, + "dy": 0 + }, + "text": "{value}" + }, + "render": "circle", + "rotation": 0, + "stroke": { + "color": "", + "opacity": 1, + "width": 1 + }, + "tooltip": { + "background": { + "color": "", + "opacity": 1 + }, + "cornerRadius": 3, + "enabled": true, + "pointerLength": 4, + "text": "{name}: [bold]{valueY}[/]" + }, + "width": 10 + } + ], + "connect": true, + "fill": { + "color": "", + "opacity": 0 + }, + "minDistance": 0.5, + "stroke": { + "color": "", + "dashArray": "", + "opacity": 1, + "width": 3 + }, + "tensionX": 1, + "tensionY": 1 + }, + "open": { + "x": "", + "y": "" + } + }, + "tooltip": { + "background": { + "color": "", + "opacity": 1 + }, + "cornerRadius": 3, + "enabled": true, + "pointerLength": 4, + "text": "ULC4 (%): [bold]{valueY}[/]" + }, + "visible": true, + "xAxis": "Dumper", + "yAxis": "Dump_Count", + "zIndex": 0 + } + ], + "title": { + "appearance": { + "font": { + "weight": 100 + } + } + }, + "xAxes": [ + { + "appearance": { + "font": { + "size": "", + "weight": 500 + }, + "grid": { + "color": "", + "dashArray": "", + "minDistance": 60, + "opacity": 1, + "position": 0.5 + }, + "inside": false, + "labels": { + "color": "", + "horizontalCenter": "middle", + "opacity": 1, + "rotation": 0, + "verticalCenter": "middle" + }, + "opposite": false + }, + "category": { + "break": { + "enabled": false, + "endCategory": "", + "size": 0.05, + "startCategory": "" + } + }, + "date": { + "baseInterval": { + "count": 1, + "enabled": false, + "skipEmptyPeriods": false, + "timeUnit": "hour" + }, + "break": { + "enabled": false, + "endDate": "", + "size": 0.05, + "startDate": "" + }, + "format": "M/d", + "inputFormat": "yyyy-MM-dd kk:mm:ss", + "range": { + "max": "", + "min": "", + "useStrict": false + } + }, + "inversed": false, + "label": { + "color": "", + "enabled": true, + "text": "" + }, + "name": "Dumper", + "render": "category", + "tooltip": { + "background": { + "color": "", + "opacity": 1 + }, + "cornerRadius": 3, + "enabled": true, + "pointerLength": 4, + "text": "" + }, + "value": { + "break": { + "enabled": false, + "endValue": 100, + "size": 0.05, + "startValue": 0 + }, + "format": "#,###.##", + "logarithmic": false, + "range": { + "max": "", + "min": "", + "useStrict": false + } + }, + "visible": true + } + ], + "yAxes": [ + { + "appearance": { + "font": { + "size": "", + "weight": 500 + }, + "grid": { + "color": "", + "dashArray": "", + "minDistance": null, + "opacity": 1, + "position": 0.5 + }, + "inside": false, + "labels": { + "color": "", + "horizontalCenter": "middle", + "opacity": 1, + "rotation": 0, + "verticalCenter": "middle" + }, + "opposite": false + }, + "category": { + "break": { + "enabled": false, + "endCategory": "", + "size": 0.05, + "startCategory": "" + } + }, + "date": { + "baseInterval": { + "count": 1, + "enabled": false, + "skipEmptyPeriods": false, + "timeUnit": "hour" + }, + "break": { + "enabled": false, + "endDate": "", + "size": 0.05, + "startDate": "" + }, + "format": "M/d/yyyy HH:mm:ss", + "inputFormat": "yyyy-MM-dd kk:mm:ss", + "range": { + "max": "", + "min": "", + "useStrict": true + } + }, + "inversed": false, + "label": { + "color": "", + "enabled": true, + "text": "" + }, + "name": "Dump_Count", + "render": "value", + "tooltip": { + "background": { + "color": "", + "opacity": 1 + }, + "cornerRadius": 3, + "enabled": true, + "pointerLength": 4, + "text": "" + }, + "value": { + "break": { + "enabled": false, + "endValue": 100, + "size": 0.05, + "startValue": 0 + }, + "format": "#,###.##", + "logarithmic": false, + "range": { + "max": 100, + "min": "", + "useStrict": false + } + }, + "visible": true + } + ] + }, + "type": "ia.chart.xy" } ], "meta": { diff --git a/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Count Graph/query.sql b/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Count Graph/query.sql new file mode 100644 index 0000000..63f2a59 --- /dev/null +++ b/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Count Graph/query.sql @@ -0,0 +1,28 @@ +WITH counts AS ( + SELECT + CAST(COALESCE(SUM(ulc1=1),0) AS SIGNED) AS ULC1, + CAST(COALESCE(SUM(ulc2=1),0) AS SIGNED) AS ULC2, + CAST(COALESCE(SUM(ulc3=1),0) AS SIGNED) AS ULC3, + CAST(COALESCE(SUM(ulc4=1),0) AS SIGNED) AS ULC4 + FROM dumper_cycles + WHERE t_stamp BETWEEN :starttime AND :endtime +), +totals AS ( + SELECT (ULC1+ULC2+ULC3+ULC4) AS Dump_Total FROM counts +), +labels AS ( + SELECT 'ULC1' AS Dumper UNION ALL + SELECT 'ULC2' UNION ALL + SELECT 'ULC3' UNION ALL + SELECT 'ULC4' +) +SELECT + l.Dumper, + CASE WHEN l.Dumper='ULC1' THEN ROUND(c.ULC1 / t.Dump_Total * 100, 2) END AS ULC1, + CASE WHEN l.Dumper='ULC2' THEN ROUND(c.ULC2 / t.Dump_Total * 100, 2) END AS ULC2, + CASE WHEN l.Dumper='ULC3' THEN ROUND(c.ULC3 / t.Dump_Total * 100, 2) END AS ULC3, + CASE WHEN l.Dumper='ULC4' THEN ROUND(c.ULC4 / t.Dump_Total * 100, 2) END AS ULC4, + 100 AS Dump_Count +FROM labels l +CROSS JOIN counts c +CROSS JOIN totals t; diff --git a/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Count Graph/resource.json b/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Count Graph/resource.json new file mode 100644 index 0000000..da18561 --- /dev/null +++ b/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Count Graph/resource.json @@ -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": "MariaDB", + "fallbackEnabled": false, + "lastModificationSignature": "9c7eede958fa24dd74eaca00ba3838a7b23c70ac1e259ebd46b749c94df1c01f", + "permissions": [ + { + "zone": "", + "role": "" + } + ], + "lastModification": { + "actor": "admin", + "timestamp": "2025-10-18T22:42:07Z" + }, + "parameters": [ + { + "type": "Parameter", + "identifier": "starttime", + "sqlType": 8 + }, + { + "type": "Parameter", + "identifier": "endtime", + "sqlType": 8 + } + ] + } +} \ No newline at end of file diff --git a/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Percentage Graph/query.sql b/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Percentage Graph/query.sql new file mode 100644 index 0000000..7e136ef --- /dev/null +++ b/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Percentage Graph/query.sql @@ -0,0 +1,29 @@ +WITH c AS ( + SELECT + CAST(COALESCE(SUM(ulc1=1),0) AS SIGNED) AS ULC1, + CAST(COALESCE(SUM(ulc2=1),0) AS SIGNED) AS ULC2, + CAST(COALESCE(SUM(ulc3=1),0) AS SIGNED) AS ULC3, + CAST(COALESCE(SUM(ulc4=1),0) AS SIGNED) AS ULC4 + FROM dumper_cycles + WHERE t_stamp BETWEEN :starttime AND :endtime +), +t AS ( + SELECT (ULC1+ULC2+ULC3+ULC4) AS Total FROM c +) +SELECT 'ULC1' AS Dumper, + ROUND(c.ULC1 / NULLIF(t.Total,0) * 100.0, 2) AS ULC1, + NULL AS ULC2, NULL AS ULC3, NULL AS ULC4, + 100 AS Dump_Count +FROM c CROSS JOIN t +UNION ALL +SELECT 'ULC2', + NULL, ROUND(c.ULC2 / NULLIF(t.Total,0) * 100.0, 2), NULL, NULL, 100 +FROM c CROSS JOIN t +UNION ALL +SELECT 'ULC3', + NULL, NULL, ROUND(c.ULC3 / NULLIF(t.Total,0) * 100.0, 2), NULL, 100 +FROM c CROSS JOIN t +UNION ALL +SELECT 'ULC4', + NULL, NULL, NULL, ROUND(c.ULC4 / NULLIF(t.Total,0) * 100.0, 2), 100 +FROM c CROSS JOIN t; diff --git a/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Percentage Graph/resource.json b/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Percentage Graph/resource.json new file mode 100644 index 0000000..6fab1e5 --- /dev/null +++ b/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Percentage Graph/resource.json @@ -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": "MariaDB", + "fallbackEnabled": false, + "lastModificationSignature": "c1c7aa376e227f64bd717f4cf2f27a0a14ef609ddca9a02dc77ea2d5fecf6b6b", + "permissions": [ + { + "zone": "", + "role": "" + } + ], + "lastModification": { + "actor": "admin", + "timestamp": "2025-10-18T22:43:55Z" + }, + "parameters": [ + { + "type": "Parameter", + "identifier": "starttime", + "sqlType": 8 + }, + { + "type": "Parameter", + "identifier": "endtime", + "sqlType": 8 + } + ] + } +} \ No newline at end of file diff --git a/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Rate Graph/query.sql b/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Rate Graph/query.sql new file mode 100644 index 0000000..28d8476 --- /dev/null +++ b/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Rate Graph/query.sql @@ -0,0 +1,16 @@ +SELECT NOW() AS time, 1 AS name, CAST(COALESCE(SUM(ulc1 = 1), 0) AS SIGNED) AS count +FROM dumper_cycles +WHERE t_stamp BETWEEN :starttime AND :endtime +UNION ALL +SELECT NOW() + INTERVAL 1 SECOND , 2 , CAST(COALESCE(SUM(ulc2 = 1), 0) AS SIGNED) +FROM dumper_cycles +WHERE t_stamp BETWEEN :starttime AND :endtime +UNION ALL +SELECT NOW() + INTERVAL 2 SECOND , 3 , CAST(COALESCE(SUM(ulc3 = 1), 0) AS SIGNED) +FROM dumper_cycles +WHERE t_stamp BETWEEN :starttime AND :endtime +UNION ALL +SELECT NOW() + INTERVAL 3 SECOND , 4 , CAST(COALESCE(SUM(ulc4 = 1), 0) AS SIGNED) +FROM dumper_cycles +WHERE t_stamp BETWEEN :starttime AND :endtime +ORDER BY name; diff --git a/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Rate Graph/resource.json b/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Rate Graph/resource.json new file mode 100644 index 0000000..d4d2034 --- /dev/null +++ b/CNO8_SCADA/ignition/named-query/Dumper/Dumper Lane Rate Graph/resource.json @@ -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": "MariaDB", + "fallbackEnabled": false, + "lastModificationSignature": "4addcac1cda8fc044de4f3bb9aed74d86f9f19406b2bdce868963d49635ab266", + "permissions": [ + { + "zone": "", + "role": "" + } + ], + "lastModification": { + "actor": "admin", + "timestamp": "2025-10-18T23:43:21Z" + }, + "parameters": [ + { + "type": "Parameter", + "identifier": "starttime", + "sqlType": 8 + }, + { + "type": "Parameter", + "identifier": "endtime", + "sqlType": 8 + } + ] + } +} \ No newline at end of file