Merge 22c3a55d25fd09729b63932d15e46b4d465fbf37 into 11251481dcac73721c363731e6f765e8cc55bcac

This commit is contained in:
Ravi Kumar Kempapura Srinivasa 2024-11-04 13:32:21 +00:00 committed by GitHub
commit 1fc92af099
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 16 additions and 12 deletions

View File

@ -129,13 +129,14 @@ class ConfigController extends Controller
'url' => 'config/modules' 'url' => 'config/modules'
)) ))
->activate('modules'); ->activate('modules');
$this->view->modules = Icinga::app()->getModuleManager()->select() $modules = Icinga::app()->getModuleManager()->select()
->from('modules') ->from('modules')
->order('enabled', 'desc') ->order('enabled', 'desc')
->order('installed', 'asc') ->order('installed', 'asc')
->order('name'); ->order('name');
$this->setupLimitControl(); $this->setupLimitControl();
$this->setupPaginationControl($this->view->modules); $this->setupPaginationControl($modules);
$this->view->modules = $modules;
$this->view->title = $this->translate('Modules'); $this->view->title = $this->translate('Modules');
} }

View File

@ -50,10 +50,11 @@ class ListController extends Controller
. 'T[0-9]{2}(?::[0-9]{2}){2}(?:[\+\-][0-9]{2}:[0-9]{2})?)' // time . 'T[0-9]{2}(?::[0-9]{2}){2}(?:[\+\-][0-9]{2}:[0-9]{2})?)' // time
. ' - (?<loglevel>[A-Za-z]+) - (?<message>.*)(?!.)/msS' // loglevel, message . ' - (?<loglevel>[A-Za-z]+) - (?<message>.*)(?!.)/msS' // loglevel, message
))); )));
$this->view->logData = $resource->select()->order('DESC'); $logData = $resource->select()->order('DESC');
$this->setupLimitControl(); $this->setupLimitControl();
$this->setupPaginationControl($this->view->logData); $this->setupPaginationControl($logData);
$this->view->logData = $logData;
$this->view->title = $this->translate('Application Log'); $this->view->title = $this->translate('Application Log');
} }
} }

View File

@ -59,7 +59,7 @@ class RoleController extends AuthBackendController
public function listAction() public function listAction()
{ {
$this->createListTabs()->activate('role/list'); $this->createListTabs()->activate('role/list');
$this->view->roles = (new RolesConfig()) $roles = (new RolesConfig())
->select(); ->select();
$sortAndFilterColumns = [ $sortAndFilterColumns = [
@ -69,10 +69,11 @@ class RoleController extends AuthBackendController
'permissions' => $this->translate('Permissions') 'permissions' => $this->translate('Permissions')
]; ];
$this->setupFilterControl($this->view->roles, $sortAndFilterColumns, ['name']); $this->setupFilterControl($roles, $sortAndFilterColumns, ['name']);
$this->setupLimitControl(); $this->setupLimitControl();
$this->setupPaginationControl($this->view->roles); $this->setupPaginationControl($roles);
$this->setupSortControl($sortAndFilterColumns, $this->view->roles, ['name']); $this->setupSortControl($sortAndFilterColumns, $roles, ['name']);
$this->view->roles = $roles;
} }
/** /**

View File

@ -91,7 +91,7 @@ class ShowController extends Controller
$this->applyRestriction('monitoring/filter/objects', $notifications); $this->applyRestriction('monitoring/filter/objects', $notifications);
$this->view->notifications = $notifications; $this->view->notifications = $notifications;
$this->setupLimitControl(); $this->setupLimitControl();
$this->setupPaginationControl($this->view->notifications); $this->setupPaginationControl($notifications);
$this->view->title = $contact->contact_name; $this->view->title = $contact->contact_name;
} }

View File

@ -117,11 +117,12 @@ abstract class MonitoredObjectController extends Controller
public function historyAction() public function historyAction()
{ {
$this->getTabs()->activate('history'); $this->getTabs()->activate('history');
$this->view->history = $this->object->fetchEventhistory()->eventhistory; $history = $this->object->fetchEventhistory()->eventhistory;
$this->applyRestriction('monitoring/filter/objects', $this->view->history); $this->applyRestriction('monitoring/filter/objects', $history);
$this->setupLimitControl(50); $this->setupLimitControl(50);
$this->setupPaginationControl($this->view->history, 50); $this->setupPaginationControl($history, 50);
$this->view->history = $history;
$this->view->object = $this->object; $this->view->object = $this->object;
$this->render('object/detail-history', null, true); $this->render('object/detail-history', null, true);
} }