From 5d8da748924efc50a689a7acd6c621ad717eb8e7 Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Mon, 28 Sep 2020 15:44:01 +0200 Subject: [PATCH 01/76] Remove pull request template --- PULL_REQUEST_TEMPLATE.adoc | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 PULL_REQUEST_TEMPLATE.adoc diff --git a/PULL_REQUEST_TEMPLATE.adoc b/PULL_REQUEST_TEMPLATE.adoc deleted file mode 100644 index 75ab641fa5..0000000000 --- a/PULL_REQUEST_TEMPLATE.adoc +++ /dev/null @@ -1,28 +0,0 @@ -Please read through the checklist below to make sure that you haven't forgotten anything before submitting your PR. -Then, remove the text and replace it with the information and comments that should go into the release notes. - -// tag::review_checklist[] -* The PR comment contains a brief explanation of the impact of these developments, and a pointer -to the relevant documentation if need be. Otherwise, it should why this development doesn't need -to be on the release notes. -* Check that Travis build is passing (for both branch and PR) -* Check that the base branch (i.e. the branch into which we want to merge changes) is correct: for feature branches -pull requests, this branch should be `develop`. -* Look through changed files to make sure everything is relevant to the PR (no mistakenly added changes, -no secret information, no malicious changes) and to see if you have remarks on the way things are implemented -* Check that the commit(s) message(s) is(are) relevant and follow conventions ([OC-XXX] ... ) -* If there is more than one commit, is it meaningful or do we need to squash ? -* Meaningful and sufficient unit tests for the backend (80% coverage is the threshold) -* Meaningful unit tests for the frontend (Angular tests can be complex to implement, we should focus on testing complex -logic and not the framework itself) -* Check Sonar analysis on SonarCloud to see if Sonar reports any bugs or code smells on the new code -* API testing via Karate has been updated -* Cypress UI tests have been updated -* Documentation has been updated (especially if configuration is needed) -* Configuration examples have been updated (both for dev and docker) -* Build and run OpFab locally to see the new feature or bug fix at work. In the case of a new feature, it's also a way -of making sure that the configuration documentation is correct and easily understandable. -* Depending on the scope of the PR , build docker images and test in docker mode -* Check that the copyright header has been updated on the changed files if need be, and in the case of a first-time - contributor, make sure they're added to the AUTHORS.txt file. -// end::review_checklist[] From 52726a30db5507b44b06e4a3a631f9b632caf4dd Mon Sep 17 00:00:00 2001 From: techrain Date: Mon, 28 Sep 2020 16:30:06 +0200 Subject: [PATCH 02/76] [OC-411] Remove unused property deletionDate Signed-off-by: techrain --- .../consultation/model/ArchivedCardConsultationData.java | 3 --- .../cards/consultation/model/CardConsultationData.java | 2 -- .../cards/publication/model/ArchivedCardPublicationData.java | 2 -- .../cards/publication/model/CardPublicationData.java | 2 -- .../core/cards-publication/src/main/modeling/swagger.yaml | 5 ----- .../cards/publication/services/CardProcessServiceShould.java | 4 ++-- src/docs/asciidoc/reference_doc/card_structure.adoc | 4 ---- src/test/utils/karate/Action/createCardActionLttd.feature | 4 ---- src/test/utils/karate/cards/push_action_card.feature | 5 ----- 9 files changed, 2 insertions(+), 29 deletions(-) diff --git a/services/core/cards-consultation/src/main/java/org/lfenergy/operatorfabric/cards/consultation/model/ArchivedCardConsultationData.java b/services/core/cards-consultation/src/main/java/org/lfenergy/operatorfabric/cards/consultation/model/ArchivedCardConsultationData.java index 0219a6a2e6..47b6421182 100644 --- a/services/core/cards-consultation/src/main/java/org/lfenergy/operatorfabric/cards/consultation/model/ArchivedCardConsultationData.java +++ b/services/core/cards-consultation/src/main/java/org/lfenergy/operatorfabric/cards/consultation/model/ArchivedCardConsultationData.java @@ -53,9 +53,6 @@ public class ArchivedCardConsultationData implements Card { private I18n summary; @CreatedDate private Instant publishDate; - @Transient - @JsonInclude(JsonInclude.Include.NON_NULL) - private Instant deletionDate; private Instant lttd; @Indexed private Instant startDate; diff --git a/services/core/cards-consultation/src/main/java/org/lfenergy/operatorfabric/cards/consultation/model/CardConsultationData.java b/services/core/cards-consultation/src/main/java/org/lfenergy/operatorfabric/cards/consultation/model/CardConsultationData.java index 5589c9e039..592247d717 100644 --- a/services/core/cards-consultation/src/main/java/org/lfenergy/operatorfabric/cards/consultation/model/CardConsultationData.java +++ b/services/core/cards-consultation/src/main/java/org/lfenergy/operatorfabric/cards/consultation/model/CardConsultationData.java @@ -53,8 +53,6 @@ public class CardConsultationData implements Card { private I18n summary; @CreatedDate private Instant publishDate; - @JsonInclude(JsonInclude.Include.NON_NULL) - private Instant deletionDate; private Instant lttd; @Indexed private Instant startDate; diff --git a/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/model/ArchivedCardPublicationData.java b/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/model/ArchivedCardPublicationData.java index a922c6bebd..3968fea719 100644 --- a/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/model/ArchivedCardPublicationData.java +++ b/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/model/ArchivedCardPublicationData.java @@ -52,8 +52,6 @@ public class ArchivedCardPublicationData implements Card { private I18n summary; @CreatedDate private Instant publishDate; - @Transient - private Instant deletionDate; private Instant lttd; @Indexed diff --git a/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/model/CardPublicationData.java b/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/model/CardPublicationData.java index bb66de4723..0d482cf6c3 100644 --- a/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/model/CardPublicationData.java +++ b/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/model/CardPublicationData.java @@ -67,8 +67,6 @@ public class CardPublicationData implements Card { private I18n summary; @CreatedDate private Instant publishDate; - @JsonInclude(JsonInclude.Include.NON_NULL) - private Instant deletionDate; private Instant lttd; @Indexed diff --git a/services/core/cards-publication/src/main/modeling/swagger.yaml b/services/core/cards-publication/src/main/modeling/swagger.yaml index f76c7a2840..9ab7545d02 100755 --- a/services/core/cards-publication/src/main/modeling/swagger.yaml +++ b/services/core/cards-publication/src/main/modeling/swagger.yaml @@ -311,10 +311,6 @@ definitions: $ref: '#/definitions/EpochDate' description: The date the card was published (meaning created by the card service) readOnly: true - deletionDate: - $ref: '#/definitions/EpochDate' - description: The date the card was deleted - readOnly: true lttd: $ref: '#/definitions/EpochDate' description: >- @@ -413,7 +409,6 @@ definitions: processInstanceId: MyProcess_001 state: started publishDate: 1546300800000 - deletionDate: 1546388200000 lttd: 1546387230000 startDate: 1546387200000 endDate: 1546387250000 diff --git a/services/core/cards-publication/src/test/java/org/lfenergy/operatorfabric/cards/publication/services/CardProcessServiceShould.java b/services/core/cards-publication/src/test/java/org/lfenergy/operatorfabric/cards/publication/services/CardProcessServiceShould.java index 1caa8bccf6..2b820e711a 100644 --- a/services/core/cards-publication/src/test/java/org/lfenergy/operatorfabric/cards/publication/services/CardProcessServiceShould.java +++ b/services/core/cards-publication/src/test/java/org/lfenergy/operatorfabric/cards/publication/services/CardProcessServiceShould.java @@ -337,7 +337,7 @@ void preserveData() { .summary(I18nPublicationData.builder().key("summary").parameter("arg1", "value1") .build()) .endDate(start.plusSeconds(60)).lttd(start.minusSeconds(600)) - .deletionDate(start.plusSeconds(3600)).tag("tag1").tag("tag2").data(data) + .tag("tag1").tag("tag2").data(data) .recipient(RecipientPublicationData.builder().type(RecipientEnum.UNION) .recipient(RecipientPublicationData.builder().type(RecipientEnum.USER) .identity("graham").build()) @@ -356,7 +356,7 @@ void preserveData() { ArchivedCardPublicationData archivedPersistedCard = archiveRepository.findById(newCard.getUid()) .block(); - assertThat(archivedPersistedCard).isEqualToIgnoringGivenFields(newCard, "parentCardUid", "uid", "id", "deletionDate", + assertThat(archivedPersistedCard).isEqualToIgnoringGivenFields(newCard, "parentCardUid", "uid", "id", "actions", "timeSpans"); assertThat(archivedPersistedCard.getId()).isEqualTo(newCard.getUid()); assertThat(testCardReceiver.getCardQueue().size()).isEqualTo(1); diff --git a/src/docs/asciidoc/reference_doc/card_structure.adoc b/src/docs/asciidoc/reference_doc/card_structure.adoc index f628ebd0f8..2657d6a32c 100644 --- a/src/docs/asciidoc/reference_doc/card_structure.adoc +++ b/src/docs/asciidoc/reference_doc/card_structure.adoc @@ -123,10 +123,6 @@ State id of the associated process, determined by `OperatorFabric` can be set ar Indicates when the card has been registered in `OperatorFabric` system. This is a technical information exclusively managed by `OperatorFabric`. -==== Deletion Date (`deletionDate°) - -Indicates when the card has been removes from `OperatorFabric` system. Technical information manage by `OperatorFabric`. - == User destined Information of the card There are two kind of User destined information in a card. Some are restricted to the card format, others are defined by the publisher as long as there are encoded in `json` format. diff --git a/src/test/utils/karate/Action/createCardActionLttd.feature b/src/test/utils/karate/Action/createCardActionLttd.feature index 9d6e92884f..8965cee305 100644 --- a/src/test/utils/karate/Action/createCardActionLttd.feature +++ b/src/test/utils/karate/Action/createCardActionLttd.feature @@ -39,7 +39,6 @@ Scenario: Create a card with a valid lttd conditions "processInstanceId": "processInstanceId1", "state": "response_full", "publishDate": startDate, - "deletionDate": null, "lttd": lttd, "startDate": startDate, "endDate": endDate, @@ -134,7 +133,6 @@ Scenario: Create a card - entity of enitiesAllowedToRepond in the card not matc "processInstanceId": "processInstanceId2", "state": "response_full", "publishDate": startDate, - "deletionDate": null, "lttd": lttd, "startDate": startDate, "endDate": endDate, @@ -226,7 +224,6 @@ Scenario: Create a card - with expired lttd "processInstanceId": "processInstanceId3", "state": "response_full", "publishDate": startDate, - "deletionDate": null, "lttd": lttd, "startDate": startDate, "endDate": endDate, @@ -319,7 +316,6 @@ Scenario: Create a card - with expired lttd "processInstanceId": "processInstanceId4", "state": "response_full", "publishDate": startDate, - "deletionDate": null, "startDate": startDate, "endDate": endDate, "severity": "ACTION", diff --git a/src/test/utils/karate/cards/push_action_card.feature b/src/test/utils/karate/cards/push_action_card.feature index 5c2c5eeb2b..a158f55f0a 100644 --- a/src/test/utils/karate/cards/push_action_card.feature +++ b/src/test/utils/karate/cards/push_action_card.feature @@ -20,7 +20,6 @@ Feature: Cards "processInstanceId": "processInstanceId1", "state": "response_full", "publishDate": 1589376144000, - "deletionDate": null, "lttd": 1596042927, "startDate": 1589580000000, "endDate": 1590184800000, @@ -85,7 +84,6 @@ Feature: Cards "processInstanceId": "processInstanceId2", "state": "btnColor_missing", "publishDate": 1589376144000, - "deletionDate": null, "lttd": 1583733121994, "startDate": 1589580000000, "endDate": 1590184800000, @@ -150,7 +148,6 @@ Feature: Cards "processInstanceId": "processInstanceId3", "state": "btnText_missing", "publishDate": 1589376144000, - "deletionDate": null, "lttd": 1583733121997, "startDate": 1589580000000, "endDate": 1590184800000, @@ -215,7 +212,6 @@ Feature: Cards "processInstanceId": "processInstanceId4", "state": "btnColor_btnText_missings", "publishDate": 1589376144000, - "deletionDate": null, "lttd": 1583733121998, "startDate": 1589580000000, "endDate": 1590184800000, @@ -279,7 +275,6 @@ Feature: Cards "processInstanceId": "processInstanceId1", "state": "response_full", "publishDate": 1589376144000, - "deletionDate": null, "lttd": 1583733121999, "startDate": 1589580000000, "endDate": 1590184800000, From 99d6cc652ac5ab9a0aa3701ea9e6f1f240d85bc2 Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Thu, 17 Sep 2020 16:20:46 +0200 Subject: [PATCH 03/76] [OC-1100] New version of new card feature Template mechanism for specific form field Card detail in preview Examples in DefaultBundle Create a new process definition (bundle) for examples Error management --- .../model/ProcessStatesData.java | 1 + .../src/main/modeling/swagger.yaml | 3 + .../postBundleUserCardExamples.feature | 25 ++ .../bundle_defaultProcess/config.json | 6 +- .../template/en/usercard_message.handlebars | 28 ++ .../template/en/usercard_process.handlebars | 48 +++ .../template/fr/usercard_message.handlebars | 25 ++ .../template/fr/usercard_process.handlebars | 47 +++ .../bundle_userCardExamples/config.json | 34 ++ .../bundle_userCardExamples/i18n/en.json | 7 + .../bundle_userCardExamples/i18n/fr.json | 7 + .../template/en/message.handlebars | 11 + .../template/en/usercard_message.handlebars | 29 ++ .../template/fr/message.handlebars | 11 + .../template/fr/usercard_message.handlebars | 26 ++ .../businessconfig/resources/packageBundle.sh | 3 + .../cards/setPerimeterFor6Cards.feature | 4 + .../setPerimeterForUserCardExamples.feature | 44 +++ src/test/utils/karate/loadBundle.sh | 3 + src/test/utils/karate/setPerimeterForTest.sh | 1 + .../datetime-filter.component.ts | 10 +- .../single-filter/single-filter.component.ts | 17 +- ui/main/src/app/model/processes.model.ts | 3 +- .../card-preview/card-preview.component.html | 13 + .../card-preview/card-preview.component.ts | 152 ++++++++ .../usercard/newcard-template.services.ts | 44 +++ .../modules/usercard/usercard.component.html | 127 +++--- .../modules/usercard/usercard.component.scss | 7 + .../modules/usercard/usercard.component.ts | 360 ++++++++++++------ .../app/modules/usercard/usercard.module.ts | 13 +- ui/main/src/assets/i18n/en.json | 16 +- ui/main/src/assets/i18n/fr.json | 18 +- 32 files changed, 929 insertions(+), 214 deletions(-) create mode 100644 src/test/utils/karate/businessconfig/postBundleUserCardExamples.feature create mode 100644 src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/en/usercard_message.handlebars create mode 100644 src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/en/usercard_process.handlebars create mode 100644 src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/fr/usercard_message.handlebars create mode 100644 src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/fr/usercard_process.handlebars create mode 100644 src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/config.json create mode 100644 src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/i18n/en.json create mode 100644 src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/i18n/fr.json create mode 100644 src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/en/message.handlebars create mode 100644 src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/en/usercard_message.handlebars create mode 100644 src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/fr/message.handlebars create mode 100644 src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/fr/usercard_message.handlebars create mode 100644 src/test/utils/karate/cards/setPerimeterForUserCardExamples.feature create mode 100644 ui/main/src/app/modules/usercard/components/card-preview/card-preview.component.html create mode 100644 ui/main/src/app/modules/usercard/components/card-preview/card-preview.component.ts create mode 100644 ui/main/src/app/modules/usercard/newcard-template.services.ts diff --git a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessStatesData.java b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessStatesData.java index 8c01476601..5366373e0a 100644 --- a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessStatesData.java +++ b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessStatesData.java @@ -26,6 +26,7 @@ public class ProcessStatesData implements ProcessStates { private Boolean acknowledgementAllowed; private String color; private String name; + private String userCardTemplate; @Override public void setDetails(List details) { diff --git a/services/core/businessconfig/src/main/modeling/swagger.yaml b/services/core/businessconfig/src/main/modeling/swagger.yaml index a980c586b4..0efc9133fc 100755 --- a/services/core/businessconfig/src/main/modeling/swagger.yaml +++ b/services/core/businessconfig/src/main/modeling/swagger.yaml @@ -408,6 +408,9 @@ definitions: color: type: string description: use as a display cue in the UI + userCardTemplate: + type: string + description : Name of the template to use when creating a new card uiVisibility: type: object properties: diff --git a/src/test/utils/karate/businessconfig/postBundleUserCardExamples.feature b/src/test/utils/karate/businessconfig/postBundleUserCardExamples.feature new file mode 100644 index 0000000000..bdf095b5ab --- /dev/null +++ b/src/test/utils/karate/businessconfig/postBundleUserCardExamples.feature @@ -0,0 +1,25 @@ +Feature: Bundle + + Background: + # Get admin token + * def signIn = call read('../common/getToken.feature') { username: 'admin'} + * def authToken = signIn.authToken + + + Scenario: Post Bundle + + + # Push bundle + Given url opfabUrl + 'businessconfig/processes' + And header Authorization = 'Bearer ' + authToken + And multipart field file = read('resources/bundle_userCardExamples.tar.gz') + When method post + Then status 201 + + # Check bundle + Given url opfabUrl + 'businessconfig/processes/userCardExamples' + And header Authorization = 'Bearer ' + authToken + When method GET + Then status 200 + And match response.id == 'userCardExamples' + diff --git a/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/config.json b/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/config.json index 9bcf49a869..6d0a174525 100644 --- a/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/config.json +++ b/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/config.json @@ -14,7 +14,9 @@ "process", "question", "contingencies", - "response" + "response", + "usercard_message", + "usercard_process" ], "csses": [ "style", @@ -38,6 +40,7 @@ "messageState": { "name": "message.title", "color": "#FAF0AF", + "userCardTemplate": "usercard_message", "details": [ { "title": { @@ -86,6 +89,7 @@ "processState": { "name": "process.label", "color": "#8bcdcd", + "userCardTemplate": "usercard_process", "details": [ { "title": { diff --git a/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/en/usercard_message.handlebars b/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/en/usercard_message.handlebars new file mode 100644 index 0000000000..bb2e0129ba --- /dev/null +++ b/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/en/usercard_message.handlebars @@ -0,0 +1,28 @@ + + +
+ +
+
+ +
+ + + + + + \ No newline at end of file diff --git a/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/en/usercard_process.handlebars b/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/en/usercard_process.handlebars new file mode 100644 index 0000000000..03ec8862e1 --- /dev/null +++ b/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/en/usercard_process.handlebars @@ -0,0 +1,48 @@ +
+
+Define the state of the process +
+ +
+Status of the state +
+
+
+
+ + +
+ +
+ + +
+
+ + + \ No newline at end of file diff --git a/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/fr/usercard_message.handlebars b/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/fr/usercard_message.handlebars new file mode 100644 index 0000000000..3ca3bc3d6e --- /dev/null +++ b/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/fr/usercard_message.handlebars @@ -0,0 +1,25 @@ + + +
+ +
+
+ +
+ + + \ No newline at end of file diff --git a/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/fr/usercard_process.handlebars b/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/fr/usercard_process.handlebars new file mode 100644 index 0000000000..1a37dbcae5 --- /dev/null +++ b/src/test/utils/karate/businessconfig/resources/bundle_defaultProcess/template/fr/usercard_process.handlebars @@ -0,0 +1,47 @@ +
+
+Define the state of the process +
+ +
+Status of the state +
+
+
+
+ + +
+ +
+ + +
+
+ + + \ No newline at end of file diff --git a/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/config.json b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/config.json new file mode 100644 index 0000000000..335e843467 --- /dev/null +++ b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/config.json @@ -0,0 +1,34 @@ +{ + "id": "userCardExamples", + "name": "userCardExamples.label", + "version": "1", + "uiVisibility": { + "monitoring": true, + "logging": true, + "calendar": true + }, + "templates": [ + "message", + "usercard_message" + ], + "csses": [ + ], + "states": { + "messageState": { + "name": "message.title", + "color": "#FAF0AF", + "userCardTemplate": "usercard_message", + "details": [ + { + "title": { + "key": "message.title" + }, + "templateName": "message", + "styles": [ + ] + } + ], + "acknowledgementAllowed": true + } + } +} diff --git a/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/i18n/en.json b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/i18n/en.json new file mode 100644 index 0000000000..4b1bf4666d --- /dev/null +++ b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/i18n/en.json @@ -0,0 +1,7 @@ +{ + "userCardExamples": {"label": "Examples for new cards "}, + "message":{ + "title":"Message", + "summary":"Message received" + } +} diff --git a/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/i18n/fr.json b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/i18n/fr.json new file mode 100644 index 0000000000..9a6d8adb05 --- /dev/null +++ b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/i18n/fr.json @@ -0,0 +1,7 @@ +{ + "userCardExamples": {"label": "Exemples de nouvelles cartes "}, + "message":{ + "title":"Message", + "summary":"Message reçu" + } +} diff --git a/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/en/message.handlebars b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/en/message.handlebars new file mode 100644 index 0000000000..ec19b3fff4 --- /dev/null +++ b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/en/message.handlebars @@ -0,0 +1,11 @@ + + +

You received the following message :

+
+
+ +

+ +{{card.data.message}} + +

\ No newline at end of file diff --git a/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/en/usercard_message.handlebars b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/en/usercard_message.handlebars new file mode 100644 index 0000000000..170844aa0a --- /dev/null +++ b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/en/usercard_message.handlebars @@ -0,0 +1,29 @@ + + +
+ +
+
+ +
+ + + + + + \ No newline at end of file diff --git a/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/fr/message.handlebars b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/fr/message.handlebars new file mode 100644 index 0000000000..4c295b9e5c --- /dev/null +++ b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/fr/message.handlebars @@ -0,0 +1,11 @@ + + +

Vous avez reçu le message suivant

+
+
+ +

+ +{{card.data.message}} + +

