User: schaefera
Date: 02/03/19 15:12:31
Modified: src/web/survey-helper Statistics.Controller.jsp
Statistics.View.jsp
Log:
Some Adjustments to Survey and adding JBoss 3.0 Beta to the download
page of www.jboss.org.
Revision Changes Path
1.4 +7 -183 website-survey/src/web/survey-helper/Statistics.Controller.jsp
Index: Statistics.Controller.jsp
===================================================================
RCS file:
/cvsroot/jboss/website-survey/src/web/survey-helper/Statistics.Controller.jsp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Statistics.Controller.jsp 7 Dec 2001 22:48:10 -0000 1.3
+++ Statistics.Controller.jsp 19 Mar 2002 23:12:31 -0000 1.4
@@ -4,8 +4,8 @@
Controls the retrieval and display of the Statistics Evaluation
Copyright ( c ) 2001 eBuilt, Inc. All rights reserved.
-Version: $Revision: 1.3 $
-Last Checked In: $Date: 2001/12/07 22:48:10 $
+Version: $Revision: 1.4 $
+Last Checked In: $Date: 2002/03/19 23:12:31 $
Last Checked In By: $Author: schaefera $
--%>
@@ -30,188 +30,12 @@
String lMessage = "";
lPage = Helper.getStringParameter( request, "Page", "Statistics.View" );
// Get all the users and surveys
- Collection lUsers = mHandler.getUsers( 0, 0, 0 );
- Collection lSurveys = mHandler.getSurveys();
- // Create User Statistics
- Iterator i = lUsers.iterator();
- int ucs1 = 0;
- int ucs2 = 0;
- int ucs3 = 0;
- int ucs4 = 0;
- int ucs5 = 0;
- int ucs6 = 0;
- int ucs7 = 0;
- int ucs8 = 0;
- int ucs9 = 0;
- int ucs10 = 0;
- int ucs11 = 0;
- int cs1 = 0;
- int cs2 = 0;
- int cs3 = 0;
- int cs4 = 0;
- int cs5 = 0;
- while( i.hasNext() ) {
- UserData lUser = (UserData) i.next();
- if( ( lUser.getIndustryType() & 1 ) > 0 ) {
- ucs1++;
- }
- if( ( lUser.getIndustryType() & 2 ) > 0 ) {
- ucs2++;
- }
- if( ( lUser.getIndustryType() & 4 ) > 0 ) {
- ucs3++;
- }
- if( ( lUser.getIndustryType() & 8 ) > 0 ) {
- ucs4++;
- }
- if( ( lUser.getIndustryType() & 16 ) > 0 ) {
- ucs5++;
- }
- if( ( lUser.getIndustryType() & 32 ) > 0 ) {
- ucs6++;
- }
- if( ( lUser.getIndustryType() & 64 ) > 0 ) {
- ucs7++;
- }
- if( ( lUser.getIndustryType() & 128 ) > 0 ) {
- ucs8++;
- }
- if( ( lUser.getIndustryType() & 256 ) > 0 ) {
- ucs9++;
- }
- if( ( lUser.getIndustryType() & 512 ) > 0 ) {
- ucs10++;
- }
- if( ( lUser.getIndustryType() & 1024 ) > 0 ) {
- ucs11++;
- }
- switch( lUser.getNrOfEmployees() ) {
- case 0:
- cs1++;
- break;
- case 1:
- cs2++;
- break;
- case 2:
- cs3++;
- break;
- case 4:
- cs4++;
- break;
- case 40:
- cs5++;
- break;
- }
+ Hashtable lStatistics = mHandler.getStatistics();
+ Enumeration e = lStatistics.keys();
+ while( e.hasMoreElements() ) {
+ String lKey = (String) e.nextElement();
+ request.setAttribute( lKey, lStatistics.get( lKey ) );
}
- int lSize = lUsers.size() == 0 ? 1 : lUsers.size();
- request.setAttribute( "NOU", lSize + "" );
- request.setAttribute( "UCS1", ( 100 * ucs1 / lSize ) + " %" );
- request.setAttribute( "UCS2", ( 100 * ucs2 / lSize ) + " %" );
- request.setAttribute( "UCS3", ( 100 * ucs3 / lSize ) + " %" );
- request.setAttribute( "UCS4", ( 100 * ucs4 / lSize ) + " %" );
- request.setAttribute( "UCS5", ( 100 * ucs5 / lSize ) + " %" );
- request.setAttribute( "UCS6", ( 100 * ucs6 / lSize ) + " %" );
- request.setAttribute( "UCS7", ( 100 * ucs7 / lSize ) + " %" );
- request.setAttribute( "UCS8", ( 100 * ucs8 / lSize ) + " %" );
- request.setAttribute( "UCS9", ( 100 * ucs9 / lSize ) + " %" );
- request.setAttribute( "UCS10", ( 100 * ucs10 / lSize ) + " %" );
- request.setAttribute( "UCS11", ( 100 * ucs11 / lSize ) + " %" );
- request.setAttribute( "CS1", ( 100 * cs1 / lSize ) + " %" );
- request.setAttribute( "CS2", ( 100 * cs2 / lSize ) + " %" );
- request.setAttribute( "CS3", ( 100 * cs3 / lSize ) + " %" );
- request.setAttribute( "CS4", ( 100 * cs4 / lSize ) + " %" );
- request.setAttribute( "CS5", ( 100 * cs5 / lSize ) + " %" );
- // Create Survey Statistics
- i = lSurveys.iterator();
- int jbu1 = 0;
- int jbu2 = 0;
- int jbu3 = 0;
- int jbu4 = 0;
- int jbu5 = 0;
- int ftu = 0;
- int sf1 = 0;
- int sf2 = 0;
- int sf3 = 0;
- int sf4 = 0;
- int sf5 = 0;
- int sf6 = 0;
- int sf7 = 0;
- int sf8 = 0;
- int sf9 = 0;
- int sf10 = 0;
- while( i.hasNext() ) {
- SurveyData lSurvey = (SurveyData) i.next();
- if( lSurvey.getJbossUsage().equals( "Evaluation" ) ) {
- jbu1++;
- }
- if( lSurvey.getJbossUsage().equals( "Development" ) ) {
- jbu2++;
- }
- if( lSurvey.getJbossUsage().equals( "Reference" ) ) {
- jbu3++;
- }
- if( lSurvey.getJbossUsage().equals( "Production" ) ) {
- jbu4++;
- }
- if( lSurvey.getJbossUsage().equals( "Packaged" ) ) {
- jbu5++;
- }
- if( lSurvey.getJbossFirstTime() ) {
- ftu++;
- } else {
- switch( lSurvey.getJbossOtherServer() ) {
- case 0:
- sf1++;
- break;
- case 1:
- sf2++;
- break;
- case 2:
- sf3++;
- break;
- case 3:
- sf4++;
- break;
- case 4:
- sf5++;
- break;
- case 5:
- sf6++;
- break;
- case 6:
- sf7++;
- break;
- case 7:
- sf8++;
- break;
- case 8:
- sf9++;
- break;
- case 9:
- sf10++;
- break;
- }
- }
- }
- lSize = lSurveys.size() == 0 ? 1 : lSurveys.size();
- request.setAttribute( "NOS", lSize + "" );
- request.setAttribute( "JBU1", ( 100 * jbu1 / lSize ) + " %" );
- request.setAttribute( "JBU2", ( 100 * jbu2 / lSize ) + " %" );
- request.setAttribute( "JBU3", ( 100 * jbu3 / lSize ) + " %" );
- request.setAttribute( "JBU4", ( 100 * jbu4 / lSize ) + " %" );
- request.setAttribute( "JBU5", ( 100 * jbu5 / lSize ) + " %" );
- request.setAttribute( "FTU", ( 100 * ftu / lSize ) + " %" );
- request.setAttribute( "NFTU", ( 100 * ( lSize - ftu ) / lSize ) + " %" );
- request.setAttribute( "SF1", ( 100 * sf1 / lSize ) + " %" );
- request.setAttribute( "SF2", ( 100 * sf2 / lSize ) + " %" );
- request.setAttribute( "SF3", ( 100 * sf3 / lSize ) + " %" );
- request.setAttribute( "SF4", ( 100 * sf4 / lSize ) + " %" );
- request.setAttribute( "SF5", ( 100 * sf5 / lSize ) + " %" );
- request.setAttribute( "SF6", ( 100 * sf6 / lSize ) + " %" );
- request.setAttribute( "SF7", ( 100 * sf7 / lSize ) + " %" );
- request.setAttribute( "SF8", ( 100 * sf8 / lSize ) + " %" );
- request.setAttribute( "SF9", ( 100 * sf9 / lSize ) + " %" );
- request.setAttribute( "SF10", ( 100 * sf10 / lSize ) + " %" );
%>
<jsp:forward page="Page.jsp">
<jsp:param name="Controller" value="Statistics.Controller"/>
1.4 +3 -3 website-survey/src/web/survey-helper/Statistics.View.jsp
Index: Statistics.View.jsp
===================================================================
RCS file: /cvsroot/jboss/website-survey/src/web/survey-helper/Statistics.View.jsp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Statistics.View.jsp 7 Oct 2001 15:56:51 -0000 1.3
+++ Statistics.View.jsp 19 Mar 2002 23:12:31 -0000 1.4
@@ -5,8 +5,8 @@
data.
Copyright ( c ) 2001 JBoss Group. All rights reserved.
-Version: $Revision: 1.3 $
-Last Checked In: $Date: 2001/10/07 15:56:51 $
+Version: $Revision: 1.4 $
+Last Checked In: $Date: 2002/03/19 23:12:31 $
Last Checked In By: $Author: schaefera $
--%>
@@ -68,7 +68,7 @@
</tr><tr>
<td>Number of Downloads:</td>
<td class="label">
-avg 50,000 downloads per month, up to date
+avg 100,000 downloads per month, up to date
<a
href="http://sourceforge.net/project/stats/index.php?report=months&group_id=22866">
download statistics </a> on sourceforge
</td>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development