MBI API Config Server-Configuration hinzugefügt.

Devicemodel/Controller dementsprechend angepasst.

Variablen:
TT_MBI_API_ENABLE  ... true/false
TT_MBI_API_URL     ... Backend URL
TT_MBI_API_VERSION ... API Version
TT_MBI_API_KEY     ... API Key
This commit is contained in:
Spitzer_Daniel
2023-04-07 18:59:58 +02:00
parent 17589111c5
commit 6293071000
3 changed files with 68 additions and 54 deletions

View File

@@ -1,4 +1,5 @@
<?php
class DeviceController extends mfBaseController
{
protected function init()
@@ -267,6 +268,8 @@ class DeviceController extends mfBaseController
$createConfig = DeviceModel::configcreate($ip);
if ($createConfig->success === "true") {
$this->layout()->setFlash("Backup wurde erfolgreich erstellt", "success");
} elseif (!TT_MBI_API_ENABLE) {
$this->layout()->setFlash("Backup konnte nicht erstellt werden. <b>Fehler</b>: Schnittstellenserver wurde vom Admin deaktiviert.", "error");
} else {
$this->layout()->setFlash("Backup konnte nicht erstellt werden. <b>Fehler</b>: " . $createConfig->error, "error");
}