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:
|
events:
|
||||||
'click .js-resetToken': 'resetToken'
|
'click .js-resetToken': 'resetToken'
|
||||||
'click .js-select': 'selectAll'
|
'click .js-select': 'selectAll'
|
||||||
'click .js-restartDeadJobs': 'restartDeadJobs'
|
'click .js-restartFailedJobs': 'restartFailedJobs'
|
||||||
|
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
|
@ -46,12 +46,12 @@ class Index extends App.ControllerSubContent
|
||||||
@load()
|
@load()
|
||||||
)
|
)
|
||||||
|
|
||||||
restartDeadJobs: (e) =>
|
restartFailedJobs: (e) =>
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@ajax(
|
@ajax(
|
||||||
id: 'restart_dead_jobs_request'
|
id: 'restart_failed_jobs_request'
|
||||||
type: 'POST'
|
type: 'POST'
|
||||||
url: "#{@apiPath}/monitoring/restart_dead_jobs"
|
url: "#{@apiPath}/monitoring/restart_failed_jobs"
|
||||||
success: (data) =>
|
success: (data) =>
|
||||||
@job_restart_count = data.job_restart_count
|
@job_restart_count = data.job_restart_count
|
||||||
@render()
|
@render()
|
||||||
|
|
|
@ -35,10 +35,10 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<% if !_.isEmpty(@data.issues): %>
|
<% 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): %>
|
<% if !_.isUndefined(@job_restart_count): %>
|
||||||
<p>
|
<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 %>
|
<%- ', restarting...' if @job_restart_count > 0 %>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -177,7 +177,7 @@ curl http://localhost/api/v1/monitoring/status?token=XXX
|
||||||
render json: result, status: :created
|
render json: result, status: :created
|
||||||
end
|
end
|
||||||
|
|
||||||
def restart_dead_jobs
|
def restart_failed_jobs
|
||||||
access_check
|
access_check
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
Zammad::Application.routes.draw do
|
Zammad::Application.routes.draw do
|
||||||
api_path = Rails.configuration.api_path
|
api_path = Rails.configuration.api_path
|
||||||
|
|
||||||
match api_path + '/monitoring/health_check', to: 'monitoring#health_check', via: :get
|
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/status', to: 'monitoring#status', via: :get
|
||||||
match api_path + '/monitoring/token', to: 'monitoring#token', via: :post
|
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/restart_failed_jobs', to: 'monitoring#restart_failed_jobs', via: :post
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue