// Volumes — Rustploy só usa bind mounts, então volumes nomeados aqui são
// sempre externos ao Rustploy (criados manualmente ou por VOLUME da imagem).
component {
resources {
component(name = SemVolumes) {
text(class = u-muted, content = "Nenhum volume.")
}
}
column(class = "panel panel--fill") {
row(class = env__head) {
text(class = "u-muted u-fill", content = "@docker_volumes_count volume(s)")
// O filtro mora em format.docker_volumes — ver images.gvb.
checkbox(
:checked = docker_volumes_only_used,
on_toggle = docker_only_used:docker_volumes_only_used,
label = "Somente em uso",
)
checkbox(
:checked = docker_prune_all_volumes,
on_toggle = field:docker_prune_all_volumes,
label = "-a (limpar tudo, não só anônimos)",
)
button(
class = "btn btn--danger",
on_click = docker_prune_volumes,
disabled = @busy_docker_prune_volumes,
text = "Limpar sem uso",
)
}
text(
if = @docker_message,
not_equals = "",
class = u-muted,
content = "@docker_message",
)
tableview(
:items = docker_volumes,
:sort = docker_volumes_sort,
var = v,
header_class = "table__head table__head-cell",
row_class = "table__row table__cell table__row--divided",
class = u-fill-all,
) {
tablecolumn(key = name, label = NOME, class = table__col-svc) {
text(class = "table__cell table__cell--key", content = "@v.name")
}
tablecolumn(key = driver, label = DRIVER, class = table__col-proj)
tablecolumn(
key = size,
sort_key = size_bytes,
label = TAMANHO,
class = table__col-dur,
) {
text(class = u-muted, content = "@v.size")
}
tablecolumn(key = in_use_label, label = USO, class = table__col-state) {
StateCell(kind = @v.in_use_kind, label = @v.in_use_label)
}
tablecolumn(label = "AÇÃO", class = table__col-act) {
button(
if = @v.in_use_label,
equals = "SEM USO",
class = "btn btn--danger btn--xs",
on_click = docker_remove_volume:@v.name_full,
disabled = @busy_docker_remove_volume,
text = Remover,
)
}
if @data_loading == "true" {
LoadingRow
} else {
SemVolumes
}
}
}
}