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

Update updates.json #632

Merged
merged 2 commits into from
Apr 23, 2020
Merged

Update updates.json #632

merged 2 commits into from
Apr 23, 2020

Conversation

Dulanic
Copy link
Collaborator

@Dulanic Dulanic commented Apr 22, 2020

Added duration and time since last update as requested in adriankumpf#617

Added duration and time since last update as requested in adriankumpf#617
@@ -144,7 +144,7 @@
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "select start_date, end_date, version from updates where $__timeFilter(start_date) and car_id = $car_id;",
"rawSql": "select start_date, end_date, date_trunc('second',end_date-start_date) as update_duration, date_trunc('second',start_date-lag(start_date) over ( order by start_date)) as since_last_update , version from updates where $__timeFilter(start_date) and car_id = $car_id; ",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing 1 space... not sure if json parsing will be happy about it, likely a good idea to add that space back. There's a space not necessary at the end of the line, perhaps that's where the missing space in the beginning ended up?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure where specifically you mean. This ran fine in grafana. Was a export straight from my grafana.

Corrected space
Copy link
Collaborator

@adriankumpf adriankumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@adriankumpf adriankumpf merged commit eae5104 into teslamate-org:master Apr 23, 2020
@Dulanic Dulanic deleted the patch-3 branch May 3, 2020 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants