Observe-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
April 2020
- 1 participants
- 54 discussions
[Git][ultreiaio/ird-observe][develop-7.x] Suppression de l'onglet résumé sur les assistants (Report v8 → v7) - Closes #1468
by Tony CHEMIT 18 Apr '20
by Tony CHEMIT 18 Apr '20
18 Apr '20
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
ab333995 by tchemit at 2020-04-18T08:43:04+02:00
Suppression de l'onglet résumé sur les assistants (Report v8 → v7) - Closes #1468
- - - - -
15 changed files:
- client-core/src/main/i18n/getters/java-enumeration.getter
- client-core/src/main/i18n/getters/java.getter
- client-core/src/main/i18n/getters/jaxx.getter
- client-core/src/main/java/fr/ird/observe/client/ui/admin/AdminStep.java
- client-core/src/main/java/fr/ird/observe/client/ui/admin/AdminTabUIHandler.java
- client-core/src/main/java/fr/ird/observe/client/ui/admin/AdminUIHandler.java
- client-core/src/main/java/fr/ird/observe/client/ui/admin/AdminUIModel.java
- − client-core/src/main/java/fr/ird/observe/client/ui/admin/resume/ShowResumeModel.java
- − client-core/src/main/java/fr/ird/observe/client/ui/admin/resume/ShowResumeUI.jaxx
- − client-core/src/main/java/fr/ird/observe/client/ui/admin/resume/ShowResumeUI.jcss
- − client-core/src/main/java/fr/ird/observe/client/ui/admin/resume/ShowResumeUIHandler.java
- client-core/src/main/java/fr/ird/observe/client/ui/admin/validate/ValidateUIHandler.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
Changes:
=====================================
client-core/src/main/i18n/getters/java-enumeration.getter
=====================================
@@ -14,8 +14,6 @@ observe.constant.AdminStep.SAVE_LOCAL
observe.constant.AdminStep.SAVE_LOCAL.description
observe.constant.AdminStep.SELECT_DATA
observe.constant.AdminStep.SELECT_DATA.description
-observe.constant.AdminStep.SHOW_RESUME
-observe.constant.AdminStep.SHOW_RESUME.description
observe.constant.AdminStep.SYNCHRONIZE
observe.constant.AdminStep.SYNCHRONIZE.description
observe.constant.AdminStep.VALIDATE
=====================================
client-core/src/main/i18n/getters/java.getter
=====================================
@@ -247,13 +247,6 @@ observe.actions.validate.validator.message.header
observe.actions.validate.validator.message.header.tip
observe.actions.validate.validator.scope.header
observe.actions.validate.validator.scope.header.tip
-observe.admin.resume.no.operation.done
-observe.admin.resume.operation.canceled
-observe.admin.resume.operation.done
-observe.admin.resume.operation.failed
-observe.admin.resume.operation.need.fix
-observe.admin.resume.operation.not.started
-observe.admin.resume.operation.running
observe.backup.done
observe.backup.start
observe.choice.cancel
=====================================
client-core/src/main/i18n/getters/jaxx.getter
=====================================
@@ -724,7 +724,6 @@ observe.common.directory
observe.common.file
observe.common.global.progression.description
observe.common.ocean
-observe.common.operation.resume
observe.common.resume
observe.common.sizeMeasureType
observe.common.species
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/admin/AdminStep.java
=====================================
@@ -30,7 +30,6 @@ import fr.ird.observe.client.ui.admin.export.ExportModel;
import fr.ird.observe.client.ui.admin.export.ExportUI;
import fr.ird.observe.client.ui.admin.report.ReportModel;
import fr.ird.observe.client.ui.admin.report.ReportUI;
-import fr.ird.observe.client.ui.admin.resume.ShowResumeUI;
import fr.ird.observe.client.ui.admin.save.SaveLocalModel;
import fr.ird.observe.client.ui.admin.save.SaveLocalUI;
import fr.ird.observe.client.ui.admin.synchronize.data.DataSynchroModel;
@@ -218,13 +217,6 @@ public enum AdminStep implements WizardExtStep {
DbMode.USE_LOCAL,
DbMode.USE_REMOTE,
DbMode.USE_SERVER
- ),
-
- /** pour afficher après les opération un ecran de résumé */
- SHOW_RESUME(
- null,
- ShowResumeUI.class,
- false
);
private final String iconName;
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/admin/AdminTabUIHandler.java
=====================================
@@ -24,7 +24,6 @@ package fr.ird.observe.client.ui.admin;
import fr.ird.observe.client.ObserveRunner;
import fr.ird.observe.client.ObserveSwingApplicationContext;
import fr.ird.observe.client.db.ObserveSwingDataSource;
-import fr.ird.observe.client.ui.admin.resume.ShowResumeUI;
import fr.ird.observe.client.ui.content.ref.usage.UsageForDisplayUI;
import fr.ird.observe.client.ui.util.ProgressModel;
import fr.ird.observe.client.ui.util.UIHelper;
@@ -161,13 +160,8 @@ public class AdminTabUIHandler<U extends AdminTabUI> {
}
public void sendMessage(String message) {
-
AdminStep step = ui.getStep();
ui.addMessage(step, message);
- ShowResumeUI resumeUI = (ShowResumeUI) parentUI.getStepUI(AdminStep.SHOW_RESUME);
- if (resumeUI != null) {
- resumeUI.addMessage(step, message);
- }
}
public String getProgressString(int currentStep, int nbStep) {
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/admin/AdminUIHandler.java
=====================================
@@ -28,7 +28,6 @@ import fr.ird.observe.client.ui.admin.config.ConfigUI;
import fr.ird.observe.client.ui.admin.config.SelectDataUI;
import fr.ird.observe.client.ui.admin.consolidate.ConsolidateUI;
import fr.ird.observe.client.ui.admin.export.ExportUI;
-import fr.ird.observe.client.ui.admin.resume.ShowResumeUI;
import fr.ird.observe.client.ui.admin.save.SaveLocalUI;
import fr.ird.observe.client.ui.admin.synchronize.data.DataSynchroUI;
import fr.ird.observe.client.ui.admin.synchronize.referential.legacy.SynchronizeUI;
@@ -36,8 +35,8 @@ import fr.ird.observe.client.ui.admin.synchronize.referential.ng.ReferentialSync
import fr.ird.observe.client.ui.admin.validate.ValidateUI;
import fr.ird.observe.client.ui.util.UIHelper;
import fr.ird.observe.dto.I18nEnumHelper;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.jaxx.runtime.spi.UIHandler;
import org.nuiton.jaxx.runtime.swing.wizard.WizardUILancher;
import org.nuiton.jaxx.runtime.swing.wizard.ext.WizardExtUtil;
@@ -302,12 +301,6 @@ public class AdminUIHandler implements UIHandler<AdminUI> {
SaveLocalUI tabUI = (SaveLocalUI) ui.getStepUI(AdminStep.SAVE_LOCAL);
tabUI.getHandler().updateText();
}
- if (c != null && c.getStep() == AdminStep.SHOW_RESUME) {
-
- // on met a jour le resumé des opérations
- ShowResumeUI showResumeUI = (ShowResumeUI) ui.getStepUI(AdminStep.SHOW_RESUME);
- showResumeUI.getHandler().updateText();
- }
// selection du nouvel onglet
int index = ui.tabs.indexOfComponent(c);
@@ -386,14 +379,6 @@ public class AdminUIHandler implements UIHandler<AdminUI> {
itr = UIHelper.newTabbedPaneIterator(ui.getTabs());
}
- if (selected != null && selected.getStep() == AdminStep.SHOW_RESUME) {
-
- // rien a faire sur le dernier onglet
- if (log.isDebugEnabled()) {
- log.debug("We are on last step (resume), nothing to do.");
- }
- return;
- }
boolean[] accessibleSteps = ui.getModel().getAccessibleSteps();
if (log.isDebugEnabled()) {
log.debug("Accessibles step : " + Arrays.toString(accessibleSteps));
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/admin/AdminUIModel.java
=====================================
@@ -27,14 +27,13 @@ import fr.ird.observe.client.ui.admin.config.SelectDataModel;
import fr.ird.observe.client.ui.admin.consolidate.ConsolidateModel;
import fr.ird.observe.client.ui.admin.export.ExportModel;
import fr.ird.observe.client.ui.admin.report.ReportModel;
-import fr.ird.observe.client.ui.admin.resume.ShowResumeModel;
import fr.ird.observe.client.ui.admin.save.SaveLocalModel;
import fr.ird.observe.client.ui.admin.synchronize.data.DataSynchroModel;
import fr.ird.observe.client.ui.admin.synchronize.referential.legacy.SynchronizeModel;
import fr.ird.observe.client.ui.admin.synchronize.referential.ng.ReferentialSynchroModel;
import fr.ird.observe.client.ui.admin.validate.ValidateModel;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.jaxx.runtime.swing.wizard.ext.WizardExtModel;
import org.nuiton.jaxx.runtime.swing.wizard.ext.WizardState;
@@ -68,8 +67,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> {
protected final SelectDataModel selectDataModel = new SelectDataModel();
- protected final ShowResumeModel showResumeModel = new ShowResumeModel();
-
/** la liste des modes disponibles en entrée */
protected final EnumSet<DbMode> availableIncomingModes;
@@ -158,10 +155,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> {
return configModel;
}
- public ShowResumeModel getShowResumeModel() {
- return showResumeModel;
- }
-
public SelectDataModel getSelectDataModel() {
return selectDataModel;
}
@@ -402,8 +395,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> {
return getSynchronizeReferentielModel().validate(this, step);
case SAVE_LOCAL:
return getSaveLocalModel().validate(this, step);
- case SHOW_RESUME:
- return getShowResumeModel().validate(this);
}
return true;
}
@@ -416,8 +407,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> {
// toujours l'onglet de configuration des opérations
universe.add(AdminStep.CONFIG);
- // pour savoir si on doit ajouter l'onglet de résumé (cas par défaut)
- boolean needResume = true;
if (!operations.isEmpty()) {
if (needSelect()) {
@@ -457,9 +446,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> {
if (containsOperation(AdminStep.REPORT)) {
universe.add(AdminStep.REPORT);
-
- // pas de page de resume
- needResume = false;
}
updateSaveLocalOperation();
@@ -475,12 +461,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> {
// ajout de l'onglet de sauvegarde de la base distante
universe.add(AdminStep.EXPORT_DATA);
}
-
- if (needResume) {
-
- // ajout d'un onglet de resume
- universe.add(AdminStep.SHOW_RESUME);
- }
}
return universe.toArray(new AdminStep[0]);
}
@@ -490,6 +470,7 @@ public class AdminUIModel extends WizardExtModel<AdminStep> {
for (AdminStep s : operations) {
if (s.isNeedSave()) {
shouldAdd = true;
+ break;
}
}
if (shouldAdd) {
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/admin/resume/ShowResumeModel.java deleted
=====================================
@@ -1,43 +0,0 @@
-package fr.ird.observe.client.ui.admin.resume;
-
-/*-
- * #%L
- * ObServe :: Client core
- * %%
- * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-
-import fr.ird.observe.client.ui.admin.AdminActionModel;
-import fr.ird.observe.client.ui.admin.AdminStep;
-import fr.ird.observe.client.ui.admin.AdminUIModel;
-
-/**
- * Created on 28/11/16.
- *
- * @author Tony Chemit - dev(a)tchemit.fr
- * @since 6.0
- */
-public class ShowResumeModel extends AdminActionModel {
- public ShowResumeModel() {
- super(AdminStep.SHOW_RESUME);
- }
-
- public boolean validate(AdminUIModel uiModel) {
- return true;
- }
-}
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/admin/resume/ShowResumeUI.jaxx deleted
=====================================
@@ -1,84 +0,0 @@
-<!--
- #%L
- ObServe :: Client core
- %%
- Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program 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 General Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/gpl-3.0.html>.
- #L%
- -->
-
-<!-- **************************************** -->
-<!-- L'écran de résumé des opérations passées -->
-<!-- **************************************** -->
-
-<fr.ird.observe.client.ui.admin.AdminTabUI>
-
- <import>
- fr.ird.observe.client.ui.util.UIHelper
- fr.ird.observe.client.ui.admin.AdminActionModel
- fr.ird.observe.client.ui.admin.AdminUI
- fr.ird.observe.client.ui.admin.AdminStep
- fr.ird.observe.client.ui.admin.AdminTabUI
-
- java.awt.Dimension
- </import>
-
- <ShowResumeModel id='stepModel' initializer='getModel().getShowResumeModel()'/>
-
- <script><![CDATA[
-
-@Override
-public void destroy() {
- super.destroy();
- globalProgression.setText("");
- resume.setText("");
-}
-
-@Override
-public void addMessage(AdminStep step, String text) {
- getHandler().addMessage(step, text);
-}
-]]>
- </script>
-
- <JPanel id='PENDING_content'>
- <Table constraints='BorderLayout.CENTER' fill='both' weightx='1'
- weighty='1'>
- <row>
- <cell>
- <JScrollPane id='resumePane'>
- <JTextArea id='resume'/>
- </JScrollPane>
- </cell>
- </row>
- <row>
- <cell>
- <JScrollPane id='globalProgressionPane' columnHeaderView='{globalProgressionTop}'>
- <JTextArea id='globalProgression'/>
- <JToolBar id='globalProgressionTop'>
- <JLabel id='globalProgressionTopLabel'/>
- <javax.swing.Box.Filler
- constructorParams='UIHelper.newMinDimension(), UIHelper.newMinDimension(), UIHelper.newMaxXDimension()'/>
- <JButton id="globalProgressionCopyToClipBoard"
- onActionPerformed='UIHelper.copyToClipBoard(globalProgression.getText())'/>
- </JToolBar>
- </JScrollPane>
- </cell>
- </row>
- </Table>
- </JPanel>
-
-</fr.ird.observe.client.ui.admin.AdminTabUI>
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/admin/resume/ShowResumeUI.jcss deleted
=====================================
@@ -1,64 +0,0 @@
-/*
- * #%L
- * ObServe :: Client core
- * %%
- * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-
-#PENDING_content {
- layout:{new BorderLayout()};
-}
-
-#resumePane {
- minimumSize:{new Dimension(0,0)};
- horizontalScrollBarPolicy:{JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED};
- columnHeaderView:{UIHelper.newLabel(t("observe.common.operation.resume") ,"wizard-message", 10)};
-}
-
-#resume {
- editable:false;
- focusable:true;
-}
-
-#globalProgressionPane {
- minimumSize:{new Dimension(0,0)};
- horizontalScrollBarPolicy:{JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED};
-}
-
-#globalProgression {
- font-size:10;
- focusable:true;
- lineWrap:false;
- editable:false;
-}
-
-#globalProgressionTop {
- floatable:false;
-}
-
-#globalProgressionTopLabel {
- text:"observe.common.global.progression.description";
- actionIcon:"wizard-message";
-}
-
-#globalProgressionCopyToClipBoard {
- toolTipText:"observe.action.copy.to.clipBoard";
- actionIcon:"report-copy";
- mnemonic:C;
-}
-
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/admin/resume/ShowResumeUIHandler.java deleted
=====================================
@@ -1,91 +0,0 @@
-/*
- * #%L
- * ObServe :: Client core
- * %%
- * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-package fr.ird.observe.client.ui.admin.resume;
-
-import fr.ird.observe.client.ui.admin.AdminStep;
-import fr.ird.observe.client.ui.admin.AdminTabUIHandler;
-import fr.ird.observe.client.ui.admin.AdminUIModel;
-import fr.ird.observe.client.ui.util.UIHelper;
-import fr.ird.observe.dto.I18nEnumHelper;
-import org.nuiton.jaxx.runtime.spi.UIHandler;
-import org.nuiton.jaxx.runtime.swing.wizard.ext.WizardState;
-
-import static io.ultreia.java4all.i18n.I18n.t;
-
-/**
- * Le controleur des onglets.
- *
- * @author Tony Chemit - dev(a)tchemit.fr
- * @since 1.4
- */
-public class ShowResumeUIHandler extends AdminTabUIHandler<ShowResumeUI> implements UIHandler<ShowResumeUI> {
-
- @Override
- public void afterInit(ShowResumeUI ui) {
- super.afterInit(ui);
- UIHelper.setLayerUI(ui.getContent(), null);
- }
-
- public void updateText() {
- AdminUIModel model = ui.getModel();
- StringBuilder buffer = new StringBuilder();
- if (!model.isWasStarted()) {
- buffer.append(t("observe.admin.resume.no.operation.done"));
- } else {
- for (AdminStep s : model.getOperations()) {
- WizardState state = model.getStepState(s);
- String stateStr = "";
- switch (state) {
- case CANCELED:
- stateStr = t("observe.admin.resume.operation.canceled");
- break;
- case FAILED:
- stateStr = t("observe.admin.resume.operation.failed");
- break;
- case NEED_FIX:
- stateStr = t("observe.admin.resume.operation.need.fix");
- break;
- case PENDING:
- stateStr = t("observe.admin.resume.operation.not.started");
- break;
- case RUNNING:
- stateStr = t("observe.admin.resume.operation.running");
- break;
- case SUCCESSED:
- stateStr = t("observe.admin.resume.operation.done");
- break;
- }
- buffer.append("\n\n");
- buffer.append(I18nEnumHelper.getLabel(s));
- buffer.append(" : ");
- buffer.append(stateStr);
- buffer.append(".");
- }
- buffer.append("\n\n");
- }
- getUi().getResume().setText(buffer.toString());
- }
-
- public void addMessage(AdminStep step, String text) {
- getUi().getGlobalProgression().append(I18nEnumHelper.getLabel(step) + " - " + text + "\n");
- }
-}
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/admin/validate/ValidateUIHandler.java
=====================================
@@ -475,16 +475,10 @@ public class ValidateUIHandler extends AdminTabUIHandler<ValidateUI> implements
private void generateReportFile(ValidateModel validationModel) throws IOException {
File reportFile = validationModel.getReportFile();
- if (log.isInfoEnabled()) {
- log.info("save report in " + reportFile);
- }
-
+ log.info(String.format("save report in %s", reportFile));
validationModel.setDecoratorService(getDecoratorService());
-
String content = ObserveSwingApplicationContext.get().getTextGenerator().getValidationReport(validationModel);
-
log.debug(content);
- addMessage(AdminStep.SHOW_RESUME, content);
FileUtils.write(reportFile, content, Charsets.UTF_8.name());
}
=====================================
observe-i18n/src/main/i18n/translations/observe_en_GB.properties
=====================================
@@ -319,13 +319,6 @@ observe.actions.validate.validator.message.header=Message
observe.actions.validate.validator.message.header.tip=Message
observe.actions.validate.validator.scope.header=...
observe.actions.validate.validator.scope.header.tip=Type of message
-observe.admin.resume.no.operation.done=No operation done.
-observe.admin.resume.operation.canceled=operation canceled
-observe.admin.resume.operation.done=operation done
-observe.admin.resume.operation.failed=operation failed
-observe.admin.resume.operation.need.fix=operation need fix
-observe.admin.resume.operation.not.started=operation not started
-observe.admin.resume.operation.running=operation is running...
observe.backup.done=[%s] Auto backup done (in %s)
observe.backup.start=[%s] Start auto backup
observe.choice.cancel=Cancel
@@ -1688,7 +1681,6 @@ observe.common.no.unit=No unit
observe.common.nocode=Nocode
observe.common.none=None
observe.common.ocean=Ocean
-observe.common.operation.resume=Summary of operations
observe.common.resume=Summary
observe.common.saveFile.overwrite=file alreayd exists, would you like to overwrite it?
observe.common.saveFile.overwrite.cancel=Cancel
@@ -1829,8 +1821,6 @@ observe.constant.AdminStep.SAVE_LOCAL=Save local database
observe.constant.AdminStep.SAVE_LOCAL.description=Save modifcations on local database
observe.constant.AdminStep.SELECT_DATA=Select data
observe.constant.AdminStep.SELECT_DATA.description=Select data for operations
-observe.constant.AdminStep.SHOW_RESUME=Summary
-observe.constant.AdminStep.SHOW_RESUME.description=Summary of operations
observe.constant.AdminStep.SYNCHRONIZE=Update referential
observe.constant.AdminStep.SYNCHRONIZE.description=Update referential
observe.constant.AdminStep.VALIDATE=Validation
=====================================
observe-i18n/src/main/i18n/translations/observe_es_ES.properties
=====================================
@@ -319,13 +319,6 @@ observe.actions.validate.validator.message.header=Mensaje
observe.actions.validate.validator.message.header.tip=Texto del mensaje
observe.actions.validate.validator.scope.header=...
observe.actions.validate.validator.scope.header.tip=Tipo de mensaje
-observe.admin.resume.no.operation.done=Ninguna operación realizada
-observe.admin.resume.operation.canceled=Operación cancelada
-observe.admin.resume.operation.done=Operación realizada
-observe.admin.resume.operation.failed=Operación no realizada
-observe.admin.resume.operation.need.fix=La operación necesita correcciones
-observe.admin.resume.operation.not.started=Operación no iniciada
-observe.admin.resume.operation.running=Operación en curso...
observe.backup.done=[%s] Copia de seguridad automática realizada (en %s)
observe.backup.start=[%s] Inicio de copia de seguridad automática
observe.choice.cancel=Cancelar
@@ -1688,7 +1681,6 @@ observe.common.no.unit=Sin registros
observe.common.nocode=Código ausente
observe.common.none=Ninguno
observe.common.ocean=Océano
-observe.common.operation.resume=Resumen de operaciones
observe.common.resume=Resumen de la configuración
observe.common.saveFile.overwrite=El archivo ya existe ¿Quiere reemplazarlo?
observe.common.saveFile.overwrite.cancel=Cancelar
@@ -1829,8 +1821,6 @@ observe.constant.AdminStep.SAVE_LOCAL=Copia local de seguridad
observe.constant.AdminStep.SAVE_LOCAL.description=Guardar las modificaciones realizadas en la base original
observe.constant.AdminStep.SELECT_DATA=Selección de datos
observe.constant.AdminStep.SELECT_DATA.description=Selección de los datos para la realización de los operaciones
-observe.constant.AdminStep.SHOW_RESUME=Resumen
-observe.constant.AdminStep.SHOW_RESUME.description=Ver un resumen de los operaciones realizadas
observe.constant.AdminStep.SYNCHRONIZE=Actualización del referencial
observe.constant.AdminStep.SYNCHRONIZE.description=Actualizar el referencial con una base central
observe.constant.AdminStep.VALIDATE=Validación
=====================================
observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
=====================================
@@ -319,13 +319,6 @@ observe.actions.validate.validator.message.header=Message
observe.actions.validate.validator.message.header.tip=Le texte du message
observe.actions.validate.validator.scope.header=...
observe.actions.validate.validator.scope.header.tip=Le type de message
-observe.admin.resume.no.operation.done=Aucune opération réalisée.
-observe.admin.resume.operation.canceled=opération annulée
-observe.admin.resume.operation.done=opération réussie
-observe.admin.resume.operation.failed=opération échouée
-observe.admin.resume.operation.need.fix=opération nécessitant des corrections
-observe.admin.resume.operation.not.started=opération non démarrée
-observe.admin.resume.operation.running=opération en cours...
observe.backup.done=[%s] Fin de la sauvegarde automatique (en %s)
observe.backup.start=[%s] Début de la sauvegarde automatique
observe.choice.cancel=Annuler
@@ -1688,7 +1681,6 @@ observe.common.no.unit=Pas d'unité
observe.common.nocode=code absent
observe.common.none=Aucun
observe.common.ocean=Océan
-observe.common.operation.resume=Résumé des opérations
observe.common.resume=Résumé de la configuration
observe.common.saveFile.overwrite=Le fichier existe déjà. Voulez-vous le remplacer ?
observe.common.saveFile.overwrite.cancel=Annuler
@@ -1829,8 +1821,6 @@ observe.constant.AdminStep.SAVE_LOCAL=Sauvegarde locale
observe.constant.AdminStep.SAVE_LOCAL.description=Sauver les modifications sur votre base source
observe.constant.AdminStep.SELECT_DATA=Sélection des données
observe.constant.AdminStep.SELECT_DATA.description=Sélection des données pour effectuer les opérations
-observe.constant.AdminStep.SHOW_RESUME=Résumé
-observe.constant.AdminStep.SHOW_RESUME.description=Voir un résumé des opérations effectuées
observe.constant.AdminStep.SYNCHRONIZE=Mise à jour du référentiel
observe.constant.AdminStep.SYNCHRONIZE.description=Mettre à jour le référentiel depuis une base centrale
observe.constant.AdminStep.VALIDATE=Validation
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/ab3339953f66c20f7944721b4…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/ab3339953f66c20f7944721b4…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] Do not clean temporary files if root directory does not exist
by Tony CHEMIT 18 Apr '20
by Tony CHEMIT 18 Apr '20
18 Apr '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
77b6cb12 by tchemit at 2020-04-18T08:26:36+02:00
Do not clean temporary files if root directory does not exist
- - - - -
1 changed file:
- services/src/main/java/fr/ird/observe/services/service/CleanTemporaryFilesTask.java
Changes:
=====================================
services/src/main/java/fr/ird/observe/services/service/CleanTemporaryFilesTask.java
=====================================
@@ -64,6 +64,9 @@ public class CleanTemporaryFilesTask extends TimerTask {
public void run() {
Path temporaryDirectory = configuration.getTemporaryDirectory().toPath();
+ if (Files.notExists(temporaryDirectory)) {
+ return;
+ }
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.add(Calendar.HOUR_OF_DAY, -configuration.getTemporaryFilesTimeout());
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/77b6cb12c26f67f9db87cec8d…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/77b6cb12c26f67f9db87cec8d…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] Do not clean temporary files if root directory does not exist
by Tony CHEMIT 18 Apr '20
by Tony CHEMIT 18 Apr '20
18 Apr '20
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
127c3742 by tchemit at 2020-04-18T08:26:08+02:00
Do not clean temporary files if root directory does not exist
- - - - -
1 changed file:
- services/src/main/java/fr/ird/observe/services/service/CleanTemporaryFilesTask.java
Changes:
=====================================
services/src/main/java/fr/ird/observe/services/service/CleanTemporaryFilesTask.java
=====================================
@@ -63,6 +63,9 @@ public class CleanTemporaryFilesTask extends TimerTask {
public void run() {
Path temporaryDirectory = configuration.getTemporaryDirectory().toPath();
+ if (Files.notExists(temporaryDirectory)) {
+ return;
+ }
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.add(Calendar.HOUR_OF_DAY, -configuration.getTemporaryFilesTimeout());
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/127c37420c7922e7c494d934d…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/127c37420c7922e7c494d934d…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] Le nom du fichier de sauvegarde par défaut pourrait être modernisé (report V8 → V7) - Closes #1212
by Tony CHEMIT 18 Apr '20
by Tony CHEMIT 18 Apr '20
18 Apr '20
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
8dec4869 by tchemit at 2020-04-18T08:18:11+02:00
Le nom du fichier de sauvegarde par défaut pourrait être modernisé (report V8 → V7) - Closes #1212
- - - - -
2 changed files:
- client-configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java
- client-core/src/main/java/fr/ird/observe/client/backup/BackupsManager.java
Changes:
=====================================
client-configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java
=====================================
@@ -82,7 +82,7 @@ public class ClientConfig extends GeneratedClientConfig implements NavigationTre
ClientConfigOption.MAP_LAYER9,
ClientConfigOption.MAP_LAYER10);
/** le pattern du fichier de sauvegarde d'une base locale */
- private static final String BACKUP_DB_PATTERN = "obstuna-local-%1$tF--%1$tk-%1$tM-%1$tS.sql.gz";
+ private static final String BACKUP_DB_PATTERN = "observe-v%1$s-%2$tF--%2$tk-%2$tM-%2$tS.sql.gz";
private static final String APPLICATION_VERSION = "application.version";
private static final String VERSION = "version";
private static final String PROPERTY_LOCAL_STORAGE_EXIST = "localStorageExist";
@@ -368,13 +368,11 @@ public class ClientConfig extends GeneratedClientConfig implements NavigationTre
}
public File newBackupDataFile() {
- return new File(getBackupDirectory(), String.format(BACKUP_DB_PATTERN, new Date()));
+ return new File(getBackupDirectory(), String.format(BACKUP_DB_PATTERN, getBuildVersion(), new Date()));
}
public void saveForUser() {
- if (log.isInfoEnabled()) {
- log.info(t("observe.message.save.configuration", get().getUserConfigFile()));
- }
+ log.info(t("observe.message.save.configuration", get().getUserConfigFile()));
get().saveForUser(unsavables);
}
=====================================
client-core/src/main/java/fr/ird/observe/client/backup/BackupsManager.java
=====================================
@@ -66,7 +66,7 @@ public class BackupsManager implements Closeable {
private static final Logger log = LogManager.getLogger(BackupsManager.class);
- private static final Pattern AUTOMATIC_BACKUP_FILENAME_PATTERN = Pattern.compile("obstuna-local-([0-9-]+)\\.sql\\.gz");
+ private static final Pattern AUTOMATIC_BACKUP_FILENAME_PATTERN = Pattern.compile("obs.+-([0-9-]+)\\.sql\\.gz");
private final Path backupsPath;
private final Path storePath;
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/8dec4869d5c43fbf10f61cf7c…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/8dec4869d5c43fbf10f61cf7c…
You're receiving this email because of your account on gitlab.com.
1
0
17 Apr '20
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
9e467c62 by tchemit at 2020-04-17T12:55:47+02:00
update pom
- - - - -
f87d23db by tchemit at 2020-04-17T13:45:54+02:00
FOB sans objectOperation fait planter la consolidation des données - See #1469
- - - - -
5 changed files:
- persistence/src/main/java/fr/ird/observe/binder/data/seine/FloatingObjectEntityReferenceBinder.java
- − persistence/src/main/java/fr/ird/observe/entities/seine/FloatingObjectTopiaDao.java
- pom.xml
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java
- services-local/src/main/java/fr/ird/observe/services/local/service/data/seine/FloatingObjectServiceLocal.java
Changes:
=====================================
persistence/src/main/java/fr/ird/observe/binder/data/seine/FloatingObjectEntityReferenceBinder.java
=====================================
@@ -28,6 +28,8 @@ import fr.ird.observe.dto.data.seine.FloatingObjectReference;
import fr.ird.observe.dto.referential.ReferentialLocale;
import fr.ird.observe.entities.seine.FloatingObject;
+import java.util.Optional;
+
/**
* Created on 24/11/15.
*
@@ -41,6 +43,6 @@ public class FloatingObjectEntityReferenceBinder extends DataEntityReferenceBind
@Override
public FloatingObjectReference toReference(ReferentialLocale referentialLocale, FloatingObject entity) {
- return new FloatingObjectReference(entity, entity.getObjectOperation().getLabel(referentialLocale));
+ return new FloatingObjectReference(entity, Optional.ofNullable(entity.getObjectOperation()).map(e->e.getLabel(referentialLocale)).orElse(null));
}
}
=====================================
persistence/src/main/java/fr/ird/observe/entities/seine/FloatingObjectTopiaDao.java deleted
=====================================
@@ -1,99 +0,0 @@
-package fr.ird.observe.entities.seine;
-
-/*
- * #%L
- * ObServe :: Persistence
- * %%
- * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-
-import fr.ird.observe.entities.referentiel.I18nReferenceEntities;
-import fr.ird.observe.entities.referentiel.seine.ObjectOperation;
-import fr.ird.observe.entities.referentiel.seine.ObjectOperationImpl;
-import org.nuiton.topia.persistence.support.TopiaSqlQuery;
-import org.nuiton.topia.persistence.support.TopiaSqlSupport;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.List;
-
-public class FloatingObjectTopiaDao extends AbstractFloatingObjectTopiaDao<FloatingObject> {
-
- public List<FloatingObject> findAllStubByActivityId(String activityId, int referenceLocale) {
-
- return StubSqlQuery.findAll(topiaSqlSupport, activityId, referenceLocale);
-
- }
-
- private static class StubSqlQuery extends TopiaSqlQuery<FloatingObject> {
-
- private final String sql;
-
- private final String id;
-
- private final int referenceLocale;
-
- static List<FloatingObject> findAll(TopiaSqlSupport context, String activityId, int referenceLocale) {
-
- String sql = "SELECT" +
- " fo.topiaId," +
- " ot." + I18nReferenceEntities.getPropertyName(referenceLocale) +
- " FROM observe_seine.floatingobject fo, observe_seine.objectOperation ot" +
- " WHERE " +
- " fo.activity = ?" +
- " AND fo.objectOperation = ot.topiaid" +
- " ORDER BY ot." + I18nReferenceEntities.getPropertyName(referenceLocale);
-
- StubSqlQuery request = new StubSqlQuery(sql, activityId, referenceLocale);
- return context.findMultipleResult(request);
-
- }
-
- StubSqlQuery(String sql, String id, int referenceLocale) {
- this.sql = sql;
- this.id = id;
- this.referenceLocale = referenceLocale;
- }
-
- @Override
- public PreparedStatement prepareQuery(Connection connection) throws SQLException {
- PreparedStatement preparedStatement = connection.prepareStatement(sql);
- preparedStatement.setString(1, id);
- return preparedStatement;
- }
-
- @Override
- public FloatingObject prepareResult(ResultSet set) throws SQLException {
-
- FloatingObject floatingObject = new FloatingObjectImpl();
- floatingObject.setTopiaId(set.getString(1));
-
- String objectTypeLabel = set.getString(2);
- ObjectOperation objectType = new ObjectOperationImpl();
- I18nReferenceEntities.setLabel(referenceLocale, objectType, objectTypeLabel);
- floatingObject.setObjectOperation(objectType);
-
- return floatingObject;
-
- }
-
- }
-
-}
=====================================
pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>io.ultreia.maven</groupId>
<artifactId>pom</artifactId>
- <version>2020.17</version>
+ <version>2020.19</version>
</parent>
<groupId>fr.ird.observe</groupId>
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java
=====================================
@@ -382,6 +382,12 @@ public class ConsolidateDataServiceLocal extends ObserveServiceLocal implements
private void updateDcp(FloatingObject dcp, ConsolidationActivitySeineDataContext activityContext) {
+ if (dcp.getObjectOperation() == null) {
+ log.warn("**********************");
+ log.warn(String.format("Floating object %s has no object operation....", dcp.getTopiaId()));
+ log.warn("**********************");
+ return;
+ }
FloatingObjectConsolidateEngine floatingObjectConsolidateEngine = activityContext.floatingObjectConsolidateEngine;
ReferentialLocale referentialLocale = getReferentialLocale();
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/data/seine/FloatingObjectServiceLocal.java
=====================================
@@ -78,8 +78,7 @@ public class FloatingObjectServiceLocal extends ObserveServiceLocal implements F
@Override
public DataDtoReferenceSet<FloatingObjectReference> getFloatingObjectByActivitySeine(String activitySeineId) {
- ReferentialLocale referenceLocale = getReferentialLocale();
- List<FloatingObject> entities = ObserveServiceLocal.FLOATING_OBJECT_SPI.getDao(getTopiaPersistenceContext()).findAllStubByActivityId(activitySeineId, referenceLocale.ordinal());
+ Set<FloatingObject> entities = ObserveServiceLocal.ACTIVITY_SEINE_SPI.loadEntity(getTopiaPersistenceContext(), activitySeineId).getFloatingObject();
return FLOATING_OBJECT_SPI.toDataReferenceSet(entities, getReferentialLocale());
}
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/48f4592c31414e0e39aab97f…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/48f4592c31414e0e39aab97f…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] FOB sans objectOperation fait planter la consolidation des données (Afficher...
by Tony CHEMIT 17 Apr '20
by Tony CHEMIT 17 Apr '20
17 Apr '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
70170fc0 by tchemit at 2020-04-17T11:58:23+02:00
FOB sans objectOperation fait planter la consolidation des données (Afficher les FOB sans objectOperation) - See #1469
- - - - -
2 changed files:
- − persistence/src/main/java/fr/ird/observe/entities/data/ps/observation/FloatingObjectTopiaDao.java
- services-local/src/main/java/fr/ird/observe/services/local/service/data/ps/observation/FloatingObjectServiceLocal.java
Changes:
=====================================
persistence/src/main/java/fr/ird/observe/entities/data/ps/observation/FloatingObjectTopiaDao.java deleted
=====================================
@@ -1,99 +0,0 @@
-package fr.ird.observe.entities.data.ps.observation;
-
-/*
- * #%L
- * ObServe :: Persistence
- * %%
- * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-
-import fr.ird.observe.dto.referential.I18nReferentialHelper;
-import fr.ird.observe.entities.referential.ps.common.ObjectOperation;
-import fr.ird.observe.entities.referential.ps.common.ObjectOperationImpl;
-import org.nuiton.topia.persistence.support.TopiaSqlQuery;
-import org.nuiton.topia.persistence.support.TopiaSqlSupport;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.List;
-
-public class FloatingObjectTopiaDao extends AbstractFloatingObjectTopiaDao<FloatingObject> {
-
- public List<FloatingObject> findAllStubByActivityId(String activityId, int referenceLocale) {
-
- return StubSqlQuery.findAll(topiaSqlSupport, activityId, referenceLocale);
-
- }
-
- private static class StubSqlQuery extends TopiaSqlQuery<FloatingObject> {
-
- private final String sql;
-
- private final String id;
-
- private final int referenceLocale;
-
- static List<FloatingObject> findAll(TopiaSqlSupport context, String activityId, int referenceLocale) {
-
- String sql = "SELECT" +
- " fo.topiaId," +
- " ot." + I18nReferentialHelper.getPropertyName(referenceLocale) +
- " FROM ps_observation.floatingobject fo, ps_common.objectOperation ot" +
- " WHERE " +
- " fo.activity = ?" +
- " AND fo.objectOperation = ot.topiaid" +
- " ORDER BY ot." + I18nReferentialHelper.getPropertyName(referenceLocale);
-
- StubSqlQuery request = new StubSqlQuery(sql, activityId, referenceLocale);
- return context.findMultipleResult(request);
-
- }
-
- StubSqlQuery(String sql, String id, int referenceLocale) {
- this.sql = sql;
- this.id = id;
- this.referenceLocale = referenceLocale;
- }
-
- @Override
- public PreparedStatement prepareQuery(Connection connection) throws SQLException {
- PreparedStatement preparedStatement = connection.prepareStatement(sql);
- preparedStatement.setString(1, id);
- return preparedStatement;
- }
-
- @Override
- public FloatingObject prepareResult(ResultSet set) throws SQLException {
-
- FloatingObject floatingObject = new FloatingObjectImpl();
- floatingObject.setTopiaId(set.getString(1));
-
- String objectTypeLabel = set.getString(2);
- ObjectOperation objectType = new ObjectOperationImpl();
- I18nReferentialHelper.setLabel(referenceLocale, objectType, objectTypeLabel);
- floatingObject.setObjectOperation(objectType);
-
- return floatingObject;
-
- }
-
- }
-
-}
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/data/ps/observation/FloatingObjectServiceLocal.java
=====================================
@@ -48,7 +48,6 @@ import fr.ird.observe.entities.referential.ps.common.TransmittingBuoyOperation;
import fr.ird.observe.entities.referential.ps.common.TransmittingBuoyOwnership;
import fr.ird.observe.entities.referential.ps.common.TransmittingBuoyType;
import fr.ird.observe.entities.referential.ps.observation.ObjectMaterial;
-import fr.ird.observe.entities.referential.ps.observation.ObjectMaterialTopiaDao;
import fr.ird.observe.entities.referential.ps.observation.ObservedSystem;
import fr.ird.observe.services.local.service.ObserveServiceLocal;
import fr.ird.observe.services.service.data.ps.observation.FloatingObjectService;
@@ -76,16 +75,14 @@ public class FloatingObjectServiceLocal extends ObserveServiceLocal implements F
@Override
public ObjectMaterialHierarchyDto getObjectMaterialHierarchy() {
- ObjectMaterialTopiaDao dao = getTopiaPersistenceContext().getPsObservationObjectMaterialDao();
- List<ObjectMaterial> objectMaterials = dao.findAll();
+ List<ObjectMaterial> objectMaterials = ObjectMaterial.getDao(getTopiaPersistenceContext()).findAll();
objectMaterials.sort(Comparator.comparing(ObjectMaterial::getCode));
return getObjectMaterialHierarchyDtos(objectMaterials).get(0);
}
@Override
public DataDtoReferenceSet<FloatingObjectReference> getFloatingObjectByActivitySeine(String activitySeineId) {
- ReferentialLocale referenceLocale = getReferentialLocale();
- List<FloatingObject> entities = FloatingObject.getDao(getTopiaPersistenceContext()).findAllStubByActivityId(activitySeineId, referenceLocale.ordinal());
+ Set<FloatingObject> entities = Activity.loadEntity(getTopiaPersistenceContext(), activitySeineId).getFloatingObject();
return FloatingObject.toReferenceSet(entities, getReferentialLocale());
}
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/70170fc0fb94f61521e59e54f…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/70170fc0fb94f61521e59e54f…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 3 commits: FOB sans objectOperation fait planter la consolidation des données - See #1469
by Tony CHEMIT 17 Apr '20
by Tony CHEMIT 17 Apr '20
17 Apr '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
d6dfc879 by tchemit at 2020-04-17T11:01:48+02:00
FOB sans objectOperation fait planter la consolidation des données - See #1469
- - - - -
7a6a3bb3 by tchemit at 2020-04-17T11:03:07+02:00
Les températures ne sont pas bien restituées... - Closes #1470
- - - - -
cc8facd7 by tchemit at 2020-04-17T11:04:31+02:00
Remove bad and unusefull code
- - - - -
2 changed files:
- client-datasource-editor-api/src/main/java/fr/ird/observe/client/datasource/editor/content/ContentUIInitializer.java
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java
Changes:
=====================================
client-datasource-editor-api/src/main/java/fr/ird/observe/client/datasource/editor/content/ContentUIInitializer.java
=====================================
@@ -327,7 +327,7 @@ public class ContentUIInitializer<UI extends ContentUI> implements WithClientCon
if (editor.getBean() != null) {
if (UIHelper.isBindingFromBean(editor)) {
- editor.getModel().addPropertyChangeListener(propertyName, e -> {
+ ((JavaBean)editor.getBean()).addPropertyChangeListener(propertyName, e -> {
Float oldValue = editor.getModel().getTemperature();
Float newValue = (Float) e.getNewValue();
if (!Objects.equals(oldValue, newValue)) {
@@ -342,17 +342,6 @@ public class ContentUIInitializer<UI extends ContentUI> implements WithClientCon
if (StringUtils.isEmpty(editor.getProperty())) {
editor.setProperty(editor.getName());
}
- if (editor.getBean() != null) {
- if (UIHelper.isBindingFromBean(editor)) {
- editor.getModel().addPropertyChangeListener(editor.getProperty(), e -> {
- String oldValue = editor.getText();
- String newValue = (String) e.getNewValue();
- if (!Objects.equals(oldValue, newValue)) {
- editor.setText(newValue);
- }
- });
- }
- }
editor.setMinimumSize(new Dimension(50, 5 * 24));
editor.getTextEditor().setRows(4);
}
@@ -361,36 +350,12 @@ public class ContentUIInitializer<UI extends ContentUI> implements WithClientCon
if (StringUtils.isEmpty(editor.getProperty())) {
editor.setProperty(editor.getName());
}
-
- if (editor.getBean() != null) {
- if (UIHelper.isBindingFromBean(editor)) {
- editor.getModel().addPropertyChangeListener(editor.getProperty(), e -> {
- String oldValue = editor.getText();
- String newValue = (String) e.getNewValue();
- if (!Objects.equals(oldValue, newValue)) {
- editor.setText(newValue);
- }
- });
- }
- }
}
protected void init(UrlEditor editor) {
if (StringUtils.isEmpty(editor.getProperty())) {
editor.setProperty(editor.getName());
}
-
- if (editor.getBean() != null) {
- if (UIHelper.isBindingFromBean(editor)) {
- editor.getModel().addPropertyChangeListener(editor.getProperty(), e -> {
- String oldValue = editor.getText();
- String newValue = (String) e.getNewValue();
- if (!Objects.equals(oldValue, newValue)) {
- editor.setText(newValue);
- }
- });
- }
- }
}
private void init(JLabel editor) {
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java
=====================================
@@ -375,6 +375,12 @@ public class ConsolidateDataServiceLocal extends ObserveServiceLocal implements
private void updateDcp(FloatingObject dcp, ConsolidationActivitySeineDataContext activityContext) {
+ if (dcp.getObjectOperation() == null) {
+ log.warn("**********************");
+ log.warn(String.format("Floating object %s has no object operation....", dcp.getTopiaId()));
+ log.warn("**********************");
+ return;
+ }
FloatingObjectConsolidateEngine floatingObjectConsolidateEngine = activityContext.floatingObjectConsolidateEngine;
ReferentialLocale referentialLocale = getReferentialLocale();
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/1d90522b3fe579efe4b3f5b0…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/1d90522b3fe579efe4b3f5b0…
You're receiving this email because of your account on gitlab.com.
1
0
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
18947500 by tchemit at 2020-04-16T12:20:46+02:00
update pom
- - - - -
1d90522b by tchemit at 2020-04-17T10:20:30+02:00
Suppression de l'onglet résumé sur les assistants - Closes #1468
- - - - -
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:
=====================================
client-datasource-actions/src/main/i18n/getters/java-enumeration.getter
=====================================
@@ -16,8 +16,6 @@ observe.constant.AdminStep.SAVE_LOCAL
observe.constant.AdminStep.SAVE_LOCAL.description
observe.constant.AdminStep.SELECT_DATA
observe.constant.AdminStep.SELECT_DATA.description
-observe.constant.AdminStep.SHOW_RESUME
-observe.constant.AdminStep.SHOW_RESUME.description
observe.constant.AdminStep.SYNCHRONIZE
observe.constant.AdminStep.SYNCHRONIZE.description
observe.constant.AdminStep.VALIDATE
=====================================
client-datasource-actions/src/main/i18n/getters/java.getter
=====================================
@@ -170,13 +170,6 @@ observe.admin.report.no.report.found
observe.admin.report.report.count.found
observe.admin.report.title
observe.admin.report.title.tip
-observe.admin.resume.no.operation.done
-observe.admin.resume.operation.canceled
-observe.admin.resume.operation.done
-observe.admin.resume.operation.failed
-observe.admin.resume.operation.need.fix
-observe.admin.resume.operation.not.started
-observe.admin.resume.operation.running
observe.choice.cancel
observe.choice.confirm.insert
observe.choice.replace
=====================================
client-datasource-actions/src/main/i18n/getters/jaxx.getter
=====================================
@@ -34,7 +34,6 @@ observe.admin.report.variables
observe.common.directory
observe.common.file
observe.common.global.progression.description
-observe.common.operation.resume
observe.common.step.description
observe.info.selected.validators
observe.info.validation.credentials
=====================================
client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/AdminStep.java
=====================================
@@ -32,7 +32,6 @@ import fr.ird.observe.client.datasource.actions.longline.pairing.ActivityLonglin
import fr.ird.observe.client.datasource.actions.longline.pairing.ActivityLonglinePairingUI;
import fr.ird.observe.client.datasource.actions.report.ReportModel;
import fr.ird.observe.client.datasource.actions.report.ReportUI;
-import fr.ird.observe.client.datasource.actions.resume.ShowResumeUI;
import fr.ird.observe.client.datasource.actions.save.SaveLocalModel;
import fr.ird.observe.client.datasource.actions.save.SaveLocalUI;
import fr.ird.observe.client.datasource.actions.synchronize.data.DataSynchroModel;
@@ -247,13 +246,6 @@ public enum AdminStep implements WizardExtStep {
DbMode.USE_LOCAL,
DbMode.USE_REMOTE,
DbMode.USE_SERVER
- ),
-
- /** pour afficher après les opération un ecran de résumé */
- SHOW_RESUME(
- null,
- ShowResumeUI.class,
- false
);
private final String iconName;
=====================================
client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/AdminUIHandler.java
=====================================
@@ -27,7 +27,6 @@ import fr.ird.observe.client.datasource.actions.config.SelectDataUI;
import fr.ird.observe.client.datasource.actions.consolidate.ConsolidateUI;
import fr.ird.observe.client.datasource.actions.export.ExportUI;
import fr.ird.observe.client.datasource.actions.longline.pairing.ActivityLonglinePairingUI;
-import fr.ird.observe.client.datasource.actions.resume.ShowResumeUI;
import fr.ird.observe.client.datasource.actions.save.SaveLocalUI;
import fr.ird.observe.client.datasource.actions.synchronize.data.DataSynchroUI;
import fr.ird.observe.client.datasource.actions.synchronize.referential.legacy.SynchronizeUI;
@@ -297,12 +296,6 @@ public class AdminUIHandler implements UIHandler<AdminUI>, WithClientUIContext {
SaveLocalUI tabUI = (SaveLocalUI) ui.getStepUI(AdminStep.SAVE_LOCAL);
tabUI.getHandler().updateText();
}
- if (c != null && c.getStep() == AdminStep.SHOW_RESUME) {
-
- // on met a jour le resumé des opérations
- ShowResumeUI showResumeUI = (ShowResumeUI) ui.getStepUI(AdminStep.SHOW_RESUME);
- showResumeUI.getHandler().updateText();
- }
// selection du nouvel onglet
int index = ui.tabs.indexOfComponent(c);
@@ -371,12 +364,6 @@ public class AdminUIHandler implements UIHandler<AdminUI>, WithClientUIContext {
itr = UIHelper.newTabbedPaneIterator(ui.getTabs());
}
- if (selected != null && selected.getStep() == AdminStep.SHOW_RESUME) {
-
- // rien a faire sur le dernier onglet
- log.debug("We are on last step (resume), nothing to do.");
- return;
- }
boolean[] accessibleSteps = ui.getModel().getAccessibleSteps();
log.debug("Accessibles step : " + Arrays.toString(accessibleSteps));
for (; itr.hasNext(); itr.next()) {
=====================================
client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/AdminUIModel.java
=====================================
@@ -28,7 +28,6 @@ import fr.ird.observe.client.datasource.actions.consolidate.ConsolidateModel;
import fr.ird.observe.client.datasource.actions.export.ExportModel;
import fr.ird.observe.client.datasource.actions.longline.pairing.ActivityLonglinePairingModel;
import fr.ird.observe.client.datasource.actions.report.ReportModel;
-import fr.ird.observe.client.datasource.actions.resume.ShowResumeModel;
import fr.ird.observe.client.datasource.actions.save.SaveLocalModel;
import fr.ird.observe.client.datasource.actions.synchronize.data.DataSynchroModel;
import fr.ird.observe.client.datasource.actions.synchronize.referential.legacy.SynchronizeModel;
@@ -64,8 +63,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> {
private final SelectDataModel selectDataModel = new SelectDataModel();
- private final ShowResumeModel showResumeModel = new ShowResumeModel();
-
private final AdminStep adminStep;
private final EnumSet<DbMode> availableIncomingModes;
@@ -152,10 +149,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> {
return configModel;
}
- public ShowResumeModel getShowResumeModel() {
- return showResumeModel;
- }
-
public SelectDataModel getSelectDataModel() {
return selectDataModel;
}
@@ -397,8 +390,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> {
return getSynchronizeReferentielModel().validate(this, step);
case SAVE_LOCAL:
return getSaveLocalModel().validate(this, step);
- case SHOW_RESUME:
- return getShowResumeModel().validate(this);
}
return true;
}
@@ -411,8 +402,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> {
// toujours l'onglet de configuration des opérations
universe.add(AdminStep.CONFIG);
- // pour savoir si on doit ajouter l'onglet de résumé (cas par défaut)
- boolean needResume = true;
if (!operations.isEmpty()) {
if (needSelect()) {
@@ -458,9 +447,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> {
if (containsOperation(AdminStep.REPORT)) {
universe.add(AdminStep.REPORT);
-
- // pas de page de resume
- needResume = false;
}
updateSaveLocalOperation();
@@ -476,12 +462,6 @@ public class AdminUIModel extends WizardExtModel<AdminStep> {
// ajout de l'onglet de sauvegarde de la base distante
universe.add(AdminStep.EXPORT_DATA);
}
-
- if (needResume) {
-
- // ajout d'un onglet de resume
- universe.add(AdminStep.SHOW_RESUME);
- }
}
return universe.toArray(new AdminStep[0]);
}
=====================================
client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/actions/AdminTabUIActionSupport.java
=====================================
@@ -28,7 +28,6 @@ import fr.ird.observe.client.datasource.actions.AdminActionWorker;
import fr.ird.observe.client.datasource.actions.AdminStep;
import fr.ird.observe.client.datasource.actions.AdminTabUI;
import fr.ird.observe.client.datasource.actions.AdminUI;
-import fr.ird.observe.client.datasource.actions.resume.ShowResumeUI;
import fr.ird.observe.client.datasource.api.ObserveSwingDataSource;
import fr.ird.observe.client.datasource.editor.content.ref.usage.UsageForDisplayUI;
import fr.ird.observe.client.datasource.editor.content.ref.usage.UsageForDisplayUIHandler;
@@ -98,14 +97,8 @@ public abstract class AdminTabUIActionSupport<U extends AdminTabUI> extends JCom
public String sendMessage(String message) {
-
AdminStep step = ui.getStep();
addMessage(step, message);
- AdminUI parentUI = getParentUI();
- ShowResumeUI resumeUI = (ShowResumeUI) parentUI.getStepUI(AdminStep.SHOW_RESUME);
- if (resumeUI != null) {
- addMessage(resumeUI, step, message);
- }
return message;
}
=====================================
client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/resume/ShowResumeModel.java deleted
=====================================
@@ -1,43 +0,0 @@
-package fr.ird.observe.client.datasource.actions.resume;
-
-/*-
- * #%L
- * ObServe :: Client DataSource actions
- * %%
- * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-
-import fr.ird.observe.client.datasource.actions.AdminActionModel;
-import fr.ird.observe.client.datasource.actions.AdminStep;
-import fr.ird.observe.client.datasource.actions.AdminUIModel;
-
-/**
- * Created on 28/11/16.
- *
- * @author Tony Chemit - dev(a)tchemit.fr
- * @since 6.0
- */
-public class ShowResumeModel extends AdminActionModel {
- public ShowResumeModel() {
- super(AdminStep.SHOW_RESUME);
- }
-
- public boolean validate(AdminUIModel uiModel) {
- return true;
- }
-}
=====================================
client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/resume/ShowResumeUI.jaxx deleted
=====================================
@@ -1,59 +0,0 @@
-<!--
- #%L
- ObServe :: Client DataSource actions
- %%
- Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
- This program 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 General Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/gpl-3.0.html>.
- #L%
- -->
-
-<fr.ird.observe.client.datasource.actions.AdminTabUI>
-
- <import>
- fr.ird.observe.client.util.UIHelper
- fr.ird.observe.client.datasource.actions.AdminUI
- fr.ird.observe.client.datasource.actions.AdminTabUI
-
- java.awt.Dimension
- </import>
-
- <ShowResumeModel id='stepModel' initializer='getModel().getShowResumeModel()'/>
-
- <JPanel id='PENDING_content'>
- <Table constraints='BorderLayout.CENTER' fill='both' weightx='1'
- weighty='1'>
- <row>
- <cell>
- <JScrollPane id='resumePane'>
- <JTextArea id='resume'/>
- </JScrollPane>
- </cell>
- </row>
- <row>
- <cell>
- <JScrollPane id='globalProgressionPane' columnHeaderView='{globalProgressionTop}'>
- <JTextArea id='globalProgression'/>
- <JToolBar id='globalProgressionTop'>
- <JLabel id='globalProgressionTopLabel'/>
- <javax.swing.Box.Filler
- constructorParams='UIHelper.newMinDimension(), UIHelper.newMinDimension(), UIHelper.newMaxXDimension()'/>
- <JButton id="copyToClipBoard"/>
- </JToolBar>
- </JScrollPane>
- </cell>
- </row>
- </Table>
- </JPanel>
-
-</fr.ird.observe.client.datasource.actions.AdminTabUI>
=====================================
client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/resume/ShowResumeUI.jcss deleted
=====================================
@@ -1,59 +0,0 @@
-/*
- * #%L
- * ObServe :: Client DataSource actions
- * %%
- * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-
-#PENDING_content {
- layout:{new BorderLayout()};
-}
-
-#resumePane {
- minimumSize:{new Dimension(0,0)};
- horizontalScrollBarPolicy:{JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED};
- columnHeaderView:{UIHelper.newLabel(t("observe.common.operation.resume") ,"wizard-message", 10)};
-}
-
-#resume {
- editable:false;
- focusable:true;
-}
-
-#globalProgressionPane {
- minimumSize:{new Dimension(0,0)};
- horizontalScrollBarPolicy:{JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED};
-}
-
-#globalProgression {
- font-size:10;
- focusable:true;
- lineWrap:false;
- editable:false;
-}
-
-#globalProgressionTop {
- floatable:false;
-}
-
-#globalProgressionTopLabel {
- text:"observe.common.global.progression.description";
- actionIcon:"wizard-message";
-}
-
-
=====================================
client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/resume/ShowResumeUIHandler.java deleted
=====================================
@@ -1,91 +0,0 @@
-/*
- * #%L
- * ObServe :: Client DataSource actions
- * %%
- * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-package fr.ird.observe.client.datasource.actions.resume;
-
-import fr.ird.observe.client.datasource.actions.AdminStep;
-import fr.ird.observe.client.datasource.actions.AdminTabUIHandler;
-import fr.ird.observe.client.datasource.actions.AdminUIModel;
-import fr.ird.observe.client.util.UIHelper;
-import fr.ird.observe.dto.I18nEnumHelper;
-import org.nuiton.jaxx.runtime.spi.UIHandler;
-import org.nuiton.jaxx.runtime.swing.wizard.ext.WizardState;
-
-import static io.ultreia.java4all.i18n.I18n.t;
-
-/**
- * Le controleur des onglets.
- *
- * @author Tony Chemit - dev(a)tchemit.fr
- * @since 1.4
- */
-public class ShowResumeUIHandler extends AdminTabUIHandler<ShowResumeUI> implements UIHandler<ShowResumeUI> {
-
- @Override
- public void afterInit(ShowResumeUI ui) {
- super.afterInit(ui);
- UIHelper.setLayerUI(ui.getContent(), null);
- }
-
- public void updateText() {
- AdminUIModel model = ui.getModel();
- StringBuilder buffer = new StringBuilder();
- if (!model.isWasStarted()) {
- buffer.append(t("observe.admin.resume.no.operation.done"));
- } else {
- for (AdminStep s : model.getOperations()) {
- WizardState state = model.getStepState(s);
- String stateStr = "";
- switch (state) {
- case CANCELED:
- stateStr = t("observe.admin.resume.operation.canceled");
- break;
- case FAILED:
- stateStr = t("observe.admin.resume.operation.failed");
- break;
- case NEED_FIX:
- stateStr = t("observe.admin.resume.operation.need.fix");
- break;
- case PENDING:
- stateStr = t("observe.admin.resume.operation.not.started");
- break;
- case RUNNING:
- stateStr = t("observe.admin.resume.operation.running");
- break;
- case SUCCESSED:
- stateStr = t("observe.admin.resume.operation.done");
- break;
- }
- buffer.append("\n\n");
- buffer.append(I18nEnumHelper.getLabel(s));
- buffer.append(" : ");
- buffer.append(stateStr);
- buffer.append(".");
- }
- buffer.append("\n\n");
- }
- getUi().getResume().setText(buffer.toString());
- }
-
- public void addMessage(AdminStep step, String text) {
- getUi().getGlobalProgression().append(I18nEnumHelper.getLabel(step) + " - " + text + "\n");
- }
-}
=====================================
client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/resume/actions/CopyResumeToClipBoard.java deleted
=====================================
@@ -1,45 +0,0 @@
-package fr.ird.observe.client.datasource.actions.resume.actions;
-
-/*-
- * #%L
- * ObServe :: Client DataSource actions
- * %%
- * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-
-import fr.ird.observe.client.datasource.actions.actions.AdminTabUIActionSupport;
-import fr.ird.observe.client.datasource.actions.resume.ShowResumeUI;
-import fr.ird.observe.client.util.ObserveKeyStrokesSupport;
-import fr.ird.observe.client.util.UIHelper;
-
-import java.awt.event.ActionEvent;
-
-import static io.ultreia.java4all.i18n.I18n.t;
-
-public class CopyResumeToClipBoard extends AdminTabUIActionSupport<ShowResumeUI> {
-
- public CopyResumeToClipBoard() {
- super(t("observe.action.copy.to.clipBoard"), t("observe.action.copy.to.clipBoard"), "report-copy", ObserveKeyStrokesSupport.KEY_STROKE_COPY_TO_CLIPBOARD);
- }
-
- @Override
- protected void doActionPerformed(ActionEvent e, ShowResumeUI ui) {
- UIHelper.copyToClipBoard(ui.getGlobalProgression().getText());
- }
-
-}
=====================================
client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/actions/RegisterTaskActionSupport.java
=====================================
@@ -27,7 +27,6 @@ import com.google.common.collect.ImmutableSet;
import fr.ird.observe.client.datasource.actions.AdminStep;
import fr.ird.observe.client.datasource.actions.AdminTabUI;
import fr.ird.observe.client.datasource.actions.AdminUI;
-import fr.ird.observe.client.datasource.actions.resume.ShowResumeUI;
import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialReplaceUI;
import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialReplaceUIHandler;
import fr.ird.observe.client.datasource.actions.synchronize.referential.ng.ReferentialSynchroModel;
@@ -304,14 +303,8 @@ public abstract class RegisterTaskActionSupport extends ReferentialSelectionTree
}
public String sendMessage(String message) {
-
AdminStep step = parentUI.getStep();
addMessage(step, message);
- AdminUI parentUI = getParentUI();
- ShowResumeUI resumeUI = (ShowResumeUI) parentUI.getStepUI(AdminStep.SHOW_RESUME);
- if (resumeUI != null) {
- addMessage(resumeUI, step, message);
- }
return message;
}
=====================================
client-datasource-actions/src/main/java/fr/ird/observe/client/datasource/actions/validate/actions/SaveReport.java
=====================================
@@ -83,7 +83,6 @@ public class SaveReport extends ValidateUIActionSupport {
String content = ValidateModelTemplate.generate(validationModel);
log.debug(content);
- addMessage(AdminStep.SHOW_RESUME, content);
FileUtils.write(reportFile, content, StandardCharsets.UTF_8.name());
}
=====================================
observe-i18n/src/main/i18n/translations/observe_en_GB.properties
=====================================
@@ -374,13 +374,6 @@ observe.admin.report.select.file.tip=Choose file of reports definitions
observe.admin.report.title=Help to generat reports
observe.admin.report.title.tip=Help to generate reports
observe.admin.report.variables=Variables configuration
-observe.admin.resume.no.operation.done=No operation done.
-observe.admin.resume.operation.canceled=operation canceled
-observe.admin.resume.operation.done=operation done
-observe.admin.resume.operation.failed=operation failed
-observe.admin.resume.operation.need.fix=operation need fix
-observe.admin.resume.operation.not.started=operation not started
-observe.admin.resume.operation.running=operation is running...
observe.backup.done=[%s] Auto backup done (in %s)
observe.backup.start=[%s] Start auto backup
observe.choice.cancel=Cancel
@@ -433,7 +426,6 @@ observe.common.gps.gpsPoint=Gps point
observe.common.label=Label
observe.common.lengthWeightFormula=Length weight formula
observe.common.no.unit=No unit
-observe.common.operation.resume=Summary of operations
observe.common.resume=Summary
observe.common.saveFile.overwrite=file alreayd exists, would you like to overwrite it?
observe.common.saveFile.overwrite.cancel=Cancel
@@ -593,8 +585,6 @@ observe.constant.AdminStep.SAVE_LOCAL=Save local database
observe.constant.AdminStep.SAVE_LOCAL.description=Save modifcations on local database
observe.constant.AdminStep.SELECT_DATA=Select data
observe.constant.AdminStep.SELECT_DATA.description=Select data for operations
-observe.constant.AdminStep.SHOW_RESUME=Summary
-observe.constant.AdminStep.SHOW_RESUME.description=Summary of operations
observe.constant.AdminStep.SYNCHRONIZE=Update referential
observe.constant.AdminStep.SYNCHRONIZE.description=Update referential
observe.constant.AdminStep.VALIDATE=Validation
=====================================
observe-i18n/src/main/i18n/translations/observe_es_ES.properties
=====================================
@@ -374,13 +374,6 @@ observe.admin.report.select.file.tip=Elegir el archivo de definición de informe
observe.admin.report.title=Ayuda a la generación de informes
observe.admin.report.title.tip=Ayuda a la generación del informe de fin del embarque
observe.admin.report.variables=Configuración de variables
-observe.admin.resume.no.operation.done=Ninguna operación realizada
-observe.admin.resume.operation.canceled=operación cancelada
-observe.admin.resume.operation.done=operacion realizada
-observe.admin.resume.operation.failed=operación no realizada
-observe.admin.resume.operation.need.fix=la operación necesita correcciones
-observe.admin.resume.operation.not.started=operación no empezada
-observe.admin.resume.operation.running=operación en curso...
observe.backup.done=[%s] Copia de seguridad automática realizada (en %s)
observe.backup.start=[%s] Inicio de copia de seguridad automática
observe.choice.cancel=Cancelar
@@ -433,7 +426,6 @@ observe.common.gps.gpsPoint=Punto GPS
observe.common.label=Texto
observe.common.lengthWeightFormula=Relación de peso
observe.common.no.unit=No unit \#TODO
-observe.common.operation.resume=Resumen de operaciones
observe.common.resume=Resumen de la configuración
observe.common.saveFile.overwrite=El archivo ya existe. Quiere reemplazar lo ?
observe.common.saveFile.overwrite.cancel=Cancelar
@@ -593,8 +585,6 @@ observe.constant.AdminStep.SAVE_LOCAL=Copia local de seguridad
observe.constant.AdminStep.SAVE_LOCAL.description=Guardar las modificaciones realizadas en la base original
observe.constant.AdminStep.SELECT_DATA=Selección de datos
observe.constant.AdminStep.SELECT_DATA.description=Selección de los datos para la realización de los operaciones
-observe.constant.AdminStep.SHOW_RESUME=Resumen
-observe.constant.AdminStep.SHOW_RESUME.description=Ver un resumen de los operaciones realizadas
observe.constant.AdminStep.SYNCHRONIZE=Actualización del referencial
observe.constant.AdminStep.SYNCHRONIZE.description=Actualizar el referencial con una base central
observe.constant.AdminStep.VALIDATE=Validación
=====================================
observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
=====================================
@@ -374,13 +374,6 @@ observe.admin.report.select.file.tip=Choisir le fichier de définition des repor
observe.admin.report.title=Aide à la génération de rapport
observe.admin.report.title.tip=Aide à la génération du rapport de fin d'embarquement
observe.admin.report.variables=Configuration des variables
-observe.admin.resume.no.operation.done=Aucune opération réalisée.
-observe.admin.resume.operation.canceled=opération annulée
-observe.admin.resume.operation.done=opération réussie
-observe.admin.resume.operation.failed=opération échouée
-observe.admin.resume.operation.need.fix=opération nécessitant des corrections
-observe.admin.resume.operation.not.started=opération non démarrée
-observe.admin.resume.operation.running=opération en cours...
observe.backup.done=[%s] Fin de la sauvegarde automatique (en %s)
observe.backup.start=[%s] Début de la sauvegarde automatique
observe.choice.cancel=Annuler
@@ -433,7 +426,6 @@ observe.common.gps.gpsPoint=Point GPS
observe.common.label=Libellé
observe.common.lengthWeightFormula=Relation Poids
observe.common.no.unit=Pas d'unité
-observe.common.operation.resume=Résumé des opérations
observe.common.resume=Résumé de la configuration
observe.common.saveFile.overwrite=Le fichier existe déjà. Voulez-vous le remplacer ?
observe.common.saveFile.overwrite.cancel=Annuler
@@ -593,8 +585,6 @@ observe.constant.AdminStep.SAVE_LOCAL=Sauvegarde locale
observe.constant.AdminStep.SAVE_LOCAL.description=Sauver les modifications sur votre base source
observe.constant.AdminStep.SELECT_DATA=Sélection des données
observe.constant.AdminStep.SELECT_DATA.description=Sélection des données pour effectuer les opérations
-observe.constant.AdminStep.SHOW_RESUME=Résumé
-observe.constant.AdminStep.SHOW_RESUME.description=Voir un résumé des opérations effectuées
observe.constant.AdminStep.SYNCHRONIZE=Mise à jour du référentiel
observe.constant.AdminStep.SYNCHRONIZE.description=Mettre à jour le référentiel depuis une base centrale
observe.constant.AdminStep.VALIDATE=Validation
=====================================
pom.xml
=====================================
@@ -24,7 +24,7 @@
<parent>
<groupId>io.ultreia.maven</groupId>
<artifactId>pom</artifactId>
- <version>2020.18</version>
+ <version>2020.19</version>
</parent>
<groupId>fr.ird.observe</groupId>
@@ -170,7 +170,7 @@
<!-- <lib.version.java4all.topia>1.17</lib.version.java4all.topia>-->
<!--<lib.version.java4all.eugene>3.0<-alpha-22</lib.version.java4all.eugene>-->
-<!-- <lib.version.java4all.jaxx>3.0-alpha-66-SNAPSHOT</lib.version.java4all.jaxx>-->
+<!-- <lib.version.java4all.jaxx>3.0-alpha-67-SNAPSHOT</lib.version.java4all.jaxx>-->
<!--<lib.version.java4all.application-context>1.0.3-SNAPSHOT</lib.version.java4all.application-context>-->
<!--<lib.version.java4all.application-template>1.0.2-SNAPSHOT</lib.version.java4all.application-template>-->
<!--<lib.version.java4all.i18n>4.0-beta-3-SNAPSHOT</lib.version.java4all.i18n>-->
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/67384c85c3cb3c60979013ae…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/67384c85c3cb3c60979013ae…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] Le nom du fichier de sauvegarde par défaut pourrait être modernisé - Closes #1212
by Tony CHEMIT 16 Apr '20
by Tony CHEMIT 16 Apr '20
16 Apr '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
67384c85 by tchemit at 2020-04-16T12:01:30+02:00
Le nom du fichier de sauvegarde par défaut pourrait être modernisé - Closes #1212
- - - - -
2 changed files:
- client-configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java
- client-core/src/main/java/fr/ird/observe/client/datasource/h2/backup/BackupsManager.java
Changes:
=====================================
client-configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java
=====================================
@@ -115,7 +115,7 @@ public class ClientConfig extends GeneratedClientConfig implements TemplateGener
ClientConfigOption.MAP_LAYER10);
private static final Logger log = LogManager.getLogger(ClientConfig.class);
/** le pattern du fichier de sauvegarde d'une base locale */
- private static final String BACKUP_DB_PATTERN = "obstuna-local-%1$tF--%1$tk-%1$tM-%1$tS.sql.gz";
+ private static final String BACKUP_DB_PATTERN = "observe-v%1$s-%2$tF--%2$tk-%2$tM-%2$tS.sql.gz";
private static final String APPLICATION_VERSION = "application.version";
private static final String VERSION = "version";
@@ -537,7 +537,7 @@ public class ClientConfig extends GeneratedClientConfig implements TemplateGener
}
public File newBackupDataFile() {
- return new File(getBackupDirectory(), String.format(BACKUP_DB_PATTERN, new Date()));
+ return new File(getBackupDirectory(), String.format(BACKUP_DB_PATTERN, getBuildVersion(), new Date()));
}
public void saveForUser() {
=====================================
client-core/src/main/java/fr/ird/observe/client/datasource/h2/backup/BackupsManager.java
=====================================
@@ -74,7 +74,7 @@ public class BackupsManager implements Closeable {
private static final Logger log = LogManager.getLogger(BackupsManager.class);
- private static final Pattern AUTOMATIC_BACKUP_FILENAME_PATTERN = Pattern.compile("obstuna-local-([0-9-]+)\\.sql\\.gz");
+ private static final Pattern AUTOMATIC_BACKUP_FILENAME_PATTERN = Pattern.compile("obs.+-([0-9-]+)\\.sql\\.gz");
private final Path backupsPath;
private final ObserveDataSourcesManager dataSourcesManager;
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/67384c85c3cb3c60979013ae5…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/67384c85c3cb3c60979013ae5…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 2 commits: Problème de rafraîchissement sur les formulaire de type tableau - Closes #1467
by Tony CHEMIT 16 Apr '20
by Tony CHEMIT 16 Apr '20
16 Apr '20
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
f30f4fb0 by tchemit at 2020-04-16T11:30:05+02:00
Problème de rafraîchissement sur les formulaire de type tableau - Closes #1467
- - - - -
6f74f5f1 by tchemit at 2020-04-16T11:30:53+02:00
Revoir la gestion du focus sur les formulaires à onglets, ne pas changer d'onglet après une sauvegarde - Closes #1466
- - - - -
3 changed files:
- client-datasource-editor-api/src/main/java/fr/ird/observe/client/datasource/editor/content/data/table/ContentTableUIHandler.java
- client-datasource-editor-common/src/main/java/fr/ird/observe/client/datasource/editor/content/data/TripUIHelper.java
- client-datasource-editor-ll/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ll/observation/actions/BranchlineUIReset.java
Changes:
=====================================
client-datasource-editor-api/src/main/java/fr/ird/observe/client/datasource/editor/content/data/table/ContentTableUIHandler.java
=====================================
@@ -204,7 +204,10 @@ public abstract class ContentTableUIHandler<D extends DataDto, C extends DataDto
if (selectedRow == -1) {
selectedRow = 0;
}
- log.info("Select row: " + selectedRow);
+ if (selectedRow >= tableModel.getRowCount()) {
+ selectedRow = 0;
+ }
+ log.info(String.format("Select row: %d", selectedRow));
tableModel.changeSelectedRow(-1);
tableModel.changeSelectedRow(selectedRow);
}
=====================================
client-datasource-editor-common/src/main/java/fr/ird/observe/client/datasource/editor/content/data/TripUIHelper.java
=====================================
@@ -71,7 +71,7 @@ public abstract class TripUIHelper<U extends ContentOpenableUI & TripUI> impleme
}
public void onOpenAfterOpenModel() {
- ui.getMainTabbedPane().setSelectedIndex(0);
+// ui.getMainTabbedPane().setSelectedIndex(0);
closeMap();
}
=====================================
client-datasource-editor-ll/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ll/observation/actions/BranchlineUIReset.java
=====================================
@@ -37,6 +37,7 @@ public class BranchlineUIReset extends Reset<BranchlineUI> {
@Override
public void doReset() {
super.doReset();
+ ui.getModel().setResetEdit(true);
BranchlineUIHandler handler = ui.getHandler();
try {
BranchlineDto branchline = ui.getModel().getBranchline();
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/f6e4b3060433f9dc75c1d7ec…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/f6e4b3060433f9dc75c1d7ec…
You're receiving this email because of your account on gitlab.com.
1
0