@ -210,435 +210,698 @@ func EcVolumeDetails(data dash.EcVolumeDetailsData) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 23 , "</span></td></tr><tr><td><strong>Last Updated:</strong></td><td><span class=\"text-muted\" >" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 23 , "</span></td></tr><tr><td><strong>Active Generation:</strong></td><td >" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10 , templ_7745c5c3_Err = templ . JoinStringErrs ( data . LastUpdated . Format ( "2006-01-02 15:04:05" ) )
if data . ActiveGeneration > 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 24 , "<span class=\"badge bg-success\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "G%d" , data . ActiveGeneration ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 107 , Col : 109 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var10 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 25 , "</span> " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 26 , "<span class=\"badge bg-primary\">G0</span> " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
if len ( data . Generations ) > 1 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 27 , "<span class=\"ms-1 badge bg-warning\"><i class=\"fas fa-layer-group me-1\"></i>Multi-Gen</span>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 28 , "</td></tr>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if len ( data . Generations ) > 1 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 29 , "<tr><td><strong>All Generations:</strong></td><td>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for i , gen := range data . Generations {
if i > 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 30 , "<span class=\"me-1\"></span>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 31 , " " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if gen == data . ActiveGeneration {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 32 , "<span class=\"badge bg-success\">G" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11 , 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 : 127 , Col : 99 }
}
_ , 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 , 33 , " (Active)</span>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 34 , "<span class=\"badge bg-secondary\">G" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12 , 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 : 129 , Col : 101 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var12 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 35 , "</span>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 36 , "</td></tr>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 37 , "<tr><td><strong>Last Updated:</strong></td><td><span class=\"text-muted\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13 , 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/ec_volume_details.templ ` , Line : 106 , Col : 104 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 138 , Col : 104 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var10 ) )
_ , 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 , 24 , "</span></td></tr></table></div></div></div><div class=\"col-md-4\"><div class=\"card\"><div class=\"card-header\"><h5 class=\"card-title mb-0\"><i class=\"fas fa-database me-2\"></i>Volume Health</h5></div><div class=\"card-body\"><!-- Storage Metrics -->" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 38 , "</span></td></tr></table></div></div></div><div class=\"col-md-4\"><div class=\"card\"><div class=\"card-header\"><h5 class=\"card-title mb-0\"><i class=\"fas fa-database me-2\"></i>Volume Health</h5></div><div class=\"card-body\"><!-- Storage Metrics -->" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if data . TotalSize > 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 25 , "<div class=\"row mb-3\"><div class=\"col-6\"><div class=\"text-center\"><div class=\"h4 mb-0 font-weight-bold text-success\">" )
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 templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11 , templ_7745c5c3_Err = templ . JoinStringErrs ( bytesToHumanReadableUint64 ( data . TotalSize - data . DeletedByteCount ) )
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 : 128 , Col : 107 }
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_Var11 ) )
_ , 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 , 26 , "</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\">" )
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_Var12 string
templ_7745c5c3_Var12 , templ_7745c5c3_Err = templ . JoinStringErrs ( bytesToHumanReadableUint64 ( data . DeletedByteCount ) )
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 : 136 , Col : 90 }
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_Var12 ) )
_ , 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 , 27 , "</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\">" )
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_Var13 string
templ_7745c5c3_Var13 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , data . FileCount - data . DeleteCount ) )
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 : 148 , Col : 93 }
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_Var13 ) )
_ , 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 , 28 , "</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\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 4 2, "</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_Var14 string
templ_7745c5c3_Var14 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , data . DeleteCount ) )
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 : 156 , Col : 76 }
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_Var14 ) )
_ , 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 , 29 , "</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=\"" )
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_Var15 string
templ_7745c5c3_Var15 , templ_7745c5c3_Err = templruntime . SanitizeStyleAttributeValues ( "color: " + getGarbageRatioColor ( data . GarbageRatio ) )
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 : 167 , Col : 132 }
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_Var15 ) )
_ , 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 , 30 , "\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 44 , "\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%.1f%%" , data . GarbageRatio * 100 ) )
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 : 168 , Col : 87 }
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_Var16 ) )
_ , 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 , 31 , "</div><small class=\"text-muted\">Garbage Ratio</small> " )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 45 , "</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 , 32 , "<div class=\"mt-1\"><span class=\"badge bg-warning\"><i class=\"fas fa-broom me-1\"></i>EC Vacuum Candidate</span></div>" )
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 templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 33 , "</div></div></div>" )
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 , 3 4, "<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 , 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>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 35 , "</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 , 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\">" )
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 . TotalShards ) )
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20 , 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 : 204 , Col : 98 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 236 , Col : 98 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var17 ) )
_ , 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 , 36 , "</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 , 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\">" )
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" , len ( data . DataCenters ) ) )
var templ_7745c5c3_Var2 1 string
templ_7745c5c3_Var2 1 , 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 : 210 , Col : 103 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 242 , Col : 103 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var18 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var2 1 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 37 , "</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 , 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\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%d" , len ( data . Servers ) ) )
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22 , 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 : 216 , Col : 96 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 248 , Col : 96 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var19 ) )
_ , 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 , 38 , "</h3><small class=\"text-muted\">Servers</small></div></div></div><!-- Shard Distribution Visualization --><div class=\"mt-3\"><h6>Present Shards:</h6><div class=\"d-flex flex-wrap gap-1 \">" )
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\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _ , shard := range data . Shards {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 39 , "<span class=\"badge bg-success me-1 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 ( "%02d" , shard . ShardID ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 227 , Col : 108 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var20 ) )
if len ( data . Generations ) > 1 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 53 , "<!-- Multiple generations - show by generation -->" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 40 , "</span>" )
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\">" )
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" )
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 ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 262 , Col : 104 }
}
_ , 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 , 56 , " (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" )
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 ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 264 , Col : 106 }
}
_ , 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 , 58 , "</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 ] ) ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 266 , Col : 101 }
}
_ , 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 , 59 , " " )
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>" )
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>" )
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\">" )
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\">" )
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 ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 276 , Col : 118 }
}
_ , 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 , 64 , "</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\">" )
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 ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 278 , Col : 120 }
}
_ , 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 , "</span>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 67 , "</div></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 41 , "</div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if len ( data . MissingShards ) > 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 42 , "<h6 class=\"mt-2\">Missing Shards:</h6><div class=\"d-flex flex-wrap gap-1\">" )
} 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\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _ , shardID := range data . MissingShards {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 43 , "<span class=\"badge bg-secondary me-1 mb-1\">" )
for _ , shard := range data . Shards {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 69 , "<span class=\"badge bg-success me-1 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 ( "%02d" , shardID ) )
var templ_7745c5c3_Var28 string
templ_7745c5c3_Var28 , templ_7745c5c3_Err = templ . JoinStringErrs ( fmt . Sprintf ( "%02d" , shard . S hardID ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 234 , Col : 108 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 289 , Col : 112 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var21 ) )
_ , 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 , 44 , "</span>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 70 , "</span>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 45 , "</div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 71 , "</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\">" )
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\">" )
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 ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 296 , Col : 112 }
}
_ , 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 , 74 , "</span>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 75 , "</div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 46 , "</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 , 7 6, "</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 , 47 , "<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 , 7 7, "<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 , 48 , "<i class=\"fas fa-sort-up ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 7 8, "<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 , 49 , "<i class=\"fas fa-sort-down ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 7 9, "<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 , 50 , "<i class=\"fas fa-sort ms-1 text-muted\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 8 0, "<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 , 51 , "</a></th><th><a href=\"#\" onclick=\"sortBy('server')\" class=\"text-dark text-decoration-none\">Server " )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 8 1, "</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 , 52 , "<i class=\"fas fa-sort-up ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 8 2, "<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 , 53 , "<i class=\"fas fa-sort-down ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 8 3, "<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 , 54 , "<i class=\"fas fa-sort ms-1 text-muted\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 8 4, "<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 , 55 , "</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 , 8 5, "</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 , 56 , "<i class=\"fas fa-sort-up ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 8 6, "<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 , 57 , "<i class=\"fas fa-sort-down ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 8 7, "<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 , 58 , "<i class=\"fas fa-sort ms-1 text-muted\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 8 8, "<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 , 59 , "</a></th><th><a href=\"#\" onclick=\"sortBy('rack')\" class=\"text-dark text-decoration-none\">Rack " )
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 " )
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 , 6 0, "<i class=\"fas fa-sort-up ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 9 0, "<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 , 6 1, "<i class=\"fas fa-sort-down ms-1\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 9 1, "<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 , 6 2, "<i class=\"fas fa-sort ms-1 text-muted\"></i>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 9 2, "<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 , 6 3, "</a></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 , 9 3, "</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 , 6 4, "<tr><td><span class=\"badge bg-primary\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 9 4, "<tr><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 ( 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 : 322 , Col : 110 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 386 , Col : 110 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var22 ) )
_ , 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 , 6 5, "</span></td><td><a href=\"" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 9 5, "</span></td><td><a href=\"" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 3 templ . SafeURL
templ_7745c5c3_Var2 3 , templ_7745c5c3_Err = templ . JoinURLErrs ( templ . URL ( "/cluster/volume-servers/" + shard . Server ) )
var templ_7745c5c3_Var31 templ . SafeURL
templ_7745c5c3_Var31 , 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 : 325 , Col : 106 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 389 , Col : 106 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var2 3 ) )
_ , 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 , 6 6, "\" class=\"text-primary text-decoration-none\"><code class=\"small\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 9 6, "\" class=\"text-primary text-decoration-none\"><code class=\"small\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24 , templ_7745c5c3_Err = templ . JoinStringErrs ( shard . Server )
var templ_7745c5c3_Var3 2 string
templ_7745c5c3_Var3 2 , 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 : 326 , Col : 81 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 390 , Col : 81 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var24 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var3 2 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 6 7, "</code></a></td><td><span class=\"badge bg-primary text-white\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 9 7, "</code></a></td><td><span class=\"badge bg-primary text-white\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var25 string
templ_7745c5c3_Var25 , templ_7745c5c3_Err = templ . JoinStringErrs ( shard . DataCenter )
var templ_7745c5c3_Var33 string
templ_7745c5c3_Var33 , 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 : 330 , Col : 103 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 394 , Col : 103 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var25 ) )
_ , 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 , 6 8, "</span></td><td><span class=\"badge bg-secondary text-white\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 9 8, "</span></td><td><span class=\"badge bg-secondary text-white\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var26 string
templ_7745c5c3_Var26 , templ_7745c5c3_Err = templ . JoinStringErrs ( shard . Rack )
var templ_7745c5c3_Var34 string
templ_7745c5c3_Var34 , 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 : 333 , Col : 99 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 397 , Col : 99 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var26 ) )
_ , 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 , 6 9, "</span></td><td><span class=\"text-dark\" >" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 9 9, "</span></td><td>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var27 string
templ_7745c5c3_Var27 , templ_7745c5c3_Err = templ . JoinStringErrs ( shard . DiskType )
if shard . Generation == data . ActiveGeneration {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 100 , "<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 ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 401 , Col : 116 }
}
_ , 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 , 101 , "</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" )
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 ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 404 , Col : 118 }
}
_ , 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 , 103 , "</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\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var37 string
templ_7745c5c3_Var37 , 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 : 336 , Col : 83 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 408 , Col : 83 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var27 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var3 7 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 70 , "</span></td><td><span class=\"text-success\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 105 , "</span></td><td><span class=\"text-success\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var28 string
templ_7745c5c3_Var28 , templ_7745c5c3_Err = templ . JoinStringErrs ( bytesToHumanReadableUint64 ( shard . Size ) )
var templ_7745c5c3_Var3 8 string
templ_7745c5c3_Var3 8 , 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 : 339 , Col : 110 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 411 , Col : 110 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var28 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var3 8 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 71 , "</span></td><td><a href=\"" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 106 , "</span></td><td><a href=\"" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var29 templ . SafeURL
templ_7745c5c3_Var29 , templ_7745c5c3_Err = templ . JoinURLErrs ( templ . SafeURL ( fmt . Sprintf ( "http://%s/ui/index.html" , shard . Server ) ) )
var templ_7745c5c3_Var3 9 templ . SafeURL
templ_7745c5c3_Var3 9 , 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 : 342 , Col : 121 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` view/app/ec_volume_details.templ ` , Line : 414 , Col : 121 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var29 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var3 9 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 72 , "\" 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 , 10 7, "\" 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 , 73 , "</tbody></table></div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 108 , "</tbody></table></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 74 , "<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 , 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>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 75 , "</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 , 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>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}