nens / parramatta-dashboard

Dashboard web-app for the City of Parramatta
https://parramatta.lizard.net/clients/parramatta/
GNU General Public License v3.0
0 stars 0 forks source link

Tile dashboards show only default time period #221

Closed lexvand closed 5 years ago

lexvand commented 5 years ago

Topdesk: 1905 0097

All graph tiles in all dashboards show the default time period (last 24 hours and 12 hours in the future). When a different time is configured for the dashboard, this is now ignored.

For the IJGenZON and Hunze en Aas dashboards every tile has now a time period configuration.

It would be preferable if a dashboard can has a generic time period configured which is then overridden by the configuration per tile.

[FRNT-218] created by wolf.schouten

lexvand commented 5 years ago

Remco Gerlich You had a phone conversation about this issue with Martijn earlier today?

by wolf.schouten

lexvand commented 5 years ago

I’ve looked at it with Remco and this is due to the fact that all properties of the configuration json (except for tiles), have now become part of a 2nd meta property.

This means that the configuration file should now look more like:

{

meta: [

periodHoursRelativeToNow: [-366, 120],

referenceLevels ..,

gridView ..,

logo ..,

mapBackgrounds ..,

title ..,

headerColors ..

],

tiles: [

title ..,

url ..,

imageUrl ..,

renderAsImage ..,

type ..

]

}

instead of this:

{

periodHoursRelativeToNow: [-366, 120],

meta: [

gridView ..,

logo ..,

mapBackgrounds ..,

title ..,

headerColors ..

],

tiles: [

title ..,

url ..,

imageUrl ..,

renderAsImage ..,

type ..

]

referenceLevels ..

}

Edit: I’ve added an example file for the ijgenzon dashboard.

ijgenzon_conf_with_meta_property

by madeleine.vanwinkel

lexvand commented 5 years ago

Madeleine van Winkel
Is there a technical reason for this?
Because this means that all dashboards still need to be checked and edited to make sure the periodHoursRelativeToNow is configured correctly.

by wolf.schouten

lexvand commented 5 years ago

Wolf Schouten

Remco Gerlich

When refactoring, all other properties besides tiles became part of meta. This is done partly because it does give a better technical overview and because of some miscommunication.

Remco Gerlich

Pull request for a better readme:

https://github.com/nens/lizard-tile-dashboard/pull/55

by madeleine.vanwinkel

lexvand commented 5 years ago

Wolf Schouten

Bespreek jij dit verder met Martijn? Of zal ik hem nog even een mailtje sturen?

by madeleine.vanwinkel

lexvand commented 5 years ago

Pull request updated with comment of Remco.

by madeleine.vanwinkel

lexvand commented 5 years ago

Wolf Schouten Madeleine has updated the documentation ( https://github.com/nens/lizard-tile-dashboard/blob/master/configuration/clientConfiguration.rst , checking whether this documentation is useful like this is also on the list for testing) and I will add a bit about the getFeatureInfo config later.

I could move all the periodHoursRelativeToNow to the meta property from the command line, probably safer and quicker than doing it by hand.

by remco.gerlich

lexvand commented 5 years ago

I notice there are a lot more fields not in ‘meta’ yet, this is a result of putting the tile dashboard in production untested recently, we didn’t know exactly what had changed.

Also a big flaw in our current ClientConfigurations, due to the way we set up the multiple dashboards per site thing: I can’t see from a configuration what client the configuration is for…

I think the only top level properties now should be ‘meta’ and ‘tiles’, but the configurations have options that I’ve never seen yet (like ‘referenceLevels’ outside of a tile, huh) and I need to check first what their actual status is.

I obviously completely forgot about ‘fakeData’ which should also be on the top level and isn’t documented yet.

IDs of configurations and fields they have that are other than ‘meta’ or ‘tiles':

23 ['periodHoursRelativeToNow']
24 ['periodHoursRelativeToNow', 'referenceLevels']
31 ['dashboardTitle', 'showTermsAndConditions', 'saveTermsAndConditionsSigned', 'refreshAutomatic', 'refreshEveryMiliseconds', 'iframeBaseTileId', 'referenceLevels', 'publicTiles', 'trainingDashboards']
28 ['dashboardTitle', 'showTermsAndConditions', 'saveTermsAndConditionsSigned', 'refreshAutomatic', 'refreshEveryMiliseconds', 'trainingDashboards', 'referenceLevels', 'publicTiles', 'iframeBaseTileId', 'timezones', 'fakeData', 'nowDateTimeUTC']
29 ['periodHoursRelativeToNow', 'referenceLevels']
27 ['dashboardTitle', 'showTermsAndConditions', 'saveTermsAndConditionsSigned', 'refreshAutomatic', 'refreshEveryMiliseconds', 'trainingDashboards', 'referenceLevels', 'iframeBaseTileId', 'publicTiles', 'timezones', 'fakeData', 'nowDateTimeUTC']
25 ['periodHoursRelativeToNow', 'referenceLevels']
2 ['periodHoursRelativeToNow', 'referenceLevels']
10 ['referenceLevels', 'periodHoursRelativeToNow']
1 ['showTermsAndConditions', 'saveTermsAndConditionsSigned', 'refreshAutomatic', 'refreshEveryMiliseconds', 'referenceLevels', 'iframeBaseTileId', 'publicTiles', 'trainingDashboards']
26 ['periodHoursRelativeToNow', 'referenceLevels']
36 []
5 []
9 ['periodHoursRelativeToNow']
11 ['periodHoursRelativeToNow', 'referenceLevels', 'isPublic']
16 ['referenceLevels', 'iframeBaseTileId', 'publicTiles']
17 ['referenceLevels', 'iframeBaseTileId', 'publicTiles']
21 ['periodHoursRelativeToNow']
18 ['periodHoursRelativeToNow', 'referenceLevels']
19 ['periodHoursRelativeToNow', 'referenceLevels']
20 ['periodHoursRelativeToNow', 'referenceLevels']
7 []
32 ['periodHoursRelativeToNow', 'referenceLevels', 'isPublic']
30 ['periodHoursRelativeToNow', 'referenceLevels']
34 []
35 ['periodHoursRelativeToNow', 'referenceLevels', 'isPublic']
33 []
8 []
3 []

by remco.gerlich

lexvand commented 5 years ago

I checked that the other fields (referenceLevels and isPublic) should still be in the root of the JSON, am updating the docs. No action needed there.

As I was already in the Django shell doing for loops over these configs, I also moved the periodHoursRelativeToNow for all of them into the ‘meta’ part.

So this is fixed now.

by remco.gerlich