Add WebDAV support via Apache mod_dav
Backend: - WebDAV config managed at /etc/apache2/conf-available/micronas-webdav.conf with BEGIN/END markers per share; reload apache2 on every write - htpasswd file at /etc/micronas-webdav.passwd synced automatically on create_user, change_password, delete_user - Full CRUD: POST/PATCH/DELETE /api/share/webdav[/<name>] - _validate_webdav_users(): space-separated, no @group (not supported by Apache) - Fix: _validate_users() now allows @groupname for SMB (was incorrectly rejected) - Dashboard: apache2 status + restart button; webdav shares in /api/dashboard Frontend: - WebDAV tab: create form + table with clickable access URLs - Edit modal supports 'webdav' type (name, path, users, permissions section) - badge-webdav CSS class (green tint) in app.css - dashboard.js renders badge-<type> dynamically (smb/nfs/webdav) Docs: README WebDAV mount guide (Linux davfs2, Windows, Mac), PLANNING phase 4 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
1be6a05cef
commit
7c9fe07a17
7 files changed
+338
-19
No files matched your search
@@ -13,8 +13,9 @@ async function loadDashboard() {
|
||||
document.getElementById(id).style.display = 'flex';
|
||||
document.getElementById(id).style.alignItems = 'center';
|
||||
}
|
||||
setDaemon('statusSmbd', 'smbd', d.status.smbd);
|
||||
setDaemon('statusNfsd', 'nfsd', d.status.nfsd);
|
||||
setDaemon('statusSmbd', 'smbd', d.status.smbd);
|
||||
setDaemon('statusNfsd', 'nfsd', d.status.nfsd);
|
||||
setDaemon('statusApache2', 'apache2', d.status.apache2);
|
||||
|
||||
// Disk bar
|
||||
if (d.disk && !d.disk.error) {
|
||||
@@ -43,7 +44,7 @@ async function loadDashboard() {
|
||||
} else {
|
||||
sb.innerHTML = d.shares.map(s => `
|
||||
<tr>
|
||||
<td><span class="badge rounded-pill ${s.type === 'smb' ? 'badge-smb' : 'badge-nfs'}">${s.type.toUpperCase()}</span></td>
|
||||
<td><span class="badge rounded-pill badge-${s.type}">${s.type.toUpperCase()}</span></td>
|
||||
<td>${esc(s.name ?? '—')}</td>
|
||||
<td><code>${esc(s.path)}</code></td>
|
||||
<td style="color:var(--muted); font-size:.87em">${esc(s.access || '—')}</td>
|
||||
|
||||
Reference in new issue
Block a user