From 4e06b0414a01454efce39fefbba321b2db3a3182 Mon Sep 17 00:00:00 2001 From: Rui Zhu Date: Fri, 1 Mar 2024 17:42:36 -0500 Subject: [PATCH 1/2] highlight sidecars with matching host environment --- .../deploy_board/templates/hosts/host_details.html | 10 ++++++++++ .../deploy_board/templates/hosts/host_details.tmpl | 10 ++++++++++ deploy-board/deploy_board/webapp/host_views.py | 9 +++++++++ 3 files changed, 29 insertions(+) diff --git a/deploy-board/deploy_board/templates/hosts/host_details.html b/deploy-board/deploy_board/templates/hosts/host_details.html index 18e3263ab8..4c254168da 100644 --- a/deploy-board/deploy_board/templates/hosts/host_details.html +++ b/deploy-board/deploy_board/templates/hosts/host_details.html @@ -42,11 +42,21 @@ {% if agent_wrappers %}
+ {% if has_host_env_sidecar_agents %} + {% include "panel_heading.tmpl" with panel_title="Sidecar Agent Details" panel_body_id="sidecarAgentDetailsId" direction="down" copy_host_name_button=True %} +
+ This host has relevant sidecars in it's environment. These have been marked with green backgrounds for visibility. + {% else %} {% include "panel_heading.tmpl" with panel_title="Sidecar Agent Details" panel_body_id="sidecarAgentDetailsId" direction="right" copy_host_name_button=True %}
+ {% endif %} {% for agent_wrapper in agent_wrappers.sidecars %} {% with env=agent_wrapper.env agent=agent_wrapper.agent hostdetailsvalue=host_details|getValue:"Phobos Link" %} + {% if env and env_name == env.envName and stage_name == env.stageName %} + {% include "hosts/host_details.tmpl" with agent=agent env=env hostdetailsvalue=hostdetailsvalue host_related_sidecar=1%} + {% else %} {% include "hosts/host_details.tmpl" with agent=agent env=env hostdetailsvalue=hostdetailsvalue%} + {% endif %} {% endwith %} {% endfor %}
diff --git a/deploy-board/deploy_board/templates/hosts/host_details.tmpl b/deploy-board/deploy_board/templates/hosts/host_details.tmpl index 28058f96eb..3d722d0422 100644 --- a/deploy-board/deploy_board/templates/hosts/host_details.tmpl +++ b/deploy-board/deploy_board/templates/hosts/host_details.tmpl @@ -1,6 +1,10 @@ {% load utils %}
+ {% if host_related_sidecar %} +
+