mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	Removing urlencode/decode to put in a separate pr
This commit is contained in:
		@@ -191,7 +191,7 @@ function get_graph_by_port_hostname()
 | 
				
			|||||||
  $router = $app->router()->getCurrentRoute()->getParams();
 | 
					  $router = $app->router()->getCurrentRoute()->getParams();
 | 
				
			||||||
  $hostname = $router['hostname'];
 | 
					  $hostname = $router['hostname'];
 | 
				
			||||||
  $vars = array();
 | 
					  $vars = array();
 | 
				
			||||||
  $vars['port'] = urldecode($router['ifname']);
 | 
					  $vars['port'] = $router['ifname'];
 | 
				
			||||||
  $vars['type'] = $router['type'] ?: 'port_bits';
 | 
					  $vars['type'] = $router['type'] ?: 'port_bits';
 | 
				
			||||||
  if(!empty($_GET['from']))
 | 
					  if(!empty($_GET['from']))
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
@@ -215,7 +215,7 @@ function get_port_stats_by_port_hostname()
 | 
				
			|||||||
  global $config;
 | 
					  global $config;
 | 
				
			||||||
  $app = \Slim\Slim::getInstance();
 | 
					  $app = \Slim\Slim::getInstance();
 | 
				
			||||||
  $router = $app->router()->getCurrentRoute()->getParams();
 | 
					  $router = $app->router()->getCurrentRoute()->getParams();
 | 
				
			||||||
  $ifName = urldecode($router['ifname']);
 | 
					  $ifName = $router['ifname'];
 | 
				
			||||||
  $stats = dbFetchRow("SELECT * FROM `ports` WHERE `ifName`=?", array($ifName));
 | 
					  $stats = dbFetchRow("SELECT * FROM `ports` WHERE `ifName`=?", array($ifName));
 | 
				
			||||||
  $output = array("status" => "ok", "port" => $stats);
 | 
					  $output = array("status" => "ok", "port" => $stats);
 | 
				
			||||||
  $app->response->headers->set('Content-Type', 'application/json');
 | 
					  $app->response->headers->set('Content-Type', 'application/json');
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -72,7 +72,7 @@ if ($_SESSION['userlevel'] == '10')
 | 
				
			|||||||
          <td>
 | 
					          <td>
 | 
				
			||||||
            <ul class="list-unstyled">
 | 
					            <ul class="list-unstyled">
 | 
				
			||||||
              <li>$hostname = the hostname of the device you want the graph for</li>
 | 
					              <li>$hostname = the hostname of the device you want the graph for</li>
 | 
				
			||||||
              <li>urlencode($ifName) = The ifName of the interface you want a graph for</li>
 | 
					              <li>$ifName = The ifName of the interface you want a graph for</li>
 | 
				
			||||||
              <li>$type = the type of graph for the port (port_bits,port_upkts)</li>
 | 
					              <li>$type = the type of graph for the port (port_bits,port_upkts)</li>
 | 
				
			||||||
              <li>$width = the width of the graph to be returned</li>
 | 
					              <li>$width = the width of the graph to be returned</li>
 | 
				
			||||||
              <li>$height = the height of the graph to be returned</li>
 | 
					              <li>$height = the height of the graph to be returned</li>
 | 
				
			||||||
@@ -147,7 +147,7 @@ if ($_SESSION['userlevel'] == '10')
 | 
				
			|||||||
          <td>
 | 
					          <td>
 | 
				
			||||||
            <ul class="list-unstyled">
 | 
					            <ul class="list-unstyled">
 | 
				
			||||||
              <li>$hostname = the hostname of the device</li>
 | 
					              <li>$hostname = the hostname of the device</li>
 | 
				
			||||||
              <li>urlencode($ifName) = the ifName of the port</li>
 | 
					              <li>$ifName = the ifName of the port</li>
 | 
				
			||||||
            </ul>
 | 
					            </ul>
 | 
				
			||||||
          </td>
 | 
					          </td>
 | 
				
			||||||
          <td>
 | 
					          <td>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user