045 gpu
This commit is contained in:
+1
-1
@@ -76,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.044"/>
|
<cfset request.APP_VERSION="0.00.045"/>
|
||||||
<cfset request.STAND=getStand()/>
|
<cfset request.STAND=getStand()/>
|
||||||
|
|
||||||
<cflock scope="application" type="readonly" timeout=3>
|
<cflock scope="application" type="readonly" timeout=3>
|
||||||
|
|||||||
+51
-3
@@ -159,13 +159,14 @@
|
|||||||
--AND a.is_actual
|
--AND a.is_actual
|
||||||
--AND date_nop <= CURRENT_TIMESTAMP
|
--AND date_nop <= CURRENT_TIMESTAMP
|
||||||
AND COALESCE(date_end,CURRENT_TIMESTAMP) >= CURRENT_TIMESTAMP
|
AND COALESCE(date_end,CURRENT_TIMESTAMP) >= CURRENT_TIMESTAMP
|
||||||
|
AND s.probability_pc >=50
|
||||||
ORDER BY __index --, version::int
|
ORDER BY __index --, version::int
|
||||||
</cfquery>
|
</cfquery>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<cfoutput>
|
<cfoutput>
|
||||||
<h3>Услуги по данным CRM (версии строк спецификации, только актуальные на сегодня) <!--- (#qService.recordCount#) ---></h3>
|
<h3>Услуги по данным CRM (версии строк спецификации, только актуальные на сегодня, сделки с вероятностью от 50% (начиная с тестирования) <!--- (#qService.recordCount#) ---></h3>
|
||||||
</cfoutput>
|
</cfoutput>
|
||||||
|
|
||||||
|
|
||||||
@@ -190,7 +191,7 @@
|
|||||||
<tr<cfif NOT left(abstractive_service_code,4) EQ "iaas"> class="gray"</cfif>>
|
<tr<cfif NOT left(abstractive_service_code,4) EQ "iaas"> class="gray"</cfif>>
|
||||||
<td class="c"><a href="deal_service.cfm?__id=#__id#&#tr.fwx#" title="__id">#__index#</a></td>
|
<td class="c"><a href="deal_service.cfm?__id=#__id#&#tr.fwx#" title="__id">#__index#</a></td>
|
||||||
<!--- <td class="c">#__name#</td> --->
|
<!--- <td class="c">#__name#</td> --->
|
||||||
<td class="l">#abstractive_service_code#.#modifier_code#</td>
|
<td class="l">#abstractive_service_code#<cfif len(modifier_code)>.#modifier_code#</cfif></td>
|
||||||
<td class="l">#user_description#</td>
|
<td class="l">#user_description#</td>
|
||||||
<td style="padding:0; vertical-align:bottom;">
|
<td style="padding:0; vertical-align:bottom;">
|
||||||
<table class="wide" style="height:100%">
|
<table class="wide" style="height:100%">
|
||||||
@@ -225,11 +226,12 @@
|
|||||||
<td class="c">#__index#</td> --->
|
<td class="c">#__index#</td> --->
|
||||||
<td class="c">#dateFormat(date_nop,'YYYY-MM-DD')#</td>
|
<td class="c">#dateFormat(date_nop,'YYYY-MM-DD')#</td>
|
||||||
<td class="c<cfif isDate(date_end) AND date_end LT Now()> err</cfif>">#dateFormat(date_end,'YYYY-MM-DD')#</td>
|
<td class="c<cfif isDate(date_end) AND date_end LT Now()> err</cfif>">#dateFormat(date_end,'YYYY-MM-DD')#</td>
|
||||||
<td class="#probability_pc#</td>
|
<td class="c">#probability_pc#</td>
|
||||||
<td class="c"><a href="additional_agreement.cfm?__id=#additional_agreement_uid#&#tr.fwx#">#additional_agreement#</a> (#status_id# #status#)</td>
|
<td class="c"><a href="additional_agreement.cfm?__id=#additional_agreement_uid#&#tr.fwx#">#additional_agreement#</a> (#status_id# #status#)</td>
|
||||||
</tr>
|
</tr>
|
||||||
</cfoutput>
|
</cfoutput>
|
||||||
</table>
|
</table>
|
||||||
|
<!--- <i>отображаются позиции сделок, начиная с тестирования</i> --->
|
||||||
|
|
||||||
<cfquery name="qCompute">
|
<cfquery name="qCompute">
|
||||||
select
|
select
|
||||||
@@ -328,6 +330,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="10%">Организация</th>
|
<th width="10%">Организация</th>
|
||||||
|
<th width="10%">Статус организации</th>
|
||||||
<th width="10%">VDC</th>
|
<th width="10%">VDC</th>
|
||||||
<th width="10%">Кластер</th>
|
<th width="10%">Кластер</th>
|
||||||
<th width="10%">Политика хранения</th>
|
<th width="10%">Политика хранения</th>
|
||||||
@@ -355,6 +358,51 @@
|
|||||||
</cfoutput>
|
</cfoutput>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<cfquery name="qGpu">
|
||||||
|
select
|
||||||
|
"Object_UUID"::text
|
||||||
|
,"Org"
|
||||||
|
,"OrgStatus"
|
||||||
|
,"OrgVDC"
|
||||||
|
,(select STRING_AGG(DISTINCT "Cluster",',') FROM vmreports.compute c
|
||||||
|
WHERE ts=(select max(ts) from vmreports.compute)
|
||||||
|
AND g."Org"=c."Organization") as org_cluster
|
||||||
|
,"Name"
|
||||||
|
,"GPU"
|
||||||
|
FROM vmreports.vm_gpu g
|
||||||
|
WHERE ts=(select max(ts) from vmreports.vm_gpu)
|
||||||
|
AND lower(g."ClientID")=lower(<cfqueryparam cfsqltype="cf_sql_varchar" value="#d.id_klienta#"/>)
|
||||||
|
|
||||||
|
</cfquery>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>GPU факт</h3>
|
||||||
|
<table class="worktable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="10%">Организация</th>
|
||||||
|
<th width="10%">Статус организации</th>
|
||||||
|
<th width="10%">VDC</th>
|
||||||
|
<th width="10%">Кластер</th>
|
||||||
|
<th width="10%">VM</th>
|
||||||
|
<th width="5%">GPU</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<cfoutput query="qGpu">
|
||||||
|
<tr>
|
||||||
|
<td>#Org#</td>
|
||||||
|
<td>#OrgStatus#</td>
|
||||||
|
<td>#OrgVDC#</td>
|
||||||
|
<td>#org_cluster#</td>
|
||||||
|
<td>#Name#</td>
|
||||||
|
<td>#GPU#</td>
|
||||||
|
</tr>
|
||||||
|
</cfoutput>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
<!--- ----------------------------------------------------------------- --->
|
<!--- ----------------------------------------------------------------- --->
|
||||||
<!--- ----------------------------------------------------------------- --->
|
<!--- ----------------------------------------------------------------- --->
|
||||||
<!--- ----------------------------------------------------------------- --->
|
<!--- ----------------------------------------------------------------- --->
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ WITH
|
|||||||
AND siv."__deletedAt" IS NULL
|
AND siv."__deletedAt" IS NULL
|
||||||
and d."__deletedAt" IS NULL
|
and d."__deletedAt" IS NULL
|
||||||
and a."__deletedAt" IS NULL
|
and a."__deletedAt" IS NULL
|
||||||
|
and s.probability_pc >= 50
|
||||||
--and a.is_actual
|
--and a.is_actual
|
||||||
and siv.type IN (2,3)
|
and siv.type IN (2,3)
|
||||||
),
|
),
|
||||||
@@ -196,6 +197,43 @@ WITH
|
|||||||
z.__id ,
|
z.__id ,
|
||||||
z.__name
|
z.__name
|
||||||
),
|
),
|
||||||
|
sold_gpu as
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
z.id_klienta as WZ ,
|
||||||
|
z.__name as client ,
|
||||||
|
z.__id as company_uid,
|
||||||
|
round(sum(c.cnt*o.cnt)) as quantity ,
|
||||||
|
count(*) as lines ,
|
||||||
|
STRING_AGG(distinct c.code,', ' order by c.code) as codes
|
||||||
|
FROM
|
||||||
|
stair o
|
||||||
|
JOIN
|
||||||
|
elma.companies z on (o._companies=z.__id)
|
||||||
|
LEFT JOIN component c on c.__id = o.param_id
|
||||||
|
WHERE
|
||||||
|
--c.code SIMILAR TO 'iaas.(ngc|dcp).%.vcpu%-_'
|
||||||
|
(c.code LIKE 'iaas.ngc.%.gpu%-_' OR c.code LIKE 'iaas.dcp.%.gpu%-_')
|
||||||
|
AND c.cnt <> 0
|
||||||
|
AND o.cnt <> 0
|
||||||
|
GROUP BY
|
||||||
|
z.id_klienta,
|
||||||
|
z.__id ,
|
||||||
|
z.__name
|
||||||
|
),
|
||||||
|
gpu_alloc as
|
||||||
|
(
|
||||||
|
select
|
||||||
|
c."ClientID" as wz ,
|
||||||
|
-- json_agg("GPU") as gpu,
|
||||||
|
string_agg("GPU"::text||' '||"OrgStatus",', ') as gpu,
|
||||||
|
count(*) as gpu_alloc
|
||||||
|
from
|
||||||
|
vmreports.vm_gpu c
|
||||||
|
where
|
||||||
|
ts= (select max(ts) from vmreports.vm_gpu)
|
||||||
|
group by
|
||||||
|
c."ClientID" ),
|
||||||
deal_stat as
|
deal_stat as
|
||||||
(
|
(
|
||||||
select
|
select
|
||||||
@@ -233,6 +271,10 @@ select
|
|||||||
<d:field title="Коды Дисков">d.codes as disk_codes</d:field>
|
<d:field title="Коды Дисков">d.codes as disk_codes</d:field>
|
||||||
<d:field title="Диски GB Elma">d.quantity as disk_sold</d:field>
|
<d:field title="Диски GB Elma">d.quantity as disk_sold</d:field>
|
||||||
<d:field title="Диски Cloud">da.disk_alloc</d:field>
|
<d:field title="Диски Cloud">da.disk_alloc</d:field>
|
||||||
|
<d:field title="Коды GPU">g.codes as gpu_codes</d:field>
|
||||||
|
<d:field title="GPU Elma">g.quantity as gpu_sold</d:field>
|
||||||
|
<d:field title="GPU Cloud">ga.gpu_alloc</d:field>
|
||||||
|
<d:field title="GPU">ga.gpu</d:field>
|
||||||
<d:field>z.__name as alloc_company</d:field>
|
<d:field>z.__name as alloc_company</d:field>
|
||||||
<d:field>z.__id as alloc_company_uid</d:field>
|
<d:field>z.__id as alloc_company_uid</d:field>
|
||||||
<d:field>ds.ar_status_ids</d:field>
|
<d:field>ds.ar_status_ids</d:field>
|
||||||
@@ -241,8 +283,10 @@ from sold_ram r
|
|||||||
join deal_stat ds on (lower(r.wz)=lower(ds.wz))
|
join deal_stat ds on (lower(r.wz)=lower(ds.wz))
|
||||||
join sold_cpu c on (lower(r.wz)=lower(c.wz))
|
join sold_cpu c on (lower(r.wz)=lower(c.wz))
|
||||||
left join sold_disk d on (lower(r.wz)=lower(d.wz))
|
left join sold_disk d on (lower(r.wz)=lower(d.wz))
|
||||||
|
left join sold_gpu g on (lower(r.wz)=lower(g.wz))
|
||||||
full join alloc a on (lower(r.wz)=lower(a.wz))
|
full join alloc a on (lower(r.wz)=lower(a.wz))
|
||||||
left join disk_alloc da on (a.wz=da.wz)
|
left join disk_alloc da on (a.wz=da.wz)
|
||||||
|
left join gpu_alloc ga on (a.wz=ga.wz)
|
||||||
left join elma.companies z on (lower(a.wz)=lower(z.id_klienta))
|
left join elma.companies z on (lower(a.wz)=lower(z.id_klienta))
|
||||||
where 1=1 <m:filter_build filter=#pageInfo.settings.filter#/>
|
where 1=1 <m:filter_build filter=#pageInfo.settings.filter#/>
|
||||||
order by <m:order_build sortArray=#pageInfo.settings.sort.sortArray# fieldCount=#fieldCount#/>
|
order by <m:order_build sortArray=#pageInfo.settings.sort.sortArray# fieldCount=#fieldCount#/>
|
||||||
@@ -318,6 +362,13 @@ S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-M
|
|||||||
<th width="3%"><layout:column_head name="disk_sold"/></th>
|
<th width="3%"><layout:column_head name="disk_sold"/></th>
|
||||||
<th width="3%"><layout:column_head name="disk_alloc"/></th>
|
<th width="3%"><layout:column_head name="disk_alloc"/></th>
|
||||||
|
|
||||||
|
<th width="10%"><layout:column_head name="gpu_codes"/></th>
|
||||||
|
<th width="3%"><layout:column_head name="gpu_sold"/></th>
|
||||||
|
<th width="3%"><layout:column_head name="gpu_alloc"/></th>
|
||||||
|
<th width="10%"><layout:column_head name="gpu"/></th>
|
||||||
|
<!--- <th width="3%"><layout:column_head name="disk_sold"/></th> --->
|
||||||
|
|
||||||
|
|
||||||
</layout:grid_head>
|
</layout:grid_head>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
@@ -350,6 +401,11 @@ S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-M
|
|||||||
<td>#disk_codes#</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 disk_sold GT disk_alloc> style="background:lightgreen;"</cfif>>#disk_sold#</td>
|
||||||
<td class="r"<cfif disk_sold LT disk_alloc> style="background:lightcoral;"</cfif>>#disk_alloc#</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 gpu_sold LT gpu_alloc> style="background:lightcoral;"</cfif>>#gpu_alloc#</td>
|
||||||
|
<td>#gpu#</td>
|
||||||
</tr>
|
</tr>
|
||||||
</cfoutput>
|
</cfoutput>
|
||||||
|
|
||||||
@@ -363,6 +419,7 @@ S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-M
|
|||||||
,sum(ram_alloc_on) as ram_alloc_on
|
,sum(ram_alloc_on) as ram_alloc_on
|
||||||
,sum(disk_sold) as disk_sold
|
,sum(disk_sold) as disk_sold
|
||||||
,sum(disk_alloc) as disk_alloc
|
,sum(disk_alloc) as disk_alloc
|
||||||
|
,sum(gpu_sold) as gpu_sold
|
||||||
from qRead
|
from qRead
|
||||||
</cfquery>
|
</cfquery>
|
||||||
|
|
||||||
@@ -383,6 +440,9 @@ S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-M
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td class="r"<cfif disk_sold GT disk_alloc> style="background:lightgreen;"</cfif>>#disk_sold#</td>
|
<td class="r"<cfif disk_sold GT disk_alloc> style="background:lightgreen;"</cfif>>#disk_sold#</td>
|
||||||
<td class="r"<cfif disk_sold LT disk_alloc> style="background:lightcoral;"</cfif>>#disk_alloc#</td>
|
<td class="r"<cfif disk_sold LT disk_alloc> style="background:lightcoral;"</cfif>>#disk_alloc#</td>
|
||||||
|
|
||||||
|
<td></td>
|
||||||
|
<td class="r">#gpu_sold#</td>
|
||||||
</tr>
|
</tr>
|
||||||
</cfoutput>
|
</cfoutput>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user