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

Revert "Add Metrcs Management web UI " #25

Merged
merged 1 commit into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Changelog

## 0.3.1 / 2024-06-01

* [ENHANCEMENT] Added a new webpage, Metrics Management, based on the `/metrics-lifecycle-policies` API. This feature allows
for directly defining and managing policies for retaining Prometheus metrics. #23
* [ENHANCEMENT] Added support for dark mode on the Rules Management page. #16
* [ENHANCEMENT] Added support of filtering of rules by their type from the UI. #15

## 0.3.0 / 2024-05-26

* [ENHANCEMENT]
Expand Down
23 changes: 0 additions & 23 deletions src/api/v1/endpoints/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

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

@router.get("/", response_class=HTMLResponse,
Expand Down Expand Up @@ -39,25 +38,3 @@ async def rules_management_files(path, request: Request):
"method": request.method,
"request_path": request.url.path})
return f"{sts} {msg}"

@router.get("/metrics-management",
description="RRenders metrics management HTML page of this application",
include_in_schema=False)
async def metrics_management_page():
return FileResponse(f"{metrics_management}/index.html")

@router.get(
"/metrics-management/{path}",
description="Returns JavaScript and CSS files of the metrics management page",
include_in_schema=False)
async def metrics_management_files(path, request: Request):
if path in ["script.js", "style.css"]:
return FileResponse(f"{metrics_management}/{path}")
sts, msg = "404", "Not Found"
logger.info(
msg=msg,
extra={
"status": sts,
"method": request.method,
"request_path": request.url.path})
return f"{sts} {msg}"
2 changes: 1 addition & 1 deletion src/utils/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def openapi(app: FastAPI):
"providing additional features and addressing its limitations. "
"Running as a sidecar alongside the Prometheus server enables "
"users to extend the capabilities of the API.",
version="0.3.1",
version="0.3.0",
contact={
"name": "Hayk Davtyan",
"url": "https://hayk96.github.io",
Expand Down
4 changes: 0 additions & 4 deletions ui/homepage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@
<h1>The easiest Prometheus management interface</h1>
<button id="openPrometheusButton">Open Prometheus</button>
<button id="rulesManagementButton">Rules Management</button>
<button id="metricsManagementButton">Metrics Management</button>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
Expand All @@ -179,9 +178,6 @@ <h1>The easiest Prometheus management interface</h1>
document.getElementById('rulesManagementButton').onclick = function() {
window.location.href = window.location.origin + '/rules-management';
};
document.getElementById('metricsManagementButton').onclick = function() {
window.location.href = window.location.origin + '/metrics-management';
};
});
</script>
</body>
Expand Down
67 changes: 0 additions & 67 deletions ui/metrics-management/index.html

This file was deleted.

308 changes: 0 additions & 308 deletions ui/metrics-management/script.js

This file was deleted.

Loading