diff --git a/Application.cfc b/Application.cfc index 628df0e..f7283dc 100644 --- a/Application.cfc +++ b/Application.cfc @@ -8,7 +8,7 @@ - + @@ -94,7 +94,7 @@ - + diff --git a/etc/clusters.sql b/etc/clusters.sql new file mode 100644 index 0000000..d546f8a --- /dev/null +++ b/etc/clusters.sql @@ -0,0 +1,10 @@ +pvdc_map(pvdc,code) as (VALUES + ('v1cl1-vsan-pvdc',''), + ('v1cl2-pvdc',''), + ('v2cl2-1c-pvdc',''), + ('v1cl4-vsan-pvdc',''), + ('v1cl6-vsan-pvdc',''), + ('v1cl7-vsan-pvdc',''), + ('hystax-pvdc',''), + ('','') +) \ No newline at end of file diff --git a/json.cfm b/json.cfm index e844ee9..33d05fd 100644 --- a/json.cfm +++ b/json.cfm @@ -4,64 +4,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - { - result.append(row); - return result; - }, [])#/> - - ---> function gaussianRound(numeric number, numeric precision = 0) { @@ -117,7 +60,7 @@ function gaussianRound(numeric number, numeric precision = 0) { ,"hash"="#serviceHash#" @@ -155,7 +98,7 @@ function gaussianRound(numeric number, numeric precision = 0) { - + diff --git a/mod/compute_payg.cfm b/mod/compute_payg.cfm index 98104ae..3304d0a 100644 --- a/mod/compute_payg.cfm +++ b/mod/compute_payg.cfm @@ -186,13 +186,20 @@ from a join ngcloud_ru.vdc on capacity_storage.vdc_id=vdc.id join ngcloud_ru.tenant on tenant.id=vdc.tenant_id join ngcloud_ru.storage_profile_types on capacity_storage.storage_profile_types_id=storage_profile_types.id - where tenant.wzcode = + where tenant.wzcode = --AND 1=0 AND capacity_storage.timestamp::date >= AND capacity_storage.timestamp::date <= group by tenant.wzcode, vdc.name, storage_profile_types.name, capacity_storage.timestamp::date - order by tenant.wzcode, vdc.name, storage_profile_types.name, capacity_storage.timestamp::date; + order by tenant.wzcode, vdc.name, storage_profile_types.name, capacity_storage.timestamp::date + ; - + + + qStorage + #getTickCount() - request.startTickCount# + + + SELECT - + s_code m_code s_code as code @@ -538,8 +545,8 @@ from a - + + diff --git a/payg.cfm b/payg.cfm index a1929ff..2fe2bdc 100644 --- a/payg.cfm +++ b/payg.cfm @@ -29,7 +29,8 @@ output="report" debug=#isDefined("DEBUG")# restrict_to_own_instances=#restrict_to_own_instances# - /> + /> +
-Цены по данным договора из CRM (через elma-cache). Учитываются метрики по S3, vCloud (кроме GPU) +Цены по данным договора из CRM (через elma-cache). Учитываются метрики по S3, vCloud (кроме GPU). Внимание! количество за период *** округляется вверх, но делается это после всех агрегаций.
@@ -209,7 +210,7 @@ S3 операции и трафик: Итого #code# (#m_code#): #round(accum_metric_dimension_1,3)# #free_tier# - #round(max(accum_metric_dimension_1 - free_tier, 0),3)# + #max(ceiling(accum_metric_dimension_1) - free_tier, 0)# #unit# #gaussianRound(discounted_price,2)#