Skip to content

Commit

Permalink
fix(web): fix HTTP method
Browse files Browse the repository at this point in the history
  • Loading branch information
Water-Melon committed Nov 14, 2023
1 parent 4d123ca commit b0de4e2
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,18 @@ <h2 style="padding:8px 20px">Start a new task</h2>
placement: "top",
})
btn.on('click', function() {
$.post('http://{{IP}}:{{PORT}}/proc?name=' + name, function(response) {
var b = $('#rerun-'+name)
b.popover('show');
setTimeout(function() {
b.popover('hide');
window.location.href = 'http://{{IP}}:{{PORT}}/';
}, 2000);
})
$.ajax({
url: "http://{{IP}}:{{PORT}}/proc?name=" + name,
type: "PUT",
success: function(response) {
var b = $('#rerun-'+name)
b.popover('show');
setTimeout(function() {
b.popover('hide');
window.location.href = 'http://{{IP}}:{{PORT}}/';
}, 2000);
}
});
})
}

Expand Down Expand Up @@ -355,7 +359,7 @@ <h2 style="padding:8px 20px">Start a new task</h2>
if (type == 'cron' && $('#tcron').val()) data.cron = $('#tcron').val()
$.ajax({
url: "http://{{IP}}:{{PORT}}/proc",
type: "PUT",
type: "POST",
contentType: "application/json",
data: JSON.stringify(data),
success: function(response) {
Expand Down

0 comments on commit b0de4e2

Please sign in to comment.