PyObservability 2.1.0__py3-none-any.whl → 2.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyobservability/main.py +6 -4
- pyobservability/static/app.js +7 -0
- pyobservability/static/styles.css +6 -1
- pyobservability/version.py +1 -1
- {pyobservability-2.1.0.dist-info → pyobservability-2.1.1.dist-info}/METADATA +1 -1
- {pyobservability-2.1.0.dist-info → pyobservability-2.1.1.dist-info}/RECORD +10 -10
- {pyobservability-2.1.0.dist-info → pyobservability-2.1.1.dist-info}/WHEEL +0 -0
- {pyobservability-2.1.0.dist-info → pyobservability-2.1.1.dist-info}/entry_points.txt +0 -0
- {pyobservability-2.1.0.dist-info → pyobservability-2.1.1.dist-info}/licenses/LICENSE +0 -0
- {pyobservability-2.1.0.dist-info → pyobservability-2.1.1.dist-info}/top_level.txt +0 -0
pyobservability/main.py
CHANGED
|
@@ -52,18 +52,20 @@ async def kuma():
|
|
|
52
52
|
"""Kuma endpoint to retrieve monitors from Kuma server.
|
|
53
53
|
|
|
54
54
|
Returns:
|
|
55
|
-
Dict[str, Any]:
|
|
56
|
-
|
|
55
|
+
List[Dict[str, Any]]:
|
|
56
|
+
List of monitors from Kuma server after filtering the required fields.
|
|
57
57
|
"""
|
|
58
58
|
try:
|
|
59
59
|
kuma_data = UptimeKumaClient().get_monitors()
|
|
60
|
-
LOGGER.info("Retrieved
|
|
60
|
+
LOGGER.info("Retrieved monitors from kuma server - %d found.", len(kuma_data))
|
|
61
61
|
except RuntimeError:
|
|
62
62
|
raise HTTPException(
|
|
63
63
|
status_code=HTTPStatus.SERVICE_UNAVAILABLE.real,
|
|
64
64
|
detail="Unable to retrieve data from kuma server.",
|
|
65
65
|
)
|
|
66
|
-
|
|
66
|
+
monitors = list(extract_monitors(kuma_data))
|
|
67
|
+
LOGGER.info("Processed [%d] monitors for UI payload.", len(monitors))
|
|
68
|
+
return monitors
|
|
67
69
|
|
|
68
70
|
|
|
69
71
|
async def health() -> Dict[str, str]:
|
pyobservability/static/app.js
CHANGED
|
@@ -825,6 +825,9 @@
|
|
|
825
825
|
function resetUI() {
|
|
826
826
|
firstMessage = true;
|
|
827
827
|
hideSpinners();
|
|
828
|
+
// Disable Kuma tab during loading if present
|
|
829
|
+
if (kumaTab) { kumaTab.disabled = true; }
|
|
830
|
+
|
|
828
831
|
const EMPTY_DATA = Array(MAX_POINTS).fill(null);
|
|
829
832
|
const EMPTY_LABELS = Array(MAX_POINTS).fill("");
|
|
830
833
|
|
|
@@ -938,6 +941,8 @@
|
|
|
938
941
|
if (firstMessage) {
|
|
939
942
|
hideSpinners();
|
|
940
943
|
firstMessage = false;
|
|
944
|
+
// Enable Kuma tab once initial data is loaded
|
|
945
|
+
if (kumaTab) { kumaTab.disabled = false; }
|
|
941
946
|
}
|
|
942
947
|
|
|
943
948
|
const now = new Date().toLocaleTimeString();
|
|
@@ -1271,5 +1276,7 @@
|
|
|
1271
1276
|
|
|
1272
1277
|
// Initialize nodes view by default
|
|
1273
1278
|
document.body.classList.add('nodes-view');
|
|
1279
|
+
// Disable until first metrics load
|
|
1280
|
+
if (kumaTab) { kumaTab.disabled = true; }
|
|
1274
1281
|
initWebSocket();
|
|
1275
1282
|
})();
|
|
@@ -51,7 +51,7 @@ html, body {
|
|
|
51
51
|
transition: all 0.2s;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.tab-btn:hover {
|
|
54
|
+
.tab-btn:hover:not(:disabled) {
|
|
55
55
|
color: #e6eef8;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -60,6 +60,11 @@ html, body {
|
|
|
60
60
|
border-bottom-color: var(--accent);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
.tab-btn:disabled {
|
|
64
|
+
opacity: 0.4;
|
|
65
|
+
cursor: not-allowed;
|
|
66
|
+
}
|
|
67
|
+
|
|
63
68
|
.brand {
|
|
64
69
|
font-weight: 700;
|
|
65
70
|
font-size: 18px;
|
pyobservability/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.1.
|
|
1
|
+
__version__ = "2.1.1"
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
pyobservability/__init__.py,sha256=yVBLyTohBiBKp0Otyl04IggPh8mhg3Er25u6eFyxMto,2618
|
|
2
2
|
pyobservability/kuma.py,sha256=4sB1M7-exzrObGGIh1yYQ22P40kHwsTfv4G1Xj9YYWw,3260
|
|
3
|
-
pyobservability/main.py,sha256=
|
|
3
|
+
pyobservability/main.py,sha256=sMcQRh4mmivs8Xssu_PcP698oc1AzmMt8Tv19BSdmdo,6152
|
|
4
4
|
pyobservability/monitor.py,sha256=i_Xf_DB-qLOp1b9wryekjwHIM8AnMrGTkuEg7e08bcM,7539
|
|
5
5
|
pyobservability/transport.py,sha256=S-84mgf-9yMj0H7VSAmueW9yosX_1XxdyNJC2EuQHQQ,8493
|
|
6
|
-
pyobservability/version.py,sha256=
|
|
6
|
+
pyobservability/version.py,sha256=zPJIgPGcoSNiD0qme18OnYJYE3A9VVytlhO-V5DaAW0,22
|
|
7
7
|
pyobservability/config/enums.py,sha256=rQZh2Q4-9ItQTQgxsYjqw-jNePpWHhvQUrbrQJBG5CI,313
|
|
8
8
|
pyobservability/config/settings.py,sha256=aCz1tZEg8fUA5gHCCDN_m3fgrH1axz2fvdalj4bszGs,6121
|
|
9
|
-
pyobservability/static/app.js,sha256=
|
|
10
|
-
pyobservability/static/styles.css,sha256=
|
|
9
|
+
pyobservability/static/app.js,sha256=rTj3WWTgkfHJR3qf19flGUJ-9OAeFtVX6Nm5vw51T0w,48862
|
|
10
|
+
pyobservability/static/styles.css,sha256=pSVrSpeeDHaNsqI-WI3PrtnaPRiuU5rIrpB8g6OlHBc,9486
|
|
11
11
|
pyobservability/templates/index.html,sha256=aqvHrxP_D2gSxYmsUkNMi1QH07pQNXh4VuXc51KBo5c,11826
|
|
12
|
-
pyobservability-2.1.
|
|
13
|
-
pyobservability-2.1.
|
|
14
|
-
pyobservability-2.1.
|
|
15
|
-
pyobservability-2.1.
|
|
16
|
-
pyobservability-2.1.
|
|
17
|
-
pyobservability-2.1.
|
|
12
|
+
pyobservability-2.1.1.dist-info/licenses/LICENSE,sha256=_sOIKJWdD2o1WwwDIwYB2qTP2nlSWqT5Tyg9jr1Xa4w,1070
|
|
13
|
+
pyobservability-2.1.1.dist-info/METADATA,sha256=1iEH3chJwsf8T2FKyXLA3xn4x6coVytWSSr83o_9G1w,7026
|
|
14
|
+
pyobservability-2.1.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
15
|
+
pyobservability-2.1.1.dist-info/entry_points.txt,sha256=DSGIr_VA8Tb3FYa2iNUYpf55eAvuFCAoInNS4ngXaME,57
|
|
16
|
+
pyobservability-2.1.1.dist-info/top_level.txt,sha256=p20T0EmihDYW1uMintRXr7X9bg3XWYKyoSbBHOVC1xI,16
|
|
17
|
+
pyobservability-2.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|