058 manager

This commit is contained in:
2026-07-22 13:27:09 +03:00
parent 228023ba49
commit 59bf109ba5
3 changed files with 28 additions and 15 deletions
+1 -1
View File
@@ -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.057"/> <cfset request.APP_VERSION="0.00.058"/>
<cfset request.STAND=getStand()/> <cfset request.STAND=getStand()/>
<cflock scope="application" type="readonly" timeout=3> <cflock scope="application" type="readonly" timeout=3>
+14 -12
View File
@@ -211,7 +211,7 @@ select
<d:field title="Disk Used" cfSqlType="CF_SQL_NUMERIC">coalesce(u.disk_used,0) as disk_used</d:field> <d:field title="Disk Used" cfSqlType="CF_SQL_NUMERIC">coalesce(u.disk_used,0) as disk_used</d:field>
<d:field title="GHz Used Prod" cfSqlType="CF_SQL_NUMERIC">coalesce(u.ghz_used_prod,0) as ghz_used_prod</d:field> <d:field title="GHz Used Prod" cfSqlType="CF_SQL_NUMERIC">coalesce(u.ghz_used_prod,0) as ghz_used_prod</d:field>
<d:field title="RAM Used PROD" cfSqlType="CF_SQL_NUMERIC">coalesce(u.ram_used_prod,0) as ram_used_prod</d:field> <d:field title="RAM Used Prod" cfSqlType="CF_SQL_NUMERIC">coalesce(u.ram_used_prod,0) as ram_used_prod</d:field>
<d:field title="Disk Used Prod" cfSqlType="CF_SQL_NUMERIC">coalesce(u.disk_used_prod,0) as disk_used_prod</d:field> <d:field title="Disk Used Prod" cfSqlType="CF_SQL_NUMERIC">coalesce(u.disk_used_prod,0) as disk_used_prod</d:field>
</d:field_set> </d:field_set>
@@ -278,37 +278,38 @@ from qRead
<cfoutput query="qTS"> <cfoutput query="qTS">
<h3 style="display:inline-block; margin-right:2em;">Актуальность данных</h3> <h3 style="display:inline-block; margin-right:2em;">Актуальность данных</h3>
<b>VM:</b> #dateFormat(ts_compute,"YYYY-MM-DD")# #timeFormat(ts_compute,"HH:MM")# <b>VM:</b> <span <cfif dateDiff("h",ts_compute,Now()) GT 24> class="err"</cfif>>#dateFormat(ts_compute,"YYYY-MM-DD")# #timeFormat(ts_compute,"HH:MM")#</span>
<b>Хосты:</b> #dateFormat(ts_host,"YYYY-MM-DD")# #timeFormat(ts_host,"HH:MM")# <b>Хосты:</b> <span <cfif dateDiff("h",ts_host,Now()) GT 24> class="err"</cfif>>#dateFormat(ts_host,"YYYY-MM-DD")# #timeFormat(ts_host,"HH:MM")#</span>
</cfoutput> </cfoutput>
<h3>Свободно</h3> <h3>Свободно</h3>
<table class="worktable"> <table class="worktable">
<thead> <!--- <thead> --->
<tr>
<layout:grid_head titleMap=#titleMap# sortArray=#pageInfo.settings.sort.sortArray#> <layout:grid_head titleMap=#titleMap# sortArray=#pageInfo.settings.sort.sortArray#>
<!--- <tr> --->
<th width="5%" rowspan="2"><layout:column_head name="cluster_v1"/></th> <th width="5%" rowspan="2"><layout:column_head name="cluster_v1"/></th>
<th width="5%" rowspan="2"><layout:column_head name="cluster_v2"/></th> <th width="5%" rowspan="2"><layout:column_head name="cluster_v2"/></th>
<th width="10%" rowspan="2"><layout:column_head name="commercial_name"/></th> <th width="10%" rowspan="2"><layout:column_head name="commercial_name"/></th>
<th width="3%" rowspan="2"><layout:column_head name="hosts_total"/></th> <th width="3%" rowspan="2"><layout:column_head name="hosts_total"/></th>
<th colspan="7">Свободно</th> <th colspan="7">Свободно</th>
<th width="3%" rowspan="2">ВМ размещено</th> <th width="3%" rowspan="2">ВМ размещено</th>
</layout:grid_head>
</tr>
<tr><th width="5%">RAM GB by alloc</th>
<th width="5%">RAM GB by usage</th>
<!--- </tr> --->
</layout:grid_head>
<tr>
<th width="5%">RAM GB by alloc</th>
<th width="5%">RAM GB by usage</th>
<th width="5%">CPU GHz (текущий резерв)</th> <th width="5%">CPU GHz (текущий резерв)</th>
<th width="5%">Ядра 20% (текущий резерв)</th> <th width="5%">Ядра 20% (текущий резерв)</th>
<th width="5%">Ядра 50% (текущий резерв)</th> <th width="5%">Ядра 50% (текущий резерв)</th>
<th width="5%">Ядра 80% (текущий резерв)</th> <th width="5%">Ядра 80% (текущий резерв)</th>
<th width="5%">vSAN GB (alloc)</th> <th width="5%">vSAN GB (alloc)</th>
</tr> </tr>
</thead> <!--- </thead> --->
<!--- <tbody> --->
<cfoutput query="qRead"> <cfoutput query="qRead">
<tr> <tr>
<td>#cluster_v1#</td> <td>#cluster_v1#</td>
@@ -337,6 +338,7 @@ from qRead
</tr> </tr>
</cfoutput> </cfoutput>
<!--- </tbody> --->
</table> </table>
<!--- <i>Жесткий резерв - если включим минимальное резервирование 20%</i><br/> <!--- <i>Жесткий резерв - если включим минимальное резервирование 20%</i><br/>
<i>Доступная память указана по выделенному объему (используется меньше, доступно больше)</i><br/> ---> <i>Доступная память указана по выделенному объему (используется меньше, доступно больше)</i><br/> --->
+11
View File
@@ -265,12 +265,20 @@ AS (
AND (<cfqueryparam cfsqltype="cf_sql_timestamp" value=#dt_report#/> < d.dt_next) AND (<cfqueryparam cfsqltype="cf_sql_timestamp" value=#dt_report#/> < d.dt_next)
GROUP BY z.id_klienta GROUP BY z.id_klienta
) )
,manager AS (
select z.id_klienta as wz, u.__name as manager, u.email, u.__status_status as status
from elma.companies z
join elma.comp_users_ext u on (z.responsible=u.__id)
)
select select
<d:field_set titleMapOut="titleMap" lengthOut="fieldCount"> <d:field_set titleMapOut="titleMap" lengthOut="fieldCount">
<d:field title="WZ Elma">r.wz as wz_sold</d:field> <d:field title="WZ Elma">r.wz as wz_sold</d:field>
<d:field title="Клиент">r.client as client_sold</d:field> <d:field title="Клиент">r.client as client_sold</d:field>
<d:field>r.company_uid</d:field> <d:field>r.company_uid</d:field>
<d:field title="WZ Cloud">a.wz as wz_alloc</d:field> <d:field title="WZ Cloud">a.wz as wz_alloc</d:field>
<d:field title="Manager">u.manager</d:field>
<d:field title="Manager Email">u.email</d:field>
<d:field title="Manager Status">u.status</d:field>
<d:field title="Статусы из VCD">a.organization_status</d:field><!--- список статусов через запятую ---> <d:field title="Статусы из VCD">a.organization_status</d:field><!--- список статусов через запятую --->
<d:field title="Статусы">ds.status_ids</d:field> <d:field title="Статусы">ds.status_ids</d:field>
<d:field title="Модели оплаты">ds.line_pricing_model_ids</d:field> <d:field title="Модели оплаты">ds.line_pricing_model_ids</d:field>
@@ -302,6 +310,7 @@ 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 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))
left join manager u on (lower(coalesce(r.wz,a.wz))=lower(u.wz))
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#/>
</cfquery> </cfquery>
@@ -359,6 +368,7 @@ S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-M
<th width="5%"><layout:column_head name="wz_sold"/></th> <th width="5%"><layout:column_head name="wz_sold"/></th>
<th width="10%"><layout:column_head name="client_sold"/></th> <th width="10%"><layout:column_head name="client_sold"/></th>
<th width="5%"><layout:column_head name="wz_alloc"/></th> <th width="5%"><layout:column_head name="wz_alloc"/></th>
<th width="5%"><layout:column_head name="manager"/></th>
<th width="3%"><layout:column_head name="status_ids"/></th> <th width="3%"><layout:column_head name="status_ids"/></th>
<th width="5%"><layout:column_head name="organization_status"/></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="3%"><layout:column_head name="line_pricing_model_ids"/></th>
@@ -399,6 +409,7 @@ S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-M
</cfif> </cfif>
</td> </td>
<td>#wz_alloc#</td> <td>#wz_alloc#</td>
<td><a href="mailto:#email#"<cfif qRead.status NEQ 2> title="не работает"</cfif>><span<cfif qRead.status NEQ 2> class="err"</cfif>>#manager#</span></a></td>
<td>#status_ids#</td> <td>#status_ids#</td>
<td>#organization_status#</td> <td>#organization_status#</td>
<td>#line_pricing_model_ids#</td> <td>#line_pricing_model_ids#</td>