mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 08:03:30 +02:00
Updated gridster variables to be custom per widget
This commit is contained in:
@@ -22,7 +22,7 @@ $common_output[] = '
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var grid = $("#alerts").bootgrid({
|
var alerts_grid = $("#alerts").bootgrid({
|
||||||
ajax: true,
|
ajax: true,
|
||||||
post: function ()
|
post: function ()
|
||||||
{
|
{
|
||||||
@@ -43,14 +43,14 @@ var grid = $("#alerts").bootgrid({
|
|||||||
templates: {
|
templates: {
|
||||||
}
|
}
|
||||||
}).on("loaded.rs.jquery.bootgrid", function() {
|
}).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\');
|
$(this).parent().addClass(\'incident-toggle-td\');
|
||||||
}).on("click", function(e) {
|
}).on("click", function(e) {
|
||||||
var target = $(this).data("target");
|
var target = $(this).data("target");
|
||||||
$(target).collapse(\'toggle\');
|
$(target).collapse(\'toggle\');
|
||||||
$(this).toggleClass(\'glyphicon-plus glyphicon-minus\');
|
$(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().addClass(\'col-lg-4 col-md-4 col-sm-4 col-xs-4\');
|
||||||
$(this).parent().parent().on("mouseenter", function() {
|
$(this).parent().parent().on("mouseenter", function() {
|
||||||
$(this).find(".incident-toggle").fadeIn(200);
|
$(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();
|
e.preventDefault();
|
||||||
var alert_id = $(this).data("alert_id");
|
var alert_id = $(this).data("alert_id");
|
||||||
var state = $(this).data("state");
|
var state = $(this).data("state");
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $common_output[] = '
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var grid = $("#eventlog").bootgrid({
|
var eventlog_grid = $("#eventlog").bootgrid({
|
||||||
ajax: true,
|
ajax: true,
|
||||||
post: function ()
|
post: function ()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user