Commit 40dd084
feat(api/prometheus): add format_query endpoint for query formatting (#1846)
* feat(api/prometheus): add format_query endpoint for query formatting
The changes introduce a new `/format_query` API endpoint to handle query formatting in the Prometheus API. This includes implementing the `FormatQuery` function in `api.go` and adding corresponding test cases in `api_test.go` to ensure proper functionality.
Signed-off-by: yshngg <yshngg@outlook.com>
* Apply suggestion from @bwplotka
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Yusheng Guo <113574546+yshngg@users.noreply.github.com>
---------
Signed-off-by: yshngg <yshngg@outlook.com>
Signed-off-by: Yusheng Guo <113574546+yshngg@users.noreply.github.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>1 parent e77101d commit 40dd084
2 files changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| 384 | + | |
384 | 385 | | |
385 | 386 | | |
386 | 387 | | |
| |||
1380 | 1381 | | |
1381 | 1382 | | |
1382 | 1383 | | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
1383 | 1397 | | |
1384 | 1398 | | |
1385 | 1399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
243 | 250 | | |
244 | 251 | | |
245 | 252 | | |
| |||
1206 | 1213 | | |
1207 | 1214 | | |
1208 | 1215 | | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
1209 | 1223 | | |
1210 | 1224 | | |
1211 | 1225 | | |
| |||
0 commit comments