Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 38fbcc5

Browse files
authored
Revert "Add Metrcs Management web UI (#24)"
This reverts commit 5bf9d5d.
1 parent 5bf9d5d commit 38fbcc5

File tree

10 files changed

+42
-1130
lines changed

10 files changed

+42
-1130
lines changed

CHANGELOG.md

-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# Changelog
22

3-
## 0.3.1 / 2024-06-01
4-
5-
* [ENHANCEMENT] Added a new webpage, Metrics Management, based on the `/metrics-lifecycle-policies` API. This feature allows
6-
for directly defining and managing policies for retaining Prometheus metrics. #23
7-
* [ENHANCEMENT] Added support for dark mode on the Rules Management page. #16
8-
* [ENHANCEMENT] Added support of filtering of rules by their type from the UI. #15
9-
103
## 0.3.0 / 2024-05-26
114

125
* [ENHANCEMENT]

src/api/v1/endpoints/web.py

-23
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
if arg_parser().get("web.enable_ui") == "true":
1111
rules_management = "ui/rules-management"
12-
metrics_management = "ui/metrics-management"
1312
logger.info("Starting web management UI")
1413

1514
@router.get("/", response_class=HTMLResponse,
@@ -39,25 +38,3 @@ async def rules_management_files(path, request: Request):
3938
"method": request.method,
4039
"request_path": request.url.path})
4140
return f"{sts} {msg}"
42-
43-
@router.get("/metrics-management",
44-
description="RRenders metrics management HTML page of this application",
45-
include_in_schema=False)
46-
async def metrics_management_page():
47-
return FileResponse(f"{metrics_management}/index.html")
48-
49-
@router.get(
50-
"/metrics-management/{path}",
51-
description="Returns JavaScript and CSS files of the metrics management page",
52-
include_in_schema=False)
53-
async def metrics_management_files(path, request: Request):
54-
if path in ["script.js", "style.css"]:
55-
return FileResponse(f"{metrics_management}/{path}")
56-
sts, msg = "404", "Not Found"
57-
logger.info(
58-
msg=msg,
59-
extra={
60-
"status": sts,
61-
"method": request.method,
62-
"request_path": request.url.path})
63-
return f"{sts} {msg}"

src/utils/openapi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def openapi(app: FastAPI):
1616
"providing additional features and addressing its limitations. "
1717
"Running as a sidecar alongside the Prometheus server enables "
1818
"users to extend the capabilities of the API.",
19-
version="0.3.1",
19+
version="0.3.0",
2020
contact={
2121
"name": "Hayk Davtyan",
2222
"url": "https://hayk96.github.io",

ui/homepage/index.html

-4
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@
168168
<h1>The easiest Prometheus management interface</h1>
169169
<button id="openPrometheusButton">Open Prometheus</button>
170170
<button id="rulesManagementButton">Rules Management</button>
171-
<button id="metricsManagementButton">Metrics Management</button>
172171
</div>
173172
<script>
174173
document.addEventListener('DOMContentLoaded', function() {
@@ -179,9 +178,6 @@ <h1>The easiest Prometheus management interface</h1>
179178
document.getElementById('rulesManagementButton').onclick = function() {
180179
window.location.href = window.location.origin + '/rules-management';
181180
};
182-
document.getElementById('metricsManagementButton').onclick = function() {
183-
window.location.href = window.location.origin + '/metrics-management';
184-
};
185181
});
186182
</script>
187183
</body>

ui/metrics-management/index.html

-67
This file was deleted.

ui/metrics-management/script.js

-308
This file was deleted.

0 commit comments

Comments
 (0)