029 additional fields at root
This commit is contained in:
+1
-1
@@ -94,7 +94,7 @@
|
||||
|
||||
<!--- global settings --->
|
||||
<cfset request.RECORDS_PER_PAGE=500/>
|
||||
<cfset request.APP_VERSION="0.00.027"/>
|
||||
<cfset request.APP_VERSION="0.00.029"/>
|
||||
<cfheader name="X-Application-Version" value=#request.APP_VERSION#/>
|
||||
<cfset request.STAND=getStand()/>
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
<cfset msStartAt=getTickCount()/>
|
||||
<cfparam name="dt_finish" type="date" default=#createDateTime(year(Now()),month(Now()),1,0,0,0)#/>
|
||||
<cfparam name="dt_start" type="date" default=#dateAdd('m',-1,dt_finish)#/>
|
||||
<cfset hours=dateDiff('h',dt_start,dt_finish)/>
|
||||
<cfparam name="dt_finish" type="date" default=#dateAdd('d',-1,createDateTime(year(Now()),month(Now()),1,0,0,0))#/>
|
||||
<cfparam name="dt_start" type="date" default=#dateAdd('m',-1,createDateTime(year(Now()),month(Now()),1,0,0,0))#/>
|
||||
<cfset hours=dateDiff('h', dt_start, dateAdd('d', 1, dt_finish))/>
|
||||
<cfset tenant_wz_index=val(mid(request.auth.wz,3,5))/><!--- cut off WZ --->
|
||||
|
||||
|
||||
|
||||
<cfscript>
|
||||
function gaussianRound(numeric number, numeric precision = 0) {
|
||||
var factor = 10 ^ precision;
|
||||
@@ -30,6 +29,14 @@ function gaussianRound(numeric number, numeric precision = 0) {
|
||||
}
|
||||
</cfscript>
|
||||
|
||||
<cffunction name="iso8601dtFormat"
|
||||
returntype="string"
|
||||
output="false"
|
||||
hint="formates date and time like this: 2023-12-18T15:41:42.516+0300">
|
||||
<cfargument name="input" required="true" />
|
||||
<cfreturn "#dateFormat( input, "yyyy-mm-dd" )#T#timeFormat( input, "HH:mm:ss.lXX" )#"/>
|
||||
</cffunction>
|
||||
|
||||
|
||||
<cfmodule template="mod/compute_payg.cfm"
|
||||
dt_finish=#dt_finish#
|
||||
@@ -38,11 +45,22 @@ function gaussianRound(numeric number, numeric precision = 0) {
|
||||
output="report"
|
||||
debug=#isDefined("DEBUG")#
|
||||
/>
|
||||
|
||||
<cfset temp.out=["dtStart"="#dateFormat(dt_start, "yyyy-mm-dd")#"
|
||||
,"dtFinish"="#dateFormat(dt_finish, "yyyy-mm-dd")#"
|
||||
<!--- "dtStart"="#dateFormat(dt_start, "yyyy-mm-dd")#"
|
||||
,"dtFinish"="#dateFormat(dt_finish, "yyyy-mm-dd")#" --->
|
||||
<cfset temp.out=[
|
||||
"dtStart="=#iso8601dtFormat(dt_start)#
|
||||
,"dtFinish"=#iso8601dtFormat(dt_finish)#
|
||||
,"hours"=#hours#
|
||||
,"tenantWzIndex"="#tenant_wz_index#"
|
||||
,"wz"=#request.auth.wz#
|
||||
,"login"=#request.auth.login#
|
||||
,"appVersion"=#request.APP_VERSION#
|
||||
,"vcdComputingLoadedAt"="#iso8601dtFormat(report.qComputingAge.dt_load)#"
|
||||
,"vcdStorageLoadedAt"="#iso8601dtFormat(report.qStorageAge.dt_load)#"
|
||||
,"s3StorageLoadedAt"="#iso8601dtFormat(report.qComputingAge.dt_load)#"
|
||||
,"s3OpsTrfLoadedAt"="#iso8601dtFormat(report.qS3OpsTrfAge.dt_load)#"
|
||||
,"records"=#report.qCharge.recordCount#
|
||||
,"queryDurationMs"=#(getTickCount() - msStartAt)#
|
||||
,"periods"=[]
|
||||
]/><!--- using [] instead of {} for struct literals to obtain linked (ordered) structures: keys order preserved --->
|
||||
<!--- beware nulls --->
|
||||
|
||||
Reference in New Issue
Block a user