mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-08-20 07:02:09 +08:00
link to volume detail page
This commit is contained in:
parent
d8da465cd3
commit
fc55d2d8e0
@ -313,7 +313,11 @@ templ ClusterVolumes(data dash.ClusterVolumesData) {
|
||||
for _, volume := range data.Volumes {
|
||||
<tr>
|
||||
<td>
|
||||
<code>{fmt.Sprintf("%d", volume.Id)}</code>
|
||||
<code class="volume-id-link" style="cursor: pointer; text-decoration: underline; color: #0d6efd;"
|
||||
data-volume-id={fmt.Sprintf("%d", volume.Id)}
|
||||
title="Click to view volume details">
|
||||
{fmt.Sprintf("%d", volume.Id)}
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<a href={templ.SafeURL(fmt.Sprintf("http://%s/ui/index.html", volume.Server))} target="_blank" class="text-decoration-none">
|
||||
@ -533,6 +537,15 @@ templ ClusterVolumes(data dash.ClusterVolumesData) {
|
||||
});
|
||||
});
|
||||
|
||||
// Add click handlers to volume ID links
|
||||
document.querySelectorAll('.volume-id-link').forEach(link => {
|
||||
link.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
const volumeId = this.getAttribute('data-volume-id');
|
||||
viewVolumeDetails(volumeId);
|
||||
});
|
||||
});
|
||||
|
||||
// Add click handlers to vacuum buttons
|
||||
document.querySelectorAll('.vacuum-btn').forEach(button => {
|
||||
button.addEventListener('click', function(e) {
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user