@ -324,584 +324,646 @@ func EcVolumeDetails(data dash.EcVolumeDetailsData) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if data . TotalSize > 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 39 , "<div class=\"row mb-3\"><div class=\"col-6\"><div class=\"text-center\"><div class=\"h4 mb-0 font-weight-bold text-success\">" )
if data . TotalSize > 0 || data . DeletedByteCount > 0 || data . DeleteCount > 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 39 , "<div class=\"row mb-3\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14 , templ_7745c5c3_Err = templ . JoinStringErrs ( bytesToHumanReadableUint64 ( data . TotalSize - data . DeletedByteCount ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 160 , Col : 107 }
}
_ , 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 , 40 , "</div><small class=\"text-muted\">Active Bytes</small></div></div><div class=\"col-6\"><div class=\"text-center\"><div class=\"h4 mb-0 font-weight-bold text-danger\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15 , templ_7745c5c3_Err = templ . JoinStringErrs ( bytesToHumanReadableUint64 ( data . DeletedByteCount ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 168 , Col : 90 }
}
_ , 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 , 41 , "</div><small class=\"text-muted\">Deleted Bytes</small></div></div></div><!-- File Metrics --> <div class=\"row mb-3\"><div class=\"col-6\"><div class=\"text-center\"><div class=\"h5 mb-0 text-primary\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , data . FileCount - data . DeleteCount ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 180 , Col : 93 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var16 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 42 , "</div><small class=\"text-muted\">Active Files</small></div></div><div class=\"col-6\"><div class=\"text-center\"><div class=\"h5 mb-0 text-warning\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , data . DeleteCount ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 188 , Col : 76 }
}
_ , 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 , 43 , "</div><small class=\"text-muted\">Deleted Files</small></div></div></div><!-- Garbage Ratio for EC Vacuum --> <div class=\"row mb-3\"><div class=\"col-12\"><div class=\"text-center\"><div class=\"h4 mb-0 font-weight-bold\" style=\"" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18 , templ_7745c5c3_Err = templruntime . SanitizeStyleAttributeValues ( "color: " + getGarbageRatioColor ( data . GarbageRatio ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 199 , Col : 132 }
}
_ , 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 , 44 , "\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%.1f%%" , data . GarbageRatio * 100 ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 200 , Col : 87 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var19 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
if data . TotalSize > 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 40 , "<div class=\"col-6\"><div class=\"text-center\"><div class=\"h4 mb-0 font-weight-bold text-success\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14 , templ_7745c5c3_Err = templ . JoinStringErrs ( bytesToHumanReadableUint64 ( data . TotalSize - data . DeletedByteCount ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 161 , Col : 111 }
}
_ , 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 , 41 , "</div><small class=\"text-muted\">Active Bytes</small></div></div><div class=\"col-6\"><div class=\"text-center\"><div class=\"h4 mb-0 font-weight-bold text-danger\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15 , templ_7745c5c3_Err = templ . JoinStringErrs ( bytesToHumanReadableUint64 ( data . DeletedByteCount ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 169 , Col : 94 }
}
_ , 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 , 42 , "</div><small class=\"text-muted\">Deleted Bytes</small></div></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 43 , "<!-- EC-only volume - show deletion info differently --> <div class=\"col-12\"><div class=\"text-center\"><div class=\"h4 mb-0 font-weight-bold text-warning\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , data . DeleteCount ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 179 , Col : 80 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var16 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 44 , "</div><small class=\"text-muted\">Deleted Needles (EC-only volume)</small> " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if data . DeleteCount > 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 45 , "<div class=\"mt-1\"><small class=\"text-info\"><i class=\"fas fa-info-circle me-1\"></i> Deletion info from .ecj files</small></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 46 , "</div></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 45 , "</div><small class=\"text-muted\">Garbage Ratio</small > " )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 47 , "</div><!-- File Metrics - only show for regular volumes --> " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if data . GarbageRatio >= 0.3 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 46 , "<div class=\"mt-1\"><span class=\"badge bg-warning\"><i class=\"fas fa-broom me-1\"></i>EC Vacuum Candidate</span></div>" )
if data . TotalSize > 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 48 , "<div class=\"row mb-3\"><div class=\"col-6\"><div class=\"text-center\"><div class=\"h5 mb-0 text-primary\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , data . FileCount - data . DeleteCount ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 201 , Col : 97 }
}
_ , 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 , 49 , "</div><small class=\"text-muted\">Active Files</small></div></div><div class=\"col-6\"><div class=\"text-center\"><div class=\"h5 mb-0 text-warning\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , data . DeleteCount ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 209 , Col : 80 }
}
_ , 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 , 50 , "</div><small class=\"text-muted\">Deleted Files</small></div></div></div><!-- Garbage Ratio for EC Vacuum --> <div class=\"row mb-3\"><div class=\"col-12\"><div class=\"text-center\"><div class=\"h4 mb-0 font-weight-bold\" style=\"" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19 , templ_7745c5c3_Err = templruntime . SanitizeStyleAttributeValues ( "color: " + getGarbageRatioColor ( data . GarbageRatio ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 220 , Col : 136 }
}
_ , 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 , 51 , "\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%.1f%%" , data . GarbageRatio * 100 ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 221 , Col : 91 }
}
_ , 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 , 52 , "</div><small class=\"text-muted\">Garbage Ratio</small> " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if data . GarbageRatio >= 0.3 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 53 , "<div class=\"mt-1\"><span class=\"badge bg-warning\"><i class=\"fas fa-broom me-1\"></i>EC Vacuum Candidate</span></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 54 , "</div></div></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else if data . DeleteCount > 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 55 , "<!-- For EC-only volumes, show a note about EC vacuum eligibility --> <div class=\"row mb-3\"><div class=\"col-12\"><div class=\"text-center\"><div class=\"mt-2\"><span class=\"badge bg-info\"><i class=\"fas fa-broom me-1\"></i>EC Vacuum Eligible</span><div class=\"mt-1\"><small class=\"text-muted\">Volume has " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , data . DeleteCount ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 244 , Col : 121 }
}
_ , 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 , 56 , " deleted needles</small></div></div></div></div></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 47 , "</div></div></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 48 , "<div class=\"text-center text-muted py-3\"><i class=\"fas fa-info-circle mb-2\"></i><div>Volume health metrics not available</div><small>This may be normal for newly created EC volumes</small></div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 57 , "<div class=\"text-center text-muted py-3\"><i class=\"fas fa-info-circle mb-2\"></i><div>Volume health metrics not available</div><small>This may be normal for newly created EC volumes</small></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 49 , "</div></div></div><!-- Third column for Shard Distribution --><div class=\"col-md-4\"><div class=\"card\"><div class=\"card-header\"><h5 class=\"card-title mb-0\"><i class=\"fas fa-chart-pie me-2\"></i>Shard Distribution</h5></div><div class=\"card-body\"><div class=\"row text-center\"><div class=\"col-4\"><div class=\"border rounded p-3\"><h3 class=\"text-primary mb-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 58 , "</div></div></div><!-- Third column for Shard Distribution --><div class=\"col-md-4\"><div class=\"card\"><div class=\"card-header\"><h5 class=\"card-title mb-0\"><i class=\"fas fa-chart-pie me-2\"></i>Shard Distribution</h5></div><div class=\"card-body\"><div class=\"row text-center\"><div class=\"col-4\"><div class=\"border rounded p-3\"><h3 class=\"text-primary mb-1\">" )
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" , data . TotalShards ) )
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , data . TotalShards ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 236 , Col : 98 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 274 , Col : 98 }
}
_ , 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 , 50 , "</h3><small class=\"text-muted\">Total Shards</small></div></div><div class=\"col-4\"><div class=\"border rounded p-3\"><h3 class=\"text-success mb-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 59 , "</h3><small class=\"text-muted\">Total Shards</small></div></div><div class=\"col-4\"><div class=\"border rounded p-3\"><h3 class=\"text-success mb-1\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , len ( data . DataCenters ) ) )
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , len ( data . DataCenters ) ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 242 , Col : 103 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 280 , Col : 103 }
}
_ , 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 , 51 , "</h3><small class=\"text-muted\">Data Centers</small></div></div><div class=\"col-4\"><div class=\"border rounded p-3\"><h3 class=\"text-info mb-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 60 , "</h3><small class=\"text-muted\">Data Centers</small></div></div><div class=\"col-4\"><div class=\"border rounded p-3\"><h3 class=\"text-info mb-1\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , len ( data . Servers ) ) )
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , len ( data . Servers ) ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 248 , Col : 96 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 286 , Col : 96 }
}
_ , 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 , 52 , "</h3><small class=\"text-muted\">Servers</small></div></div></div><!-- Generation-aware Shard Distribution --><div class=\"mt-3\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 61 , "</h3><small class=\"text-muted\">Servers</small></div></div></div><!-- Generation-aware Shard Distribution --><div class=\"mt-3\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if len ( data . Generations ) > 1 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 53 , "<!-- Multiple generations - show by generation -->" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 62 , "<!-- Multiple generations - show by generation -->" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _ , gen := range data . Generations {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 54 , "<div class=\"mb-2\"><h6 class=\"mb-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 63 , "<div class=\"mb-2\"><h6 class=\"mb-1\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if gen == data . ActiveGeneration {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 55 , "<span class=\"badge bg-success me-1\">G" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 64 , "<span class=\"badge bg-success me-1\">G" )
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" , gen ) )
var templ_7745c5c3_Var25 string
templ_7745c5c3_Var25 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , gen ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 262 , Col : 104 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 300 , Col : 104 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var23 ) )
_ , 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 , 5 6, " (Active)</span> " )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 65 , " (Active)</span> " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 57 , "<span class=\"badge bg-secondary me-1\">G" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 66 , "<span class=\"badge bg-secondary me-1\">G" )
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" , gen ) )
var templ_7745c5c3_Var26 string
templ_7745c5c3_Var26 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , gen ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 264 , Col : 106 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 30 2, Col : 106 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var24 ) )
_ , 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 , 58 , "</span> " )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 67 , "</span> " )
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/14 shards" , len ( data . GenerationShards [ gen ] ) ) )
var templ_7745c5c3_Var27 string
templ_7745c5c3_Var27 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d/14 shards" , len ( data . GenerationShards [ gen ] ) ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 266 , Col : 101 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 304 , Col : 101 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var25 ) )
_ , 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 , 59 , " " )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 68 , " " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if data . GenerationComplete [ gen ] {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 60 , "<i class=\"fas fa-check-circle text-success ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 69 , "<i class=\"fas fa-check-circle text-success ms-1\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 61 , "<i class=\"fas fa-exclamation-triangle text-warning ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 70 , "<i class=\"fas fa-exclamation-triangle text-warning ms-1\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 62 , "</h6><div class=\"d-flex flex-wrap gap-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 71 , "</h6><div class=\"d-flex flex-wrap gap-1\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _ , shardID := range data . GenerationShards [ gen ] {
if gen == data . ActiveGeneration {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 63 , "<span class=\"badge bg-success me-1 mb-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 72 , "<span class=\"badge bg-success me-1 mb-1\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var26 string
templ_7745c5c3_Var26 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%02d" , shardID ) )
var templ_7745c5c3_Var28 string
templ_7745c5c3_Var28 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%02d" , shardID ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 276 , Col : 118 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 314 , Col : 118 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var26 ) )
_ , 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 , 64 , "</span>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 73 , "</span>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 65 , "<span class=\"badge bg-secondary me-1 mb-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 74 , "<span class=\"badge bg-secondary me-1 mb-1\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var27 string
templ_7745c5c3_Var27 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%02d" , shardID ) )
var templ_7745c5c3_Var29 string
templ_7745c5c3_Var29 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%02d" , shardID ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 278 , Col : 120 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 316 , Col : 120 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var27 ) )
_ , 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 , 66 , "</span>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 75 , "</span>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 6 7, "</div></div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 76 , "</div></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 68 , "<!-- Single generation - show all shards --> <h6>Present Shards:</h6><div class=\"d-flex flex-wrap gap-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 77 , "<!-- Single generation - show all shards --> <h6>Present Shards:</h6><div class=\"d-flex flex-wrap gap-1\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _ , shard := range data . Shards {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 69 , "<span class=\"badge bg-success me-1 mb-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 78 , "<span class=\"badge bg-success me-1 mb-1\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var28 string
templ_7745c5c3_Var28 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%02d" , shard . ShardID ) )
var templ_7745c5c3_Var30 string
templ_7745c5c3_Var30 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%02d" , shard . ShardID ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 289 , Col : 112 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 327 , Col : 112 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var28 ) )
_ , 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 , "</span>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 79 , "</span>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 71 , "</div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 80 , "</div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if len ( data . MissingShards ) > 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 72 , "<h6 class=\"mt-2\">Missing Shards:</h6><div class=\"d-flex flex-wrap gap-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 81 , "<h6 class=\"mt-2\">Missing Shards:</h6><div class=\"d-flex flex-wrap gap-1\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _ , shardID := range data . MissingShards {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 73 , "<span class=\"badge bg-secondary me-1 mb-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 82 , "<span class=\"badge bg-secondary me-1 mb-1\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var29 string
templ_7745c5c3_Var29 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%02d" , shardID ) )
var templ_7745c5c3_Var31 string
templ_7745c5c3_Var31 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%02d" , shardID ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 296 , Col : 112 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 334 , Col : 112 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var29 ) )
_ , 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 , "</span>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 83 , "</span>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 75 , "</div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 84 , "</div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 76 , "</div></div></div></div></div><!-- Shard Details Table --><div class=\"card\"><div class=\"card-header\"><h5 class=\"card-title mb-0\"><i class=\"fas fa-list me-2\"></i>Shard Details</h5></div><div class=\"card-body\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 85 , "</div></div></div></div></div><!-- Shard Details Table --><div class=\"card\"><div class=\"card-header\"><h5 class=\"card-title mb-0\"><i class=\"fas fa-list me-2\"></i>Shard Details</h5></div><div class=\"card-body\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if len ( data . Shards ) > 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 77 , "<div class=\"table-responsive\"><table class=\"table table-striped table-hover\"><thead><tr><th><a href=\"#\" onclick=\"sortBy('shard_id')\" class=\"text-dark text-decoration-none\">Shard ID " )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 86 , "<div class=\"table-responsive\"><table class=\"table table-striped table-hover\"><thead><tr><th><a href=\"#\" onclick=\"sortBy('shard_id')\" class=\"text-dark text-decoration-none\">Shard ID " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if data . SortBy == "shard_id" {
if data . SortOrder == "asc" {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 7 8, "<i class=\"fas fa-sort-up ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 87 , "<i class=\"fas fa-sort-up ms-1\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 79 , "<i class=\"fas fa-sort-down ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 88 , "<i class=\"fas fa-sort-down ms-1\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 80 , "<i class=\"fas fa-sort ms-1 text-muted\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 89 , "<i class=\"fas fa-sort ms-1 text-muted\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 81 , "</a></th><th><a href=\"#\" onclick=\"sortBy('server')\" class=\"text-dark text-decoration-none\">Server " )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 90 , "</a></th><th><a href=\"#\" onclick=\"sortBy('server')\" class=\"text-dark text-decoration-none\">Server " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if data . SortBy == "server" {
if data . SortOrder == "asc" {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 82 , "<i class=\"fas fa-sort-up ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 91 , "<i class=\"fas fa-sort-up ms-1\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 83 , "<i class=\"fas fa-sort-down ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 92 , "<i class=\"fas fa-sort-down ms-1\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 84 , "<i class=\"fas fa-sort ms-1 text-muted\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 93 , "<i class=\"fas fa-sort ms-1 text-muted\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 85 , "</a></th><th><a href=\"#\" onclick=\"sortBy('data_center')\" class=\"text-dark text-decoration-none\">Data Center " )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 94 , "</a></th><th><a href=\"#\" onclick=\"sortBy('data_center')\" class=\"text-dark text-decoration-none\">Data Center " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if data . SortBy == "data_center" {
if data . SortOrder == "asc" {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 86 , "<i class=\"fas fa-sort-up ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 95 , "<i class=\"fas fa-sort-up ms-1\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 87 , "<i class=\"fas fa-sort-down ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 96 , "<i class=\"fas fa-sort-down ms-1\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 88 , "<i class=\"fas fa-sort ms-1 text-muted\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 97 , "<i class=\"fas fa-sort ms-1 text-muted\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 8 9, "</a></th><th><a href=\"#\" onclick=\"sortBy('rack')\" class=\"text-dark text-decoration-none\">Rack " )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 98 , "</a></th><th><a href=\"#\" onclick=\"sortBy('rack')\" class=\"text-dark text-decoration-none\">Rack " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if data . SortBy == "rack" {
if data . SortOrder == "asc" {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 90 , "<i class=\"fas fa-sort-up ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 99 , "<i class=\"fas fa-sort-up ms-1\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 9 1, "<i class=\"fas fa-sort-down ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 100 , "<i class=\"fas fa-sort-down 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 ms-1 text-muted\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 101 , "<i class=\"fas fa-sort ms-1 text-muted\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 93 , "</a></th><th class=\"text-dark\">Generation</th><th class=\"text-dark\">Disk Type</th><th class=\"text-dark\">Shard Size</th><th class=\"text-dark\">Actions</th></tr></thead> <tbody>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 102 , "</a></th><th class=\"text-dark\">Generation</th><th class=\"text-dark\">Disk Type</th><th class=\"text-dark\">Shard Size</th><th class=\"text-dark\">Actions</th></tr></thead> <tbody>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _ , shard := range data . Shards {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 94 , "<tr><td><span class=\"badge bg-primary\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 103 , "<tr><td><span class=\"badge bg-primary\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var30 string
templ_7745c5c3_Var30 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%02d" , shard . ShardID ) )
var templ_7745c5c3_Var32 string
templ_7745c5c3_Var32 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%02d" , shard . ShardID ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 386 , Col : 110 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 424 , Col : 110 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var30 ) )
_ , 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 , 95 , "</span></td><td><a href=\"" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 104 , "</span></td><td><a href=\"" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var31 templ . SafeURL
templ_7745c5c3_Var31 , templ_7745c5c3_Err = templ . JoinURLErrs ( templ . URL ( "/cluster/volume-servers/" + shard . Server ) )
var templ_7745c5c3_Var33 templ . SafeURL
templ_7745c5c3_Var33 , templ_7745c5c3_Err = templ . JoinURLErrs ( templ . URL ( "/cluster/volume-servers/" + shard . Server ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 389 , Col : 106 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 427 , Col : 106 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var31 ) )
_ , 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 , 96 , "\" class=\"text-primary text-decoration-none\"><code class=\"small\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 105 , "\" class=\"text-primary text-decoration-none\"><code class=\"small\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var32 string
templ_7745c5c3_Var32 , templ_7745c5c3_Err = templ . JoinStringErrs ( shard . Server )
var templ_7745c5c3_Var34 string
templ_7745c5c3_Var34 , templ_7745c5c3_Err = templ . JoinStringErrs ( shard . Server )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 390 , Col : 81 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 428 , Col : 81 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var32 ) )
_ , 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 , 97 , "</code></a></td><td><span class=\"badge bg-primary text-white\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 106 , "</code></a></td><td><span class=\"badge bg-primary text-white\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var33 string
templ_7745c5c3_Var33 , templ_7745c5c3_Err = templ . JoinStringErrs ( shard . DataCenter )
var templ_7745c5c3_Var35 string
templ_7745c5c3_Var35 , templ_7745c5c3_Err = templ . JoinStringErrs ( shard . DataCenter )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 39 4, Col : 103 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 432 , Col : 103 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var33 ) )
_ , 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 , 98 , "</span></td><td><span class=\"badge bg-secondary text-white\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 107 , "</span></td><td><span class=\"badge bg-secondary text-white\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var34 string
templ_7745c5c3_Var34 , templ_7745c5c3_Err = templ . JoinStringErrs ( shard . Rack )
var templ_7745c5c3_Var36 string
templ_7745c5c3_Var36 , templ_7745c5c3_Err = templ . JoinStringErrs ( shard . Rack )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 397 , Col : 99 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 435 , Col : 99 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var34 ) )
_ , 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 , 99 , "</span></td><td>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 108 , "</span></td><td>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if shard . Generation == data . ActiveGeneration {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 100 , "<span class=\"badge bg-success\">G" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 109 , "<span class=\"badge bg-success\">G" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var35 string
templ_7745c5c3_Var35 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , shard . Generation ) )
var templ_7745c5c3_Var37 string
templ_7745c5c3_Var37 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , shard . Generation ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 401 , Col : 116 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 439 , Col : 116 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var35 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var37 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 10 1 , "</span> <i class=\"fas fa-star text-warning ms-1\" title=\"Active Generation\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 110 , "</span> <i class=\"fas fa-star text-warning ms-1\" title=\"Active Generation\"></i>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 102 , "<span class=\"badge bg-secondary\">G" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 111 , "<span class=\"badge bg-secondary\">G" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var36 string
templ_7745c5c3_Var36 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , shard . Generation ) )
var templ_7745c5c3_Var38 string
templ_7745c5c3_Var38 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , shard . Generation ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 40 4 , Col : 118 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 442 , Col : 118 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var36 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var38 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 103 , "</span>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 112 , "</span>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 104 , "</td><td><span class=\"text-dark\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 113 , "</td><td><span class=\"text-dark\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var37 string
templ_7745c5c3_Var37 , templ_7745c5c3_Err = templ . JoinStringErrs ( shard . DiskType )
var templ_7745c5c3_Var39 string
templ_7745c5c3_Var39 , templ_7745c5c3_Err = templ . JoinStringErrs ( shard . DiskType )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 408 , Col : 83 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 446 , Col : 83 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var37 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var39 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 105 , "</span></td><td><span class=\"text-success\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 114 , "</span></td><td><span class=\"text-success\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var38 string
templ_7745c5c3_Var38 , templ_7745c5c3_Err = templ . JoinStringErrs ( bytesToHumanReadableUint64 ( shard . Size ) )
var templ_7745c5c3_Var40 string
templ_7745c5c3_Var40 , templ_7745c5c3_Err = templ . JoinStringErrs ( bytesToHumanReadableUint64 ( shard . Size ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 411 , Col : 110 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 449 , Col : 110 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var38 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var40 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 106 , "</span></td><td><a href=\"" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 115 , "</span></td><td><a href=\"" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var39 templ . SafeURL
templ_7745c5c3_Var39 , templ_7745c5c3_Err = templ . JoinURLErrs ( templ . SafeURL ( fmt . Sprintf ( "http://%s/ui/index.html" , shard . Server ) ) )
var templ_7745c5c3_Var41 templ . SafeURL
templ_7745c5c3_Var41 , templ_7745c5c3_Err = templ . JoinURLErrs ( templ . SafeURL ( fmt . Sprintf ( "http://%s/ui/index.html" , shard . Server ) ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 414 , Col : 121 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 452 , Col : 121 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var39 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var41 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 107 , "\" target=\"_blank\" class=\"btn btn-sm btn-primary\"><i class=\"fas fa-external-link-alt me-1\"></i>Volume Server</a></td></tr>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 116 , "\" target=\"_blank\" class=\"btn btn-sm btn-primary\"><i class=\"fas fa-external-link-alt me-1\"></i>Volume Server</a></td></tr>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 108 , "</tbody></table></div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 117 , "</tbody></table></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 109 , "<div class=\"text-center py-4\"><i class=\"fas fa-exclamation-triangle fa-3x text-warning mb-3\"></i><h5>No EC shards found</h5><p class=\"text-muted\">This volume may not be EC encoded yet.</p></div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 118 , "<div class=\"text-center py-4\"><i class=\"fas fa-exclamation-triangle fa-3x text-warning mb-3\"></i><h5>No EC shards found</h5><p class=\"text-muted\">This volume may not be EC encoded yet.</p></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 110 , "</div></div><script>\n // Sorting functionality\n function sortBy(field) {\n const currentSort = new URLSearchParams(window.location.search).get('sort_by');\n const currentOrder = new URLSearchParams(window.location.search).get('sort_order') || 'asc';\n \n let newOrder = 'asc';\n if (currentSort === field && currentOrder === 'asc') {\n newOrder = 'desc';\n }\n \n const url = new URL(window.location);\n url.searchParams.set('sort_by', field);\n url.searchParams.set('sort_order', newOrder);\n window.location.href = url.toString();\n }\n </script>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 119 , "</div></div><script>\n // Sorting functionality\n function sortBy(field) {\n const currentSort = new URLSearchParams(window.location.search).get('sort_by');\n const currentOrder = new URLSearchParams(window.location.search).get('sort_order') || 'asc';\n \n let newOrder = 'asc';\n if (currentSort === field && currentOrder === 'asc') {\n newOrder = 'desc';\n }\n \n const url = new URL(window.location);\n url.searchParams.set('sort_by', field);\n url.searchParams.set('sort_order', newOrder);\n window.location.href = url.toString();\n }\n </script>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}