From f0d0bda87cf5be3f5902e3b8e483e7a9b02e6265 Mon Sep 17 00:00:00 2001 From: msyu Date: Wed, 9 Jul 2025 16:03:47 +0300 Subject: [PATCH] 122 services_grouped_ls for catalog --- v1/Application.cfc | 2 +- v1/resources/svc_grouped_ls.cfc | 124 ++++++++++++++++++++++++++++++++ v1/resources/svc_ls.cfc | 2 + 3 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 v1/resources/svc_grouped_ls.cfc diff --git a/v1/Application.cfc b/v1/Application.cfc index 495128b..ce54dfe 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.121"; /*$ git config --global --unset user.password*/ + variables.framework.docs.APIVersion="0.122"; /*$ git config --global --unset user.password*/ variables.framework.globalHeaders = structNew(); diff --git a/v1/resources/svc_grouped_ls.cfc b/v1/resources/svc_grouped_ls.cfc new file mode 100644 index 0000000..5f37009 --- /dev/null +++ b/v1/resources/svc_grouped_ls.cfc @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select + + s.svc_id + s.svc + s.svc_short + s.orchestrator_name + s.code + (select url from svc_operation so where so.operation='create' AND so.svc_id=s.svc_id limit 1) as create_url + s.is_production_ready + s.resource_realm_type_id + s.sort + s.version + s.descr + s.man + to_char(s.dt_created, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_created + to_char(s.dt_updated, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_updated + sg.svc_group_id + g.svc_group + + from svc s + left outer join svc_group_svc sg on (s.svc_id=sg.svc_id AND sg.is_enabled) + left outer join svc_group g on (sg.svc_group_id=g.svc_group_id) + where 1=1 + order by g.sort, g.svc_group_id + length limit---> + + + + + + select count(*) as cnt + from svc + where 1=1 + + + + + + + + + + + + + + + + > + + + + + + + + + + + + + + \ No newline at end of file diff --git a/v1/resources/svc_ls.cfc b/v1/resources/svc_ls.cfc index edab695..091b897 100644 --- a/v1/resources/svc_ls.cfc +++ b/v1/resources/svc_ls.cfc @@ -10,6 +10,7 @@ dt_created={prefix="s", type="date"}, dt_updated={prefix="s", type="date"}, svc_id={prefix="s", type="integer"}, + svc_group_id={prefix="s", type="integer"}, resource_realm_type_id={prefix="s", type="integer"}, sort={prefix="s", type="integer"}, is_production_ready={prefix="s", type="boolean"}, @@ -75,6 +76,7 @@ to_char(s.dt_updated, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_updated from svc s + --left outer join svc_group on () where 1=1 order by --limit #maxrows#