Changeset 654 for ether_statistics/web
- Timestamp:
- 10/31/12 15:13:40 (12 years ago)
- Location:
- ether_statistics/web
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
ether_statistics/web/WEB-INF/servlet-context.xml
r575 r654 37 37 <property name="mappings"> 38 38 <props> 39 <prop key="/ data">controllerStatistics</prop>39 <prop key="/statistic">controllerStatistics</prop> 40 40 <prop key="/project">controllerEponge</prop> 41 41 </props> -
ether_statistics/web/WEB-INF/web.xml
r575 r654 47 47 <servlet-mapping> 48 48 <servlet-name>eponge</servlet-name> 49 <url-pattern>/ data</url-pattern>49 <url-pattern>/statistic</url-pattern> 50 50 </servlet-mapping> 51 51 -
ether_statistics/web/index.jsp
r586 r654 1 1 <%--This redirect is used to allow messages sources in the index page--%> 2 <jsp:forward page=" data?methodName=view"/>2 <jsp:forward page="statistic?methodName=view"/> -
ether_statistics/web/project/statistics-script.jsp
r596 r654 10 10 this.parent = $( "#containerMiddle" ); 11 11 this.containerMenu = $( "#menuCircle" ); 12 this.containerErrors = $( "#errors" ); 12 13 13 14 /** *********** VARIABLES *********** **/ … … 36 37 this.widthInitMentionsOrCredits = $( "#mentions" ).width(); 37 38 39 this.xArray = ["2010-10", "2010-11", "2010-12", "2011-01", "2011-02"]; 40 this.yArray = [0, 10, 30, 50, 100]; 41 42 38 43 this.bindButtons(); 39 44 this.createDraggableSlides(); … … 47 52 this.bindMenuCircle(); 48 53 // Slides 49 this.onClickHelp();54 // this.onClickHelp(); 50 55 this.selectedLogo = $( "#ETHER" )[0]; 56 this.isSelectedLogoEther = true; 51 57 this.onClickLogo(); 52 // this.hideHelp(); 58 59 this.changeRightSlide(); 53 60 }, this ) ); 54 61 }, … … 102 109 this.middleSlide = new DragSlide( {id:"middle", parent:this.parent, width:"430", height:"430", top:"140px", left:"245px", 103 110 specificClass:"containerStatistics", specificTitleClass:"containerStatisticsTitle", specificContentClass:"containerStatisticsContent"} ); 104 this.middleSlide.setTitle( '<spring:message code="statistics.evolution"/>' );105 111 106 112 this.rightSlide = new DragSlide( {id:"right", parent:this.parent, width:"200", height:"300", top:"180px", left:"698px", 107 113 specificClass:"containerStatistics", specificTitleClass:"containerStatisticsTitle", specificContentClass:"containerStatisticsContent"} ); 108 109 var linechart = $( document.createElement( "div" ) );110 linechart.addClass( "ui-widget ui-widget-content ui-corner-all statisticsEther" );111 linechart.attr( {id:"wijlinechart"} );112 this.middleSlide.getDivContent().append( linechart );113 114 var barchart = $( document.createElement( "div" ) );115 barchart.addClass( "ui-widget ui-widget-content ui-corner-all statisticsEther" );116 barchart.attr( {id:"wijbarchart"} );117 this.middleSlide.getDivContent().append( barchart );118 119 this.createLinechart();120 // this.createBarchart();121 114 }, 122 115 … … 133 126 }, 134 127 128 requestDataByLogo: function() 129 { 130 if( !this.selectedLogo && !this.selectedLogo.id ) 131 return; 132 133 $.ajax( { 134 url: "statistic?methodName=searchMainStatisticsByProject&name=" + this.selectedLogo.id, 135 success:jQuery.proxy( this.handleDataByLogo, this ), 136 error: jQuery.proxy( this.showErrors, [this] ) 137 } ); 138 }, 139 135 140 // HANDLES ******************************************************** = retours ajax 136 handleCreateXML: function( result ) 137 { 138 this.loadingRequest.hide(); 139 //this.loadingRequest.display(); 140 141 var res = jQuery.parseJSON( result ).result; 142 alert( res ); 143 }, 144 141 handleDataByLogo: function( result ) 142 { 143 this.changeLeftTopSlide(); 144 this.changeLeftMiddleSlide(); 145 this.changeLeftBottomSlide(); 146 this.displayVisitEvolution(); 147 }, 145 148 146 149 // EVENTS ******************************************************** … … 199 202 onClickLogo: function() 200 203 { 201 if( !this.selectedLogo ) 202 return; 203 204 this.changeLeftTopSlide(); 205 this.changeLeftMiddleSlide(); 206 this.changeLeftBottomSlide(); 204 this.isSelectedLogoEther = (this.selectedLogo == $( "#ETHER" )[0]); 205 this.requestDataByLogo(); 206 }, 207 208 onClickExport: function() 209 { 210 $( "#containerMiddle" ).printPreview(); 211 // $("#containerMiddle").jqprint(); 212 213 // var printContent =$( "#containerMiddle" ); 214 // var windowUrl = 'about:blank'; 215 // var windowName = 'Print'; 216 // var printWindow = window.open( windowUrl, windowName, 'left=50000,top=50000,width=0,height=0' ); 217 // printWindow.document.write( "slkdfjlsdkfjsdlf" ); 218 // printWindow.document.close(); 219 // printWindow.focus(); 220 // printWindow.print(); 221 // printWindow.close(); 222 // 223 // TODO export PDF 207 224 }, 208 225 209 226 // OTHERS ******************************************************** 227 showErrors: function( result ) 228 { 229 var context = this[0] ? this[0] : this; 230 var text = this[1]; 231 context.containerErrors.show(); 232 // if( text ) 233 // context.containerErrors.html( interfaceTexts[result.responseText] + " " + text ); 234 // else if( interfaceTexts[result.responseText] ) 235 // context.containerErrors.html( interfaceTexts[result.responseText] ); 236 if( result.responseText ) 237 context.containerErrors.html( result.responseText ); 238 else 239 context.containerErrors.html( result ); 240 }, 241 210 242 reduceLogin: function() 211 243 { … … 325 357 }, 326 358 327 // hideHelp: function()328 // {329 // this.rightSlide.getDivContent().animate(330 // {331 // opacity: 0332 // }, 10000, jQuery.proxy( function()333 // {334 // this.changeRightSlide();335 // this.rightSlide.getDivContent().attr( {style:"opacity:1"} );336 // }, this ) );337 // },338 //339 359 changeLeftTopSlide: function() 340 360 { 341 this.leftTopSlide.setTitle( this.selectedLogo.id + ' <spring:message code="title"/>');361 this.leftTopSlide.setTitle( '<spring:message code="title"/> : ' + this.selectedLogo.id ); 342 362 this.leftTopSlide.setContent( 343 363 "<spring:message code="statistics.online"/> : 2006/05/08<BR/>" + 344 "<span class='text1'><spring:message code="statistics.since"/> : 2009/05/08<BR/>< /span>" +364 "<span class='text1'><spring:message code="statistics.since"/> : 2009/05/08<BR/><BR/></span>" + 345 365 "<spring:message code="statistics.user.registered"/> : 1500<BR/>" + 346 "<spring:message code="statistics.user.connected"/> : 17<BR/>" + 347 "<spring:message code="statistics.visit"/> : 150<BR/>" + 348 "<spring:message code="statistics.email"/> : 15<BR/>" ); 366 "<spring:message code="statistics.visit"/> : 150<BR/>" ); 349 367 }, 350 368 … … 362 380 { 363 381 this.rightSlide.setTitle( '<spring:message code="label.actions"/>' ); 364 this.rightSlide.setContent( "pouif" ); 365 }, 382 this.rightSlide.getDivContent().empty(); 383 new Button( {value:"<spring:message code="statistics.visit"/>", parent:this.rightSlide.getDivContent(), className: "positive action_button", onClick:jQuery.proxy( this.displayVisitEvolution, this )} ); 384 new Button( {value:"<spring:message code="statistics.user.registered"/>", parent:this.rightSlide.getDivContent(), className: "positive action_button", onClick:jQuery.proxy( this.displayRegisteredUserEvolution, this )} ); 385 new Button( {value:"<spring:message code="statistics.user.connected"/>", parent:this.rightSlide.getDivContent(), className: "positive action_button", onClick:jQuery.proxy( this.displayConnectedUserEvolution, this )} ); 386 new Button( {value:"<spring:message code="statistics.data.download"/>", parent:this.rightSlide.getDivContent(), className: "positive action_button", onClick:jQuery.proxy( this.displayDownloadEvolution, this )} ); 387 new Button( {value:"<spring:message code="statistics.map.distribution"/>", parent:this.rightSlide.getDivContent(), className: "positive action_button", onClick:jQuery.proxy( this.displayMapDistribution, this )} ); 388 new Button( {value:"<spring:message code="label.export"/>", parent:this.rightSlide.getDivContent(), className: "blue export_button", onClick:jQuery.proxy( this.onClickExport, this )} ); 389 }, 390 391 changeMiddleSlide: function( titleEvolution, titleDistribution ) 392 { 393 if( this.isSelectedLogoEther ) 394 this.middleSlide.setTitle( '<spring:message code="statistics.evolution.distribution"/> : ' + this.selectedLogo.id ); 395 else 396 this.middleSlide.setTitle( '<spring:message code="statistics.evolution"/> : ' + this.selectedLogo.id ); 397 this.middleSlide.getDivContent().empty(); 398 399 var linechart = $( document.createElement( "div" ) ); 400 linechart.addClass( "ui-widget ui-widget-content ui-corner-all statisticsEther" ); 401 linechart.attr( {id:"wijlinechart"} ); 402 this.middleSlide.getDivContent().append( linechart ); 403 404 var donut = $( document.createElement( "div" ) ); 405 donut.addClass( "ui-widget ui-widget-content ui-corner-all statisticsEther" ); 406 donut.attr( {id:"wijpiechart"} ); 407 this.middleSlide.getDivContent().append( donut ); 408 409 this.createLinechart( titleEvolution ); 410 if( this.isSelectedLogoEther ) 411 this.createDonut( titleDistribution ); 412 }, 413 414 changeMiddleSlideForMap: function() 415 { 416 this.middleSlide.setTitle( '<spring:message code="statistics.map.distribution"/> : ' + this.selectedLogo.id ); 417 this.middleSlide.getDivContent().empty(); 418 }, 419 366 420 367 421 // STATISTICS ******************************************************** 368 createBarchart: function() 369 { 370 $( "#wijbarchart" ).wijbarchart( { 371 axis: { 372 y: { 373 text: "Total Hardware" 374 }, 375 x: { 376 text: "", 377 labels: { 378 style: { 379 rotation: -45 380 } 381 } 382 } 383 }, 422 createDonut: function( title ) 423 { 424 $( "#wijpiechart" ).wijpiechart( { 425 height: 210, 426 width: 400, 427 radius: 140, 428 legend: { visible: true }, 384 429 hint: { 385 430 content: function () 386 431 { 387 return this.data.label + '\n ' + this.y + '';432 return this.data.label + " : " + Globalize.format( this.value / this.total, "p2" ); 388 433 } 389 434 }, 390 435 header: { 391 text: "Console Wars"436 text: title 392 437 }, 393 438 seriesList: [ 394 439 { 395 label: " US",440 label: "MacBook Pro", 396 441 legendEntry: true, 397 data: { x: ['PS3', 'XBOX360', 'Wii'], y: [12.35, 21.50, 30.56] } 442 data: 46.78, 443 offset: 0 444 }, 445 { 446 label: "iMac", 447 legendEntry: true, 448 data: 23.18, 449 offset: 0 450 }, 451 { 452 label: "MacBook", 453 legendEntry: true, 454 data: 20.25, 455 offset: 0 456 }, 457 { 458 label: "Mac Pro", 459 legendEntry: true, 460 data: 5.41, 461 offset: 0 462 }, 463 { 464 label: "Mac mini", 465 legendEntry: true, 466 data: 3.44, 467 offset: 0 398 468 } 399 469 ], 400 470 seriesStyles: [ 401 471 { 402 fill: "#8ede43", stroke: "#7fc73c", opacity: 0.8 403 } 404 ], 405 seriesHoverStyles: [ 406 { 407 "stroke-width": "1.5", opacity: 1 472 fill: "180-rgb(195,255,0)-rgb(175,229,0)", stroke: "rgb(175,229,0)", "stroke-width": 1.5 473 }, 474 { 475 fill: "90-rgb(142,222,67)-rgb(127,199,60)", stroke: "rgb(127,199,60)", "stroke-width": 1.5 476 }, 477 { 478 fill: "90-rgb(106,171,167)-rgb(95,153,150)", stroke: "rgb(95,153,150)", "stroke-width": 1.5 479 }, 480 { 481 fill: "90-rgb(70,106,133)-rgb(62,95,119)", stroke: "rgb(62,95,119)", "stroke-width": 1.5 482 }, 483 { 484 fill: "90-rgb(166,166,166)-rgb(149,149,149)", stroke: "rgb(149,149,149)", "stroke-width": 1.5 408 485 } 409 486 ] … … 411 488 }, 412 489 413 createLinechart: function() 414 { 415 var xArray = ["2010-10", "2010-11", "2010-12", "2011-01", "2011-02"]; 416 var yArray = [0, 10, 30, 50, 100]; 490 createLinechart: function( title ) 491 { 417 492 $( "#wijlinechart" ).wijlinechart( { 418 493 height: 200, … … 425 500 showChartLabels: false, 426 501 header: { 427 text: "<spring:message code="statistics.evolution.visit"/>"502 text: title 428 503 }, 429 504 hint: { … … 440 515 seriesList: [ 441 516 { 442 label: " <spring:message code="statistics.visit"/>",517 label: "", 443 518 legendEntry: true, 444 519 data: { 445 x: xArray,446 y: yArray520 x: this.xArray, 521 y: this.yArray 447 522 }, 448 523 markers: { … … 453 528 ] 454 529 } ); 530 }, 531 532 displayVisitEvolution: function() 533 { 534 this.changeMiddleSlide( '<spring:message code="statistics.evolution.visit"/>', '<spring:message code="statistics.distribution.visit"/>' ); 535 }, 536 537 displayRegisteredUserEvolution: function() 538 { 539 this.changeMiddleSlide( '<spring:message code="statistics.evolution.user.registered"/>', '<spring:message code="statistics.distribution.user.registered"/>' ); 540 }, 541 542 displayConnectedUserEvolution: function() 543 { 544 this.changeMiddleSlide( '<spring:message code="statistics.evolution.user.connected"/>', '<spring:message code="statistics.distribution.user.connected"/>' ); 545 }, 546 547 displayDownloadEvolution: function() 548 { 549 this.changeMiddleSlide( '<spring:message code="statistics.evolution.download"/>', '<spring:message code="statistics.distribution.download"/>' ); 550 }, 551 552 displayMapDistribution: function() 553 { 554 this.changeMiddleSlideForMap(); 455 555 } 456 556 -
ether_statistics/web/project/statistics.jsp
r596 r654 36 36 <ether:htmlJsp jspFile="statistics-script"/> 37 37 38 <%--<ether:htmlCss cssFile="etimbo-jquery-print-preview-plugin/960"/>--%> 39 <%--<ether:htmlCss cssFile="etimbo-jquery-print-preview-plugin/screen"/>--%> 40 <ether:htmlCss cssFile="etimbo-jquery-print-preview-plugin/print"/> 41 <ether:htmlCss cssFile="etimbo-jquery-print-preview-plugin/print-preview"/> 42 <%--<script src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js"></script>--%> 43 <ether:htmlJs jsFile="etimbo-jquery-print-preview-plugin/src/jquery.print-preview"/> 38 44 </HEAD> 39 45 … … 41 47 42 48 <div class="pageWrapper"> 49 50 <div id="aside" class="grid_3 push_1"> 51 </div> 43 52 44 53 <%-- ****************** TITLE & TOOLS ****************** --%> … … 80 89 <div id="credits" class="containerToDrag"> 81 90 <img id="credits_bg" src='resources/images/cloud.png' width="59px" height="42px"/> 91 82 92 <div id="credits_title"><spring:message code="label.credits"/></div> 83 93 <div id="credits_text"></div> … … 86 96 <div id="mentions" class="containerToDrag"> 87 97 <img id="mentions_bg" src='resources/images/cloud.png' width="59px" height="42px"/> 98 88 99 <div id="mentions_title"><spring:message code="label.mentions"/></div> 89 100 <div id="mentions_text"></div> … … 96 107 <div id="containerMiddle"></div> 97 108 109 <div id="errors"></div> 110 98 111 <script type="text/javascript"> 99 112 var texts = $A( "" ); -
ether_statistics/web/resources/css/statistics.css
r596 r654 90 90 padding: 10px; 91 91 margin: 10px; 92 float: right; 93 display:none; 92 94 } 93 95 … … 262 264 margin-top: 35px; 263 265 } 266 267 .action_button { 268 width: 95%; 269 margin: 3px; 270 } 271 272 .export_button { 273 float: right; 274 margin: 20px 6px 0 0; 275 } -
ether_statistics/web/src/messages_en.properties
r596 r654 9 9 label.lastname=Last name 10 10 label.help=Help 11 label.help.content=All slides and objects on this site are draggable. You can move them to arrange your own desktop.<BR/>To do some actions such as login or select a logo, please use the double click!11 label.help.content=All slides and objects on this site are <B>draggable</B>. You can move them to arrange your own desktop.<BR/>To do some actions such as login or select a logo, please use the <B>double click</B> ! 12 12 label.display.actions=Display actions 13 13 label.actions=Actions 14 14 label.mentions=Mentions 15 15 label.credits=Credits 16 label.export=Export PDF 16 17 17 18 statistics.online=Online since … … 29 30 30 31 statistics.evolution=Statistics evolution 32 statistics.evolution.distribution=Statistics evolution and distribution 31 33 statistics.evolution.visit=Visited pages evolution 32 statistics.evolution.user.registered=Visited pages evolution 33 statistics.evolution.user.connected=Visited pages evolution 34 statistics.evolution.download=Visited pages evolution 34 statistics.distribution.visit=Visited pages distribution 35 statistics.evolution.user.registered=Registered users evolution 36 statistics.distribution.user.registered=Registered users distribution 37 statistics.evolution.user.connected=Connected users evolution 38 statistics.distribution.user.connected=Connected users distribution 39 statistics.evolution.download=Downloads evolution 40 statistics.distribution.download=Downloads distribution 35 41 statistics.map.distribution=Geographic distribution -
ether_statistics/web/src/messages_fr.properties
r596 r654 9 9 label.lastname=Nom 10 10 label.help=Aide 11 label.help.content=Tous les objets de ce site sont déplacables, vous pouvez donc ainsi arranger leur positionnement à votre convenance. <BR/>Pour effectuer des actions telles login ou sélection d\'un projet via son logo, veuillez utiliser le double click!11 label.help.content=Tous les objets de ce site sont <B>déplacables</B>, vous pouvez donc ainsi arranger leur positionnement à votre convenance. <BR/>Pour effectuer des actions telles login ou sélection d\'un projet via son logo, veuillez utiliser le <B>double click</B> ! 12 12 label.display.actions=Afficher les actions 13 13 label.actions=Actions 14 14 label.mentions=Mentions 15 15 label.credits=Crédits 16 label.export=Export PDF 16 17 17 18 statistics.online=En ligne depuis le … … 29 30 30 31 statistics.evolution=Evolution des statistiques 32 statistics.evolution.distribution=Evolution et répartition des statistiques 31 33 statistics.evolution.visit=Evolution des pages visitées 34 statistics.distribution.visit=Répartition des pages visitées 32 35 statistics.evolution.user.registered=Evolution des utilisateurs enregistrés 36 statistics.distribution.user.registered=Répartition des utilisateurs enregistrés 33 37 statistics.evolution.user.connected=Evolution des utilisateurs connectés 38 statistics.distribution.user.connected=Répartition des utilisateurs connectés 34 39 statistics.evolution.download=Evolution des téléchargements 40 statistics.distribution.download=Répartition des téléchargements 35 41 statistics.map.distribution=Répartition géographique
Note: See TracChangeset
for help on using the changeset viewer.