File tree 5 files changed +18
-12
lines changed
library/Monitoring/Web/Controller
5 files changed +18
-12
lines changed Original file line number Diff line number Diff line change 5
5
6
6
use Exception ;
7
7
use Icinga \Application \Version ;
8
+ use Icinga \Data \SimpleQuery ;
8
9
use InvalidArgumentException ;
9
10
use Icinga \Application \Config ;
10
11
use Icinga \Application \Icinga ;
@@ -129,13 +130,14 @@ public function modulesAction()
129
130
'url ' => 'config/modules '
130
131
))
131
132
->activate ('modules ' );
132
- $ this -> view -> modules = Icinga::app ()->getModuleManager ()->select ()
133
+ $ modules = Icinga::app ()->getModuleManager ()->select ()
133
134
->from ('modules ' )
134
135
->order ('enabled ' , 'desc ' )
135
136
->order ('installed ' , 'asc ' )
136
137
->order ('name ' );
137
138
$ this ->setupLimitControl ();
138
- $ this ->setupPaginationControl ($ this ->view ->modules );
139
+ $ this ->setupPaginationControl ($ modules );
140
+ $ this ->view ->modules = $ modules ;
139
141
$ this ->view ->title = $ this ->translate ('Modules ' );
140
142
}
141
143
Original file line number Diff line number Diff line change @@ -50,10 +50,11 @@ public function applicationlogAction()
50
50
. 'T[0-9]{2}(?::[0-9]{2}){2}(?:[\+\-][0-9]{2}:[0-9]{2})?) ' // time
51
51
. ' - (?<loglevel>[A-Za-z]+) - (?<message>.*)(?!.)/msS ' // loglevel, message
52
52
)));
53
- $ this -> view -> logData = $ resource ->select ()->order ('DESC ' );
53
+ $ logData = $ resource ->select ()->order ('DESC ' );
54
54
55
55
$ this ->setupLimitControl ();
56
- $ this ->setupPaginationControl ($ this ->view ->logData );
56
+ $ this ->setupPaginationControl ($ logData );
57
+ $ this ->view ->logData = $ logData ;
57
58
$ this ->view ->title = $ this ->translate ('Application Log ' );
58
59
}
59
60
}
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public function indexAction()
59
59
public function listAction ()
60
60
{
61
61
$ this ->createListTabs ()->activate ('role/list ' );
62
- $ this -> view -> roles = (new RolesConfig ())
62
+ $ roles = (new RolesConfig ())
63
63
->select ();
64
64
65
65
$ sortAndFilterColumns = [
@@ -69,10 +69,11 @@ public function listAction()
69
69
'permissions ' => $ this ->translate ('Permissions ' )
70
70
];
71
71
72
- $ this ->setupFilterControl ($ this -> view -> roles , $ sortAndFilterColumns , ['name ' ]);
72
+ $ this ->setupFilterControl ($ roles , $ sortAndFilterColumns , ['name ' ]);
73
73
$ this ->setupLimitControl ();
74
- $ this ->setupPaginationControl ($ this ->view ->roles );
75
- $ this ->setupSortControl ($ sortAndFilterColumns , $ this ->view ->roles , ['name ' ]);
74
+ $ this ->setupPaginationControl ($ roles );
75
+ $ this ->setupSortControl ($ sortAndFilterColumns , $ roles , ['name ' ]);
76
+ $ this ->view ->roles = $ roles ;
76
77
}
77
78
78
79
/**
Original file line number Diff line number Diff line change 6
6
use Icinga \Data \Filter \FilterEqual ;
7
7
use Icinga \Module \Monitoring \Backend \MonitoringBackend ;
8
8
use Icinga \Module \Monitoring \Controller ;
9
+ use Icinga \Module \Monitoring \DataView \DataView ;
9
10
use Icinga \Security \SecurityException ;
10
11
use Icinga \Web \Url ;
11
12
@@ -91,7 +92,7 @@ public function contactAction()
91
92
$ this ->applyRestriction ('monitoring/filter/objects ' , $ notifications );
92
93
$ this ->view ->notifications = $ notifications ;
93
94
$ this ->setupLimitControl ();
94
- $ this ->setupPaginationControl ($ this -> view -> notifications );
95
+ $ this ->setupPaginationControl ($ notifications );
95
96
$ this ->view ->title = $ contact ->contact_name ;
96
97
}
97
98
Original file line number Diff line number Diff line change @@ -117,11 +117,12 @@ public function showAction()
117
117
public function historyAction ()
118
118
{
119
119
$ this ->getTabs ()->activate ('history ' );
120
- $ this -> view -> history = $ this ->object ->fetchEventhistory ()->eventhistory ;
121
- $ this ->applyRestriction ('monitoring/filter/objects ' , $ this -> view -> history );
120
+ $ history = $ this ->object ->fetchEventhistory ()->eventhistory ;
121
+ $ this ->applyRestriction ('monitoring/filter/objects ' , $ history );
122
122
123
123
$ this ->setupLimitControl (50 );
124
- $ this ->setupPaginationControl ($ this ->view ->history , 50 );
124
+ $ this ->setupPaginationControl ($ history , 50 );
125
+ $ this ->view ->history = $ history ;
125
126
$ this ->view ->object = $ this ->object ;
126
127
$ this ->render ('object/detail-history ' , null , true );
127
128
}
You can’t perform that action at this time.
0 commit comments