mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
sysutils/monit: fix test deletion (#564)
This commit is contained in:
committed by
Franco Fichtner
parent
fb77f889a1
commit
054578c8a0
+5
-2
@@ -168,8 +168,11 @@ class SettingsController extends ApiControllerBase
|
||||
if ($mdlMonit->$nodeType->del($uuid) == true) {
|
||||
// delete relations
|
||||
if ($nodeType == 'test') {
|
||||
$nodeName = $mdlMonit->getNodeByReference($nodeType . '.' . $uuid . '.name')->__toString();
|
||||
$this->deleteRelations('service', 'tests', $uuid, 'test', $nodeName, $mdlMonit);
|
||||
$nodeName = $mdlMonit->getNodeByReference($nodeType . '.' . $uuid . '.name');
|
||||
if ($nodeName != null) {
|
||||
$nodeName = $nodeName->__toString();
|
||||
$this->deleteRelations('service', 'tests', $uuid, 'test', $nodeName, $mdlMonit);
|
||||
}
|
||||
}
|
||||
$mdlMonit->serializeToConfig();
|
||||
Config::getInstance()->save();
|
||||
|
||||
Reference in New Issue
Block a user