Skip to content

Add Device Story show page - #725

Merged
Nakushi64 merged 14 commits into
Safecast:masterfrom
rdeskins:device_story-show
Nov 11, 2020
Merged

Nakushi64 merged 14 commits into
Safecast:masterfrom
rdeskins:device_story-show

Conversation

@rdeskins

Copy link
Copy Markdown
Contributor

Here's what I have right now. Tried to have a similar layout to the realtime website, but had to put the map below to make everything fit.
image

@rdeskins
rdeskins requested a review from matschaffer August 17, 2020 23:36
@rdeskins rdeskins linked an issue Aug 17, 2020 that may be closed by this pull request
6 of 9 tasks
@robouden

Copy link
Copy Markdown
Contributor

Good progress!
Can we have the same scaling/time selection as in Garfana?
Also possible to export the data or links for exporting the displayed data?

Rob

@rdeskins

Copy link
Copy Markdown
Contributor Author

Good progress!
Can we have the same scaling/time selection as in Garfana?
Also possible to export the data or links for exporting the displayed data?

Rob

For the scaling/time, do you mean how Grafana will show the last 2 days? I can change the CPM graph to that scaling.
I'm not sure what you mean by the exporting part though.

@robouden

Copy link
Copy Markdown
Contributor

"For the scaling/time, do you mean how Grafana will show the last 2 days" meaning select the time for the display. Not only 2 days.

For the export see
Screenshot from 2020-08-18 09-03-23

@rdeskins

Copy link
Copy Markdown
Contributor Author

With the Grafana iframes, i haven't found a way to add a time range selector when embedding a graph.
I see what you mean now about the exporting. I could add a link to that, but maybe it would make sense to add a link to the whole grafana page, especially since I can't find a way to add time scaling.

@robouden

Copy link
Copy Markdown
Contributor

Robin,

Yes, I came across the same issue with Iframes on RT a long time ago and decided to use Worpress with links to Grafana to make things work. I think it is a necessity to use the time scaling for displaying the data.

rob

@matschaffer

Copy link
Copy Markdown
Contributor

Let's not implement time scrolling on this page. Just provide a link to the grafana view if people want to dig deeper.

The goal is to replace https://realtime.safecast.org/sensors/200041/ which doesn't include on-page time selection either.

I would just mimic that page for now.

Here's a rough sketch of how I'd lay it out.

USA__NY__Shrub_Oak___SAFECAST

We can add fields to the device_stories table for stuff ttserve doesn't provide, though it comes with the assumption that some moderator (or eventually device owner) will help fill those in.

@rdeskins

Copy link
Copy Markdown
Contributor Author

This is what it looks like right now after after those changes. Imo the table still looks a bit weird, but its easier to read the measurements/dates and notice the grafana link at least.
image

@rdeskins
rdeskins marked this pull request as ready for review August 20, 2020 20:26
Comment thread app/views/device_stories/show.html.erb Outdated
<td style="font-size: 25px"><%= @device_story.last_values %></td>
</tr>
</table>
<a href="http://grafana-dev.safecast.cc/d/DFSxrOLWk/safecast-device-details?orgId=1&from=now-90d&to=now&refresh=15m&var-device_urn=<%= @device_story.device_urn %>"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should swap this out for a configurable value, and set the default to https://grafana.safecast.cc/d/DFSxrOLWk

@Nakushi64

Copy link
Copy Markdown
Contributor

Screenshot of the current state of the layout: Screenshot 2020-11-10 at 14 40 04

@Nakushi64
Nakushi64 merged commit 1baaa1d into Safecast:master Nov 11, 2020
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.

4 participants