@@ 39-46 (lines=8) @@ | ||
36 | }); |
|
37 | ||
38 | // Profile Runs routes |
|
39 | $app->get('/', static function () use ($di, $app): void { |
|
40 | /** @var Controller\RunController $controller */ |
|
41 | $controller = $di[Controller\RunController::class]; |
|
42 | $request = $app->request(); |
|
43 | $response = $app->response(); |
|
44 | ||
45 | $controller->index($request, $response); |
|
46 | })->setName('home'); |
|
47 | ||
48 | $app->get('/run/view', static function () use ($di, $app): void { |
|
49 | /** @var Controller\RunController $controller */ |
|
@@ 48-55 (lines=8) @@ | ||
45 | $controller->index($request, $response); |
|
46 | })->setName('home'); |
|
47 | ||
48 | $app->get('/run/view', static function () use ($di, $app): void { |
|
49 | /** @var Controller\RunController $controller */ |
|
50 | $controller = $di[Controller\RunController::class]; |
|
51 | $request = $app->request(); |
|
52 | $response = $app->response(); |
|
53 | ||
54 | $controller->view($request, $response); |
|
55 | })->setName('run.view'); |
|
56 | ||
57 | $app->get('/run/delete', static function () use ($di, $app): void { |
|
58 | /** @var Controller\RunController $controller */ |
|
@@ 125-132 (lines=8) @@ | ||
122 | $controller->callgraph($request); |
|
123 | })->setName('run.callgraph'); |
|
124 | ||
125 | $app->get('/run/callgraph/data', static function () use ($di, $app): void { |
|
126 | /** @var Controller\RunController $controller */ |
|
127 | $controller = $di[Controller\RunController::class]; |
|
128 | $request = $app->request(); |
|
129 | $response = $app->response(); |
|
130 | ||
131 | $controller->callgraphData($request, $response); |
|
132 | })->setName('run.callgraph.data'); |
|
133 | ||
134 | $app->get('/run/callgraph/dot', static function () use ($di, $app): void { |
|
135 | /** @var Controller\RunController $controller */ |
|
@@ 134-141 (lines=8) @@ | ||
131 | $controller->callgraphData($request, $response); |
|
132 | })->setName('run.callgraph.data'); |
|
133 | ||
134 | $app->get('/run/callgraph/dot', static function () use ($di, $app): void { |
|
135 | /** @var Controller\RunController $controller */ |
|
136 | $controller = $di[Controller\RunController::class]; |
|
137 | $request = $app->request(); |
|
138 | $response = $app->response(); |
|
139 | ||
140 | $controller->callgraphDataDot($request, $response); |
|
141 | })->setName('run.callgraph.dot'); |
|
142 | ||
143 | // Import route |
|
144 | $app->post('/run/import', static function () use ($di, $app): void { |
|
@@ 144-151 (lines=8) @@ | ||
141 | })->setName('run.callgraph.dot'); |
|
142 | ||
143 | // Import route |
|
144 | $app->post('/run/import', static function () use ($di, $app): void { |
|
145 | /** @var Controller\ImportController $controller */ |
|
146 | $controller = $di[Controller\ImportController::class]; |
|
147 | $request = $app->request(); |
|
148 | $response = $app->response(); |
|
149 | ||
150 | $controller->import($request, $response); |
|
151 | })->setName('run.import'); |
|
152 | ||
153 | // Watch function routes. |
|
154 | $app->get('/watch', static function () use ($di): void { |
|
@@ 183-190 (lines=8) @@ | ||
180 | $controller->help($request); |
|
181 | })->setName('custom.help'); |
|
182 | ||
183 | $app->post('/custom/query', static function () use ($di, $app): void { |
|
184 | /** @var Controller\CustomController $controller */ |
|
185 | $controller = $di[Controller\CustomController::class]; |
|
186 | $request = $app->request(); |
|
187 | $response = $app->response(); |
|
188 | ||
189 | $controller->query($request, $response); |
|
190 | })->setName('custom.query'); |
|
191 | ||
192 | // Waterfall routes |
|
193 | $app->get('/waterfall', static function () use ($di): void { |
|
@@ 199-206 (lines=8) @@ | ||
196 | $controller->index(); |
|
197 | })->setName('waterfall.list'); |
|
198 | ||
199 | $app->get('/waterfall/data', static function () use ($di, $app): void { |
|
200 | /** @var Controller\WaterfallController $controller */ |
|
201 | $controller = $di[Controller\WaterfallController::class]; |
|
202 | $request = $app->request(); |
|
203 | $response = $app->response(); |
|
204 | ||
205 | $controller->query($request, $response); |
|
206 | })->setName('waterfall.data'); |
|
207 | ||
208 | // Metrics |
|
209 | $app->get('/metrics', static function () use ($di, $app): void { |