mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
webui: Allow editing and deleting of lapsed alert schedules (#6878)
This commit is contained in:
committed by
Neil Lathwood
parent
2f4efb2a43
commit
b3c88925d4
@@ -53,18 +53,18 @@ var grid = $("#alert-schedule").bootgrid({
|
||||
formatters: {
|
||||
"commands": function(column, row)
|
||||
{
|
||||
var response = "<button type=\"button\" class=\"btn btn-xs btn-primary command-edit\" data-toggle='modal' data-target='#schedule-maintenance' data-schedule_id=\"" + row.id + "\"><span class=\"fa fa-pencil\"></span></button> " +
|
||||
"<button type=\"button\" class=\"btn btn-xs btn-danger command-delete\" data-schedule_id=\"" + row.id + "\"><span class=\"fa fa-trash-o\"></span></button>";
|
||||
|
||||
if (row.status == 1) {
|
||||
return '<button type="button" class="btn btn-xs btn-danger" disabled>Lapsed</button>';
|
||||
} else {
|
||||
var response = "<button type=\"button\" class=\"btn btn-xs btn-primary command-edit\" data-toggle='modal' data-target='#schedule-maintenance' data-schedule_id=\"" + row.id + "\"><span class=\"fa fa-pencil\"></span></button> " +
|
||||
"<button type=\"button\" class=\"btn btn-xs btn-danger command-delete\" data-schedule_id=\"" + row.id + "\"><span class=\"fa fa-trash-o\"></span></button>";
|
||||
if (row.status == 2) {
|
||||
response = response + ' <button type="button" class="btn btn-xs btn-success" disabled>Current</button>';
|
||||
}
|
||||
return response;
|
||||
}
|
||||
response = response + '<button type="button" class="btn btn-xs btn-danger" disabled>Lapsed</button>';
|
||||
} else if (row.status == 2) {
|
||||
response = response + '<button type="button" class="btn btn-xs btn-success" disabled>Current</button>';
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
},
|
||||
},
|
||||
templates: {
|
||||
header: "<div id=\"{{ctx.id}}\" class=\"{{css.header}}\"><div class=\"row\">"+
|
||||
"<div class=\"col-sm-8 actionBar\"><span class=\"pull-left\">"+
|
||||
|
||||
Reference in New Issue
Block a user