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 2af3055
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 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
2 changes: 1 addition & 1 deletion meproc.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
return;
} fi

Log('info', "Meproc v1.0.1. Listen on: " + Conf['ip'] + ':' + Conf['port']);
Log('info', "Meproc v1.0.2. Listen on: " + Conf['ip'] + ':' + Conf['port']);

Eval('@/http.m');
Eval('@/bootstrap.m', nil, false, 'bootstrap');
Expand Down

0 comments on commit 2af3055

Please sign in to comment.