Skip to content

Commit

Permalink
fix(web): fix the bug with the remove and rerun buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Water-Melon committed Nov 16, 2023
1 parent aecf6fb commit ed7987d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,12 @@ <h2 style="padding:8px 20px">Start a new task</h2>
placement: "top",
})
btn.on('click', function() {
var _name = $(this).attr('id').split('-')[1]
$.ajax({
url: 'http://{{IP}}:{{PORT}}/proc?name=' + name,
url: 'http://{{IP}}:{{PORT}}/proc?name=' + _name,
type: 'DELETE',
success: function(result) {
var b = $('#rm-'+name)
var b = $('#rm-'+_name)
b.popover('show');
setTimeout(function() {
b.popover('hide');
Expand All @@ -302,11 +303,12 @@ <h2 style="padding:8px 20px">Start a new task</h2>
placement: "top",
})
btn.on('click', function() {
var _name = $(this).attr('id').split('-')[1]
$.ajax({
url: "http://{{IP}}:{{PORT}}/proc?name=" + name,
url: "http://{{IP}}:{{PORT}}/proc?name=" + _name,
type: "PUT",
success: function(response) {
var b = $('#rerun-'+name)
var b = $('#rerun-'+_name)
b.popover('show');
setTimeout(function() {
b.popover('hide');
Expand Down

0 comments on commit ed7987d

Please sign in to comment.