1
0
mirror of https://github.com/newnius/YAO-portal.git synced 2025-12-13 09:06:43 +00:00

add stop support

This commit is contained in:
2019-04-18 17:24:36 +08:00
parent d23fa19649
commit dbfe0c5bb7
6 changed files with 43 additions and 48 deletions

View File

@@ -26,6 +26,13 @@ function register_events_job() {
});
/* TODO validate form */
if (name.length === 0) {
return true;
}
if (workspace.length === 0) {
return true;
}
$('#modal-job').modal('hide');
@@ -227,14 +234,14 @@ window.jobOperateEvents = {
var ajax = $.ajax({
url: window.config.BASE_URL + "/service?action=job_stop",
type: 'POST',
data: {id: row.id}
data: {id: row.name}
});
ajax.done(function (res) {
if (res["errno"] !== 0) {
$("#modal-msg-content").html(res["msg"]);
$("#modal-msg").modal('show');
}
$('#table-link').bootstrapTable("refresh");
$('#table-job').bootstrapTable("refresh");
});
ajax.fail(function (jqXHR, textStatus) {
$("#modal-msg-content").html("Request failed : " + jqXHR.statusText);