Git Product home page Git Product logo

oq-platform's Introduction

oq-platform's People

Contributors

bwyss avatar daniviga avatar hascar avatar larsbutler avatar matley avatar mbernasocchi avatar micheles avatar nastasi-oq avatar pslh avatar ptormene avatar raoanirudh avatar simonruffle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

oq-platform's Issues

Another issue during upgrade

+ common_postlayers /usr/local/lib/python2.7/dist-packages/openquakeplatform oqplatform
+ local oqpdir=/usr/local/lib/python2.7/dist-packages/openquakeplatform db_name=oqplatform bdir wdir
+ bdir=/usr/local/lib/python2.7/dist-packages/openquakeplatform/common
+ wdir=/var/www/openquake/platform/uploaded/thumbs
+ openquakeplatform categories_cleanup
FailedRequestError: Tried to make a DELETE request to http://localhost:8080/geoserver/rest/layers/isc_viewer_measure.xml but got a 500 status code: 
:Unable to delete layer referenced by layer group 'instrumental-seismic-catalogue-1900-2009_593'

IRV: synchronize map and charts

We would like to implement the following features:

  • if you click on one region in the map, toggle its highlighting in the charts and in the tables (highlight it if it was not highlighted, or unhighlight it if it was highlighted)
  • if you highlight one or more regions in a chart
    • highlight it/them in the other charts
    • highlight it/them in the map
  • consecutive clicks on different regions add the clicked regions to the selection (and to the highlighting)
  • SHIFT-click draws a bounding box and selects all features inside (highlighting them in the map)

IRV: add selenium tests on the synchronization between charts and map

The features implemented in #594 (addressing #596) require additional selenium tests.
In particular, we want to test that:

  1. when a zone is clicked in the map, the corresponding line is toggled (highlighted or unhighlighted) in all charts. Consecutive clicks on different zones make all those zones highlighted in the charts.

  2. when brushes are used to filter data in one chart, the selected zones are also highlighted in the other charts.

The CSS in the Risk Input Preparation Toolkit is broken

  • OQ logo misplaced
  • menu items bottom offset wrong
  • username sub-menu arrow is too low
  • the main content is slightly shifted to the left (see the tile in the screenshots)
  • the footer is broken (too narrow)

bad

should be:

good

The result is the same with FF and Chrome

The check on QGIS plugin version is too strict

We are currently checking all the three version numbers, major, minor and maintenance: version 1.7.1 of the plugin is not working because we are looking for COMPATIBILITY_VERSION = 1.7.0.

We should check up to the second number (minor) only, since in any case no changes in the protocol should be expected without increasing the minor number.

COMPATIBILITY_VERSION = 1.7.0
1.6.x -> KO
1.7.0 -> OK
1.7.1 -> OK
...
1.7.x -> OK

We should also decide what to do if the minor number is greater, like 1.8.0 is this fine or not if the COMPATIBILITY_VERSION is 1.7.0 ? (I vote NO for the current status, but it should be YES)

RIPT - Exposure - extra " character in the output file.

When generating an exposure model using the aggregated value option, and extra “ is written in the output file. I used the attached exposure information (exposure_example.txt) which led to the exposure_example.xml also attached.

RIPT - Copy/paste does not work if columns are added

In RIPT copy and paste does not work if any dropdown menu is changed and a column is added. It work when the page loads instead.

How to reproduce:
1 Load the RIPT app
2 Change the first dropdown available (Structural Costs) to any choice (like 'Aggregated')
3 Copy sample data from Excel o LibreOffice (like a b c d e f)
4 Try to paste those values into the table. Nothing happens

It works is step 2 is skipped.
This is reproducible on the live Platform (v1.3.1 as writing) and has been reported by Desmond.

Manage the Bing API key during installation

We need to manage the Bing API key during the installation:

  1. if a Bing key is not provided by the user we need to delete the Bing basemap layer from the pre-loaded fixtures
  2. if a Bing key is provided we need to update the fixture with the valid key

About the local_settings.py we should manage it with an if

Remove Bing from MAP_BASELAYERS 
then if BING_KEY is defined
    append the Bing basemap with the BING_KEY to MAP_BASELAYERS

See also #484

Vulnerability - app is broken if auhentication is off

To test it remove LoginRequiredMiddleware item in MIDDLEWARE_CLASSES tuple in local_settings.py.

MIDDLEWARE_CLASSES = (
    ....
    # geonode.security is enabled to lockdown the website
    'geonode.security.middleware.LoginRequiredMiddleware',
)
Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  115.                         response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/openquakeplatform/vulnerability/views.py" in list
  72.     user = User.objects.get(username=request.user.username)
