005
This commit is contained in:
+21
-5
@@ -7,10 +7,10 @@
|
|||||||
<!--- Pseudoconstructor --->
|
<!--- Pseudoconstructor --->
|
||||||
<!--- Set up the application. --->
|
<!--- Set up the application. --->
|
||||||
<cfset this.Name = "PAYG-REPORT" />
|
<cfset this.Name = "PAYG-REPORT" />
|
||||||
<cfset this.applicationTimeout = createTimeSpan( 0, 0, 0, 30 ) />
|
<cfset this.applicationTimeout = createTimeSpan( 0, 3, 0, 0 ) />
|
||||||
<cfset this.sessionmanagement="Yes"/>
|
<cfset this.sessionmanagement="Yes"/>
|
||||||
<cfset this.clientmanagement="No"/>
|
<cfset this.clientmanagement="No"/>
|
||||||
<cfset this.sessiontimeout=CreateTimeSpan(0, 0, 0, 20)/>
|
<cfset this.sessiontimeout=CreateTimeSpan(0, 1, 0, 0)/>
|
||||||
<cfset this.setclientcookies="No"/>
|
<cfset this.setclientcookies="No"/>
|
||||||
<cfset this.mappings = structNew() />
|
<cfset this.mappings = structNew() />
|
||||||
<cfset this.mappings["/mod"] = getDirectoryFromPath(getCurrentTemplatePath()) & "mod/" />
|
<cfset this.mappings["/mod"] = getDirectoryFromPath(getCurrentTemplatePath()) & "mod/" />
|
||||||
@@ -28,7 +28,13 @@
|
|||||||
<cfset request.DS = "#this.datasource#">
|
<cfset request.DS = "#this.datasource#">
|
||||||
<cfset request.language="">
|
<cfset request.language="">
|
||||||
<!--- кажется, нужно инициализировать датасорцы в псевдоконструкторе - onRequest не получается --->
|
<!--- кажется, нужно инициализировать датасорцы в псевдоконструкторе - onRequest не получается --->
|
||||||
<!--- <cfset this.datasources["#this.datasource#"]=getDS("#this.datasource#","ds_#this.datasource#")/> --->
|
<!--- *** проверить, что есть - если есть, не создавать --->
|
||||||
|
<!--- но так не работает --->
|
||||||
|
<!--- <cfif NOT structKeyExists(this.datasources,this.datasource)>
|
||||||
|
<cfset this.datasources["#this.datasource#"]=getDS("#this.datasource#","ds_#this.datasource#")/>
|
||||||
|
</cfif> --->
|
||||||
|
|
||||||
|
<!--- <cfdump var=#variables#/> --->
|
||||||
|
|
||||||
|
|
||||||
<cffunction
|
<cffunction
|
||||||
@@ -70,7 +76,7 @@
|
|||||||
|
|
||||||
<!--- global settings --->
|
<!--- global settings --->
|
||||||
<cfset request.RECORDS_PER_PAGE=500/>
|
<cfset request.RECORDS_PER_PAGE=500/>
|
||||||
<cfset request.APP_VERSION="0.00.002"/>
|
<cfset request.APP_VERSION="0.00.005"/>
|
||||||
<cfset request.STAND=getStand()/>
|
<cfset request.STAND=getStand()/>
|
||||||
|
|
||||||
<!--- application constants --->
|
<!--- application constants --->
|
||||||
@@ -169,6 +175,7 @@
|
|||||||
--->
|
--->
|
||||||
<cfif structKeyExists(session, "auth")>
|
<cfif structKeyExists(session, "auth")>
|
||||||
<cfset request.auth = structCopy(session.auth)/>
|
<cfset request.auth = structCopy(session.auth)/>
|
||||||
|
<!--- <cfset request.auth.wz = "WZ01553"/> --->
|
||||||
<!--- тут нужно сделать проверку и рефреш токена --->
|
<!--- тут нужно сделать проверку и рефреш токена --->
|
||||||
<!--- сессия есть --->
|
<!--- сессия есть --->
|
||||||
<cfelse>
|
<cfelse>
|
||||||
@@ -336,9 +343,16 @@
|
|||||||
<cfargument name="dsname" type="string" required="true"/>
|
<cfargument name="dsname" type="string" required="true"/>
|
||||||
<cfargument name="prefix" type="string" default=#dsname#/>
|
<cfargument name="prefix" type="string" default=#dsname#/>
|
||||||
|
|
||||||
<cfset system = createObject("java", "java.lang.System")/>
|
|
||||||
<cfset var ds={}/>
|
<cfset var ds={}/>
|
||||||
|
|
||||||
|
<cftry>
|
||||||
|
<cfquery name="qTestDs" datasource=#arguments.dsname#>
|
||||||
|
select 1;
|
||||||
|
</cfquery>
|
||||||
|
|
||||||
|
<cfcatch type="database">
|
||||||
|
<cfset system = createObject("java", "java.lang.System")/>
|
||||||
|
|
||||||
<cfloop list="class,connectionString,database,driver,dbdriver,host,port,type,url,username,password,bundleName,bundleVersion,connectionLimit,liveTimeout,validate" item="field"><!--- driver vs dbdriver --->
|
<cfloop list="class,connectionString,database,driver,dbdriver,host,port,type,url,username,password,bundleName,bundleVersion,connectionLimit,liveTimeout,validate" item="field"><!--- driver vs dbdriver --->
|
||||||
<cfset var value=system.getEnv("#arguments.prefix#_#field#")/>
|
<cfset var value=system.getEnv("#arguments.prefix#_#field#")/>
|
||||||
<cfif isDefined("value") AND len(value)>
|
<cfif isDefined("value") AND len(value)>
|
||||||
@@ -348,6 +362,8 @@
|
|||||||
<cfif structIsEmpty(ds)>
|
<cfif structIsEmpty(ds)>
|
||||||
<cfthrow type="application" message="Datasource not configured" detail="Datasource not defined in the environment. Expected prefix is #arguments.prefix#"/>
|
<cfthrow type="application" message="Datasource not configured" detail="Datasource not defined in the environment. Expected prefix is #arguments.prefix#"/>
|
||||||
</cfif>
|
</cfif>
|
||||||
|
</cfcatch>
|
||||||
|
</cftry>
|
||||||
|
|
||||||
<!--- test datasource (just to get exception if invalid) --->
|
<!--- test datasource (just to get exception if invalid) --->
|
||||||
<cftry>
|
<cftry>
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
Сертификат открытого ключа можно каждый раз получать от IDP.
|
Сертификат открытого ключа можно каждый раз получать от IDP.
|
||||||
Запрос к IDP идет только для освежения сессии, а не на каждый запрос. Логаут на IDP не проверяется при каждом запросе.
|
Запрос к IDP идет только для освежения сессии, а не на каждый запрос. Логаут на IDP не проверяется при каждом запросе.
|
||||||
<br/>
|
<br/>
|
||||||
<!--- <cflocation url="payg.cfm" addtoken="No" /> --->
|
<cflocation url="payg.cfm" addtoken="No" />
|
||||||
<a href="payg.cfm">PAYG Report</a>
|
<a href="payg.cfm">PAYG Report</a>
|
||||||
|
|||||||
@@ -12,13 +12,13 @@
|
|||||||
<cfparam name="dt_start" type="date" default=#dateAdd('m',-1,dt_finish)#/>
|
<cfparam name="dt_start" type="date" default=#dateAdd('m',-1,dt_finish)#/>
|
||||||
<cfset hours=dateDiff('h',dt_start,dt_finish)/>
|
<cfset hours=dateDiff('h',dt_start,dt_finish)/>
|
||||||
|
|
||||||
<cfset tenant_wz_index=val(mid(request.auth.WZ,3,5))/><!--- cut off WZ --->
|
<cfset tenant_wz_index=val(mid(request.auth.wz,3,5))/><!--- cut off WZ --->
|
||||||
|
|
||||||
<!--- Для начала выкатываем просто кусок каталога, не фильтруя по спеке (которой иногда нет) --->
|
<!--- Для начала выкатываем просто кусок каталога, не фильтруя по спеке (которой иногда нет) --->
|
||||||
<cfquery name="qSpec">
|
<cfquery name="qSpec">
|
||||||
select * from (
|
select * from (
|
||||||
values
|
values
|
||||||
('Объектное хранилище S3 CEPH', 'Дисковое пространство: Объем хранения','paas.s3.ceph.vol-m','ГБайт',1.80,0)
|
('Объектное хранилище S3 CEPH','Дисковое пространство: Объем хранения','paas.s3.ceph.vol-m','ГБайт',1.80,0)
|
||||||
,('Объектное хранилище S3 CEPH','Исходящий трафик','paas.s3.ceph.trf-m','ГБайт',1.50,0)
|
,('Объектное хранилище S3 CEPH','Исходящий трафик','paas.s3.ceph.trf-m','ГБайт',1.50,0)
|
||||||
,('Объектное хранилище S3 CEPH','Запросы GET, HEAD, OPTIONS','paas.s3.ceph.get-m','10тыс.шт.',0.35,0)
|
,('Объектное хранилище S3 CEPH','Запросы GET, HEAD, OPTIONS','paas.s3.ceph.get-m','10тыс.шт.',0.35,0)
|
||||||
,('Объектное хранилище S3 CEPH','Запросы PUT, POST, PATCH','paas.s3.ceph.put-m','10тыс.шт.',4.50,0)
|
,('Объектное хранилище S3 CEPH','Запросы PUT, POST, PATCH','paas.s3.ceph.put-m','10тыс.шт.',4.50,0)
|
||||||
@@ -376,7 +376,7 @@ S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-M
|
|||||||
</cfoutput>
|
</cfoutput>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="##eee" style="border-bottom:2px solid gray;"></td>
|
<td bgcolor="##eee" style="border-bottom:2px solid gray;"></td>
|
||||||
<td bgcolor="##eee" colspan="4" class="r" style="border-bottom:2px solid gray;"><b>Итого</b>#svc#:</td>
|
<td bgcolor="##eee" colspan="4" class="r" style="border-bottom:2px solid gray;"><b>Итого</b> #svc#:</td>
|
||||||
<td bgcolor="##eee" colspan="1" class="r b" style="border-bottom:2px solid gray;">#NumFmt(acc,2)#</td>
|
<td bgcolor="##eee" colspan="1" class="r b" style="border-bottom:2px solid gray;">#NumFmt(acc,2)#</td>
|
||||||
<td colspan="14" style="border-bottom:2px solid gray;"></td>
|
<td colspan="14" style="border-bottom:2px solid gray;"></td>
|
||||||
</tr >
|
</tr >
|
||||||
|
|||||||
Reference in New Issue
Block a user