Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
18 changed files:
- client-datasource-actions/src/main/i18n/getters/java-enumeration.getter
- client-datasource-actions/src/main/i18n/getters/java.getter
- client-datasource-actions/src/main/i18n/getters/jaxx.getter
- client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/AdminStep.java
- client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/AdminUIHandler.java
- client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/AdminUIModel.java
- client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/actions/AdminTabUIActionSupport.java
- − client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/resume/ShowResumeModel.java
- − client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/resume/ShowResumeUI.jaxx
- − client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/resume/ShowResumeUI.jcss
- − client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/resume/ShowResumeUIHandler.java
- − client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/resume/actions/CopyResumeToClipBoard.java
- client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/actions/RegisterTaskActionSupport.java
- client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/validate/actions/SaveReport.java
- observe-i18n/src/main/i18n/translations/observe_en_GB.properties
- observe-i18n/src/main/i18n/translations/observe_es_ES.properties
- observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
- pom.xml
Changes:
| ... | ... | @@ -16,8 +16,6 @@ observe.constant.AdminStep.SAVE_LOCAL |
| 16 | 16 |
observe.constant.AdminStep.SAVE_LOCAL.description
|
| 17 | 17 |
observe.constant.AdminStep.SELECT_DATA
|
| 18 | 18 |
observe.constant.AdminStep.SELECT_DATA.description
|
| 19 |
-observe.constant.AdminStep.SHOW_RESUME
|
|
| 20 |
-observe.constant.AdminStep.SHOW_RESUME.description
|
|
| 21 | 19 |
observe.constant.AdminStep.SYNCHRONIZE
|
| 22 | 20 |
observe.constant.AdminStep.SYNCHRONIZE.description
|
| 23 | 21 |
observe.constant.AdminStep.VALIDATE
|
| ... | ... | @@ -170,13 +170,6 @@ observe.admin.report.no.report.found |
| 170 | 170 |
observe.admin.report.report.count.found
|
| 171 | 171 |
observe.admin.report.title
|
| 172 | 172 |
observe.admin.report.title.tip
|
| 173 |
-observe.admin.resume.no.operation.done
|
|
| 174 |
-observe.admin.resume.operation.canceled
|
|
| 175 |
-observe.admin.resume.operation.done
|
|
| 176 |
-observe.admin.resume.operation.failed
|
|
| 177 |
-observe.admin.resume.operation.need.fix
|
|
| 178 |
-observe.admin.resume.operation.not.started
|
|
| 179 |
-observe.admin.resume.operation.running
|
|
| 180 | 173 |
observe.choice.cancel
|
| 181 | 174 |
observe.choice.confirm.insert
|
| 182 | 175 |
observe.choice.replace
|
| ... | ... | @@ -34,7 +34,6 @@ observe.admin.report.variables |
| 34 | 34 |
observe.common.directory
|
| 35 | 35 |
observe.common.file
|
| 36 | 36 |
observe.common.global.progression.description
|
| 37 |
-observe.common.operation.resume
|
|
| 38 | 37 |
observe.common.step.description
|
| 39 | 38 |
observe.info.selected.validators
|
| 40 | 39 |
observe.info.validation.credentials
|
| ... | ... | @@ -32,7 +32,6 @@ import fr.ird.observe.client.datasource.actions.longline.pairing.ActivityLonglin |
| 32 | 32 |
import fr.ird.observe.client.datasource.actions.longline.pairing.ActivityLonglinePairingUI;
|
| 33 | 33 |
import fr.ird.observe.client.datasource.actions.report.ReportModel;
|
| 34 | 34 |
import fr.ird.observe.client.datasource.actions.report.ReportUI;
|
| 35 |
-import fr.ird.observe.client.datasource.actions.resume.ShowResumeUI;
|
|
| 36 | 35 |
import fr.ird.observe.client.datasource.actions.save.SaveLocalModel;
|
| 37 | 36 |
import fr.ird.observe.client.datasource.actions.save.SaveLocalUI;
|
| 38 | 37 |
import fr.ird.observe.client.datasource.actions.synchronize.data.DataSynchroModel;
|
| ... | ... | @@ -247,13 +246,6 @@ public enum AdminStep implements WizardExtStep { |
| 247 | 246 |
DbMode.USE_LOCAL,
|
| 248 | 247 |
DbMode.USE_REMOTE,
|
| 249 | 248 |
DbMode.USE_SERVER
|
| 250 |
- ),
|
|
| 251 |
- |
|
| 252 |
- /** pour afficher après les opération un ecran de résumé */
|
|
| 253 |
- SHOW_RESUME(
|
|
| 254 |
- null,
|
|
| 255 |
- ShowResumeUI.class,
|
|
| 256 |
- false
|
|
| 257 | 249 |
);
|
| 258 | 250 |
|
| 259 | 251 |
private final String iconName;
|
| ... | ... | @@ -27,7 +27,6 @@ import fr.ird.observe.client.datasource.actions.config.SelectDataUI; |
| 27 | 27 |
import fr.ird.observe.client.datasource.actions.consolidate.ConsolidateUI;
|
| 28 | 28 |
import fr.ird.observe.client.datasource.actions.export.ExportUI;
|
| 29 | 29 |
import fr.ird.observe.client.datasource.actions.longline.pairing.ActivityLonglinePairingUI;
|
| 30 |
-import fr.ird.observe.client.datasource.actions.resume.ShowResumeUI;
|
|
| 31 | 30 |
import fr.ird.observe.client.datasource.actions.save.SaveLocalUI;
|
| 32 | 31 |
import fr.ird.observe.client.datasource.actions.synchronize.data.DataSynchroUI;
|
| 33 | 32 |
import fr.ird.observe.client.datasource.actions.synchronize.referential.legacy.SynchronizeUI;
|
| ... | ... | @@ -297,12 +296,6 @@ public class AdminUIHandler implements UIHandler<AdminUI>, WithClientUIContext { |
| 297 | 296 |
SaveLocalUI tabUI = (SaveLocalUI) ui.getStepUI(AdminStep.SAVE_LOCAL);
|
| 298 | 297 |
tabUI.getHandler().updateText();
|
| 299 | 298 |
}
|
| 300 |
- if (c != null && c.getStep() == AdminStep.SHOW_RESUME) {
|
|
| 301 |
- |
|
| 302 |
- // on met a jour le resumé des opérations
|
|
| 303 |
- ShowResumeUI showResumeUI = (ShowResumeUI) ui.getStepUI(AdminStep.SHOW_RESUME);
|
|
| 304 |
- showResumeUI.getHandler().updateText();
|
|
| 305 |
- }
|
|
| 306 | 299 |
|
| 307 | 300 |
// selection du nouvel onglet
|
| 308 | 301 |
int index = ui.tabs.indexOfComponent(c);
|
| ... | ... | @@ -371,12 +364,6 @@ public class AdminUIHandler implements UIHandler<AdminUI>, WithClientUIContext { |
| 371 | 364 |
itr = UIHelper.newTabbedPaneIterator(ui.getTabs());
|
| 372 | 365 |
}
|
| 373 | 366 |
|
| 374 |
- if (selected != null && selected.getStep() == AdminStep.SHOW_RESUME) {
|
|
| 375 |
- |
|
| 376 |
- // rien a faire sur le dernier onglet
|
|
| 377 |
- log.debug("We are on last step (resume), nothing to do.");
|
|
| 378 |
- return;
|
|
| 379 |
- }
|
|
| 380 | 367 |
boolean[] accessibleSteps = ui.getModel().getAccessibleSteps();
|
| 381 | 368 |
log.debug("Accessibles step : " + Arrays.toString(accessibleSteps));
|
| 382 | 369 |
for (; itr.hasNext(); itr.next()) {
|
| ... | ... | @@ -28,7 +28,6 @@ import fr.ird.observe.client.datasource.actions.consolidate.ConsolidateModel; |
| 28 | 28 |
import fr.ird.observe.client.datasource.actions.export.ExportModel;
|
| 29 | 29 |
import fr.ird.observe.client.datasource.actions.longline.pairing.ActivityLonglinePairingModel;
|
| 30 | 30 |
import fr.ird.observe.client.datasource.actions.report.ReportModel;
|
| 31 |
-import fr.ird.observe.client.datasource.actions.resume.ShowResumeModel;
|
|
| 32 | 31 |
import fr.ird.observe.client.datasource.actions.save.SaveLocalModel;
|
| 33 | 32 |
import fr.ird.observe.client.datasource.actions.synchronize.data.DataSynchroModel;
|
| 34 | 33 |
import fr.ird.observe.client.datasource.actions.synchronize.referential.legacy.SynchronizeModel;
|
| ... | ... | @@ -64,8 +63,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> { |
| 64 | 63 |
|
| 65 | 64 |
private final SelectDataModel selectDataModel = new SelectDataModel();
|
| 66 | 65 |
|
| 67 |
- private final ShowResumeModel showResumeModel = new ShowResumeModel();
|
|
| 68 |
- |
|
| 69 | 66 |
private final AdminStep adminStep;
|
| 70 | 67 |
|
| 71 | 68 |
private final EnumSet<DbMode> availableIncomingModes;
|
| ... | ... | @@ -152,10 +149,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> { |
| 152 | 149 |
return configModel;
|
| 153 | 150 |
}
|
| 154 | 151 |
|
| 155 |
- public ShowResumeModel getShowResumeModel() {
|
|
| 156 |
- return showResumeModel;
|
|
| 157 |
- }
|
|
| 158 |
- |
|
| 159 | 152 |
public SelectDataModel getSelectDataModel() {
|
| 160 | 153 |
return selectDataModel;
|
| 161 | 154 |
}
|
| ... | ... | @@ -397,8 +390,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> { |
| 397 | 390 |
return getSynchronizeReferentielModel().validate(this, step);
|
| 398 | 391 |
case SAVE_LOCAL:
|
| 399 | 392 |
return getSaveLocalModel().validate(this, step);
|
| 400 |
- case SHOW_RESUME:
|
|
| 401 |
- return getShowResumeModel().validate(this);
|
|
| 402 | 393 |
}
|
| 403 | 394 |
return true;
|
| 404 | 395 |
}
|
| ... | ... | @@ -411,8 +402,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> { |
| 411 | 402 |
// toujours l'onglet de configuration des opérations
|
| 412 | 403 |
universe.add(AdminStep.CONFIG);
|
| 413 | 404 |
|
| 414 |
- // pour savoir si on doit ajouter l'onglet de résumé (cas par défaut)
|
|
| 415 |
- boolean needResume = true;
|
|
| 416 | 405 |
if (!operations.isEmpty()) {
|
| 417 | 406 |
|
| 418 | 407 |
if (needSelect()) {
|
| ... | ... | @@ -458,9 +447,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> { |
| 458 | 447 |
if (containsOperation(AdminStep.REPORT)) {
|
| 459 | 448 |
|
| 460 | 449 |
universe.add(AdminStep.REPORT);
|
| 461 |
- |
|
| 462 |
- // pas de page de resume
|
|
| 463 |
- needResume = false;
|
|
| 464 | 450 |
}
|
| 465 | 451 |
|
| 466 | 452 |
updateSaveLocalOperation();
|
| ... | ... | @@ -476,12 +462,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> { |
| 476 | 462 |
// ajout de l'onglet de sauvegarde de la base distante
|
| 477 | 463 |
universe.add(AdminStep.EXPORT_DATA);
|
| 478 | 464 |
}
|
| 479 |
- |
|
| 480 |
- if (needResume) {
|
|
| 481 |
- |
|
| 482 |
- // ajout d'un onglet de resume
|
|
| 483 |
- universe.add(AdminStep.SHOW_RESUME);
|
|
| 484 |
- }
|
|
| 485 | 465 |
}
|
| 486 | 466 |
return universe.toArray(new AdminStep[0]);
|
| 487 | 467 |
}
|
| ... | ... | @@ -28,7 +28,6 @@ import fr.ird.observe.client.datasource.actions.AdminActionWorker; |
| 28 | 28 |
import fr.ird.observe.client.datasource.actions.AdminStep;
|
| 29 | 29 |
import fr.ird.observe.client.datasource.actions.AdminTabUI;
|
| 30 | 30 |
import fr.ird.observe.client.datasource.actions.AdminUI;
|
| 31 |
-import fr.ird.observe.client.datasource.actions.resume.ShowResumeUI;
|
|
| 32 | 31 |
import fr.ird.observe.client.datasource.api.ObserveSwingDataSource;
|
| 33 | 32 |
import fr.ird.observe.client.datasource.editor.content.ref.usage.UsageForDisplayUI;
|
| 34 | 33 |
import fr.ird.observe.client.datasource.editor.content.ref.usage.UsageForDisplayUIHandler;
|
| ... | ... | @@ -98,14 +97,8 @@ public abstract class AdminTabUIActionSupport<U extends AdminTabUI> extends JCom |
| 98 | 97 |
|
| 99 | 98 |
|
| 100 | 99 |
public String sendMessage(String message) {
|
| 101 |
- |
|
| 102 | 100 |
AdminStep step = ui.getStep();
|
| 103 | 101 |
addMessage(step, message);
|
| 104 |
- AdminUI parentUI = getParentUI();
|
|
| 105 |
- ShowResumeUI resumeUI = (ShowResumeUI) parentUI.getStepUI(AdminStep.SHOW_RESUME);
|
|
| 106 |
- if (resumeUI != null) {
|
|
| 107 |
- addMessage(resumeUI, step, message);
|
|
| 108 |
- }
|
|
| 109 | 102 |
return message;
|
| 110 | 103 |
}
|
| 111 | 104 |
|
| 1 |
-package fr.ird.observe.client.datasource.actions.resume;
|
|
| 2 |
- |
|
| 3 |
-/*-
|
|
| 4 |
- * #%L
|
|
| 5 |
- * ObServe :: Client DataSource actions
|
|
| 6 |
- * %%
|
|
| 7 |
- * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
|
|
| 8 |
- * %%
|
|
| 9 |
- * This program is free software: you can redistribute it and/or modify
|
|
| 10 |
- * it under the terms of the GNU General Public License as
|
|
| 11 |
- * published by the Free Software Foundation, either version 3 of the
|
|
| 12 |
- * License, or (at your option) any later version.
|
|
| 13 |
- *
|
|
| 14 |
- * This program is distributed in the hope that it will be useful,
|
|
| 15 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 16 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 17 |
- * GNU General Public License for more details.
|
|
| 18 |
- *
|
|
| 19 |
- * You should have received a copy of the GNU General Public
|
|
| 20 |
- * License along with this program. If not, see
|
|
| 21 |
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 22 |
- * #L%
|
|
| 23 |
- */
|
|
| 24 |
- |
|
| 25 |
-import fr.ird.observe.client.datasource.actions.AdminActionModel;
|
|
| 26 |
-import fr.ird.observe.client.datasource.actions.AdminStep;
|
|
| 27 |
-import fr.ird.observe.client.datasource.actions.AdminUIModel;
|
|
| 28 |
- |
|
| 29 |
-/**
|
|
| 30 |
- * Created on 28/11/16.
|
|
| 31 |
- *
|
|
| 32 |
- * @author Tony Chemit - dev@tchemit.fr
|
|
| 33 |
- * @since 6.0
|
|
| 34 |
- */
|
|
| 35 |
-public class ShowResumeModel extends AdminActionModel {
|
|
| 36 |
- public ShowResumeModel() {
|
|
| 37 |
- super(AdminStep.SHOW_RESUME);
|
|
| 38 |
- }
|
|
| 39 |
- |
|
| 40 |
- public boolean validate(AdminUIModel uiModel) {
|
|
| 41 |
- return true;
|
|
| 42 |
- }
|
|
| 43 |
-}
|
| 1 |
-<!--
|
|
| 2 |
- #%L
|
|
| 3 |
- ObServe :: Client DataSource actions
|
|
| 4 |
- %%
|
|
| 5 |
- Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
|
|
| 6 |
- %%
|
|
| 7 |
- This program is free software: you can redistribute it and/or modify
|
|
| 8 |
- it under the terms of the GNU General Public License as
|
|
| 9 |
- published by the Free Software Foundation, either version 3 of the
|
|
| 10 |
- License, or (at your option) any later version.
|
|
| 11 |
- This program is distributed in the hope that it will be useful,
|
|
| 12 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 13 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 14 |
- GNU General Public License for more details.
|
|
| 15 |
- You should have received a copy of the GNU General Public
|
|
| 16 |
- License along with this program. If not, see
|
|
| 17 |
- <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 18 |
- #L%
|
|
| 19 |
- -->
|
|
| 20 |
- |
|
| 21 |
-<fr.ird.observe.client.datasource.actions.AdminTabUI>
|
|
| 22 |
- |
|
| 23 |
- <import>
|
|
| 24 |
- fr.ird.observe.client.util.UIHelper
|
|
| 25 |
- fr.ird.observe.client.datasource.actions.AdminUI
|
|
| 26 |
- fr.ird.observe.client.datasource.actions.AdminTabUI
|
|
| 27 |
- |
|
| 28 |
- java.awt.Dimension
|
|
| 29 |
- </import>
|
|
| 30 |
- |
|
| 31 |
- <ShowResumeModel id='stepModel' initializer='getModel().getShowResumeModel()'/>
|
|
| 32 |
- |
|
| 33 |
- <JPanel id='PENDING_content'>
|
|
| 34 |
- <Table constraints='BorderLayout.CENTER' fill='both' weightx='1'
|
|
| 35 |
- weighty='1'>
|
|
| 36 |
- <row>
|
|
| 37 |
- <cell>
|
|
| 38 |
- <JScrollPane id='resumePane'>
|
|
| 39 |
- <JTextArea id='resume'/>
|
|
| 40 |
- </JScrollPane>
|
|
| 41 |
- </cell>
|
|
| 42 |
- </row>
|
|
| 43 |
- <row>
|
|
| 44 |
- <cell>
|
|
| 45 |
- <JScrollPane id='globalProgressionPane' columnHeaderView='{globalProgressionTop}'>
|
|
| 46 |
- <JTextArea id='globalProgression'/>
|
|
| 47 |
- <JToolBar id='globalProgressionTop'>
|
|
| 48 |
- <JLabel id='globalProgressionTopLabel'/>
|
|
| 49 |
- <javax.swing.Box.Filler
|
|
| 50 |
- constructorParams='UIHelper.newMinDimension(), UIHelper.newMinDimension(), UIHelper.newMaxXDimension()'/>
|
|
| 51 |
- <JButton id="copyToClipBoard"/>
|
|
| 52 |
- </JToolBar>
|
|
| 53 |
- </JScrollPane>
|
|
| 54 |
- </cell>
|
|
| 55 |
- </row>
|
|
| 56 |
- </Table>
|
|
| 57 |
- </JPanel>
|
|
| 58 |
- |
|
| 59 |
-</fr.ird.observe.client.datasource.actions.AdminTabUI>
|
| 1 |
-/*
|
|
| 2 |
- * #%L
|
|
| 3 |
- * ObServe :: Client DataSource actions
|
|
| 4 |
- * %%
|
|
| 5 |
- * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
|
|
| 6 |
- * %%
|
|
| 7 |
- * This program is free software: you can redistribute it and/or modify
|
|
| 8 |
- * it under the terms of the GNU General Public License as
|
|
| 9 |
- * published by the Free Software Foundation, either version 3 of the
|
|
| 10 |
- * License, or (at your option) any later version.
|
|
| 11 |
- *
|
|
| 12 |
- * This program is distributed in the hope that it will be useful,
|
|
| 13 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 14 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 15 |
- * GNU General Public License for more details.
|
|
| 16 |
- *
|
|
| 17 |
- * You should have received a copy of the GNU General Public
|
|
| 18 |
- * License along with this program. If not, see
|
|
| 19 |
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 20 |
- * #L%
|
|
| 21 |
- */
|
|
| 22 |
- |
|
| 23 |
-#PENDING_content {
|
|
| 24 |
- layout:{new BorderLayout()};
|
|
| 25 |
-}
|
|
| 26 |
- |
|
| 27 |
-#resumePane {
|
|
| 28 |
- minimumSize:{new Dimension(0,0)};
|
|
| 29 |
- horizontalScrollBarPolicy:{JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED};
|
|
| 30 |
- columnHeaderView:{UIHelper.newLabel(t("observe.common.operation.resume") ,"wizard-message", 10)};
|
|
| 31 |
-}
|
|
| 32 |
- |
|
| 33 |
-#resume {
|
|
| 34 |
- editable:false;
|
|
| 35 |
- focusable:true;
|
|
| 36 |
-}
|
|
| 37 |
- |
|
| 38 |
-#globalProgressionPane {
|
|
| 39 |
- minimumSize:{new Dimension(0,0)};
|
|
| 40 |
- horizontalScrollBarPolicy:{JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED};
|
|
| 41 |
-}
|
|
| 42 |
- |
|
| 43 |
-#globalProgression {
|
|
| 44 |
- font-size:10;
|
|
| 45 |
- focusable:true;
|
|
| 46 |
- lineWrap:false;
|
|
| 47 |
- editable:false;
|
|
| 48 |
-}
|
|
| 49 |
- |
|
| 50 |
-#globalProgressionTop {
|
|
| 51 |
- floatable:false;
|
|
| 52 |
-}
|
|
| 53 |
- |
|
| 54 |
-#globalProgressionTopLabel {
|
|
| 55 |
- text:"observe.common.global.progression.description";
|
|
| 56 |
- actionIcon:"wizard-message";
|
|
| 57 |
-}
|
|
| 58 |
- |
|
| 59 |
- |
| 1 |
-/*
|
|
| 2 |
- * #%L
|
|
| 3 |
- * ObServe :: Client DataSource actions
|
|
| 4 |
- * %%
|
|
| 5 |
- * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
|
|
| 6 |
- * %%
|
|
| 7 |
- * This program is free software: you can redistribute it and/or modify
|
|
| 8 |
- * it under the terms of the GNU General Public License as
|
|
| 9 |
- * published by the Free Software Foundation, either version 3 of the
|
|
| 10 |
- * License, or (at your option) any later version.
|
|
| 11 |
- *
|
|
| 12 |
- * This program is distributed in the hope that it will be useful,
|
|
| 13 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 14 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 15 |
- * GNU General Public License for more details.
|
|
| 16 |
- *
|
|
| 17 |
- * You should have received a copy of the GNU General Public
|
|
| 18 |
- * License along with this program. If not, see
|
|
| 19 |
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 20 |
- * #L%
|
|
| 21 |
- */
|
|
| 22 |
-package fr.ird.observe.client.datasource.actions.resume;
|
|
| 23 |
- |
|
| 24 |
-import fr.ird.observe.client.datasource.actions.AdminStep;
|
|
| 25 |
-import fr.ird.observe.client.datasource.actions.AdminTabUIHandler;
|
|
| 26 |
-import fr.ird.observe.client.datasource.actions.AdminUIModel;
|
|
| 27 |
-import fr.ird.observe.client.util.UIHelper;
|
|
| 28 |
-import fr.ird.observe.dto.I18nEnumHelper;
|
|
| 29 |
-import org.nuiton.jaxx.runtime.spi.UIHandler;
|
|
| 30 |
-import org.nuiton.jaxx.runtime.swing.wizard.ext.WizardState;
|
|
| 31 |
- |
|
| 32 |
-import static io.ultreia.java4all.i18n.I18n.t;
|
|
| 33 |
- |
|
| 34 |
-/**
|
|
| 35 |
- * Le controleur des onglets.
|
|
| 36 |
- *
|
|
| 37 |
- * @author Tony Chemit - dev@tchemit.fr
|
|
| 38 |
- * @since 1.4
|
|
| 39 |
- */
|
|
| 40 |
-public class ShowResumeUIHandler extends AdminTabUIHandler<ShowResumeUI> implements UIHandler<ShowResumeUI> {
|
|
| 41 |
- |
|
| 42 |
- @Override
|
|
| 43 |
- public void afterInit(ShowResumeUI ui) {
|
|
| 44 |
- super.afterInit(ui);
|
|
| 45 |
- UIHelper.setLayerUI(ui.getContent(), null);
|
|
| 46 |
- }
|
|
| 47 |
- |
|
| 48 |
- public void updateText() {
|
|
| 49 |
- AdminUIModel model = ui.getModel();
|
|
| 50 |
- StringBuilder buffer = new StringBuilder();
|
|
| 51 |
- if (!model.isWasStarted()) {
|
|
| 52 |
- buffer.append(t("observe.admin.resume.no.operation.done"));
|
|
| 53 |
- } else {
|
|
| 54 |
- for (AdminStep s : model.getOperations()) {
|
|
| 55 |
- WizardState state = model.getStepState(s);
|
|
| 56 |
- String stateStr = "";
|
|
| 57 |
- switch (state) {
|
|
| 58 |
- case CANCELED:
|
|
| 59 |
- stateStr = t("observe.admin.resume.operation.canceled");
|
|
| 60 |
- break;
|
|
| 61 |
- case FAILED:
|
|
| 62 |
- stateStr = t("observe.admin.resume.operation.failed");
|
|
| 63 |
- break;
|
|
| 64 |
- case NEED_FIX:
|
|
| 65 |
- stateStr = t("observe.admin.resume.operation.need.fix");
|
|
| 66 |
- break;
|
|
| 67 |
- case PENDING:
|
|
| 68 |
- stateStr = t("observe.admin.resume.operation.not.started");
|
|
| 69 |
- break;
|
|
| 70 |
- case RUNNING:
|
|
| 71 |
- stateStr = t("observe.admin.resume.operation.running");
|
|
| 72 |
- break;
|
|
| 73 |
- case SUCCESSED:
|
|
| 74 |
- stateStr = t("observe.admin.resume.operation.done");
|
|
| 75 |
- break;
|
|
| 76 |
- }
|
|
| 77 |
- buffer.append("\n\n");
|
|
| 78 |
- buffer.append(I18nEnumHelper.getLabel(s));
|
|
| 79 |
- buffer.append(" : ");
|
|
| 80 |
- buffer.append(stateStr);
|
|
| 81 |
- buffer.append(".");
|
|
| 82 |
- }
|
|
| 83 |
- buffer.append("\n\n");
|
|
| 84 |
- }
|
|
| 85 |
- getUi().getResume().setText(buffer.toString());
|
|
| 86 |
- }
|
|
| 87 |
- |
|
| 88 |
- public void addMessage(AdminStep step, String text) {
|
|
| 89 |
- getUi().getGlobalProgression().append(I18nEnumHelper.getLabel(step) + " - " + text + "\n");
|
|
| 90 |
- }
|
|
| 91 |
-}
|
| 1 |
-package fr.ird.observe.client.datasource.actions.resume.actions;
|
|
| 2 |
- |
|
| 3 |
-/*-
|
|
| 4 |
- * #%L
|
|
| 5 |
- * ObServe :: Client DataSource actions
|
|
| 6 |
- * %%
|
|
| 7 |
- * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
|
|
| 8 |
- * %%
|
|
| 9 |
- * This program is free software: you can redistribute it and/or modify
|
|
| 10 |
- * it under the terms of the GNU General Public License as
|
|
| 11 |
- * published by the Free Software Foundation, either version 3 of the
|
|
| 12 |
- * License, or (at your option) any later version.
|
|
| 13 |
- *
|
|
| 14 |
- * This program is distributed in the hope that it will be useful,
|
|
| 15 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 16 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 17 |
- * GNU General Public License for more details.
|
|
| 18 |
- *
|
|
| 19 |
- * You should have received a copy of the GNU General Public
|
|
| 20 |
- * License along with this program. If not, see
|
|
| 21 |
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 22 |
- * #L%
|
|
| 23 |
- */
|
|
| 24 |
- |
|
| 25 |
-import fr.ird.observe.client.datasource.actions.actions.AdminTabUIActionSupport;
|
|
| 26 |
-import fr.ird.observe.client.datasource.actions.resume.ShowResumeUI;
|
|
| 27 |
-import fr.ird.observe.client.util.ObserveKeyStrokesSupport;
|
|
| 28 |
-import fr.ird.observe.client.util.UIHelper;
|
|
| 29 |
- |
|
| 30 |
-import java.awt.event.ActionEvent;
|
|
| 31 |
- |
|
| 32 |
-import static io.ultreia.java4all.i18n.I18n.t;
|
|
| 33 |
- |
|
| 34 |
-public class CopyResumeToClipBoard extends AdminTabUIActionSupport<ShowResumeUI> {
|
|
| 35 |
- |
|
| 36 |
- public CopyResumeToClipBoard() {
|
|
| 37 |
- super(t("observe.action.copy.to.clipBoard"), t("observe.action.copy.to.clipBoard"), "report-copy", ObserveKeyStrokesSupport.KEY_STROKE_COPY_TO_CLIPBOARD);
|
|
| 38 |
- }
|
|
| 39 |
- |
|
| 40 |
- @Override
|
|
| 41 |
- protected void doActionPerformed(ActionEvent e, ShowResumeUI ui) {
|
|
| 42 |
- UIHelper.copyToClipBoard(ui.getGlobalProgression().getText());
|
|
| 43 |
- }
|
|
| 44 |
- |
|
| 45 |
-}
|
| ... | ... | @@ -27,7 +27,6 @@ import com.google.common.collect.ImmutableSet; |
| 27 | 27 |
import fr.ird.observe.client.datasource.actions.AdminStep;
|
| 28 | 28 |
import fr.ird.observe.client.datasource.actions.AdminTabUI;
|
| 29 | 29 |
import fr.ird.observe.client.datasource.actions.AdminUI;
|
| 30 |
-import fr.ird.observe.client.datasource.actions.resume.ShowResumeUI;
|
|
| 31 | 30 |
import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialReplaceUI;
|
| 32 | 31 |
import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialReplaceUIHandler;
|
| 33 | 32 |
import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialSynchroModel;
|
| ... | ... | @@ -304,14 +303,8 @@ public abstract class RegisterTaskActionSupport extends ReferentialSelectionTree |
| 304 | 303 |
}
|
| 305 | 304 |
|
| 306 | 305 |
public String sendMessage(String message) {
|
| 307 |
- |
|
| 308 | 306 |
AdminStep step = parentUI.getStep();
|
| 309 | 307 |
addMessage(step, message);
|
| 310 |
- AdminUI parentUI = getParentUI();
|
|
| 311 |
- ShowResumeUI resumeUI = (ShowResumeUI) parentUI.getStepUI(AdminStep.SHOW_RESUME);
|
|
| 312 |
- if (resumeUI != null) {
|
|
| 313 |
- addMessage(resumeUI, step, message);
|
|
| 314 |
- }
|
|
| 315 | 308 |
return message;
|
| 316 | 309 |
}
|
| 317 | 310 |
|
| ... | ... | @@ -83,7 +83,6 @@ public class SaveReport extends ValidateUIActionSupport { |
| 83 | 83 |
String content = ValidateModelTemplate.generate(validationModel);
|
| 84 | 84 |
|
| 85 | 85 |
log.debug(content);
|
| 86 |
- addMessage(AdminStep.SHOW_RESUME, content);
|
|
| 87 | 86 |
FileUtils.write(reportFile, content, StandardCharsets.UTF_8.name());
|
| 88 | 87 |
}
|
| 89 | 88 |
|
| ... | ... | @@ -374,13 +374,6 @@ observe.admin.report.select.file.tip=Choose file of reports definitions |
| 374 | 374 |
observe.admin.report.title=Help to generat reports
|
| 375 | 375 |
observe.admin.report.title.tip=Help to generate reports
|
| 376 | 376 |
observe.admin.report.variables=Variables configuration
|
| 377 |
-observe.admin.resume.no.operation.done=No operation done.
|
|
| 378 |
-observe.admin.resume.operation.canceled=operation canceled
|
|
| 379 |
-observe.admin.resume.operation.done=operation done
|
|
| 380 |
-observe.admin.resume.operation.failed=operation failed
|
|
| 381 |
-observe.admin.resume.operation.need.fix=operation need fix
|
|
| 382 |
-observe.admin.resume.operation.not.started=operation not started
|
|
| 383 |
-observe.admin.resume.operation.running=operation is running...
|
|
| 384 | 377 |
observe.backup.done=[%s] Auto backup done (in %s)
|
| 385 | 378 |
observe.backup.start=[%s] Start auto backup
|
| 386 | 379 |
observe.choice.cancel=Cancel
|
| ... | ... | @@ -433,7 +426,6 @@ observe.common.gps.gpsPoint=Gps point |
| 433 | 426 |
observe.common.label=Label
|
| 434 | 427 |
observe.common.lengthWeightFormula=Length weight formula
|
| 435 | 428 |
observe.common.no.unit=No unit
|
| 436 |
-observe.common.operation.resume=Summary of operations
|
|
| 437 | 429 |
observe.common.resume=Summary
|
| 438 | 430 |
observe.common.saveFile.overwrite=file alreayd exists, would you like to overwrite it?
|
| 439 | 431 |
observe.common.saveFile.overwrite.cancel=Cancel
|
| ... | ... | @@ -593,8 +585,6 @@ observe.constant.AdminStep.SAVE_LOCAL=Save local database |
| 593 | 585 |
observe.constant.AdminStep.SAVE_LOCAL.description=Save modifcations on local database
|
| 594 | 586 |
observe.constant.AdminStep.SELECT_DATA=Select data
|
| 595 | 587 |
observe.constant.AdminStep.SELECT_DATA.description=Select data for operations
|
| 596 |
-observe.constant.AdminStep.SHOW_RESUME=Summary
|
|
| 597 |
-observe.constant.AdminStep.SHOW_RESUME.description=Summary of operations
|
|
| 598 | 588 |
observe.constant.AdminStep.SYNCHRONIZE=Update referential
|
| 599 | 589 |
observe.constant.AdminStep.SYNCHRONIZE.description=Update referential
|
| 600 | 590 |
observe.constant.AdminStep.VALIDATE=Validation
|
| ... | ... | @@ -374,13 +374,6 @@ observe.admin.report.select.file.tip=Elegir el archivo de definición de informe |
| 374 | 374 |
observe.admin.report.title=Ayuda a la generación de informes
|
| 375 | 375 |
observe.admin.report.title.tip=Ayuda a la generación del informe de fin del embarque
|
| 376 | 376 |
observe.admin.report.variables=Configuración de variables
|
| 377 |
-observe.admin.resume.no.operation.done=Ninguna operación realizada
|
|
| 378 |
-observe.admin.resume.operation.canceled=operación cancelada
|
|
| 379 |
-observe.admin.resume.operation.done=operacion realizada
|
|
| 380 |
-observe.admin.resume.operation.failed=operación no realizada
|
|
| 381 |
-observe.admin.resume.operation.need.fix=la operación necesita correcciones
|
|
| 382 |
-observe.admin.resume.operation.not.started=operación no empezada
|
|
| 383 |
-observe.admin.resume.operation.running=operación en curso...
|
|
| 384 | 377 |
observe.backup.done=[%s] Copia de seguridad automática realizada (en %s)
|
| 385 | 378 |
observe.backup.start=[%s] Inicio de copia de seguridad automática
|
| 386 | 379 |
observe.choice.cancel=Cancelar
|
| ... | ... | @@ -433,7 +426,6 @@ observe.common.gps.gpsPoint=Punto GPS |
| 433 | 426 |
observe.common.label=Texto
|
| 434 | 427 |
observe.common.lengthWeightFormula=Relación de peso
|
| 435 | 428 |
observe.common.no.unit=No unit \#TODO
|
| 436 |
-observe.common.operation.resume=Resumen de operaciones
|
|
| 437 | 429 |
observe.common.resume=Resumen de la configuración
|
| 438 | 430 |
observe.common.saveFile.overwrite=El archivo ya existe. Quiere reemplazar lo ?
|
| 439 | 431 |
observe.common.saveFile.overwrite.cancel=Cancelar
|
| ... | ... | @@ -593,8 +585,6 @@ observe.constant.AdminStep.SAVE_LOCAL=Copia local de seguridad |
| 593 | 585 |
observe.constant.AdminStep.SAVE_LOCAL.description=Guardar las modificaciones realizadas en la base original
|
| 594 | 586 |
observe.constant.AdminStep.SELECT_DATA=Selección de datos
|
| 595 | 587 |
observe.constant.AdminStep.SELECT_DATA.description=Selección de los datos para la realización de los operaciones
|
| 596 |
-observe.constant.AdminStep.SHOW_RESUME=Resumen
|
|
| 597 |
-observe.constant.AdminStep.SHOW_RESUME.description=Ver un resumen de los operaciones realizadas
|
|
| 598 | 588 |
observe.constant.AdminStep.SYNCHRONIZE=Actualización del referencial
|
| 599 | 589 |
observe.constant.AdminStep.SYNCHRONIZE.description=Actualizar el referencial con una base central
|
| 600 | 590 |
observe.constant.AdminStep.VALIDATE=Validación
|
| ... | ... | @@ -374,13 +374,6 @@ observe.admin.report.select.file.tip=Choisir le fichier de définition des repor |
| 374 | 374 |
observe.admin.report.title=Aide à la génération de rapport
|
| 375 | 375 |
observe.admin.report.title.tip=Aide à la génération du rapport de fin d'embarquement
|
| 376 | 376 |
observe.admin.report.variables=Configuration des variables
|
| 377 |
-observe.admin.resume.no.operation.done=Aucune opération réalisée.
|
|
| 378 |
-observe.admin.resume.operation.canceled=opération annulée
|
|
| 379 |
-observe.admin.resume.operation.done=opération réussie
|
|
| 380 |
-observe.admin.resume.operation.failed=opération échouée
|
|
| 381 |
-observe.admin.resume.operation.need.fix=opération nécessitant des corrections
|
|
| 382 |
-observe.admin.resume.operation.not.started=opération non démarrée
|
|
| 383 |
-observe.admin.resume.operation.running=opération en cours...
|
|
| 384 | 377 |
observe.backup.done=[%s] Fin de la sauvegarde automatique (en %s)
|
| 385 | 378 |
observe.backup.start=[%s] Début de la sauvegarde automatique
|
| 386 | 379 |
observe.choice.cancel=Annuler
|
| ... | ... | @@ -433,7 +426,6 @@ observe.common.gps.gpsPoint=Point GPS |
| 433 | 426 |
observe.common.label=Libellé
|
| 434 | 427 |
observe.common.lengthWeightFormula=Relation Poids
|
| 435 | 428 |
observe.common.no.unit=Pas d'unité
|
| 436 |
-observe.common.operation.resume=Résumé des opérations
|
|
| 437 | 429 |
observe.common.resume=Résumé de la configuration
|
| 438 | 430 |
observe.common.saveFile.overwrite=Le fichier existe déjà. Voulez-vous le remplacer ?
|
| 439 | 431 |
observe.common.saveFile.overwrite.cancel=Annuler
|
| ... | ... | @@ -593,8 +585,6 @@ observe.constant.AdminStep.SAVE_LOCAL=Sauvegarde locale |
| 593 | 585 |
observe.constant.AdminStep.SAVE_LOCAL.description=Sauver les modifications sur votre base source
|
| 594 | 586 |
observe.constant.AdminStep.SELECT_DATA=Sélection des données
|
| 595 | 587 |
observe.constant.AdminStep.SELECT_DATA.description=Sélection des données pour effectuer les opérations
|
| 596 |
-observe.constant.AdminStep.SHOW_RESUME=Résumé
|
|
| 597 |
-observe.constant.AdminStep.SHOW_RESUME.description=Voir un résumé des opérations effectuées
|
|
| 598 | 588 |
observe.constant.AdminStep.SYNCHRONIZE=Mise à jour du référentiel
|
| 599 | 589 |
observe.constant.AdminStep.SYNCHRONIZE.description=Mettre à jour le référentiel depuis une base centrale
|
| 600 | 590 |
observe.constant.AdminStep.VALIDATE=Validation
|
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 |
<parent>
|
| 25 | 25 |
<groupId>io.ultreia.maven</groupId>
|
| 26 | 26 |
<artifactId>pom</artifactId>
|
| 27 |
- <version>2020.18</version>
|
|
| 27 |
+ <version>2020.19</version>
|
|
| 28 | 28 |
</parent>
|
| 29 | 29 |
|
| 30 | 30 |
<groupId>fr.ird.observe</groupId>
|
| ... | ... | @@ -170,7 +170,7 @@ |
| 170 | 170 |
|
| 171 | 171 |
<!-- <lib.version.java4all.topia>1.17</lib.version.java4all.topia>-->
|
| 172 | 172 |
<!--<lib.version.java4all.eugene>3.0<-alpha-22</lib.version.java4all.eugene>-->
|
| 173 |
-<!-- <lib.version.java4all.jaxx>3.0-alpha-66-SNAPSHOT</lib.version.java4all.jaxx>-->
|
|
| 173 |
+<!-- <lib.version.java4all.jaxx>3.0-alpha-67-SNAPSHOT</lib.version.java4all.jaxx>-->
|
|
| 174 | 174 |
<!--<lib.version.java4all.application-context>1.0.3-SNAPSHOT</lib.version.java4all.application-context>-->
|
| 175 | 175 |
<!--<lib.version.java4all.application-template>1.0.2-SNAPSHOT</lib.version.java4all.application-template>-->
|
| 176 | 176 |
<!--<lib.version.java4all.i18n>4.0-beta-3-SNAPSHOT</lib.version.java4all.i18n>-->
|