Include the dwelling fractions app into the OQP package

Bug #1097671 reported by Ben Wyss
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake Platform
Fix Committed
Undecided
Ben Wyss

Bug Description

In the previous spint we investigated the integration of leaflet/mbtiles into the OQP (geonode 1.2) and we were able to integrate the app and it's dependancies.
This bug is to integrate this application into the installation script of the platform and commit to Git.

Tags: mbtiles ui
Revision history for this message
Ben Wyss (bmwyss) wrote :

In order to add the dwelling fractions & exposure export application to the OQP I applied the following setting by hand to an existing OQP installation:

HTML and JS:

add exposure_export.html into
/etc/geonode/templates.apps/oq-platform2

exposure_export.html is then referenced into the
/var/lib/openquake/oq-ui-api/etc/geonode/templates/oq-platform/includes/menu.html
&
/etc/geonode/templates/oq-platform/includes/menu.html
<li><a href="/oq-platform2/exposure_export.html">Exposure Country Aggregate Data</a></li>

then add the binding in django to the new exposure_export.html page in: /var/lib/geonode/src/GeoNodePy/geonode/urls.py

place the leaflet-legend.css into ~/Projects/test/oq-platform/oq-ui-api/etc/geonode/static/theme/
&
/etc/geonode/static/theme
&
/var/lib/openquake/oq-ui-api/etc/geonode/static/theme/
&
/var/www/geonode/static/theme/

add external libs with git submodule
place external libraries (Leaflet, Leaflet.Draw, Wax, L.Wax, Jquery) into: ~/Projects/test/oq-platform/oq-ui-client2/src & /var/www/geonode/static/oq-platform2/src/

Django:

new 'exposure' django project is added into: ~/Projects/test/oq-platform/oq-ui-api/geonode

new project is added into settings.py

an external database connection is made by adding to local_settings.py:

'geddb': {
            'ENGINE': 'django.db.backends.postgresql_psycopg2',
            'NAME': 'ged',
            'USER': '<name>',
            'PASSWORD': '<passu>',
            'HOST': '<IP>',
            'PORT': <port>,
            'OPTIONS': {
                'sslmode': 'require',
      }
    }

and

DATABASE_ROUTERS = ['exposure.router.GedRouter']

the new project is referenced into the django root url.py with:

(r'^exposure/', include('geonode.exposure.urls')),

and

    url(r'^oq-platform2/exposure_export.html$', 'django.views.generic.simple.direct_to_template',
    {'template': 'oq-platform2/exposure_export.html'}, name='exposure_country'),

Ben Wyss (bmwyss)
Changed in openquake:
status: New → Confirmed
Revision history for this message
Ben Wyss (bmwyss) wrote :
Changed in openquake:
status: Confirmed → Fix Committed
Ben Wyss (bmwyss)
no longer affects: openquake
Changed in oq-platform:
status: New → Fix Committed
assignee: nobody → Ben Wyss (bmwyss)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.