Add Environment property is_pending back because it is used in the UI to display the "Pending Creation" tag
This commit is contained in:
parent
406c2af811
commit
2c8f4eeaa0
@ -61,6 +61,10 @@ class Environment(
|
|||||||
def portfolio_id(self):
|
def portfolio_id(self):
|
||||||
return self.application.portfolio_id
|
return self.application.portfolio_id
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_pending(self):
|
||||||
|
return self.cloud_id is None
|
||||||
|
|
||||||
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,
|
||||||
|
@ -39,6 +39,7 @@ def get_environments_obj_for_app(application):
|
|||||||
{
|
{
|
||||||
"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": sorted(
|
"members": sorted(
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<span>
|
<span>
|
||||||
{{ env['name'] }}
|
{{ env['name'] }}
|
||||||
</span>
|
</span>
|
||||||
{{ Label(type="pending_creation", classes='label--below')}}
|
{{ Label(type="pending_creation")}}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% if user_can(permissions.EDIT_ENVIRONMENT) -%}
|
{% if user_can(permissions.EDIT_ENVIRONMENT) -%}
|
||||||
{{
|
{{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user