\ No newline at end of file diff --git a/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/fr/usercard_message.handlebars b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/fr/usercard_message.handlebars new file mode 100644 index 0000000000..91be6035f0 --- /dev/null +++ b/src/test/utils/karate/businessconfig/resources/bundle_userCardExamples/template/fr/usercard_message.handlebars @@ -0,0 +1,26 @@ + + +
+ +
+
+ +
+ + + \ No newline at end of file diff --git a/src/test/utils/karate/businessconfig/resources/packageBundle.sh b/src/test/utils/karate/businessconfig/resources/packageBundle.sh index 2044c74f4d..0a0f33ef92 100755 --- a/src/test/utils/karate/businessconfig/resources/packageBundle.sh +++ b/src/test/utils/karate/businessconfig/resources/packageBundle.sh @@ -6,3 +6,6 @@ cd bundle_defaultProcess_V0.1 tar -czvf bundle_defaultProcess_V0.1.tar.gz config.json template/ i18n/ mv bundle_defaultProcess_V0.1.tar.gz ../ cd .. +cd bundle_userCardExamples +tar -czvf bundle_userCardExamples.tar.gz config.json template/ i18n/ +mv bundle_userCardExamples.tar.gz ../ diff --git a/src/test/utils/karate/cards/setPerimeterFor6Cards.feature b/src/test/utils/karate/cards/setPerimeterFor6Cards.feature index 0b31a758ee..c3a22c10e8 100644 --- a/src/test/utils/karate/cards/setPerimeterFor6Cards.feature +++ b/src/test/utils/karate/cards/setPerimeterFor6Cards.feature @@ -25,6 +25,10 @@ Feature: Add perimeters/group for action test "state" : "messageState", "right" : "ReceiveAndWrite" } + { + "state" : "processState", + "right" : "ReceiveAndWrite" + } ] } """ diff --git a/src/test/utils/karate/cards/setPerimeterForUserCardExamples.feature b/src/test/utils/karate/cards/setPerimeterForUserCardExamples.feature new file mode 100644 index 0000000000..9c896aecf5 --- /dev/null +++ b/src/test/utils/karate/cards/setPerimeterForUserCardExamples.feature @@ -0,0 +1,44 @@ +Feature: Add perimeters/group for action test + + Background: + #Getting token for admin and tso1-operator user calling getToken.feature + * def signIn = call read('../common/getToken.feature') { username: 'admin'} + * def authToken = signIn.authToken + + + + * def perimeterUserCardExamples = +""" +{ + "id" : "perimeterUserCardExamples", + "process" : "userCardExamples", + "stateRights" : [ + { + "state" : "messageState", + "right" : "ReceiveAndWrite" + } + ] +} +""" + + Scenario: Create perimeterUserCardExamples + Given url opfabUrl + 'users/perimeters' + And header Authorization = 'Bearer ' + authToken + And request perimeterUserCardExamples + When method post + Then status 201 + + + Scenario: Add perimeterQuestion for groups TSO1 + Given url opfabUrl + 'users/groups/TSO1/perimeters' + And header Authorization = 'Bearer ' + authToken + And request ["perimeterUserCardExamples"] + When method patch + Then status 200 + + Scenario: Add perimeterQuestion for groups TSO2 + Given url opfabUrl + 'users/groups/TSO2/perimeters' + And header Authorization = 'Bearer ' + authToken + And request ["perimeterUserCardExamples"] + When method patch + Then status 200 diff --git a/src/test/utils/karate/loadBundle.sh b/src/test/utils/karate/loadBundle.sh index 056d76c797..d97a8c4faf 100755 --- a/src/test/utils/karate/loadBundle.sh +++ b/src/test/utils/karate/loadBundle.sh @@ -9,4 +9,7 @@ cd businessconfig/resources echo "Launch Karate test" java -jar karate.jar \ businessconfig/postBundleDefaultProcess.feature \ + businessconfig/postBundleUserCardExamples.feature \ + + diff --git a/src/test/utils/karate/setPerimeterForTest.sh b/src/test/utils/karate/setPerimeterForTest.sh index 6a84a0fbc7..731c68946a 100755 --- a/src/test/utils/karate/setPerimeterForTest.sh +++ b/src/test/utils/karate/setPerimeterForTest.sh @@ -2,4 +2,5 @@ java -jar karate.jar \ cards/setPerimeterFor6Cards.feature \ + cards/setPerimeterForUserCardExamples.feature \ diff --git a/ui/main/src/app/components/share/datetime-filter/datetime-filter.component.ts b/ui/main/src/app/components/share/datetime-filter/datetime-filter.component.ts index 76a30e6e87..5c795739b6 100644 --- a/ui/main/src/app/components/share/datetime-filter/datetime-filter.component.ts +++ b/ui/main/src/app/components/share/datetime-filter/datetime-filter.component.ts @@ -59,6 +59,7 @@ export class DatetimeFilterComponent implements ControlValueAccessor, OnInit, On this.defaultTime = converted.time; this.disabled = false; this.dateInput.setValue(this.defaultDate); + this.timeInput.setValue(this.defaultTime); this.dateInput.updateValueAndValidity({onlySelf: false, emitEvent: false}); this.datetimeForm.updateValueAndValidity({onlySelf: false, emitEvent: true}); @@ -75,16 +76,13 @@ export class DatetimeFilterComponent implements ControlValueAccessor, OnInit, On public onTouched: () => void = () => { } - // Method call when archive-filter.component.ts set value to 0 + // Method call when archive-filter.component.ts set value to null writeValue(val: any): void { if (!this.offset) { this.disabled = true; } - this.resetDateAndTime(); - - if (val) { - this.datetimeForm.setValue(val, {emitEvent: false}); - } + if (!!val) this.datetimeForm.setValue(val, {emitEvent: false}); + else this.resetDateAndTime(); } registerOnChange(fn: any): void { diff --git a/ui/main/src/app/components/share/single-filter/single-filter.component.ts b/ui/main/src/app/components/share/single-filter/single-filter.component.ts index 87eb0e6958..84f09bc09a 100644 --- a/ui/main/src/app/components/share/single-filter/single-filter.component.ts +++ b/ui/main/src/app/components/share/single-filter/single-filter.component.ts @@ -8,7 +8,7 @@ */ -import {Component, Input, OnInit} from '@angular/core'; +import {Component, Input, OnInit, OnChanges} from '@angular/core'; import {Observable, of} from 'rxjs'; import {I18n} from '@ofModel/i18n.model'; import {FormControl, FormGroup} from '@angular/forms'; @@ -19,7 +19,7 @@ import {map} from 'rxjs/operators'; selector: 'of-single-filter', templateUrl: './single-filter.component.html' }) -export class SingleFilterComponent implements OnInit { +export class SingleFilterComponent implements OnInit, OnChanges { preparedList: { value: string, label: Observable }[]; @Input() public i18nRootLabelKey: string; @@ -37,7 +37,7 @@ export class SingleFilterComponent implements OnInit { ngOnInit() { this.preparedList = []; - if (!this.valuesInObservable && this.values) { + if (!this.valuesInObservable && !!this.values) { for (const v of this.values) { this.preparedList.push(this.computeValueAndLabel(v)); } @@ -56,6 +56,17 @@ export class SingleFilterComponent implements OnInit { } } + + ngOnChanges() { + if (!this.valuesInObservable && this.values) { + this.preparedList = []; + for (const v of this.values) { + this.preparedList.push(this.computeValueAndLabel(v)); + } + + } + } + computeI18nLabelKey(): string { return this.i18nRootLabelKey + this.filterPath; } diff --git a/ui/main/src/app/model/processes.model.ts b/ui/main/src/app/model/processes.model.ts index 7f5e03bccf..7fa1cc021b 100644 --- a/ui/main/src/app/model/processes.model.ts +++ b/ui/main/src/app/model/processes.model.ts @@ -87,7 +87,8 @@ export class State { readonly response?: Response, readonly acknowledgementAllowed?: boolean, readonly name?: string, - readonly color?: string + readonly color?: string, + readonly userCardTemplate?: string ) { } } diff --git a/ui/main/src/app/modules/usercard/components/card-preview/card-preview.component.html b/ui/main/src/app/modules/usercard/components/card-preview/card-preview.component.html new file mode 100644 index 0000000000..ad4b0b3db4 --- /dev/null +++ b/ui/main/src/app/modules/usercard/components/card-preview/card-preview.component.html @@ -0,0 +1,13 @@ + + + + + + + + + + + + +
\ No newline at end of file diff --git a/ui/main/src/app/modules/usercard/components/card-preview/card-preview.component.ts b/ui/main/src/app/modules/usercard/components/card-preview/card-preview.component.ts new file mode 100644 index 0000000000..a5b9e96b7a --- /dev/null +++ b/ui/main/src/app/modules/usercard/components/card-preview/card-preview.component.ts @@ -0,0 +1,152 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + + +import { Component, ElementRef, Input, OnDestroy, OnInit } from '@angular/core'; +import { Card, Detail } from '@ofModel/card.model'; +import { ProcessesService } from '@ofServices/processes.service'; +import { HandlebarsService } from '../../../cards/services/handlebars.service'; +import { DomSanitizer, SafeHtml, SafeResourceUrl } from '@angular/platform-browser'; +import { DetailContext } from '@ofModel/detail-context.model'; +import { Store } from '@ngrx/store'; +import { AppState } from '@ofStore/index'; +import { selectAuthenticationState } from '@ofSelectors/authentication.selectors'; +import { selectGlobalStyleState } from '@ofSelectors/global-style.selectors'; +import { UserContext } from '@ofModel/user-context.model'; +import {skip, switchMap, take, takeUntil } from 'rxjs/operators'; +import { Subject} from 'rxjs'; + +import { User } from '@ofModel/user.model'; + + + + +@Component({ + selector: 'of-card-preview', + templateUrl: './card-preview.component.html' +}) +export class CardPreviewComponent implements OnInit, OnDestroy { + + @Input() card: Card; + @Input() user: User; + @Input() currentPath: string; + + public active = false; + unsubscribe$: Subject = new Subject(); + readonly hrefsOfCssLink = new Array(); + private _htmlContent: SafeHtml; + private _userContext: UserContext; + private detail: Detail; + + + constructor(private element: ElementRef, private businessconfigService: ProcessesService, + private handlebars: HandlebarsService, private sanitizer: DomSanitizer, + private store: Store) { + + this.store.select(selectAuthenticationState).subscribe(authState => { + this._userContext = new UserContext( + authState.identifier, + authState.token, + authState.firstName, + authState.lastName + ); + }); + this.reloadTemplateWhenGlobalStyleChange(); + } + + + ngOnInit() { + this.getTemplateAndStyle(); + + } + + private getTemplateAndStyle() { + this.businessconfigService.queryProcess(this.card.process, this.card.processVersion) + .pipe(takeUntil(this.unsubscribe$)) + .subscribe(businessconfig => { + if (!!businessconfig) { + const state = businessconfig.extractState(this.card); + if (!!state) { + this.detail = state.details[0]; // Take the first detail , new card preview non compatible with more than one detail + } + this.initializeHrefsOfCssLink(); + this.initializeHandlebarsTemplates(); + } + }, + error => console.log(`something went wrong while trying to fetch process for ${this.card.process} + with ${this.card.processVersion} version.`) + ); + } + + + + // for certain types of template , we need to reload it to take into account + // the new css style (for example with chart done with chart.js) + private reloadTemplateWhenGlobalStyleChange() { + this.store.select(selectGlobalStyleState) + .pipe(takeUntil(this.unsubscribe$), skip(1)) + .subscribe(style => this.initializeHandlebarsTemplates()); + } + + + private initializeHrefsOfCssLink() { + if (!!this.detail && !!this.detail.styles) { + const process = this.card.process; + const processVersion = this.card.processVersion; + this.detail.styles.forEach(style => { + const cssUrl = this.businessconfigService.computeBusinessconfigCssUrl(process, style, processVersion); + // needed to instantiate href of link for css in component rendering + const safeCssUrl = this.sanitizer.bypassSecurityTrustResourceUrl(cssUrl); + this.hrefsOfCssLink.push(safeCssUrl); + }); + } + } + + private initializeHandlebarsTemplates() { + + this.businessconfigService.queryProcessFromCard(this.card).pipe( + takeUntil(this.unsubscribe$), + switchMap(process => { + return this.handlebars.executeTemplate(this.detail.templateName, + new DetailContext(this.card, this._userContext, null)); + }) + ) + .subscribe( + html => { + this._htmlContent = this.sanitizer.bypassSecurityTrustHtml(html); + setTimeout(() => { // wait for DOM rendering + this.reinsertScripts(); + }, 10); + } + ); + } + + get htmlContent() { + return this._htmlContent; + } + + reinsertScripts(): void { + const scripts = this.element.nativeElement.getElementsByTagName('script'); + Array.prototype.forEach.call(scripts, script => { //scripts.foreach does not work ... + const scriptCopy = document.createElement('script'); + scriptCopy.type = script.type ? script.type : 'text/javascript'; + if (!!script.innerHTML) { + scriptCopy.innerHTML = script.innerHTML; + } + scriptCopy.async = false; + script.parentNode.replaceChild(scriptCopy, script); + + }); + } + + ngOnDestroy() { + this.unsubscribe$.next(); + this.unsubscribe$.complete(); + } +} diff --git a/ui/main/src/app/modules/usercard/newcard-template.services.ts b/ui/main/src/app/modules/usercard/newcard-template.services.ts new file mode 100644 index 0000000000..987bbcb990 --- /dev/null +++ b/ui/main/src/app/modules/usercard/newcard-template.services.ts @@ -0,0 +1,44 @@ +import {Injectable} from '@angular/core'; + + +import {Map} from '@ofModel/map'; +import {ProcessesService} from '@ofServices/processes.service'; +import {Store} from '@ngrx/store'; +import {AppState} from '@ofStore/index'; +import {buildSettingsOrConfigSelector} from '@ofSelectors/settings.x.config.selectors'; +import {Observable, of} from 'rxjs'; + + +@Injectable() +export class NewCardTemplateService { + + private templateCache: Map = new Map(); + private _locale: string; + + + constructor(private businessconfig: ProcessesService, private store: Store) { + this.store.select(buildSettingsOrConfigSelector('locale')).subscribe(locale => this.changeLocale(locale)); + } + + + public changeLocale(locale: string){ + if (!!locale) { + this._locale = locale; + } else { + this._locale = 'en'; + } + } + + public getTemplate(process: string, version: string, name: string ): Observable { + const locale = this._locale; + const key = `${process}.${version}.${name}.${locale}`; + const template = this.templateCache[key]; + if (!!template) { + return of(template); + } + + const response = this.businessconfig.fetchHbsTemplate(process, version, name, locale); + response.subscribe((newTemplate) => this.templateCache[key] = newTemplate); + return response; + } +} diff --git a/ui/main/src/app/modules/usercard/usercard.component.html b/ui/main/src/app/modules/usercard/usercard.component.html index e84e485547..72814f5d09 100644 --- a/ui/main/src/app/modules/usercard/usercard.component.html +++ b/ui/main/src/app/modules/usercard/usercard.component.html @@ -6,108 +6,99 @@ -
usercard.title
- -
-
+

userCard.title

+
+
+
+
- +
- +
- +
- +
- -
-
-
-
- +
+ +
-
- +
+ +
+
+ + +
+
+
-
+
- - -
- {{message}}{{error}} - +

- +

{{messageAfterSendingCard}}

+

+ +
+
+
+
+ +
+
+{{errorMessage.text}} + +
- + \ No newline at end of file diff --git a/ui/main/src/app/modules/usercard/usercard.component.scss b/ui/main/src/app/modules/usercard/usercard.component.scss index d6d03c4861..350a7411c3 100644 --- a/ui/main/src/app/modules/usercard/usercard.component.scss +++ b/ui/main/src/app/modules/usercard/usercard.component.scss @@ -2,6 +2,13 @@ background-color: var(--opfab-lightcard-detail-bgcolor); color: var(--opfab-lightcard-detail-textcolor); } + + +.modal-header{ + background-color: var(--opfab-lightcard-detail-bgcolor); + color: var(--opfab-lightcard-detail-textcolor); +} + .btn{ color: var(--opfab-lightcard-detail-textcolor); } diff --git a/ui/main/src/app/modules/usercard/usercard.component.ts b/ui/main/src/app/modules/usercard/usercard.component.ts index fd573f970a..ab8cbeee64 100644 --- a/ui/main/src/app/modules/usercard/usercard.component.ts +++ b/ui/main/src/app/modules/usercard/usercard.component.ts @@ -7,58 +7,76 @@ * This file is part of the OperatorFabric project. */ -import { Component, OnDestroy, TemplateRef } from '@angular/core'; -import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; +import { Component, OnDestroy, TemplateRef, ElementRef, OnInit } from '@angular/core'; +import { FormControl, FormGroup } from '@angular/forms'; import { Store } from '@ngrx/store'; import { AppState } from '@ofStore/index'; import { CardService } from '@ofServices/card.service'; import { UserService } from '@ofServices/user.service'; -import { selectIdentifier } from '@ofSelectors/authentication.selectors'; -import { map, switchMap, takeUntil, withLatestFrom } from 'rxjs/operators'; -import { Card, fromCardToLightCard } from '@ofModel/card.model'; +import { map, takeUntil, tap } from 'rxjs/operators'; +import { Card} from '@ofModel/card.model'; import { I18n } from '@ofModel/i18n.model'; import { Observable, Subject } from 'rxjs'; import { selectProcesses } from '@ofSelectors/process.selector'; import { Process, State } from '@ofModel/processes.model'; -import { transformToTimestamp } from '../archives/components/archive-filters/archive-filters.component'; import { TimeService } from '@ofServices/time.service'; -import { selectAllEntities } from '@ofSelectors/user.selector'; -import { Entity, User } from '@ofModel/user.model'; import { Severity } from '@ofModel/light-card.model'; import { Guid } from 'guid-typescript'; -import { ModalDismissReasons, NgbModal } from '@ng-bootstrap/ng-bootstrap'; +import { NgbModal, NgbModalOptions } from '@ng-bootstrap/ng-bootstrap'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'; +import { NewCardTemplateService } from './newcard-template.services'; +import { SafeHtml, DomSanitizer } from '@angular/platform-browser'; +import { UserWithPerimeters, RightsEnum, ComputedPerimeter } from '@ofModel/userWithPerimeters.model'; +import { EntitiesService } from '@ofServices/entities.service'; +import { transformToTimestamp } from '../archives/components/archive-filters/archive-filters.component'; + +declare const templateGateway: any; + +class Message { + text: string; + display: boolean; +} @Component({ selector: 'of-usercard', templateUrl: './usercard.component.html', styleUrls: ['./usercard.component.scss'] }) -export class UserCardComponent implements OnDestroy { +export class UserCardComponent implements OnDestroy, OnInit { messageForm: FormGroup; - message: string; - error: any; + messageAfterSendingCard: string; + - fetchedProcesses: Process[]; - currentUser: User; + processesDefinition: Process[]; + currentUserWithPerimeters: UserWithPerimeters; severityOptions = Object.keys(Severity).map(severity => { return { value: severity, - label: new I18n('usercard.options.severity.' + severity) + label: new I18n('userCard.options.severity.' + severity) }; }); processOptions$: Observable; - stateOptions$: Observable; - entityOptions$: Observable; + stateOptions: any[]; + entityOptions = new Array(); + dropdownSettings = {}; - card: Card; + selectedProcess: Process; + selectedState: string; + statesPerProcesses = new Map(); + userCardTemplate: SafeHtml; + + public card: Card; + + readonly defaultStartDate = new Date().valueOf() + 60000; + readonly defaultEndDate = new Date().valueOf() + 60000 * 60; unsubscribe$: Subject = new Subject(); - readonly msg = 'Card will be resumed here soon!'; + public displaySendResult = false; + errorMessage: Message = { display: false, text: undefined }; modalRef: NgbModalRef; @@ -67,12 +85,23 @@ export class UserCardComponent implements OnDestroy { } constructor(private store: Store, - private formBuilder: FormBuilder, private cardService: CardService, private userService: UserService, private timeService: TimeService, - private modalService: NgbModal + private entitiesService: EntitiesService, + private modalService: NgbModal, + private newCardTemplateService: NewCardTemplateService, + private sanitizer: DomSanitizer, + private element: ElementRef ) { + } + + ngOnInit() { + + this.currentUserWithPerimeters = this.userService.getCurrentUserWithPerimeters(); + this.loadAllEntities(); + this.loadAllProcessAndStateInUserPerimeter(); + this.messageForm = new FormGroup({ severity: new FormControl(''), @@ -81,114 +110,222 @@ export class UserCardComponent implements OnDestroy { startDate: new FormControl(''), endDate: new FormControl(''), comment: new FormControl(''), - entities: new FormControl('') - } - ); + entities: new FormControl([]) + }); + + this.changeSeverityToDefaultValue(); + this.changeStatesWhenSelectProcess(); + this.loadTemplateWhenStateChange(); + this.dropdownSettings = { + text: 'Select a recipîent', + selectAllText: 'Select All', + unSelectAllText: 'UnSelect All', + enableSearchFilter: true, + classes: 'custom-class-example' + }; + + } + + loadAllEntities(): void { + this.entitiesService.getEntities().forEach(entity => + this.entityOptions.push({ id: entity.id, itemName: entity.name })); + } + + + loadAllProcessAndStateInUserPerimeter(): void { this.processOptions$ = this.store.select(selectProcesses).pipe( takeUntil(this.unsubscribe$), + tap((allProcesses: Process[]) => this.processesDefinition = allProcesses), map((allProcesses: Process[]) => { - return allProcesses.map((proc: Process) => { - const _i18nPrefix = proc.id + '.' + proc.version + '.'; - const label = proc.name ? (_i18nPrefix + proc.name) : proc.id; - return { - value: proc.id, - label: label - }; + const processesToShow: any[] = new Array(); + const processesInPerimeter: Set = new Set(); + this.currentUserWithPerimeters.computedPerimeters.forEach(perimeter => { + if (this.userCanSendCard(perimeter)) processesInPerimeter.add(perimeter.process); + }); + allProcesses.forEach(process => { + if (processesInPerimeter.has(process.id)) { + const _i18nPrefix = process.id + '.' + process.version + '.'; + const label = process.name ? (_i18nPrefix + process.name) : process.id; + const processToShow = { value: process.id, label: label }; + processesToShow.push(processToShow); + this.loadStatesForProcess(process); + } }); + return processesToShow; }) ); + } - this.stateOptions$ = this.messageForm.get('process').valueChanges.pipe( - withLatestFrom(this.store.select(selectProcesses)), - map(([selectedProcessId, allProcesses]: [string, Process[]]) => { - // TODO What if selectedProcessId is null ? == vs === - const selectedProcess = allProcesses.find(process => process.id === selectedProcessId); - if (selectedProcess) { - return Object.entries(selectedProcess.states).map(([id, state]: [string, State]) => { - const label = state.name ? (new I18n(this.getI18nPrefixFromProcess(selectedProcess) - + state.name)) : id; - return { - value: id, - label: label - }; - }); - } else { - return []; - } - }) - ); - this.entityOptions$ = this.store.select(selectAllEntities).pipe( - takeUntil(this.unsubscribe$), - map((allEntities: Entity[]) => allEntities.map((entity: Entity) => { - return { value: entity.id, label: entity.name }; - }) - ) - ); + private userCanSendCard(perimeter: ComputedPerimeter): boolean { + return ((perimeter.rights === RightsEnum.ReceiveAndWrite) + || (perimeter.rights === RightsEnum.Write)); + } + + loadStatesForProcess(process: Process): void { + const statesList = []; + this.currentUserWithPerimeters.computedPerimeters.forEach( + perimeter => { + if ((perimeter.process === process.id) && this.userCanSendCard(perimeter)) { + const state = process.states[perimeter.state]; + const label = !!state.name ? (new I18n(this.getI18nPrefixFromProcess(process) + + state.name)) : perimeter.state; + const stateEntry = { value: perimeter.state, label: label }; + statesList.push(stateEntry); - this.store.select(selectProcesses) - .pipe(takeUntil(this.unsubscribe$)). - subscribe((allProcesses: Process[]) => { - this.fetchedProcesses = allProcesses; + } }); + this.statesPerProcesses.set(process.id, statesList); + } + + + changeSeverityToDefaultValue(): void { + this.messageForm.get('severity').valueChanges.subscribe((severity) => { + if (!severity) this.messageForm.get('severity').setValue(this.severityOptions[0].value); + }); + this.messageForm.get('severity').setValue(this.severityOptions[0].value); - const userWithPerimeters = this.userService.getCurrentUserWithPerimeters(); - if (userWithPerimeters) { - this.currentUser = userWithPerimeters.userData; - } } + + changeStatesWhenSelectProcess(): void { + this.messageForm.get('process').valueChanges.subscribe((process) => { + if (!!process) { + this.stateOptions = this.statesPerProcesses.get(process); + this.selectedState = this.stateOptions[0].value; + this.selectedProcess = this.processesDefinition.find(processDefinition => { + return processDefinition.id === process; + }); + this.messageForm.get('state').setValue(this.selectedState); + this.loadTemplate(); + } + }); + } + + loadTemplateWhenStateChange(): void { + this.messageForm.get('state').valueChanges.subscribe((state) => { + if (!!state) { + this.selectedState = state; + this.loadTemplate(); + } + }); + } + + loadTemplate() { + this.errorMessage.display = false; + const templateName = this.selectedProcess.states[this.selectedState].userCardTemplate; + if (!!templateName) { + this.newCardTemplateService.getTemplate(this.selectedProcess.id, this.selectedProcess.version, templateName) + .subscribe((template) => { + this.userCardTemplate = this.sanitizer.bypassSecurityTrustHtml(template); + setTimeout(() => { // wait for DOM rendering + this.reinsertScripts(); + }, 10); + } + ); + } else this.userCardTemplate = this.sanitizer.bypassSecurityTrustHtml(''); + + } + + reinsertScripts(): void { + const scripts = this.element.nativeElement.getElementsByTagName('script'); + Array.prototype.forEach.call(scripts, script => { //scripts.foreach does not work ... + const scriptCopy = document.createElement('script'); + scriptCopy.type = script.type ? script.type : 'text/javascript'; + if (!!script.innerHTML) { + scriptCopy.innerHTML = script.innerHTML; + } + scriptCopy.async = false; + script.parentNode.replaceChild(scriptCopy, script); + + }); + } + + onSubmitForm(template: TemplateRef) { const formValue = this.messageForm.value; - const processFormVal = formValue['process']; - const selectedProcess = this.fetchedProcesses.find(process => { + const selectedProcess = this.processesDefinition.find(process => { return process.id === processFormVal; }); const processVersion = selectedProcess.version; - const formValueElement = formValue['state']; - const selectedState = selectedProcess.states[formValueElement]; - const titleKey = (new I18n((selectedState.name) ? selectedProcess.name : formValueElement)); - const now = new Date().getTime(); + const state = formValue['state']; + + if (!templateGateway.getSpecificCardInformation) { + console.log('No getSpecificCardInformationMethod() in template can not send card'); + this.errorMessage.display = true; + this.errorMessage.text = 'userCard.error.templateError'; + return; + } + + const specificInformation = templateGateway.getSpecificCardInformation(); + if (!specificInformation) { + console.log('getSpecificCardInformationMethod() in template return no information'); + this.errorMessage.display = true; + this.errorMessage.text = 'userCard.error.templateError'; + return; + } + + if (!specificInformation.valid) { + this.errorMessage.display = true; + this.errorMessage.text = specificInformation.errorMsg; + return; + } + + const entities = new Array(); + if (formValue['entities'].length < 1) { + this.errorMessage.display = true; + this.errorMessage.text = 'userCard.error.noRecipientSelected'; + return; + } else { + formValue['entities'].forEach(entity => entities.push(entity.id)); + } + + let startDate = this.messageForm.get('startDate').value; + if (!startDate) startDate = this.defaultStartDate; + else startDate = this.createTimestampFromValue(startDate); + + let endDate = this.messageForm.get('endDate').value; + if (!endDate) endDate = this.defaultEndDate; + else endDate = this.createTimestampFromValue(endDate); + + const title = (!!specificInformation.card.title) ? specificInformation.card.title : 'UNDEFINED'; + const summary = (!!specificInformation.card.summary) ? specificInformation.card.summary : 'UNDEFINED'; + const generatedId = Guid.create().toString(); - let tempCard = { - uid: generatedId, + this.card = { id: generatedId, publishDate: null, - publisher: this.currentUser.entities[0], + publisher: this.currentUserWithPerimeters.userData.entities[0], processVersion: processVersion, process: processFormVal, processInstanceId: generatedId, - state: formValueElement, - startDate: formValue['startDate'] ? this.createTimestampFromValue(formValue['startDate']) : now, + state: state, + startDate: startDate, + endDate: endDate, severity: formValue['severity'], hasBeenAcknowledged: false, hasBeenRead: false, - entityRecipients: [formValue['entities']], + entityRecipients: entities, + entitiesAllowedToRespond: [], externalRecipients: null, - title: titleKey, - summary: new I18n('SUMMARY CONTENT TO BE DEFINED'), // TODO - data: { - comment: formValue['comment'] - }, - recipient: null + title: title, + summary: summary, + data: specificInformation.card.data, } as Card; - const endDate = formValue['endDate']; - if (!!endDate) { - tempCard = { - ...tempCard, - endDate: this.createTimestampFromValue(endDate) - }; - } - this.card = tempCard; - this.modalRef = this.modalService.open(template); + const options: NgbModalOptions = { + size: 'lg' + }; + this.errorMessage.display = false; + this.modalRef = this.modalService.open(template, options); } + createTimestampFromValue = (value: any): number => { const { date, time } = value; if (date) { @@ -199,6 +336,7 @@ export class UserCardComponent implements OnDestroy { } } + getI18nPrefixFromProcess = (process: Process): string => { return process.id + '.' + process.version + '.'; } @@ -212,22 +350,22 @@ export class UserCardComponent implements OnDestroy { this.cardService.postResponseCard(this.card) .subscribe( resp => { - this.message = ''; + this.messageAfterSendingCard = ''; const msg = resp.message; // TODO better way to handle perimeter errors if (!!msg && msg.includes('unable')) { - this.error = msg; + console.log('Impossible to send card , error message from service : ', msg); + this.messageAfterSendingCard = 'userCard.error.impossibleToSendCard'; } else { - this.message = msg; + this.messageAfterSendingCard = 'userCard.cardSendWithNoError'; } - this.modalRef.close(this.message); + this.modalRef.close(); this.displaySendResult = true; this.messageForm.reset(); }, err => { - console.error(err); - this.error = err; - this.modalRef.close(this.error); + console.error('Error when sending card :', err); + this.modalRef.close(); this.displaySendResult = true; this.messageForm.reset(); } @@ -235,33 +373,13 @@ export class UserCardComponent implements OnDestroy { } decline(): void { - this.message = 'Declined!'; - this.modalRef.dismiss(this.message); - } - - formatTime(time) { - return this.timeService.formatDateTime(time); - } - - reset() { - this.messageForm.reset(); + this.modalRef.dismiss(this.messageAfterSendingCard); } sendAnotherUserCard() { + this.userCardTemplate = ''; this.card = null; this.displaySendResult = false; - this.reset(); } - existsError(): boolean { - return !!this.error; - } - - noError(): boolean { - return !this.existsError(); - } - - getLightCard() { - return fromCardToLightCard(this.card); - } } diff --git a/ui/main/src/app/modules/usercard/usercard.module.ts b/ui/main/src/app/modules/usercard/usercard.module.ts index b6428f1801..302aec977c 100644 --- a/ui/main/src/app/modules/usercard/usercard.module.ts +++ b/ui/main/src/app/modules/usercard/usercard.module.ts @@ -11,18 +11,22 @@ import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import {UserCardComponent} from './usercard.component'; +import {CardPreviewComponent} from './components/card-preview/card-preview.component'; import {UserCardRoutingModule} from './usercard-routing.module'; import {TranslateModule} from '@ngx-translate/core'; import {FlatpickrModule} from 'angularx-flatpickr'; import {ArchivesModule} from '../archives/archives.module'; import {SingleFilterModule} from '../../components/share/single-filter/single-filter.module'; +import {MultiFilterModule} from '../../components/share/multi-filter/multi-filter.module'; import {DatetimeFilterModule} from '../../components/share/datetime-filter/datetime-filter.module'; import {TextAreaModule} from '../../components/share/text-area/text-area.module'; import {CardsModule} from '../cards/cards.module'; import {NgbModule} from '@ng-bootstrap/ng-bootstrap'; +import { NewCardTemplateService } from './newcard-template.services'; +import {MultiFilter2Module} from '../../components/share/multi-filter-2/multi-filter-2.module'; @NgModule({ - declarations: [UserCardComponent], + declarations: [UserCardComponent, CardPreviewComponent], imports: [ CommonModule, FormsModule, @@ -32,11 +36,14 @@ import {NgbModule} from '@ng-bootstrap/ng-bootstrap'; FlatpickrModule.forRoot(), ArchivesModule, SingleFilterModule, + MultiFilterModule, DatetimeFilterModule, TextAreaModule, CardsModule, - NgbModule - ] + NgbModule, + MultiFilter2Module + ], + providers: [NewCardTemplateService], }) export class UserCardModule { } diff --git a/ui/main/src/assets/i18n/en.json b/ui/main/src/assets/i18n/en.json index fa3a88de9b..c265d2dc40 100755 --- a/ui/main/src/assets/i18n/en.json +++ b/ui/main/src/assets/i18n/en.json @@ -140,14 +140,19 @@ "reset" : "Reset" }, - "usercard": { - "title": "Edit Free Message Notification", + "userCard": { + "title": "New Card Edition", + "error": { + "noRecipientSelected" : "You must at least choose one recipient", + "templateError" : "Technical error : invalid template", + "impossibleToSendCard" : "Impossible to send card for technical reasons" + }, "filters": { "severity": "Severity", "process": "Process", "state": "State", - "startDate": "Start Date", - "endDate": "End Date", + "startDate": "Validity Start Date", + "endDate": "Validity End Date", "comment": "Comment", "entities": "Recipient" }, @@ -165,7 +170,8 @@ "refuse": "Cancel", "processInstanceId": "Id", "state": "State", - "send-another-one": "Send another Card" + "send-another-one": "Send another Card", + "cardSendWithNoError": "Card send" }, "response": { "btnTitle": "VALIDATE ANSWERS", diff --git a/ui/main/src/assets/i18n/fr.json b/ui/main/src/assets/i18n/fr.json index 3d62435aa6..f1804e52c8 100755 --- a/ui/main/src/assets/i18n/fr.json +++ b/ui/main/src/assets/i18n/fr.json @@ -143,16 +143,21 @@ "cancel": "Annuler", "reset": "Effacer" }, - "usercard": { - "title": "Éditer la notification par Free Message", + "userCard": { + "title": "Édition d'une nouvelle carte", + "error": { + "noRecipientSelected" : "Vous devez au moins choisir un destinataire", + "templateError" : "Erreur technique : template non conforme", + "impossibleToSendCard" : "Impossible d'envoyer la carte pour des raisons techniques" + }, "filters": { "severity": "Sévérité", "process": "Processus", "state": "État", - "startDate": "Date de début", - "endDate": "Date de fin", + "startDate": "Date de début de validité", + "endDate": "Date de fin de validité", "comment": "Commentaire", - "entities": "Recipiendaire" + "entities": "Destinataire" }, "options": { "severity": { @@ -168,7 +173,8 @@ "refuse": "Annuler", "processInstanceId": "Identifiant", "state": "État", - "send-another-one": "Envoyer une autre carte" + "send-another-one": "Envoyer une autre carte", + "cardSendWithNoError": "Carte envoyée" }, "response": { "btnTitle": "VALIDER REPONSES", From 0089c420e2801d7ea65b5bad281484cd57c68e3b Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Tue, 29 Sep 2020 13:43:42 +0200 Subject: [PATCH 04/76] Add foreach guideline in documentation --- src/docs/asciidoc/community/index.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/docs/asciidoc/community/index.adoc b/src/docs/asciidoc/community/index.adoc index f23fc6d5b9..3c61d81713 100644 --- a/src/docs/asciidoc/community/index.adoc +++ b/src/docs/asciidoc/community/index.adoc @@ -70,9 +70,10 @@ include::workflow.adoc[leveloffset=+2] to have to maintain these mentions (since this information is tracked by git anyway). * For ui code, you must use a linter with rules provided in ui/main/tslint.json -==== Angular development caution and tooltips +==== Angular/TypeScript development caution and guidelines -* Use !!myVariable to test if a variable is undefined or null +* Use `!!myVariable` to test if a variable is undefined or null +* Use `foreach` to iterate over an array (instead of `for(let i = ..`) . In some cases, foreach do not work and you can use it this way `Array.prototype.forEach.call(myArray, element => .... )` (see https://stackoverflow.com/questions/43743560/foreach-vs-array-prototype-foreach-call) * Do not use ngFor / ngIf with methods with computing as angular will call these methods very regularly (around ten times per seconds), use instead variables and compute them only when necessary. * ngInit() : ngInit is called when component is created, the creation is made by the parent component : be careful to check when initialization is done when calling method inside ngInit. When the context of the parent component change, it can lead to a new initialization or not. From 6738c6876aca8bf21f98af350c9e3116c270d525 Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Tue, 29 Sep 2020 11:53:25 +0200 Subject: [PATCH 05/76] [OC-1137] Improve UI initialization Wait for entities, processes and user perimeters loading before starting main screens Processes are not loaded anymore via ngrx Remove useless unit test for monitoring.component --- ui/main/src/app/app.component.ts | 45 ++++++++------ .../app/components/navbar/navbar.component.ts | 2 - .../logging-filters.component.html | 2 +- .../logging-filters.component.ts | 13 ++-- .../app/modules/logging/logging.component.ts | 36 ++++------- .../monitoring-filters.component.ts | 16 ++--- .../monitoring/monitoring.component.spec.ts | 59 ------------------- .../monitoring/monitoring.component.ts | 41 +++++-------- .../modules/usercard/usercard.component.html | 7 ++- .../modules/usercard/usercard.component.ts | 33 +++++------ ui/main/src/app/services/entities.service.ts | 20 ++++--- ui/main/src/app/services/processes.service.ts | 18 ++++++ ui/main/src/app/services/user.service.ts | 18 +++--- .../src/app/store/actions/process.action.ts | 30 ---------- .../app/store/actions/translate.actions.ts | 7 ++- .../src/app/store/effects/process.effects.ts | 31 ---------- .../app/store/effects/translate.effects.ts | 14 ++--- ui/main/src/app/store/index.ts | 10 +--- .../src/app/store/reducers/process.reducer.ts | 26 -------- .../app/store/selectors/config.selectors.ts | 23 -------- .../app/store/selectors/process.selector.ts | 21 ------- ui/main/src/app/store/states/process.state.ts | 16 ----- ui/main/src/tests/helpers.ts | 1 - 23 files changed, 140 insertions(+), 349 deletions(-) delete mode 100644 ui/main/src/app/modules/monitoring/monitoring.component.spec.ts delete mode 100644 ui/main/src/app/store/actions/process.action.ts delete mode 100644 ui/main/src/app/store/effects/process.effects.ts delete mode 100644 ui/main/src/app/store/reducers/process.reducer.ts delete mode 100644 ui/main/src/app/store/selectors/config.selectors.ts delete mode 100644 ui/main/src/app/store/selectors/process.selector.ts delete mode 100644 ui/main/src/app/store/states/process.state.ts diff --git a/ui/main/src/app/app.component.ts b/ui/main/src/app/app.component.ts index 493655b510..38da4ecc83 100644 --- a/ui/main/src/app/app.component.ts +++ b/ui/main/src/app/app.component.ts @@ -15,14 +15,17 @@ import { Store } from '@ngrx/store'; import { AppState } from '@ofStore/index'; import { AuthenticationService } from '@ofServices/authentication/authentication.service'; import { LoadConfigSuccess } from '@ofActions/config.actions'; +import { LoadProcessesTranslation } from '@ofActions/translate.actions'; import { selectIdentifier } from '@ofSelectors/authentication.selectors'; -import { ConfigService} from "@ofServices/config.service"; +import { ConfigService} from '@ofServices/config.service'; import {TranslateService} from '@ngx-translate/core'; -import { catchError } from 'rxjs/operators'; +import { catchError, skip} from 'rxjs/operators'; +import {merge} from 'rxjs'; import { I18nService } from '@ofServices/i18n.service'; import { CardService } from '@ofServices/card.service'; import { UserService } from '@ofServices/user.service'; import { EntitiesService } from '@ofServices/entities.service'; +import { ProcessesService } from '@ofServices/processes.service'; @Component({ @@ -43,58 +46,66 @@ export class AppComponent implements OnInit { private titleService: Title , private authenticationService: AuthenticationService ,private configService: ConfigService - , private translate: TranslateService + , private translateService: TranslateService , private i18nService: I18nService , private cardService: CardService , private userService: UserService - ,private entitiesService: EntitiesService) { + , private entitiesService: EntitiesService + , private processesService: ProcessesService) { } ngOnInit() { this.loadConfiguration(); - this.initCardSubsriptionWhenUserAuthenticated(); + this.initApplicationWhenUserAuthenticated(); } private loadConfiguration() { this.configService.fetchConfiguration().subscribe(config => { - console.log(new Date().toISOString(),`Configuration loaded (web-ui.json)`); - if (config.i18n.supported.locales) this.translate.addLangs(config.i18n.supported.locales); + console.log(new Date().toISOString(), `Configuration loaded (web-ui.json)`); + if (config.i18n.supported.locales) this.translateService.addLangs(config.i18n.supported.locales); this.setTitle(); this.store.dispatch(new LoadConfigSuccess({config: config})); this.launchAuthenticationProcess(); }) - catchError((err,caught) => { - console.error("Impossible to load configuration file web-ui.json",err); + catchError((err, caught) => { + console.error('Impossible to load configuration file web-ui.json', err); return caught; }); } - private setTitle() - { + private setTitle() { const title = this.configService.getConfigValue('title'); if (!!title) this.titleService.setTitle(title); } private launchAuthenticationProcess() { - console.log(new Date().toISOString(),`Launch authentification process`); + console.log(new Date().toISOString(), `Launch authentication process`); this.authenticationService.initializeAuthentication(); this.useCodeOrImplicitFlow = this.authenticationService.isAuthModeCodeOrImplicitFlow(); } - private initCardSubsriptionWhenUserAuthenticated() { + private initApplicationWhenUserAuthenticated() { this.store .select(selectIdentifier) .subscribe(identifier => { if (identifier) { - console.log(new Date().toISOString(),`User ${identifier} logged`); + console.log(new Date().toISOString(), `User ${identifier} logged`); this.isAuthenticated = true; - this.userService.loadUserWithPerimetersData(); - this.entitiesService.loadAllEntitiesData(); this.cardService.initCardSubscription(); - this.cardService.initSubscription.subscribe( ()=> this.loaded = true); + merge( + this.userService.loadUserWithPerimetersData(), + this.entitiesService.loadAllEntitiesData(), + this.processesService.loadAllProcesses(), + this.cardService.initSubscription) + .pipe(skip(3)) + .subscribe( () => { + this.store.dispatch(new LoadProcessesTranslation()); + this.loaded = true; + }); } }); } + } diff --git a/ui/main/src/app/components/navbar/navbar.component.ts b/ui/main/src/app/components/navbar/navbar.component.ts index 6b25726229..56b706b34a 100644 --- a/ui/main/src/app/components/navbar/navbar.component.ts +++ b/ui/main/src/app/components/navbar/navbar.component.ts @@ -23,7 +23,6 @@ import * as _ from 'lodash'; import {GlobalStyleService} from '@ofServices/global-style.service'; import {Route} from '@angular/router'; import {ConfigService} from '@ofServices/config.service'; -import {QueryAllProcesses} from '@ofActions/process.action'; import {QueryAllEntities} from "@ofActions/user.actions"; @Component({ @@ -63,7 +62,6 @@ export class NavbarComponent implements OnInit { _.fill(this.expandedMenu, false); })); this.store.dispatch(new LoadMenu()); - this.store.dispatch(new QueryAllProcesses()); this.store.dispatch(new QueryAllEntities()); diff --git a/ui/main/src/app/modules/logging/components/logging-filters/logging-filters.component.html b/ui/main/src/app/modules/logging/components/logging-filters/logging-filters.component.html index bf51576a8b..3405c54130 100644 --- a/ui/main/src/app/modules/logging/components/logging-filters/logging-filters.component.html +++ b/ui/main/src/app/modules/logging/components/logging-filters/logging-filters.component.html @@ -14,7 +14,7 @@ + [values]="processData">
diff --git a/ui/main/src/app/modules/logging/components/logging-filters/logging-filters.component.ts b/ui/main/src/app/modules/logging/components/logging-filters/logging-filters.component.ts index d1e2396e2d..711cb30f94 100644 --- a/ui/main/src/app/modules/logging/components/logging-filters/logging-filters.component.ts +++ b/ui/main/src/app/modules/logging/components/logging-filters/logging-filters.component.ts @@ -7,11 +7,10 @@ * This file is part of the OperatorFabric project. */ -import {Component, Input, OnDestroy, OnInit} from '@angular/core'; +import {Component, Input, OnInit} from '@angular/core'; import {AppState} from '@ofStore/index'; import {Store} from '@ngrx/store'; import {FormControl, FormGroup} from '@angular/forms'; -import {Observable, Subject} from 'rxjs'; import { checkElement, FilterDateTypes, @@ -26,15 +25,14 @@ import {TimeService} from '@ofServices/time.service'; templateUrl: './logging-filters.component.html', styleUrls: ['./logging-filters.component.scss'] }) -export class LoggingFiltersComponent implements OnInit, OnDestroy { +export class LoggingFiltersComponent implements OnInit { size = 10; loggingForm: FormGroup; - unsubscribe$: Subject = new Subject(); public submittedOnce = false; @Input() - public processData: Observable; + public processData: []; constructor(private store: Store, private timeService: TimeService, private configService: ConfigService) { this.loggingForm = new FormGroup( @@ -89,9 +87,6 @@ export class LoggingFiltersComponent implements OnInit, OnDestroy { return params; } - ngOnDestroy() { - this.unsubscribe$.next(); - this.unsubscribe$.complete(); - } + } diff --git a/ui/main/src/app/modules/logging/logging.component.ts b/ui/main/src/app/modules/logging/logging.component.ts index 38880e0dfa..45f3ee10a8 100644 --- a/ui/main/src/app/modules/logging/logging.component.ts +++ b/ui/main/src/app/modules/logging/logging.component.ts @@ -7,17 +7,16 @@ * This file is part of the OperatorFabric project. */ -import {AfterViewInit, Component, OnDestroy, OnInit, ViewChild} from '@angular/core'; +import {AfterViewInit, Component, OnDestroy, ViewChild} from '@angular/core'; import {Store} from '@ngrx/store'; import {AppState} from '@ofStore/index'; -import {FlushLoggingResult} from '@ofActions/logging.actions'; import {Observable, Subject} from 'rxjs'; import {LineOfLoggingResult} from '@ofModel/line-of-logging-result.model'; import {selectLinesOfLoggingResult} from '@ofSelectors/logging.selectors'; import {map, takeUntil} from 'rxjs/operators'; import {LoggingFiltersComponent} from './components/logging-filters/logging-filters.component'; -import {selectProcesses} from '@ofSelectors/process.selector'; -import {Process} from '@ofModel/processes.model'; +import { ProcessesService } from '@ofServices/processes.service'; +import { I18n } from '@ofModel/i18n.model'; @Component({ selector: 'of-logging', @@ -33,28 +32,15 @@ export class LoggingComponent implements AfterViewInit, OnDestroy { canDisplayNoResultMessage = false; unsubscribe$: Subject = new Subject(); - processValueForFilter: Observable; + processValueForFilter = new Array(); - constructor(private store: Store) { - this.store.dispatch(new FlushLoggingResult()); - this.processValueForFilter = this.store.select(selectProcesses).pipe( - takeUntil(this.unsubscribe$), - map((allProcesses: Array) => { - /** - * work around because allProcesses.forEach(…) - * 'is not a function', for some reason. - */ - const filterValue = []; - Array.prototype.forEach.call(allProcesses, (proc: Process) => { - const id = proc.id; - - if (proc.uiVisibility && !! proc.uiVisibility.logging) { - filterValue.push({value: id, label: proc.name}); - } - }); - return filterValue; - }) - ); + constructor(private store: Store, private processesService: ProcessesService) { + processesService.getAllProcesses().forEach( (process) => { + const id = process.id; + if (process.uiVisibility && !!process.uiVisibility.logging) { + this.processValueForFilter.push({value: id, label: new I18n(process.name), i18nPrefix: `${process.id}.${process.version}` }); + } + }); } ngAfterViewInit() { diff --git a/ui/main/src/app/modules/monitoring/components/monitoring-filters/monitoring-filters.component.ts b/ui/main/src/app/modules/monitoring/components/monitoring-filters/monitoring-filters.component.ts index e65ce9a302..08e551c4c6 100644 --- a/ui/main/src/app/modules/monitoring/components/monitoring-filters/monitoring-filters.component.ts +++ b/ui/main/src/app/modules/monitoring/components/monitoring-filters/monitoring-filters.component.ts @@ -7,33 +7,31 @@ * This file is part of the OperatorFabric project. */ -import {Component, Input, OnDestroy, OnInit} from '@angular/core'; -import {Observable, Subject} from 'rxjs'; +import {Component, Input,OnInit} from '@angular/core'; import {AbstractControl, FormControl, FormGroup} from '@angular/forms'; import {Store} from '@ngrx/store'; import {AppState} from '@ofStore/index'; import {FilterType} from '@ofServices/filter.service'; import {ApplyFilter, ResetFilter} from '@ofActions/feed.actions'; -import {DateTimeNgb, getDateTimeNgbFromMoment, offSetCurrentTime} from '@ofModel/datetime-ngb.model'; +import {DateTimeNgb, offSetCurrentTime} from '@ofModel/datetime-ngb.model'; import {ConfigService} from '@ofServices/config.service'; -import * as moment from 'moment'; + @Component({ selector: 'of-monitoring-filters', templateUrl: './monitoring-filters.component.html' }) -export class MonitoringFiltersComponent implements OnInit, OnDestroy { +export class MonitoringFiltersComponent implements OnInit{ size = 10; monitoringForm: FormGroup; - unsubscribe$: Subject = new Subject(); dropdownList = []; selectedItems = []; dropdownSettings = {}; @Input() - public processData: Observable; + public processData: []; public submittedOnce = false; @@ -52,7 +50,7 @@ export class MonitoringFiltersComponent implements OnInit, OnDestroy { activeTo: new FormControl('') } ); - this.processData.subscribe(items => this.dropdownList = items); + this.dropdownList = this.processData; this.dropdownSettings = { text: 'Select a Process', @@ -146,8 +144,6 @@ export class MonitoringFiltersComponent implements OnInit, OnDestroy { } ngOnDestroy() { - this.unsubscribe$.next(); - this.unsubscribe$.complete(); this.store.dispatch(new ResetFilter()); } diff --git a/ui/main/src/app/modules/monitoring/monitoring.component.spec.ts b/ui/main/src/app/modules/monitoring/monitoring.component.spec.ts deleted file mode 100644 index e6f9b0de53..0000000000 --- a/ui/main/src/app/modules/monitoring/monitoring.component.spec.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) - * See AUTHORS.txt - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * SPDX-License-Identifier: MPL-2.0 - * This file is part of the OperatorFabric project. - */ - -import {async, ComponentFixture, TestBed} from '@angular/core/testing'; - -import {MonitoringComponent} from './monitoring.component'; -import {FormsModule, ReactiveFormsModule} from '@angular/forms'; -import {DatetimeFilterModule} from '../../components/share/datetime-filter/datetime-filter.module'; -import {MultiFilterModule} from '../../components/share/multi-filter/multi-filter.module'; -import {Store, StoreModule} from '@ngrx/store'; -import {appReducer, AppState, storeConfig} from '@ofStore/index'; -import {ServicesModule} from '@ofServices/services.module'; -import {HttpClientModule} from '@angular/common/http'; -import {TranslateModule} from '@ngx-translate/core'; -import {NO_ERRORS_SCHEMA} from '@angular/core'; - -describe('MonitoringComponent', () => { - let component: MonitoringComponent; - let fixture: ComponentFixture; - - let store: Store; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [StoreModule.forRoot(appReducer, storeConfig), - ServicesModule, - HttpClientModule, - TranslateModule.forRoot(), - FormsModule, - ReactiveFormsModule, - DatetimeFilterModule, - MultiFilterModule], - declarations: [MonitoringComponent], - providers: [ - {provide: Store, useClass: Store} - ], - schemas: [ NO_ERRORS_SCHEMA ] - }) - .compileComponents(); - })); - - beforeEach(() => { - store = TestBed.get(Store); - spyOn(store, 'dispatch').and.callThrough(); - fixture = TestBed.createComponent(MonitoringComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/ui/main/src/app/modules/monitoring/monitoring.component.ts b/ui/main/src/app/modules/monitoring/monitoring.component.ts index b07d4a39d1..e7357b7224 100644 --- a/ui/main/src/app/modules/monitoring/monitoring.component.ts +++ b/ui/main/src/app/modules/monitoring/monitoring.component.ts @@ -18,10 +18,10 @@ import {LightCard} from '@ofModel/light-card.model'; import * as moment from 'moment'; import {I18n} from '@ofModel/i18n.model'; import {MonitoringFiltersComponent} from './components/monitoring-filters/monitoring-filters.component'; -import {selectProcesses} from '@ofSelectors/process.selector'; import {Process} from '@ofModel/processes.model'; import {ApplyFilter} from '@ofActions/feed.actions'; import {BUSINESS_DATE_FILTER_INITIALISATION} from '@ofServices/filter.service'; +import { ProcessesService } from '@ofServices/processes.service'; @Component({ selector: 'of-monitoring', @@ -37,32 +37,21 @@ export class MonitoringComponent implements OnInit, OnDestroy, AfterViewInit { unsubscribe$: Subject = new Subject(); mapOfProcesses = new Map(); - processValueForFilter: Observable; + processValueForFilter = new Array(); + + constructor(private store: Store, private processesService: ProcessesService) { + processesService.getAllProcesses().forEach( (process) => { + const id = process.id; + this.mapOfProcesses.set(id, process); + if (!!process.uiVisibility && !!process.uiVisibility.monitoring) { + let itemName = process.name; + if (!itemName) { + itemName = id; + } + this.processValueForFilter.push({id: id, itemName: itemName, i18nPrefix: `${process.id}.${process.version}` }); + } + }); - constructor(private store: Store) { - this.processValueForFilter = this.store.select(selectProcesses).pipe( - takeUntil(this.unsubscribe$), - map((allProcesses: Array) => { - /** - * work around because allProcesses.forEach(…) - * 'is not a function', for some reason. - */ - const filterValue = []; - Array.prototype.forEach.call(allProcesses, (proc: Process) => { - const id = proc.id; - this.mapOfProcesses.set(id, proc); - - if (proc.uiVisibility && !!proc.uiVisibility.monitoring) { - let itemName = proc.name; - if (!itemName) { - itemName = id; - } - filterValue.push({id: id, itemName: itemName, i18nPrefix: `${proc.id}.${proc.version}` }); - } - }); - return filterValue; - }) - ); } ngOnInit() { diff --git a/ui/main/src/app/modules/usercard/usercard.component.html b/ui/main/src/app/modules/usercard/usercard.component.html index 72814f5d09..321d83cba7 100644 --- a/ui/main/src/app/modules/usercard/usercard.component.html +++ b/ui/main/src/app/modules/usercard/usercard.component.html @@ -13,12 +13,15 @@

userCard.title

- +
+
; + stateOptions: any[]; entityOptions = new Array(); dropdownSettings = {}; + processOptions = new Array(); selectedProcess: Process; selectedState: string; @@ -92,7 +93,8 @@ export class UserCardComponent implements OnDestroy, OnInit { private modalService: NgbModal, private newCardTemplateService: NewCardTemplateService, private sanitizer: DomSanitizer, - private element: ElementRef + private element: ElementRef, + private processesService: ProcessesService ) { } @@ -134,27 +136,21 @@ export class UserCardComponent implements OnDestroy, OnInit { loadAllProcessAndStateInUserPerimeter(): void { - this.processOptions$ = this.store.select(selectProcesses).pipe( - takeUntil(this.unsubscribe$), - tap((allProcesses: Process[]) => this.processesDefinition = allProcesses), - map((allProcesses: Process[]) => { - const processesToShow: any[] = new Array(); - const processesInPerimeter: Set = new Set(); - this.currentUserWithPerimeters.computedPerimeters.forEach(perimeter => { + this.processesDefinition = this.processesService.getAllProcesses(); + const processesInPerimeter: Set = new Set(); + this.currentUserWithPerimeters.computedPerimeters.forEach(perimeter => { if (this.userCanSendCard(perimeter)) processesInPerimeter.add(perimeter.process); }); - allProcesses.forEach(process => { + + this.processesDefinition.forEach(process => { if (processesInPerimeter.has(process.id)) { const _i18nPrefix = process.id + '.' + process.version + '.'; const label = process.name ? (_i18nPrefix + process.name) : process.id; const processToShow = { value: process.id, label: label }; - processesToShow.push(processToShow); + this.processOptions.push(processToShow); this.loadStatesForProcess(process); } }); - return processesToShow; - }) - ); } @@ -188,7 +184,6 @@ export class UserCardComponent implements OnDestroy, OnInit { } - changeStatesWhenSelectProcess(): void { this.messageForm.get('process').valueChanges.subscribe((process) => { if (!!process) { diff --git a/ui/main/src/app/services/entities.service.ts b/ui/main/src/app/services/entities.service.ts index ef8140190f..b41bd5d63b 100644 --- a/ui/main/src/app/services/entities.service.ts +++ b/ui/main/src/app/services/entities.service.ts @@ -5,11 +5,12 @@ import { CrudService } from './crud-service'; import { Observable, Subject} from 'rxjs'; import { Entity } from '@ofModel/entity.model'; import { takeUntil } from 'rxjs/internal/operators/takeUntil'; +import { tap } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) -export class EntitiesService implements CrudService{ +export class EntitiesService implements CrudService { readonly entitiesUrl: string; private _entities: Entity[]; @@ -22,7 +23,7 @@ export class EntitiesService implements CrudService{ constructor(private httpClient: HttpClient) { this.entitiesUrl = `${environment.urls.entities}`; } - + getAllEntities(): Observable { return this.httpClient.get(`${this.entitiesUrl}`); } @@ -37,21 +38,22 @@ export class EntitiesService implements CrudService{ getAll(): Observable { return this.getAllEntities(); } - + update(data: any): Observable { return this.updateEntity(data); } - public loadAllEntitiesData(): void { - this.getAllEntities() - .pipe(takeUntil(this.ngUnsubscribe)) - .subscribe( + public loadAllEntitiesData(): Observable { + return this.getAllEntities() + .pipe(takeUntil(this.ngUnsubscribe) + , tap( (entities) => { - if (entities) { + if (!!entities) { this._entities = entities; + console.log(new Date().toISOString(), 'List of entities loaded'); } }, (error) => console.error(new Date().toISOString(), 'an error occurred', error) - ); + )); } public getEntities(): Entity[] { diff --git a/ui/main/src/app/services/processes.service.ts b/ui/main/src/app/services/processes.service.ts index 07fd241469..a9f8a2bde8 100644 --- a/ui/main/src/app/services/processes.service.ts +++ b/ui/main/src/app/services/processes.service.ts @@ -23,6 +23,7 @@ export class ProcessesService { readonly processesUrl: string; private urlCleaner: HttpUrlEncodingCodec; private processCache = new Map(); + private processes: Process[]; constructor(private httpClient: HttpClient, ) { @@ -30,6 +31,23 @@ export class ProcessesService { this.processesUrl = `${environment.urls.processes}`; } + public loadAllProcesses(): Observable { + return this.queryAllProcesses() + .pipe(tap( + (processesLoaded) => { + if (!!processesLoaded) { + this.processes = processesLoaded; + console.log(new Date().toISOString(), 'List of processes loaded'); + } + }, (error) => console.error(new Date().toISOString(), 'an error occurred', error) + )); + } + + public getAllProcesses(): Process[] { + return this.processes; + } + + queryProcessFromCard(card: Card): Observable { return this.queryProcess(card.process, card.processVersion); } diff --git a/ui/main/src/app/services/user.service.ts b/ui/main/src/app/services/user.service.ts index f88ae5c46f..5901779763 100644 --- a/ui/main/src/app/services/user.service.ts +++ b/ui/main/src/app/services/user.service.ts @@ -15,6 +15,7 @@ import { UserWithPerimeters } from "@ofModel/userWithPerimeters.model"; import { HttpClient } from "@angular/common/http"; import { CrudService } from "./crud-service"; import { takeUntil } from 'rxjs/internal/operators/takeUntil'; +import { tap } from 'rxjs/operators'; @Injectable() export class UserService implements CrudService { @@ -68,16 +69,19 @@ export class UserService implements CrudService { return this.httpClient.get(url); } - public loadUserWithPerimetersData(): void { - this.currentUserWithPerimeters() - .pipe(takeUntil(this.ngUnsubscribe)) - .subscribe( + + + public loadUserWithPerimetersData(): Observable { + return this.currentUserWithPerimeters() + .pipe(takeUntil(this.ngUnsubscribe) + , tap( (userWithPerimeters) => { - if (userWithPerimeters) { + if (!!userWithPerimeters) { this._userWithPerimeters = userWithPerimeters; + console.log(new Date().toISOString(), 'User perimeter loaded'); } - }, (error) => console.error(new Date().toISOString(), 'an error occurred', error) - ); + }, (error) => console.error(new Date().toISOString(), 'An error occurred when loading perimeter', error) + )); } public getCurrentUserWithPerimeters(): UserWithPerimeters { diff --git a/ui/main/src/app/store/actions/process.action.ts b/ui/main/src/app/store/actions/process.action.ts deleted file mode 100644 index 298cc5b55a..0000000000 --- a/ui/main/src/app/store/actions/process.action.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) - * See AUTHORS.txt - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * SPDX-License-Identifier: MPL-2.0 - * This file is part of the OperatorFabric project. - */ - - -import {Action} from '@ngrx/store'; -import {Process} from '@ofModel/processes.model'; - -export enum ProcessActionType { - QueryAllProcesses = '[Processes] Ask to fetch all processes', - LoadAllProcesses = '[Processes] Load all processes' -} - -export class QueryAllProcesses implements Action { - readonly type = ProcessActionType.QueryAllProcesses; -} - -export class LoadAllProcesses implements Action { - readonly type = ProcessActionType.LoadAllProcesses; - - constructor(public payload: { processes: Process[] }) { - } -} - -export type ProcessAction = QueryAllProcesses | LoadAllProcesses; diff --git a/ui/main/src/app/store/actions/translate.actions.ts b/ui/main/src/app/store/actions/translate.actions.ts index a770a4d148..77a4c7c0c4 100644 --- a/ui/main/src/app/store/actions/translate.actions.ts +++ b/ui/main/src/app/store/actions/translate.actions.ts @@ -12,6 +12,7 @@ import {Action} from '@ngrx/store'; export enum TranslateActionsTypes { TranslationUpdateDone = '[i18n] translation update Done ', + LoadProcessesTranslation = '[i18n] load processes translation ' } @@ -19,5 +20,9 @@ export class TranslationUpdateDone implements Action { readonly type = TranslateActionsTypes.TranslationUpdateDone; } +export class LoadProcessesTranslation implements Action { + readonly type = TranslateActionsTypes.LoadProcessesTranslation; +} + -export type TranslateActions = TranslationUpdateDone ; +export type TranslateActions = TranslationUpdateDone | LoadProcessesTranslation ; diff --git a/ui/main/src/app/store/effects/process.effects.ts b/ui/main/src/app/store/effects/process.effects.ts deleted file mode 100644 index c208f247d6..0000000000 --- a/ui/main/src/app/store/effects/process.effects.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) - * See AUTHORS.txt - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * SPDX-License-Identifier: MPL-2.0 - * This file is part of the OperatorFabric project. - */ - -import {Injectable} from '@angular/core'; -import {AppState} from '@ofStore/index'; -import {ProcessesService} from '@ofServices/processes.service'; -import {Actions, Effect, ofType} from '@ngrx/effects'; -import {Action, Store} from '@ngrx/store'; -import {Observable} from 'rxjs'; -import {LoadAllProcesses, ProcessActionType} from '@ofActions/process.action'; -import {map, switchMap} from 'rxjs/operators'; -import {Process} from '@ofModel/processes.model'; - -@Injectable() -export class ProcessEffects { - constructor(private store: Store, private action$: Actions, private service: ProcessesService) { - } - - @Effect() - loadAllProcesses: Observable = this.action$.pipe( - ofType(ProcessActionType.QueryAllProcesses), - switchMap(() => this.service.queryAllProcesses()), - map((allProcesses: Process[]) => new LoadAllProcesses({processes: allProcesses})) - ); -} diff --git a/ui/main/src/app/store/effects/translate.effects.ts b/ui/main/src/app/store/effects/translate.effects.ts index b5191bfb9f..6904c29694 100644 --- a/ui/main/src/app/store/effects/translate.effects.ts +++ b/ui/main/src/app/store/effects/translate.effects.ts @@ -12,9 +12,8 @@ import { Actions, Effect, ofType } from '@ngrx/effects'; import { TranslateService } from '@ngx-translate/core'; import { Observable, of} from 'rxjs'; import { LightCardActionTypes, LoadLightCardsSuccess } from '@ofActions/light-card.actions'; -import { LoadAllProcesses, ProcessActionType } from '@ofActions/process.action'; import { map } from 'rxjs/operators'; -import { TranslateActions, TranslationUpdateDone } from '@ofActions/translate.actions'; +import { TranslateActions, TranslationUpdateDone, TranslateActionsTypes } from '@ofActions/translate.actions'; import { LightCard } from '@ofModel/light-card.model'; import { ProcessesService } from '@ofServices/processes.service'; import { Process } from '@ofModel/processes.model'; @@ -51,11 +50,12 @@ export class TranslateEffects { @Effect() initProcessesTranslations: Observable = this.actions$ .pipe( - ofType(ProcessActionType.LoadAllProcesses) - , map((loadedProcesses: LoadAllProcesses) => loadedProcesses.payload.processes) - , map((processes: Process[]) => processes.forEach(process => this.loadTranslationsForProcess(process))) - , map(() => new TranslationUpdateDone()) - ); + ofType(TranslateActionsTypes.LoadProcessesTranslation) + , map(() => this.processesService.getAllProcesses().forEach(process => this.loadTranslationsForProcess(process))) + , map(() => { + console.log(new Date().toISOString(), 'Translation for processes loaded'); + return new TranslationUpdateDone(); + })); @Effect() loadTranslationifNeededAfterLoadingCards: Observable = this.actions$ diff --git a/ui/main/src/app/store/index.ts b/ui/main/src/app/store/index.ts index 190c24efda..d487f731c2 100644 --- a/ui/main/src/app/store/index.ts +++ b/ui/main/src/app/store/index.ts @@ -29,7 +29,6 @@ import {reducer as archiveReducer} from '@ofStore/reducers/archive.reducer'; import {reducer as globalStyleReducer} from '@ofStore/reducers/global-style.reducer'; import {reducer as loggingReducer} from '@ofStore/reducers/logging.reducer'; import {reducer as monitoringReducer} from '@ofStore/reducers/monitoring.reducer'; -import {reducer as processReducer} from '@ofStore/reducers/process.reducer'; import {AuthState} from '@ofStates/authentication.state'; import {CardState} from '@ofStates/card.state'; import {CustomRouterEffects} from '@ofEffects/custom-router.effects'; @@ -55,8 +54,7 @@ import {LoggingState} from '@ofStates/loggingState'; import {LoggingEffects} from '@ofEffects/logging.effects'; import {MonitoringState} from '@ofStates/monitoring.state'; import {MonitoringEffects} from '@ofEffects/monitoring.effects'; -import {ProcessState} from '@ofStates/process.state'; -import {ProcessEffects} from '@ofEffects/process.effects'; + export interface AppState { router: RouterReducerState; @@ -72,7 +70,6 @@ export interface AppState { globalStyle: GlobalStyleState; logging: LoggingState; monitoring: MonitoringState; - process: ProcessState; } export const appEffects = [ @@ -88,8 +85,7 @@ export const appEffects = [ UserEffects, TranslateEffects, LoggingEffects, - MonitoringEffects, - ProcessEffects + MonitoringEffects ]; export const appReducer: ActionReducerMap = { @@ -106,7 +102,7 @@ export const appReducer: ActionReducerMap = { globalStyle: globalStyleReducer, logging: loggingReducer, monitoring: monitoringReducer, - process: processReducer + }; export const appMetaReducers: MetaReducer[] = !environment.production diff --git a/ui/main/src/app/store/reducers/process.reducer.ts b/ui/main/src/app/store/reducers/process.reducer.ts deleted file mode 100644 index 33e72b5ea5..0000000000 --- a/ui/main/src/app/store/reducers/process.reducer.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) - * See AUTHORS.txt - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * SPDX-License-Identifier: MPL-2.0 - * This file is part of the OperatorFabric project. - */ - - -import {processInitialState, ProcessState} from '@ofStates/process.state'; -import {ProcessAction, ProcessActionType} from '@ofActions/process.action'; - -export function reducer (state = processInitialState, action: ProcessAction): ProcessState { - switch (action.type ) { - case (ProcessActionType.LoadAllProcesses): { - return { - ...state, - processes: action.payload.processes, - loaded: true - }; - } - default: - return state; - } -} diff --git a/ui/main/src/app/store/selectors/config.selectors.ts b/ui/main/src/app/store/selectors/config.selectors.ts deleted file mode 100644 index bca7f3c13b..0000000000 --- a/ui/main/src/app/store/selectors/config.selectors.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) - * See AUTHORS.txt - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * SPDX-License-Identifier: MPL-2.0 - * This file is part of the OperatorFabric project. - */ - - - -import {AppState} from "@ofStore/index"; -import {createSelector} from "@ngrx/store"; -import {CONFIG_LOAD_MAX_RETRIES, ConfigState} from "@ofStates/config.state"; -import * as _ from 'lodash'; - -export const selectConfig = (state:AppState) => state.config; -export const selectConfigLoaded = createSelector(selectConfig, (configState:ConfigState)=> configState.loaded) -export const selectConfigRetry = createSelector(selectConfig, (configState:ConfigState)=> configState.retry) -export const selectMaxedRetries = createSelector(selectConfigRetry, (retries:number)=> retries >= CONFIG_LOAD_MAX_RETRIES) - - - diff --git a/ui/main/src/app/store/selectors/process.selector.ts b/ui/main/src/app/store/selectors/process.selector.ts deleted file mode 100644 index d09e2b47f8..0000000000 --- a/ui/main/src/app/store/selectors/process.selector.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) - * See AUTHORS.txt - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * SPDX-License-Identifier: MPL-2.0 - * This file is part of the OperatorFabric project. - */ - - -import {AppState} from '@ofStore/index'; -import {createSelector} from '@ngrx/store'; -import {ProcessState} from '@ofStates/process.state'; - -export const selectProcessSlice = (state: AppState) => state.process; - -export const selectProcesses = createSelector(selectProcessSlice, - (processState: ProcessState) => processState.processes); - -export const selectLoadStatusOfProcesses = createSelector(selectProcessSlice, - (processState: ProcessState) => processState.loaded); diff --git a/ui/main/src/app/store/states/process.state.ts b/ui/main/src/app/store/states/process.state.ts deleted file mode 100644 index 7f6709db09..0000000000 --- a/ui/main/src/app/store/states/process.state.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) - * See AUTHORS.txt - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * SPDX-License-Identifier: MPL-2.0 - * This file is part of the OperatorFabric project. - */ - -import {Process} from '@ofModel/processes.model'; - -export interface ProcessState { - processes: Process[]; - loaded: boolean; -} -export const processInitialState: ProcessState = {processes: [], loaded: false}; diff --git a/ui/main/src/tests/helpers.ts b/ui/main/src/tests/helpers.ts index 3ffe75f038..e1e942c0ca 100644 --- a/ui/main/src/tests/helpers.ts +++ b/ui/main/src/tests/helpers.ts @@ -34,7 +34,6 @@ export const emptyAppState4Test: AppState = { globalStyle: null, logging: null, monitoring: null, - process: null }; export const AuthenticationImportHelperForSpecs = [AuthenticationService, From 261e4fa02d449185d0aebd62030a865e544c239e Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Wed, 30 Sep 2020 17:50:12 +0200 Subject: [PATCH 06/76] Correct bug in monitoring screen --- ui/main/src/app/modules/monitoring/monitoring.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/main/src/app/modules/monitoring/monitoring.component.ts b/ui/main/src/app/modules/monitoring/monitoring.component.ts index b07d4a39d1..a3a4facf21 100644 --- a/ui/main/src/app/modules/monitoring/monitoring.component.ts +++ b/ui/main/src/app/modules/monitoring/monitoring.component.ts @@ -92,7 +92,7 @@ export class MonitoringComponent implements OnInit, OnDestroy, AfterViewInit { color = state.color; name = state.name; } - return ( + return ( { creationDateTime: moment(card.publishDate), beginningOfBusinessPeriod: moment(card.startDate), @@ -108,7 +108,7 @@ export class MonitoringComponent implements OnInit, OnDestroy, AfterViewInit { } } - ); + ).filter(elem => !!elem); } ), catchError(err => of([])) From f1eb6c435f258615a2ed20ff37cda84cfeb9569e Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Thu, 1 Oct 2020 10:57:56 +0200 Subject: [PATCH 07/76] Documentation - Minor update Add information on external recipient configuration --- src/docs/asciidoc/reference_doc/response_cards.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/docs/asciidoc/reference_doc/response_cards.adoc b/src/docs/asciidoc/reference_doc/response_cards.adoc index 8a0f09a0ad..c41cd376df 100644 --- a/src/docs/asciidoc/reference_doc/response_cards.adoc +++ b/src/docs/asciidoc/reference_doc/response_cards.adoc @@ -36,6 +36,9 @@ externalRecipients-url: "{\ }" .... +The name to use for the third-party is the publisherId of the parent card. + + [WARNING] ==== For the url, do not use localhost if you run OperatorFabric in a docker, as the publication-service will not be able to join your third party. From caa62761a5d9125d8b84b1c0c8ab0bb83c6da5c9 Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Thu, 1 Oct 2020 12:22:48 +0200 Subject: [PATCH 08/76] Add license information for gradle wrapper --- gradle/wrapper/LICENSE | 420 ++++++++++++++++++ gradle/wrapper/README.md | 1 + src/test/externalApp/gradle/wrapper/LICENSE | 420 ++++++++++++++++++ src/test/externalApp/gradle/wrapper/README.md | 1 + 4 files changed, 842 insertions(+) create mode 100644 gradle/wrapper/LICENSE create mode 100644 gradle/wrapper/README.md create mode 100644 src/test/externalApp/gradle/wrapper/LICENSE create mode 100644 src/test/externalApp/gradle/wrapper/README.md diff --git a/gradle/wrapper/LICENSE b/gradle/wrapper/LICENSE new file mode 100644 index 0000000000..f013fd5ddb --- /dev/null +++ b/gradle/wrapper/LICENSE @@ -0,0 +1,420 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + +============================================================================== +Licenses for included components: + +------------------------------------------------------------------------------ +Eclipse Public License 1.0 +https://opensource.org/licenses/EPL-1.0 + +junit:junit +org.sonatype.aether:aether-api +org.sonatype.aether:aether-connector-wagon +org.sonatype.aether:aether-impl +org.sonatype.aether:aether-spi +org.sonatype.aether:aether-util + +------------------------------------------------------------------------------ +3-Clause BSD +https://opensource.org/licenses/BSD-3-Clause + +com.google.code.findbugs:jsr305 + +org.hamcrest:hamcrest-core +BSD License + +Copyright (c) 2000-2015 www.hamcrest.org +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. Redistributions in binary form must reproduce +the above copyright notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the distribution. + +Neither the name of Hamcrest nor the names of its contributors may be used to endorse +or promote products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +com.esotericsoftware.kryo:kryo +com.esotericsoftware.minlog:minlog +Copyright (c) 2008-2018, Nathan Sweet All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +org.ow2.asm:asm +org.ow2.asm:asm-analysis +org.ow2.asm:asm-commons +org.ow2.asm:asm-tree +org.ow2.asm:asm-util +ASM: a very small and fast Java bytecode manipulation framework + Copyright (c) 2000-2011 INRIA, France Telecom + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +MIT + +com.googlecode.plist:dd-plist +dd-plist - An open source library to parse and generate property lists +Copyright (C) 2016 Daniel Dreibrodt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +org.bouncycastle:bcpg-jdk15on +org.bouncycastle:bcprov-jdk15on +Copyright (c) 2000 - 2019 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +org.slf4j:jcl-over-slf4j +org.slf4j:jul-to-slf4j +org.slf4j:log4j-over-slf4j +org.slf4j:slf4j-api + Copyright (c) 2004-2017 QOS.ch + All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------------------ +CDDL +https://opensource.org/licenses/CDDL-1.0 + +com.sun.xml.bind:jaxb-impl + +------------------------------------------------------------------------------ +LGPL 2.1 +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html + +org.samba.jcifs:jcifs + +org.jetbrains.intellij.deps:trove4j + +------------------------------------------------------------------------------ +License for the GNU Trove library included by the Kotlin embeddable compiler +------------------------------------------------------------------------------ +The source code for GNU Trove is licensed under the Lesser GNU Public License (LGPL). + + Copyright (c) 2001, Eric D. Friedman All Rights Reserved. This library is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +Two classes (HashFunctions and PrimeFinder) included in Trove are licensed under the following terms: + + Copyright (c) 1999 CERN - European Organization for Nuclear Research. Permission to use, copy, modify, distribute and sell this software + and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and + that both that copyright notice and this permission notice appear in supporting documentation. CERN makes no representations about the + suitability of this software for any purpose. It is provided "as is" without expressed or implied warranty. + +The source code of modified GNU Trove library is available at + https://github.com/JetBrains/intellij-deps-trove4j (with trove4j_changes.txt describing the changes) + +------------------------------------------------------------------------------ +Eclipse Distribution License 1.0 +https://www.eclipse.org/org/documents/edl-v10.php + +org.eclipse.jgit:org.eclipse.jgit + +------------------------------------------------------------------------------ +BSD-style + +com.jcraft:jsch +com.jcraft:jzlib + +Copyright (c) 2000-2011 ymnk, JCraft,Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + + 3. The names of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, +INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +Eclipse Public License 2.0 +https://www.eclipse.org/legal/epl-2.0/ + +org.junit.platform:junit-platform-launcher + +------------------------------------------------------------------------------ +Mozilla Public License 2.0 +https://www.mozilla.org/en-US/MPL/2.0/ + +org.mozilla:rhino diff --git a/gradle/wrapper/README.md b/gradle/wrapper/README.md new file mode 100644 index 0000000000..bba8aca659 --- /dev/null +++ b/gradle/wrapper/README.md @@ -0,0 +1 @@ +The gradle wrapper is provided by https://github.com/gradle/ under Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/src/test/externalApp/gradle/wrapper/LICENSE b/src/test/externalApp/gradle/wrapper/LICENSE new file mode 100644 index 0000000000..f013fd5ddb --- /dev/null +++ b/src/test/externalApp/gradle/wrapper/LICENSE @@ -0,0 +1,420 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + +============================================================================== +Licenses for included components: + +------------------------------------------------------------------------------ +Eclipse Public License 1.0 +https://opensource.org/licenses/EPL-1.0 + +junit:junit +org.sonatype.aether:aether-api +org.sonatype.aether:aether-connector-wagon +org.sonatype.aether:aether-impl +org.sonatype.aether:aether-spi +org.sonatype.aether:aether-util + +------------------------------------------------------------------------------ +3-Clause BSD +https://opensource.org/licenses/BSD-3-Clause + +com.google.code.findbugs:jsr305 + +org.hamcrest:hamcrest-core +BSD License + +Copyright (c) 2000-2015 www.hamcrest.org +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. Redistributions in binary form must reproduce +the above copyright notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the distribution. + +Neither the name of Hamcrest nor the names of its contributors may be used to endorse +or promote products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +com.esotericsoftware.kryo:kryo +com.esotericsoftware.minlog:minlog +Copyright (c) 2008-2018, Nathan Sweet All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +org.ow2.asm:asm +org.ow2.asm:asm-analysis +org.ow2.asm:asm-commons +org.ow2.asm:asm-tree +org.ow2.asm:asm-util +ASM: a very small and fast Java bytecode manipulation framework + Copyright (c) 2000-2011 INRIA, France Telecom + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +MIT + +com.googlecode.plist:dd-plist +dd-plist - An open source library to parse and generate property lists +Copyright (C) 2016 Daniel Dreibrodt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +org.bouncycastle:bcpg-jdk15on +org.bouncycastle:bcprov-jdk15on +Copyright (c) 2000 - 2019 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +org.slf4j:jcl-over-slf4j +org.slf4j:jul-to-slf4j +org.slf4j:log4j-over-slf4j +org.slf4j:slf4j-api + Copyright (c) 2004-2017 QOS.ch + All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------------------ +CDDL +https://opensource.org/licenses/CDDL-1.0 + +com.sun.xml.bind:jaxb-impl + +------------------------------------------------------------------------------ +LGPL 2.1 +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html + +org.samba.jcifs:jcifs + +org.jetbrains.intellij.deps:trove4j + +------------------------------------------------------------------------------ +License for the GNU Trove library included by the Kotlin embeddable compiler +------------------------------------------------------------------------------ +The source code for GNU Trove is licensed under the Lesser GNU Public License (LGPL). + + Copyright (c) 2001, Eric D. Friedman All Rights Reserved. This library is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +Two classes (HashFunctions and PrimeFinder) included in Trove are licensed under the following terms: + + Copyright (c) 1999 CERN - European Organization for Nuclear Research. Permission to use, copy, modify, distribute and sell this software + and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and + that both that copyright notice and this permission notice appear in supporting documentation. CERN makes no representations about the + suitability of this software for any purpose. It is provided "as is" without expressed or implied warranty. + +The source code of modified GNU Trove library is available at + https://github.com/JetBrains/intellij-deps-trove4j (with trove4j_changes.txt describing the changes) + +------------------------------------------------------------------------------ +Eclipse Distribution License 1.0 +https://www.eclipse.org/org/documents/edl-v10.php + +org.eclipse.jgit:org.eclipse.jgit + +------------------------------------------------------------------------------ +BSD-style + +com.jcraft:jsch +com.jcraft:jzlib + +Copyright (c) 2000-2011 ymnk, JCraft,Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + + 3. The names of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, +INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +Eclipse Public License 2.0 +https://www.eclipse.org/legal/epl-2.0/ + +org.junit.platform:junit-platform-launcher + +------------------------------------------------------------------------------ +Mozilla Public License 2.0 +https://www.mozilla.org/en-US/MPL/2.0/ + +org.mozilla:rhino diff --git a/src/test/externalApp/gradle/wrapper/README.md b/src/test/externalApp/gradle/wrapper/README.md new file mode 100644 index 0000000000..bba8aca659 --- /dev/null +++ b/src/test/externalApp/gradle/wrapper/README.md @@ -0,0 +1 @@ +The gradle wrapper is provided by https://github.com/gradle/ under Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ From ca3f76d8248ec8ba33b2fdb81ac7805c6977d434 Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Thu, 1 Oct 2020 12:54:59 +0200 Subject: [PATCH 09/76] Add license information for fonts use in UI --- ui/main/src/assets/fonts/LICENSE | 420 +++++++++++++++++++++++++++++ ui/main/src/assets/fonts/README.md | 3 + 2 files changed, 423 insertions(+) create mode 100644 ui/main/src/assets/fonts/LICENSE create mode 100644 ui/main/src/assets/fonts/README.md diff --git a/ui/main/src/assets/fonts/LICENSE b/ui/main/src/assets/fonts/LICENSE new file mode 100644 index 0000000000..f013fd5ddb --- /dev/null +++ b/ui/main/src/assets/fonts/LICENSE @@ -0,0 +1,420 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + +============================================================================== +Licenses for included components: + +------------------------------------------------------------------------------ +Eclipse Public License 1.0 +https://opensource.org/licenses/EPL-1.0 + +junit:junit +org.sonatype.aether:aether-api +org.sonatype.aether:aether-connector-wagon +org.sonatype.aether:aether-impl +org.sonatype.aether:aether-spi +org.sonatype.aether:aether-util + +------------------------------------------------------------------------------ +3-Clause BSD +https://opensource.org/licenses/BSD-3-Clause + +com.google.code.findbugs:jsr305 + +org.hamcrest:hamcrest-core +BSD License + +Copyright (c) 2000-2015 www.hamcrest.org +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. Redistributions in binary form must reproduce +the above copyright notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the distribution. + +Neither the name of Hamcrest nor the names of its contributors may be used to endorse +or promote products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +com.esotericsoftware.kryo:kryo +com.esotericsoftware.minlog:minlog +Copyright (c) 2008-2018, Nathan Sweet All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +org.ow2.asm:asm +org.ow2.asm:asm-analysis +org.ow2.asm:asm-commons +org.ow2.asm:asm-tree +org.ow2.asm:asm-util +ASM: a very small and fast Java bytecode manipulation framework + Copyright (c) 2000-2011 INRIA, France Telecom + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +MIT + +com.googlecode.plist:dd-plist +dd-plist - An open source library to parse and generate property lists +Copyright (C) 2016 Daniel Dreibrodt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +org.bouncycastle:bcpg-jdk15on +org.bouncycastle:bcprov-jdk15on +Copyright (c) 2000 - 2019 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +org.slf4j:jcl-over-slf4j +org.slf4j:jul-to-slf4j +org.slf4j:log4j-over-slf4j +org.slf4j:slf4j-api + Copyright (c) 2004-2017 QOS.ch + All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------------------ +CDDL +https://opensource.org/licenses/CDDL-1.0 + +com.sun.xml.bind:jaxb-impl + +------------------------------------------------------------------------------ +LGPL 2.1 +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html + +org.samba.jcifs:jcifs + +org.jetbrains.intellij.deps:trove4j + +------------------------------------------------------------------------------ +License for the GNU Trove library included by the Kotlin embeddable compiler +------------------------------------------------------------------------------ +The source code for GNU Trove is licensed under the Lesser GNU Public License (LGPL). + + Copyright (c) 2001, Eric D. Friedman All Rights Reserved. This library is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +Two classes (HashFunctions and PrimeFinder) included in Trove are licensed under the following terms: + + Copyright (c) 1999 CERN - European Organization for Nuclear Research. Permission to use, copy, modify, distribute and sell this software + and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and + that both that copyright notice and this permission notice appear in supporting documentation. CERN makes no representations about the + suitability of this software for any purpose. It is provided "as is" without expressed or implied warranty. + +The source code of modified GNU Trove library is available at + https://github.com/JetBrains/intellij-deps-trove4j (with trove4j_changes.txt describing the changes) + +------------------------------------------------------------------------------ +Eclipse Distribution License 1.0 +https://www.eclipse.org/org/documents/edl-v10.php + +org.eclipse.jgit:org.eclipse.jgit + +------------------------------------------------------------------------------ +BSD-style + +com.jcraft:jsch +com.jcraft:jzlib + +Copyright (c) 2000-2011 ymnk, JCraft,Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + + 3. The names of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, +INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +Eclipse Public License 2.0 +https://www.eclipse.org/legal/epl-2.0/ + +org.junit.platform:junit-platform-launcher + +------------------------------------------------------------------------------ +Mozilla Public License 2.0 +https://www.mozilla.org/en-US/MPL/2.0/ + +org.mozilla:rhino diff --git a/ui/main/src/assets/fonts/README.md b/ui/main/src/assets/fonts/README.md new file mode 100644 index 0000000000..961b586d63 --- /dev/null +++ b/ui/main/src/assets/fonts/README.md @@ -0,0 +1,3 @@ +The MaterialIcons fonts are provided by https://material.io/ under Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ + +The Roboto fonts are provided by https://fonts.google.com/ under Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ \ No newline at end of file From 1cef6aac9a3c86e7fbfc6e22520d0b2d0dcd90a7 Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Thu, 1 Oct 2020 12:55:25 +0200 Subject: [PATCH 10/76] Remove unused image --- ui/main/src/assets/images/icons/time_is_up.png | Bin 3664 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ui/main/src/assets/images/icons/time_is_up.png diff --git a/ui/main/src/assets/images/icons/time_is_up.png b/ui/main/src/assets/images/icons/time_is_up.png deleted file mode 100644 index 36ad509ad5ef47be6ced675e9fefa5485e159321..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3664 zcmcJS=T{R<(}x4n1Of^OBHWQGNbkKDsnSGxQKU#Wbm>JvL`W#1L+FY~xCMiR77-Do z_lOBiAe2z0B=jf$!F%54oae*te%RUH%-J(@&2E~7nE{ag4m|(>02&$US&`RJ@_^D& zl4sOz^KSrviNi=w+d6_`yYyv<_4Ge|yF!!ons*-&a079J|7ehr_n1os>97uH+j zzb8KkBVZt8uMcy>`BL4Qov&jrb#KrIgLHa!%RIpKbb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v*xPZqR*O5;ftH3G;Aksj|86#1CTjFC4JgGw%J=q|naKFRovA zd#=W&CfBQ0_84b6_JRJOIbY&qt?<&FJ@U-a8dQ{2 zARAR5xR#9$MK}VyDPp=}Fx2ezn$jeN_8Jdx~ZVmKu^bdQ7 zS=*H^$iR!9Swp7DXw7@-cvy6UK2^LYKU`X_;I#O+iUF?7P{6HOHRdwj>OPs-p}>du zblvVJ!nYaiKeqhR9Fq1>xXy%NX8EMYi*BM55Uh5$N?V^ON_PA7-16aLa?Q1+{4i9? zE-1H`LtBBp`Q4M999*o%f)MR>NPf%u`}YT$Rh`BiWH_VYa_A2osD=YlohPrLSpP`> z;Lm>2G9)IQ&uuVmoAYm!%WmAI2ZCL)0jth=dFRq@M%?rCh0S?r;XZbaZZu=-f zRB=QBjviCIO-Du9UEVzvxWhFxV!CR~T{m)c6WwDIW$iJBk27>uq#%)q%X)wj*yzNzB^aDTR8(n_uy^SWMA70;Uss2YB=Xcjz X0#dh&+;qu5MSzjMnI1ytN#cJ1UUxPh From 1885768faee819d93a8e273ab4a4c1a76027352d Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Thu, 1 Oct 2020 14:38:52 +0200 Subject: [PATCH 11/76] Remove unused svg --- .../src/assets/images/icons/sprites-mono.svg | 11 -- ui/main/src/assets/images/icons/sprites.svg | 11 -- ui/main/src/assets/images/icons/waite.png | Bin 21696 -> 0 bytes .../src/assets/images/logo/logo_lfe_lc.svg | 134 ------------------ .../images/logo/logo_lfe_operatorfabric.svg | 125 ---------------- .../assets/images/logo/logo_lfe_powsybl.svg | 76 ---------- 6 files changed, 357 deletions(-) delete mode 100755 ui/main/src/assets/images/icons/sprites-mono.svg delete mode 100755 ui/main/src/assets/images/icons/sprites.svg delete mode 100644 ui/main/src/assets/images/icons/waite.png delete mode 100755 ui/main/src/assets/images/logo/logo_lfe_lc.svg delete mode 100755 ui/main/src/assets/images/logo/logo_lfe_operatorfabric.svg delete mode 100755 ui/main/src/assets/images/logo/logo_lfe_powsybl.svg diff --git a/ui/main/src/assets/images/icons/sprites-mono.svg b/ui/main/src/assets/images/icons/sprites-mono.svg deleted file mode 100755 index 355f654ed6..0000000000 --- a/ui/main/src/assets/images/icons/sprites-mono.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/ui/main/src/assets/images/icons/sprites.svg b/ui/main/src/assets/images/icons/sprites.svg deleted file mode 100755 index bd2bf9800c..0000000000 --- a/ui/main/src/assets/images/icons/sprites.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/ui/main/src/assets/images/icons/waite.png b/ui/main/src/assets/images/icons/waite.png deleted file mode 100644 index c54a72275f02c778905d688b3193463b64556b8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21696 zcmXV22{@GB_kU+JrjVt?$QmND?|Wn?DO9#JvL!pCkTO!TjJ<}kl|cz5J4sVCNM^o+ zM3zPqGbquJwfyh&`}aIOlX2hso_p?DKKGo@E%nq%>%CkDxgZGIYincS1VM1{PdK!j z6MU@13~z#uT>)keW)Soui+kG}0e+V9v2k*Mpg1`Q!rp=)_7E%+f}+(RXdVqg1_cl# z9A4CZ+6erD^P;`A1^5JiHq2ipfR8=lHf~W6#M{mO3%hreR}_4S#MnAmBEKQU_w45! z;Y&CPLC$Hm7G^FnpMOkVE%5Xk>skJ3{8FLu7B830UgcZgKd7LN^WQuoWO{0k>N*!! z+Ib5lW>8m}xJ$M_f*WRu5S0?R_1~3%D;$pwOGz0w?%J*JGU|20ckChAvAH#U&DWIZ z8R^0gMXYPQW5#Pn3eT|#tx`a?3PQIErSg%gUT>bcXpo{29(|MT1 zbN$5Zl~tjXyN(EK@4*2RWvf<{NXHZ+6-a(~`Xi>P^lCZW)cq#K&m14Idr7D06U?Vf)7D-A zejSxSY8`Da5C!i#s|d+9ZCmMF6bvKji7{4*Oy-F}ozSkfl#@4n^4c^Fa5ma5kj>K= zRnfd@hl;|#iI+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NbypB&N_ZQJR4xxWK-j~4)R6NKM6jiYfJdJdKXDwsK!il2n&f(E zFv|?yp^t=;C6du>l2X=cBKGs5{=Rm}O_+}%3b-%XM#jRnqsulriVCV1DY*Kc1Eupi!9&Xza_Qzx(K8|@9Nn{ zWf_Ico?tw&P3U02(oGCl%o-R6%v0_Y2zjhZPkuNNq#(ckbWA)f5g2K$As@4C;S-_* zOx^q&*DW7ThK9crE^y{MK57CZ#B3_lyG)`&y?^(2Ej`eC(a^ZG^4oL4`GQd}2M3Hg zwaFN7GCqhLg2u&!fFFnn$^>PAGBYr-@I+aljV;iqgZoe@GzwK@*&hEtCqzc!BSIhq34X E0}>Mp%K!iX diff --git a/ui/main/src/assets/images/logo/logo_lfe_lc.svg b/ui/main/src/assets/images/logo/logo_lfe_lc.svg deleted file mode 100755 index f1c26f1cd0..0000000000 --- a/ui/main/src/assets/images/logo/logo_lfe_lc.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui/main/src/assets/images/logo/logo_lfe_operatorfabric.svg b/ui/main/src/assets/images/logo/logo_lfe_operatorfabric.svg deleted file mode 100755 index fa2fe80a05..0000000000 --- a/ui/main/src/assets/images/logo/logo_lfe_operatorfabric.svg +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui/main/src/assets/images/logo/logo_lfe_powsybl.svg b/ui/main/src/assets/images/logo/logo_lfe_powsybl.svg deleted file mode 100755 index 81f6eb5982..0000000000 --- a/ui/main/src/assets/images/logo/logo_lfe_powsybl.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From e04acf2b5e930af66de3a95590d31eaabdfd282c Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Thu, 1 Oct 2020 14:39:59 +0200 Subject: [PATCH 12/76] Add opfab logo license and copyright --- ressources/logo/logo_lfe_operatorfabric.svg | 132 ++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100755 ressources/logo/logo_lfe_operatorfabric.svg diff --git a/ressources/logo/logo_lfe_operatorfabric.svg b/ressources/logo/logo_lfe_operatorfabric.svg new file mode 100755 index 0000000000..ffea185540 --- /dev/null +++ b/ressources/logo/logo_lfe_operatorfabric.svg @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From bfa3fe387769404b9a2f79de0234d403950e0c6f Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Thu, 1 Oct 2020 14:59:27 +0200 Subject: [PATCH 13/76] Remove config file for unused tool protractor --- ui/main/e2e/protractor.conf.js | 28 ---------------------------- ui/main/e2e/src/app.e2e-spec.ts | 21 --------------------- ui/main/e2e/src/app.po.ts | 18 ------------------ ui/main/e2e/tsconfig.e2e.json | 13 ------------- 4 files changed, 80 deletions(-) delete mode 100755 ui/main/e2e/protractor.conf.js delete mode 100755 ui/main/e2e/src/app.e2e-spec.ts delete mode 100755 ui/main/e2e/src/app.po.ts delete mode 100755 ui/main/e2e/tsconfig.e2e.json diff --git a/ui/main/e2e/protractor.conf.js b/ui/main/e2e/protractor.conf.js deleted file mode 100755 index 86776a391a..0000000000 --- a/ui/main/e2e/protractor.conf.js +++ /dev/null @@ -1,28 +0,0 @@ -// Protractor configuration file, see link for more information -// https://github.com/angular/protractor/blob/master/lib/config.ts - -const { SpecReporter } = require('jasmine-spec-reporter'); - -exports.config = { - allScriptsTimeout: 11000, - specs: [ - './src/**/*.e2e-spec.ts' - ], - capabilities: { - 'browserName': 'chrome' - }, - directConnect: true, - baseUrl: 'http://localhost:4200/', - framework: 'jasmine', - jasmineNodeOpts: { - showColors: true, - defaultTimeoutInterval: 30000, - print: function() {} - }, - onPrepare() { - require('ts-node').register({ - project: require('path').join(__dirname, './tsconfig.e2e.json') - }); - jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); - } -}; \ No newline at end of file diff --git a/ui/main/e2e/src/app.e2e-spec.ts b/ui/main/e2e/src/app.e2e-spec.ts deleted file mode 100755 index bee3134d50..0000000000 --- a/ui/main/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2018, RTE (http://www.rte-france.com) - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -import { AppPage } from './app.po'; - -describe('workspace-project App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - it('should display welcome message', () => { - page.navigateTo(); - expect(page.getParagraphText()).toEqual('Welcome to ng-base-annotation-test!'); - }); -}); diff --git a/ui/main/e2e/src/app.po.ts b/ui/main/e2e/src/app.po.ts deleted file mode 100755 index 76d4fe6c3a..0000000000 --- a/ui/main/e2e/src/app.po.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (c) 2018, RTE (http://www.rte-france.com) - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -import { browser, by, element } from 'protractor'; - -export class AppPage { - navigateTo() { - return browser.get('/'); - } - - getParagraphText() { - return element(by.css('of-root h1')).getText(); - } -} diff --git a/ui/main/e2e/tsconfig.e2e.json b/ui/main/e2e/tsconfig.e2e.json deleted file mode 100755 index a6dd622028..0000000000 --- a/ui/main/e2e/tsconfig.e2e.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/app", - "module": "commonjs", - "target": "es5", - "types": [ - "jasmine", - "jasminewd2", - "node" - ] - } -} \ No newline at end of file From d252c291525996fb78df67f6296e109a3001f882 Mon Sep 17 00:00:00 2001 From: LONGA Valerie Date: Wed, 30 Sep 2020 17:18:44 +0200 Subject: [PATCH 14/76] [OC-1130] Add name of entity in logging screen --- ui/main/src/app/services/card.service.ts | 6 ++++-- ui/main/src/app/services/entities.service.ts | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ui/main/src/app/services/card.service.ts b/ui/main/src/app/services/card.service.ts index ba4e9f591c..7557c1ad04 100644 --- a/ui/main/src/app/services/card.service.ts +++ b/ui/main/src/app/services/card.service.ts @@ -34,6 +34,7 @@ import { LoadLightCardsSuccess, RemoveLightCard } from '@ofActions/light-card.actions'; +import {EntitiesService} from '@ofServices/entities.service'; @Injectable() export class CardService { @@ -54,7 +55,8 @@ export class CardService { private notifyService: NotifyService, private guidService: GuidService, private store: Store, - private authService: AuthenticationService) { + private authService: AuthenticationService, + private entitiesService: EntitiesService) { const clientId = this.guidService.getCurrentGuidString(); this.cardOperationsUrl = `${environment.urls.cards}/cardSubscription?clientId=${clientId}`; this.cardsUrl = `${environment.urls.cards}/cards`; @@ -220,7 +222,7 @@ export class CardService { const publisherType = card.publisherType; const enumThirdParty = PublisherType.EXTERNAL; const isThirdPartyPublisher = enumThirdParty === PublisherType[publisherType]; - const sender = (isThirdPartyPublisher) ? 'SYSTEM' : card.publisher ; + const sender = (isThirdPartyPublisher) ? 'SYSTEM' : this.entitiesService.getEntityName(card.publisher); return ({ process: card.process, processVersion: card.processVersion, diff --git a/ui/main/src/app/services/entities.service.ts b/ui/main/src/app/services/entities.service.ts index b41bd5d63b..eb923df469 100644 --- a/ui/main/src/app/services/entities.service.ts +++ b/ui/main/src/app/services/entities.service.ts @@ -60,4 +60,9 @@ export class EntitiesService implements CrudService { return this._entities; } + public getEntityName(idEntity: string): string { + const name = this._entities.find(entity => entity.id === idEntity).name; + return (name ? name : idEntity); + } + } From 597c8f085c679d098bbbbcd7facb332ae9c9acd7 Mon Sep 17 00:00:00 2001 From: LONGA Valerie Date: Fri, 18 Sep 2020 17:27:40 +0200 Subject: [PATCH 15/76] [OC-1078] Implement notion of processGroup --- services/core/businessconfig/build.gradle | 11 ++- .../json/BusinessconfigModule.java | 3 + .../controllers/BusinessconfigController.java | 35 +++++++++ .../model/ProcessGroupData.java | 36 +++++++++ .../model/ProcessGroupsData.java | 37 +++++++++ .../model/ProcessGroupsLocaleData.java | 36 +++++++++ .../services/ProcessesService.java | 57 +++++++++++++- .../src/main/modeling/swagger.yaml | 76 +++++++++++++++++++ .../src/test/data/processgroups.json | 28 +++++++ ...ontrollerWithWrongConfigurationShould.java | 12 +++ .../GivenAdminUserThirdControllerShould.java | 32 ++++++++ ...minUserBusinessconfigControllerShould.java | 25 ++++++ .../services/ProcessesServiceShould.java | 1 + .../businessconfig/getProcessGroups.feature | 59 ++++++++++++++ .../resources/processgroups1.json | 28 +++++++ .../resources/processgroups2.json | 28 +++++++ .../uploadProcessGroupsFile.feature | 51 +++++++++++++ .../api/karate/launchAllBusinessconfig.sh | 18 +++-- .../operatorfabric/utilities/PathUtils.java | 10 +++ 19 files changed, 570 insertions(+), 13 deletions(-) create mode 100644 services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessGroupData.java create mode 100644 services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessGroupsData.java create mode 100644 services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessGroupsLocaleData.java create mode 100644 services/core/businessconfig/src/test/data/processgroups.json create mode 100644 src/test/api/karate/businessconfig/getProcessGroups.feature create mode 100644 src/test/api/karate/businessconfig/resources/processgroups1.json create mode 100644 src/test/api/karate/businessconfig/resources/processgroups2.json create mode 100644 src/test/api/karate/businessconfig/uploadProcessGroupsFile.feature diff --git a/services/core/businessconfig/build.gradle b/services/core/businessconfig/build.gradle index 478c69bbd5..d3a531c38d 100755 --- a/services/core/businessconfig/build.gradle +++ b/services/core/businessconfig/build.gradle @@ -40,6 +40,12 @@ task compressBundle2Data(type: Exec){ executable "bash" args "-c", "tar -czf $project.projectDir/build/test-data/bundles/second-2.1.tar.gz *" } +task copyProcessGroupsFile(type: Exec){ + description 'copy processgroups.json file for businessconfig party configuration data for tests in build/test-data' + workingDir "$project.projectDir/src/test/data/" + executable "bash" + args "-c", "cp processgroups.json $project.projectDir/build/test-data/" +} task createDevData(type: Copy){ description 'prepare data in build/test-data for running bootRun task during development' @@ -79,8 +85,9 @@ task copyCompileClasspathDependencies(type: Copy) { createDevData.dependsOn prepareDevDataDir compressBundle1Data.dependsOn prepareTestDataDir compressBundle2Data.dependsOn prepareTestDataDir -test.dependsOn prepareTestDataDir,compressBundle1Data,compressBundle2Data -unitTest.dependsOn prepareTestDataDir,compressBundle1Data,compressBundle2Data +copyProcessGroupsFile.dependsOn prepareTestDataDir +test.dependsOn prepareTestDataDir,compressBundle1Data,compressBundle2Data,copyProcessGroupsFile +unitTest.dependsOn prepareTestDataDir,compressBundle1Data,compressBundle2Data,copyProcessGroupsFile bootRun.dependsOn createDevData // <<<<< Test data tasks diff --git a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/configuration/json/BusinessconfigModule.java b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/configuration/json/BusinessconfigModule.java index fa365ac66f..56ae13316c 100644 --- a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/configuration/json/BusinessconfigModule.java +++ b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/configuration/json/BusinessconfigModule.java @@ -30,5 +30,8 @@ public BusinessconfigModule() { addAbstractTypeMapping(I18n.class,I18nData.class); addAbstractTypeMapping(Response.class,ResponseData.class); addAbstractTypeMapping(ProcessUiVisibility.class,ProcessUiVisibilityData.class); + addAbstractTypeMapping(ProcessGroup.class,ProcessGroupData.class); + addAbstractTypeMapping(ProcessGroups.class,ProcessGroupsData.class); + addAbstractTypeMapping(ProcessGroupsLocale.class,ProcessGroupsLocaleData.class); } } diff --git a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/controllers/BusinessconfigController.java b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/controllers/BusinessconfigController.java index a2f5ee778e..c64763a6c5 100644 --- a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/controllers/BusinessconfigController.java +++ b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/controllers/BusinessconfigController.java @@ -102,6 +102,11 @@ public List getProcesses(HttpServletRequest request, HttpServletRespons return service.listProcesses(); } + @Override + public ProcessGroups getProcessgroups(HttpServletRequest request, HttpServletResponse response) { + return service.getProcessGroupsCache(); + } + @Override public Process uploadBundle(HttpServletRequest request, HttpServletResponse response, @Valid MultipartFile file) { try (InputStream is = file.getInputStream()) { @@ -132,6 +137,36 @@ public Process uploadBundle(HttpServletRequest request, HttpServletResponse resp } } + @Override + public Void uploadProcessgroups(HttpServletRequest request, HttpServletResponse response, @Valid MultipartFile file) { + try (InputStream is = file.getInputStream()) { + service.updateProcessGroupsFile(is); + response.addHeader("Location", request.getContextPath() + "/businessconfig/processgroups"); + response.setStatus(201); + return null; + } catch (FileNotFoundException e) { + log.error("File not found while loading processgroups file", e); + throw new ApiErrorException( + ApiError.builder() + .status(HttpStatus.BAD_REQUEST) + .message("Incorrect inner file structure") + .error(e.getMessage()) + .build(), + UNABLE_TO_LOAD_FILE_MSG + , e); + } catch (IOException e) { + log.error("IOException while loading processgroups file", e); + throw new ApiErrorException( + ApiError.builder() + .status(HttpStatus.BAD_REQUEST) + .message("unable to load submitted file") + .error(e.getMessage()) + .build(), + UNABLE_TO_LOAD_FILE_MSG + , e); + } + } + @Override public Void clearProcesses(HttpServletRequest request, HttpServletResponse response) throws Exception { service.clear(); diff --git a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessGroupData.java b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessGroupData.java new file mode 100644 index 0000000000..c71dc97be2 --- /dev/null +++ b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessGroupData.java @@ -0,0 +1,36 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + + +package org.lfenergy.operatorfabric.businessconfig.model; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +import java.util.List; + +/** + * ProcessGroup Model, documented at {@link ProcessGroup} + * + * {@inheritDoc} + * + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@Slf4j +public class ProcessGroupData implements ProcessGroup { + + private String id; + private List processes; +} diff --git a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessGroupsData.java b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessGroupsData.java new file mode 100644 index 0000000000..232482699d --- /dev/null +++ b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessGroupsData.java @@ -0,0 +1,37 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + + +package org.lfenergy.operatorfabric.businessconfig.model; + +import lombok.*; +import lombok.extern.slf4j.Slf4j; +import java.util.List; + +/** + * ProcessGroups Model, documented at {@link ProcessGroups} + * + * {@inheritDoc} + * + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@Slf4j +public class ProcessGroupsData implements ProcessGroups { + + private List groups; + private ProcessGroupsLocale locale; + + public void clear(){ + this.groups.clear(); + this.locale = new ProcessGroupsLocaleData(); + } +} diff --git a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessGroupsLocaleData.java b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessGroupsLocaleData.java new file mode 100644 index 0000000000..e804f57b45 --- /dev/null +++ b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessGroupsLocaleData.java @@ -0,0 +1,36 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + + +package org.lfenergy.operatorfabric.businessconfig.model; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +import java.util.Map; + +/** + * ProcessGroupsLocale Model, documented at {@link ProcessGroupsLocale} + * + * {@inheritDoc} + * + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@Slf4j +public class ProcessGroupsLocaleData implements ProcessGroupsLocale { + + private Map en; + private Map fr; +} diff --git a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/services/ProcessesService.java b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/services/ProcessesService.java index a38442d38e..9df690e272 100644 --- a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/services/ProcessesService.java +++ b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/services/ProcessesService.java @@ -35,9 +35,8 @@ import javax.annotation.PostConstruct; import javax.validation.ConstraintViolation; +import org.lfenergy.operatorfabric.businessconfig.model.*; import org.lfenergy.operatorfabric.businessconfig.model.Process; -import org.lfenergy.operatorfabric.businessconfig.model.ProcessData; -import org.lfenergy.operatorfabric.businessconfig.model.ResourceTypeEnum; import org.lfenergy.operatorfabric.utilities.PathUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -70,6 +69,7 @@ public class ProcessesService implements ResourceLoaderAware { private Table completeCache; private ResourceLoader resourceLoader; private LocalValidatorFactoryBean validator; + private ProcessGroupsData processGroupsCache; @Autowired public ProcessesService(ObjectMapper objectMapper, LocalValidatorFactoryBean validator) { @@ -82,6 +82,11 @@ public ProcessesService(ObjectMapper objectMapper, LocalValidatorFactoryBean val @PostConstruct private void init() { loadCache(); + loadProcessGroupsCache(); + } + + public ProcessGroups getProcessGroupsCache() { + return processGroupsCache; } /** @@ -92,7 +97,28 @@ private void init() { public List listProcesses() { return new ArrayList<>(defaultCache.values()); } - + + /** + * Loads processGroups data to processGroupsCache + */ + public void loadProcessGroupsCache() { + + this.processGroupsCache = new ProcessGroupsData(new ArrayList<>(), new ProcessGroupsLocaleData()); + try { + Path rootPath = Paths + .get(this.resourceLoader.getResource(PATH_PREFIX + this.storagePath).getFile().getAbsolutePath()) + .normalize(); + + File f = new File(rootPath.toString() + "/processGroups.json"); + if (f.exists() && f.isFile()) { + log.info("loading processGroups.json file from {}", new File(storagePath).getAbsolutePath()); + this.processGroupsCache = objectMapper.readValue(f, ProcessGroupsData.class); + } + } + catch (IOException e) { + log.warn("Unreadable processGroups.json file at {}", storagePath); + } + } /** * Loads process data to defaultCache (not thread safe) @@ -310,6 +336,29 @@ public synchronized Process updateProcess(InputStream is) throws IOException { } } + /** + * Updates or creates processgroups file from a file uploaded from POST /businessconfig/processgroups + * + * @param is processgroups file input stream + * @throws IOException if error arise during stream reading + */ + public synchronized void updateProcessGroupsFile(InputStream is) throws IOException { + Path rootPath = Paths + .get(this.resourceLoader.getResource(PATH_PREFIX + this.storagePath).getFile().getAbsolutePath()) + .normalize(); + if (!rootPath.toFile().exists()) + throw new FileNotFoundException("No directory available to copy processgroups file"); + + ProcessGroupsData newProcessGroups = objectMapper.readValue(is, ProcessGroupsData.class); + is.reset(); + + //copy file + PathUtils.copyInputStreamToFile(is, rootPath.toString() + "/processGroups.json"); + + //update cache + processGroupsCache = newProcessGroups; + } + /** * Updates or creates process from disk saved bundle * @@ -451,10 +500,12 @@ public void clear() throws IOException { }finally { this.completeCache.clear(); this.defaultCache.clear(); + this.processGroupsCache.clear(); } }else{ this.completeCache.clear(); this.defaultCache.clear(); + this.processGroupsCache.clear(); } } diff --git a/services/core/businessconfig/src/main/modeling/swagger.yaml b/services/core/businessconfig/src/main/modeling/swagger.yaml index 0efc9133fc..d422a45c56 100755 --- a/services/core/businessconfig/src/main/modeling/swagger.yaml +++ b/services/core/businessconfig/src/main/modeling/swagger.yaml @@ -323,6 +323,45 @@ paths: description: Not found '500': description: Unable to delete version of process + '/businessconfig/processgroups': + get: + summary: Get the groups of processes + description: >- + Get the groups of processes + operationId: getProcessgroups + produces: + - application/json + responses: + '200': + description: OK + schema: + $ref: '#/definitions/ProcessGroups' + '401': + description: Authentication required + post: + summary: Upload file defining the groups of processes + description: >- + Upload file defining the groups of processes. + This file must be in json format and is saved to disk, under the name 'processGroups.json'. + operationId: uploadProcessgroups + consumes: + - multipart/form-data + produces: + - application/json + parameters: + - name: file + in: formData + description: file to upload + required: true + type: file + responses: + '201': + description: Successful creation + '401': + description: Authentication required + '403': + description: Forbidden - ADMIN role necessary + definitions: MenuEntry: type: object @@ -555,3 +594,40 @@ definitions: - GREEN - YELLOW example: RED + + ProcessGroup: + description: Object containing a list of processes. + properties: + id: + description: Id of the group + type: string + processes: + description: List of processes included in the group + type: array + items: + type: string + required: + - id + example: + id: processgroup1 + processes: + - "id_process1" + - "id_process2" + + ProcessGroups: + properties: + groups: + type: array + items: + $ref: '#/definitions/ProcessGroup' + locale: + type: object + properties: + en: + type: object + additionalProperties: + type: string + fr: + type: object + additionalProperties: + type: string \ No newline at end of file diff --git a/services/core/businessconfig/src/test/data/processgroups.json b/services/core/businessconfig/src/test/data/processgroups.json new file mode 100644 index 0000000000..c8ba77d2e9 --- /dev/null +++ b/services/core/businessconfig/src/test/data/processgroups.json @@ -0,0 +1,28 @@ +{ + "groups": [ + { + "id": "processgroup1", + "processes": [ + "id_process1", + "id_process2" + ] + }, + { + "id": "processgroup2", + "processes": [ + "id_process3", + "id_process4" + ] + } + ], + "locale": { + "en": { + "processgroup1": "Process Group 1", + "processgroup2": "Process Group 2" + }, + "fr": { + "processgroup1": "Groupe de process 1", + "processgroup2": "Groupe de process 2" + } + } +} diff --git a/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/controllers/BusinessconfigControllerWithWrongConfigurationShould.java b/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/controllers/BusinessconfigControllerWithWrongConfigurationShould.java index 3944eca609..eab8ab8250 100644 --- a/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/controllers/BusinessconfigControllerWithWrongConfigurationShould.java +++ b/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/controllers/BusinessconfigControllerWithWrongConfigurationShould.java @@ -19,6 +19,7 @@ import org.lfenergy.operatorfabric.businessconfig.application.IntegrationTestApplication; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.http.MediaType; import org.springframework.mock.web.MockMultipartFile; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -66,4 +67,15 @@ void notAllowBundlesToBePosted() throws Exception { mockMvc.perform(multipart("/businessconfig/processes").file(bundle)) .andExpect(status().isBadRequest()); } + + @Test + void notAllowProcessGroupsToBePosted() throws Exception { + Path pathToProcessGroupsFile = Paths.get("./build/test-data/processgroups.json"); + + MockMultipartFile processGroupsFile = new MockMultipartFile("file", "processgroups.json", MediaType.TEXT_PLAIN_VALUE, Files + .readAllBytes(pathToProcessGroupsFile)); + + mockMvc.perform(multipart("/businessconfig/processgroups").file(processGroupsFile)) + .andExpect(status().isBadRequest()); + } } diff --git a/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/controllers/GivenAdminUserThirdControllerShould.java b/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/controllers/GivenAdminUserThirdControllerShould.java index d1357aa3cf..dc6235cb28 100644 --- a/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/controllers/GivenAdminUserThirdControllerShould.java +++ b/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/controllers/GivenAdminUserThirdControllerShould.java @@ -82,6 +82,7 @@ void setup() throws Exception { .apply(springSecurity()) .build(); service.loadCache(); + service.loadProcessGroupsCache(); } @AfterAll @@ -106,6 +107,15 @@ void listProcesses() throws Exception { ; } + @Test + void listProcessGroups() throws Exception { + mockMvc.perform(get("/businessconfig/processgroups")) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON)) + .andExpect(jsonPath("$.groups", hasSize(0))) + ; + } + @Test void fetch() throws Exception { ResultActions result = mockMvc.perform(get("/businessconfig/processes/first")); @@ -280,7 +290,29 @@ void create() throws Exception { mockMvc.perform(get("/businessconfig/processes/second/css/nostyle")) .andExpect(status().isNotFound()) ; + } + @Test + void createProcessGroups() throws Exception { + Path pathToProcessGroupsFile = Paths.get("./build/test-data/processgroups.json"); + + MockMultipartFile processGroupsFile = new MockMultipartFile("file", "processgroups.json", MediaType.TEXT_PLAIN_VALUE, Files + .readAllBytes(pathToProcessGroupsFile)); + + mockMvc.perform(multipart("/businessconfig/processgroups").file(processGroupsFile)) + .andExpect(status().isCreated()) + .andExpect(header().string("Location", "/businessconfig/processgroups")); + + mockMvc.perform(get("/businessconfig/processgroups")) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON)) + .andExpect(jsonPath("$.groups", hasSize(2))) + .andExpect(jsonPath("$.groups[0].id", is("processgroup1"))) + .andExpect(jsonPath("$.groups[1].id", is("processgroup2"))) + .andExpect(jsonPath("$.locale.en.processgroup1", is("Process Group 1"))) + .andExpect(jsonPath("$.locale.en.processgroup2", is("Process Group 2"))) + .andExpect(jsonPath("$.locale.fr.processgroup1", is("Groupe de process 1"))) + .andExpect(jsonPath("$.locale.fr.processgroup2", is("Groupe de process 2"))); } @Nested diff --git a/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/controllers/GivenNonAdminUserBusinessconfigControllerShould.java b/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/controllers/GivenNonAdminUserBusinessconfigControllerShould.java index 8f715fbff0..de109cf2e3 100644 --- a/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/controllers/GivenNonAdminUserBusinessconfigControllerShould.java +++ b/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/controllers/GivenNonAdminUserBusinessconfigControllerShould.java @@ -74,6 +74,7 @@ void setup() throws Exception { .apply(springSecurity()) .build(); service.loadCache(); + service.loadProcessGroupsCache(); } @AfterAll @@ -92,6 +93,15 @@ void listProcesses() throws Exception { ; } + @Test + void listProcessGroups() throws Exception { + mockMvc.perform(get("/businessconfig/processgroups")) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON)) + .andExpect(jsonPath("$.groups", hasSize(0))) + ; + } + @Test void fetch() throws Exception { ResultActions result = mockMvc.perform(get("/businessconfig/processes/first")); @@ -230,8 +240,23 @@ void create() throws Exception { .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON)) .andExpect(jsonPath("$", hasSize(2))); + } + @Test + void createProcessGroups() throws Exception { + Path pathToProcessGroupsFile = Paths.get("./build/test-data/processgroups.json"); + + MockMultipartFile processGroupsFile = new MockMultipartFile("file", "processgroups.json", MediaType.TEXT_PLAIN_VALUE, Files + .readAllBytes(pathToProcessGroupsFile)); + mockMvc.perform(multipart("/businessconfig/processgroups").file(processGroupsFile)) + .andExpect(status().isForbidden()) + ; + + mockMvc.perform(get("/businessconfig/processgroups")) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON)) + .andExpect(jsonPath("$.groups", hasSize(0))); } @Nested diff --git a/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/services/ProcessesServiceShould.java b/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/services/ProcessesServiceShould.java index ac5b0c7691..b03076caa3 100644 --- a/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/services/ProcessesServiceShould.java +++ b/services/core/businessconfig/src/test/java/org/lfenergy/operatorfabric/businessconfig/services/ProcessesServiceShould.java @@ -60,6 +60,7 @@ class ProcessesServiceShould { void prepare() throws IOException { copy(Paths.get("./src/test/docker/volume/businessconfig-storage"), testDataDir); service.loadCache(); + service.loadProcessGroupsCache(); } @AfterAll diff --git a/src/test/api/karate/businessconfig/getProcessGroups.feature b/src/test/api/karate/businessconfig/getProcessGroups.feature new file mode 100644 index 0000000000..3c095c4560 --- /dev/null +++ b/src/test/api/karate/businessconfig/getProcessGroups.feature @@ -0,0 +1,59 @@ +Feature: getProcessGroups + + Background: + #Getting token for admin and tso1-operator user calling getToken.feature + * def signIn = call read('../common/getToken.feature') { username: 'admin'} + * def authToken = signIn.authToken + * def signInAsTSO = call read('../common/getToken.feature') { username: 'tso1-operator'} + * def authTokenAsTSO = signInAsTSO.authToken + + + Scenario: Push a process groups file + Given url opfabUrl + '/businessconfig/processgroups' + And header Authorization = 'Bearer ' + authToken + And multipart file file = { read: 'resources/processgroups1.json' } + When method post + Then status 201 + + + Scenario: List existing process groups as admin user + Given url opfabUrl + '/businessconfig/processgroups' + And header Authorization = 'Bearer ' + authToken + When method GET + Then status 200 + And assert response.groups.length == 2 + Then match response.groups[0].id == 'processgroupKarate1' + Then match response.groups[0].processes[0] == 'id_process1' + Then match response.groups[0].processes[1] == 'id_process2' + Then match response.groups[1].id == 'processgroupKarate2' + Then match response.groups[1].processes[0] == 'id_process3' + Then match response.groups[1].processes[1] == 'id_process4' + Then match response.locale.en.processgroupKarate1 == 'Process Group Karate 1' + Then match response.locale.en.processgroupKarate2 == 'Process Group Karate 2' + Then match response.locale.fr.processgroupKarate1 == 'Groupe de process Karate 1' + Then match response.locale.fr.processgroupKarate2 == 'Groupe de process Karate 2' + + + Scenario: List existing process groups as non admin user + Given url opfabUrl + '/businessconfig/processgroups' + And header Authorization = 'Bearer ' + authTokenAsTSO + When method GET + Then status 200 + And assert response.groups.length == 2 + Then match response.groups[0].id == 'processgroupKarate1' + Then match response.groups[0].processes[0] == 'id_process1' + Then match response.groups[0].processes[1] == 'id_process2' + Then match response.groups[1].id == 'processgroupKarate2' + Then match response.groups[1].processes[0] == 'id_process3' + Then match response.groups[1].processes[1] == 'id_process4' + Then match response.locale.en.processgroupKarate1 == 'Process Group Karate 1' + Then match response.locale.en.processgroupKarate2 == 'Process Group Karate 2' + Then match response.locale.fr.processgroupKarate1 == 'Groupe de process Karate 1' + Then match response.locale.fr.processgroupKarate2 == 'Groupe de process Karate 2' + + + Scenario: List existing process groups without authentication + Given url opfabUrl + '/businessconfig/processgroups' + When method GET + Then print response + And status 401 \ No newline at end of file diff --git a/src/test/api/karate/businessconfig/resources/processgroups1.json b/src/test/api/karate/businessconfig/resources/processgroups1.json new file mode 100644 index 0000000000..20fdef50d0 --- /dev/null +++ b/src/test/api/karate/businessconfig/resources/processgroups1.json @@ -0,0 +1,28 @@ +{ + "groups": [ + { + "id": "processgroupKarate1", + "processes": [ + "id_process1", + "id_process2" + ] + }, + { + "id": "processgroupKarate2", + "processes": [ + "id_process3", + "id_process4" + ] + } + ], + "locale": { + "en": { + "processgroupKarate1": "Process Group Karate 1", + "processgroupKarate2": "Process Group Karate 2" + }, + "fr": { + "processgroupKarate1": "Groupe de process Karate 1", + "processgroupKarate2": "Groupe de process Karate 2" + } + } +} diff --git a/src/test/api/karate/businessconfig/resources/processgroups2.json b/src/test/api/karate/businessconfig/resources/processgroups2.json new file mode 100644 index 0000000000..95c5d1ce7c --- /dev/null +++ b/src/test/api/karate/businessconfig/resources/processgroups2.json @@ -0,0 +1,28 @@ +{ + "groups": [ + { + "id": "processgroupKarate3", + "processes": [ + "id_process5", + "id_process6" + ] + }, + { + "id": "processgroupKarate4", + "processes": [ + "id_process7", + "id_process8" + ] + } + ], + "locale": { + "en": { + "processgroupKarate3": "Process Group Karate 3", + "processgroupKarate4": "Process Group Karate 4" + }, + "fr": { + "processgroupKarate3": "Groupe de process Karate 3", + "processgroupKarate4": "Groupe de process Karate 4" + } + } +} diff --git a/src/test/api/karate/businessconfig/uploadProcessGroupsFile.feature b/src/test/api/karate/businessconfig/uploadProcessGroupsFile.feature new file mode 100644 index 0000000000..c4487f2203 --- /dev/null +++ b/src/test/api/karate/businessconfig/uploadProcessGroupsFile.feature @@ -0,0 +1,51 @@ +Feature: uploadProcessGroups + + Background: + # Get admin token + * def signIn = call read('../common/getToken.feature') { username: 'admin'} + * def authToken = signIn.authToken + + # Get TSO-operator + * def signInAsTSO = call read('../common/getToken.feature') { username: 'tso1-operator'} + * def authTokenAsTSO = signInAsTSO.authToken + + + Scenario: Post process groups file without authentication + Given url opfabUrl + '/businessconfig/processgroups' + And multipart file file = { read: 'resources/processgroups2.json' } + When method post + And status 401 + + + Scenario: Post process groups file without admin role + Given url opfabUrl + '/businessconfig/processgroups' + And header Authorization = 'Bearer ' + authTokenAsTSO + And multipart file file = { read: 'resources/processgroups2.json' } + When method post + And status 403 + + + Scenario: Post process groups file + Given url opfabUrl + '/businessconfig/processgroups' + And header Authorization = 'Bearer ' + authToken + And multipart file file = { read: 'resources/processgroups2.json' } + When method post + And status 201 + + + Scenario: Check that process groups have been updated + Given url opfabUrl + '/businessconfig/processgroups' + And header Authorization = 'Bearer ' + authTokenAsTSO + When method GET + Then status 200 + And assert response.groups.length == 2 + Then match response.groups[0].id == 'processgroupKarate3' + Then match response.groups[0].processes[0] == 'id_process5' + Then match response.groups[0].processes[1] == 'id_process6' + Then match response.groups[1].id == 'processgroupKarate4' + Then match response.groups[1].processes[0] == 'id_process7' + Then match response.groups[1].processes[1] == 'id_process8' + Then match response.locale.en.processgroupKarate3 == 'Process Group Karate 3' + Then match response.locale.en.processgroupKarate4 == 'Process Group Karate 4' + Then match response.locale.fr.processgroupKarate3 == 'Groupe de process Karate 3' + Then match response.locale.fr.processgroupKarate4 == 'Groupe de process Karate 4' \ No newline at end of file diff --git a/src/test/api/karate/launchAllBusinessconfig.sh b/src/test/api/karate/launchAllBusinessconfig.sh index c5e03426e0..d00580fd24 100755 --- a/src/test/api/karate/launchAllBusinessconfig.sh +++ b/src/test/api/karate/launchAllBusinessconfig.sh @@ -10,12 +10,14 @@ cd ../.. echo "Launch Karate test" java -jar karate.jar \ businessconfig/deleteBundle.feature `#nice to be the very first one`\ - businessconfig/deleteBundleVersion.feature \ - businessconfig/uploadBundle.feature \ - businessconfig/getABusinessconfig.feature \ - businessconfig/getCss.feature \ - businessconfig/getDetailsBusinessconfig.feature \ - businessconfig/getI18n.feature \ - businessconfig/getBusinessconfigActions.feature \ + businessconfig/deleteBundleVersion.feature \ + businessconfig/uploadBundle.feature \ + businessconfig/getABusinessconfig.feature \ + businessconfig/getCss.feature \ + businessconfig/getDetailsBusinessconfig.feature \ + businessconfig/getI18n.feature \ + businessconfig/getBusinessconfigActions.feature \ businessconfig/getBusinessconfig.feature \ - businessconfig/getBusinessconfigTemplate.feature + businessconfig/getBusinessconfigTemplate.feature \ + businessconfig/getProcessGroups.feature \ + businessconfig/uploadProcessGroupsFile.feature diff --git a/tools/generic/utilities/src/main/java/org/lfenergy/operatorfabric/utilities/PathUtils.java b/tools/generic/utilities/src/main/java/org/lfenergy/operatorfabric/utilities/PathUtils.java index e45ffe4cb9..2e4f7ba232 100644 --- a/tools/generic/utilities/src/main/java/org/lfenergy/operatorfabric/utilities/PathUtils.java +++ b/tools/generic/utilities/src/main/java/org/lfenergy/operatorfabric/utilities/PathUtils.java @@ -166,6 +166,16 @@ private static void createDirIfNeeded(Path dir) throws IOException { Files.createDirectories(dir); } } + + public static void copyInputStreamToFile(InputStream is, String outPath) throws IOException { + + File targetFile = new File(outPath); + + java.nio.file.Files.copy( + is, + targetFile.toPath(), + StandardCopyOption.REPLACE_EXISTING); + } } /** From e4650d8699a681d2037d43205b109ac7d5544c0e Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Thu, 1 Oct 2020 15:37:27 +0200 Subject: [PATCH 16/76] Correct license headers --- CICD/prepare_release_version.sh | 8 ++++++++ CICD/travis/check_version.sh | 9 +++++++++ CICD/travis/upload_doc.sh | 9 +++++++++ bin/add_header.sh | 8 ++++++++ bin/load_environment_light.sh | 9 +++++++++ bin/load_variables.sh | 8 ++++++++ bin/run_all.sh | 9 +++++++++ bin/setup_dockerized_environment.sh | 9 +++++++++ .../businessconfig/model/LinkTypeEnum.java | 9 +++++++++ .../businessconfig/model/ResponseBtnColorEnum.java | 7 ++++--- .../businessconfig/model/ProcessUiVisibilityData.java | 7 ++++--- .../businessconfig/model/ResponseData.java | 6 ++++-- .../cards-publication/src/main/bin/push_card_loop.sh | 5 +++++ .../cards/publication/configuration/Common.java | 6 ++++-- .../configuration/WebSecurityConfiguration.java | 6 ++++-- .../webflux/WebSecurityConfigurationTest.java | 7 ++++--- src/main/docker/add-certificates.sh | 8 ++++++++ src/main/docker/java-config-docker-entrypoint.sh | 5 +++++ src/test/api/karate/karate-config.js | 9 +++++++++ src/test/api/karate/launchAllBusinessconfig.sh | 8 ++++++++ src/test/api/karate/launchAllCards.sh | 7 +++++++ src/test/api/karate/launchAllUsers.sh | 8 ++++++++ src/test/api/karate/launchAllUsers_JWTMode.sh | 8 ++++++++ .../externalApp/ExternalAppApplication.java | 9 +++++++++ .../externalApp/controller/ExternalAppController.java | 10 ++++++++++ .../externalApp/exception/ExternalAppException.java | 9 +++++++++ .../externalApp/service/ExternalAppService.java | 9 +++++++++ .../externalApp/service/ExternalAppServiceImpl.java | 9 +++++++++ .../externalApp/ExternalAppApplicationTests.java | 9 +++++++++ src/test/utils/karate/README.adoc | 7 +++++++ src/test/utils/karate/deleteTestCards.sh | 8 ++++++++ src/test/utils/karate/karate-config.js | 9 +++++++++ src/test/utils/karate/loadBundle.sh | 8 ++++++++ src/test/utils/karate/postTestCards.sh | 8 ++++++++ src/test/utils/karate/setPerimeterForTest.sh | 8 ++++++++ .../aop/annotations/EnableAopTraceProcessing.java | 8 ++++++++ .../aop/process/AbstractActionAspect.java | 9 +++++++++ .../operatorfabric/aop/process/AopTraceType.java | 9 +++++++++ .../aop/process/MongoActionTraceAspect.java | 8 ++++++++ .../process/UserAcknowledgmentActionTraceAspect.java | 8 ++++++++ .../aop/process/mongo/models/UserActionTraceData.java | 9 +++++++++ .../share/datetime-filter/datetime-filter.module.ts | 9 +++++++++ .../src/app/model/line-of-monitoring-result.model.ts | 9 +++++++++ .../components/card-details/card-details.component.ts | 9 +++++++++ .../logging-page/logging-page.component.html | 8 ++++++++ .../logging-page/logging-page.component.scss | 8 ++++++++ .../logging-page/logging-page.component.spec.ts | 9 +++++++++ .../logging-page/logging-page.component.ts | 9 +++++++++ .../monitoring-filters.component.html | 8 ++++++++ .../monitoring-table.component.spec.ts | 9 +++++++++ .../monitoring-table/monitoring-table.component.ts | 9 +++++++++ .../src/app/modules/usercard/usercard.component.scss | 9 +++++++++ ui/main/src/app/services/app.service.ts | 9 +++++++++ ui/main/src/app/services/crud-service.ts | 11 ++++++++++- ui/main/src/app/services/entities.service.spec.ts | 9 +++++++++ ui/main/src/app/services/entities.service.ts | 9 +++++++++ ui/main/src/app/services/filter.service.spec.ts | 1 - ui/main/src/app/services/groups.service.spec.ts | 9 +++++++++ ui/main/src/app/services/groups.service.ts | 9 +++++++++ ui/main/src/app/store/actions/monitoring.actions.ts | 9 +++++++++ ui/main/src/app/store/effects/monitoring.effects.ts | 9 +++++++++ ui/main/src/app/store/reducers/monitoring.reducer.ts | 9 +++++++++ ui/main/src/app/store/states/monitoring.state.ts | 9 +++++++++ ui/main/src/assets/js/templateGateway.js | 9 +++++++++ web-ui/src/main/docker/start-webui.sh | 8 ++++++++ 65 files changed, 518 insertions(+), 17 deletions(-) diff --git a/CICD/prepare_release_version.sh b/CICD/prepare_release_version.sh index d7b47c243b..4a8254a526 100755 --- a/CICD/prepare_release_version.sh +++ b/CICD/prepare_release_version.sh @@ -1,5 +1,13 @@ #!/usr/bin/env bash +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + display_usage() { echo "This script makes the necessary changes to version controlled files to prepare for a RELEASE version." echo -e "Usage:\n" diff --git a/CICD/travis/check_version.sh b/CICD/travis/check_version.sh index 43f0c75423..083edd9463 100755 --- a/CICD/travis/check_version.sh +++ b/CICD/travis/check_version.sh @@ -1,5 +1,14 @@ #!/usr/bin/env bash +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + + display_usage() { echo "This script checks that the version specified in the VERSION file is appropriate for the current branch" echo -e "Usage:\n" diff --git a/CICD/travis/upload_doc.sh b/CICD/travis/upload_doc.sh index 4784afe672..87fd5b5437 100755 --- a/CICD/travis/upload_doc.sh +++ b/CICD/travis/upload_doc.sh @@ -1,5 +1,14 @@ #!/usr/bin/env bash +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + + . ${BASH_SOURCE%/*}/../../bin/load_variables.sh CURRENT_PATH=$(pwd) diff --git a/bin/add_header.sh b/bin/add_header.sh index 1ba5086418..a0b4e2bee4 100755 --- a/bin/add_header.sh +++ b/bin/add_header.sh @@ -1,5 +1,13 @@ #!/usr/bin/env bash +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + SOURCE="${BASH_SOURCE[0]}" while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" diff --git a/bin/load_environment_light.sh b/bin/load_environment_light.sh index bfa3ac3bf1..31df391d79 100755 --- a/bin/load_environment_light.sh +++ b/bin/load_environment_light.sh @@ -1,5 +1,14 @@ #!/bin/bash +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + + . ${BASH_SOURCE%/*}/load_variables.sh sdk use gradle 6.5.1 diff --git a/bin/load_variables.sh b/bin/load_variables.sh index 14ac534e08..86607ec2d9 100755 --- a/bin/load_variables.sh +++ b/bin/load_variables.sh @@ -1,5 +1,13 @@ #!/usr/bin/env bash +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + SOURCE="${BASH_SOURCE[0]}" while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" diff --git a/bin/run_all.sh b/bin/run_all.sh index 142b19fd50..ca00231d49 100755 --- a/bin/run_all.sh +++ b/bin/run_all.sh @@ -1,5 +1,14 @@ #!/usr/bin/env bash +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + + . ${BASH_SOURCE%/*}/load_variables.sh SOURCE="${BASH_SOURCE[0]}" diff --git a/bin/setup_dockerized_environment.sh b/bin/setup_dockerized_environment.sh index e420c91f57..c7baeea5e9 100755 --- a/bin/setup_dockerized_environment.sh +++ b/bin/setup_dockerized_environment.sh @@ -1,5 +1,14 @@ #!/bin/bash +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + + SOURCE="${BASH_SOURCE[0]}" while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" diff --git a/client/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/LinkTypeEnum.java b/client/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/LinkTypeEnum.java index dae2caee60..fe441c2339 100644 --- a/client/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/LinkTypeEnum.java +++ b/client/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/LinkTypeEnum.java @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + package org.lfenergy.operatorfabric.businessconfig.model; public enum LinkTypeEnum { diff --git a/client/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ResponseBtnColorEnum.java b/client/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ResponseBtnColorEnum.java index 75d999b181..871b070e9a 100644 --- a/client/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ResponseBtnColorEnum.java +++ b/client/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ResponseBtnColorEnum.java @@ -1,11 +1,12 @@ -/* Copyright (c) 2020, RTE (http://www.rte-france.com) - * +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. */ - package org.lfenergy.operatorfabric.businessconfig.model; /** diff --git a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessUiVisibilityData.java b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessUiVisibilityData.java index c0e210ea18..0867257605 100644 --- a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessUiVisibilityData.java +++ b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ProcessUiVisibilityData.java @@ -1,11 +1,12 @@ -/* Copyright (c) 2020, RTE (http://www.rte-france.com) - * +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. */ - package org.lfenergy.operatorfabric.businessconfig.model; import lombok.AllArgsConstructor; diff --git a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ResponseData.java b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ResponseData.java index 6553592590..5cde07eda2 100644 --- a/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ResponseData.java +++ b/services/core/businessconfig/src/main/java/org/lfenergy/operatorfabric/businessconfig/model/ResponseData.java @@ -1,8 +1,10 @@ -/* Copyright (c) 2020, RTE (http://www.rte-france.com) - * +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. */ diff --git a/services/core/cards-publication/src/main/bin/push_card_loop.sh b/services/core/cards-publication/src/main/bin/push_card_loop.sh index fd5fd960bf..91a3d7e04f 100755 --- a/services/core/cards-publication/src/main/bin/push_card_loop.sh +++ b/services/core/cards-publication/src/main/bin/push_card_loop.sh @@ -1,7 +1,12 @@ #!/bin/bash + +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. publisher=TEST_PUBLISHER process=TEST diff --git a/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/configuration/Common.java b/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/configuration/Common.java index fb13851895..cd9ffb5ff1 100644 --- a/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/configuration/Common.java +++ b/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/configuration/Common.java @@ -1,8 +1,10 @@ -/* Copyright (c) 2020, RTE (http://www.rte-france.com) - * +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. */ package org.lfenergy.operatorfabric.cards.publication.configuration; diff --git a/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/security/configuration/WebSecurityConfiguration.java b/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/security/configuration/WebSecurityConfiguration.java index eef91352cf..aa73b92515 100644 --- a/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/security/configuration/WebSecurityConfiguration.java +++ b/services/core/cards-publication/src/main/java/org/lfenergy/operatorfabric/cards/publication/security/configuration/WebSecurityConfiguration.java @@ -1,8 +1,10 @@ -/* Copyright (c) 2020, RTE (http://www.rte-france.com) - * +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. */ diff --git a/services/core/cards-publication/src/test/java/org/lfenergy/operatorfabric/cards/publication/configuration/webflux/WebSecurityConfigurationTest.java b/services/core/cards-publication/src/test/java/org/lfenergy/operatorfabric/cards/publication/configuration/webflux/WebSecurityConfigurationTest.java index 56478b2d1d..73b4f34ec5 100644 --- a/services/core/cards-publication/src/test/java/org/lfenergy/operatorfabric/cards/publication/configuration/webflux/WebSecurityConfigurationTest.java +++ b/services/core/cards-publication/src/test/java/org/lfenergy/operatorfabric/cards/publication/configuration/webflux/WebSecurityConfigurationTest.java @@ -1,11 +1,12 @@ -/* Copyright (c) 2020, RTE (http://www.rte-france.com) - * +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. */ - package org.lfenergy.operatorfabric.cards.publication.configuration.webflux; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/docker/add-certificates.sh b/src/main/docker/add-certificates.sh index 476b41330a..63ddc43f79 100755 --- a/src/main/docker/add-certificates.sh +++ b/src/main/docker/add-certificates.sh @@ -1,5 +1,13 @@ #!/bin/bash +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + certificates_to_add=$1 export cacerts=$2 diff --git a/src/main/docker/java-config-docker-entrypoint.sh b/src/main/docker/java-config-docker-entrypoint.sh index 772e066bb4..8864447c07 100755 --- a/src/main/docker/java-config-docker-entrypoint.sh +++ b/src/main/docker/java-config-docker-entrypoint.sh @@ -1,7 +1,12 @@ #!/bin/bash + +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. # This part of the script allows custom certification authorities or certificates to be added to the JVM keystore cp $JAVA_HOME/jre/lib/security/cacerts /tmp diff --git a/src/test/api/karate/karate-config.js b/src/test/api/karate/karate-config.js index 468f1410dd..2bef54ab76 100644 --- a/src/test/api/karate/karate-config.js +++ b/src/test/api/karate/karate-config.js @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + function fn() { diff --git a/src/test/api/karate/launchAllBusinessconfig.sh b/src/test/api/karate/launchAllBusinessconfig.sh index c5e03426e0..86b32880d4 100755 --- a/src/test/api/karate/launchAllBusinessconfig.sh +++ b/src/test/api/karate/launchAllBusinessconfig.sh @@ -1,5 +1,13 @@ #/bin/sh +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + rm -rf target echo "Zip all bundles" diff --git a/src/test/api/karate/launchAllCards.sh b/src/test/api/karate/launchAllCards.sh index 9b64c99558..afe38723a6 100755 --- a/src/test/api/karate/launchAllCards.sh +++ b/src/test/api/karate/launchAllCards.sh @@ -1,5 +1,12 @@ #/bin/sh +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. rm -rf target diff --git a/src/test/api/karate/launchAllUsers.sh b/src/test/api/karate/launchAllUsers.sh index a371c27f8f..51e9c2e512 100755 --- a/src/test/api/karate/launchAllUsers.sh +++ b/src/test/api/karate/launchAllUsers.sh @@ -1,5 +1,13 @@ #/bin/sh +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + rm -rf target # Be careful : patchUserSettings must be before fetchUserSettings diff --git a/src/test/api/karate/launchAllUsers_JWTMode.sh b/src/test/api/karate/launchAllUsers_JWTMode.sh index 529777cb53..e725f4247f 100755 --- a/src/test/api/karate/launchAllUsers_JWTMode.sh +++ b/src/test/api/karate/launchAllUsers_JWTMode.sh @@ -1,5 +1,13 @@ #/bin/sh +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + rm -rf target # Be careful : patchUserSettings must be before fetchUserSettings diff --git a/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/ExternalAppApplication.java b/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/ExternalAppApplication.java index bf7273f29b..18250e4924 100644 --- a/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/ExternalAppApplication.java +++ b/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/ExternalAppApplication.java @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + package org.lfenergy.operatorfabric.externalApp; import org.springframework.boot.SpringApplication; diff --git a/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/controller/ExternalAppController.java b/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/controller/ExternalAppController.java index 8185d70189..b028a792d6 100644 --- a/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/controller/ExternalAppController.java +++ b/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/controller/ExternalAppController.java @@ -1,3 +1,13 @@ + +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + package org.lfenergy.operatorfabric.externalApp.controller; import com.fasterxml.jackson.databind.JsonNode; diff --git a/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/exception/ExternalAppException.java b/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/exception/ExternalAppException.java index f6f5ead0bc..e93c605c37 100644 --- a/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/exception/ExternalAppException.java +++ b/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/exception/ExternalAppException.java @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + package org.lfenergy.operatorfabric.externalApp.exception; import org.springframework.http.HttpStatus; diff --git a/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/service/ExternalAppService.java b/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/service/ExternalAppService.java index d4f4bca5b4..d5c610660c 100644 --- a/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/service/ExternalAppService.java +++ b/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/service/ExternalAppService.java @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + package org.lfenergy.operatorfabric.externalApp.service; import com.fasterxml.jackson.databind.JsonNode; diff --git a/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/service/ExternalAppServiceImpl.java b/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/service/ExternalAppServiceImpl.java index 2607478361..8235422d82 100644 --- a/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/service/ExternalAppServiceImpl.java +++ b/src/test/externalApp/src/main/java/org/lfenergy/operatorfabric/externalApp/service/ExternalAppServiceImpl.java @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + package org.lfenergy.operatorfabric.externalApp.service; import com.fasterxml.jackson.databind.JsonNode; diff --git a/src/test/externalApp/src/test/java/org/lfenergy/operatorfabric/externalApp/ExternalAppApplicationTests.java b/src/test/externalApp/src/test/java/org/lfenergy/operatorfabric/externalApp/ExternalAppApplicationTests.java index 0821cf6732..640903f96f 100644 --- a/src/test/externalApp/src/test/java/org/lfenergy/operatorfabric/externalApp/ExternalAppApplicationTests.java +++ b/src/test/externalApp/src/test/java/org/lfenergy/operatorfabric/externalApp/ExternalAppApplicationTests.java @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + package org.lfenergy.operatorfabric.externalApp; import org.junit.jupiter.api.Test; diff --git a/src/test/utils/karate/README.adoc b/src/test/utils/karate/README.adoc index e025ccbaf2..46de98e1d1 100644 --- a/src/test/utils/karate/README.adoc +++ b/src/test/utils/karate/README.adoc @@ -1,3 +1,10 @@ +// Copyright (c) 2018-2020 RTE (http://www.rte-france.com) +// See AUTHORS.txt +// This document is subject to the terms of the Creative Commons Attribution 4.0 International license. +// If a copy of the license was not distributed with this +// file, You can obtain one at https://creativecommons.org/licenses/by/4.0/. +// SPDX-License-Identifier: CC-BY-4.0 + # operatorfabric-api-testing Api testing with Karate DSL diff --git a/src/test/utils/karate/deleteTestCards.sh b/src/test/utils/karate/deleteTestCards.sh index 6af316e96c..5400114a21 100755 --- a/src/test/utils/karate/deleteTestCards.sh +++ b/src/test/utils/karate/deleteTestCards.sh @@ -1,4 +1,12 @@ #/bin/sh +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + java -jar karate.jar cards/delete6CardsSeverity.feature diff --git a/src/test/utils/karate/karate-config.js b/src/test/utils/karate/karate-config.js index 468f1410dd..2bef54ab76 100644 --- a/src/test/utils/karate/karate-config.js +++ b/src/test/utils/karate/karate-config.js @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + function fn() { diff --git a/src/test/utils/karate/loadBundle.sh b/src/test/utils/karate/loadBundle.sh index d97a8c4faf..b9a8755936 100755 --- a/src/test/utils/karate/loadBundle.sh +++ b/src/test/utils/karate/loadBundle.sh @@ -1,5 +1,13 @@ #/bin/sh +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + echo "Zip bundle" ( cd businessconfig/resources diff --git a/src/test/utils/karate/postTestCards.sh b/src/test/utils/karate/postTestCards.sh index 03c93f675b..67ea1c954f 100755 --- a/src/test/utils/karate/postTestCards.sh +++ b/src/test/utils/karate/postTestCards.sh @@ -1,4 +1,12 @@ #/bin/sh +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + java -jar karate.jar cards/post6CardsSeverity.feature diff --git a/src/test/utils/karate/setPerimeterForTest.sh b/src/test/utils/karate/setPerimeterForTest.sh index 731c68946a..2cc90830f2 100755 --- a/src/test/utils/karate/setPerimeterForTest.sh +++ b/src/test/utils/karate/setPerimeterForTest.sh @@ -1,5 +1,13 @@ #/bin/sh +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + java -jar karate.jar \ cards/setPerimeterFor6Cards.feature \ cards/setPerimeterForUserCardExamples.feature \ diff --git a/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/annotations/EnableAopTraceProcessing.java b/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/annotations/EnableAopTraceProcessing.java index 4d136838be..46aecc048d 100644 --- a/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/annotations/EnableAopTraceProcessing.java +++ b/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/annotations/EnableAopTraceProcessing.java @@ -1,3 +1,11 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ package org.lfenergy.operatorfabric.aop.annotations; import org.lfenergy.operatorfabric.aop.process.UserAcknowledgmentActionTraceAspect; diff --git a/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/AbstractActionAspect.java b/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/AbstractActionAspect.java index e1848dcc88..a892345962 100644 --- a/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/AbstractActionAspect.java +++ b/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/AbstractActionAspect.java @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + package org.lfenergy.operatorfabric.aop.process; public abstract class AbstractActionAspect { diff --git a/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/AopTraceType.java b/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/AopTraceType.java index 8159e61f15..a0af9dc38b 100644 --- a/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/AopTraceType.java +++ b/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/AopTraceType.java @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + package org.lfenergy.operatorfabric.aop.process; public enum AopTraceType { diff --git a/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/MongoActionTraceAspect.java b/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/MongoActionTraceAspect.java index f240b5ea4e..126a355a2a 100644 --- a/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/MongoActionTraceAspect.java +++ b/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/MongoActionTraceAspect.java @@ -1,3 +1,11 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ package org.lfenergy.operatorfabric.aop.process; import org.lfenergy.operatorfabric.aop.process.mongo.models.UserActionTraceData; diff --git a/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/UserAcknowledgmentActionTraceAspect.java b/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/UserAcknowledgmentActionTraceAspect.java index 16feb3eac1..c5ac7e698c 100644 --- a/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/UserAcknowledgmentActionTraceAspect.java +++ b/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/UserAcknowledgmentActionTraceAspect.java @@ -1,3 +1,11 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ package org.lfenergy.operatorfabric.aop.process; import lombok.extern.slf4j.Slf4j; diff --git a/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/mongo/models/UserActionTraceData.java b/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/mongo/models/UserActionTraceData.java index cf4a899969..84719927b2 100644 --- a/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/mongo/models/UserActionTraceData.java +++ b/tools/spring/aop-process/src/main/java/org/lfenergy/operatorfabric/aop/process/mongo/models/UserActionTraceData.java @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + package org.lfenergy.operatorfabric.aop.process.mongo.models; import lombok.AllArgsConstructor; diff --git a/ui/main/src/app/components/share/datetime-filter/datetime-filter.module.ts b/ui/main/src/app/components/share/datetime-filter/datetime-filter.module.ts index 8bb1549b50..e913258b38 100644 --- a/ui/main/src/app/components/share/datetime-filter/datetime-filter.module.ts +++ b/ui/main/src/app/components/share/datetime-filter/datetime-filter.module.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {DatetimeFilterComponent} from './datetime-filter.component'; diff --git a/ui/main/src/app/model/line-of-monitoring-result.model.ts b/ui/main/src/app/model/line-of-monitoring-result.model.ts index 7b88dfce19..e0dd6840f0 100644 --- a/ui/main/src/app/model/line-of-monitoring-result.model.ts +++ b/ui/main/src/app/model/line-of-monitoring-result.model.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import {Moment} from 'moment-timezone'; import {I18n} from '@ofModel/i18n.model'; diff --git a/ui/main/src/app/modules/cards/components/card-details/card-details.component.ts b/ui/main/src/app/modules/cards/components/card-details/card-details.component.ts index b3e6b64620..f1e154a3b1 100644 --- a/ui/main/src/app/modules/cards/components/card-details/card-details.component.ts +++ b/ui/main/src/app/modules/cards/components/card-details/card-details.component.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import { Component, OnInit, OnDestroy } from '@angular/core'; import { Card, Detail } from '@ofModel/card.model'; import { Store } from '@ngrx/store'; diff --git a/ui/main/src/app/modules/logging/components/logging-table/logging-page/logging-page.component.html b/ui/main/src/app/modules/logging/components/logging-table/logging-page/logging-page.component.html index 12e018bfac..e15df87c39 100644 --- a/ui/main/src/app/modules/logging/components/logging-table/logging-page/logging-page.component.html +++ b/ui/main/src/app/modules/logging/components/logging-table/logging-page/logging-page.component.html @@ -1,3 +1,11 @@ + + + + + + + + + + + + + + +
diff --git a/ui/main/src/app/modules/monitoring/components/monitoring-table/monitoring-table.component.spec.ts b/ui/main/src/app/modules/monitoring/components/monitoring-table/monitoring-table.component.spec.ts index 73e501ec46..6fdb817b39 100644 --- a/ui/main/src/app/modules/monitoring/components/monitoring-table/monitoring-table.component.spec.ts +++ b/ui/main/src/app/modules/monitoring/components/monitoring-table/monitoring-table.component.spec.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import {async, ComponentFixture, TestBed} from '@angular/core/testing'; import {MonitoringTableComponent} from './monitoring-table.component'; diff --git a/ui/main/src/app/modules/monitoring/components/monitoring-table/monitoring-table.component.ts b/ui/main/src/app/modules/monitoring/components/monitoring-table/monitoring-table.component.ts index 461752759f..ba20b73fb5 100644 --- a/ui/main/src/app/modules/monitoring/components/monitoring-table/monitoring-table.component.ts +++ b/ui/main/src/app/modules/monitoring/components/monitoring-table/monitoring-table.component.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import {Component, Input} from '@angular/core'; import {LineOfMonitoringResult} from '@ofModel/line-of-monitoring-result.model'; import {TimeService} from '@ofServices/time.service'; diff --git a/ui/main/src/app/modules/usercard/usercard.component.scss b/ui/main/src/app/modules/usercard/usercard.component.scss index 350a7411c3..84bc5c4505 100644 --- a/ui/main/src/app/modules/usercard/usercard.component.scss +++ b/ui/main/src/app/modules/usercard/usercard.component.scss @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + .modal-body{ background-color: var(--opfab-lightcard-detail-bgcolor); color: var(--opfab-lightcard-detail-textcolor); diff --git a/ui/main/src/app/services/app.service.ts b/ui/main/src/app/services/app.service.ts index 4f406243af..1f91ca6b87 100644 --- a/ui/main/src/app/services/app.service.ts +++ b/ui/main/src/app/services/app.service.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import { Injectable } from '@angular/core'; import { Router } from '@angular/router'; import { Store } from '@ngrx/store'; diff --git a/ui/main/src/app/services/crud-service.ts b/ui/main/src/app/services/crud-service.ts index 0b389d6cb2..c772beef27 100644 --- a/ui/main/src/app/services/crud-service.ts +++ b/ui/main/src/app/services/crud-service.ts @@ -1,4 +1,13 @@ -import { Observable } from 'rxjs'; +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + + import { Observable } from 'rxjs'; export interface CrudService { getAll():Observable>; diff --git a/ui/main/src/app/services/entities.service.spec.ts b/ui/main/src/app/services/entities.service.spec.ts index 202ffae532..299b41503e 100644 --- a/ui/main/src/app/services/entities.service.spec.ts +++ b/ui/main/src/app/services/entities.service.spec.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import { TestBed } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { environment } from '../../environments/environment'; diff --git a/ui/main/src/app/services/entities.service.ts b/ui/main/src/app/services/entities.service.ts index b41bd5d63b..7050ff155d 100644 --- a/ui/main/src/app/services/entities.service.ts +++ b/ui/main/src/app/services/entities.service.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import { Injectable } from '@angular/core'; import { environment } from '@env/environment'; import { HttpClient } from '@angular/common/http'; diff --git a/ui/main/src/app/services/filter.service.spec.ts b/ui/main/src/app/services/filter.service.spec.ts index 685f38ef58..622d8d9607 100644 --- a/ui/main/src/app/services/filter.service.spec.ts +++ b/ui/main/src/app/services/filter.service.spec.ts @@ -8,7 +8,6 @@ */ - import {TestBed} from '@angular/core/testing'; import {FilterService, FilterType} from './filter.service'; diff --git a/ui/main/src/app/services/groups.service.spec.ts b/ui/main/src/app/services/groups.service.spec.ts index 10b6b5531c..c02140d17a 100644 --- a/ui/main/src/app/services/groups.service.spec.ts +++ b/ui/main/src/app/services/groups.service.spec.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import { TestBed } from '@angular/core/testing'; import { GroupsService } from './groups.service'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; diff --git a/ui/main/src/app/services/groups.service.ts b/ui/main/src/app/services/groups.service.ts index 15e8916dca..266ad9610a 100644 --- a/ui/main/src/app/services/groups.service.ts +++ b/ui/main/src/app/services/groups.service.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import { Injectable } from '@angular/core'; import { CrudService } from './crud-service'; import { Observable } from 'rxjs'; diff --git a/ui/main/src/app/store/actions/monitoring.actions.ts b/ui/main/src/app/store/actions/monitoring.actions.ts index 0f8de9bf4b..8e09d3a467 100644 --- a/ui/main/src/app/store/actions/monitoring.actions.ts +++ b/ui/main/src/app/store/actions/monitoring.actions.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import {Action} from '@ngrx/store'; import {Page} from '@ofModel/page.model'; import {LineOfMonitoringResult} from '@ofModel/line-of-monitoring-result.model'; diff --git a/ui/main/src/app/store/effects/monitoring.effects.ts b/ui/main/src/app/store/effects/monitoring.effects.ts index 5958a0ca67..204d95a4c8 100644 --- a/ui/main/src/app/store/effects/monitoring.effects.ts +++ b/ui/main/src/app/store/effects/monitoring.effects.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import {Injectable} from '@angular/core'; import {AppState} from '@ofStore/index'; import {CardService} from '@ofServices/card.service'; diff --git a/ui/main/src/app/store/reducers/monitoring.reducer.ts b/ui/main/src/app/store/reducers/monitoring.reducer.ts index 1782d3c171..64cae62ac8 100644 --- a/ui/main/src/app/store/reducers/monitoring.reducer.ts +++ b/ui/main/src/app/store/reducers/monitoring.reducer.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import {monitoringInitialSate, MonitoringState} from '@ofStates/monitoring.state'; import {MonitoringAction, MonitoringActionType} from '@ofActions/monitoring.actions'; diff --git a/ui/main/src/app/store/states/monitoring.state.ts b/ui/main/src/app/store/states/monitoring.state.ts index 23e09ecbc7..c3d43bbf36 100644 --- a/ui/main/src/app/store/states/monitoring.state.ts +++ b/ui/main/src/app/store/states/monitoring.state.ts @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + import {LineOfMonitoringResult} from '@ofModel/line-of-monitoring-result.model'; import {emptyPage, Page} from '@ofModel/page.model'; diff --git a/ui/main/src/assets/js/templateGateway.js b/ui/main/src/assets/js/templateGateway.js index a9bcffd265..dd48fbcbc9 100644 --- a/ui/main/src/assets/js/templateGateway.js +++ b/ui/main/src/assets/js/templateGateway.js @@ -1,3 +1,12 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + function ext_action(responseData){ console.log(new Date().toISOString(),`opfab action called - ${responseData.lock} - ${responseData.state}`) } diff --git a/web-ui/src/main/docker/start-webui.sh b/web-ui/src/main/docker/start-webui.sh index 59ca01ab1e..69068872f9 100644 --- a/web-ui/src/main/docker/start-webui.sh +++ b/web-ui/src/main/docker/start-webui.sh @@ -1,5 +1,13 @@ #!/bin/bash +# Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of the OperatorFabric project. + : ' If the resolver is not indicated in the nginx conf, there could be side-effects (url not reachable). To solve this we must indicate the IP address available in the /etc/resolv.conf file. Given that this address can change between containers, it must be indicated From 805ad05c75d48b903dd31d153893d26ad470414c Mon Sep 17 00:00:00 2001 From: freddidierRTE Date: Thu, 1 Oct 2020 16:05:40 +0200 Subject: [PATCH 17/76] Move license headers for karate conf files --- src/test/api/karate/karate-config.js | 9 +++------ src/test/utils/karate/karate-config.js | 8 ++++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/test/api/karate/karate-config.js b/src/test/api/karate/karate-config.js index 2bef54ab76..4fef0eb0ed 100644 --- a/src/test/api/karate/karate-config.js +++ b/src/test/api/karate/karate-config.js @@ -1,15 +1,12 @@ -/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) +function fn() { + /* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) * See AUTHORS.txt * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * SPDX-License-Identifier: MPL-2.0 * This file is part of the OperatorFabric project. - */ - -function fn() { - - + */ var config = { // base config JSON opfabUrl: 'http://localhost:2002/', opfabPublishCardUrl: 'http://localhost:2102/' diff --git a/src/test/utils/karate/karate-config.js b/src/test/utils/karate/karate-config.js index 2bef54ab76..097b3871d5 100644 --- a/src/test/utils/karate/karate-config.js +++ b/src/test/utils/karate/karate-config.js @@ -1,4 +1,7 @@ -/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + +function fn() { + + /* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) * See AUTHORS.txt * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -6,9 +9,6 @@ * SPDX-License-Identifier: MPL-2.0 * This file is part of the OperatorFabric project. */ - -function fn() { - var config = { // base config JSON opfabUrl: 'http://localhost:2002/', From f5eaad632639e3847c4829c5d05a0a8a21b26de2 Mon Sep 17 00:00:00 2001 From: LONGA Valerie Date: Thu, 1 Oct 2020 17:20:27 +0200 Subject: [PATCH 18/76] correction in API documentation for GET /cards/{id} --- services/core/cards-publication/src/main/modeling/swagger.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/cards-publication/src/main/modeling/swagger.yaml b/services/core/cards-publication/src/main/modeling/swagger.yaml index 9ab7545d02..6a9d6ae873 100755 --- a/services/core/cards-publication/src/main/modeling/swagger.yaml +++ b/services/core/cards-publication/src/main/modeling/swagger.yaml @@ -902,7 +902,7 @@ paths: name: id type: string required: true - description: "The id parameter is constructed as follows : {publisher}_{processInstanceId}" + description: "The id parameter is constructed as follows : {process}.{processInstanceId}" delete: operationId: deleteProcessCard tags: From 2484c71554c899a3c9e70f2935011c382fe9390e Mon Sep 17 00:00:00 2001 From: bendaoud Date: Thu, 27 Aug 2020 10:55:14 +0200 Subject: [PATCH 19/76] [OC-1025] : complete users admin module --- config/dev/web-ui.json | 3 + config/docker/web-ui.json | 3 + .../CurrentUserWithPerimetersController.java | 4 +- .../users/controllers/GroupsController.java | 4 +- .../controllers/PerimetersController.java | 4 +- .../users/controllers/UsersController.java | 15 +- .../operatorfabric/users/model/UserData.java | 11 +- .../users/services/UserService.java | 113 +--------- .../users/services/UserServiceImp.java | 116 ++++++++++ .../core/users/src/main/modeling/swagger.yaml | 12 +- .../application/UnitTestApplication.java | 4 +- .../users/services/UserServiceShould.java | 2 +- ui/main/angular.json | 5 +- ui/main/browserslist | 9 - ui/main/package.json | 5 +- ui/main/src/app/app-routing.module.ts | 9 +- ui/main/src/app/app.component.ts | 3 +- ui/main/src/app/app.module.ts | 139 ++++++------ .../src/app/common/error/app-error-handler.ts | 17 ++ ui/main/src/app/common/error/app-error.ts | 3 + .../src/app/common/error/not-allowed-error.ts | 5 + .../src/app/common/error/not-found-error.ts | 5 + .../components/navbar/navbar.component.html | 9 + .../app/components/navbar/navbar.component.ts | 190 ++++++++-------- ui/main/src/app/model/user.model.ts | 15 +- .../app/modules/admin/admin-rooting.module.ts | 44 ++++ .../app/modules/admin/admin.component.html | 35 +++ .../src/app/modules/admin/admin.component.ts | 44 ++++ ui/main/src/app/modules/admin/admin.module.ts | 56 +++++ .../confirmation-dialog.component.html | 13 ++ .../confirmation-dialog.component.ts | 32 +++ .../users/editusermodal.component.html | 68 ++++++ .../users/editusermodal.component.scss | 40 ++++ .../users/editusermodal.component.ts | 120 ++++++++++ .../of-entities-table.component.html | 1 + .../of-entities-table.component.ts | 14 ++ .../of-groups-table.component.html | 1 + .../of-groups-table.component.ts | 14 ++ .../ngtable/oftable/oftable.component.html | 0 .../ngtable/oftable/oftable.component.ts | 212 ++++++++++++++++++ .../ngtable/users/ofuserstable.component.html | 48 ++++ .../ngtable/users/ofuserstable.component.ts | 148 ++++++++++++ .../services/confirmation-dialog.service.ts | 25 +++ .../modules/admin/services/data.service.ts | 21 ++ .../admin/services/login-validator.service.ts | 25 +++ .../authentication/authentication.service.ts | 3 + ui/main/src/app/services/crud-service.ts | 6 +- ui/main/src/app/services/entities.service.ts | 20 +- ui/main/src/app/services/error-service.ts | 18 ++ ui/main/src/app/services/groups.service.ts | 23 +- ui/main/src/app/services/services.module.ts | 10 +- ui/main/src/app/services/user.service.ts | 53 ++++- ui/main/src/assets/i18n/en.json | 98 ++++++-- ui/main/src/assets/i18n/fr.json | 53 ++++- ui/main/src/assets/styles/styles.scss | 12 + ui/main/src/environments/environment.ts | 4 +- ui/main/src/index.html | 2 + ui/main/tsconfig.json | 11 + 58 files changed, 1615 insertions(+), 364 deletions(-) create mode 100644 services/core/users/src/main/java/org/lfenergy/operatorfabric/users/services/UserServiceImp.java delete mode 100755 ui/main/browserslist create mode 100644 ui/main/src/app/common/error/app-error-handler.ts create mode 100644 ui/main/src/app/common/error/app-error.ts create mode 100644 ui/main/src/app/common/error/not-allowed-error.ts create mode 100644 ui/main/src/app/common/error/not-found-error.ts create mode 100644 ui/main/src/app/modules/admin/admin-rooting.module.ts create mode 100644 ui/main/src/app/modules/admin/admin.component.html create mode 100644 ui/main/src/app/modules/admin/admin.component.ts create mode 100644 ui/main/src/app/modules/admin/admin.module.ts create mode 100644 ui/main/src/app/modules/admin/components/confirmation-dialog/confirmation-dialog.component.html create mode 100644 ui/main/src/app/modules/admin/components/confirmation-dialog/confirmation-dialog.component.ts create mode 100644 ui/main/src/app/modules/admin/components/editmodal/users/editusermodal.component.html create mode 100644 ui/main/src/app/modules/admin/components/editmodal/users/editusermodal.component.scss create mode 100644 ui/main/src/app/modules/admin/components/editmodal/users/editusermodal.component.ts create mode 100644 ui/main/src/app/modules/admin/components/ngtable/entities/of-entities-table/of-entities-table.component.html create mode 100644 ui/main/src/app/modules/admin/components/ngtable/entities/of-entities-table/of-entities-table.component.ts create mode 100644 ui/main/src/app/modules/admin/components/ngtable/groups/of-groups-table/of-groups-table.component.html create mode 100644 ui/main/src/app/modules/admin/components/ngtable/groups/of-groups-table/of-groups-table.component.ts create mode 100644 ui/main/src/app/modules/admin/components/ngtable/oftable/oftable.component.html create mode 100644 ui/main/src/app/modules/admin/components/ngtable/oftable/oftable.component.ts create mode 100644 ui/main/src/app/modules/admin/components/ngtable/users/ofuserstable.component.html create mode 100644 ui/main/src/app/modules/admin/components/ngtable/users/ofuserstable.component.ts create mode 100644 ui/main/src/app/modules/admin/services/confirmation-dialog.service.ts create mode 100644 ui/main/src/app/modules/admin/services/data.service.ts create mode 100644 ui/main/src/app/modules/admin/services/login-validator.service.ts create mode 100644 ui/main/src/app/services/error-service.ts diff --git a/config/dev/web-ui.json b/config/dev/web-ui.json index 4bbe7d6b21..fd29f5c417 100644 --- a/config/dev/web-ui.json +++ b/config/dev/web-ui.json @@ -132,5 +132,8 @@ "navbar": { "hidden": [], "businessmenus" : {"type":"BOTH"} + }, + "admin": { + "hidden": false } } diff --git a/config/docker/web-ui.json b/config/docker/web-ui.json index 5f9edacdfd..6f8a15aaf2 100644 --- a/config/docker/web-ui.json +++ b/config/docker/web-ui.json @@ -131,5 +131,8 @@ "navbar": { "hidden": ["logging","monitoring","usercard"], "businessmenus" : {"type":"BOTH"} + }, + "admin": { + "hidden": true } } diff --git a/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/CurrentUserWithPerimetersController.java b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/CurrentUserWithPerimetersController.java index 82add1cc13..6581891cc8 100644 --- a/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/CurrentUserWithPerimetersController.java +++ b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/CurrentUserWithPerimetersController.java @@ -14,7 +14,7 @@ import lombok.extern.slf4j.Slf4j; import org.lfenergy.operatorfabric.users.configuration.oauth2.UserExtractor; import org.lfenergy.operatorfabric.users.model.*; -import org.lfenergy.operatorfabric.users.services.UserService; +import org.lfenergy.operatorfabric.users.services.UserServiceImp; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -33,7 +33,7 @@ public class CurrentUserWithPerimetersController implements CurrentUserWithPerimetersApi, UserExtractor { @Autowired - private UserService userService; + private UserServiceImp userService; @Override public CurrentUserWithPerimeters fetchCurrentUserWithPerimeters(HttpServletRequest request, HttpServletResponse response) throws Exception{ diff --git a/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/GroupsController.java b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/GroupsController.java index 4f73536851..6bebf95a91 100644 --- a/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/GroupsController.java +++ b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/GroupsController.java @@ -18,7 +18,7 @@ import org.lfenergy.operatorfabric.users.repositories.GroupRepository; import org.lfenergy.operatorfabric.users.repositories.PerimeterRepository; import org.lfenergy.operatorfabric.users.repositories.UserRepository; -import org.lfenergy.operatorfabric.users.services.UserService; +import org.lfenergy.operatorfabric.users.services.UserServiceImp; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.bus.ServiceMatcher; import org.springframework.context.ApplicationEventPublisher; @@ -54,7 +54,7 @@ public class GroupsController implements GroupsApi { @Autowired private PerimeterRepository perimeterRepository; @Autowired - private UserService userService; + private UserServiceImp userService; /* These are Spring Cloud Bus beans used to fire an event (UpdatedUserEvent) every time a user is modified. * Other services handle this event by clearing their user cache for the given user. See issue #64*/ diff --git a/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/PerimetersController.java b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/PerimetersController.java index 686973a880..27c0e57c69 100644 --- a/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/PerimetersController.java +++ b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/PerimetersController.java @@ -16,7 +16,7 @@ import org.lfenergy.operatorfabric.users.model.*; import org.lfenergy.operatorfabric.users.repositories.PerimeterRepository; import org.lfenergy.operatorfabric.users.repositories.GroupRepository; -import org.lfenergy.operatorfabric.users.services.UserService; +import org.lfenergy.operatorfabric.users.services.UserServiceImp; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DuplicateKeyException; import org.springframework.http.HttpStatus; @@ -47,7 +47,7 @@ public class PerimetersController implements PerimetersApi { @Autowired private GroupRepository groupRepository; @Autowired - private UserService userService; + private UserServiceImp userService; @Override public Void addPerimeterGroups(HttpServletRequest request, HttpServletResponse response, String id, List groups) throws Exception { diff --git a/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/UsersController.java b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/UsersController.java index c90a185dfd..a18180b9cc 100644 --- a/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/UsersController.java +++ b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/controllers/UsersController.java @@ -11,6 +11,7 @@ package org.lfenergy.operatorfabric.users.controllers; +import lombok.extern.slf4j.Slf4j; import org.lfenergy.operatorfabric.springtools.configuration.oauth.UpdatedUserEvent; import org.lfenergy.operatorfabric.springtools.error.model.ApiError; import org.lfenergy.operatorfabric.springtools.error.model.ApiErrorException; @@ -25,8 +26,6 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import lombok.extern.slf4j.Slf4j; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.*; @@ -66,7 +65,7 @@ public class UsersController implements UsersApi { private ApplicationEventPublisher publisher; @Override - public SimpleUser createUser(HttpServletRequest request, HttpServletResponse response, SimpleUser user) throws Exception { + public User createUser(HttpServletRequest request, HttpServletResponse response, User user) throws Exception { boolean created = false; String login = user.getLogin(); @@ -78,7 +77,8 @@ public SimpleUser createUser(HttpServletRequest request, HttpServletResponse res .build()); } - if(userRepository.findById(user.getLogin()).orElse(null)==null){ + if(userRepository.findById(user.getLogin()).orElse(null) + ==null){ response.addHeader("Location", request.getContextPath() + "/users/" + user.getLogin()); response.setStatus(201); created = true; @@ -86,8 +86,9 @@ public SimpleUser createUser(HttpServletRequest request, HttpServletResponse res } else { log.debug(String.format(USER_UPDATED, login)); } - - userRepository.save(new UserData(user)); + + userService.createUser(user); + if(!created) publisher.publishEvent(new UpdatedUserEvent(this,busServiceMatcher.getServiceId(),login)); @@ -140,7 +141,7 @@ public UserSettings updateUserSettings(HttpServletRequest request, HttpServletRe } @Override - public SimpleUser updateUser(HttpServletRequest request, HttpServletResponse response, String login, SimpleUser user) throws Exception { + public User updateUser(HttpServletRequest request, HttpServletResponse response, String login, User user) throws Exception { //login from user body parameter should match login path parameter if((user.getLogin() != null) && (!user.getLogin().equals(login))){ throw new ApiErrorException( diff --git a/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/model/UserData.java b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/model/UserData.java index dfe96634e6..d6ed6abe11 100644 --- a/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/model/UserData.java +++ b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/model/UserData.java @@ -46,11 +46,14 @@ public class UserData implements User { @Singular("group") private Set groupSet; - public UserData(SimpleUser simpleUser){ + public UserData(User user){ this(); - this.login = simpleUser.getLogin(); - this.firstName = simpleUser.getFirstName(); - this.lastName = simpleUser.getLastName(); + this.login = user.getLogin(); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.entities = new HashSet<>(user.getEntities()); + this.groupSet = new HashSet<>(user.getGroups()); + } public void addGroup(String group){ diff --git a/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/services/UserService.java b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/services/UserService.java index 8b859e5dcc..ed0a363c9f 100644 --- a/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/services/UserService.java +++ b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/services/UserService.java @@ -1,110 +1,13 @@ -/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) - * See AUTHORS.txt - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * SPDX-License-Identifier: MPL-2.0 - * This file is part of the OperatorFabric project. - */ - - package org.lfenergy.operatorfabric.users.services; -import lombok.extern.slf4j.Slf4j; -import org.lfenergy.operatorfabric.springtools.error.model.ApiError; -import org.lfenergy.operatorfabric.springtools.error.model.ApiErrorException; -import org.lfenergy.operatorfabric.users.model.*; -import org.lfenergy.operatorfabric.users.repositories.GroupRepository; -import org.lfenergy.operatorfabric.users.repositories.PerimeterRepository; -import org.lfenergy.operatorfabric.users.repositories.UserRepository; -import org.lfenergy.operatorfabric.springtools.configuration.oauth.UpdatedUserEvent; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.cloud.bus.ServiceMatcher; -import org.springframework.context.ApplicationEventPublisher; -import org.springframework.http.HttpStatus; -import org.springframework.stereotype.Service; - -import java.util.*; - -@Service -@Slf4j -public class UserService { - - public static final String GROUP_ID_IMPOSSIBLE_TO_FETCH_MSG = "Group id impossible to fetch : %s"; - public static final String PERIMETER_ID_IMPOSSIBLE_TO_FETCH_MSG = "Perimeter id impossible to fetch : %s"; - - @Autowired - private UserRepository userRepository; - @Autowired - private GroupRepository groupRepository; - @Autowired - private PerimeterRepository perimeterRepository; - - /* These are Spring Cloud Bus beans used to fire an event (UpdatedUserEvent) every time a user is modified. - * Other services handle this event by clearing their user cache for the given user. See issue #64*/ - @Autowired - private ServiceMatcher busServiceMatcher; - @Autowired - private ApplicationEventPublisher publisher; +import org.lfenergy.operatorfabric.users.model.GroupData; +import org.lfenergy.operatorfabric.users.model.PerimeterData; +import org.lfenergy.operatorfabric.users.model.User; - /** Retrieve groups from repository for groups list, throwing an error if a group id is not found - * */ - public List retrieveGroups(List groupIds) { - List foundGroups = new ArrayList<>(); - for(String id : groupIds){ - GroupData foundGroup = groupRepository.findById(id).orElseThrow( - () -> new ApiErrorException( - ApiError.builder() - .status(HttpStatus.INTERNAL_SERVER_ERROR) - .message(String.format(GROUP_ID_IMPOSSIBLE_TO_FETCH_MSG, id)) - .build() - )); - foundGroups.add(foundGroup); - } - return foundGroups; - } +import java.util.List; - /** Retrieve perimeters from repository for perimeter list, throwing an error if a perimeter is not found - * */ - public List retrievePerimeters(List perimeterIds) { - List foundPerimeters = new ArrayList<>(); - for(String perimeterId : perimeterIds){ - PerimeterData foundPerimeter = perimeterRepository.findById(perimeterId).orElseThrow( - () -> new ApiErrorException( - ApiError.builder() - .status(HttpStatus.INTERNAL_SERVER_ERROR) - .message(String.format(PERIMETER_ID_IMPOSSIBLE_TO_FETCH_MSG, perimeterId)) - .build() - )); - foundPerimeters.add(foundPerimeter); - } - return foundPerimeters; - } - - public boolean isEachStateUniqueInPerimeter(Perimeter perimeter){ - - if ((perimeter != null) && (perimeter.getStateRights().size() > 1)) { - - Set mySet = new HashSet<>(); - for (StateRight stateRight : perimeter.getStateRights()) { - - String state = stateRight.getState(); - if (! mySet.contains(state)) - mySet.add(state); - else - return false; - } - } - return true; - } - - //Retrieve users from repository for the group and publish an UpdatedUserEvent - public void publishUpdatedUserEvent(String groupId){ - List foundUsers = userRepository.findByGroupSetContaining(groupId); - if (foundUsers != null) { - for (UserData userData : foundUsers) - publisher.publishEvent(new UpdatedUserEvent(this, busServiceMatcher.getServiceId(), userData.getLogin())); - } - } +public interface UserService { + User createUser(User user) ; + List retrieveGroups(List groupIds); + List retrievePerimeters(List perimeterIds); } - diff --git a/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/services/UserServiceImp.java b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/services/UserServiceImp.java new file mode 100644 index 0000000000..ba2a6bf6e4 --- /dev/null +++ b/services/core/users/src/main/java/org/lfenergy/operatorfabric/users/services/UserServiceImp.java @@ -0,0 +1,116 @@ +/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com) + * See AUTHORS.txt + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + * This file is part of the OperatorFabric project. + */ + + +package org.lfenergy.operatorfabric.users.services; + +import lombok.extern.slf4j.Slf4j; +import org.lfenergy.operatorfabric.springtools.error.model.ApiError; +import org.lfenergy.operatorfabric.springtools.error.model.ApiErrorException; +import org.lfenergy.operatorfabric.users.model.*; +import org.lfenergy.operatorfabric.users.repositories.GroupRepository; +import org.lfenergy.operatorfabric.users.repositories.PerimeterRepository; +import org.lfenergy.operatorfabric.users.repositories.UserRepository; +import org.lfenergy.operatorfabric.springtools.configuration.oauth.UpdatedUserEvent; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cloud.bus.ServiceMatcher; +import org.springframework.context.ApplicationEventPublisher; +import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Service; + +import java.util.*; + +@Service +@Slf4j +public class UserServiceImp implements UserService { + + public static final String GROUP_ID_IMPOSSIBLE_TO_FETCH_MSG = "Group id impossible to fetch : %s"; + public static final String PERIMETER_ID_IMPOSSIBLE_TO_FETCH_MSG = "Perimeter id impossible to fetch : %s"; + + @Autowired + private UserRepository userRepository; + @Autowired + private GroupRepository groupRepository; + @Autowired + private PerimeterRepository perimeterRepository; + + /* These are Spring Cloud Bus beans used to fire an event (UpdatedUserEvent) every time a user is modified. + * Other services handle this event by clearing their user cache for the given user. See issue #64*/ + @Autowired + private ServiceMatcher busServiceMatcher; + @Autowired + private ApplicationEventPublisher publisher; + + /** Retrieve groups from repository for groups list, throwing an error if a group id is not found + * */ + public List retrieveGroups(List groupIds) { + List foundGroups = new ArrayList<>(); + for(String id : groupIds){ + GroupData foundGroup = groupRepository.findById(id).orElseThrow( + () -> new ApiErrorException( + ApiError.builder() + .status(HttpStatus.INTERNAL_SERVER_ERROR) + .message(String.format(GROUP_ID_IMPOSSIBLE_TO_FETCH_MSG, id)) + .build() + )); + foundGroups.add(foundGroup); + } + return foundGroups; + } + + /** Retrieve perimeters from repository for perimeter list, throwing an error if a perimeter is not found + * */ + public List retrievePerimeters(List perimeterIds) { + List foundPerimeters = new ArrayList<>(); + for(String perimeterId : perimeterIds){ + PerimeterData foundPerimeter = perimeterRepository.findById(perimeterId).orElseThrow( + () -> new ApiErrorException( + ApiError.builder() + .status(HttpStatus.INTERNAL_SERVER_ERROR) + .message(String.format(PERIMETER_ID_IMPOSSIBLE_TO_FETCH_MSG, perimeterId)) + .build() + )); + foundPerimeters.add(foundPerimeter); + } + return foundPerimeters; + } + + public boolean isEachStateUniqueInPerimeter(Perimeter perimeter){ + + if ((perimeter != null) && (perimeter.getStateRights().size() > 1)) { + + Set mySet = new HashSet<>(); + for (StateRight stateRight : perimeter.getStateRights()) { + + String state = stateRight.getState(); + if (! mySet.contains(state)) + mySet.add(state); + else + return false; + } + } + return true; + } + + //Retrieve users from repository for the group and publish an UpdatedUserEvent + public void publishUpdatedUserEvent(String groupId){ + List foundUsers = userRepository.findByGroupSetContaining(groupId); + if (foundUsers != null) { + for (UserData userData : foundUsers) + publisher.publishEvent(new UpdatedUserEvent(this, busServiceMatcher.getServiceId(), userData.getLogin())); + } + } + + @Override + public User createUser(User user) { + userRepository.save(new UserData(user)); + return user; + } +} + diff --git a/services/core/users/src/main/modeling/swagger.yaml b/services/core/users/src/main/modeling/swagger.yaml index 5e5b2abbad..640619a2c5 100755 --- a/services/core/users/src/main/modeling/swagger.yaml +++ b/services/core/users/src/main/modeling/swagger.yaml @@ -282,16 +282,16 @@ paths: name: user description: User to be created schema: - $ref: '#/definitions/SimpleUser' + $ref: '#/definitions/User' responses: '200': description: OK (user already existed so it was updated) schema: - $ref: '#/definitions/SimpleUser' + $ref: '#/definitions/User' '201': description: Created schema: - $ref: '#/definitions/SimpleUser' + $ref: '#/definitions/User' '400': description: Bad request '401': @@ -347,16 +347,16 @@ paths: name: user description: User to be updated (login should match path parameter) schema: - $ref: '#/definitions/SimpleUser' + $ref: '#/definitions/User' responses: '200': description: OK schema: - $ref: '#/definitions/SimpleUser' + $ref: '#/definitions/User' '201': description: Created schema: - $ref: '#/definitions/SimpleUser' + $ref: '#/definitions/User' '400': description: Bad request (body doesn't match login path parameter) '401': diff --git a/services/core/users/src/test/java/org/lfenergy/operatorfabric/users/application/UnitTestApplication.java b/services/core/users/src/test/java/org/lfenergy/operatorfabric/users/application/UnitTestApplication.java index b8887f97ec..7b402a0219 100644 --- a/services/core/users/src/test/java/org/lfenergy/operatorfabric/users/application/UnitTestApplication.java +++ b/services/core/users/src/test/java/org/lfenergy/operatorfabric/users/application/UnitTestApplication.java @@ -21,7 +21,7 @@ import org.lfenergy.operatorfabric.users.configuration.users.UsersProperties; import org.lfenergy.operatorfabric.users.controllers.*; import org.lfenergy.operatorfabric.users.repositories.UserRepository; -import org.lfenergy.operatorfabric.users.services.UserService; +import org.lfenergy.operatorfabric.users.services.UserServiceImp; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.properties.EnableConfigurationProperties; @@ -39,7 +39,7 @@ @Import({JacksonConfig.class, LocalMongoConfiguration.class, UsersProperties.class, CustomExceptionHandler.class, GroupsController.class, EntitiesController.class, UsersController.class, PerimetersController.class, CurrentUserWithPerimetersController.class, DataInitComponent.class, GroupsProperties.class, GroupsUtils.class, - JwtProperties.class, UserService.class}) + JwtProperties.class, UserServiceImp.class}) @ImportResource("classpath:/security.xml") @Slf4j public class UnitTestApplication { diff --git a/services/core/users/src/test/java/org/lfenergy/operatorfabric/users/services/UserServiceShould.java b/services/core/users/src/test/java/org/lfenergy/operatorfabric/users/services/UserServiceShould.java index 4cb8dd1cc3..b7bd276ae9 100644 --- a/services/core/users/src/test/java/org/lfenergy/operatorfabric/users/services/UserServiceShould.java +++ b/services/core/users/src/test/java/org/lfenergy/operatorfabric/users/services/UserServiceShould.java @@ -34,7 +34,7 @@ public class UserServiceShould { @Autowired - UserService userService; + UserServiceImp userService; @Test public void testIsEachStateUniqueInPerimeter() { diff --git a/ui/main/angular.json b/ui/main/angular.json index 7100233784..645e70de97 100755 --- a/ui/main/angular.json +++ b/ui/main/angular.json @@ -28,6 +28,7 @@ "src/silent-refresh.html" ], "styles": [ + "./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css", "node_modules/@fortawesome/fontawesome-free/css/all.css", "node_modules/flatpickr/dist/flatpickr.css", "node_modules/@fullcalendar/core/main.css", @@ -42,7 +43,6 @@ "node_modules/svg-pan-zoom/dist/svg-pan-zoom.js", "src/assets/js/templateGateway.js", "src/assets/js/Chart.min.js" - ] }, "configurations": { @@ -101,6 +101,7 @@ "tsConfig": "src/tsconfig.spec.json", "karmaConfig": "src/karma.conf.js", "styles": [ + "./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css", "./node_modules/bootstrap/dist/css/bootstrap.min.css", "node_modules/@fortawesome/fontawesome-free/css/all.css", "src/assets/styles/style.css", @@ -159,4 +160,4 @@ "cli": { "defaultCollection": "@ngrx/schematics" } -} +} \ No newline at end of file diff --git a/ui/main/browserslist b/ui/main/browserslist deleted file mode 100755 index 8e09ab492e..0000000000 --- a/ui/main/browserslist +++ /dev/null @@ -1,9 +0,0 @@ -# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries -# For IE 9-11 support, please uncomment the last line of the file and adjust as needed -> 0.5% -last 2 versions -Firefox ESR -not dead -# IE 9-11 \ No newline at end of file diff --git a/ui/main/package.json b/ui/main/package.json index 26ab4ed88c..05c1d562ee 100755 --- a/ui/main/package.json +++ b/ui/main/package.json @@ -55,7 +55,9 @@ "moment": "^2.29.0", "moment-timezone": "^0.5.31", "ng-event-source": "^1.0.14", + "ng2-table": "^1.3.2", "ngrx-router": "^2.0.1", + "ngx-bootstrap": "^5.6.1", "ngx-countdown": "^10.0.0", "ngx-type-ahead": "^2.0.1", "rxjs": "^6.6.3", @@ -94,6 +96,7 @@ "ts-mockito": "^2.6.1", "ts-node": "~7.0.0", "tslint": "~5.11.0", - "typescript": "~3.5.3" + "typescript": "~3.5.3", + "@babel/compat-data": "~7.8.0" } } diff --git a/ui/main/src/app/app-routing.module.ts b/ui/main/src/app/app-routing.module.ts index 7a27afcacf..039564de2b 100644 --- a/ui/main/src/app/app-routing.module.ts +++ b/ui/main/src/app/app-routing.module.ts @@ -14,6 +14,7 @@ import {LoginComponent} from './components/login/login.component'; import {AboutComponent} from './modules/about/about.component'; import {LoggingComponent} from './modules/logging/logging.component'; import {MonitoringComponent} from './modules/monitoring/monitoring.component'; +import { AdminComponent } from './modules/admin/admin.component'; import {CalendarComponent} from './modules/calendar/calendar.component'; const defaultPath = '/feed'; @@ -60,7 +61,13 @@ const routes: Routes = [ path: 'about', component: AboutComponent }, - {path: '**', redirectTo: defaultPath} + { + path: 'admin', + loadChildren: () => import('./modules/admin/admin.module').then(m => m.AdminModule), + }, + { path: '**', + redirectTo: defaultPath + } ]; // TODO manage visible path more gently const startIndex = 0; diff --git a/ui/main/src/app/app.component.ts b/ui/main/src/app/app.component.ts index 38da4ecc83..0dba05371a 100644 --- a/ui/main/src/app/app.component.ts +++ b/ui/main/src/app/app.component.ts @@ -72,12 +72,11 @@ export class AppComponent implements OnInit { console.error('Impossible to load configuration file web-ui.json', err); return caught; }); - } private setTitle() { const title = this.configService.getConfigValue('title'); - if (!!title) this.titleService.setTitle(title); + if (!!title) { this.titleService.setTitle(title); } } private launchAuthenticationProcess() { diff --git a/ui/main/src/app/app.module.ts b/ui/main/src/app/app.module.ts index 73c675df61..ba808fe4fe 100644 --- a/ui/main/src/app/app.module.ts +++ b/ui/main/src/app/app.module.ts @@ -8,77 +8,90 @@ */ -import {BrowserModule} from '@angular/platform-browser'; -import {NgModule} from '@angular/core'; -import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; -import {HttpClientModule} from '@angular/common/http'; -import {CommonModule, HashLocationStrategy, LocationStrategy} from '@angular/common'; -import {FormsModule, ReactiveFormsModule} from '@angular/forms'; -import {StateModule} from '@ofStore/state.module'; -import {NgbModule} from '@ng-bootstrap/ng-bootstrap'; -import {ServicesModule} from '@ofServices/services.module'; -import {AppRoutingModule} from './app-routing.module'; -import {AppComponent} from './app.component'; -import {NavbarComponent} from './components/navbar/navbar.component'; -import {LoginComponent} from './components/login/login.component'; -import {IconComponent} from './components/navbar/icon/icon.component'; -import {TranslateModule} from '@ngx-translate/core'; -import {InfoComponent} from './components/navbar/info/info.component'; -import {UtilitiesModule} from './modules/utilities/utilities.module'; -import {MenuLinkComponent} from './components/navbar/menus/menu-link/menu-link.component'; -import {CustomLogoComponent} from './components/navbar/custom-logo/custom-logo.component'; -import {OAuthModule} from 'angular-oauth2-oidc'; -import {AboutComponent} from './modules/about/about.component'; -import {FontAwesomeIconsModule} from './modules/utilities/fontawesome-icons.module'; -import {LoggingModule} from './modules/logging/logging.module'; -import {MonitoringModule} from './modules/monitoring/monitoring.module'; +import { BrowserModule } from '@angular/platform-browser'; +import { ErrorHandler, NgModule } from '@angular/core'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { HttpClientModule } from '@angular/common/http'; +import { CommonModule, HashLocationStrategy, LocationStrategy } from '@angular/common'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { StateModule } from '@ofStore/state.module'; +import { ServicesModule } from '@ofServices/services.module'; +import { AppRoutingModule } from './app-routing.module'; +import { AppComponent } from './app.component'; +import { NavbarComponent } from './components/navbar/navbar.component'; +import { LoginComponent } from './components/login/login.component'; +import { IconComponent } from './components/navbar/icon/icon.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { InfoComponent } from './components/navbar/info/info.component'; +import { UtilitiesModule } from './modules/utilities/utilities.module'; +import { MenuLinkComponent } from './components/navbar/menus/menu-link/menu-link.component'; +import { CustomLogoComponent } from './components/navbar/custom-logo/custom-logo.component'; +import { OAuthModule } from 'angular-oauth2-oidc'; +import { AboutComponent } from './modules/about/about.component'; +import { FontAwesomeIconsModule } from './modules/utilities/fontawesome-icons.module'; +import { LoggingModule } from './modules/logging/logging.module'; +import { MonitoringModule } from './modules/monitoring/monitoring.module'; +import { AdminModule } from './modules/admin/admin.module'; +import { NgbModule, NgbModalModule } from '@ng-bootstrap/ng-bootstrap'; +import { EditUsermodalComponent } from './modules/admin/components/editmodal/users/editusermodal.component'; import { CountdownModule, CountdownGlobalConfig, CountdownConfig } from 'ngx-countdown'; import {CalendarModule} from './modules/calendar/calendar.module'; - +import { ConfirmationDialogComponent } from './modules/admin/components/confirmation-dialog/confirmation-dialog.component'; +import { AppErrorHandler } from './common/error/app-error-handler'; +import { MatInputModule, MatSelectModule } from '@angular/material'; export function countdownConfigFactory(): CountdownConfig { - return { format: `mm:ss` }; - } + return { format: `mm:ss` }; +} @NgModule({ - imports: [ - CommonModule, - BrowserModule, - BrowserAnimationsModule, - FormsModule, - ReactiveFormsModule, - OAuthModule.forRoot(), - HttpClientModule, - StateModule.forRoot(), - ServicesModule.forRoot(), - NgbModule, - TranslateModule.forRoot(), - FontAwesomeIconsModule, - UtilitiesModule, - LoggingModule, - MonitoringModule, - AppRoutingModule, - CountdownModule, - CalendarModule - ], - declarations: [AppComponent, - NavbarComponent, - LoginComponent, - IconComponent, - InfoComponent, - MenuLinkComponent, - CustomLogoComponent, - AboutComponent - ], - providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}, - {provide: CountdownGlobalConfig, useFactory: countdownConfigFactory} - ], - bootstrap: [AppComponent] -}) + imports: [ + CommonModule, + BrowserModule, + BrowserAnimationsModule, + FormsModule, + ReactiveFormsModule, + OAuthModule.forRoot(), + HttpClientModule, + StateModule.forRoot(), + ServicesModule.forRoot(), + NgbModule, + TranslateModule.forRoot(), + FontAwesomeIconsModule, + UtilitiesModule, + LoggingModule, + MonitoringModule, + NgbModalModule, + AppRoutingModule, + AdminModule, + CountdownModule, + CalendarModule, + MatSelectModule, + MatInputModule + ], + declarations: [AppComponent, + NavbarComponent, + LoginComponent, + IconComponent, + InfoComponent, + MenuLinkComponent, + CustomLogoComponent, + AboutComponent, + EditUsermodalComponent, + ConfirmationDialogComponent + ], + entryComponents: [ + EditUsermodalComponent, + ConfirmationDialogComponent + ], + providers: [{ provide: LocationStrategy, useClass: HashLocationStrategy }, + { provide: CountdownGlobalConfig, useFactory: countdownConfigFactory }, + { provide: ErrorHandler, useClass: AppErrorHandler } + ], + bootstrap: [AppComponent] +}) export class AppModule { } - - diff --git a/ui/main/src/app/common/error/app-error-handler.ts b/ui/main/src/app/common/error/app-error-handler.ts new file mode 100644 index 0000000000..fef72f8bec --- /dev/null +++ b/ui/main/src/app/common/error/app-error-handler.ts @@ -0,0 +1,17 @@ +import { ErrorHandler } from '@angular/core'; +import { NotAllowedError } from './not-allowed-error'; +import { NotFoundError } from './not-found-error'; + +export class AppErrorHandler implements ErrorHandler { + + handleError(error) { + if (error instanceof NotAllowedError) { + alert('Action not allowed'); + } + if (error instanceof NotFoundError) { + alert('Resource not found'); + } + + console.log(error); + } +} diff --git a/ui/main/src/app/common/error/app-error.ts b/ui/main/src/app/common/error/app-error.ts new file mode 100644 index 0000000000..8ce4add5bf --- /dev/null +++ b/ui/main/src/app/common/error/app-error.ts @@ -0,0 +1,3 @@ +export class AppError { + constructor(originalError? ) {} +} diff --git a/ui/main/src/app/common/error/not-allowed-error.ts b/ui/main/src/app/common/error/not-allowed-error.ts new file mode 100644 index 0000000000..85ee39fe6b --- /dev/null +++ b/ui/main/src/app/common/error/not-allowed-error.ts @@ -0,0 +1,5 @@ +import { AppError } from './app-error'; + +export class NotAllowedError extends AppError { + +} diff --git a/ui/main/src/app/common/error/not-found-error.ts b/ui/main/src/app/common/error/not-found-error.ts new file mode 100644 index 0000000000..2a5a9d01b5 --- /dev/null +++ b/ui/main/src/app/common/error/not-found-error.ts @@ -0,0 +1,5 @@ +import { AppError } from './app-error'; + +export class NotFoundError extends AppError { + +} diff --git a/ui/main/src/app/components/navbar/navbar.component.html b/ui/main/src/app/components/navbar/navbar.component.html index 09a72e85bd..b1aaa21aaa 100644 --- a/ui/main/src/app/components/navbar/navbar.component.html +++ b/ui/main/src/app/components/navbar/navbar.component.html @@ -85,6 +85,15 @@ >