diff --git a/README.md b/README.md index 7a75d0234..6cf3dd775 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,23 @@ direct-app ========== + +Setup on VM: +* Once you get your VM, login into the VM with your private key and account 'direct' +* Back up token.properties and topcoder_global.properties in /home/direct/direct somewhere +* Delete the whole directory /home/direct/direct +* Git Clone the direct-app repo into folder /home/direct/direct. +* Copy the back up *.properties files back to /home/direct/direct + +Setup on Local env - Refer to http://apps.topcoder.com/wiki/display/docs/TC+Direct+Setup+Guide +* Instead of using SVN, you will use the codes from this git repo + +VM Info: +* http://apps.topcoder.com/wiki/display/projects/Direct+VM +* http://apps.topcoder.com/wiki/display/docs/VM+Image+2.5 + +Build/Compile +* run 'ant' + +Deploy: +* simply run 'ant deploy' to build all the components and the direct and deploy the direct to jboss + diff --git a/build-components.xml b/build-components.xml index 5053248b2..2ea90187d 100644 --- a/build-components.xml +++ b/build-components.xml @@ -2,26 +2,28 @@ + + - + - + - + - + @@ -34,4 +36,4 @@ - \ No newline at end of file + diff --git a/build-dependencies.xml b/build-dependencies.xml index ea8d28b8e..d1d466614 100644 --- a/build-dependencies.xml +++ b/build-dependencies.xml @@ -36,6 +36,9 @@ + + + diff --git a/build-master-targets.xml b/build-master-targets.xml index fc90af5ff..bac756757 100644 --- a/build-master-targets.xml +++ b/build-master-targets.xml @@ -543,45 +543,11 @@ - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + diff --git a/build-master-tasks.xml b/build-master-tasks.xml index 2d811f4a9..2c94d900f 100644 --- a/build-master-tasks.xml +++ b/build-master-tasks.xml @@ -156,4 +156,60 @@ } ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build-services.xml b/build-services.xml index 95a6f4e51..95efbfcab 100644 --- a/build-services.xml +++ b/build-services.xml @@ -6,22 +6,22 @@ - + - + - + - + @@ -31,7 +31,6 @@ - - \ No newline at end of file + diff --git a/build.xml b/build.xml index 4314d6db7..a353e23ad 100644 --- a/build.xml +++ b/build.xml @@ -314,30 +314,31 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/components/deliverable_management/src/java/main/com/topcoder/management/deliverable/persistence/UploadPersistence.java b/components/deliverable_management/src/java/main/com/topcoder/management/deliverable/persistence/UploadPersistence.java index 80930c6a0..37e5c8e3c 100644 --- a/components/deliverable_management/src/java/main/com/topcoder/management/deliverable/persistence/UploadPersistence.java +++ b/components/deliverable_management/src/java/main/com/topcoder/management/deliverable/persistence/UploadPersistence.java @@ -17,7 +17,7 @@ /** *

* The UploadPersistence interface defines the methods for persisting and retrieving the object model in this - * component. This interface handles the persistence of the upload related classes that make up the object model ¨C + * component. This interface handles the persistence of the upload related classes that make up the object model * Uploads, Submissions, UploadTypes, UploadStatuses, SubmissionStatuses. This interface is not responsible for * searching the persistence for the various entities. This is instead handled by an UploadManager implementation. *

diff --git a/components/phase_management/src/java/main/com/topcoder/management/phase/PhaseOperationEnum.java b/components/phase_management/src/java/main/com/topcoder/management/phase/PhaseOperationEnum.java index 59990643c..666ca6b88 100644 --- a/components/phase_management/src/java/main/com/topcoder/management/phase/PhaseOperationEnum.java +++ b/components/phase_management/src/java/main/com/topcoder/management/phase/PhaseOperationEnum.java @@ -10,7 +10,7 @@ * operations of "start", "end", and "cancel". This is provided as a utility to the user when they need to identify * the phase operation when registering a phase handler with a manager. This is used when creating * HandlerRegistryInfo instances for handler registrations (used as keys to id handlers), which need to know what - * operation the handler will handle (as well as which phase status it will deal with – which is covered by + * operation the handler will handle (as well as which phase status it will deal with - which is covered by * PhaseStatusEnum).

* *

PhaseOperation is an Enum and thus poses no thread-safety issues.

diff --git a/components/project_phases/src/java/main/com/topcoder/project/phases/template/converter/ConverterUtility.java b/components/project_phases/src/java/main/com/topcoder/project/phases/template/converter/ConverterUtility.java index 5f2472fbb..02dfb282d 100644 --- a/components/project_phases/src/java/main/com/topcoder/project/phases/template/converter/ConverterUtility.java +++ b/components/project_phases/src/java/main/com/topcoder/project/phases/template/converter/ConverterUtility.java @@ -51,46 +51,6 @@ * If the user passes "auto" as the command line argument, the utility automatically executes all generated * SQL queries. *

- *

- * Accepted command line arguments: - *

    - *
  • "-inamespace" flag followed by XmlPhaseTemplatePersistence configuration namespace. Only this argument - * is required.
  • - *
  • "-onamespace" flag followed by DBPhaseTemplatePersistence configuration namespace.
  • - *
  • "-ifile" flag followed by name of additional config file for xml persistence namespace that the - * ConfigManager to load.
  • - *
  • "-oifile" flag followed by name of additional config file for db persistence namespace that the - * ConfigManager to load.
  • - *
  • "-auto" flag that indicates whether to executes the generated SQL queries automatically.
  • - *
- *

- * The method - * utilizes Command Line Utility component to facilitate parameters parsing and handling. - *

- *

- * Sample usage of this command line tools:
- * The following command line can be used to output SQL queries those are intended for fulfilling an empty - * database:
- * java ConverterUtility.class –inamespace xml_phase_template_namespace
- *
- * The following command line can be used to output SQL queries those are intended for adding templates to - * non-empty database:
- * java ConverterUtility.class –inamespace xml_phase_template_namespace –onamespace - * db_phase_template_namespace
- *
- * The following command line can be used to fulfill a database (queries are executed automatically):
- * java ConverterUtility.class –inamespace xml_phase_template_namespace –onamespace - * db_phase_template_namespace –auto
- *
- * If users want to specify the config files in the command line instead of ConfigManager.properties, they can - * use the following command line(suppose the xml_phase_template_namespace is in file "xml_config.xml", and - * db_phase_template_namespace is in "db_config.xml"):
- * java ConverterUtility.class –inamespace xml_phase_template_namespace –onamespace - * db_phase_template_namespace –ifile xml_config.xml –ofile db_config.xml –auto - *

- * Thread-safety: This class is not thread safe. But it is not required, because - * only one instance of it is used in converter application. - *

* * @author saarixx, TCSDEVELOPER * @version 1.1 @@ -145,7 +105,7 @@ public class ConverterUtility { *

*/ private static final String HELP_MSG = "Sample usage: java jarname" - + " ¨Cinamespace Xml_Persistence_NamSpace ¨Conamespace DB_Persistence_Namespace -auto" + + " Cinamespace Xml_Persistence_NamSpace Conamespace DB_Persistence_Namespace -auto" + "(-onamespace and -auto is optional)"; /** diff --git a/components/resource_management/src/java/main/com/topcoder/management/resource/persistence/ResourcePersistence.java b/components/resource_management/src/java/main/com/topcoder/management/resource/persistence/ResourcePersistence.java index bda925267..9f691f936 100644 --- a/components/resource_management/src/java/main/com/topcoder/management/resource/persistence/ResourcePersistence.java +++ b/components/resource_management/src/java/main/com/topcoder/management/resource/persistence/ResourcePersistence.java @@ -13,7 +13,7 @@ *

* The ResourcePersistence interface defines the methods for persisting and * retrieving the object model in this component. This interface handles the - * persistence of the four classes that make up the object model ¨C Resources, + * persistence of the four classes that make up the object model Resources, * ResourceRoles, Notifications, and NotificationTypes. This interface is not * responsible for searching the persistence for the various entities. This is * instead handled by a ResourceManager implementation. diff --git a/conf/ear/META-INF/application.xml b/conf/ear/META-INF/application.xml index 4e5cb3c09..4197b8e05 100644 --- a/conf/ear/META-INF/application.xml +++ b/conf/ear/META-INF/application.xml @@ -8,88 +8,92 @@ TC Direct - client_project_entities_dao.jar + ejb/client_project_entities_dao.jar - catalog_services_id_generator.jar + ejb/catalog_services_id_generator.jar - catalog_services.jar + ejb/catalog_services.jar - user_service.jar + ejb/user_service.jar - project_service.jar + ejb/project_service.jar - game_plan_service.jar + ejb/game_plan_service.jar - contest_eligibility_persistence.jar + ejb/contest_eligibility_persistence.jar - contest_eligibility_validation.jar + ejb/contest_eligibility_validation.jar - project_services.jar + ejb/project_services.jar - specification_review_service.jar + ejb/specification_review_service.jar - specification_review_comment_service.jar + ejb/specification_review_comment_service.jar - permission_service_facade.jar + ejb/permission_service_facade.jar - contest_service_facade.jar + ejb/contest_service_facade.jar - cloud_vm_service.jar + ejb/cloud_vm_service.jar - user_service_facade.jar + ejb/user_service_facade.jar - project_service_facade.jar + ejb/project_service_facade.jar - admin_service_facade.jar + ejb/admin_service_facade.jar - pipeline_service.jar + ejb/pipeline_service.jar - pipeline_service_facade.jar + ejb/pipeline_service_facade.jar - User.jar + ejb/User.jar - Project.jar + ejb/Project.jar + + + + conf diff --git a/conf/email_templates/activate_contest_receipt.txt b/conf/email_templates/activate_contest_receipt.txt index 7626e7f64..1aa57f2db 100644 --- a/conf/email_templates/activate_contest_receipt.txt +++ b/conf/email_templates/activate_contest_receipt.txt @@ -1,11 +1,11 @@ %if:PAID='NO'%

-A message from TopCoder. +A message from Topcoder.

-We have scheduled your competition. The contest will now undergo a specification review before it launches, which will be performed by the TopCoder Community %COMPETITION_TYPE% review board. +We have scheduled your competition. The contest will now undergo a specification review before it launches, which will be performed by the Topcoder Community %COMPETITION_TYPE% review board.

@@ -20,10 +20,10 @@ You can track the status of all your competitions, by visiting

    -
  • Engage the TopCoder Community in your projects
  • +
  • Engage the Topcoder Community in your projects
  • Track progress and manage your projects and competitions
  • View metrics and performance statistics for your projects and competitions
  • -
  • Collaborate with your team members and the TopCoder Community
  • +
  • Collaborate with your team members and the Topcoder Community
  • Manage competitions
  • Select winners (if necessary for this competition) and download the results of each competition
  • And much more
  • @@ -62,7 +62,7 @@ Additional Cost\: $%TOTAL_COST%
    %endif%

    -# * The Estimated Cost includes the contest fee as well as an estimate of prizes for the selected Copilot(s). The actual cost will be presented in Cockpit (https\://www.topcoder.com/direct) at the conclusion of the competition.
    +# * The Estimated Cost includes the contest fee as well as an estimate of prizes for the selected Copilot(s). The actual cost will be presented in Direct (https\://www.topcoder.com/direct) at the conclusion of the competition.
    #
    #You will be invoiced for the contest fee when the competition launches. The remainder of the costs will be invoiced after the competition completes.
    #
    @@ -92,7 +92,7 @@ This competition was ordered by\:

    -If you've explored the links in TopCoder Cockpit and the Help Center but still need assistance with your competition, email support@topcoder.com and we'll be happy to help.
    +If you've explored the links in Topcoder Direct and the Help Center but still need assistance with your competition, email support@topcoder.com and we'll be happy to help.

    ---------------------------------------------------------------------

    @@ -102,7 +102,7 @@ Please note\: This e-mail was sent from a notification-only address that cannot

    -Thank you for working with TopCoder.
    +Thank you for working with Topcoder.

    ---------------------------------------------------------------------

    \ No newline at end of file diff --git a/conf/email_templates/copilot_winner_email_template.txt b/conf/email_templates/copilot_winner_email_template.txt index 15e1a42e2..ea9fcc542 100644 --- a/conf/email_templates/copilot_winner_email_template.txt +++ b/conf/email_templates/copilot_winner_email_template.txt @@ -1,5 +1,5 @@

    -A message from TopCoder. +A message from Topcoder.

    @@ -12,13 +12,13 @@ Here is a summary of your next steps. Please make sure you do step 1. Steps 2

    1. Post a message to your customer in the Project Forum. This will let the customer know that you have been officially selected as the copilot and are ready to start.
    -2. Create the game plan in Cockpit by adding all known and estimated contests you plan to run.
    +2. Create the game plan in Direct by adding all known and estimated contests you plan to run.
    3. If it is not already set, please set the budget and expected duration for the project by using the Edit Project screen. This is very important, and many customers will not proceed with the project until they are set. This will help set expectations for the project.
    4. Communicate often and keep your game plans updated. Your customer will appreciate it and be more likely to expand their relationship with you.

    -If you run into any issues or have a situation you need assistance with, please email support@topcoder.com and the TopCoder team will be there to help. You can also find assistance in our Help Center. +If you run into any issues or have a situation you need assistance with, please email support@topcoder.com and the Topcoder team will be there to help. You can also find assistance in our Help Center.

    @@ -30,5 +30,5 @@ Please note\: This e-mail was sent from a notification-only address that cannot

    -Thank you for working with TopCoder. +Thank you for working with Topcoder.

    diff --git a/conf/email_templates/create_task_email_template.txt b/conf/email_templates/create_task_email_template.txt index 1ea11b38d..139f3440c 100644 --- a/conf/email_templates/create_task_email_template.txt +++ b/conf/email_templates/create_task_email_template.txt @@ -104,7 +104,7 @@ -
    TopCoder Cockpit Alert\: Task Created
    +
    Topcoder Direct Alert\: Task Created

    diff --git a/conf/email_templates/purchase_submission_receipt.txt b/conf/email_templates/purchase_submission_receipt.txt index 978fd42d9..9cab6fd82 100644 --- a/conf/email_templates/purchase_submission_receipt.txt +++ b/conf/email_templates/purchase_submission_receipt.txt @@ -14,10 +14,10 @@ You can track the status of this competition, and all your competitions, by visi There you can\:

      -
    • Engage the TopCoder Community in your projects
    • +
    • Engage the Topcoder Community in your projects
    • Track the progress of your projects and competitions
    • View metrics and performance statistics for your projects and competitions
    • -
    • Collaborate with your team members and the TopCoder Community
    • +
    • Collaborate with your team members and the Topcoder Community
    • Modify competitions that have not launched
    • Select winners (if necessary for this competition) and download the results of each competition
    • And much more
    • @@ -43,7 +43,7 @@ Total\: $%TOTAL_COST%

      -You will be invoiced for $%TOTAL_COST% in accordance with the agreement you have in place with TopCoder, Inc. +You will be invoiced for $%TOTAL_COST% in accordance with the agreement you have in place with Topcoder, Inc.

      @@ -70,7 +70,7 @@ This purchase was made for\:

      -If you've explored the links in TopCoder Cockpit and the Help Center but still need assistance with your competition, email support@topcoder.com and we'll be happy to help. +If you've explored the links in Topcoder Direct and the Help Center but still need assistance with your competition, email support@topcoder.com and we'll be happy to help.

      @@ -78,7 +78,7 @@ If you've explored the links in TopCoder Cockpit and the Help Center but still n
      Please note\: This e-mail was sent from a notification-only address that cannot accept incoming e-mail. Please do not reply to this message.

      -Thank you for working with TopCoder.
      +Thank you for working with Topcoder.

      ---------------------------------------------------------------------

      \ No newline at end of file diff --git a/conf/web/WEB-INF/applicationContext.xml b/conf/web/WEB-INF/applicationContext.xml index 28620b342..578aaad6e 100644 --- a/conf/web/WEB-INF/applicationContext.xml +++ b/conf/web/WEB-INF/applicationContext.xml @@ -502,7 +502,7 @@ + parent="contestDetailAction" scope="prototype"> component.

      *

      A component can have many versions and the current version stored in currentVersion field, * while others are stored in versions list.

      - *

      It’s important to be aware of fact that the current version is not necessarily the most recent one - it points + *

      It's important to be aware of fact that the current version is not necessarily the most recent one - it points * to a completed version (or to the first one if it's is the only one version of a component).

      *

      Also notice that the version field is just an "internal" field that will start from '1' and increase by '1' each * time. A user will see CompVersion.versionText where version numbers look like "1.1", "3.0" etc.

      diff --git a/src/java/main/com/topcoder/direct/services/view/action/dashboard/EnterpriseDashboardAction.java b/src/java/main/com/topcoder/direct/services/view/action/dashboard/EnterpriseDashboardAction.java index ed00982fc..8ae067a29 100644 --- a/src/java/main/com/topcoder/direct/services/view/action/dashboard/EnterpriseDashboardAction.java +++ b/src/java/main/com/topcoder/direct/services/view/action/dashboard/EnterpriseDashboardAction.java @@ -997,6 +997,7 @@ private List> buildContestBreakDownResults(ListAdded {@link #PLATFORM_FEE}. * *

      + * + *

      + * Version 1.2 (TopCoder Direct - Add Marathon Payments part 1) + *

        + *
      • Added {@link #TESTING}
      • + *
      + *

      * - * @author Blues, TCSASSEMBLER - * @version 1.1 + * @author Blues, GreatKevin + * @version 1.2 * @since 1.0 (TC Cockpit Billing Cost Report Assembly) */ public enum PaymentType { @@ -80,7 +87,14 @@ public enum PaymentType { /** * Credit payment type. */ - CREDIT(12, "Credit"); + CREDIT(12, "Credit"), + + /** + * Testing payment type. + * + * @since 1.2 + */ + TESTING(13, "Testing"); /** * The id of the payment type. diff --git a/src/java/main/com/topcoder/direct/services/view/dto/dashboard/costreport/CostReportDTO.java b/src/java/main/com/topcoder/direct/services/view/dto/dashboard/costreport/CostReportDTO.java index 6603a32de..2d40192b6 100644 --- a/src/java/main/com/topcoder/direct/services/view/dto/dashboard/costreport/CostReportDTO.java +++ b/src/java/main/com/topcoder/direct/services/view/dto/dashboard/costreport/CostReportDTO.java @@ -226,6 +226,7 @@ private void insertSheetData(Sheet sheet) throws Exception { row.getCell(index++).setStringValue("Build"); row.getCell(index++).setStringValue("Bugs"); row.getCell(index++).setStringValue("Misc"); + row.getCell(index++).setStringValue("Testing"); } row.getCell(index++).setStringValue("Total"); @@ -324,8 +325,11 @@ private void insertSheetData(Sheet sheet) throws Exception { // set Misc cost row.getCell(index++).setNumberValue(breakdown.getMisc()); + + // set testing cost + row.getCell(index++).setNumberValue(breakdown.getTesting()); } else { - index += 9; + index += 10; } } // set the total cost diff --git a/src/java/main/com/topcoder/direct/services/view/interceptors/AuthenticationInterceptor.java b/src/java/main/com/topcoder/direct/services/view/interceptors/AuthenticationInterceptor.java index c45128ed8..7228b6a53 100644 --- a/src/java/main/com/topcoder/direct/services/view/interceptors/AuthenticationInterceptor.java +++ b/src/java/main/com/topcoder/direct/services/view/interceptors/AuthenticationInterceptor.java @@ -83,35 +83,35 @@ * <!DOCTYPE struts PUBLIC * "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" * "http://struts.apache.org/dtds/struts-2.0.dtd"> - * + * * <struts> * <constant name="struts.devMode" value="true" /> - * + * * <package name="tcs-default" extends="struts-default" abstract="true"> * <!-- Setup interceptors stack --> * <interceptors> * <interceptor name="authentication" class="authenticationInterceptor" /> * <interceptor name="logging" class="loggingInterceptor" /> - * + * * <interceptor-stack name="defaultTCSStack"> * <interceptor-ref name="authentication"/> * <interceptor-ref name="logging"/> * <interceptor-ref name="defaultStack"/> * </interceptor-stack> * </interceptors> - * + * * <!-- Make the default one used for all actions unless otherwise configured. --> * <default-interceptor-ref name="defaultTCSStack" /> - * + * * <!-- Configure global results for AuthenticationInterceptor --> * <global-results> * <result name="login">/login.jsp</result> * </global-results> - * + * * </package> - * + * * <package name="default" namespace="/" extends="tcs-default"> - * + * * <interceptors> * <!-- for the login stack, we exclude the authentication interceptor --> * <interceptor-stack name="loginTCSStack"> @@ -119,19 +119,19 @@ * <interceptor-ref name="defaultStack"/> * </interceptor-stack> * </interceptors> - * + * * <action name="login" class="loginAction"> * <interceptor-ref name="loginTCSStack" /> * <result name="input">/login.jsp</result> * <result type="redirect">employees</result> * </action> - * + * * <action name="employees" class="employeeAction"> * <result>/employees.jsp</result> * </action> - * + * * </package> - * + * * </struts> * * @@ -271,40 +271,37 @@ public String intercept(ActionInvocation invocation) throws Exception { // In this case we need to check SSO cookie and update auth related object in session every time. HttpServletResponse response = ServletActionContext.getResponse(); - BasicAuthentication auth = new BasicAuthentication( - new SessionPersistor(request.getSession()), new SimpleRequest(request), - new SimpleResponse(response), BasicAuthentication.MAIN_SITE, DBMS.JTS_OLTP_DATASOURCE_NAME); + BasicAuthentication auth = new BasicAuthentication( + new SessionPersistor(request.getSession()), new SimpleRequest(request), + new SimpleResponse(response), BasicAuthentication.MAIN_SITE, DBMS.JTS_OLTP_DATASOURCE_NAME); User user = auth.getActiveUser(); - - if (sessionData.isAnonymousUser()) { - if (user != null && !user.isAnonymous()) { - // get user roles for the user id - Set roles = DirectUtils.getUserRoles(user.getId()); - TCSubject tcSubject = new TCSubject(roles, user.getId()); - - sessionData.setCurrentUser(tcSubject); - sessionData.setCurrentUserHandle(user.getUserName()); - } else { - if ("GET".equalsIgnoreCase(request.getMethod())) { - StringBuffer redirectBackUrl = new StringBuffer(); - redirectBackUrl.append("https://"); - redirectBackUrl.append(request.getServerName()); - redirectBackUrl.append(request.getRequestURI()); - if (request.getQueryString() != null && request.getQueryString().trim().length() != 0) { - redirectBackUrl.append('?'); - redirectBackUrl.append(request.getQueryString()); - } - request.getSession().setAttribute(redirectBackUrlIdentityKey, redirectBackUrl.toString()); - } else { - // Get the referer URL if the request method is POST - final String referer = request.getHeader("Referer"); - if (referer != null && referer.trim().length() != 0) { - request.getSession().setAttribute(redirectBackUrlIdentityKey, referer); - } + if (user != null && !user.isAnonymous()) { + // get user roles for the user id + Set roles = DirectUtils.getUserRoles(user.getId()); + TCSubject tcSubject = new TCSubject(roles, user.getId()); + + sessionData.setCurrentUser(tcSubject); + sessionData.setCurrentUserHandle(user.getUserName()); + } else { + if ("GET".equalsIgnoreCase(request.getMethod())) { + StringBuffer redirectBackUrl = new StringBuffer(); + redirectBackUrl.append("https://"); + redirectBackUrl.append(request.getServerName()); + redirectBackUrl.append(request.getRequestURI()); + if (request.getQueryString() != null && request.getQueryString().trim().length() != 0) { + redirectBackUrl.append('?'); + redirectBackUrl.append(request.getQueryString()); + } + request.getSession().setAttribute(redirectBackUrlIdentityKey, redirectBackUrl.toString()); + } else { + // Get the referer URL if the request method is POST + final String referer = request.getHeader("Referer"); + if (referer != null && referer.trim().length() != 0) { + request.getSession().setAttribute(redirectBackUrlIdentityKey, referer); } - return loginPageName; } - } + return loginPageName; + } String servletPath = request.getContextPath() + request.getServletPath(); String query = request.getQueryString(); diff --git a/src/java/main/com/topcoder/direct/services/view/util/DataProvider.java b/src/java/main/com/topcoder/direct/services/view/util/DataProvider.java index 5c4a27a89..82d86d06d 100644 --- a/src/java/main/com/topcoder/direct/services/view/util/DataProvider.java +++ b/src/java/main/com/topcoder/direct/services/view/util/DataProvider.java @@ -1251,7 +1251,6 @@ public static List getDirectProjectCopilotStats(long dire for (int i = 0; i < recordNum; i++) { long copilotUserId = Long.valueOf(resultContainer.getStringItem(i, "copilot_user_id")); long statusId = resultContainer.getLongItem(i, "status_id"); - String status = resultContainer.getStringItem(i, "status"); ProjectCopilotStatDTO currentStat = helperMap.get(copilotUserId); @@ -1259,11 +1258,11 @@ public static List getDirectProjectCopilotStats(long dire continue; } - if (status.toLowerCase().equals("draft") || statusId == 2L) { + if (statusId == 2L) { // count the status id draft and status name draft currentStat.setDraftContestsNumber(currentStat.getDraftContestsNumber() + 1); continue; - } else if (status.toLowerCase().equals("completed")) { + } else if (statusId == 7L) { // count the finished contests currentStat.setFinishedContestsNumber(currentStat.getFinishedContestsNumber() + 1); continue; @@ -1272,7 +1271,7 @@ public static List getDirectProjectCopilotStats(long dire currentStat.setActiveContestsNumber(currentStat.getActiveContestsNumber() + 1); continue; } else if (statusId == 4L || statusId == 5L || statusId == 8L || statusId == 11L || statusId == 6L) { - // failed contests + // failed contests (9 and 10) does not count currentStat.setFailuresContestsNumber(currentStat.getFailuresContestsNumber() + 1); continue; } diff --git a/src/web/WEB-INF/asset/project/projectAssetUpload.jsp b/src/web/WEB-INF/asset/project/projectAssetUpload.jsp index 908f3fd38..67ee1a0c0 100644 --- a/src/web/WEB-INF/asset/project/projectAssetUpload.jsp +++ b/src/web/WEB-INF/asset/project/projectAssetUpload.jsp @@ -21,7 +21,7 @@ - [topcoder] Direct + Topcoder Direct diff --git a/src/web/WEB-INF/asset/project/projectAssetVersions.jsp b/src/web/WEB-INF/asset/project/projectAssetVersions.jsp index aa6d77aa8..140c1f0fb 100644 --- a/src/web/WEB-INF/asset/project/projectAssetVersions.jsp +++ b/src/web/WEB-INF/asset/project/projectAssetVersions.jsp @@ -17,7 +17,7 @@ - [topcoder] Direct + Topcoder Direct diff --git a/src/web/WEB-INF/copilot-contests-submissions.jsp b/src/web/WEB-INF/copilot-contests-submissions.jsp index 1da0c5788..23ac42d17 100644 --- a/src/web/WEB-INF/copilot-contests-submissions.jsp +++ b/src/web/WEB-INF/copilot-contests-submissions.jsp @@ -53,6 +53,8 @@ + + diff --git a/src/web/WEB-INF/enterpriseDashboard/overview.jsp b/src/web/WEB-INF/enterpriseDashboard/overview.jsp index 46e6e771f..5283eb69c 100644 --- a/src/web/WEB-INF/enterpriseDashboard/overview.jsp +++ b/src/web/WEB-INF/enterpriseDashboard/overview.jsp @@ -376,7 +376,7 @@ - + + + + diff --git a/src/web/WEB-INF/includes/htmlhead.jsp b/src/web/WEB-INF/includes/htmlhead.jsp index f763bc597..b075b3fab 100644 --- a/src/web/WEB-INF/includes/htmlhead.jsp +++ b/src/web/WEB-INF/includes/htmlhead.jsp @@ -23,7 +23,7 @@ - Version 1.4 (TC Direct Rebranding Assembly Project and Contest related pages) - Use new font "Source Sans Pro" for the page --%> -[topcoder] Direct +Topcoder Direct diff --git a/src/web/WEB-INF/includes/launchCopilot/launchCopilot.jsp b/src/web/WEB-INF/includes/launchCopilot/launchCopilot.jsp index 639f37e4d..299fbbf9c 100644 --- a/src/web/WEB-INF/includes/launchCopilot/launchCopilot.jsp +++ b/src/web/WEB-INF/includes/launchCopilot/launchCopilot.jsp @@ -297,7 +297,7 @@
      - Terms and Conditions + Terms and Conditions CONTINUE SUBMIT & LAUNCH CHALLENGE SAVE AS DRAFT diff --git a/src/web/WEB-INF/includes/modal/assetModals.jsp b/src/web/WEB-INF/includes/modal/assetModals.jsp index 6bad85b4d..dd0d941fd 100644 --- a/src/web/WEB-INF/includes/modal/assetModals.jsp +++ b/src/web/WEB-INF/includes/modal/assetModals.jsp @@ -81,7 +81,7 @@

      Are you sure to upload new version of this file?

      -

      New file will replace the current file in Cockpit.

      +

      New file will replace the current file in Direct.

      Note: You may access old versions of this file via version history.
      @@ -388,7 +388,7 @@
      - REMOVE FILES FROM COCKPIT? + REMOVE FILES FROM DIRECT? Close
      @@ -643,7 +643,7 @@
      DELETE
      -

      All files has been deleted from the Cockpit Asset

      +

      All files has been deleted from the Direct Asset

      Note: You may access deleted file from Activity tab.
      @@ -703,7 +703,7 @@

      All files have been zipped and ready for download.

      ZIP - 2012-10-08 Cockpit Files.zip (4.8 MB) + 2012-10-08 Direct Files.zip (4.8 MB)
      diff --git a/src/web/WEB-INF/includes/newHeader.jsp b/src/web/WEB-INF/includes/newHeader.jsp index 671049dde..540c90ec7 100644 --- a/src/web/WEB-INF/includes/newHeader.jsp +++ b/src/web/WEB-INF/includes/newHeader.jsp @@ -383,10 +383,10 @@ - + - +

      Terms and Conditions \ No newline at end of file +Terms and Conditions \ No newline at end of file diff --git a/src/web/WEB-INF/task/project/projectTasks.jsp b/src/web/WEB-INF/task/project/projectTasks.jsp index f52fb8b1f..ef099381c 100644 --- a/src/web/WEB-INF/task/project/projectTasks.jsp +++ b/src/web/WEB-INF/task/project/projectTasks.jsp @@ -399,7 +399,7 @@

      BETA ANNOUNCEMENT: - Welcome to the new Task Management area of Cockpit. You will see this new section under each of your projects. You are welcome to play around and begin using it, but please keep in + Welcome to the new Task Management area of Direct. You will see this new section under each of your projects. You are welcome to play around and begin using it, but please keep in mind that some features are not implemented yet. For a full description of what is currently implemented, check out Platform Announcements.

      diff --git a/src/web/css/direct/dashboard.css b/src/web/css/direct/dashboard.css index c4dedef96..f01a2cffc 100644 --- a/src/web/css/direct/dashboard.css +++ b/src/web/css/direct/dashboard.css @@ -14018,3 +14018,7 @@ div.totalCostContainer { .challengesFilter .filterContainer a.dp-choose-date { margin-right: 0; } + +.ajaxLoadingBackground { + background: url("/images/dots-white.gif") no-repeat scroll center center; +} diff --git a/src/web/error.jsp b/src/web/error.jsp index 4e0c1d75d..f188b595b 100644 --- a/src/web/error.jsp +++ b/src/web/error.jsp @@ -46,7 +46,7 @@ - +
      diff --git a/src/web/scripts/dashboard-cost-report.js b/src/web/scripts/dashboard-cost-report.js index c16452294..02578eef3 100644 --- a/src/web/scripts/dashboard-cost-report.js +++ b/src/web/scripts/dashboard-cost-report.js @@ -339,8 +339,8 @@ $(document).ready(function() { breakDownMap[result[i].id] = result[i]; } var totalCompleted = 0; - var totalCompletedCost = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - var totalCost = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + var totalCompletedCost = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + var totalCost = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; var reg1 = /[\$,]/g; @@ -353,13 +353,13 @@ $(document).ready(function() { if (!breakdown) { - breakdown = ["0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"]; + breakdown = ["0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"]; } else { if (breakdown.fullfillment > 0) { fullfillment = 1; } breakdown = [breakdown.prizes, breakdown.specReview, breakdown.review, breakdown.reliability, - breakdown.digitalRun, breakdown.copilot, breakdown.build, breakdown.bugs, breakdown.misc]; + breakdown.digitalRun, breakdown.copilot, breakdown.build, breakdown.bugs, breakdown.misc, breakdown.testing]; } totalCompleted += fullfillment; @@ -473,7 +473,7 @@ $(document).ready(function() { } cnt++; }); - for (var i = 0; i < 9; i++) { + for (var i = 0; i < 10; i++) { tr.append(""); } tr.append("" + $(this).children("td:last").addClass("lastCol"). text() + ""); @@ -490,9 +490,9 @@ $(document).ready(function() { if (projectIds.length > 0) { $("#breakdownBody table").append("" + "Average (only completed contests are counted)" + - "" + + "" + "Total" + - ""); + ""); loadBreakdownData(projectIds); } } else { diff --git a/src/web/scripts/editCockpitProject.js b/src/web/scripts/editCockpitProject.js index 5c06a1002..acfb9c709 100644 --- a/src/web/scripts/editCockpitProject.js +++ b/src/web/scripts/editCockpitProject.js @@ -1811,16 +1811,22 @@ $(document).ready(function (e) { var request = {"searchText":searchText}; + // show loading + modal.find('.addUserLeft .addUserList').addClass('ajaxLoadingBackground').find('ul').empty(); + $.ajax({ type:'GET', url:"getUser", data:request, cache:false, dataType:'json', - async:false, + async:true, success:function (jsonResult) { handleJsonResult2(jsonResult, function (result) { + // hide loading + modal.find('.addUserLeft .addUserList').removeClass('ajaxLoadingBackground'); + // insert into the left list modal.find('.addUserForm .addUserLeft ul').empty(); $.each(result, function () { @@ -1831,6 +1837,7 @@ $(document).ready(function (e) { }, function (errorMessage) { + modal.find('.addUserLeft .addUserList').removeClass('ajaxLoadingBackground'); showErrors(errorMessage); }) } diff --git a/src/web/scripts/enterpriseDashboard.js b/src/web/scripts/enterpriseDashboard.js index d090d3e02..454525c06 100644 --- a/src/web/scripts/enterpriseDashboard.js +++ b/src/web/scripts/enterpriseDashboard.js @@ -239,7 +239,7 @@ function getEnterpriseDashboardRequest(pageSize, pageNumber, requireDate, noSync var syncParameters = getFilterSynParameters(); //history.pushState(syncParameters, "", getActionNameFromURL() + "?" + decodeURI(syncParameters)); - window.History.pushState(syncParameters, "TopCoder Cockpit - Enterprise Dashboard", "?" + decodeURI(syncParameters)); + window.History.pushState(syncParameters, "Topcoder Direct - Enterprise Dashboard", "?" + decodeURI(syncParameters)); // sync in left sidebar $("#silderBar a.filterSynEnabled, a.viewAllSync").each(function () { diff --git a/src/web/scripts/instantSearch.js b/src/web/scripts/instantSearch.js index 1ce1e130b..6651d7a49 100644 --- a/src/web/scripts/instantSearch.js +++ b/src/web/scripts/instantSearch.js @@ -296,14 +296,14 @@ var instantSearchFeaturesList = { { "title": "Enterprise Dashboard - Overview", "link": "/direct/direct/enterpriseDashboard/overview", - "brief": "Provides overview of your cockpit projects at enterprise level", + "brief": "Provides overview of your direct projects at enterprise level", "group": "Dashboard", "reqAdmin": "no" }, { "title": "Enterprise Dashboard - Financials", "link": "/direct/enterpriseDashboard/financial", - "brief": "Provides financial information like actual cost, budget usage, and projected cost of your cockpit projects.", + "brief": "Provides financial information like actual cost, budget usage, and projected cost of your direct projects.", "group": "Dashboard", "reqAdmin": "no" }, @@ -317,14 +317,14 @@ var instantSearchFeaturesList = { { "title": "Enterprise Dashboard - Roadmap", "link": "/direct/enterpriseDashboard/roadmap", - "brief": "SearShows you the overdue, upcoming and completed milestones (roadmap) of your cockpit projects.ch", + "brief": "SearShows you the overdue, upcoming and completed milestones (roadmap) of your direct projects.ch", "group": "Dashboard", "reqAdmin": "no" }, { "title": "Enterprise Dashboard - Pipeline", "link": "/direct/enterpriseDashboard/pipeline", - "brief": "Shows the numbers and chart of the contests pipeline of your cockpit projects.", + "brief": "Shows the numbers and chart of the contests pipeline of your direct projects.", "group": "Dashboard", "reqAdmin": "no" }, @@ -338,7 +338,7 @@ var instantSearchFeaturesList = { { "title": "Enterprise Dashboard - Analytics", "link": "/direct/enterpriseDashboard/analysis", - "brief": "Provides analysis of average challenge duration, average challenge cost, project fulfillment and challenge volume of your cockpit projects, the data are showing in line charts.", + "brief": "Provides analysis of average challenge duration, average challenge cost, project fulfillment and challenge volume of your direct projects, the data are showing in line charts.", "group": "Dashboard", "reqAdmin": "no" }, @@ -387,14 +387,14 @@ var instantSearchFeaturesList = { { "title": "Pipeline Report", "link": "/direct/dashboardReports.action", - "brief": "Detailed report of the contests pipeline of your cockpit projects", + "brief": "Detailed report of the contests pipeline of your direct projects", "group": "Report", "reqAdmin": "no" }, { "title": "Cost Analysis Report", "link": "/direct/dashboardCostReport", - "brief": "Detailed report of the contests cost of your cockpit projects", + "brief": "Detailed report of the contests cost of your direct projects", "group": "Report", "reqAdmin": "no" }, @@ -408,42 +408,42 @@ var instantSearchFeaturesList = { { "title": "Participation Metrics Report", "link": "/direct/dashboardParticipationReport", - "brief": "Report of number metrics on how many TopCoder members work on your cockpit projects as competitors and copilots. ", + "brief": "Report of number metrics on how many TopCoder members work on your direct projects as competitors and copilots. ", "group": "Report", "reqAdmin": "no" }, { "title": "Project Metrics Report", "link": "/direct/dashboardGetProjectMetricsReport", - "brief": "Detailed Report on different metrics of your cockpit projects - the numer of draft, scheduled, active and completed contests, cost data, fulfillment, project timeline and project status etc. ", + "brief": "Detailed Report on different metrics of your direct projects - the numer of draft, scheduled, active and completed contests, cost data, fulfillment, project timeline and project status etc. ", "group": "Report", "reqAdmin": "no" }, { "title": "Jira Issues Report", "link": "/direct/dashboardGetJiraIssuesReport ", - "brief": "Detailed Report on Jira Issues and Bug Races of your Cockpit Projects", + "brief": "Detailed Report on Jira Issues and Bug Races of your Direct Projects", "group": "Report", "reqAdmin": "no" }, { "title": "All Projects Management", "link": "/direct/allProjects.action", - "brief": "Allow you to manage all your cockpit pages in one page", + "brief": "Allow you to manage all your direct pages in one page", "group": "Project", "reqAdmin": "no" }, { "title": "Notification Settings", "link": "/direct/settings/notifications", - "brief": "Manage your forum / timeline notifications on your cockpit projects and contests", + "brief": "Manage your forum / timeline notifications on your direct projects and contests", "group": "Settings", "reqAdmin": "no" }, { "title": "Permission Settings", "link": "/direct/settings/permissions", - "brief": "Manage the permissions of your cockpit projects - you can assign permission to new users to your project or change / delete existing permissions", + "brief": "Manage the permissions of your direct projects - you can assign permission to new users to your project or change / delete existing permissions", "group": "Settings", "reqAdmin": "no" }, @@ -492,7 +492,7 @@ var instantSearchFeaturesList = { { "title": "Launch Copilot Posting", "link": "/direct/copilot/launchCopilotContest", - "brief": "Launch a new copilot posting for your cockpit project to recruite a copilot", + "brief": "Launch a new copilot posting for your direct project to recruite a copilot", "group": "Copilot", "reqAdmin": "no" }, diff --git a/src/web/scripts/loadHelps.js b/src/web/scripts/loadHelps.js index 5d522d44b..0f2ee4775 100644 --- a/src/web/scripts/loadHelps.js +++ b/src/web/scripts/loadHelps.js @@ -38,10 +38,10 @@ var VIDEO = { links: [ { text: "My Game Plan", link: "https://www.topcoder.com/help/?p=118"}, { text: "How to get a copilot", link: "https://www.topcoder.com/help/2012/03/13/how-to-get-a-copilot/?subject=startproject"}, { text: "Launching a Conceptualization Challenge", link: "https://www.topcoder.com/help/?p=583"}, - { text: "Cockpit - Login", link: "https://www.topcoder.com/help/2012/03/27/cockpit-login/?subject=startproject"}, - { text: "Cockpit - Project Dashboard 1", link: "https://www.topcoder.com/help/2012/03/27/cockpit-project-dashboard-1/?subject=startproject"}, - { text: "Cockpit: Setting Permissions", link: "httpss://www.topcoder.com/help/?p=729"}, - { text: "Cockpit - Challenge Dashboard 1", link: "https://www.topcoder.com/help/2012/03/27/cockpit-contest-dashboard-1/?subject=startproject"} + { text: "Direct - Login", link: "https://www.topcoder.com/help/2012/03/27/cockpit-login/?subject=startproject"}, + { text: "Direct - Project Dashboard 1", link: "https://www.topcoder.com/help/2012/03/27/cockpit-project-dashboard-1/?subject=startproject"}, + { text: "Direct: Setting Permissions", link: "httpss://www.topcoder.com/help/?p=729"}, + { text: "Direct - Challenge Dashboard 1", link: "https://www.topcoder.com/help/2012/03/27/cockpit-contest-dashboard-1/?subject=startproject"} ], viewAllLink: "http://www.topcoder.com/help/template-video/?subject=startproject&catIdx=18" }; @@ -51,10 +51,10 @@ var TUTORIAL = { links: [ { text: "My Game Plan", link: "https://www.topcoder.com/help/?p=118"}, { text: "How to get a copilot", link: "https://www.topcoder.com/help/2012/03/13/how-to-get-a-copilot/?subject=startproject"}, { text: "Launching a Conceptualization Challenge", link: "https://www.topcoder.com/help/?p=583"}, - { text: "Cockpit - Login", link: "http://www.topcoder.com/help/2012/03/27/cockpit-login/?subject=startproject"}, - { text: "Cockpit - Project Dashboard 1", link: "https://www.topcoder.com/help/2012/03/27/cockpit-project-dashboard-1/?subject=startproject"}, - { text: "Cockpit: Setting Permissions", link: "https://www.topcoder.com/help/?p=729"}, - { text: "Cockpit - Challenge Dashboard 1", link: "https://www.topcoder.com/help/2012/03/27/cockpit-contest-dashboard-1/?subject=startproject"} + { text: "Direct - Login", link: "http://www.topcoder.com/help/2012/03/27/cockpit-login/?subject=startproject"}, + { text: "Direct - Project Dashboard 1", link: "https://www.topcoder.com/help/2012/03/27/cockpit-project-dashboard-1/?subject=startproject"}, + { text: "Direct: Setting Permissions", link: "https://www.topcoder.com/help/?p=729"}, + { text: "Direct - Challenge Dashboard 1", link: "https://www.topcoder.com/help/2012/03/27/cockpit-contest-dashboard-1/?subject=startproject"} ], viewAllLink: "https://www.topcoder.com/help/?page_id=86" }; @@ -64,10 +64,10 @@ var EXAMPLE = { links: [ { text: "Sample Project", link: "https://www.topcoder.com/how-it-works/"}, { text: "How to get a copilot", link: "https://www.topcoder.com/help/2012/03/13/how-to-get-a-copilot/?subject=startproject"}, { text: "Launching a Conceptualization Challenge", link: "https://www.topcoder.com/help/?p=583"}, - { text: "Cockpit - Login", link: "https://www.topcoder.com/help/2012/03/27/cockpit-login/?subject=startproject"}, - { text: "Cockpit - Project Dashboard 1", link: "https://www.topcoder.com/help/2012/03/27/cockpit-project-dashboard-1/?subject=startproject"}, - { text: "Cockpit: Setting Permissions", link: "https://www.topcoder.com/help/?p=729"}, - { text: "Cockpit - Challenge Dashboard 1", link: "https://www.topcoder.com/help/2012/03/27/cockpit-contest-dashboard-1/?subject=startproject"} + { text: "Direct - Login", link: "https://www.topcoder.com/help/2012/03/27/cockpit-login/?subject=startproject"}, + { text: "Direct - Project Dashboard 1", link: "https://www.topcoder.com/help/2012/03/27/cockpit-project-dashboard-1/?subject=startproject"}, + { text: "Direct: Setting Permissions", link: "https://www.topcoder.com/help/?p=729"}, + { text: "Direct - Challenge Dashboard 1", link: "https://www.topcoder.com/help/2012/03/27/cockpit-contest-dashboard-1/?subject=startproject"} ], viewAllLink: "https://www.topcoder.com/help/?page_id=95" }; diff --git a/src/web/scripts/newCockpitProject.js b/src/web/scripts/newCockpitProject.js index 508b645a4..647fbd228 100644 --- a/src/web/scripts/newCockpitProject.js +++ b/src/web/scripts/newCockpitProject.js @@ -1467,18 +1467,25 @@ $(document).ready(function() { var request = {"searchText":searchText}; + // show loading + $('#addUserModal').find('.addUserLeft .addUserList').addClass('ajaxLoadingBackground'); + $('#addUserModal .addUserForm .addUserLeft ul').empty(); + $.ajax({ type: 'POST', url: "getUser", data: request, cache: false, dataType: 'json', - async : false, + async : true, success: function (jsonResult) { handleJsonResult2(jsonResult, function(result) { + + // remove loading ajax + $('#addUserModal').find('.addUserLeft .addUserList').removeClass('ajaxLoadingBackground'); + // insert into the left list - $('#addUserModal .addUserForm .addUserLeft ul').empty(); $.each(result, function() { $('#addUserModal .addUserForm .addUserLeft .addUserList').css('overflow-y', 'scroll'); $('#addUserModal .addUserForm .addUserLeft ul').append('
    • ' + this.handle + '
    • '); @@ -1487,6 +1494,8 @@ $(document).ready(function() { }, function(errorMessage) { + // remove loading ajax + $('#addUserModal').find('.addUserLeft .addUserList').removeClass('ajaxLoadingBackground'); showErrors(errorMessage); }) } diff --git a/src/web/scripts/permissionDialog.js b/src/web/scripts/permissionDialog.js index 5ba7b29e7..606b0cf6b 100644 --- a/src/web/scripts/permissionDialog.js +++ b/src/web/scripts/permissionDialog.js @@ -32,6 +32,7 @@ $(function() { * the result */ var hanldeUserResult = function hanldeUserResult(jsonResult) { + $("#userManageModal .left .list").removeClass('ajaxLoadingBackground'); var dialogId; var dialogAlias; @@ -280,6 +281,8 @@ $(function() { $("#" + item + " .left .list").empty(); var userName = $("#" + item + " .searchText").val(); + + $("#userManageModal .left .list").addClass('ajaxLoadingBackground'); processor.addSendingData("searchText=" + userName); }); }); diff --git a/src/web/scripts/platformSpecialistsReport.js b/src/web/scripts/platformSpecialistsReport.js index ae26e8886..94affe827 100644 --- a/src/web/scripts/platformSpecialistsReport.js +++ b/src/web/scripts/platformSpecialistsReport.js @@ -324,7 +324,7 @@ function renderPlatformSpecialistsReport() { $.each(rows, function(index, value){ var emptyRow = []; if($(value).is("option")) { - emptyRow.push(value.text()) + emptyRow.push($(value).text()) } else { emptyRow.push($(value).parent().text()); }