|
|
@@ -197,7 +197,22 @@ export default async function initCloudrainSow() { |
|
|
|
$(".log-info .log_bottom").trigger("click"); |
|
|
|
e.stopPropagation(); |
|
|
|
}); |
|
|
|
|
|
|
|
$(".stop-show-version").click(function (e) { |
|
|
|
const ID = this.dataset.jobid; |
|
|
|
const repoPath = this.dataset.repopath; |
|
|
|
const version_name = this.dataset.version; |
|
|
|
const url = `/api/v1/repos/${repoPath}/${ID}/stop_version`; |
|
|
|
$.post(url, { version_name: version_name }, (data) => { |
|
|
|
if (data.StatusOK === 0) { |
|
|
|
$(`#${version_name}-stop`).removeClass("blue"); |
|
|
|
$(`#${version_name}-stop`).addClass("disabled"); |
|
|
|
refreshStatusShow(version_name, ID, repoPath); |
|
|
|
} |
|
|
|
}).fail(function (err) { |
|
|
|
console.log(err); |
|
|
|
}); |
|
|
|
e.stopPropagation(); |
|
|
|
}); |
|
|
|
function refreshStatusShow(version_name, ID, repoPath) { |
|
|
|
$.get( |
|
|
|
`/api/v1/repos/${repoPath}/${ID}?version_name=${version_name}`, |
|
|
|