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