Display real environment processing status.
This commit is contained in:
parent
2fc7a0d460
commit
82c34ee9b1
@ -68,6 +68,10 @@ class Environment(
|
||||
else:
|
||||
return self.ProvisioningStatus.COMPLETED
|
||||
|
||||
@property
|
||||
def is_pending(self):
|
||||
return self.provisioning_status == self.ProvisioningStatus.PENDING
|
||||
|
||||
def __repr__(self):
|
||||
return "<Environment(name='{}', num_users='{}', application='{}', portfolio='{}', id='{}')>".format(
|
||||
self.name,
|
||||
|
@ -25,6 +25,7 @@ def get_environments_obj_for_app(application):
|
||||
env_data = {
|
||||
"id": env.id,
|
||||
"name": env.name,
|
||||
"pending": env.is_pending,
|
||||
"edit_form": EditEnvironmentForm(obj=env),
|
||||
"member_count": len(env.roles),
|
||||
"members": [env_role.application_role.user_name for env_role in env.roles],
|
||||
|
@ -218,7 +218,6 @@
|
||||
<ul class="accordion-table__items">
|
||||
{% for env in environments_obj %}
|
||||
{% set edit_form = env['edit_form'] %}
|
||||
{% set testing_env_name = 'qa' %}
|
||||
<toggler inline-template>
|
||||
<li class="accordion-table__item">
|
||||
<div class="accordion-table__item-content form-row">
|
||||
@ -227,10 +226,10 @@
|
||||
<span>
|
||||
{{ env['name'] }}
|
||||
</span>
|
||||
{% if env['name'].lower() == testing_env_name %}
|
||||
<span class='label'>PROCESSING</span>
|
||||
{% if env['pending'] %}
|
||||
<span class='usa-label'>PROCESSING</span>
|
||||
{% endif %}
|
||||
{% if env['name'].lower() != testing_env_name %}
|
||||
{% if env['pending'] %}
|
||||
<span class="icon-link">
|
||||
{% set edit_environment_button %}
|
||||
{{ Icon('edit') }}
|
||||
@ -258,7 +257,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-col form-col--third">
|
||||
{% if env['name'].lower() == testing_env_name %}
|
||||
{% if env['pending'] %}
|
||||
<em>Cloud service provider link unavailable</em>
|
||||
{% else %}
|
||||
<a href='{{ url_for("applications.access_environment", environment_id=env.id)}}' target='_blank' rel='noopener noreferrer' class='application-list-item__environment__csp_link icon-link'>
|
||||
|
Loading…
x
Reference in New Issue
Block a user