Remove legacy function calls (#12651)

* massive inlines

* fix style and wtf

* remove rrdtool.inc.php include

* fix CommonFunctions namespace issues

* looking for missing class space, fix undefined class issues

* style fixes
This commit is contained in:
Tony Murray
2021-03-28 17:25:30 -05:00
committed by GitHub
parent 1695f86af8
commit 1c379dcd05
832 changed files with 2023 additions and 2596 deletions

View File

@@ -123,7 +123,7 @@ class Html
unset($link_array['height'], $link_array['width']);
$link = Url::generate($link_array);
$full_link = Url::overlibLink($link, Url::lazyGraphTag($graph_array), Url::graphTag($graph_array_zoom), null);
$full_link = Url::overlibLink($link, Url::lazyGraphTag($graph_array), Url::graphTag($graph_array_zoom));
$graph_data[] = $full_link;
if ($print) {

View File

@@ -57,6 +57,29 @@ class Rewrite
return $type;
}
public static function shortenIfType($type)
{
return str_ireplace(
[
'FastEthernet',
'TenGigabitEthernet',
'GigabitEthernet',
'Port-Channel',
'Ethernet',
'Bundle-Ether',
],
[
'Fa',
'Te',
'Gi',
'Po',
'Eth',
'BE',
],
$type
);
}
public static function normalizeIfName($name)
{
$rewrite_ifname = [

View File

@@ -172,7 +172,7 @@ class Url
}
/**
* @param Sensor $sensor
* @param \App\Models\Sensor $sensor
* @param string $text
* @param string $type
* @param bool $overlib