Changed wording from dead to failed in pull request 1118.
This commit is contained in:
parent
6ab397ef44
commit
7b86174d26
4 changed files with 11 additions and 11 deletions
|
@ -4,7 +4,7 @@ class Index extends App.ControllerSubContent
|
|||
events:
|
||||
'click .js-resetToken': 'resetToken'
|
||||
'click .js-select': 'selectAll'
|
||||
'click .js-restartDeadJobs': 'restartDeadJobs'
|
||||
'click .js-restartFailedJobs': 'restartFailedJobs'
|
||||
|
||||
constructor: ->
|
||||
super
|
||||
|
@ -46,12 +46,12 @@ class Index extends App.ControllerSubContent
|
|||
@load()
|
||||
)
|
||||
|
||||
restartDeadJobs: (e) =>
|
||||
restartFailedJobs: (e) =>
|
||||
e.preventDefault()
|
||||
@ajax(
|
||||
id: 'restart_dead_jobs_request'
|
||||
id: 'restart_failed_jobs_request'
|
||||
type: 'POST'
|
||||
url: "#{@apiPath}/monitoring/restart_dead_jobs"
|
||||
url: "#{@apiPath}/monitoring/restart_failed_jobs"
|
||||
success: (data) =>
|
||||
@job_restart_count = data.job_restart_count
|
||||
@render()
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<% if !_.isEmpty(@data.issues): %>
|
||||
<button class="btn btn--primary js-restartDeadJobs"><%- @T('Restart Dead Jobs') %></button>
|
||||
<button class="btn btn--primary js-restartFailedJobs"><%- @T('Restart Failed Jobs') %></button>
|
||||
<% if !_.isUndefined(@job_restart_count): %>
|
||||
<p>
|
||||
<%- @T('Detected %s dead job(s) available for restart', @job_restart_count) %>
|
||||
<%- @T('Detected %s failed job(s) available for restart', @job_restart_count) %>
|
||||
<%- ', restarting...' if @job_restart_count > 0 %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
|
@ -177,7 +177,7 @@ curl http://localhost/api/v1/monitoring/status?token=XXX
|
|||
render json: result, status: :created
|
||||
end
|
||||
|
||||
def restart_dead_jobs
|
||||
def restart_failed_jobs
|
||||
access_check
|
||||
|
||||
count = 0
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
Zammad::Application.routes.draw do
|
||||
api_path = Rails.configuration.api_path
|
||||
|
||||
match api_path + '/monitoring/health_check', to: 'monitoring#health_check', via: :get
|
||||
match api_path + '/monitoring/status', to: 'monitoring#status', via: :get
|
||||
match api_path + '/monitoring/token', to: 'monitoring#token', via: :post
|
||||
match api_path + '/monitoring/restart_dead_jobs', to: 'monitoring#restart_dead_jobs', via: :post
|
||||
match api_path + '/monitoring/health_check', to: 'monitoring#health_check', via: :get
|
||||
match api_path + '/monitoring/status', to: 'monitoring#status', via: :get
|
||||
match api_path + '/monitoring/token', to: 'monitoring#token', via: :post
|
||||
match api_path + '/monitoring/restart_failed_jobs', to: 'monitoring#restart_failed_jobs', via: :post
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue