diff --git a/src/fr/devinsy/statoolinfos/htmlize/uptimeView.xhtml b/src/fr/devinsy/statoolinfos/htmlize/uptimeView.xhtml index a25279c..8e89b5c 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/uptimeView.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/uptimeView.xhtml @@ -15,6 +15,8 @@

Disponibilité des services

Tout + Alertes + Rétablis Indisponibles
@@ -121,32 +123,48 @@ $(document).ready(function() language: dataTableFrench }); - var showAll=1; - $("#nokButton").click(function() - { - if (showAll == 1) - { - showAll=0; - $.fn.dataTable.ext.search.push( - function(settings, data, dataIndex) - { - return !table.cell(dataIndex, 23).data().includes('-ok'); - } - ); - table.draw(); - } - }); - $("#allButton").click(function() - { - if (showAll == 0) - { - showAll=1; - $.fn.dataTable.ext.search.pop(); - table.draw(); - } + { + $.fn.dataTable.ext.search.pop(); + table.draw(); }); + $("#nokButton").click(function() + { + $.fn.dataTable.ext.search.pop(); + $.fn.dataTable.ext.search.push( + function(settings, data, dataIndex) + { + var result; + return !(table.cell(dataIndex, 23).data().includes('status-ok') || table.cell(dataIndex, 23).data().includes('status-warning')); + } + ); + table.draw(); + }); + + $("#fixedButton").click(function() + { + $.fn.dataTable.ext.search.pop(); + $.fn.dataTable.ext.search.push( + function(settings, data, dataIndex) + { + return table.cell(dataIndex, 23).data().includes('status-warning'); + } + ); + table.draw(); + }); + + $("#alertButton").click(function() + { + $.fn.dataTable.ext.search.pop(); + $.fn.dataTable.ext.search.push( + function(settings, data, dataIndex) + { + return !table.cell(dataIndex, 23).data().includes('status-ok'); + } + ); + table.draw(); + }); });