diff --git a/data-pick.php b/data-pick.php index 3ff60f3..f32977d 100755 --- a/data-pick.php +++ b/data-pick.php @@ -118,7 +118,7 @@ function update_source_step2(graphid) function filterlist(previous) { - var filterstring = $('input#filterstring').val(); + var filterstring = $('input#filterstring').val().toUpperCase(); if(filterstring=='') { @@ -160,16 +160,16 @@ function filterignore() $(document).ready( function() { $('span.filter').keyup(function() { - var previous = $('input#filterstring').val(); + var previous = $('input#filterstring').val().toUpperCase(); setTimeout(function () {filterlist(previous)}, 500); }).show(); $('span.ignore').click(function() { - var previous = $('input#filterstring').val(); + var previous = $('input#filterstring').val().toUpperCase(); setTimeout(function () {filterlist(previous)}, 500); }); }); - function update_source_step2(graphid,name,portid,ifAlias,ifDesc,ifIndex) + function update_source_step2(graphid,name,portid,ifAlias,ifDesc,ifIndex,ifSpeed) { var graph_url, hover_url; @@ -184,11 +184,12 @@ function update_source_step2(graphid,name,portid,ifAlias,ifDesc,ifIndex) opener.document.forms["frmMain"].node_label.value ='testing'; opener.document.forms["frmMain"].link_infourl.value = info_url; opener.document.forms["frmMain"].link_hover.value = graph_url; + opener.document.forms["frmMain"].link_bandwidth_in.value = ifSpeed; } self.close(); } - function update_source_step1(dataid,name,portid,ifAlias,ifDesc,ifIndex) + function update_source_step1(dataid,name,portid,ifAlias,ifDesc,ifIndex,ifSpeed) { // This must be the section that looks after link properties var newlocation; @@ -210,7 +211,7 @@ function update_source_step1(dataid,name,portid,ifAlias,ifDesc,ifIndex) if(document.forms['mini'].overlib.checked) { - window.onload = update_source_step2(dataid,name,portid,ifAlias,ifDesc,ifIndex); + window.onload = update_source_step2(dataid,name,portid,ifAlias,ifDesc,ifIndex,ifSpeed); } else @@ -282,7 +283,7 @@ function applyDSFilterChange(objForm) { } // Link query - $hosts = \App\Models\Device::orderBy('hostname')->get(['device_id', 'hostname']); + $hosts = \App\Models\Device::orderBy('hostname')->get(['device_id', 'hostname', 'sysname']); ?>

Pick a data source:

@@ -298,7 +299,7 @@ function applyDSFilterChange(objForm) { { print ''; + print 'value="'.$host['device_id'].'">'.$host['hostname'].'('.strtoupper($host['sysname']).')'; } print '
'; } @@ -331,9 +332,9 @@ function applyDSFilterChange(objForm) { if (!is_null($device->ports)) { foreach ($device->ports as $port) { echo "
  • "; - $key = $device->device_id . "','" . $device->hostname . "','" . $port->port_id . "','" . addslashes($port->ifAlias) . "','" . addslashes($port->ifDescr) . "','" . (int)$port->ifIndex; + $key = $device->device_id . "','" . $device->hostname . "','" . $port->port_id . "','" . addslashes($port->ifAlias) . "','" . addslashes($port->ifDescr) . "','" . (int)$port->ifIndex. "','" . $port->ifSpeed; - echo "" . $device->displayName() . "/$port->ifDescr Desc: $port->ifAlias"; + echo "" . $device->displayName() . "
    ".strtoupper($port->ifDescr)."
    Desc: ".strtoupper($port->ifAlias)."
    Speed: $port->ifSpeed
    "; echo "
  • \n"; } $i++; @@ -369,7 +370,7 @@ function applyDSFilterChange(objForm) { $host_id = intval($_REQUEST['host_id']); } - $hosts = \App\Models\Device::orderBy('hostname')->get(['device_id AS id', 'hostname AS name']); + $hosts = \App\Models\Device::orderBy('hostname')->get(['device_id AS id', 'hostname AS name', 'sysname AS sysname']); ?> @@ -379,7 +380,7 @@ function applyDSFilterChange(objForm) { function filterlist(previous) { - var filterstring = $('input#filterstring').val(); + var filterstring = $('input#filterstring').val().toUpperCase(); if(filterstring=='') { @@ -397,7 +398,7 @@ function filterlist(previous) $(document).ready( function() { $('span.filter').keyup(function() { - var previous = $('input#filterstring').val(); + var previous = $('input#filterstring').val().toUpperCase(); setTimeout(function () {filterlist(previous)}, 500); }).show(); }); @@ -478,7 +479,7 @@ function update_source_step1(graphid,name) { print ''; + print 'value="'.$host['id'].'">'.$host['name'].'('.strtoupper($host['sysname']).')'; } print '
    '; }