44
55use Icinga \Date \DateFormatter ;
66use Icinga \Module \Businessprocess \BpNode ;
7- use Icinga \Module \Businessprocess \HostNode ;
87use Icinga \Module \Businessprocess \ImportedNode ;
98use Icinga \Module \Businessprocess \MonitoredNode ;
109use Icinga \Module \Businessprocess \Node ;
1110use Icinga \Module \Businessprocess \Renderer \Renderer ;
12- use Icinga \Module \Businessprocess \ServiceNode ;
1311use Icinga \Web \Url ;
1412use ipl \Html \BaseHtmlElement ;
1513use ipl \Html \Html ;
@@ -202,14 +200,14 @@ protected function addDetailsActions()
202200 'href ' => $ url ->with ('mode ' , 'tile ' ),
203201 'title ' => mt ('businessprocess ' , 'Show tiles for this subtree ' )
204202 ],
205- Html:: tag ( ' i ' , [ ' class ' => ' icon icon-dashboard ' ] )
203+ new Icon ( ' grip ' )
206204 ))->add (Html::tag (
207205 'a ' ,
208206 [
209207 'href ' => $ url ->with ('mode ' , 'tree ' ),
210208 'title ' => mt ('businessprocess ' , 'Show this subtree as a tree ' )
211209 ],
212- Html:: tag ( ' i ' , [ ' class ' => ' icon icon- sitemap '] )
210+ new Icon ( ' sitemap ' )
213211 ));
214212 if ($ node instanceof ImportedNode) {
215213 if ($ node ->getBpConfig ()->hasNode ($ node ->getName ())) {
@@ -223,7 +221,7 @@ protected function addDetailsActions()
223221 'Show this process as part of its original configuration '
224222 )
225223 ],
226- Html:: tag ( ' i ' , [ ' class ' => ' icon icon-forward ' ] )
224+ new Icon ( ' share ' )
227225 ));
228226 }
229227 }
@@ -238,28 +236,19 @@ protected function addDetailsActions()
238236 'class ' => 'node-info ' ,
239237 'title ' => sprintf ('%s: %s ' , mt ('businessprocess ' , 'More information ' ), $ url )
240238 ],
241- Html:: tag ( ' i ' , [ ' class ' => ' icon icon- info-circled ' ] )
239+ new Icon ( ' info ' )
242240 );
243241 if (preg_match ('#^http(?:s)?://# ' , $ url )) {
244242 $ link ->addAttributes (['target ' => '_blank ' ]);
245243 }
246244 $ this ->actions ()->add ($ link );
247245 }
248246 } else {
249- // $url = $this->makeMonitoredNodeUrl($node);
250- if ($ node instanceof ServiceNode) {
251- $ this ->actions ()->add (Html::tag (
252- 'a ' ,
253- ['href ' => $ node ->getUrl (), 'data-base-target ' => '_next ' ],
254- Html::tag ('i ' , ['class ' => 'icon icon-service ' ])
255- ));
256- } elseif ($ node instanceof HostNode) {
257- $ this ->actions ()->add (Html::tag (
258- 'a ' ,
259- ['href ' => $ node ->getUrl (), 'data-base-target ' => '_next ' ],
260- Html::tag ('i ' , ['class ' => 'icon icon-host ' ])
261- ));
262- }
247+ $ this ->actions ()->add (Html::tag (
248+ 'a ' ,
249+ ['href ' => $ node ->getUrl (), 'data-base-target ' => '_next ' ],
250+ $ node ->getIcon ()
251+ ));
263252 }
264253
265254 if ($ node ->isAcknowledged ()) {
@@ -299,7 +288,7 @@ protected function addActionLinks()
299288 'Show the business impact of this node by simulating a specific state '
300289 )
301290 ],
302- Html:: tag ( ' i ' , [ ' class ' => ' icon icon -magic' ] )
291+ new Icon ( ' wand -magic-sparkles ' )
303292 ));
304293
305294 $ this ->actions ()->add (Html::tag (
@@ -310,7 +299,7 @@ protected function addActionLinks()
310299 ->with ('editmonitorednode ' , $ this ->node ->getName ()),
311300 'title ' => mt ('businessprocess ' , 'Modify this monitored node ' )
312301 ],
313- Html:: tag ( ' i ' , [ ' class ' => ' icon icon- edit '] )
302+ new Icon ( ' edit ' )
314303 ));
315304 }
316305
@@ -327,7 +316,7 @@ protected function addActionLinks()
327316 ->with ('editnode ' , $ this ->node ->getName ()),
328317 'title ' => mt ('businessprocess ' , 'Modify this business process node ' )
329318 ],
330- Html:: tag ( ' i ' , [ ' class ' => ' icon icon- edit '] )
319+ new Icon ( ' edit ' )
331320 ));
332321
333322 $ addUrl = $ baseUrl ->with ([
@@ -341,7 +330,7 @@ protected function addActionLinks()
341330 'href ' => $ addUrl ,
342331 'title ' => mt ('businessprocess ' , 'Add a new sub-node to this business process ' )
343332 ],
344- Html:: tag ( ' i ' , [ ' class ' => ' icon icon- plus '] )
333+ new Icon ( ' plus ' )
345334 ));
346335 }
347336 }
@@ -358,7 +347,7 @@ protected function addActionLinks()
358347 'href ' => $ baseUrl ->with ($ params ),
359348 'title ' => mt ('businessprocess ' , 'Delete this node ' )
360349 ],
361- Html:: tag ( ' i ' , [ ' class ' => ' icon icon-cancel ' ] )
350+ new Icon ( ' xmark ' )
362351 ));
363352 }
364353 }
0 commit comments