029 uptime added
This commit is contained in:
@@ -50,9 +50,9 @@
|
||||
AND s.specification_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#arguments.specificationId#/><!--- access protection --->
|
||||
</cfquery> <!--- *** правильнее при попытке доступа к чужому инстансу (НСД) выбрасывать 403, а тут будет 404 --->
|
||||
|
||||
<!--- <cfif local.qInstance.recordCount EQ 0>
|
||||
<cfreturn representationOf(this.helper.formatMessage("Not Found")).withStatus(404)/>
|
||||
</cfif> --->
|
||||
<cfif local.qInstance.recordCount EQ 0>
|
||||
<cfreturn representationOf("Instance not found or no permission to view").withStatus(404)/>
|
||||
</cfif>
|
||||
|
||||
<cfquery name="local.qCurrentState" result="local.result">
|
||||
select
|
||||
@@ -94,6 +94,7 @@
|
||||
<m:field title="Начало">to_char(o.dt_start, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_start</m:field>
|
||||
<m:field title="Завершение">to_char(o.dt_finish, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_finish</m:field>
|
||||
<m:field title="Длит. сек">extract('epoch' from coalesce(o.dt_finish,CURRENT_TIMESTAMP)- o.dt_start) as duration</m:field>
|
||||
<m:field>extract('epoch' from CURRENT_TIMESTAMP - coalesce(o.dt_finish,CURRENT_TIMESTAMP)) as seconds_passed</m:field>
|
||||
<m:field title="Успешно">o.is_successful</m:field>
|
||||
<m:field title="dt_created">to_char(o.dt_created, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_created</m:field>
|
||||
</m:field_set>
|
||||
@@ -210,6 +211,7 @@
|
||||
|
||||
|
||||
<cfset "out.queryDurationMs"=getTickCount() - request.startTickCount/>
|
||||
<cfset "out.uptime"=(local.qOperation.is_successful GT 0) ? local.qOperation.seconds_passed : 0/>
|
||||
<cfset "out.isCreated"=local.isCreated/>
|
||||
<cfset "out.isDeleted"=qCurrentState.is_deleted GT 0/><!--- он все время пытается привести true к 1
|
||||
--->
|
||||
|
||||
Reference in New Issue
Block a user