From da0be5cd4a185f1cc17854b98017a13569643cbf Mon Sep 17 00:00:00 2001
From: knguyen100000010 <63071572+knguyen100000010@users.noreply.github.com>
Date: Wed, 21 Feb 2024 08:28:57 -0500
Subject: [PATCH] Pie (#1457)
* add more host dist stat
* resume suspend process support
* avoid hardcoding process name
* remove Preview status
---
.../clusters/cluster-replacements.tmpl | 2 +-
.../templates/groups/asg_config.tmpl | 10 ++++
.../templates/groups/asg_processes.tmpl | 52 +++++++++++++++++++
.../templates/groups/host_az_dist.tmpl | 27 +++++++++-
.../deploy_board/webapp/arcee_urls.py | 6 +++
.../deploy_board/webapp/group_view.py | 43 ++++++++++++++-
.../helpers/autoscaling_groups_helper.py | 6 +++
7 files changed, 142 insertions(+), 4 deletions(-)
create mode 100644 deploy-board/deploy_board/templates/groups/asg_processes.tmpl
diff --git a/deploy-board/deploy_board/templates/clusters/cluster-replacements.tmpl b/deploy-board/deploy_board/templates/clusters/cluster-replacements.tmpl
index 6082ab250f..74ec350e61 100644
--- a/deploy-board/deploy_board/templates/clusters/cluster-replacements.tmpl
+++ b/deploy-board/deploy_board/templates/clusters/cluster-replacements.tmpl
@@ -48,7 +48,7 @@
diff --git a/deploy-board/deploy_board/templates/groups/asg_config.tmpl b/deploy-board/deploy_board/templates/groups/asg_config.tmpl
index 9656425aed..0522868bb7 100644
--- a/deploy-board/deploy_board/templates/groups/asg_config.tmpl
+++ b/deploy-board/deploy_board/templates/groups/asg_config.tmpl
@@ -70,6 +70,7 @@
+
@@ -102,6 +103,14 @@ function loadAsgScheduledActions() {
});
}
+function loadAsgSuspendedProcesses() {
+ $("#suspendedProcessesPid").addClass("panel panel-default");
+ var asg_suspended_processes_url = "/groups/{{ group_name }}/autoscaling/get_suspended_processes/";
+ $.get(asg_suspended_processes_url, function(response) {
+ $("#suspendedProcessesPid").html(response);
+ });
+}
+
function loadAsgPolicy() {
$("#scalingPolicyPid").addClass("panel panel-default");
var asg_policy_url = "/groups/{{ group_name }}/autoscaling/get_asg_policy/";
@@ -121,6 +130,7 @@ function loadAsgAlarms() {
function getAdvancedSetting() {
loadAsgPolicy();
loadAsgScheduledActions();
+ loadAsgSuspendedProcesses();
loadAsgAlarms();
}
diff --git a/deploy-board/deploy_board/templates/groups/asg_processes.tmpl b/deploy-board/deploy_board/templates/groups/asg_processes.tmpl
new file mode 100644
index 0000000000..30f4fe527a
--- /dev/null
+++ b/deploy-board/deploy_board/templates/groups/asg_processes.tmpl
@@ -0,0 +1,52 @@
+{% load utils %}
+{% include "panel_heading.tmpl" with panel_title="Suspended Processes" panel_body_id="asSuspendedProcessId" direction="down" %}
+
diff --git a/deploy-board/deploy_board/templates/groups/host_az_dist.tmpl b/deploy-board/deploy_board/templates/groups/host_az_dist.tmpl
index a5c4fe866f..b554fdc613 100644
--- a/deploy-board/deploy_board/templates/groups/host_az_dist.tmpl
+++ b/deploy-board/deploy_board/templates/groups/host_az_dist.tmpl
@@ -1,11 +1,36 @@
{% load utils %}
{% block content %}
-
+
Host Distribution Among Availability Zones
+
+
+
+ Availability Zone |
+ Host Count |
+ Percentage |
+
+ {% for l, d, p in label_data_percentage %}
+
+
+ {{ l }}
+ |
+
+ {{ d }}
+ |
+
+ {{ p }}%
+ |
+
+ {% endfor%}
+
+
==============================
+
Total: {{ total }} hosts
+
+