mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Widget Eventlog Sensors Link and Mouseover functionality (#11380)
* Global Settings - Alert Default Settings * Revert "Global Settings - Alert Default Settings" This reverts commita1af62b146. * Widget Eventlog - Sensors link and overlib Image * travis fix * handling via AppServiceProvider * collect function * Travis ... * static list of Sensor Types * adding all sensor graph_types * remove collect * correct getTypes - remove change to lower case * class sensor_descr switch * class sensor_descr switch - revert * Use standard sensor type names * move types to attribute list * going back to changes from9eee7fad58Co-authored-by: Tony Murray <[email protected]>
This commit is contained in:
co-authored by
GitHub
Tony Murray
parent
bb9ebb4e45
commit
cc2894c0df
+32
-28
@@ -6,35 +6,34 @@ class Sensor extends DeviceRelatedModel
|
||||
{
|
||||
public $timestamps = false;
|
||||
protected $primaryKey = 'sensor_id';
|
||||
|
||||
protected static $icons = array(
|
||||
'airflow' => 'angle-double-right',
|
||||
'ber' => 'sort-amount-desc',
|
||||
'charge' => 'battery-half',
|
||||
protected static $icons = [
|
||||
'airflow' => 'angle-double-right',
|
||||
'ber' => 'sort-amount-desc',
|
||||
'charge' => 'battery-half',
|
||||
'chromatic_dispersion' => 'indent',
|
||||
'cooling' => 'thermometer-full',
|
||||
'count' => 'hashtag',
|
||||
'current' => 'bolt fa-flip-horizontal',
|
||||
'dbm' => 'sun-o',
|
||||
'delay' => 'clock-o',
|
||||
'eer' => 'snowflake-o',
|
||||
'fanspeed' => 'refresh',
|
||||
'frequency' => 'line-chart',
|
||||
'humidity' => 'tint',
|
||||
'load' => 'percent',
|
||||
'power' => 'power-off',
|
||||
'power_consumed' => 'plug',
|
||||
'power_factor' => 'calculator',
|
||||
'pressure' => 'thermometer-empty',
|
||||
'quality_factor' => 'arrows',
|
||||
'runtime' => 'hourglass-half',
|
||||
'signal' => 'wifi',
|
||||
'snr' => 'signal',
|
||||
'state' => 'bullseye',
|
||||
'temperature' => 'thermometer-three-quarters',
|
||||
'voltage' => 'bolt',
|
||||
'waterflow' => 'tint',
|
||||
);
|
||||
'cooling' => 'thermometer-full',
|
||||
'count' => 'hashtag',
|
||||
'current' => 'bolt fa-flip-horizontal',
|
||||
'dbm' => 'sun-o',
|
||||
'delay' => 'clock-o',
|
||||
'eer' => 'snowflake-o',
|
||||
'fanspeed' => 'refresh',
|
||||
'frequency' => 'line-chart',
|
||||
'humidity' => 'tint',
|
||||
'load' => 'percent',
|
||||
'power' => 'power-off',
|
||||
'power_consumed' => 'plug',
|
||||
'power_factor' => 'calculator',
|
||||
'pressure' => 'thermometer-empty',
|
||||
'quality_factor' => 'arrows',
|
||||
'runtime' => 'hourglass-half',
|
||||
'signal' => 'wifi',
|
||||
'snr' => 'signal',
|
||||
'state' => 'bullseye',
|
||||
'temperature' => 'thermometer-three-quarters',
|
||||
'voltage' => 'bolt',
|
||||
'waterflow' => 'tint',
|
||||
];
|
||||
|
||||
// ---- Helper Functions ----
|
||||
|
||||
@@ -54,6 +53,11 @@ class Sensor extends DeviceRelatedModel
|
||||
return collect(self::$icons)->get($this->sensor_class, 'delicius');
|
||||
}
|
||||
|
||||
public static function getTypes()
|
||||
{
|
||||
return array_keys(self::$icons);
|
||||
}
|
||||
|
||||
// for the legacy menu
|
||||
public static function getIconMap()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user