From 70e44718936dd2e0ae72af33907a6f01fbcad582 Mon Sep 17 00:00:00 2001 From: msyu Date: Wed, 9 Apr 2025 16:47:15 +0300 Subject: [PATCH] 088 instance_ls filtering and sorting fixed --- v1/Application.cfc | 2 +- v1/resources/instance_ls.cfc | 53 +++++++++++++++++++++++------------- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/v1/Application.cfc b/v1/Application.cfc index 450450a..4d7aaf3 100644 --- a/v1/Application.cfc +++ b/v1/Application.cfc @@ -51,7 +51,7 @@ //variables.framework.docs={}; variables.framework.docs.APIName="Deck API"; - variables.framework.docs.APIVersion="0.087"; + variables.framework.docs.APIVersion="0.088"; variables.framework.globalHeaders = structNew(); variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location"; diff --git a/v1/resources/instance_ls.cfc b/v1/resources/instance_ls.cfc index 313ed4c..8a0766f 100644 --- a/v1/resources/instance_ls.cfc +++ b/v1/resources/instance_ls.cfc @@ -8,17 +8,19 @@ "suspended"={prefix="inr", type="string"}, - "resourceRealm"={prefix="inr", type="string"}, - "resourceRealmId"={prefix="inr", type="integer"}, + "resource_realm"={prefix="inr", type="string"}, + "operation_is_in_progress"={prefix="inr", type="boolean"}, "is_test"={prefix="inr", type="boolean"}, "is_auxiliary"={prefix="inr", type="boolean"}, "explained_status"={prefix="inr", type="string"}, + "dt_state"={prefix="inr", type="date"}, "version"={prefix="inr", type="integer"} } /> @@ -59,17 +62,22 @@ - - - - - - - - - + + + + + + + + + + + + + @@ -112,6 +120,13 @@ + + + + + + + (select st.instance_data->>'suspended' from instance_state st where st.instance_uid=e.instance_uid order by version desc limit 1) as suspended - (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 + (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 resource_realm (select to_char(st.dt_state, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') from instance_state st where st.instance_uid=e.instance_uid order by version desc limit 1) as dt_state (case @@ -287,8 +302,8 @@ - - + +