-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
GNIP-78: GeoNode generic "Apps" model to include pluggable entities into the framework #6684
Comments
We will use a mixture of MapStore2 Apps like Dashboard, MapStories and there like and 'third party' applications completely decoupled from GeoNode like shiny applications running on their own server. The third-party applications will most likely just hold some hyperlink to get there but should have some of the ResourceBase metadata info to get them displayed in searches. Since those third-party applications would be out of the scope of the GeoNode system, authentification could not be used - or has to be done by OAuth scopes (TBD). :edit: To get other developers use this generic model (eg. cartologic), we could provide documentation on how to built a simple generic app. In the long run, we think about containerizing those third-party applications and host them as part of the GeoNode stack. But that's far-far-away. |
@gannebamm as you will know we already have several options for AuthN of third party apps:
Going in the direction of using GeoNode as a REST backend for multiple third party apps, even served from different domains, the documentation for these scenarios should be extended. |
Cartoview related to this GNIP
Cartoview is managing a couple of app types: Additionally Cartoview is offering app management from the UI, start, stop, suspend apps and so on Having a base App or Generic App type is kept to a minimum, for example a map catalog app, training material app, a pdf maps app are resource based apps however it does not require properties related to maps or layers so you need to keep the app definitions to the bare minimum (just enough to be a resource) which is what CartoView is doing If the app requires geographic properties like starting extent and layers, then use a map or a number of maps to define the app properties, a number of app property definitions are already available as definition wizards to ease the app development process deploying story maps or dashboards based on mapstore should be very simple already with Cartoview Before embarking on this GNIP I suggest spending sometime evaluating the capabilities of CartoView,
Looking forward to hear back from you all |
Dear @ahmednosman the only way to evaluate CartoView apps it to propose a PR to GeoNode. |
@ahmednosman the idea behind CartoView is instereseing, and it is pretty similar at its minimum to the concept that we're proposing here. The key differences are:
In brief, integrate the basic stuff in the core and let everyone build fantastic appls ontop of it :) |
|
|
@ahmednosman we have two distinct conecpts here:
From our side we are only committed to support GeoNode core development, and related critical components (geonode project, Geoserver integrations, etc.) |
Referring to the case study GeoStories APP can be deployed as an app outside the GeoNode Core You can consider the following parameters
correction: CartoView is already released for GeoNode 3 |
@ahmednosman the proposal is already taking into account generic APIs and models. No specific app will be included into the GNIP. The concept is exactly this one, creating a structure in geonode allowing to plugin any concrete apps implementation from outside geonode. The "MapStore GeoStory" use case would like to demonstrate how it could be possible to plug in a concrete app from an external package (that said MapStore Client library). About the cartologic tag, nice, but, again, if you want to backport and include any stuff into GeoNode core you will need to follow the contribution agreement as established by the community rules, i.e.:
|
…ble entities into the framework (#6713) * [Hardening] - Recenet Activity List for Documents error when actor is None * [Frontend] Monitoring: Bump "node-sass" to version 4.14.1 * [Frontend] Bump jquery to version 3.5.1 * [Fixes: #6519] Bump jquery to 3.5.1 (#6526) (cherry picked from commit e532813) # Conflicts: # geonode/static/lib/css/assets.min.css # geonode/static/lib/css/bootstrap-select.css # geonode/static/lib/css/bootstrap-table.css # geonode/static/lib/js/assets.min.js # geonode/static/lib/js/bootstrap-select.js # geonode/static/lib/js/bootstrap-table.js # geonode/static/lib/js/leaflet-plugins.min.js # geonode/static/lib/js/leaflet.js # geonode/static/lib/js/moment-timezone-with-data.js # geonode/static/lib/js/underscore.js * Merge branch 'master' of https://github.com/GeoNode/geonode into rest_api_v2_proof_of_concept # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit. * [Hardening] Re-create the map thumbnail only if it is missing * Fixes error with GDAL 3.0.4 due to a breaking change on GDAL (https://code.djangoproject.com/ticket/30645) * Fixes error with GDAL 3.0.4 due to a breaking change on GDAL (https://code.djangoproject.com/ticket/30645) * - Introducing the concept of "GeoNode App" Resource Base * [GeoApps] Add "Create new" Button to the apps list page * [GeoApps] Hooking Resources List pages * [GeoApps] Hooking GeoApp List page * [GeoApps] Hooking GeoApp rest v2 API serializers fixes * [GeoApps] Fix resourcebase_api polymorphic ctype filter * [GeoApps] REST API v2 "geostories" endpoints optimizations * [REST APIs V2] Make use of the new "bbox_polygon" field based on GeoDjango * [Fixes RemoteServices bbox parse] Merge branch 'search-by-extent' of https://github.com/mtnorthcott/geonode * [Fix migrations] Merge branch 'search-by-extent' of https://github.com/mtnorthcott/geonode * [Fix migrations] Merge branch 'search-by-extent' of https://github.com/mtnorthcott/geonode * [GeoApps] Adding "geoapp_edit" page * [GeoApps] Adding "geoapp_edit" page context * [GeoApps] Adding security info (access_token, user, ...) to the page context * [GeoApps] Adding client endpoints * [GeoApps] Missing "post_save" signal * [GeoApps] Finalize GeoApp resources management * Fix "bbox_to_projection" coords order * Fix 'bbox_to_projection' coords order * Fix "bbox_to_projection" coords order (cherry picked from commit 72d6c1e) * Fix "bbox_to_projection" coords order: check GDAL version >= 3.0.4 * Include missing 'mapstore2_adapter.geoapps' app to default INSTALLED_APPS * Include mapstore client branch dependencies into requirements * Revert security commit on branch * Minor review of the current advanced resource workflow implementation #6551 * Minor review of the current advanced resource workflow implementation #6551 * Fix tests on Travis * Fix tests on Travis * Fix tests on Travis * Fix tests on Travis * Fix tests on Travis (cherry picked from commit c7f651c) # Conflicts: # geonode/layers/tests.py * Fix logical errors on approval workflow * Fix logical errors on approval workflow (cherry picked from commit 7a3d5d0) * Fix tests on Travis * Cleanup "app_embed" template * Advanced workflow: remove change_permissions to the owner if not a manager * Advanced workflow: remove change_permissions to the owner if not a manager (cherry picked from commit 9a1552a) * Fix app_embed template * Advanced workflow: remove change_permissions to the owner if not a manager * Advanced workflow: remove change_permissions to the owner if not a manager * Advanced workflow: remove change_permissions to the owner if not a manager (cherry picked from commit f23096c) * Advanced workflow: remove change_permissions to the owner if not a manager (cherry picked from commit bfe51a7) * Advanced workflow: remove change_permissions to the owner if not a manager * Advanced workflow: remove change_permissions to the owner if not a manager (cherry picked from commit d9ec566) * Advanced workflow: filter actions stream returned to the users accordingly to their perms * Advanced workflow: filter actions stream returned to the users accordingly to their perms (cherry picked from commit 7f51346) * Advanced workflow: filter actions stream returned to the users accordingly to their perms * Add new settings from django-allauth 0.43.0 * Advanced workflow: filter actions stream returned to the users accordingly to their perms (cherry picked from commit e2522fd) * Add new settings from django-allauth 0.43.0 (cherry picked from commit 00f4be1) * Code styling alerts: remove unnecessary pass * Refreshing static libs * Refreshing static libs * Code styling alerts: remove unnecessary pass (cherry picked from commit 0676f6e) * Refreshing static libs (cherry picked from commit f27d0df) * Refreshing static libs (cherry picked from commit 5b166bc) * Advanced Workflow: Make sure the APIs counters are coherent with the visible resources * Advanced Workflow: Make sure the APIs counters are coherent with the visible resources (cherry picked from commit 1855d74) * fix english/italian translations (#6563) * fix english/italian translations (#6563) * Advanced Workflow: fix "request editing" action when published * Advanced Workflow: fix "request editing" action when published -> send messages to group managers too * Advanced Workflow: fix "request editing" action when published (cherry picked from commit 1041b12) * Advanced Workflow: fix "request editing" action when published -> send messages to group managers too (cherry picked from commit 5c93ef3) * Fix test on travis * fix english/italian translations (#6563) * fix english/italian translations (#6563) * fix english/italian translations (#6563) * Avoid override User settings on "set_attributes_from_geoserver" * - Docs links to 3.x branch * Improve Celery Async Tasks configuration (cherry picked from commit 50e208a) * Improve Celery Async Tasks configuration (cherry picked from commit d5150e8) * Improve Celery Async Tasks configuration (cherry picked from commit 50e208a) * - Replace build.geo-solutions.it with www.dropbox.com (cherry picked from commit 882e3e5) (cherry picked from commit 7b970f8) * [Security] Hardening Advanced Workflow resources visibility (cherry picked from commit 2103f13) (cherry picked from commit 025c82e) * [Hardening] Removing redundant and replacement of instance abstract from GeoServer * Bump drf-yasg from 1.17.1 to 1.20.0 * [Hardening] Fixes: db connection closed and worker hangs with celery 4.2+ celery/celery#4878 * [Hardening] Optimizing celery tasks settings * [Hardening] Optimizing celery tasks settings * - Documents REST v2 APIs * [Fixes #6596] Incorrect Legend displayed in the layer detail page (cherry picked from commit 0aa6902) * [Fixes #6596] Incorrect Legend displayed in the layer detail page (cherry picked from commit 0aa6902) * - Update travis dist to '20.04 focal' * - Fix geolimits panel translations * - Filter Comments on Recent Activities accordingly to the user's perms * [Hardening] Remove wrong class initializer * [Hardening] LGTM warning fixes * [CI Optimizations] - Continuous integration builders: CircleCI config based on "spcgeonode" docker-compose (cherry picked from commit 7f091a7) * - Enable "memcached" plugins for monitoring * - Extend "documents" to accept and render video, audio and more image formats - Add "attribution" field to ResourceBase model * - Generating documents thumbnails for video and audio mime types (cherry picked from commit d1f4251) (cherry picked from commit 5c89762) * - Merge with master branch * - Generating documents thumbnails for video and audio mime types (cherry picked from commit 197c7ab) * - Fixing doc image thumn generation * - Updating translations * - expose documents 'href' from REST serializer API endpoint * [Hardening] - expose **secured** documents 'href' from REST serializer API endpoint * [Hardening] - generate **secured** thumbnail for uploaded images * - Restore missing list key on GXP_PTYPES enumeration (cherry picked from commit 2352613) * [FIX #6626] add tinymce editor to resource text areas (cherry picked from commit 45bb0dc) * [FIX #6626] add tinymce editor to resource text areas (cherry picked from commit 45bb0dc) * [Hardening] Correctly manage "_resolve_object" exception as Django error templates (cherry picked from commit 017d885) # Conflicts: # geonode/views.py * - Remove wrong migration * [Hardening] Using "apply_async" instead of "delay" for async signals calls * [Hardening] Avoid exit prematurely from geoserver cascading delete signal * Fix travis tests * [Fixes #5779] Data edition permissions set in GeoNode for a layer are not applied on the WFS (cherry picked from commit 9e4e839) * - Cleaning up wrong migrations * [Performance] - Improve Style editing requests callbacks * [Performance] - Transform "geoserver_post_save_layers" to an asynchronous task * [Performance] - Improve Style editing requests callbacks * [Optimization] Improve 'navbar' content reposition script * [Performance] - Transform "geoserver_post_save_layers" to an asynchronous task * [Performance] - Improve Style editing requests callbacks * FIXES[#6653] Mail notifications for private datasets are public * - exclude query optimization * [Performance] Dinamically loading the list of users geo-limits (cherry picked from commit c54cc61) (cherry picked from commit 756c1aa) * [Fixes: #6640] Style Tag outside of html (#6657) * [Minor Layout Issue] - Missing title on "map list" page (cherry picked from commit 971e65f) * added Document Creation Fallback, fixed exclude_user_ids.append() * - Correct "geoapps" notification types * - Fix remaining issues: 1. Layer create does no send "title" before sending notifications - 2. Doc created does not set "permissions" before sending notifications * Typo: _QUEUE_ALL_FLAG * Typo: _QUEUE_ALL_FLAG (cherry picked from commit 8d9118f) * - Fix asynchronous notification engine task * - Fix asynchronous notification engine task (cherry picked from commit 79274eb) * - Do not send notifications if the resource has no title * - Do not send notifications if the resource has no title (cherry picked from commit c3d470e) * - Asynchronous "probe" task for Remote Services * [FIXES #6653] Mail notifications for private datasets are public * - Fixes rating notifications * - Fixes rating notifications (cherry picked from commit b814692) * - Fixes "guardian.exceptions.ObjectNotPersisted: Object None needs to be persisted first" exception on "set_workflow_perms" calls * - Fixes "guardian.exceptions.ObjectNotPersisted: Object None needs to be persisted first" exception on "set_workflow_perms" calls (cherry picked from commit fe35d46) * - Fixes "guardian.exceptions.ObjectNotPersisted: Object None needs to be persisted first" exception on "set_workflow_perms" calls * - Fixes "guardian.exceptions.ObjectNotPersisted: Object None needs to be persisted first" exception on "set_workflow_perms" calls (cherry picked from commit dee7de1) * - Fix LGTM issues * - Fix LGTM issues (cherry picked from commit 08644a6) * - Fix LGTM issues * - Fix LGTM issues (cherry picked from commit df112c8) * no notifications for resource owner, except for comments. PEP 8 reformatting * resource owners will get notified on updates of their resources * [Fixes #6665] Improve WYSIWYG metadata editor to store formatted and plain texts * - Travis test-cases: "ensure owner won't be notified on upload" * [Hardening] Do not fail in case of datastore with multiple geometries * - Minor refactoring and clean out of the "geoserver_post_save_layers" task body * [Hardening] Make "set_attributes" method more resilient to "Attribute.MultipleObjectsReturned" exception * [Hardening] Make "helpers" methods more resilient to "Layer.MultipleObjectsReturned" and "Layer.DoesNotExist" exceptions * - Minor environmnet params improvements. Exposing DB connection timeouts to .env * - Explicit error codes along with description on Layer Upload form * [Transaltions] - Explicit error codes along with description on Layer Upload form * [Transaltions] - Explicit error codes along with description on Layer Upload form (cherry picked from commit 395089e) # Conflicts: # geonode/static/geonode/js/upload/LayerInfo.js (cherry picked from commit f62b69a) * [Docker] Use local nginx build * Merge branch 'master' of https://github.com/GeoNode/geonode into rest_api_v2_geonode_apps * [Hardening] More resiliet to 'missing thumbnail' on filesystem issues * - GeoApp Test Cases * - Typo * - Update mapstore client and adapter versions * - Set local .sh files exec perms * - Bump pycsw to version 2.6.0 * - Bump pycsw to version 2.6.0 * - Bump pycsw to version 2.6.0 * - Align "setup.cfg" to "requirements.txt" * - Fix travis Co-authored-by: Toni <[email protected]> Co-authored-by: Piotr Dankowski <[email protected]> Co-authored-by: Florian Hoedt <[email protected]>
Hello
We can develop this template
thanks
ahmed
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
…On Tue, Dec 22, 2020 at 12:57 PM Florian Hoedt ***@***.***> wrote:
After talking about this feature with some of my colleagues we thought
that a simple 'hello world' example would be awesome. Something like an
ultra-slim leaflet app maybe? @giohappy <https://github.com/giohappy>
@afabiani <https://github.com/afabiani> Would this be possible? I think
this would give the concept a big push.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6684 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADES3RY3CUBNPD6SZMZIR4LSWB3RZANCNFSM4UJBVMAA>
.
|
@ahmednosman Hi Ahmed are there any news for the example app? |
@gannebamm Hi Florian |
@ahmednosman not really, you can hook your client library and override/plugin your custom hookset. The hookset basically decides which templates to use to render the apps list, details and so on. You will need to provide also leaflet static files with the library of course. |
I see @afabiani . Do we have any documentation about that? https://docs.geonode.org/en/master/intermediate/viewer/index.html is currently empty. I think we had some documentation about the process somewhere? |
@afabiani Since there is currently no living example of a non-mapstore based GeoApp I would like to create one as a proof-of-concept for this old GNIP. Since I do not want to do anything complicated the outcome is simple:
Taking a look at the GeoStory implementation which is part of the To get started I used the django-mapstore-adapter with it GeoStory as geoapp type and refactored it. You can see my efforts here: https://github.com/gannebamm/geonode/tree/simpleGeoApp For some reason, the simple app is not listed if I want to create a new geoapp from the web-UI. Any help is very much appriciated. |
@gannebamm thanks for spending time on this. In the near future we're going to implement a new GeoApp and this would be the right time to review the code and, hopefully, simplify it. We will probably start working on this from the next week. I will ask the guys to have a look to your effort and take your notes into account to review the code. |
Don´t expect much of my refactoring. It is more like a brute force cutting of everything unrelated. I am happy to hear there will be more geoapps in the near future! |
Be careful, some important changes here will be done through GNIP-89 |
GNIP-78: GeoNode generic "Apps" model to include pluggable entities into the framework
Overview
The scope of this GNIP is to present a technical proposal for the integration of generic geospatial entities into GeoNode as part of the available Resource Bases.
The main goal is to provide a way for a GeoNode User to manage and share "Geo Applications" similarly to the other GeoNode entities, such as Documents, Layers and Maps.
Such Geo Applications could be any kind of object provided by a plugged in client library, which is not a Layer nor a Map.
As an instance Dashboards, GeoStories, Charts, Geospatial Analysis and so forth.
Before moving forward with the proposal, we need to take into account some prerequisites and constraints:
We want to manage such “Geo Applications” by using the same interfaces we already have in place for Layers, Maps and Documents.
This new entity needs to be managed somehow like one of the GeoNode’s ResourceBase ones.
We don’t want to change the GeoNode core model in order to add a new custom resources. Those “Geo Applications” must be somehow “pluggable” into GeoNode by adding external dependencies.
It is not possible, at this stage, a complete refactoring of the GeoNode model and APIs v1. Moreover we want those changes to be compatible with old GeoNode versions that, hopefully, should be upgradable to the new version without data losses.
Proposed By
@afabiani
@giohappy
@allyoucanmap
Assigned to Release
This proposal is for GeoNode 3.2.
State
Proposal
Given the prerequisites depicted above, the technical proposal is to introduce into GeoNode the concept of “Geo Application” (aka GeoApp).
A GeoApp in GeoNode, will be a container integrated into the core model able to be queried through both the standard (Tastypie) and REST APIs frameworks of GeoNode.
The GeoApp module, would be a new application of the GeoNode core project, containing the base abstract classes allowing any external plugin to define as many concrete applications they need.
Every GeoApp concrete instance, must define a unique “GeoApp Type” which will be translated into a
polymorphic_ctype
allowing GeoNode to seamlessly manage the concrete models and distinguish the GeoApp instances between the common ResourceBases and other GeoApp instances.By default, GeoNode will enable a new menu on the navigation toolbar, whose name could be customized through the settings.
This new section will allow admins to present on the frontend all the GeoApp instances plugged into GeoNode.
It will also be possible to disable such menus, allowing the developers to define their own customized menus, each for every GeoApp concrete instance.
GeoNode Core Model: GeoApp django application
The new GeoApp model, extends the ResourceBase model by adding few more generic fields for any further GeoApp implementation:
Geospatial fields, like, projection, zoom and center coordinates. The BBOX polygon is already part of the base model.
data
; a generic JSON blob field which will contain any kind of raw configuration associated with the app.GeoApp Model
GeoApp URIs
The generic GeoApp URIs will allow us to query and access the instances from GeoNode. Those can also be overridden for specific apps if needed.
Notice that the views templates will invoke the
client_tag_library
tags in order to dynamically render the final template. Such mechanism allows the plugged-in client library to, eventually, override the templates by editing thehooksets
.As an example, the
app_list
template will be defined as follows:The generic client hooksets are defined as below instead:
The client library must implement the methods above in order to return its own templates, specific to the GeoApp implementations (see later how the
mapstore-client
library can plug in the GeoStories to GeoNode).GeoApp REST APIs (v2)
Similarly to the models and client tags, the REST APIs too will be fully pluggable. The generic GeoApp application, will expose a set of predefined and generic api endpoints along with JSON serializers. Those ones could be overridden and extended in order to expose the APIs for the specific GeoApp instance.
The GeoApp attaches its own generic endpoint to the GeoNode REST API default router.
To complete the bundle, the GeoApp generic app will provide a set of predefined
viewsets
andserializers
, which can be eventually extended by the specific implementation.Use Case: MapStore GeoStories
ℹ️ demo instance available at https://dev.geonode.geo-solutions.it/
The MapStore client library for GeoNode, currently implements the concept of “GeoStory” as a concrete instance of the GeoApps.
GeoStories App Model
As explained above the library should override and extend several methods and templates in order to achieve that.
First of all, we will need to include the MapStore library extension as part of the GeoNode
INSTALLED_APPS
bundle.The new model must extend the GeoApp one and define a concrete
app_type
which will be translated by GeoNode as a newpolymorphic_ctype
.That’s it, there’s not much more to do here, unless we need to further specific fields to our model. Currently MapStore is able to store the whole GeoStories configuration as a JSON blob into the schema, therefore the data field of the generic app model is more than enough.
GeoStories Client Hooksets
We will need to render the GeoStories list, details and view templates. As explained before, this can be easily done by implementing the GeoNode client library generic Hooksets methods.
The MapStore client library can now define its own templates by injecting all the specific JavaScript code needed to manipulate a GeoStory.
GeoStories REST APIs v2
The final step is to plug GeoStories specific APIs to the GeoNode
router
. This requires a few more steps.Since the MapStore client and adapter are dynamically plugged into GeoNode, we will need to declare at initialization time which new
Django urls
we want to include into theresolver
.This is possible by including them from the app
__init__
class of the MapStore Adapter.In this way we don’t need to touch GeoNode at all. Everything will dynamically plug in at initialization time.
Now, we can easily define a new api model for the GeoStories which will eventually extend the generic viewsets and serializers provided by the GeoApp module of GeoNode.
Backwards Compatibility
Compatible with GeoNode 3.x and above, by using the new bbox model provided by Catalyst.
Future evolution
Feedback
Voting
Project Steering Committee:
Links
The text was updated successfully, but these errors were encountered: