From 3b21daa7b398eab81f6afb75dbed16865a9e6add Mon Sep 17 00:00:00 2001 From: alejandravv <48628943+alejandravv@users.noreply.github.com> Date: Wed, 29 Jan 2020 13:13:18 +0100 Subject: [PATCH 1/8] Working on issue #96: Adding weights to the SI computation (#102) * Start working on issue #96: - add checkbox for "weighted average " - add modal draft to input weight * Intermediate step: adaptation of the database, addition of weights attribute, change source code on corresponding functions. * - Save new SI funcion with weights - Fetch with weights - Updates in enter/edit weights form * Add weights to assesSI functionality Transform editSI (to use weights) Save button check total sum of weighted SI * Correct weighted average formula Improve enter/edit weights form Try to paint Quality Model with weights * Improve Quality Model view with weights * Paint correctly Quality Model * Test Correction * Test correction * Make QualityModel representation SI---Factors consistent with Factors---Metrics Add Rationale field on CurrentTable view of SI Add info field to setStrategicIndicatorValue(...) function * Add rationale field to Current i Historic Table view * Improvements of enter/edit weights form: - Selected Factors names - Only numbers - Cancel button functionality * edit SI with weights not work at all * Working on edit SI funcionality and some test corrections * Corrected edit SI funcionality * Added contextual help to product configuration views * Added contextual help to strategic indicators configuration views * Sort SI's list in the strategic indicator configuration view * Change SI & Factor Rationale * Some tests correction * Correct some code smells and tests * Correct contextual help on Product view * Add contextual help to project's part on Product view * Correct some tests * Finish tests correction & Update documentation --- build.gradle | 4 +- docs/asciidoc/index.adoc | 2 +- docs/asciidoc/index.html | 184 ++++++++++----- libs/qrapids-qma-elastic-0.18.jar | Bin 0 -> 44680 bytes sonar-project.properties | 2 +- .../qrapids/app/domain/adapters/AssesSI.java | 20 ++ .../qrapids/app/domain/adapters/Forecast.java | 2 + .../adapters/QMA/QMAStrategicIndicators.java | 6 +- ...egicIndicatorQualityFactorsController.java | 31 +++ .../StrategicIndicatorsController.java | 147 ++++++++++-- ...dicatorQualityFactorNotFoundException.java | 4 + .../StrategicIndicatorQualityFactors.java | 70 ++++++ .../domain/models/Strategic_Indicator.java | 51 ++++- ...egicIndicatorQualityFactorsRepository.java | 16 ++ .../StrategicIndicatorRepository.java | 1 + .../app/presentation/rest/dto/DTOSI.java | 12 +- .../dto/DTOStrategicIndicatorEvaluation.java | 11 +- .../rest/services/StrategicIndicators.java | 34 +-- src/main/resources/static/css/products.css | 2 +- .../resources/static/css/stylesDashboard.css | 11 + .../resources/static/js/app/app.services.js | 4 +- src/main/resources/static/js/configSI.js | 214 +++++++++++++++++- .../resources/static/js/loadQualityModel.js | 24 +- src/main/resources/static/js/product.js | 54 ++--- .../CurrentTable.html | 2 +- .../HistoricTable.html | 2 +- .../resources/templates/Fragments/Modals.html | 34 +++ .../resources/templates/Product/Products.html | 5 +- .../QualityFactors/CurrentTable.html | 2 +- .../QualityFactors/HistoricTable.html | 2 +- .../StrategicIndicatorsConfig.html | 10 +- .../StrategicIndicators/CurrentTable.html | 9 + .../StrategicIndicators/HistoricTable.html | 7 + .../StrategicIndicatorsControllerTest.java | 141 ++++++++---- ...IndicatorQualityFactorsRepositoryTest.java | 84 +++++++ .../StrategicIndicatorRepositoryTest.java | 62 +++-- .../rest/services/ProductsTest.java | 12 +- .../services/StrategicIndicatorsTest.java | 80 +++++-- .../app/testHelpers/DomainObjectsBuilder.java | 85 ++++++- yiu/gradle.xml | 20 ++ yiu/jarRepositories.xml | 25 ++ yiu/misc.xml | 8 + yiu/vcs.xml | 6 + yiu/workspace.xml | 148 ++++++++++++ 44 files changed, 1366 insertions(+), 284 deletions(-) create mode 100644 libs/qrapids-qma-elastic-0.18.jar create mode 100644 src/main/java/com/upc/gessi/qrapids/app/domain/controllers/StrategicIndicatorQualityFactorsController.java create mode 100644 src/main/java/com/upc/gessi/qrapids/app/domain/exceptions/StrategicIndicatorQualityFactorNotFoundException.java create mode 100644 src/main/java/com/upc/gessi/qrapids/app/domain/models/StrategicIndicatorQualityFactors.java create mode 100644 src/main/java/com/upc/gessi/qrapids/app/domain/repositories/StrategicIndicator/StrategicIndicatorQualityFactorsRepository.java create mode 100644 src/test/java/com/upc/gessi/qrapids/app/domain/repositories/StrategicIndicator/StrategicIndicatorQualityFactorsRepositoryTest.java create mode 100644 yiu/gradle.xml create mode 100644 yiu/jarRepositories.xml create mode 100644 yiu/misc.xml create mode 100644 yiu/vcs.xml create mode 100644 yiu/workspace.xml diff --git a/build.gradle b/build.gradle index cbd40923..07e034ef 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'jacoco' apply plugin: 'org.asciidoctor.convert' group = 'com.upc.gessi.qrapids' -version = '1.1.1' +version = '1.2' sourceCompatibility = 1.8 war { @@ -78,7 +78,7 @@ dependencies { compile('org.elasticsearch.client:transport:5.6.3') compile('org.elasticsearch:elasticsearch:5.6.3') compile('org.elasticsearch.client:elasticsearch-rest-high-level-client:5.6.3') - compile files('libs/qrapids-qma-elastic-0.16.jar') + compile files('libs/qrapids-qma-elastic-0.18.jar') //API QR Generator compile files('libs/qrapids-qr_generator-0.2.jar') diff --git a/docs/asciidoc/index.adoc b/docs/asciidoc/index.adoc index d434e4c0..5b59b30d 100644 --- a/docs/asciidoc/index.adoc +++ b/docs/asciidoc/index.adoc @@ -1,5 +1,5 @@ = Q-Rapids Dashboard API REST Documentation -v1.1.1, {docdate} +v1.2, {docdate} :toc: left :sectnums: diff --git a/docs/asciidoc/index.html b/docs/asciidoc/index.html index 98d19659..69e0855e 100644 --- a/docs/asciidoc/index.html +++ b/docs/asciidoc/index.html @@ -5,7 +5,7 @@ - +
+ | + |