Docker > Volumes: sorting by Size does nothing, and text columns sort inconsistently
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 79/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- docker, typescript
- Ambito
- devops
Direzione di ricerca
Leggi apps/dokploy/components/dashboard/docker/volumes/show-volumes.tsx e confronta la sua colonna Size con la colonna Size della tabella Images. Imposta un accessor numerico per la dimensione del volume analizzata e usa una funzione di ordinamento alfanumerico coerente per le colonne di testo. Il lavoro è completato quando Size viene ordinata correttamente in entrambe le direzioni e l’ordine delle colonne di testo rimane coerente con 7 o 16 righe e durante la ricerca; l’issue segnala queste verifiche in un’istanza di sviluppo locale.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
To Reproduce
- Open Docker → Volumes on a server with a few volumes of different sizes. Names like
app2_data,app9_data,app10_dataand one starting with an uppercase letter (Zeta_cache) make the problem easy to see. - Wait for the Size column to finish loading.
- Click the Size header, then click it again.
- Look at the Name order. With 10 or fewer volumes, look at the default order. With more than 10, type into the search box until 10 or fewer are left (for example
app) and compare.
Current vs. Expected behavior
Current (reproduced on a local dev instance of canary @ dbf8034, with 7 and with 16 volumes)
- Clicking Size doesn't sort by size in either direction. The rows stay in the order
docker volume lsprints them (by name), and the second click shows the same order as the first. - Name, Driver, Scope and Mountpoint compare values differently depending on how many rows the table holds:
- 10 rows or fewer: plain string comparison.
Zeta_cachecomes beforealpha_logs, and the order isapp10_data,app2_data,app9_data. - More than 10 rows: case-insensitive and number-aware, so
alpha_logs,app2_data,app9_data,app10_data, …,Zeta_cache. - So the order changes while you type: with 16 volumes, Name shows
app2_data,app9_data,app10_data, and searching forappturns that intoapp10_data,app2_data,app9_data.
- 10 rows or fewer: plain string comparison.
Expected
Size sorts by the actual size, and text columns always sort the same way, however many rows there are.
Cause (apps/dokploy/components/dashboard/docker/volumes/show-volumes.tsx, TanStack Table 8.21.3)
- The Size column has an
idand asortingFnbut noaccessorFn. TanStack'scolumn.getCanSort()requires anaccessorFn, andgetSortedRowModeldrops sort entries whose column can't sort, so the Size sort is silently ignored. - The text columns use the default
"auto"sorting function. TanStack picks it by samplinggetFilteredRowModel().flatRows.slice(10), which is rows 11 onwards. With 10 or fewer rows nothing is sampled and it falls back tobasic; otherwise it picksalphanumeric(ortextif the sampled values contain no digits). The search box filters the data before it reaches the table, so the row count, and with it the sorting function, changes as you type.
Proposed fix
- Size: do what the Images table already does (show-images.tsx#L262-L263):
accessorFn: (row) => parseSize(sizeByName.get(row.Name) ?? undefined). Keep the cell showing the human-readable size and drop the customsortingFn. - Name, Driver, Scope, Mountpoint: set
sortingFn: "alphanumeric". That's the order users already get with more than 10 volumes, and it keepsapp2_databeforeapp10_data."text"would also be consistent, but it compares character by character, soapp10_datawould stay beforeapp2_data.
I've tested this change (5 lines added, 3 removed) in a local dev instance. Size now sorts correctly in both directions, and Name gives the same order with 7 rows, 16 rows and while searching.
Screenshots (current behaviour, local dev instance: 7 volumes in the default Name order, the same 7 after clicking Size, and 16 volumes while searching for app):
Provide environment information
Operating System:
OS: Ubuntu 26.04 (WSL2)
Arch: x86_64
Dokploy version: v0.31.8 (canary @ dbf8034, local dev instance)
VPS Provider: none, local machine
What applications/services are you tying to deploy?
Not service-specific: this is the Docker > Volumes page.
Which area(s) are affected? (Select all that apply)
Docker
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
- The Images and Disk Usage tables already give their Size column an
accessorFn, so only the Volumes table has the first problem. - The
"auto"sampling quirk also affects text columns in other tables (for example Images → Repository/Tag). I'd keep this fix to the Volumes table unless you want the others changed in the same PR. - The sort headers always show the same ↕ icon, so you can't tell which column is sorted or in which direction. I've left that out of the fix.
- Related: #6192 (a volumes view on the compose page, which would reuse this table's sorting).
Will you send a PR to fix it?
Yes
- Lingua principale
- TypeScript
- Stelle
- 38.8k
- Fork
- 3.2k
- Merge medio
- 1g 8h
- PR unite (30g)
- 117
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Dokploy/dokploy
-
needs-triage🔍
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Dokploy/dokploy#6197 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Healthy Swarm task shows an empty `(Error:)` suffix on the last row of the Containers tabForse già presa @AyhamJo7 l’ha presa 7 giorni fa. Apertaneeds-triage🔍
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Dokploy/dokploy#6115 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
MongoDB with Replica Sets enabled: container exits with code 0 and restarts in a loop (generated startup script never waits on mongod)Forse già presa @ghazy2001 l’ha presa 13 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Dokploy/dokploy#6051 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Dokploy monitoring API returns partial container metrics with HTTP 200 when a row read failsForse già presa @PAtreju l’ha presa 15 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Dokploy/dokploy#6029 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Volume backup silently uploads an empty tar when the volume does not exist on the host (stack prefix missing / service on swarm worker)Forse già presa @PAtreju l’ha presa 15 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Dokploy/dokploy#6022 · 1 commento · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Dokploy/dokploy
Issue simili
-
🔨 tool 🧰 library
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Orange-OpenSource/Orange-Boosted-Bootstrap#4035 ·
I maintainer di solito rispondono entro 1 giorno
-
Ajouter la page Plan du siteAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
DISIC/teleservice-conformite#230 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
rothgar/rabble.radio#410 ·
I maintainer di solito rispondono entro 1 giorno
-
area/webapp comp/desktop P2 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NousResearch/hermes-agent#163341 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
smart-village-solutions/smart-speech-flow#765 ·
I maintainer di solito rispondono entro 1 giorno