081 instance.explained status
This commit is contained in:
@@ -38,6 +38,21 @@
|
||||
<m:field>u.login as updater_login</m:field>
|
||||
<m:field>u.shortname as updater_shortname</m:field>
|
||||
<m:field>(select cast(st.instance_data->>'params' as json)->>'resourceRealm' from instance_state st where st.instance_uid=e.instance_uid order by version desc limit 1) as resourceRealm</m:field>
|
||||
<m:field>
|
||||
(case
|
||||
when
|
||||
(select st.instance_data->>'isDeleted' from instance_state st where st.instance_uid=e.instance_uid order by version desc limit 1) = 'true' then 'deleted'
|
||||
when
|
||||
(select st.instance_data->>'suspended' from instance_state st where st.instance_uid=e.instance_uid order by version desc limit 1) = 'true' then 'suspended'
|
||||
when
|
||||
(select coalesce(st.instance_data->>'isDeleted','false') from instance_state st where st.instance_uid=e.instance_uid order by version desc limit 1) = 'false' AND (select coalesce(st.instance_data->>'suspended','false') from instance_state st where st.instance_uid=e.instance_uid order by version desc limit 1) = 'false' then 'running'
|
||||
when
|
||||
not exists (select * from instance_operation o where o.instance_uid=e.instance_uid) then 'not configured'
|
||||
when
|
||||
not exists (select * from instance_state st where st.instance_uid=e.instance_uid) then 'not created'
|
||||
else null end
|
||||
) as explained_status
|
||||
</m:field>
|
||||
</m:field_set>
|
||||
from instance e
|
||||
left outer join specification_item i on (e.specification_item_id=i.specification_item_id)
|
||||
|
||||
Reference in New Issue
Block a user