From 6c7e7b860a32c7b38b73bee365ca18aaa1a26cb4 Mon Sep 17 00:00:00 2001 From: "gigi.mamaladze" Date: Sun, 19 Oct 2025 21:41:13 +0400 Subject: [PATCH] Updated Dumper cycles statistics --- .../views/Windows/Statistics/view.json | 964 +++--------------- .../Dumper/Dumper Lane Count Graph/query.sql | 10 +- .../Dumper Lane Count Graph/resource.json | 4 +- .../Dumper/Dumper Lane Rate Graph/query.sql | 78 +- .../Dumper Lane Rate Graph/resource.json | 4 +- 5 files changed, 237 insertions(+), 823 deletions(-) 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 92104ea..c9c46d1 100644 --- a/CNO8_SCADA/com.inductiveautomation.perspective/views/Windows/Statistics/view.json +++ b/CNO8_SCADA/com.inductiveautomation.perspective/views/Windows/Statistics/view.json @@ -1142,7 +1142,7 @@ "meta.visible": { "binding": { "config": { - "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" + "path": "..../Aggregation Mode/Aggregation Mode DropDown.props.value" }, "transforms": [ { @@ -1164,7 +1164,7 @@ "position.display": { "binding": { "config": { - "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" + "path": "..../Aggregation Mode/Aggregation Mode DropDown.props.value" }, "transforms": [ { @@ -1187,8 +1187,8 @@ "binding": { "config": { "parameters": { - "endtime": "{..../Period_not_Global_0/EndTime.props.value}", - "starttime": "{..../Period_not_Global_0/StartTime.props.value}" + "endtime": "{..../Period Filter/EndTime.props.value}", + "starttime": "{..../Period Filter/StartTime.props.value}" }, "queryPath": "Dumper/Dumper Lane Count" }, @@ -1741,7 +1741,7 @@ "meta.visible": { "binding": { "config": { - "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" + "path": "..../Aggregation Mode/Aggregation Mode DropDown.props.value" }, "transforms": [ { @@ -1763,7 +1763,7 @@ "position.display": { "binding": { "config": { - "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" + "path": "..../Aggregation Mode/Aggregation Mode DropDown.props.value" }, "transforms": [ { @@ -1786,8 +1786,8 @@ "binding": { "config": { "parameters": { - "endtime": "{..../Period_not_Global_0/EndTime.props.value}", - "starttime": "{..../Period_not_Global_0/StartTime.props.value}" + "endtime": "{..../Period Filter/EndTime.props.value}", + "starttime": "{..../Period Filter/StartTime.props.value}" }, "queryPath": "Dumper/Dumper Lane Percent" }, @@ -2340,7 +2340,7 @@ "meta.visible": { "binding": { "config": { - "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" + "path": "..../Aggregation Mode/Aggregation Mode DropDown.props.value" }, "transforms": [ { @@ -2362,7 +2362,7 @@ "position.display": { "binding": { "config": { - "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" + "path": "..../Aggregation Mode/Aggregation Mode DropDown.props.value" }, "transforms": [ { @@ -2385,8 +2385,8 @@ "binding": { "config": { "parameters": { - "endtime": "{..../Period_not_Global_0/EndTime.props.value}", - "starttime": "{..../Period_not_Global_0/StartTime.props.value}" + "endtime": "{..../Period Filter/EndTime.props.value}", + "starttime": "{..../Period Filter/StartTime.props.value}" }, "queryPath": "Dumper/Dumper Lane Rate" }, @@ -2406,7 +2406,8 @@ "align": "center", "justify": "left", "style": { - "classes": "" + "classes": "", + "marginRight": 2 }, "title": "" }, @@ -2462,7 +2463,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": "" + "width": 100 }, { "align": "center", @@ -2529,7 +2530,7 @@ }, "viewParams": {}, "viewPath": "", - "visible": true, + "visible": false, "width": 150 }, { @@ -2598,7 +2599,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": "" + "width": 90 }, { "align": "center", @@ -2666,7 +2667,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": "" + "width": 90 }, { "align": "center", @@ -2734,7 +2735,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": "" + "width": 90 }, { "align": "center", @@ -2826,7 +2827,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": "" + "width": 90 } ], "filter": { @@ -2861,7 +2862,7 @@ "meta.visible": { "binding": { "config": { - "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" + "path": "..../Aggregation Mode/Aggregation Mode DropDown.props.value" }, "transforms": [ { @@ -2883,7 +2884,7 @@ "position.display": { "binding": { "config": { - "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" + "path": "..../Aggregation Mode/Aggregation Mode DropDown.props.value" }, "transforms": [ { @@ -2906,8 +2907,8 @@ "binding": { "config": { "parameters": { - "endtime": "{..../Period_not_Global_0/EndTime.props.value}", - "starttime": "{..../Period_not_Global_0/StartTime.props.value}" + "endtime": "{..../Period Filter/EndTime.props.value}", + "starttime": "{..../Period Filter/StartTime.props.value}" }, "queryPath": "Dumper/Dumper Lane Count Graph", "returnFormat": "json" @@ -4103,7 +4104,7 @@ "meta.visible": { "binding": { "config": { - "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" + "path": "..../Aggregation Mode/Aggregation Mode DropDown.props.value" }, "transforms": [ { @@ -4125,7 +4126,7 @@ "position.display": { "binding": { "config": { - "path": "..../Aggregation_Mode/Dropdown_Aggregation_mode.props.value" + "path": "..../Aggregation Mode/Aggregation Mode DropDown.props.value" }, "transforms": [ { @@ -4148,8 +4149,8 @@ "binding": { "config": { "parameters": { - "endtime": "{..../Period_not_Global_0/EndTime.props.value}", - "starttime": "{..../Period_not_Global_0/StartTime.props.value}" + "endtime": "{..../Period Filter/EndTime.props.value}", + "starttime": "{..../Period Filter/StartTime.props.value}" }, "queryPath": "Dumper/Dumper Lane Percentage Graph", "returnFormat": "json" @@ -5340,6 +5341,116 @@ ] }, "type": "ia.chart.xy" + }, + { + "meta": { + "name": "Dumper Cycles Rate Graph" + }, + "position": { + "basis": "400px" + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "path": "..../Aggregation Mode/Aggregation Mode DropDown.props.value" + }, + "transforms": [ + { + "fallback": false, + "inputType": "scalar", + "mappings": [ + { + "input": "Rate", + "output": true + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "position.display": { + "binding": { + "config": { + "path": "..../Aggregation Mode/Aggregation Mode DropDown.props.value" + }, + "transforms": [ + { + "fallback": false, + "inputType": "scalar", + "mappings": [ + { + "input": "Rate", + "output": true + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + }, + "props.series[0].data": { + "binding": { + "config": { + "parameters": { + "endtime": "{..../Period Filter/EndTime.props.value}", + "starttime": "{..../Period Filter/StartTime.props.value}" + }, + "queryPath": "Dumper/Dumper Lane Rate Graph", + "returnFormat": "json" + }, + "type": "query" + } + }, + "props.timeAxis.tickCount": { + "binding": { + "config": { + "expression": "if(\r\n dateDiff({..../Period Filter/StartTime.props.value},\r\n {..../Period Filter/EndTime.props.value}, \u0027hour\u0027) \u003c 24,\r\n toInt(len({this.props.series[0].data})),\r\n toInt(len({this.props.series[0].data}) / 4)\r\n)\r\n" + }, + "type": "expr" + } + } + }, + "props": { + "defaultStyles": { + "colorScheme": "Spectral", + "colors": [ + "#FF0000", + "#00FF12", + "#0003FF", + "#FF00F8" + ] + }, + "legend": { + "visible": true + }, + "series": [ + { + "name": "Boiler" + } + ], + "timeAxis": { + "height": 120, + "tick": { + "label": { + "angled": true, + "font": { + "size": 13 + }, + "format": "MM/DD/YYYY-HH:MM" + } + } + }, + "timeRange": { + "timeFormat": "HH:mm:ss" + } + }, + "type": "ia.chart.timeseries" } ], "meta": { @@ -5349,7 +5460,8 @@ "tabIndex": 1 }, "props": { - "direction": "column" + "direction": "column", + "style": {} }, "type": "ia.container.flex" } @@ -5377,6 +5489,7 @@ }, "style": { "fontFamily": "Arial", + "overflow": "hidden", "width": "100%" }, "tabSize": { @@ -5424,7 +5537,7 @@ }, { "meta": { - "name": "Dropdown_Aggregation_mode" + "name": "Aggregation Mode DropDown" }, "position": { "basis": "100px", @@ -5453,13 +5566,13 @@ "style": { "fontSize": "1.5vmin" }, - "value": "Rate" + "value": "Count" }, "type": "ia.input.dropdown" } ], "meta": { - "name": "Aggregation_Mode" + "name": "Aggregation Mode" }, "position": { "height": 0.03, @@ -5487,679 +5600,6 @@ }, "type": "ia.container.flex" }, - { - "children": [ - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "63px" - }, - "props": { - "style": { - "color": "#000000" - }, - "text": "Induct:" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Dropdown_0" - }, - "position": { - "basis": "171px" - }, - "props": { - "options": [ - { - "label": "PS01", - "value": "PS01" - }, - { - "label": "PS02", - "value": "PS02" - }, - { - "label": "PS03", - "value": "PS03" - } - ], - "value": "PS01" - }, - "type": "ia.input.dropdown" - } - ], - "meta": { - "name": "Induct Drop Down", - "visible": false - }, - "position": { - "height": 0.0269, - "width": 0.124, - "x": 0.872, - "y": 0.0439 - }, - "props": { - "style": { - "fontFamily": "Arial" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "meta": { - "name": "Label_Scanner" - }, - "position": { - "basis": "70px" - }, - "props": { - "style": { - "color": "#000000" - }, - "text": "Scanner:" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Scanner" - }, - "position": { - "basis": "171px" - }, - "props": { - "options": [ - { - "label": "S01aa", - "value": "S01aa" - }, - { - "label": "S02aa", - "value": "S02aa" - }, - { - "label": "S03aa", - "value": "S03aa" - } - ], - "value": "S01aa" - }, - "type": "ia.input.dropdown" - } - ], - "meta": { - "name": "Scanner Drop Down", - "visible": false - }, - "position": { - "height": 0.0269, - "width": 0.124, - "x": 0.872, - "y": 0.0439 - }, - "props": { - "style": { - "fontFamily": "Arial" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "meta": { - "name": "Label_Lane" - }, - "position": { - "basis": "70px" - }, - "props": { - "style": { - "color": "#000000" - }, - "text": "Lane:" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Lane" - }, - "position": { - "basis": "171px" - }, - "props": { - "options": [ - { - "label": "S03001", - "value": "S03001" - }, - { - "label": "S03002", - "value": "S03002" - }, - { - "label": "S03003", - "value": "S03003" - }, - { - "label": "S03005", - "value": "S03005" - }, - { - "label": "S03006", - "value": "S03006" - }, - { - "label": "S03007", - "value": "S03007" - }, - { - "label": "S03008", - "value": "S03008" - }, - { - "label": "S03009", - "value": "S03009" - }, - { - "label": "S03010", - "value": "S03010" - }, - { - "label": "S03011", - "value": "S03011" - }, - { - "label": "S03012", - "value": "S03012" - }, - { - "label": "S03013", - "value": "S03013" - }, - { - "label": "S03014", - "value": "S03014" - }, - { - "label": "S03015", - "value": "S03015" - }, - { - "label": "S03016", - "value": "S03016" - }, - { - "label": "S03017", - "value": "S03017" - }, - { - "label": "S03018", - "value": "S03018" - }, - { - "label": "S03019", - "value": "S03019" - }, - { - "label": "S03020", - "value": "S03020" - }, - { - "label": "S03021", - "value": "S03021" - }, - { - "label": "S03022", - "value": "S03022" - }, - { - "label": "S03023", - "value": "S03023" - }, - { - "label": "S03024", - "value": "S03024" - }, - { - "label": "S03025", - "value": "S03025" - }, - { - "label": "S03026", - "value": "S03026" - }, - { - "label": "S03027", - "value": "S03027" - }, - { - "label": "S03028", - "value": "S03028" - }, - { - "label": "S03029", - "value": "S03029" - }, - { - "label": "S03030", - "value": "S03030" - }, - { - "label": "S03031", - "value": "S03031" - }, - { - "label": "S03032", - "value": "S03032" - }, - { - "label": "S03033", - "value": "S03033" - }, - { - "label": "S03034", - "value": "S03034" - }, - { - "label": "S03035", - "value": "S03035" - }, - { - "label": "S03036", - "value": "S03036" - }, - { - "label": "S03037", - "value": "S03037" - }, - { - "label": "S03038", - "value": "S03038" - }, - { - "label": "S03039", - "value": "S03039" - }, - { - "label": "S03040", - "value": "S03040" - }, - { - "label": "S03041", - "value": "S03041" - }, - { - "label": "S03042", - "value": "S03042" - }, - { - "label": "S03043", - "value": "S03043" - }, - { - "label": "S03044", - "value": "S03044" - }, - { - "label": "S03045", - "value": "S03045" - }, - { - "label": "S03046", - "value": "S03046" - }, - { - "label": "S03047", - "value": "S03047" - }, - { - "label": "S03048", - "value": "S03048" - }, - { - "label": "S03049", - "value": "S03049" - }, - { - "label": "S03050", - "value": "S03050" - }, - { - "label": "S03051", - "value": "S03051" - }, - { - "label": "S03052", - "value": "S03052" - }, - { - "label": "S03053", - "value": "S03053" - }, - { - "label": "S03054", - "value": "S03054" - }, - { - "label": "S03055", - "value": "S03055" - }, - { - "label": "S03056", - "value": "S03056" - }, - { - "label": "S03057", - "value": "S03057" - }, - { - "label": "S03058", - "value": "S03058" - }, - { - "label": "S03059", - "value": "S03059" - }, - { - "label": "S03060", - "value": "S03060" - }, - { - "label": "S03061", - "value": "S03061" - }, - { - "label": "S03062", - "value": "S03062" - }, - { - "label": "S03063", - "value": "S03063" - }, - { - "label": "S03064", - "value": "S03064" - }, - { - "label": "S03065", - "value": "S03065" - }, - { - "label": "S03066", - "value": "S03066" - }, - { - "label": "S03067", - "value": "S03067" - }, - { - "label": "S03068", - "value": "S03068" - }, - { - "label": "S03069", - "value": "S03069" - }, - { - "label": "S03070", - "value": "S03070" - }, - { - "label": "S03071", - "value": "S03071" - }, - { - "label": "S03072", - "value": "S03072" - }, - { - "label": "S03073", - "value": "S03073" - }, - { - "label": "S03074", - "value": "S03074" - }, - { - "label": "S03075", - "value": "S03075" - }, - { - "label": "S03076", - "value": "S03076" - }, - { - "label": "S03077", - "value": "S03077" - }, - { - "label": "S03078", - "value": "S03078" - }, - { - "label": "S03079", - "value": "S03079" - }, - { - "label": "S03080", - "value": "S03080" - }, - { - "label": "S03081", - "value": "S03081" - }, - { - "label": "S03082", - "value": "S03082" - }, - { - "label": "S03083", - "value": "S03083" - }, - { - "label": "S03084", - "value": "S03084" - }, - { - "label": "S03085", - "value": "S03085" - }, - { - "label": "S03086", - "value": "S03086" - }, - { - "label": "S03087", - "value": "S03087" - }, - { - "label": "S03088", - "value": "S03088" - }, - { - "label": "S03089", - "value": "S03089" - }, - { - "label": "S03090", - "value": "S03090" - }, - { - "label": "S03091", - "value": "S03091" - }, - { - "label": "S03092", - "value": "S03092" - }, - { - "label": "S03093", - "value": "S03093" - }, - { - "label": "S03094", - "value": "S03094" - }, - { - "label": "S03095", - "value": "S03095" - }, - { - "label": "S03096", - "value": "S03096" - }, - { - "label": "S03097", - "value": "S03097" - }, - { - "label": "S03098", - "value": "S03098" - }, - { - "label": "S03099", - "value": "S03099" - }, - { - "label": "S03100", - "value": "S03100" - }, - { - "label": "S03101", - "value": "S03101" - }, - { - "label": "S03102", - "value": "S03102" - }, - { - "label": "S03103", - "value": "S03103" - }, - { - "label": "S03104", - "value": "S03104" - }, - { - "label": "S03105", - "value": "S03105" - }, - { - "label": "S03106", - "value": "S03106" - }, - { - "label": "S03107", - "value": "S03107" - }, - { - "label": "S03108", - "value": "S03108" - }, - { - "label": "S03999", - "value": "S03999" - } - ], - "value": "S0101" - }, - "type": "ia.input.dropdown" - } - ], - "meta": { - "name": "Lane Drop Down" - }, - "position": { - "height": 0.0269, - "width": 0.0792, - "x": 0.6897, - "y": 0.0922 - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "expression": "if ({../Statistics.props.currentTabIndex} \u003d 9 ,\r\ntrue,\r\nfalse)" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "fontFamily": "Arial" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "meta": { - "name": "Label_Scanner" - }, - "position": { - "basis": "70px" - }, - "props": { - "style": { - "color": "#000000" - }, - "text": "Sorter:" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Sorter" - }, - "position": { - "basis": "171px" - }, - "props": { - "options": [ - { - "label": "S01", - "value": "S01" - }, - { - "label": "S02", - "value": "S02" - }, - { - "label": "S03", - "value": "S03" - } - ], - "value": "PS01" - }, - "type": "ia.input.dropdown" - } - ], - "meta": { - "name": "Sorter Drop Down", - "visible": false - }, - "position": { - "height": 0.0269, - "width": 0.124, - "x": 0.8725, - "y": 0.0428 - }, - "props": { - "style": { - "fontFamily": "Arial" - } - }, - "type": "ia.container.flex" - }, { "custom": { "debug": [ @@ -7623,7 +7063,7 @@ } }, "meta": { - "name": "ExportToCSV", + "name": "Export Button", "tooltip": { "enabled": true, "location": "bottom", @@ -7670,7 +7110,7 @@ "children": [ { "meta": { - "name": "LPeriod" + "name": "Period Label" }, "position": { "basis": "60px", @@ -7686,7 +7126,7 @@ }, { "meta": { - "name": "Period" + "name": "Period DropDown" }, "position": { "basis": "140px", @@ -7755,7 +7195,7 @@ "style": { "fontSize": "1.5vmin" }, - "value": "Custom" + "value": "Past 30 Min" }, "type": "ia.input.dropdown" }, @@ -7771,7 +7211,7 @@ }, { "meta": { - "name": "Start Date" + "name": "Start Date Label" }, "position": { "basis": "85px", @@ -7791,9 +7231,9 @@ "$": [ "ts", 192, - 1760752329550 + 1760895342300 ], - "$ts": 1759886520000 + "$ts": 1759851340000 } }, "events": { @@ -7818,7 +7258,7 @@ "props.enabled": { "binding": { "config": { - "expression": "{../Period.props.value} \u003d \"Custom\"" + "expression": "{../Period DropDown.props.value} \u003d \"Custom\"" }, "type": "expr" } @@ -7834,7 +7274,7 @@ "props.startDate": { "binding": { "config": { - "path": "../Period.props.value" + "path": "../Period DropDown.props.value" }, "transforms": [ { @@ -7902,7 +7342,7 @@ }, "onChange": { "enabled": null, - "script": "\t\n\tif self.getSibling(\"Period\").props.value !\u003d \"Custom\":\n\t\tself.props.value \u003d self.props.startDate" + "script": "\t\n\tif self.getSibling(\"Period DropDown\").props.value !\u003d \"Custom\":\n\t\tself.props.value \u003d self.props.startDate" } }, "props.value": { @@ -7914,7 +7354,7 @@ }, "props": { "dismissOnSelect": false, - "formattedValue": "Oct 8, 2025 5:22 AM", + "formattedValue": "Oct 19, 2025 9:10 PM", "formattedValues": { "date": "Mar 26, 2021", "datetime": "Mar 26, 2021 12:00 AM", @@ -7931,10 +7371,10 @@ "value": { "$": [ "ts", - 0, - 1760752329544 + 192, + 1760895641341 ], - "$ts": 1759886520000 + "$ts": 1760893841000 } }, "type": "ia.input.date-time-input" @@ -7951,7 +7391,7 @@ }, { "meta": { - "name": "End Date" + "name": "End Date Label" }, "position": { "basis": "81px", @@ -7991,7 +7431,7 @@ "props.enabled": { "binding": { "config": { - "expression": "{../Period.props.value} \u003d \"Custom\"" + "expression": "{../Period DropDown.props.value} \u003d \"Custom\"" }, "type": "expr" } @@ -7999,7 +7439,7 @@ "props.endDate": { "binding": { "config": { - "path": "../Period.props.value" + "path": "../Period DropDown.props.value" }, "transforms": [ { @@ -8063,7 +7503,7 @@ }, "onChange": { "enabled": null, - "script": "\t\n\tif self.getSibling(\"Period\").props.value !\u003d \"Custom\":\n\t\tself.props.value \u003d self.props.endDate" + "script": "\t\n\tif self.getSibling(\"Period DropDown\").props.value !\u003d \"Custom\":\n\t\tself.props.value \u003d self.props.endDate" } }, "props.maxDate": { @@ -8085,7 +7525,7 @@ }, "props": { "dismissOnSelect": false, - "formattedValue": "Oct 15, 2025 5:22 AM", + "formattedValue": "Oct 19, 2025 9:40 PM", "formattedValues": { "date": "Mar 29, 2021", "datetime": "Mar 29, 2021 1:37 PM", @@ -8103,16 +7543,16 @@ "$": [ "ts", 192, - 1760752329549 + 1760895641341 ], - "$ts": 1760491320000 + "$ts": 1760895641000 } }, "type": "ia.input.date-time-input" } ], "meta": { - "name": "Period_not_Global_0" + "name": "Period Filter" }, "position": { "height": 0.0269, @@ -8146,78 +7586,6 @@ }, "type": "ia.container.flex" }, - { - "children": [ - { - "meta": { - "name": "Label_Lane" - }, - "position": { - "basis": "70px" - }, - "props": { - "style": { - "color": "#000000" - }, - "text": "Dumper:" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Dumper" - }, - "position": { - "basis": "171px" - }, - "props": { - "options": [ - { - "label": "ULGL1-1", - "value": "ULGL1-1" - }, - { - "label": "ULGL2-1", - "value": "ULGL2-1" - }, - { - "label": "ULGL3-1", - "value": "ULGL3-1" - } - ], - "value": "S0101" - }, - "type": "ia.input.dropdown" - } - ], - "meta": { - "name": "Dumper Drop Down_0", - "visible": false - }, - "position": { - "height": 0.0269, - "width": 0.1219, - "x": 0.8469, - "y": 0.0922 - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "expression": "if ({../Statistics.props.currentTabIndex} \u003d 12 ,\r\ntrue,\r\nfalse)" - }, - "enabled": false, - "type": "expr" - } - } - }, - "props": { - "style": { - "fontFamily": "Arial" - } - }, - "type": "ia.container.flex" - }, { "meta": { "name": "Info", 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 index 63f2a59..43aba28 100644 --- 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 @@ -18,11 +18,11 @@ labels AS ( ) 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 + CASE WHEN l.Dumper='ULC1' THEN c.ULC1 END AS ULC1, + CASE WHEN l.Dumper='ULC2' THEN c.ULC2 END AS ULC2, + CASE WHEN l.Dumper='ULC3' THEN c.ULC3 END AS ULC3, + CASE WHEN l.Dumper='ULC4' THEN c.ULC4 END AS ULC4, + t.Dump_Total 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 index da18561..d41ae64 100644 --- 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 @@ -18,7 +18,7 @@ "cacheEnabled": false, "database": "MariaDB", "fallbackEnabled": false, - "lastModificationSignature": "9c7eede958fa24dd74eaca00ba3838a7b23c70ac1e259ebd46b749c94df1c01f", + "lastModificationSignature": "5b77c57b75c27228c1031823519a0979dc5f0d9fbf4d011228d2c6d259d95109", "permissions": [ { "zone": "", @@ -27,7 +27,7 @@ ], "lastModification": { "actor": "admin", - "timestamp": "2025-10-18T22:42:07Z" + "timestamp": "2025-10-19T17:25:44Z" }, "parameters": [ { 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 index 28d8476..bc7ad7f 100644 --- 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 @@ -1,16 +1,62 @@ -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; +/* One row per hour in [:starttime, :endtime], MariaDB-old (no CTE/recursion) */ +SELECT + CAST(UNIX_TIMESTAMP(h.hour_ts) * 1000 AS UNSIGNED) AS time, -- epoch ms at hour start + COALESCE(SUM(dc.ulc1 = 1), 0) AS ULC1, + COALESCE(SUM(dc.ulc2 = 1), 0) AS ULC2, + COALESCE(SUM(dc.ulc3 = 1), 0) AS ULC3, + COALESCE(SUM(dc.ulc4 = 1), 0) AS ULC4 +FROM +( + /* Generate exactly N+1 hour buckets from floor(:starttime) to floor(:endtime) */ + SELECT sf.start_floor + INTERVAL nums.n HOUR AS hour_ts + FROM + ( + SELECT + TIMESTAMP(DATE_FORMAT(:starttime, '%Y-%m-%d %H:00:00')) AS start_floor, + TIMESTAMP(DATE_FORMAT(:endtime, '%Y-%m-%d %H:00:00')) AS end_floor + ) AS sf + JOIN + ( + /* extend list if your window can exceed 168 hours */ + SELECT 0 AS n UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL + SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL + SELECT 10 UNION ALL SELECT 11 UNION ALL SELECT 12 UNION ALL SELECT 13 UNION ALL SELECT 14 UNION ALL + SELECT 15 UNION ALL SELECT 16 UNION ALL SELECT 17 UNION ALL SELECT 18 UNION ALL SELECT 19 UNION ALL + SELECT 20 UNION ALL SELECT 21 UNION ALL SELECT 22 UNION ALL SELECT 23 UNION ALL SELECT 24 UNION ALL + SELECT 25 UNION ALL SELECT 26 UNION ALL SELECT 27 UNION ALL SELECT 28 UNION ALL SELECT 29 UNION ALL + SELECT 30 UNION ALL SELECT 31 UNION ALL SELECT 32 UNION ALL SELECT 33 UNION ALL SELECT 34 UNION ALL + SELECT 35 UNION ALL SELECT 36 UNION ALL SELECT 37 UNION ALL SELECT 38 UNION ALL SELECT 39 UNION ALL + SELECT 40 UNION ALL SELECT 41 UNION ALL SELECT 42 UNION ALL SELECT 43 UNION ALL SELECT 44 UNION ALL + SELECT 45 UNION ALL SELECT 46 UNION ALL SELECT 47 UNION ALL SELECT 48 UNION ALL SELECT 49 UNION ALL + SELECT 50 UNION ALL SELECT 51 UNION ALL SELECT 52 UNION ALL SELECT 53 UNION ALL SELECT 54 UNION ALL + SELECT 55 UNION ALL SELECT 56 UNION ALL SELECT 57 UNION ALL SELECT 58 UNION ALL SELECT 59 UNION ALL + SELECT 60 UNION ALL SELECT 61 UNION ALL SELECT 62 UNION ALL SELECT 63 UNION ALL SELECT 64 UNION ALL + SELECT 65 UNION ALL SELECT 66 UNION ALL SELECT 67 UNION ALL SELECT 68 UNION ALL SELECT 69 UNION ALL + SELECT 70 UNION ALL SELECT 71 UNION ALL SELECT 72 UNION ALL SELECT 73 UNION ALL SELECT 74 UNION ALL + SELECT 75 UNION ALL SELECT 76 UNION ALL SELECT 77 UNION ALL SELECT 78 UNION ALL SELECT 79 UNION ALL + SELECT 80 UNION ALL SELECT 81 UNION ALL SELECT 82 UNION ALL SELECT 83 UNION ALL SELECT 84 UNION ALL + SELECT 85 UNION ALL SELECT 86 UNION ALL SELECT 87 UNION ALL SELECT 88 UNION ALL SELECT 89 UNION ALL + SELECT 90 UNION ALL SELECT 91 UNION ALL SELECT 92 UNION ALL SELECT 93 UNION ALL SELECT 94 UNION ALL + SELECT 95 UNION ALL SELECT 96 UNION ALL SELECT 97 UNION ALL SELECT 98 UNION ALL SELECT 99 UNION ALL + SELECT 100 UNION ALL SELECT 101 UNION ALL SELECT 102 UNION ALL SELECT 103 UNION ALL SELECT 104 UNION ALL + SELECT 105 UNION ALL SELECT 106 UNION ALL SELECT 107 UNION ALL SELECT 108 UNION ALL SELECT 109 UNION ALL + SELECT 110 UNION ALL SELECT 111 UNION ALL SELECT 112 UNION ALL SELECT 113 UNION ALL SELECT 114 UNION ALL + SELECT 115 UNION ALL SELECT 116 UNION ALL SELECT 117 UNION ALL SELECT 118 UNION ALL SELECT 119 UNION ALL + SELECT 120 UNION ALL SELECT 121 UNION ALL SELECT 122 UNION ALL SELECT 123 UNION ALL SELECT 124 UNION ALL + SELECT 125 UNION ALL SELECT 126 UNION ALL SELECT 127 UNION ALL SELECT 128 UNION ALL SELECT 129 UNION ALL + SELECT 130 UNION ALL SELECT 131 UNION ALL SELECT 132 UNION ALL SELECT 133 UNION ALL SELECT 134 UNION ALL + SELECT 135 UNION ALL SELECT 136 UNION ALL SELECT 137 UNION ALL SELECT 138 UNION ALL SELECT 139 UNION ALL + SELECT 140 UNION ALL SELECT 141 UNION ALL SELECT 142 UNION ALL SELECT 143 UNION ALL SELECT 144 UNION ALL + SELECT 145 UNION ALL SELECT 146 UNION ALL SELECT 147 UNION ALL SELECT 148 UNION ALL SELECT 149 UNION ALL + SELECT 150 UNION ALL SELECT 151 UNION ALL SELECT 152 UNION ALL SELECT 153 UNION ALL SELECT 154 UNION ALL + SELECT 155 UNION ALL SELECT 156 UNION ALL SELECT 157 UNION ALL SELECT 158 UNION ALL SELECT 159 UNION ALL + SELECT 160 UNION ALL SELECT 161 UNION ALL SELECT 162 UNION ALL SELECT 163 UNION ALL SELECT 164 UNION ALL + SELECT 165 UNION ALL SELECT 166 UNION ALL SELECT 167 + ) AS nums + ON nums.n <= TIMESTAMPDIFF(HOUR, sf.start_floor, sf.end_floor) +) AS h +LEFT JOIN dumper_cycles dc + ON dc.t_stamp >= h.hour_ts + AND dc.t_stamp < h.hour_ts + INTERVAL 1 HOUR +GROUP BY h.hour_ts +ORDER BY h.hour_ts; 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 index d4d2034..8b4365a 100644 --- 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 @@ -18,7 +18,7 @@ "cacheEnabled": false, "database": "MariaDB", "fallbackEnabled": false, - "lastModificationSignature": "4addcac1cda8fc044de4f3bb9aed74d86f9f19406b2bdce868963d49635ab266", + "lastModificationSignature": "d454ce1a9aca40c387f2a302b05113880a32825fa474048962bb8386cc73882a", "permissions": [ { "zone": "", @@ -27,7 +27,7 @@ ], "lastModification": { "actor": "admin", - "timestamp": "2025-10-18T23:43:21Z" + "timestamp": "2025-10-19T15:58:12Z" }, "parameters": [ {