Giter VIP home page Giter VIP logo

terravisu's Introduction

terravisu's People

Contributors

bo-duke avatar bruhnild avatar cfarcy avatar dependabot[bot] avatar dlercier avatar github-actions[bot] avatar lepetittim avatar mabhub avatar submarcos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

terravisu's Issues

Duplicate layer at backend/API level

Change layer duplication at backend / API level

  • Create API viewset @action(detail=True)
  • Change admin endpoint
  • Take care about style config, style images duplication, style images references etc...
  • Name new layer with "Old name (copy)"

Improve source refresh status in admin

Refresh status is get from async celery task.

These tasks are deleted in backend.

Sources are marked as "PENDING" when no data is find.

Solution:

  • Store results (success, error, pending, started) in Source.report .
    • state / start time / end time / result
  • Read from this to provide info to admin.
  • Store all refresh infos in report (added / update / deleted count + exceptions)

[Layer] Layer configuration error

When creating a new layer :

if you go to the legend tab or the style tab > Icon representation without having saved the layer you get "a problem has occurred" and you lose all your unsaved layer config

Peek 27-07-2023 12-06

[Source] Manage the refresh of data sources

Currently refreshing data sources can only be done source after source. In addition, the current refresh of a source blocks the refresh request of a second source.

Can the user be allowed to launch a batch of data refresh (select all, be able to remove sources from the list of data to be refreshed, etc) ?

How does it work?

I managed to install it and find a data source here: https://www.data.gouv.fr/fr/datasets/liste-des-gares/
I've imported the data and filled in all the fields, but after that I don't know what to do.
When I go to http://localhost:8080/ I get a redirect to http://localhost:8080/auth/ with the error below:

js Failed to load resource: the server responded with a status of 500 (Internal Server Error) withEnv.js:19 env.json is invalid. Please create a public/env.json from public/env.dist.json
Is there a step-by-step tutorial for getting started?

[Source] Improve data sources list / detail in admin

List :

  • Buttons : drop text but keep tootlip with them
  • Drop edit button in list (edition is done by click on row)
    • on all modules if possible
  • Minimize status tooltip (status text + start time formatted + end time formatted)
    • no json
    • Status in text
    • Start date
    • End date
    • nb of rows
    • nb add rows
    • nb updated rows
    • nb delete rows
    • nb errors
  • Add sort and filter by status & data type
  • Add status "need sync" when a source is updated (file or SQL query updated)
  • Add a Date field to sort by last update (take care of report missing, translate with current browser timezone)
  • Status tooltip should only report errors number, not detail
  • Add associated layers count in column (sorted / filtered)

Detail / edit :

  • add global "Infos" panel (read only):

    • Add created / updated datetime
    • Add creator name
    • Layer list
  • Allow to force refresh source if button disabled

  • Go to report tab if click on status icon

  • Report : Global report : keep only excpetion message in cas of error (no success report)

  • Report : Format errors in table overflowed

Then:

  • Add an Access field to sort and filter by private/public values (keep if we move access to layers)

[Style] When creating a new layer, map_style isn't created

Steps to reproduce :

  • Create a new layer
  • Add a name, datasource
  • Add basic style (circle color and diameter for example)
  • Save

The settings returned by https://<instance>/api/geolayer/<layer_id>/ doesn't have a map_style in main_style

  • Reopen the layer's form
  • Save without changing anything

This time, the settings do return map_style.


The consequences of that bug are that the front-end can't display the layer until it is re-saved.

The weird part :

When saving the layer the first time, the PUT request response, has a valid map_style parameter but the GET request reponse just after that doesn't have it.

Examples of payload to reproduce (only the "main_style" part of the settings :

first PUT https://<instance>/api/geolayer/<id>/

{
	"main_style": {
		"type": "wizard",
		"min_zoom": 0,
		"max_zoom": 24,
		"map_style_type": "circle",
		"style": {
			"circle_color": {
				"type": "fixed",
				"value": "#91ace2"
			},
			"circle_radius": {
				"type": "fixed",
				"value": 30
			}
		},
		"map_style": {
			"type": "circle",
			"minzoom": 0,
			"maxzoom": 24,
			"paint": {
				"circle-color": "#91ace2",
				"circle-radius": 30
			}
		}
	}
}

GET https://<instance>/api/geolayer/<id>/

{
	"main_style": {
		"map_style_type": "circle",
		"max_zoom": 24,
		"min_zoom": 0,
		"style": {
			"circle_color": {
				"type": "fixed",
				"value": "#91ace2"
			},
			"circle_radius": {
				"type": "fixed",
				"value": 30
			}
		},
		"type": "wizard",
	}
}

The second PUT has exactly the same response as the first one

But GET https://<instance>/api/geolayer/<id>/ after the second PUT receives :

{
	"main_style": {
		"type": "wizard",
		"style": {
			"circle_color": {
				"type": "fixed",
				"value": "#91ace2"
			},
			"circle_radius": {
				"type": "fixed",
				"value": 30
			}
		},
		"max_zoom": 24,
		"min_zoom": 0,
		"map_style_type": "circle",
		"map_style": {
			"type": "circle",
			"minzoom": 0,
			"maxzoom": 24,
			"paint": {
				"circle-color": "#91ace2",
				"circle-radius": 30
			}
		}
	}
}

I compared the body of the two PUT requests, they're the same (except the update date) so it seems like a backend bug

From Mapbox to Maplibre

  • Define admin base layer in config or provide default (first one)
  • Use this base layer in admin view edition
  • Move from Mapbox to Maplibre
  • Delete Mapbox option / Token in settings (it should be used in style url)
  • Mapbox sprites icons excluded from style config list in admin. Ability to set manually sprite images availables.

[URL] Zoom URL change when swithing layer

In this case we start by displaying the layer Tour 1 with the zoom 7.19.
When switching to the layer Tour 2, the zoom URL is supposed to stay the same but it changes into 6.61

Here is a gif to illustrate the example :

Peek 01-08-2023 09-41

[View] Add a default empty view

If no view available (empty or all private), user show nothing.

He should at least empty menu and login bouton. Maybe map or message ?

Provide and use images for map styles in each layer

  • As pictogram used in for symbols

  • As patterns used for fill

  • Backend storage and providing

  • API write

  • Legend

  • Symbol part

  • Admin style

  • Frontend display

  • Fill pattern

  • Admin

  • Frontend

This should be defined in admin / layer and used in frontend

Password management

Actually, it's not possible:

  • For an admin to change a user password
  • For a user, to change its own password

Add prod install process

  • stack example with install ready to deploy, zipped and attach to release at each release event in CI
  • full documented in docs/install.rst

Improve source refresh process

Actually, a single transaction is performed to refresh a source.
This can take a very long time.

Improve refresh status by creating a new temporary layer, adding features, index to ES, THEN delete old one and linking new one. Perform database transaction per feature refreshed. If error occured, delete new layer and ES index.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.