057 orrganization_status
This commit is contained in:
+10
-5
@@ -111,6 +111,8 @@ AS (
|
||||
,round(sum(CASE WHEN "VM_is_ON" > 0 THEN c."VM_RAM_Allocated" ELSE 0 END)) AS ram_on
|
||||
,round(sum(c."VM_vCPU_count")) AS cpu
|
||||
,round(sum(CASE WHEN "VM_is_ON" > 0 THEN c."VM_vCPU_count" ELSE 0 END)) AS cpu_on
|
||||
,STRING_AGG(DISTINCT "Organization_Status",',') as organization_status
|
||||
,COUNT(DISTINCT "Organization_UUID") as org_count
|
||||
FROM vmreports.compute c
|
||||
WHERE ts = (
|
||||
SELECT max(ts)
|
||||
@@ -269,6 +271,7 @@ select
|
||||
<d:field title="Клиент">r.client as client_sold</d:field>
|
||||
<d:field>r.company_uid</d:field>
|
||||
<d:field title="WZ Cloud">a.wz as wz_alloc</d:field>
|
||||
<d:field title="Статусы из VCD">a.organization_status</d:field><!--- список статусов через запятую --->
|
||||
<d:field title="Статусы">ds.status_ids</d:field>
|
||||
<d:field title="Модели оплаты">ds.line_pricing_model_ids</d:field>
|
||||
<d:field title="Коды RAM">r.codes as ram_codes</d:field>
|
||||
@@ -357,6 +360,7 @@ S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-M
|
||||
<th width="10%"><layout:column_head name="client_sold"/></th>
|
||||
<th width="5%"><layout:column_head name="wz_alloc"/></th>
|
||||
<th width="3%"><layout:column_head name="status_ids"/></th>
|
||||
<th width="5%"><layout:column_head name="organization_status"/></th>
|
||||
<th width="3%"><layout:column_head name="line_pricing_model_ids"/></th>
|
||||
|
||||
<th width="10%"><layout:column_head name="cpu_codes"/></th>
|
||||
@@ -396,24 +400,25 @@ S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-M
|
||||
</td>
|
||||
<td>#wz_alloc#</td>
|
||||
<td>#status_ids#</td>
|
||||
<td>#organization_status#</td>
|
||||
<td>#line_pricing_model_ids#</td>
|
||||
|
||||
<td>#cpu_codes#</td>
|
||||
<td class="r"<cfif cpu_sold GT cpu_alloc> style="background:lightgreen;"</cfif>>#cpu_sold#</td>
|
||||
<td class="r"<cfif len(wz_alloc)><cfif cpu_sold GT cpu_alloc> style="background:lightgreen;"</cfif><cfelse> style="background:yellow;"</cfif>>#cpu_sold#</td>
|
||||
<td class="r"<cfif cpu_sold LT cpu_alloc> style="background:lightcoral;"</cfif>>#cpu_alloc#</td>
|
||||
<td class="r"<cfif cpu_sold LT cpu_alloc_on> style="background:lightcoral;"</cfif>>#cpu_alloc_on#</td>
|
||||
|
||||
<td>#ram_codes#</td>
|
||||
<td class="r"<cfif ram_sold GT ram_alloc> style="background:lightgreen;"</cfif>>#ram_sold#</td>
|
||||
<td class="r"<cfif len(wz_alloc)><cfif ram_sold GT ram_alloc> style="background:lightgreen;"</cfif><cfelse> style="background:yellow;"</cfif>>#ram_sold#</td>
|
||||
<td class="r"<cfif ram_sold LT ram_alloc> style="background:lightcoral;"</cfif>>#ram_alloc#</td>
|
||||
<td class="r"<cfif ram_sold LT ram_alloc_on> style="background:lightcoral;"</cfif>>#ram_alloc_on#</td>
|
||||
|
||||
<td>#disk_codes#</td>
|
||||
<td class="r"<cfif disk_sold GT disk_alloc> style="background:lightgreen;"</cfif>>#disk_sold#</td>
|
||||
<td class="r"<cfif len(wz_alloc)><cfif disk_sold GT disk_alloc> style="background:lightgreen;"</cfif><cfelse> style="background:yellow;"</cfif>>#disk_sold#</td>
|
||||
<td class="r"<cfif disk_sold LT disk_alloc> style="background:lightcoral;"</cfif>>#disk_alloc#</td>
|
||||
|
||||
<td>#gpu_codes#</td>
|
||||
<td class="r"<cfif gpu_sold GT gpu_alloc> style="background:lightgreen;"</cfif>>#gpu_sold#</td>
|
||||
<td class="r"<cfif len(wz_alloc)><cfif gpu_sold GT gpu_alloc> style="background:lightgreen;"</cfif><cfelse> style="background:yellow;"</cfif>>#gpu_sold#</td>
|
||||
<td class="r"<cfif gpu_sold LT gpu_alloc> style="background:lightcoral;"</cfif>>#gpu_alloc#</td>
|
||||
<td>#gpu#</td>
|
||||
</tr>
|
||||
@@ -436,7 +441,7 @@ S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-M
|
||||
<cfoutput query="qTotal">
|
||||
<tr class="b r">
|
||||
|
||||
<td colspan="6">Итого</td>
|
||||
<td colspan="7">Итого</td>
|
||||
|
||||
<td class="r"<cfif cpu_sold GT ram_alloc> style="background:lightgreen;"</cfif>>#cpu_sold#</td>
|
||||
<td class="r"<cfif cpu_sold LT cpu_alloc> style="background:lightcoral;"</cfif>>#cpu_alloc#</td>
|
||||
|
||||
Reference in New Issue
Block a user