Gerätetyp erweitert um Temperaturen

This commit is contained in:
Daniel Spitzer
2025-09-02 09:22:59 +02:00
parent fc23c5ce5f
commit 55066d2e6f
6 changed files with 69 additions and 0 deletions
@@ -76,6 +76,17 @@ class DevicetypeController extends mfBaseController
} else {
$power = $r->power;
}
if (!$r->temp_warning) {
$temp_warning = "80";
} else {
$temp_warning = $r->temp_warning;
}
if (!$r->temp_critical) {
$temp_critical = "90";
} else {
$temp_critical = $r->temp_critical;
}
if ($r->olt) {
@@ -88,6 +99,8 @@ class DevicetypeController extends mfBaseController
$data['price'] = $price;
$data['power'] = $power;
$data['olt'] = $olt;
$data['temp_warning'] = $temp_warning;
$data['temp_critical'] = $temp_critical;
if (!$data['name']) {
$this->layout()->setFlash("Name darf nicht leer sein", "error");