fixed filtering in the history
This commit is contained in:
parent
1c095306e0
commit
5e03d48ced
@ -1823,17 +1823,17 @@
|
|||||||
"$": [
|
"$": [
|
||||||
"ts",
|
"ts",
|
||||||
192,
|
192,
|
||||||
1749540890888
|
1749543336268
|
||||||
],
|
],
|
||||||
"$ts": 1749540890888
|
"$ts": 1749543336268
|
||||||
},
|
},
|
||||||
"startDate": {
|
"startDate": {
|
||||||
"$": [
|
"$": [
|
||||||
"ts",
|
"ts",
|
||||||
192,
|
192,
|
||||||
1749540890888
|
1749543336268
|
||||||
],
|
],
|
||||||
"$ts": 1749499200000
|
"$ts": 1749541536268
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
@ -2006,7 +2006,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"props": {
|
"props": {
|
||||||
"formattedValue": "Jun 4, 2025 12:00 AM",
|
"formattedValue": "Jun 10, 2025 11:45 AM",
|
||||||
"style": {
|
"style": {
|
||||||
"margin": 15
|
"margin": 15
|
||||||
}
|
}
|
||||||
@ -2064,6 +2064,7 @@
|
|||||||
"config": {
|
"config": {
|
||||||
"expression": "now()"
|
"expression": "now()"
|
||||||
},
|
},
|
||||||
|
"enabled": false,
|
||||||
"type": "expr"
|
"type": "expr"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2090,7 +2091,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"props": {
|
"props": {
|
||||||
"formattedValue": "Jun 5, 2025 11:34 AM",
|
"formattedValue": "Jun 11, 2025 12:15 PM",
|
||||||
|
"maxDate": {
|
||||||
|
"$": [
|
||||||
|
"ts",
|
||||||
|
192,
|
||||||
|
1749542669794
|
||||||
|
],
|
||||||
|
"$ts": 1749715452000
|
||||||
|
},
|
||||||
"style": {
|
"style": {
|
||||||
"margin": 15
|
"margin": 15
|
||||||
},
|
},
|
||||||
@ -2098,9 +2107,9 @@
|
|||||||
"$": [
|
"$": [
|
||||||
"ts",
|
"ts",
|
||||||
0,
|
0,
|
||||||
1749541102438
|
1749543373731
|
||||||
],
|
],
|
||||||
"$ts": 1749108890000
|
"$ts": 1749629736000
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -2286,8 +2295,22 @@
|
|||||||
"$ts": 1747562336635
|
"$ts": 1747562336635
|
||||||
},
|
},
|
||||||
"priority_filters": "",
|
"priority_filters": "",
|
||||||
"time_from_filter": 1748980800000,
|
"time_from_filter": {
|
||||||
"time_to_filter": 1749108890000
|
"$": [
|
||||||
|
"ts",
|
||||||
|
192,
|
||||||
|
1749543368762
|
||||||
|
],
|
||||||
|
"$ts": 1749541536000
|
||||||
|
},
|
||||||
|
"time_to_filter": {
|
||||||
|
"$": [
|
||||||
|
"ts",
|
||||||
|
192,
|
||||||
|
1749543373742
|
||||||
|
],
|
||||||
|
"$ts": 1749629736000
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"name": "Table"
|
"name": "Table"
|
||||||
@ -2302,17 +2325,6 @@
|
|||||||
"config": {
|
"config": {
|
||||||
"path": "this.custom.time_from_filter"
|
"path": "this.custom.time_from_filter"
|
||||||
},
|
},
|
||||||
"enabled": false,
|
|
||||||
"transforms": [
|
|
||||||
{
|
|
||||||
"formatType": "datetime",
|
|
||||||
"formatValue": {
|
|
||||||
"date": "medium",
|
|
||||||
"time": "medium"
|
|
||||||
},
|
|
||||||
"type": "format"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "property"
|
"type": "property"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2321,12 +2333,15 @@
|
|||||||
"config": {
|
"config": {
|
||||||
"path": "this.custom.time_to_filter"
|
"path": "this.custom.time_to_filter"
|
||||||
},
|
},
|
||||||
"transforms": [
|
"type": "property"
|
||||||
{
|
}
|
||||||
"code": "\tfrom java.util import Date\n\tfrom java.text import SimpleDateFormat\n\n\tif value is not None:\n\t formatter \u003d SimpleDateFormat(\"yyyy-M-d H:mm:ss\")\n\t return formatter.format(Date(value))\n\telse:\n\t return \"\"\n",
|
},
|
||||||
"type": "script"
|
"props.columns[2].filter.number.value": {
|
||||||
}
|
"binding": {
|
||||||
],
|
"config": {
|
||||||
|
"path": "this.custom.time_to_filter"
|
||||||
|
},
|
||||||
|
"enabled": false,
|
||||||
"type": "property"
|
"type": "property"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2458,8 +2473,7 @@
|
|||||||
"condition": ""
|
"condition": ""
|
||||||
},
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"condition": "",
|
"condition": "later than date time"
|
||||||
"value": ""
|
|
||||||
},
|
},
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"number": {
|
"number": {
|
||||||
@ -3103,11 +3117,11 @@
|
|||||||
{
|
{
|
||||||
"Description": "alm:papapapa - papapapa",
|
"Description": "alm:papapapa - papapapa",
|
||||||
"Duration": "00:02:02",
|
"Duration": "00:02:02",
|
||||||
"EndTimestamp": 1749541007000,
|
"EndTimestamp": 1749543629000,
|
||||||
"ID": 86,
|
"ID": 155,
|
||||||
"MCM": "System",
|
"MCM": "System",
|
||||||
"Priority": "Low",
|
"Priority": "Low",
|
||||||
"StartTimestamp": 1749540885000,
|
"StartTimestamp": 1749543507000,
|
||||||
"Tag": "alm:papapapa"
|
"Tag": "alm:papapapa"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -3233,8 +3247,22 @@
|
|||||||
"download_in_progress": true,
|
"download_in_progress": true,
|
||||||
"enable_timeout": false,
|
"enable_timeout": false,
|
||||||
"priority_filters": "",
|
"priority_filters": "",
|
||||||
"time_from_filter": 1748980800000,
|
"time_from_filter": {
|
||||||
"time_to_filter": 1749108890000,
|
"$": [
|
||||||
|
"ts",
|
||||||
|
192,
|
||||||
|
1749543368762
|
||||||
|
],
|
||||||
|
"$ts": 1749541536000
|
||||||
|
},
|
||||||
|
"time_to_filter": {
|
||||||
|
"$": [
|
||||||
|
"ts",
|
||||||
|
192,
|
||||||
|
1749543373742
|
||||||
|
],
|
||||||
|
"$ts": 1749629736000
|
||||||
|
},
|
||||||
"type_filters": null
|
"type_filters": null
|
||||||
},
|
},
|
||||||
"events": {
|
"events": {
|
||||||
|
|||||||
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"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": "6748eaa152183180c6431e52bd5d1c58f2e9026fefc3fe2663abf90dc4b6a2c7",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"zone": "default",
|
||||||
|
"role": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"lastModification": {
|
||||||
|
"actor": "ilia-gu-autstand",
|
||||||
|
"timestamp": "2025-06-09T10:14:52Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -101,22 +101,16 @@ def set_message_filters(self):
|
|||||||
def set_time_from_filters(self):
|
def set_time_from_filters(self):
|
||||||
"This filter sets the time from for history"
|
"This filter sets the time from for history"
|
||||||
time = self.props.value
|
time = self.props.value
|
||||||
utc_offset = -self.session.props.device.timezone.utcOffset
|
|
||||||
#time = system.date.addHours(time, utc_offset)
|
|
||||||
epoch = system.date.toMillis(time)
|
|
||||||
payload = {}
|
payload = {}
|
||||||
payload["data"] = epoch
|
payload["data"] = time
|
||||||
system.perspective.sendMessage("set-from-filters", payload = payload,
|
system.perspective.sendMessage("set-from-filters", payload = payload,
|
||||||
scope = "page")
|
scope = "page")
|
||||||
|
|
||||||
def set_time_to_filters(self):
|
def set_time_to_filters(self):
|
||||||
"This filter sets the time to for history"
|
"This filter sets the time to for history"
|
||||||
time = self.props.value
|
time = self.props.value
|
||||||
utc_offset = -self.session.props.device.timezone.utcOffset
|
|
||||||
#time = system.date.addHours(time, utc_offset)
|
|
||||||
epoch = system.date.toMillis(time)
|
|
||||||
payload = {}
|
payload = {}
|
||||||
payload["data"] = epoch
|
payload["data"] = time
|
||||||
system.perspective.sendMessage("set-to-filters", payload = payload,
|
system.perspective.sendMessage("set-to-filters", payload = payload,
|
||||||
scope = "page")
|
scope = "page")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user