aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/webapp/WEB-INF/app/models
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2012-07-05 10:27:58 +0200
committerFabrice Bellingard <bellingard@gmail.com>2012-07-05 10:30:34 +0200
commit1bab9db0c398f5fc7571409e4ae4967c45c5c855 (patch)
treed16ccf694e456ab5b2f7206227d1a655a96a6dd4 /sonar-server/src/main/webapp/WEB-INF/app/models
parente8f9f465365d336d69276cd392262b64a1516501 (diff)
downloadsonarqube-1bab9db0c398f5fc7571409e4ae4967c45c5c855.tar.gz
sonarqube-1bab9db0c398f5fc7571409e4ae4967c45c5c855.zip
SONAR-3570 Project "deletion" should run asynchronously
=> To prevent HTTP timeout.
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF/app/models')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/resource_deletion_manager.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/resource_deletion_manager.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/resource_deletion_manager.rb
index f828cc3e085..dbdcd73a348 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/resource_deletion_manager.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/resource_deletion_manager.rb
@@ -75,7 +75,7 @@ class ResourceDeletionManager
unless currently_deleting_resources?
reinit()
@status = WORKING
- @message = "Deleting resources..."
+ @message = Api::Utils.message('bulk_deletion.deletion_manager.deleting_resources')
can_start_deletion = true
end
end
@@ -83,13 +83,13 @@ class ResourceDeletionManager
if can_start_deletion
if resource_ids.empty?
@status = AVAILABLE
- @message = "No resource to delete."
+ @message = Api::Utils.message('bulk_deletion.deletion_manager.no_resource_to_delete')
else
java_facade = Java::OrgSonarServerUi::JRubyFacade.getInstance()
# launch the deletion
resource_ids.each_with_index do |resource_id, index|
resource = Project.find(:first, :conditions => {:id => resource_id.to_i})
- @message = "Currently deleting resources... (" + (index+1).to_s + " out of " + resource_ids.size.to_s + ")"
+ @message = Api::Utils.message('bulk_deletion.deletion_manager.currently_deleting_x_out_of_x', :params => [(index+1).to_s, resource_ids.size.to_s])
if resource &&
# next line add 'VW' and 'DEV' tests because those resource types don't have the 'deletable' property yet...
(java_facade.getResourceTypeBooleanProperty(resource.qualifier, 'deletable') || resource.qualifier=='VW' || resource.qualifier=='DEV')
@@ -102,7 +102,8 @@ class ResourceDeletionManager
end
end
@status = AVAILABLE
- @message = "Resource deletion completed."
+ @message = Api::Utils.message('bulk_deletion.deletion_manager.deletion_completed')
+ @message += ' ' + Api::Utils.message('bulk_deletion.deletion_manager.however_failures_occurred') unless @failed_deletions.empty?
end
end
end