99use Icinga \Web \Controller ;
1010use Icinga \Web \Notification ;
1111
12+ /**
13+ * GraphController for the graphs configuration table and forms.
14+ */
1215class GraphController extends Controller
1316{
1417 public function init ()
@@ -38,8 +41,7 @@ public function newAction()
3841
3942 $ graphs = new GraphForm ();
4043
41- $ graphs
42- ->setIniConfig ($ this ->Config ('graphs ' ))
44+ $ graphs ->setIniConfig ($ this ->Config ('graphs ' ))
4345 ->setRedirectUrl ('grafana/graph ' )
4446 ->handleRequest ();
4547
@@ -61,9 +63,7 @@ public function removeAction()
6163 $ graphs = new GraphForm ();
6264
6365 try {
64- $ graphs
65- ->setIniConfig ($ this ->Config ('graphs ' ))
66- ->bind ($ graph );
66+ $ graphs ->setIniConfig ($ this ->Config ('graphs ' ))->bind ($ graph );
6767 } catch (NotFoundError $ e ) {
6868 $ this ->httpNotFound ($ e ->getMessage ());
6969 }
@@ -79,8 +79,7 @@ public function removeAction()
7979 }
8080 ]);
8181
82- $ confirmation
83- ->setRedirectUrl ('grafana/graph ' )
82+ $ confirmation ->setRedirectUrl ('grafana/graph ' )
8483 ->setSubmitLabel ($ this ->translate ('Remove graph ' ))
8584 ->handleRequest ();
8685
@@ -102,16 +101,12 @@ public function updateAction()
102101 $ graphs = new GraphForm ();
103102
104103 try {
105- $ graphs
106- ->setIniConfig ($ this ->Config ('graphs ' ))
107- ->bind ($ graph );
104+ $ graphs ->setIniConfig ($ this ->Config ('graphs ' ))->bind ($ graph );
108105 } catch (NotFoundError $ e ) {
109106 $ this ->httpNotFound ($ e ->getMessage ());
110107 }
111108
112- $ graphs
113- ->setRedirectUrl ('grafana/graph ' )
114- ->handleRequest ();
109+ $ graphs ->setRedirectUrl ('grafana/graph ' )->handleRequest ();
115110
116111 $ this ->view ->form = $ graphs ;
117112 }
0 commit comments