From fc7a98663f4743f0e38d671d41a9d31e2e8e628b Mon Sep 17 00:00:00 2001 From: mirivlad Date: Mon, 13 Apr 2026 16:25:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20HTML=20=D1=81=D1=82=D1=80=D1=83?= =?UTF-8?q?=D0=BA=D1=82=D1=83=D1=80=D0=B0=20=D0=B2=D0=BA=D0=BB=D0=B0=D0=B4?= =?UTF-8?q?=D0=BE=D0=BA=20(metrics/services/thresholds)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Перемещены закрывающие tab-pane metrics в правильное место - Сетевые графики и doughnut диски теперь внутри вкладки Метрики - Вкладки Сервисы и Пороги работают корректно Co-authored-by: Qwen-Coder --- .gitignore | 0 public/chartjs-plugin-crosshair.min.js | 0 public/chartjs-plugin-zoom.min.js | 0 src/Controllers/ServerDetailController.php | 4 ++-- templates/servers/detail.twig | 11 +++++++---- 5 files changed, 9 insertions(+), 6 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 public/chartjs-plugin-crosshair.min.js mode change 100644 => 100755 public/chartjs-plugin-zoom.min.js diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/public/chartjs-plugin-crosshair.min.js b/public/chartjs-plugin-crosshair.min.js old mode 100644 new mode 100755 diff --git a/public/chartjs-plugin-zoom.min.js b/public/chartjs-plugin-zoom.min.js old mode 100644 new mode 100755 diff --git a/src/Controllers/ServerDetailController.php b/src/Controllers/ServerDetailController.php index 4ea2f44..075d739 100755 --- a/src/Controllers/ServerDetailController.php +++ b/src/Controllers/ServerDetailController.php @@ -201,7 +201,7 @@ class ServerDetailController extends Model } // Типы метрик - $stmt = $this->pdo->query("SELECT id, name, unit FROM metric_names WHERE name NOT LIKE '%\_proc' ORDER BY name"); + $stmt = $this->pdo->query("SELECT id, name, unit FROM metric_names WHERE name NOT LIKE '%\_proc' AND name NOT LIKE 'disk_total_gb_%' AND name != 'disk_used' AND name != 'ram_total_gb' AND name NOT IN ('net_in', 'net_out') AND name NOT LIKE 'network_%' ORDER BY name"); $allMetricTypes = $stmt->fetchAll(); // Сервисы @@ -286,7 +286,7 @@ class ServerDetailController extends Model $id = $args['id']; $params = $request->getParsedBody(); - $stmt = $this->pdo->query("SELECT id, name FROM metric_names WHERE name NOT LIKE '%\_proc' ORDER BY name"); + $stmt = $this->pdo->query("SELECT id, name FROM metric_names WHERE name NOT LIKE '%\_proc' AND name NOT LIKE 'disk_total_gb_%' AND name != 'disk_used' AND name != 'ram_total_gb' AND name NOT IN ('net_in', 'net_out') AND name NOT LIKE 'network_%' ORDER BY name"); $metricTypes = $stmt->fetchAll(); $stmt = $this->pdo->prepare("DELETE FROM metric_thresholds WHERE server_id = :server_id"); diff --git a/templates/servers/detail.twig b/templates/servers/detail.twig index d78f2b4..a102c07 100755 --- a/templates/servers/detail.twig +++ b/templates/servers/detail.twig @@ -160,8 +160,6 @@ {% endif %} - - {% set net_interfaces = [] %} {% for metricName in metrics|keys %} @@ -173,8 +171,8 @@ {% for iface in net_interfaces %} {% if metrics['net_in_' ~ iface] is defined and metrics['net_out_' ~ iface] is defined %} -
-
+
+
Сеть: {{ iface }}
@@ -188,6 +186,8 @@ {% endif %} {% endfor %} + +
{% for metricName, metricData in metrics %} @@ -221,6 +221,9 @@ {% endif %} {% endfor %}
+
+ +