-
Notifications
You must be signed in to change notification settings - Fork 0
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
Transport Module integration description #134
Comments
Just in case it's useful to you, here 04 CSIS - Transport module.zip you can see a bunch of screenshots with this workflow. When in doubt the description above takes precedence over the screenshots. |
Ok, so what we need to do on CSIS-side:
Biggest challenges will probably be 4) and 6). For the Emikat trigger we're using REST. I hope that for the TM we can do the same. @ghilbrae who can I talk to in order to configure this new trigger (define endpoints, necessary data that needs to be transferred, etc)?
@ghilbrae what did you have in mind? Do you want to create the final pdf report inside the TM and send it to the CSIS? I think it would be easier to leave the summary as it is. The users will take screenshots of the TM in the "Maps" and "Table" tabs and those screenshots will be added to the summary (just like for any other study). We can add a new text field (call it maybe "Commentary"?), where the TM could (via REST) add additional information. @DenoBeno requested such a field anyway, so that users could add their own texts to the final reports. |
Regarding 4), I think we only need one extended iFrame entity if we can generate the the app's URI automatically from context information. Therefore we have to agree on an URL schema, e.g. https://clarity.saver.red/en/simmer/simulation/${id}/${step}/${component} with
|
The main developer of the TM is @rapto so he'll be the one to talk to.
That was exactly our idea so the CSIS would not need to compose anything, only get the PDF and store it or send it to the user. If you think it would be easier or less problematic going down the path of screenshots we are of course open to suggestions but how would that work? Is the CSIS able to take screenshots right now? |
In theory yes, but this feature is rather unreliable and not compatible with all browsers. We had to implement a lot of workarounds. You can give it a try, but I wouldn't count on it. |
I think the best way to proceed by now is follow Pascal's idea, let agree on an URL schema. We are right now developing the new screens needed for vulnerability and risk, so I'll be back next week with the proposed schema. |
@patrickkaleta I'm attaching a short document with the text that needs to change as detailed on the first comment (#134 (comment)). csis_tranpost infrastructure_rev.docx Let us know if you have any questions. |
New texts are now shown instead of the default EU-GL taxonomy term texts. For that I updated the Study templates of the "Advanced Screening: Transport Infrastructure" Study type. BTW: Custom Introduction texts can now also be added for other Study type templates as well. If the |
The TM trigger has now been implemented in the csis-helpers module. |
@luis-meteogrid & @ghilbrae |
We have a bunch of URLS to share right now. Just a question first, is the creation of a new study already linked to the TM? We've created a new one but it does not seem to create the study in both sides. The URLs that are working now are as follows: Study -> Area -> https://clarity.saver.red/studies/reference/[CSIS Study ID]/ Hazard Characterization -> Table -> https://clarity.saver.red/study-hazard/reference/ID/elements_hazard/ Exposure Evaluation -> Table -> https://clarity.saver.red/study-exposition/reference/ID/elements_exposition/ Vulnerability Analysis -> Table -> https://clarity.saver.red/study-vulnerability/reference/ID/elements_vulnerability/ Risk and Impact Analysis -> Table -> https://clarity.saver.red/study-risk/reference/ID/elements_risk/ For Adaptation Options we will use the CSIS as is. A working ID in the TM, that you can check if needed is 72. Note that a couple of URLs may give some problem because we are still ironing out some details and working on them, but we think they are good to go to start testing the integration. Summary and report stuff is an on going development, we will let you know when we have something working. |
OK, so it seems that need just 2 Parameters to construct all of those URL:
Examples: |
@patrickkaleta don't forget about the study type field, it could be spain or europe, so we can create the study with the Spanish DataPackage or the European DataPackage. |
Ok that's new to me. @rapto could you give me some details about that? So far all the Studies wege given the Checking the API I can see two different Simulation types - |
@patrickkaleta The ids are exposed now at {
"id": 118,
"name": "Clarity Study - Spain",
"locator": "CLARITY_STUDY_SPAIN"
},
{
"id": 158,
"name": "Estudio Clarity Europa",
"locator": "CLARITY_STUDY_EUROPE"
} |
Thanks @rapto. I've included the
@rapto could you remove all those simulations in the TM that are not relevant? IMO only these simulations are relevant (listing the TM IDs):
|
I have deleted most of them, but left those we use for internal testing. I have set the reference to null so it does not interfere with the integration. |
Hi @patrickkaleta, have you been able to modify the CSIS and fix the problem? It is just because we are planning tests know. So if you want us to test anything just let us know. |
Hi @luis-meteogrid. I deployed the changes - when transmitting Studies to the TM app, it now also sends the users and the simulation type is set depending on the selected country. Admin users are currently not included, since they are unknown to the TM (we will work on this issue together with @fgeyer16). You can test the TM studies in the CSIS now - your users (luis, angela and meteogrid are not administrators, so they will have no problems). NoteSince the selected country now plays an important role in determining the simulation type, new Studies are not sent over to the TM immediately upon their creation (as it was the case before), but only after a country has been selected in the |
We've been testing the integration these past two days and we are stuck in the login screen both for existing studies or new ones. I created this one: https://csis.myclimateservice.eu/study/147/view/intro, just to ensure that there were no lingering issues from older studies. What I get is either the error screen coming from the error I've checked and I seem to be I'm logged in on both platforms with my user. |
@fgeyer16 It is seems that we have now another problem that may be related with the SSO, |
What happens if you access the TM directly: https://clarity.saver.red/en/studies-spain/simulation/66/ ?
Accessing the same page from within CSIS (https://csis.myclimateservice.eu/study/147/step/4333/view/maps) results in an infinite redirection loop of embedded the TM iFrame caused by CAS: Apart from that my user is probably not authorised to access simulation No. 66, it seems that CAS redirection doesn't play well with iFrames? |
The iFrame is correctly initialised with https://clarity.saver.red/study-hazard/reference/145/ and then redirected by TM to https://clarity.saver.red/study-hazard-spain/simulation/94/ and then again redirected by CAS (profiles.myclimateservices.eu) to https://clarity.saver.red/en/study-hazard-spain/simulation/94/ (not https://clarity.saver.red/study-hazard/reference/145/) |
If you access directly either https://clarity.saver.red/studies/reference/55/ or https://clarity.saver.red/studies-spain/simulation/66/ you get: |
We have used this strategy in order that you don't have to change the url you access whether you are working in a Spanish-study or in an European one |
The url |
I am studying the auth loop. The cas auth ticket has lost its way (it shoud reuse the main frame cas ticket, but I have to read how that works). |
OK; I have found that the stricter cookie policy in Django 2 sent Lax cookies. I have reset the policy to None, so now the session cookies are correctly allowed. |
If there are any experts in the room, let me know if there is some way to reuse the csis login from the iframe. In the long run, it is clear that some rich api (that builds the interface) is the way to go. |
Great! Actually it is working although it is not yet connected to the desired pages in each section at least CSIS is already connecting to the transport module. I think we don't have much left. Come on, we're almost there. |
O.K. Please let me know if any of the embedded iframes links to the wrong pages and let me know. I've configured them according to these links. |
It seems everything it is working properly. Let me check a few more cases before closing the issue. Thank you very much to you all. |
We understand that the selection of the study type (Europe or Spain) should be done when creating a new study, an extra option along with the three already existing. This approach will also enable the users to create a study for Spain using the European variables available, as if it were any other country.
We are testing the TM creation through the CSIS but we do not get any option to select the study type or the country. See https://csis.myclimateservice.eu/study/151/ as an example. Anyway, as stated above, we feel that it would be best to select the type beforehand. As an alternative an extra option could be added somewhere, like the Context tab you mentioned. |
We've disabled changing the study type of existing studies as it introduced too many side effects. Country however can be changed in the study context: |
Fine, we have already checked this option and it is working |
One other issue, when you give access to other users to yours studies this information is not shared with the transport module, so the TM doesn't allow you to see the maps or tables related. It respond with a message signaling you are not allowed to access the study. |
Currently the TM only gets updated when changes directly inside the Study take place. Adding/changing the members of a Study are not considered as changes to the Study itself and therefore no update is pushed to the TM. I'll have to look into it and see how we could trigger such an update in the members list. For the meantime, if you want to push an updated members list for a Study, just change the Study goal slightly and then the CSIS will push these changes (including the updated members list) |
One more thing, Is it possible to enlarge the embedded screen area for the TM? We are going to remove the menu bar but even doing that the map area remains still a bit small to work comfortably. |
The approach is to embed all needed screens from the Transport Module into the CSIS. This means that each combination of Tab+Section, i.e., Hazard Characterization+Table, will need to access a different URL within the Transport Module but specifying the ID for the corresponding Study.
For example:
https://clarity.saver.red/en/simmer/simulation/ID/hazard_table
https://clarity.saver.red/en/simmer/simulation/ID/hazard_summary
https://clarity.saver.red/en/simmer/simulation/ID/exposure_evaluation/{}
01 - Add Study
Using the CSIS a new study can be created. This information has to be sent to the Transport Module (TM, from now on) to create the study there too. The TM will return an ID (integer).
Introduction
The text has already been changed but it might be updated (TBD).
Team
Comes from the CSIS
Context
Text was already changed.
Area
The area for the study will be selected. An embeded screen from the TM will go here to select the area.
For now the CSIS does not need to be aware of the selected area, but this can change in the future if there's time to do a better integration (via API, WMS, WFS, etc.).
Data
Comes from the DP in the CSIS.
Summary
As the CSIS will have no information regarding what's needed to create a Summary, there should be a request to the TM for a Summary at this stage (PDF?).
This will be replicated for all other Summaries from now on. Each Summary will be a portion of the final one pertaining to the section in which it has been requested.
02 - Hazard Characterization
Introduction
The text might change but still TBD.
Data
This comes from the Data Package. We'll have to ensure that these data is up to date with that on the TM, so nothing needs to be done.
Table
The TM will generate the table and it will be embedded in the CSIS, at least in the short term. Take into account that each of these embedded screens will be accesed through different urls that must include the ID for the study. Otherwise, all urls will be the same in each case.
Note that this may be changed in the future if there's time or after the project is finished.
Maps
Access the corresponding map on the TM via URL.
Twins
TBD
It may be the same as for the Urban Studies.
Summary
See description above.
Hazard Characterization - Local Effects
This has no use in the TM and has to be removed.
03 - Exposure Evaluation
Introduction
The text will change but still TBD.
Data
This comes from the Data Package. We'll have to ensure that these data is up to date with that on the TM, so nothing needs to be done.
Table
The TM will generate the table and it will be embedded in the CSIS, at least in the short term. Take into account that each of these embedded screens will be accesed through different urls that must include the ID for the study. Otherwise, all urls will be the same in each case.
Note that this may be changed in the future if there's time or after the project is finished.
Maps
Access the corresponding map on the TM via URL.
External
It no longer makes sense. All will be done via embedding.
Twins
TBD
Summary
See description above.
04 - Vulnerability Analisys
Introduction
The text might change but still TBD.
Data
This comes from the Data Package. We'll have to ensure that these data is up to date with that on the TM, so nothing needs to be done.
Table
The TM will generate the table and it will be embedded in the CSIS, at least in the short term. Take into account that each of these embedded screens will be accesed through different urls that must include the ID for the study. Otherwise, all urls will be the same in each case.
Note that this may be changed in the future if there's time or after the project is finished.
Maps
Access the corresponding map on the TM via URL.
Summary
See description above.
05 - Risk and Impact
Introduction
The text might change but still TBD.
Data
This comes from the Data Package. We'll have to ensure that these data is up to date with that on the TM, so nothing needs to be done.
Table
The TM will generate the table and it will be embedded in the CSIS, at least in the short term. Take into account that each of these embedded screens will be accesed through different urls that must include the ID for the study. Otherwise, all urls will be the same in each case.
Note that this may be changed in the future if there's time or after the project is finished.
Maps
Access the corresponding map on the TM via URL.
Scenario Analysis
TBD, we do not have a clear idea of what should be in here. How is it working for other studies??
Summary
See description above.
06 - Identify Adaptation Options
Introduction
The text might change but still TBD.
Table
This will come from the CSIS. We'll create the corresponding Adaptation options within the CSIS that can be associated to this kind of study.
Twins
TBD
Summary
This summary will come from the CSIS and will only contain the Adaptation Options.
07 - Final Summary
As stated on 01 - Add Study, the Summary will be a request for the full Summary to the TM, however the CSIS will need to provide an extra one containing the Summary for the Adaptation Options as an additional document.
The text was updated successfully, but these errors were encountered: