From 0f24f599cb69c964c865cca874840672fbdd026a Mon Sep 17 00:00:00 2001 From: Ludek Novy <13610612+ludeknovy@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:42:12 +0200 Subject: [PATCH 1/2] Refactor monitoring stats layout and initialization (#415) Replaced modal-based layout with a card-based layout in monitoring-stats.component.html to improve UI consistency. Added OnInit interface to MonitoringStatsComponent for better chart initialization. Removed redundant component placements and adjusted CSS styles for better spacing. --- .../item-detail/item-detail.component.html | 17 ++++++++-- .../monitoring-stats.component.css | 5 +++ .../monitoring-stats.component.html | 31 +++++++++---------- .../monitoring-stats.component.ts | 11 ++++--- 4 files changed, 40 insertions(+), 24 deletions(-) diff --git a/src/app/item-detail/item-detail.component.html b/src/app/item-detail/item-detail.component.html index 739f1edb..abb9f1ef 100644 --- a/src/app/item-detail/item-detail.component.html +++ b/src/app/item-detail/item-detail.component.html @@ -337,8 +337,6 @@
Summary
Max CPU usage
{{itemData.monitoring.cpu.max}}% - -
@@ -419,6 +417,8 @@
Status Codes Chart
+ +
@@ -515,6 +515,19 @@
Target System Statistics + Monitoring + +
+
+ + +
+
+ +
+ +
diff --git a/src/app/item-detail/monitoring-stats/monitoring-stats.component.css b/src/app/item-detail/monitoring-stats/monitoring-stats.component.css index 5e76fd30..db9e4665 100644 --- a/src/app/item-detail/monitoring-stats/monitoring-stats.component.css +++ b/src/app/item-detail/monitoring-stats/monitoring-stats.component.css @@ -11,3 +11,8 @@ .monitoring-data:hover { color: #105196 } + + +.card { + margin-top: 20px; +} diff --git a/src/app/item-detail/monitoring-stats/monitoring-stats.component.html b/src/app/item-detail/monitoring-stats/monitoring-stats.component.html index 17f6812b..df506f4b 100644 --- a/src/app/item-detail/monitoring-stats/monitoring-stats.component.html +++ b/src/app/item-detail/monitoring-stats/monitoring-stats.component.html @@ -1,19 +1,16 @@ - - -
-

{{itemData.overview.maxVu}}

+

{{ itemData.overview.maxVu }}

@@ -112,9 +114,11 @@

{{itemData.overview.maxVu}}

-

{{itemData.overview.throughput > 1000 ? - Math.round(itemData.overview.throughput) : itemData.overview.throughput}} reqs/s +

{{ + itemData.overview.throughput > 1000 ? + Math.round(itemData.overview.throughput) : itemData.overview.throughput + }} reqs/s

-
+
-

{{ - Math.round(((itemData.overview.percentil || itemData.overview.percentile90) / 1000) * 100) / 100}} s +

{{ + Math.round(((itemData.overview.percentil || itemData.overview.percentile90) / 1000) * 100) / 100 + }} s

-

{{ - itemData.overview.percentil || itemData.overview.percentile90}} ms +

{{ + itemData.overview.percentil || itemData.overview.percentile90 + }} ms

@@ -144,12 +153,15 @@

{{ - Math.round((itemData.overview.percentile95 / 1000) * 100) / 100}} s + Math.round((itemData.overview.percentile95 / 1000) * 100) / 100 + }} s

{{ - itemData.overview.percentile95}} ms + itemData.overview.percentile95 + }} ms

-

N/A ms

+

N/A ms

@@ -160,12 +172,15 @@

N/A

{{ - Math.round((itemData.overview.percentile99 / 1000) * 100) / 100}} s + Math.round((itemData.overview.percentile99 / 1000) * 100) / 100 + }} s

{{ - itemData.overview.percentile99}} ms + itemData.overview.percentile99 + }} ms

-

N/A ms

+

N/A ms

@@ -175,11 +190,13 @@

N/A

{{ - Math.round((itemData.overview.avgResponseTime / 1000) * 100) / 100}} s

{{ - itemData.overview.avgResponseTime}} ms + itemData.overview.avgResponseTime + }} ms

@@ -190,11 +207,13 @@

{{

{{ - Math.round((itemData.overview.avgLatency / 1000) * 100) / 100}} s + Math.round((itemData.overview.avgLatency / 1000) * 100) / 100 + }} s

{{ - itemData.overview.avgLatency}} ms + itemData.overview.avgLatency + }} ms