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

Commits:

2 changed files:

Changes:

  • client-core/src/main/java/fr/ird/observe/client/ui/admin/config/ConfigModel.java
    ... ... @@ -333,17 +333,12 @@ public class ConfigModel extends AdminActionModel {
    333 333
     
    
    334 334
             if (validate && uiModel.containsOperation(AdminStep.REFERENTIAL_SYNCHRONIZE)) {
    
    335 335
     
    
    336
    -            // les deux bases (source et referentiel) doivent etre different
    
    337
    -            validate = validateNotSameDataSources();
    
    338
    -
    
    339 336
                 ObserveDataSourceInformation leftDataSourceInformation = getLocalSourceInformation();
    
    340 337
                 if (leftDataSourceInformation == null) {
    
    341 338
                     return false;
    
    342 339
                 }
    
    343 340
                 if (!(leftDataSourceInformation.canReadReferential())) {
    
    344
    -                if (log.isDebugEnabled()) {
    
    345
    -                    log.debug("can not read and write referential on left data source");
    
    346
    -                }
    
    341
    +                log.info("can not read and write referential on left data source");
    
    347 342
                     return false;
    
    348 343
                 }
    
    349 344
     
    
    ... ... @@ -353,12 +348,16 @@ public class ConfigModel extends AdminActionModel {
    353 348
                 }
    
    354 349
     
    
    355 350
                 if (!(rightDataSourceInformation.canReadReferential())) {
    
    356
    -                if (log.isDebugEnabled()) {
    
    357
    -                    log.debug("can not read and write referential on right data source");
    
    358
    -                }
    
    351
    +                log.info("can not read and write referential on right data source");
    
    359 352
                     return false;
    
    360 353
                 }
    
    361 354
     
    
    355
    +            // les deux bases (source et referentiel) doivent etre different
    
    356
    +            validate = validateNotSameDataSources();
    
    357
    +            if (!validate) {
    
    358
    +                log.info("Data sources are equals!");
    
    359
    +                return false;
    
    360
    +            }
    
    362 361
                 ReferentialSynchronizeMode synchronizeMode = uiModel.getReferentialSynchroModel().getSynchronizeMode();
    
    363 362
                 if (synchronizeMode == null) {
    
    364 363
                     return false;
    

  • 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
     }