-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add more host dist stat * resume suspend process support * avoid hardcoding process name * remove Preview status
- Loading branch information
1 parent
cc1d6fd
commit da0be5c
Showing
7 changed files
with
142 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
deploy-board/deploy_board/templates/groups/asg_processes.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{% load utils %} | ||
{% include "panel_heading.tmpl" with panel_title="Suspended Processes" panel_body_id="asSuspendedProcessId" direction="down" %} | ||
<div id="asSuspendedProcessId" class="collapse in panel-body"> | ||
|
||
<div class="container-fluid"> | ||
<table id="suspendedProcessStatus" class="table"> | ||
<tr> | ||
<th>Process Name</th> | ||
<th>State</th> | ||
<th>Click to ...</th> | ||
</tr> | ||
{% for process in process_suspended_status %} | ||
<tr> | ||
<td> | ||
{{ process.name }} | ||
</td> | ||
<td> | ||
{% if process.suspended == True %} <p style="color:red;">Suspended</p> {% else %} <p style="color:green;">Active</p>{% endif %} | ||
</td> | ||
<td> | ||
{% if process.suspended == True %} <input type="button" value="Resume" onclick="updateProcess(this, '{{ process.name }}', false)"> {% else %} <input type="button" value="Suspend" onclick="updateProcess(this, '{{ process.name }}', true)"> {% endif %} | ||
</td> | ||
</tr> | ||
{% endfor%} | ||
</table> | ||
</div> | ||
|
||
<script> | ||
function updateProcess(element, name, shouldSuspend) { | ||
var url = "" | ||
|
||
if (shouldSuspend == true) { | ||
url = '/groups/{{ group_name }}/autoscaling/suspend_process/' + name; | ||
} | ||
else { | ||
url = '/groups/{{ group_name }}/autoscaling/resume_process/' + name | ||
} | ||
|
||
$.ajax({ | ||
type: 'POST', | ||
url: url, | ||
data: {'csrfmiddlewaretoken': '{{csrf_token}}'}, | ||
success: function (data) { | ||
$("#asSuspendedProcessId").parent().html(data); | ||
} | ||
}); | ||
|
||
element.value = "Updating ..."; | ||
element.disabled = true; | ||
} | ||
</script> | ||
</div> |
27 changes: 26 additions & 1 deletion
27
deploy-board/deploy_board/templates/groups/host_az_dist.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters