aboutsummaryrefslogtreecommitdiff
path: root/weed/admin/view/app/admin.templ
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-08-02 02:16:49 -0700
committerGitHub <noreply@github.com>2025-08-02 02:16:49 -0700
commit9d013ea9b8edbd6cf3030730a8a0ab02d00a47da (patch)
treec7a78ef6e2e9ed5784b58568a89d9c86fff8e569 /weed/admin/view/app/admin.templ
parent3d4e8409a53cf8103c9b93e2fde13be8e8652a25 (diff)
downloadseaweedfs-9d013ea9b8edbd6cf3030730a8a0ab02d00a47da.tar.xz
seaweedfs-9d013ea9b8edbd6cf3030730a8a0ab02d00a47da.zip
Admin UI: include ec shard sizes into volume server info (#7071)
* show ec shards on dashboard, show max in its own column * master collect shard size info * master send shard size via VolumeList * change to more efficient shard sizes slice * include ec shard sizes into volume server info * Eliminated Redundant gRPC Calls * much more efficient * Efficient Counting: bits.OnesCount32() uses CPU-optimized instructions to count set bits in O(1) * avoid extra volume list call * simplify * preserve existing shard sizes * avoid hard coded value * Update weed/storage/erasure_coding/ec_volume_info.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update weed/admin/dash/volume_management.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update ec_volume_info.go * address comments * avoid duplicated functions * Update weed/admin/dash/volume_management.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * simplify * refactoring * fix compilation --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Diffstat (limited to 'weed/admin/view/app/admin.templ')
-rw-r--r--weed/admin/view/app/admin.templ60
1 files changed, 59 insertions, 1 deletions
diff --git a/weed/admin/view/app/admin.templ b/weed/admin/view/app/admin.templ
index 2dd1a0ace..534c798bd 100644
--- a/weed/admin/view/app/admin.templ
+++ b/weed/admin/view/app/admin.templ
@@ -104,6 +104,53 @@ templ Admin(data dash.AdminData) {
</div>
</div>
+ <!-- Second Row for EC Shards Information -->
+ <div class="row mb-4">
+ <div class="col-xl-3 col-md-6 mb-4">
+ <div class="card border-left-secondary shadow h-100 py-2">
+ <div class="card-body">
+ <div class="row no-gutters align-items-center">
+ <div class="col mr-2">
+ <div class="text-xs font-weight-bold text-secondary text-uppercase mb-1">
+ EC Volumes
+ </div>
+ <div class="h5 mb-0 font-weight-bold text-gray-800">
+ {fmt.Sprintf("%d", data.TotalEcVolumes)}
+ </div>
+ </div>
+ <div class="col-auto">
+ <i class="fas fa-layer-group fa-2x text-gray-300"></i>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="col-xl-3 col-md-6 mb-4">
+ <div class="card border-left-dark shadow h-100 py-2">
+ <div class="card-body">
+ <div class="row no-gutters align-items-center">
+ <div class="col mr-2">
+ <div class="text-xs font-weight-bold text-dark text-uppercase mb-1">
+ EC Shards
+ </div>
+ <div class="h5 mb-0 font-weight-bold text-gray-800">
+ {fmt.Sprintf("%d", data.TotalEcShards)}
+ </div>
+ </div>
+ <div class="col-auto">
+ <i class="fas fa-puzzle-piece fa-2x text-gray-300"></i>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- Empty columns to balance the row -->
+ <div class="col-xl-3 col-md-6 mb-4"></div>
+ <div class="col-xl-3 col-md-6 mb-4"></div>
+ </div>
+
<!-- Master Nodes Status -->
<div class="row mb-4">
<div class="col-lg-4">
@@ -219,6 +266,7 @@ templ Admin(data dash.AdminData) {
<th>Data Center</th>
<th>Rack</th>
<th>Volumes</th>
+ <th>EC Shards</th>
<th>Capacity</th>
</tr>
</thead>
@@ -242,12 +290,22 @@ templ Admin(data dash.AdminData) {
</div>
</div>
</td>
+ <td>
+ if vs.EcShards > 0 {
+ <span class="badge bg-info text-white me-1">{fmt.Sprintf("%d", vs.EcShards)}</span>
+ if vs.EcVolumes > 0 {
+ <small class="text-muted">({fmt.Sprintf("%d vol", vs.EcVolumes)})</small>
+ }
+ } else {
+ <span class="text-muted">-</span>
+ }
+ </td>
<td>{formatBytes(vs.DiskUsage)} / {formatBytes(vs.DiskCapacity)}</td>
</tr>
}
if len(data.VolumeServers) == 0 {
<tr>
- <td colspan="6" class="text-center text-muted py-4">
+ <td colspan="7" class="text-center text-muted py-4">
<i class="fas fa-info-circle me-2"></i>
No volume servers found
</td>