diff --git a/app/admin/admin-menu-config.php b/app/admin/admin-menu-config.php index 08be419302b7717e483cc0a4748c1a39655c20ef..f6bfa72ef05426a14a5da9bb4d37d3d2b7aec9ce 100644 --- a/app/admin/admin-menu-config.php +++ b/app/admin/admin-menu-config.php @@ -74,44 +74,44 @@ $admin_menu[_('Tools')][] = ["show"=>true, "icon"=>"fa-search-pl # inclusion check $admin_menu_items = [ - "api" => _("api"), + "api" => _("api"), "authentication-methods" => _("authentication-methods"), - "password-policy" => _("password-policy"), - "custom-fields" => _("custom-fields"), - "dhcp" => _("dhcp"), - "devices" => _("devices"), - "device-types" => _("device-types"), - "filter-fields" => _("filter-fields"), - "required-fields" => _("required-fields"), - "firewall-zones" => _("firewall-zones"), - "groups" => _("groups"), - "import-export" => _("import-export"), - "instructions" => _("instructions"), - "languages" => _("languages"), - "mail" => _("mail"), - "nameservers" => _("nameservers"), - "powerDNS" => _("powerDNS"), - "racks" => _("racks"), - "replace-fields" => _("replace-fields"), - "requests" => _("requests"), - "ripe-import" => _("ripe-import"), - "scan-agents" => _("scan-agents"), - "sections" => _("sections"), - "settings" => _("settings"), - "snmp" => _("snmp"), - "subnets" => _("subnets"), - "tags" => _("tags"), - "users" => _("users"), - "verify-database" => _("verify-database"), - "version-check" => _("version-check"), - "vlans" => _("vlans"), - "vrf" => _("vrf"), - "widgets" => _("widgets"), - "nat" => _("nat"), - "locations" => _("locations"), - "circuits" => _("circuits"), - "pstn-prefixes" => _("pstn-prefixes"), - "2fa" => _("2fa"), - "customers" => _("customers"), - "routing" => _("routing"), + "password-policy" => _("password-policy"), + "custom-fields" => _("custom-fields"), + "dhcp" => _("dhcp"), + "devices" => _("devices"), + "device-types" => _("device-types"), + "filter-fields" => _("filter-fields"), + "required-fields" => _("required-fields"), + "firewall-zones" => _("firewall-zones"), + "groups" => _("groups"), + "import-export" => _("import-export"), + "instructions" => _("instructions"), + "languages" => _("languages"), + "mail" => _("mail"), + "nameservers" => _("nameservers"), + "powerDNS" => _("powerDNS"), + "racks" => _("racks"), + "replace-fields" => _("replace-fields"), + "requests" => _("requests"), + "ripe-import" => _("ripe-import"), + "scan-agents" => _("scan-agents"), + "sections" => _("sections"), + "settings" => _("settings"), + "snmp" => _("snmp"), + "subnets" => _("subnets"), + "tags" => _("tags"), + "users" => _("users"), + "verify-database" => _("verify-database"), + "version-check" => _("version-check"), + "vlans" => _("vlans"), + "vrf" => _("vrf"), + "widgets" => _("widgets"), + "nat" => _("nat"), + "locations" => _("locations"), + "circuits" => _("circuits"), + "pstn-prefixes" => _("pstn-prefixes"), + "2fa" => _("2fa"), + "customers" => _("customers"), + "routing" => _("routing"), ]; diff --git a/app/admin/index.php b/app/admin/index.php index 5ba67cdf7edc30a26dd43f364615533b24dd91d2..3bee5f55dde4daf464c26126ae8e3536af1cbe91 100755 --- a/app/admin/index.php +++ b/app/admin/index.php @@ -3,13 +3,19 @@ <div id='dashboard' class="tools-all"> <div class="row"> +<div class="col-lg-6 col-xs-12"></div> +<div class="col-lg-6 col-xs-12" style="padding:5px 20px;"> + <input type="text" class="form-control tools-filter-string" placeholder="<?php print _("Filter string"); ?>"> +</div> +</div> + <?php # print foreach($admin_menu as $k=>$menu) { # headers print "<h4>".$k."</h4>"; - print "<hr>"; + print "<hr class='hr-h4'>"; # items foreach($menu as $t) { @@ -29,4 +35,46 @@ foreach($admin_menu as $k=>$menu) { ?> </div> </div> -</div> \ No newline at end of file +</div> + +<script type="text/javascript"> +$(document).ready(function () { + // focus search on load + $('.tools-filter-string').focus(); + + // start search + $('.tools-filter-string').keyup(function (e) { + doFilter() + }); + // focus out filter + $('.tools-filter-string').focusout(function () { + doFilter() + }); + + // function + function doFilter () { + var searchStringTools = $('.tools-filter-string').val().toLowerCase(); + + // if null show all + if(searchStringTools == "") { + $('.widget-dash').show() + $('.tools-all h4').show() + $('.tools-all .hr-h4').show() + return + } + + // hide all titles + $('.tools-all h4').hide(); + $('.tools-all .hr-h4').hide(); + + // search + $( ".widget-dash" ).each(function( index ) { + var content = $(this).text().toLowerCase(); + // show or hide + if(content.search(searchStringTools)===-1) { $(this).hide() } + else { $(this).show() } + }); + } + +}) +</script> \ No newline at end of file diff --git a/app/sections/menu/menu-tools-admin.php b/app/sections/menu/menu-tools-admin.php index 816ab67778c0c40b0148aa4447c0b81495b60bd8..c6f5067552b1d239ca907ecaf1ebea8b03bda4e3 100644 --- a/app/sections/menu/menu-tools-admin.php +++ b/app/sections/menu/menu-tools-admin.php @@ -15,6 +15,7 @@ if($User->is_admin(false)) { print " <ul class='dropdown-menu admin'>"; # all items + print " <li class='nav-header'>"._('Available IPAM tools')."</li>"; print " <li><a href='".create_link("administration")."'>"._('Show all settings')."</a></li>"; print " <li class='divider'></li>"; # print admin items @@ -37,11 +38,9 @@ if($User->is_admin(false)) { } print " </ul>"; - print " </li>"; print "</ul>"; } - ?> diff --git a/app/sections/menu/menu-tools.php b/app/sections/menu/menu-tools.php index 434c48ef31f62f417224eb31d25dce0d5e350fca..c15f9cb56d67a08d32459732e264cd00b2eb1e87 100644 --- a/app/sections/menu/menu-tools.php +++ b/app/sections/menu/menu-tools.php @@ -151,7 +151,7 @@ $tool_items["search"] = array ( # first item - tools or dashboard if ($_GET['page']=="dashboard") { print "<li class='first-item'>"; - print " <a href='".create_link()."'><i class='fa fa-angle-right'></i> "._('Dashboard')."</a>"; + print " <a href='".create_link()."'><i class='fa fa-dashboard'></i> "._('Dashboard')."</a>"; print "</li>"; } else { diff --git a/app/sections/user-menu.php b/app/sections/user-menu.php index 12075a90cede5bae26756256b5b301c7e157704f..7d9c8c606df3a451158ee24264dc0fe5e3c2aec4 100755 --- a/app/sections/user-menu.php +++ b/app/sections/user-menu.php @@ -25,13 +25,13 @@ foreach ($params as $k => $p) { # if all are off print all on! if($Params->subnets!="on" && $Params->addresses!="on" && $Params->vlans!="on" && $Params->vrf!="on" && $Params->pstn!="on" && $Params->circuits!="on" && $Params->customers!="on") { - $Params->subnets="on"; - $Params->addresses="on"; - $Params->vlans="on"; - $Params->vrf="on"; - $Params->pstn="on"; - $Params->circuits="on"; - $Params->customers="on"; + $Params->subnets ="on"; + $Params->addresses ="on"; + $Params->vlans ="on"; + $Params->vrf ="on"; + $Params->pstn ="on"; + $Params->circuits ="on"; + $Params->customers ="on"; } ?> diff --git a/app/tools/index.php b/app/tools/index.php index fc435330b320d365f8cdd0dd7b8b89b4bca7e1d2..3c888aff220c5ec9f840ef54579d55f266d7e30d 100755 --- a/app/tools/index.php +++ b/app/tools/index.php @@ -3,6 +3,12 @@ <div id='dashboard' class="tools-all"> <div class="row"> +<div class="col-lg-6 col-xs-12"></div> +<div class="col-lg-6 col-xs-12" style="padding:5px 20px;"> + <input type="text" class="form-control tools-filter-string" placeholder="<?php print _("Filter string"); ?>"> +</div> +</div> + <?php # print foreach($tools_menu as $k=>$tool) { @@ -11,7 +17,7 @@ foreach($tools_menu as $k=>$tool) { if (sizeof($tool)>0) { # headers print "<h4>".$k."</h4>"; - print "<hr>"; + print "<hr class='hr-h4'>"; # items foreach($tool as $t) { @@ -32,4 +38,46 @@ foreach($tools_menu as $k=>$tool) { ?> </div> </div> -</div> \ No newline at end of file +</div> + +<script type="text/javascript"> +$(document).ready(function () { + // focus search on load + $('.tools-filter-string').focus(); + + // start search + $('.tools-filter-string').keyup(function (e) { + doFilter() + }); + // focus out filter + $('.tools-filter-string').focusout(function () { + doFilter() + }); + + // function + function doFilter () { + var searchStringTools = $('.tools-filter-string').val().toLowerCase(); + + // if null show all + if(searchStringTools == "") { + $('.widget-dash').show() + $('.tools-all h4').show() + $('.tools-all .hr-h4').show() + return + } + + // hide all titles + $('.tools-all h4').hide(); + $('.tools-all .hr-h4').hide(); + + // search + $( ".widget-dash" ).each(function( index ) { + var content = $(this).text().toLowerCase(); + // show or hide + if(content.search(searchStringTools)===-1) { $(this).hide() } + else { $(this).show() } + }); + } + +}) +</script> \ No newline at end of file diff --git a/app/tools/tools-menu-config.php b/app/tools/tools-menu-config.php index 19a80c6ce3c710840737f1e1304637a7141ba74a..f5c3f05418a8a280e8a98c8fe75972411be0fc0b 100644 --- a/app/tools/tools-menu-config.php +++ b/app/tools/tools-menu-config.php @@ -16,40 +16,40 @@ $tools_menu_icons[_('Devices')] = "fa-desktop"; # inclusion check $tools_menu_items = [ - "changelog" => _("changelog"), - "dhcp" => _("dhcp"), - "devices" => _("devices"), - "favourites" => _("favourites"), - "firewall-zones" => _("firewall-zones"), - "instructions" => _("instructions"), - "ip-calculator" => _("ip-calculator"), - "logs" => _("logs"), - "multicast-networks" => _("multicast-networks"), - "pass-change" => _("pass-change"), - "powerDNS" => _("powerDNS"), - "request-ip" => _("request-ip"), - "requests" => _("requests"), - "racks" => _("racks"), - "scanned-networks" => _("scanned-networks"), - "documentation"=> _("documentation"), - "search" => _("search"), - "subnet-masks" => _("subnet-masks"), - "subnets" => _("subnets"), - "temp-shares" => _("temp-shares"), - "user-menu" => _("user-menu"), - "vlan" => _("vlan"), - "vrf" => _("vrf"), - "inactive-hosts" => _("inactive-hosts"), - "threshold" => _("threshold"), - "nat" => _("nat"), - "locations" => _("locations"), - "pstn-prefixes" => _("pstn-prefixes"), - "mac-lookup" => _("mac-lookup"), - "circuits" => _("circuits"), - "customers" => _("customers"), - "duplicates" => _("duplicates"), - "routing" => _("routing"), - "vaults" => _("vaults"), + "changelog" => _("changelog"), + "dhcp" => _("dhcp"), + "devices" => _("devices"), + "favourites" => _("favourites"), + "firewall-zones" => _("firewall-zones"), + "instructions" => _("instructions"), + "ip-calculator" => _("ip-calculator"), + "logs" => _("logs"), + "multicast-networks" => _("multicast-networks"), + "pass-change" => _("pass-change"), + "powerDNS" => _("powerDNS"), + "request-ip" => _("request-ip"), + "requests" => _("requests"), + "racks" => _("racks"), + "scanned-networks" => _("scanned-networks"), + "documentation" => _("documentation"), + "search" => _("search"), + "subnet-masks" => _("subnet-masks"), + "subnets" => _("subnets"), + "temp-shares" => _("temp-shares"), + "user-menu" => _("user-menu"), + "vlan" => _("vlan"), + "vrf" => _("vrf"), + "inactive-hosts" => _("inactive-hosts"), + "threshold" => _("threshold"), + "nat" => _("nat"), + "locations" => _("locations"), + "pstn-prefixes" => _("pstn-prefixes"), + "mac-lookup" => _("mac-lookup"), + "circuits" => _("circuits"), + "customers" => _("customers"), + "duplicates" => _("duplicates"), + "routing" => _("routing"), + "vaults" => _("vaults"), ]; diff --git a/js/magic.js b/js/magic.js index 2e9e70552a00e8157ce2b86c9bddb51c14613967..75eee28f9a680313cb2c35285ab4e1e0e7cff3b0 100755 --- a/js/magic.js +++ b/js/magic.js @@ -32,6 +32,13 @@ $(document).keydown(function(e) { } }); + + +$(document).on("click", "a", function() { + hideTooltips() +}); + + // no enter in sortfields $(document).on("submit", ".searchFormClass", function() { return false; @@ -1140,7 +1147,6 @@ $(document).on("mouseleave", '#user_menu', function(event){ object1.slideUp(); }); - //search export $(document).on("click", "#exportSearch", function(event){ var searchTerm = $(this).attr('data-post'); diff --git a/misc/CHANGELOG b/misc/CHANGELOG index 2005ad754f999f69052d8ca473d2a69faecdbb0d..663cab658d2de12e46bd22cfcf38fa2fbc0f9a7c 100755 --- a/misc/CHANGELOG +++ b/misc/CHANGELOG @@ -11,7 +11,6 @@ + Fixed php8 constructor fix for radius class (#3985); + Fixed Force mac address update during status update scan (#3791); - Enhancements, changes: ---------------------------- + Added support for redundant PowerDNS databases (#3981);