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):
|
||||
return self.application.portfolio_id
|
||||
|
||||
@property
|
||||
def is_pending(self):
|
||||
return self.cloud_id is None
|
||||
|
||||
def __repr__(self):
|
||||
return "<Environment(name='{}', num_users='{}', application='{}', portfolio='{}', id='{}')>".format(
|
||||
self.name,
|
||||
|
@ -39,6 +39,7 @@ def get_environments_obj_for_app(application):
|
||||
{
|
||||
"id": env.id,
|
||||
"name": env.name,
|
||||
"pending": env.is_pending,
|
||||
"edit_form": EditEnvironmentForm(obj=env),
|
||||
"member_count": len(env.roles),
|
||||
"members": sorted(
|
||||
|
@ -47,7 +47,7 @@
|
||||
<span>
|
||||
{{ env['name'] }}
|
||||
</span>
|
||||
{{ Label(type="pending_creation", classes='label--below')}}
|
||||
{{ Label(type="pending_creation")}}
|
||||
{%- endif %}
|
||||
{% if user_can(permissions.EDIT_ENVIRONMENT) -%}
|
||||
{{
|
||||
|
Loading…
x
Reference in New Issue
Block a user