Changeset 528


Ignore:
Timestamp:
06/22/12 15:29:46 (12 years ago)
Author:
vmipsl
Message:

Simulations

Location:
ether_megapoli/trunk
Files:
16 edited
3 copied

Legend:

Unmodified
Added
Removed
  • ether_megapoli/trunk/common/implementation/com/ether/WebHelper.java

    r520 r528  
    99import javax.servlet.http.HttpServletRequest; 
    1010import javax.servlet.http.HttpServletResponse; 
     11import java.io.File; 
     12import java.io.FileInputStream; 
    1113import java.io.IOException; 
    1214import java.io.PrintWriter; 
    1315import java.security.InvalidParameterException; 
    1416import java.util.Locale; 
     17import java.util.Properties; 
    1518import java.util.ResourceBundle; 
    1619 
     
    1922    private WebHelper() 
    2023    { 
     24    } 
     25 
     26    /** 
     27     * Returns the property writed in a properties file 
     28     * 
     29     * @param pathFile 
     30     * @param fileName 
     31     * @param property @return 
     32     * @throws IOException 
     33     */ 
     34    public static String getProperty( @NotNull final String pathFile, final String fileName, @NotNull final String property ) 
     35            throws IOException 
     36    { 
     37        final Properties prop = new Properties(); 
     38        prop.load( new FileInputStream( pathFile + File.separatorChar + fileName ) ); 
     39        return prop.getProperty( property ); 
    2140    } 
    2241 
  • ether_megapoli/trunk/service/implementation/com/medias/integration/principal/Principal.java

    r520 r528  
    3333import com.medias.integration.vues.ValeurModele; 
    3434import com.medias.utils.hibernate.CommunicationBD; 
     35import org.hibernate.exception.GenericJDBCException; 
    3536import org.jetbrains.annotations.NotNull; 
    3637 
     
    5152 */ 
    5253 
     54/** 
     55 * @Deprecated No more use. Because of connection problem. 
     56 */ 
    5357public class Principal 
    5458{ 
     
    317321            catch( Exception e ) 
    318322            { 
    319                 throw new ServiceException( ServiceException.ServiceCode.ERROR_INSERT_PRINCIPAL, e ); 
     323                String messageException = e.getCause().getLocalizedMessage(); 
     324                try 
     325                { 
     326                    messageException = ( (GenericJDBCException) e ).getSQLException().getLocalizedMessage() + "<BR/>" + ( (GenericJDBCException) e ).getSQL(); 
     327                } 
     328                catch( Exception ee ) 
     329                { 
     330                    throw new ServiceException( ServiceException.ServiceCode.ERROR_INSERT_PRINCIPAL, messageException, ServiceException.getExceptionThrowable() ); 
     331                } 
     332 
     333                throw new ServiceException( ServiceException.ServiceCode.ERROR_INSERT_PRINCIPAL, messageException, ServiceException.getExceptionThrowable() ); 
    320334            } 
    321335        } 
  • ether_megapoli/trunk/service/interface/com/ether/ServiceException.java

    r520 r528  
    3030    } 
    3131 
     32    public ServiceException( final Enum<? extends Code> code, final String message, final Throwable exceptionThrowable ) 
     33    { 
     34        super( code, message, exceptionThrowable ); 
     35    } 
     36 
    3237    public static enum ServiceCode 
    3338            implements Code 
  • ether_megapoli/trunk/web/WEB-INF/megapoli.properties

    r522 r528  
    11#les path d'acces aux données 
    2 data.upload.root=/home/www/megapoli_data/data/upload 
    3 data.access.root=/home/www/megapoli_data/data/download 
    4 data.upload.desc=/home/www/megapoli_data/data/xml/uploadHierarchie.xml 
    5 data.access.desc=/home/www/megapoli_data/data/xml/accessHierarchie.xml 
    6 annuaire=/usr/local/megapoli/annuaire.xml 
     2data.upload.root=/home_local/PROJETS/MEGAPOLI/megapoli/data/upload 
     3data.access.root=/home_local/PROJETS/MEGAPOLI/megapoli/data/download 
     4data.upload.desc=/home_local/PROJETS/MEGAPOLI/megapoli/data/xml/uploadHierarchie.xml 
     5data.access.desc=/home_local/PROJETS/MEGAPOLI/megapoli/data/xml/accessHierarchie.xml 
     6annuaire=/home_local/PROJETS/MEGAPOLI/megapoli/data/xml/annuaire.xml 
    77 
    88#le path d'accÚs aux images 
    9 data.img=/home/www/megapoli_data/data/images 
     9data.img=/home_local/PROJETS/MEGAPOLI/megapoli/data/images 
    1010 
    1111#le serveur mail 
    1212mail.host=mailhost.ipsl.jussieu.fr 
    13 mail.webmaster=megapoli-admin@ipsl.jussieu.fr 
    14 mail.PI=Matthias.Beekmann@lisa.u-pec.fr 
    15 url.upload=http://vador.private.ipsl.fr:8080/megapoli/InitLogon.do 
    16 url.extractcgi=http://vador.private.ipsl.fr/cgi-bin/megapoli_extract.cgi 
     13mail.webmaster=vmipsl@ipsl.jussieu.fr 
     14mail.PI=vanessa.maigne@ipsl.jussieu.fr 
     15url.upload=http://localhost:8080/megapoli/InitLogon.do 
     16url.extractcgi=http://localhost:8080/megapoli_data/cgi-bin/megapoli_extract.cgi 
    1717 
    1818#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
     
    2323data.upload.tree.view=/data/upload/arborescence.jsp 
    2424data.upload.files.view=/data/upload/files.jsp 
    25 data.access.tree.view=/data/access/arborescence.jsp 
    26 data.access.files.view=/data/access/files.jsp 
     25#data.access.tree.view=/data/access/arborescence.jsp 
     26#data.access.files.view=/data/access/files.jsp 
    2727 
    2828#Fichiers de configuration "caches" : places dans le WEB-INF 
     
    3333 
    3434# ParamÚtres pour l'insertion des jeux de données 
    35 data.output=/home/www/megapoli_data/data/output 
    36 data.upload=/home/www/megapoli_data/data/upload 
    37 data.metadata=/home/www/megapoli_data/data/metadata 
    38 data.model=/home/www/megapoli_data/data/models 
    39 data.download=/home/www/megapoli_data/data/download 
     35data.output=/home_local/PROJETS/MEGAPOLI/megapoli/data/output 
     36data.upload=/home_local/PROJETS/MEGAPOLI/megapoli/data/upload 
     37data.metadata=/home_local/PROJETS/MEGAPOLI/megapoli/data/metadata 
     38data.model=/home_local/PROJETS/MEGAPOLI/megapoli/data/models 
     39data.download=/home_local/PROJETS/MEGAPOLI/megapoli/data/download 
     40 
     41# ParamÚtres pour la simulation 
     42directory.simulation=/home_local/Simulations 
  • ether_megapoli/trunk/web/WEB-INF/megapoli_prod.properties

    r522 r528  
    3333 
    3434# ParamÚtres pour l'insertion des jeux de données 
    35 data.output=/home/www/megapoli_data/data/output 
    36 data.upload=/home/www/megapoli_data/data/upload 
    37 data.metadata=/home/www/megapoli_data/data/metadata 
    38 data.model=/home/www/megapoli_data/data/models 
    39 data.download=/home/www/megapoli_data/data/download 
     35#data.output=/home/www/megapoli_data/data/output 
     36#data.upload=/home/www/megapoli_data/data/upload 
     37#data.metadata=/home/www/megapoli_data/data/metadata 
     38#data.model=/home/www/megapoli_data/data/models 
     39#data.download=/home/www/megapoli_data/data/download 
  • ether_megapoli/trunk/web/backoffice/dataInsertion-script.jsp

    r521 r528  
    315315    showErrors: function( result ) 
    316316    { 
    317         this.loadingDataset.hide(); 
    318         this.loadingInsert.hide(); 
    319         this.loadingRemove.hide(); 
    320317        var context = this[0] ? this[0] : this; 
    321318        var text = this[1]; 
     319        context.loadingDataset.hide(); 
     320        context.loadingInsert.hide(); 
     321        context.loadingRemove.hide(); 
    322322        context.containerErrors.show(); 
    323323        if( text ) 
  • ether_megapoli/trunk/web/backoffice/dataInsertion.jsp

    r520 r528  
    107107        <bean:message key="bo.version"/> : <input id="versionInsert"> 
    108108 
    109         <div style="float:right"> 
    110             <button id="insert" class="small positive"><bean:message key="bo.insert"/></button> 
    111         </div> 
     109        <bean:message key="bo.insert.text"/> 
     110 
     111        <%--<div style="float:right">--%> 
     112            <%--<button id="insert" class="small positive"><bean:message key="bo.insert"/></button>--%> 
     113        <%--</div>--%> 
    112114        <BR/><BR/> 
    113115        <div id="containerInsert"></div> 
  • ether_megapoli/trunk/web/backoffice/simulation-script.jsp

    r521 r528  
    1 <%@ page import="com.medias.Context" %> 
    21<%@ page import="java.io.File" %> 
    32<script type="text/javascript"> 
    43var interfaceBODataInsertion = Class.create( { 
    54 
    6     initialize: function( datasetNumber, jSonDatasets ) 
     5    initialize: function( pathSimulationFiles ) 
    76    { 
    87        // Values 
    9         this.jSonDatasets = jSonDatasets || null; 
    10         this.dataset = false; 
    11         this.nbDatasets = datasetNumber || false; 
    12         this.downloadDirectory = '<%=Context.getProperty(request, "accessDir")%>'; 
    13         this.uploadDirectory = '<%=Context.getProperty(request, "uploadDir")%>'; 
     8        this.files = pathSimulationFiles || null; 
    149 
    1510        // Containers 
    16         this.generalContainerDatasets = $( "#generalContainerDatasets" ); 
    17         this.containerDatasetsNumber = $( "#nbResults" ); 
     11        this.containerFileList_left = $( "#fileList_left" ); 
     12        this.containerFileList_right = $( "#fileList_right" ); 
     13        this.generalContainerSimulations = $( "#generalContainerSimulations" ); 
     14//        this.containerDatasetsNumber = $( "#nbResults" ); 
    1815        this.containerErrors = $( "#errors" ); 
    19         this.containerDatasets = $( "#containerDataSets" ); 
    20         this.containerResultRemove = $( "#containerResultRemove" ); 
    21         this.containerMove = $( "#containerMove" ); 
    22         this.containerResultMove = $( "#containerResultMove" ); 
    23         this.containerInsert = $( "#containerInsert" ); 
    24         this.containerResultInsert = $( "#containerResultInsert" ); 
    25  
    26         this.containerSorts = $( "#containerSorts" ); 
    27         this.containerSortsDisplay = $( "#containerSorts_display" ); 
    28         this.containerPage = $( "#page" ); 
    29         this.containerMaxPage = $( "#maxPages" ); 
     16//        this.containerDatasets = $( "#containerDataSets" ); 
     17//        this.containerResultRemove = $( "#containerResultRemove" ); 
     18//        this.containerMove = $( "#containerMove" ); 
     19//        this.containerResultMove = $( "#containerResultMove" ); 
     20//        this.containerInsert = $( "#containerInsert" ); 
     21//        this.containerResultInsert = $( "#containerResultInsert" ); 
     22// 
     23//        this.containerSorts = $( "#containerSorts" ); 
     24//        this.containerSortsDisplay = $( "#containerSorts_display" ); 
     25//        this.containerPage = $( "#page" ); 
     26//        this.containerMaxPage = $( "#maxPages" ); 
    3027 
    3128        /** *********** LOADING *********** **/ 
    32         // Create loading object for users 
     29        // Create loading object for simulations 
    3330        var param = new Object(); 
    3431        param.id = "loadingForDataset"; 
    35         param.parent = this.generalContainerDatasets; 
     32        param.parent = this.generalContainerSimulations; 
    3633        this.loadingDataset = new Loading( param ); 
    3734        this.loadingDataset.display(); 
    3835 
    39         var param = new Object(); 
    40         param.id = "loadingForDatasetRemove"; 
    41         param.parent = this.generalContainerDatasets; 
    42         param.className = "loading-data"; 
    43         this.loadingRemove = new Loading( param ); 
    44  
    45         var param = new Object(); 
    46         param.id = "loadingForDatasetInsert"; 
    47         param.parent = this.containerInsert; 
    48         param.className = "loading-data"; 
    49         this.loadingInsert = new Loading( param ); 
    50  
    51         this.containerErrors.hide(); 
    52         this.displaySorts(); 
    53         this.managePagination(); 
    54         this.displayDatasets(); 
     36        this.containerErrors.hide(); 
     37        this.displayFiles(); 
     38//        this.displaySorts(); 
     39//        this.managePagination(); 
     40//        this.displayDatasets(); 
    5541 
    5642        // Bind buttons 
    57         $( "#insert" ).bind( 'click', this, jQuery.proxy( this.onClickInsert, this ) ); 
    58         $( "#cleanLocalisationAndFlagButton" ).bind( 'click', this, jQuery.proxy( this.onClickCleanLocalisationAndFlag, this ) ); 
     43//        $( "#insert" ).bind( 'click', this, jQuery.proxy( this.onClickInsert, this ) ); 
     44//        $( "#cleanLocalisationAndFlagButton" ).bind( 'click', this, jQuery.proxy( this.onClickCleanLocalisationAndFlag, this ) ); 
    5945    }, 
    6046 
    6147    // REQUESTS ******************************************************** 
    62     requestRemoveDataset: function() 
    63     { 
    64         this.loadingRemove.display(); 
    65         if( this.dataset ) 
    66             $.ajax( { 
    67                 url: "backoffice?methodName=removeJeu&id=" + this.dataset.id, 
    68                 success:jQuery.proxy( this.handleRemoveDataset, this ), 
    69                 error: jQuery.proxy( this.showErrors, [this] ) 
    70             } ); 
    71     }, 
    72  
    7348    requestSortDataset: function() 
    7449    { 
     
    8358    }, 
    8459 
    85     requestFilesMove: function() 
    86     { 
    87         if( this.dataset ) 
    88             $.ajax( { 
    89                 url: "backoffice?methodName=moveJeu&name=" + this.dataset.name + "&category=" + this.dataset.categoryName, 
    90                 success:jQuery.proxy( this.handleFilesMove, this ), 
    91                 error: jQuery.proxy( this.showErrors, [this] ) 
    92             } ); 
    93     }, 
    94  
    95     requestDatasetInsert: function() 
    96     { 
    97         this.loadingInsert.display(); 
    98         if( "" != $( "#categoryNameInsert" ).val() && "" != $( "#datasetNameInsert" ).val() && "" != $( "#versionInsert" ).val() ) 
    99             $.ajax( { 
    100                 url: "backoffice?methodName=insertJeu&category=" + $( "#categoryNameInsert" ).val() + "&name=" + $( "#datasetNameInsert" ).val() + "&version=" + $( "#versionInsert" ).val() , 
    101                 success:jQuery.proxy( this.handleDatasetInsert, this ), 
    102                 error: jQuery.proxy( this.showErrors, [this] ) 
    103             } ); 
    104     }, 
    105  
    106     requestCleanLocalisationAndFlag: function() 
    107     { 
    108         this.loadingRemove.display(); 
    109         $.ajax( { 
    110             url: "backoffice?methodName=cleanLocalisationAndFlagTables", 
    111             success:jQuery.proxy( this.handleCleanLocalisationAndFlag, this ), 
    112             error: jQuery.proxy( this.showErrors, [this] ) 
    113         } ); 
    114     }, 
    11560 
    11661    // HANDLES ******************************************************** 
    117     handleRemoveDataset: function( result ) 
    118     { 
    119         this.loadingRemove.hide(); 
    120         this.containerResultRemove.html( jQuery.parseJSON( result ).success + " " + this.dataset.categoryName + "&nbsp;/&nbsp;" + this.dataset.name + "&nbsp;_ &nbsp;id : " + this.dataset.id ); 
    121         this.containerResultRemove.removeClass( "disable" ); 
    122         this.containerResultRemove.show(); 
    123         this.requestSortDataset(); 
    124     }, 
    125  
    12662    handleSortDataset: function( result ) 
    12763    { 
     
    13167    }, 
    13268 
    133     handleFilesMove: function( result ) 
    134     { 
    135         this.containerResultMove.html( jQuery.parseJSON( result ).success ); 
    136         this.containerResultMove.removeClass( "disable" ); 
    137         this.containerResultMove.show(); 
    138     }, 
    139  
    140     handleDatasetInsert: function( result ) 
    141     { 
    142         this.loadingInsert.hide(); 
    143         this.containerResultInsert.html( jQuery.parseJSON( result ).success + " " + this.dataset.categoryName + "&nbsp;/&nbsp;" + this.dataset.name ); 
    144         this.containerResultInsert.show(); 
    145         this.requestSortDataset(); 
    146     }, 
    147  
    148     handleCleanLocalisationAndFlag: function( result ) 
    149     { 
    150         this.loadingRemove.hide(); 
    151         this.containerResultRemove.html( jQuery.parseJSON( result ).success ); 
    152         this.containerResultRemove.show(); 
    153         this.requestSortDataset(); 
    154     }, 
    155  
    15669    // DISPLAYS ******************************************************** 
     70    displayFiles: function() 
     71    { 
     72        var number = this.files.length; 
     73        jQuery.each( this.files, jQuery.proxy( function( i, file ) 
     74        { 
     75            if( (number / 2) > i ) 
     76                this.containerFileList_left.append( "&nbsp;&nbsp;-&nbsp;" + file + "<BR/>" ); 
     77            else 
     78                this.containerFileList_right.append( "&nbsp;&nbsp;-&nbsp;" + file + "<BR/>" ); 
     79        }, this ) ); 
     80 
     81    }, 
     82 
    15783    displayTRForDataset: function( dataset ) 
    15884    { 
     
    315241    showErrors: function( result ) 
    316242    { 
    317         this.loadingDataset.hide(); 
    318         this.loadingInsert.hide(); 
    319         this.loadingRemove.hide(); 
    320243        var context = this[0] ? this[0] : this; 
    321244        var text = this[1]; 
     245        context.loadingDataset.hide(); 
     246        context.loadingInsert.hide(); 
     247        context.loadingRemove.hide(); 
    322248        context.containerErrors.show(); 
    323249        if( text ) 
  • ether_megapoli/trunk/web/backoffice/simulation.jsp

    r520 r528  
    1 <%@ page import="com.ether.WebException" %> 
    21<%@ page language="java" contentType="text/html; charset=UTF-8" %> 
    32<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> 
     
    1312    <tiles:put name="insertJsOrJsp" type="string"> 
    1413        <ether:htmlJs jsFile="classesForJQuery/etherClasses"/> 
    15         <ether:htmlJsp jspFile="dataInsertion-script"/> 
     14        <ether:htmlJsp jspFile="simulation-script"/> 
    1615        <ether:htmlJs jsFile="classesForJQuery/Loading"/> 
    1716        <ether:htmlJs jsFile="classesForJQuery/Select"/> 
     
    2019 
    2120 
    22     <tiles:put name="title" type="string"><bean:message key="app.title"/> - <bean:message key="bo.data.insertion"/></tiles:put> 
     21    <tiles:put name="title" type="string"><bean:message key="app.title"/> - <bean:message key="bo.simulation"/></tiles:put> 
    2322 
    2423 
    2524    <%-- ****************** CONTENT ****************** --%> 
    26     <tiles:put name="bodytitle" type="string"><bean:message key="bo.data.insertion"/></tiles:put> 
     25    <tiles:put name="bodytitle" type="string"><bean:message key="bo.simulation"/></tiles:put> 
    2726 
    2827    <tiles:put name="body" type="string"> 
    29         <%-- ****************** DATASETS REMOVE ****************** --%> 
    30         <div class="title2">1st <bean:message key="bo.step"/>. <bean:message key="bo.dataset.remove"/> :</div> 
    31         <BR/> 
     28        <%-- ******************* LIST OF FILES ******************* --%> 
     29        <div class="containerBackofficeSimulation"> 
     30            <div class="title2"><bean:message key="bo.simulation.directory"/> :</div> 
    3231 
    33         <%-- ****************** SORTS ****************** --%> 
    34         <div class="containerSortsAndSearch"> 
    35             <div class="containerSorts"> 
    36                 <div style="float:left"><bean:message key="bo.sort.asc"/> :&nbsp;</div> 
    37                 <div id="containerSorts" style="float:left"></div> 
     32            <bean:message key="bo.simulation.path"/> : ${pathSimulation}<BR/> 
     33            <bean:message key="bo.simulation.file.list"/> :<BR/> 
     34 
     35            <div id="fileList_left" style="float:left"></div> 
     36            <div id="fileList_right" style="float:right"></div> 
     37        </div> 
     38 
     39        <div class="containerBackofficeSimulation"> 
     40            <HR width="50%"> 
     41                <%-- ******************** SIMULATIONS ******************** --%> 
     42            <div class="title2"><bean:message key="bo.simulation.database"/> :</div> 
     43            <BR/> 
     44 
     45                <%-- ****************** SORTS ****************** --%> 
     46            <div class="containerSortsAndSearch"> 
     47                <div class="containerSorts"> 
     48                    <div style="float:left"><bean:message key="bo.sort.asc"/> :&nbsp;</div> 
     49                    <div id="containerSorts" style="float:left"></div> 
     50                </div> 
     51 
     52                <div class="containerSorts"> 
     53                    <div style="float:left"><bean:message key="bo.searchBy"/> :&nbsp;</div> 
     54                    <div id="containerSearch" style="float:left"><input type="text" id="search_text" size="20"></div> 
     55                </div> 
     56 
     57                <div class="containerSorts"> 
     58                    <div style="float:left"><bean:message key="bo.viewBy"/> :&nbsp;</div> 
     59                    <div id="containerSorts_display" style="float:left"></div> 
     60                </div> 
     61 
     62                <div class="containerSorts"> 
     63                    <button id="sortButton" class="small positive" style="float:left"><bean:message key="bo.go"/></button> 
     64                </div> 
     65 
     66            </div> 
     67            <BR/> 
     68 
     69            <bean:message key="bo.simulation.list"/> 
     70            <div id="generalContainerSimulations"> 
     71                <table class="roundTable" border="1"> 
     72                    <tr> 
     73                        <th><bean:message key="bo.id"/></th> 
     74                        <th><bean:message key="bo.category"/></th> 
     75                        <th><bean:message key="bo.name"/></th> 
     76                        <th><bean:message key="bo.user.creationDate"/></th> 
     77                        <th><bean:message key="bo.action"/></th> 
     78                    </tr> 
     79                    <tbody id="containerDataSets"></tbody> 
     80                </table> 
     81                <BR/> 
    3882            </div> 
    3983 
    40             <div class="containerSorts"> 
    41                 <div style="float:left"><bean:message key="bo.searchBy"/> :&nbsp;</div> 
    42                 <div id="containerSearch" style="float:left"><input type="text" id="search_text" size="20"></div> 
     84            <div id="containerResultRemove" class="containerInfos"></div> 
     85 
     86            <div style="float:left"><bean:message key="bo.total.number"/> :&nbsp; 
     87                <div id="nbResults" style="float:right"></div> 
    4388            </div> 
    4489 
    45             <div class="containerSorts"> 
    46                 <div style="float:left"><bean:message key="bo.viewBy"/> :&nbsp;</div> 
    47                 <div id="containerSorts_display" style="float:left"></div> 
     90                <%-- ****************** PAGINATION ****************** --%> 
     91            <div style="float:right"> 
     92                <button id="next" class="small"><bean:message key="bo.next"/></button> 
    4893            </div> 
    49  
    50             <div class="containerSorts"> 
    51                 <button id="sortButton" class="small positive" style="float:left"><bean:message key="bo.go"/></button> 
    52             </div> 
    53  
    54             <div> 
    55                 <button id="cleanLocalisationAndFlagButton" class="small negative" style="float:right"><bean:message key="bo.cleanTables"/></button> 
     94            <div style="float:right"><span id="page">1</span>/<span id="maxPages">0</span>&nbsp;&nbsp;&nbsp;</div> 
     95            <div style="float:right"> 
     96                <button id="previous" class="small"><bean:message key="bo.previous"/></button> 
    5697            </div> 
    5798 
    5899        </div> 
    59100        <BR/> 
    60  
    61         <bean:message key="bo.dataset.list"/> 
    62         <div id="generalContainerDatasets"> 
    63             <table class="roundTable" border="1"> 
    64                 <tr> 
    65                     <th><bean:message key="bo.id"/></th> 
    66                     <th><bean:message key="bo.category"/></th> 
    67                     <th><bean:message key="bo.name"/></th> 
    68                     <th><bean:message key="bo.user.creationDate"/></th> 
    69                     <th><bean:message key="bo.action"/></th> 
    70                 </tr> 
    71                 <tbody id="containerDataSets"></tbody> 
    72             </table> 
    73             <BR/> 
    74         </div> 
    75  
    76         <div id="containerResultRemove" class="containerInfos"></div> 
    77  
    78         <div style="float:left"><bean:message key="bo.total.number"/> :&nbsp; 
    79             <div id="nbResults" style="float:right"></div> 
    80         </div> 
    81  
    82         <%-- ****************** PAGINATION ****************** --%> 
    83         <div style="float:right"> 
    84             <button id="next" class="small"><bean:message key="bo.next"/></button> 
    85         </div> 
    86         <div style="float:right"><span id="page">1</span>/<span id="maxPages">0</span>&nbsp;&nbsp;&nbsp;</div> 
    87         <div style="float:right"> 
    88             <button id="previous" class="small"><bean:message key="bo.previous"/></button> 
    89         </div> 
    90  
    91         <BR/> 
    92         <HR width="50%"> 
     101        <%--<HR width="50%">--%> 
    93102        <%-- ****************** FILES MOVE ****************** --%> 
    94         <div class="title2">2nd <bean:message key="bo.step"/>. <bean:message key="bo.file.move"/> :</div> 
    95         <BR/> 
    96  
    97         <div id="containerMove"></div> 
    98         <div id="containerResultMove" class="containerInfos"></div> 
    99         <BR/> 
    100         <HR width="50%"> 
    101  
    102         <%-- ****************** DATASETS INSERTION ****************** --%> 
    103         <div class="title2">3rd <bean:message key="bo.step"/>.<bean:message key="bo.dataset.insert"/> :</div> 
    104         <BR/> 
    105         <bean:message key="bo.category"/> : <input id="categoryNameInsert">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    106         <bean:message key="bo.name"/> : <input id="datasetNameInsert">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    107         <bean:message key="bo.version"/> : <input id="versionInsert"> 
    108  
    109         <div style="float:right"> 
    110             <button id="insert" class="small positive"><bean:message key="bo.insert"/></button> 
    111         </div> 
    112         <BR/><BR/> 
    113         <div id="containerInsert"></div> 
    114         <div id="containerResultInsert" class="containerInfos"></div> 
    115         <BR/> 
    116103 
    117104        <div id="errors"></div> 
     
    119106        <script type="text/javascript"> 
    120107            var interfaceTexts = $A( "" ); 
    121             interfaceTexts["bo.noDataset"] = '<bean:message key="bo.noDataset"/>'; 
    122             interfaceTexts["bo.remove"] = '<bean:message key="bo.remove"/>'; 
    123             interfaceTexts["bo.dataset.remove.confirm"] = '<bean:message key="bo.dataset.remove.confirm"/>'; 
    124             interfaceTexts["bo.id"] = '<bean:message key="bo.id"/>'; 
    125             interfaceTexts["bo.category"] = '<bean:message key="bo.category"/>'; 
    126             interfaceTexts["bo.name"] = '<bean:message key="bo.name"/>'; 
    127             interfaceTexts["bo.user.creationDate"] = '<bean:message key="bo.user.creationDate"/>'; 
    128             interfaceTexts["bo.all"] = '<bean:message key="bo.all"/>'; 
    129             interfaceTexts["bo.go"] = '<bean:message key="bo.go"/>'; 
    130             interfaceTexts["bo.move"] = '<bean:message key="bo.move"/>'; 
    131             interfaceTexts["bo.dataset.fields"] = '<bean:message key="bo.dataset.fields"/>'; 
    132             interfaceTexts["bo.cleanTables.confirm"] = '<bean:message key="bo.cleanTables.confirm"/>'; 
    133108 
    134             interfaceTexts["<%=WebException.WebCode.DOWNLOAD_DIRECTORY_DOESNOT_EXISTS%>"] = "<bean:message key="bo.DOWNLOAD_DIRECTORY_DOESNOT_EXISTS"/>"; 
    135  
    136             new interfaceBODataInsertion( ${datasetNumber}, ${jSonDatasets} ); 
     109            new interfaceBODataInsertion( ${pathSimulationFiles} ); 
    137110        </script> 
    138111 
  • ether_megapoli/trunk/web/resources/css/megapoli.css

    r482 r528  
    238238#containerMobilePlateforms { 
    239239    padding-bottom: 117px; 
     240} 
     241 
     242.containerBackofficeSimulation { 
     243    float: left; 
     244    width: 950px; 
     245    margin-bottom: 10px; 
    240246} 
    241247 
  • ether_megapoli/trunk/web/resources/templates/templateBackoffice.jsp

    r473 r528  
    106106    templateTexts["bo.mco"] = '<bean:message key="bo.mco"/>'; 
    107107    templateTexts["bo.data.insertion"] = '<bean:message key="bo.data.insertion"/>'; 
     108    templateTexts["bo.simulation"] = '<bean:message key="bo.simulation"/>'; 
    108109 
    109110    // Needed texts if you use the library LoginButton.js 
  • ether_megapoli/trunk/web/resources/templates/templateBackoffice_script.jsp

    r473 r528  
    5454        createMenu: function() 
    5555        { 
    56             var usersButton = new Button( {value:templateTexts["bo.user"], parent:this.containerMenu, id:"button_home", className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickUser} ); 
    57             var mcoButton = new Button( {value:templateTexts["bo.mco"], parent:this.containerMenu, id:"button_home", className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickMco} ); 
    58             var insertionDataButton = new Button( {value:templateTexts["bo.data.insertion"], parent:this.containerMenu, id:"button_home", className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickDataInsertion} ); 
     56            var usersButton = new Button( {value:templateTexts["bo.user"], parent:this.containerMenu, className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickUser} ); 
     57            var mcoButton = new Button( {value:templateTexts["bo.mco"], parent:this.containerMenu, className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickMco} ); 
     58            var insertionDataButton = new Button( {value:templateTexts["bo.data.insertion"], parent:this.containerMenu, className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickDataInsertion} ); 
     59            var simulationDataButton = new Button( {value:templateTexts["bo.simulation"], parent:this.containerMenu, className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickSimulation} ); 
    5960        }, 
    6061 
     
    8586        }, 
    8687 
     88        onClickSimulation: function() 
     89        { 
     90            document.location.href = "backoffice?methodName=viewSimulation"; 
     91        }, 
     92 
    8793        /** 
    8894         * This method display a small Ether logo if the screen is too small to contain the big one 
  • ether_megapoli/trunk/web/resources/templates/templateMegapoli.jsp

    r366 r528  
    113113                    <ul> 
    114114                        <li><html:link page="/visualization?methodName=viewParametersByPlateform"><span><bean:message key="visualization"/></span></html:link></li> 
    115                         <li><html:link page="/visualization?methodName=viewInWork"><span><bean:message key="simulation.visualization"/></span></html:link></li> 
     115                        <li><html:link page="/visualization?methodName=viewSimulation"><span><bean:message key="simulation.visualization"/></span></html:link></li> 
    116116                    </ul> 
    117117                </div> 
  • ether_megapoli/trunk/web/src/ApplicationResources.properties

    r430 r528  
    532532################################################################ 
    533533simulation.visualization=Simulations 
     534simulation.title=Visualisation des simulations 
    534535 
    535536################################################################ 
  • ether_megapoli/trunk/web/src/ApplicationResources_en.properties

    r520 r528  
    533533################################################################ 
    534534simulation.visualization=Simulations 
     535simulation.title=Simulations visualisation 
    535536 
    536537################################################################ 
     
    648649 
    649650bo.DOWNLOAD_DIRECTORY_DOESNOT_EXISTS=The download directory doesn't exists ! No move available 
     651 
     652bo.insert.text=<ul><li>Modify the database connection in the file hibernate.properties (src/megapoli_insert/src).</li><li>Modify the file build.xml (src/megapoli_insert).</li><li>Launch the command ant exec (src/megapoli_insert).</li></ul> 
     653 
     654bo.simulation=Simulation 
     655bo.simulation.directory=Simulations in directory 
     656bo.simulation.path=Simulations files path 
     657bo.simulation.file.list=List of simulations files 
     658bo.simulation.database=Simulations in database 
     659bo.simulation.list=List of simulations 
  • ether_megapoli/trunk/web/src/com/ether/ControllerBackoffice.java

    r520 r528  
    1212import com.ether.user.UserState; 
    1313import com.medias.database.objects.Jeu; 
    14 import com.medias.integration.principal.Principal; 
    1514import com.medias.mail.Mail; 
    1615import com.medias.mail.MailFactory; 
     
    3029import java.util.List; 
    3130import java.util.Map; 
    32 import java.util.Properties; 
    3331 
    3432/** 
     
    8078    { 
    8179        return sortJeu( "jeuId", null, 5, 1 ); 
     80    } 
     81 
     82    @ControllerMethod(view = VIEW_BO_SIMULATION, backofficeMethod = true, defaultView = VIEW_BO_INDEX) 
     83    public JSONObject viewSimulation() 
     84            throws WebException 
     85    { 
     86        final JSONObject jsonObject = new JSONObject(); 
     87        final String pathSimulation = getProperty( "directory.simulation" ); 
     88        final File directory = new File( pathSimulation ); 
     89        jsonObject.put( "pathSimulation", pathSimulation ); 
     90        jsonObject.put( "pathSimulationFiles", directory.list() ); 
     91        return jsonObject; 
    8292    } 
    8393 
     
    533543    } 
    534544 
    535     @ControllerMethod(jsonResult = true) 
    536     public JSONObject insertJeu( @NotNull @ParamName(ParameterConstants.PARAMETER_CATEGORY) final String categoryName, 
    537                                  @NotNull @ParamName(ParameterConstants.PARAMETER_NAME) final String jeuName, 
    538                                  @NotNull @ParamName(ParameterConstants.PARAMETER_VERSION) final String version ) 
    539             throws WebException 
    540     { 
    541         try 
    542         { 
    543             final Properties propertiesFile = getPropertiesFile(); 
    544  
    545             Principal.main( propertiesFile, categoryName, jeuName, version ); 
    546  
    547             final JSONObject result = new JSONObject(); 
    548             result.put( "success", "Dataset saved in database !" ); 
    549             return result; 
    550         } 
    551         catch( ServiceException e ) 
    552         { 
    553             if( e.getCause() instanceof Throwable ) 
    554                 throw new WebException( e.getLocalizedMessage(), WebException.getExceptionThrowable() ); 
    555             else 
    556                 throw new WebException( WebException.WebCode.ERROR_NO_JEU_FOUND, e ); 
    557         } 
    558     } 
     545//    @ControllerMethod(jsonResult = true) 
     546//    public JSONObject insertJeu( @NotNull @ParamName(ParameterConstants.PARAMETER_CATEGORY) final String categoryName, 
     547//                                 @NotNull @ParamName(ParameterConstants.PARAMETER_NAME) final String jeuName, 
     548//                                 @NotNull @ParamName(ParameterConstants.PARAMETER_VERSION) final String version ) 
     549//            throws WebException 
     550//    { 
     551//        try 
     552//        { 
     553//            final Properties propertiesFile = getPropertiesFile(); 
     554// 
     555//            Principal.main( propertiesFile, categoryName, jeuName, version ); 
     556// 
     557//            final JSONObject result = new JSONObject(); 
     558//            result.put( "success", "Dataset saved in database !" ); 
     559//            return result; 
     560//        } 
     561//        catch( ServiceException e ) 
     562//        { 
     563//            if( e.getCause() instanceof Throwable ) 
     564//                throw new WebException( e.getLocalizedMessage(), WebException.getExceptionThrowable() ); 
     565//            else 
     566//                throw new WebException( WebException.WebCode.ERROR_NO_JEU_FOUND, e ); 
     567//        } 
     568//    } 
    559569 
    560570    /** 
     
    693703    private static final String VIEW_BO_MCO = "backoffice/mco"; 
    694704    private static final String VIEW_BO_DATA_INSERTION = "backoffice/dataInsertion"; 
     705    private static final String VIEW_BO_SIMULATION = "backoffice/simulation"; 
    695706} 
  • ether_megapoli/trunk/web/src/com/ether/ControllerEther.java

    r520 r528  
    5959            prop.load( new FileInputStream( webInfPath + File.separatorChar + WebHelper.PROPERTIES_FILE ) ); 
    6060            return prop; 
     61        } 
     62        catch( IOException e ) 
     63        { 
     64            throw new WebException( WebException.WebCode.ERROR_TO_READ_FILE_PROPERTIES, e ); 
     65        } 
     66    } 
     67 
     68    /** 
     69     * This method returns a property writed in the properties file 
     70     * 
     71     * @return 
     72     * @throws WebException 
     73     */ 
     74    public String getProperty( @NotNull final String property ) 
     75            throws WebException 
     76    { 
     77        try 
     78        { 
     79            final String webInfPath = getServletContext().getRealPath( "WEB-INF" ); 
     80            return WebHelper.getProperty( webInfPath, WebHelper.PROPERTIES_FILE, property ); 
    6181        } 
    6282        catch( IOException e ) 
  • ether_megapoli/trunk/web/src/com/ether/ControllerVisualization.java

    r306 r528  
    8282    } 
    8383 
     84    @ControllerMethod(view = VIEW_SIMULATION) 
     85    public Map<String, Object> viewSimulation() 
     86            throws ServiceException 
     87    { 
     88        final Map<String, Object> model = new HashMap<String, Object>(); 
     89        return model; 
     90    } 
     91 
    8492    /** *********************************************************** **/ 
    8593    /** *********************** CALLS ***************************** **/ 
     
    254262    private static final String VIEW_VISUALIZATION_PARAMETER_BY_PLATEFORM = "visualization/visu_parameter_by_pf"; 
    255263    private static final String VIEW_DOWNLOAD_OK = "data/access/extract3"; 
     264    private static final String VIEW_SIMULATION = "visualization/visu_simulation"; 
    256265 
    257266    private static final String FORMAT_DEFAULT = "NASA-AMES"; 
  • ether_megapoli/trunk/web/visualization/visu_simulation.jsp

    r423 r528  
    2727    </tiles:put> 
    2828 
    29     <tiles:put name="title" type="string"><bean:message key="app.title"/> - <bean:message key="visualization.title"/></tiles:put> 
     29    <tiles:put name="title" type="string"><bean:message key="app.title"/> - <bean:message key="simulation.title"/></tiles:put> 
    3030    <tiles:put name="nav" type="string"> 
    3131        <html:link page="/index.jsp"><bean:message key="app.home"/></html:link>&nbsp;&gt; 
     
    3636 
    3737    <%--****************** CONTENT ****************** --%> 
    38     <tiles:put name="bodytitle" type="string"><bean:message key="visualization.title"/></tiles:put> 
     38    <tiles:put name="bodytitle" type="string"><bean:message key="simulation.title"/></tiles:put> 
    3939 
    4040    <tiles:put name="body" type="string"> 
Note: See TracChangeset for help on using the changeset viewer.