mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-24 03:35:59 +08:00
在面板上显示资源限制
This commit is contained in:
@@ -5,20 +5,20 @@ table.table.table-hover
|
||||
td(style='width: 200px;') 一小时 CPU 时间
|
||||
td
|
||||
.progress
|
||||
.progress-bar.progress-bar-success(role='progressbar', aria-valuenow='#{(resources_usage.cpu / account.attribute.resources_limit.cpu * 100).toFixed()}', aria-valuemin='0', aria-valuemax='100', style='width: #{(resources_usage.cpu / account.attribute.resources_limit.cpu * 100).toFixed()}%;')
|
||||
span #{resources_usage.cpu.toFixed(1)} / #{account.attribute.resources_limit.cpu} s
|
||||
.progress-bar.progress-bar-success(role='progressbar', aria-valuenow='#{resources_usage.cpu.now_per}', aria-valuemin='0', aria-valuemax='100', style='width: #{resources_usage.cpu.now_per}%;')
|
||||
span #{resources_usage.cpu.now} / #{resources_usage.cpu.limit} s
|
||||
tr
|
||||
td 一小时内存占用
|
||||
td
|
||||
.progress
|
||||
.progress-bar.progress-bar-success(role='progressbar', aria-valuenow='#{(resources_usage.memory / account.attribute.resources_limit.memory * 100).toFixed()}', aria-valuemin='0', aria-valuemax='100', style='min-width: 30px; width: #{(resources_usage.memory / account.attribute.resources_limit.memory * 100).toFixed()}%;')
|
||||
span #{resources_usage.memory.toFixed(1)} / #{account.attribute.resources_limit.memory} M
|
||||
.progress-bar.progress-bar-success(role='progressbar', aria-valuenow='#{(resources_usage.memory.now_per}', aria-valuemin='0', aria-valuemax='100', style='width: #{resources_usage.memory.now_per}%;')
|
||||
span #{resources_usage.memory.now} / #{resources_usage.memory.limit} M
|
||||
tr
|
||||
td 储存空间
|
||||
td
|
||||
.progress
|
||||
.progress-bar.progress-bar-success(role='progressbar', aria-valuenow='0', aria-valuemin='0', aria-valuemax='100', style='width: 0%;')
|
||||
span 0 / #{account.attribute.resources_limit.storage} M
|
||||
.progress-bar(class='progress-bar-#{storage_usage.color}',role='progressbar', aria-valuenow='#{storage_usage.now_per}', aria-valuemin='0', aria-valuemax='100', style='width: #{storage_usage.now_per}%;')
|
||||
span #{storage_usage.now} / #{storage_usage.limit} M
|
||||
tr
|
||||
td 月流量
|
||||
td
|
||||
|
||||
Reference in New Issue
Block a user