clarity-h2020 / csis-helpers-module Goto Github PK
View Code? Open in Web Editor NEWCSIS Helpers Drupal Module
License: GNU General Public License v3.0
CSIS Helpers Drupal Module
License: GNU General Public License v3.0
Subtask of this issue.
In order for the TM to be able to generate study-relevant output, CSIS needs to trigger the TM and sent the necessary information for the relevant Studies.
We already have something similar for another external service (Emikat), where we use REST for the communication (issue, relevant code).
@rapto: Angela told me that you would be to right person to talk to. Can you check our trigger approach for Emikat and tell me if we could do something similar for the TM?
Write Documentation.
The openEditForm function creates a link just like the ones on the Summary-Tab, which open the edit-forms for Report Images via Ajax as a modal.
However, this doesn't seem to work and the "use-ajax" class in the link gets ignored and a complete page-load is triggered instead. Not a major bug, since the user is taken back to the correct page after he/she saves the edit-form. But it's still ugly that way.
@fgeyer16 Any idea why this is not working?
We need iFrame support in csis_include_in_report.js.
Not sure if that's going to work. We can try it with the MCDA App (which is currently broken) until iFrame Support for the Map Component is available.
Script shall return the id of the parent entity that contains the iFrame node, not the current entity of the iFrame node itself.
To track down the problem, the debug log in html2canvas can be used. The problem related to the missing map layers could be resolved by updating html2canvas to the latest version and by changing some configuration options or modifying the react JS Code of the map component.
Move creation of Drupal Settings for entity info from hook preprocess to hook view since DisplaySuite disables hook preprocess.
On the Summary view of a Step the drupalSettings.csishelpers.entityinfo.study variable is null and not the study id.
EMIKAT calculation took 6 minutes for the test study that I tried today. Possibly more for larger areas.
It would be nice to have some indication on the site saying "calculation failed/in progress/done".
Since we want to remove the Study variant
fieldfrom the Study Scenario object, we need to add it separately to the $studyInfo
object, so that the Map and Table components can query and filter data for the baseline and for the adapted scenario.
Boolean field has_adapted_scenario
will be set based on whether or not the Study contains an "Adaptation Project" Group node.
In the process the study_variant
attribute will be removed from the study_scenarios
and study_presets
of the $studyInfo
object.
Add support for Report Generation following the descriptions in these issues:
Group members who are not owners, cannot edit the Study group itself, but only work with the group contents (the GL-steps, report images, ...).
So, in the Study step all edit buttons created with the Display Suite need to be hidden via the CSIS helpers module. For that, all Display suite buttons in question will get an extra class "token-field-check-permissions", for which the helpers module will look for and then based on the write_permissions
attribute in the $studyObject, the buttons will be either hidden or not.
@DenoBeno suggested that we should have some kind of automated testing, that would on a regular basis check if the communication between CSIS and Emikat is working and if Emikat produces results.
I suppose one way of how we could achieve this is by creating a custom service in our csis helpers module. That service could be called either by accessing a specific URL or triggered by a cronjob (might be better to instead use a queue as shown here).
I'm trying to add the "include in report button" functionality, but after updating my local csis instance to the newest version of the csis, I'm receiving an error when trying to make a GET-request for a Report image:
The "entity" parameter was not converted for the path "/jsonapi/node/report_image/{entity}" (route name: "jsonapi.node--report_image.individual")
The GET-request was working prior to that update.
@fgeyer16: have there been any other changes made to the (JSON:API) Rest configuration, which I need to manually add to my local instance?
jpeg images should be used instead of png images to improve the performance. See clarity-h2020/csis#152
ATM just the processing variable $emikat_id
for advanced/automated/calculated screening studies is supported in csis_helpers.module. The respective query parameter is set by csis_iframe_connector.js as part of the iFrame URL and then processed by BasicMap.js.
Additional parameters have to be supported, see clarity-h2020/data-package#42 (comment) and clarity-h2020/map-component#54 for more details.
As required by clarity-h2020/map-component#96, we have extended the filter capabilities beyond EU-GL Taxonomy terms. Now the map iFrame URL query parameters have to be extended, too!
It would be helpful if we could include some additional properties from study group node in $entityinfo so that we can avoid some API calls in our external components.
ATM we would need
a8ff7930-4a9f-4289-8246-3383ba13c30f
value
property of the geofiled entity, e.g. POLYGON((14.149017 40.8268,14.149017 40.894051,14.316902 40.894051,14.316902 40.8268,14.149017 40.8268))
Study types
(TBD which ones)Study type
changes (e.g. change status in Emikat? TBD)js_VN7rwrZCfKyapY1QuY241S22w6myG2_M6JuGNsj-3Lc.js:2 Uncaught TypeError: Cannot read property 'step' of undefined
at HTMLDocument.<anonymous> (js_3dwsmfOnil9STOkYO05SL0FSYUhjWfvIHR8_sBxWRtk.js:4788)
at j (js_VN7rwrZCfKyapY1QuY241S22w6myG2_M6JuGNsj-3Lc.js:2)
at k (js_VN7rwrZCfKyapY1QuY241S22w6myG2_M6JuGNsj-3Lc.js:2)
CSIS Helper Modules retrieved the id of the node which is fine for Legacy REST API, but for making requests to the JSON:API (e.g. GET '/jsonapi/node/report_image/ff1f3c94-abbd-43bc-90d8-c61e7dad6dac/') we need the UUID.
The parameter emission_scenario is used instead of emissions_scenario
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.