mirror of
https://github.com/librenms/librenms.git
synced 2024-09-29 14:26:25 +00:00
Merge pull request #1646 from laf/alert-widget-fix
Updated gridster variables to be custom per widget
This commit is contained in:
commit
442af615ba
@ -22,7 +22,7 @@ $common_output[] = '
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
var grid = $("#alerts").bootgrid({
|
||||
var alerts_grid = $("#alerts").bootgrid({
|
||||
ajax: true,
|
||||
post: function ()
|
||||
{
|
||||
@ -43,14 +43,14 @@ var grid = $("#alerts").bootgrid({
|
||||
templates: {
|
||||
}
|
||||
}).on("loaded.rs.jquery.bootgrid", function() {
|
||||
grid.find(".incident-toggle").each( function() {
|
||||
alerts_grid.find(".incident-toggle").each( function() {
|
||||
$(this).parent().addClass(\'incident-toggle-td\');
|
||||
}).on("click", function(e) {
|
||||
var target = $(this).data("target");
|
||||
$(target).collapse(\'toggle\');
|
||||
$(this).toggleClass(\'glyphicon-plus glyphicon-minus\');
|
||||
});
|
||||
grid.find(".incident").each( function() {
|
||||
alerts_grid.find(".incident").each( function() {
|
||||
$(this).parent().addClass(\'col-lg-4 col-md-4 col-sm-4 col-xs-4\');
|
||||
$(this).parent().parent().on("mouseenter", function() {
|
||||
$(this).find(".incident-toggle").fadeIn(200);
|
||||
@ -64,7 +64,7 @@ var grid = $("#alerts").bootgrid({
|
||||
}
|
||||
});
|
||||
});
|
||||
grid.find(".command-ack-alert").on("click", function(e) {
|
||||
alerts_grid.find(".command-ack-alert").on("click", function(e) {
|
||||
e.preventDefault();
|
||||
var alert_id = $(this).data("alert_id");
|
||||
var state = $(this).data("state");
|
||||
|
@ -14,7 +14,7 @@ $common_output[] = '
|
||||
|
||||
<script>
|
||||
|
||||
var grid = $("#eventlog").bootgrid({
|
||||
var eventlog_grid = $("#eventlog").bootgrid({
|
||||
ajax: true,
|
||||
post: function ()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user