storage IA: split /storage into Meghajtók + /storage/network (NAS)
User feedback on D1: the NAS-add button and the local-drive enrollment buttons sat side by side with no separation — two different storage classes interleaved on one page. Now two subpages under Tárhely: - /storage — Tárhely — Meghajtók: physical drive registry, migrate, wizard entry points (Új meghajtó inicializálása / Meglévő meghajtó csatolása), unified agent view, manual add. The enrollment buttons now live unambiguously in the local-drive context. - /storage/network — Tárhely — Hálózati tárhely (NAS): the NAS share list (NAS-megosztások) + add form + its JS (moved verbatim, incl. its own openDialog copy for the remove overlay). - layout.html: Tárhely main-nav item gains two always-visible nested sub-links (Meghajtók / Hálózati tárhely, .nav-links-nested CSS); parent stays highlighted on both. - handlers.go: NetworkStoragePaths moves out of storagePageData into the new networkStoragePageData (page key storage-network) + storageNetworkPageHandler; GET /storage/network route. - Tests: /storage must NOT render the NAS section, /storage/network renders it and nothing drive-related; inventory + no-native-confirm scans cover the new template. Both template gates green.
This commit is contained in:
@@ -70,8 +70,11 @@ func TestSettingsSplitPagesRender(t *testing.T) {
|
||||
[]string{"Jelszó módosítás", "Földrajzi korlátozás"},
|
||||
[]string{"Rendszer konfiguráció", "Adattárolók", "Értesítési szünet"}},
|
||||
{"/storage",
|
||||
[]string{"Adattárolók", "Hálózati tárhely (NAS)"},
|
||||
[]string{"Rendszer konfiguráció", "Jelszó módosítás", "Értesítési szünet"}},
|
||||
[]string{"Adattárolók", "Tárhely — Meghajtók"},
|
||||
[]string{"Rendszer konfiguráció", "Jelszó módosítás", "Értesítési szünet", "NAS-megosztások"}},
|
||||
{"/storage/network",
|
||||
[]string{"Tárhely — Hálózati tárhely (NAS)", "NAS-megosztások"},
|
||||
[]string{"Adattárolók", "Rendszer konfiguráció", "Jelszó módosítás"}},
|
||||
}
|
||||
for _, c := range cases {
|
||||
rec := getPage(t, s, c.path)
|
||||
@@ -110,7 +113,7 @@ func TestSettingsSectionInventory(t *testing.T) {
|
||||
"Kiszolgáló újraindítása",
|
||||
}
|
||||
var union strings.Builder
|
||||
for _, f := range []string{"settings_system.html", "settings_notifications.html", "settings_security.html", "storage.html"} {
|
||||
for _, f := range []string{"settings_system.html", "settings_notifications.html", "settings_security.html", "storage.html", "storage_network.html"} {
|
||||
b, err := templateFS.ReadFile("templates/" + f)
|
||||
if err != nil {
|
||||
t.Fatalf("read %s: %v", f, err)
|
||||
@@ -220,7 +223,7 @@ func TestStorageNoNativeConfirm(t *testing.T) {
|
||||
nativeRe := regexp.MustCompile(`(^|[^A-Za-z_.])(confirm|prompt)\(`)
|
||||
// allow the pre-existing type-to-confirm overlay helper names
|
||||
allow := regexp.MustCompile(`openConfirm|__closeConfirm|confirmEject|confirmWipe|typeToConfirm|confirm-`)
|
||||
for _, f := range []string{"storage.html", "settings_system.html", "settings_notifications.html", "settings_security.html"} {
|
||||
for _, f := range []string{"storage.html", "storage_network.html", "settings_system.html", "settings_notifications.html", "settings_security.html"} {
|
||||
b, err := templateFS.ReadFile("templates/" + f)
|
||||
if err != nil {
|
||||
t.Fatalf("read %s: %v", f, err)
|
||||
|
||||
Reference in New Issue
Block a user