Author: bleny Date: 2010-10-15 15:33:29 +0000 (Fri, 15 Oct 2010) New Revision: 679 Log: add fourth indicator position Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java trunk/wao-ui/src/main/webapp/Synthesis.tml Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java 2010-10-15 15:14:53 UTC (rev 678) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java 2010-10-15 15:33:29 UTC (rev 679) @@ -202,7 +202,7 @@ return this; } - /********************* DYNAMICAL GRAPH : DATASAMPLING *********************/ + /********************* DYNAMICAL GRAPH : DATA SAMPLING ********************/ @Persist private SamplingFilter dataSamplingFilter; @@ -520,6 +520,17 @@ allegroReactivity = serviceSynthesis.getContactDataInputDateReactivity(company, getPeriodForAllegroReactivity()); + + double sumAverages = 0.0; + for (ContactAverageReactivity reactivity : allegroReactivity) { + sumAverages += reactivity.getResult(); + } + + double numberOfCompanies = (double) allegroReactivity.size(); + double totalAverages = sumAverages / numberOfCompanies; + + activeIndicator = getActiveIndicator(); + activeIndicatorLevel = activeIndicator.getLevelForValue(totalAverages); } return allegroReactivity; } Modified: trunk/wao-ui/src/main/webapp/Synthesis.tml =================================================================== --- trunk/wao-ui/src/main/webapp/Synthesis.tml 2010-10-15 15:14:53 UTC (rev 678) +++ trunk/wao-ui/src/main/webapp/Synthesis.tml 2010-10-15 15:33:29 UTC (rev 679) @@ -318,6 +318,10 @@ </div> </p:else> </t:if> + + <!-- now render a table with position on global synthesis --> + <br /> + <t:indicatorLevels t:indicator="activeIndicator" highlightLevel="activeIndicatorLevel" /> </div> </t:block> </t:layout>