diff --git a/config.php b/config.php new file mode 100644 index 00000000..ebb8c97e --- /dev/null +++ b/config.php @@ -0,0 +1,7 @@ + 'all', 'sort_if_by' => 'ifAlias', @@ -39,7 +36,7 @@ /* Load Weathermap config defaults, see file for description. */ $init_modules = array('web', 'auth'); - require realpath(__DIR__ . '/../../..') . '/includes/init.php'; + require $librenms_base . '/includes/init.php'; if (empty($_SESSION['authenticated']) || !isset($_SESSION['authenticated'])) { header('Location: /'); @@ -129,8 +126,8 @@ function update_source_step2(graphid) function filterlist(previous) { - var filterstring = $('input#filterstring').val(); - + var filterstring = $('input#filterstring').val(); + if(filterstring=='') { $('ul#dslist > li').show(); @@ -138,9 +135,9 @@ function filterlist(previous) $("ul#dslist > li:contains('Desc::')").hide(); } return; - + } else if(filterstring!=previous) - { + { $('ul#dslist > li').hide(); $("ul#dslist > li:contains('" + filterstring + "')").show(); if($('#ignore_desc').is(':checked')) { @@ -229,7 +226,7 @@ function update_source_step1(dataid,name,portid,ifAlias,ifDesc,ifIndex) self.close(); } } - + function applyDSFilterChange(objForm) { strURL = '?host_id=' + objForm.host_id.value; strURL = strURL + '&command=link_step1'; @@ -252,7 +249,7 @@ function applyDSFilterChange(objForm) { } document.location = strURL; } - +