SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
weed admin: add version to volumes page
chrislu5e6d94319bb5
diff --git a/weed/admin/dash/admin_server.go b/weed/admin/dash/admin_server.goindex 4d15460bd1..7e36b58a14 100644--- a/weed/admin/dash/admin_server.go+++ b/weed/admin/dash/admin_server.go@@ -125,6 +125,7 @@ type VolumeInfo struct {FileCount int64 `json:"file_count"`Replication string `json:"replication"`DiskType string `json:"disk_type"`+ Version uint32 `json:"version"`}type ClusterVolumesData struct {@@ -148,18 +149,24 @@ type ClusterVolumesData struct {RackCount int `json:"rack_count"`DiskTypeCount int `json:"disk_type_count"`CollectionCount int `json:"collection_count"`+ VersionCount int `json:"version_count"`// Conditional display flagsShowDataCenterColumn bool `json:"show_datacenter_column"`ShowRackColumn bool `json:"show_rack_column"`ShowDiskTypeColumn bool `json:"show_disk_type_column"`ShowCollectionColumn bool `json:"show_collection_column"`+ ShowVersionColumn bool `json:"show_version_column"`// Single values when only one existsSingleDataCenter string `json:"single_datacenter"`SingleRack string `json:"single_rack"`SingleDiskType string `json:"single_disk_type"`SingleCollection string `json:"single_collection"`+ SingleVersion string `json:"single_version"`++ // All versions when multiple exist+ AllVersions []string `json:"all_versions"`// FilteringFilterCollection string `json:"filter_collection"`@@ -598,7 +605,7 @@ func (s *AdminServer) GetBucketDetails(bucketName string) (*BucketDetails, errordetails := &BucketDetails{Bucket: S3Bucket{- Name: bucketName,+ Name: bucketName,},Objects: []S3Object{},UpdatedAt: time.Now(),@@ -844,6 +851,7 @@ func (s *AdminServer) GetClusterVolumes(page int, pageSize int, sortBy string, sFileCount: int64(volInfo.FileCount),Replication: fmt.Sprintf("%03d", volInfo.ReplicaPlacement),DiskType: diskType,+ Version: volInfo.Version,}volumes = append(volumes, volume)totalSize += volume.Size@@ -875,11 +883,12 @@ func (s *AdminServer) GetClusterVolumes(page int, pageSize int, sortBy string, stotalSize = filteredTotalSize}- // Calculate unique data center, rack, disk type, and collection counts from all volumes+ // Calculate unique data center, rack, disk type, collection, and version counts from all volumesdataCenterMap := make(map[string]bool)rackMap := make(map[string]bool)diskTypeMap := make(map[string]bool)collectionMap := make(map[string]bool)+ versionMap := make(map[string]bool)for _, volume := range volumes {if volume.DataCenter != "" {dataCenterMap[volume.DataCenter] = true@@ -895,11 +904,13 @@ func (s *AdminServer) GetClusterVolumes(page int, pageSize int, sortBy string, sif volume.Collection != "" {collectionMap[volume.Collection] = true}+ versionMap[fmt.Sprintf("%d", volume.Version)] = true}dataCenterCount := len(dataCenterMap)rackCount := len(rackMap)diskTypeCount := len(diskTypeMap)collectionCount := len(collectionMap)+ versionCount := len(versionMap)// Sort volumess.sortVolumes(volumes, sortBy, sortOrder)@@ -928,8 +939,11 @@ func (s *AdminServer) GetClusterVolumes(page int, pageSize int, sortBy string, sshowRackColumn := rackCount > 1showDiskTypeColumn := diskTypeCount > 1showCollectionColumn := collectionCount > 1 && collection == "" // Hide column when filtering by collection+ showVersionColumn := versionCount > 1++ var singleDataCenter, singleRack, singleDiskType, singleCollection, singleVersion string+ var allVersions []string- var singleDataCenter, singleRack, singleDiskType, singleCollection stringif dataCenterCount == 1 {for dc := range dataCenterMap {singleDataCenter = dc@@ -954,6 +968,18 @@ func (s *AdminServer) GetClusterVolumes(page int, pageSize int, sortBy string, sbreak}}+ if versionCount == 1 {+ for version := range versionMap {+ singleVersion = "v" + version+ break+ }+ } else {+ // Collect all versions and sort them+ for version := range versionMap {+ allVersions = append(allVersions, "v"+version)+ }+ sort.Strings(allVersions)+ }return &ClusterVolumesData{Volumes: volumes,@@ -969,14 +995,18 @@ func (s *AdminServer) GetClusterVolumes(page int, pageSize int, sortBy string, sRackCount: rackCount,DiskTypeCount: diskTypeCount,CollectionCount: collectionCount,+ VersionCount: versionCount,ShowDataCenterColumn: showDataCenterColumn,ShowRackColumn: showRackColumn,ShowDiskTypeColumn: showDiskTypeColumn,ShowCollectionColumn: showCollectionColumn,+ ShowVersionColumn: showVersionColumn,SingleDataCenter: singleDataCenter,SingleRack: singleRack,SingleDiskType: singleDiskType,SingleCollection: singleCollection,+ SingleVersion: singleVersion,+ AllVersions: allVersions,FilterCollection: collection,}, nil}@@ -1005,6 +1035,8 @@ func (s *AdminServer) sortVolumes(volumes []VolumeInfo, sortBy string, sortOrderless = volumes[i].Replication < volumes[j].Replicationcase "disktype":less = volumes[i].DiskType < volumes[j].DiskType+ case "version":+ less = volumes[i].Version < volumes[j].Versiondefault:less = volumes[i].ID < volumes[j].ID}diff --git a/weed/admin/view/app/cluster_volumes.templ b/weed/admin/view/app/cluster_volumes.templindex f2da794307..312202f224 100644--- a/weed/admin/view/app/cluster_volumes.templ+++ b/weed/admin/view/app/cluster_volumes.templ@@ -2,6 +2,7 @@ package appimport ("fmt"+ "strings""github.com/seaweedfs/seaweedfs/weed/admin/dash")@@ -172,6 +173,34 @@ templ ClusterVolumes(data dash.ClusterVolumesData) {</div></div>+ <div class="col-xl-2 col-md-4 col-sm-6 mb-4">+ <div class="card border-left-purple 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-purple text-uppercase mb-1">+ if data.VersionCount == 1 {+ Version+ } else {+ Versions+ }+ </div>+ <div class="h5 mb-0 font-weight-bold text-gray-800">+ if data.VersionCount == 1 {+ {data.SingleVersion}+ } else {+ {strings.Join(data.AllVersions, ", ")}+ }+ </div>+ </div>+ <div class="col-auto">+ <i class="fas fa-code-branch fa-2x text-gray-300"></i>+ </div>+ </div>+ </div>+ </div>+ </div>+<div class="col-xl-2 col-md-4 col-sm-6 mb-4"><div class="card border-left-warning shadow h-100 py-2"><div class="card-body">@@ -268,6 +297,14 @@ templ ClusterVolumes(data dash.ClusterVolumesData) {</a></th>}+ if data.ShowVersionColumn {+ <th>+ <a href="#" onclick="sortTable('version')" class="text-decoration-none text-dark">+ Version+ @getSortIcon("version", data.SortBy, data.SortOrder)+ </a>+ </th>+ }<th>Actions</th></tr></thead>@@ -308,6 +345,11 @@ templ ClusterVolumes(data dash.ClusterVolumesData) {<span class="badge bg-primary">{volume.DiskType}</span></td>}+ if data.ShowVersionColumn {+ <td>+ <span class="badge bg-dark">{fmt.Sprintf("v%d", volume.Version)}</span>+ </td>+ }<td><div class="btn-group btn-group-sm"><button type="button" class="btn btn-outline-primary btn-sm"diff --git a/weed/admin/view/app/cluster_volumes_templ.go b/weed/admin/view/app/cluster_volumes_templ.goindex 9c303bb5e9..8194bee084 100644--- a/weed/admin/view/app/cluster_volumes_templ.go+++ b/weed/admin/view/app/cluster_volumes_templ.go@@ -11,6 +11,7 @@ import templruntime "github.com/a-h/templ/runtime"import ("fmt""github.com/seaweedfs/seaweedfs/weed/admin/dash"+ "strings")func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {@@ -46,7 +47,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {var templ_7745c5c3_Var2 stringtempl_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(data.FilterCollection)if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 17, Col: 92}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 18, Col: 92}}_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))if templ_7745c5c3_Err != nil {@@ -104,7 +105,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {var templ_7745c5c3_Var3 stringtempl_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.TotalVolumes))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 52, Col: 73}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 53, Col: 73}}_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))if templ_7745c5c3_Err != nil {@@ -133,7 +134,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {var templ_7745c5c3_Var4 stringtempl_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(data.SingleCollection)if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 77, Col: 62}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 78, Col: 62}}_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))if templ_7745c5c3_Err != nil {@@ -143,7 +144,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {var templ_7745c5c3_Var5 stringtempl_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.CollectionCount))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 79, Col: 80}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 80, Col: 80}}_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))if templ_7745c5c3_Err != nil {@@ -173,7 +174,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {var templ_7745c5c3_Var6 stringtempl_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(data.SingleDataCenter)if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 105, Col: 62}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 106, Col: 62}}_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))if templ_7745c5c3_Err != nil {@@ -183,7 +184,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {var templ_7745c5c3_Var7 stringtempl_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.DataCenterCount))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 107, Col: 80}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 108, Col: 80}}_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))if templ_7745c5c3_Err != nil {@@ -213,7 +214,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {var templ_7745c5c3_Var8 stringtempl_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(data.SingleRack)if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 133, Col: 56}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 134, Col: 56}}_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))if templ_7745c5c3_Err != nil {@@ -223,7 +224,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {var templ_7745c5c3_Var9 stringtempl_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.RackCount))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 135, Col: 74}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 136, Col: 74}}_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))if templ_7745c5c3_Err != nil {@@ -253,7 +254,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {var templ_7745c5c3_Var10 stringtempl_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(data.SingleDiskType)if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 161, Col: 60}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 162, Col: 60}}_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))if templ_7745c5c3_Err != nil {@@ -263,32 +264,72 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {var templ_7745c5c3_Var11 stringtempl_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.DiskTypeCount))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 163, Col: 78}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 164, Col: 78}}_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "</div></div><div class=\"col-auto\"><i class=\"fas fa-hdd fa-2x text-gray-300\"></i></div></div></div></div></div><div class=\"col-xl-2 col-md-4 col-sm-6 mb-4\"><div class=\"card border-left-warning 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-warning text-uppercase mb-1\">Total Size</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "</div></div><div class=\"col-auto\"><i class=\"fas fa-hdd fa-2x text-gray-300\"></i></div></div></div></div></div><div class=\"col-xl-2 col-md-4 col-sm-6 mb-4\"><div class=\"card border-left-purple 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-purple text-uppercase mb-1\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var12 string- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(formatBytes(data.TotalSize))+ if data.VersionCount == 1 {+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "Version")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ } else {+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "Versions")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ if data.VersionCount == 1 {+ var templ_7745c5c3_Var12 string+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(data.SingleVersion)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 190, Col: 59}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ } else {+ var templ_7745c5c3_Var13 string+ templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(strings.Join(data.AllVersions, ", "))+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 192, Col: 77}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</div></div><div class=\"col-auto\"><i class=\"fas fa-code-branch fa-2x text-gray-300\"></i></div></div></div></div></div><div class=\"col-xl-2 col-md-4 col-sm-6 mb-4\"><div class=\"card border-left-warning 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-warning text-uppercase mb-1\">Total Size</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var14 string+ templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(formatBytes(data.TotalSize))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 184, Col: 64}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 213, Col: 64}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</div></div><div class=\"col-auto\"><i class=\"fas fa-chart-area fa-2x text-gray-300\"></i></div></div></div></div></div></div><!-- Volumes Table --><div class=\"card shadow mb-4\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"fas fa-database me-2\"></i>Volume Details</h6></div><div class=\"card-body\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "</div></div><div class=\"col-auto\"><i class=\"fas fa-chart-area fa-2x text-gray-300\"></i></div></div></div></div></div></div><!-- Volumes Table --><div class=\"card shadow mb-4\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"fas fa-database me-2\"></i>Volume Details</h6></div><div class=\"card-body\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if len(data.Volumes) > 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<div class=\"table-responsive\"><table class=\"table table-hover\" id=\"volumesTable\"><thead><tr><th><a href=\"#\" onclick=\"sortTable('id')\" class=\"text-decoration-none text-dark\">Volume ID")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "<div class=\"table-responsive\"><table class=\"table table-hover\" id=\"volumesTable\"><thead><tr><th><a href=\"#\" onclick=\"sortTable('id')\" class=\"text-decoration-none text-dark\">Volume ID")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -296,7 +337,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</a></th><th><a href=\"#\" onclick=\"sortTable('server')\" class=\"text-decoration-none text-dark\">Server")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</a></th><th><a href=\"#\" onclick=\"sortTable('server')\" class=\"text-decoration-none text-dark\">Server")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -304,12 +345,12 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</a></th>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</a></th>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.ShowDataCenterColumn {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<th><a href=\"#\" onclick=\"sortTable('datacenter')\" class=\"text-decoration-none text-dark\">Data Center")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<th><a href=\"#\" onclick=\"sortTable('datacenter')\" class=\"text-decoration-none text-dark\">Data Center")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -317,13 +358,13 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "</a></th>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</a></th>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if data.ShowRackColumn {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<th><a href=\"#\" onclick=\"sortTable('rack')\" class=\"text-decoration-none text-dark\">Rack")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<th><a href=\"#\" onclick=\"sortTable('rack')\" class=\"text-decoration-none text-dark\">Rack")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -331,13 +372,13 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</a></th>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</a></th>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if data.ShowCollectionColumn {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<th><a href=\"#\" onclick=\"sortTable('collection')\" class=\"text-decoration-none text-dark\">Collection")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "<th><a href=\"#\" onclick=\"sortTable('collection')\" class=\"text-decoration-none text-dark\">Collection")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -345,12 +386,12 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</a></th>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "</a></th>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<th><a href=\"#\" onclick=\"sortTable('size')\" class=\"text-decoration-none text-dark\">Size")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "<th><a href=\"#\" onclick=\"sortTable('size')\" class=\"text-decoration-none text-dark\">Size")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -358,7 +399,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</a></th><th><a href=\"#\" onclick=\"sortTable('filecount')\" class=\"text-decoration-none text-dark\">File Count")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "</a></th><th><a href=\"#\" onclick=\"sortTable('filecount')\" class=\"text-decoration-none text-dark\">File Count")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -366,7 +407,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "</a></th><th><a href=\"#\" onclick=\"sortTable('replication')\" class=\"text-decoration-none text-dark\">Replication")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</a></th><th><a href=\"#\" onclick=\"sortTable('replication')\" class=\"text-decoration-none text-dark\">Replication")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -374,12 +415,12 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "</a></th>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "</a></th>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.ShowDiskTypeColumn {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "<th><a href=\"#\" onclick=\"sortTable('disktype')\" class=\"text-decoration-none text-dark\">Disk Type")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "<th><a href=\"#\" onclick=\"sortTable('disktype')\" class=\"text-decoration-none text-dark\">Disk Type")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -387,396 +428,429 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "</a></th>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</a></th>")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ }+ if data.ShowVersionColumn {+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<th><a href=\"#\" onclick=\"sortTable('version')\" class=\"text-decoration-none text-dark\">Version")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = getSortIcon("version", data.SortBy, data.SortOrder).Render(ctx, templ_7745c5c3_Buffer)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "</a></th>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "<th>Actions</th></tr></thead> <tbody>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "<th>Actions</th></tr></thead> <tbody>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}for _, volume := range data.Volumes {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "<tr><td><code>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "<tr><td><code>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var13 string- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", volume.ID))+ var templ_7745c5c3_Var15 string+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", volume.ID))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 278, Col: 79}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 315, Col: 79}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</code></td><td><a href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "</code></td><td><a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var14 templ.SafeURL = templ.SafeURL(fmt.Sprintf("http://%s", volume.Server))- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var14)))+ var templ_7745c5c3_Var16 templ.SafeURL = templ.SafeURL(fmt.Sprintf("http://%s", volume.Server))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var16)))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "\" target=\"_blank\" class=\"text-decoration-none\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "\" target=\"_blank\" class=\"text-decoration-none\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var15 string- templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(volume.Server)+ var templ_7745c5c3_Var17 string+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(volume.Server)if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 282, Col: 62}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 319, Col: 62}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, " <i class=\"fas fa-external-link-alt ms-1 text-muted\"></i></a></td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, " <i class=\"fas fa-external-link-alt ms-1 text-muted\"></i></a></td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.ShowDataCenterColumn {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "<td><span class=\"badge bg-light text-dark\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<td><span class=\"badge bg-light text-dark\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var16 string- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(volume.DataCenter)+ var templ_7745c5c3_Var18 string+ templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(volume.DataCenter)if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 288, Col: 105}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 325, Col: 105}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</span></td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "</span></td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if data.ShowRackColumn {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "<td><span class=\"badge bg-light text-dark\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<td><span class=\"badge bg-light text-dark\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var17 string- templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(volume.Rack)+ var templ_7745c5c3_Var19 string+ templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(volume.Rack)if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 293, Col: 99}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 330, Col: 99}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "</span></td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "</span></td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if data.ShowCollectionColumn {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "<td><span class=\"badge bg-secondary\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<td><span class=\"badge bg-secondary\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var18 string- templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(volume.Collection)+ var templ_7745c5c3_Var20 string+ templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(volume.Collection)if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 298, Col: 99}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 335, Col: 99}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "</span></td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "</span></td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "<td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var19 string- templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(formatBytes(volume.Size))+ var templ_7745c5c3_Var21 string+ templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(formatBytes(volume.Size))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 301, Col: 69}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 338, Col: 69}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var20 string- templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", volume.FileCount))+ var templ_7745c5c3_Var22 string+ templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", volume.FileCount))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 302, Col: 80}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 339, Col: 80}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</td><td><span class=\"badge bg-info\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "</td><td><span class=\"badge bg-info\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var21 string- templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(volume.Replication)+ var templ_7745c5c3_Var23 string+ templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(volume.Replication)if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 304, Col: 91}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 341, Col: 91}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "</span></td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "</span></td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.ShowDiskTypeColumn {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<td><span class=\"badge bg-primary\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "<td><span class=\"badge bg-primary\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var22 string- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(volume.DiskType)+ var templ_7745c5c3_Var24 string+ templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(volume.DiskType)if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 308, Col: 95}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 345, Col: 95}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "</span></td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "</span></td>")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ }+ if data.ShowVersionColumn {+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "<td><span class=\"badge bg-dark\">")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var25 string+ templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("v%d", volume.Version))+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 350, Col: 111}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "</span></td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "<td><div class=\"btn-group btn-group-sm\"><button type=\"button\" class=\"btn btn-outline-primary btn-sm\" title=\"View Details\"><i class=\"fas fa-eye\"></i></button> <button type=\"button\" class=\"btn btn-outline-secondary btn-sm\" title=\"Compact\"><i class=\"fas fa-compress-alt\"></i></button> <button type=\"button\" class=\"btn btn-outline-warning btn-sm\" title=\"Fix\"><i class=\"fas fa-wrench\"></i></button></div></td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "<td><div class=\"btn-group btn-group-sm\"><button type=\"button\" class=\"btn btn-outline-primary btn-sm\" title=\"View Details\"><i class=\"fas fa-eye\"></i></button> <button type=\"button\" class=\"btn btn-outline-secondary btn-sm\" title=\"Compact\"><i class=\"fas fa-compress-alt\"></i></button> <button type=\"button\" class=\"btn btn-outline-warning btn-sm\" title=\"Fix\"><i class=\"fas fa-wrench\"></i></button></div></td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "</tbody></table></div><!-- Volume Summary --> <div class=\"d-flex justify-content-between align-items-center mt-3\"><div><small class=\"text-muted\">Showing ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "</tbody></table></div><!-- Volume Summary --> <div class=\"d-flex justify-content-between align-items-center mt-3\"><div><small class=\"text-muted\">Showing ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var23 string- templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", (data.CurrentPage-1)*data.PageSize+1))+ var templ_7745c5c3_Var26 string+ templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", (data.CurrentPage-1)*data.PageSize+1))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 337, Col: 98}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 379, Col: 98}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, " to ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, " to ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var24 string- templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", minInt(data.CurrentPage*data.PageSize, data.TotalVolumes)))+ var templ_7745c5c3_Var27 string+ templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", minInt(data.CurrentPage*data.PageSize, data.TotalVolumes)))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 337, Col: 180}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 379, Col: 180}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, " of ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, " of ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var25 string- templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.TotalVolumes))+ var templ_7745c5c3_Var28 string+ templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.TotalVolumes))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 337, Col: 222}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 379, Col: 222}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, " volumes</small></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, " volumes</small></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.TotalPages > 1 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "<div><small class=\"text-muted\">Page ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "<div><small class=\"text-muted\">Page ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var26 string- templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.CurrentPage))+ var templ_7745c5c3_Var29 string+ templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.CurrentPage))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 343, Col: 77}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 385, Col: 77}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, " of ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, " of ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var27 string- templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.TotalPages))+ var templ_7745c5c3_Var30 string+ templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.TotalPages))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 343, Col: 117}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 385, Col: 117}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "</small></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "</small></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "</div><!-- Pagination Controls --> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "</div><!-- Pagination Controls --> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.TotalPages > 1 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "<div class=\"d-flex justify-content-center mt-3\"><nav aria-label=\"Volumes pagination\"><ul class=\"pagination pagination-sm mb-0\"><!-- Previous Button -->")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "<div class=\"d-flex justify-content-center mt-3\"><nav aria-label=\"Volumes pagination\"><ul class=\"pagination pagination-sm mb-0\"><!-- Previous Button -->")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.CurrentPage > 1 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "<li class=\"page-item\"><a class=\"page-link pagination-link\" href=\"#\" data-page=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "<li class=\"page-item\"><a class=\"page-link pagination-link\" href=\"#\" data-page=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var28 string- templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.CurrentPage-1))+ var templ_7745c5c3_Var31 string+ templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.CurrentPage-1))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 357, Col: 138}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 399, Col: 138}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "\"><i class=\"fas fa-chevron-left\"></i></a></li>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "\"><i class=\"fas fa-chevron-left\"></i></a></li>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "<li class=\"page-item disabled\"><span class=\"page-link\"><i class=\"fas fa-chevron-left\"></i></span></li>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "<li class=\"page-item disabled\"><span class=\"page-link\"><i class=\"fas fa-chevron-left\"></i></span></li>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "<!-- Page Numbers -->")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "<!-- Page Numbers -->")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}for i := maxInt(1, data.CurrentPage-2); i <= minInt(data.TotalPages, data.CurrentPage+2); i++ {if i == data.CurrentPage {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "<li class=\"page-item active\"><span class=\"page-link\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "<li class=\"page-item active\"><span class=\"page-link\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var29 string- templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", i))+ var templ_7745c5c3_Var32 string+ templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", i))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 373, Col: 93}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 415, Col: 93}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "</span></li>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "</span></li>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "<li class=\"page-item\"><a class=\"page-link pagination-link\" href=\"#\" data-page=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "<li class=\"page-item\"><a class=\"page-link pagination-link\" href=\"#\" data-page=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var30 string- templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", i))+ var templ_7745c5c3_Var33 string+ templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", i))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 377, Col: 125}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 419, Col: 125}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var31 string- templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", i))+ var templ_7745c5c3_Var34 string+ templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", i))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 377, Col: 148}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 419, Col: 148}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "</a></li>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "</a></li>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "<!-- Next Button -->")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "<!-- Next Button -->")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.CurrentPage < data.TotalPages {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "<li class=\"page-item\"><a class=\"page-link pagination-link\" href=\"#\" data-page=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "<li class=\"page-item\"><a class=\"page-link pagination-link\" href=\"#\" data-page=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var32 string- templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.CurrentPage+1))+ var templ_7745c5c3_Var35 string+ templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", data.CurrentPage+1))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 385, Col: 138}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 427, Col: 138}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "\"><i class=\"fas fa-chevron-right\"></i></a></li>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "\"><i class=\"fas fa-chevron-right\"></i></a></li>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "<li class=\"page-item disabled\"><span class=\"page-link\"><i class=\"fas fa-chevron-right\"></i></span></li>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "<li class=\"page-item disabled\"><span class=\"page-link\"><i class=\"fas fa-chevron-right\"></i></span></li>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "</ul></nav></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "</ul></nav></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "<div class=\"text-center py-5\"><i class=\"fas fa-database fa-3x text-muted mb-3\"></i><h5 class=\"text-muted\">No Volumes Found</h5><p class=\"text-muted\">No volumes are currently available in the cluster.</p></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "<div class=\"text-center py-5\"><i class=\"fas fa-database fa-3x text-muted mb-3\"></i><h5 class=\"text-muted\">No Volumes Found</h5><p class=\"text-muted\">No volumes are currently available in the cluster.</p></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "</div></div><!-- Last Updated --><div class=\"row\"><div class=\"col-12\"><small class=\"text-muted\"><i class=\"fas fa-clock me-1\"></i> Last updated: ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "</div></div><!-- Last Updated --><div class=\"row\"><div class=\"col-12\"><small class=\"text-muted\"><i class=\"fas fa-clock me-1\"></i> Last updated: ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var33 string- templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(data.LastUpdated.Format("2006-01-02 15:04:05"))+ var templ_7745c5c3_Var36 string+ templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(data.LastUpdated.Format("2006-01-02 15:04:05"))if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 415, Col: 81}+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 457, Col: 81}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "</small></div></div></div><!-- JavaScript for pagination and sorting --><script>\n // Initialize pagination links when page loads\n document.addEventListener('DOMContentLoaded', function() {\n // Add click handlers to pagination links\n document.querySelectorAll('.pagination-link').forEach(link => {\n link.addEventListener('click', function(e) {\n e.preventDefault();\n const page = this.getAttribute('data-page');\n goToPage(page);\n });\n });\n });\n \n function goToPage(page) {\n const url = new URL(window.location);\n url.searchParams.set('page', page);\n window.location.href = url.toString();\n }\n \n function changePageSize() {\n const pageSize = document.getElementById('pageSizeSelect').value;\n const url = new URL(window.location);\n url.searchParams.set('pageSize', pageSize);\n url.searchParams.set('page', '1'); // Reset to first page\n window.location.href = url.toString();\n }\n \n function sortTable(column) {\n const url = new URL(window.location);\n const currentSort = url.searchParams.get('sortBy');\n const currentOrder = url.searchParams.get('sortOrder') || 'asc';\n \n let newOrder = 'asc';\n if (currentSort === column && currentOrder === 'asc') {\n newOrder = 'desc';\n }\n \n url.searchParams.set('sortBy', column);\n url.searchParams.set('sortOrder', newOrder);\n url.searchParams.set('page', '1'); // Reset to first page\n window.location.href = url.toString();\n }\n \n function exportVolumes() {\n // TODO: Implement volume export functionality\n alert('Export functionality to be implemented');\n }\n </script>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "</small></div></div></div><!-- JavaScript for pagination and sorting --><script>\n // Initialize pagination links when page loads\n document.addEventListener('DOMContentLoaded', function() {\n // Add click handlers to pagination links\n document.querySelectorAll('.pagination-link').forEach(link => {\n link.addEventListener('click', function(e) {\n e.preventDefault();\n const page = this.getAttribute('data-page');\n goToPage(page);\n });\n });\n });\n \n function goToPage(page) {\n const url = new URL(window.location);\n url.searchParams.set('page', page);\n window.location.href = url.toString();\n }\n \n function changePageSize() {\n const pageSize = document.getElementById('pageSizeSelect').value;\n const url = new URL(window.location);\n url.searchParams.set('pageSize', pageSize);\n url.searchParams.set('page', '1'); // Reset to first page\n window.location.href = url.toString();\n }\n \n function sortTable(column) {\n const url = new URL(window.location);\n const currentSort = url.searchParams.get('sortBy');\n const currentOrder = url.searchParams.get('sortOrder') || 'asc';\n \n let newOrder = 'asc';\n if (currentSort === column && currentOrder === 'asc') {\n newOrder = 'desc';\n }\n \n url.searchParams.set('sortBy', column);\n url.searchParams.set('sortOrder', newOrder);\n url.searchParams.set('page', '1'); // Reset to first page\n window.location.href = url.toString();\n }\n \n function exportVolumes() {\n // TODO: Implement volume export functionality\n alert('Export functionality to be implemented');\n }\n </script>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -835,23 +909,23 @@ func getSortIcon(column, currentSort, currentOrder string) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var34 := templ.GetChildren(ctx)- if templ_7745c5c3_Var34 == nil {- templ_7745c5c3_Var34 = templ.NopComponent+ templ_7745c5c3_Var37 := templ.GetChildren(ctx)+ if templ_7745c5c3_Var37 == nil {+ templ_7745c5c3_Var37 = templ.NopComponent}ctx = templ.ClearChildren(ctx)if column != currentSort {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "<i class=\"fas fa-sort text-muted ms-1\"></i>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "<i class=\"fas fa-sort text-muted ms-1\"></i>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else if currentOrder == "asc" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "<i class=\"fas fa-sort-up text-primary ms-1\"></i>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "<i class=\"fas fa-sort-up text-primary ms-1\"></i>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "<i class=\"fas fa-sort-down text-primary ms-1\"></i>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "<i class=\"fas fa-sort-down text-primary ms-1\"></i>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}