Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summaries does not work in 5.0.0 #160

Closed
SC-66 opened this issue Aug 21, 2024 · 6 comments
Closed

Summaries does not work in 5.0.0 #160

SC-66 opened this issue Aug 21, 2024 · 6 comments
Labels
Milestone

Comments

@SC-66
Copy link

SC-66 commented Aug 21, 2024

In version 5.0.0 the "Summaries" works completely different compared to 4.2.0. It looks like a bug, if not then all our dashboards must be remade.
First, this is the output in 4.2.0 when using Range for an attribute:
image

And this is the same when using 5.0.0:
image

  1. The element name is now shown before the attribute. This is not the same behavior as in 4.2.0.
  2. Time is now written "time". In 4.2.0 it was "Time". Why change?
  3. The Range summary is not working; It does not present the Range value of that attribute for selected time period (in this example: Today). Instead it shows the range for a set time period of 30 secs, why that time period, and logs it as separate values. The Range, and al other summarize types should use the time period set by the Grafana time picker. This is a completely new behavior which must be a bug.
    (Note: We are using webapi 2023 SP1)
@SC-66
Copy link
Author

SC-66 commented Sep 3, 2024

Can this be fixed in 5.1.0?

@coderReview
Copy link
Collaborator

  1. This was a change in naming
  2. That was a typo that was fixed
  3. I made some changes in v5.1.0 to use more options in PiWebAPI. If you can provide an example of the PiWebAPI Url to use I can check against what is being used

@coderReview coderReview added this to the Version 5.1.0 milestone Sep 6, 2024
@SC-66
Copy link
Author

SC-66 commented Sep 9, 2024

Hello!

  1. Can it be changed back as it was? Or as an option to use? Having the element name before the attribute name for every data point cause makes it very difficult to use general (generic) transformations for all elements.

  2. OK!

  3. I might misunderstand what you mean by "example of the PiWebAPI Url to use" but for example, here is the query that works in 4.2.0 but not in 5.0.0: ( I cannot provide the 5.0.0 query since we cant use that version, we changed back to 4.2.0)
    In the example below "Range" is used, but we use all summaries types.
    image

{
"request": {
"url": "api/datasources/proxy/uid/",
"data": {
"Req1": {
"Method": "GET",
"Resource": "https:///piwebapi/attributes?selectedFields=Type%3BDefaultUnitsName%3BDescription%3BWebId%3BName%3BPath&path=\\\\Applications\Mobile Machines\Grafana\GAR_111BRO|TotalDrilledMeters"
},
"Req1001": {
"Method": "GET",
"ParentIds": [
"Req1"
],
"Parameters": [
"$.Req1.Content.WebId"
],
"Resource": "https:///piwebapi/streamsets/summary?startTime=2024-09-07T22:00:00.000Z&endTime=2024-09-08T21:59:59.999Z&intervals=6000&summaryType=Range&calculationBasis=EventWeighted&webId={0}"
}
},
"method": "POST",
"hideFromInspector": false
},
"response": {
"Req1": {
"Status": 200,
"Headers": {
"Content-Type": "application/json; charset=utf-8"
},
"Content": {
"WebId": "",
"Name": "TotalDrilledMeters",
"Description": "Total Drilled Meters",
"Path": "\\\\Business Units\Garpenberg\Assets\Mine\Mobile Machines\Drilling and charging\Face drilling\GAR_111BRO|TotalDrilledMeters",
"Type": "Double",
"DefaultUnitsName": "meter"
}
},
"Req1001": {
"Status": 200,
"Headers": {
"Content-Type": "application/json; charset=utf-8"
},
"Content": {
"Links": {},
"Items": [
{
"WebId": "",
"Name": "TotalDrilledMeters",
"Path": "\\\\Business Units\Garpenberg\Assets\Mine\Mobile Machines\Drilling and charging\Face drilling\GAR_111BRO|TotalDrilledMeters",
"Links": {
"Source": "https:///piwebapi/attributes/"
},
"Items": [
{
"Type": "Range",
"Value": {
"Timestamp": "2024-09-07T22:00:00Z",
"Value": 844.5999999999767,
"UnitsAbbreviation": "m",
"Good": true,
"Questionable": false,
"Substituted": false,
"Annotated": false
}
}
]
}
]
}
}
}
}

@pvmagacho-nde
Copy link

pvmagacho-nde commented Sep 9, 2024

  1. You can use the Regex to remove it. Search: (.*)|(.*) and Replace: $2
  2. ok
  3. I will check but the URL should be the same

@coderReview
Copy link
Collaborator

coderReview commented Sep 19, 2024

These are the possible URLs:

  1. "streamsets/summary?startTime=2024-09-19T06:13:23Z&endTime=2024-09-19T18:13:23Z&summaryType=Range&summaryBasis=EventWeighted&summaryDuration=1h&sampleType=Interval&sampleInterval=1h&webId=
  2. streamsets/summary?startTime=2024-09-19T06:13:51Z&endTime=2024-09-19T18:13:51Z&summaryType=Range&summaryBasis=EventWeighted&summaryDuration=1h&webId=
  3. streamsets/summary?startTime=2024-09-19T06:14:05Z&endTime=2024-09-19T18:14:05Z&summaryType=Range&summaryBasis=EventWeighted&webId=

All are working

@pvmagacho-nde
Copy link

Will be fixed in v5.1.0 final. This will allow for better migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants