diff --git a/Layout/default/Devicetype/Form.php b/Layout/default/Devicetype/Form.php
index 83bd9c70d..2a6bc254c 100644
--- a/Layout/default/Devicetype/Form.php
+++ b/Layout/default/Devicetype/Form.php
@@ -2,6 +2,12 @@
+
@@ -78,7 +84,18 @@
value="= $devicetypes->power ?>">
+
diff --git a/application/Device/DeviceController.php b/application/Device/DeviceController.php
index 2ff9a1f40..097e71941 100644
--- a/application/Device/DeviceController.php
+++ b/application/Device/DeviceController.php
@@ -44,6 +44,8 @@ class DeviceController extends mfBaseController
"manufacturer" => $deviceType->devicemanufactor->name,
"price" => $deviceType->price,
"power" => $deviceType->power,
+ "temp_warning" => $deviceType->temp_warning,
+ "temp_critical" => $deviceType->temp_critical,
"creator" => $deviceType->creator->name,
"created" => $deviceType->create,
];
diff --git a/application/Devicetype/DevicetypeController.php b/application/Devicetype/DevicetypeController.php
index 7950de6d3..3665059b1 100644
--- a/application/Devicetype/DevicetypeController.php
+++ b/application/Devicetype/DevicetypeController.php
@@ -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");
diff --git a/application/Devicetype/DevicetypeModel.php b/application/Devicetype/DevicetypeModel.php
index 829fef08d..c1754d029 100644
--- a/application/Devicetype/DevicetypeModel.php
+++ b/application/Devicetype/DevicetypeModel.php
@@ -7,6 +7,8 @@ class DevicetypeModel
public $price = null;
public $olt = null;
public $devicemanufactor_id = null;
+ public $temp_warning = 80;
+ public $temp_critical = 90;
public $create_by = null;
diff --git a/db/migrations/20250902070036_devicetype_add_temperature.php b/db/migrations/20250902070036_devicetype_add_temperature.php
new file mode 100644
index 000000000..ffff666d2
--- /dev/null
+++ b/db/migrations/20250902070036_devicetype_add_temperature.php
@@ -0,0 +1,33 @@
+getEnvironment() == "thetool") {
+ $table = $this->table("Devicetype");
+ $table->addColumn("temp_warning", "integer", ['null' => false,'default' => '80', "after" => "power"]);
+ $table->addColumn("temp_critical", "integer", ['null' => false,'default' => '90', "after" => "temp_warning"]);
+ $table->update();
+ }
+
+ if($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+
+ public function down(): void
+ {
+ if($this->getEnvironment() == "thetool") {
+ $this->table("Devicetype")->removeColumn("temp_warning")->save();
+ $this->table("Devicetype")->removeColumn("temp_critical")->save();
+ }
+
+ if($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+}
diff --git a/public/js/pages/Device/Device.js b/public/js/pages/Device/Device.js
index 3b1c804a5..d56b8ec77 100644
--- a/public/js/pages/Device/Device.js
+++ b/public/js/pages/Device/Device.js
@@ -11,38 +11,38 @@ const deviceTypeFilterOptions = window?.TT_CONFIG?.DEVICE_TYPES.map(type => ({
Vue.component('device-view-switch', {
//language=Vue
template: `
-
-
-
-
-
-
-
-
- `,
+
+
+
+
+
+
+
+
+ `,
props: ['value'],
data() {
return {
@@ -172,24 +172,24 @@ Vue.component('DeviceTable', {
Vue.component('DeviceManufacturer', {
//language=Vue
template: `
-
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
- `,
+
+ `,
data() {
return {
window: window,
@@ -211,24 +211,24 @@ Vue.component('DeviceManufacturer', {
Vue.component('DeviceType', {
//language=Vue
template: `
-
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
- `,
+
+ `,
data() {
return {
window: window,
@@ -241,6 +241,8 @@ Vue.component('DeviceType', {
{text: 'Hersteller', key: 'manufacturer', filter: 'search', class: 'text-center'},
{text: 'Preis', key: 'price', filter: 'numberRange', class: 'text-center', suffix: ' €'},
{text: 'max. Leistung', key: 'power', filter: 'numberRange', class: 'text-center', suffix: ' W'},
+ {text: 'Temp. Warnung', key: 'temp_warning', filter: 'numberRange', class: 'text-center', suffix: ' °C'},
+ {text: 'Temp. Kritisch', key: 'temp_critical', filter: 'numberRange', class: 'text-center', suffix: ' °C'},
{text: 'Erstellungsdatum', key: 'created', filter: 'date', class: 'text-center'},
{text: 'Erstellt von', key: 'creator', filter: 'search', class: 'text-center'},
{text: 'Aktionen', key: 'actions', class: 'text-center', sortable: false, filter: false, priority: 9},