|
|
@@ -324,7 +324,7 @@ |
|
|
|
<form id="stopForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/stop" method="post" style="margin-left:-1px;"> |
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
{{if $.Permission.CanWrite $.UnitTypeCloudBrain}} |
|
|
|
<a id="stop-model-debug-{{.JobID}}" style="margin-right: 2rem;" class="ui basic {{if or (eq .Status "STOPPED") (eq .Status "FAILED") (eq .Status "START_FAILED")}}disabled {{else}}blue {{end}}button" onclick="document.getElementById('stopForm-{{.JobID}}').submit();"> |
|
|
|
<a id="stop-model-debug-{{.JobID}}" style="margin-right: 2rem;" class="ui basic {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "STOPPING" "CREATING" "WAITING"}}disabled {{else}}blue {{end}}button" onclick="document.getElementById('stopForm-{{.JobID}}').submit();"> |
|
|
|
{{$.i18n.Tr "repo.stop"}} |
|
|
|
</a> |
|
|
|
{{else}} |
|
|
@@ -352,7 +352,7 @@ |
|
|
|
<form class="ui compact buttons" id="delForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/del" method="post"> |
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
{{if $.Permission.CanWrite $.UnitTypeCloudBrain}} |
|
|
|
<a id="model-delete-{{.JobID}}" class="ui compact {{if eq .Status "RUNNING"}}disabled {{else}}red {{end}}button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> |
|
|
|
<a id="model-delete-{{.JobID}}" class="ui compact {{if eq .Status "RUNNING" "CREATING" "WAITING" "STARTING" "STOPPING" }}disabled {{else}}red {{end}}button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> |
|
|
|
{{$.i18n.Tr "repo.delete"}} |
|
|
|
</a> |
|
|
|
{{else}} |
|
|
@@ -477,10 +477,10 @@ |
|
|
|
|
|
|
|
} |
|
|
|
if(status!=="STOPPED" || status!=="FAILED"){ |
|
|
|
$('#stop-model-debug-'+jobID).removeClass('disabled') |
|
|
|
$('#stop-model-debug-'+jobID).addClass('blue') |
|
|
|
$('#model-delete-'+jobID).removeClass('red') |
|
|
|
$('#model-delete-'+jobID).addClass('disabled') |
|
|
|
// $('#stop-model-debug-'+jobID).removeClass('disabled') |
|
|
|
// $('#stop-model-debug-'+jobID).addClass('blue') |
|
|
|
// $('#model-delete-'+jobID).removeClass('red') |
|
|
|
// $('#model-delete-'+jobID).addClass('disabled') |
|
|
|
} |
|
|
|
if(status=="STOPPED" || status=="FAILED" ){ |
|
|
|
$('#stop-model-debug-'+jobID).removeClass('blue') |
|
|
@@ -491,6 +491,8 @@ |
|
|
|
if(status=="START_FAILED"){ |
|
|
|
$('#stop-model-debug-'+jobID).removeClass('blue') |
|
|
|
$('#stop-model-debug-'+jobID).addClass('disabled') |
|
|
|
$('#model-delete-'+jobID).removeClass('disabled') |
|
|
|
$('#model-delete-'+jobID).addClass('red') |
|
|
|
} |
|
|
|
}).fail(function(err) { |
|
|
|
console.log(err); |
|
|
|