continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1373221 - in /continuum/trunk/continuum-webapp/src/main: java/org/apache/continuum/web/action/admin/BuildAgentAction.java resources/localization/Continuum.properties
Date Wed, 15 Aug 2012 06:02:31 GMT
Author: brett
Date: Wed Aug 15 06:02:31 2012
New Revision: 1373221

URL: http://svn.apache.org/viewvc?rev=1373221&view=rev
Log:
improve error message when a build agent group can't be deleted

Modified:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java?rev=1373221&r1=1373220&r2=1373221&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
Wed Aug 15 06:02:31 2012
@@ -169,8 +169,8 @@ public class BuildAgentAction
         ConfigurationService configuration = getContinuum().getConfiguration();
 
         // escape xml to prevent xss attacks
-        buildAgent.setDescription( StringEscapeUtils.escapeXml( StringEscapeUtils.unescapeXml(
-            buildAgent.getDescription() ) ) );
+        buildAgent.setDescription(
+            StringEscapeUtils.escapeXml( StringEscapeUtils.unescapeXml( buildAgent.getDescription()
) ) );
 
         if ( configuration.getBuildAgents() != null )
         {
@@ -261,8 +261,8 @@ public class BuildAgentAction
                     configuration.removeBuildAgent( agent );
                     configuration.store();
 
-                    AuditLog event = new AuditLog( "Build Agent URL=" + agent.getUrl(),
-                                                   AuditLogConstants.REMOVE_BUILD_AGENT );
+                    AuditLog event =
+                        new AuditLog( "Build Agent URL=" + agent.getUrl(), AuditLogConstants.REMOVE_BUILD_AGENT
);
                     event.setCategory( AuditLogConstants.BUILD_AGENT );
                     event.setCurrentUser( getPrincipal() );
                     event.log();
@@ -293,7 +293,7 @@ public class BuildAgentAction
         {
             if ( buildAgentGroup.getName().equals( profile.getBuildAgentGroup() ) )
             {
-                message = getText( "buildAgentGroup.error.remove.in.use" );
+                message = getText( "buildAgentGroup.error.remove.in.use", new String[]{ profile.getName()
} );
                 return ERROR;
             }
         }
@@ -306,8 +306,8 @@ public class BuildAgentAction
             {
                 configuration.removeBuildAgentGroup( group );
 
-                AuditLog event = new AuditLog( "Build Agent Group=" + group.getName(),
-                                               AuditLogConstants.REMOVE_BUILD_AGENT_GROUP
);
+                AuditLog event =
+                    new AuditLog( "Build Agent Group=" + group.getName(), AuditLogConstants.REMOVE_BUILD_AGENT_GROUP
);
                 event.setCategory( AuditLogConstants.BUILD_AGENT );
                 event.setCurrentUser( getPrincipal() );
                 event.log();

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=1373221&r1=1373220&r2=1373221&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Wed Aug 15 06:02:31 2012
@@ -1229,7 +1229,7 @@ buildAgentGroup.error.name.cannot.be.spa
 buildAgentGroup.available.buildAgents = --- Available Build Agents ---
 buildAgentGroup.available.buildAgents.used = --- Used Build Agents ---
 buildAgentGroup.buildAgents.define = Configure the used Build Agents
-buildAgentGroup.error.remove.in.use = Build agent group can't be removed, it is probably
used by a build environment.
+buildAgentGroup.error.remove.in.use = Build agent group can't be removed, it is used by the
build environment '{0}'.
 
 # ----------------------------------------------------------------------
 # Page: View Distributed Releases



Mime
View raw message