Author: tchemit Date: 2012-09-12 18:12:57 +0200 (Wed, 12 Sep 2012) New Revision: 655 Url: http://forge.codelutin.com/repositories/revision/echobase/655 Log: add voyage in remove data + fix progress model in progress jsp Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/GetEntities.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/removeData/ConfirmDelete.java trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/embeddedApplication/progress.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/exportDb/progress.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAcousticImport.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesImport.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonImport.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressOperationImport.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressResultsImport.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importDb/progress.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/removeData/confirmDelete.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/removeData/dashboard.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/removeData/deleteProgress.jsp trunk/src/site/rst/removeimports.rst Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/GetEntities.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/GetEntities.java 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/GetEntities.java 2012-09-12 16:12:57 UTC (rev 655) @@ -24,11 +24,16 @@ package fr.ifremer.echobase.ui.actions.dbeditor; import fr.ifremer.echobase.entities.EchoBaseEntityEnum; +import fr.ifremer.echobase.entities.ImportLog; import fr.ifremer.echobase.entities.ImportType; +import fr.ifremer.echobase.entities.data.Voyage; import fr.ifremer.echobase.services.DbEditorService; +import fr.ifremer.echobase.services.DecoratorService; +import fr.ifremer.echobase.services.EchoBaseServiceSupport; import fr.ifremer.echobase.ui.actions.AbstractJSONPaginedAction; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.nuiton.util.decorator.Decorator; import java.util.Map; @@ -119,11 +124,21 @@ execute(); Map<String, String> importTypes = decorateEnums(ImportType.values()); + Decorator<Voyage> voyageDecorator = + getService(DecoratorService.class).getDecorator( + getLocale(), Voyage.class, null); + + EchoBaseServiceSupport service = getService(EchoBaseServiceSupport.class); + for (Map row : datas) { - String importType = (String) row.get("importType"); + String importType = (String) row.get(ImportLog.PROPERTY_IMPORT_TYPE); String importTypeToString = importTypes.get(importType); - row.put("importType", importTypeToString); + row.put(ImportLog.PROPERTY_IMPORT_TYPE, importTypeToString); + String voyageId = (String) row.get(ImportLog.PROPERTY_VOYAGE_ID); + Voyage voyage = service.getEntityById(Voyage.class, voyageId); + String voyageToString = voyageDecorator.toString(voyage); + row.put("voyage", voyageToString); } return SUCCESS; Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/removeData/ConfirmDelete.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/removeData/ConfirmDelete.java 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/removeData/ConfirmDelete.java 2012-09-12 16:12:57 UTC (rev 655) @@ -25,6 +25,8 @@ import com.google.common.base.Preconditions; import fr.ifremer.echobase.entities.ImportLog; +import fr.ifremer.echobase.entities.data.Voyage; +import fr.ifremer.echobase.services.DecoratorService; import fr.ifremer.echobase.services.EchoBaseServiceSupport; import fr.ifremer.echobase.services.removedata.RemoveDataConfiguration; import fr.ifremer.echobase.ui.actions.AbstractConfigureAction; @@ -49,6 +51,7 @@ protected ImportLog importLog; + protected String voyage; protected String importType; @@ -64,6 +67,10 @@ return importLog; } + public String getVoyage() { + return voyage; + } + @Override protected RemoveDataConfiguration createModel() { return new RemoveDataConfiguration(); @@ -90,6 +97,10 @@ importLog = service.getEntityById(ImportLog.class, importLogId); importType = decorateEnums(importLog.getImportType()).entrySet().iterator().next().getValue(); + + Voyage voyageEntity = service.getEntityById(Voyage.class, importLog.getVoyageId()); + this.voyage = getService(DecoratorService.class).decorate(getLocale(), voyageEntity, null); + } } \ No newline at end of file Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/embeddedApplication/progress.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/embeddedApplication/progress.jsp 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/embeddedApplication/progress.jsp 2012-09-12 16:12:57 UTC (rev 655) @@ -37,5 +37,5 @@ <br/> <div> - <sj:progressbar value="%{model.progression}"/> + <sj:progressbar value="%{model.progress}"/> </div> \ No newline at end of file Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/exportDb/progress.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/exportDb/progress.jsp 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/exportDb/progress.jsp 2012-09-12 16:12:57 UTC (rev 655) @@ -36,5 +36,5 @@ <br/> <div> - <sj:progressbar value="%{model.progression}"/> + <sj:progressbar value="%{model.progress}"/> </div> \ No newline at end of file Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAcousticImport.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAcousticImport.jsp 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAcousticImport.jsp 2012-09-12 16:12:57 UTC (rev 655) @@ -39,5 +39,5 @@ <br/> <div> - <sj:progressbar value="%{model.progression}"/> + <sj:progressbar value="%{model.progress}"/> </div> \ No newline at end of file Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesImport.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesImport.jsp 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesImport.jsp 2012-09-12 16:12:57 UTC (rev 655) @@ -39,5 +39,5 @@ <br/> <div> - <sj:progressbar value="%{model.progression}"/> + <sj:progressbar value="%{model.progress}"/> </div> \ No newline at end of file Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonImport.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonImport.jsp 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonImport.jsp 2012-09-12 16:12:57 UTC (rev 655) @@ -39,5 +39,5 @@ <br/> <div> - <sj:progressbar value="%{model.progression}"/> + <sj:progressbar value="%{model.progress}"/> </div> \ No newline at end of file Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressOperationImport.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressOperationImport.jsp 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressOperationImport.jsp 2012-09-12 16:12:57 UTC (rev 655) @@ -39,5 +39,5 @@ <br/> <div> - <sj:progressbar value="%{model.progression}"/> + <sj:progressbar value="%{model.progress}"/> </div> \ No newline at end of file Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressResultsImport.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressResultsImport.jsp 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressResultsImport.jsp 2012-09-12 16:12:57 UTC (rev 655) @@ -39,5 +39,5 @@ <br/> <div> - <sj:progressbar value="%{model.progression}"/> + <sj:progressbar value="%{model.progress}"/> </div> \ No newline at end of file Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importDb/progress.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importDb/progress.jsp 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importDb/progress.jsp 2012-09-12 16:12:57 UTC (rev 655) @@ -36,5 +36,5 @@ <br/> <div> - <sj:progressbar value="%{model.progression}"/> + <sj:progressbar value="%{model.progress}"/> </div> \ No newline at end of file Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/removeData/confirmDelete.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/removeData/confirmDelete.jsp 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/removeData/confirmDelete.jsp 2012-09-12 16:12:57 UTC (rev 655) @@ -43,6 +43,12 @@ <s:property value="%{importType}"/> </pre> + <s:label key='echobase.common.voyage' value=''/> + <div class="clearBoth"/> + <pre id='importVoyage' style="font-weight: bold;"> + <s:property value="%{voyage}"/> + </pre> + <s:label key='echobase.common.importDate' value=''/> <div class="clearBoth"/> <pre id='importLogDate' style="font-weight: bold;"> Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/removeData/dashboard.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/removeData/dashboard.jsp 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/removeData/dashboard.jsp 2012-09-12 16:12:57 UTC (rev 655) @@ -51,6 +51,8 @@ $('#extraInfos').show(); var text = $("tr[aria-selected=true] td[aria-describedby='datas_importText']").text(); $('#importLogText').html(text); + var voyage = $("tr[aria-selected=true] td[aria-describedby='datas_voyage']").text(); + $('#importLogVoyage').html(voyage); var user = $("tr[aria-selected=true] td[aria-describedby='datas_importUser']").text(); $('#importLogUser').html(user); var date = $("tr[aria-selected=true] td[aria-describedby='datas_importDate']").text(); @@ -89,6 +91,8 @@ <sjg:gridColumn name="id" title="id" hidden="true"/> <sjg:gridColumn name="importType" sortable="true" title="%{getText('echobase.common.importType')}"/> + <sjg:gridColumn name="voyage" sortable="true" + title="%{getText('echobase.common.voyage')}"/> <sjg:gridColumn name="importDate" sortable="true" title="%{getText('echobase.common.importDate')}"/> <sjg:gridColumn name="importText" sortable="true" @@ -106,6 +110,11 @@ <pre id='importLogImportType' style="font-weight: bold;"></pre> <br/> + <s:label key='echobase.common.voyage' value=''/> + <div class="clearBoth"/> + <pre id='importLogVoyage' style="font-weight: bold;"></pre> + <br/> + <s:label key='echobase.common.importDate' value=''/> <div class="clearBoth"/> <pre id='importLogDate' style="font-weight: bold;"></pre> Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/removeData/deleteProgress.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/removeData/deleteProgress.jsp 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/removeData/deleteProgress.jsp 2012-09-12 16:12:57 UTC (rev 655) @@ -36,5 +36,5 @@ <br/> <div> - <sj:progressbar value="%{model.progression}"/> + <sj:progressbar value="%{model.progress}"/> </div> \ No newline at end of file Modified: trunk/src/site/rst/removeimports.rst =================================================================== --- trunk/src/site/rst/removeimports.rst 2012-09-12 15:57:54 UTC (rev 654) +++ trunk/src/site/rst/removeimports.rst 2012-09-12 16:12:57 UTC (rev 655) @@ -36,10 +36,10 @@ Abstract -------- -Ce document décrit ce qui se passe lors la suppresion d'un import. +Ce document décrit ce qui se passe lors de la suppression d'un import. -Import Voyage complêt) ----------------------- +Import Voyage complêt +--------------------- Données à supprimer ~~~~~~~~~~~~~~~~~~~