Skip to content

Commit

Permalink
fix show in list
Browse files Browse the repository at this point in the history
  • Loading branch information
Cjpilbdev committed Jun 5, 2024
1 parent e79229d commit 1435ff4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h4 class="panel-title pull-left">{{ title }}</h4>
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#showHosts" title="Show plain host names">
Show Hosts
</button>
{% if title != "Failed Hosts" and show_protected_hosts is None %}
{% if title != "Failed Hosts" and show_protected_hosts === False %}
<p><a href="/env/{{ env.envName }}/{{stage}}/hosts/?show_protected_hosts"> <button class="btn btn-primary" >Show protected hosts</button> </a></p>
{% endif %}
</div>
Expand Down
8 changes: 4 additions & 4 deletions deploy-board/deploy_board/templates/hosts/hosts.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<th>StartDate(-08:00)</th>
<th>LastUpdate</th>
<th>ErrorCode</th>
{% if show_protection_status %}
{% if show_protected_hosts %}
<th>ProtectionStatus</th>
{% endif %}
</tr>
Expand All @@ -60,7 +60,7 @@
<td>N/A</td>
<td>N/A</td>
<td>N/A</td>
{% if show_protection_status %}
{% if show_protected_hosts %}
<td>N/A</td>
{% endif %}
{% elif agent.lastErrorCode|isProvisioningHost %}
Expand All @@ -73,7 +73,7 @@
<td>N/A</td>
<td>N/A</td>
<td>N/A</td>
{% if show_protection_status %}
{% if show_protected_hosts %}
<td>N/A</td>
{% endif %}
{% else %}
Expand All @@ -86,7 +86,7 @@
<td>{{ agent.startDate|convertTimestamp }}</td>
<td>{{ agent.lastUpdateDate|convertTimestamp }}</td>
<td>{{ agent.lastErrorCode }}</td>
{% if show_protection_status %}
{% if show_protected_hosts %}
<td>
{% if agent.hostId in protected_hosts %}
Protected
Expand Down
2 changes: 1 addition & 1 deletion deploy-board/deploy_board/webapp/env_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ def get_hosts(request, name, stage):
title = "All hosts"

agents_wrapper = {}
show_protected_hosts = request.GET.get("show_protected_hosts")
show_protected_hosts = request.GET.get("show_protected_hosts") is not None
host_ids = []
for agent in agents:
if agent['deployId'] not in agents_wrapper:
Expand Down

0 comments on commit 1435ff4

Please sign in to comment.