Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe

Commits:

3 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -4,7 +4,7 @@ stages:
    4 4
       - Test
    
    5 5
       - Release
    
    6 6
     
    
    7
    -image: registry.gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/docker:latest
    
    7
    +image: registry.gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/docker-8:latest
    
    8 8
     
    
    9 9
     .stage_docker: &stage_docker
    
    10 10
       stage: Docker
    
    ... ... @@ -22,7 +22,7 @@ image: registry.gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/docker:lat
    22 22
       services:
    
    23 23
         - docker:dind
    
    24 24
       script:
    
    25
    -    - if [ -n "${CREATE_DOCKER}" ]; then ultreiaio-docker-generate-image gitlab-ci-token $CI_BUILD_TOKEN; fi
    
    25
    +    - if [ -n "${CREATE_DOCKER}" ]; then ultreiaio-docker-generate-image-8 gitlab-ci-token $CI_BUILD_TOKEN; fi
    
    26 26
     
    
    27 27
     .build-for-release: &build-for-release
    
    28 28
       environment:
    

  • client-core/src/main/java/fr/ird/observe/client/ui/admin/config/ConfigModel.java
    ... ... @@ -293,7 +293,10 @@ public class ConfigModel extends AdminActionModel {
    293 293
     
    
    294 294
                 // les deux bases (source et referentiel) doivent etre different
    
    295 295
                 validate = validateNotSameDataSources();
    
    296
    -
    
    296
    +            if (!validate) {
    
    297
    +                log.info("Data sources are equals!");
    
    298
    +                return false;
    
    299
    +            }
    
    297 300
                 boolean atLeastOneWrite = false;
    
    298 301
     
    
    299 302
                 ObserveDataSourceInformation leftDataSourceInformation = getLocalSourceInformation();
    
    ... ... @@ -333,17 +336,12 @@ public class ConfigModel extends AdminActionModel {
    333 336
     
    
    334 337
             if (validate && uiModel.containsOperation(AdminStep.REFERENTIAL_SYNCHRONIZE)) {
    
    335 338
     
    
    336
    -            // les deux bases (source et referentiel) doivent etre different
    
    337
    -            validate = validateNotSameDataSources();
    
    338
    -
    
    339 339
                 ObserveDataSourceInformation leftDataSourceInformation = getLocalSourceInformation();
    
    340 340
                 if (leftDataSourceInformation == null) {
    
    341 341
                     return false;
    
    342 342
                 }
    
    343 343
                 if (!(leftDataSourceInformation.canReadReferential())) {
    
    344
    -                if (log.isDebugEnabled()) {
    
    345
    -                    log.debug("can not read and write referential on left data source");
    
    346
    -                }
    
    344
    +                log.info("can not read and write referential on left data source");
    
    347 345
                     return false;
    
    348 346
                 }
    
    349 347
     
    
    ... ... @@ -353,12 +351,16 @@ public class ConfigModel extends AdminActionModel {
    353 351
                 }
    
    354 352
     
    
    355 353
                 if (!(rightDataSourceInformation.canReadReferential())) {
    
    356
    -                if (log.isDebugEnabled()) {
    
    357
    -                    log.debug("can not read and write referential on right data source");
    
    358
    -                }
    
    354
    +                log.info("can not read and write referential on right data source");
    
    359 355
                     return false;
    
    360 356
                 }
    
    361 357
     
    
    358
    +            // les deux bases (source et referentiel) doivent etre different
    
    359
    +            validate = validateNotSameDataSources();
    
    360
    +            if (!validate) {
    
    361
    +                log.info("Data sources are equals!");
    
    362
    +                return false;
    
    363
    +            }
    
    362 364
                 ReferentialSynchronizeMode synchronizeMode = uiModel.getReferentialSynchroModel().getSynchronizeMode();
    
    363 365
                 if (synchronizeMode == null) {
    
    364 366
                     return false;
    
    ... ... @@ -407,6 +409,10 @@ public class ConfigModel extends AdminActionModel {
    407 409
     
    
    408 410
                 // les deux bases (source et referentiel) doivent etre different
    
    409 411
                 validate = validateNotSameDataSources();
    
    412
    +            if (!validate) {
    
    413
    +                log.info("Data sources are equals!");
    
    414
    +                return false;
    
    415
    +            }
    
    410 416
     
    
    411 417
             }
    
    412 418
             if (uiModel.containsOperation(AdminStep.EXPORT_DATA)) {
    

  • client-core/src/main/java/fr/ird/observe/client/ui/admin/synchronize/referential/ng/ReferentialSynchroModel.java
    ... ... @@ -366,4 +366,6 @@ public class ReferentialSynchroModel extends AdminActionModel {
    366 366
             setShowProperties(true);
    
    367 367
             ((ReferentialSynchroUI)ui.getStepUI(AdminStep.REFERENTIAL_SYNCHRONIZE)).getApplyAction().setEnabled(false);
    
    368 368
         }
    
    369
    +
    
    370
    +
    
    369 371
     }