From 3438e8f80eb2728cd25bfedd5b5cd74ee916f078 Mon Sep 17 00:00:00 2001 From: msyu Date: Tue, 22 Apr 2025 17:03:31 +0300 Subject: [PATCH] 097 operationIsInProgress --- v1/Application.cfc | 2 +- v1/resources/bookmark.cfc | 12 ++++++------ v1/resources/instance.cfc | 2 ++ v1/resources/instance_operation.cfc | 1 + 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/v1/Application.cfc b/v1/Application.cfc index 7210f5a..4fd7a4c 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.096"; + variables.framework.docs.APIVersion="0.097"; variables.framework.globalHeaders = structNew(); variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location"; diff --git a/v1/resources/bookmark.cfc b/v1/resources/bookmark.cfc index 8eeb8cb..25cc75b 100644 --- a/v1/resources/bookmark.cfc +++ b/v1/resources/bookmark.cfc @@ -29,22 +29,22 @@ dt_updated= ,updater_id= - ,bookmark= + ,bookmark= - ,descr= + ,descr= - ,url= + ,url= - ,icon_url= + ,icon_url= - ,sort= + ,sort= - ,is_enabled= + ,is_enabled= where contragent_id= diff --git a/v1/resources/instance.cfc b/v1/resources/instance.cfc index 67c0dc8..3ee11f5 100644 --- a/v1/resources/instance.cfc +++ b/v1/resources/instance.cfc @@ -38,6 +38,7 @@ u.login as updater_login u.shortname as updater_shortname (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 (io.dt_start IS NOT NULL AND io.dt_finish IS NULL AND io.submit_result='201') from instance_operation io where io.instance_uid=e.instance_uid order by dt_submit desc limit 1) as operation_is_in_progress (case when @@ -115,6 +116,7 @@ o.error_log u.login as updater_login u.shortname as updater_shortname + (o.dt_start IS NOT NULL AND o.dt_finish IS NULL AND o.submit_result='201') as is_in_progress from instance_operation o left outer join usr u on (o.updater_id=u.usr_id) diff --git a/v1/resources/instance_operation.cfc b/v1/resources/instance_operation.cfc index 6ad1e75..ecab487 100644 --- a/v1/resources/instance_operation.cfc +++ b/v1/resources/instance_operation.cfc @@ -44,6 +44,7 @@ u.shortname as updater_shortname v.svc so.svc_operation_id + (o.dt_start IS NOT NULL AND o.dt_finish IS NULL AND o.submit_result='201') as is_in_progress from instance_operation o join instance e on (o.instance_uid=e.instance_uid)