Skip to content

Commit

Permalink
minor refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
claire-peters committed Jul 8, 2023
1 parent 3d9e86b commit 69dc967
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ <h2>Allocation Change Requests</h2>
{% endif %}
</td>
<td class="text-nowrap">
<div class="row">
{% if change.allocationattributechangerequest_set.all %}
<button class="btn btn-success mr-1" aria-disabled="true"
style="
Expand All @@ -67,15 +66,15 @@ <h2>Allocation Change Requests</h2>
pointer-events: none;">
Approve
</button>
<a href="{% url 'allocation-change-detail' change.pk %}"><button type="button" class="btn btn-primary mr-1">Details</button></a>
{% else %}
<form method="post" action="{% url 'allocation-change-detail' change.pk %}">
{% csrf_token %}
<input type="hidden" name="end_date_extension" value="{{ change.end_date_extension }}" />
<button type="submit" name="action" value="approve" class="btn btn-success mr-1">Approve</button>
<a href="{% url 'allocation-change-detail' change.pk %}"><button type="button" class="btn btn-primary mr-1">Details</button></a>
</form>
{% endif %}
<a href="{% url 'allocation-change-detail' change.pk %}"><button class="btn btn-primary mr-1">Details</button></a>
</div>
</td>
</tr>
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ <h2>Allocation Requests</h2>
{% csrf_token %}
<input type="hidden" name="status" value="{{ allocation_status_active.id }}" />
<button type="submit" name="action" value="auto-approve" class="btn btn-success mr-1{% if allocation.get_information == '' %} confirm-activate{% endif %}">Approve</button>
<a href="{% url 'allocation-detail' allocation.pk %}"><button type="button" class="btn btn-primary mr-1">Details</button></a>
</form>
<a href="{% url 'allocation-detail' allocation.pk %}"><button class="btn btn-primary mr-1">Details</button></a>
</div>
</td>
</tr>
Expand Down
4 changes: 3 additions & 1 deletion coldfront/plugins/fasrc_monitoring/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from django.test import Client
from math import isclose
from concurrent.futures import ThreadPoolExecutor

Expand All @@ -6,7 +7,8 @@

class UIChecker:
def __init__(self, username, password):
self.client = utils.login_return_client(username, password)
self.client = Client()
self.client.login(username=username, password=password)

def check_page_loads(self, url):
"""try to load page from url with self.client.
Expand Down

0 comments on commit 69dc967

Please sign in to comment.