mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
parent
7ef7325335
commit
bd3a9d65bc
@ -165,14 +165,13 @@ class DashboardController extends ActionController
|
|||||||
try {
|
try {
|
||||||
$dashboardConfig->saveIni();
|
$dashboardConfig->saveIni();
|
||||||
Notification::success(t('Dashlet has been removed from') . ' ' . $pane->getTitle());
|
Notification::success(t('Dashlet has been removed from') . ' ' . $pane->getTitle());
|
||||||
return true;
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$action->view->error = $e;
|
$action->view->error = $e;
|
||||||
$action->view->config = $dashboardConfig;
|
$action->view->config = $dashboardConfig;
|
||||||
$action->render('error');
|
$action->render('error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
return true;
|
||||||
});
|
});
|
||||||
$form->setTitle($this->translate('Remove Dashlet From Dashboard'));
|
$form->setTitle($this->translate('Remove Dashlet From Dashboard'));
|
||||||
$form->setRedirectUrl('dashboard/settings');
|
$form->setRedirectUrl('dashboard/settings');
|
||||||
@ -202,14 +201,13 @@ class DashboardController extends ActionController
|
|||||||
try {
|
try {
|
||||||
$dashboardConfig->saveIni();
|
$dashboardConfig->saveIni();
|
||||||
Notification::success(t('Dashboard has been removed') . ': ' . $pane->getTitle());
|
Notification::success(t('Dashboard has been removed') . ': ' . $pane->getTitle());
|
||||||
return true;
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$action->view->error = $e;
|
$action->view->error = $e;
|
||||||
$action->view->config = $dashboardConfig;
|
$action->view->config = $dashboardConfig;
|
||||||
$action->render('error');
|
$action->render('error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
return true;
|
||||||
});
|
});
|
||||||
$form->setTitle($this->translate('Remove Dashboard'));
|
$form->setTitle($this->translate('Remove Dashboard'));
|
||||||
$form->setRedirectUrl('dashboard/settings');
|
$form->setRedirectUrl('dashboard/settings');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user