atualiza versão para 0.0.9; corrige exclusão em cascata de locais de armazenamento e adiciona crédito do desenvolvedor na aba Sobre
This commit is contained in:
parent
301951f5a2
commit
44331e8b87
14
README.md
14
README.md
|
|
@ -9,7 +9,7 @@
|
|||
</p>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/VERSION-0.0.8-blue?style=flat-square" />
|
||||
<img src="https://img.shields.io/badge/VERSION-0.0.9-blue?style=flat-square" />
|
||||
<img src="https://img.shields.io/badge/NODE.JS-%3E%3D20-339933?style=flat-square&logo=node.js&logoColor=white" />
|
||||
<img src="https://img.shields.io/badge/DOCKER-ready-2496ED?style=flat-square&logo=docker&logoColor=white" />
|
||||
<img src="https://img.shields.io/badge/READY-yes-brightgreen?style=flat-square" />
|
||||
|
|
@ -18,12 +18,22 @@
|
|||
|
||||
> ⚠️ **AVISO CRÍTICO:** Aplicação em estágio inicial de desenvolvimento. Não use em produção — há risco de perda de dados.
|
||||
|
||||
Versão atual: **0.0.8**
|
||||
Versão atual: **0.0.9**
|
||||
|
||||
---
|
||||
|
||||
## <20> Changelog
|
||||
|
||||
### [0.0.9] — 2026-05-09
|
||||
|
||||
#### Corrigido
|
||||
- **Exclusão em cascata de Storage Location não removia arquivos do disco:** ao excluir um Storage Location (que por consequência exclui os profiles vinculados), os arquivos `.tar.gz` e a pasta de cada profile agora são deletados corretamente do disco, da mesma forma que acontece ao excluir um profile individualmente.
|
||||
|
||||
#### Adicionado
|
||||
- **Crédito do desenvolvedor na aba Sobre:** exibe o texto "Desenvolvido por Alexander Sabino em 2026" ao final da aba Sobre.
|
||||
|
||||
---
|
||||
|
||||
### [0.0.8] — 2026-05-09
|
||||
|
||||
#### Corrigido
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "dockerbackup-app",
|
||||
"version": "0.0.8",
|
||||
"version": "0.0.9",
|
||||
"description": "Aplicacao web para backup e restauracao de volumes Docker",
|
||||
"main": "src/server.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -302,6 +302,7 @@
|
|||
<p class="changelog-loading">Carregando changelog...</p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="about-author">Desenvolvido por Alexander Sabino em 2026</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1203,6 +1203,12 @@ button, input, select {
|
|||
color: var(--text-muted);
|
||||
font-style: italic;
|
||||
}
|
||||
.about-author {
|
||||
margin-top: 1.5rem;
|
||||
font-size: 0.82rem;
|
||||
color: var(--text-muted);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* --- Modal ----------------------------------------------- */
|
||||
.modal {
|
||||
|
|
|
|||
|
|
@ -506,7 +506,36 @@ async function main() {
|
|||
|
||||
app.delete('/api/storage-locations/:id', authMiddleware, async (request, response) => {
|
||||
try {
|
||||
await store.deleteStorageLocation(request.params.id);
|
||||
const locationId = request.params.id;
|
||||
const impact = await store.storageLocationImpact(locationId);
|
||||
|
||||
const slugifyLocal = (value) => value.replace(/[^a-zA-Z0-9_-]+/g, '-').replace(/^-+|-+$/g, '').toLowerCase() || 'item';
|
||||
|
||||
// Deleta arquivos em disco de cada profile afetado antes de remover do store
|
||||
for (const profile of impact.profiles) {
|
||||
const backups = await store.listBackups(profile.id);
|
||||
const deletedDirs = new Set();
|
||||
for (const backup of backups) {
|
||||
const backupRoot = backup.backupDir;
|
||||
if (!backupRoot) continue;
|
||||
for (const container of backup.containers || []) {
|
||||
if (container.archiveRelativePath) {
|
||||
await fs.rm(path.join(backupRoot, container.archiveRelativePath), { force: true });
|
||||
}
|
||||
}
|
||||
if (profile.name) {
|
||||
deletedDirs.add(path.join(backupRoot, slugifyLocal(profile.name)));
|
||||
}
|
||||
}
|
||||
if (profile.backupDir) {
|
||||
deletedDirs.add(path.join(profile.backupDir, slugifyLocal(profile.name)));
|
||||
}
|
||||
for (const dir of deletedDirs) {
|
||||
await fs.rm(dir, { recursive: true, force: true });
|
||||
}
|
||||
}
|
||||
|
||||
await store.deleteStorageLocation(locationId);
|
||||
response.status(204).end();
|
||||
} catch (error) {
|
||||
response.status(500).json({ error: error.message });
|
||||
|
|
|
|||
Loading…
Reference in New Issue