[Suiviobsmer-commits] r728 - in trunk: wao-business/src/main/java/fr/ifremer/wao/service wao-business/src/main/resources/i18n wao-business/src/main/xmi wao-ui/src/main/java/fr/ifremer/wao/ui/pages wao-ui/src/main/webapp
Author: bleny Date: 2010-11-02 22:41:53 +0000 (Tue, 02 Nov 2010) New Revision: 728 Log: add page with indicators modification history Added: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/IndicatorsHistory.java trunk/wao-ui/src/main/webapp/IndicatorsHistory.tml Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSynthesisImpl.java trunk/wao-business/src/main/resources/i18n/wao-business-en_GB.properties trunk/wao-business/src/main/resources/i18n/wao-business-fr_FR.properties trunk/wao-business/src/main/xmi/wao.properties trunk/wao-business/src/main/xmi/wao.zargo trunk/wao-ui/src/main/webapp/Administration.tml Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSynthesisImpl.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSynthesisImpl.java 2010-11-02 21:17:33 UTC (rev 727) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSynthesisImpl.java 2010-11-02 22:41:53 UTC (rev 728) @@ -905,7 +905,7 @@ // update database logText += String.format( "Modification du coefficient de l'indicateur « %s » " + - "(ancienne valeur = %s, nouvelle valeur = %s)\n\n", + "(ancienne valeur = %s, nouvelle valeur = %s).\n\n", indicator.getSynthesisId().getLabel(), oldIndicator.getCoefficient(), indicator.getCoefficient()); @@ -932,7 +932,7 @@ logText += String.format( "Modification du seuil de transition entre les niveaux " + "%s et %s de l'indicateur « %s » (ancienne valeur = %s" - + ", nouvelle valeur = %s)\n\n", + + ", nouvelle valeur = %s).\n\n", level.getLevel(), level.getLevel() + 1, indicator.getSynthesisId().getLabel(), level.getUpperBound(), newLevel.getUpperBound()); @@ -977,6 +977,13 @@ } } + @Override + protected List<IndicatorLog> executeGetAllIndicatorLogs(TopiaContext transaction) throws Exception { + List<IndicatorLog> allIndicatorLogs = + WaoDAOHelper.getIndicatorLogDAO(transaction).findAll(); + return allIndicatorLogs; + } + protected PieChartData createContactPieChartData() { PieChartData data = new PieChartDataImpl(); for (ContactPieChartConstant constant : ContactPieChartConstant.values()) { Modified: trunk/wao-business/src/main/resources/i18n/wao-business-en_GB.properties =================================================================== --- trunk/wao-business/src/main/resources/i18n/wao-business-en_GB.properties 2010-11-02 21:17:33 UTC (rev 727) +++ trunk/wao-business/src/main/resources/i18n/wao-business-en_GB.properties 2010-11-02 22:41:53 UTC (rev 728) @@ -78,6 +78,7 @@ wao.error.serviceSampling.getSampleRowsByFilter= wao.error.serviceSampling.getSampleRowsOrderedByFishingZone= wao.error.serviceSampling.importSamplingPlanCsv= +wao.error.serviceSynthesis.getAllIndicatorLogs= wao.error.serviceSynthesis.getBoardingBoats= wao.error.serviceSynthesis.getComplianceBoardingIndicator= wao.error.serviceSynthesis.getContactDataInputDateReactivity= Modified: trunk/wao-business/src/main/resources/i18n/wao-business-fr_FR.properties =================================================================== --- trunk/wao-business/src/main/resources/i18n/wao-business-fr_FR.properties 2010-11-02 21:17:33 UTC (rev 727) +++ trunk/wao-business/src/main/resources/i18n/wao-business-fr_FR.properties 2010-11-02 22:41:53 UTC (rev 728) @@ -77,6 +77,7 @@ wao.error.serviceSampling.getSampleRowsByFilter=Impossible de r\u00E9cup\u00E9rer la liste des lignes du plan d'\u00E9chantillonnage wao.error.serviceSampling.getSampleRowsOrderedByFishingZone=Impossible de r\u00E9cup\u00E9rer la liste des lignes du plan d'\u00E9chantillonnage wao.error.serviceSampling.importSamplingPlanCsv=Erreur \u00E0 la ligne %1$d [CODE \= %2$s] +wao.error.serviceSynthesis.getAllIndicatorLogs= wao.error.serviceSynthesis.getBoardingBoats=Impossible de r\u00E9cup\u00E9rer les donn\u00E9es du graphique concernant les embarquements sur les navires wao.error.serviceSynthesis.getComplianceBoardingIndicator= wao.error.serviceSynthesis.getContactDataInputDateReactivity=Impossible de r\u00E9cup\u00E9rer l'indicateur de r\u00E9activit\u00E9 sur les dates de saisies dans Allegro Modified: trunk/wao-business/src/main/xmi/wao.properties =================================================================== --- trunk/wao-business/src/main/xmi/wao.properties 2010-11-02 21:17:33 UTC (rev 727) +++ trunk/wao-business/src/main/xmi/wao.properties 2010-11-02 22:41:53 UTC (rev 728) @@ -33,3 +33,4 @@ fr.ifremer.wao.entity.Contact.attribute.boat.tagvalue.lazy=false fr.ifremer.wao.entity.Indicator.attribute.indicatorLevel.tagvalue.lazy=false +fr.ifremer.wao.entity.IndicatorLog.attribute.author.tagvalue.lazy=false Modified: trunk/wao-business/src/main/xmi/wao.zargo =================================================================== (Binary files differ) Added: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/IndicatorsHistory.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/IndicatorsHistory.java (rev 0) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/IndicatorsHistory.java 2010-11-02 22:41:53 UTC (rev 728) @@ -0,0 +1,38 @@ +package fr.ifremer.wao.ui.pages; + +import fr.ifremer.wao.bean.UserRole; +import fr.ifremer.wao.entity.IndicatorLog; +import fr.ifremer.wao.service.ServiceSynthesis; +import fr.ifremer.wao.ui.data.RequiresAuthentication; +import org.apache.tapestry5.annotations.IncludeStylesheet; +import org.apache.tapestry5.annotations.Property; +import org.apache.tapestry5.ioc.annotations.Inject; + +import java.util.List; + +/** + * This page show the list of all modifications done by administrators + * on the coefficient and bounds between levels since the beginning + * + * @author bleny + */ + at RequiresAuthentication(value = {UserRole.ADMIN}, readOnlyAllowed = true) + at IncludeStylesheet("context:css/common.css") +public class IndicatorsHistory { + + @Inject + private ServiceSynthesis serviceSynthesis; + + private List<IndicatorLog> indicatorLogs; + + /* variable used in template in a loop */ + @Property + private IndicatorLog indicatorLog; + + public List<IndicatorLog> getIndicatorLogs() { + if (indicatorLogs == null) { + indicatorLogs = serviceSynthesis.getAllIndicatorLogs(); + } + return indicatorLogs; + } +} Modified: trunk/wao-ui/src/main/webapp/Administration.tml =================================================================== --- trunk/wao-ui/src/main/webapp/Administration.tml 2010-11-02 21:17:33 UTC (rev 727) +++ trunk/wao-ui/src/main/webapp/Administration.tml 2010-11-02 22:41:53 UTC (rev 728) @@ -199,6 +199,9 @@ </div> <div class="fright"> + <a t:type="pagelink" page="IndicatorsHistory"> + <img src="${asset:context:}/img/clock.png" alt="Historique" title="Voir l'historique des modifications des indicateurs" /> + </a> <input t:type="submit" t:id="saveData" class="ico save" value="Save" title="Enregistrer les modifications" /> <input type="reset" class="ico undo" value="Annuler les modificationss" title="Annuler les modifications" /> </div> Added: trunk/wao-ui/src/main/webapp/IndicatorsHistory.tml =================================================================== --- trunk/wao-ui/src/main/webapp/IndicatorsHistory.tml (rev 0) +++ trunk/wao-ui/src/main/webapp/IndicatorsHistory.tml 2010-11-02 22:41:53 UTC (rev 728) @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + Wao :: Web Interface + + $Author: bleny $ + $LastChangedDate: 2010-11-02 22:17:33 +0100 (mar. 02 nov. 2010) $ + $LastChangedRevision: 727 $ + $Id: Synthesis.tml 727 2010-11-02 21:17:33Z bleny $ + $HeadURL: svn+ssh://bleny at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/wao-ui/src/main/webapp/Synthesis.tml $ + %% + Copyright (C) 2009 - 2010 Ifremer + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero 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 Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<t:layout t:pageTitle="Historisque des paramètres de calculs des indicateurs" t:contentId="so-indicators-history" + xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter"> + + <div style="margin-left:auto; margin-right:auto; width: 80%;"> + <h2>Historique des modifications des paramètres de la synthèse globale</h2> + + <p> + Cette page présente toutes les modifications effectuées depuis l'oririgine + qui portent sur les bornes de chaque niveaux ainsi que les coefficients + de chaque indicateurs. + </p> + + <div class="mtop30" /> + + <p t:type="loop" t:source="indicatorLogs" t:value="indicatorLog"> + Auteur de la modification : <strong>${indicatorLog.author.fullName}</strong><br /> + Commentaire : ${indicatorLog.comment}<br /> + Modifications effectuées : ${indicatorLog.logText}<br /><br /> + + <div class="mtop30" /> + </p> + </div> + +</t:layout>
participants (1)
-
bleny@users.labs.libre-entreprise.org