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: {
|
formatters: {
|
||||||
"commands": function(column, row)
|
"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) {
|
if (row.status == 1) {
|
||||||
return '<button type="button" class="btn btn-xs btn-danger" disabled>Lapsed</button>';
|
response = response + '<button type="button" class="btn btn-xs btn-danger" disabled>Lapsed</button>';
|
||||||
} else {
|
} else if (row.status == 2) {
|
||||||
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> " +
|
response = response + '<button type="button" class="btn btn-xs btn-success" disabled>Current</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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
templates: {
|
templates: {
|
||||||
header: "<div id=\"{{ctx.id}}\" class=\"{{css.header}}\"><div class=\"row\">"+
|
header: "<div id=\"{{ctx.id}}\" class=\"{{css.header}}\"><div class=\"row\">"+
|
||||||
"<div class=\"col-sm-8 actionBar\"><span class=\"pull-left\">"+
|
"<div class=\"col-sm-8 actionBar\"><span class=\"pull-left\">"+
|
||||||
|
|||||||
Reference in New Issue
Block a user