Widget Eventlog Sensors Link and Mouseover functionality (#11380)

* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* 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 from 9eee7fad58

Co-authored-by: Tony Murray <[email protected]>
This commit is contained in:
SourceDoctor
2020-04-19 12:57:49 -05:00
committed by GitHub
co-authored by GitHub Tony Murray
parent bb9ebb4e45
commit cc2894c0df
7 changed files with 167 additions and 32 deletions
+32 -28
View File
@@ -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()
{