File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py" in get
  143.         return self.get_query_set().get(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/db/models/query.py" in get
  404.                 self.model._meta.object_name)

Add documentation for gunicorn and more testing

We recently switched the Python server on production from uWSGI to Gunicorn due issues that we experienced with uWSGI and POST in the Vulnerability app (empty download cart). We'll need to update the documentation about uWSGI/Gunicorn.

We need also to do more testing using Gunicorn (by the way Icebox, which is the most critical piece, looks working well).

RIPT - New row key adds more than one row

In the Risk Preparation Tool after playing with the drop down menus, when you try to add a new row (with ctrl-shift-n) more than one row is added (equal to the number of fields changed). It looks like more a bug in the library: the .destroy() method (fired when a menu option is changed: https://github.com/gem/oq-platform/blob/risk-ipt-bug3/openquakeplatform/openquakeplatform/static/js/risk_input_model_exposure.js#L121) is not completely removing the table from the DOM, so the .keyup listener iterates on N tables (https://github.com/gem/oq-platform/blob/risk-ipt-bug3/openquakeplatform/openquakeplatform/static/js/risk_input_model_exposure.js#L204).

IRV - When clicking on the map, only socioeconomic information should be displayed

Currently, when no project is selected, no information is displayed when clicking on the map (which is fine). When a project is selected and you click on the map, a box is displayed showing information about the clicked feature. The problem is that we should display only information that is related to the project, ignoring everything else. Currently, also irrelevant information is shown, such as names of the region provided in different languages, etc.

taxtweb: the header menu bar does not work well on stand-alone URL

When running the taxtweb app on the stand alone URL (http://taxtweb.openquake.org) the menu located in the header does not play well:

  • To make the calculate / share / explore buttons working a change in the Nginx (or other reverse proxy) conf must be done. We need to document it.

The issue is caused by:

        location / {
                rewrite / /taxtweb/ break;

and can be fixed with a new location block

    location ~* /(calculate|explore|share|account\/signup|account\/login)/$ {
        rewrite        ^ https://platform.openquake.org$request_uri? permanent;
    }
  • The sign in button (or the missing username + avatar) should be removed or hide when in the stand-alone URL since the authentication cookie is not recognized across different domains.
    The register button could be left there, but the fix above must be applied also for it.

RIPT - Exposure - Avoid empty <occupancies> tags

Currently, if the input exposure data does not include the number of occupants, i.e., if the Day, Night, and Transit checkboxes for Occupants in the input form are all left unchecked, the generated NRML still includes an empty occupancies tag for each asset:

<asset id="EUCENTRE-3" number="1" taxonomy="Concrete" >
    <location lon="9.1582" lat="45.18472"></location>
    <costs>
        <cost type="structural" value="6000000"></cost>
    </costs>
    <occupancies>
    </occupancies>
</asset>

This should be avoided.

HRDE - "Supplemental Layers" selection re-adds layers instead of just re-selecting them

When a layer is selected from the "Supplemental Layers" dropdown menu, it is added to the map. If the user then switches to a different layer, also that second one is added to the map, together with the first one. If afterwards the first one is re-selected, it is re-added to the map, instead of just re-selecting the existing one.
The fact that a simple dropdown selection enables to add multiple options to the map looks a little counter-intuitive. If we really want to enable multiple selections, we should probably do so by means of a mutliselect widget.

Production upgrade fails during SVIR layer dump

The error is

WARNING: curl -v -s -o output/styles/qgis_svir_30eadaa4_245a_4eca_911a_6731ad8d27c5.sld -D output/styles/qgis_svir_30eadaa4_245a_4eca_911a_6731ad8d27c5.sld.hea -u admin:geoserver -XGET http://127.0.0.1:8080/geoserver/rest/styles/qgis_svir_30eadaa4_245a_4eca_911a_6731ad8d27c5.sld
WARNING: web_cmd curl GET qgis_svir_30eadaa4_245a_4eca_911a_6731ad8d27c5.sld  http://127.0.0.1:8080/geoserver/rest/styles/qgis_svir_30eadaa4_245a_4eca_911a_6731ad8d27c5.sld 200
         expect 200, receive 500 (log into: output/styles/qgis_svir_30eadaa4_245a_4eca_911a_6731ad8d27c5.sld[.hea])

We are investigating the issue in GeoServer.

IRV - Display the project title

When a project is loaded in the IRV, the titles of the single project definitions belonging to the project are visible inside a dropdown menu (used to select a project definition from the list).
It would be good to display also the main title of the project somewhere. An easy solution (perhaps sub-optimal) would be to place it on top of the project definition widget.

IRV - Sort PCP charts

If geographical zones are displayed as x-labels and geometries are available, we could sort zones based on geographic proximity (calculating distance between centroids), attempting to keep close to each other in the chart the zones that are geographically close (instead of ordering alphabetically).

IRV - Add tabs for charts with inverted x and y axes

For instance, in the composite indicator chart the user may want to highlight what are the zones that score high on a particular indicator. In the current implementation, we can do the opposite: highlighting indicators that score high in a particular zone.
The composite indicator widget could have 2 tabs, containing the two options. The same can be done for the other widgets.

Exposure export does not work in specific cases

Using the Exposure export to download data from Greece and Portugal and maybe more gives an error.

How to reproduce:

  • Load the Exposure export and select Load data by region
  • Filter to 'Greece'
  • Select 'Greece | PAGER'
  • Try to export 'Gridded Building Exposure' + 'Residential' + 'CSV'

You'll get a new web page wit this error:

The export can not be performed because the total grid count for study region id xyz exceeds the threshold (NNNNN > 100000)

You should get the possibility of drawing a box on the map to reduce the exported area instead (like Italy).

Thanks to @monellid for discovering the bug: https://groups.google.com/forum/#!topic/openquake-users/a4rlxtAYFIs

IRV - Handling layers with incomplete data

Currently, if there is some missing data in the layer, the IRV application doesn't show anything in the map, and neither in the charts. It only shows the following message: The application is not able to render charts or the map layer for this project because the composite indicator data is incomplete.. Furthermore, such message appears when the project is loaded, but it disappears afterwards, for instance when a widget is hidden and shown again.
We definitely need to handle missing data properly, showing meaningful results for all the features for which primary and composite indicators can be calculated.

'MultipleObjectsReturned' error during upgrade

[cut]
[updated] Layer icebox_output_lossmap_644 (457/478)
[updated] Layer icebox_output_lossmap_645 (458/478)
Stopping process because --ignore-errors was not set and an error was found.
Exception: ('Failed to process event', MultipleObjectsReturned('get() returned more than one Link -- it returned 2!',))

IRV negative theme indicator values

The IRV web application does not manage negative theme indicator values correctly.
It seems that the sign of the original data is being switched at some point of computation.

IRV: the 'mapInfo' should display all available data

When the map is styled with respect to an indicator (or composite indicator) that has a missing value for one of the regions, such region is (correctly) not colored. By clicking such region, currently the application displays no data available, which is true with respect to the selected indicator, but a bit misleading in general. It would be better to display anyway the whole set of data available for that region, regardless from styling.

IRV - Adding new project definitions causes some wrong corner cases

  1. In some cases, the check on the existence of the new project definition name fails, saying it already existed although it did not. It does not happen always, and probably it's due to the fact that some events can occur with different delays, causing different behavior depending on the order things happen.
  2. When a new project definition is added, it is also pre-selected from the dropdown menu. If afterwards another one is selected, and then the new one is re-selected, it can not be loaded. The only way to be able to use it afterwards is reloading the whole page, which makes the new item actually available.
  3. I've also noticed a redundant check on the existence of an assigned name for a new project definition. The check is already done by the API that is called by the IRV app, so there is no need to repeat the same check here.
  4. In some cases, the addition of a new project definition is performed multiple times redundantly, instead of triggering it just when the submit button is clicked. This seems to be due to unnecessarily nested event definitions.
  5. The code contains some unnecessary delays, that were added to partially fix some of the above issues, but that should be removed once the real causes of these issues are fixed.

IRV - Changing the color theme many times results in an increasingly slow response

The webGlColorPicker menu seems to work at first, but on my computer (both using firefox and chrome) if I switch to different colors many times, the response time approximately doubles at each attempt. It is very quick at first but, after about 6 consecutive changes, the response becomes quite slow and it causes my firefox to open the following warning popup:

A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.

Script: https://api.tiles.mapbox.com/m…box-gl-js/v0.11.1/mapbox-gl.js:194

I guess we should also decide if the possibility to change colors is actually a useful feature.

IRV: improve PCP charts layout

  • when too many indicators are shown, by default the widget is too small to contain the unwrapped table
  • the line for null values might be thicker and the null values might go lower
  • the (displaying n of m) string would probably look better below the table
  • the number of items displayed in the table should depend on the amount of space available in the widget below the chart
  • resizing the widget, the table should not overlap the chart

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.