001
This commit is contained in:
+2
-2
@@ -15,7 +15,7 @@
|
||||
<cfset this.mappings = structNew() />
|
||||
<cfset this.mappings["/mod"] = getDirectoryFromPath(getCurrentTemplatePath()) & "mod/" />
|
||||
<cfset this.customTagPaths = expandPath(getDirectoryFromPath(getCurrentTemplatePath()) & "mod")/>
|
||||
<cfset this.datasource = "billing"/>
|
||||
<cfset this.datasource = "rpt"/>
|
||||
<!--- SSO --->
|
||||
<cfset this.client_id = "payg-report.deck.nubes.ru"/>
|
||||
<cfset this.auth_endpoint = "https://keycloak.nubes.ru/realms/cloud/protocol/openid-connect/auth" />
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
<!--- global settings --->
|
||||
<cfset request.RECORDS_PER_PAGE=500/>
|
||||
<cfset request.APP_VERSION="0.00.000"/>
|
||||
<cfset request.APP_VERSION="0.00.001"/>
|
||||
<cfset request.STAND=getStand()/>
|
||||
|
||||
<!--- application constants --->
|
||||
|
||||
+5
-5
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"ds_dwh_class": "org.postgresql.Driver",
|
||||
"ds_dwh_connectionString": "jdbc:postgresql://db-services.adl.nubes.ru:5432/dwh",
|
||||
"ds_dwh_username": "smishchuk",
|
||||
"ds_dwh_password": "encrypted:********",
|
||||
"ds_dwh_connectionLimit": "5",
|
||||
"ds_rpt_class": "org.postgresql.Driver",
|
||||
"ds_rpt_connectionString": "jdbc:postgresql://db-services.adl.nubes.ru:5432/dwh",
|
||||
"ds_rpt_username": "smishchuk",
|
||||
"ds_rpt_password": "encrypted:********",
|
||||
"ds_rpt_connectionLimit": "5",
|
||||
"IDP_CLIENT_SECRET": "********",
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<cfset tenant_wz_index=val(mid(request.auth.WZ,3,5))/><!--- cut off WZ --->
|
||||
|
||||
<!--- Для начала выкатываем просто кусок каталога, не фильтруя по спеке (которой иногда нет) --->
|
||||
<cfquery name="qSpec" datasource="rpt">
|
||||
<cfquery name="qSpec">
|
||||
select * from (
|
||||
values
|
||||
('Объектное хранилище S3 CEPH', 'Дисковое пространство: Объем хранения','paas.s3.ceph.vol-m','ГБайт',1.80,0)
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
<!--- Нужно еще реализовать в модели данных политики бесплатного минимума --->
|
||||
<cfquery name="qComputing" datasource="rpt">
|
||||
<cfquery name="qComputing">
|
||||
select 'WZ'||to_char(tenant.wzcode,'FM00000') as wz, vdc.name as vdc_name,
|
||||
case
|
||||
when vdc.name like '%-v1cl1%' then 'iaas.ngc.i29'
|
||||
@@ -55,13 +55,13 @@
|
||||
<cfflush/>
|
||||
</cfif>
|
||||
|
||||
<cfquery name="qComputingAge" datasource="rpt">
|
||||
<cfquery name="qComputingAge">
|
||||
select max(capacity_resource.timestamp) as dt_load from ngcloud_ru.capacity_resource
|
||||
</cfquery>
|
||||
|
||||
|
||||
<!--- переделать storage_profile_types с расшифровкой ssd, sata, можно прямо до каталожного кода --->
|
||||
<cfquery name="qStorage" datasource="rpt">
|
||||
<cfquery name="qStorage">
|
||||
select 'WZ'||to_char(tenant.wzcode,'FM00000') as wz, vdc.name as vdc_name,
|
||||
case
|
||||
WHEN vdc.name LIKE '%-v1cl1%' THEN 'iaas.ngc.i29'
|
||||
@@ -102,7 +102,7 @@
|
||||
HOT_FREE_LIMIT 1 10 1 100
|
||||
--->
|
||||
<!--- надо дисконтировать не ГБ-часы а ГБ-месяцы --->
|
||||
<cfquery name="qS3Vol" datasource="rpt">
|
||||
<cfquery name="qS3Vol">
|
||||
select /* *** ниже дублирование кода агрегации - round ceil etc, обратить внимание при правке */
|
||||
(sum(bucket_stat.usage_rgw_main_size_actual)/<cfqueryparam cfsqltype="cf_sql_integer" value=#hours#/>) as vol_B
|
||||
,ceil(sum(bucket_stat.usage_rgw_main_size_actual)/<cfqueryparam cfsqltype="cf_sql_integer" value=#hours#/>/1024/1024/1024) as vol_GB
|
||||
@@ -132,11 +132,11 @@ HOT_FREE_LIMIT 1 10 1 100
|
||||
<cfflush/>
|
||||
</cfif>
|
||||
|
||||
<cfquery name="qS3VolAge" datasource="rpt">
|
||||
<cfquery name="qS3VolAge">
|
||||
select max(timestamp_addition) as dt_load from s3billing.bucket_stat
|
||||
</cfquery>
|
||||
|
||||
<cfquery name="qS3OpsTrf" datasource="rpt">
|
||||
<cfquery name="qS3OpsTrf">
|
||||
select
|
||||
sum(
|
||||
CASE WHEN
|
||||
@@ -217,7 +217,7 @@ select
|
||||
<cfflush/>
|
||||
</cfif>
|
||||
|
||||
<cfquery name="qS3OpsTrfAge" datasource="rpt">
|
||||
<cfquery name="qS3OpsTrfAge">
|
||||
select max(time) as dt_load from s3billing.usage_bucket_by_user
|
||||
</cfquery>
|
||||
|
||||
@@ -357,7 +357,7 @@ S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-M
|
||||
|
||||
<td>#code#</td>
|
||||
<td class="r" style="font-size:120%; padding:0 1em;">#chargeable_metric#</td>
|
||||
<td class="c" style="font-size:90%;">#ed_izm#</td>
|
||||
<td class="c" style="font-size:90%;">#unit#</td>
|
||||
<td class="r">#discounted_price#</td>
|
||||
<td class="r">#charge#</td>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user