- {% include "deploys/deploy_progress.tmpl" %}
+ {% include "deploys/deploy_progress.html" %}
{% include "deploys/deploy_add_ons.tmpl" %}
diff --git a/deploy-board/deploy_board/webapp/env_views.py b/deploy-board/deploy_board/webapp/env_views.py
index e09f787b88..ebeef6332a 100644
--- a/deploy-board/deploy_board/webapp/env_views.py
+++ b/deploy-board/deploy_board/webapp/env_views.py
@@ -248,7 +248,7 @@ def update_deploy_progress(request, name, stage):
"accounts": accounts,
}
- html = render_to_string('deploys/deploy_progress.tmpl', context)
+ html = render_to_string('deploys/deploy_progress.html', context)
response = HttpResponse(html)
@@ -628,7 +628,7 @@ def _get_last_cluster_refresh_status(request, env):
return replace_summaries["clusterRollingUpdateStatuses"][0]
except:
return None
-
+
def _is_cluster_auto_refresh_enabled(request, env):
try:
cluster_name = get_cluster_name(request, env.get('envName'), env.get('stageName'), env=env)
@@ -1140,9 +1140,9 @@ def remove_stage(request, name, stage):
return response
-def get_pipeline_url_from_build_info(build):
+def get_pipeline_url_from_build_info(build):
if build['publishInfo'] and re.findall("https://[\w\d\-\.]*/job/[\w\d\-\.]*/[\d]*(/)?", build['publishInfo']):
- return re.sub("/[\d]*(/)?$", '', build['publishInfo'])
+ return re.sub("/[\d]*(/)?$", '', build['publishInfo'])
if build['publishInfo'] and re.findall("https://[\w\d\-\.]*/job/[\w\d\-\.]*/?", build['publishInfo']):
return build['publishInfo']
return False
@@ -1154,18 +1154,18 @@ def get_builds(request, name, stage):
if env_promote['type'] == 'AUTO' and env_promote['predStage'] and \
env_promote['predStage'] == environs_helper.BUILD_STAGE:
show_lock = True
-
+
if 'buildName' not in env and not env['buildName']:
html = render_to_string('builds/simple_builds.tmpl', {
"builds": [],
- "env": env,
+ "env": env,
"show_lock": show_lock,
})
return HttpResponse(html)
current_publish_date = 0
- build_deploy_pipeline_url = False
-
+ build_deploy_pipeline_url = False
+
if 'deployId' in env and env['deployId']:
deploy = deploys_helper.get(request, env['deployId'])
build = builds_helper.get_build(request, deploy['buildId'])
@@ -1196,7 +1196,7 @@ def get_builds(request, name, stage):
html = render_to_string('builds/simple_builds.tmpl', {
"builds": new_builds,
"build_deploy_pipeline_url" : build_deploy_pipeline_url,
- "current_publish_date": current_publish_date,
+ "current_publish_date": current_publish_date,
"env": env,
"show_lock": show_lock,
})
From 0aee49c867c470dc97a93f00d2fa4b91de33e246 Mon Sep 17 00:00:00 2001
From: Ian Roquebert <72234714+gzpcho@users.noreply.github.com>
Date: Thu, 23 May 2024 01:07:04 +0000
Subject: [PATCH 3/8] Reorganize components in host panel
---
.../templates/deploys/deploy_progress.html | 293 ++++++++++++++++++
1 file changed, 293 insertions(+)
create mode 100644 deploy-board/deploy_board/templates/deploys/deploy_progress.html
diff --git a/deploy-board/deploy_board/templates/deploys/deploy_progress.html b/deploy-board/deploy_board/templates/deploys/deploy_progress.html
new file mode 100644
index 0000000000..7b5b14244d
--- /dev/null
+++ b/deploy-board/deploy_board/templates/deploys/deploy_progress.html
@@ -0,0 +1,293 @@
+{% load utils %}
+{% load static %}
+{% with deploy=report.currentDeployStat.deploy build=report.currentDeployStat.build tag=report.currentDeployStat.buildTag %}
+ {% include "deploys/deploy_progress_summary.tmpl" %}
+ {% if report.showMode != "simple" %}
+
+
+
Hosts
+
+
+
+
+
+
+ |
+ {% for key, value in report.currentDeployStat.stageDistMap.items %}
+ {% if display_stopping_hosts == "true" or key != "STOPPING" and key != "STOPPED" %}
+
+
+ {{ key }}
+
+ |
+ {% endif %}
+ {% endfor %}
+
+ Total
+ |
+
+
+
+
+ Current({{ build.commitShort }})
+
+ |
+ {% for key, value in report.currentDeployStat.stageDistMap.items %}
+ {% if display_stopping_hosts == "true" or key != "STOPPING" and key != "STOPPED" %}
+
+
+ {{ value }}
+
+ |
+ {% endif %}
+ {% endfor %}
+
+
+ {{ report.currentDeployStat.total }}
+
+ |
+
+ {% for deployStat in report.deprecatedDeployStats %}
+
+
+
+ Previous({{ deployStat.build.commitShort }})
+
+ |
+ {% for key, value in deployStat.stageDistMap.items %}
+ {% if display_stopping_hosts == "true" or key != "STOPPING" and key != "STOPPED" %}
+
+
+ {{ value }}
+
+ |
+ {% endif %}
+ {% endfor %}
+
+
+ {{ deployStat.total }}
+
+ |
+
+ {% endfor %}
+
+
+
+
+
+ {% if report.firstTimeAgentStats %}
+
+ {% endif %}
+ {% if report.provisioningHosts %}
+
+ {% endif %}
+ {% if report.missingHosts %}
+
+ {% endif %}
+
+
+
+ {% endif %}
+{% endwith %}
+
From f47c33a983a1f929d40f75df8a0eb88976bfa5e9 Mon Sep 17 00:00:00 2001
From: Ian Roquebert <72234714+gzpcho@users.noreply.github.com>
Date: Thu, 23 May 2024 04:47:11 +0000
Subject: [PATCH 4/8] Add `deploy_stage_summary.html`
---
.../deploys/deploy_stage_summary.html | 91 +++++++++++++++++++
1 file changed, 91 insertions(+)
create mode 100644 deploy-board/deploy_board/templates/deploys/deploy_stage_summary.html
diff --git a/deploy-board/deploy_board/templates/deploys/deploy_stage_summary.html b/deploy-board/deploy_board/templates/deploys/deploy_stage_summary.html
new file mode 100644
index 0000000000..91b0727a24
--- /dev/null
+++ b/deploy-board/deploy_board/templates/deploys/deploy_stage_summary.html
@@ -0,0 +1,91 @@
+{% load utils %}
+{% load static %}
+
+
+
+
+
+ |
+ {% for key, value in report.currentDeployStat.stageDistMap.items %}
+ {% if display_stopping_hosts == "true" or key != "STOPPING" and key != "STOPPED" %}
+
+
+ {{ key }}
+
+ |
+ {% endif %}
+ {% endfor %}
+
+
+ Total
+
+ |
+
+
+
+
+
+
+ Current({{ build.commitShort }})
+
+ |
+ {% for key, value in report.currentDeployStat.stageDistMap.items %}
+ {% if display_stopping_hosts == "true" or key != "STOPPING" and key != "STOPPED" %}
+
+
+ {{ value }}
+
+ |
+ {% endif %}
+ {% endfor %}
+
+
+ {{ report.currentDeployStat.total }}
+
+ |
+
+ {% for deployStat in report.deprecatedDeployStats %}
+
+
+
+ Previous({{ deployStat.build.commitShort }})
+
+ |
+ {% for key, value in deployStat.stageDistMap.items %}
+ {% if display_stopping_hosts == "true" or key != "STOPPING" and key != "STOPPED" %}
+
+
+ {{ value }}
+
+ |
+ {% endif %}
+ {% endfor %}
+
+
+ {{ deployStat.total }}
+
+ |
+
+
+ {% endfor %}
+
+
+
From d5d563523f952552f1cdabeb4adac1101f99fa30 Mon Sep 17 00:00:00 2001
From: Ian Roquebert <72234714+gzpcho@users.noreply.github.com>
Date: Thu, 23 May 2024 04:48:22 +0000
Subject: [PATCH 5/8] Use more collapsibles in host panel
---
.../templates/deploys/deploy_progress.html | 396 +++++++-----------
1 file changed, 159 insertions(+), 237 deletions(-)
diff --git a/deploy-board/deploy_board/templates/deploys/deploy_progress.html b/deploy-board/deploy_board/templates/deploys/deploy_progress.html
index 7b5b14244d..581ff247d2 100644
--- a/deploy-board/deploy_board/templates/deploys/deploy_progress.html
+++ b/deploy-board/deploy_board/templates/deploys/deploy_progress.html
@@ -8,92 +8,7 @@
Hosts
-
-
-
-
- |
- {% for key, value in report.currentDeployStat.stageDistMap.items %}
- {% if display_stopping_hosts == "true" or key != "STOPPING" and key != "STOPPED" %}
-
-
- {{ key }}
-
- |
- {% endif %}
- {% endfor %}
-
- Total
- |
-
-
-
-
- Current({{ build.commitShort }})
-
- |
- {% for key, value in report.currentDeployStat.stageDistMap.items %}
- {% if display_stopping_hosts == "true" or key != "STOPPING" and key != "STOPPED" %}
-
-
- {{ value }}
-
- |
- {% endif %}
- {% endfor %}
-
-
- {{ report.currentDeployStat.total }}
-
- |
-
- {% for deployStat in report.deprecatedDeployStats %}
-
-
-
- Previous({{ deployStat.build.commitShort }})
-
- |
- {% for key, value in deployStat.stageDistMap.items %}
- {% if display_stopping_hosts == "true" or key != "STOPPING" and key != "STOPPED" %}
-
-
- {{ value }}
-
- |
- {% endif %}
- {% endfor %}
-
-
- {{ deployStat.total }}
-
- |
-
- {% endfor %}
-
-
-
+ {% include "deploys/deploy_stage_summary.html" with report=report build=report.currentDeployStat.build show_stopping_hosts=show_stopping_hosts %}
-
{% if report.firstTimeAgentStats %}
-
-
+
{% endif %}
{% if report.provisioningHosts %}
-
-
+ title="Click to see more details">{{ report.provisioningHosts | length }}
+
+
+
+
{% endif %}
{% if report.missingHosts %}
-
- {% endif %}
-
{% endif %}
- {% endfor %}
+
+