diff --git a/app/controllers/requests_controller.rb b/app/controllers/requests_controller.rb index d679c759..2c1955cb 100644 --- a/app/controllers/requests_controller.rb +++ b/app/controllers/requests_controller.rb @@ -146,7 +146,7 @@ def notify_request_update if @request.accepted? ([@request.user] + User.admin).uniq.each do |each| - each.notify('Request has been accepted', @request.description_text, @request.description_url(host_url)) + each.notify('VM request has been accepted', @request.description_text, @request.description_url(host_url)) end @request.users.uniq.each do |each| rights = @request.sudo_users.include?(each) ? 'sudo access' : 'access' @@ -155,7 +155,7 @@ def notify_request_update elsif @request.rejected? message = @request.description_text message += @request.rejection_information.empty? ? '' : "\nwith comment: #{@request.rejection_information}" - notify_users('Request has been rejected', message, @request.description_url(host_url)) + notify_users('VM request has been rejected', message, @request.description_url(host_url)) end end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index aa3ef400..c4867633 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -30,7 +30,7 @@ def update_role @user.update(role: params[:role]) time = Time.zone.now.strftime('%d/%m/%Y') @user.notify('Changed role', - "Your role has changed from #{former_role} to #{@user.role} on #{time}.", + "Your role has changed from #{former_role} to #{@user.role}.", url_for(controller: :users, action: 'show', id: @user.id)) redirect_to users_path end diff --git a/app/controllers/vms_controller.rb b/app/controllers/vms_controller.rb index f0b57fb5..0bb3101f 100644 --- a/app/controllers/vms_controller.rb +++ b/app/controllers/vms_controller.rb @@ -68,8 +68,8 @@ def request_vm_archivation return if !@vm || @vm.archived? || @vm.pending_archivation? @vm.users.each do |each| - each.notify("Your VM #{@vm.name} has been requested to be archived", - "The VM will soon be archived and for that it will then be shut down.\nIf you still need this VM you can stop the archiving of this VM within #{ArchivationRequest.timeout_readable}.", + each.notify("VM #{@vm.name} archiving requested", + "The VM will soon be archived and it will be shut down.\nIf you still need this VM you can stop the archiving of this VM within #{ArchivationRequest.timeout_readable}.", url_for(controller: :vms, action: 'show', id: @vm.name)) end @vm.set_pending_archivation @@ -84,7 +84,7 @@ def request_vm_revive return if !@vm || @vm.pending_reviving? User.admin.each do |each| - each.notify("VM #{@vm.name} has been requested to be revived", + each.notify("VM #{@vm.name} revival requested", 'The VM has to be revived.', url_for(controller: :vms, action: 'show', id: @vm.name)) end