Files
payg/vm_ls.cfm
2026-07-01 17:13:43 +03:00

164 lines
5.7 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<cfsilent>
<cfimport prefix="m" taglib="lib"/>
<cfimport prefix="c" taglib="lib/controls"/>
<cfimport prefix="d" taglib="lib/data"/>
<cfimport prefix="layout" taglib="layout"/>
</cfsilent>
<m:prepare_ls entity="crm2cloud" accessObject="" pageInfoOut="pageInfo" trackOut="tr"/>
<cfquery name="qVM" cachedWithin=#createTimeSpan(0, 0, 25, 0)#>
select "Name", "Object_UUID", "UUID_VM",
"VDC", "Organization_UUID", "Organization", "WZ", "Cluster", "Host",
"Host_Model", "CPU_Model", "Host_CPU_Cores", "Host_CPU_Sockets", "Host_CPU_Speed", "Host_RAM",
"Host_CPU_Used", "Host_CPU_Used_Avg",
"VDC_CPU_Reserv", "VDC_CPU_Speed",
"VM_vCPU_count", "VM_CPU_Used", "VM_CPU_Used_AVG", "VM_CPU_Reserv_GHz", "VM_CPU_Reserv_perc",
"VM_RAM_Allocated", "VM_RAM_Used",
"VM_is_ON",
k.__id as company_uid
from vmreports.compute c
left outer join elma.companies k ON (lower(k.id_klienta)=lower(c."WZ"))
where c.ts=(select max(ts) from vmreports.compute)
--order by "WZ"
</cfquery>
<!--- <cfdump var=#qVM# abort=true/> --->
<cfif isDefined("output_xls")>
<layout:xml qRead=#qCharge# titleMap=#titleMap# filename="#pageInfo.entity#.xml"/>
<cfabort/>
</cfif><cfif isDefined("output_json")>
<layout:json qRead=#qCharge# titleMap=#titleMap# filename="#pageInfo.entity#.json"/>
<cfabort/>
</cfif><!---
---><layout:page section="header" pageInfo=#pageInfo#>
<layout:attribute name="title">
<cfoutput><b>Сверка CRM - Cloud</b></cfoutput>
</layout:attribute>
<layout:attribute name="controls">
<!---skip filter link, filter is not implemented--->
<!---<layout:language_switch/>--->
</layout:attribute>
</layout:page>
<!--- <cfdump var=#qReconciliation# abort=true/> --->
<cfoutput>
<!--- <form method="post" action="">
Период с <input type="text" name="dt_start" value="#dateFormat(dt_start,'YYYY-MM-DD')#"/>
по <input type="text" name="dt_finish" value="#dateFormat(dt_finish,'YYYY-MM-DD')#"/>
<input type="submit" style="cursor:pointer;"/>
<input type="submit" name="DEBUG" value="DEBUG" style="cursor:pointer;"/>
</form> --->
<!--- Часов в периоде: <b>#hours#</b> Строк в отчете: <b>#qCharge.recordCount#</b><br/>
Актуальность данных:
VCD Computing: <b>#dateFormat(qComputingAge.dt_load,'YYYY-MM-DD')# #timeFormat(qComputingAge.dt_load,'HH:MM:SS')#</b>
VCD Storage: <b>#dateFormat(qStorageAge.dt_load,'YYYY-MM-DD')# #timeFormat(qStorageAge.dt_load,'HH:MM:SS')#</b>
S3 хранение: <b>#dateFormat(qS3VolAge.dt_load,'YYYY-MM-DD')# #timeFormat(qS3VolAge.dt_load,'HH:MM:SS')#</b>
S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-MM-DD')# #timeFormat(qS3OpsTrfAge.dt_load,'HH:MM:SS')#</b>
--->
<br/>
<a href="#request.thisPage#?output_xls" title="экспорт в Excel" style="margin-left:.5em; height:100%;" target="_blank"><img src="img/xls.gif" style="vertical-align:text-bottom;"/></a>
<a href="#request.thisPage#?output_json" title="экспорт в json" style="margin-left:.5em; height:100%;" target="_blank"><img src="img/json.svg" style="vertical-align:text-bottom;" width="13" height="13"/></a>
</cfoutput>
<cfoutput><b>#qVM.recordCount#</b></cfoutput>
<table class="worktable" style="word-break:break-word">
<thead>
<tr>
<th width="3%">WZ</th>
<th width="5%">Имя</th>
<th width="7%">Уникальное имя</th>
<th width="3%">Organization</th>
<th width="5%">VDC</th>
<th width="3%">VDC CPU Reserv</th>
<th width="3%">VDC CPU Speed GHz</th>
<th width="3%">Cluster</th>
<th width="3%">Host</th>
<th width="5%">Host Model</th>
<th width="5%">CPU Model</th>
<th width="3%">Host CPU Cores</th>
<th width="3%">Host CPU Sockets</th>
<th width="3%">Host CPU Speed GHz</th>
<th width="3%">Host RAM GB</th>
<th width="3%">Host CPU Used</th>
<th width="3%">Host CPU Used_Avg</th>
<th width="3%">VM vCPU count</th>
<th width="3%">VM CPU Used</th>
<th width="3%">VM CPU Used AVG</th>
<th width="3%">VM CPU Reserv GHz</th>
<th width="3%">VM CPU Reserv perc</th>
<th width="3%">VM RAM Allocated GB</th>
<th width="3%">VM RAM Used GB</th>
<th width="2%">VM is ON</th>
</tr>
</thead>
<!--- <a href="contragent_rpt.cfm?__id=#company_uid#&#tr.fwx#" style="float:right;word-break:normal;" >--->
<cfoutput query="qVM">
<tr>
<td><a href="contragent.cfm?__id=#company_uid#&#tr.fwx#"style="word-break:normal;">#WZ#&nbsp;<img src="img/view.gif" title="сводка по контрагенту" style="display:inline;"/></a></td>
<td>#Name#</td>
<td>#UUID_VM#</td>
<td>#Organization#</td>
<td>#VDC#</td>
<td><cftry>#round(VDC_CPU_Reserv,3)#<cfcatch></cfcatch></cftry></td>
<td><cftry>#round(VDC_CPU_Speed,3)#<cfcatch></cfcatch></cftry></td>
<td>#qVM.Cluster#</td>
<td>#Host#</td>
<td>#Host_Model#</td>
<td>#CPU_Model#</td>
<td>#Host_CPU_Cores#</td>
<td>#Host_CPU_Sockets#</td>
<td>#round(Host_CPU_Speed,3)#</td>
<td>#round(Host_RAM)#</td>
<td><cftry>#round(Host_CPU_Used,1)#<cfcatch></cfcatch></cftry></td>
<td><cftry>#round(Host_CPU_Used_Avg,1)#<cfcatch></cfcatch></cftry></td>
<td>#VM_vCPU_count#</td>
<td><cftry>#round(VM_CPU_Used,1)#<cfcatch></cfcatch></cftry></td>
<td><cftry>#round(VM_CPU_Used_AVG,1)#<cfcatch></cfcatch></cftry></td>
<td><cftry>#round(VM_CPU_Reserv_GHz,1)#<cfcatch></cfcatch></cftry></td>
<td>#VM_CPU_Reserv_perc#</td>
<td>#VM_RAM_Allocated#</td>
<td><cftry>#round(VM_RAM_Used)#<cfcatch></cfcatch></cftry></td>
<td>#VM_is_ON#</td>
<!--- <td><a href="contragent.cfm?__id=#company_uid#&#tr.fwx#">#client_sold#</a></td> --->
</tr>
</cfoutput>
</table>
<!--- <cfdump var=#qCharge#/> --->
<layout:page section="footer"/>