mailman.cloud.codelutin.com
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Observe-commits

Thread Start a new thread
Download
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
observe-commits@list.forge.codelutin.com

July 2018

  • 1 participants
  • 80 discussions
[Git][ultreiaio/ird-observe][develop-7.x] Make jaxx works again on windows :( - Closes #696
by Tony CHEMIT 29 Jul '18

29 Jul '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 34675105 by Tony Chemit at 2018-07-29T16:15:13Z Make jaxx works again on windows :( - Closes #696 - - - - - 2 changed files: - pom.xml - services-local/src/test/java/fr/ird/observe/services/local/service/actions/report/AbstractReportServiceLocalTest.java Changes: ===================================== pom.xml ===================================== @@ -153,7 +153,7 @@ <buildDate>${maven.build.timestamp}</buildDate> <observeToolkitVersion>3.7.3</observeToolkitVersion> - <!--<lib.version.java4all.jaxx>3.0-alpha-33-SNAPSHOT</lib.version.java4all.jaxx>--> + <lib.version.java4all.jaxx>3.0-alpha-34-SNAPSHOT</lib.version.java4all.jaxx> <lib.version.nuiton.validation>3.1</lib.version.nuiton.validation> <!--<lib.version.java4all.config>1.0.3</lib.version.java4all.config>--> <xworkVersion>2.3.34</xworkVersion> ===================================== services-local/src/test/java/fr/ird/observe/services/local/service/actions/report/AbstractReportServiceLocalTest.java ===================================== @@ -228,6 +228,14 @@ public abstract class AbstractReportServiceLocalTest extends ServiceLocalTestSup protected void assertResultRow(DataMatrix result, int rowId, Object... row) { Object[] actualRow = result.getData()[rowId]; - Assert.assertArrayEquals(row, actualRow); + int index=0; + for (Object o : actualRow) { + if (o==null) { + Assert.assertEquals(row[index++], o); + }else { + Assert.assertArrayEquals(row[index++].toString().split("\\s*\\n\\s*"),o.toString().split("\\s*\\n\\s*")); + } + } + //Assert.assertArrayEquals(row, actualRow); } } View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/346751051f38117b164b5fd1097… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/346751051f38117b164b5fd1097… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 2 commits: Exception sur formulaire équipement - Closes #1032
by Tony CHEMIT 23 Jul '18

23 Jul '18
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 845c400d by Tony CHEMIT at 2018-07-23T15:15:57Z Exception sur formulaire équipement - Closes #1032 - - - - - ee826fd4 by Tony CHEMIT at 2018-07-23T15:35:21Z [SPECIES RELEASE] Add a status in the reference list &quot;Etat à la libération&quot; during migration - Closes #1037 - - - - - 4 changed files: - client/src/main/java/fr/ird/observe/client/ui/util/table/EditableTableModelSupport.java - + persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_5.java - + persistence/src/main/resources/db/migration/7.5/01_add_speciesRelease-common.sql - pom.xml The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/bba686f28ec50a2aa5e6ab55ce… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/bba686f28ec50a2aa5e6ab55ce… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-7.x] [SPECIES RELEASE] Add a status in the reference list "Etat à la libération"…
by Tony CHEMIT 23 Jul '18

23 Jul '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 4beef1f0 by Tony CHEMIT at 2018-07-23T14:57:33Z [SPECIES RELEASE] Add a status in the reference list &quot;Etat à la libération&quot; during migration - Closes #1037 - - - - - 4 changed files: - + persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_5.java - + persistence/src/main/resources/db/migration/7.5/01_add_speciesRelease-common.sql - pom.xml - test/src/main/java/fr/ird/observe/test/ObserveFixtures.java The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/4beef1f03abe2e677a27e27176a… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/4beef1f03abe2e677a27e27176a… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-7.x] Exception sur formulaire équipement - Closes #1032
by Tony CHEMIT 23 Jul '18

23 Jul '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 5c631be9 by Tony CHEMIT at 2018-07-23T14:32:05Z Exception sur formulaire équipement - Closes #1032 - - - - - 1 changed file: - client/src/main/java/fr/ird/observe/client/ui/util/table/EditableTableModelSupport.java Changes: ===================================== client/src/main/java/fr/ird/observe/client/ui/util/table/EditableTableModelSupport.java ===================================== @@ -141,7 +141,7 @@ public abstract class EditableTableModelSupport<E extends Serializable> extends } public E getData(int rowIndex) { - return data.get(rowIndex); + return rowIndex >= data.size() ? null : data.get(rowIndex); } View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/5c631be961175825aa61e6dc73a… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/5c631be961175825aa61e6dc73a… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-7.x] Use a new improved combo box - Closes #1035
by Tony CHEMIT 19 Jul '18

19 Jul '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 88b463f1 by Tony CHEMIT at 2018-07-19T17:11:11Z Use a new improved combo box - Closes #1035 - - - - - 30 changed files: - client/src/main/java/fr/ird/observe/client/ui/ObserveCommon.jcss - client/src/main/java/fr/ird/observe/client/ui/content/Common.jcss - client/src/main/java/fr/ird/observe/client/ui/content/ContentUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/ContentUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/content/ObserveFocusManager.java - client/src/main/java/fr/ird/observe/client/ui/content/data/CommonTable.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/ActivityLonglineUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/BaitsCompositionUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/BranchlineUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/BranchlinesCompositionUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/CatchLonglineUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/CatchLonglineUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/EncounterUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/FloatlinesCompositionUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/GearUseFeaturesLonglineUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/HooksCompositionUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/LonglinePositionHelper.java - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/SensorUsedUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/SetLonglineUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TdrUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/ActivitySeineUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/FloatingObjectTransmittingBuoyOperationUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/FloatingObjectUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/FloatingObjectUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/GearUseFeaturesSeineUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetCatchReleaseUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetCatchUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetSampleUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/ObjectObservedSpeciesUI.jaxx The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/88b463f1fbc42ec68289d572444… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/88b463f1fbc42ec68289d572444… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] Be able to use server configuration to perform database management - Closes #1034)
by Tony CHEMIT 19 Jul '18

19 Jul '18
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: bba686f2 by Tony CHEMIT at 2018-07-19T11:48:09Z Be able to use server configuration to perform database management - Closes #1034) - - - - - 19 changed files: - client-configuration/src/main/config/Client.ini - client-configuration/src/main/resources/i18n/client-configuration_en_GB.properties - client-configuration/src/main/resources/i18n/client-configuration_es_ES.properties - client-configuration/src/main/resources/i18n/client-configuration_fr_FR.properties - client/src/main/assembly/dist/obstuna-admin/README.txt - + client/src/main/assembly/dist/obstuna-admin/create-server.bat - + client/src/main/assembly/dist/obstuna-admin/create-server.sh - + client/src/main/assembly/dist/obstuna-admin/drop-server.bat - + client/src/main/assembly/dist/obstuna-admin/drop-server.sh - + client/src/main/assembly/dist/obstuna-admin/update-security-server.bat - + client/src/main/assembly/dist/obstuna-admin/update-security-server.sh - + client/src/main/assembly/dist/obstuna-admin/update-server.bat - + client/src/main/assembly/dist/obstuna-admin/update-server.sh - client/src/main/java/fr/ird/observe/client/ObserveCLAction.java - client/src/main/java/fr/ird/observe/client/ui/storage/ObstunaAdminAction.java - client/src/main/java/fr/ird/observe/client/ui/storage/RemoteUILauncher.java - server-configuration/src/main/resources/observeweb-log4j.conf - server/src/main/java/fr/ird/observe/server/controller/v1/DataSourceServiceRestApi.java - services/src/main/java/fr/ird/observe/services/service/DataSourceService.java Changes: ===================================== client-configuration/src/main/config/Client.ini ===================================== @@ -624,6 +624,11 @@ description = observe.action.commandline.launch.obstuna.admin.ui action = "fr.ird.observe.client.ObserveCLAction#launchObstunaAdminUI" aliases = --obstuna-admin +[action serverAdminUi] +description = observe.action.commandline.launch.server.admin.ui +action = "fr.ird.observe.client.ObserveCLAction#launchServerAdminUI" +aliases = --server-admin + [action h2ServerMode] description = observe.action.commandline.launch.h2.server.mode action = "fr.ird.observe.client.ObserveCLAction#launchH2ServerMode" ===================================== client-configuration/src/main/resources/i18n/client-configuration_en_GB.properties ===================================== @@ -7,6 +7,7 @@ observe.action.commandline.help.ui=Show gui help observe.action.commandline.launch.admin.ui=Launch an administration task observe.action.commandline.launch.h2.server.mode=Launch ObServe in server mode observe.action.commandline.launch.obstuna.admin.ui=Launch an adminstration task on obstuna +observe.action.commandline.launch.server.admin.ui=Launch an adminstration task on server observe.action.commandline.use.jmx=Add JMX support observe.config.backup.atClose=Perform a backup of local source when closing application observe.config.backup.delay=Delay in minutes between local data source backup ===================================== client-configuration/src/main/resources/i18n/client-configuration_es_ES.properties ===================================== @@ -7,6 +7,7 @@ observe.action.commandline.help.ui=Mostrar el manual de usuario (modo grafico) observe.action.commandline.launch.admin.ui=Ejecutar una operación de administración observe.action.commandline.launch.h2.server.mode=Ejecutar ObServe en modo servidor observe.action.commandline.launch.obstuna.admin.ui=Ejecutar una operación de administración sobre Obstuna +observe.action.commandline.launch.server.admin.ui=Lancer une opération d'administration sur un serveur \#TODO observe.action.commandline.use.jmx=Mostrar el soporte JMX observe.config.backup.atClose=Realizar una copia de seguridad de la base de datos local al cerrar la aplicación observe.config.backup.delay=Minutos entre cada copia de seguridad de la base de datos local ===================================== client-configuration/src/main/resources/i18n/client-configuration_fr_FR.properties ===================================== @@ -7,6 +7,7 @@ observe.action.commandline.help.ui=Afficher le manuel utilisateur (mode graphiqu observe.action.commandline.launch.admin.ui=Lancer une opération d'administration observe.action.commandline.launch.h2.server.mode=Lancer ObServe en mode serveur observe.action.commandline.launch.obstuna.admin.ui=Lancer une opération d'administration sur Obstuna +observe.action.commandline.launch.server.admin.ui=Lancer une opération d'administration sur un serveur observe.action.commandline.use.jmx=Ajouter le support JMX observe.config.backup.atClose=Effectuer une sauvegarde de la base locale à la fermeture de l'application observe.config.backup.delay=Temps en minutes entre chaque sauvegarde de la base locale ===================================== client/src/main/assembly/dist/obstuna-admin/README.txt ===================================== @@ -6,7 +6,7 @@ Lancer le script (sh) ./createdb/create-ird_obstuna.sh -Puis lancer ObServe en mode création de base obstuna +puis ./create-obstuna.sh @@ -27,8 +27,6 @@ ou Pour mettre à jour la sécurité sur une base obstuna --------------------------------------------------- -Il faut ensuite lancer l'action de mise à jour de base via ObServe : - ./update-security-obstuna.sh ou @@ -43,3 +41,47 @@ Pour vider une base obstuna ou ./drop-obstuna.bat + + +Pour créer une nouvelle base via server +------------------------------------------ + +Lancer le script (sh) + +./createdb/create-ird_obstuna.sh + +puis + +./create-server.sh + +ou + +./create-server.bat + + +Pour mettre à jour une base via serveur +--------------------------------------- + +./update-server.sh + +ou + +./update-server.bat + +Pour mettre à jour la sécurité sur une base via serveur +------------------------------------------------------- + +./update-security-server.sh + +ou + +./update-security-server.bat + +Pour vider une base via serveur +------------------------------- + +./drop-server.sh + +ou + +./drop-server.bat ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.bat ===================================== @@ -0,0 +1,2 @@ + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin create \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.sh ===================================== @@ -0,0 +1,28 @@ +### +# #%L +# ObServe :: Admin Client +# +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit +# %% +# 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% +### +#!/bin/sh +# Pour créer une nouvelle base obstuna (le schéma sera créer et le référentiel rempli) + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin create \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.bat ===================================== @@ -0,0 +1,2 @@ + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin drop \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.sh ===================================== @@ -0,0 +1,28 @@ +### +# #%L +# ObServe :: Admin Client +# +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit +# %% +# 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% +### +#!/bin/sh +# Pour vider une base obstuna (toutes les tables seront supprimées) + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin drop \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.bat ===================================== @@ -0,0 +1,2 @@ + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin security \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.sh ===================================== @@ -0,0 +1,28 @@ +### +# #%L +# ObServe :: Admin Client +# +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit +# %% +# 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% +### +#!/bin/sh +# Pour mettre à jour la sécurité sur une base postgres + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin security \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.bat ===================================== @@ -0,0 +1,2 @@ + +java -Xmx2048M -Xms512M -jar ../${project.build.finalName}.jar --server-admin update \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.sh ===================================== @@ -0,0 +1,28 @@ +### +# #%L +# ObServe :: Admin Client +# +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit +# %% +# 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% +### +#!/bin/sh +# Pour mettre à jour une base server (le schéma sera mis à jour si nécessaire) + +java -Xmx1536M -Xms512M -jar ../${project.build.finalName}.jar --server-admin update \ No newline at end of file ===================================== client/src/main/java/fr/ird/observe/client/ObserveCLAction.java ===================================== @@ -176,7 +176,39 @@ public class ObserveCLAction { getConfig().setObstunaCanMigrate(true); } - RemoteUILauncher launcher = operation.newLauncher(context, null); + RemoteUILauncher launcher = operation.newLauncher(context, null, false); + + Runnable runnable = createRunnable(launcher, "start"); + launchAction(t(launcher.getTitle()), runnable); + } + + @SuppressWarnings("unused") + public void launchServerAdminUI(String operationName) throws InterruptedException { + + disableMainUI(); + + EnumSet<ObstunaAdminAction> operations = EnumSet.allOf(ObstunaAdminAction.class); + + ObstunaAdminAction operation = ObstunaAdminAction.valueOfIgnoreCase(operationName); + if (operation == null) { + if (log.isErrorEnabled()) { + log.error(operationName + " is not a known obstuna admin operation."); + log.error("Use one of these ones : " + operations); + } + return; + } + + ObserveSwingApplicationContext context = ObserveSwingApplicationContext.get(); + + // FIXME +// getConfig().setOption(AbstractDataSourceMigration.AUTO_MIGRATE, "false"); + + if (operation == ObstunaAdminAction.UPDATE || + operation == ObstunaAdminAction.CREATE) { + getConfig().setObstunaCanMigrate(true); + } + + RemoteUILauncher launcher = operation.newLauncher(context, null, true); Runnable runnable = createRunnable(launcher, "start"); launchAction(t(launcher.getTitle()), runnable); ===================================== client/src/main/java/fr/ird/observe/client/ui/storage/ObstunaAdminAction.java ===================================== @@ -21,7 +21,6 @@ */ package fr.ird.observe.client.ui.storage; -import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import fr.ird.observe.client.ObserveSwingApplicationContext; import fr.ird.observe.client.constants.DbMode; @@ -44,6 +43,7 @@ import org.nuiton.jaxx.runtime.JAXXContext; import org.nuiton.version.Version; import java.awt.Window; +import java.util.Objects; import java.util.stream.Collectors; import static org.nuiton.i18n.I18n.t; @@ -64,8 +64,8 @@ public enum ObstunaAdminAction { */ CREATE() { @Override - public RemoteUILauncher newLauncher(JAXXContext context, Window frame) { - return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this)) { + public RemoteUILauncher newLauncher(JAXXContext context, Window frame, boolean serverMode) { + return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this),serverMode ) { DataSourceCreateConfigurationDto createConfigurationDto; ObserveSwingDataSource dataSource; @@ -83,19 +83,9 @@ public enum ObstunaAdminAction { void checkImportDbVersion(StorageUIModel model, ObserveDataSourceConfiguration dataSourceConfig) throws DatabaseConnexionNotAuthorizedException, DatabaseNotFoundException, BabModelVersionException { - ObserveSwingDataSource importDataSource = ObserveSwingApplicationContext.get().getDataSourcesManager().newDataSource(dataSourceConfig); - - Preconditions.checkState(importDataSource != null, "Can't select data on a null dataSource"); - - try { - - importDataSource.open(); - - model.checkImportDbVersion(importDataSource); - - } finally { - - importDataSource.close(); + try (ObserveSwingDataSource importDataSource = Objects.requireNonNull(ObserveSwingApplicationContext.get().getDataSourcesManager().newDataSource(dataSourceConfig))) { + importDataSource.open(); + model.checkImportDbVersion(importDataSource); } } @@ -189,8 +179,8 @@ public enum ObstunaAdminAction { */ UPDATE() { @Override - public RemoteUILauncher newLauncher(JAXXContext context, Window frame) { - return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this)) { + public RemoteUILauncher newLauncher(JAXXContext context, Window frame, boolean serverMode) { + return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this),serverMode ) { ObserveSwingDataSource dataSource; ObserveDataSourceInformation dataSourceInformation; @@ -248,8 +238,8 @@ public enum ObstunaAdminAction { */ SECURITY() { @Override - public RemoteUILauncher newLauncher(JAXXContext context, Window frame) { - return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this)) { + public RemoteUILauncher newLauncher(JAXXContext context, Window frame, boolean serverMode) { + return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this),serverMode ) { ObserveSwingDataSource dataSource; ImmutableSet<ObserveDbUserDto> users; @@ -291,7 +281,7 @@ public enum ObstunaAdminAction { return null; } - public abstract RemoteUILauncher newLauncher(JAXXContext context, Window frame); + public abstract RemoteUILauncher newLauncher(JAXXContext context, Window frame, boolean serverMode); @Override public String toString() { @@ -310,7 +300,6 @@ public enum ObstunaAdminAction { dataSource = ObserveSwingApplicationContext.get().getDataSourcesManager().newDataSource(pgConfig); } else { ObserveDataSourceConfigurationRest restConfig = model.getRestConfig(); - dataSource = ObserveSwingApplicationContext.get().getDataSourcesManager().newDataSource(restConfig); } return dataSource; ===================================== client/src/main/java/fr/ird/observe/client/ui/storage/RemoteUILauncher.java ===================================== @@ -6,15 +6,15 @@ * %% * 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 + * 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 + * + * 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% @@ -43,15 +43,17 @@ public abstract class RemoteUILauncher extends StorageUILauncher { /** Logger */ private static final Log log = LogFactory.getLog(RemoteUILauncher.class); - + private final boolean serverMode; protected ObstunaAdminAction action; public RemoteUILauncher(ObstunaAdminAction action, JAXXContext context, Window frame, - String title) { + String title, + boolean serverMode) { super(context, frame, title); this.action = action; + this.serverMode = serverMode; } @Override @@ -63,7 +65,7 @@ public abstract class RemoteUILauncher extends StorageUILauncher { model.setCanUseLocalService(false); model.setCanUseRemoteService(true); model.setCanUseServerService(true); - model.setDbMode(DbMode.USE_REMOTE); + model.setDbMode(serverMode ? DbMode.USE_SERVER : DbMode.USE_REMOTE); model.setAdminAction(action); List<StorageStep> steps = new ArrayList<>(); ===================================== server-configuration/src/main/resources/observeweb-log4j.conf ===================================== @@ -36,7 +36,8 @@ log4j.appender.file.layout.ConversionPattern=%-5p %d{ISO8601} [%t] %40C{1} :%4L log4j.logger.fr.ird.observe=INFO log4j.logger.fr.ird.observe.client.validators=WARN log4j.logger.io.ultreia=INFO -log4j.logger.org.nuiton.topia.migration=INFO +log4j.logger.org.nuiton.topia.service.sql=INFO +log4j.logger.org.nuiton.topia.service.migration=INFO log4j.logger.org.hibernate.orm.deprecation=ERROR log4j.logger.com.zaxxer.hikari.HikariDataSource=ERROR log4j.logger.com.opensymphony.xwork2.validator.validators=ERROR ===================================== server/src/main/java/fr/ird/observe/server/controller/v1/DataSourceServiceRestApi.java ===================================== @@ -127,7 +127,7 @@ public class DataSourceServiceRestApi extends GeneratedDataSourceServiceRestApi @Override public void migrateData(ObserveDataSourceConfiguration dataSourceConfiguration) { ObserveDataSourceConfiguration dataSourceConfigurationTopia = getTopiaDataSourceConfiguration(dataSourceConfiguration); - getAnonymousService(dataSourceConfigurationTopia).migrateData(dataSourceConfiguration); + getAnonymousService(dataSourceConfigurationTopia).migrateData(dataSourceConfigurationTopia); } protected ObserveDataSourceConfiguration getTopiaDataSourceConfiguration(ObserveDataSourceConfiguration dataSourceConfigurationFromRequest) { ===================================== services/src/main/java/fr/ird/observe/services/service/DataSourceService.java ===================================== @@ -61,7 +61,7 @@ public interface DataSourceService extends ObserveService, Closeable { @Get(addAuthtoken = false) void applySecurity(ObserveDataSourceConfiguration dataSourceConfiguration, ImmutableSet<ObserveDbUserDto> users); - @Get(addAuthtoken = false) + @Get(addAuthtoken = false, timeOut = 1000) void migrateData(ObserveDataSourceConfiguration dataSourceConfiguration); @Get View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/bba686f28ec50a2aa5e6ab55ce5… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/bba686f28ec50a2aa5e6ab55ce5… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 3 commits: Requêtes pour insertion préalable des systèmes observés 20, 21 et 22 - Closes #989
by Tony CHEMIT 19 Jul '18

19 Jul '18
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 21ff8fed by Tony CHEMIT at 2018-07-18T12:07:08Z Requêtes pour insertion préalable des systèmes observés 20, 21 et 22 - Closes #989 - - - - - c3469cce by Tony CHEMIT at 2018-07-18T12:08:58Z Migration de sql.gz V5 HS - Closes #990 - - - - - 35e71a90 by Tony CHEMIT at 2018-07-19T11:34:39Z report v7 - - - - - 30 changed files: - client-configuration/src/main/config/Client.ini - client-configuration/src/main/resources/i18n/client-configuration_en_GB.properties - client-configuration/src/main/resources/i18n/client-configuration_es_ES.properties - client-configuration/src/main/resources/i18n/client-configuration_fr_FR.properties - client-configuration/src/test/java/fr/ird/observe/client/configuration/ClientConfigTest.java - client/src/main/java/fr/ird/observe/client/ObserveSwingApplicationContext.java - client/src/main/java/fr/ird/observe/client/backup/BackupsManager.java - client/src/main/java/fr/ird/observe/client/db/ObserveDataSourcesManager.java - client/src/main/java/fr/ird/observe/client/db/ObserveSwingDataSource.java - client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java - client/src/main/java/fr/ird/observe/client/ui/ObserveMainUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/actions/UIActionSupport.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/AbstractContentUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/AddActivityLonglineLogbookSetUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/AddFloatingObjectPresetUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/CloseAndCreateUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/CloseOpenUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/CopyFloatingObjectPartToLeftAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/CopyFloatingObjectPartToRightAction.java - + client/src/main/java/fr/ird/observe/client/ui/actions/content/LonglineDetailCompositionDeleteAllSectionsAction.java - + client/src/main/java/fr/ird/observe/client/ui/actions/content/LonglineDetailCompositionGenerateAllSectionsAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/MoveActivityLonglineLogbookUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/MoveActivityLonglineLogbooksUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/MoveActivityLonglineObsUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/MoveActivitySeineUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/MoveActivitySeinesUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/MoveMultipleDataUIActionSupport.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/MoveRouteUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/MoveRoutesUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/MoveSingleDataUIActionSupport.java The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/9f68367eec2955632f6aef91a1… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/9f68367eec2955632f6aef91a1… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-7.x] Be able to use server configuration to perform database management - Closes #1034)
by Tony CHEMIT 18 Jul '18

18 Jul '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 1e1e74e6 by Tony CHEMIT at 2018-07-18T21:20:01Z Be able to use server configuration to perform database management - Closes #1034) - - - - - 19 changed files: - client-configuration/src/main/config/Client.ini - client-configuration/src/main/resources/i18n/client-configuration_en_GB.properties - client-configuration/src/main/resources/i18n/client-configuration_es_ES.properties - client-configuration/src/main/resources/i18n/client-configuration_fr_FR.properties - client/src/main/assembly/dist/obstuna-admin/README.txt - + client/src/main/assembly/dist/obstuna-admin/create-server.bat - + client/src/main/assembly/dist/obstuna-admin/create-server.sh - + client/src/main/assembly/dist/obstuna-admin/drop-server.bat - + client/src/main/assembly/dist/obstuna-admin/drop-server.sh - + client/src/main/assembly/dist/obstuna-admin/update-security-server.bat - + client/src/main/assembly/dist/obstuna-admin/update-security-server.sh - + client/src/main/assembly/dist/obstuna-admin/update-server.bat - + client/src/main/assembly/dist/obstuna-admin/update-server.sh - client/src/main/java/fr/ird/observe/client/ObserveCLAction.java - client/src/main/java/fr/ird/observe/client/ui/storage/ObstunaAdminAction.java - client/src/main/java/fr/ird/observe/client/ui/storage/RemoteUILauncher.java - server-configuration/src/main/resources/observeweb-log4j.conf - server/src/main/java/fr/ird/observe/server/controller/v1/DataSourceServiceRestApi.java - services/src/main/java/fr/ird/observe/services/service/DataSourceService.java Changes: ===================================== client-configuration/src/main/config/Client.ini ===================================== @@ -609,6 +609,11 @@ description = observe.action.commandline.launch.obstuna.admin.ui action = "fr.ird.observe.client.ObserveCLAction#launchObstunaAdminUI" aliases = --obstuna-admin +[action serverAdminUi] +description = observe.action.commandline.launch.server.admin.ui +action = "fr.ird.observe.client.ObserveCLAction#launchServerAdminUI" +aliases = --server-admin + [action h2ServerMode] description = observe.action.commandline.launch.h2.server.mode action = "fr.ird.observe.client.ObserveCLAction#launchH2ServerMode" ===================================== client-configuration/src/main/resources/i18n/client-configuration_en_GB.properties ===================================== @@ -7,6 +7,7 @@ observe.action.commandline.help.ui=Show gui help observe.action.commandline.launch.admin.ui=Launch an administration task observe.action.commandline.launch.h2.server.mode=Launch ObServe in server mode observe.action.commandline.launch.obstuna.admin.ui=Launch an adminstration task on obstuna +observe.action.commandline.launch.server.admin.ui=Launch an adminstration task on server observe.action.commandline.use.jmx=Add JMX support observe.config.backup.atClose=Perform a backup of local source when closing application observe.config.backup.delay=Delay in minutes between local data source backup ===================================== client-configuration/src/main/resources/i18n/client-configuration_es_ES.properties ===================================== @@ -7,6 +7,7 @@ observe.action.commandline.help.ui=Mostrar el manual de usuario (modo grafico) observe.action.commandline.launch.admin.ui=Ejecutar una operación de administración observe.action.commandline.launch.h2.server.mode=Ejecutar ObServe en modo servidor observe.action.commandline.launch.obstuna.admin.ui=Ejecutar una operación de administración sobre Obstuna +observe.action.commandline.launch.server.admin.ui=Lancer une opération d'administration sur un serveur \#TODO observe.action.commandline.use.jmx=Mostrar el soporte JMX observe.config.backup.atClose=Realizar una copia de seguridad de la base de datos local al cerrar la aplicación observe.config.backup.delay=Minutos entre cada copia de seguridad de la base de datos local ===================================== client-configuration/src/main/resources/i18n/client-configuration_fr_FR.properties ===================================== @@ -7,6 +7,7 @@ observe.action.commandline.help.ui=Afficher le manuel utilisateur (mode graphiqu observe.action.commandline.launch.admin.ui=Lancer une opération d'administration observe.action.commandline.launch.h2.server.mode=Lancer ObServe en mode serveur observe.action.commandline.launch.obstuna.admin.ui=Lancer une opération d'administration sur Obstuna +observe.action.commandline.launch.server.admin.ui=Lancer une opération d'administration sur un serveur observe.action.commandline.use.jmx=Ajouter le support JMX observe.config.backup.atClose=Effectuer une sauvegarde de la base locale à la fermeture de l'application observe.config.backup.delay=Temps en minutes entre chaque sauvegarde de la base locale ===================================== client/src/main/assembly/dist/obstuna-admin/README.txt ===================================== @@ -6,7 +6,7 @@ Lancer le script (sh) ./createdb/create-ird_obstuna.sh -Puis lancer ObServe en mode création de base obstuna +puis ./create-obstuna.sh @@ -27,8 +27,6 @@ ou Pour mettre à jour la sécurité sur une base obstuna --------------------------------------------------- -Il faut ensuite lancer l'action de mise à jour de base via ObServe : - ./update-security-obstuna.sh ou @@ -43,3 +41,47 @@ Pour vider une base obstuna ou ./drop-obstuna.bat + + +Pour créer une nouvelle base via server +------------------------------------------ + +Lancer le script (sh) + +./createdb/create-ird_obstuna.sh + +puis + +./create-server.sh + +ou + +./create-server.bat + + +Pour mettre à jour une base via serveur +--------------------------------------- + +./update-server.sh + +ou + +./update-server.bat + +Pour mettre à jour la sécurité sur une base via serveur +------------------------------------------------------- + +./update-security-server.sh + +ou + +./update-security-server.bat + +Pour vider une base via serveur +------------------------------- + +./drop-server.sh + +ou + +./drop-server.bat ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.bat ===================================== @@ -0,0 +1,2 @@ + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin create \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.sh ===================================== @@ -0,0 +1,28 @@ +### +# #%L +# ObServe :: Admin Client +# +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit +# %% +# 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% +### +#!/bin/sh +# Pour créer une nouvelle base obstuna (le schéma sera créer et le référentiel rempli) + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin create \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.bat ===================================== @@ -0,0 +1,2 @@ + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin drop \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.sh ===================================== @@ -0,0 +1,28 @@ +### +# #%L +# ObServe :: Admin Client +# +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit +# %% +# 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% +### +#!/bin/sh +# Pour vider une base obstuna (toutes les tables seront supprimées) + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin drop \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.bat ===================================== @@ -0,0 +1,2 @@ + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin security \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.sh ===================================== @@ -0,0 +1,28 @@ +### +# #%L +# ObServe :: Admin Client +# +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit +# %% +# 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% +### +#!/bin/sh +# Pour mettre à jour la sécurité sur une base postgres + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin security \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.bat ===================================== @@ -0,0 +1,2 @@ + +java -Xmx2048M -Xms512M -jar ../${project.build.finalName}.jar --server-admin update \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.sh ===================================== @@ -0,0 +1,28 @@ +### +# #%L +# ObServe :: Admin Client +# +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit +# %% +# 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% +### +#!/bin/sh +# Pour mettre à jour une base server (le schéma sera mis à jour si nécessaire) + +java -Xmx1536M -Xms512M -jar ../${project.build.finalName}.jar --server-admin update \ No newline at end of file ===================================== client/src/main/java/fr/ird/observe/client/ObserveCLAction.java ===================================== @@ -176,7 +176,39 @@ public class ObserveCLAction { getConfig().setObstunaCanMigrate(true); } - RemoteUILauncher launcher = operation.newLauncher(context, null); + RemoteUILauncher launcher = operation.newLauncher(context, null, false); + + Runnable runnable = createRunnable(launcher, "start"); + launchAction(t(launcher.getTitle()), runnable); + } + + @SuppressWarnings("unused") + public void launchServerAdminUI(String operationName) throws InterruptedException { + + disableMainUI(); + + EnumSet<ObstunaAdminAction> operations = EnumSet.allOf(ObstunaAdminAction.class); + + ObstunaAdminAction operation = ObstunaAdminAction.valueOfIgnoreCase(operationName); + if (operation == null) { + if (log.isErrorEnabled()) { + log.error(operationName + " is not a known obstuna admin operation."); + log.error("Use one of these ones : " + operations); + } + return; + } + + ObserveSwingApplicationContext context = ObserveSwingApplicationContext.get(); + + // FIXME +// getConfig().setOption(AbstractDataSourceMigration.AUTO_MIGRATE, "false"); + + if (operation == ObstunaAdminAction.UPDATE || + operation == ObstunaAdminAction.CREATE) { + getConfig().setObstunaCanMigrate(true); + } + + RemoteUILauncher launcher = operation.newLauncher(context, null, true); Runnable runnable = createRunnable(launcher, "start"); launchAction(t(launcher.getTitle()), runnable); ===================================== client/src/main/java/fr/ird/observe/client/ui/storage/ObstunaAdminAction.java ===================================== @@ -21,7 +21,6 @@ */ package fr.ird.observe.client.ui.storage; -import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import fr.ird.observe.client.ObserveSwingApplicationContext; import fr.ird.observe.client.constants.DbMode; @@ -44,6 +43,7 @@ import org.nuiton.jaxx.runtime.JAXXContext; import org.nuiton.version.Version; import java.awt.Window; +import java.util.Objects; import java.util.stream.Collectors; import static org.nuiton.i18n.I18n.t; @@ -64,8 +64,8 @@ public enum ObstunaAdminAction { */ CREATE() { @Override - public RemoteUILauncher newLauncher(JAXXContext context, Window frame) { - return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this)) { + public RemoteUILauncher newLauncher(JAXXContext context, Window frame, boolean serverMode) { + return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this),serverMode ) { DataSourceCreateConfigurationDto createConfigurationDto; ObserveSwingDataSource dataSource; @@ -83,19 +83,9 @@ public enum ObstunaAdminAction { void checkImportDbVersion(StorageUIModel model, ObserveDataSourceConfiguration dataSourceConfig) throws DatabaseConnexionNotAuthorizedException, DatabaseNotFoundException, BabModelVersionException { - ObserveSwingDataSource importDataSource = ObserveSwingApplicationContext.get().getDataSourcesManager().newDataSource(dataSourceConfig); - - Preconditions.checkState(importDataSource != null, "Can't select data on a null dataSource"); - - try { - - importDataSource.open(); - - model.checkImportDbVersion(importDataSource); - - } finally { - - importDataSource.close(); + try (ObserveSwingDataSource importDataSource = Objects.requireNonNull(ObserveSwingApplicationContext.get().getDataSourcesManager().newDataSource(dataSourceConfig))) { + importDataSource.open(); + model.checkImportDbVersion(importDataSource); } } @@ -189,8 +179,8 @@ public enum ObstunaAdminAction { */ UPDATE() { @Override - public RemoteUILauncher newLauncher(JAXXContext context, Window frame) { - return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this)) { + public RemoteUILauncher newLauncher(JAXXContext context, Window frame, boolean serverMode) { + return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this),serverMode ) { ObserveSwingDataSource dataSource; ObserveDataSourceInformation dataSourceInformation; @@ -248,8 +238,8 @@ public enum ObstunaAdminAction { */ SECURITY() { @Override - public RemoteUILauncher newLauncher(JAXXContext context, Window frame) { - return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this)) { + public RemoteUILauncher newLauncher(JAXXContext context, Window frame, boolean serverMode) { + return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this),serverMode ) { ObserveSwingDataSource dataSource; ImmutableSet<ObserveDbUserDto> users; @@ -291,7 +281,7 @@ public enum ObstunaAdminAction { return null; } - public abstract RemoteUILauncher newLauncher(JAXXContext context, Window frame); + public abstract RemoteUILauncher newLauncher(JAXXContext context, Window frame, boolean serverMode); @Override public String toString() { @@ -310,7 +300,6 @@ public enum ObstunaAdminAction { dataSource = ObserveSwingApplicationContext.get().getDataSourcesManager().newDataSource(pgConfig); } else { ObserveDataSourceConfigurationRest restConfig = model.getRestConfig(); - dataSource = ObserveSwingApplicationContext.get().getDataSourcesManager().newDataSource(restConfig); } return dataSource; ===================================== client/src/main/java/fr/ird/observe/client/ui/storage/RemoteUILauncher.java ===================================== @@ -6,15 +6,15 @@ * %% * 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 + * 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 + * + * 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% @@ -43,15 +43,17 @@ public abstract class RemoteUILauncher extends StorageUILauncher { /** Logger */ private static final Log log = LogFactory.getLog(RemoteUILauncher.class); - + private final boolean serverMode; protected ObstunaAdminAction action; public RemoteUILauncher(ObstunaAdminAction action, JAXXContext context, Window frame, - String title) { + String title, + boolean serverMode) { super(context, frame, title); this.action = action; + this.serverMode = serverMode; } @Override @@ -63,7 +65,7 @@ public abstract class RemoteUILauncher extends StorageUILauncher { model.setCanUseLocalService(false); model.setCanUseRemoteService(true); model.setCanUseServerService(true); - model.setDbMode(DbMode.USE_REMOTE); + model.setDbMode(serverMode ? DbMode.USE_SERVER : DbMode.USE_REMOTE); model.setAdminAction(action); List<StorageStep> steps = new ArrayList<>(); ===================================== server-configuration/src/main/resources/observeweb-log4j.conf ===================================== @@ -36,7 +36,8 @@ log4j.appender.file.layout.ConversionPattern=%-5p %d{ISO8601} [%t] %40C{1} :%4L log4j.logger.fr.ird.observe=INFO log4j.logger.fr.ird.observe.client.validators=WARN log4j.logger.io.ultreia=INFO -log4j.logger.org.nuiton.topia.migration=INFO +log4j.logger.org.nuiton.topia.service.sql=INFO +log4j.logger.org.nuiton.topia.service.migration=INFO log4j.logger.org.hibernate.orm.deprecation=ERROR log4j.logger.com.zaxxer.hikari.HikariDataSource=ERROR log4j.logger.com.opensymphony.xwork2.validator.validators=ERROR ===================================== server/src/main/java/fr/ird/observe/server/controller/v1/DataSourceServiceRestApi.java ===================================== @@ -127,7 +127,7 @@ public class DataSourceServiceRestApi extends GeneratedDataSourceServiceRestApi @Override public void migrateData(ObserveDataSourceConfiguration dataSourceConfiguration) { ObserveDataSourceConfiguration dataSourceConfigurationTopia = getTopiaDataSourceConfiguration(dataSourceConfiguration); - getAnonymousService(dataSourceConfigurationTopia).migrateData(dataSourceConfiguration); + getAnonymousService(dataSourceConfigurationTopia).migrateData(dataSourceConfigurationTopia); } protected ObserveDataSourceConfiguration getTopiaDataSourceConfiguration(ObserveDataSourceConfiguration dataSourceConfigurationFromRequest) { ===================================== services/src/main/java/fr/ird/observe/services/service/DataSourceService.java ===================================== @@ -61,7 +61,7 @@ public interface DataSourceService extends ObserveService, Closeable { @Get(addAuthtoken = false) void applySecurity(ObserveDataSourceConfiguration dataSourceConfiguration, ImmutableSet<ObserveDbUserDto> users); - @Get(addAuthtoken = false) + @Get(addAuthtoken = false, timeOut = 1000) void migrateData(ObserveDataSourceConfiguration dataSourceConfiguration); @Get View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/1e1e74e663307176a65c0396643… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/1e1e74e663307176a65c0396643… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-7.x] Can admin server now \o/
by Tony CHEMIT 18 Jul '18

18 Jul '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 0ec98d29 by Tony CHEMIT at 2018-07-18T17:32:14Z Can admin server now \o/ - - - - - 19 changed files: - client-configuration/src/main/config/Client.ini - client-configuration/src/main/resources/i18n/client-configuration_en_GB.properties - client-configuration/src/main/resources/i18n/client-configuration_es_ES.properties - client-configuration/src/main/resources/i18n/client-configuration_fr_FR.properties - client/src/main/assembly/dist/obstuna-admin/README.txt - + client/src/main/assembly/dist/obstuna-admin/create-server.bat - + client/src/main/assembly/dist/obstuna-admin/create-server.sh - + client/src/main/assembly/dist/obstuna-admin/drop-server.bat - + client/src/main/assembly/dist/obstuna-admin/drop-server.sh - + client/src/main/assembly/dist/obstuna-admin/update-security-server.bat - + client/src/main/assembly/dist/obstuna-admin/update-security-server.sh - + client/src/main/assembly/dist/obstuna-admin/update-server.bat - + client/src/main/assembly/dist/obstuna-admin/update-server.sh - client/src/main/java/fr/ird/observe/client/ObserveCLAction.java - client/src/main/java/fr/ird/observe/client/ui/storage/ObstunaAdminAction.java - client/src/main/java/fr/ird/observe/client/ui/storage/RemoteUILauncher.java - server-configuration/src/main/resources/observeweb-log4j.conf - server/src/main/java/fr/ird/observe/server/controller/v1/DataSourceServiceRestApi.java - services/src/main/java/fr/ird/observe/services/service/DataSourceService.java Changes: ===================================== client-configuration/src/main/config/Client.ini ===================================== @@ -609,6 +609,11 @@ description = observe.action.commandline.launch.obstuna.admin.ui action = "fr.ird.observe.client.ObserveCLAction#launchObstunaAdminUI" aliases = --obstuna-admin +[action serverAdminUi] +description = observe.action.commandline.launch.server.admin.ui +action = "fr.ird.observe.client.ObserveCLAction#launchServerAdminUI" +aliases = --server-admin + [action h2ServerMode] description = observe.action.commandline.launch.h2.server.mode action = "fr.ird.observe.client.ObserveCLAction#launchH2ServerMode" ===================================== client-configuration/src/main/resources/i18n/client-configuration_en_GB.properties ===================================== @@ -7,6 +7,7 @@ observe.action.commandline.help.ui=Show gui help observe.action.commandline.launch.admin.ui=Launch an administration task observe.action.commandline.launch.h2.server.mode=Launch ObServe in server mode observe.action.commandline.launch.obstuna.admin.ui=Launch an adminstration task on obstuna +observe.action.commandline.launch.server.admin.ui=Launch an adminstration task on server observe.action.commandline.use.jmx=Add JMX support observe.config.backup.atClose=Perform a backup of local source when closing application observe.config.backup.delay=Delay in minutes between local data source backup ===================================== client-configuration/src/main/resources/i18n/client-configuration_es_ES.properties ===================================== @@ -7,6 +7,7 @@ observe.action.commandline.help.ui=Mostrar el manual de usuario (modo grafico) observe.action.commandline.launch.admin.ui=Ejecutar una operación de administración observe.action.commandline.launch.h2.server.mode=Ejecutar ObServe en modo servidor observe.action.commandline.launch.obstuna.admin.ui=Ejecutar una operación de administración sobre Obstuna +observe.action.commandline.launch.server.admin.ui=Lancer une opération d'administration sur un serveur \#TODO observe.action.commandline.use.jmx=Mostrar el soporte JMX observe.config.backup.atClose=Realizar una copia de seguridad de la base de datos local al cerrar la aplicación observe.config.backup.delay=Minutos entre cada copia de seguridad de la base de datos local ===================================== client-configuration/src/main/resources/i18n/client-configuration_fr_FR.properties ===================================== @@ -7,6 +7,7 @@ observe.action.commandline.help.ui=Afficher le manuel utilisateur (mode graphiqu observe.action.commandline.launch.admin.ui=Lancer une opération d'administration observe.action.commandline.launch.h2.server.mode=Lancer ObServe en mode serveur observe.action.commandline.launch.obstuna.admin.ui=Lancer une opération d'administration sur Obstuna +observe.action.commandline.launch.server.admin.ui=Lancer une opération d'administration sur un serveur observe.action.commandline.use.jmx=Ajouter le support JMX observe.config.backup.atClose=Effectuer une sauvegarde de la base locale à la fermeture de l'application observe.config.backup.delay=Temps en minutes entre chaque sauvegarde de la base locale ===================================== client/src/main/assembly/dist/obstuna-admin/README.txt ===================================== @@ -6,7 +6,7 @@ Lancer le script (sh) ./createdb/create-ird_obstuna.sh -Puis lancer ObServe en mode création de base obstuna +puis ./create-obstuna.sh @@ -27,8 +27,6 @@ ou Pour mettre à jour la sécurité sur une base obstuna --------------------------------------------------- -Il faut ensuite lancer l'action de mise à jour de base via ObServe : - ./update-security-obstuna.sh ou @@ -43,3 +41,47 @@ Pour vider une base obstuna ou ./drop-obstuna.bat + + +Pour créer une nouvelle base via server +------------------------------------------ + +Lancer le script (sh) + +./createdb/create-ird_obstuna.sh + +puis + +./create-server.sh + +ou + +./create-server.bat + + +Pour mettre à jour une base via serveur +--------------------------------------- + +./update-server.sh + +ou + +./update-server.bat + +Pour mettre à jour la sécurité sur une base via serveur +------------------------------------------------------- + +./update-security-server.sh + +ou + +./update-security-server.bat + +Pour vider une base via serveur +------------------------------- + +./drop-server.sh + +ou + +./drop-server.bat ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.bat ===================================== @@ -0,0 +1,2 @@ + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin create \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/create-server.sh ===================================== @@ -0,0 +1,28 @@ +### +# #%L +# ObServe :: Admin Client +# +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit +# %% +# 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% +### +#!/bin/sh +# Pour créer une nouvelle base obstuna (le schéma sera créer et le référentiel rempli) + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin create \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.bat ===================================== @@ -0,0 +1,2 @@ + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin drop \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/drop-server.sh ===================================== @@ -0,0 +1,28 @@ +### +# #%L +# ObServe :: Admin Client +# +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit +# %% +# 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% +### +#!/bin/sh +# Pour vider une base obstuna (toutes les tables seront supprimées) + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin drop \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.bat ===================================== @@ -0,0 +1,2 @@ + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin security \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/update-security-server.sh ===================================== @@ -0,0 +1,28 @@ +### +# #%L +# ObServe :: Admin Client +# +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit +# %% +# 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% +### +#!/bin/sh +# Pour mettre à jour la sécurité sur une base postgres + +java -Xmx512M -Xms512M -jar ../${project.build.finalName}.jar --server-admin security \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.bat ===================================== @@ -0,0 +1,2 @@ + +java -Xmx2048M -Xms512M -jar ../${project.build.finalName}.jar --server-admin update \ No newline at end of file ===================================== client/src/main/assembly/dist/obstuna-admin/update-server.sh ===================================== @@ -0,0 +1,28 @@ +### +# #%L +# ObServe :: Admin Client +# +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit +# %% +# 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% +### +#!/bin/sh +# Pour mettre à jour une base server (le schéma sera mis à jour si nécessaire) + +java -Xmx1536M -Xms512M -jar ../${project.build.finalName}.jar --server-admin update \ No newline at end of file ===================================== client/src/main/java/fr/ird/observe/client/ObserveCLAction.java ===================================== @@ -176,7 +176,39 @@ public class ObserveCLAction { getConfig().setObstunaCanMigrate(true); } - RemoteUILauncher launcher = operation.newLauncher(context, null); + RemoteUILauncher launcher = operation.newLauncher(context, null, false); + + Runnable runnable = createRunnable(launcher, "start"); + launchAction(t(launcher.getTitle()), runnable); + } + + @SuppressWarnings("unused") + public void launchServerAdminUI(String operationName) throws InterruptedException { + + disableMainUI(); + + EnumSet<ObstunaAdminAction> operations = EnumSet.allOf(ObstunaAdminAction.class); + + ObstunaAdminAction operation = ObstunaAdminAction.valueOfIgnoreCase(operationName); + if (operation == null) { + if (log.isErrorEnabled()) { + log.error(operationName + " is not a known obstuna admin operation."); + log.error("Use one of these ones : " + operations); + } + return; + } + + ObserveSwingApplicationContext context = ObserveSwingApplicationContext.get(); + + // FIXME +// getConfig().setOption(AbstractDataSourceMigration.AUTO_MIGRATE, "false"); + + if (operation == ObstunaAdminAction.UPDATE || + operation == ObstunaAdminAction.CREATE) { + getConfig().setObstunaCanMigrate(true); + } + + RemoteUILauncher launcher = operation.newLauncher(context, null, true); Runnable runnable = createRunnable(launcher, "start"); launchAction(t(launcher.getTitle()), runnable); ===================================== client/src/main/java/fr/ird/observe/client/ui/storage/ObstunaAdminAction.java ===================================== @@ -21,7 +21,6 @@ */ package fr.ird.observe.client.ui.storage; -import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import fr.ird.observe.client.ObserveSwingApplicationContext; import fr.ird.observe.client.constants.DbMode; @@ -44,6 +43,7 @@ import org.nuiton.jaxx.runtime.JAXXContext; import org.nuiton.version.Version; import java.awt.Window; +import java.util.Objects; import java.util.stream.Collectors; import static org.nuiton.i18n.I18n.t; @@ -64,8 +64,8 @@ public enum ObstunaAdminAction { */ CREATE() { @Override - public RemoteUILauncher newLauncher(JAXXContext context, Window frame) { - return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this)) { + public RemoteUILauncher newLauncher(JAXXContext context, Window frame, boolean serverMode) { + return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this),serverMode ) { DataSourceCreateConfigurationDto createConfigurationDto; ObserveSwingDataSource dataSource; @@ -83,19 +83,9 @@ public enum ObstunaAdminAction { void checkImportDbVersion(StorageUIModel model, ObserveDataSourceConfiguration dataSourceConfig) throws DatabaseConnexionNotAuthorizedException, DatabaseNotFoundException, BabModelVersionException { - ObserveSwingDataSource importDataSource = ObserveSwingApplicationContext.get().getDataSourcesManager().newDataSource(dataSourceConfig); - - Preconditions.checkState(importDataSource != null, "Can't select data on a null dataSource"); - - try { - - importDataSource.open(); - - model.checkImportDbVersion(importDataSource); - - } finally { - - importDataSource.close(); + try (ObserveSwingDataSource importDataSource = Objects.requireNonNull(ObserveSwingApplicationContext.get().getDataSourcesManager().newDataSource(dataSourceConfig))) { + importDataSource.open(); + model.checkImportDbVersion(importDataSource); } } @@ -189,8 +179,8 @@ public enum ObstunaAdminAction { */ UPDATE() { @Override - public RemoteUILauncher newLauncher(JAXXContext context, Window frame) { - return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this)) { + public RemoteUILauncher newLauncher(JAXXContext context, Window frame, boolean serverMode) { + return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this),serverMode ) { ObserveSwingDataSource dataSource; ObserveDataSourceInformation dataSourceInformation; @@ -248,8 +238,8 @@ public enum ObstunaAdminAction { */ SECURITY() { @Override - public RemoteUILauncher newLauncher(JAXXContext context, Window frame) { - return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this)) { + public RemoteUILauncher newLauncher(JAXXContext context, Window frame, boolean serverMode) { + return new RemoteUILauncher(this, context, frame, I18nEnumHelper.getLabel(this),serverMode ) { ObserveSwingDataSource dataSource; ImmutableSet<ObserveDbUserDto> users; @@ -291,7 +281,7 @@ public enum ObstunaAdminAction { return null; } - public abstract RemoteUILauncher newLauncher(JAXXContext context, Window frame); + public abstract RemoteUILauncher newLauncher(JAXXContext context, Window frame, boolean serverMode); @Override public String toString() { @@ -310,7 +300,6 @@ public enum ObstunaAdminAction { dataSource = ObserveSwingApplicationContext.get().getDataSourcesManager().newDataSource(pgConfig); } else { ObserveDataSourceConfigurationRest restConfig = model.getRestConfig(); - dataSource = ObserveSwingApplicationContext.get().getDataSourcesManager().newDataSource(restConfig); } return dataSource; ===================================== client/src/main/java/fr/ird/observe/client/ui/storage/RemoteUILauncher.java ===================================== @@ -6,15 +6,15 @@ * %% * 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 + * 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 + * + * 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% @@ -43,15 +43,17 @@ public abstract class RemoteUILauncher extends StorageUILauncher { /** Logger */ private static final Log log = LogFactory.getLog(RemoteUILauncher.class); - + private final boolean serverMode; protected ObstunaAdminAction action; public RemoteUILauncher(ObstunaAdminAction action, JAXXContext context, Window frame, - String title) { + String title, + boolean serverMode) { super(context, frame, title); this.action = action; + this.serverMode = serverMode; } @Override @@ -63,7 +65,7 @@ public abstract class RemoteUILauncher extends StorageUILauncher { model.setCanUseLocalService(false); model.setCanUseRemoteService(true); model.setCanUseServerService(true); - model.setDbMode(DbMode.USE_REMOTE); + model.setDbMode(serverMode ? DbMode.USE_SERVER : DbMode.USE_REMOTE); model.setAdminAction(action); List<StorageStep> steps = new ArrayList<>(); ===================================== server-configuration/src/main/resources/observeweb-log4j.conf ===================================== @@ -36,7 +36,8 @@ log4j.appender.file.layout.ConversionPattern=%-5p %d{ISO8601} [%t] %40C{1} :%4L log4j.logger.fr.ird.observe=INFO log4j.logger.fr.ird.observe.client.validators=WARN log4j.logger.io.ultreia=INFO -log4j.logger.org.nuiton.topia.migration=INFO +log4j.logger.org.nuiton.topia.service.sql=INFO +log4j.logger.org.nuiton.topia.service.migration=INFO log4j.logger.org.hibernate.orm.deprecation=ERROR log4j.logger.com.zaxxer.hikari.HikariDataSource=ERROR log4j.logger.com.opensymphony.xwork2.validator.validators=ERROR ===================================== server/src/main/java/fr/ird/observe/server/controller/v1/DataSourceServiceRestApi.java ===================================== @@ -127,7 +127,7 @@ public class DataSourceServiceRestApi extends GeneratedDataSourceServiceRestApi @Override public void migrateData(ObserveDataSourceConfiguration dataSourceConfiguration) { ObserveDataSourceConfiguration dataSourceConfigurationTopia = getTopiaDataSourceConfiguration(dataSourceConfiguration); - getAnonymousService(dataSourceConfigurationTopia).migrateData(dataSourceConfiguration); + getAnonymousService(dataSourceConfigurationTopia).migrateData(dataSourceConfigurationTopia); } protected ObserveDataSourceConfiguration getTopiaDataSourceConfiguration(ObserveDataSourceConfiguration dataSourceConfigurationFromRequest) { ===================================== services/src/main/java/fr/ird/observe/services/service/DataSourceService.java ===================================== @@ -61,7 +61,7 @@ public interface DataSourceService extends ObserveService, Closeable { @Get(addAuthtoken = false) void applySecurity(ObserveDataSourceConfiguration dataSourceConfiguration, ImmutableSet<ObserveDbUserDto> users); - @Get(addAuthtoken = false) + @Get(addAuthtoken = false, timeOut = 1000) void migrateData(ObserveDataSourceConfiguration dataSourceConfiguration); @Get View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/0ec98d299780d5f9457e40f9074… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/0ec98d299780d5f9457e40f9074… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-7.x] update license headers
by Tony CHEMIT 18 Jul '18

18 Jul '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 622eb8d6 by Tony CHEMIT at 2018-07-18T15:23:19Z update license headers - - - - - 30 changed files: - client/src/main/java/fr/ird/observe/client/backup/BackupsManager.java - client/src/main/java/fr/ird/observe/client/db/ObserveDataSourcesManager.java - client/src/main/java/fr/ird/observe/client/ui/actions/UIActionSupport.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/AbstractContentUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/CopyFloatingObjectPartToLeftAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/content/CopyFloatingObjectPartToRightAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/main/global/ChangeFocusGlobalUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/main/global/DeleteDataGlobalUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/main/global/NewNextDataGlobalUIAction.java - client/src/main/java/fr/ird/observe/client/ui/actions/main/menu/MenuActionSupport.java - client/src/main/java/fr/ird/observe/client/ui/admin/save/SaveLocalUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/ContentUIInitializer.java - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/GearUseFeaturesLonglineUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/GearUseFeaturesMeasurementLonglinesTableModel.java - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/FloatingObjectUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/FloatingObjectUIModel.java - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/GearUseFeaturesMeasurementSeinesTableModel.java - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/GearUseFeaturesSeineTableModel.java - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/GearUseFeaturesSeineUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetCatchReleaseUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetCatchReleaseUIModel.java - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetCatchUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetSampleUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/NonTargetSampleUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/RouteUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/TargetCatchUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/TargetDiscardCatchUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/TargetDiscardCatchUIHandler.java - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/TargetSampleUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/seine/TargetSampleUIHandler.java The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/622eb8d6887622aa9d2728ddf6d… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/622eb8d6887622aa9d2728ddf6d… You're receiving this email because of your account on gitlab.com.
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.