SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
admin: bump a-h/templ to v0.3.1100 to match @latest codegen (#12100)
Chris Lu68565fa88334
diff --git a/go.mod b/go.modindex bb4f05e9aa..1e5960a90e 100644--- a/go.mod+++ b/go.mod@@ -116,7 +116,7 @@ require (github.com/DATA-DOG/go-sqlmock v1.5.2github.com/Jille/raft-grpc-transport v1.6.1github.com/ThreeDotsLabs/watermill v1.5.3- github.com/a-h/templ v0.3.1070+ github.com/a-h/templ v0.3.1100github.com/apache/cassandra-gocql-driver/v2 v2.1.2github.com/apache/iceberg-go v0.7.0github.com/apple/foundationdb/bindings/go v0.0.0-20250911184653-27f7192f47c3@@ -314,7 +314,7 @@ require (github.com/ProtonMail/go-srp v0.0.7 // indirectgithub.com/PuerkitoBio/goquery v1.12.0 // indirectgithub.com/abbot/go-http-auth v0.4.0 // indirect- github.com/andybalholm/brotli v1.2.6 // indirect+ github.com/andybalholm/brotli v1.2.7 // indirectgithub.com/andybalholm/cascadia v1.3.4 // indirectgithub.com/appscode/go-querystring v0.0.0-20170504095604-0126cfb3f1dc // indirectgithub.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirectdiff --git a/go.sum b/go.sumindex c920d80503..3c93d20dab 100644--- a/go.sum+++ b/go.sum@@ -120,8 +120,8 @@ github.com/ThreeDotsLabs/watermill v1.5.3 h1:GoTR7fW1ZT+itzUv/w3VB6Um1B7oTBrOWjJgithub.com/ThreeDotsLabs/watermill v1.5.3/go.mod h1:i9/968UriGphWfEbfMuYSD1qFbYRjb0mE0r+rV0FPp4=github.com/TomiHiltunen/geohash-golang v0.0.0-20150112065804-b3e4e625abfb h1:wumPkzt4zaxO4rHPBrjDK8iZMR41C1qs7njNqlacwQg=github.com/TomiHiltunen/geohash-golang v0.0.0-20150112065804-b3e4e625abfb/go.mod h1:QiYsIBRQEO+Z4Rz7GoI+dsHVneZNONvhczuA+llOZNM=-github.com/a-h/templ v0.3.1070 h1:3iCOXHXqFXa99OQzgkUOLJbNzv/QjFGLwKZkBAg+ADA=-github.com/a-h/templ v0.3.1070/go.mod h1:iIqB3g2RHBe/WlnPwa+Bvhh1TKXHWLRnBD9NWHOLm78=+github.com/a-h/templ v0.3.1100 h1:lQhjVs1IL+M6QWUvojaFBd21+kzwATppSyWkWB9oHoM=+github.com/a-h/templ v0.3.1100/go.mod h1:j1WAOR7749mlo1AxFLQ7qbDFW5VwyoqszRTlKqEHN9M=github.com/a1ex3/zstd-seekable-format-go/pkg v0.10.0 h1:iLDOF0rdGTrol/q8OfPIIs5kLD8XvA2q75o6Uq/tgak=github.com/a1ex3/zstd-seekable-format-go/pkg v0.10.0/go.mod h1:DrEWcQJjz7t5iF2duaiyhg4jyoF0kxOD6LtECNGkZ/Q=github.com/aalpar/deheap v1.1.2 h1:MABHLcnjqsffb8GLkUFDigqpBBxOMz0DoKM9QfELeTw=@@ -144,8 +144,8 @@ github.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e h1:4dAU9FXIyQktpgithub.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4=github.com/anchore/go-lzo v0.1.1 h1:IwL/fvkdtlIrYIXck6WxZ3nb8WjjHziYYmGxlooyOnM=github.com/anchore/go-lzo v0.1.1/go.mod h1:3kLx0bve2oN1iDwgM1U5zGku1Tfbdb0No5qp1eL1fIk=-github.com/andybalholm/brotli v1.2.6 h1:ftYnfj6usCp+UGV5kSJ3+chpMQgU+gJf/AxsUQ52REI=-github.com/andybalholm/brotli v1.2.6/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=+github.com/andybalholm/brotli v1.2.7 h1:UgafRPGMam5ySHfRkhthMqOFA6IFoeF3D7mWIDLjG5A=+github.com/andybalholm/brotli v1.2.7/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=github.com/andybalholm/cascadia v1.3.4 h1:vM2lgh0Vru9Vwyfm4cQqWP2HHMW0u0+2PAW7Q38Qufg=github.com/andybalholm/cascadia v1.3.4/go.mod h1:BLRmbRjpEtNKieZOCCvYj4RqN+KRA41GBe/5O+G93kM=github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=diff --git a/weed/admin/view/app/admin_templ.go b/weed/admin/view/app/admin_templ.goindex 42c49e5162..8a34018b92 100644--- a/weed/admin/view/app/admin_templ.go+++ b/weed/admin/view/app/admin_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,21 +30,17 @@ func Admin(data dash.AdminData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-speedometer2 me-2\"></i>Dashboard</h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var2 templ.SafeURL- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/object-store/buckets"))+ var templ_7745c5c3_Var2 string+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/object-store/buckets")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/admin.templ`, Line: 15, Col: 70}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -387,12 +384,12 @@ func Admin(data dash.AdminData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var20 templ.SafeURL- templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/cluster/mount-clients"))+ var templ_7745c5c3_Var20 string+ templ_7745c5c3_Var20, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/cluster/mount-clients")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/admin.templ`, Line: 288, Col: 74}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var20)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -418,12 +415,12 @@ func Admin(data dash.AdminData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var22 templ.SafeURL- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", master.Address)))+ var templ_7745c5c3_Var22 string+ templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", master.Address))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/admin.templ`, Line: 327, Col: 121}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -529,12 +526,12 @@ func Admin(data dash.AdminData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var29 templ.SafeURL- templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/volumes"))+ var templ_7745c5c3_Var29 string+ templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/volumes")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/admin.templ`, Line: 418, Col: 90}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var29)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -542,12 +539,12 @@ func Admin(data dash.AdminData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var30 templ.SafeURL- templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/cluster"))+ var templ_7745c5c3_Var30 string+ templ_7745c5c3_Var30, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/cluster")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/admin.templ`, Line: 419, Col: 90}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var30)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -573,12 +570,12 @@ func Admin(data dash.AdminData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var32 templ.SafeURL- templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", vs.GetDisplayAddress())))+ var templ_7745c5c3_Var32 string+ templ_7745c5c3_Var32, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", vs.GetDisplayAddress()))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/admin.templ`, Line: 442, Col: 129}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var32)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -758,12 +755,12 @@ func Admin(data dash.AdminData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var43 templ.SafeURL- templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/filer"))+ var templ_7745c5c3_Var43 string+ templ_7745c5c3_Var43, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/filer")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/admin.templ`, Line: 508, Col: 88}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var43)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -771,12 +768,12 @@ func Admin(data dash.AdminData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var44 templ.SafeURL- templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/cluster"))+ var templ_7745c5c3_Var44 string+ templ_7745c5c3_Var44, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/cluster")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/admin.templ`, Line: 509, Col: 90}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var44)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -789,12 +786,12 @@ func Admin(data dash.AdminData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var45 templ.SafeURL- templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//%s", filer.Address)))+ var templ_7745c5c3_Var45 string+ templ_7745c5c3_Var45, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//%s", filer.Address))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/admin.templ`, Line: 528, Col: 106}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var45)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -865,12 +862,12 @@ func Admin(data dash.AdminData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var50 templ.SafeURL- templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/cluster/s3"))+ var templ_7745c5c3_Var50 string+ templ_7745c5c3_Var50, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/cluster/s3")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/admin.templ`, Line: 568, Col: 93}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var50)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}diff --git a/weed/admin/view/app/cluster_brokers_templ.go b/weed/admin/view/app/cluster_brokers_templ.goindex f87e5c93c4..4e22b2d5f2 100644--- a/weed/admin/view/app/cluster_brokers_templ.go+++ b/weed/admin/view/app/cluster_brokers_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,10 +30,6 @@ func ClusterBrokers(data dash.ClusterBrokersData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-chat-dots me-2\"></i>Message Brokers</h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-outline-primary\" onclick=\"exportBrokers()\"><i class=\"bi bi-download me-1\"></i>Export</button></div></div></div><div id=\"brokers-content\"><!-- Summary Cards --><div class=\"row mb-4\"><div class=\"col-xl-12 col-md-12 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total Message Brokers</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {diff --git a/weed/admin/view/app/cluster_collections_templ.go b/weed/admin/view/app/cluster_collections_templ.goindex 4dd1da1fc2..2ef6dcc298 100644--- a/weed/admin/view/app/cluster_collections_templ.go+++ b/weed/admin/view/app/cluster_collections_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,10 +30,6 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-layers me-2\"></i>Cluster Collections</h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-outline-primary\" onclick=\"exportCollections()\"><i class=\"bi bi-download me-1\"></i>Export</button></div></div></div><div id=\"collections-content\"><!-- Summary Cards --><div class=\"row mb-4\"><div class=\"col-xl-2 col-lg-3 col-md-4 col-sm-6 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total Collections</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {@@ -113,12 +110,12 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var7 templ.SafeURL- templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/storage/collections/%s", collection.Name)))+ var templ_7745c5c3_Var7 string+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/storage/collections/%s", collection.Name))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_collections.templ`, Line: 152, Col: 125}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var7)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -139,12 +136,12 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var9 templ.SafeURL- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/storage/volumes?collection=%s", collection.Name)))+ var templ_7745c5c3_Var9 string+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/storage/volumes?collection=%s", collection.Name))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_collections.templ`, Line: 157, Col: 132}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -172,12 +169,12 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var11 templ.SafeURL- templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/storage/ec-shards?collection=%s", collection.Name)))+ var templ_7745c5c3_Var11 string+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/storage/ec-shards?collection=%s", collection.Name))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_collections.templ`, Line: 169, Col: 134}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -242,25 +239,43 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var15 = []any{fmt.Sprintf("badge bg-%s me-1", getDiskTypeColor(diskType))}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var15...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<span class=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var16 string- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var15).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_collections.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<span class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var15 = []any{fmt.Sprintf("badge bg-%s me-1", getDiskTypeColor(diskType))}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var15...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var16 string+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var15).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_collections.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, ">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -273,23 +288,23 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "</span> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</span> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if len(collection.DiskTypes) == 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "<span class=\"text-muted\">Unknown</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<span class=\"text-muted\">Unknown</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "</td><td><button type=\"button\" class=\"btn btn-outline-primary btn-sm\" title=\"View Details\" data-action=\"view-details\" data-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</td><td><button type=\"button\" class=\"btn btn-outline-primary btn-sm\" title=\"View Details\" data-action=\"view-details\" data-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var18 string- templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.ResolveAttributeValue(collection.Name)+ templ_7745c5c3_Var18, templ_7745c5c3_Err = templruntime.NewAttributeExpression(collection.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_collections.templ`, Line: 208, Col: 78}}@@ -297,12 +312,12 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\" data-datacenter=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\" data-datacenter=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var19 string- templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.ResolveAttributeValue(collection.DataCenter)+ templ_7745c5c3_Var19, templ_7745c5c3_Err = templruntime.NewAttributeExpression(collection.DataCenter).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_collections.templ`, Line: 209, Col: 90}}@@ -310,12 +325,12 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\" data-volume-count=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "\" data-volume-count=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var20 string- templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", collection.VolumeCount))+ templ_7745c5c3_Var20, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", collection.VolumeCount)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_collections.templ`, Line: 210, Col: 112}}@@ -323,12 +338,12 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "\" data-ec-volume-count=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\" data-ec-volume-count=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var21 string- templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", collection.EcVolumeCount))+ templ_7745c5c3_Var21, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", collection.EcVolumeCount)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_collections.templ`, Line: 211, Col: 117}}@@ -336,12 +351,12 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\" data-chunk-count=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\" data-chunk-count=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var22 string- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", collection.ChunkCount))+ templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", collection.ChunkCount)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_collections.templ`, Line: 212, Col: 110}}@@ -349,12 +364,12 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\" data-total-size=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "\" data-total-size=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var23 string- templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", collection.TotalSize))+ templ_7745c5c3_Var23, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", collection.TotalSize)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_collections.templ`, Line: 213, Col: 108}}@@ -362,12 +377,12 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "\" data-disk-types=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "\" data-disk-types=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var24 string- templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatDiskTypes(collection.DiskTypes))+ templ_7745c5c3_Var24, templ_7745c5c3_Err = templruntime.NewAttributeExpression(formatDiskTypes(collection.DiskTypes)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_collections.templ`, Line: 214, Col: 106}}@@ -375,22 +390,22 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "\"><i class=\"bi bi-eye\"></i></button></td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "\"><i class=\"bi bi-eye\"></i></button></td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</tbody></table></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "</tbody></table></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<div class=\"text-center py-5\"><i class=\"bi bi-layers icon-3x text-muted mb-3\"></i><h5 class=\"text-muted\">No Collections Found</h5><p class=\"text-muted\">No collections are currently configured in the cluster.</p></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "<div class=\"text-center py-5\"><i class=\"bi bi-layers icon-3x text-muted mb-3\"></i><h5 class=\"text-muted\">No Collections Found</h5><p class=\"text-muted\">No collections are currently configured in the cluster.</p></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "</div></div><!-- Last Updated --><div class=\"row\"><div class=\"col-12\"><small class=\"text-muted\"><i class=\"bi bi-clock me-1\"></i> Last updated: ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</div></div><!-- Last Updated --><div class=\"row\"><div class=\"col-12\"><small class=\"text-muted\"><i class=\"bi bi-clock me-1\"></i> Last updated: ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -403,7 +418,7 @@ func ClusterCollections(data dash.ClusterCollectionsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</small></div></div></div><!-- JavaScript for cluster collections functionality --><script>\n document.addEventListener('DOMContentLoaded', function() {\n // Handle collection action buttons\n document.addEventListener('click', function(e) {\n const button = e.target.closest('[data-action]');\n if (!button) return;\n \n const action = button.getAttribute('data-action');\n \n switch(action) {\n case 'view-details':\n const collectionData = {\n name: button.getAttribute('data-name'),\n datacenter: button.getAttribute('data-datacenter'),\n volumeCount: parseInt(button.getAttribute('data-volume-count')),\n ecVolumeCount: parseInt(button.getAttribute('data-ec-volume-count')),\n chunkCount: parseInt(button.getAttribute('data-chunk-count')),\n totalSize: parseInt(button.getAttribute('data-total-size')),\n diskTypes: button.getAttribute('data-disk-types')\n };\n showCollectionDetails(collectionData);\n break;\n }\n });\n });\n \n function showCollectionDetails(collection) {\n const modalHtml = '<div class=\"modal fade\" id=\"collectionDetailsModal\" tabindex=\"-1\">' +\n '<div class=\"modal-dialog modal-lg\">' +\n '<div class=\"modal-content\">' +\n '<div class=\"modal-header\">' +\n '<h5 class=\"modal-title\"><i class=\"bi bi-layers me-2\"></i>Collection Details: ' + collection.name + '</h5>' +\n '<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\"></button>' +\n '</div>' +\n '<div class=\"modal-body\">' +\n '<div class=\"row\">' +\n '<div class=\"col-md-6\">' +\n '<h6 class=\"text-primary\"><i class=\"bi bi-info-circle me-1\"></i>Basic Information</h6>' +\n '<table class=\"table table-sm\">' +\n '<tr><td><strong>Collection Name:</strong></td><td><code>' + collection.name + '</code></td></tr>' +\n '<tr><td><strong>Data Center:</strong></td><td>' +\n (collection.datacenter ? '<span class=\"badge bg-light text-dark\">' + collection.datacenter + '</span>' : '<span class=\"text-muted\">N/A</span>') +\n '</td></tr>' +\n '<tr><td><strong>Disk Types:</strong></td><td>' +\n (collection.diskTypes ? collection.diskTypes.split(', ').map(type => \n '<span class=\"badge bg-' + getDiskTypeBadgeColor(type) + ' me-1\">' + type + '</span>'\n ).join('') : '<span class=\"text-muted\">Unknown</span>') +\n '</td></tr>' +\n '</table>' +\n '</div>' +\n '<div class=\"col-md-6\">' +\n '<h6 class=\"text-primary\"><i class=\"bi bi-bar-chart me-1\"></i>Storage Statistics</h6>' +\n '<table class=\"table table-sm\">' +\n '<tr><td><strong>Regular Volumes:</strong></td><td>' +\n '<div class=\"d-flex align-items-center\">' +\n '<i class=\"bi bi-database me-2 text-muted\"></i>' +\n '<span>' + collection.volumeCount.toLocaleString() + '</span>' +\n '</div>' +\n '</td></tr>' +\n '<tr><td><strong>EC Volumes:</strong></td><td>' +\n '<div class=\"d-flex align-items-center\">' +\n '<i class=\"bi bi-grid me-2 text-muted\"></i>' +\n '<span>' + collection.ecVolumeCount.toLocaleString() + '</span>' +\n '</div>' +\n '</td></tr>' +\n '<tr><td><strong>Total Chunks:</strong></td><td>' +\n '<div class=\"d-flex align-items-center\">' +\n '<i class=\"bi bi-boxes me-2 text-muted\"></i>' +\n '<span>' + collection.chunkCount.toLocaleString() + '</span>' +\n '</div>' +\n '</td></tr>' +\n '<tr><td><strong>Total Size (Logical):</strong></td><td>' +\n '<div class=\"d-flex align-items-center\">' +\n '<i class=\"bi bi-device-hdd me-2 text-muted\"></i>' +\n '<span>' + formatBytes(collection.totalSize) + '</span>' +\n '</div>' +\n '</td></tr>' +\n '</table>' +\n '</div>' +\n '</div>' +\n '<div class=\"row mt-3\">' +\n '<div class=\"col-12\">' +\n '<h6 class=\"text-primary\"><i class=\"bi bi-link me-1\"></i>Quick Actions</h6>' +\n '<div class=\"d-grid gap-2 d-md-flex\">' +\n '<a href=\"' + (window.__BASE_PATH__ || '') + '/storage/volumes?collection=' + encodeURIComponent(collection.name) + '\" class=\"btn btn-outline-primary\">' +\n '<i class=\"bi bi-database me-1\"></i>View Volumes' +\n '</a>' +\n '<a href=\"' + (window.__BASE_PATH__ || '') + '/storage/ec-shards?collection=' + encodeURIComponent(collection.name) + '\" class=\"btn btn-outline-secondary\">' +\n '<i class=\"bi bi-grid me-1\"></i>View EC Volumes' +\n '</a>' +\n '<a href=\"' + (window.__BASE_PATH__ || '') + '/files?collection=' + encodeURIComponent(collection.name) + '\" class=\"btn btn-outline-info\">' +\n '<i class=\"bi bi-folder me-1\"></i>Browse Files' +\n '</a>' +\n '</div>' +\n '</div>' +\n '</div>' +\n '</div>' +\n '</div>' +\n '<div class=\"modal-footer\">' +\n '<button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button>' +\n '</div>' +\n '</div>' +\n '</div>' +\n '</div>';\n \n // Remove existing modal if present\n const existingModal = document.getElementById('collectionDetailsModal');\n if (existingModal) {\n existingModal.remove();\n }\n \n // Add modal to body and show\n document.body.insertAdjacentHTML('beforeend', modalHtml);\n const modal = new bootstrap.Modal(document.getElementById('collectionDetailsModal'));\n modal.show();\n \n // Remove modal when hidden\n document.getElementById('collectionDetailsModal').addEventListener('hidden.bs.modal', function() {\n this.remove();\n });\n }\n \n function getDiskTypeBadgeColor(diskType) {\n switch(diskType.toLowerCase()) {\n case 'ssd':\n return 'primary';\n case 'hdd':\n case '':\n return 'secondary';\n default:\n return 'info';\n }\n }\n \n function formatBytes(bytes) {\n if (bytes === 0) return '0 Bytes';\n const k = 1024;\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n }\n \n function exportCollections() {\n // Simple CSV export of collections list\n const rows = Array.from(document.querySelectorAll('#collectionsTable tbody tr')).map(row => {\n const cells = row.querySelectorAll('td');\n if (cells.length > 1) {\n return {\n name: cells[0].textContent.trim(),\n volumes: cells[1].textContent.trim(),\n ecVolumes: cells[2].textContent.trim(),\n chunks: cells[3].textContent.trim(),\n size: cells[4].textContent.trim(),\n diskTypes: cells[5].textContent.trim()\n };\n }\n return null;\n }).filter(row => row !== null);\n\n const csvContent = \"data:text/csv;charset=utf-8,\" +\n \"Collection Name,Volumes,EC Volumes,Chunks,Size,Disk Types\\n\" +\n rows.map(r => '\"' + r.name + '\",\"' + r.volumes + '\",\"' + r.ecVolumes + '\",\"' + r.chunks + '\",\"' + r.size + '\",\"' + r.diskTypes + '\"').join(\"\\n\");\n \n const encodedUri = encodeURI(csvContent);\n const link = document.createElement(\"a\");\n link.setAttribute(\"href\", encodedUri);\n link.setAttribute(\"download\", \"collections.csv\");\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }\n </script>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</small></div></div></div><!-- JavaScript for cluster collections functionality --><script>\n document.addEventListener('DOMContentLoaded', function() {\n // Handle collection action buttons\n document.addEventListener('click', function(e) {\n const button = e.target.closest('[data-action]');\n if (!button) return;\n \n const action = button.getAttribute('data-action');\n \n switch(action) {\n case 'view-details':\n const collectionData = {\n name: button.getAttribute('data-name'),\n datacenter: button.getAttribute('data-datacenter'),\n volumeCount: parseInt(button.getAttribute('data-volume-count')),\n ecVolumeCount: parseInt(button.getAttribute('data-ec-volume-count')),\n chunkCount: parseInt(button.getAttribute('data-chunk-count')),\n totalSize: parseInt(button.getAttribute('data-total-size')),\n diskTypes: button.getAttribute('data-disk-types')\n };\n showCollectionDetails(collectionData);\n break;\n }\n });\n });\n \n function showCollectionDetails(collection) {\n const modalHtml = '<div class=\"modal fade\" id=\"collectionDetailsModal\" tabindex=\"-1\">' +\n '<div class=\"modal-dialog modal-lg\">' +\n '<div class=\"modal-content\">' +\n '<div class=\"modal-header\">' +\n '<h5 class=\"modal-title\"><i class=\"bi bi-layers me-2\"></i>Collection Details: ' + collection.name + '</h5>' +\n '<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\"></button>' +\n '</div>' +\n '<div class=\"modal-body\">' +\n '<div class=\"row\">' +\n '<div class=\"col-md-6\">' +\n '<h6 class=\"text-primary\"><i class=\"bi bi-info-circle me-1\"></i>Basic Information</h6>' +\n '<table class=\"table table-sm\">' +\n '<tr><td><strong>Collection Name:</strong></td><td><code>' + collection.name + '</code></td></tr>' +\n '<tr><td><strong>Data Center:</strong></td><td>' +\n (collection.datacenter ? '<span class=\"badge bg-light text-dark\">' + collection.datacenter + '</span>' : '<span class=\"text-muted\">N/A</span>') +\n '</td></tr>' +\n '<tr><td><strong>Disk Types:</strong></td><td>' +\n (collection.diskTypes ? collection.diskTypes.split(', ').map(type => \n '<span class=\"badge bg-' + getDiskTypeBadgeColor(type) + ' me-1\">' + type + '</span>'\n ).join('') : '<span class=\"text-muted\">Unknown</span>') +\n '</td></tr>' +\n '</table>' +\n '</div>' +\n '<div class=\"col-md-6\">' +\n '<h6 class=\"text-primary\"><i class=\"bi bi-bar-chart me-1\"></i>Storage Statistics</h6>' +\n '<table class=\"table table-sm\">' +\n '<tr><td><strong>Regular Volumes:</strong></td><td>' +\n '<div class=\"d-flex align-items-center\">' +\n '<i class=\"bi bi-database me-2 text-muted\"></i>' +\n '<span>' + collection.volumeCount.toLocaleString() + '</span>' +\n '</div>' +\n '</td></tr>' +\n '<tr><td><strong>EC Volumes:</strong></td><td>' +\n '<div class=\"d-flex align-items-center\">' +\n '<i class=\"bi bi-grid me-2 text-muted\"></i>' +\n '<span>' + collection.ecVolumeCount.toLocaleString() + '</span>' +\n '</div>' +\n '</td></tr>' +\n '<tr><td><strong>Total Chunks:</strong></td><td>' +\n '<div class=\"d-flex align-items-center\">' +\n '<i class=\"bi bi-boxes me-2 text-muted\"></i>' +\n '<span>' + collection.chunkCount.toLocaleString() + '</span>' +\n '</div>' +\n '</td></tr>' +\n '<tr><td><strong>Total Size (Logical):</strong></td><td>' +\n '<div class=\"d-flex align-items-center\">' +\n '<i class=\"bi bi-device-hdd me-2 text-muted\"></i>' +\n '<span>' + formatBytes(collection.totalSize) + '</span>' +\n '</div>' +\n '</td></tr>' +\n '</table>' +\n '</div>' +\n '</div>' +\n '<div class=\"row mt-3\">' +\n '<div class=\"col-12\">' +\n '<h6 class=\"text-primary\"><i class=\"bi bi-link me-1\"></i>Quick Actions</h6>' +\n '<div class=\"d-grid gap-2 d-md-flex\">' +\n '<a href=\"' + (window.__BASE_PATH__ || '') + '/storage/volumes?collection=' + encodeURIComponent(collection.name) + '\" class=\"btn btn-outline-primary\">' +\n '<i class=\"bi bi-database me-1\"></i>View Volumes' +\n '</a>' +\n '<a href=\"' + (window.__BASE_PATH__ || '') + '/storage/ec-shards?collection=' + encodeURIComponent(collection.name) + '\" class=\"btn btn-outline-secondary\">' +\n '<i class=\"bi bi-grid me-1\"></i>View EC Volumes' +\n '</a>' +\n '<a href=\"' + (window.__BASE_PATH__ || '') + '/files?collection=' + encodeURIComponent(collection.name) + '\" class=\"btn btn-outline-info\">' +\n '<i class=\"bi bi-folder me-1\"></i>Browse Files' +\n '</a>' +\n '</div>' +\n '</div>' +\n '</div>' +\n '</div>' +\n '</div>' +\n '<div class=\"modal-footer\">' +\n '<button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button>' +\n '</div>' +\n '</div>' +\n '</div>' +\n '</div>';\n \n // Remove existing modal if present\n const existingModal = document.getElementById('collectionDetailsModal');\n if (existingModal) {\n existingModal.remove();\n }\n \n // Add modal to body and show\n document.body.insertAdjacentHTML('beforeend', modalHtml);\n const modal = new bootstrap.Modal(document.getElementById('collectionDetailsModal'));\n modal.show();\n \n // Remove modal when hidden\n document.getElementById('collectionDetailsModal').addEventListener('hidden.bs.modal', function() {\n this.remove();\n });\n }\n \n function getDiskTypeBadgeColor(diskType) {\n switch(diskType.toLowerCase()) {\n case 'ssd':\n return 'primary';\n case 'hdd':\n case '':\n return 'secondary';\n default:\n return 'info';\n }\n }\n \n function formatBytes(bytes) {\n if (bytes === 0) return '0 Bytes';\n const k = 1024;\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n }\n \n function exportCollections() {\n // Simple CSV export of collections list\n const rows = Array.from(document.querySelectorAll('#collectionsTable tbody tr')).map(row => {\n const cells = row.querySelectorAll('td');\n if (cells.length > 1) {\n return {\n name: cells[0].textContent.trim(),\n volumes: cells[1].textContent.trim(),\n ecVolumes: cells[2].textContent.trim(),\n chunks: cells[3].textContent.trim(),\n size: cells[4].textContent.trim(),\n diskTypes: cells[5].textContent.trim()\n };\n }\n return null;\n }).filter(row => row !== null);\n\n const csvContent = \"data:text/csv;charset=utf-8,\" +\n \"Collection Name,Volumes,EC Volumes,Chunks,Size,Disk Types\\n\" +\n rows.map(r => '\"' + r.name + '\",\"' + r.volumes + '\",\"' + r.ecVolumes + '\",\"' + r.chunks + '\",\"' + r.size + '\",\"' + r.diskTypes + '\"').join(\"\\n\");\n \n const encodedUri = encodeURI(csvContent);\n const link = document.createElement(\"a\");\n link.setAttribute(\"href\", encodedUri);\n link.setAttribute(\"download\", \"collections.csv\");\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }\n </script>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}diff --git a/weed/admin/view/app/cluster_ec_shards_templ.go b/weed/admin/view/app/cluster_ec_shards_templ.goindex d28c3e45db..a8d58a009d 100644--- a/weed/admin/view/app/cluster_ec_shards_templ.go+++ b/weed/admin/view/app/cluster_ec_shards_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,10 +30,6 @@ func ClusterEcShards(data dash.ClusterEcShardsData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><div><h1 class=\"h2\"><i class=\"bi bi-grid me-2\"></i>EC Shards</h1>")if templ_7745c5c3_Err != nil {@@ -71,12 +68,12 @@ func ClusterEcShards(data dash.ClusterEcShardsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var3 templ.SafeURL- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/storage/ec-shards"))+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/storage/ec-shards")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_shards.templ`, Line: 25, Col: 66}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -345,12 +342,12 @@ func ClusterEcShards(data dash.ClusterEcShardsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var9 templ.SafeURL- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/storage/ec-shards?collection="+shard.Collection))+ var templ_7745c5c3_Var9 string+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/storage/ec-shards?collection="+shard.Collection)).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_shards.templ`, Line: 208, Col: 113}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -376,12 +373,12 @@ func ClusterEcShards(data dash.ClusterEcShardsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var11 templ.SafeURL- templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/storage/ec-shards?collection=default"))+ var templ_7745c5c3_Var11 string+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/storage/ec-shards?collection=default")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_shards.templ`, Line: 212, Col: 101}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -471,7 +468,7 @@ func ClusterEcShards(data dash.ClusterEcShardsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var15 string- templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", shard.VolumeID))+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", shard.VolumeID)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_shards.templ`, Line: 241, Col: 90}}@@ -499,7 +496,7 @@ func ClusterEcShards(data dash.ClusterEcShardsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var16 string- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.CurrentPage-1))+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.CurrentPage-1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_shards.templ`, Line: 259, Col: 129}}@@ -538,7 +535,7 @@ func ClusterEcShards(data dash.ClusterEcShardsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var17 string- templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.CurrentPage-1))+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.CurrentPage-1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_shards.templ`, Line: 280, Col: 129}}@@ -587,7 +584,7 @@ func ClusterEcShards(data dash.ClusterEcShardsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var20 string- templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.CurrentPage+1))+ templ_7745c5c3_Var20, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.CurrentPage+1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_shards.templ`, Line: 290, Col: 129}}@@ -629,7 +626,7 @@ func ClusterEcShards(data dash.ClusterEcShardsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var22 string- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.TotalPages))+ templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.TotalPages)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_shards.templ`, Line: 302, Col: 126}}@@ -661,7 +658,7 @@ func ClusterEcShards(data dash.ClusterEcShardsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var24 string- templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.CurrentPage+1))+ templ_7745c5c3_Var24, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.CurrentPage+1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_shards.templ`, Line: 308, Col: 129}}@@ -704,10 +701,6 @@ func displayShardDistribution(shard dash.EcShardWithInfo, allShards []dash.EcSha}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var25 := templ.GetChildren(ctx)- if templ_7745c5c3_Var25 == nil {- templ_7745c5c3_Var25 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "<div class=\"small\"><i class=\"bi bi-diagram-3 me-1\"></i> ")if templ_7745c5c3_Err != nil {@@ -747,10 +740,6 @@ func displayVolumeStatus(shard dash.EcShardWithInfo) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var27 := templ.GetChildren(ctx)- if templ_7745c5c3_Var27 == nil {- templ_7745c5c3_Var27 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)if shard.IsComplete {templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "<span class=\"badge bg-success\"><i class=\"bi bi-check me-1\"></i>Complete</span>")diff --git a/weed/admin/view/app/cluster_ec_volumes_templ.go b/weed/admin/view/app/cluster_ec_volumes_templ.goindex e92801b14c..4db1cba922 100644--- a/weed/admin/view/app/cluster_ec_volumes_templ.go+++ b/weed/admin/view/app/cluster_ec_volumes_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -32,10 +33,6 @@ func ClusterEcVolumes(data dash.ClusterEcVolumesData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><div><h1 class=\"h2\"><i class=\"bi bi-database me-2\"></i>EC Volumes</h1>")if templ_7745c5c3_Err != nil {@@ -74,12 +71,12 @@ func ClusterEcVolumes(data dash.ClusterEcVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var3 templ.SafeURL- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/storage/ec-volumes"))+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/storage/ec-volumes")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_volumes.templ`, Line: 28, Col: 67}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -395,12 +392,12 @@ func ClusterEcVolumes(data dash.ClusterEcVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var14 templ.SafeURL- templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/storage/ec-shards?collection=%s", volume.Collection)))+ var templ_7745c5c3_Var14 string+ templ_7745c5c3_Var14, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/storage/ec-shards?collection=%s", volume.Collection))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_volumes.templ`, Line: 204, Col: 128}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var14)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -426,12 +423,12 @@ func ClusterEcVolumes(data dash.ClusterEcVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var16 templ.SafeURL- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/storage/ec-shards?collection=default"))+ var templ_7745c5c3_Var16 string+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/storage/ec-shards?collection=default")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_volumes.templ`, Line: 208, Col: 101}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -526,7 +523,7 @@ func ClusterEcVolumes(data dash.ClusterEcVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var19 string- templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", volume.VolumeID))+ templ_7745c5c3_Var19, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", volume.VolumeID)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_volumes.templ`, Line: 240, Col: 91}}@@ -554,7 +551,7 @@ func ClusterEcVolumes(data dash.ClusterEcVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var20 string- templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.Page-1))+ templ_7745c5c3_Var20, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.Page-1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_volumes.templ`, Line: 263, Col: 122}}@@ -593,7 +590,7 @@ func ClusterEcVolumes(data dash.ClusterEcVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var21 string- templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.Page-1))+ templ_7745c5c3_Var21, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.Page-1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_volumes.templ`, Line: 284, Col: 122}}@@ -642,7 +639,7 @@ func ClusterEcVolumes(data dash.ClusterEcVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var24 string- templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.Page+1))+ templ_7745c5c3_Var24, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.Page+1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_volumes.templ`, Line: 294, Col: 122}}@@ -684,7 +681,7 @@ func ClusterEcVolumes(data dash.ClusterEcVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var26 string- templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.TotalPages))+ templ_7745c5c3_Var26, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.TotalPages)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_volumes.templ`, Line: 306, Col: 126}}@@ -716,7 +713,7 @@ func ClusterEcVolumes(data dash.ClusterEcVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var28 string- templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.Page+1))+ templ_7745c5c3_Var28, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.Page+1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_volumes.templ`, Line: 312, Col: 122}}@@ -729,7 +726,7 @@ func ClusterEcVolumes(data dash.ClusterEcVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var29 string- templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.TotalPages))+ templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.TotalPages)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_ec_volumes.templ`, Line: 317, Col: 126}}@@ -772,10 +769,6 @@ func displayShardSizes(shardSizes map[int]int64) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var30 := templ.GetChildren(ctx)- if templ_7745c5c3_Var30 == nil {- templ_7745c5c3_Var30 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)if len(shardSizes) == 0 {templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "<span class=\"text-muted\">-</span>")@@ -809,10 +802,6 @@ func renderShardSizesContent(shardSizes map[int]int64) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var31 := templ.GetChildren(ctx)- if templ_7745c5c3_Var31 == nil {- templ_7745c5c3_Var31 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)if areAllShardSizesSame(shardSizes) {templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, " <span class=\"text-success\">")@@ -1036,10 +1025,6 @@ func displayVolumeDistribution(volume dash.EcVolumeWithShards) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var34 := templ.GetChildren(ctx)- if templ_7745c5c3_Var34 == nil {- templ_7745c5c3_Var34 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "<div class=\"small\"><i class=\"bi bi-diagram-3 me-1\"></i> ")if templ_7745c5c3_Err != nil {@@ -1084,10 +1069,6 @@ func displayEcVolumeStatus(volume dash.EcVolumeWithShards) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var36 := templ.GetChildren(ctx)- if templ_7745c5c3_Var36 == nil {- templ_7745c5c3_Var36 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)if volume.IsComplete {templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "<span class=\"badge bg-success\"><i class=\"bi bi-check me-1\"></i>Complete</span>")diff --git a/weed/admin/view/app/cluster_filers_templ.go b/weed/admin/view/app/cluster_filers_templ.goindex 985f1dcffe..4f27e9a417 100644--- a/weed/admin/view/app/cluster_filers_templ.go+++ b/weed/admin/view/app/cluster_filers_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,10 +30,6 @@ func ClusterFilers(data dash.ClusterFilersData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-folder2-open me-2\"></i>Filers</h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-outline-primary\" onclick=\"exportFilers()\"><i class=\"bi bi-download me-1\"></i>Export</button></div></div></div><div id=\"filers-content\"><!-- Summary Cards --><div class=\"row mb-4\"><div class=\"col-xl-12 col-md-12 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total Filers</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {@@ -61,12 +58,12 @@ func ClusterFilers(data dash.ClusterFilersData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var3 templ.SafeURL- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//%s", filer.Address)))+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//%s", filer.Address))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_filers.templ`, Line: 71, Col: 70}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -147,7 +144,7 @@ func ClusterFilers(data dash.ClusterFilersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var9 string- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.ResolveAttributeValue(filer.Address)+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(filer.Address).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_filers.templ`, Line: 94, Col: 149}}diff --git a/weed/admin/view/app/cluster_masters_templ.go b/weed/admin/view/app/cluster_masters_templ.goindex a32973a612..fd41781748 100644--- a/weed/admin/view/app/cluster_masters_templ.go+++ b/weed/admin/view/app/cluster_masters_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,10 +30,6 @@ func ClusterMasters(data dash.ClusterMastersData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-award me-2\"></i>Masters</h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-outline-primary\" onclick=\"exportMasters()\"><i class=\"bi bi-download me-1\"></i>Export</button></div></div></div><div id=\"masters-content\"><!-- Summary Cards --><div class=\"row mb-4\"><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total Masters</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {@@ -89,12 +86,12 @@ func ClusterMasters(data dash.ClusterMastersData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var4 templ.SafeURL- templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//%s", master.Address)))+ var templ_7745c5c3_Var4 string+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//%s", master.Address))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_masters.templ`, Line: 113, Col: 71}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var4)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -159,7 +156,7 @@ func ClusterMasters(data dash.ClusterMastersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var7 string- templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.ResolveAttributeValue(master.Address)+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templruntime.NewAttributeExpression(master.Address).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_masters.templ`, Line: 143, Col: 41}}@@ -172,7 +169,7 @@ func ClusterMasters(data dash.ClusterMastersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var8 string- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%t", master.IsLeader))+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%t", master.IsLeader)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_masters.templ`, Line: 144, Col: 60}}@@ -185,7 +182,7 @@ func ClusterMasters(data dash.ClusterMastersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var9 string- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.ResolveAttributeValue(master.Suffrage)+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(master.Suffrage).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_masters.templ`, Line: 145, Col: 43}}diff --git a/weed/admin/view/app/cluster_s3_servers_templ.go b/weed/admin/view/app/cluster_s3_servers_templ.goindex 93e62d4dda..abf8699522 100644--- a/weed/admin/view/app/cluster_s3_servers_templ.go+++ b/weed/admin/view/app/cluster_s3_servers_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,10 +30,6 @@ func ClusterS3Servers(data dash.ClusterS3ServersData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-cloud me-2\"></i>S3 Servers</h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-outline-primary\" onclick=\"exportS3Servers()\"><i class=\"bi bi-download me-1\"></i>Export</button></div></div></div><div id=\"s3-servers-content\"><!-- Summary Cards --><div class=\"row mb-4\"><div class=\"col-xl-12 col-md-12 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total S3 Servers</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {diff --git a/weed/admin/view/app/cluster_volume_servers_templ.go b/weed/admin/view/app/cluster_volume_servers_templ.goindex 60acb8cb73..85581d63a5 100644--- a/weed/admin/view/app/cluster_volume_servers_templ.go+++ b/weed/admin/view/app/cluster_volume_servers_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,10 +30,6 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-server me-2\"></i>Volume Servers</h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-outline-primary\" onclick=\"exportVolumeServers()\"><i class=\"bi bi-download me-1\"></i>Export</button></div></div></div><div id=\"hosts-content\"><!-- Summary Cards --><div class=\"row mb-4\"><div class=\"col-xl-3 col-md-6 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total Volume Servers</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {@@ -92,12 +89,12 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var5 templ.SafeURL- templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", host.PublicURL)))+ var templ_7745c5c3_Var5 string+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", host.PublicURL))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 117, Col: 121}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var5)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -123,12 +120,12 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var7 templ.SafeURL- templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", host.Address)))+ var templ_7745c5c3_Var7 string+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", host.Address))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 122, Col: 119}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var7)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -334,7 +331,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var20 string- templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.ResolveAttributeValue(host.ID)+ templ_7745c5c3_Var20, templ_7745c5c3_Err = templruntime.NewAttributeExpression(host.ID).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 185, Col: 72}}@@ -347,7 +344,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var21 string- templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.ResolveAttributeValue(host.Address)+ templ_7745c5c3_Var21, templ_7745c5c3_Err = templruntime.NewAttributeExpression(host.Address).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 186, Col: 82}}@@ -360,7 +357,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var22 string- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.ResolveAttributeValue(host.PublicURL)+ templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression(host.PublicURL).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 187, Col: 87}}@@ -373,7 +370,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var23 string- templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.ResolveAttributeValue(host.DataCenter)+ templ_7745c5c3_Var23, templ_7745c5c3_Err = templruntime.NewAttributeExpression(host.DataCenter).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 188, Col: 88}}@@ -386,7 +383,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var24 string- templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.ResolveAttributeValue(host.Rack)+ templ_7745c5c3_Var24, templ_7745c5c3_Err = templruntime.NewAttributeExpression(host.Rack).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 189, Col: 76}}@@ -399,7 +396,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var25 string- templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.Volumes))+ templ_7745c5c3_Var25, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.Volumes)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 190, Col: 101}}@@ -412,7 +409,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var26 string- templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.MaxVolumes))+ templ_7745c5c3_Var26, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.MaxVolumes)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 191, Col: 108}}@@ -425,7 +422,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var27 string- templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.DiskUsage))+ templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.DiskUsage)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 192, Col: 106}}@@ -438,7 +435,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var28 string- templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.DiskCapacity))+ templ_7745c5c3_Var28, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.DiskCapacity)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 193, Col: 112}}@@ -451,7 +448,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var29 string- templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.RemoteSize))+ templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.RemoteSize)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 194, Col: 108}}@@ -464,7 +461,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var30 string- templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.EcVolumes))+ templ_7745c5c3_Var30, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.EcVolumes)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 195, Col: 106}}@@ -477,7 +474,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var31 string- templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.EcShards))+ templ_7745c5c3_Var31, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.EcShards)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 196, Col: 104}}@@ -490,7 +487,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var32 string- templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.ResolveAttributeValue(host.LastHeartbeat.Format("2006-01-02 15:04:05"))+ templ_7745c5c3_Var32, templ_7745c5c3_Err = templruntime.NewAttributeExpression(host.LastHeartbeat.Format("2006-01-02 15:04:05")).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 197, Col: 125}}@@ -508,7 +505,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var33 string- templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.ResolveAttributeValue(host.ID)+ templ_7745c5c3_Var33, templ_7745c5c3_Err = templruntime.NewAttributeExpression(host.ID).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 205, Col: 72}}@@ -521,7 +518,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var34 string- templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.ResolveAttributeValue(host.Address)+ templ_7745c5c3_Var34, templ_7745c5c3_Err = templruntime.NewAttributeExpression(host.Address).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 206, Col: 82}}@@ -534,7 +531,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var35 string- templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.ResolveAttributeValue(host.Address)+ templ_7745c5c3_Var35, templ_7745c5c3_Err = templruntime.NewAttributeExpression(host.Address).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 207, Col: 85}}@@ -547,7 +544,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var36 string- templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.ResolveAttributeValue(host.DataCenter)+ templ_7745c5c3_Var36, templ_7745c5c3_Err = templruntime.NewAttributeExpression(host.DataCenter).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 208, Col: 88}}@@ -560,7 +557,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var37 string- templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.ResolveAttributeValue(host.Rack)+ templ_7745c5c3_Var37, templ_7745c5c3_Err = templruntime.NewAttributeExpression(host.Rack).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 209, Col: 76}}@@ -573,7 +570,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var38 string- templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.Volumes))+ templ_7745c5c3_Var38, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.Volumes)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 210, Col: 101}}@@ -586,7 +583,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var39 string- templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.MaxVolumes))+ templ_7745c5c3_Var39, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.MaxVolumes)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 211, Col: 108}}@@ -599,7 +596,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var40 string- templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.DiskUsage))+ templ_7745c5c3_Var40, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.DiskUsage)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 212, Col: 106}}@@ -612,7 +609,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var41 string- templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.DiskCapacity))+ templ_7745c5c3_Var41, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.DiskCapacity)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 213, Col: 112}}@@ -625,7 +622,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var42 string- templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.RemoteSize))+ templ_7745c5c3_Var42, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.RemoteSize)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 214, Col: 108}}@@ -638,7 +635,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var43 string- templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.EcVolumes))+ templ_7745c5c3_Var43, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.EcVolumes)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 215, Col: 106}}@@ -651,7 +648,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var44 string- templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", host.EcShards))+ templ_7745c5c3_Var44, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", host.EcShards)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 216, Col: 104}}@@ -664,7 +661,7 @@ func ClusterVolumeServers(data dash.ClusterVolumeServersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var45 string- templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.ResolveAttributeValue(host.LastHeartbeat.Format("2006-01-02 15:04:05"))+ templ_7745c5c3_Var45, templ_7745c5c3_Err = templruntime.NewAttributeExpression(host.LastHeartbeat.Format("2006-01-02 15:04:05")).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volume_servers.templ`, Line: 217, Col: 125}}diff --git a/weed/admin/view/app/cluster_volumes_templ.go b/weed/admin/view/app/cluster_volumes_templ.goindex 4e4a9e1366..292fd96d97 100644--- a/weed/admin/view/app/cluster_volumes_templ.go+++ b/weed/admin/view/app/cluster_volumes_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -30,10 +31,6 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><div><h1 class=\"h2\"><i class=\"bi bi-database me-2\"></i>Cluster Volumes</h1>")if templ_7745c5c3_Err != nil {@@ -57,12 +54,12 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var3 templ.SafeURL- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/storage/volumes"))+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/storage/volumes")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 20, Col: 64}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -470,7 +467,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var16 string- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", volume.Id))+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", volume.Id)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 320, Col: 94}}@@ -495,12 +492,12 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var18 templ.SafeURL- templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", volume.Server)))+ var templ_7745c5c3_Var18 string+ templ_7745c5c3_Var18, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", volume.Server))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 326, Col: 116}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -569,12 +566,12 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var22 templ.SafeURL- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/storage/volumes?collection=default"))+ var templ_7745c5c3_Var22 string+ templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/storage/volumes?collection=default")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 344, Col: 115}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -587,12 +584,12 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var23 templ.SafeURL- templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/storage/volumes?collection=%s", volume.Collection)))+ var templ_7745c5c3_Var23 string+ templ_7745c5c3_Var23, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/storage/volumes?collection=%s", volume.Collection))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 348, Col: 142}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var23)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -659,7 +656,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var27 string- templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("Active: %s", formatBytes(int64(volume.Size-volume.DeletedByteCount))))+ templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("Active: %s", formatBytes(int64(volume.Size-volume.DeletedByteCount)))).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 370, Col: 132}}@@ -694,7 +691,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var29 string- templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("Garbage: %s", formatBytes(int64(volume.DeletedByteCount))))+ templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("Garbage: %s", formatBytes(int64(volume.DeletedByteCount)))).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 384, Col: 119}}@@ -774,7 +771,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var34 string- templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.ResolveAttributeValue(volume.RemoteStorageKey)+ templ_7745c5c3_Var34, templ_7745c5c3_Err = templruntime.NewAttributeExpression(volume.RemoteStorageKey).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 405, Col: 126}}@@ -829,7 +826,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var37 string- templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", volume.Id))+ templ_7745c5c3_Var37, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", volume.Id)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 419, Col: 121}}@@ -842,7 +839,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var38 string- templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", volume.Id))+ templ_7745c5c3_Var38, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", volume.Id)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 424, Col: 100}}@@ -855,7 +852,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var39 string- templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.ResolveAttributeValue(volume.Server)+ templ_7745c5c3_Var39, templ_7745c5c3_Err = templruntime.NewAttributeExpression(volume.Server).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 425, Col: 82}}@@ -958,7 +955,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var45 string- templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.CurrentPage-1))+ templ_7745c5c3_Var45, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.CurrentPage-1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 460, Col: 138}}@@ -1005,7 +1002,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var47 string- templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", i))+ templ_7745c5c3_Var47, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", i)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 480, Col: 125}}@@ -1042,7 +1039,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var49 string- templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.CurrentPage+1))+ templ_7745c5c3_Var49, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.CurrentPage+1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/cluster_volumes.templ`, Line: 488, Col: 138}}@@ -1147,10 +1144,6 @@ func getSortIcon(column, currentSort, currentOrder string) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var51 := templ.GetChildren(ctx)- if templ_7745c5c3_Var51 == nil {- templ_7745c5c3_Var51 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)if column != currentSort {templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "<i class=\"bi bi-arrow-down-up text-muted ms-1\"></i>")diff --git a/weed/admin/view/app/collection_details_templ.go b/weed/admin/view/app/collection_details_templ.goindex 5a11d10cb5..0b99e88bf4 100644--- a/weed/admin/view/app/collection_details_templ.go+++ b/weed/admin/view/app/collection_details_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -30,10 +31,6 @@ func CollectionDetails(data dash.CollectionDetailsData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><div><h1 class=\"h2\"><i class=\"bi bi-layers me-2\"></i>Collection Details: ")if templ_7745c5c3_Err != nil {@@ -52,12 +49,12 @@ func CollectionDetails(data dash.CollectionDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var3 templ.SafeURL- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/admin"))+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/admin")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/collection_details.templ`, Line: 17, Col: 67}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -65,12 +62,12 @@ func CollectionDetails(data dash.CollectionDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var4 templ.SafeURL- templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/storage/collections"))+ var templ_7745c5c3_Var4 string+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/storage/collections")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/collection_details.templ`, Line: 18, Col: 81}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var4)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -333,7 +330,7 @@ func CollectionDetails(data dash.CollectionDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var16 string- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", volume.Id))+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", volume.Id)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/collection_details.templ`, Line: 206, Col: 55}}@@ -346,7 +343,7 @@ func CollectionDetails(data dash.CollectionDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var17 string- templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(volume.Server)+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templruntime.NewAttributeExpression(volume.Server).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/collection_details.templ`, Line: 207, Col: 37}}@@ -419,7 +416,7 @@ func CollectionDetails(data dash.CollectionDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var21 string- templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", ecVolume.VolumeID))+ templ_7745c5c3_Var21, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", ecVolume.VolumeID)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/collection_details.templ`, Line: 249, Col: 63}}@@ -466,7 +463,7 @@ func CollectionDetails(data dash.CollectionDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var23 string- templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.Page-1))+ templ_7745c5c3_Var23, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.Page-1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/collection_details.templ`, Line: 280, Col: 104}}@@ -504,7 +501,7 @@ func CollectionDetails(data dash.CollectionDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var25 string- templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", i))+ templ_7745c5c3_Var25, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", i)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/collection_details.templ`, Line: 291, Col: 95}}@@ -547,7 +544,7 @@ func CollectionDetails(data dash.CollectionDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var27 string- templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.Page+1))+ templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.Page+1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/collection_details.templ`, Line: 306, Col: 104}}@@ -560,7 +557,7 @@ func CollectionDetails(data dash.CollectionDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var28 string- templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.TotalPages))+ templ_7745c5c3_Var28, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.TotalPages)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/collection_details.templ`, Line: 309, Col: 108}}diff --git a/weed/admin/view/app/ec_volume_details_templ.go b/weed/admin/view/app/ec_volume_details_templ.goindex 7d452ea6d1..bb0a29ea1b 100644--- a/weed/admin/view/app/ec_volume_details_templ.go+++ b/weed/admin/view/app/ec_volume_details_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -30,21 +31,17 @@ func EcVolumeDetails(data dash.EcVolumeDetailsData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><div><h1 class=\"h2\"><i class=\"bi bi-grid me-2\"></i>EC Volume Details</h1><nav aria-label=\"breadcrumb\"><ol class=\"breadcrumb\"><li class=\"breadcrumb-item\"><a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var2 templ.SafeURL- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/admin"))+ var templ_7745c5c3_Var2 string+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/admin")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/ec_volume_details.templ`, Line: 17, Col: 82}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -52,12 +49,12 @@ func EcVolumeDetails(data dash.EcVolumeDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var3 templ.SafeURL- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/storage/ec-shards"))+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/storage/ec-shards")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/ec_volume_details.templ`, Line: 18, Col: 94}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -446,12 +443,12 @@ func EcVolumeDetails(data dash.EcVolumeDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var17 templ.SafeURL- templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/cluster/volume-servers/"+shard.Server))+ var templ_7745c5c3_Var17 string+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/cluster/volume-servers/"+shard.Server)).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/ec_volume_details.templ`, Line: 252, Col: 111}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -524,12 +521,12 @@ func EcVolumeDetails(data dash.EcVolumeDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var23 templ.SafeURL- templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", shard.Server)))+ var templ_7745c5c3_Var23 string+ templ_7745c5c3_Var23, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", shard.Server))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/ec_volume_details.templ`, Line: 269, Col: 116}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var23)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -572,10 +569,6 @@ func renderEcShardBadge(shardID uint32, missing bool) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var24 := templ.GetChildren(ctx)- if templ_7745c5c3_Var24 == nil {- templ_7745c5c3_Var24 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)if shardID < erasure_coding.DataShardsCount {if missing {@@ -584,7 +577,7 @@ func renderEcShardBadge(shardID uint32, missing bool) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var25 string- templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("Missing data shard %d", shardID))+ templ_7745c5c3_Var25, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("Missing data shard %d", shardID)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/ec_volume_details.templ`, Line: 310, Col: 108}}@@ -615,7 +608,7 @@ func renderEcShardBadge(shardID uint32, missing bool) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var27 string- templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("Data shard %d", shardID))+ templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("Data shard %d", shardID)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/ec_volume_details.templ`, Line: 312, Col: 89}}@@ -648,7 +641,7 @@ func renderEcShardBadge(shardID uint32, missing bool) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var29 string- templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("Missing parity shard %d", shardID))+ templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("Missing parity shard %d", shardID)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/ec_volume_details.templ`, Line: 316, Col: 120}}@@ -679,7 +672,7 @@ func renderEcShardBadge(shardID uint32, missing bool) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var31 string- templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("Parity shard %d", shardID))+ templ_7745c5c3_Var31, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("Parity shard %d", shardID)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/ec_volume_details.templ`, Line: 318, Col: 101}}diff --git a/weed/admin/view/app/file_browser_templ.go b/weed/admin/view/app/file_browser_templ.goindex c65bc51c0c..0554245049 100644--- a/weed/admin/view/app/file_browser_templ.go+++ b/weed/admin/view/app/file_browser_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -45,10 +46,6 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\">")if templ_7745c5c3_Err != nil {@@ -97,12 +94,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var4 templ.SafeURL- templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/object-store/s3tables/buckets"))+ var templ_7745c5c3_Var4 string+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/object-store/s3tables/buckets")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 32, Col: 62}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var4)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -115,12 +112,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var5 templ.SafeURL- templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/object-store/buckets"))+ var templ_7745c5c3_Var5 string+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/object-store/buckets")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 36, Col: 53}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var5)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -139,12 +136,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var6 templ.SafeURL- templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fileBrowserPathURL(crumb.Path)))+ var templ_7745c5c3_Var6 string+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fileBrowserPathURL(crumb.Path))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 62, Col: 62}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var6)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -170,12 +167,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var8 templ.SafeURL- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fileBrowserPathURL(crumb.Path)))+ var templ_7745c5c3_Var8 string+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fileBrowserPathURL(crumb.Path))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 68, Col: 62}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -213,12 +210,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var10 templ.SafeURL- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fileBrowserPathURL("/")))+ var templ_7745c5c3_Var10 string+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fileBrowserPathURL("/"))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 86, Col: 53}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -231,12 +228,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var11 templ.SafeURL- templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fileBrowserPathURL("/buckets")))+ var templ_7745c5c3_Var11 string+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fileBrowserPathURL("/buckets"))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 88, Col: 66}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -244,12 +241,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var12 templ.SafeURL- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/object-store/buckets"))+ var templ_7745c5c3_Var12 string+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/object-store/buckets")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 89, Col: 53}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var12)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -262,12 +259,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var13 templ.SafeURL- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fileBrowserPathURL(data.CurrentPath)))+ var templ_7745c5c3_Var13 string+ templ_7745c5c3_Var13, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fileBrowserPathURL(data.CurrentPath))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 93, Col: 66}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -293,122 +290,137 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, changePageSize(data.CurrentPath, data.CurrentLastFileName, "file-browser-page-size-top"))- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<select id=\"file-browser-page-size-top\" class=\"form-select form-select-sm\" style=\"width: 70px; font-size: 0.875rem;\" onchange=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var15 templ.ComponentScript = changePageSize(data.CurrentPath, data.CurrentLastFileName, "file-browser-page-size-top")- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15.Call)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<select id=\"file-browser-page-size-top\" class=\"form-select form-select-sm\" style=\"width: 70px; font-size: 0.875rem;\" onchange=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var15 templ.ComponentScript = changePageSize(data.CurrentPath, data.CurrentLastFileName, "file-browser-page-size-top")+ templ_7745c5c3_ElementScripts = append(templ_7745c5c3_ElementScripts, templ_7745c5c3_Var15)+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15.Call)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\"><option value=\"20\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "><option value=\"20\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.PageSize == 20 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, " selected")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, " selected")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, ">20</option> <option value=\"50\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, ">20</option> <option value=\"50\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.PageSize == 50 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, " selected")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, " selected")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, ">50</option> <option value=\"100\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, ">50</option> <option value=\"100\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.PageSize == 100 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, " selected")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, " selected")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, ">100</option> <option value=\"200\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, ">100</option> <option value=\"200\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.PageSize == 200 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, " selected")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, " selected")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, ">200</option></select></div><div class=\"btn-group btn-group-sm\" role=\"group\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, ">200</option></select></div><div class=\"btn-group btn-group-sm\" role=\"group\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.HasNextPage {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<a href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "<a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var16 templ.SafeURL- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fileBrowserPageURL(data.CurrentPath, data.LastFileName, data.PageSize)))+ var templ_7745c5c3_Var16 string+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fileBrowserPageURL(data.CurrentPath, data.LastFileName, data.PageSize))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 110, Col: 102}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "\" class=\"btn btn-outline-primary\" title=\"Next page\">Next <i class=\"bi bi-chevron-right\"></i></a> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "\" class=\"btn btn-outline-primary\" title=\"Next page\">Next <i class=\"bi bi-chevron-right\"></i></a> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<button class=\"btn btn-outline-secondary\" disabled title=\"Next page\">Next <i class=\"bi bi-chevron-right\"></i></button> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "<button class=\"btn btn-outline-secondary\" disabled title=\"Next page\">Next <i class=\"bi bi-chevron-right\"></i></button> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if data.ParentPath != data.CurrentPath {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "<a href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "<a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var17 templ.SafeURL- templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fileBrowserPathURL(data.ParentPath)))+ var templ_7745c5c3_Var17 string+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fileBrowserPathURL(data.ParentPath))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 119, Col: 67}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\" class=\"btn btn-outline-secondary\" title=\"Go up one directory\"><i class=\"bi bi-arrow-up\"></i> Up</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "\" class=\"btn btn-outline-secondary\" title=\"Go up one directory\"><i class=\"bi bi-arrow-up\"></i> Up</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "</div></div></div><div class=\"card-body\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "</div></div></div><div class=\"card-body\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if len(data.Entries) > 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "<div class=\"table-responsive\"><table class=\"table table-hover\" id=\"fileTable\"><thead><tr><th width=\"40px\"><input type=\"checkbox\" id=\"selectAll\" onchange=\"toggleSelectAll()\"></th><th>Name</th><th>Size</th><th>Type</th><th>Modified</th><th>Permissions</th><th>Actions</th></tr></thead> <tbody>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<div class=\"table-responsive\"><table class=\"table table-hover\" id=\"fileTable\"><thead><tr><th width=\"40px\"><input type=\"checkbox\" id=\"selectAll\" onchange=\"toggleSelectAll()\"></th><th>Name</th><th>Size</th><th>Type</th><th>Modified</th><th>Permissions</th><th>Actions</th></tr></thead> <tbody>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}for _, entry := range data.Entries {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<tr><td><input type=\"checkbox\" class=\"file-checkbox\" value=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "<tr><td><input type=\"checkbox\" class=\"file-checkbox\" value=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var18 string- templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.ResolveAttributeValue(entry.FullPath)+ templ_7745c5c3_Var18, templ_7745c5c3_Err = templruntime.NewAttributeExpression(entry.FullPath).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 147, Col: 77}}@@ -416,25 +428,25 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "\"></td><td><div class=\"d-flex align-items-center\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "\"></td><td><div class=\"d-flex align-items-center\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if entry.IsDirectory {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "<i class=\"bi bi-folder text-warning me-2\"></i> <a href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "<i class=\"bi bi-folder text-warning me-2\"></i> <a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var19 templ.SafeURL- templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fileBrowserPathURL(entry.FullPath)))+ var templ_7745c5c3_Var19 string+ templ_7745c5c3_Var19, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fileBrowserPathURL(entry.FullPath))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 153, Col: 72}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var19)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "\" class=\"text-decoration-none\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "\" class=\"text-decoration-none\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -447,30 +459,48 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- var templ_7745c5c3_Var21 = []any{fmt.Sprintf("bi %s text-muted me-2", getFileIcon(entry.Mime))}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var21...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<i class=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var22 string- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var21).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "<i class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var21 = []any{fmt.Sprintf("bi %s text-muted me-2", getFileIcon(entry.Mime))}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var21...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var22 string+ templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var21).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "\"></i> <span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "></i> <span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -483,17 +513,17 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "</div></td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "</div></td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if entry.IsDirectory {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "<span class=\"text-muted\">—</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<span class=\"text-muted\">—</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -508,12 +538,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "</td><td><span class=\"badge bg-light text-dark\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "</td><td><span class=\"badge bg-light text-dark\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if entry.IsDirectory {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "Directory")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "Directory")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -528,7 +558,7 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "</span></td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</span></td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -543,17 +573,17 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "<span class=\"text-muted\">—</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "<span class=\"text-muted\">—</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</td><td><code class=\"small permissions-display\" data-mode=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "</td><td><code class=\"small permissions-display\" data-mode=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var27 string- templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.ResolveAttributeValue(entry.Mode)+ templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.NewAttributeExpression(entry.Mode).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 186, Col: 72}}@@ -561,12 +591,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "\" data-is-directory=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "\" data-is-directory=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var28 string- templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%t", entry.IsDirectory))+ templ_7745c5c3_Var28, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%t", entry.IsDirectory)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 186, Col: 131}}@@ -574,7 +604,7 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -587,17 +617,17 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "</code></td><td><div class=\"btn-group btn-group-sm\" role=\"group\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "</code></td><td><div class=\"btn-group btn-group-sm\" role=\"group\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if !entry.IsDirectory {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "<button type=\"button\" class=\"btn btn-outline-primary btn-sm\" title=\"Download\" data-action=\"download\" data-path=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "<button type=\"button\" class=\"btn btn-outline-primary btn-sm\" title=\"Download\" data-action=\"download\" data-path=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var30 string- templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.ResolveAttributeValue(entry.FullPath)+ templ_7745c5c3_Var30, templ_7745c5c3_Err = templruntime.NewAttributeExpression(entry.FullPath).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 191, Col: 139}}@@ -605,12 +635,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "\"><i class=\"bi bi-download\"></i></button> <button type=\"button\" class=\"btn btn-outline-info btn-sm\" title=\"View\" data-action=\"view\" data-path=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "\"><i class=\"bi bi-download\"></i></button> <button type=\"button\" class=\"btn btn-outline-info btn-sm\" title=\"View\" data-action=\"view\" data-path=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var31 string- templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.ResolveAttributeValue(entry.FullPath)+ templ_7745c5c3_Var31, templ_7745c5c3_Err = templruntime.NewAttributeExpression(entry.FullPath).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 194, Col: 128}}@@ -618,17 +648,17 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "\"><i class=\"bi bi-eye\"></i></button> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "\"><i class=\"bi bi-eye\"></i></button> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.S3Endpoint != "" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "<button type=\"button\" class=\"btn btn-outline-secondary btn-sm\" title=\"Copy S3 URL\" data-action=\"copy-url\" data-url=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "<button type=\"button\" class=\"btn btn-outline-secondary btn-sm\" title=\"Copy S3 URL\" data-action=\"copy-url\" data-url=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var32 string- templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.ResolveAttributeValue(dash.S3ObjectURL(data.S3Endpoint, entry.FullPath))+ templ_7745c5c3_Var32, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.S3ObjectURL(data.S3Endpoint, entry.FullPath)).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 198, Col: 179}}@@ -636,18 +666,18 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "\"><i class=\"bi bi-link\"></i></button> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "\"><i class=\"bi bi-link\"></i></button> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "<button type=\"button\" class=\"btn btn-outline-secondary btn-sm\" title=\"Properties\" data-action=\"properties\" data-path=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "<button type=\"button\" class=\"btn btn-outline-secondary btn-sm\" title=\"Properties\" data-action=\"properties\" data-path=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var33 string- templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.ResolveAttributeValue(entry.FullPath)+ templ_7745c5c3_Var33, templ_7745c5c3_Err = templruntime.NewAttributeExpression(entry.FullPath).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 203, Col: 144}}@@ -655,12 +685,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "\"><i class=\"bi bi-info-circle\"></i></button> <button type=\"button\" class=\"btn btn-outline-success btn-sm\" title=\"Export metadata\" data-action=\"export-metadata\" data-path=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "\"><i class=\"bi bi-info-circle\"></i></button> <button type=\"button\" class=\"btn btn-outline-success btn-sm\" title=\"Export metadata\" data-action=\"export-metadata\" data-path=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var34 string- templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.ResolveAttributeValue(entry.FullPath)+ templ_7745c5c3_Var34, templ_7745c5c3_Err = templruntime.NewAttributeExpression(entry.FullPath).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 206, Col: 152}}@@ -668,12 +698,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "\"><i class=\"bi bi-file-earmark-arrow-up\"></i></button> <button type=\"button\" class=\"btn btn-outline-danger btn-sm\" title=\"Delete\" data-action=\"delete\" data-path=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "\"><i class=\"bi bi-file-earmark-arrow-up\"></i></button> <button type=\"button\" class=\"btn btn-outline-danger btn-sm\" title=\"Delete\" data-action=\"delete\" data-path=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var35 string- templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.ResolveAttributeValue(entry.FullPath)+ templ_7745c5c3_Var35, templ_7745c5c3_Err = templruntime.NewAttributeExpression(entry.FullPath).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 209, Col: 133}}@@ -681,107 +711,122 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "\"><i class=\"bi bi-trash\"></i></button></div></td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "\"><i class=\"bi bi-trash\"></i></button></div></td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "</tbody></table></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "</tbody></table></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "<div class=\"text-center py-5\"><i class=\"bi bi-folder2-open icon-3x text-muted mb-3\"></i><h5 class=\"text-muted\">Empty Directory</h5><p class=\"text-muted\">This directory contains no files or subdirectories.</p></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "<div class=\"text-center py-5\"><i class=\"bi bi-folder2-open icon-3x text-muted mb-3\"></i><h5 class=\"text-muted\">Empty Directory</h5><p class=\"text-muted\">This directory contains no files or subdirectories.</p></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "</div></div><!-- Last Updated --><!-- Pagination Controls (Bottom) --><div class=\"row mb-3\"><div class=\"col-md-6\"><div class=\"d-flex align-items-center\"><label class=\"me-2 mb-0\">Show:</label> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "</div></div><!-- Last Updated --><!-- Pagination Controls (Bottom) --><div class=\"row mb-3\"><div class=\"col-md-6\"><div class=\"d-flex align-items-center\"><label class=\"me-2 mb-0\">Show:</label> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, changePageSize(data.CurrentPath, data.CurrentLastFileName, "file-browser-page-size-bottom"))- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "<select id=\"file-browser-page-size-bottom\" class=\"form-select form-select-sm\" style=\"width: auto;\" onchange=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var36 templ.ComponentScript = changePageSize(data.CurrentPath, data.CurrentLastFileName, "file-browser-page-size-bottom")- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var36.Call)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "<select id=\"file-browser-page-size-bottom\" class=\"form-select form-select-sm\" style=\"width: auto;\" onchange=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var36 templ.ComponentScript = changePageSize(data.CurrentPath, data.CurrentLastFileName, "file-browser-page-size-bottom")+ templ_7745c5c3_ElementScripts = append(templ_7745c5c3_ElementScripts, templ_7745c5c3_Var36)+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var36.Call)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "\"><option value=\"20\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "><option value=\"20\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.PageSize == 20 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, " selected")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, " selected")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, ">20</option> <option value=\"50\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, ">20</option> <option value=\"50\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.PageSize == 50 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, " selected")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, " selected")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, ">50</option> <option value=\"100\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, ">50</option> <option value=\"100\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.PageSize == 100 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, " selected")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, " selected")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, ">100</option> <option value=\"200\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, ">100</option> <option value=\"200\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.PageSize == 200 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, " selected")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, " selected")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, ">200</option></select> <span class=\"ms-2 text-muted\">entries per page</span></div></div><div class=\"col-md-6 text-end\"><div class=\"btn-group btn-group-sm\" role=\"group\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, ">200</option></select> <span class=\"ms-2 text-muted\">entries per page</span></div></div><div class=\"col-md-6 text-end\"><div class=\"btn-group btn-group-sm\" role=\"group\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.HasNextPage {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "<a href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "<a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var37 templ.SafeURL- templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fileBrowserPageURL(data.CurrentPath, data.LastFileName, data.PageSize)))+ var templ_7745c5c3_Var37 string+ templ_7745c5c3_Var37, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fileBrowserPageURL(data.CurrentPath, data.LastFileName, data.PageSize))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 249, Col: 102}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var37)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "\" class=\"btn btn-outline-primary\">Next <i class=\"bi bi-chevron-right ms-1\"></i></a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "\" class=\"btn btn-outline-primary\">Next <i class=\"bi bi-chevron-right ms-1\"></i></a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "<button class=\"btn btn-outline-secondary\" disabled>Next <i class=\"bi bi-chevron-right ms-1\"></i></button>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "<button class=\"btn btn-outline-secondary\" disabled>Next <i class=\"bi bi-chevron-right ms-1\"></i></button>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "</div></div></div><div class=\"row\"><div class=\"col-12\"><small class=\"text-muted\"><i class=\"bi bi-clock me-1\"></i> Last updated: ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "</div></div></div><div class=\"row\"><div class=\"col-12\"><small class=\"text-muted\"><i class=\"bi bi-clock me-1\"></i> Last updated: ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -794,12 +839,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "</small></div></div><!-- Create Folder Modal --><div class=\"modal fade\" id=\"createFolderModal\" tabindex=\"-1\" aria-labelledby=\"createFolderModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"createFolderModalLabel\"><i class=\"bi bi-folder-plus me-2\"></i>Create New Folder</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><form id=\"createFolderForm\"><div class=\"mb-3\"><label for=\"folderName\" class=\"form-label\">Folder Name</label> <input type=\"text\" class=\"form-control\" id=\"folderName\" name=\"folderName\" required placeholder=\"Enter folder name\" maxlength=\"255\"><div class=\"form-text\">Folder names cannot contain / or \\ characters.</div></div><input type=\"hidden\" id=\"currentPath\" name=\"currentPath\" value=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "</small></div></div><!-- Create Folder Modal --><div class=\"modal fade\" id=\"createFolderModal\" tabindex=\"-1\" aria-labelledby=\"createFolderModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"createFolderModalLabel\"><i class=\"bi bi-folder-plus me-2\"></i>Create New Folder</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><form id=\"createFolderForm\"><div class=\"mb-3\"><label for=\"folderName\" class=\"form-label\">Folder Name</label> <input type=\"text\" class=\"form-control\" id=\"folderName\" name=\"folderName\" required placeholder=\"Enter folder name\" maxlength=\"255\"><div class=\"form-text\">Folder names cannot contain / or \\ characters.</div></div><input type=\"hidden\" id=\"currentPath\" name=\"currentPath\" value=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var39 string- templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.CurrentPath)+ templ_7745c5c3_Var39, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.CurrentPath).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 289, Col: 87}}@@ -807,12 +852,12 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "\"></form></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-primary\" onclick=\"submitCreateFolder()\"><i class=\"bi bi-folder-plus me-1\"></i>Create Folder</button></div></div></div></div><!-- Upload File Modal --><div class=\"modal fade\" id=\"uploadFileModal\" tabindex=\"-1\" aria-labelledby=\"uploadFileModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-lg\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"uploadFileModalLabel\"><i class=\"bi bi-upload me-2\"></i>Upload Files</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><form id=\"uploadFileForm\" enctype=\"multipart/form-data\"><div class=\"mb-3\"><label for=\"fileInput\" class=\"form-label\">Select Files</label> <input type=\"file\" class=\"form-control\" id=\"fileInput\" name=\"files\" multiple required><div class=\"form-text\">Choose one or more files to upload to the current directory. You can select multiple files by holding Ctrl (Cmd on Mac) while clicking.</div></div><input type=\"hidden\" id=\"uploadPath\" name=\"path\" value=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "\"></form></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-primary\" onclick=\"submitCreateFolder()\"><i class=\"bi bi-folder-plus me-1\"></i>Create Folder</button></div></div></div></div><!-- Upload File Modal --><div class=\"modal fade\" id=\"uploadFileModal\" tabindex=\"-1\" aria-labelledby=\"uploadFileModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-lg\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"uploadFileModalLabel\"><i class=\"bi bi-upload me-2\"></i>Upload Files</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><form id=\"uploadFileForm\" enctype=\"multipart/form-data\"><div class=\"mb-3\"><label for=\"fileInput\" class=\"form-label\">Select Files</label> <input type=\"file\" class=\"form-control\" id=\"fileInput\" name=\"files\" multiple required><div class=\"form-text\">Choose one or more files to upload to the current directory. You can select multiple files by holding Ctrl (Cmd on Mac) while clicking.</div></div><input type=\"hidden\" id=\"uploadPath\" name=\"path\" value=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var40 string- templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.CurrentPath)+ templ_7745c5c3_Var40, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.CurrentPath).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/file_browser.templ`, Line: 321, Col: 79}}@@ -820,7 +865,7 @@ func FileBrowser(data dash.FileBrowserData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "\"><!-- File List Preview --><div id=\"fileListPreview\" class=\"mb-3\" style=\"display: none;\"><label class=\"form-label\">Selected Files:</label><div id=\"selectedFilesList\" class=\"border rounded p-2 bg-light\"><!-- Files will be listed here --></div></div><!-- Upload Progress --><div class=\"mb-3\" id=\"uploadProgress\" style=\"display: none;\"><label class=\"form-label\">Upload Progress:</label><div class=\"progress mb-2\"><div class=\"progress-bar progress-bar-striped progress-bar-animated\" role=\"progressbar\" style=\"width: 0%\" aria-valuenow=\"0\" aria-valuemin=\"0\" aria-valuemax=\"100\">0%</div></div><div id=\"uploadStatus\" class=\"small text-muted\">Preparing upload...</div></div></form></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-primary\" onclick=\"submitUploadFile()\"><i class=\"bi bi-upload me-1\"></i>Upload Files</button></div></div></div></div><!-- JavaScript for file browser functionality --><script>\n\tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t// Format permissions in the main table\n\t\tdocument.querySelectorAll('.permissions-display').forEach(element => {\n\t\t\tconst mode = element.getAttribute('data-mode');\n\t\t\tconst isDirectory = element.getAttribute('data-is-directory') === 'true';\n\t\t\tif (mode) {\n\t\t\t\telement.textContent = formatPermissions(mode, isDirectory);\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Handle file browser action buttons (download, view, properties, export-metadata, delete)\n\t\tdocument.addEventListener('click', function(e) {\n\t\t\tconst button = e.target.closest('[data-action]');\n\t\t\tif (!button) return;\n\t\t\t\n\t\t\tconst action = button.getAttribute('data-action');\n\t\t\tif (action === 'copy-url') {\n\t\t\t\tconst url = button.getAttribute('data-url');\n\t\t\t\tif (url) adminCopyToClipboard(url);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst path = button.getAttribute('data-path');\n\n\t\t\tif (!path) return;\n\t\t\t\n\t\t\tswitch(action) {\n\t\t\t\tcase 'download':\n\t\t\t\t\tdownloadFile(path);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'view':\n\t\t\t\t\tviewFile(path);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'properties':\n\t\t\t\t\tshowFileProperties(path);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'export-metadata':\n\t\t\t\t\texportMetadata(path);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'delete':\n\t\t\t\t\tconst fileName = path.split('/').pop();\n\t\t\t\t\tshowDeleteConfirm(fileName, function() {\n\t\t\t\t\t\tdeleteFile(path);\n\t\t\t\t\t}, `Are you sure you want to delete \"${fileName}\"? This action cannot be undone.`);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Initialize file manager event handlers from admin.js\n\t\tif (typeof setupFileManagerEventHandlers === 'function') {\n\t\t\tsetupFileManagerEventHandlers();\n\t\t}\n\t});\n\t\n\t// File browser specific functions\n\tfunction downloadFile(path) {\n\t\t// Open download URL in new tab\n\t\twindow.open((window.__BASE_PATH__ || '') + '/api/files/download?path=' + encodeURIComponent(path), '_blank');\n\t}\n\n\tfunction viewFile(path) {\n\t\t// Open file viewer in new tab\n\t\twindow.open((window.__BASE_PATH__ || '') + '/api/files/view?path=' + encodeURIComponent(path), '_blank');\n\t}\n\n\tfunction exportMetadata(path) {\n\t\t// Download metadata as an fs.meta.load-compatible .meta.gz\n\t\twindow.open((window.__BASE_PATH__ || '') + '/api/files/metadata?path=' + encodeURIComponent(path), '_blank');\n\t}\n\n\tfunction showFileProperties(path) {\n\t\t// Fetch file properties and show in modal\n\t\tfetch((window.__BASE_PATH__ || '') + '/api/files/properties?path=' + encodeURIComponent(path))\n\t\t\t.then(response => response.json())\n\t\t\t.then(data => {\n\t\t\t\tif (data.error) {\n\t\t\t\t\tshowAlert('Error loading file properties: ' + data.error, 'error');\n\t\t\t\t} else {\n\t\t\t\t\tdisplayFileProperties(data);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error('Error fetching file properties:', error);\n\t\t\t\tshowAlert('Error loading file properties: ' + error.message, 'error');\n\t\t\t});\n\t}\n\t\n\tfunction displayFileProperties(data) {\n\t\t// Create a comprehensive modal for file properties\n\t\tconst modalHtml = '<div class=\"modal fade\" id=\"filePropertiesModal\" tabindex=\"-1\">' +\n\t\t\t'<div class=\"modal-dialog modal-lg\">' +\n\t\t\t'<div class=\"modal-content\">' +\n\t\t\t'<div class=\"modal-header\">' +\n\t\t\t'<h5 class=\"modal-title\"><i class=\"bi bi-info-circle me-2\"></i>Properties: ' + (data.name || 'Unknown') + '</h5>' +\n\t\t\t'<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\"></button>' +\n\t\t\t'</div>' +\n\t\t\t'<div class=\"modal-body\">' +\n\t\t\tcreateFilePropertiesContent(data) +\n\t\t\t'</div>' +\n\t\t\t'<div class=\"modal-footer\">' +\n\t\t\t'<button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button>' +\n\t\t\t'</div>' +\n\t\t\t'</div>' +\n\t\t\t'</div>' +\n\t\t\t'</div>';\n\t\t\n\t\t// Remove existing modal if present\n\t\tconst existingModal = document.getElementById('filePropertiesModal');\n\t\tif (existingModal) {\n\t\t\texistingModal.remove();\n\t\t}\n\t\t\n\t\t// Add modal to body and show\n\t\tdocument.body.insertAdjacentHTML('beforeend', modalHtml);\n\t\tconst modal = new bootstrap.Modal(document.getElementById('filePropertiesModal'));\n\t\tmodal.show();\n\t\t\n\t\t// Remove modal when hidden\n\t\tdocument.getElementById('filePropertiesModal').addEventListener('hidden.bs.modal', function() {\n\t\t\tthis.remove();\n\t\t});\n\t}\n\t\n\tfunction createFilePropertiesContent(data) {\n\t\tlet html = '<div class=\"row\">' +\n\t\t\t'<div class=\"col-12\">' +\n\t\t\t'<h6 class=\"text-primary\"><i class=\"bi bi-file-earmark me-1\"></i>Basic Information</h6>' +\n\t\t\t'<table class=\"table table-sm\">' +\n\t\t\t'<tr><td style=\"width: 120px;\"><strong>Name:</strong></td><td>' + (data.name || 'N/A') + '</td></tr>' +\n\t\t\t'<tr><td><strong>Full Path:</strong></td><td><code class=\"text-break\">' + (data.full_path || 'N/A') + '</code></td></tr>' +\n\t\t\t'<tr><td><strong>Type:</strong></td><td>' + (data.is_directory ? 'Directory' : 'File') + '</td></tr>';\n\t\t\n\t\tif (!data.is_directory) {\n\t\t\thtml += '<tr><td><strong>Size:</strong></td><td>' + (data.size_formatted || (data.size ? formatBytes(data.size) : 'N/A')) + '</td></tr>' +\n\t\t\t\t'<tr><td><strong>MIME Type:</strong></td><td>' + (data.mime_type || 'N/A') + '</td></tr>';\n\t\t\tif (data.object_url) {\n\t\t\t\thtml += '<tr><td><strong>Object URL:</strong></td><td><code class=\"text-break\">' + data.object_url + '</code>' +\n\t\t\t\t\t' <button type=\"button\" class=\"btn btn-outline-secondary btn-sm\" title=\"Copy S3 URL\" data-action=\"copy-url\" data-url=\"' + data.object_url + '\"><i class=\"bi bi-copy\"></i></button></td></tr>';\n\t\t\t}\n\t\t}\n\t\t\n\t\thtml += '</table>' +\n\t\t\t'</div>' +\n\t\t\t'</div>' +\n\t\t\t'<div class=\"row\">' +\n\t\t\t'<div class=\"col-md-6\">' +\n\t\t\t'<h6 class=\"text-primary\"><i class=\"bi bi-clock me-1\"></i>Timestamps</h6>' +\n\t\t\t'<table class=\"table table-sm\">';\n\t\t\n\t\tif (data.modified_time) {\n\t\t\thtml += '<tr><td><strong>Modified:</strong></td><td>' + data.modified_time + '</td></tr>';\n\t\t}\n\t\tif (data.created_time) {\n\t\t\thtml += '<tr><td><strong>Created:</strong></td><td>' + data.created_time + '</td></tr>';\n\t\t}\n\t\t\n\t\thtml += '</table>' +\n\t\t\t'</div>' +\n\t\t\t'<div class=\"col-md-6\">' +\n\t\t\t'<h6 class=\"text-primary\"><i class=\"bi bi-shield me-1\"></i>Permissions</h6>' +\n\t\t\t'<table class=\"table table-sm\">';\n\t\t\n\t\tif (data.file_mode) {\n\t\t\tconst rwxPermissions = formatPermissions(data.file_mode, data.is_directory);\n\t\t\thtml += '<tr><td><strong>Permissions:</strong></td><td><code>' + rwxPermissions + '</code></td></tr>';\n\t\t}\n\t\tif (data.uid !== undefined) {\n\t\t\thtml += '<tr><td><strong>User ID:</strong></td><td>' + data.uid + '</td></tr>';\n\t\t}\n\t\tif (data.gid !== undefined) {\n\t\t\thtml += '<tr><td><strong>Group ID:</strong></td><td>' + data.gid + '</td></tr>';\n\t\t}\n\t\t\n\t\thtml += '</table>' +\n\t\t\t'</div>' +\n\t\t\t'</div>';\n\t\t\n\t\t// Add advanced info\n\t\thtml += '<div class=\"row\">' +\n\t\t\t'<div class=\"col-12\">' +\n\t\t\t'<h6 class=\"text-primary\"><i class=\"bi bi-gear me-1\"></i>Advanced</h6>' +\n\t\t\t'<table class=\"table table-sm\">';\n\t\t\n\t\tif (data.chunk_count) {\n\t\t\thtml += '<tr><td style=\"width: 120px;\"><strong>Chunks:</strong></td><td>' + data.chunk_count + '</td></tr>';\n\t\t}\n\t\tif (data.ttl_formatted) {\n\t\t\thtml += '<tr><td><strong>TTL:</strong></td><td>' + data.ttl_formatted + '</td></tr>';\n\t\t}\n\t\t\n\t\thtml += '</table>' +\n\t\t\t'</div>' +\n\t\t\t'</div>';\n\t\t\n\t\t// Add chunk details if available (show top 5)\n\t\tif (data.chunks && data.chunks.length > 0) {\n\t\t\tconst chunksToShow = data.chunks.slice(0, 5);\n\t\t\thtml += '<div class=\"row mt-3\">' +\n\t\t\t\t'<div class=\"col-12\">' +\n\t\t\t\t'<h6 class=\"text-primary\"><i class=\"bi bi-puzzle me-1\"></i>Chunk Details' +\n\t\t\t\t(data.chunk_count > 5 ? ' (Top 5 of ' + data.chunk_count + ')' : ' (' + data.chunk_count + ')') +\n\t\t\t\t'</h6>' +\n\t\t\t\t'<div class=\"table-responsive\" style=\"max-height: 200px; overflow-y: auto;\">' +\n\t\t\t\t'<table class=\"table table-sm table-striped\">' +\n\t\t\t\t'<thead>' +\n\t\t\t\t'<tr>' +\n\t\t\t\t'<th>File ID</th>' +\n\t\t\t\t'<th>Offset</th>' +\n\t\t\t\t'<th>Size</th>' +\n\t\t\t\t'<th>ETag</th>' +\n\t\t\t\t'</tr>' +\n\t\t\t\t'</thead>' +\n\t\t\t\t'<tbody>';\n\t\t\t\n\t\t\tchunksToShow.forEach(chunk => {\n\t\t\t\thtml += '<tr>' +\n\t\t\t\t\t'<td><code class=\"small\">' + (chunk.file_id || 'N/A') + '</code></td>' +\n\t\t\t\t\t'<td>' + formatBytes(chunk.offset || 0) + '</td>' +\n\t\t\t\t\t'<td>' + formatBytes(chunk.size || 0) + '</td>' +\n\t\t\t\t\t'<td><code class=\"small\">' + (chunk.e_tag || 'N/A') + '</code></td>' +\n\t\t\t\t\t'</tr>';\n\t\t\t});\n\t\t\t\n\t\t\thtml += '</tbody>' +\n\t\t\t\t'</table>' +\n\t\t\t\t'</div>' +\n\t\t\t\t'</div>' +\n\t\t\t\t'</div>';\n\t\t}\n\t\t\n\t\t// Add extended attributes if present\n\t\tif (data.extended && Object.keys(data.extended).length > 0) {\n\t\t\thtml += '<div class=\"row\">' +\n\t\t\t\t'<div class=\"col-12\">' +\n\t\t\t\t'<h6 class=\"text-primary\"><i class=\"bi bi-tags me-1\"></i>Extended Attributes</h6>' +\n\t\t\t\t'<table class=\"table table-sm\">';\n\t\t\t\n\t\t\tfor (const [key, value] of Object.entries(data.extended)) {\n\t\t\t\thtml += '<tr><td><strong>' + key + ':</strong></td><td>' + value + '</td></tr>';\n\t\t\t}\n\t\t\t\n\t\t\thtml += '</table>' +\n\t\t\t\t'</div>' +\n\t\t\t\t'</div>';\n\t\t}\n\t\t\n\t\treturn html;\n\t}\n\t\n\tfunction uploadFile() {\n\t\tconst modal = new bootstrap.Modal(document.getElementById('uploadFileModal'));\n\t\tmodal.show();\n\t}\n\t\n\tfunction toggleSelectAll() {\n\t\tconst selectAllCheckbox = document.getElementById('selectAll');\n\t\tconst checkboxes = document.querySelectorAll('.file-checkbox');\n\t\t\n\t\tcheckboxes.forEach(checkbox => {\n\t\t\tcheckbox.checked = selectAllCheckbox.checked;\n\t\t});\n\t\t\n\t\tupdateDeleteSelectedButton();\n\t}\n\t\n\tfunction updateDeleteSelectedButton() {\n\t\tconst checkboxes = document.querySelectorAll('.file-checkbox:checked');\n\t\tconst deleteBtn = document.getElementById('deleteSelectedBtn');\n\t\t\n\t\tif (checkboxes.length > 0) {\n\t\t\tdeleteBtn.style.display = 'inline-block';\n\t\t} else {\n\t\t\tdeleteBtn.style.display = 'none';\n\t\t}\n\t}\n\t\n\t// Helper function to format bytes\n\tfunction formatBytes(bytes) {\n\t\tif (bytes === 0) return '0 Bytes';\n\t\tconst k = 1024;\n\t\tconst sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];\n\t\tconst i = Math.floor(Math.log(bytes) / Math.log(k));\n\t\treturn parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n\t}\n\t\n\t// Helper function to format permissions in rwxrwxrwx format\n\tfunction formatPermissions(mode, isDirectory) {\n\t\t// Check if mode is already in rwxrwxrwx format (e.g., \"drwxr-xr-x\" or \"-rw-r--r--\")\n\t\tif (mode && (mode.startsWith('d') || mode.startsWith('-') || mode.startsWith('l')) && mode.length === 10) {\n\t\t\treturn mode; // Already formatted\n\t\t}\n\t\t\n\t\t// Convert to number - could be octal string or decimal\n\t\tlet permissions;\n\t\tif (typeof mode === 'string') {\n\t\t\t// Try parsing as octal first, then decimal\n\t\t\tif (mode.startsWith('0') && mode.length <= 4) {\n\t\t\t\tpermissions = parseInt(mode, 8);\n\t\t\t} else {\n\t\t\t\tpermissions = parseInt(mode, 10);\n\t\t\t}\n\t\t} else {\n\t\t\tpermissions = parseInt(mode, 10);\n\t\t}\n\t\t\n\t\tif (isNaN(permissions)) {\n\t\t\treturn isDirectory ? 'drwxr-xr-x' : '-rw-r--r--'; // Default fallback\n\t\t}\n\t\t\n\t\t// Handle Go's os.ModeDir conversion\n\t\t// Go's os.ModeDir is 0x80000000 (2147483648), but Unix S_IFDIR is 0o40000 (16384)\n\t\tlet fileType = '-';\n\t\t\n\t\t// Check for Go's os.ModeDir flag\n\t\tif (permissions & 0x80000000) {\n\t\t\tfileType = 'd';\n\t\t}\n\t\t// Check for standard Unix file type bits\n\t\telse if ((permissions & 0xF000) === 0x4000) { // S_IFDIR (0o40000)\n\t\t\tfileType = 'd';\n\t\t} else if ((permissions & 0xF000) === 0x8000) { // S_IFREG (0o100000)\n\t\t\tfileType = '-';\n\t\t} else if ((permissions & 0xF000) === 0xA000) { // S_IFLNK (0o120000)\n\t\t\tfileType = 'l';\n\t\t} else if ((permissions & 0xF000) === 0x2000) { // S_IFCHR (0o020000)\n\t\t\tfileType = 'c';\n\t\t} else if ((permissions & 0xF000) === 0x6000) { // S_IFBLK (0o060000)\n\t\t\tfileType = 'b';\n\t\t} else if ((permissions & 0xF000) === 0x1000) { // S_IFIFO (0o010000)\n\t\t\tfileType = 'p';\n\t\t} else if ((permissions & 0xF000) === 0xC000) { // S_IFSOCK (0o140000)\n\t\t\tfileType = 's';\n\t\t}\n\t\t// Fallback to isDirectory parameter if file type detection fails\n\t\telse if (isDirectory) {\n\t\t\tfileType = 'd';\n\t\t}\n\t\t\n\t\t// Permission bits (always use the lower 12 bits for permissions)\n\t\tconst owner = (permissions >> 6) & 7;\n\t\tconst group = (permissions >> 3) & 7;\n\t\tconst others = permissions & 7;\n\t\t\n\t\t// Convert number to rwx format\n\t\tfunction numToRwx(num) {\n\t\t\tconst r = (num & 4) ? 'r' : '-';\n\t\t\tconst w = (num & 2) ? 'w' : '-';\n\t\t\tconst x = (num & 1) ? 'x' : '-';\n\t\t\treturn r + w + x;\n\t\t}\n\t\t\n\t\treturn fileType + numToRwx(owner) + numToRwx(group) + numToRwx(others);\n\t}\n\t\n\tfunction exportFileList() {\n\t\t// Simple CSV export of file list\n\t\tconst rows = Array.from(document.querySelectorAll('#fileTable tbody tr')).map(row => {\n\t\t\tconst cells = row.querySelectorAll('td');\n\t\t\tif (cells.length > 1) {\n\t\t\t\treturn {\n\t\t\t\t\tname: cells[1].textContent.trim(),\n\t\t\t\t\tsize: cells[2].textContent.trim(),\n\t\t\t\t\ttype: cells[3].textContent.trim(),\n\t\t\t\t\tmodified: cells[4].textContent.trim(),\n\t\t\t\t\tpermissions: cells[5].textContent.trim()\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn null;\n\t\t}).filter(row => row !== null);\n\t\t\n\t\tconst csvContent = \"data:text/csv;charset=utf-8,\" + \n\t\t\t\"Name,Size,Type,Modified,Permissions\\n\" +\n\t\t\trows.map(r => '\"' + r.name + '\",\"' + r.size + '\",\"' + r.type + '\",\"' + r.modified + '\",\"' + r.permissions + '\"').join(\"\\n\");\n\t\t\n\t\tconst encodedUri = encodeURI(csvContent);\n\t\tconst link = document.createElement(\"a\");\n\t\tlink.setAttribute(\"href\", encodedUri);\n\t\tlink.setAttribute(\"download\", \"files.csv\");\n\t\tdocument.body.appendChild(link);\n\t\tlink.click();\n\t\tdocument.body.removeChild(link);\n\t}\n\t\n\t// Handle file checkbox changes\n\tdocument.addEventListener('change', function(e) {\n\t\tif (e.target.classList.contains('file-checkbox')) {\n\t\t\tupdateDeleteSelectedButton();\n\t\t}\n\t});\n\t</script>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "\"><!-- File List Preview --><div id=\"fileListPreview\" class=\"mb-3\" style=\"display: none;\"><label class=\"form-label\">Selected Files:</label><div id=\"selectedFilesList\" class=\"border rounded p-2 bg-light\"><!-- Files will be listed here --></div></div><!-- Upload Progress --><div class=\"mb-3\" id=\"uploadProgress\" style=\"display: none;\"><label class=\"form-label\">Upload Progress:</label><div class=\"progress mb-2\"><div class=\"progress-bar progress-bar-striped progress-bar-animated\" role=\"progressbar\" style=\"width: 0%\" aria-valuenow=\"0\" aria-valuemin=\"0\" aria-valuemax=\"100\">0%</div></div><div id=\"uploadStatus\" class=\"small text-muted\">Preparing upload...</div></div></form></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-primary\" onclick=\"submitUploadFile()\"><i class=\"bi bi-upload me-1\"></i>Upload Files</button></div></div></div></div><!-- JavaScript for file browser functionality --><script>\n\tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t// Format permissions in the main table\n\t\tdocument.querySelectorAll('.permissions-display').forEach(element => {\n\t\t\tconst mode = element.getAttribute('data-mode');\n\t\t\tconst isDirectory = element.getAttribute('data-is-directory') === 'true';\n\t\t\tif (mode) {\n\t\t\t\telement.textContent = formatPermissions(mode, isDirectory);\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Handle file browser action buttons (download, view, properties, export-metadata, delete)\n\t\tdocument.addEventListener('click', function(e) {\n\t\t\tconst button = e.target.closest('[data-action]');\n\t\t\tif (!button) return;\n\t\t\t\n\t\t\tconst action = button.getAttribute('data-action');\n\t\t\tif (action === 'copy-url') {\n\t\t\t\tconst url = button.getAttribute('data-url');\n\t\t\t\tif (url) adminCopyToClipboard(url);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst path = button.getAttribute('data-path');\n\n\t\t\tif (!path) return;\n\t\t\t\n\t\t\tswitch(action) {\n\t\t\t\tcase 'download':\n\t\t\t\t\tdownloadFile(path);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'view':\n\t\t\t\t\tviewFile(path);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'properties':\n\t\t\t\t\tshowFileProperties(path);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'export-metadata':\n\t\t\t\t\texportMetadata(path);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'delete':\n\t\t\t\t\tconst fileName = path.split('/').pop();\n\t\t\t\t\tshowDeleteConfirm(fileName, function() {\n\t\t\t\t\t\tdeleteFile(path);\n\t\t\t\t\t}, `Are you sure you want to delete \"${fileName}\"? This action cannot be undone.`);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Initialize file manager event handlers from admin.js\n\t\tif (typeof setupFileManagerEventHandlers === 'function') {\n\t\t\tsetupFileManagerEventHandlers();\n\t\t}\n\t});\n\t\n\t// File browser specific functions\n\tfunction downloadFile(path) {\n\t\t// Open download URL in new tab\n\t\twindow.open((window.__BASE_PATH__ || '') + '/api/files/download?path=' + encodeURIComponent(path), '_blank');\n\t}\n\n\tfunction viewFile(path) {\n\t\t// Open file viewer in new tab\n\t\twindow.open((window.__BASE_PATH__ || '') + '/api/files/view?path=' + encodeURIComponent(path), '_blank');\n\t}\n\n\tfunction exportMetadata(path) {\n\t\t// Download metadata as an fs.meta.load-compatible .meta.gz\n\t\twindow.open((window.__BASE_PATH__ || '') + '/api/files/metadata?path=' + encodeURIComponent(path), '_blank');\n\t}\n\n\tfunction showFileProperties(path) {\n\t\t// Fetch file properties and show in modal\n\t\tfetch((window.__BASE_PATH__ || '') + '/api/files/properties?path=' + encodeURIComponent(path))\n\t\t\t.then(response => response.json())\n\t\t\t.then(data => {\n\t\t\t\tif (data.error) {\n\t\t\t\t\tshowAlert('Error loading file properties: ' + data.error, 'error');\n\t\t\t\t} else {\n\t\t\t\t\tdisplayFileProperties(data);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error('Error fetching file properties:', error);\n\t\t\t\tshowAlert('Error loading file properties: ' + error.message, 'error');\n\t\t\t});\n\t}\n\t\n\tfunction displayFileProperties(data) {\n\t\t// Create a comprehensive modal for file properties\n\t\tconst modalHtml = '<div class=\"modal fade\" id=\"filePropertiesModal\" tabindex=\"-1\">' +\n\t\t\t'<div class=\"modal-dialog modal-lg\">' +\n\t\t\t'<div class=\"modal-content\">' +\n\t\t\t'<div class=\"modal-header\">' +\n\t\t\t'<h5 class=\"modal-title\"><i class=\"bi bi-info-circle me-2\"></i>Properties: ' + (data.name || 'Unknown') + '</h5>' +\n\t\t\t'<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\"></button>' +\n\t\t\t'</div>' +\n\t\t\t'<div class=\"modal-body\">' +\n\t\t\tcreateFilePropertiesContent(data) +\n\t\t\t'</div>' +\n\t\t\t'<div class=\"modal-footer\">' +\n\t\t\t'<button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button>' +\n\t\t\t'</div>' +\n\t\t\t'</div>' +\n\t\t\t'</div>' +\n\t\t\t'</div>';\n\t\t\n\t\t// Remove existing modal if present\n\t\tconst existingModal = document.getElementById('filePropertiesModal');\n\t\tif (existingModal) {\n\t\t\texistingModal.remove();\n\t\t}\n\t\t\n\t\t// Add modal to body and show\n\t\tdocument.body.insertAdjacentHTML('beforeend', modalHtml);\n\t\tconst modal = new bootstrap.Modal(document.getElementById('filePropertiesModal'));\n\t\tmodal.show();\n\t\t\n\t\t// Remove modal when hidden\n\t\tdocument.getElementById('filePropertiesModal').addEventListener('hidden.bs.modal', function() {\n\t\t\tthis.remove();\n\t\t});\n\t}\n\t\n\tfunction createFilePropertiesContent(data) {\n\t\tlet html = '<div class=\"row\">' +\n\t\t\t'<div class=\"col-12\">' +\n\t\t\t'<h6 class=\"text-primary\"><i class=\"bi bi-file-earmark me-1\"></i>Basic Information</h6>' +\n\t\t\t'<table class=\"table table-sm\">' +\n\t\t\t'<tr><td style=\"width: 120px;\"><strong>Name:</strong></td><td>' + (data.name || 'N/A') + '</td></tr>' +\n\t\t\t'<tr><td><strong>Full Path:</strong></td><td><code class=\"text-break\">' + (data.full_path || 'N/A') + '</code></td></tr>' +\n\t\t\t'<tr><td><strong>Type:</strong></td><td>' + (data.is_directory ? 'Directory' : 'File') + '</td></tr>';\n\t\t\n\t\tif (!data.is_directory) {\n\t\t\thtml += '<tr><td><strong>Size:</strong></td><td>' + (data.size_formatted || (data.size ? formatBytes(data.size) : 'N/A')) + '</td></tr>' +\n\t\t\t\t'<tr><td><strong>MIME Type:</strong></td><td>' + (data.mime_type || 'N/A') + '</td></tr>';\n\t\t\tif (data.object_url) {\n\t\t\t\thtml += '<tr><td><strong>Object URL:</strong></td><td><code class=\"text-break\">' + data.object_url + '</code>' +\n\t\t\t\t\t' <button type=\"button\" class=\"btn btn-outline-secondary btn-sm\" title=\"Copy S3 URL\" data-action=\"copy-url\" data-url=\"' + data.object_url + '\"><i class=\"bi bi-copy\"></i></button></td></tr>';\n\t\t\t}\n\t\t}\n\t\t\n\t\thtml += '</table>' +\n\t\t\t'</div>' +\n\t\t\t'</div>' +\n\t\t\t'<div class=\"row\">' +\n\t\t\t'<div class=\"col-md-6\">' +\n\t\t\t'<h6 class=\"text-primary\"><i class=\"bi bi-clock me-1\"></i>Timestamps</h6>' +\n\t\t\t'<table class=\"table table-sm\">';\n\t\t\n\t\tif (data.modified_time) {\n\t\t\thtml += '<tr><td><strong>Modified:</strong></td><td>' + data.modified_time + '</td></tr>';\n\t\t}\n\t\tif (data.created_time) {\n\t\t\thtml += '<tr><td><strong>Created:</strong></td><td>' + data.created_time + '</td></tr>';\n\t\t}\n\t\t\n\t\thtml += '</table>' +\n\t\t\t'</div>' +\n\t\t\t'<div class=\"col-md-6\">' +\n\t\t\t'<h6 class=\"text-primary\"><i class=\"bi bi-shield me-1\"></i>Permissions</h6>' +\n\t\t\t'<table class=\"table table-sm\">';\n\t\t\n\t\tif (data.file_mode) {\n\t\t\tconst rwxPermissions = formatPermissions(data.file_mode, data.is_directory);\n\t\t\thtml += '<tr><td><strong>Permissions:</strong></td><td><code>' + rwxPermissions + '</code></td></tr>';\n\t\t}\n\t\tif (data.uid !== undefined) {\n\t\t\thtml += '<tr><td><strong>User ID:</strong></td><td>' + data.uid + '</td></tr>';\n\t\t}\n\t\tif (data.gid !== undefined) {\n\t\t\thtml += '<tr><td><strong>Group ID:</strong></td><td>' + data.gid + '</td></tr>';\n\t\t}\n\t\t\n\t\thtml += '</table>' +\n\t\t\t'</div>' +\n\t\t\t'</div>';\n\t\t\n\t\t// Add advanced info\n\t\thtml += '<div class=\"row\">' +\n\t\t\t'<div class=\"col-12\">' +\n\t\t\t'<h6 class=\"text-primary\"><i class=\"bi bi-gear me-1\"></i>Advanced</h6>' +\n\t\t\t'<table class=\"table table-sm\">';\n\t\t\n\t\tif (data.chunk_count) {\n\t\t\thtml += '<tr><td style=\"width: 120px;\"><strong>Chunks:</strong></td><td>' + data.chunk_count + '</td></tr>';\n\t\t}\n\t\tif (data.ttl_formatted) {\n\t\t\thtml += '<tr><td><strong>TTL:</strong></td><td>' + data.ttl_formatted + '</td></tr>';\n\t\t}\n\t\t\n\t\thtml += '</table>' +\n\t\t\t'</div>' +\n\t\t\t'</div>';\n\t\t\n\t\t// Add chunk details if available (show top 5)\n\t\tif (data.chunks && data.chunks.length > 0) {\n\t\t\tconst chunksToShow = data.chunks.slice(0, 5);\n\t\t\thtml += '<div class=\"row mt-3\">' +\n\t\t\t\t'<div class=\"col-12\">' +\n\t\t\t\t'<h6 class=\"text-primary\"><i class=\"bi bi-puzzle me-1\"></i>Chunk Details' +\n\t\t\t\t(data.chunk_count > 5 ? ' (Top 5 of ' + data.chunk_count + ')' : ' (' + data.chunk_count + ')') +\n\t\t\t\t'</h6>' +\n\t\t\t\t'<div class=\"table-responsive\" style=\"max-height: 200px; overflow-y: auto;\">' +\n\t\t\t\t'<table class=\"table table-sm table-striped\">' +\n\t\t\t\t'<thead>' +\n\t\t\t\t'<tr>' +\n\t\t\t\t'<th>File ID</th>' +\n\t\t\t\t'<th>Offset</th>' +\n\t\t\t\t'<th>Size</th>' +\n\t\t\t\t'<th>ETag</th>' +\n\t\t\t\t'</tr>' +\n\t\t\t\t'</thead>' +\n\t\t\t\t'<tbody>';\n\t\t\t\n\t\t\tchunksToShow.forEach(chunk => {\n\t\t\t\thtml += '<tr>' +\n\t\t\t\t\t'<td><code class=\"small\">' + (chunk.file_id || 'N/A') + '</code></td>' +\n\t\t\t\t\t'<td>' + formatBytes(chunk.offset || 0) + '</td>' +\n\t\t\t\t\t'<td>' + formatBytes(chunk.size || 0) + '</td>' +\n\t\t\t\t\t'<td><code class=\"small\">' + (chunk.e_tag || 'N/A') + '</code></td>' +\n\t\t\t\t\t'</tr>';\n\t\t\t});\n\t\t\t\n\t\t\thtml += '</tbody>' +\n\t\t\t\t'</table>' +\n\t\t\t\t'</div>' +\n\t\t\t\t'</div>' +\n\t\t\t\t'</div>';\n\t\t}\n\t\t\n\t\t// Add extended attributes if present\n\t\tif (data.extended && Object.keys(data.extended).length > 0) {\n\t\t\thtml += '<div class=\"row\">' +\n\t\t\t\t'<div class=\"col-12\">' +\n\t\t\t\t'<h6 class=\"text-primary\"><i class=\"bi bi-tags me-1\"></i>Extended Attributes</h6>' +\n\t\t\t\t'<table class=\"table table-sm\">';\n\t\t\t\n\t\t\tfor (const [key, value] of Object.entries(data.extended)) {\n\t\t\t\thtml += '<tr><td><strong>' + key + ':</strong></td><td>' + value + '</td></tr>';\n\t\t\t}\n\t\t\t\n\t\t\thtml += '</table>' +\n\t\t\t\t'</div>' +\n\t\t\t\t'</div>';\n\t\t}\n\t\t\n\t\treturn html;\n\t}\n\t\n\tfunction uploadFile() {\n\t\tconst modal = new bootstrap.Modal(document.getElementById('uploadFileModal'));\n\t\tmodal.show();\n\t}\n\t\n\tfunction toggleSelectAll() {\n\t\tconst selectAllCheckbox = document.getElementById('selectAll');\n\t\tconst checkboxes = document.querySelectorAll('.file-checkbox');\n\t\t\n\t\tcheckboxes.forEach(checkbox => {\n\t\t\tcheckbox.checked = selectAllCheckbox.checked;\n\t\t});\n\t\t\n\t\tupdateDeleteSelectedButton();\n\t}\n\t\n\tfunction updateDeleteSelectedButton() {\n\t\tconst checkboxes = document.querySelectorAll('.file-checkbox:checked');\n\t\tconst deleteBtn = document.getElementById('deleteSelectedBtn');\n\t\t\n\t\tif (checkboxes.length > 0) {\n\t\t\tdeleteBtn.style.display = 'inline-block';\n\t\t} else {\n\t\t\tdeleteBtn.style.display = 'none';\n\t\t}\n\t}\n\t\n\t// Helper function to format bytes\n\tfunction formatBytes(bytes) {\n\t\tif (bytes === 0) return '0 Bytes';\n\t\tconst k = 1024;\n\t\tconst sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];\n\t\tconst i = Math.floor(Math.log(bytes) / Math.log(k));\n\t\treturn parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n\t}\n\t\n\t// Helper function to format permissions in rwxrwxrwx format\n\tfunction formatPermissions(mode, isDirectory) {\n\t\t// Check if mode is already in rwxrwxrwx format (e.g., \"drwxr-xr-x\" or \"-rw-r--r--\")\n\t\tif (mode && (mode.startsWith('d') || mode.startsWith('-') || mode.startsWith('l')) && mode.length === 10) {\n\t\t\treturn mode; // Already formatted\n\t\t}\n\t\t\n\t\t// Convert to number - could be octal string or decimal\n\t\tlet permissions;\n\t\tif (typeof mode === 'string') {\n\t\t\t// Try parsing as octal first, then decimal\n\t\t\tif (mode.startsWith('0') && mode.length <= 4) {\n\t\t\t\tpermissions = parseInt(mode, 8);\n\t\t\t} else {\n\t\t\t\tpermissions = parseInt(mode, 10);\n\t\t\t}\n\t\t} else {\n\t\t\tpermissions = parseInt(mode, 10);\n\t\t}\n\t\t\n\t\tif (isNaN(permissions)) {\n\t\t\treturn isDirectory ? 'drwxr-xr-x' : '-rw-r--r--'; // Default fallback\n\t\t}\n\t\t\n\t\t// Handle Go's os.ModeDir conversion\n\t\t// Go's os.ModeDir is 0x80000000 (2147483648), but Unix S_IFDIR is 0o40000 (16384)\n\t\tlet fileType = '-';\n\t\t\n\t\t// Check for Go's os.ModeDir flag\n\t\tif (permissions & 0x80000000) {\n\t\t\tfileType = 'd';\n\t\t}\n\t\t// Check for standard Unix file type bits\n\t\telse if ((permissions & 0xF000) === 0x4000) { // S_IFDIR (0o40000)\n\t\t\tfileType = 'd';\n\t\t} else if ((permissions & 0xF000) === 0x8000) { // S_IFREG (0o100000)\n\t\t\tfileType = '-';\n\t\t} else if ((permissions & 0xF000) === 0xA000) { // S_IFLNK (0o120000)\n\t\t\tfileType = 'l';\n\t\t} else if ((permissions & 0xF000) === 0x2000) { // S_IFCHR (0o020000)\n\t\t\tfileType = 'c';\n\t\t} else if ((permissions & 0xF000) === 0x6000) { // S_IFBLK (0o060000)\n\t\t\tfileType = 'b';\n\t\t} else if ((permissions & 0xF000) === 0x1000) { // S_IFIFO (0o010000)\n\t\t\tfileType = 'p';\n\t\t} else if ((permissions & 0xF000) === 0xC000) { // S_IFSOCK (0o140000)\n\t\t\tfileType = 's';\n\t\t}\n\t\t// Fallback to isDirectory parameter if file type detection fails\n\t\telse if (isDirectory) {\n\t\t\tfileType = 'd';\n\t\t}\n\t\t\n\t\t// Permission bits (always use the lower 12 bits for permissions)\n\t\tconst owner = (permissions >> 6) & 7;\n\t\tconst group = (permissions >> 3) & 7;\n\t\tconst others = permissions & 7;\n\t\t\n\t\t// Convert number to rwx format\n\t\tfunction numToRwx(num) {\n\t\t\tconst r = (num & 4) ? 'r' : '-';\n\t\t\tconst w = (num & 2) ? 'w' : '-';\n\t\t\tconst x = (num & 1) ? 'x' : '-';\n\t\t\treturn r + w + x;\n\t\t}\n\t\t\n\t\treturn fileType + numToRwx(owner) + numToRwx(group) + numToRwx(others);\n\t}\n\t\n\tfunction exportFileList() {\n\t\t// Simple CSV export of file list\n\t\tconst rows = Array.from(document.querySelectorAll('#fileTable tbody tr')).map(row => {\n\t\t\tconst cells = row.querySelectorAll('td');\n\t\t\tif (cells.length > 1) {\n\t\t\t\treturn {\n\t\t\t\t\tname: cells[1].textContent.trim(),\n\t\t\t\t\tsize: cells[2].textContent.trim(),\n\t\t\t\t\ttype: cells[3].textContent.trim(),\n\t\t\t\t\tmodified: cells[4].textContent.trim(),\n\t\t\t\t\tpermissions: cells[5].textContent.trim()\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn null;\n\t\t}).filter(row => row !== null);\n\t\t\n\t\tconst csvContent = \"data:text/csv;charset=utf-8,\" + \n\t\t\t\"Name,Size,Type,Modified,Permissions\\n\" +\n\t\t\trows.map(r => '\"' + r.name + '\",\"' + r.size + '\",\"' + r.type + '\",\"' + r.modified + '\",\"' + r.permissions + '\"').join(\"\\n\");\n\t\t\n\t\tconst encodedUri = encodeURI(csvContent);\n\t\tconst link = document.createElement(\"a\");\n\t\tlink.setAttribute(\"href\", encodedUri);\n\t\tlink.setAttribute(\"download\", \"files.csv\");\n\t\tdocument.body.appendChild(link);\n\t\tlink.click();\n\t\tdocument.body.removeChild(link);\n\t}\n\t\n\t// Handle file checkbox changes\n\tdocument.addEventListener('change', function(e) {\n\t\tif (e.target.classList.contains('file-checkbox')) {\n\t\t\tupdateDeleteSelectedButton();\n\t\t}\n\t});\n\t</script>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}diff --git a/weed/admin/view/app/groups_templ.go b/weed/admin/view/app/groups_templ.goindex e954b54eb9..e354ff0312 100644--- a/weed/admin/view/app/groups_templ.go+++ b/weed/admin/view/app/groups_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,10 +30,6 @@ func Groups(data dash.GroupsPageData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"container-fluid\"><!-- Page Header --><div class=\"d-sm-flex align-items-center justify-content-between mb-4\"><div><h1 class=\"h3 mb-0 text-gray-800\"><i class=\"bi bi-people-fill me-2\"></i>Groups</h1><p class=\"mb-0 text-muted\">Manage IAM groups for organizing users and policies</p></div><div class=\"d-flex gap-2\"><button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createGroupModal\"><i class=\"bi bi-plus me-1\"></i>Create Group</button></div></div><!-- Summary Cards --><div class=\"row mb-4\"><div class=\"col-xl-3 col-md-6 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total Groups</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {@@ -134,7 +131,7 @@ func Groups(data dash.GroupsPageData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var7 string- templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.ResolveAttributeValue(group.Name)+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templruntime.NewAttributeExpression(group.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/groups.templ`, Line: 113, Col: 79}}@@ -147,7 +144,7 @@ func Groups(data dash.GroupsPageData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var8 string- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.ResolveAttributeValue("View group " + group.Name)+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression("View group " + group.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/groups.templ`, Line: 115, Col: 90}}@@ -160,7 +157,7 @@ func Groups(data dash.GroupsPageData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var9 string- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.ResolveAttributeValue("View " + group.Name)+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression("View " + group.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/groups.templ`, Line: 116, Col: 79}}@@ -173,7 +170,7 @@ func Groups(data dash.GroupsPageData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var10 string- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue(group.Name)+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(group.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/groups.templ`, Line: 120, Col: 79}}@@ -186,7 +183,7 @@ func Groups(data dash.GroupsPageData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var11 string- templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue("Delete group " + group.Name)+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression("Delete group " + group.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/groups.templ`, Line: 122, Col: 92}}@@ -199,7 +196,7 @@ func Groups(data dash.GroupsPageData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var12 string- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.ResolveAttributeValue("Delete " + group.Name)+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templruntime.NewAttributeExpression("Delete " + group.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/groups.templ`, Line: 123, Col: 81}}@@ -227,7 +224,7 @@ func Groups(data dash.GroupsPageData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var13 string- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.ResolveAttributeValue(user)+ templ_7745c5c3_Var13, templ_7745c5c3_Err = templruntime.NewAttributeExpression(user).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/groups.templ`, Line: 189, Col: 67}}@@ -263,7 +260,7 @@ func Groups(data dash.GroupsPageData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var15 string- templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.ResolveAttributeValue(policy)+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression(policy).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/groups.templ`, Line: 206, Col: 69}}diff --git a/weed/admin/view/app/iceberg_catalog_templ.go b/weed/admin/view/app/iceberg_catalog_templ.goindex b3b21902a0..fe817baa30 100644--- a/weed/admin/view/app/iceberg_catalog_templ.go+++ b/weed/admin/view/app/iceberg_catalog_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -32,21 +33,17 @@ func IcebergCatalog(data dash.IcebergCatalogData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-snow me-2\"></i>Iceberg Catalog</h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var2 templ.SafeURL- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/object-store/s3tables/buckets"))+ var templ_7745c5c3_Var2 string+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/object-store/s3tables/buckets")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_catalog.templ`, Line: 18, Col: 62}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -54,12 +51,12 @@ func IcebergCatalog(data dash.IcebergCatalogData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var3 templ.SafeURL- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//localhost:%d/v1/config", data.IcebergPort)))+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//localhost:%d/v1/config", data.IcebergPort))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_catalog.templ`, Line: 23, Col: 109}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -68,7 +65,7 @@ func IcebergCatalog(data dash.IcebergCatalogData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var4 string- templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.IcebergPort))+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.IcebergPort)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_catalog.templ`, Line: 36, Col: 104}}@@ -209,12 +206,12 @@ func IcebergCatalog(data dash.IcebergCatalogData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var13 templ.SafeURL- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/iceberg/%s/namespaces", url.PathEscape(bucketName))))+ var templ_7745c5c3_Var13 string+ templ_7745c5c3_Var13, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/iceberg/%s/namespaces", url.PathEscape(bucketName)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_catalog.templ`, Line: 170, Col: 157}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -228,7 +225,7 @@ func IcebergCatalog(data dash.IcebergCatalogData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var14 string- templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.ResolveAttributeValue(parseErr.Error())+ templ_7745c5c3_Var14, templ_7745c5c3_Err = templruntime.NewAttributeExpression(parseErr.Error()).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_catalog.templ`, Line: 174, Col: 110}}@@ -251,12 +248,12 @@ func IcebergCatalog(data dash.IcebergCatalogData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var15 templ.SafeURL- templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/object-store/s3tables/buckets"))+ var templ_7745c5c3_Var15 string+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/object-store/s3tables/buckets")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_catalog.templ`, Line: 189, Col: 71}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}diff --git a/weed/admin/view/app/iceberg_namespaces_templ.go b/weed/admin/view/app/iceberg_namespaces_templ.goindex 0e69a0516c..7b66b4ae47 100644--- a/weed/admin/view/app/iceberg_namespaces_templ.go+++ b/weed/admin/view/app/iceberg_namespaces_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -31,21 +32,17 @@ func IcebergNamespaces(data dash.IcebergNamespacesData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><nav aria-label=\"breadcrumb\"><ol class=\"breadcrumb mb-0\"><li class=\"breadcrumb-item\"><a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var2 templ.SafeURL- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/object-store/iceberg"))+ var templ_7745c5c3_Var2 string+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/object-store/iceberg")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_namespaces.templ`, Line: 16, Col: 55}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -80,7 +77,7 @@ func IcebergNamespaces(data dash.IcebergNamespacesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var5 string- templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.BucketARN)+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.BucketARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_namespaces.templ`, Line: 35, Col: 70}}@@ -93,7 +90,7 @@ func IcebergNamespaces(data dash.IcebergNamespacesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var6 string- templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.CatalogName)+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.CatalogName).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_namespaces.templ`, Line: 35, Col: 109}}@@ -142,7 +139,7 @@ func IcebergNamespaces(data dash.IcebergNamespacesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var9 string- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.ResolveAttributeValue("#" + namespaceID)+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression("#" + namespaceID).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_namespaces.templ`, Line: 93, Col: 163}}@@ -155,7 +152,7 @@ func IcebergNamespaces(data dash.IcebergNamespacesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var10 string- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue(namespaceID)+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(namespaceID).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_namespaces.templ`, Line: 93, Col: 215}}@@ -180,12 +177,12 @@ func IcebergNamespaces(data dash.IcebergNamespacesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var12 templ.SafeURL- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/iceberg/%s/namespaces/%s/tables", url.PathEscape(data.CatalogName), url.PathEscape(ns.Name))))+ var templ_7745c5c3_Var12 string+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/iceberg/%s/namespaces/%s/tables", url.PathEscape(data.CatalogName), url.PathEscape(ns.Name)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_namespaces.templ`, Line: 96, Col: 194}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var12)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -194,7 +191,7 @@ func IcebergNamespaces(data dash.IcebergNamespacesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var13 string- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.ResolveAttributeValue(namespaceID)+ templ_7745c5c3_Var13, templ_7745c5c3_Err = templruntime.NewAttributeExpression(namespaceID).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_namespaces.templ`, Line: 100, Col: 79}}@@ -207,7 +204,7 @@ func IcebergNamespaces(data dash.IcebergNamespacesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var14 string- templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.ResolveAttributeValue(ns.Name)+ templ_7745c5c3_Var14, templ_7745c5c3_Err = templruntime.NewAttributeExpression(ns.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_namespaces.templ`, Line: 100, Col: 106}}@@ -220,7 +217,7 @@ func IcebergNamespaces(data dash.IcebergNamespacesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var15 string- templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.CatalogName)+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.CatalogName).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_namespaces.templ`, Line: 100, Col: 145}}@@ -307,12 +304,12 @@ func IcebergNamespaces(data dash.IcebergNamespacesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var20 templ.SafeURL- templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/iceberg/%s/namespaces/%s/tables", url.PathEscape(data.CatalogName), url.PathEscape(ns.Name))))+ var templ_7745c5c3_Var20 string+ templ_7745c5c3_Var20, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/iceberg/%s/namespaces/%s/tables", url.PathEscape(data.CatalogName), url.PathEscape(ns.Name)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_namespaces.templ`, Line: 156, Col: 197}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var20)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -332,7 +329,7 @@ func IcebergNamespaces(data dash.IcebergNamespacesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var21 string- templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.BucketARN)+ templ_7745c5c3_Var21, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.BucketARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_namespaces.templ`, Line: 193, Col: 98}}diff --git a/weed/admin/view/app/iceberg_table_data_templ.go b/weed/admin/view/app/iceberg_table_data_templ.goindex 761b37d2d6..dedf32439f 100644--- a/weed/admin/view/app/iceberg_table_data_templ.go+++ b/weed/admin/view/app/iceberg_table_data_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -32,21 +33,17 @@ func IcebergTableData(data dash.IcebergDataPreviewData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><nav aria-label=\"breadcrumb\"><ol class=\"breadcrumb mb-0\"><li class=\"breadcrumb-item\"><a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var2 templ.SafeURL- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/object-store/s3tables/buckets"))+ var templ_7745c5c3_Var2 string+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/object-store/s3tables/buckets")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_data.templ`, Line: 17, Col: 64}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -54,12 +51,12 @@ func IcebergTableData(data dash.IcebergDataPreviewData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var3 templ.SafeURL- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces", url.PathEscape(data.CatalogName))))+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces", url.PathEscape(data.CatalogName)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_data.templ`, Line: 22, Col: 125}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -80,12 +77,12 @@ func IcebergTableData(data dash.IcebergDataPreviewData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var5 templ.SafeURL- templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables", url.PathEscape(data.CatalogName), url.PathEscape(data.NamespaceName))))+ var templ_7745c5c3_Var5 string+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables", url.PathEscape(data.CatalogName), url.PathEscape(data.NamespaceName)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_data.templ`, Line: 27, Col: 171}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var5)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -106,12 +103,12 @@ func IcebergTableData(data dash.IcebergDataPreviewData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var7 templ.SafeURL- templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables/%s", url.PathEscape(data.CatalogName), url.PathEscape(data.NamespaceName), url.PathEscape(data.TableName))))+ var templ_7745c5c3_Var7 string+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables/%s", url.PathEscape(data.CatalogName), url.PathEscape(data.NamespaceName), url.PathEscape(data.TableName)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_data.templ`, Line: 32, Col: 206}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var7)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -132,12 +129,12 @@ func IcebergTableData(data dash.IcebergDataPreviewData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var9 templ.SafeURL- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables/%s", url.PathEscape(data.CatalogName), url.PathEscape(data.NamespaceName), url.PathEscape(data.TableName))))+ var templ_7745c5c3_Var9 string+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables/%s", url.PathEscape(data.CatalogName), url.PathEscape(data.NamespaceName), url.PathEscape(data.TableName)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_data.templ`, Line: 42, Col: 245}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -252,12 +249,12 @@ func IcebergTableData(data dash.IcebergDataPreviewData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var14 templ.SafeURL- templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, icebergTableDataURL(data.CatalogName, data.NamespaceName, data.TableName, snapshot.SnapshotID, data.RowLimit, "")))+ var templ_7745c5c3_Var14 string+ templ_7745c5c3_Var14, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, icebergTableDataURL(data.CatalogName, data.NamespaceName, data.TableName, snapshot.SnapshotID, data.RowLimit, ""))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_data.templ`, Line: 92, Col: 181}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var14)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -308,12 +305,12 @@ func IcebergTableData(data dash.IcebergDataPreviewData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var17 templ.SafeURL- templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables/%s", url.PathEscape(data.CatalogName), url.PathEscape(data.NamespaceName), url.PathEscape(data.TableName))))+ var templ_7745c5c3_Var17 string+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables/%s", url.PathEscape(data.CatalogName), url.PathEscape(data.NamespaceName), url.PathEscape(data.TableName)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_data.templ`, Line: 104, Col: 252}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -398,12 +395,12 @@ func IcebergTableData(data dash.IcebergDataPreviewData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var22 templ.SafeURL- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, icebergTableDataURL(data.CatalogName, data.NamespaceName, data.TableName, data.SnapshotID, data.RowLimit, "")))+ var templ_7745c5c3_Var22 string+ templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, icebergTableDataURL(data.CatalogName, data.NamespaceName, data.TableName, data.SnapshotID, data.RowLimit, ""))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_data.templ`, Line: 167, Col: 161}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -422,12 +419,12 @@ func IcebergTableData(data dash.IcebergDataPreviewData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var23 templ.SafeURL- templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, icebergTableDataURL(data.CatalogName, data.NamespaceName, data.TableName, data.SnapshotID, limit, data.SelectedFile)))+ var templ_7745c5c3_Var23 string+ templ_7745c5c3_Var23, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, icebergTableDataURL(data.CatalogName, data.NamespaceName, data.TableName, data.SnapshotID, limit, data.SelectedFile))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_data.templ`, Line: 173, Col: 174}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var23)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -453,12 +450,12 @@ func IcebergTableData(data dash.IcebergDataPreviewData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var25 templ.SafeURL- templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, icebergTableDataURL(data.CatalogName, data.NamespaceName, data.TableName, data.SnapshotID, limit, data.SelectedFile)))+ var templ_7745c5c3_Var25 string+ templ_7745c5c3_Var25, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, icebergTableDataURL(data.CatalogName, data.NamespaceName, data.TableName, data.SnapshotID, limit, data.SelectedFile))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_data.templ`, Line: 175, Col: 182}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var25)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -668,12 +665,12 @@ func IcebergTableData(data dash.IcebergDataPreviewData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var36 templ.SafeURL- templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, icebergTableDataURL(data.CatalogName, data.NamespaceName, data.TableName, data.SnapshotID, data.RowLimit, file.Path)))+ var templ_7745c5c3_Var36 string+ templ_7745c5c3_Var36, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, icebergTableDataURL(data.CatalogName, data.NamespaceName, data.TableName, data.SnapshotID, data.RowLimit, file.Path))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_data.templ`, Line: 249, Col: 193}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var36)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}diff --git a/weed/admin/view/app/iceberg_table_details_templ.go b/weed/admin/view/app/iceberg_table_details_templ.goindex 4dd7a53b47..e4bc8d6612 100644--- a/weed/admin/view/app/iceberg_table_details_templ.go+++ b/weed/admin/view/app/iceberg_table_details_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -31,21 +32,17 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><nav aria-label=\"breadcrumb\"><ol class=\"breadcrumb mb-0\"><li class=\"breadcrumb-item\"><a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var2 templ.SafeURL- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/object-store/s3tables/buckets"))+ var templ_7745c5c3_Var2 string+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/object-store/s3tables/buckets")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 16, Col: 64}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -53,12 +50,12 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var3 templ.SafeURL- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces", url.PathEscape(data.CatalogName))))+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces", url.PathEscape(data.CatalogName)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 21, Col: 125}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -79,12 +76,12 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var5 templ.SafeURL- templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables", url.PathEscape(data.CatalogName), url.PathEscape(data.NamespaceName))))+ var templ_7745c5c3_Var5 string+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables", url.PathEscape(data.CatalogName), url.PathEscape(data.NamespaceName)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 26, Col: 171}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var5)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -119,38 +116,56 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {return templ_7745c5c3_Err}if data.Format != "" {- var templ_7745c5c3_Var8 = []any{formatBadgeClass(data.Format), "ms-2 align-middle"}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var8...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<span class=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var9 string- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var8).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "\" title=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var10 string- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatBadgeTitle(data.Format))- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 33, Col: 111}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<span class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var8 = []any{formatBadgeClass(data.Format), "ms-2 align-middle"}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var8...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var9 string+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var8).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "\" title=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var10 string+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(formatBadgeTitle(data.Format)).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 33, Col: 111}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, ">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -163,30 +178,30 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</li></ol></nav></h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><a class=\"btn btn-sm btn-primary\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</li></ol></nav></h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><a class=\"btn btn-sm btn-primary\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var12 templ.SafeURL- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, icebergTableDataURL(data.CatalogName, data.NamespaceName, data.TableName, 0, 0, "")))+ var templ_7745c5c3_Var12 string+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, icebergTableDataURL(data.CatalogName, data.NamespaceName, data.TableName, 0, 0, ""))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 41, Col: 144}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var12)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "\"><i class=\"bi bi-table me-1\"></i>Browse Data</a></div><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-danger iceberg-delete-table-btn\" data-bucket-arn=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\"><i class=\"bi bi-table me-1\"></i>Browse Data</a></div><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-danger iceberg-delete-table-btn\" data-bucket-arn=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var13 string- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.BucketARN)+ templ_7745c5c3_Var13, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.BucketARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 46, Col: 113}}@@ -194,12 +209,12 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\" data-namespace=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\" data-namespace=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var14 string- templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.NamespaceName)+ templ_7745c5c3_Var14, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.NamespaceName).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 46, Col: 151}}@@ -207,12 +222,12 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\" data-table-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\" data-table-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var15 string- templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.TableName)+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.TableName).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 46, Col: 186}}@@ -220,12 +235,12 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\" data-catalog-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\" data-catalog-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var16 string- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.CatalogName)+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.CatalogName).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 46, Col: 225}}@@ -233,12 +248,12 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\"><i class=\"bi bi-trash me-1\"></i>Drop Table</button></div></div></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\"><i class=\"bi bi-trash me-1\"></i>Drop Table</button></div></div></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.MetadataError != "" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "<div class=\"alert alert-warning\"><i class=\"bi bi-exclamation-triangle me-2\"></i>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<div class=\"alert alert-warning\"><i class=\"bi bi-exclamation-triangle me-2\"></i>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -251,12 +266,12 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "</div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "<div class=\"row mb-4\"><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Data Files</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<div class=\"row mb-4\"><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Data Files</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -271,12 +286,12 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "-")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "-")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</div></div><div class=\"col-auto\"><i class=\"bi bi-copy icon-2x text-gray-300\"></i></div></div></div></div></div><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-success shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-success text-uppercase mb-1\">Total Size</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "</div></div><div class=\"col-auto\"><i class=\"bi bi-copy icon-2x text-gray-300\"></i></div></div></div></div></div><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-success shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-success text-uppercase mb-1\">Total Size</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -291,12 +306,12 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "-")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "-")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</div></div><div class=\"col-auto\"><i class=\"bi bi-database icon-2x text-gray-300\"></i></div></div></div></div></div><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-info shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-info text-uppercase mb-1\">Snapshots</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "</div></div><div class=\"col-auto\"><i class=\"bi bi-database icon-2x text-gray-300\"></i></div></div></div></div></div><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-info shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-info text-uppercase mb-1\">Snapshots</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -311,12 +326,12 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "-")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "-")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</div></div><div class=\"col-auto\"><i class=\"bi bi-clock-history icon-2x text-gray-300\"></i></div></div></div></div></div></div><div class=\"row\"><div class=\"col-lg-6 mb-4\"><div class=\"card shadow h-100\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-info-circle me-2\"></i>Table Metadata</h6></div><div class=\"card-body\"><table class=\"table table-sm\"><tbody><tr><th>Table ARN</th><td class=\"text-muted small\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</div></div><div class=\"col-auto\"><i class=\"bi bi-clock-history icon-2x text-gray-300\"></i></div></div></div></div></div></div><div class=\"row\"><div class=\"col-lg-6 mb-4\"><div class=\"card shadow h-100\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-info-circle me-2\"></i>Table Metadata</h6></div><div class=\"card-body\"><table class=\"table table-sm\"><tbody><tr><th>Table ARN</th><td class=\"text-muted small\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -329,7 +344,7 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</td></tr><tr><th>Format</th><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</td></tr><tr><th>Format</th><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -342,12 +357,12 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</td></tr><tr><th>Table Location</th><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "</td></tr><tr><th>Table Location</th><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.TableLocation != "" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<code class=\"small\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "<code class=\"small\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -360,22 +375,22 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</code>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "</code>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<span class=\"text-muted\">-</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "<span class=\"text-muted\">-</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</td></tr><tr><th>Metadata Location</th><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</td></tr><tr><th>Metadata Location</th><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.MetadataLocation != "" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "<code class=\"small\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<code class=\"small\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -388,17 +403,17 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "</code>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "</code>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "<span class=\"text-muted\">-</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<span class=\"text-muted\">-</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</td></tr><tr><th>Created</th><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</td></tr><tr><th>Created</th><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -413,12 +428,12 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "<span class=\"text-muted\">-</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<span class=\"text-muted\">-</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "</td></tr><tr><th>Modified</th><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</td></tr><tr><th>Modified</th><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -433,17 +448,17 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "<span class=\"text-muted\">-</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<span class=\"text-muted\">-</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "</td></tr></tbody></table></div></div></div><div class=\"col-lg-6 mb-4\"><div class=\"card shadow h-100\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-sliders me-2\"></i>Properties</h6></div><div class=\"card-body\"><table class=\"table table-sm\"><thead><tr><th>Key</th><th>Value</th></tr></thead> <tbody>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</td></tr></tbody></table></div></div></div><div class=\"col-lg-6 mb-4\"><div class=\"card shadow h-100\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-sliders me-2\"></i>Properties</h6></div><div class=\"card-body\"><table class=\"table table-sm\"><thead><tr><th>Key</th><th>Value</th></tr></thead> <tbody>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}for _, prop := range data.Properties {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "<tr><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "<tr><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -456,7 +471,7 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -469,28 +484,28 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "</td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "</td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if len(data.Properties) == 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "<tr><td colspan=\"2\" class=\"text-center text-muted\">No properties available.</td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<tr><td colspan=\"2\" class=\"text-center text-muted\">No properties available.</td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "</tbody></table></div></div></div></div><div class=\"row\"><div class=\"col-12 mb-4\"><div class=\"card shadow\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-list me-2\"></i>Schema ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</tbody></table></div></div></div></div><div class=\"row\"><div class=\"col-12 mb-4\"><div class=\"card shadow\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-list me-2\"></i>Schema ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.ObservedBy != "" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "<span class=\"badge bg-secondary ms-2\" title=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "<span class=\"badge bg-secondary ms-2\" title=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var29 string- templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.ResolveAttributeValue("reported by " + data.ObservedBy)+ templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.NewAttributeExpression("reported by " + data.ObservedBy).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 232, Col: 85}}@@ -498,7 +513,7 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "\">as seen ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "\">as seen ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -511,17 +526,17 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</h6></div><div class=\"card-body\"><div class=\"table-responsive\"><table class=\"table table-hover\"><thead><tr><th>ID</th><th>Name</th><th>Type</th><th>Required</th></tr></thead> <tbody>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "</h6></div><div class=\"card-body\"><div class=\"table-responsive\"><table class=\"table table-hover\"><thead><tr><th>ID</th><th>Name</th><th>Type</th><th>Required</th></tr></thead> <tbody>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}for _, field := range data.SchemaFields {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<tr><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "<tr><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -534,7 +549,7 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -547,7 +562,7 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</td><td><code>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "</td><td><code>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -560,33 +575,33 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "</code></td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "</code></td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if field.Required {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "<span class=\"badge bg-success\">Yes</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "<span class=\"badge bg-success\">Yes</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "<span class=\"badge bg-secondary\">No</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<span class=\"badge bg-secondary\">No</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "</td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "</td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if len(data.SchemaFields) == 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "<tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.Format != "" && data.Format != "ICEBERG" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "<td colspan=\"4\" class=\"text-center text-muted\">The catalog records where this ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<td colspan=\"4\" class=\"text-center text-muted\">The catalog records where this ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -599,7 +614,7 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, " table lives, not what is in it. Run a ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, " table lives, not what is in it. Run a ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -612,32 +627,32 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, " plugin worker and its schema appears here.</td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, " plugin worker and its schema appears here.</td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<td colspan=\"4\" class=\"text-center text-muted\">No schema available.</td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "<td colspan=\"4\" class=\"text-center text-muted\">No schema available.</td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "</tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "</tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "</tbody></table></div></div></div></div></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "</tbody></table></div></div></div></div></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if !isLanceFormat(data.Format) {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "<div class=\"row\"><div class=\"col-12 mb-4\"><div class=\"card shadow\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-layers me-2\"></i>Partitions</h6></div><div class=\"card-body\"><div class=\"table-responsive\"><table class=\"table table-hover\"><thead><tr><th>Name</th><th>Transform</th><th>Source ID</th><th>Field ID</th></tr></thead> <tbody>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "<div class=\"row\"><div class=\"col-12 mb-4\"><div class=\"card shadow\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-layers me-2\"></i>Partitions</h6></div><div class=\"card-body\"><div class=\"table-responsive\"><table class=\"table table-hover\"><thead><tr><th>Name</th><th>Transform</th><th>Source ID</th><th>Field ID</th></tr></thead> <tbody>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}for _, field := range data.PartitionFields {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "<tr><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "<tr><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -650,7 +665,7 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -663,7 +678,7 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -676,7 +691,7 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -689,29 +704,29 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "</td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "</td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if len(data.PartitionFields) == 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "<tr><td colspan=\"4\" class=\"text-center text-muted\">No partitions defined.</td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "<tr><td colspan=\"4\" class=\"text-center text-muted\">No partitions defined.</td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "</tbody></table></div></div></div></div></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "</tbody></table></div></div></div></div></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if !isLanceFormat(data.Format) {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "<div class=\"row\"><div class=\"col-12\"><div class=\"card shadow mb-4\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-clock-history me-2\"></i>Snapshot History</h6></div><div class=\"card-body\"><div class=\"table-responsive\"><table class=\"table table-hover\"><thead><tr><th>Snapshot ID</th><th>Timestamp</th><th>Operation</th><th>Manifest List</th></tr></thead> <tbody>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "<div class=\"row\"><div class=\"col-12\"><div class=\"card shadow mb-4\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-clock-history me-2\"></i>Snapshot History</h6></div><div class=\"card-body\"><div class=\"table-responsive\"><table class=\"table table-hover\"><thead><tr><th>Snapshot ID</th><th>Timestamp</th><th>Operation</th><th>Manifest List</th></tr></thead> <tbody>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}for _, snapshot := range data.Snapshots {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "<tr><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "<tr><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -724,12 +739,12 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if snapshot.Timestamp.IsZero() {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "<span class=\"text-muted\">-</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "<span class=\"text-muted\">-</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -744,7 +759,7 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -759,17 +774,17 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "<span class=\"text-muted\">-</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "<span class=\"text-muted\">-</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if snapshot.ManifestList != "" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "<code class=\"small\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "<code class=\"small\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -782,28 +797,28 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "</code>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "</code>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "<span class=\"text-muted\">-</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "<span class=\"text-muted\">-</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "</td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "</td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if len(data.Snapshots) == 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "<tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "<tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.Format != "" && data.Format != "ICEBERG" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "<td colspan=\"4\" class=\"text-center text-muted\">A ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "<td colspan=\"4\" class=\"text-center text-muted\">A ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -816,38 +831,38 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, " table keeps its own version history; the catalog does not mirror it here.</td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, " table keeps its own version history; the catalog does not mirror it here.</td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "<td colspan=\"4\" class=\"text-center text-muted\">No snapshots available.</td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "<td colspan=\"4\" class=\"text-center text-muted\">No snapshots available.</td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "</tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "</tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "</tbody></table></div></div></div></div></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "</tbody></table></div></div></div></div></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if isLanceFormat(data.Format) {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "<div class=\"row\"><div class=\"col-12 mb-4\"><div class=\"card shadow\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-clock-history me-2\"></i>Versions ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "<div class=\"row\"><div class=\"col-12 mb-4\"><div class=\"card shadow\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-clock-history me-2\"></i>Versions ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.ObservedBy != "" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "<span class=\"badge bg-secondary ms-2\" title=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "<span class=\"badge bg-secondary ms-2\" title=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var45 string- templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.ResolveAttributeValue("reported by " + data.ObservedBy)+ templ_7745c5c3_Var45, templ_7745c5c3_Err = templruntime.NewAttributeExpression("reported by " + data.ObservedBy).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_table_details.templ`, Line: 398, Col: 86}}@@ -855,7 +870,7 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "\">as seen ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "\">as seen ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -868,17 +883,17 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "</h6></div><div class=\"card-body\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "</h6></div><div class=\"card-body\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if len(data.Properties) > 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "<p class=\"text-muted mb-0\">A ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "<p class=\"text-muted mb-0\">A ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -891,22 +906,22 @@ func IcebergTableDetails(data dash.IcebergTableDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, " dataset keeps its own version history. What a worker last saw is listed under Properties above.</p>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, " dataset keeps its own version history. What a worker last saw is listed under Properties above.</p>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "<p class=\"text-muted mb-0\">No worker has reported on this table yet, so its version history is unknown here. It lives in the dataset either way.</p>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "<p class=\"text-muted mb-0\">No worker has reported on this table yet, so its version history is unknown here. It lives in the dataset either way.</p>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "</div></div></div></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "</div></div></div></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "<div class=\"modal fade\" id=\"deleteIcebergTableModal\" tabindex=\"-1\" aria-labelledby=\"deleteIcebergTableModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"deleteIcebergTableModalLabel\"><i class=\"bi bi-exclamation-triangle me-2 text-warning\"></i>Drop Table</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><p>Are you sure you want to drop the table <strong id=\"deleteIcebergTableName\"></strong>?</p><div class=\"mb-3\"><label for=\"deleteIcebergTableVersion\" class=\"form-label\">Version Token (optional)</label> <input type=\"text\" class=\"form-control\" id=\"deleteIcebergTableVersion\" placeholder=\"Version token\"></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-danger\" onclick=\"deleteIcebergTable()\"><i class=\"bi bi-trash me-1\"></i>Drop Table</button></div></div></div></div><script>\n\t\tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t\tinitIcebergTableDetails();\n\t\t});\n\t</script>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "<div class=\"modal fade\" id=\"deleteIcebergTableModal\" tabindex=\"-1\" aria-labelledby=\"deleteIcebergTableModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"deleteIcebergTableModalLabel\"><i class=\"bi bi-exclamation-triangle me-2 text-warning\"></i>Drop Table</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><p>Are you sure you want to drop the table <strong id=\"deleteIcebergTableName\"></strong>?</p><div class=\"mb-3\"><label for=\"deleteIcebergTableVersion\" class=\"form-label\">Version Token (optional)</label> <input type=\"text\" class=\"form-control\" id=\"deleteIcebergTableVersion\" placeholder=\"Version token\"></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-danger\" onclick=\"deleteIcebergTable()\"><i class=\"bi bi-trash me-1\"></i>Drop Table</button></div></div></div></div><script>\n\t\tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t\tinitIcebergTableDetails();\n\t\t});\n\t</script>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}diff --git a/weed/admin/view/app/iceberg_tables_templ.go b/weed/admin/view/app/iceberg_tables_templ.goindex a711b551ea..ca0947c23e 100644--- a/weed/admin/view/app/iceberg_tables_templ.go+++ b/weed/admin/view/app/iceberg_tables_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -31,21 +32,17 @@ func IcebergTables(data dash.IcebergTablesData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><nav aria-label=\"breadcrumb\"><ol class=\"breadcrumb mb-0\"><li class=\"breadcrumb-item\"><a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var2 templ.SafeURL- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/object-store/iceberg"))+ var templ_7745c5c3_Var2 string+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/object-store/iceberg")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_tables.templ`, Line: 16, Col: 55}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -53,12 +50,12 @@ func IcebergTables(data dash.IcebergTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var3 templ.SafeURL- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/iceberg/%s/namespaces", url.PathEscape(data.CatalogName))))+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/iceberg/%s/namespaces", url.PathEscape(data.CatalogName)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_tables.templ`, Line: 21, Col: 116}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -119,7 +116,7 @@ func IcebergTables(data dash.IcebergTablesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var8 string- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.BucketARN)+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.BucketARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_tables.templ`, Line: 41, Col: 66}}@@ -132,7 +129,7 @@ func IcebergTables(data dash.IcebergTablesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var9 string- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.NamespaceName)+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.NamespaceName).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_tables.templ`, Line: 41, Col: 104}}@@ -145,7 +142,7 @@ func IcebergTables(data dash.IcebergTablesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var10 string- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.CatalogName)+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.CatalogName).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_tables.templ`, Line: 41, Col: 143}}@@ -260,12 +257,12 @@ func IcebergTables(data dash.IcebergTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var18 templ.SafeURL- templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/iceberg/%s/namespaces/%s/tables/%s", url.PathEscape(data.CatalogName), url.PathEscape(data.NamespaceName), url.PathEscape(table.Name))))+ var templ_7745c5c3_Var18 string+ templ_7745c5c3_Var18, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/iceberg/%s/namespaces/%s/tables/%s", url.PathEscape(data.CatalogName), url.PathEscape(data.NamespaceName), url.PathEscape(table.Name)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_tables.templ`, Line: 127, Col: 239}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -274,7 +271,7 @@ func IcebergTables(data dash.IcebergTablesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var19 string- templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.BucketARN)+ templ_7745c5c3_Var19, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.BucketARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_tables.templ`, Line: 130, Col: 130}}@@ -287,7 +284,7 @@ func IcebergTables(data dash.IcebergTablesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var20 string- templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.NamespaceName)+ templ_7745c5c3_Var20, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.NamespaceName).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_tables.templ`, Line: 130, Col: 168}}@@ -300,7 +297,7 @@ func IcebergTables(data dash.IcebergTablesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var21 string- templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.ResolveAttributeValue(table.Name)+ templ_7745c5c3_Var21, templ_7745c5c3_Err = templruntime.NewAttributeExpression(table.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_tables.templ`, Line: 130, Col: 199}}@@ -313,7 +310,7 @@ func IcebergTables(data dash.IcebergTablesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var22 string- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.CatalogName)+ templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.CatalogName).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/iceberg_tables.templ`, Line: 130, Col: 238}}diff --git a/weed/admin/view/app/mount_clients_templ.go b/weed/admin/view/app/mount_clients_templ.goindex 89339ebbbd..5b4b89aebd 100644--- a/weed/admin/view/app/mount_clients_templ.go+++ b/weed/admin/view/app/mount_clients_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,10 +30,6 @@ func MountClients(data dash.MountClientsData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-plug me-2\"></i>Mount Clients</h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-outline-primary\" onclick=\"exportMountClients()\"><i class=\"bi bi-download me-1\"></i>Export</button></div></div></div><div id=\"mount-clients-content\"><!-- Summary Cards --><div class=\"row mb-4\"><div class=\"col-xl-12 col-md-12 mb-4\"><div class=\"card border-left-info shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-info text-uppercase mb-1\">Connected Mount Clients</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {diff --git a/weed/admin/view/app/object_store_users_templ.go b/weed/admin/view/app/object_store_users_templ.goindex ed478c0c4b..cb5fad0b2b 100644--- a/weed/admin/view/app/object_store_users_templ.go+++ b/weed/admin/view/app/object_store_users_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,10 +30,6 @@ func ObjectStoreUsers(data dash.ObjectStoreUsersData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"container-fluid\"><!-- Page Header --><div class=\"d-sm-flex align-items-center justify-content-between mb-4\"><div><h1 class=\"h3 mb-0 text-gray-800\"><i class=\"bi bi-people me-2\"></i>Object Store Users</h1><p class=\"mb-0 text-muted\">Manage S3 API users and their access credentials</p></div><div class=\"d-flex gap-2\"><button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createUserModal\"><i class=\"bi bi-plus me-1\"></i>Create User</button></div></div><!-- Summary Cards --><div class=\"row mb-4\"><div class=\"col-xl-3 col-md-6 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total Users</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {@@ -132,7 +129,7 @@ func ObjectStoreUsers(data dash.ObjectStoreUsersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var8 string- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.ResolveAttributeValue(user.Username)+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression(user.Username).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/object_store_users.templ`, Line: 140, Col: 121}}@@ -150,7 +147,7 @@ func ObjectStoreUsers(data dash.ObjectStoreUsersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var9 string- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.ResolveAttributeValue(user.Username)+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(user.Username).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/object_store_users.templ`, Line: 145, Col: 117}}@@ -169,7 +166,7 @@ func ObjectStoreUsers(data dash.ObjectStoreUsersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var10 string- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue(user.Username)+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(user.Username).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/object_store_users.templ`, Line: 151, Col: 126}}@@ -188,7 +185,7 @@ func ObjectStoreUsers(data dash.ObjectStoreUsersData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var11 string- templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue(user.Username)+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(user.Username).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/object_store_users.templ`, Line: 157, Col: 119}}diff --git a/weed/admin/view/app/plugin_lane_templ.go b/weed/admin/view/app/plugin_lane_templ.goindex 4743335e06..63394d1c1a 100644--- a/weed/admin/view/app/plugin_lane_templ.go+++ b/weed/admin/view/app/plugin_lane_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -28,10 +29,6 @@ func PluginLane(page string, lane string) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)currentPage := pageif currentPage == "" {@@ -42,7 +39,7 @@ func PluginLane(page string, lane string) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var2 string- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.ResolveAttributeValue(currentPage)+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(currentPage).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/plugin_lane.templ`, Line: 14, Col: 85}}@@ -55,7 +52,7 @@ func PluginLane(page string, lane string) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var3 string- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.ResolveAttributeValue(lane)+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(lane).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/plugin_lane.templ`, Line: 14, Col: 111}}@@ -93,12 +90,12 @@ func PluginLane(page string, lane string) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var6 templ.SafeURL- templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/plugin"))+ var templ_7745c5c3_Var6 string+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/plugin")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/plugin_lane.templ`, Line: 23, Col: 59}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var6)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}diff --git a/weed/admin/view/app/plugin_templ.go b/weed/admin/view/app/plugin_templ.goindex a9544c7eba..e6ac42967d 100644--- a/weed/admin/view/app/plugin_templ.go+++ b/weed/admin/view/app/plugin_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -24,10 +25,6 @@ func Plugin(page string, initialJob string, lane string) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)currentPage := pageif currentPage == "" {@@ -44,7 +41,7 @@ func Plugin(page string, initialJob string, lane string) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var2 string- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.ResolveAttributeValue(currentPage)+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(currentPage).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/plugin.templ`, Line: 16, Col: 80}}@@ -57,7 +54,7 @@ func Plugin(page string, initialJob string, lane string) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var3 string- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.ResolveAttributeValue(initialJob)+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(initialJob).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/plugin.templ`, Line: 16, Col: 111}}@@ -70,7 +67,7 @@ func Plugin(page string, initialJob string, lane string) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var4 string- templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.ResolveAttributeValue(currentLane)+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templruntime.NewAttributeExpression(currentLane).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/plugin.templ`, Line: 16, Col: 144}}diff --git a/weed/admin/view/app/policies_templ.go b/weed/admin/view/app/policies_templ.goindex 17feb303ff..ca42e1f8f5 100644--- a/weed/admin/view/app/policies_templ.go+++ b/weed/admin/view/app/policies_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,10 +30,6 @@ func Policies(data dash.PoliciesData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-shield me-2\"></i>IAM Policies</h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createPolicyModal\"><i class=\"bi bi-plus me-1\"></i>Create Policy</button></div></div></div><div id=\"policies-content\"><!-- Summary Cards --><div class=\"row mb-4\"><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total Policies</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {@@ -148,7 +145,7 @@ func Policies(data dash.PoliciesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var10 string- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue(policy.Name)+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(policy.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/policies.templ`, Line: 139, Col: 168}}@@ -161,7 +158,7 @@ func Policies(data dash.PoliciesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var11 string- templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue(policy.Name)+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(policy.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/policies.templ`, Line: 142, Col: 171}}@@ -174,7 +171,7 @@ func Policies(data dash.PoliciesData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var12 string- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.ResolveAttributeValue(policy.Name)+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templruntime.NewAttributeExpression(policy.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/policies.templ`, Line: 145, Col: 174}}diff --git a/weed/admin/view/app/policy_datalists_templ.go b/weed/admin/view/app/policy_datalists_templ.goindex b52dfcd7a1..647ed022d5 100644--- a/weed/admin/view/app/policy_datalists_templ.go+++ b/weed/admin/view/app/policy_datalists_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -32,10 +33,6 @@ func PolicyDatalists() templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<style>\n\t/* Groups a statement's Sid/Effect and its Action/Resource/Principal\n\t sections in the structured policy editor. Plain <fieldset>/<legend>\n\t render fine natively, but Bootstrap's form reset stretches <legend> to\n\t the fieldset's full width (float: left; width: 100%), which loses the\n\t usual \"notch in the border\" look and makes the label bar as wide as\n\t the card. Undo just that here so the legend hugs its content instead.\n\t*/\n\t.policy-stmt-fieldset {\n\t\tborder: 1px solid var(--bs-border-color, #dee2e6);\n\t\tborder-radius: 0.375rem;\n\t\tpadding: 0 0.75rem 0.75rem;\n\t\tmargin: 0.75rem 0 0;\n\t}\n\t.policy-stmt-legend {\n\t\tfloat: none;\n\t\twidth: auto;\n\t\tmax-width: 100%;\n\t\tpadding: 0 0.5rem;\n\t\tmargin: 0 0 0.25rem;\n\t\tfont-size: 0.8125rem;\n\t\tfont-weight: 600;\n\t\tcolor: var(--bs-secondary-color, #6c757d);\n\t}\n\t</style><!-- Datalist of suggested action names, shared by every policy editor on this page --><datalist id=\"policyActionSuggestions\">")if templ_7745c5c3_Err != nil {@@ -47,7 +44,7 @@ func PolicyDatalists() templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var2 string- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.ResolveAttributeValue(action)+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(action).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/policy_datalists.templ`, Line: 41, Col: 25}}@@ -70,7 +67,7 @@ func PolicyDatalists() templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var3 string- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.ResolveAttributeValue(action)+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(action).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/policy_datalists.templ`, Line: 49, Col: 25}}diff --git a/weed/admin/view/app/s3_buckets_templ.go b/weed/admin/view/app/s3_buckets_templ.goindex af761bbb1c..49d6bc3f18 100644--- a/weed/admin/view/app/s3_buckets_templ.go+++ b/weed/admin/view/app/s3_buckets_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,10 +30,6 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-box me-2\"></i>Object Store Buckets</h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><select class=\"form-select form-select-sm me-2\" id=\"pageSizeSelect\" onchange=\"changePageSize()\" style=\"width: auto;\"><option value=\"50\"")if templ_7745c5c3_Err != nil {@@ -162,12 +159,12 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var5 templ.SafeURL- templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/files?path=/buckets/%s", bucket.Name)))+ var templ_7745c5c3_Var5 string+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/files?path=/buckets/%s", bucket.Name))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 162, Col: 124}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var5)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -293,25 +290,43 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var12 = []any{fmt.Sprintf("badge bg-%s", getQuotaStatusColor(bucket.LogicalSize, bucket.Quota, bucket.QuotaEnabled))}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var12...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<span class=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var13 string- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var12).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<span class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var12 = []any{fmt.Sprintf("badge bg-%s", getQuotaStatusColor(bucket.LogicalSize, bucket.Quota, bucket.QuotaEnabled))}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var12...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var13 string+ templ_7745c5c3_Var13, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var12).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, ">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -324,12 +339,12 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</span> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</span> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if bucket.QuotaEnabled {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "<div class=\"small text-muted\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<div class=\"small text-muted\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -342,52 +357,52 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "</div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "<div class=\"small text-muted\">Disabled</div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<div class=\"small text-muted\">Disabled</div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "</div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "<span class=\"text-muted\">No quota</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "<span class=\"text-muted\">No quota</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if bucket.VersioningStatus == "Enabled" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<span class=\"badge bg-success\"><i class=\"bi bi-check me-1\"></i>Enabled</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "<span class=\"badge bg-success\"><i class=\"bi bi-check me-1\"></i>Enabled</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else if bucket.VersioningStatus == "Suspended" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "<span class=\"badge bg-warning\"><i class=\"bi bi-pause me-1\"></i>Suspended</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<span class=\"badge bg-warning\"><i class=\"bi bi-pause me-1\"></i>Suspended</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<span class=\"text-muted\">Not configured</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "<span class=\"text-muted\">Not configured</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if bucket.ObjectLockEnabled {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "<div><span class=\"badge bg-warning\"><i class=\"bi bi-lock me-1\"></i>Enabled</span><div class=\"small text-muted\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "<div><span class=\"badge bg-warning\"><i class=\"bi bi-lock me-1\"></i>Enabled</span><div class=\"small text-muted\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -400,7 +415,7 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, " • ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, " • ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -413,27 +428,27 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</div></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "</div></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<span class=\"text-muted\">Not configured</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "<span class=\"text-muted\">Not configured</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if bucket.LifecycleRuleCount > 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "<div><button type=\"button\" class=\"badge bg-primary border-0 lifecycle-btn\" data-bucket-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "<div><button type=\"button\" class=\"badge bg-primary border-0 lifecycle-btn\" data-bucket-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var18 string- templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.Name)+ templ_7745c5c3_Var18, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 241, Col: 93}}@@ -441,12 +456,12 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "\" title=\"View Lifecycle Rules\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "\" title=\"View Lifecycle Rules\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if bucket.LifecycleRuleCount == 1 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "1 rule")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "1 rule")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -461,12 +476,12 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "</button> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "</button> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if bucket.LifecycleEnabledCount < bucket.LifecycleRuleCount {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<div class=\"small text-muted\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<div class=\"small text-muted\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -479,32 +494,32 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "</div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "</div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "</div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<span class=\"text-muted\">Not configured</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "<span class=\"text-muted\">Not configured</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if bucket.PolicyStatementCount > 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<button type=\"button\" class=\"badge bg-primary border-0 policy-btn\" data-bucket-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "<button type=\"button\" class=\"badge bg-primary border-0 policy-btn\" data-bucket-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var21 string- templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.Name)+ templ_7745c5c3_Var21, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 262, Col: 89}}@@ -512,12 +527,12 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "\" title=\"View Bucket Policy\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "\" title=\"View Bucket Policy\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if bucket.PolicyStatementCount == 1 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "1 statement")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "1 statement")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -532,35 +547,35 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "</button>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "</button>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "<span class=\"text-muted\">Not configured</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "<span class=\"text-muted\">Not configured</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "</td><td><div class=\"btn-group btn-group-sm\" role=\"group\"><a href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "</td><td><div class=\"btn-group btn-group-sm\" role=\"group\"><a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var23 templ.SafeURL- templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/files?path=/buckets/%s", bucket.Name)))+ var templ_7745c5c3_Var23 string+ templ_7745c5c3_Var23, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/files?path=/buckets/%s", bucket.Name))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 276, Col: 128}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var23)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "\" class=\"btn btn-outline-success btn-sm\" title=\"Browse Files\"><i class=\"bi bi-folder2-open\"></i></a> <button type=\"button\" class=\"btn btn-outline-primary btn-sm view-details-btn\" data-bucket-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "\" class=\"btn btn-outline-success btn-sm\" title=\"Browse Files\"><i class=\"bi bi-folder2-open\"></i></a> <button type=\"button\" class=\"btn btn-outline-primary btn-sm view-details-btn\" data-bucket-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var24 string- templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.Name)+ templ_7745c5c3_Var24, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 283, Col: 89}}@@ -568,12 +583,12 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "\" title=\"View Details\"><i class=\"bi bi-eye\"></i></button> <button type=\"button\" class=\"btn btn-outline-secondary btn-sm lifecycle-btn\" data-bucket-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "\" title=\"View Details\"><i class=\"bi bi-eye\"></i></button> <button type=\"button\" class=\"btn btn-outline-secondary btn-sm lifecycle-btn\" data-bucket-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var25 string- templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.Name)+ templ_7745c5c3_Var25, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 289, Col: 89}}@@ -581,12 +596,12 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "\" title=\"Lifecycle Rules\"><i class=\"bi bi-recycle\"></i></button> <button type=\"button\" class=\"btn btn-outline-info btn-sm policy-btn\" data-bucket-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "\" title=\"Lifecycle Rules\"><i class=\"bi bi-recycle\"></i></button> <button type=\"button\" class=\"btn btn-outline-info btn-sm policy-btn\" data-bucket-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var26 string- templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.Name)+ templ_7745c5c3_Var26, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 295, Col: 89}}@@ -594,12 +609,12 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "\" title=\"Bucket Policy\"><i class=\"bi bi-shield\"></i></button> <button type=\"button\" class=\"btn btn-outline-info btn-sm owner-btn\" data-bucket-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "\" title=\"Bucket Policy\"><i class=\"bi bi-shield\"></i></button> <button type=\"button\" class=\"btn btn-outline-info btn-sm owner-btn\" data-bucket-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var27 string- templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.Name)+ templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 301, Col: 89}}@@ -607,12 +622,12 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "\" data-current-owner=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "\" data-current-owner=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var28 string- templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.Owner)+ templ_7745c5c3_Var28, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.Owner).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 302, Col: 92}}@@ -620,12 +635,12 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "\" title=\"Manage Owner\"><i class=\"bi bi-person-gear\"></i></button> <button type=\"button\" class=\"btn btn-outline-warning btn-sm quota-btn\" data-bucket-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "\" title=\"Manage Owner\"><i class=\"bi bi-person-gear\"></i></button> <button type=\"button\" class=\"btn btn-outline-warning btn-sm quota-btn\" data-bucket-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var29 string- templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.Name)+ templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 308, Col: 89}}@@ -633,12 +648,12 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "\" data-current-quota=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "\" data-current-quota=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var30 string- templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", getQuotaInMB(bucket.Quota)))+ templ_7745c5c3_Var30, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", getQuotaInMB(bucket.Quota))).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 309, Col: 125}}@@ -646,12 +661,12 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "\" data-quota-enabled=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "\" data-quota-enabled=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var31 string- templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%t", bucket.QuotaEnabled))+ templ_7745c5c3_Var31, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%t", bucket.QuotaEnabled)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 310, Col: 118}}@@ -659,12 +674,12 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "\" title=\"Manage Quota\"><i class=\"bi bi-speedometer2\"></i></button> <button type=\"button\" class=\"btn btn-outline-danger btn-sm delete-bucket-btn\" data-bucket-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "\" title=\"Manage Quota\"><i class=\"bi bi-speedometer2\"></i></button> <button type=\"button\" class=\"btn btn-outline-danger btn-sm delete-bucket-btn\" data-bucket-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var32 string- templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.Name)+ templ_7745c5c3_Var32, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 316, Col: 89}}@@ -672,23 +687,23 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "\" title=\"Delete Bucket\"><i class=\"bi bi-trash\"></i></button></div></td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "\" title=\"Delete Bucket\"><i class=\"bi bi-trash\"></i></button></div></td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if len(data.Buckets) == 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "<tr><td colspan=\"11\" class=\"text-center text-muted py-4\"><i class=\"bi bi-box icon-3x mb-3 text-muted\"></i><div><h5>No Object Store buckets found</h5><p>Create your first bucket to get started with S3 storage.</p><button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createBucketModal\"><i class=\"bi bi-plus me-1\"></i>Create Bucket</button></div></td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "<tr><td colspan=\"11\" class=\"text-center text-muted py-4\"><i class=\"bi bi-box icon-3x mb-3 text-muted\"></i><div><h5>No Object Store buckets found</h5><p>Create your first bucket to get started with S3 storage.</p><button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createBucketModal\"><i class=\"bi bi-plus me-1\"></i>Create Bucket</button></div></td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "</tbody></table></div><!-- Pagination Controls -->")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "</tbody></table></div><!-- Pagination Controls -->")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.TotalPages > 1 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "<div class=\"d-flex justify-content-between align-items-center mt-3\"><small class=\"text-muted\">Showing ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "<div class=\"d-flex justify-content-between align-items-center mt-3\"><small class=\"text-muted\">Showing ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -701,7 +716,7 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, " to ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, " to ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -714,7 +729,7 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, " of ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, " of ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -727,17 +742,17 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, " buckets</small><nav aria-label=\"Buckets pagination\"><ul class=\"pagination pagination-sm mb-0\"><!-- Previous Button -->")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, " buckets</small><nav aria-label=\"Buckets pagination\"><ul class=\"pagination pagination-sm mb-0\"><!-- Previous Button -->")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.CurrentPage > 1 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "<li class=\"page-item\"><a class=\"page-link pagination-link\" href=\"#\" data-page=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "<li class=\"page-item\"><a class=\"page-link pagination-link\" href=\"#\" data-page=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var36 string- templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.CurrentPage-1))+ templ_7745c5c3_Var36, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.CurrentPage-1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 355, Col: 142}}@@ -745,23 +760,23 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "\"><i class=\"bi bi-chevron-left\"></i></a></li>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "\"><i class=\"bi bi-chevron-left\"></i></a></li>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "<li class=\"page-item disabled\"><span class=\"page-link\"><i class=\"bi bi-chevron-left\"></i></span></li>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "<li class=\"page-item disabled\"><span class=\"page-link\"><i class=\"bi bi-chevron-left\"></i></span></li>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "<!-- Page Numbers -->")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "<!-- Page Numbers -->")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}for i := maxInt(1, data.CurrentPage-2); i <= minInt(data.TotalPages, data.CurrentPage+2); i++ {if i == data.CurrentPage {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "<li class=\"page-item active\"><span class=\"page-link\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "<li class=\"page-item active\"><span class=\"page-link\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -774,17 +789,17 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "</span></li>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "</span></li>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "<li class=\"page-item\"><a class=\"page-link pagination-link\" href=\"#\" data-page=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "<li class=\"page-item\"><a class=\"page-link pagination-link\" href=\"#\" data-page=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var38 string- templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", i))+ templ_7745c5c3_Var38, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", i)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 375, Col: 129}}@@ -792,7 +807,7 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -805,23 +820,23 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "</a></li>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "</a></li>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "<!-- Next Button -->")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "<!-- Next Button -->")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.CurrentPage < data.TotalPages {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "<li class=\"page-item\"><a class=\"page-link pagination-link\" href=\"#\" data-page=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "<li class=\"page-item\"><a class=\"page-link pagination-link\" href=\"#\" data-page=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var40 string- templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.CurrentPage+1))+ templ_7745c5c3_Var40, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.CurrentPage+1)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3_buckets.templ`, Line: 383, Col: 142}}@@ -829,22 +844,22 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "\"><i class=\"bi bi-chevron-right\"></i></a></li>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "\"><i class=\"bi bi-chevron-right\"></i></a></li>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "<li class=\"page-item disabled\"><span class=\"page-link\"><i class=\"bi bi-chevron-right\"></i></span></li>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "<li class=\"page-item disabled\"><span class=\"page-link\"><i class=\"bi bi-chevron-right\"></i></span></li>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "</ul></nav></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "</ul></nav></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "</div></div></div></div><!-- Last Updated --><div class=\"row\"><div class=\"col-12\"><small class=\"text-muted\"><i class=\"bi bi-clock me-1\"></i> Last updated: ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "</div></div></div></div><!-- Last Updated --><div class=\"row\"><div class=\"col-12\"><small class=\"text-muted\"><i class=\"bi bi-clock me-1\"></i> Last updated: ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -857,7 +872,7 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "</small></div></div></div><!-- Create Bucket Modal --><div class=\"modal fade\" id=\"createBucketModal\" tabindex=\"-1\" aria-labelledby=\"createBucketModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"createBucketModalLabel\"><i class=\"bi bi-plus me-2\"></i>Create New S3 Bucket</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"createBucketForm\"><div class=\"modal-body\"><div class=\"mb-3\"><label for=\"bucketName\" class=\"form-label\">Bucket Name</label> <input type=\"text\" class=\"form-control\" id=\"bucketName\" name=\"name\" placeholder=\"my-bucket-name\" required pattern=\"[a-z0-9.-]+\" title=\"Bucket name must contain only lowercase letters, numbers, dots, and hyphens\"><div class=\"form-text\">Bucket names must be between 3 and 63 characters, contain only lowercase letters, numbers, dots, and hyphens.</div></div><div class=\"mb-3\"><label for=\"bucketOwner\" class=\"form-label\">Owner (Optional)</label> <select class=\"form-select\" id=\"bucketOwner\" name=\"owner\"><option value=\"\">No owner (admin-only access)</option><!-- Options will be populated dynamically when modal opens --></select><div class=\"form-text\">The S3 identity that owns this bucket. Non-admin users can only access buckets they own.</div></div><div class=\"mb-3\"><div class=\"form-check\"><input class=\"form-check-input\" type=\"checkbox\" id=\"enableQuota\" name=\"quota_enabled\"> <label class=\"form-check-label\" for=\"enableQuota\">Enable Storage Quota</label></div></div><div class=\"mb-3\" id=\"quotaSettings\" style=\"display: none;\"><div class=\"row\"><div class=\"col-md-8\"><label for=\"quotaSize\" class=\"form-label\">Quota Size</label> <input type=\"number\" class=\"form-control\" id=\"quotaSize\" name=\"quota_size\" placeholder=\"1024\" min=\"1\" step=\"1\"></div><div class=\"col-md-4\"><label for=\"quotaUnit\" class=\"form-label\">Unit</label> <select class=\"form-select\" id=\"quotaUnit\" name=\"quota_unit\"><option value=\"MB\" selected>MB</option> <option value=\"GB\">GB</option> <option value=\"TB\">TB</option></select></div></div><div class=\"form-text\">Set the maximum storage size for this bucket.</div></div><div class=\"mb-3\"><div class=\"form-check\"><input class=\"form-check-input\" type=\"checkbox\" id=\"enableVersioning\" name=\"versioning_enabled\"> <label class=\"form-check-label\" for=\"enableVersioning\">Enable Object Versioning</label></div><div class=\"form-text\">Keep multiple versions of objects in this bucket.</div></div><div class=\"mb-3\"><div class=\"form-check\"><input class=\"form-check-input\" type=\"checkbox\" id=\"enableObjectLock\" name=\"object_lock_enabled\"> <label class=\"form-check-label\" for=\"enableObjectLock\">Enable Object Lock</label></div><div class=\"form-text\">Prevent objects from being deleted or overwritten for a specified period. Automatically enables versioning.</div></div><div class=\"mb-3\" id=\"objectLockSettings\" style=\"display: none;\"><div class=\"row\"><div class=\"col-md-6\"><label for=\"objectLockMode\" class=\"form-label\">Object Lock Mode</label> <select class=\"form-select\" id=\"objectLockMode\" name=\"object_lock_mode\"><option value=\"GOVERNANCE\" selected>Governance</option> <option value=\"COMPLIANCE\">Compliance</option></select><div class=\"form-text\">Governance allows override with special permissions, Compliance is immutable.</div></div><div class=\"col-md-6\"><div class=\"form-check mb-3\"><input class=\"form-check-input\" type=\"checkbox\" id=\"setDefaultRetention\" name=\"set_default_retention\"> <label class=\"form-check-label\" for=\"setDefaultRetention\">Set Default Retention</label><div class=\"form-text\">Apply default retention to all new objects in this bucket.</div></div><div id=\"defaultRetentionSettings\" style=\"display: none;\"><label for=\"objectLockDuration\" class=\"form-label\">Default Retention (days)</label> <input type=\"number\" class=\"form-control\" id=\"objectLockDuration\" name=\"object_lock_duration\" placeholder=\"30\" min=\"1\" max=\"36500\" step=\"1\"><div class=\"form-text\">Default retention period for new objects (1-36500 days).</div></div></div></div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"submit\" class=\"btn btn-primary\"><i class=\"bi bi-plus me-1\"></i>Create Bucket</button></div></form></div></div></div><!-- Delete Confirmation Modal --><div class=\"modal fade\" id=\"deleteBucketModal\" tabindex=\"-1\" aria-labelledby=\"deleteBucketModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"deleteBucketModalLabel\"><i class=\"bi bi-exclamation-triangle me-2 text-warning\"></i>Delete Bucket</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><p>Are you sure you want to delete the bucket <strong id=\"deleteBucketName\"></strong>?</p><div class=\"alert alert-warning\"><i class=\"bi bi-exclamation-triangle me-2\"></i> <strong>Warning:</strong> This action cannot be undone. All objects in the bucket will be permanently deleted.</div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-danger\" onclick=\"deleteBucket()\"><i class=\"bi bi-trash me-1\"></i>Delete Bucket</button></div></div></div></div><!-- Manage Quota Modal --><div class=\"modal fade\" id=\"manageQuotaModal\" tabindex=\"-1\" aria-labelledby=\"manageQuotaModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"manageQuotaModalLabel\"><i class=\"bi bi-speedometer2 me-2\"></i>Manage Bucket Quota</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"quotaForm\"><div class=\"modal-body\"><div class=\"mb-3\"><label class=\"form-label\">Bucket Name</label> <input type=\"text\" class=\"form-control\" id=\"quotaBucketName\" readonly></div><div class=\"mb-3\"><div class=\"form-check\"><input class=\"form-check-input\" type=\"checkbox\" id=\"quotaEnabled\" name=\"quota_enabled\"> <label class=\"form-check-label\" for=\"quotaEnabled\">Enable Storage Quota</label></div></div><div class=\"mb-3\" id=\"quotaSizeSettings\"><div class=\"row\"><div class=\"col-md-8\"><label for=\"quotaSizeMB\" class=\"form-label\">Quota Size</label> <input type=\"number\" class=\"form-control\" id=\"quotaSizeMB\" name=\"quota_size\" placeholder=\"1024\" min=\"0\" step=\"1\"></div><div class=\"col-md-4\"><label for=\"quotaUnitMB\" class=\"form-label\">Unit</label> <select class=\"form-select\" id=\"quotaUnitMB\" name=\"quota_unit\"><option value=\"MB\" selected>MB</option> <option value=\"GB\">GB</option> <option value=\"TB\">TB</option></select></div></div><div class=\"form-text\">Set the maximum storage size for this bucket. Set to 0 to remove quota.</div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"submit\" class=\"btn btn-warning\"><i class=\"bi bi-floppy me-1\"></i>Update Quota</button></div></form></div></div></div><!-- Bucket Details Modal --><div class=\"modal fade\" id=\"bucketDetailsModal\" tabindex=\"-1\" aria-labelledby=\"bucketDetailsModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-lg\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"bucketDetailsModalLabel\"><i class=\"bi bi-box me-2\"></i>Bucket Details</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><div id=\"bucketDetailsContent\"><div class=\"text-center py-4\"><div class=\"spinner-border text-primary\" role=\"status\"><span class=\"visually-hidden\">Loading...</span></div><div class=\"mt-2\">Loading bucket details...</div></div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button></div></div></div></div><!-- Bucket Lifecycle Modal --><div class=\"modal fade\" id=\"bucketLifecycleModal\" tabindex=\"-1\" aria-labelledby=\"bucketLifecycleModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-xl\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"bucketLifecycleModalLabel\"><i class=\"bi bi-recycle me-2\"></i>Lifecycle</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><div id=\"bucketLifecycleContent\"></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-outline-danger me-auto\" id=\"lifecycleDeleteAllBtn\"><i class=\"bi bi-trash me-1\"></i>Delete all rules</button> <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-primary\" id=\"lifecycleSaveAllBtn\"><i class=\"bi bi-floppy me-1\"></i>Save</button></div></div></div></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "</small></div></div></div><!-- Create Bucket Modal --><div class=\"modal fade\" id=\"createBucketModal\" tabindex=\"-1\" aria-labelledby=\"createBucketModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"createBucketModalLabel\"><i class=\"bi bi-plus me-2\"></i>Create New S3 Bucket</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"createBucketForm\"><div class=\"modal-body\"><div class=\"mb-3\"><label for=\"bucketName\" class=\"form-label\">Bucket Name</label> <input type=\"text\" class=\"form-control\" id=\"bucketName\" name=\"name\" placeholder=\"my-bucket-name\" required pattern=\"[a-z0-9.-]+\" title=\"Bucket name must contain only lowercase letters, numbers, dots, and hyphens\"><div class=\"form-text\">Bucket names must be between 3 and 63 characters, contain only lowercase letters, numbers, dots, and hyphens.</div></div><div class=\"mb-3\"><label for=\"bucketOwner\" class=\"form-label\">Owner (Optional)</label> <select class=\"form-select\" id=\"bucketOwner\" name=\"owner\"><option value=\"\">No owner (admin-only access)</option><!-- Options will be populated dynamically when modal opens --></select><div class=\"form-text\">The S3 identity that owns this bucket. Non-admin users can only access buckets they own.</div></div><div class=\"mb-3\"><div class=\"form-check\"><input class=\"form-check-input\" type=\"checkbox\" id=\"enableQuota\" name=\"quota_enabled\"> <label class=\"form-check-label\" for=\"enableQuota\">Enable Storage Quota</label></div></div><div class=\"mb-3\" id=\"quotaSettings\" style=\"display: none;\"><div class=\"row\"><div class=\"col-md-8\"><label for=\"quotaSize\" class=\"form-label\">Quota Size</label> <input type=\"number\" class=\"form-control\" id=\"quotaSize\" name=\"quota_size\" placeholder=\"1024\" min=\"1\" step=\"1\"></div><div class=\"col-md-4\"><label for=\"quotaUnit\" class=\"form-label\">Unit</label> <select class=\"form-select\" id=\"quotaUnit\" name=\"quota_unit\"><option value=\"MB\" selected>MB</option> <option value=\"GB\">GB</option> <option value=\"TB\">TB</option></select></div></div><div class=\"form-text\">Set the maximum storage size for this bucket.</div></div><div class=\"mb-3\"><div class=\"form-check\"><input class=\"form-check-input\" type=\"checkbox\" id=\"enableVersioning\" name=\"versioning_enabled\"> <label class=\"form-check-label\" for=\"enableVersioning\">Enable Object Versioning</label></div><div class=\"form-text\">Keep multiple versions of objects in this bucket.</div></div><div class=\"mb-3\"><div class=\"form-check\"><input class=\"form-check-input\" type=\"checkbox\" id=\"enableObjectLock\" name=\"object_lock_enabled\"> <label class=\"form-check-label\" for=\"enableObjectLock\">Enable Object Lock</label></div><div class=\"form-text\">Prevent objects from being deleted or overwritten for a specified period. Automatically enables versioning.</div></div><div class=\"mb-3\" id=\"objectLockSettings\" style=\"display: none;\"><div class=\"row\"><div class=\"col-md-6\"><label for=\"objectLockMode\" class=\"form-label\">Object Lock Mode</label> <select class=\"form-select\" id=\"objectLockMode\" name=\"object_lock_mode\"><option value=\"GOVERNANCE\" selected>Governance</option> <option value=\"COMPLIANCE\">Compliance</option></select><div class=\"form-text\">Governance allows override with special permissions, Compliance is immutable.</div></div><div class=\"col-md-6\"><div class=\"form-check mb-3\"><input class=\"form-check-input\" type=\"checkbox\" id=\"setDefaultRetention\" name=\"set_default_retention\"> <label class=\"form-check-label\" for=\"setDefaultRetention\">Set Default Retention</label><div class=\"form-text\">Apply default retention to all new objects in this bucket.</div></div><div id=\"defaultRetentionSettings\" style=\"display: none;\"><label for=\"objectLockDuration\" class=\"form-label\">Default Retention (days)</label> <input type=\"number\" class=\"form-control\" id=\"objectLockDuration\" name=\"object_lock_duration\" placeholder=\"30\" min=\"1\" max=\"36500\" step=\"1\"><div class=\"form-text\">Default retention period for new objects (1-36500 days).</div></div></div></div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"submit\" class=\"btn btn-primary\"><i class=\"bi bi-plus me-1\"></i>Create Bucket</button></div></form></div></div></div><!-- Delete Confirmation Modal --><div class=\"modal fade\" id=\"deleteBucketModal\" tabindex=\"-1\" aria-labelledby=\"deleteBucketModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"deleteBucketModalLabel\"><i class=\"bi bi-exclamation-triangle me-2 text-warning\"></i>Delete Bucket</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><p>Are you sure you want to delete the bucket <strong id=\"deleteBucketName\"></strong>?</p><div class=\"alert alert-warning\"><i class=\"bi bi-exclamation-triangle me-2\"></i> <strong>Warning:</strong> This action cannot be undone. All objects in the bucket will be permanently deleted.</div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-danger\" onclick=\"deleteBucket()\"><i class=\"bi bi-trash me-1\"></i>Delete Bucket</button></div></div></div></div><!-- Manage Quota Modal --><div class=\"modal fade\" id=\"manageQuotaModal\" tabindex=\"-1\" aria-labelledby=\"manageQuotaModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"manageQuotaModalLabel\"><i class=\"bi bi-speedometer2 me-2\"></i>Manage Bucket Quota</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"quotaForm\"><div class=\"modal-body\"><div class=\"mb-3\"><label class=\"form-label\">Bucket Name</label> <input type=\"text\" class=\"form-control\" id=\"quotaBucketName\" readonly></div><div class=\"mb-3\"><div class=\"form-check\"><input class=\"form-check-input\" type=\"checkbox\" id=\"quotaEnabled\" name=\"quota_enabled\"> <label class=\"form-check-label\" for=\"quotaEnabled\">Enable Storage Quota</label></div></div><div class=\"mb-3\" id=\"quotaSizeSettings\"><div class=\"row\"><div class=\"col-md-8\"><label for=\"quotaSizeMB\" class=\"form-label\">Quota Size</label> <input type=\"number\" class=\"form-control\" id=\"quotaSizeMB\" name=\"quota_size\" placeholder=\"1024\" min=\"0\" step=\"1\"></div><div class=\"col-md-4\"><label for=\"quotaUnitMB\" class=\"form-label\">Unit</label> <select class=\"form-select\" id=\"quotaUnitMB\" name=\"quota_unit\"><option value=\"MB\" selected>MB</option> <option value=\"GB\">GB</option> <option value=\"TB\">TB</option></select></div></div><div class=\"form-text\">Set the maximum storage size for this bucket. Set to 0 to remove quota.</div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"submit\" class=\"btn btn-warning\"><i class=\"bi bi-floppy me-1\"></i>Update Quota</button></div></form></div></div></div><!-- Bucket Details Modal --><div class=\"modal fade\" id=\"bucketDetailsModal\" tabindex=\"-1\" aria-labelledby=\"bucketDetailsModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-lg\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"bucketDetailsModalLabel\"><i class=\"bi bi-box me-2\"></i>Bucket Details</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><div id=\"bucketDetailsContent\"><div class=\"text-center py-4\"><div class=\"spinner-border text-primary\" role=\"status\"><span class=\"visually-hidden\">Loading...</span></div><div class=\"mt-2\">Loading bucket details...</div></div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button></div></div></div></div><!-- Bucket Lifecycle Modal --><div class=\"modal fade\" id=\"bucketLifecycleModal\" tabindex=\"-1\" aria-labelledby=\"bucketLifecycleModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-xl\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"bucketLifecycleModalLabel\"><i class=\"bi bi-recycle me-2\"></i>Lifecycle</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><div id=\"bucketLifecycleContent\"></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-outline-danger me-auto\" id=\"lifecycleDeleteAllBtn\"><i class=\"bi bi-trash me-1\"></i>Delete all rules</button> <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-primary\" id=\"lifecycleSaveAllBtn\"><i class=\"bi bi-floppy me-1\"></i>Save</button></div></div></div></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -865,7 +880,7 @@ func S3Buckets(data dash.S3BucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "<!-- Bucket Policy Modal --><div class=\"modal fade\" id=\"bucketPolicyModal\" tabindex=\"-1\" aria-labelledby=\"bucketPolicyModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-xl\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"bucketPolicyModalLabel\"><i class=\"bi bi-file-earmark-lock me-2\"></i>Bucket Policy</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><div id=\"bucketPolicyLoading\" class=\"text-center py-4\"><div class=\"spinner-border text-primary\" role=\"status\"><span class=\"visually-hidden\">Loading...</span></div><div class=\"mt-2\">Loading bucket policy...</div></div><div id=\"bucketPolicyError\" class=\"alert alert-danger\" style=\"display: none;\"></div><div id=\"bucketPolicyEditorWrapper\" style=\"display: none;\"><p class=\"text-muted small\">Every statement must specify a Principal, and every Resource must refer to this bucket. Leave the document empty and click Delete to remove the policy.</p><ul class=\"nav nav-tabs\" role=\"tablist\"><li class=\"nav-item\" role=\"presentation\"><button class=\"nav-link active\" id=\"bucketPolicyEditorTabBtn\" type=\"button\" data-bs-toggle=\"tab\" data-bs-target=\"#bucketPolicyEditorTab\" role=\"tab\" aria-controls=\"bucketPolicyEditorTab\" aria-selected=\"true\">Editor</button></li><li class=\"nav-item\" role=\"presentation\"><button class=\"nav-link\" id=\"bucketPolicyJsonTabBtn\" type=\"button\" data-bs-toggle=\"tab\" data-bs-target=\"#bucketPolicyJsonTab\" role=\"tab\" aria-controls=\"bucketPolicyJsonTab\" aria-selected=\"false\">JSON</button></li></ul><div class=\"tab-content border border-top-0 rounded-bottom p-3 mb-3\"><div class=\"tab-pane fade show active\" id=\"bucketPolicyEditorTab\" role=\"tabpanel\" aria-labelledby=\"bucketPolicyEditorTabBtn\"><div id=\"bucketPolicyEditorBody\"></div><button type=\"button\" class=\"btn btn-sm btn-outline-secondary\" id=\"bucketPolicyAddStatementBtn\"><i class=\"bi bi-plus me-1\"></i>Add statement</button></div><div class=\"tab-pane fade\" id=\"bucketPolicyJsonTab\" role=\"tabpanel\" aria-labelledby=\"bucketPolicyJsonTabBtn\"><textarea class=\"form-control\" id=\"bucketPolicyDocument\" rows=\"15\" style=\"font-family: monospace;\" spellcheck=\"false\" placeholder='{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"s3:GetObject\",\"Resource\":\"arn:aws:s3:::bucket-name/*\"}]}'></textarea><div class=\"form-text\">Enter the bucket policy document as JSON</div></div></div><div class=\"mb-3\"><button type=\"button\" class=\"btn btn-outline-info btn-sm\" id=\"bucketPolicyInsertSampleBtn\"><i class=\"bi bi-file-earmark-text me-1\"></i>Use Sample Policy</button></div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-outline-danger me-auto\" id=\"bucketPolicyDeleteBtn\"><i class=\"bi bi-trash me-1\"></i>Delete</button> <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-primary\" id=\"bucketPolicySaveBtn\"><i class=\"bi bi-floppy me-1\"></i>Save</button></div></div></div></div><!-- Manage Owner Modal --><div class=\"modal fade\" id=\"manageOwnerModal\" tabindex=\"-1\" aria-labelledby=\"manageOwnerModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"manageOwnerModalLabel\"><i class=\"bi bi-person-gear me-2\"></i>Manage Bucket Owner</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"ownerForm\"><div class=\"modal-body\"><div class=\"mb-3\"><label class=\"form-label\">Bucket Name</label> <input type=\"text\" class=\"form-control\" id=\"ownerBucketName\" readonly></div><div class=\"mb-3\"><label for=\"bucketOwnerSelect\" class=\"form-label\">Owner</label> <select class=\"form-select\" id=\"bucketOwnerSelect\" name=\"owner\"><option value=\"\">No owner (admin-only access)</option><!-- Options will be populated dynamically --></select><div class=\"form-text\">Select the S3 identity that owns this bucket. Non-admin users can only access buckets they own.</div></div><div id=\"ownerLoadingSpinner\" class=\"text-center py-2\" style=\"display: none;\"><div class=\"spinner-border spinner-border-sm text-primary\" role=\"status\"><span class=\"visually-hidden\">Loading users...</span></div><span class=\"ms-2\">Loading users...</span></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"submit\" class=\"btn btn-info\"><i class=\"bi bi-floppy me-1\"></i>Update Owner</button></div></form></div></div></div><!-- JavaScript for bucket management --><script>\n // Global state (shared between DOMContentLoaded handlers and global functions)\n let deleteModalInstance = null;\n let quotaModalInstance = null;\n let ownerModalInstance = null;\n let detailsModalInstance = null;\n let lifecycleModalInstance = null;\n let lifecycleRequestSeq = 0;\n let policyModalInstance = null;\n let policyRequestSeq = 0;\n let policyEditorBucket = null;\n // True only once the bucket-policy GET for the currently open bucket has\n // actually completed successfully. The Save button lives outside the\n // (initially hidden) editor wrapper, so it stays clickable while a load\n // is in flight or has failed; without this guard, Save could commit\n // whatever the editor happened to hold - a stale previous bucket's\n // statements, or a freshly-initialized empty state - onto\n // policyEditorBucket before its own policy ever loaded.\n let bucketPolicyLoaded = false;\n // True while a Save (PUT) or Delete (DELETE) request for the bucket\n // policy is in flight, so a double-click - or Save and Delete fired in\n // quick succession - can't send two overlapping mutations for the same\n // bucket. Cleared on failure so the user can retry; left set on success,\n // since the modal hides and the page reloads shortly after anyway.\n let bucketPolicyMutationInFlight = false;\n\n function setBucketPolicyMutationInFlight(inFlight) {\n bucketPolicyMutationInFlight = inFlight;\n document.getElementById('bucketPolicySaveBtn').disabled = inFlight;\n document.getElementById('bucketPolicyDeleteBtn').disabled = inFlight;\n }\n\n let cachedUsers = null;\n\n // Working copy of the lifecycle rules currently shown in the modal.\n // Edits (add/edit/delete rule) only mutate this local state; nothing is\n // sent to the server until \"Save\" or \"Delete all rules\" is clicked.\n let lifecycleEditor = { bucket: null, rules: [], editingIndex: null, editingRule: null, rawXml: '', hasTransition: false };\n\n function escapeHtml(v) {\n return String(v ?? '')\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n }\n\n // Shadows admin.js's formatBytes for this page, so it keeps that\n // signature and unit list; the extra guard is for a size the API left\n // out, which the shared one renders as \"NaN undefined\".\n function formatBytes(bytes, decimals = 2) {\n if (!bytes) return '0 Bytes';\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB'];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n }\n\n function formatDays(n) {\n return n + (n === 1 ? ' day' : ' days');\n }\n\n // csrfHeaders reads the token the layout stamps into every page\n // (<meta name=\"csrf-token\">) so mutating lifecycle requests pass it the\n // same way the newer admin pages (e.g. s3tables) do.\n function csrfHeaders() {\n const meta = document.querySelector('meta[name=\"csrf-token\"]');\n const token = meta ? (meta.getAttribute('content') || '') : '';\n const headers = { 'Content-Type': 'application/json' };\n if (token) {\n headers['X-CSRF-Token'] = token;\n }\n return headers;\n }\n\n // parseLifecycleResponse reads the body as text before parsing, so a\n // non-JSON response (a proxy's HTML error page, an empty body, plain\n // text from some middleware) surfaces the HTTP status instead of\n // throwing a raw JSON syntax error out of response.json().\n function parseLifecycleResponse(response) {\n return response.text().then(text => {\n let data = {};\n if (text) {\n try {\n data = JSON.parse(text);\n } catch (e) {\n data = { error: response.statusText || ('HTTP ' + response.status) };\n }\n } else if (!response.ok) {\n data = { error: response.statusText || ('HTTP ' + response.status) };\n }\n return { ok: response.ok, data: data };\n });\n }\n\n document.addEventListener('DOMContentLoaded', function() {\n // Add click handlers to pagination links\n document.querySelectorAll('.pagination-link').forEach(link => {\n link.addEventListener('click', function(e) {\n e.preventDefault();\n const page = this.getAttribute('data-page');\n goToPage(page);\n });\n });\n\n // Initialize modal instances once (reuse with show/hide)\n deleteModalInstance = new bootstrap.Modal(document.getElementById('deleteBucketModal'));\n quotaModalInstance = new bootstrap.Modal(document.getElementById('manageQuotaModal'));\n ownerModalInstance = new bootstrap.Modal(document.getElementById('manageOwnerModal'));\n detailsModalInstance = new bootstrap.Modal(document.getElementById('bucketDetailsModal'));\n lifecycleModalInstance = new bootstrap.Modal(document.getElementById('bucketLifecycleModal'));\n policyModalInstance = new bootstrap.Modal(document.getElementById('bucketPolicyModal'));\n\n const quotaCheckbox = document.getElementById('enableQuota');\n const quotaSettings = document.getElementById('quotaSettings');\n const versioningCheckbox = document.getElementById('enableVersioning');\n const objectLockCheckbox = document.getElementById('enableObjectLock');\n const objectLockSettings = document.getElementById('objectLockSettings');\n const setDefaultRetentionCheckbox = document.getElementById('setDefaultRetention');\n const defaultRetentionSettings = document.getElementById('defaultRetentionSettings');\n const createBucketForm = document.getElementById('createBucketForm');\n\n // Toggle quota settings\n quotaCheckbox.addEventListener('change', function() {\n quotaSettings.style.display = this.checked ? 'block' : 'none';\n });\n\n // Toggle object lock settings and automatically enable versioning\n objectLockCheckbox.addEventListener('change', function() {\n objectLockSettings.style.display = this.checked ? 'block' : 'none';\n if (this.checked) {\n versioningCheckbox.checked = true;\n versioningCheckbox.disabled = true;\n } else {\n versioningCheckbox.disabled = false;\n // Reset default retention settings when object lock is disabled\n setDefaultRetentionCheckbox.checked = false;\n defaultRetentionSettings.style.display = 'none';\n }\n });\n\n // Toggle default retention settings\n setDefaultRetentionCheckbox.addEventListener('change', function() {\n defaultRetentionSettings.style.display = this.checked ? 'block' : 'none';\n });\n\n // Populate owner dropdown when create bucket modal opens\n document.getElementById('createBucketModal').addEventListener('show.bs.modal', async function() {\n const ownerSelect = document.getElementById('bucketOwner');\n \n // Only fetch if not already populated\n if (ownerSelect.options.length <= 1) {\n try {\n const response = await fetch(basePath('/api/users'));\n const data = await response.json();\n const users = data.users || [];\n \n users.forEach(user => {\n const option = document.createElement('option');\n option.value = user.username;\n option.textContent = user.username;\n ownerSelect.appendChild(option);\n });\n } catch (error) {\n console.error('Error fetching users for owner dropdown:', error);\n // Reset to default state on error - user can still create bucket without owner\n ownerSelect.innerHTML = '<option value=\"\">No owner (admin-only access)</option>';\n ownerSelect.selectedIndex = 0;\n }\n }\n });\n\n // Handle form submission\n createBucketForm.addEventListener('submit', function(e) {\n e.preventDefault();\n \n const formData = new FormData(this);\n const data = {\n name: formData.get('name'),\n owner: formData.get('owner') || '',\n region: formData.get('region') || '',\n quota_size: quotaCheckbox.checked ? parseInt(formData.get('quota_size')) || 0 : 0,\n quota_unit: formData.get('quota_unit') || 'MB',\n quota_enabled: quotaCheckbox.checked,\n versioning_enabled: versioningCheckbox.checked,\n object_lock_enabled: objectLockCheckbox.checked,\n object_lock_mode: formData.get('object_lock_mode') || 'GOVERNANCE',\n set_default_retention: setDefaultRetentionCheckbox.checked,\n object_lock_duration: setDefaultRetentionCheckbox.checked ? parseInt(formData.get('object_lock_duration')) || 30 : 0\n };\n\n // Validate object lock settings\n if (data.object_lock_enabled && data.set_default_retention && data.object_lock_duration <= 0) {\n alert('Please enter a valid retention duration for object lock.');\n return;\n }\n\n fetch(basePath('/api/s3/buckets'), {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data)\n })\n .then(response => response.json())\n .then(data => {\n if (data.error) {\n alert('Error creating bucket: ' + data.error);\n } else {\n alert('Bucket created successfully!');\n // Properly close the modal before reloading\n const createModal = bootstrap.Modal.getInstance(document.getElementById('createBucketModal'));\n if (createModal) {\n createModal.hide();\n }\n setTimeout(() => location.reload(), 500);\n }\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error creating bucket: ' + error.message);\n });\n });\n\n // Handle delete bucket\n const deleteForm = document.getElementById('deleteBucketModal');\n document.querySelectorAll('.delete-bucket-btn').forEach(button => {\n button.addEventListener('click', function() {\n const bucketName = this.dataset.bucketName;\n document.getElementById('deleteBucketName').textContent = bucketName;\n // Store bucket name on modal element instead of global window property\n deleteForm.dataset.bucketName = bucketName;\n deleteModalInstance.show();\n });\n });\n\n // Handle quota management\n const quotaForm = document.getElementById('quotaForm');\n document.querySelectorAll('.quota-btn').forEach(button => {\n button.addEventListener('click', function() {\n const bucketName = this.dataset.bucketName;\n const currentQuota = parseInt(this.dataset.currentQuota);\n const quotaEnabled = this.dataset.quotaEnabled === 'true';\n \n document.getElementById('quotaBucketName').value = bucketName;\n document.getElementById('quotaEnabled').checked = quotaEnabled;\n document.getElementById('quotaSizeMB').value = currentQuota;\n \n // Toggle quota size settings\n document.getElementById('quotaSizeSettings').style.display = quotaEnabled ? 'block' : 'none';\n \n // Store bucket name on form element instead of global window property\n quotaForm.dataset.bucketName = bucketName;\n quotaModalInstance.show();\n });\n });\n\n // Add event listener to properly dispose of quota modal when hidden\n document.getElementById('manageQuotaModal').addEventListener('hidden.bs.modal', function() {\n if (quotaModalInstance) {\n quotaModalInstance.dispose();\n quotaModalInstance = null;\n }\n // Force remove any remaining backdrops\n document.querySelectorAll('.modal-backdrop').forEach(backdrop => {\n backdrop.remove();\n });\n // Ensure body classes are removed\n document.body.classList.remove('modal-open');\n document.body.style.removeProperty('padding-right');\n });\n\n // Handle quota form submission\n document.getElementById('quotaForm').addEventListener('submit', function(e) {\n e.preventDefault();\n \n const bucketName = this.dataset.bucketName;\n if (!bucketName) return;\n\n const formData = new FormData(this);\n const enabled = document.getElementById('quotaEnabled').checked;\n const data = {\n quota_size: enabled ? parseInt(formData.get('quota_size')) || 0 : 0,\n quota_unit: formData.get('quota_unit') || 'MB',\n quota_enabled: enabled\n };\n\n fetch(basePath(`/api/s3/buckets/${bucketName}/quota`), {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data)\n })\n .then(response => response.json())\n .then(data => {\n if (data.error) {\n alert('Error updating quota: ' + data.error);\n } else {\n alert('Quota updated successfully!');\n // Properly close the modal before reloading\n if (quotaModalInstance) {\n quotaModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n }\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error updating quota: ' + error.message);\n });\n });\n\n // Handle quota enabled checkbox\n document.getElementById('quotaEnabled').addEventListener('change', function() {\n document.getElementById('quotaSizeSettings').style.display = this.checked ? 'block' : 'none';\n });\n\n // Handle owner management\n const ownerForm = document.getElementById('ownerForm');\n document.querySelectorAll('.owner-btn').forEach(button => {\n button.addEventListener('click', async function() {\n const bucketName = this.dataset.bucketName;\n const currentOwner = this.dataset.currentOwner || '';\n \n document.getElementById('ownerBucketName').value = bucketName;\n // Store bucket name on form element instead of global window property\n ownerForm.dataset.bucketName = bucketName;\n \n // Show loading spinner\n document.getElementById('ownerLoadingSpinner').style.display = 'block';\n document.getElementById('bucketOwnerSelect').disabled = true;\n \n ownerModalInstance.show();\n \n // Fetch users if not cached\n try {\n if (!cachedUsers) {\n const response = await fetch(basePath('/api/users'));\n const data = await response.json();\n cachedUsers = data.users || [];\n }\n \n // Populate the select dropdown\n const select = document.getElementById('bucketOwnerSelect');\n select.innerHTML = '<option value=\"\">No owner (admin-only access)</option>';\n \n cachedUsers.forEach(user => {\n const option = document.createElement('option');\n option.value = user.username;\n option.textContent = user.username;\n if (user.username === currentOwner) {\n option.selected = true;\n }\n select.appendChild(option);\n });\n \n select.disabled = false;\n } catch (error) {\n console.error('Error fetching users:', error);\n alert('Error loading users: ' + error.message);\n // Re-enable select and reset to default on error\n const select = document.getElementById('bucketOwnerSelect');\n select.innerHTML = '<option value=\"\">No owner (admin-only access)</option>';\n select.selectedIndex = 0;\n select.disabled = false;\n } finally {\n document.getElementById('ownerLoadingSpinner').style.display = 'none';\n }\n });\n });\n\n // Handle owner form submission\n document.getElementById('ownerForm').addEventListener('submit', function(e) {\n e.preventDefault();\n \n const bucketName = this.dataset.bucketName;\n if (!bucketName) return;\n\n const owner = document.getElementById('bucketOwnerSelect').value;\n const data = { owner: owner };\n\n fetch(basePath(`/api/s3/buckets/${bucketName}/owner`), {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data)\n })\n .then(response => response.json())\n .then(data => {\n if (data.error) {\n alert('Error updating owner: ' + data.error);\n } else {\n alert('Bucket owner updated successfully!');\n // Properly close the modal before reloading\n if (ownerModalInstance) {\n ownerModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n }\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error updating owner: ' + error.message);\n });\n });\n\n // Handle view details button\n document.querySelectorAll('.view-details-btn').forEach(button => {\n button.addEventListener('click', function() {\n const bucketName = this.dataset.bucketName;\n \n // Update modal title\n document.getElementById('bucketDetailsModalLabel').innerHTML = \n '<i class=\"bi bi-box me-2\"></i>Bucket Details - ' + bucketName;\n \n // Show loading spinner\n document.getElementById('bucketDetailsContent').innerHTML = \n '<div class=\"text-center py-4\">' +\n '<div class=\"spinner-border text-primary\" role=\"status\">' +\n '<span class=\"visually-hidden\">Loading...</span>' +\n '<\\\\/div>' +\n '<div class=\"mt-2\">Loading bucket details...</div>' +\n '<\\\\/div>';\n \n detailsModalInstance.show();\n \n // Fetch bucket details\n fetch(basePath('/api/s3/buckets/' + bucketName))\n .then(response => response.json())\n .then(data => {\n if (data.error) {\n document.getElementById('bucketDetailsContent').innerHTML = \n '<div class=\"alert alert-danger\">' +\n '<i class=\"bi bi-exclamation-triangle me-2\"></i>' +\n 'Error loading bucket details: ' + data.error +\n '<\\\\/div>';\n } else {\n displayBucketDetails(data);\n }\n })\n .catch(error => {\n console.error('Error fetching bucket details:', error);\n document.getElementById('bucketDetailsContent').innerHTML = \n '<div class=\"alert alert-danger\">' +\n '<i class=\"bi bi-exclamation-triangle me-2\"></i>' +\n 'Error loading bucket details: ' + error.message +\n '<\\\\/div>';\n });\n });\n });\n\n // Lifecycle buttons: column badge and action button\n document.querySelectorAll('.lifecycle-btn').forEach(button => {\n button.addEventListener('click', function() {\n const bucketName = this.dataset.bucketName;\n\n // Reset the working copy until the GET below repopulates it,\n // so Save/Delete-all can't act on the previous bucket's rules.\n lifecycleEditor = { bucket: null, rules: [], editingIndex: null, editingRule: null, rawXml: '', hasTransition: false };\n\n document.getElementById('bucketLifecycleModalLabel').innerHTML =\n '<i class=\"bi bi-recycle me-2\"></i>Lifecycle - ' + bucketName;\n\n document.getElementById('bucketLifecycleContent').innerHTML =\n '<div class=\"text-center py-4\">' +\n '<div class=\"spinner-border text-primary\" role=\"status\">' +\n '<span class=\"visually-hidden\">Loading...</span>' +\n '<\\/div>' +\n '<div class=\"mt-2\">Loading lifecycle rules...</div>' +\n '<\\/div>';\n\n lifecycleModalInstance.show();\n\n // Drop responses that arrive after another bucket was opened\n const requestSeq = ++lifecycleRequestSeq;\n fetch(basePath('/api/s3/buckets/' + bucketName + '/lifecycle'))\n .then(parseLifecycleResponse)\n .then(({ ok, data }) => {\n if (requestSeq !== lifecycleRequestSeq) return;\n if (!ok || data.error) {\n document.getElementById('bucketLifecycleContent').innerHTML =\n '<div class=\"alert alert-danger\">' +\n '<i class=\"bi bi-exclamation-triangle me-2\"></i>' +\n 'Error loading lifecycle rules: ' + (data.error || 'unknown error') +\n '<\\/div>';\n } else {\n displayBucketLifecycle(data);\n }\n })\n .catch(error => {\n if (requestSeq !== lifecycleRequestSeq) return;\n console.error('Error fetching bucket lifecycle:', error);\n document.getElementById('bucketLifecycleContent').innerHTML =\n '<div class=\"alert alert-danger\">' +\n '<i class=\"bi bi-exclamation-triangle me-2\"></i>' +\n 'Error loading lifecycle rules: ' + error.message +\n '<\\/div>';\n });\n });\n });\n\n // Save the whole working rule set back to the bucket.\n document.getElementById('lifecycleSaveAllBtn').addEventListener('click', function() {\n if (!lifecycleEditor.bucket) return;\n // Fold in any rule the user is still editing so Save doesn't\n // silently discard it; abort if that form isn't valid yet.\n if (!commitOpenLifecycleRuleForm()) return;\n // An empty list clears the configuration, same as Delete all rules,\n // so it gets the same prompt.\n if (lifecycleEditor.rules.length === 0 &&\n !confirm('No rules left: saving removes the lifecycle configuration for ' + lifecycleEditor.bucket + '. This cannot be undone.')) {\n return;\n }\n\n fetch(basePath('/api/s3/buckets/' + lifecycleEditor.bucket + '/lifecycle'), {\n method: 'PUT',\n headers: csrfHeaders(),\n body: JSON.stringify({ rules: lifecycleEditor.rules })\n })\n .then(parseLifecycleResponse)\n .then(({ ok, data }) => {\n if (!ok || data.error) {\n alert('Error saving lifecycle rules: ' + (data.error || 'unknown error'));\n return;\n }\n if (lifecycleModalInstance) {\n lifecycleModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error saving lifecycle rules: ' + error.message);\n });\n });\n\n // Clear the lifecycle configuration entirely.\n document.getElementById('lifecycleDeleteAllBtn').addEventListener('click', function() {\n if (!lifecycleEditor.bucket) return;\n if (!confirm('Delete all lifecycle rules for ' + lifecycleEditor.bucket + '? This cannot be undone.')) return;\n\n fetch(basePath('/api/s3/buckets/' + lifecycleEditor.bucket + '/lifecycle'), {\n method: 'DELETE',\n headers: csrfHeaders()\n })\n .then(parseLifecycleResponse)\n .then(({ ok, data }) => {\n if (!ok || data.error) {\n alert('Error deleting lifecycle rules: ' + (data.error || 'unknown error'));\n return;\n }\n if (lifecycleModalInstance) {\n lifecycleModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error deleting lifecycle rules: ' + error.message);\n });\n });\n\n // Policy buttons: column badge and action button. The visual editor\n // (weed/admin/static/js/policy_editor.js) is set up once per page\n // load; registerPolicyEditor is re-called on every open so the\n // resource-ARN autocomplete and default Principal stay pinned to\n // whichever bucket is currently open.\n let bucketPolicyEditorSetUp = false;\n document.getElementById('bucketPolicyInsertSampleBtn').addEventListener('click', function() {\n if (!policyEditorBucket) return;\n insertSamplePolicy('bucket', {\n Version: '2012-10-17',\n Statement: [{\n Effect: 'Allow',\n Principal: '*',\n Action: ['s3:GetObject'],\n Resource: ['arn:aws:s3:::' + policyEditorBucket + '/*']\n }]\n });\n });\n\n document.querySelectorAll('.policy-btn').forEach(button => {\n button.addEventListener('click', function() {\n const bucketName = this.dataset.bucketName;\n policyEditorBucket = bucketName;\n bucketPolicyLoaded = false;\n // Deliberately not resetting bucketPolicyMutationInFlight\n // here: if a Save/Delete for a previously open bucket is\n // still in flight, Save/Delete for this bucket must stay\n // blocked until that request settles (its own completion\n // handler releases the flag once done, whether or not it's\n // still the active bucket by then) - otherwise this bucket's\n // mutation could race the abandoned one.\n registerPolicyEditor('bucket', { requirePrincipal: true, bucket: bucketName });\n if (!bucketPolicyEditorSetUp) {\n setupPolicyEditor('bucket');\n bucketPolicyEditorSetUp = true;\n }\n\n document.getElementById('bucketPolicyModalLabel').innerHTML =\n '<i class=\"bi bi-file-earmark-lock me-2\"></i>Bucket Policy - ' + escapeHtml(bucketName);\n document.getElementById('bucketPolicyLoading').style.display = '';\n document.getElementById('bucketPolicyError').style.display = 'none';\n document.getElementById('bucketPolicyEditorWrapper').style.display = 'none';\n\n policyModalInstance.show();\n\n // Drop responses that arrive after another bucket was opened\n const requestSeq = ++policyRequestSeq;\n fetch(basePath('/api/s3/buckets/' + encodeURIComponent(bucketName) + '/policy'))\n .then(parseLifecycleResponse)\n .then(({ ok, data }) => {\n if (requestSeq !== policyRequestSeq) return;\n document.getElementById('bucketPolicyLoading').style.display = 'none';\n if (!ok || data.error) {\n document.getElementById('bucketPolicyError').textContent =\n 'Error loading bucket policy: ' + (data.error || 'unknown error');\n document.getElementById('bucketPolicyError').style.display = '';\n return;\n }\n document.getElementById('bucketPolicyEditorWrapper').style.display = '';\n // policy_text carries stored bytes the server-side\n // decoder rejects; the JSON tab shows them so they\n // can be fixed or deleted.\n document.getElementById('bucketPolicyDocument').value =\n data.policy ? JSON.stringify(data.policy, null, 2) : (data.policy_text || '');\n bucketPolicyLoaded = true;\n loadPolicyTextareaIntoEditor('bucket');\n })\n .catch(error => {\n if (requestSeq !== policyRequestSeq) return;\n console.error('Error fetching bucket policy:', error);\n document.getElementById('bucketPolicyLoading').style.display = 'none';\n document.getElementById('bucketPolicyError').textContent =\n 'Error loading bucket policy: ' + error.message;\n document.getElementById('bucketPolicyError').style.display = '';\n });\n });\n });\n\n // Save the policy document currently shown (whichever tab is active).\n document.getElementById('bucketPolicySaveBtn').addEventListener('click', function() {\n if (!policyEditorBucket) return;\n if (bucketPolicyMutationInFlight) return;\n if (!bucketPolicyLoaded) {\n alert('The current policy has not finished loading. Close and reopen this dialog before saving.');\n return;\n }\n\n // Commit first: if the Editor tab is active, the textarea still\n // holds whatever was there at load time until this runs, so a\n // policy entered purely through the structured form (no tab\n // switch) would otherwise read back as empty here.\n if (!commitPolicyActiveTab('bucket')) return;\n\n const raw = document.getElementById('bucketPolicyDocument').value.trim();\n if (!raw || !policyTextHasStatements(raw)) {\n alert('Add at least one statement, or use Delete to remove the bucket policy.');\n return;\n }\n\n let policy;\n try {\n policy = JSON.parse(document.getElementById('bucketPolicyDocument').value);\n } catch (e) {\n alert('Invalid JSON: ' + e.message);\n return;\n }\n const validationError = validatePolicyEditorDoc('bucket', policy);\n if (validationError) {\n alert(validationError);\n return;\n }\n // The admin API decodes only Version and Statement, so warn\n // before other top-level fields are silently dropped - the IAM\n // policies page already does. (The S3 Tables dialogs don't:\n // their backend stores the document verbatim.)\n if (!confirmPolicyFieldDiscard('bucket')) return;\n\n // Captured now: if the dialog moves on to a different bucket\n // before this PUT resolves, the completion below must not hide\n // or reload over whatever that other bucket is now showing.\n const targetBucket = policyEditorBucket;\n setBucketPolicyMutationInFlight(true);\n fetch(basePath('/api/s3/buckets/' + encodeURIComponent(targetBucket) + '/policy'), {\n method: 'PUT',\n headers: csrfHeaders(),\n body: JSON.stringify({ policy: policy })\n })\n .then(parseLifecycleResponse)\n .then(({ ok, data }) => {\n setBucketPolicyMutationInFlight(false);\n const stillCurrent = targetBucket === policyEditorBucket;\n if (!ok || data.error) {\n if (stillCurrent) {\n alert('Error saving bucket policy: ' + (data.error || 'unknown error'));\n } else {\n console.error('Error saving policy for ' + targetBucket + ' (no longer the open bucket): ' + (data.error || 'unknown error'));\n }\n return;\n }\n if (!stillCurrent) return;\n if (policyModalInstance) {\n policyModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n })\n .catch(error => {\n setBucketPolicyMutationInFlight(false);\n console.error('Error:', error);\n if (targetBucket === policyEditorBucket) {\n alert('Error saving bucket policy: ' + error.message);\n }\n });\n });\n\n // Clear the bucket policy entirely.\n document.getElementById('bucketPolicyDeleteBtn').addEventListener('click', function() {\n if (!policyEditorBucket) return;\n if (bucketPolicyMutationInFlight) return;\n if (!bucketPolicyLoaded) {\n alert('The current policy has not finished loading. Close and reopen this dialog before deleting.');\n return;\n }\n if (!confirm('Delete the bucket policy for ' + policyEditorBucket + '? This cannot be undone.')) return;\n\n // Captured now: if the dialog moves on to a different bucket\n // before this DELETE resolves, the completion below must not\n // hide or reload over whatever that other bucket is now showing.\n const targetBucket = policyEditorBucket;\n setBucketPolicyMutationInFlight(true);\n fetch(basePath('/api/s3/buckets/' + encodeURIComponent(targetBucket) + '/policy'), {\n method: 'DELETE',\n headers: csrfHeaders()\n })\n .then(parseLifecycleResponse)\n .then(({ ok, data }) => {\n setBucketPolicyMutationInFlight(false);\n const stillCurrent = targetBucket === policyEditorBucket;\n if (!ok || data.error) {\n if (stillCurrent) {\n alert('Error deleting bucket policy: ' + (data.error || 'unknown error'));\n } else {\n console.error('Error deleting policy for ' + targetBucket + ' (no longer the open bucket): ' + (data.error || 'unknown error'));\n }\n return;\n }\n if (!stillCurrent) return;\n if (policyModalInstance) {\n policyModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n })\n .catch(error => {\n setBucketPolicyMutationInFlight(false);\n console.error('Error:', error);\n if (targetBucket === policyEditorBucket) {\n alert('Error deleting bucket policy: ' + error.message);\n }\n });\n });\n });\n\n function deleteBucket() {\n const bucketName = document.getElementById('deleteBucketModal').dataset.bucketName;\n if (!bucketName) return;\n\n fetch(basePath(`/api/s3/buckets/${bucketName}`), {\n method: 'DELETE'\n })\n .then(response => response.json())\n .then(data => {\n if (data.error) {\n alert('Error deleting bucket: ' + data.error);\n } else {\n alert('Bucket deleted successfully!');\n // Properly close the modal before reloading\n if (deleteModalInstance) {\n deleteModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n }\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error deleting bucket: ' + error.message);\n });\n }\n\nfunction displayBucketDetails(data) {\n const bucket = data.bucket;\n\n function formatDate(dateString) {\n const date = new Date(dateString);\n return date.toLocaleString();\n }\n\n let ownerHtml = '<span class=\"text-muted\">No owner (admin-only)</span>';\n if (bucket.owner) {\n ownerHtml = '<span class=\"badge bg-info\"><i class=\"bi bi-person me-1\"></i>' + escapeHtml(bucket.owner) + '</span>';\n }\n\n let usageHtml = '';\n if (bucket.physical_size > 0 && bucket.logical_size > 0 && bucket.physical_size > bucket.logical_size) {\n const overhead = (bucket.physical_size / bucket.logical_size).toFixed(1);\n usageHtml = '<br><small class=\"text-muted\">' + overhead + 'x overhead<\\/small>';\n }\n\n let quotaHtml = '<span class=\"badge bg-secondary\">Disabled</span>';\n if (bucket.quota_enabled) {\n quotaHtml = '<span class=\"badge bg-success\">' + formatBytes(bucket.quota) + '</span>';\n }\n\n let versioningHtml = '<span class=\"text-muted\">Not configured</span>';\n if (bucket.versioning_status === 'Enabled') {\n versioningHtml = '<span class=\"badge bg-success\"><i class=\"bi bi-check me-1\"></i>Enabled</span>';\n } else if (bucket.versioning_status === 'Suspended') {\n versioningHtml = '<span class=\"badge bg-warning\"><i class=\"bi bi-pause me-1\"></i>Suspended</span>';\n }\n\n let statusHtml = '<span class=\"badge bg-success\">Writable</span>';\n if (bucket.read_only) {\n statusHtml = '<span class=\"badge bg-danger\"><i class=\"bi bi-lock me-1\"></i>Read-only</span>';\n }\n\n let objectLockHtml = '<span class=\"text-muted\">Not configured</span>';\n if (bucket.object_lock_enabled) {\n let details = '';\n if (bucket.object_lock_mode && bucket.object_lock_duration > 0) {\n details = '<br><small class=\"text-muted\">' + escapeHtml(bucket.object_lock_mode) + ' • ' + bucket.object_lock_duration + ' days<\\/small>';\n }\n objectLockHtml = '<span class=\"badge bg-warning\"><i class=\"bi bi-lock me-1\"></i>Enabled</span>' + details;\n }\n\n let policyHtml = '<span class=\"text-muted\">Not configured</span>';\n if (bucket.policy_statement_count > 0) {\n const label = bucket.policy_statement_count === 1 ? '1 statement' : bucket.policy_statement_count + ' statements';\n policyHtml = '<span class=\"badge bg-primary\">' + label + '<\\/span>';\n }\n\n const rows = [\n '<div class=\"row\">',\n '<div class=\"col-md-6\">',\n '<h6><i class=\"bi bi-info-circle me-2\"></i>Bucket Information</h6>',\n '<table class=\"table table-sm\">',\n '<tr><td><strong>Name:</strong></td><td>' + escapeHtml(bucket.name) + '<\\/td><\\/tr>',\n '<tr><td><strong>Owner:</strong></td><td>' + ownerHtml + '<\\/td><\\/tr>',\n '<tr><td><strong>Created:</strong></td><td>' + formatDate(bucket.created_at) + '<\\/td><\\/tr>',\n '<tr><td><strong>Last Modified:</strong></td><td>' + formatDate(bucket.last_modified) + '<\\/td><\\/tr>',\n '<tr><td><strong>Logical Size:</strong></td><td>' + formatBytes(bucket.logical_size) + '<\\/td><\\/tr>',\n '<tr><td><strong>Physical Size:</strong></td><td>' + formatBytes(bucket.physical_size) + usageHtml + '<\\/td><\\/tr>',\n '<\\/table>',\n '<\\/div>',\n '<div class=\"col-md-6\">',\n '<h6><i class=\"bi bi-gear-wide-connected me-2\"></i>Configuration</h6>',\n '<table class=\"table table-sm\">',\n '<tr><td><strong>Status:</strong></td><td>' + statusHtml + '<\\/td><\\/tr>',\n '<tr><td><strong>Quota:</strong></td><td>' + quotaHtml + '<\\/td><\\/tr>',\n '<tr><td><strong>Versioning:</strong></td><td>' + versioningHtml + '<\\/td><\\/tr>',\n '<tr><td><strong>Object Lock:</strong></td><td>' + objectLockHtml + '<\\/td><\\/tr>',\n '<tr><td><strong>Policy:</strong></td><td>' + policyHtml + '<\\/td><\\/tr>',\n '<\\/table>',\n '<\\/div>',\n '<\\/div>'\n ];\n\n document.getElementById('bucketDetailsContent').innerHTML = rows.join('');\n}\n\n// displayBucketLifecycle loads the GET response into the local working copy\n// and renders the editor. Nothing is sent back to the server until Save or\n// Delete all rules is clicked.\nfunction displayBucketLifecycle(data) {\n lifecycleEditor.bucket = data.bucket || lifecycleEditor.bucket;\n lifecycleEditor.rules = (data.rules || []).map(cloneLifecycleRule);\n lifecycleEditor.editingIndex = null;\n lifecycleEditor.editingRule = null;\n lifecycleEditor.rawXml = data.xml || '';\n // SeaweedFS doesn't support Transition rules (PutBucketLifecycleConfiguration\n // rejects them for Enabled rules), and the canonical rule shape the admin\n // edits has no field for one, so a Transition set by another client would\n // silently disappear on the next Save. Warn instead.\n // Matches <Transition> and <NoncurrentVersionTransition> however they are\n // spelled: with attributes, self-closed, or namespace-prefixed.\n lifecycleEditor.hasTransition = /<(\\w+:)?(NoncurrentVersion)?Transition[\\s>\\/]/.test(data.xml || '');\n renderLifecycleEditor();\n}\n\n// normalizeLifecycleStatus maps a stored status onto the two the editor can\n// show. The S3 API stores <Status> unvalidated, and the engine runs a rule\n// only on an exact \"Enabled\", so everything else is Disabled - collapsing it\n// here keeps an odd spelling from leaving both radios unchecked, which would\n// throw out of readLifecycleRuleFromForm and make the modal look dead.\nfunction normalizeLifecycleStatus(status) {\n return status === 'Enabled' ? 'Enabled' : 'Disabled';\n}\n\nfunction cloneLifecycleRule(r) {\n return {\n id: r.id || '',\n status: normalizeLifecycleStatus(r.status),\n prefix: r.prefix || '',\n tags: Object.assign({}, r.tags || {}),\n size_greater_than: r.size_greater_than || null,\n size_less_than: r.size_less_than || null,\n expiration_days: r.expiration_days || null,\n expiration_date: r.expiration_date || '',\n expired_object_delete_marker: !!r.expired_object_delete_marker,\n noncurrent_version_expiration_days: r.noncurrent_version_expiration_days || null,\n newer_noncurrent_versions: r.newer_noncurrent_versions || null,\n abort_multipart_days: r.abort_multipart_days || null,\n };\n}\n\nfunction blankLifecycleRule() {\n return {\n id: '', status: 'Enabled', prefix: '', tags: {},\n size_greater_than: null, size_less_than: null,\n expiration_days: null, expiration_date: '',\n expired_object_delete_marker: false,\n noncurrent_version_expiration_days: null, newer_noncurrent_versions: null,\n abort_multipart_days: null,\n };\n}\n\nfunction describeLifecycleScope(rule) {\n const parts = [];\n if (rule.prefix) {\n parts.push('<code>' + escapeHtml(rule.prefix) + '<\\/code>');\n }\n Object.entries(rule.tags || {}).forEach(([k, v]) => {\n parts.push('<span class=\"badge bg-light text-dark border\">' + escapeHtml(k) + '=' + escapeHtml(v) + '<\\/span>');\n });\n if (rule.size_greater_than) {\n parts.push('size > ' + formatBytes(rule.size_greater_than));\n }\n if (rule.size_less_than) {\n parts.push('size < ' + formatBytes(rule.size_less_than));\n }\n return parts.length ? parts.join(' ') : '<span class=\"text-muted\">Whole bucket<\\/span>';\n}\n\nfunction describeLifecycleActions(rule) {\n const actions = [];\n if (rule.expiration_days) {\n actions.push('Expire after ' + formatDays(rule.expiration_days));\n }\n if (rule.expiration_date) {\n actions.push('Expire on ' + escapeHtml(rule.expiration_date));\n }\n if (rule.expired_object_delete_marker) {\n actions.push('Remove expired object delete markers');\n }\n if (rule.noncurrent_version_expiration_days) {\n let action = 'Expire noncurrent versions after ' + formatDays(rule.noncurrent_version_expiration_days);\n if (rule.newer_noncurrent_versions) {\n action += ', keep ' + rule.newer_noncurrent_versions + ' newest';\n }\n actions.push(action);\n } else if (rule.newer_noncurrent_versions) {\n // Standalone (no expiration_days): the engine still recognizes this\n // as an action that expires noncurrent versions beyond the N newest.\n actions.push('Keep ' + rule.newer_noncurrent_versions + ' newest noncurrent versions');\n }\n if (rule.abort_multipart_days) {\n actions.push('Abort incomplete multipart uploads after ' + formatDays(rule.abort_multipart_days));\n }\n if (actions.length === 0) {\n return '<span class=\"text-muted\">None<\\/span>';\n }\n return actions.join('<br>');\n}\n\nfunction lifecycleRuleRowHtml(rule, idx) {\n const statusHtml = rule.status === 'Enabled'\n ? '<span class=\"badge bg-success\">Enabled<\\/span>'\n : '<span class=\"badge bg-secondary\">' + escapeHtml(rule.status) + '<\\/span>';\n return '<tr>' +\n '<td>' + (rule.id ? escapeHtml(rule.id) : '<span class=\"text-muted\">unnamed<\\/span>') + '<\\/td>' +\n '<td>' + statusHtml + '<\\/td>' +\n '<td>' + describeLifecycleScope(rule) + '<\\/td>' +\n '<td>' + describeLifecycleActions(rule) + '<\\/td>' +\n '<td class=\"text-end text-nowrap\">' +\n '<button type=\"button\" class=\"btn btn-sm btn-outline-secondary lifecycle-edit-rule-btn\" data-index=\"' + idx + '\" title=\"Edit rule\"><i class=\"bi bi-pen\"><\\/i><\\/button> ' +\n '<button type=\"button\" class=\"btn btn-sm btn-outline-danger lifecycle-delete-rule-btn\" data-index=\"' + idx + '\" title=\"Delete rule\"><i class=\"bi bi-trash\"><\\/i><\\/button>' +\n '<\\/td>' +\n '<\\/tr>';\n}\n\nfunction lifecycleRuleFormHtml() {\n const rule = lifecycleEditor.editingRule;\n const tagRowHtml = (k, v) =>\n '<div class=\"input-group input-group-sm mb-1 lifecycle-tag-row\">' +\n '<input type=\"text\" class=\"form-control lifecycle-tag-key\" placeholder=\"Key\" value=\"' + escapeHtml(k) + '\">' +\n '<input type=\"text\" class=\"form-control lifecycle-tag-value\" placeholder=\"Value\" value=\"' + escapeHtml(v) + '\">' +\n '<button type=\"button\" class=\"btn btn-outline-danger lifecycle-remove-tag-btn\"><i class=\"bi bi-x\"><\\/i><\\/button>' +\n '<\\/div>';\n const tagRows = Object.entries(rule.tags || {}).map(([k, v]) => tagRowHtml(k, v)).join('');\n\n return '' +\n '<div class=\"card mb-3\" id=\"lifecycleRuleForm\">' +\n '<div class=\"card-body\">' +\n '<h6 class=\"card-title\">' + (lifecycleEditor.editingIndex === 'new' ? 'Add rule' : 'Edit rule') + '<\\/h6>' +\n\n '<div class=\"row g-2 mb-2\">' +\n '<div class=\"col-md-6\">' +\n '<label class=\"form-label small\">ID (optional)<\\/label>' +\n '<input type=\"text\" class=\"form-control form-control-sm\" id=\"lifecycleRuleId\" value=\"' + escapeHtml(rule.id) + '\">' +\n '<\\/div>' +\n '<div class=\"col-md-6\">' +\n '<label class=\"form-label small d-block\">Status<\\/label>' +\n '<div class=\"form-check form-check-inline\">' +\n '<input class=\"form-check-input\" type=\"radio\" name=\"lifecycleRuleStatus\" id=\"lifecycleStatusEnabled\" value=\"Enabled\"' + (rule.status === 'Enabled' ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleStatusEnabled\">Enabled<\\/label>' +\n '<\\/div>' +\n '<div class=\"form-check form-check-inline\">' +\n '<input class=\"form-check-input\" type=\"radio\" name=\"lifecycleRuleStatus\" id=\"lifecycleStatusDisabled\" value=\"Disabled\"' + (rule.status === 'Disabled' ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleStatusDisabled\">Disabled<\\/label>' +\n '<\\/div>' +\n '<\\/div>' +\n '<\\/div>' +\n\n '<div class=\"mb-2\">' +\n '<label class=\"form-label small\">Prefix<\\/label>' +\n '<input type=\"text\" class=\"form-control form-control-sm\" id=\"lifecycleRulePrefix\" placeholder=\"logs/\" value=\"' + escapeHtml(rule.prefix) + '\">' +\n '<\\/div>' +\n\n '<div class=\"mb-2\">' +\n '<label class=\"form-label small d-block\">Tags<\\/label>' +\n '<div id=\"lifecycleTagRows\">' + tagRows + '<\\/div>' +\n '<button type=\"button\" class=\"btn btn-sm btn-outline-secondary\" id=\"lifecycleAddTagBtn\"><i class=\"bi bi-plus me-1\"><\\/i>Add tag<\\/button>' +\n '<\\/div>' +\n\n '<div class=\"row g-2 mb-3\">' +\n '<div class=\"col-md-6\">' +\n '<label class=\"form-label small\">Size greater than (bytes)<\\/label>' +\n '<input type=\"number\" class=\"form-control form-control-sm\" id=\"lifecycleRuleSizeGT\" min=\"0\" step=\"1\" value=\"' + (rule.size_greater_than || '') + '\">' +\n '<\\/div>' +\n '<div class=\"col-md-6\">' +\n '<label class=\"form-label small\">Size less than (bytes)<\\/label>' +\n '<input type=\"number\" class=\"form-control form-control-sm\" id=\"lifecycleRuleSizeLT\" min=\"0\" step=\"1\" value=\"' + (rule.size_less_than || '') + '\">' +\n '<\\/div>' +\n '<\\/div>' +\n\n '<hr>' +\n '<h6 class=\"small text-muted text-uppercase\">Actions<\\/h6>' +\n\n '<div class=\"row g-2 align-items-center mb-2\">' +\n '<div class=\"col-auto\">' +\n '<div class=\"form-check\">' +\n '<input class=\"form-check-input\" type=\"checkbox\" id=\"lifecycleExpireDaysEnabled\"' + (rule.expiration_days ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleExpireDaysEnabled\">Expire after<\\/label>' +\n '<\\/div>' +\n '<\\/div>' +\n '<div class=\"col-auto\">' +\n '<input type=\"number\" class=\"form-control form-control-sm\" id=\"lifecycleExpireDays\" min=\"1\" step=\"1\" style=\"width: 6rem;\" value=\"' + (rule.expiration_days || '') + '\"' + (rule.expiration_days ? '' : ' disabled') + '>' +\n '<\\/div><div class=\"col-auto\">days<\\/div>' +\n '<\\/div>' +\n\n '<div class=\"row g-2 align-items-center mb-2\">' +\n '<div class=\"col-auto\">' +\n '<div class=\"form-check\">' +\n '<input class=\"form-check-input\" type=\"checkbox\" id=\"lifecycleExpireDateEnabled\"' + (rule.expiration_date ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleExpireDateEnabled\">Expire on date<\\/label>' +\n '<\\/div>' +\n '<\\/div>' +\n '<div class=\"col-auto\">' +\n '<input type=\"date\" class=\"form-control form-control-sm\" id=\"lifecycleExpireDate\" value=\"' + escapeHtml(rule.expiration_date) + '\"' + (rule.expiration_date ? '' : ' disabled') + '>' +\n '<\\/div>' +\n '<\\/div>' +\n\n '<div class=\"form-check mb-2\">' +\n '<input class=\"form-check-input\" type=\"checkbox\" id=\"lifecycleDeleteMarker\"' + (rule.expired_object_delete_marker ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleDeleteMarker\">Remove expired object delete markers<\\/label>' +\n '<\\/div>' +\n\n (() => {\n const noncurrentActive = !!(rule.noncurrent_version_expiration_days || rule.newer_noncurrent_versions);\n return '<div class=\"row g-2 align-items-center mb-2\">' +\n '<div class=\"col-auto\">' +\n '<div class=\"form-check\">' +\n '<input class=\"form-check-input\" type=\"checkbox\" id=\"lifecycleNoncurrentEnabled\"' + (noncurrentActive ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleNoncurrentEnabled\">Limit noncurrent versions<\\/label>' +\n '<\\/div>' +\n '<\\/div>' +\n '<div class=\"col-auto\">after<\\/div>' +\n '<div class=\"col-auto\">' +\n '<input type=\"number\" class=\"form-control form-control-sm\" id=\"lifecycleNoncurrentDays\" min=\"1\" step=\"1\" style=\"width: 6rem;\" value=\"' + (rule.noncurrent_version_expiration_days || '') + '\"' + (noncurrentActive ? '' : ' disabled') + '>' +\n '<\\/div><div class=\"col-auto\">days (optional), keep<\\/div>' +\n '<div class=\"col-auto\">' +\n '<input type=\"number\" class=\"form-control form-control-sm\" id=\"lifecycleNoncurrentKeep\" min=\"0\" step=\"1\" style=\"width: 6rem;\" value=\"' + (rule.newer_noncurrent_versions || '') + '\"' + (noncurrentActive ? '' : ' disabled') + '>' +\n '<\\/div><div class=\"col-auto\">newest (optional)<\\/div>' +\n '<\\/div>';\n })() +\n\n '<div class=\"row g-2 align-items-center mb-3\">' +\n '<div class=\"col-auto\">' +\n '<div class=\"form-check\">' +\n '<input class=\"form-check-input\" type=\"checkbox\" id=\"lifecycleAbortMPUEnabled\"' + (rule.abort_multipart_days ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleAbortMPUEnabled\">Abort incomplete multipart uploads after<\\/label>' +\n '<\\/div>' +\n '<\\/div>' +\n '<div class=\"col-auto\">' +\n '<input type=\"number\" class=\"form-control form-control-sm\" id=\"lifecycleAbortMPUDays\" min=\"1\" step=\"1\" style=\"width: 6rem;\" value=\"' + (rule.abort_multipart_days || '') + '\"' + (rule.abort_multipart_days ? '' : ' disabled') + '>' +\n '<\\/div><div class=\"col-auto\">days<\\/div>' +\n '<\\/div>' +\n\n '<div class=\"text-end\">' +\n '<button type=\"button\" class=\"btn btn-sm btn-secondary\" id=\"lifecycleCancelRuleBtn\">Cancel<\\/button> ' +\n '<button type=\"button\" class=\"btn btn-sm btn-primary\" id=\"lifecycleSaveRuleBtn\">Save rule<\\/button>' +\n '<\\/div>' +\n '<\\/div>' +\n '<\\/div>';\n}\n\nfunction renderLifecycleEditor() {\n const container = document.getElementById('bucketLifecycleContent');\n const rowsHtml = lifecycleEditor.rules.map(lifecycleRuleRowHtml).join('') ||\n '<tr><td colspan=\"5\" class=\"text-center text-muted py-3\">No lifecycle rules<\\/td><\\/tr>';\n\n let html = '';\n if (lifecycleEditor.hasTransition) {\n html += '<div class=\"alert alert-warning small\">' +\n '<i class=\"bi bi-exclamation-triangle me-1\"><\\/i>' +\n 'This bucket has a Transition rule set outside the admin (SeaweedFS does not support storage class transitions). Saving from here will drop it.' +\n '<\\/div>';\n }\n\n html += '<div class=\"table-responsive mb-3\">' +\n '<table class=\"table table-sm align-middle\">' +\n '<thead><tr><th>Rule<\\/th><th>Status<\\/th><th>Scope<\\/th><th>Actions<\\/th><th><\\/th><\\/tr><\\/thead>' +\n '<tbody>' + rowsHtml + '<\\/tbody>' +\n '<\\/table>' +\n '<\\/div>' +\n '<button type=\"button\" class=\"btn btn-sm btn-outline-primary mb-3\" id=\"lifecycleAddRuleBtn\">' +\n '<i class=\"bi bi-plus me-1\"><\\/i>Add rule' +\n '<\\/button>';\n\n if (lifecycleEditor.editingIndex !== null) {\n html += lifecycleRuleFormHtml();\n }\n\n if (lifecycleEditor.rawXml) {\n html += '<details class=\"mt-2\">' +\n '<summary class=\"text-muted small\">Raw XML (as currently stored)<\\/summary>' +\n '<pre class=\"bg-light border rounded p-2 mt-2 small mb-0\">' + escapeHtml(lifecycleEditor.rawXml) + '<\\/pre>' +\n '<\\/details>';\n }\n\n container.innerHTML = html;\n bindLifecycleEditorEvents();\n}\n\nfunction bindLifecycleToggle(checkboxId, fieldId, mutuallyExclusiveId) {\n const checkbox = document.getElementById(checkboxId);\n const field = document.getElementById(fieldId);\n if (!checkbox || !field) return;\n checkbox.addEventListener('change', function() {\n field.disabled = !this.checked;\n if (this.checked && mutuallyExclusiveId) {\n const other = document.getElementById(mutuallyExclusiveId);\n if (other && other.checked) {\n other.checked = false;\n other.dispatchEvent(new Event('change'));\n }\n }\n });\n}\n\nfunction bindLifecycleEditorEvents() {\n const addBtn = document.getElementById('lifecycleAddRuleBtn');\n if (addBtn) {\n addBtn.addEventListener('click', function() {\n // Fold in any rule already being edited before switching forms,\n // so an invalid in-progress draft isn't silently discarded.\n if (!commitOpenLifecycleRuleForm()) return;\n lifecycleEditor.editingIndex = 'new';\n lifecycleEditor.editingRule = blankLifecycleRule();\n renderLifecycleEditor();\n });\n }\n\n document.querySelectorAll('.lifecycle-edit-rule-btn').forEach(btn => {\n btn.addEventListener('click', function() {\n const idx = parseInt(this.dataset.index, 10);\n // Same as above: committing never shifts indices (it either\n // pushes a new rule at the end or replaces one in place), so\n // idx captured above is still valid after this call.\n if (!commitOpenLifecycleRuleForm()) return;\n lifecycleEditor.editingIndex = idx;\n lifecycleEditor.editingRule = cloneLifecycleRule(lifecycleEditor.rules[idx]);\n renderLifecycleEditor();\n });\n });\n\n document.querySelectorAll('.lifecycle-delete-rule-btn').forEach(btn => {\n btn.addEventListener('click', function() {\n const idx = parseInt(this.dataset.index, 10);\n // Fold in an open form first, like every other transition does:\n // re-rendering after the splice would otherwise redraw it from the\n // snapshot taken when editing began and lose what was typed.\n if (lifecycleEditor.editingIndex !== null && lifecycleEditor.editingIndex !== idx) {\n if (!commitOpenLifecycleRuleForm()) return;\n }\n lifecycleEditor.rules.splice(idx, 1);\n // Deleting a rule shifts every later index down by one, so an\n // open edit form must follow its rule rather than silently\n // start targeting whatever now sits at its old index.\n if (lifecycleEditor.editingIndex === idx) {\n lifecycleEditor.editingIndex = null;\n lifecycleEditor.editingRule = null;\n } else if (typeof lifecycleEditor.editingIndex === 'number' && lifecycleEditor.editingIndex > idx) {\n lifecycleEditor.editingIndex -= 1;\n }\n renderLifecycleEditor();\n });\n });\n\n const cancelBtn = document.getElementById('lifecycleCancelRuleBtn');\n if (cancelBtn) {\n cancelBtn.addEventListener('click', function() {\n lifecycleEditor.editingIndex = null;\n lifecycleEditor.editingRule = null;\n renderLifecycleEditor();\n });\n }\n\n const addTagBtn = document.getElementById('lifecycleAddTagBtn');\n if (addTagBtn) {\n addTagBtn.addEventListener('click', function() {\n const rows = document.getElementById('lifecycleTagRows');\n const row = document.createElement('div');\n row.className = 'input-group input-group-sm mb-1 lifecycle-tag-row';\n row.innerHTML =\n '<input type=\"text\" class=\"form-control lifecycle-tag-key\" placeholder=\"Key\">' +\n '<input type=\"text\" class=\"form-control lifecycle-tag-value\" placeholder=\"Value\">' +\n '<button type=\"button\" class=\"btn btn-outline-danger lifecycle-remove-tag-btn\"><i class=\"bi bi-x\"><\\/i><\\/button>';\n rows.appendChild(row);\n row.querySelector('.lifecycle-remove-tag-btn').addEventListener('click', function() {\n row.remove();\n });\n });\n }\n\n document.querySelectorAll('.lifecycle-remove-tag-btn').forEach(btn => {\n btn.addEventListener('click', function() {\n this.closest('.lifecycle-tag-row').remove();\n });\n });\n\n bindLifecycleToggle('lifecycleExpireDaysEnabled', 'lifecycleExpireDays', 'lifecycleExpireDateEnabled');\n bindLifecycleToggle('lifecycleExpireDateEnabled', 'lifecycleExpireDate', 'lifecycleExpireDaysEnabled');\n bindLifecycleToggle('lifecycleNoncurrentEnabled', 'lifecycleNoncurrentDays');\n bindLifecycleToggle('lifecycleNoncurrentEnabled', 'lifecycleNoncurrentKeep');\n bindLifecycleToggle('lifecycleAbortMPUEnabled', 'lifecycleAbortMPUDays');\n\n const saveRuleBtn = document.getElementById('lifecycleSaveRuleBtn');\n if (saveRuleBtn) {\n saveRuleBtn.addEventListener('click', saveLifecycleRuleFromForm);\n }\n}\n\n// readLifecycleRuleFromForm builds and validates a rule from the currently\n// open edit form's DOM inputs. Returns { rule: null, error: '...' } when the\n// form doesn't hold a valid rule, without mutating any state.\nfunction readLifecycleRuleFromForm() {\n const id = document.getElementById('lifecycleRuleId').value.trim();\n const status = document.querySelector('input[name=\"lifecycleRuleStatus\"]:checked').value;\n const prefix = document.getElementById('lifecycleRulePrefix').value.trim();\n\n const tags = {};\n document.querySelectorAll('#lifecycleTagRows .lifecycle-tag-row').forEach(row => {\n const key = row.querySelector('.lifecycle-tag-key').value.trim();\n const value = row.querySelector('.lifecycle-tag-value').value.trim();\n if (key) {\n tags[key] = value;\n }\n });\n\n const sizeGT = parseInt(document.getElementById('lifecycleRuleSizeGT').value, 10) || 0;\n const sizeLT = parseInt(document.getElementById('lifecycleRuleSizeLT').value, 10) || 0;\n\n const expireDaysEnabled = document.getElementById('lifecycleExpireDaysEnabled').checked;\n const expireDateEnabled = document.getElementById('lifecycleExpireDateEnabled').checked;\n const expirationDays = expireDaysEnabled ? (parseInt(document.getElementById('lifecycleExpireDays').value, 10) || 0) : 0;\n const expirationDate = expireDateEnabled ? document.getElementById('lifecycleExpireDate').value : '';\n\n const deleteMarker = document.getElementById('lifecycleDeleteMarker').checked;\n\n const noncurrentEnabled = document.getElementById('lifecycleNoncurrentEnabled').checked;\n const noncurrentDays = noncurrentEnabled ? (parseInt(document.getElementById('lifecycleNoncurrentDays').value, 10) || 0) : 0;\n const noncurrentKeep = noncurrentEnabled ? (parseInt(document.getElementById('lifecycleNoncurrentKeep').value, 10) || 0) : 0;\n\n const abortEnabled = document.getElementById('lifecycleAbortMPUEnabled').checked;\n const abortDays = abortEnabled ? (parseInt(document.getElementById('lifecycleAbortMPUDays').value, 10) || 0) : 0;\n\n if (expireDaysEnabled && expirationDays <= 0) {\n return { rule: null, error: 'Enter a valid number of days for expiration.' };\n }\n if (expireDateEnabled && !expirationDate) {\n return { rule: null, error: 'Enter a valid expiration date.' };\n }\n if (noncurrentEnabled && noncurrentDays <= 0 && noncurrentKeep <= 0) {\n return { rule: null, error: 'Enter a number of days and/or a newest-versions-to-keep count for noncurrent version handling.' };\n }\n if (abortEnabled && abortDays <= 0) {\n return { rule: null, error: 'Enter a valid number of days for aborting incomplete multipart uploads.' };\n }\n if (!expireDaysEnabled && !expireDateEnabled && !deleteMarker && !noncurrentEnabled && !abortEnabled) {\n return { rule: null, error: 'Select at least one action for this rule.' };\n }\n // The server rejects this combination too; catching it here names the two\n // fields instead of surfacing a 400 after the whole set is submitted.\n if (deleteMarker && (expireDaysEnabled || expireDateEnabled)) {\n return { rule: null, error: 'Removing expired object delete markers cannot be combined with an expiration.' };\n }\n if (sizeGT > 0 && sizeLT > 0 && sizeGT >= sizeLT) {\n return { rule: null, error: '\"Size greater than\" must be less than \"size less than\".' };\n }\n\n return {\n rule: {\n id: id,\n status: status,\n prefix: prefix,\n tags: tags,\n size_greater_than: sizeGT > 0 ? sizeGT : null,\n size_less_than: sizeLT > 0 ? sizeLT : null,\n expiration_days: expirationDays > 0 ? expirationDays : null,\n expiration_date: expirationDate || '',\n expired_object_delete_marker: deleteMarker,\n noncurrent_version_expiration_days: noncurrentDays > 0 ? noncurrentDays : null,\n newer_noncurrent_versions: noncurrentKeep > 0 ? noncurrentKeep : null,\n abort_multipart_days: abortDays > 0 ? abortDays : null,\n },\n error: null,\n };\n}\n\nfunction saveLifecycleRuleFromForm() {\n const { rule, error } = readLifecycleRuleFromForm();\n if (error) {\n alert(error);\n return;\n }\n\n if (lifecycleEditor.editingIndex === 'new') {\n lifecycleEditor.rules.push(rule);\n } else {\n lifecycleEditor.rules[lifecycleEditor.editingIndex] = rule;\n }\n lifecycleEditor.editingIndex = null;\n lifecycleEditor.editingRule = null;\n renderLifecycleEditor();\n}\n\n// commitOpenLifecycleRuleForm folds an in-progress add/edit form into\n// lifecycleEditor.rules before the whole rule set is sent to the server, so\n// clicking the modal's \"Save\" without first clicking \"Save rule\" doesn't\n// silently drop the open edit. Returns false (and leaves the form open) when\n// the open form doesn't hold a valid rule, so the caller can abort the save.\nfunction commitOpenLifecycleRuleForm() {\n if (lifecycleEditor.editingIndex === null) {\n return true;\n }\n\n const { rule, error } = readLifecycleRuleFromForm();\n if (error) {\n alert(error);\n return false;\n }\n\n if (lifecycleEditor.editingIndex === 'new') {\n lifecycleEditor.rules.push(rule);\n } else {\n lifecycleEditor.rules[lifecycleEditor.editingIndex] = rule;\n }\n lifecycleEditor.editingIndex = null;\n lifecycleEditor.editingRule = null;\n renderLifecycleEditor();\n return true;\n}\n\n function goToPage(page) {\n const url = new URL(window.location);\n url.searchParams.set('page', page);\n window.location.href = url.toString();\n }\n\n function changePageSize() {\n const pageSize = document.getElementById('pageSizeSelect').value;\n const url = new URL(window.location);\n url.searchParams.set('pageSize', pageSize);\n url.searchParams.set('page', '1');\n window.location.href = url.toString();\n }\n\n function sortTable(column) {\n const url = new URL(window.location);\n const currentSort = url.searchParams.get('sortBy');\n const currentOrder = url.searchParams.get('sortOrder') || 'asc';\n\n let newOrder = 'asc';\n if (currentSort === column && currentOrder === 'asc') {\n newOrder = 'desc';\n }\n\n url.searchParams.set('sortBy', column);\n url.searchParams.set('sortOrder', newOrder);\n url.searchParams.set('page', '1');\n window.location.href = url.toString();\n }\n\n function exportBucketList() {\n // RFC 4180 compliant CSV escaping: escape double quotes by doubling them\n function escapeCsvField(value) {\n const str = String(value ?? '');\n if (str.includes(',') || str.includes('\"') || str.includes('\\n') || str.includes('\\r')) {\n return '\"' + str.replace(/\"/g, '\"\"') + '\"';\n }\n return '\"' + str + '\"';\n }\n\n // Fetch all buckets from the API (not just the current page)\n fetch(basePath('/api/s3/buckets'))\n .then(response => response.json())\n .then(data => {\n if (data.error) {\n alert('Error exporting buckets: ' + data.error);\n return;\n }\n\n const buckets = data.buckets || [];\n const csvContent = \"data:text/csv;charset=utf-8,\" +\n \"Name,Owner,Logical Size,Physical Size,Created,Quota,Versioning,Object Lock\\n\" +\n buckets.map(b => [\n escapeCsvField(b.name),\n escapeCsvField(b.owner),\n escapeCsvField(formatBytes(b.logical_size)),\n escapeCsvField(formatBytes(b.physical_size)),\n escapeCsvField(b.created_at),\n escapeCsvField(b.quota_enabled ? formatBytes(b.quota) : 'No quota'),\n escapeCsvField(b.versioning_status || 'Not configured'),\n escapeCsvField(b.object_lock_enabled ? 'Enabled' : 'Not configured')\n ].join(',')).join(\"\\n\");\n\n const encodedUri = encodeURI(csvContent);\n const link = document.createElement(\"a\");\n link.setAttribute(\"href\", encodedUri);\n link.setAttribute(\"download\", \"buckets.csv\");\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error exporting buckets: ' + error.message);\n });\n }\n </script>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "<!-- Bucket Policy Modal --><div class=\"modal fade\" id=\"bucketPolicyModal\" tabindex=\"-1\" aria-labelledby=\"bucketPolicyModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-xl\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"bucketPolicyModalLabel\"><i class=\"bi bi-file-earmark-lock me-2\"></i>Bucket Policy</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><div id=\"bucketPolicyLoading\" class=\"text-center py-4\"><div class=\"spinner-border text-primary\" role=\"status\"><span class=\"visually-hidden\">Loading...</span></div><div class=\"mt-2\">Loading bucket policy...</div></div><div id=\"bucketPolicyError\" class=\"alert alert-danger\" style=\"display: none;\"></div><div id=\"bucketPolicyEditorWrapper\" style=\"display: none;\"><p class=\"text-muted small\">Every statement must specify a Principal, and every Resource must refer to this bucket. Leave the document empty and click Delete to remove the policy.</p><ul class=\"nav nav-tabs\" role=\"tablist\"><li class=\"nav-item\" role=\"presentation\"><button class=\"nav-link active\" id=\"bucketPolicyEditorTabBtn\" type=\"button\" data-bs-toggle=\"tab\" data-bs-target=\"#bucketPolicyEditorTab\" role=\"tab\" aria-controls=\"bucketPolicyEditorTab\" aria-selected=\"true\">Editor</button></li><li class=\"nav-item\" role=\"presentation\"><button class=\"nav-link\" id=\"bucketPolicyJsonTabBtn\" type=\"button\" data-bs-toggle=\"tab\" data-bs-target=\"#bucketPolicyJsonTab\" role=\"tab\" aria-controls=\"bucketPolicyJsonTab\" aria-selected=\"false\">JSON</button></li></ul><div class=\"tab-content border border-top-0 rounded-bottom p-3 mb-3\"><div class=\"tab-pane fade show active\" id=\"bucketPolicyEditorTab\" role=\"tabpanel\" aria-labelledby=\"bucketPolicyEditorTabBtn\"><div id=\"bucketPolicyEditorBody\"></div><button type=\"button\" class=\"btn btn-sm btn-outline-secondary\" id=\"bucketPolicyAddStatementBtn\"><i class=\"bi bi-plus me-1\"></i>Add statement</button></div><div class=\"tab-pane fade\" id=\"bucketPolicyJsonTab\" role=\"tabpanel\" aria-labelledby=\"bucketPolicyJsonTabBtn\"><textarea class=\"form-control\" id=\"bucketPolicyDocument\" rows=\"15\" style=\"font-family: monospace;\" spellcheck=\"false\" placeholder='{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"s3:GetObject\",\"Resource\":\"arn:aws:s3:::bucket-name/*\"}]}'></textarea><div class=\"form-text\">Enter the bucket policy document as JSON</div></div></div><div class=\"mb-3\"><button type=\"button\" class=\"btn btn-outline-info btn-sm\" id=\"bucketPolicyInsertSampleBtn\"><i class=\"bi bi-file-earmark-text me-1\"></i>Use Sample Policy</button></div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-outline-danger me-auto\" id=\"bucketPolicyDeleteBtn\"><i class=\"bi bi-trash me-1\"></i>Delete</button> <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-primary\" id=\"bucketPolicySaveBtn\"><i class=\"bi bi-floppy me-1\"></i>Save</button></div></div></div></div><!-- Manage Owner Modal --><div class=\"modal fade\" id=\"manageOwnerModal\" tabindex=\"-1\" aria-labelledby=\"manageOwnerModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"manageOwnerModalLabel\"><i class=\"bi bi-person-gear me-2\"></i>Manage Bucket Owner</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"ownerForm\"><div class=\"modal-body\"><div class=\"mb-3\"><label class=\"form-label\">Bucket Name</label> <input type=\"text\" class=\"form-control\" id=\"ownerBucketName\" readonly></div><div class=\"mb-3\"><label for=\"bucketOwnerSelect\" class=\"form-label\">Owner</label> <select class=\"form-select\" id=\"bucketOwnerSelect\" name=\"owner\"><option value=\"\">No owner (admin-only access)</option><!-- Options will be populated dynamically --></select><div class=\"form-text\">Select the S3 identity that owns this bucket. Non-admin users can only access buckets they own.</div></div><div id=\"ownerLoadingSpinner\" class=\"text-center py-2\" style=\"display: none;\"><div class=\"spinner-border spinner-border-sm text-primary\" role=\"status\"><span class=\"visually-hidden\">Loading users...</span></div><span class=\"ms-2\">Loading users...</span></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"submit\" class=\"btn btn-info\"><i class=\"bi bi-floppy me-1\"></i>Update Owner</button></div></form></div></div></div><!-- JavaScript for bucket management --><script>\n // Global state (shared between DOMContentLoaded handlers and global functions)\n let deleteModalInstance = null;\n let quotaModalInstance = null;\n let ownerModalInstance = null;\n let detailsModalInstance = null;\n let lifecycleModalInstance = null;\n let lifecycleRequestSeq = 0;\n let policyModalInstance = null;\n let policyRequestSeq = 0;\n let policyEditorBucket = null;\n // True only once the bucket-policy GET for the currently open bucket has\n // actually completed successfully. The Save button lives outside the\n // (initially hidden) editor wrapper, so it stays clickable while a load\n // is in flight or has failed; without this guard, Save could commit\n // whatever the editor happened to hold - a stale previous bucket's\n // statements, or a freshly-initialized empty state - onto\n // policyEditorBucket before its own policy ever loaded.\n let bucketPolicyLoaded = false;\n // True while a Save (PUT) or Delete (DELETE) request for the bucket\n // policy is in flight, so a double-click - or Save and Delete fired in\n // quick succession - can't send two overlapping mutations for the same\n // bucket. Cleared on failure so the user can retry; left set on success,\n // since the modal hides and the page reloads shortly after anyway.\n let bucketPolicyMutationInFlight = false;\n\n function setBucketPolicyMutationInFlight(inFlight) {\n bucketPolicyMutationInFlight = inFlight;\n document.getElementById('bucketPolicySaveBtn').disabled = inFlight;\n document.getElementById('bucketPolicyDeleteBtn').disabled = inFlight;\n }\n\n let cachedUsers = null;\n\n // Working copy of the lifecycle rules currently shown in the modal.\n // Edits (add/edit/delete rule) only mutate this local state; nothing is\n // sent to the server until \"Save\" or \"Delete all rules\" is clicked.\n let lifecycleEditor = { bucket: null, rules: [], editingIndex: null, editingRule: null, rawXml: '', hasTransition: false };\n\n function escapeHtml(v) {\n return String(v ?? '')\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n }\n\n // Shadows admin.js's formatBytes for this page, so it keeps that\n // signature and unit list; the extra guard is for a size the API left\n // out, which the shared one renders as \"NaN undefined\".\n function formatBytes(bytes, decimals = 2) {\n if (!bytes) return '0 Bytes';\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB'];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n }\n\n function formatDays(n) {\n return n + (n === 1 ? ' day' : ' days');\n }\n\n // csrfHeaders reads the token the layout stamps into every page\n // (<meta name=\"csrf-token\">) so mutating lifecycle requests pass it the\n // same way the newer admin pages (e.g. s3tables) do.\n function csrfHeaders() {\n const meta = document.querySelector('meta[name=\"csrf-token\"]');\n const token = meta ? (meta.getAttribute('content') || '') : '';\n const headers = { 'Content-Type': 'application/json' };\n if (token) {\n headers['X-CSRF-Token'] = token;\n }\n return headers;\n }\n\n // parseLifecycleResponse reads the body as text before parsing, so a\n // non-JSON response (a proxy's HTML error page, an empty body, plain\n // text from some middleware) surfaces the HTTP status instead of\n // throwing a raw JSON syntax error out of response.json().\n function parseLifecycleResponse(response) {\n return response.text().then(text => {\n let data = {};\n if (text) {\n try {\n data = JSON.parse(text);\n } catch (e) {\n data = { error: response.statusText || ('HTTP ' + response.status) };\n }\n } else if (!response.ok) {\n data = { error: response.statusText || ('HTTP ' + response.status) };\n }\n return { ok: response.ok, data: data };\n });\n }\n\n document.addEventListener('DOMContentLoaded', function() {\n // Add click handlers to pagination links\n document.querySelectorAll('.pagination-link').forEach(link => {\n link.addEventListener('click', function(e) {\n e.preventDefault();\n const page = this.getAttribute('data-page');\n goToPage(page);\n });\n });\n\n // Initialize modal instances once (reuse with show/hide)\n deleteModalInstance = new bootstrap.Modal(document.getElementById('deleteBucketModal'));\n quotaModalInstance = new bootstrap.Modal(document.getElementById('manageQuotaModal'));\n ownerModalInstance = new bootstrap.Modal(document.getElementById('manageOwnerModal'));\n detailsModalInstance = new bootstrap.Modal(document.getElementById('bucketDetailsModal'));\n lifecycleModalInstance = new bootstrap.Modal(document.getElementById('bucketLifecycleModal'));\n policyModalInstance = new bootstrap.Modal(document.getElementById('bucketPolicyModal'));\n\n const quotaCheckbox = document.getElementById('enableQuota');\n const quotaSettings = document.getElementById('quotaSettings');\n const versioningCheckbox = document.getElementById('enableVersioning');\n const objectLockCheckbox = document.getElementById('enableObjectLock');\n const objectLockSettings = document.getElementById('objectLockSettings');\n const setDefaultRetentionCheckbox = document.getElementById('setDefaultRetention');\n const defaultRetentionSettings = document.getElementById('defaultRetentionSettings');\n const createBucketForm = document.getElementById('createBucketForm');\n\n // Toggle quota settings\n quotaCheckbox.addEventListener('change', function() {\n quotaSettings.style.display = this.checked ? 'block' : 'none';\n });\n\n // Toggle object lock settings and automatically enable versioning\n objectLockCheckbox.addEventListener('change', function() {\n objectLockSettings.style.display = this.checked ? 'block' : 'none';\n if (this.checked) {\n versioningCheckbox.checked = true;\n versioningCheckbox.disabled = true;\n } else {\n versioningCheckbox.disabled = false;\n // Reset default retention settings when object lock is disabled\n setDefaultRetentionCheckbox.checked = false;\n defaultRetentionSettings.style.display = 'none';\n }\n });\n\n // Toggle default retention settings\n setDefaultRetentionCheckbox.addEventListener('change', function() {\n defaultRetentionSettings.style.display = this.checked ? 'block' : 'none';\n });\n\n // Populate owner dropdown when create bucket modal opens\n document.getElementById('createBucketModal').addEventListener('show.bs.modal', async function() {\n const ownerSelect = document.getElementById('bucketOwner');\n \n // Only fetch if not already populated\n if (ownerSelect.options.length <= 1) {\n try {\n const response = await fetch(basePath('/api/users'));\n const data = await response.json();\n const users = data.users || [];\n \n users.forEach(user => {\n const option = document.createElement('option');\n option.value = user.username;\n option.textContent = user.username;\n ownerSelect.appendChild(option);\n });\n } catch (error) {\n console.error('Error fetching users for owner dropdown:', error);\n // Reset to default state on error - user can still create bucket without owner\n ownerSelect.innerHTML = '<option value=\"\">No owner (admin-only access)</option>';\n ownerSelect.selectedIndex = 0;\n }\n }\n });\n\n // Handle form submission\n createBucketForm.addEventListener('submit', function(e) {\n e.preventDefault();\n \n const formData = new FormData(this);\n const data = {\n name: formData.get('name'),\n owner: formData.get('owner') || '',\n region: formData.get('region') || '',\n quota_size: quotaCheckbox.checked ? parseInt(formData.get('quota_size')) || 0 : 0,\n quota_unit: formData.get('quota_unit') || 'MB',\n quota_enabled: quotaCheckbox.checked,\n versioning_enabled: versioningCheckbox.checked,\n object_lock_enabled: objectLockCheckbox.checked,\n object_lock_mode: formData.get('object_lock_mode') || 'GOVERNANCE',\n set_default_retention: setDefaultRetentionCheckbox.checked,\n object_lock_duration: setDefaultRetentionCheckbox.checked ? parseInt(formData.get('object_lock_duration')) || 30 : 0\n };\n\n // Validate object lock settings\n if (data.object_lock_enabled && data.set_default_retention && data.object_lock_duration <= 0) {\n alert('Please enter a valid retention duration for object lock.');\n return;\n }\n\n fetch(basePath('/api/s3/buckets'), {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data)\n })\n .then(response => response.json())\n .then(data => {\n if (data.error) {\n alert('Error creating bucket: ' + data.error);\n } else {\n alert('Bucket created successfully!');\n // Properly close the modal before reloading\n const createModal = bootstrap.Modal.getInstance(document.getElementById('createBucketModal'));\n if (createModal) {\n createModal.hide();\n }\n setTimeout(() => location.reload(), 500);\n }\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error creating bucket: ' + error.message);\n });\n });\n\n // Handle delete bucket\n const deleteForm = document.getElementById('deleteBucketModal');\n document.querySelectorAll('.delete-bucket-btn').forEach(button => {\n button.addEventListener('click', function() {\n const bucketName = this.dataset.bucketName;\n document.getElementById('deleteBucketName').textContent = bucketName;\n // Store bucket name on modal element instead of global window property\n deleteForm.dataset.bucketName = bucketName;\n deleteModalInstance.show();\n });\n });\n\n // Handle quota management\n const quotaForm = document.getElementById('quotaForm');\n document.querySelectorAll('.quota-btn').forEach(button => {\n button.addEventListener('click', function() {\n const bucketName = this.dataset.bucketName;\n const currentQuota = parseInt(this.dataset.currentQuota);\n const quotaEnabled = this.dataset.quotaEnabled === 'true';\n \n document.getElementById('quotaBucketName').value = bucketName;\n document.getElementById('quotaEnabled').checked = quotaEnabled;\n document.getElementById('quotaSizeMB').value = currentQuota;\n \n // Toggle quota size settings\n document.getElementById('quotaSizeSettings').style.display = quotaEnabled ? 'block' : 'none';\n \n // Store bucket name on form element instead of global window property\n quotaForm.dataset.bucketName = bucketName;\n quotaModalInstance.show();\n });\n });\n\n // Add event listener to properly dispose of quota modal when hidden\n document.getElementById('manageQuotaModal').addEventListener('hidden.bs.modal', function() {\n if (quotaModalInstance) {\n quotaModalInstance.dispose();\n quotaModalInstance = null;\n }\n // Force remove any remaining backdrops\n document.querySelectorAll('.modal-backdrop').forEach(backdrop => {\n backdrop.remove();\n });\n // Ensure body classes are removed\n document.body.classList.remove('modal-open');\n document.body.style.removeProperty('padding-right');\n });\n\n // Handle quota form submission\n document.getElementById('quotaForm').addEventListener('submit', function(e) {\n e.preventDefault();\n \n const bucketName = this.dataset.bucketName;\n if (!bucketName) return;\n\n const formData = new FormData(this);\n const enabled = document.getElementById('quotaEnabled').checked;\n const data = {\n quota_size: enabled ? parseInt(formData.get('quota_size')) || 0 : 0,\n quota_unit: formData.get('quota_unit') || 'MB',\n quota_enabled: enabled\n };\n\n fetch(basePath(`/api/s3/buckets/${bucketName}/quota`), {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data)\n })\n .then(response => response.json())\n .then(data => {\n if (data.error) {\n alert('Error updating quota: ' + data.error);\n } else {\n alert('Quota updated successfully!');\n // Properly close the modal before reloading\n if (quotaModalInstance) {\n quotaModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n }\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error updating quota: ' + error.message);\n });\n });\n\n // Handle quota enabled checkbox\n document.getElementById('quotaEnabled').addEventListener('change', function() {\n document.getElementById('quotaSizeSettings').style.display = this.checked ? 'block' : 'none';\n });\n\n // Handle owner management\n const ownerForm = document.getElementById('ownerForm');\n document.querySelectorAll('.owner-btn').forEach(button => {\n button.addEventListener('click', async function() {\n const bucketName = this.dataset.bucketName;\n const currentOwner = this.dataset.currentOwner || '';\n \n document.getElementById('ownerBucketName').value = bucketName;\n // Store bucket name on form element instead of global window property\n ownerForm.dataset.bucketName = bucketName;\n \n // Show loading spinner\n document.getElementById('ownerLoadingSpinner').style.display = 'block';\n document.getElementById('bucketOwnerSelect').disabled = true;\n \n ownerModalInstance.show();\n \n // Fetch users if not cached\n try {\n if (!cachedUsers) {\n const response = await fetch(basePath('/api/users'));\n const data = await response.json();\n cachedUsers = data.users || [];\n }\n \n // Populate the select dropdown\n const select = document.getElementById('bucketOwnerSelect');\n select.innerHTML = '<option value=\"\">No owner (admin-only access)</option>';\n \n cachedUsers.forEach(user => {\n const option = document.createElement('option');\n option.value = user.username;\n option.textContent = user.username;\n if (user.username === currentOwner) {\n option.selected = true;\n }\n select.appendChild(option);\n });\n \n select.disabled = false;\n } catch (error) {\n console.error('Error fetching users:', error);\n alert('Error loading users: ' + error.message);\n // Re-enable select and reset to default on error\n const select = document.getElementById('bucketOwnerSelect');\n select.innerHTML = '<option value=\"\">No owner (admin-only access)</option>';\n select.selectedIndex = 0;\n select.disabled = false;\n } finally {\n document.getElementById('ownerLoadingSpinner').style.display = 'none';\n }\n });\n });\n\n // Handle owner form submission\n document.getElementById('ownerForm').addEventListener('submit', function(e) {\n e.preventDefault();\n \n const bucketName = this.dataset.bucketName;\n if (!bucketName) return;\n\n const owner = document.getElementById('bucketOwnerSelect').value;\n const data = { owner: owner };\n\n fetch(basePath(`/api/s3/buckets/${bucketName}/owner`), {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data)\n })\n .then(response => response.json())\n .then(data => {\n if (data.error) {\n alert('Error updating owner: ' + data.error);\n } else {\n alert('Bucket owner updated successfully!');\n // Properly close the modal before reloading\n if (ownerModalInstance) {\n ownerModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n }\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error updating owner: ' + error.message);\n });\n });\n\n // Handle view details button\n document.querySelectorAll('.view-details-btn').forEach(button => {\n button.addEventListener('click', function() {\n const bucketName = this.dataset.bucketName;\n \n // Update modal title\n document.getElementById('bucketDetailsModalLabel').innerHTML = \n '<i class=\"bi bi-box me-2\"></i>Bucket Details - ' + bucketName;\n \n // Show loading spinner\n document.getElementById('bucketDetailsContent').innerHTML = \n '<div class=\"text-center py-4\">' +\n '<div class=\"spinner-border text-primary\" role=\"status\">' +\n '<span class=\"visually-hidden\">Loading...</span>' +\n '<\\\\/div>' +\n '<div class=\"mt-2\">Loading bucket details...</div>' +\n '<\\\\/div>';\n \n detailsModalInstance.show();\n \n // Fetch bucket details\n fetch(basePath('/api/s3/buckets/' + bucketName))\n .then(response => response.json())\n .then(data => {\n if (data.error) {\n document.getElementById('bucketDetailsContent').innerHTML = \n '<div class=\"alert alert-danger\">' +\n '<i class=\"bi bi-exclamation-triangle me-2\"></i>' +\n 'Error loading bucket details: ' + data.error +\n '<\\\\/div>';\n } else {\n displayBucketDetails(data);\n }\n })\n .catch(error => {\n console.error('Error fetching bucket details:', error);\n document.getElementById('bucketDetailsContent').innerHTML = \n '<div class=\"alert alert-danger\">' +\n '<i class=\"bi bi-exclamation-triangle me-2\"></i>' +\n 'Error loading bucket details: ' + error.message +\n '<\\\\/div>';\n });\n });\n });\n\n // Lifecycle buttons: column badge and action button\n document.querySelectorAll('.lifecycle-btn').forEach(button => {\n button.addEventListener('click', function() {\n const bucketName = this.dataset.bucketName;\n\n // Reset the working copy until the GET below repopulates it,\n // so Save/Delete-all can't act on the previous bucket's rules.\n lifecycleEditor = { bucket: null, rules: [], editingIndex: null, editingRule: null, rawXml: '', hasTransition: false };\n\n document.getElementById('bucketLifecycleModalLabel').innerHTML =\n '<i class=\"bi bi-recycle me-2\"></i>Lifecycle - ' + bucketName;\n\n document.getElementById('bucketLifecycleContent').innerHTML =\n '<div class=\"text-center py-4\">' +\n '<div class=\"spinner-border text-primary\" role=\"status\">' +\n '<span class=\"visually-hidden\">Loading...</span>' +\n '<\\/div>' +\n '<div class=\"mt-2\">Loading lifecycle rules...</div>' +\n '<\\/div>';\n\n lifecycleModalInstance.show();\n\n // Drop responses that arrive after another bucket was opened\n const requestSeq = ++lifecycleRequestSeq;\n fetch(basePath('/api/s3/buckets/' + bucketName + '/lifecycle'))\n .then(parseLifecycleResponse)\n .then(({ ok, data }) => {\n if (requestSeq !== lifecycleRequestSeq) return;\n if (!ok || data.error) {\n document.getElementById('bucketLifecycleContent').innerHTML =\n '<div class=\"alert alert-danger\">' +\n '<i class=\"bi bi-exclamation-triangle me-2\"></i>' +\n 'Error loading lifecycle rules: ' + (data.error || 'unknown error') +\n '<\\/div>';\n } else {\n displayBucketLifecycle(data);\n }\n })\n .catch(error => {\n if (requestSeq !== lifecycleRequestSeq) return;\n console.error('Error fetching bucket lifecycle:', error);\n document.getElementById('bucketLifecycleContent').innerHTML =\n '<div class=\"alert alert-danger\">' +\n '<i class=\"bi bi-exclamation-triangle me-2\"></i>' +\n 'Error loading lifecycle rules: ' + error.message +\n '<\\/div>';\n });\n });\n });\n\n // Save the whole working rule set back to the bucket.\n document.getElementById('lifecycleSaveAllBtn').addEventListener('click', function() {\n if (!lifecycleEditor.bucket) return;\n // Fold in any rule the user is still editing so Save doesn't\n // silently discard it; abort if that form isn't valid yet.\n if (!commitOpenLifecycleRuleForm()) return;\n // An empty list clears the configuration, same as Delete all rules,\n // so it gets the same prompt.\n if (lifecycleEditor.rules.length === 0 &&\n !confirm('No rules left: saving removes the lifecycle configuration for ' + lifecycleEditor.bucket + '. This cannot be undone.')) {\n return;\n }\n\n fetch(basePath('/api/s3/buckets/' + lifecycleEditor.bucket + '/lifecycle'), {\n method: 'PUT',\n headers: csrfHeaders(),\n body: JSON.stringify({ rules: lifecycleEditor.rules })\n })\n .then(parseLifecycleResponse)\n .then(({ ok, data }) => {\n if (!ok || data.error) {\n alert('Error saving lifecycle rules: ' + (data.error || 'unknown error'));\n return;\n }\n if (lifecycleModalInstance) {\n lifecycleModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error saving lifecycle rules: ' + error.message);\n });\n });\n\n // Clear the lifecycle configuration entirely.\n document.getElementById('lifecycleDeleteAllBtn').addEventListener('click', function() {\n if (!lifecycleEditor.bucket) return;\n if (!confirm('Delete all lifecycle rules for ' + lifecycleEditor.bucket + '? This cannot be undone.')) return;\n\n fetch(basePath('/api/s3/buckets/' + lifecycleEditor.bucket + '/lifecycle'), {\n method: 'DELETE',\n headers: csrfHeaders()\n })\n .then(parseLifecycleResponse)\n .then(({ ok, data }) => {\n if (!ok || data.error) {\n alert('Error deleting lifecycle rules: ' + (data.error || 'unknown error'));\n return;\n }\n if (lifecycleModalInstance) {\n lifecycleModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error deleting lifecycle rules: ' + error.message);\n });\n });\n\n // Policy buttons: column badge and action button. The visual editor\n // (weed/admin/static/js/policy_editor.js) is set up once per page\n // load; registerPolicyEditor is re-called on every open so the\n // resource-ARN autocomplete and default Principal stay pinned to\n // whichever bucket is currently open.\n let bucketPolicyEditorSetUp = false;\n document.getElementById('bucketPolicyInsertSampleBtn').addEventListener('click', function() {\n if (!policyEditorBucket) return;\n insertSamplePolicy('bucket', {\n Version: '2012-10-17',\n Statement: [{\n Effect: 'Allow',\n Principal: '*',\n Action: ['s3:GetObject'],\n Resource: ['arn:aws:s3:::' + policyEditorBucket + '/*']\n }]\n });\n });\n\n document.querySelectorAll('.policy-btn').forEach(button => {\n button.addEventListener('click', function() {\n const bucketName = this.dataset.bucketName;\n policyEditorBucket = bucketName;\n bucketPolicyLoaded = false;\n // Deliberately not resetting bucketPolicyMutationInFlight\n // here: if a Save/Delete for a previously open bucket is\n // still in flight, Save/Delete for this bucket must stay\n // blocked until that request settles (its own completion\n // handler releases the flag once done, whether or not it's\n // still the active bucket by then) - otherwise this bucket's\n // mutation could race the abandoned one.\n registerPolicyEditor('bucket', { requirePrincipal: true, bucket: bucketName });\n if (!bucketPolicyEditorSetUp) {\n setupPolicyEditor('bucket');\n bucketPolicyEditorSetUp = true;\n }\n\n document.getElementById('bucketPolicyModalLabel').innerHTML =\n '<i class=\"bi bi-file-earmark-lock me-2\"></i>Bucket Policy - ' + escapeHtml(bucketName);\n document.getElementById('bucketPolicyLoading').style.display = '';\n document.getElementById('bucketPolicyError').style.display = 'none';\n document.getElementById('bucketPolicyEditorWrapper').style.display = 'none';\n\n policyModalInstance.show();\n\n // Drop responses that arrive after another bucket was opened\n const requestSeq = ++policyRequestSeq;\n fetch(basePath('/api/s3/buckets/' + encodeURIComponent(bucketName) + '/policy'))\n .then(parseLifecycleResponse)\n .then(({ ok, data }) => {\n if (requestSeq !== policyRequestSeq) return;\n document.getElementById('bucketPolicyLoading').style.display = 'none';\n if (!ok || data.error) {\n document.getElementById('bucketPolicyError').textContent =\n 'Error loading bucket policy: ' + (data.error || 'unknown error');\n document.getElementById('bucketPolicyError').style.display = '';\n return;\n }\n document.getElementById('bucketPolicyEditorWrapper').style.display = '';\n // policy_text carries stored bytes the server-side\n // decoder rejects; the JSON tab shows them so they\n // can be fixed or deleted.\n document.getElementById('bucketPolicyDocument').value =\n data.policy ? JSON.stringify(data.policy, null, 2) : (data.policy_text || '');\n bucketPolicyLoaded = true;\n loadPolicyTextareaIntoEditor('bucket');\n })\n .catch(error => {\n if (requestSeq !== policyRequestSeq) return;\n console.error('Error fetching bucket policy:', error);\n document.getElementById('bucketPolicyLoading').style.display = 'none';\n document.getElementById('bucketPolicyError').textContent =\n 'Error loading bucket policy: ' + error.message;\n document.getElementById('bucketPolicyError').style.display = '';\n });\n });\n });\n\n // Save the policy document currently shown (whichever tab is active).\n document.getElementById('bucketPolicySaveBtn').addEventListener('click', function() {\n if (!policyEditorBucket) return;\n if (bucketPolicyMutationInFlight) return;\n if (!bucketPolicyLoaded) {\n alert('The current policy has not finished loading. Close and reopen this dialog before saving.');\n return;\n }\n\n // Commit first: if the Editor tab is active, the textarea still\n // holds whatever was there at load time until this runs, so a\n // policy entered purely through the structured form (no tab\n // switch) would otherwise read back as empty here.\n if (!commitPolicyActiveTab('bucket')) return;\n\n const raw = document.getElementById('bucketPolicyDocument').value.trim();\n if (!raw || !policyTextHasStatements(raw)) {\n alert('Add at least one statement, or use Delete to remove the bucket policy.');\n return;\n }\n\n let policy;\n try {\n policy = JSON.parse(document.getElementById('bucketPolicyDocument').value);\n } catch (e) {\n alert('Invalid JSON: ' + e.message);\n return;\n }\n const validationError = validatePolicyEditorDoc('bucket', policy);\n if (validationError) {\n alert(validationError);\n return;\n }\n // The admin API decodes only Version and Statement, so warn\n // before other top-level fields are silently dropped - the IAM\n // policies page already does. (The S3 Tables dialogs don't:\n // their backend stores the document verbatim.)\n if (!confirmPolicyFieldDiscard('bucket')) return;\n\n // Captured now: if the dialog moves on to a different bucket\n // before this PUT resolves, the completion below must not hide\n // or reload over whatever that other bucket is now showing.\n const targetBucket = policyEditorBucket;\n setBucketPolicyMutationInFlight(true);\n fetch(basePath('/api/s3/buckets/' + encodeURIComponent(targetBucket) + '/policy'), {\n method: 'PUT',\n headers: csrfHeaders(),\n body: JSON.stringify({ policy: policy })\n })\n .then(parseLifecycleResponse)\n .then(({ ok, data }) => {\n setBucketPolicyMutationInFlight(false);\n const stillCurrent = targetBucket === policyEditorBucket;\n if (!ok || data.error) {\n if (stillCurrent) {\n alert('Error saving bucket policy: ' + (data.error || 'unknown error'));\n } else {\n console.error('Error saving policy for ' + targetBucket + ' (no longer the open bucket): ' + (data.error || 'unknown error'));\n }\n return;\n }\n if (!stillCurrent) return;\n if (policyModalInstance) {\n policyModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n })\n .catch(error => {\n setBucketPolicyMutationInFlight(false);\n console.error('Error:', error);\n if (targetBucket === policyEditorBucket) {\n alert('Error saving bucket policy: ' + error.message);\n }\n });\n });\n\n // Clear the bucket policy entirely.\n document.getElementById('bucketPolicyDeleteBtn').addEventListener('click', function() {\n if (!policyEditorBucket) return;\n if (bucketPolicyMutationInFlight) return;\n if (!bucketPolicyLoaded) {\n alert('The current policy has not finished loading. Close and reopen this dialog before deleting.');\n return;\n }\n if (!confirm('Delete the bucket policy for ' + policyEditorBucket + '? This cannot be undone.')) return;\n\n // Captured now: if the dialog moves on to a different bucket\n // before this DELETE resolves, the completion below must not\n // hide or reload over whatever that other bucket is now showing.\n const targetBucket = policyEditorBucket;\n setBucketPolicyMutationInFlight(true);\n fetch(basePath('/api/s3/buckets/' + encodeURIComponent(targetBucket) + '/policy'), {\n method: 'DELETE',\n headers: csrfHeaders()\n })\n .then(parseLifecycleResponse)\n .then(({ ok, data }) => {\n setBucketPolicyMutationInFlight(false);\n const stillCurrent = targetBucket === policyEditorBucket;\n if (!ok || data.error) {\n if (stillCurrent) {\n alert('Error deleting bucket policy: ' + (data.error || 'unknown error'));\n } else {\n console.error('Error deleting policy for ' + targetBucket + ' (no longer the open bucket): ' + (data.error || 'unknown error'));\n }\n return;\n }\n if (!stillCurrent) return;\n if (policyModalInstance) {\n policyModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n })\n .catch(error => {\n setBucketPolicyMutationInFlight(false);\n console.error('Error:', error);\n if (targetBucket === policyEditorBucket) {\n alert('Error deleting bucket policy: ' + error.message);\n }\n });\n });\n });\n\n function deleteBucket() {\n const bucketName = document.getElementById('deleteBucketModal').dataset.bucketName;\n if (!bucketName) return;\n\n fetch(basePath(`/api/s3/buckets/${bucketName}`), {\n method: 'DELETE'\n })\n .then(response => response.json())\n .then(data => {\n if (data.error) {\n alert('Error deleting bucket: ' + data.error);\n } else {\n alert('Bucket deleted successfully!');\n // Properly close the modal before reloading\n if (deleteModalInstance) {\n deleteModalInstance.hide();\n }\n setTimeout(() => location.reload(), 500);\n }\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error deleting bucket: ' + error.message);\n });\n }\n\nfunction displayBucketDetails(data) {\n const bucket = data.bucket;\n\n function formatDate(dateString) {\n const date = new Date(dateString);\n return date.toLocaleString();\n }\n\n let ownerHtml = '<span class=\"text-muted\">No owner (admin-only)</span>';\n if (bucket.owner) {\n ownerHtml = '<span class=\"badge bg-info\"><i class=\"bi bi-person me-1\"></i>' + escapeHtml(bucket.owner) + '</span>';\n }\n\n let usageHtml = '';\n if (bucket.physical_size > 0 && bucket.logical_size > 0 && bucket.physical_size > bucket.logical_size) {\n const overhead = (bucket.physical_size / bucket.logical_size).toFixed(1);\n usageHtml = '<br><small class=\"text-muted\">' + overhead + 'x overhead<\\/small>';\n }\n\n let quotaHtml = '<span class=\"badge bg-secondary\">Disabled</span>';\n if (bucket.quota_enabled) {\n quotaHtml = '<span class=\"badge bg-success\">' + formatBytes(bucket.quota) + '</span>';\n }\n\n let versioningHtml = '<span class=\"text-muted\">Not configured</span>';\n if (bucket.versioning_status === 'Enabled') {\n versioningHtml = '<span class=\"badge bg-success\"><i class=\"bi bi-check me-1\"></i>Enabled</span>';\n } else if (bucket.versioning_status === 'Suspended') {\n versioningHtml = '<span class=\"badge bg-warning\"><i class=\"bi bi-pause me-1\"></i>Suspended</span>';\n }\n\n let statusHtml = '<span class=\"badge bg-success\">Writable</span>';\n if (bucket.read_only) {\n statusHtml = '<span class=\"badge bg-danger\"><i class=\"bi bi-lock me-1\"></i>Read-only</span>';\n }\n\n let objectLockHtml = '<span class=\"text-muted\">Not configured</span>';\n if (bucket.object_lock_enabled) {\n let details = '';\n if (bucket.object_lock_mode && bucket.object_lock_duration > 0) {\n details = '<br><small class=\"text-muted\">' + escapeHtml(bucket.object_lock_mode) + ' • ' + bucket.object_lock_duration + ' days<\\/small>';\n }\n objectLockHtml = '<span class=\"badge bg-warning\"><i class=\"bi bi-lock me-1\"></i>Enabled</span>' + details;\n }\n\n let policyHtml = '<span class=\"text-muted\">Not configured</span>';\n if (bucket.policy_statement_count > 0) {\n const label = bucket.policy_statement_count === 1 ? '1 statement' : bucket.policy_statement_count + ' statements';\n policyHtml = '<span class=\"badge bg-primary\">' + label + '<\\/span>';\n }\n\n const rows = [\n '<div class=\"row\">',\n '<div class=\"col-md-6\">',\n '<h6><i class=\"bi bi-info-circle me-2\"></i>Bucket Information</h6>',\n '<table class=\"table table-sm\">',\n '<tr><td><strong>Name:</strong></td><td>' + escapeHtml(bucket.name) + '<\\/td><\\/tr>',\n '<tr><td><strong>Owner:</strong></td><td>' + ownerHtml + '<\\/td><\\/tr>',\n '<tr><td><strong>Created:</strong></td><td>' + formatDate(bucket.created_at) + '<\\/td><\\/tr>',\n '<tr><td><strong>Last Modified:</strong></td><td>' + formatDate(bucket.last_modified) + '<\\/td><\\/tr>',\n '<tr><td><strong>Logical Size:</strong></td><td>' + formatBytes(bucket.logical_size) + '<\\/td><\\/tr>',\n '<tr><td><strong>Physical Size:</strong></td><td>' + formatBytes(bucket.physical_size) + usageHtml + '<\\/td><\\/tr>',\n '<\\/table>',\n '<\\/div>',\n '<div class=\"col-md-6\">',\n '<h6><i class=\"bi bi-gear-wide-connected me-2\"></i>Configuration</h6>',\n '<table class=\"table table-sm\">',\n '<tr><td><strong>Status:</strong></td><td>' + statusHtml + '<\\/td><\\/tr>',\n '<tr><td><strong>Quota:</strong></td><td>' + quotaHtml + '<\\/td><\\/tr>',\n '<tr><td><strong>Versioning:</strong></td><td>' + versioningHtml + '<\\/td><\\/tr>',\n '<tr><td><strong>Object Lock:</strong></td><td>' + objectLockHtml + '<\\/td><\\/tr>',\n '<tr><td><strong>Policy:</strong></td><td>' + policyHtml + '<\\/td><\\/tr>',\n '<\\/table>',\n '<\\/div>',\n '<\\/div>'\n ];\n\n document.getElementById('bucketDetailsContent').innerHTML = rows.join('');\n}\n\n// displayBucketLifecycle loads the GET response into the local working copy\n// and renders the editor. Nothing is sent back to the server until Save or\n// Delete all rules is clicked.\nfunction displayBucketLifecycle(data) {\n lifecycleEditor.bucket = data.bucket || lifecycleEditor.bucket;\n lifecycleEditor.rules = (data.rules || []).map(cloneLifecycleRule);\n lifecycleEditor.editingIndex = null;\n lifecycleEditor.editingRule = null;\n lifecycleEditor.rawXml = data.xml || '';\n // SeaweedFS doesn't support Transition rules (PutBucketLifecycleConfiguration\n // rejects them for Enabled rules), and the canonical rule shape the admin\n // edits has no field for one, so a Transition set by another client would\n // silently disappear on the next Save. Warn instead.\n // Matches <Transition> and <NoncurrentVersionTransition> however they are\n // spelled: with attributes, self-closed, or namespace-prefixed.\n lifecycleEditor.hasTransition = /<(\\w+:)?(NoncurrentVersion)?Transition[\\s>\\/]/.test(data.xml || '');\n renderLifecycleEditor();\n}\n\n// normalizeLifecycleStatus maps a stored status onto the two the editor can\n// show. The S3 API stores <Status> unvalidated, and the engine runs a rule\n// only on an exact \"Enabled\", so everything else is Disabled - collapsing it\n// here keeps an odd spelling from leaving both radios unchecked, which would\n// throw out of readLifecycleRuleFromForm and make the modal look dead.\nfunction normalizeLifecycleStatus(status) {\n return status === 'Enabled' ? 'Enabled' : 'Disabled';\n}\n\nfunction cloneLifecycleRule(r) {\n return {\n id: r.id || '',\n status: normalizeLifecycleStatus(r.status),\n prefix: r.prefix || '',\n tags: Object.assign({}, r.tags || {}),\n size_greater_than: r.size_greater_than || null,\n size_less_than: r.size_less_than || null,\n expiration_days: r.expiration_days || null,\n expiration_date: r.expiration_date || '',\n expired_object_delete_marker: !!r.expired_object_delete_marker,\n noncurrent_version_expiration_days: r.noncurrent_version_expiration_days || null,\n newer_noncurrent_versions: r.newer_noncurrent_versions || null,\n abort_multipart_days: r.abort_multipart_days || null,\n };\n}\n\nfunction blankLifecycleRule() {\n return {\n id: '', status: 'Enabled', prefix: '', tags: {},\n size_greater_than: null, size_less_than: null,\n expiration_days: null, expiration_date: '',\n expired_object_delete_marker: false,\n noncurrent_version_expiration_days: null, newer_noncurrent_versions: null,\n abort_multipart_days: null,\n };\n}\n\nfunction describeLifecycleScope(rule) {\n const parts = [];\n if (rule.prefix) {\n parts.push('<code>' + escapeHtml(rule.prefix) + '<\\/code>');\n }\n Object.entries(rule.tags || {}).forEach(([k, v]) => {\n parts.push('<span class=\"badge bg-light text-dark border\">' + escapeHtml(k) + '=' + escapeHtml(v) + '<\\/span>');\n });\n if (rule.size_greater_than) {\n parts.push('size > ' + formatBytes(rule.size_greater_than));\n }\n if (rule.size_less_than) {\n parts.push('size < ' + formatBytes(rule.size_less_than));\n }\n return parts.length ? parts.join(' ') : '<span class=\"text-muted\">Whole bucket<\\/span>';\n}\n\nfunction describeLifecycleActions(rule) {\n const actions = [];\n if (rule.expiration_days) {\n actions.push('Expire after ' + formatDays(rule.expiration_days));\n }\n if (rule.expiration_date) {\n actions.push('Expire on ' + escapeHtml(rule.expiration_date));\n }\n if (rule.expired_object_delete_marker) {\n actions.push('Remove expired object delete markers');\n }\n if (rule.noncurrent_version_expiration_days) {\n let action = 'Expire noncurrent versions after ' + formatDays(rule.noncurrent_version_expiration_days);\n if (rule.newer_noncurrent_versions) {\n action += ', keep ' + rule.newer_noncurrent_versions + ' newest';\n }\n actions.push(action);\n } else if (rule.newer_noncurrent_versions) {\n // Standalone (no expiration_days): the engine still recognizes this\n // as an action that expires noncurrent versions beyond the N newest.\n actions.push('Keep ' + rule.newer_noncurrent_versions + ' newest noncurrent versions');\n }\n if (rule.abort_multipart_days) {\n actions.push('Abort incomplete multipart uploads after ' + formatDays(rule.abort_multipart_days));\n }\n if (actions.length === 0) {\n return '<span class=\"text-muted\">None<\\/span>';\n }\n return actions.join('<br>');\n}\n\nfunction lifecycleRuleRowHtml(rule, idx) {\n const statusHtml = rule.status === 'Enabled'\n ? '<span class=\"badge bg-success\">Enabled<\\/span>'\n : '<span class=\"badge bg-secondary\">' + escapeHtml(rule.status) + '<\\/span>';\n return '<tr>' +\n '<td>' + (rule.id ? escapeHtml(rule.id) : '<span class=\"text-muted\">unnamed<\\/span>') + '<\\/td>' +\n '<td>' + statusHtml + '<\\/td>' +\n '<td>' + describeLifecycleScope(rule) + '<\\/td>' +\n '<td>' + describeLifecycleActions(rule) + '<\\/td>' +\n '<td class=\"text-end text-nowrap\">' +\n '<button type=\"button\" class=\"btn btn-sm btn-outline-secondary lifecycle-edit-rule-btn\" data-index=\"' + idx + '\" title=\"Edit rule\"><i class=\"bi bi-pen\"><\\/i><\\/button> ' +\n '<button type=\"button\" class=\"btn btn-sm btn-outline-danger lifecycle-delete-rule-btn\" data-index=\"' + idx + '\" title=\"Delete rule\"><i class=\"bi bi-trash\"><\\/i><\\/button>' +\n '<\\/td>' +\n '<\\/tr>';\n}\n\nfunction lifecycleRuleFormHtml() {\n const rule = lifecycleEditor.editingRule;\n const tagRowHtml = (k, v) =>\n '<div class=\"input-group input-group-sm mb-1 lifecycle-tag-row\">' +\n '<input type=\"text\" class=\"form-control lifecycle-tag-key\" placeholder=\"Key\" value=\"' + escapeHtml(k) + '\">' +\n '<input type=\"text\" class=\"form-control lifecycle-tag-value\" placeholder=\"Value\" value=\"' + escapeHtml(v) + '\">' +\n '<button type=\"button\" class=\"btn btn-outline-danger lifecycle-remove-tag-btn\"><i class=\"bi bi-x\"><\\/i><\\/button>' +\n '<\\/div>';\n const tagRows = Object.entries(rule.tags || {}).map(([k, v]) => tagRowHtml(k, v)).join('');\n\n return '' +\n '<div class=\"card mb-3\" id=\"lifecycleRuleForm\">' +\n '<div class=\"card-body\">' +\n '<h6 class=\"card-title\">' + (lifecycleEditor.editingIndex === 'new' ? 'Add rule' : 'Edit rule') + '<\\/h6>' +\n\n '<div class=\"row g-2 mb-2\">' +\n '<div class=\"col-md-6\">' +\n '<label class=\"form-label small\">ID (optional)<\\/label>' +\n '<input type=\"text\" class=\"form-control form-control-sm\" id=\"lifecycleRuleId\" value=\"' + escapeHtml(rule.id) + '\">' +\n '<\\/div>' +\n '<div class=\"col-md-6\">' +\n '<label class=\"form-label small d-block\">Status<\\/label>' +\n '<div class=\"form-check form-check-inline\">' +\n '<input class=\"form-check-input\" type=\"radio\" name=\"lifecycleRuleStatus\" id=\"lifecycleStatusEnabled\" value=\"Enabled\"' + (rule.status === 'Enabled' ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleStatusEnabled\">Enabled<\\/label>' +\n '<\\/div>' +\n '<div class=\"form-check form-check-inline\">' +\n '<input class=\"form-check-input\" type=\"radio\" name=\"lifecycleRuleStatus\" id=\"lifecycleStatusDisabled\" value=\"Disabled\"' + (rule.status === 'Disabled' ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleStatusDisabled\">Disabled<\\/label>' +\n '<\\/div>' +\n '<\\/div>' +\n '<\\/div>' +\n\n '<div class=\"mb-2\">' +\n '<label class=\"form-label small\">Prefix<\\/label>' +\n '<input type=\"text\" class=\"form-control form-control-sm\" id=\"lifecycleRulePrefix\" placeholder=\"logs/\" value=\"' + escapeHtml(rule.prefix) + '\">' +\n '<\\/div>' +\n\n '<div class=\"mb-2\">' +\n '<label class=\"form-label small d-block\">Tags<\\/label>' +\n '<div id=\"lifecycleTagRows\">' + tagRows + '<\\/div>' +\n '<button type=\"button\" class=\"btn btn-sm btn-outline-secondary\" id=\"lifecycleAddTagBtn\"><i class=\"bi bi-plus me-1\"><\\/i>Add tag<\\/button>' +\n '<\\/div>' +\n\n '<div class=\"row g-2 mb-3\">' +\n '<div class=\"col-md-6\">' +\n '<label class=\"form-label small\">Size greater than (bytes)<\\/label>' +\n '<input type=\"number\" class=\"form-control form-control-sm\" id=\"lifecycleRuleSizeGT\" min=\"0\" step=\"1\" value=\"' + (rule.size_greater_than || '') + '\">' +\n '<\\/div>' +\n '<div class=\"col-md-6\">' +\n '<label class=\"form-label small\">Size less than (bytes)<\\/label>' +\n '<input type=\"number\" class=\"form-control form-control-sm\" id=\"lifecycleRuleSizeLT\" min=\"0\" step=\"1\" value=\"' + (rule.size_less_than || '') + '\">' +\n '<\\/div>' +\n '<\\/div>' +\n\n '<hr>' +\n '<h6 class=\"small text-muted text-uppercase\">Actions<\\/h6>' +\n\n '<div class=\"row g-2 align-items-center mb-2\">' +\n '<div class=\"col-auto\">' +\n '<div class=\"form-check\">' +\n '<input class=\"form-check-input\" type=\"checkbox\" id=\"lifecycleExpireDaysEnabled\"' + (rule.expiration_days ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleExpireDaysEnabled\">Expire after<\\/label>' +\n '<\\/div>' +\n '<\\/div>' +\n '<div class=\"col-auto\">' +\n '<input type=\"number\" class=\"form-control form-control-sm\" id=\"lifecycleExpireDays\" min=\"1\" step=\"1\" style=\"width: 6rem;\" value=\"' + (rule.expiration_days || '') + '\"' + (rule.expiration_days ? '' : ' disabled') + '>' +\n '<\\/div><div class=\"col-auto\">days<\\/div>' +\n '<\\/div>' +\n\n '<div class=\"row g-2 align-items-center mb-2\">' +\n '<div class=\"col-auto\">' +\n '<div class=\"form-check\">' +\n '<input class=\"form-check-input\" type=\"checkbox\" id=\"lifecycleExpireDateEnabled\"' + (rule.expiration_date ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleExpireDateEnabled\">Expire on date<\\/label>' +\n '<\\/div>' +\n '<\\/div>' +\n '<div class=\"col-auto\">' +\n '<input type=\"date\" class=\"form-control form-control-sm\" id=\"lifecycleExpireDate\" value=\"' + escapeHtml(rule.expiration_date) + '\"' + (rule.expiration_date ? '' : ' disabled') + '>' +\n '<\\/div>' +\n '<\\/div>' +\n\n '<div class=\"form-check mb-2\">' +\n '<input class=\"form-check-input\" type=\"checkbox\" id=\"lifecycleDeleteMarker\"' + (rule.expired_object_delete_marker ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleDeleteMarker\">Remove expired object delete markers<\\/label>' +\n '<\\/div>' +\n\n (() => {\n const noncurrentActive = !!(rule.noncurrent_version_expiration_days || rule.newer_noncurrent_versions);\n return '<div class=\"row g-2 align-items-center mb-2\">' +\n '<div class=\"col-auto\">' +\n '<div class=\"form-check\">' +\n '<input class=\"form-check-input\" type=\"checkbox\" id=\"lifecycleNoncurrentEnabled\"' + (noncurrentActive ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleNoncurrentEnabled\">Limit noncurrent versions<\\/label>' +\n '<\\/div>' +\n '<\\/div>' +\n '<div class=\"col-auto\">after<\\/div>' +\n '<div class=\"col-auto\">' +\n '<input type=\"number\" class=\"form-control form-control-sm\" id=\"lifecycleNoncurrentDays\" min=\"1\" step=\"1\" style=\"width: 6rem;\" value=\"' + (rule.noncurrent_version_expiration_days || '') + '\"' + (noncurrentActive ? '' : ' disabled') + '>' +\n '<\\/div><div class=\"col-auto\">days (optional), keep<\\/div>' +\n '<div class=\"col-auto\">' +\n '<input type=\"number\" class=\"form-control form-control-sm\" id=\"lifecycleNoncurrentKeep\" min=\"0\" step=\"1\" style=\"width: 6rem;\" value=\"' + (rule.newer_noncurrent_versions || '') + '\"' + (noncurrentActive ? '' : ' disabled') + '>' +\n '<\\/div><div class=\"col-auto\">newest (optional)<\\/div>' +\n '<\\/div>';\n })() +\n\n '<div class=\"row g-2 align-items-center mb-3\">' +\n '<div class=\"col-auto\">' +\n '<div class=\"form-check\">' +\n '<input class=\"form-check-input\" type=\"checkbox\" id=\"lifecycleAbortMPUEnabled\"' + (rule.abort_multipart_days ? ' checked' : '') + '>' +\n '<label class=\"form-check-label\" for=\"lifecycleAbortMPUEnabled\">Abort incomplete multipart uploads after<\\/label>' +\n '<\\/div>' +\n '<\\/div>' +\n '<div class=\"col-auto\">' +\n '<input type=\"number\" class=\"form-control form-control-sm\" id=\"lifecycleAbortMPUDays\" min=\"1\" step=\"1\" style=\"width: 6rem;\" value=\"' + (rule.abort_multipart_days || '') + '\"' + (rule.abort_multipart_days ? '' : ' disabled') + '>' +\n '<\\/div><div class=\"col-auto\">days<\\/div>' +\n '<\\/div>' +\n\n '<div class=\"text-end\">' +\n '<button type=\"button\" class=\"btn btn-sm btn-secondary\" id=\"lifecycleCancelRuleBtn\">Cancel<\\/button> ' +\n '<button type=\"button\" class=\"btn btn-sm btn-primary\" id=\"lifecycleSaveRuleBtn\">Save rule<\\/button>' +\n '<\\/div>' +\n '<\\/div>' +\n '<\\/div>';\n}\n\nfunction renderLifecycleEditor() {\n const container = document.getElementById('bucketLifecycleContent');\n const rowsHtml = lifecycleEditor.rules.map(lifecycleRuleRowHtml).join('') ||\n '<tr><td colspan=\"5\" class=\"text-center text-muted py-3\">No lifecycle rules<\\/td><\\/tr>';\n\n let html = '';\n if (lifecycleEditor.hasTransition) {\n html += '<div class=\"alert alert-warning small\">' +\n '<i class=\"bi bi-exclamation-triangle me-1\"><\\/i>' +\n 'This bucket has a Transition rule set outside the admin (SeaweedFS does not support storage class transitions). Saving from here will drop it.' +\n '<\\/div>';\n }\n\n html += '<div class=\"table-responsive mb-3\">' +\n '<table class=\"table table-sm align-middle\">' +\n '<thead><tr><th>Rule<\\/th><th>Status<\\/th><th>Scope<\\/th><th>Actions<\\/th><th><\\/th><\\/tr><\\/thead>' +\n '<tbody>' + rowsHtml + '<\\/tbody>' +\n '<\\/table>' +\n '<\\/div>' +\n '<button type=\"button\" class=\"btn btn-sm btn-outline-primary mb-3\" id=\"lifecycleAddRuleBtn\">' +\n '<i class=\"bi bi-plus me-1\"><\\/i>Add rule' +\n '<\\/button>';\n\n if (lifecycleEditor.editingIndex !== null) {\n html += lifecycleRuleFormHtml();\n }\n\n if (lifecycleEditor.rawXml) {\n html += '<details class=\"mt-2\">' +\n '<summary class=\"text-muted small\">Raw XML (as currently stored)<\\/summary>' +\n '<pre class=\"bg-light border rounded p-2 mt-2 small mb-0\">' + escapeHtml(lifecycleEditor.rawXml) + '<\\/pre>' +\n '<\\/details>';\n }\n\n container.innerHTML = html;\n bindLifecycleEditorEvents();\n}\n\nfunction bindLifecycleToggle(checkboxId, fieldId, mutuallyExclusiveId) {\n const checkbox = document.getElementById(checkboxId);\n const field = document.getElementById(fieldId);\n if (!checkbox || !field) return;\n checkbox.addEventListener('change', function() {\n field.disabled = !this.checked;\n if (this.checked && mutuallyExclusiveId) {\n const other = document.getElementById(mutuallyExclusiveId);\n if (other && other.checked) {\n other.checked = false;\n other.dispatchEvent(new Event('change'));\n }\n }\n });\n}\n\nfunction bindLifecycleEditorEvents() {\n const addBtn = document.getElementById('lifecycleAddRuleBtn');\n if (addBtn) {\n addBtn.addEventListener('click', function() {\n // Fold in any rule already being edited before switching forms,\n // so an invalid in-progress draft isn't silently discarded.\n if (!commitOpenLifecycleRuleForm()) return;\n lifecycleEditor.editingIndex = 'new';\n lifecycleEditor.editingRule = blankLifecycleRule();\n renderLifecycleEditor();\n });\n }\n\n document.querySelectorAll('.lifecycle-edit-rule-btn').forEach(btn => {\n btn.addEventListener('click', function() {\n const idx = parseInt(this.dataset.index, 10);\n // Same as above: committing never shifts indices (it either\n // pushes a new rule at the end or replaces one in place), so\n // idx captured above is still valid after this call.\n if (!commitOpenLifecycleRuleForm()) return;\n lifecycleEditor.editingIndex = idx;\n lifecycleEditor.editingRule = cloneLifecycleRule(lifecycleEditor.rules[idx]);\n renderLifecycleEditor();\n });\n });\n\n document.querySelectorAll('.lifecycle-delete-rule-btn').forEach(btn => {\n btn.addEventListener('click', function() {\n const idx = parseInt(this.dataset.index, 10);\n // Fold in an open form first, like every other transition does:\n // re-rendering after the splice would otherwise redraw it from the\n // snapshot taken when editing began and lose what was typed.\n if (lifecycleEditor.editingIndex !== null && lifecycleEditor.editingIndex !== idx) {\n if (!commitOpenLifecycleRuleForm()) return;\n }\n lifecycleEditor.rules.splice(idx, 1);\n // Deleting a rule shifts every later index down by one, so an\n // open edit form must follow its rule rather than silently\n // start targeting whatever now sits at its old index.\n if (lifecycleEditor.editingIndex === idx) {\n lifecycleEditor.editingIndex = null;\n lifecycleEditor.editingRule = null;\n } else if (typeof lifecycleEditor.editingIndex === 'number' && lifecycleEditor.editingIndex > idx) {\n lifecycleEditor.editingIndex -= 1;\n }\n renderLifecycleEditor();\n });\n });\n\n const cancelBtn = document.getElementById('lifecycleCancelRuleBtn');\n if (cancelBtn) {\n cancelBtn.addEventListener('click', function() {\n lifecycleEditor.editingIndex = null;\n lifecycleEditor.editingRule = null;\n renderLifecycleEditor();\n });\n }\n\n const addTagBtn = document.getElementById('lifecycleAddTagBtn');\n if (addTagBtn) {\n addTagBtn.addEventListener('click', function() {\n const rows = document.getElementById('lifecycleTagRows');\n const row = document.createElement('div');\n row.className = 'input-group input-group-sm mb-1 lifecycle-tag-row';\n row.innerHTML =\n '<input type=\"text\" class=\"form-control lifecycle-tag-key\" placeholder=\"Key\">' +\n '<input type=\"text\" class=\"form-control lifecycle-tag-value\" placeholder=\"Value\">' +\n '<button type=\"button\" class=\"btn btn-outline-danger lifecycle-remove-tag-btn\"><i class=\"bi bi-x\"><\\/i><\\/button>';\n rows.appendChild(row);\n row.querySelector('.lifecycle-remove-tag-btn').addEventListener('click', function() {\n row.remove();\n });\n });\n }\n\n document.querySelectorAll('.lifecycle-remove-tag-btn').forEach(btn => {\n btn.addEventListener('click', function() {\n this.closest('.lifecycle-tag-row').remove();\n });\n });\n\n bindLifecycleToggle('lifecycleExpireDaysEnabled', 'lifecycleExpireDays', 'lifecycleExpireDateEnabled');\n bindLifecycleToggle('lifecycleExpireDateEnabled', 'lifecycleExpireDate', 'lifecycleExpireDaysEnabled');\n bindLifecycleToggle('lifecycleNoncurrentEnabled', 'lifecycleNoncurrentDays');\n bindLifecycleToggle('lifecycleNoncurrentEnabled', 'lifecycleNoncurrentKeep');\n bindLifecycleToggle('lifecycleAbortMPUEnabled', 'lifecycleAbortMPUDays');\n\n const saveRuleBtn = document.getElementById('lifecycleSaveRuleBtn');\n if (saveRuleBtn) {\n saveRuleBtn.addEventListener('click', saveLifecycleRuleFromForm);\n }\n}\n\n// readLifecycleRuleFromForm builds and validates a rule from the currently\n// open edit form's DOM inputs. Returns { rule: null, error: '...' } when the\n// form doesn't hold a valid rule, without mutating any state.\nfunction readLifecycleRuleFromForm() {\n const id = document.getElementById('lifecycleRuleId').value.trim();\n const status = document.querySelector('input[name=\"lifecycleRuleStatus\"]:checked').value;\n const prefix = document.getElementById('lifecycleRulePrefix').value.trim();\n\n const tags = {};\n document.querySelectorAll('#lifecycleTagRows .lifecycle-tag-row').forEach(row => {\n const key = row.querySelector('.lifecycle-tag-key').value.trim();\n const value = row.querySelector('.lifecycle-tag-value').value.trim();\n if (key) {\n tags[key] = value;\n }\n });\n\n const sizeGT = parseInt(document.getElementById('lifecycleRuleSizeGT').value, 10) || 0;\n const sizeLT = parseInt(document.getElementById('lifecycleRuleSizeLT').value, 10) || 0;\n\n const expireDaysEnabled = document.getElementById('lifecycleExpireDaysEnabled').checked;\n const expireDateEnabled = document.getElementById('lifecycleExpireDateEnabled').checked;\n const expirationDays = expireDaysEnabled ? (parseInt(document.getElementById('lifecycleExpireDays').value, 10) || 0) : 0;\n const expirationDate = expireDateEnabled ? document.getElementById('lifecycleExpireDate').value : '';\n\n const deleteMarker = document.getElementById('lifecycleDeleteMarker').checked;\n\n const noncurrentEnabled = document.getElementById('lifecycleNoncurrentEnabled').checked;\n const noncurrentDays = noncurrentEnabled ? (parseInt(document.getElementById('lifecycleNoncurrentDays').value, 10) || 0) : 0;\n const noncurrentKeep = noncurrentEnabled ? (parseInt(document.getElementById('lifecycleNoncurrentKeep').value, 10) || 0) : 0;\n\n const abortEnabled = document.getElementById('lifecycleAbortMPUEnabled').checked;\n const abortDays = abortEnabled ? (parseInt(document.getElementById('lifecycleAbortMPUDays').value, 10) || 0) : 0;\n\n if (expireDaysEnabled && expirationDays <= 0) {\n return { rule: null, error: 'Enter a valid number of days for expiration.' };\n }\n if (expireDateEnabled && !expirationDate) {\n return { rule: null, error: 'Enter a valid expiration date.' };\n }\n if (noncurrentEnabled && noncurrentDays <= 0 && noncurrentKeep <= 0) {\n return { rule: null, error: 'Enter a number of days and/or a newest-versions-to-keep count for noncurrent version handling.' };\n }\n if (abortEnabled && abortDays <= 0) {\n return { rule: null, error: 'Enter a valid number of days for aborting incomplete multipart uploads.' };\n }\n if (!expireDaysEnabled && !expireDateEnabled && !deleteMarker && !noncurrentEnabled && !abortEnabled) {\n return { rule: null, error: 'Select at least one action for this rule.' };\n }\n // The server rejects this combination too; catching it here names the two\n // fields instead of surfacing a 400 after the whole set is submitted.\n if (deleteMarker && (expireDaysEnabled || expireDateEnabled)) {\n return { rule: null, error: 'Removing expired object delete markers cannot be combined with an expiration.' };\n }\n if (sizeGT > 0 && sizeLT > 0 && sizeGT >= sizeLT) {\n return { rule: null, error: '\"Size greater than\" must be less than \"size less than\".' };\n }\n\n return {\n rule: {\n id: id,\n status: status,\n prefix: prefix,\n tags: tags,\n size_greater_than: sizeGT > 0 ? sizeGT : null,\n size_less_than: sizeLT > 0 ? sizeLT : null,\n expiration_days: expirationDays > 0 ? expirationDays : null,\n expiration_date: expirationDate || '',\n expired_object_delete_marker: deleteMarker,\n noncurrent_version_expiration_days: noncurrentDays > 0 ? noncurrentDays : null,\n newer_noncurrent_versions: noncurrentKeep > 0 ? noncurrentKeep : null,\n abort_multipart_days: abortDays > 0 ? abortDays : null,\n },\n error: null,\n };\n}\n\nfunction saveLifecycleRuleFromForm() {\n const { rule, error } = readLifecycleRuleFromForm();\n if (error) {\n alert(error);\n return;\n }\n\n if (lifecycleEditor.editingIndex === 'new') {\n lifecycleEditor.rules.push(rule);\n } else {\n lifecycleEditor.rules[lifecycleEditor.editingIndex] = rule;\n }\n lifecycleEditor.editingIndex = null;\n lifecycleEditor.editingRule = null;\n renderLifecycleEditor();\n}\n\n// commitOpenLifecycleRuleForm folds an in-progress add/edit form into\n// lifecycleEditor.rules before the whole rule set is sent to the server, so\n// clicking the modal's \"Save\" without first clicking \"Save rule\" doesn't\n// silently drop the open edit. Returns false (and leaves the form open) when\n// the open form doesn't hold a valid rule, so the caller can abort the save.\nfunction commitOpenLifecycleRuleForm() {\n if (lifecycleEditor.editingIndex === null) {\n return true;\n }\n\n const { rule, error } = readLifecycleRuleFromForm();\n if (error) {\n alert(error);\n return false;\n }\n\n if (lifecycleEditor.editingIndex === 'new') {\n lifecycleEditor.rules.push(rule);\n } else {\n lifecycleEditor.rules[lifecycleEditor.editingIndex] = rule;\n }\n lifecycleEditor.editingIndex = null;\n lifecycleEditor.editingRule = null;\n renderLifecycleEditor();\n return true;\n}\n\n function goToPage(page) {\n const url = new URL(window.location);\n url.searchParams.set('page', page);\n window.location.href = url.toString();\n }\n\n function changePageSize() {\n const pageSize = document.getElementById('pageSizeSelect').value;\n const url = new URL(window.location);\n url.searchParams.set('pageSize', pageSize);\n url.searchParams.set('page', '1');\n window.location.href = url.toString();\n }\n\n function sortTable(column) {\n const url = new URL(window.location);\n const currentSort = url.searchParams.get('sortBy');\n const currentOrder = url.searchParams.get('sortOrder') || 'asc';\n\n let newOrder = 'asc';\n if (currentSort === column && currentOrder === 'asc') {\n newOrder = 'desc';\n }\n\n url.searchParams.set('sortBy', column);\n url.searchParams.set('sortOrder', newOrder);\n url.searchParams.set('page', '1');\n window.location.href = url.toString();\n }\n\n function exportBucketList() {\n // RFC 4180 compliant CSV escaping: escape double quotes by doubling them\n function escapeCsvField(value) {\n const str = String(value ?? '');\n if (str.includes(',') || str.includes('\"') || str.includes('\\n') || str.includes('\\r')) {\n return '\"' + str.replace(/\"/g, '\"\"') + '\"';\n }\n return '\"' + str + '\"';\n }\n\n // Fetch all buckets from the API (not just the current page)\n fetch(basePath('/api/s3/buckets'))\n .then(response => response.json())\n .then(data => {\n if (data.error) {\n alert('Error exporting buckets: ' + data.error);\n return;\n }\n\n const buckets = data.buckets || [];\n const csvContent = \"data:text/csv;charset=utf-8,\" +\n \"Name,Owner,Logical Size,Physical Size,Created,Quota,Versioning,Object Lock\\n\" +\n buckets.map(b => [\n escapeCsvField(b.name),\n escapeCsvField(b.owner),\n escapeCsvField(formatBytes(b.logical_size)),\n escapeCsvField(formatBytes(b.physical_size)),\n escapeCsvField(b.created_at),\n escapeCsvField(b.quota_enabled ? formatBytes(b.quota) : 'No quota'),\n escapeCsvField(b.versioning_status || 'Not configured'),\n escapeCsvField(b.object_lock_enabled ? 'Enabled' : 'Not configured')\n ].join(',')).join(\"\\n\");\n\n const encodedUri = encodeURI(csvContent);\n const link = document.createElement(\"a\");\n link.setAttribute(\"href\", encodedUri);\n link.setAttribute(\"download\", \"buckets.csv\");\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n })\n .catch(error => {\n console.error('Error:', error);\n alert('Error exporting buckets: ' + error.message);\n });\n }\n </script>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}diff --git a/weed/admin/view/app/s3tables_buckets_templ.go b/weed/admin/view/app/s3tables_buckets_templ.goindex 3cea8d794c..f469bf8481 100644--- a/weed/admin/view/app/s3tables_buckets_templ.go+++ b/weed/admin/view/app/s3tables_buckets_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -32,10 +33,6 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-table me-2\"></i>S3 Tables Buckets</h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createS3TablesBucketModal\"><i class=\"bi bi-plus me-1\"></i>Create Bucket</button></div>")if templ_7745c5c3_Err != nil {@@ -46,12 +43,12 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var2 templ.SafeURL- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//localhost:%d/v1/config", data.IcebergPort)))+ var templ_7745c5c3_Var2 string+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//localhost:%d/v1/config", data.IcebergPort))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 24, Col: 119}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -65,12 +62,12 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var3 templ.SafeURL- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//localhost:%d/v1/table", data.LancePort)))+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//localhost:%d/v1/table", data.LancePort))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 31, Col: 114}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -84,7 +81,7 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var4 string- templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.IcebergPort))+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.IcebergPort)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 38, Col: 91}}@@ -97,7 +94,7 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var5 string- templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.LancePort))+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.LancePort)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 38, Col: 145}}@@ -120,7 +117,7 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var6 string- templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.IcebergPort))+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.IcebergPort)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 52, Col: 105}}@@ -152,7 +149,7 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var8 string- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.LancePort))+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.LancePort)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 58, Col: 103}}@@ -257,38 +254,56 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var14 = []any{formatBadgeClass(bucket.Format)}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var14...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<span class=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var15 string- templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var14).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\" title=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var16 string- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatBadgeTitle(bucket.Format))- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 162, Col: 99}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<span class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var14 = []any{formatBadgeClass(bucket.Format)}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var14...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var15 string+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var14).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\" title=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var16 string+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(formatBadgeTitle(bucket.Format)).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 162, Col: 99}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, ">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -301,7 +316,7 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</span></td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "</span></td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -314,7 +329,7 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "</td><td class=\"text-muted small\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</td><td class=\"text-muted small\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -327,7 +342,7 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</td><td><code class=\"small\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "</td><td><code class=\"small\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -340,7 +355,7 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "</code></td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</code></td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -353,17 +368,17 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if bucket.PolicyStatementCount > 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "<button type=\"button\" class=\"badge bg-primary border-0 s3tables-bucket-policy-btn\" data-bucket-arn=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<button type=\"button\" class=\"badge bg-primary border-0 s3tables-bucket-policy-btn\" data-bucket-arn=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var22 string- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.ARN)+ templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.ARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 171, Col: 43}}@@ -371,12 +386,12 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "\" title=\"View Bucket Policy\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\" title=\"View Bucket Policy\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if bucket.PolicyStatementCount == 1 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "1 statement")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "1 statement")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -391,51 +406,51 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</button>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</button>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "<span class=\"text-muted\">Not configured</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<span class=\"text-muted\">Not configured</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "</td><td><div class=\"btn-group btn-group-sm\" role=\"group\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</td><td><div class=\"btn-group btn-group-sm\" role=\"group\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}bucketName, parseErr := s3tables.ParseBucketNameFromARN(bucket.ARN)if parseErr == nil {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "<a class=\"btn btn-outline-primary btn-sm\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<a class=\"btn btn-outline-primary btn-sm\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var24 templ.SafeURL- templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces", url.PathEscape(bucketName))))+ var templ_7745c5c3_Var24 string+ templ_7745c5c3_Var24, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces", url.PathEscape(bucketName)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 186, Col: 166}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var24)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "\"><i class=\"bi bi-folder2-open\"></i></a> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "\"><i class=\"bi bi-folder2-open\"></i></a> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "<button type=\"button\" class=\"btn btn-outline-primary btn-sm\" disabled title=\"Invalid bucket ARN\"><i class=\"bi bi-folder2-open\"></i></button> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "<button type=\"button\" class=\"btn btn-outline-primary btn-sm\" disabled title=\"Invalid bucket ARN\"><i class=\"bi bi-folder2-open\"></i></button> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "<button type=\"button\" class=\"btn btn-outline-success btn-sm s3tables-tags-btn\" data-resource-arn=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<button type=\"button\" class=\"btn btn-outline-success btn-sm s3tables-tags-btn\" data-resource-arn=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var25 string- templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.ARN)+ templ_7745c5c3_Var25, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.ARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 194, Col: 122}}@@ -443,12 +458,12 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "\" title=\"Tags\"><i class=\"bi bi-tags\"></i></button> <button type=\"button\" class=\"btn btn-outline-info btn-sm s3tables-bucket-policy-btn\" data-bucket-arn=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "\" title=\"Tags\"><i class=\"bi bi-tags\"></i></button> <button type=\"button\" class=\"btn btn-outline-info btn-sm s3tables-bucket-policy-btn\" data-bucket-arn=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var26 string- templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.ARN)+ templ_7745c5c3_Var26, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.ARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 197, Col: 126}}@@ -456,12 +471,12 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "\" title=\"Bucket Policy\"><i class=\"bi bi-shield\"></i></button> <button type=\"button\" class=\"btn btn-outline-danger btn-sm s3tables-delete-bucket-btn\" data-bucket-arn=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "\" title=\"Bucket Policy\"><i class=\"bi bi-shield\"></i></button> <button type=\"button\" class=\"btn btn-outline-danger btn-sm s3tables-delete-bucket-btn\" data-bucket-arn=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var27 string- templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.ARN)+ templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.ARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 200, Col: 128}}@@ -469,12 +484,12 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "\" data-bucket-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "\" data-bucket-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var28 string- templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.ResolveAttributeValue(bucket.Name)+ templ_7745c5c3_Var28, templ_7745c5c3_Err = templruntime.NewAttributeExpression(bucket.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 200, Col: 161}}@@ -482,28 +497,28 @@ func S3TablesBuckets(data dash.S3TablesBucketsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "\" title=\"Delete\"><i class=\"bi bi-trash\"></i></button></div></td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "\" title=\"Delete\"><i class=\"bi bi-trash\"></i></button></div></td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if len(data.Buckets) == 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "<tr><td colspan=\"8\" class=\"text-center text-muted py-4\"><i class=\"bi bi-table icon-3x mb-3 text-muted\"></i><div><h5>No table buckets found</h5><p>Create your first S3 Tables bucket to get started.</p><button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createS3TablesBucketModal\"><i class=\"bi bi-plus me-1\"></i>Create Bucket</button></div></td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "<tr><td colspan=\"8\" class=\"text-center text-muted py-4\"><i class=\"bi bi-table icon-3x mb-3 text-muted\"></i><div><h5>No table buckets found</h5><p>Create your first S3 Tables bucket to get started.</p><button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createS3TablesBucketModal\"><i class=\"bi bi-plus me-1\"></i>Create Bucket</button></div></td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</tbody></table></div></div></div></div></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</tbody></table></div></div></div></div></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.IcebergPort > 0 || data.LancePort > 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "<div class=\"row\"><div class=\"col-12\"><div class=\"card shadow mb-4\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-code me-2\"></i>Client Examples</h6></div><div class=\"card-body\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<div class=\"row\"><div class=\"col-12\"><div class=\"card shadow mb-4\"><div class=\"card-header py-3\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-code me-2\"></i>Client Examples</h6></div><div class=\"card-body\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.IcebergPort > 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<h6><span class=\"badge bg-primary me-2\">ICEBERG</span>DuckDB</h6><pre class=\"bg-light p-3 border rounded\"><code id=\"s3tables-duckdb-example\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "<h6><span class=\"badge bg-primary me-2\">ICEBERG</span>DuckDB</h6><pre class=\"bg-light p-3 border rounded\"><code id=\"s3tables-duckdb-example\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -525,7 +540,7 @@ SELECT * FROM iceberg_scan('s3://my-table-bucket/my-namespace/my-table');`)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "</code></pre><h6 class=\"mt-4\"><span class=\"badge bg-primary me-2\">ICEBERG</span>Python (PyIceberg)</h6><pre class=\"bg-light p-3 border rounded\"><code id=\"s3tables-pyiceberg-example\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</code></pre><h6 class=\"mt-4\"><span class=\"badge bg-primary me-2\">ICEBERG</span>Python (PyIceberg)</h6><pre class=\"bg-light p-3 border rounded\"><code id=\"s3tables-pyiceberg-example\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -549,31 +564,49 @@ namespaces = catalog.list_namespaces()`)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</code></pre>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "</code></pre>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if data.LancePort > 0 {- var templ_7745c5c3_Var31 = []any{templ.KV("mt-4", data.IcebergPort > 0)}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var31...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "<h6 class=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var32 string- templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var31).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var32)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "<h6 class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var31 = []any{templ.KV("mt-4", data.IcebergPort > 0)}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var31...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var32 string+ templ_7745c5c3_Var32, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var31).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var32)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "\"><span class=\"badge bg-success me-2\">LANCE</span>Python (lance-namespace)</h6><pre class=\"bg-light p-3 border rounded\"><code id=\"s3tables-lance-namespace-example\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "><span class=\"badge bg-success me-2\">LANCE</span>Python (lance-namespace)</h6><pre class=\"bg-light p-3 border rounded\"><code id=\"s3tables-lance-namespace-example\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -591,7 +624,7 @@ ns.describe_table(id=["my-table-bucket", "my-namespace", "my-table"])`)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "</code></pre><h6 class=\"mt-4\"><span class=\"badge bg-success me-2\">LANCE</span>Python (pylance)</h6><pre class=\"bg-light p-3 border rounded\"><code id=\"s3tables-pylance-example\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "</code></pre><h6 class=\"mt-4\"><span class=\"badge bg-success me-2\">LANCE</span>Python (pylance)</h6><pre class=\"bg-light p-3 border rounded\"><code id=\"s3tables-pylance-example\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -611,57 +644,57 @@ dataset = lance.dataset(table.location, storage_options=table.storage_options)`)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "</code></pre>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "</code></pre>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<script>\n\t\t\t\t\t\t\t\tconst s3tablesExamplesHost = window.location.hostname;\n\t\t\t\t\t\t\t\tconst s3tablesExamples = [\n\t\t\t\t\t\t\t\t\tdocument.getElementById('s3tables-duckdb-example'),\n\t\t\t\t\t\t\t\t\tdocument.getElementById('s3tables-pyiceberg-example'),\n\t\t\t\t\t\t\t\t\tdocument.getElementById('s3tables-lance-namespace-example'),\n\t\t\t\t\t\t\t\t\tdocument.getElementById('s3tables-pylance-example')\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\ts3tablesExamples.forEach(example => {\n\t\t\t\t\t\t\t\t\tif (!example) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\texample.textContent = example.textContent.replaceAll('localhost', s3tablesExamplesHost);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t</script></div></div></div></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<script>\n\t\t\t\t\t\t\t\tconst s3tablesExamplesHost = window.location.hostname;\n\t\t\t\t\t\t\t\tconst s3tablesExamples = [\n\t\t\t\t\t\t\t\t\tdocument.getElementById('s3tables-duckdb-example'),\n\t\t\t\t\t\t\t\t\tdocument.getElementById('s3tables-pyiceberg-example'),\n\t\t\t\t\t\t\t\t\tdocument.getElementById('s3tables-lance-namespace-example'),\n\t\t\t\t\t\t\t\t\tdocument.getElementById('s3tables-pylance-example')\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\ts3tablesExamples.forEach(example => {\n\t\t\t\t\t\t\t\t\tif (!example) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\texample.textContent = example.textContent.replaceAll('localhost', s3tablesExamplesHost);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t</script></div></div></div></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "</div><div class=\"modal fade\" id=\"createS3TablesBucketModal\" tabindex=\"-1\" aria-labelledby=\"createS3TablesBucketModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"createS3TablesBucketModalLabel\"><i class=\"bi bi-plus me-2\"></i>Create Table Bucket</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"createS3TablesBucketForm\"><div class=\"modal-body\"><div class=\"mb-3\"><label for=\"s3tablesBucketName\" class=\"form-label\">Bucket Name</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesBucketName\" name=\"name\" placeholder=\"table-bucket-name\" required></div><div class=\"mb-3\"><label class=\"form-label\">Table Format</label><div class=\"row g-2\" id=\"s3tablesBucketFormatPicker\"><div class=\"col-6\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "</div><div class=\"modal fade\" id=\"createS3TablesBucketModal\" tabindex=\"-1\" aria-labelledby=\"createS3TablesBucketModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"createS3TablesBucketModalLabel\"><i class=\"bi bi-plus me-2\"></i>Create Table Bucket</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"createS3TablesBucketForm\"><div class=\"modal-body\"><div class=\"mb-3\"><label for=\"s3tablesBucketName\" class=\"form-label\">Bucket Name</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesBucketName\" name=\"name\" placeholder=\"table-bucket-name\" required></div><div class=\"mb-3\"><label class=\"form-label\">Table Format</label><div class=\"row g-2\" id=\"s3tablesBucketFormatPicker\"><div class=\"col-6\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.IcebergPort > 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<input type=\"radio\" class=\"btn-check\" name=\"format\" id=\"s3tablesBucketFormatIceberg\" value=\"ICEBERG\" checked> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<input type=\"radio\" class=\"btn-check\" name=\"format\" id=\"s3tablesBucketFormatIceberg\" value=\"ICEBERG\" checked> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "<input type=\"radio\" class=\"btn-check\" name=\"format\" id=\"s3tablesBucketFormatIceberg\" value=\"ICEBERG\" disabled> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "<input type=\"radio\" class=\"btn-check\" name=\"format\" id=\"s3tablesBucketFormatIceberg\" value=\"ICEBERG\" disabled> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<label class=\"btn btn-outline-primary w-100 text-start p-3\" for=\"s3tablesBucketFormatIceberg\"><span class=\"d-block fw-semibold\"><i class=\"bi bi-snow me-1\"></i>Iceberg</span> <span class=\"d-block small text-muted mt-1\">Served over the Iceberg REST catalog. Spark, Trino, PyIceberg, DuckDB, OLake Go.</span></label></div><div class=\"col-6\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "<label class=\"btn btn-outline-primary w-100 text-start p-3\" for=\"s3tablesBucketFormatIceberg\"><span class=\"d-block fw-semibold\"><i class=\"bi bi-snow me-1\"></i>Iceberg</span> <span class=\"d-block small text-muted mt-1\">Served over the Iceberg REST catalog. Spark, Trino, PyIceberg, DuckDB, OLake Go.</span></label></div><div class=\"col-6\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.LancePort > 0 && data.IcebergPort <= 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, " <input type=\"radio\" class=\"btn-check\" name=\"format\" id=\"s3tablesBucketFormatLance\" value=\"LANCE\" checked> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, " <input type=\"radio\" class=\"btn-check\" name=\"format\" id=\"s3tablesBucketFormatLance\" value=\"LANCE\" checked> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else if data.LancePort > 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "<input type=\"radio\" class=\"btn-check\" name=\"format\" id=\"s3tablesBucketFormatLance\" value=\"LANCE\"> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "<input type=\"radio\" class=\"btn-check\" name=\"format\" id=\"s3tablesBucketFormatLance\" value=\"LANCE\"> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "<input type=\"radio\" class=\"btn-check\" name=\"format\" id=\"s3tablesBucketFormatLance\" value=\"LANCE\" disabled> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "<input type=\"radio\" class=\"btn-check\" name=\"format\" id=\"s3tablesBucketFormatLance\" value=\"LANCE\" disabled> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "<label class=\"btn btn-outline-success w-100 text-start p-3\" for=\"s3tablesBucketFormatLance\"><span class=\"d-block fw-semibold\"><i class=\"bi bi-bounding-box me-1\"></i>Lance</span> <span class=\"d-block small text-muted mt-1\">Served over the Lance Namespace API. pylance, LanceDB, Ray.</span></label></div></div><div class=\"form-text\" id=\"s3tablesBucketFormatHint\" data-iceberg-port=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "<label class=\"btn btn-outline-success w-100 text-start p-3\" for=\"s3tablesBucketFormatLance\"><span class=\"d-block fw-semibold\"><i class=\"bi bi-bounding-box me-1\"></i>Lance</span> <span class=\"d-block small text-muted mt-1\">Served over the Lance Namespace API. pylance, LanceDB, Ray.</span></label></div></div><div class=\"form-text\" id=\"s3tablesBucketFormatHint\" data-iceberg-port=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var35 string- templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.IcebergPort))+ templ_7745c5c3_Var35, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.IcebergPort)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 363, Col: 115}}@@ -669,12 +702,12 @@ dataset = lance.dataset(table.location, storage_options=table.storage_options)`)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "\" data-lance-port=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "\" data-lance-port=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var36 string- templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.LancePort))+ templ_7745c5c3_Var36, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.LancePort)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_buckets.templ`, Line: 363, Col: 169}}@@ -682,7 +715,7 @@ dataset = lance.dataset(table.location, storage_options=table.storage_options)`)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "\">A bucket holds one format. Tables of the other are refused.</div></div><div class=\"mb-3\"><label for=\"s3tablesBucketOwner\" class=\"form-label\">Owner (Optional)</label> <select class=\"form-select\" id=\"s3tablesBucketOwner\" name=\"owner\"><option value=\"\">No owner (admin-only access)</option></select><div class=\"form-text\">The S3 identity that owns this table bucket. Non-admin users can only access table buckets they own.</div></div><div class=\"mb-3\"><label for=\"s3tablesBucketTags\" class=\"form-label\">Tags</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesBucketTags\" name=\"tags\" placeholder=\"key1=value1,key2=value2\"><div class=\"form-text\">Optional tags in key=value format.</div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"submit\" class=\"btn btn-primary\"><i class=\"bi bi-plus me-1\"></i>Create</button></div></form></div></div></div><div class=\"modal fade\" id=\"deleteS3TablesBucketModal\" tabindex=\"-1\" aria-labelledby=\"deleteS3TablesBucketModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"deleteS3TablesBucketModalLabel\"><i class=\"bi bi-exclamation-triangle me-2 text-warning\"></i>Delete Table Bucket</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><p>Are you sure you want to delete the table bucket <strong id=\"deleteS3TablesBucketName\"></strong>?</p></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-danger\" onclick=\"deleteS3TablesBucket()\"><i class=\"bi bi-trash me-1\"></i>Delete</button></div></div></div></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "\">A bucket holds one format. Tables of the other are refused.</div></div><div class=\"mb-3\"><label for=\"s3tablesBucketOwner\" class=\"form-label\">Owner (Optional)</label> <select class=\"form-select\" id=\"s3tablesBucketOwner\" name=\"owner\"><option value=\"\">No owner (admin-only access)</option></select><div class=\"form-text\">The S3 identity that owns this table bucket. Non-admin users can only access table buckets they own.</div></div><div class=\"mb-3\"><label for=\"s3tablesBucketTags\" class=\"form-label\">Tags</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesBucketTags\" name=\"tags\" placeholder=\"key1=value1,key2=value2\"><div class=\"form-text\">Optional tags in key=value format.</div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"submit\" class=\"btn btn-primary\"><i class=\"bi bi-plus me-1\"></i>Create</button></div></form></div></div></div><div class=\"modal fade\" id=\"deleteS3TablesBucketModal\" tabindex=\"-1\" aria-labelledby=\"deleteS3TablesBucketModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"deleteS3TablesBucketModalLabel\"><i class=\"bi bi-exclamation-triangle me-2 text-warning\"></i>Delete Table Bucket</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><p>Are you sure you want to delete the table bucket <strong id=\"deleteS3TablesBucketName\"></strong>?</p></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-danger\" onclick=\"deleteS3TablesBucket()\"><i class=\"bi bi-trash me-1\"></i>Delete</button></div></div></div></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -690,7 +723,7 @@ dataset = lance.dataset(table.location, storage_options=table.storage_options)`)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "<div class=\"modal fade\" id=\"s3tablesBucketPolicyModal\" tabindex=\"-1\" aria-labelledby=\"s3tablesBucketPolicyModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-xl\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"s3tablesBucketPolicyModalLabel\"><i class=\"bi bi-shield me-2\"></i>Table Bucket Policy</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"s3tablesBucketPolicyForm\"><div class=\"modal-body\"><input type=\"hidden\" id=\"s3tablesBucketPolicyArn\" name=\"bucket_arn\"><ul class=\"nav nav-tabs\" role=\"tablist\"><li class=\"nav-item\" role=\"presentation\"><button class=\"nav-link active\" id=\"s3tablesBucketPolicyEditorTabBtn\" type=\"button\" data-bs-toggle=\"tab\" data-bs-target=\"#s3tablesBucketPolicyEditorTab\" role=\"tab\" aria-controls=\"s3tablesBucketPolicyEditorTab\" aria-selected=\"true\">Editor</button></li><li class=\"nav-item\" role=\"presentation\"><button class=\"nav-link\" id=\"s3tablesBucketPolicyJsonTabBtn\" type=\"button\" data-bs-toggle=\"tab\" data-bs-target=\"#s3tablesBucketPolicyJsonTab\" role=\"tab\" aria-controls=\"s3tablesBucketPolicyJsonTab\" aria-selected=\"false\">JSON</button></li></ul><div class=\"tab-content border border-top-0 rounded-bottom p-3 mb-3\"><div class=\"tab-pane fade show active\" id=\"s3tablesBucketPolicyEditorTab\" role=\"tabpanel\" aria-labelledby=\"s3tablesBucketPolicyEditorTabBtn\"><div id=\"s3tablesBucketPolicyEditorBody\"></div><button type=\"button\" class=\"btn btn-sm btn-outline-secondary\" id=\"s3tablesBucketPolicyAddStatementBtn\"><i class=\"bi bi-plus me-1\"></i>Add statement</button></div><div class=\"tab-pane fade\" id=\"s3tablesBucketPolicyJsonTab\" role=\"tabpanel\" aria-labelledby=\"s3tablesBucketPolicyJsonTabBtn\"><textarea class=\"form-control\" id=\"s3tablesBucketPolicyText\" name=\"policy\" rows=\"12\" placeholder=\"{ }\"></textarea></div></div><div class=\"form-text\">Provide a policy JSON; use Delete Policy to remove the policy.</div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button> <button type=\"button\" class=\"btn btn-outline-danger\" id=\"s3tablesBucketPolicyDeleteBtn\" onclick=\"deleteS3TablesBucketPolicy()\"><i class=\"bi bi-trash me-1\"></i>Delete Policy</button><!-- type=\"button\": a submit button would make Enter in any\n\t\t\t\t\t\t single-line editor input implicitly submit a half-built\n\t\t\t\t\t\t policy, which the backend stores verbatim. --><button type=\"button\" class=\"btn btn-primary\" id=\"s3tablesBucketPolicySaveBtn\"><i class=\"bi bi-floppy me-1\"></i>Save Policy</button></div></form></div></div></div><div class=\"modal fade\" id=\"s3tablesTagsModal\" tabindex=\"-1\" aria-labelledby=\"s3tablesTagsModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-lg\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"s3tablesTagsModalLabel\"><i class=\"bi bi-tags me-2\"></i>Resource Tags</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"s3tablesTagsForm\"><div class=\"modal-body\"><input type=\"hidden\" id=\"s3tablesTagsResourceArn\" name=\"resource_arn\"><div class=\"mb-3\"><label class=\"form-label\">Existing Tags</label><pre class=\"bg-light p-3 border rounded\" id=\"s3tablesTagsList\">Loading...</pre></div><div class=\"mb-3\"><label for=\"s3tablesTagsInput\" class=\"form-label\">Add or Update Tags</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesTagsInput\" placeholder=\"key1=value1,key2=value2\"></div><div class=\"mb-3\"><label for=\"s3tablesTagsDeleteInput\" class=\"form-label\">Remove Tag Keys</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesTagsDeleteInput\" placeholder=\"key1,key2\"></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button> <button type=\"button\" class=\"btn btn-outline-danger\" onclick=\"deleteS3TablesTags()\"><i class=\"bi bi-trash me-1\"></i>Remove Tags</button> <button type=\"submit\" class=\"btn btn-primary\"><i class=\"bi bi-floppy me-1\"></i>Update Tags</button></div></form></div></div></div><script>\n\t\tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t\tinitS3TablesBuckets();\n\t\t});\n\t</script>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "<div class=\"modal fade\" id=\"s3tablesBucketPolicyModal\" tabindex=\"-1\" aria-labelledby=\"s3tablesBucketPolicyModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-xl\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"s3tablesBucketPolicyModalLabel\"><i class=\"bi bi-shield me-2\"></i>Table Bucket Policy</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"s3tablesBucketPolicyForm\"><div class=\"modal-body\"><input type=\"hidden\" id=\"s3tablesBucketPolicyArn\" name=\"bucket_arn\"><ul class=\"nav nav-tabs\" role=\"tablist\"><li class=\"nav-item\" role=\"presentation\"><button class=\"nav-link active\" id=\"s3tablesBucketPolicyEditorTabBtn\" type=\"button\" data-bs-toggle=\"tab\" data-bs-target=\"#s3tablesBucketPolicyEditorTab\" role=\"tab\" aria-controls=\"s3tablesBucketPolicyEditorTab\" aria-selected=\"true\">Editor</button></li><li class=\"nav-item\" role=\"presentation\"><button class=\"nav-link\" id=\"s3tablesBucketPolicyJsonTabBtn\" type=\"button\" data-bs-toggle=\"tab\" data-bs-target=\"#s3tablesBucketPolicyJsonTab\" role=\"tab\" aria-controls=\"s3tablesBucketPolicyJsonTab\" aria-selected=\"false\">JSON</button></li></ul><div class=\"tab-content border border-top-0 rounded-bottom p-3 mb-3\"><div class=\"tab-pane fade show active\" id=\"s3tablesBucketPolicyEditorTab\" role=\"tabpanel\" aria-labelledby=\"s3tablesBucketPolicyEditorTabBtn\"><div id=\"s3tablesBucketPolicyEditorBody\"></div><button type=\"button\" class=\"btn btn-sm btn-outline-secondary\" id=\"s3tablesBucketPolicyAddStatementBtn\"><i class=\"bi bi-plus me-1\"></i>Add statement</button></div><div class=\"tab-pane fade\" id=\"s3tablesBucketPolicyJsonTab\" role=\"tabpanel\" aria-labelledby=\"s3tablesBucketPolicyJsonTabBtn\"><textarea class=\"form-control\" id=\"s3tablesBucketPolicyText\" name=\"policy\" rows=\"12\" placeholder=\"{ }\"></textarea></div></div><div class=\"form-text\">Provide a policy JSON; use Delete Policy to remove the policy.</div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button> <button type=\"button\" class=\"btn btn-outline-danger\" id=\"s3tablesBucketPolicyDeleteBtn\" onclick=\"deleteS3TablesBucketPolicy()\"><i class=\"bi bi-trash me-1\"></i>Delete Policy</button><!-- type=\"button\": a submit button would make Enter in any\n\t\t\t\t\t\t single-line editor input implicitly submit a half-built\n\t\t\t\t\t\t policy, which the backend stores verbatim. --><button type=\"button\" class=\"btn btn-primary\" id=\"s3tablesBucketPolicySaveBtn\"><i class=\"bi bi-floppy me-1\"></i>Save Policy</button></div></form></div></div></div><div class=\"modal fade\" id=\"s3tablesTagsModal\" tabindex=\"-1\" aria-labelledby=\"s3tablesTagsModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-lg\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"s3tablesTagsModalLabel\"><i class=\"bi bi-tags me-2\"></i>Resource Tags</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"s3tablesTagsForm\"><div class=\"modal-body\"><input type=\"hidden\" id=\"s3tablesTagsResourceArn\" name=\"resource_arn\"><div class=\"mb-3\"><label class=\"form-label\">Existing Tags</label><pre class=\"bg-light p-3 border rounded\" id=\"s3tablesTagsList\">Loading...</pre></div><div class=\"mb-3\"><label for=\"s3tablesTagsInput\" class=\"form-label\">Add or Update Tags</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesTagsInput\" placeholder=\"key1=value1,key2=value2\"></div><div class=\"mb-3\"><label for=\"s3tablesTagsDeleteInput\" class=\"form-label\">Remove Tag Keys</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesTagsDeleteInput\" placeholder=\"key1,key2\"></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button> <button type=\"button\" class=\"btn btn-outline-danger\" onclick=\"deleteS3TablesTags()\"><i class=\"bi bi-trash me-1\"></i>Remove Tags</button> <button type=\"submit\" class=\"btn btn-primary\"><i class=\"bi bi-floppy me-1\"></i>Update Tags</button></div></form></div></div></div><script>\n\t\tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t\tinitS3TablesBuckets();\n\t\t});\n\t</script>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}diff --git a/weed/admin/view/app/s3tables_namespaces_templ.go b/weed/admin/view/app/s3tables_namespaces_templ.goindex a43fce4eca..655cdb512d 100644--- a/weed/admin/view/app/s3tables_namespaces_templ.go+++ b/weed/admin/view/app/s3tables_namespaces_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -32,47 +33,61 @@ func S3TablesNamespaces(data dash.S3TablesNamespacesData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-layers me-2\"></i>S3 Tables Namespaces ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var2 = []any{formatBadgeClass(data.BucketFormat), "ms-2 align-middle"}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var2...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "<span class=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var3 string- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var2).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_namespaces.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\" title=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var4 string- templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatBadgeTitle(data.BucketFormat))- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_namespaces.templ`, Line: 15, Col: 119}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var4)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "<span class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var2 = []any{formatBadgeClass(data.BucketFormat), "ms-2 align-middle"}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var2...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var2).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_namespaces.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\" title=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var4 string+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templruntime.NewAttributeExpression(formatBadgeTitle(data.BucketFormat)).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_namespaces.templ`, Line: 15, Col: 119}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var4)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, ">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -85,20 +100,20 @@ func S3TablesNamespaces(data dash.S3TablesNamespacesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</span></h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createS3TablesNamespaceModal\"><i class=\"bi bi-plus me-1\"></i>Create Namespace</button></div></div></div><div class=\"mb-3\"><a href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "</span></h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createS3TablesNamespaceModal\"><i class=\"bi bi-plus me-1\"></i>Create Namespace</button></div></div></div><div class=\"mb-3\"><a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var6 templ.SafeURL- templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/object-store/s3tables/buckets"))+ var templ_7745c5c3_Var6 string+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/object-store/s3tables/buckets")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_namespaces.templ`, Line: 26, Col: 60}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var6)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "\" class=\"btn btn-sm btn-outline-secondary\"><i class=\"bi bi-arrow-left me-1\"></i>Back to Buckets</a> <span class=\"text-muted ms-2\">Bucket ARN: ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "\" class=\"btn btn-sm btn-outline-secondary\"><i class=\"bi bi-arrow-left me-1\"></i>Back to Buckets</a> <span class=\"text-muted ms-2\">Bucket ARN: ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -111,23 +126,23 @@ func S3TablesNamespaces(data dash.S3TablesNamespacesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}bucketName, parseErr := s3tables.ParseBucketNameFromARN(data.BucketARN)if parseErr != nil {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<span class=\"text-danger ms-2\">Invalid bucket ARN</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<span class=\"text-danger ms-2\">Invalid bucket ARN</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "</div><div id=\"s3tables-namespaces-content\" data-bucket-arn=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "</div><div id=\"s3tables-namespaces-content\" data-bucket-arn=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var8 string- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.BucketARN)+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.BucketARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_namespaces.templ`, Line: 35, Col: 71}}@@ -135,7 +150,7 @@ func S3TablesNamespaces(data dash.S3TablesNamespacesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "\"><div class=\"row mb-4\"><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total Namespaces</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "\"><div class=\"row mb-4\"><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total Namespaces</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -148,7 +163,7 @@ func S3TablesNamespaces(data dash.S3TablesNamespacesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "</div></div><div class=\"col-auto\"><i class=\"bi bi-layers icon-2x text-gray-300\"></i></div></div></div></div></div><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-info shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-info text-uppercase mb-1\">Last Updated</div><div class=\"h6 mb-0 font-weight-bold text-gray-800\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</div></div><div class=\"col-auto\"><i class=\"bi bi-layers icon-2x text-gray-300\"></i></div></div></div></div></div><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-info shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-info text-uppercase mb-1\">Last Updated</div><div class=\"h6 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -161,17 +176,17 @@ func S3TablesNamespaces(data dash.S3TablesNamespacesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</div></div><div class=\"col-auto\"><i class=\"bi bi-clock icon-2x text-gray-300\"></i></div></div></div></div></div></div><div class=\"row\"><div class=\"col-12\"><div class=\"card shadow mb-4\"><div class=\"card-header py-3 d-flex flex-row align-items-center justify-content-between\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-layers me-2\"></i>Namespaces</h6></div><div class=\"card-body\"><div class=\"table-responsive\"><table class=\"table table-hover\" width=\"100%\" cellspacing=\"0\" id=\"s3tablesNamespacesTable\"><thead><tr><th>Namespace</th><th>Iceberg Endpoint</th><th>Created</th><th>Actions</th></tr></thead> <tbody>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</div></div><div class=\"col-auto\"><i class=\"bi bi-clock icon-2x text-gray-300\"></i></div></div></div></div></div></div><div class=\"row\"><div class=\"col-12\"><div class=\"card shadow mb-4\"><div class=\"card-header py-3 d-flex flex-row align-items-center justify-content-between\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-layers me-2\"></i>Namespaces</h6></div><div class=\"card-body\"><div class=\"table-responsive\"><table class=\"table table-hover\" width=\"100%\" cellspacing=\"0\" id=\"s3tablesNamespacesTable\"><thead><tr><th>Namespace</th><th>Iceberg Endpoint</th><th>Created</th><th>Actions</th></tr></thead> <tbody>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}for _, namespace := range data.Namespaces {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "<tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "<tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}namespaceName := strings.Join(namespace.Namespace, ".")- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "<td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "<td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -184,12 +199,12 @@ func S3TablesNamespaces(data dash.S3TablesNamespacesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if parseErr == nil {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<code class=\"small\">/v1/")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<code class=\"small\">/v1/")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -202,7 +217,7 @@ func S3TablesNamespaces(data dash.S3TablesNamespacesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "/namespaces/")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "/namespaces/")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -215,17 +230,17 @@ func S3TablesNamespaces(data dash.S3TablesNamespacesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "/tables</code>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "/tables</code>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<span class=\"text-muted\">-</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "<span class=\"text-muted\">-</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -238,40 +253,40 @@ func S3TablesNamespaces(data dash.S3TablesNamespacesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "</td><td><div class=\"btn-group btn-group-sm\" role=\"group\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</td><td><div class=\"btn-group btn-group-sm\" role=\"group\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if parseErr == nil {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "<a class=\"btn btn-outline-primary btn-sm\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "<a class=\"btn btn-outline-primary btn-sm\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var15 templ.SafeURL- templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables", bucketName, namespaceName)))+ var templ_7745c5c3_Var15 string+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables", bucketName, namespaceName))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_namespaces.templ`, Line: 111, Col: 175}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\"><i class=\"bi bi-table\"></i></a> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\"><i class=\"bi bi-table\"></i></a> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "<button type=\"button\" class=\"btn btn-outline-primary btn-sm\" disabled title=\"Invalid bucket ARN\"><i class=\"bi bi-table\"></i></button> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<button type=\"button\" class=\"btn btn-outline-primary btn-sm\" disabled title=\"Invalid bucket ARN\"><i class=\"bi bi-table\"></i></button> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<button type=\"button\" class=\"btn btn-outline-danger btn-sm s3tables-delete-namespace-btn\" data-namespace-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "<button type=\"button\" class=\"btn btn-outline-danger btn-sm s3tables-delete-namespace-btn\" data-namespace-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var16 string- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(namespaceName)+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(namespaceName).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_namespaces.templ`, Line: 119, Col: 138}}@@ -279,23 +294,23 @@ func S3TablesNamespaces(data dash.S3TablesNamespacesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\" title=\"Delete\"><i class=\"bi bi-trash\"></i></button></div></td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\" title=\"Delete\"><i class=\"bi bi-trash\"></i></button></div></td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if len(data.Namespaces) == 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "<tr><td colspan=\"4\" class=\"text-center text-muted py-4\"><i class=\"bi bi-layers icon-3x mb-3 text-muted\"></i><div><h5>No namespaces found</h5><p>Create your first namespace to organize tables.</p><button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createS3TablesNamespaceModal\"><i class=\"bi bi-plus me-1\"></i>Create Namespace</button></div></td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<tr><td colspan=\"4\" class=\"text-center text-muted py-4\"><i class=\"bi bi-layers icon-3x mb-3 text-muted\"></i><div><h5>No namespaces found</h5><p>Create your first namespace to organize tables.</p><button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createS3TablesNamespaceModal\"><i class=\"bi bi-plus me-1\"></i>Create Namespace</button></div></td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</tbody></table></div></div></div></div></div></div><div class=\"modal fade\" id=\"createS3TablesNamespaceModal\" tabindex=\"-1\" aria-labelledby=\"createS3TablesNamespaceModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"createS3TablesNamespaceModalLabel\"><i class=\"bi bi-plus me-2\"></i>Create Namespace</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"createS3TablesNamespaceForm\"><div class=\"modal-body\"><input type=\"hidden\" name=\"bucket_arn\" value=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "</tbody></table></div></div></div></div></div></div><div class=\"modal fade\" id=\"createS3TablesNamespaceModal\" tabindex=\"-1\" aria-labelledby=\"createS3TablesNamespaceModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"createS3TablesNamespaceModalLabel\"><i class=\"bi bi-plus me-2\"></i>Create Namespace</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"createS3TablesNamespaceForm\"><div class=\"modal-body\"><input type=\"hidden\" name=\"bucket_arn\" value=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var17 string- templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.BucketARN)+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.BucketARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_namespaces.templ`, Line: 159, Col: 68}}@@ -303,7 +318,7 @@ func S3TablesNamespaces(data dash.S3TablesNamespacesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\"><div class=\"mb-3\"><label for=\"s3tablesNamespaceName\" class=\"form-label\">Namespace</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesNamespaceName\" name=\"name\" placeholder=\"analytics\" required><div class=\"form-text\">Use lowercase letters, numbers, and underscores. Use dots for nested namespaces (for example, analytics.daily).</div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"submit\" class=\"btn btn-primary\"><i class=\"bi bi-plus me-1\"></i>Create</button></div></form></div></div></div><div class=\"modal fade\" id=\"deleteS3TablesNamespaceModal\" tabindex=\"-1\" aria-labelledby=\"deleteS3TablesNamespaceModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"deleteS3TablesNamespaceModalLabel\"><i class=\"bi bi-exclamation-triangle me-2 text-warning\"></i>Delete Namespace</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><p>Are you sure you want to delete the namespace <strong id=\"deleteS3TablesNamespaceName\"></strong>?</p></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-danger\" onclick=\"deleteS3TablesNamespace()\"><i class=\"bi bi-trash me-1\"></i>Delete</button></div></div></div></div><script>\n\t\tlet s3tablesNamespaceDeleteModalInstance = null;\n\t\tconst dataBucketArn = document.getElementById('s3tables-namespaces-content').dataset.bucketArn || '';\n\t\tconst csrfTokenMeta = document.querySelector('meta[name=\"csrf-token\"]');\n\t\tconst csrfToken = csrfTokenMeta ? (csrfTokenMeta.getAttribute('content') || '') : '';\n\n\t\tfunction makeJSONHeaders() {\n\t\t\tconst headers = { 'Content-Type': 'application/json' };\n\t\t\tif (csrfToken) {\n\t\t\t\theaders['X-CSRF-Token'] = csrfToken;\n\t\t\t}\n\t\t\treturn headers;\n\t\t}\n\n\t\tasync function readErrorMessage(response, fallbackMessage) {\n\t\t\tconst responseBody = await response.text();\n\t\t\tif (!responseBody) {\n\t\t\t\treturn fallbackMessage;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst payload = JSON.parse(responseBody);\n\t\t\t\tif (payload && typeof payload.error === 'string' && payload.error) {\n\t\t\t\t\treturn payload.error;\n\t\t\t\t}\n\t\t\t\tif (payload && typeof payload.message === 'string' && payload.message) {\n\t\t\t\t\treturn payload.message;\n\t\t\t\t}\n\t\t\t} catch (parseError) {\n\t\t\t\t// Fall through to the raw response body when parsing fails.\n\t\t\t}\n\t\t\treturn responseBody;\n\t\t}\n\n\t\tfunction validateNamespaceInput(input, allowEmpty) {\n\t\t\tif (typeof window.applyS3TablesNamespaceNameValidity === 'function') {\n\t\t\t\treturn window.applyS3TablesNamespaceNameValidity(input, allowEmpty);\n\t\t\t}\n\t\t\tconst name = (input.value || '').trim();\n\t\t\tif (allowEmpty && name === '') {\n\t\t\t\tinput.setCustomValidity('');\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\t\tlet message = '';\n\t\t\t\tif (!name) {\n\t\t\t\t\tmessage = 'Namespace name is required';\n\t\t\t\t} else if (name.length < 1 || name.length > 255) {\n\t\t\t\t\tmessage = 'Namespace name must be between 1 and 255 characters';\n\t\t\t\t} else if (name === '.' || name === '..') {\n\t\t\t\t\tmessage = \"namespace name cannot be '.' or '..'\";\n\t\t\t\t} else if (name.includes('/')) {\n\t\t\t\t\tmessage = \"namespace name cannot contain '/'\";\n\t\t\t\t} else {\n\t\t\t\t\tfor (const part of name.split('.')) {\n\t\t\t\t\t\tif (!part) {\n\t\t\t\t\t\t\tmessage = 'namespace levels cannot be empty';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst start = part[0];\n\t\t\t\t\t\tconst end = part[part.length - 1];\n\t\t\t\t\t\tconst isStartValid = (start >= 'a' && start <= 'z') || (start >= '0' && start <= '9');\n\t\t\t\t\t\tconst isEndValid = (end >= 'a' && end <= 'z') || (end >= '0' && end <= '9');\n\t\t\t\t\t\tif (!isStartValid) {\n\t\t\t\t\t\t\tmessage = 'Namespace name must start with a letter or digit';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!isEndValid) {\n\t\t\t\t\t\t\tmessage = 'Namespace name must end with a letter or digit';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (const ch of part) {\n\t\t\t\t\t\t\tconst isLower = ch >= 'a' && ch <= 'z';\n\t\t\t\t\t\t\tconst isDigit = ch >= '0' && ch <= '9';\n\t\t\t\t\t\t\tif (!(isLower || isDigit || ch === '_')) {\n\t\t\t\t\t\t\t\tmessage = \"invalid namespace name: only 'a-z', '0-9', and '_' are allowed\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (message) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (part.startsWith('aws')) {\n\t\t\t\t\t\t\tmessage = \"namespace name cannot start with reserved prefix 'aws'\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinput.setCustomValidity(message);\n\t\t\t\treturn message;\n\t\t\t}\n\n\t\tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t\ts3tablesNamespaceDeleteModalInstance = new bootstrap.Modal(document.getElementById('deleteS3TablesNamespaceModal'));\n\n\t\t\tdocument.querySelectorAll('.s3tables-delete-namespace-btn').forEach(button => {\n\t\t\t\tbutton.addEventListener('click', function() {\n\t\t\t\t\tdocument.getElementById('deleteS3TablesNamespaceName').textContent = this.dataset.namespaceName || '';\n\t\t\t\t\tdocument.getElementById('deleteS3TablesNamespaceModal').dataset.namespaceName = this.dataset.namespaceName || '';\n\t\t\t\t\ts3tablesNamespaceDeleteModalInstance.show();\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tconst namespaceInput = document.getElementById('s3tablesNamespaceName');\n\t\t\tif (namespaceInput) {\n\t\t\t\tnamespaceInput.addEventListener('input', function() {\n\t\t\t\t\tvalidateNamespaceInput(this, true);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tdocument.getElementById('createS3TablesNamespaceForm').addEventListener('submit', async function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tconst namespaceInput = document.getElementById('s3tablesNamespaceName');\n\t\t\t\tconst name = namespaceInput.value.trim();\n\t\t\t\tconst nameError = validateNamespaceInput(namespaceInput, false);\n\t\t\t\tif (nameError) {\n\t\t\t\t\tnamespaceInput.reportValidity();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await fetch((window.__BASE_PATH__ || '') + '/api/s3tables/namespaces', {\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\theaders: makeJSONHeaders(),\n\t\t\t\t\t\tbody: JSON.stringify({ bucket_arn: dataBucketArn, name: name })\n\t\t\t\t\t});\n\t\t\t\t\tif (!response.ok) {\n\t\t\t\t\t\tconst errorMessage = await readErrorMessage(response, 'Failed to create namespace');\n\t\t\t\t\t\talert(errorMessage);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\talert('Namespace created');\n\t\t\t\t\tlocation.reload();\n\t\t\t\t} catch (error) {\n\t\t\t\t\talert('Failed to create namespace: ' + error.message);\n\t\t\t\t}\n\t\t\t});\n\n\t\t});\n\n\t\tasync function deleteS3TablesNamespace() {\n\t\t\tconst namespace = document.getElementById('deleteS3TablesNamespaceModal').dataset.namespaceName;\n\t\t\tif (!namespace) return;\n\t\t\ttry {\n\t\t\t\tconst requestOptions = { method: 'DELETE' };\n\t\t\t\tif (csrfToken) {\n\t\t\t\t\trequestOptions.headers = { 'X-CSRF-Token': csrfToken };\n\t\t\t\t}\n\t\t\t\tconst response = await fetch((window.__BASE_PATH__ || '') + `/api/s3tables/namespaces?bucket=${encodeURIComponent(dataBucketArn)}&name=${encodeURIComponent(namespace)}`, requestOptions);\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\tconst errorMessage = await readErrorMessage(response, 'Failed to delete namespace');\n\t\t\t\t\talert(errorMessage);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\talert('Namespace deleted');\n\t\t\t\tlocation.reload();\n\t\t\t} catch (error) {\n\t\t\t\talert('Failed to delete namespace: ' + error.message);\n\t\t\t}\n\t\t}\n\n\t</script>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\"><div class=\"mb-3\"><label for=\"s3tablesNamespaceName\" class=\"form-label\">Namespace</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesNamespaceName\" name=\"name\" placeholder=\"analytics\" required><div class=\"form-text\">Use lowercase letters, numbers, and underscores. Use dots for nested namespaces (for example, analytics.daily).</div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"submit\" class=\"btn btn-primary\"><i class=\"bi bi-plus me-1\"></i>Create</button></div></form></div></div></div><div class=\"modal fade\" id=\"deleteS3TablesNamespaceModal\" tabindex=\"-1\" aria-labelledby=\"deleteS3TablesNamespaceModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"deleteS3TablesNamespaceModalLabel\"><i class=\"bi bi-exclamation-triangle me-2 text-warning\"></i>Delete Namespace</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><p>Are you sure you want to delete the namespace <strong id=\"deleteS3TablesNamespaceName\"></strong>?</p></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-danger\" onclick=\"deleteS3TablesNamespace()\"><i class=\"bi bi-trash me-1\"></i>Delete</button></div></div></div></div><script>\n\t\tlet s3tablesNamespaceDeleteModalInstance = null;\n\t\tconst dataBucketArn = document.getElementById('s3tables-namespaces-content').dataset.bucketArn || '';\n\t\tconst csrfTokenMeta = document.querySelector('meta[name=\"csrf-token\"]');\n\t\tconst csrfToken = csrfTokenMeta ? (csrfTokenMeta.getAttribute('content') || '') : '';\n\n\t\tfunction makeJSONHeaders() {\n\t\t\tconst headers = { 'Content-Type': 'application/json' };\n\t\t\tif (csrfToken) {\n\t\t\t\theaders['X-CSRF-Token'] = csrfToken;\n\t\t\t}\n\t\t\treturn headers;\n\t\t}\n\n\t\tasync function readErrorMessage(response, fallbackMessage) {\n\t\t\tconst responseBody = await response.text();\n\t\t\tif (!responseBody) {\n\t\t\t\treturn fallbackMessage;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst payload = JSON.parse(responseBody);\n\t\t\t\tif (payload && typeof payload.error === 'string' && payload.error) {\n\t\t\t\t\treturn payload.error;\n\t\t\t\t}\n\t\t\t\tif (payload && typeof payload.message === 'string' && payload.message) {\n\t\t\t\t\treturn payload.message;\n\t\t\t\t}\n\t\t\t} catch (parseError) {\n\t\t\t\t// Fall through to the raw response body when parsing fails.\n\t\t\t}\n\t\t\treturn responseBody;\n\t\t}\n\n\t\tfunction validateNamespaceInput(input, allowEmpty) {\n\t\t\tif (typeof window.applyS3TablesNamespaceNameValidity === 'function') {\n\t\t\t\treturn window.applyS3TablesNamespaceNameValidity(input, allowEmpty);\n\t\t\t}\n\t\t\tconst name = (input.value || '').trim();\n\t\t\tif (allowEmpty && name === '') {\n\t\t\t\tinput.setCustomValidity('');\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\t\tlet message = '';\n\t\t\t\tif (!name) {\n\t\t\t\t\tmessage = 'Namespace name is required';\n\t\t\t\t} else if (name.length < 1 || name.length > 255) {\n\t\t\t\t\tmessage = 'Namespace name must be between 1 and 255 characters';\n\t\t\t\t} else if (name === '.' || name === '..') {\n\t\t\t\t\tmessage = \"namespace name cannot be '.' or '..'\";\n\t\t\t\t} else if (name.includes('/')) {\n\t\t\t\t\tmessage = \"namespace name cannot contain '/'\";\n\t\t\t\t} else {\n\t\t\t\t\tfor (const part of name.split('.')) {\n\t\t\t\t\t\tif (!part) {\n\t\t\t\t\t\t\tmessage = 'namespace levels cannot be empty';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst start = part[0];\n\t\t\t\t\t\tconst end = part[part.length - 1];\n\t\t\t\t\t\tconst isStartValid = (start >= 'a' && start <= 'z') || (start >= '0' && start <= '9');\n\t\t\t\t\t\tconst isEndValid = (end >= 'a' && end <= 'z') || (end >= '0' && end <= '9');\n\t\t\t\t\t\tif (!isStartValid) {\n\t\t\t\t\t\t\tmessage = 'Namespace name must start with a letter or digit';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!isEndValid) {\n\t\t\t\t\t\t\tmessage = 'Namespace name must end with a letter or digit';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (const ch of part) {\n\t\t\t\t\t\t\tconst isLower = ch >= 'a' && ch <= 'z';\n\t\t\t\t\t\t\tconst isDigit = ch >= '0' && ch <= '9';\n\t\t\t\t\t\t\tif (!(isLower || isDigit || ch === '_')) {\n\t\t\t\t\t\t\t\tmessage = \"invalid namespace name: only 'a-z', '0-9', and '_' are allowed\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (message) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (part.startsWith('aws')) {\n\t\t\t\t\t\t\tmessage = \"namespace name cannot start with reserved prefix 'aws'\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinput.setCustomValidity(message);\n\t\t\t\treturn message;\n\t\t\t}\n\n\t\tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t\ts3tablesNamespaceDeleteModalInstance = new bootstrap.Modal(document.getElementById('deleteS3TablesNamespaceModal'));\n\n\t\t\tdocument.querySelectorAll('.s3tables-delete-namespace-btn').forEach(button => {\n\t\t\t\tbutton.addEventListener('click', function() {\n\t\t\t\t\tdocument.getElementById('deleteS3TablesNamespaceName').textContent = this.dataset.namespaceName || '';\n\t\t\t\t\tdocument.getElementById('deleteS3TablesNamespaceModal').dataset.namespaceName = this.dataset.namespaceName || '';\n\t\t\t\t\ts3tablesNamespaceDeleteModalInstance.show();\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tconst namespaceInput = document.getElementById('s3tablesNamespaceName');\n\t\t\tif (namespaceInput) {\n\t\t\t\tnamespaceInput.addEventListener('input', function() {\n\t\t\t\t\tvalidateNamespaceInput(this, true);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tdocument.getElementById('createS3TablesNamespaceForm').addEventListener('submit', async function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tconst namespaceInput = document.getElementById('s3tablesNamespaceName');\n\t\t\t\tconst name = namespaceInput.value.trim();\n\t\t\t\tconst nameError = validateNamespaceInput(namespaceInput, false);\n\t\t\t\tif (nameError) {\n\t\t\t\t\tnamespaceInput.reportValidity();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await fetch((window.__BASE_PATH__ || '') + '/api/s3tables/namespaces', {\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\theaders: makeJSONHeaders(),\n\t\t\t\t\t\tbody: JSON.stringify({ bucket_arn: dataBucketArn, name: name })\n\t\t\t\t\t});\n\t\t\t\t\tif (!response.ok) {\n\t\t\t\t\t\tconst errorMessage = await readErrorMessage(response, 'Failed to create namespace');\n\t\t\t\t\t\talert(errorMessage);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\talert('Namespace created');\n\t\t\t\t\tlocation.reload();\n\t\t\t\t} catch (error) {\n\t\t\t\t\talert('Failed to create namespace: ' + error.message);\n\t\t\t\t}\n\t\t\t});\n\n\t\t});\n\n\t\tasync function deleteS3TablesNamespace() {\n\t\t\tconst namespace = document.getElementById('deleteS3TablesNamespaceModal').dataset.namespaceName;\n\t\t\tif (!namespace) return;\n\t\t\ttry {\n\t\t\t\tconst requestOptions = { method: 'DELETE' };\n\t\t\t\tif (csrfToken) {\n\t\t\t\t\trequestOptions.headers = { 'X-CSRF-Token': csrfToken };\n\t\t\t\t}\n\t\t\t\tconst response = await fetch((window.__BASE_PATH__ || '') + `/api/s3tables/namespaces?bucket=${encodeURIComponent(dataBucketArn)}&name=${encodeURIComponent(namespace)}`, requestOptions);\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\tconst errorMessage = await readErrorMessage(response, 'Failed to delete namespace');\n\t\t\t\t\talert(errorMessage);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\talert('Namespace deleted');\n\t\t\t\tlocation.reload();\n\t\t\t} catch (error) {\n\t\t\t\talert('Failed to delete namespace: ' + error.message);\n\t\t\t}\n\t\t}\n\n\t</script>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}diff --git a/weed/admin/view/app/s3tables_tables_templ.go b/weed/admin/view/app/s3tables_tables_templ.goindex f857087e53..ed652b3e25 100644--- a/weed/admin/view/app/s3tables_tables_templ.go+++ b/weed/admin/view/app/s3tables_tables_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -32,47 +33,61 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><h1 class=\"h2\"><i class=\"bi bi-table me-2\"></i>S3 Tables ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var2 = []any{formatBadgeClass(data.BucketFormat), "ms-2 align-middle"}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var2...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "<span class=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var3 string- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var2).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\" title=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var4 string- templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatBadgeTitle(data.BucketFormat))- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 15, Col: 119}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var4)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "<span class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var2 = []any{formatBadgeClass(data.BucketFormat), "ms-2 align-middle"}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var2...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var2).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\" title=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var4 string+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templruntime.NewAttributeExpression(formatBadgeTitle(data.BucketFormat)).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 15, Col: 119}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var4)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, ">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -85,36 +100,36 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</span></h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createS3TablesTableModal\"><i class=\"bi bi-plus me-1\"></i>Create Table</button></div></div></div><div class=\"mb-3\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "</span></h1><div class=\"btn-toolbar mb-2 mb-md-0\"><div class=\"btn-group me-2\"><button type=\"button\" class=\"btn btn-sm btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createS3TablesTableModal\"><i class=\"bi bi-plus me-1\"></i>Create Table</button></div></div></div><div class=\"mb-3\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}bucketName, parseErr := s3tables.ParseBucketNameFromARN(data.BucketARN)if parseErr == nil {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<a href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "<a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var6 templ.SafeURL- templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces", url.PathEscape(bucketName))))+ var templ_7745c5c3_Var6 string+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces", url.PathEscape(bucketName)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 28, Col: 116}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var6)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "\" class=\"btn btn-sm btn-outline-secondary\"><i class=\"bi bi-arrow-left me-1\"></i>Back to Namespaces</a> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "\" class=\"btn btn-sm btn-outline-secondary\"><i class=\"bi bi-arrow-left me-1\"></i>Back to Namespaces</a> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<button type=\"button\" class=\"btn btn-sm btn-outline-secondary\" disabled title=\"Invalid bucket ARN\"><i class=\"bi bi-arrow-left me-1\"></i>Back to Namespaces</button> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<button type=\"button\" class=\"btn btn-sm btn-outline-secondary\" disabled title=\"Invalid bucket ARN\"><i class=\"bi bi-arrow-left me-1\"></i>Back to Namespaces</button> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<span class=\"text-muted ms-2\">Bucket ARN: ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "<span class=\"text-muted ms-2\">Bucket ARN: ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -127,7 +142,7 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "</span> <span class=\"text-muted ms-2\">Namespace: ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "</span> <span class=\"text-muted ms-2\">Namespace: ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -140,22 +155,22 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "</span> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</span> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if parseErr != nil {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "<span class=\"text-danger ms-2\">Invalid bucket ARN</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "<span class=\"text-danger ms-2\">Invalid bucket ARN</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</div><div id=\"s3tables-tables-content\" data-bucket-arn=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "</div><div id=\"s3tables-tables-content\" data-bucket-arn=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var9 string- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.BucketARN)+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.BucketARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 42, Col: 67}}@@ -163,12 +178,12 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\" data-namespace=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\" data-namespace=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var10 string- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Namespace)+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Namespace).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 42, Col: 101}}@@ -176,7 +191,7 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\"><div class=\"row mb-4\"><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total Tables</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\"><div class=\"row mb-4\"><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total Tables</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -189,7 +204,7 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</div></div><div class=\"col-auto\"><i class=\"bi bi-table icon-2x text-gray-300\"></i></div></div></div></div></div><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-info shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-info text-uppercase mb-1\">Last Updated</div><div class=\"h6 mb-0 font-weight-bold text-gray-800\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</div></div><div class=\"col-auto\"><i class=\"bi bi-table icon-2x text-gray-300\"></i></div></div></div></div></div><div class=\"col-xl-4 col-md-6 mb-4\"><div class=\"card border-left-info shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-info text-uppercase mb-1\">Last Updated</div><div class=\"h6 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -202,17 +217,17 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</div></div><div class=\"col-auto\"><i class=\"bi bi-clock icon-2x text-gray-300\"></i></div></div></div></div></div></div><div class=\"row\"><div class=\"col-12\"><div class=\"card shadow mb-4\"><div class=\"card-header py-3 d-flex flex-row align-items-center justify-content-between\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-table me-2\"></i>Tables</h6></div><div class=\"card-body\"><div class=\"table-responsive\"><table class=\"table table-hover\" width=\"100%\" cellspacing=\"0\" id=\"s3tablesTablesTable\"><thead><tr><th>Name</th><th>Format</th><th>Rows</th><th>Table ARN</th><th>Created</th><th>Modified</th><th>S3 Location</th><th>Metadata</th><th>Actions</th></tr></thead> <tbody>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</div></div><div class=\"col-auto\"><i class=\"bi bi-clock icon-2x text-gray-300\"></i></div></div></div></div></div></div><div class=\"row\"><div class=\"col-12\"><div class=\"card shadow mb-4\"><div class=\"card-header py-3 d-flex flex-row align-items-center justify-content-between\"><h6 class=\"m-0 font-weight-bold text-primary\"><i class=\"bi bi-table me-2\"></i>Tables</h6></div><div class=\"card-body\"><div class=\"table-responsive\"><table class=\"table table-hover\" width=\"100%\" cellspacing=\"0\" id=\"s3tablesTablesTable\"><thead><tr><th>Name</th><th>Format</th><th>Rows</th><th>Table ARN</th><th>Created</th><th>Modified</th><th>S3 Location</th><th>Metadata</th><th>Actions</th></tr></thead> <tbody>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}for _, table := range data.Tables {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "<tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}tableName := table.Name- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "<td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -225,42 +240,60 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var14 = []any{formatBadgeClass(table.Format)}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var14...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<span class=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var15 string- templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var14).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\" title=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var16 string- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatBadgeTitle(table.Format))- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 113, Col: 97}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "<span class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var14 = []any{formatBadgeClass(table.Format)}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var14...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var15 string+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var14).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\" title=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var16 string+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(formatBadgeTitle(table.Format)).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 113, Col: 97}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, ">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -273,12 +306,12 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</span></td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</span></td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if rows, ok := data.ObservedRows[tableName]; ok {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<span title=\"Reported by a plugin worker\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "<span title=\"Reported by a plugin worker\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -291,17 +324,17 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "<span class=\"text-muted\">—</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<span class=\"text-muted\">—</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</td><td class=\"text-muted small\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</td><td class=\"text-muted small\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -314,7 +347,7 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -327,7 +360,7 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -340,12 +373,12 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if parseErr == nil {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "<code class=\"small\">s3://")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<code class=\"small\">s3://")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -358,7 +391,7 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "/")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "/")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -371,7 +404,7 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "/")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "/")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -384,22 +417,22 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "/</code>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "/</code>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<span class=\"text-muted\">-</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<span class=\"text-muted\">-</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</td><td>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</td><td>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if table.MetadataLocation != "" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<span class=\"text-muted small\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<span class=\"text-muted small\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -412,50 +445,50 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<span class=\"text-muted\">-</span>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "<span class=\"text-muted\">-</span>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</td><td><div class=\"btn-group btn-group-sm\" role=\"group\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "</td><td><div class=\"btn-group btn-group-sm\" role=\"group\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if parseErr == nil {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "<a class=\"btn btn-outline-primary btn-sm\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "<a class=\"btn btn-outline-primary btn-sm\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var26 templ.SafeURL- templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables/%s", url.PathEscape(bucketName), url.PathEscape(data.Namespace), url.PathEscape(tableName))))+ var templ_7745c5c3_Var26 string+ templ_7745c5c3_Var26, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/object-store/s3tables/buckets/%s/namespaces/%s/tables/%s", url.PathEscape(bucketName), url.PathEscape(data.Namespace), url.PathEscape(tableName)))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 142, Col: 238}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var26)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "\" title=\"View Table Details\"><i class=\"bi bi-eye\"></i></a> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "\" title=\"View Table Details\"><i class=\"bi bi-eye\"></i></a> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "<button type=\"button\" class=\"btn btn-outline-primary btn-sm\" disabled title=\"Invalid bucket ARN\"><i class=\"bi bi-eye\"></i></button> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "<button type=\"button\" class=\"btn btn-outline-primary btn-sm\" disabled title=\"Invalid bucket ARN\"><i class=\"bi bi-eye\"></i></button> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<button type=\"button\" class=\"btn btn-outline-success btn-sm s3tables-tags-btn\" data-resource-arn=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "<button type=\"button\" class=\"btn btn-outline-success btn-sm s3tables-tags-btn\" data-resource-arn=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var27 string- templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.ResolveAttributeValue(table.TableARN)+ templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.NewAttributeExpression(table.TableARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 150, Col: 126}}@@ -463,12 +496,12 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "\" title=\"Tags\"><i class=\"bi bi-tags\"></i></button> <button type=\"button\" class=\"btn btn-outline-info btn-sm s3tables-table-policy-btn\" data-table-arn=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "\" title=\"Tags\"><i class=\"bi bi-tags\"></i></button> <button type=\"button\" class=\"btn btn-outline-info btn-sm s3tables-table-policy-btn\" data-table-arn=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var28 string- templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.ResolveAttributeValue(table.TableARN)+ templ_7745c5c3_Var28, templ_7745c5c3_Err = templruntime.NewAttributeExpression(table.TableARN).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 153, Col: 128}}@@ -476,12 +509,12 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "\" data-table-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "\" data-table-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var29 string- templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.ResolveAttributeValue(tableName)+ templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.NewAttributeExpression(tableName).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 153, Col: 158}}@@ -489,12 +522,12 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "\" title=\"Table Policy\"><i class=\"bi bi-shield\"></i></button> <button type=\"button\" class=\"btn btn-outline-danger btn-sm s3tables-delete-table-btn\" data-table-name=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "\" title=\"Table Policy\"><i class=\"bi bi-shield\"></i></button> <button type=\"button\" class=\"btn btn-outline-danger btn-sm s3tables-delete-table-btn\" data-table-name=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var30 string- templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.ResolveAttributeValue(tableName)+ templ_7745c5c3_Var30, templ_7745c5c3_Err = templruntime.NewAttributeExpression(tableName).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 156, Col: 126}}@@ -502,28 +535,28 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "\" title=\"Delete\"><i class=\"bi bi-trash\"></i></button></div></td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "\" title=\"Delete\"><i class=\"bi bi-trash\"></i></button></div></td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if len(data.Tables) == 0 {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<tr><td colspan=\"9\" class=\"text-center text-muted py-4\"><i class=\"bi bi-table icon-3x mb-3 text-muted\"></i><div><h5>No tables found</h5><p>Create your first table to start storing data.</p><button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createS3TablesTableModal\"><i class=\"bi bi-plus me-1\"></i>Create Table</button></div></td></tr>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "<tr><td colspan=\"9\" class=\"text-center text-muted py-4\"><i class=\"bi bi-table icon-3x mb-3 text-muted\"></i><div><h5>No tables found</h5><p>Create your first table to start storing data.</p><button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createS3TablesTableModal\"><i class=\"bi bi-plus me-1\"></i>Create Table</button></div></td></tr>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "</tbody></table></div></div></div></div></div></div><div class=\"modal fade\" id=\"createS3TablesTableModal\" tabindex=\"-1\" aria-labelledby=\"createS3TablesTableModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-lg\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"createS3TablesTableModalLabel\"><i class=\"bi bi-plus me-2\"></i>Create Table</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"createS3TablesTableForm\"><div class=\"modal-body\"><div class=\"mb-3\"><label for=\"s3tablesTableName\" class=\"form-label\">Table Name</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesTableName\" name=\"name\" required></div><div class=\"mb-3\"><label for=\"s3tablesTableFormat\" class=\"form-label\">Format</label> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "</tbody></table></div></div></div></div></div></div><div class=\"modal fade\" id=\"createS3TablesTableModal\" tabindex=\"-1\" aria-labelledby=\"createS3TablesTableModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-lg\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"createS3TablesTableModalLabel\"><i class=\"bi bi-plus me-2\"></i>Create Table</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"createS3TablesTableForm\"><div class=\"modal-body\"><div class=\"mb-3\"><label for=\"s3tablesTableName\" class=\"form-label\">Table Name</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesTableName\" name=\"name\" required></div><div class=\"mb-3\"><label for=\"s3tablesTableFormat\" class=\"form-label\">Format</label> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.BucketFormat != "" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "<input type=\"text\" class=\"form-control-plaintext ps-2 border rounded bg-light\" id=\"s3tablesTableFormat\" name=\"format\" value=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "<input type=\"text\" class=\"form-control-plaintext ps-2 border rounded bg-light\" id=\"s3tablesTableFormat\" name=\"format\" value=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var31 string- templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatLabel(data.BucketFormat))+ templ_7745c5c3_Var31, templ_7745c5c3_Err = templruntime.NewAttributeExpression(formatLabel(data.BucketFormat)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/s3tables_tables.templ`, Line: 203, Col: 164}}@@ -531,17 +564,17 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "\" readonly><div class=\"form-text\">Set by the bucket, which holds one format.</div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "\" readonly><div class=\"form-text\">Set by the bucket, which holds one format.</div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "<select class=\"form-select\" id=\"s3tablesTableFormat\" name=\"format\"><option value=\"ICEBERG\" selected>ICEBERG</option> <option value=\"LANCE\">LANCE</option></select><div class=\"form-text\">This bucket was created before formats were declared, so either is allowed.</div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<select class=\"form-select\" id=\"s3tablesTableFormat\" name=\"format\"><option value=\"ICEBERG\" selected>ICEBERG</option> <option value=\"LANCE\">LANCE</option></select><div class=\"form-text\">This bucket was created before formats were declared, so either is allowed.</div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "</div><div class=\"mb-3\"><label for=\"s3tablesTableMetadata\" class=\"form-label\">Metadata JSON (optional)</label> <textarea class=\"form-control\" id=\"s3tablesTableMetadata\" name=\"metadata\" rows=\"6\" placeholder=\"{ }\"></textarea></div><div class=\"mb-3\"><label for=\"s3tablesTableTags\" class=\"form-label\">Tags</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesTableTags\" name=\"tags\" placeholder=\"key1=value1,key2=value2\"></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"submit\" class=\"btn btn-primary\"><i class=\"bi bi-plus me-1\"></i>Create</button></div></form></div></div></div><div class=\"modal fade\" id=\"deleteS3TablesTableModal\" tabindex=\"-1\" aria-labelledby=\"deleteS3TablesTableModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"deleteS3TablesTableModalLabel\"><i class=\"bi bi-exclamation-triangle me-2 text-warning\"></i>Delete Table</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><p>Are you sure you want to delete the table <strong id=\"deleteS3TablesTableName\"></strong>?</p><div class=\"mb-3\"><label for=\"deleteS3TablesTableVersion\" class=\"form-label\">Version Token (optional)</label> <input type=\"text\" class=\"form-control\" id=\"deleteS3TablesTableVersion\" placeholder=\"Version token\"></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-danger\" onclick=\"deleteS3TablesTable()\"><i class=\"bi bi-trash me-1\"></i>Delete</button></div></div></div></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "</div><div class=\"mb-3\"><label for=\"s3tablesTableMetadata\" class=\"form-label\">Metadata JSON (optional)</label> <textarea class=\"form-control\" id=\"s3tablesTableMetadata\" name=\"metadata\" rows=\"6\" placeholder=\"{ }\"></textarea></div><div class=\"mb-3\"><label for=\"s3tablesTableTags\" class=\"form-label\">Tags</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesTableTags\" name=\"tags\" placeholder=\"key1=value1,key2=value2\"></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"submit\" class=\"btn btn-primary\"><i class=\"bi bi-plus me-1\"></i>Create</button></div></form></div></div></div><div class=\"modal fade\" id=\"deleteS3TablesTableModal\" tabindex=\"-1\" aria-labelledby=\"deleteS3TablesTableModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"deleteS3TablesTableModalLabel\"><i class=\"bi bi-exclamation-triangle me-2 text-warning\"></i>Delete Table</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><div class=\"modal-body\"><p>Are you sure you want to delete the table <strong id=\"deleteS3TablesTableName\"></strong>?</p><div class=\"mb-3\"><label for=\"deleteS3TablesTableVersion\" class=\"form-label\">Version Token (optional)</label> <input type=\"text\" class=\"form-control\" id=\"deleteS3TablesTableVersion\" placeholder=\"Version token\"></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button> <button type=\"button\" class=\"btn btn-danger\" onclick=\"deleteS3TablesTable()\"><i class=\"bi bi-trash me-1\"></i>Delete</button></div></div></div></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -549,7 +582,7 @@ func S3TablesTables(data dash.S3TablesTablesData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<div class=\"modal fade\" id=\"s3tablesTablePolicyModal\" tabindex=\"-1\" aria-labelledby=\"s3tablesTablePolicyModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-xl\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"s3tablesTablePolicyModalLabel\"><i class=\"bi bi-shield me-2\"></i>Table Policy</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"s3tablesTablePolicyForm\"><div class=\"modal-body\"><input type=\"hidden\" id=\"s3tablesTablePolicyBucketArn\" name=\"bucket_arn\"> <input type=\"hidden\" id=\"s3tablesTablePolicyNamespace\" name=\"namespace\"> <input type=\"hidden\" id=\"s3tablesTablePolicyName\" name=\"name\"><ul class=\"nav nav-tabs\" role=\"tablist\"><li class=\"nav-item\" role=\"presentation\"><button class=\"nav-link active\" id=\"s3tablesTablePolicyEditorTabBtn\" type=\"button\" data-bs-toggle=\"tab\" data-bs-target=\"#s3tablesTablePolicyEditorTab\" role=\"tab\" aria-controls=\"s3tablesTablePolicyEditorTab\" aria-selected=\"true\">Editor</button></li><li class=\"nav-item\" role=\"presentation\"><button class=\"nav-link\" id=\"s3tablesTablePolicyJsonTabBtn\" type=\"button\" data-bs-toggle=\"tab\" data-bs-target=\"#s3tablesTablePolicyJsonTab\" role=\"tab\" aria-controls=\"s3tablesTablePolicyJsonTab\" aria-selected=\"false\">JSON</button></li></ul><div class=\"tab-content border border-top-0 rounded-bottom p-3 mb-3\"><div class=\"tab-pane fade show active\" id=\"s3tablesTablePolicyEditorTab\" role=\"tabpanel\" aria-labelledby=\"s3tablesTablePolicyEditorTabBtn\"><div id=\"s3tablesTablePolicyEditorBody\"></div><button type=\"button\" class=\"btn btn-sm btn-outline-secondary\" id=\"s3tablesTablePolicyAddStatementBtn\"><i class=\"bi bi-plus me-1\"></i>Add statement</button></div><div class=\"tab-pane fade\" id=\"s3tablesTablePolicyJsonTab\" role=\"tabpanel\" aria-labelledby=\"s3tablesTablePolicyJsonTabBtn\"><textarea class=\"form-control\" id=\"s3tablesTablePolicyText\" name=\"policy\" rows=\"12\" placeholder=\"{ }\"></textarea></div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button> <button type=\"button\" class=\"btn btn-outline-danger\" id=\"s3tablesTablePolicyDeleteBtn\" onclick=\"deleteS3TablesTablePolicy()\"><i class=\"bi bi-trash me-1\"></i>Delete Policy</button><!-- type=\"button\": a submit button would make Enter in any\n\t\t\t\t\t\t single-line editor input implicitly submit a half-built\n\t\t\t\t\t\t policy, which the backend stores verbatim. --><button type=\"button\" class=\"btn btn-primary\" id=\"s3tablesTablePolicySaveBtn\"><i class=\"bi bi-floppy me-1\"></i>Save Policy</button></div></form></div></div></div><div class=\"modal fade\" id=\"s3tablesTagsModal\" tabindex=\"-1\" aria-labelledby=\"s3tablesTagsModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-lg\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"s3tablesTagsModalLabel\"><i class=\"bi bi-tags me-2\"></i>Resource Tags</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"s3tablesTagsForm\"><div class=\"modal-body\"><input type=\"hidden\" id=\"s3tablesTagsResourceArn\" name=\"resource_arn\"><div class=\"mb-3\"><label class=\"form-label\">Existing Tags</label><pre class=\"bg-light p-3 border rounded\" id=\"s3tablesTagsList\">Loading...</pre></div><div class=\"mb-3\"><label for=\"s3tablesTagsInput\" class=\"form-label\">Add or Update Tags</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesTagsInput\" placeholder=\"key1=value1,key2=value2\"></div><div class=\"mb-3\"><label for=\"s3tablesTagsDeleteInput\" class=\"form-label\">Remove Tag Keys</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesTagsDeleteInput\" placeholder=\"key1,key2\"></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button> <button type=\"button\" class=\"btn btn-outline-danger\" onclick=\"deleteS3TablesTags()\"><i class=\"bi bi-trash me-1\"></i>Remove Tags</button> <button type=\"submit\" class=\"btn btn-primary\"><i class=\"bi bi-floppy me-1\"></i>Update Tags</button></div></form></div></div></div><script>\n\t\tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t\tinitS3TablesTables();\n\t\t});\n\t</script>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "<div class=\"modal fade\" id=\"s3tablesTablePolicyModal\" tabindex=\"-1\" aria-labelledby=\"s3tablesTablePolicyModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-xl\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"s3tablesTablePolicyModalLabel\"><i class=\"bi bi-shield me-2\"></i>Table Policy</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"s3tablesTablePolicyForm\"><div class=\"modal-body\"><input type=\"hidden\" id=\"s3tablesTablePolicyBucketArn\" name=\"bucket_arn\"> <input type=\"hidden\" id=\"s3tablesTablePolicyNamespace\" name=\"namespace\"> <input type=\"hidden\" id=\"s3tablesTablePolicyName\" name=\"name\"><ul class=\"nav nav-tabs\" role=\"tablist\"><li class=\"nav-item\" role=\"presentation\"><button class=\"nav-link active\" id=\"s3tablesTablePolicyEditorTabBtn\" type=\"button\" data-bs-toggle=\"tab\" data-bs-target=\"#s3tablesTablePolicyEditorTab\" role=\"tab\" aria-controls=\"s3tablesTablePolicyEditorTab\" aria-selected=\"true\">Editor</button></li><li class=\"nav-item\" role=\"presentation\"><button class=\"nav-link\" id=\"s3tablesTablePolicyJsonTabBtn\" type=\"button\" data-bs-toggle=\"tab\" data-bs-target=\"#s3tablesTablePolicyJsonTab\" role=\"tab\" aria-controls=\"s3tablesTablePolicyJsonTab\" aria-selected=\"false\">JSON</button></li></ul><div class=\"tab-content border border-top-0 rounded-bottom p-3 mb-3\"><div class=\"tab-pane fade show active\" id=\"s3tablesTablePolicyEditorTab\" role=\"tabpanel\" aria-labelledby=\"s3tablesTablePolicyEditorTabBtn\"><div id=\"s3tablesTablePolicyEditorBody\"></div><button type=\"button\" class=\"btn btn-sm btn-outline-secondary\" id=\"s3tablesTablePolicyAddStatementBtn\"><i class=\"bi bi-plus me-1\"></i>Add statement</button></div><div class=\"tab-pane fade\" id=\"s3tablesTablePolicyJsonTab\" role=\"tabpanel\" aria-labelledby=\"s3tablesTablePolicyJsonTabBtn\"><textarea class=\"form-control\" id=\"s3tablesTablePolicyText\" name=\"policy\" rows=\"12\" placeholder=\"{ }\"></textarea></div></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button> <button type=\"button\" class=\"btn btn-outline-danger\" id=\"s3tablesTablePolicyDeleteBtn\" onclick=\"deleteS3TablesTablePolicy()\"><i class=\"bi bi-trash me-1\"></i>Delete Policy</button><!-- type=\"button\": a submit button would make Enter in any\n\t\t\t\t\t\t single-line editor input implicitly submit a half-built\n\t\t\t\t\t\t policy, which the backend stores verbatim. --><button type=\"button\" class=\"btn btn-primary\" id=\"s3tablesTablePolicySaveBtn\"><i class=\"bi bi-floppy me-1\"></i>Save Policy</button></div></form></div></div></div><div class=\"modal fade\" id=\"s3tablesTagsModal\" tabindex=\"-1\" aria-labelledby=\"s3tablesTagsModalLabel\" aria-hidden=\"true\"><div class=\"modal-dialog modal-lg\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title\" id=\"s3tablesTagsModalLabel\"><i class=\"bi bi-tags me-2\"></i>Resource Tags</h5><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button></div><form id=\"s3tablesTagsForm\"><div class=\"modal-body\"><input type=\"hidden\" id=\"s3tablesTagsResourceArn\" name=\"resource_arn\"><div class=\"mb-3\"><label class=\"form-label\">Existing Tags</label><pre class=\"bg-light p-3 border rounded\" id=\"s3tablesTagsList\">Loading...</pre></div><div class=\"mb-3\"><label for=\"s3tablesTagsInput\" class=\"form-label\">Add or Update Tags</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesTagsInput\" placeholder=\"key1=value1,key2=value2\"></div><div class=\"mb-3\"><label for=\"s3tablesTagsDeleteInput\" class=\"form-label\">Remove Tag Keys</label> <input type=\"text\" class=\"form-control\" id=\"s3tablesTagsDeleteInput\" placeholder=\"key1,key2\"></div></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button> <button type=\"button\" class=\"btn btn-outline-danger\" onclick=\"deleteS3TablesTags()\"><i class=\"bi bi-trash me-1\"></i>Remove Tags</button> <button type=\"submit\" class=\"btn btn-primary\"><i class=\"bi bi-floppy me-1\"></i>Update Tags</button></div></form></div></div></div><script>\n\t\tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t\tinitS3TablesTables();\n\t\t});\n\t</script>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}diff --git a/weed/admin/view/app/service_accounts_templ.go b/weed/admin/view/app/service_accounts_templ.goindex c62a9b0b31..307e4cb075 100644--- a/weed/admin/view/app/service_accounts_templ.go+++ b/weed/admin/view/app/service_accounts_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -29,10 +30,6 @@ func ServiceAccounts(data dash.ServiceAccountsData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"container-fluid\"><!-- Page Header --><div class=\"d-sm-flex align-items-center justify-content-between mb-4\"><div><h1 class=\"h3 mb-0 text-gray-800\"><i class=\"bi bi-robot me-2\"></i>Service Accounts</h1><p class=\"mb-0 text-muted\">Manage application credentials for automated processes</p></div><div class=\"d-flex gap-2\"><button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#createServiceAccountModal\"><i class=\"bi bi-plus me-1\"></i>Create Service Account</button></div></div><!-- Summary Cards --><div class=\"row mb-4\"><div class=\"col-xl-3 col-md-6 mb-4\"><div class=\"card border-left-primary shadow h-100 py-2\"><div class=\"card-body\"><div class=\"row no-gutters align-items-center\"><div class=\"col mr-2\"><div class=\"text-xs font-weight-bold text-primary text-uppercase mb-1\">Total Service Accounts</div><div class=\"h5 mb-0 font-weight-bold text-gray-800\">")if templ_7745c5c3_Err != nil {@@ -150,7 +147,7 @@ func ServiceAccounts(data dash.ServiceAccountsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var9 string- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.ResolveAttributeValue(sa.ID)+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.NewAttributeExpression(sa.ID).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/service_accounts.templ`, Line: 139, Col: 108}}@@ -163,7 +160,7 @@ func ServiceAccounts(data dash.ServiceAccountsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var10 string- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue(sa.ID)+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(sa.ID).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/service_accounts.templ`, Line: 143, Col: 109}}@@ -176,7 +173,7 @@ func ServiceAccounts(data dash.ServiceAccountsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var11 string- templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue(sa.Status)+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(sa.Status).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/service_accounts.templ`, Line: 143, Col: 143}}@@ -204,7 +201,7 @@ func ServiceAccounts(data dash.ServiceAccountsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var12 string- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.ResolveAttributeValue(sa.ID)+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templruntime.NewAttributeExpression(sa.ID).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/service_accounts.templ`, Line: 151, Col: 102}}@@ -246,7 +243,7 @@ func ServiceAccounts(data dash.ServiceAccountsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var14 string- templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.ResolveAttributeValue(user)+ templ_7745c5c3_Var14, templ_7745c5c3_Err = templruntime.NewAttributeExpression(user).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/service_accounts.templ`, Line: 205, Col: 56}}diff --git a/weed/admin/view/app/subscribers_templ.go b/weed/admin/view/app/subscribers_templ.goindex 6d158277e7..012809a52c 100644--- a/weed/admin/view/app/subscribers_templ.go+++ b/weed/admin/view/app/subscribers_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -27,10 +28,6 @@ func Subscribers(data dash.SubscribersData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"container-fluid\"><div class=\"row\"><div class=\"col-12\"><div class=\"d-flex justify-content-between align-items-center mb-4\"><h1 class=\"h3 mb-0\">Message Queue Subscribers</h1><small class=\"text-muted\">Last updated: ")if templ_7745c5c3_Err != nil {diff --git a/weed/admin/view/app/topic_details_templ.go b/weed/admin/view/app/topic_details_templ.goindex 7e615f45ce..af56b3bc35 100644--- a/weed/admin/view/app/topic_details_templ.go+++ b/weed/admin/view/app/topic_details_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -28,21 +29,17 @@ func TopicDetails(data dash.TopicDetailsData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"container-fluid\"><div class=\"row\"><div class=\"col-12\"><!-- Header --><div class=\"d-flex justify-content-between align-items-center mb-4\"><div><nav aria-label=\"breadcrumb\"><ol class=\"breadcrumb\"><li class=\"breadcrumb-item\"><a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var2 templ.SafeURL- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/mq/topics"))+ var templ_7745c5c3_Var2 string+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/mq/topics")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/topic_details.templ`, Line: 16, Col: 98}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}diff --git a/weed/admin/view/app/topics_templ.go b/weed/admin/view/app/topics_templ.goindex e240e8e8a7..b1d5493b2d 100644--- a/weed/admin/view/app/topics_templ.go+++ b/weed/admin/view/app/topics_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -28,10 +29,6 @@ func Topics(data dash.TopicsData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"container-fluid\"><div class=\"row\"><div class=\"col-12\"><div class=\"d-flex justify-content-between align-items-center mb-4\"><h1 class=\"h3 mb-0\">Message Queue Topics</h1><small class=\"text-muted\">Last updated: ")if templ_7745c5c3_Err != nil {@@ -92,7 +89,7 @@ func Topics(data dash.TopicsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var5 string- templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.ResolveAttributeValue(topic.Name)+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templruntime.NewAttributeExpression(topic.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/topics.templ`, Line: 70, Col: 93}}@@ -184,7 +181,7 @@ func Topics(data dash.TopicsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var10 string- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue(topic.Name)+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(topic.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/topics.templ`, Line: 105, Col: 160}}@@ -197,7 +194,7 @@ func Topics(data dash.TopicsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var11 string- templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("details-%s", strings.ReplaceAll(topic.Name, ".", "_")))+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("details-%s", strings.ReplaceAll(topic.Name, ".", "_"))).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/topics.templ`, Line: 110, Col: 146}}diff --git a/weed/admin/view/app/volume_details_templ.go b/weed/admin/view/app/volume_details_templ.goindex abe13d9f0c..afcc4be352 100644--- a/weed/admin/view/app/volume_details_templ.go+++ b/weed/admin/view/app/volume_details_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package app//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -31,21 +32,17 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"><div><h1 class=\"h2\"><i class=\"bi bi-database me-2\"></i>Volume Details</h1><nav aria-label=\"breadcrumb\"><ol class=\"breadcrumb\"><li class=\"breadcrumb-item\"><a href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var2 templ.SafeURL- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/admin"))+ var templ_7745c5c3_Var2 string+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/admin")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 18, Col: 82}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var2)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -53,12 +50,12 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var3 templ.SafeURL- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/storage/volumes"))+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/storage/volumes")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 19, Col: 92}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -92,12 +89,12 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var6 templ.SafeURL- templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", data.Volume.Server)))+ var templ_7745c5c3_Var6 string+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", data.Volume.Server))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 55, Col: 113}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var6)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -149,12 +146,12 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var10 templ.SafeURL- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, "/storage/volumes?collection=default"))+ var templ_7745c5c3_Var10 string+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, "/storage/volumes?collection=default")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 75, Col: 103}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -167,12 +164,12 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var11 templ.SafeURL- templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/storage/volumes?collection=%s", data.Volume.Collection)))+ var templ_7745c5c3_Var11 string+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/storage/volumes?collection=%s", data.Volume.Collection))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 79, Col: 135}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -328,7 +325,7 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var22 string- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%.1f", float64(data.Volume.Size-data.Volume.DeletedByteCount)/float64(data.Volume.Size)*100))+ templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%.1f", float64(data.Volume.Size-data.Volume.DeletedByteCount)/float64(data.Volume.Size)*100)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 177, Col: 157}}@@ -451,7 +448,7 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var27 string- templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Volume.RemoteStorageKey)+ templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Volume.RemoteStorageKey).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 261, Col: 138}}@@ -500,12 +497,12 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var30 templ.SafeURL- templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", data.Volume.Server)))+ var templ_7745c5c3_Var30 string+ templ_7745c5c3_Var30, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", data.Volume.Server))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 302, Col: 125}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var30)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -583,12 +580,12 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var36 templ.SafeURL- templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", replica.Server)))+ var templ_7745c5c3_Var36 string+ templ_7745c5c3_Var36, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(fmt.Sprintf("//%s/ui/index.html", replica.Server))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 322, Col: 121}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var36)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -661,12 +658,12 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var42 templ.SafeURL- templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinURLErrs(dash.PUrl(ctx, fmt.Sprintf("/storage/volumes/%d/%s", replica.Id, replica.Server)))+ var templ_7745c5c3_Var42 string+ templ_7745c5c3_Var42, templ_7745c5c3_Err = templruntime.NewAttributeExpression(dash.PUrl(ctx, fmt.Sprintf("/storage/volumes/%d/%s", replica.Id, replica.Server))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 333, Col: 139}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var42)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -685,7 +682,7 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var43 string- templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.Volume.Id))+ templ_7745c5c3_Var43, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.Volume.Id)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 361, Col: 81}}@@ -698,7 +695,7 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var44 string- templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Volume.Server)+ templ_7745c5c3_Var44, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Volume.Server).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 362, Col: 63}}@@ -716,7 +713,7 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var45 string- templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.Volume.Id))+ templ_7745c5c3_Var45, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.Volume.Id)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 367, Col: 85}}@@ -729,7 +726,7 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var46 string- templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Volume.Server)+ templ_7745c5c3_Var46, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Volume.Server).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 368, Col: 67}}@@ -742,7 +739,7 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var47 string- templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%d", data.Volume.Id))+ templ_7745c5c3_Var47, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%d", data.Volume.Id)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 372, Col: 85}}@@ -755,7 +752,7 @@ func VolumeDetails(data dash.VolumeDetailsData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var48 string- templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Volume.Server)+ templ_7745c5c3_Var48, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Volume.Server).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/app/volume_details.templ`, Line: 373, Col: 67}}diff --git a/weed/admin/view/components/config_sections_templ.go b/weed/admin/view/components/config_sections_templ.goindex 87b680d299..592eb77290 100644--- a/weed/admin/view/components/config_sections_templ.go+++ b/weed/admin/view/components/config_sections_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package components//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -41,35 +42,49 @@ func ConfigSection(data ConfigSectionData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"row\"><div class=\"col-12\"><div class=\"card mb-4\"><div class=\"card-header\"><h5 class=\"mb-0\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.Icon != "" {- var templ_7745c5c3_Var2 = []any{data.Icon + " me-2"}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var2...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "<i class=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var3 string- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var2).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/config_sections.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "<i class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var2 = []any{data.Icon + " me-2"}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var2...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var2).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/config_sections.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\"></i> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "></i> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -83,12 +98,12 @@ func ConfigSection(data ConfigSectionData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "</h5>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</h5>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.Description != "" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "<small class=\"text-muted\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<small class=\"text-muted\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -101,12 +116,12 @@ func ConfigSection(data ConfigSectionData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "</small>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</small>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</div><div class=\"card-body\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "</div><div class=\"card-body\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -144,7 +159,7 @@ func ConfigSection(data ConfigSectionData) templ.Component {}}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "</div></div></div></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "</div></div></div></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -169,35 +184,49 @@ func InfoSection(data InfoSectionData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var6 := templ.GetChildren(ctx)- if templ_7745c5c3_Var6 == nil {- templ_7745c5c3_Var6 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<div class=\"row\"><div class=\"col-12\"><div class=\"card mb-3\"><div class=\"card-header\"><h5 class=\"mb-0\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "<div class=\"row\"><div class=\"col-12\"><div class=\"card mb-3\"><div class=\"card-header\"><h5 class=\"mb-0\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if data.Icon != "" {- var templ_7745c5c3_Var7 = []any{data.Icon + " me-2"}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var7...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "<i class=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var8 string- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var7).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/config_sections.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "<i class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var7 = []any{data.Icon + " me-2"}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var7...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var8 string+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var7).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/config_sections.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "\"></i> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "></i> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -211,29 +240,47 @@ func InfoSection(data InfoSectionData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</h5></div><div class=\"card-body\">")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var10 = []any{"alert alert-" + data.Type}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var10...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "<div class=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "</h5></div><div class=\"card-body\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var11 string- templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var10).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/config_sections.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "<div class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var10 = []any{"alert alert-" + data.Type}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var10...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var11 string+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var10).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/config_sections.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\" role=\"alert\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\" role=\"alert\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, ">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -246,7 +293,7 @@ func InfoSection(data InfoSectionData) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "</div></div></div></div></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</div></div></div></div></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}diff --git a/weed/admin/view/components/form_fields_templ.go b/weed/admin/view/components/form_fields_templ.goindex cf68b09e6e..443edd6a1d 100644--- a/weed/admin/view/components/form_fields_templ.go+++ b/weed/admin/view/components/form_fields_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package components//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -82,17 +83,13 @@ func TextField(data TextFieldData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"mb-3\"><label for=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var2 string- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 63, Col: 30}}@@ -128,7 +125,7 @@ func TextField(data TextFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var4 string- templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 72, Col: 26}}@@ -141,7 +138,7 @@ func TextField(data TextFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var5 string- templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 73, Col: 28}}@@ -154,7 +151,7 @@ func TextField(data TextFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var6 string- templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Value)+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Value).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 74, Col: 30}}@@ -172,7 +169,7 @@ func TextField(data TextFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var7 string- templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Placeholder)+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Placeholder).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 76, Col: 46}}@@ -239,17 +236,13 @@ func NumberField(data NumberFieldData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var9 := templ.GetChildren(ctx)- if templ_7745c5c3_Var9 == nil {- templ_7745c5c3_Var9 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<div class=\"mb-3\"><label for=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var10 string- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 91, Col: 30}}@@ -285,7 +278,7 @@ func NumberField(data NumberFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var12 string- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 100, Col: 26}}@@ -298,7 +291,7 @@ func NumberField(data NumberFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var13 string- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var13, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 101, Col: 28}}@@ -311,7 +304,7 @@ func NumberField(data NumberFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var14 string- templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%.6g", data.Value))+ templ_7745c5c3_Var14, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%.6g", data.Value)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 102, Col: 51}}@@ -329,7 +322,7 @@ func NumberField(data NumberFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var15 string- templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Step)+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Step).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 104, Col: 32}}@@ -353,7 +346,7 @@ func NumberField(data NumberFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var16 string- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%.6g", *data.Min))+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%.6g", *data.Min)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 109, Col: 52}}@@ -372,7 +365,7 @@ func NumberField(data NumberFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var17 string- templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%.6g", *data.Max))+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%.6g", *data.Max)).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 112, Col: 52}}@@ -439,17 +432,13 @@ func CheckboxField(data CheckboxFieldData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var19 := templ.GetChildren(ctx)- if templ_7745c5c3_Var19 == nil {- templ_7745c5c3_Var19 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<div class=\"mb-3\"><div class=\"form-check\"><input type=\"checkbox\" class=\"form-check-input\" id=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var20 string- templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var20, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 131, Col: 30}}@@ -462,7 +451,7 @@ func CheckboxField(data CheckboxFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var21 string- templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var21, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 132, Col: 32}}@@ -485,7 +474,7 @@ func CheckboxField(data CheckboxFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var22 string- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var22, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 137, Col: 59}}@@ -554,17 +543,13 @@ func SelectField(data SelectFieldData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var25 := templ.GetChildren(ctx)- if templ_7745c5c3_Var25 == nil {- templ_7745c5c3_Var25 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "<div class=\"mb-3\"><label for=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var26 string- templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var26, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 150, Col: 30}}@@ -600,7 +585,7 @@ func SelectField(data SelectFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var28 string- templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var28, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 158, Col: 26}}@@ -613,7 +598,7 @@ func SelectField(data SelectFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var29 string- templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 159, Col: 28}}@@ -641,7 +626,7 @@ func SelectField(data SelectFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var30 string- templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.ResolveAttributeValue(option.Value)+ templ_7745c5c3_Var30, templ_7745c5c3_Err = templruntime.NewAttributeExpression(option.Value).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 166, Col: 40}}@@ -725,17 +710,13 @@ func DurationField(data DurationFieldData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var33 := templ.GetChildren(ctx)- if templ_7745c5c3_Var33 == nil {- templ_7745c5c3_Var33 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "<div class=\"mb-3\"><label for=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var34 string- templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var34, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 184, Col: 30}}@@ -771,7 +752,7 @@ func DurationField(data DurationFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var36 string- templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var36, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 193, Col: 26}}@@ -784,7 +765,7 @@ func DurationField(data DurationFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var37 string- templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var37, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 194, Col: 28}}@@ -797,7 +778,7 @@ func DurationField(data DurationFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var38 string- templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Value)+ templ_7745c5c3_Var38, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Value).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 195, Col: 30}}@@ -815,7 +796,7 @@ func DurationField(data DurationFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var39 string- templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Placeholder)+ templ_7745c5c3_Var39, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Placeholder).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 197, Col: 46}}@@ -887,17 +868,13 @@ func DurationInputField(data DurationInputFieldData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var41 := templ.GetChildren(ctx)- if templ_7745c5c3_Var41 == nil {- templ_7745c5c3_Var41 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "<div class=\"mb-3\"><label for=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var42 string- templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var42, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 214, Col: 24}}@@ -933,7 +910,7 @@ func DurationInputField(data DurationInputFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var44 string- templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var44, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 224, Col: 18}}@@ -946,7 +923,7 @@ func DurationInputField(data DurationInputFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var45 string- templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var45, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 225, Col: 20}}@@ -959,7 +936,7 @@ func DurationInputField(data DurationInputFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var46 string- templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%.0f", convertSecondsToValue(data.Seconds, convertSecondsToUnit(data.Seconds))))+ templ_7745c5c3_Var46, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%.0f", convertSecondsToValue(data.Seconds, convertSecondsToUnit(data.Seconds)))).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 226, Col: 104}}@@ -982,7 +959,7 @@ func DurationInputField(data DurationInputFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var47 string- templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name + "_unit")+ templ_7745c5c3_Var47, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name + "_unit").Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 235, Col: 28}}@@ -995,7 +972,7 @@ func DurationInputField(data DurationInputFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var48 string- templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name + "_unit")+ templ_7745c5c3_Var48, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name + "_unit").Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 236, Col: 30}}@@ -1195,17 +1172,13 @@ func IntervalField(data IntervalFieldData) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var50 := templ.GetChildren(ctx)- if templ_7745c5c3_Var50 == nil {- templ_7745c5c3_Var50 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, "<div class=\"mb-3\"><label for=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var51 string- templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name)+ templ_7745c5c3_Var51, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 386, Col: 24}}@@ -1241,7 +1214,7 @@ func IntervalField(data IntervalFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var53 string- templ_7745c5c3_Var53, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name + "_value")+ templ_7745c5c3_Var53, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name + "_value").Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 396, Col: 29}}@@ -1254,7 +1227,7 @@ func IntervalField(data IntervalFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var54 string- templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name + "_value")+ templ_7745c5c3_Var54, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name + "_value").Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 397, Col: 31}}@@ -1267,7 +1240,7 @@ func IntervalField(data IntervalFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var55 string- templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%.0f", convertSecondsToValue(data.Seconds, convertSecondsToUnit(data.Seconds))))+ templ_7745c5c3_Var55, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%.0f", convertSecondsToValue(data.Seconds, convertSecondsToUnit(data.Seconds)))).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 398, Col: 104}}@@ -1290,7 +1263,7 @@ func IntervalField(data IntervalFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var56 string- templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name + "_unit")+ templ_7745c5c3_Var56, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name + "_unit").Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 407, Col: 28}}@@ -1303,7 +1276,7 @@ func IntervalField(data IntervalFieldData) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var57 string- templ_7745c5c3_Var57, templ_7745c5c3_Err = templ.ResolveAttributeValue(data.Name + "_unit")+ templ_7745c5c3_Var57, templ_7745c5c3_Err = templruntime.NewAttributeExpression(data.Name + "_unit").Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/components/form_fields.templ`, Line: 408, Col: 30}}diff --git a/weed/admin/view/layout/layout_templ.go b/weed/admin/view/layout/layout_templ.goindex 21a7d5fa3d..3da50ff198 100644--- a/weed/admin/view/layout/layout_templ.go+++ b/weed/admin/view/layout/layout_templ.go@@ -1,6 +1,7 @@// Code generated by templ - DO NOT EDIT.-// templ: version: v0.3.1070+// templ: version: v0.3.1100+package layout//lint:file-ignore SA4006 This context is only used if a nested component is present.@@ -42,10 +43,6 @@ func Layout(view ViewContext, content templ.Component) templ.Component {}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var1 := templ.GetChildren(ctx)- if templ_7745c5c3_Var1 == nil {- templ_7745c5c3_Var1 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)username := view.Usernameif username == "" {@@ -83,7 +80,7 @@ func Layout(view ViewContext, content templ.Component) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var2 string- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.ResolveAttributeValue(csrfToken)+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templruntime.NewAttributeExpression(csrfToken).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 55, Col: 47}}@@ -95,12 +92,12 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var3 templ.SafeURL- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(string(view.P("/static/favicon.ico")))+ var templ_7745c5c3_Var3 string+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.NewAttributeExpression(string(view.P("/static/favicon.ico"))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 56, Col: 65}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -108,12 +105,12 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var4 templ.SafeURL- templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinURLErrs(string(view.P("/static/css/bootstrap.min.css")))+ var templ_7745c5c3_Var4 string+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templruntime.NewAttributeExpression(string(view.P("/static/css/bootstrap.min.css"))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 59, Col: 64}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var4)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -121,12 +118,12 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var5 templ.SafeURL- templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinURLErrs(string(view.P("/static/css/bootstrap-icons.min.css")))+ var templ_7745c5c3_Var5 string+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templruntime.NewAttributeExpression(string(view.P("/static/css/bootstrap-icons.min.css"))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 61, Col: 70}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var5)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -135,7 +132,7 @@ func Layout(view ViewContext, content templ.Component) templ.Component {return templ_7745c5c3_Err}var templ_7745c5c3_Var6 string- templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.ResolveAttributeValue(string(view.P("/static/js/htmx.min.js")))+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templruntime.NewAttributeExpression(string(view.P("/static/js/htmx.min.js"))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 63, Col: 58}}@@ -147,12 +144,12 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var7 templ.SafeURL- templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinURLErrs(string(view.P("/static/css/admin.css")))+ var templ_7745c5c3_Var7 string+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templruntime.NewAttributeExpression(string(view.P("/static/css/admin.css"))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 65, Col: 73}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var7)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -168,12 +165,12 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var8 templ.SafeURL- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/admin"))+ var templ_7745c5c3_Var8 string+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/admin")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 74, Col: 71}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -194,12 +191,12 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var10 templ.SafeURL- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/logout"))+ var templ_7745c5c3_Var10 string+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/logout")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 93, Col: 85}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -207,12 +204,12 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var11 templ.SafeURL- templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/admin"))+ var templ_7745c5c3_Var11 string+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/admin")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 112, Col: 71}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -220,610 +217,682 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var12 = []any{"nav-link", templ.KV("collapsed", !isClusterPage)}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var12...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "<a class=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var13 string- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var12).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\" href=\"#\" data-bs-toggle=\"collapse\" data-bs-target=\"#clusterSubmenu\" aria-expanded=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var14 string- templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%t", isClusterPage))- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 117, Col: 207}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var14)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\" aria-controls=\"clusterSubmenu\"><i class=\"bi bi-diagram-3 me-2\"></i>Cluster <i class=\"bi bi-chevron-down ms-auto\"></i></a>")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var15 = []any{"collapse", templ.KV("show", isClusterPage)}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var15...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "<a class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var12 = []any{"nav-link", templ.KV("collapsed", !isClusterPage)}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var12...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var13 string+ templ_7745c5c3_Var13, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var12).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\" href=\"#\" data-bs-toggle=\"collapse\" data-bs-target=\"#clusterSubmenu\" aria-expanded=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var14 string+ templ_7745c5c3_Var14, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%t", isClusterPage)).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 117, Col: 207}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var14)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\" aria-controls=\"clusterSubmenu\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<div class=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "><i class=\"bi bi-diagram-3 me-2\"></i>Cluster <i class=\"bi bi-chevron-down ms-auto\"></i></a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var16 string- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var15).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<div class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var15 = []any{"collapse", templ.KV("show", isClusterPage)}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var15...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var16 string+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var15).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\" id=\"clusterSubmenu\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\" id=\"clusterSubmenu\"><ul class=\"nav flex-column ms-3\"><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "><ul class=\"nav flex-column ms-3\"><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var17 templ.SafeURL- templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/cluster/masters"))+ var templ_7745c5c3_Var17 string+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/cluster/masters")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 124, Col: 98}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\"><i class=\"bi bi-award me-2\"></i>Masters</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\"><i class=\"bi bi-award me-2\"></i>Masters</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var18 templ.SafeURL- templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/cluster/volume-servers"))+ var templ_7745c5c3_Var18 string+ templ_7745c5c3_Var18, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/cluster/volume-servers")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 129, Col: 105}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\"><i class=\"bi bi-server me-2\"></i>Volume Servers</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\"><i class=\"bi bi-server me-2\"></i>Volume Servers</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var19 templ.SafeURL- templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/cluster/filers"))+ var templ_7745c5c3_Var19 string+ templ_7745c5c3_Var19, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/cluster/filers")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 134, Col: 97}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var19)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\"><i class=\"bi bi-folder2-open me-2\"></i>Filers</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\"><i class=\"bi bi-folder2-open me-2\"></i>Filers</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var20 templ.SafeURL- templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/cluster/s3"))+ var templ_7745c5c3_Var20 string+ templ_7745c5c3_Var20, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/cluster/s3")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 139, Col: 93}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var20)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\"><i class=\"bi bi-cloud me-2\"></i>S3 Servers</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\"><i class=\"bi bi-cloud me-2\"></i>S3 Servers</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var21 templ.SafeURL- templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/cluster/mount-clients"))+ var templ_7745c5c3_Var21 string+ templ_7745c5c3_Var21, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/cluster/mount-clients")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 144, Col: 104}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var21)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\"><i class=\"bi bi-plug me-2\"></i>Mount Clients</a></li></ul></div></li><li class=\"nav-item\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\"><i class=\"bi bi-plug me-2\"></i>Mount Clients</a></li></ul></div></li><li class=\"nav-item\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var22 = []any{"nav-link", templ.KV("collapsed", !isStoragePage)}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var22...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "<a class=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var23 string- templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var22).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var23)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\" href=\"#\" data-bs-toggle=\"collapse\" data-bs-target=\"#storageSubmenu\" aria-expanded=\"")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var24 string- templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.ResolveAttributeValue(fmt.Sprintf("%t", isStoragePage))- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 152, Col: 207}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var24)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\" aria-controls=\"storageSubmenu\"><i class=\"bi bi-device-hdd me-2\"></i>Storage <i class=\"bi bi-chevron-down ms-auto\"></i></a>")- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err- }- var templ_7745c5c3_Var25 = []any{"collapse", templ.KV("show", isStoragePage)}- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var25...)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<a class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var22 = []any{"nav-link", templ.KV("collapsed", !isStoragePage)}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var22...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var23 string+ templ_7745c5c3_Var23, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var22).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var23)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\" href=\"#\" data-bs-toggle=\"collapse\" data-bs-target=\"#storageSubmenu\" aria-expanded=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var24 string+ templ_7745c5c3_Var24, templ_7745c5c3_Err = templruntime.NewAttributeExpression(fmt.Sprintf("%t", isStoragePage)).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 152, Col: 207}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var24)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\" aria-controls=\"storageSubmenu\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "<div class=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "><i class=\"bi bi-device-hdd me-2\"></i>Storage <i class=\"bi bi-chevron-down ms-auto\"></i></a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var26 string- templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var25).String())- if templ_7745c5c3_Err != nil {- return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 1, Col: 0}- }- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var26)- if templ_7745c5c3_Err != nil {- return templ_7745c5c3_Err+ {+ templ_7745c5c3_ElementWriter := templ_7745c5c3_Buffer+ templ_7745c5c3_Buffer := templ.GetBuffer()+ var templ_7745c5c3_ElementScripts []templ.ComponentScript+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<div class=\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var25 = []any{"collapse", templ.KV("show", isStoragePage)}+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_Var25...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ var templ_7745c5c3_Var26 string+ templ_7745c5c3_Var26, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.CSSClasses(templ_7745c5c3_Var25).String()).Resolve(ctx)+ if templ_7745c5c3_Err != nil {+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 1, Col: 0}+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var26)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\" id=\"storageSubmenu\"")+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_ElementWriter, templ_7745c5c3_ElementScripts...)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_ElementWriter)+ if templ_7745c5c3_Err != nil {+ return templ_7745c5c3_Err+ }+ templ.ReleaseBuffer(templ_7745c5c3_Buffer)}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\" id=\"storageSubmenu\"><ul class=\"nav flex-column ms-3\"><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "><ul class=\"nav flex-column ms-3\"><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var27 templ.SafeURL- templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/storage/volumes"))+ var templ_7745c5c3_Var27 string+ templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/storage/volumes")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 159, Col: 98}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var27)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "\"><i class=\"bi bi-database me-2\"></i>Volumes</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "\"><i class=\"bi bi-database me-2\"></i>Volumes</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var28 templ.SafeURL- templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/storage/ec-shards"))+ var templ_7745c5c3_Var28 string+ templ_7745c5c3_Var28, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/storage/ec-shards")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 164, Col: 100}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var28)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\"><i class=\"bi bi-grid me-2\"></i>EC Volumes</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "\"><i class=\"bi bi-grid me-2\"></i>EC Volumes</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var29 templ.SafeURL- templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/storage/collections"))+ var templ_7745c5c3_Var29 string+ templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/storage/collections")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 169, Col: 102}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var29)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\"><i class=\"bi bi-layers me-2\"></i>Collections</a></li></ul></div></li></ul><h6 class=\"sidebar-heading px-3 mt-4 mb-1 text-muted\"><span>OBJECT STORE</span></h6><ul class=\"nav flex-column\"><li class=\"nav-item\"><a class=\"nav-link\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "\"><i class=\"bi bi-layers me-2\"></i>Collections</a></li></ul></div></li></ul><h6 class=\"sidebar-heading px-3 mt-4 mb-1 text-muted\"><span>OBJECT STORE</span></h6><ul class=\"nav flex-column\"><li class=\"nav-item\"><a class=\"nav-link\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var30 templ.SafeURL- templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/object-store/buckets"))+ var templ_7745c5c3_Var30 string+ templ_7745c5c3_Var30, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/object-store/buckets")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 183, Col: 86}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var30)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "\"><i class=\"bi bi-box me-2\"></i>Buckets</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\"><i class=\"bi bi-box me-2\"></i>Buckets</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var31 templ.SafeURL- templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/object-store/s3tables/buckets"))+ var templ_7745c5c3_Var31 string+ templ_7745c5c3_Var31, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/object-store/s3tables/buckets")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 188, Col: 95}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var31)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "\"><i class=\"bi bi-table me-2\"></i>Table Buckets</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "\"><i class=\"bi bi-table me-2\"></i>Table Buckets</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var32 templ.SafeURL- templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/object-store/users"))+ var templ_7745c5c3_Var32 string+ templ_7745c5c3_Var32, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/object-store/users")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 193, Col: 84}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var32)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "\"><i class=\"bi bi-people me-2\"></i>Users</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "\"><i class=\"bi bi-people me-2\"></i>Users</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var33 templ.SafeURL- templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/object-store/groups"))+ var templ_7745c5c3_Var33 string+ templ_7745c5c3_Var33, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/object-store/groups")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 198, Col: 85}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var33)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "\"><i class=\"bi bi-people-fill me-2\"></i>Groups</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "\"><i class=\"bi bi-people-fill me-2\"></i>Groups</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var34 templ.SafeURL- templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/object-store/service-accounts"))+ var templ_7745c5c3_Var34 string+ templ_7745c5c3_Var34, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/object-store/service-accounts")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 203, Col: 95}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var34)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\"><i class=\"bi bi-robot me-2\"></i>Service Accounts</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "\"><i class=\"bi bi-robot me-2\"></i>Service Accounts</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var35 templ.SafeURL- templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/object-store/policies"))+ var templ_7745c5c3_Var35 string+ templ_7745c5c3_Var35, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/object-store/policies")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 208, Col: 87}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var35)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "\"><i class=\"bi bi-shield me-2\"></i>Policies</a></li></ul><h6 class=\"sidebar-heading px-3 mt-4 mb-1 text-muted\"><span>MANAGEMENT</span></h6><ul class=\"nav flex-column\"><li class=\"nav-item\"><a class=\"nav-link\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "\"><i class=\"bi bi-shield me-2\"></i>Policies</a></li></ul><h6 class=\"sidebar-heading px-3 mt-4 mb-1 text-muted\"><span>MANAGEMENT</span></h6><ul class=\"nav flex-column\"><li class=\"nav-item\"><a class=\"nav-link\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var36 templ.SafeURL- templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/files"))+ var templ_7745c5c3_Var36 string+ templ_7745c5c3_Var36, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/files")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 219, Col: 71}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var36)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "\"><i class=\"bi bi-folder me-2\"></i>File Browser</a></li><li class=\"nav-item\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "\"><i class=\"bi bi-folder me-2\"></i>File Browser</a></li><li class=\"nav-item\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if isMQPage {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<a class=\"nav-link\" href=\"#\" data-bs-toggle=\"collapse\" data-bs-target=\"#messageQueueSubmenu\" aria-expanded=\"true\" aria-controls=\"messageQueueSubmenu\"><i class=\"bi bi-chat-dots me-2\"></i>Message Queue <i class=\"bi bi-chevron-down ms-auto\"></i></a> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "<a class=\"nav-link\" href=\"#\" data-bs-toggle=\"collapse\" data-bs-target=\"#messageQueueSubmenu\" aria-expanded=\"true\" aria-controls=\"messageQueueSubmenu\"><i class=\"bi bi-chat-dots me-2\"></i>Message Queue <i class=\"bi bi-chevron-down ms-auto\"></i></a> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "<a class=\"nav-link collapsed\" href=\"#\" data-bs-toggle=\"collapse\" data-bs-target=\"#messageQueueSubmenu\" aria-expanded=\"false\" aria-controls=\"messageQueueSubmenu\"><i class=\"bi bi-chat-dots me-2\"></i>Message Queue <i class=\"bi bi-chevron-down ms-auto\"></i></a> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<a class=\"nav-link collapsed\" href=\"#\" data-bs-toggle=\"collapse\" data-bs-target=\"#messageQueueSubmenu\" aria-expanded=\"false\" aria-controls=\"messageQueueSubmenu\"><i class=\"bi bi-chat-dots me-2\"></i>Message Queue <i class=\"bi bi-chevron-down ms-auto\"></i></a> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if isMQPage {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<div class=\"collapse show\" id=\"messageQueueSubmenu\"><ul class=\"nav flex-column ms-3\"><li class=\"nav-item\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "<div class=\"collapse show\" id=\"messageQueueSubmenu\"><ul class=\"nav flex-column ms-3\"><li class=\"nav-item\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if currentPath == "/mq/brokers" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "<a class=\"nav-link py-2 active\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<a class=\"nav-link py-2 active\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var37 templ.SafeURL- templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/mq/brokers"))+ var templ_7745c5c3_Var37 string+ templ_7745c5c3_Var37, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/mq/brokers")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 240, Col: 108}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var37)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\"><i class=\"bi bi-server me-2\"></i>Brokers</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "\"><i class=\"bi bi-server me-2\"></i>Brokers</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<a class=\"nav-link py-2\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "<a class=\"nav-link py-2\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var38 templ.SafeURL- templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/mq/brokers"))+ var templ_7745c5c3_Var38 string+ templ_7745c5c3_Var38, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/mq/brokers")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 244, Col: 101}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var38)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "\"><i class=\"bi bi-server me-2\"></i>Brokers</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "\"><i class=\"bi bi-server me-2\"></i>Brokers</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "</li><li class=\"nav-item\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</li><li class=\"nav-item\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if currentPath == "/mq/topics" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "<a class=\"nav-link py-2 active\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<a class=\"nav-link py-2 active\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var39 templ.SafeURL- templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/mq/topics"))+ var templ_7745c5c3_Var39 string+ templ_7745c5c3_Var39, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/mq/topics")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 251, Col: 107}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var39)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "\"><i class=\"bi bi-card-list me-2\"></i>Topics</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "\"><i class=\"bi bi-card-list me-2\"></i>Topics</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "<a class=\"nav-link py-2\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "<a class=\"nav-link py-2\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var40 templ.SafeURL- templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/mq/topics"))+ var templ_7745c5c3_Var40 string+ templ_7745c5c3_Var40, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/mq/topics")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 255, Col: 100}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var40)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "\"><i class=\"bi bi-card-list me-2\"></i>Topics</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "\"><i class=\"bi bi-card-list me-2\"></i>Topics</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "</li></ul></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "</li></ul></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "<div class=\"collapse\" id=\"messageQueueSubmenu\"><ul class=\"nav flex-column ms-3\"><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "<div class=\"collapse\" id=\"messageQueueSubmenu\"><ul class=\"nav flex-column ms-3\"><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var41 templ.SafeURL- templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/mq/brokers"))+ var templ_7745c5c3_Var41 string+ templ_7745c5c3_Var41, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/mq/brokers")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 267, Col: 97}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var41)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "\"><i class=\"bi bi-server me-2\"></i>Brokers</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "\"><i class=\"bi bi-server me-2\"></i>Brokers</a></li><li class=\"nav-item\"><a class=\"nav-link py-2\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var42 templ.SafeURL- templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/mq/topics"))+ var templ_7745c5c3_Var42 string+ templ_7745c5c3_Var42, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/mq/topics")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 272, Col: 96}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var42)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "\"><i class=\"bi bi-card-list me-2\"></i>Topics</a></li></ul></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "\"><i class=\"bi bi-card-list me-2\"></i>Topics</a></li></ul></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "</li></ul><h6 class=\"sidebar-heading px-3 mt-4 mb-1 text-muted\"><span>WORKERS</span></h6><ul class=\"nav flex-column\"><li class=\"nav-item\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "</li></ul><h6 class=\"sidebar-heading px-3 mt-4 mb-1 text-muted\"><span>WORKERS</span></h6><ul class=\"nav flex-column\"><li class=\"nav-item\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if isDefaultWorkerPage {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "<a class=\"nav-link active\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<a class=\"nav-link active\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var43 templ.SafeURL- templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/plugin/lanes/default"))+ var templ_7745c5c3_Var43 string+ templ_7745c5c3_Var43, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/plugin/lanes/default")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 289, Col: 97}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var43)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "\"><i class=\"bi bi-server me-2\"></i>Default</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "\"><i class=\"bi bi-server me-2\"></i>Default</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<a class=\"nav-link\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<a class=\"nav-link\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var44 templ.SafeURL- templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/plugin/lanes/default"))+ var templ_7745c5c3_Var44 string+ templ_7745c5c3_Var44, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/plugin/lanes/default")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 293, Col: 90}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var44)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "\"><i class=\"bi bi-server me-2\"></i>Default</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "\"><i class=\"bi bi-server me-2\"></i>Default</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</li><li class=\"nav-item\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "</li><li class=\"nav-item\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if isLifecycleWorkerPage {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "<a class=\"nav-link active\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "<a class=\"nav-link active\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var45 templ.SafeURL- templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/plugin/lanes/lifecycle"))+ var templ_7745c5c3_Var45 string+ templ_7745c5c3_Var45, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/plugin/lanes/lifecycle")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 300, Col: 99}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var45)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "\"><i class=\"bi bi-hourglass-split me-2\"></i>Lifecycle</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "\"><i class=\"bi bi-hourglass-split me-2\"></i>Lifecycle</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "<a class=\"nav-link\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "<a class=\"nav-link\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var46 templ.SafeURL- templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/plugin/lanes/lifecycle"))+ var templ_7745c5c3_Var46 string+ templ_7745c5c3_Var46, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/plugin/lanes/lifecycle")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 304, Col: 92}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var46)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "\"><i class=\"bi bi-hourglass-split me-2\"></i>Lifecycle</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "\"><i class=\"bi bi-hourglass-split me-2\"></i>Lifecycle</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "</li><li class=\"nav-item\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "</li><li class=\"nav-item\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if isIcebergWorkerPage {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "<a class=\"nav-link active\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "<a class=\"nav-link active\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var47 templ.SafeURL- templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/plugin/lanes/iceberg"))+ var templ_7745c5c3_Var47 string+ templ_7745c5c3_Var47, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/plugin/lanes/iceberg")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 311, Col: 97}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var47)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "\"><i class=\"bi bi-snow me-2\"></i>Iceberg</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "\"><i class=\"bi bi-snow me-2\"></i>Iceberg</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "<a class=\"nav-link\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "<a class=\"nav-link\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var48 templ.SafeURL- templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/plugin/lanes/iceberg"))+ var templ_7745c5c3_Var48 string+ templ_7745c5c3_Var48, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/plugin/lanes/iceberg")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 315, Col: 90}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var48)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "\"><i class=\"bi bi-snow me-2\"></i>Iceberg</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "\"><i class=\"bi bi-snow me-2\"></i>Iceberg</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "</li><li class=\"nav-item\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "</li><li class=\"nav-item\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if isLanceWorkerPage {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "<a class=\"nav-link active\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "<a class=\"nav-link active\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var49 templ.SafeURL- templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/plugin/lanes/lance"))+ var templ_7745c5c3_Var49 string+ templ_7745c5c3_Var49, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/plugin/lanes/lance")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 322, Col: 95}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var49)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "\"><i class=\"bi bi-bounding-box me-2\"></i>Lance</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "\"><i class=\"bi bi-bounding-box me-2\"></i>Lance</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}} else {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "<a class=\"nav-link\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "<a class=\"nav-link\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var50 templ.SafeURL- templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinURLErrs(view.P("/plugin/lanes/lance"))+ var templ_7745c5c3_Var50 string+ templ_7745c5c3_Var50, templ_7745c5c3_Err = templruntime.NewAttributeExpression(view.P("/plugin/lanes/lance")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 326, Col: 88}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var50)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "\"><i class=\"bi bi-bounding-box me-2\"></i>Lance</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "\"><i class=\"bi bi-bounding-box me-2\"></i>Lance</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "</li></ul></div></div><!-- Sidebar backdrop for mobile --><div class=\"sidebar-backdrop\" id=\"sidebarBackdrop\"></div><!-- Main content --><main class=\"col-md-9 ms-sm-auto col-lg-10 px-3 px-md-4\"><div class=\"pt-3\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "</li></ul></div></div><!-- Sidebar backdrop for mobile --><div class=\"sidebar-backdrop\" id=\"sidebarBackdrop\"></div><!-- Main content --><main class=\"col-md-9 ms-sm-auto col-lg-10 px-3 px-md-4\"><div class=\"pt-3\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -831,7 +900,7 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "</div></main></div></div><!-- Footer --><footer class=\"footer mt-auto py-3 bg-light\"><div class=\"container-fluid text-center\"><small class=\"text-muted\">© ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "</div></main></div></div><!-- Footer --><footer class=\"footer mt-auto py-3 bg-light\"><div class=\"container-fluid text-center\"><small class=\"text-muted\">© ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -844,7 +913,7 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, " SeaweedFS Admin v")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, " SeaweedFS Admin v")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -857,12 +926,12 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, " ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, " ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if version.COMMIT != "" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "<span class=\"mx-1\">(")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "<span class=\"mx-1\">(")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -875,23 +944,23 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, ")</span> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, ")</span> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}if !strings.Contains(version.VERSION, "enterprise") {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "<span class=\"mx-2\">•</span> <a href=\"https://seaweedfs.com\" target=\"_blank\" class=\"text-decoration-none\"><i class=\"bi bi-star me-1\"></i>Enterprise Version Available</a>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "<span class=\"mx-2\">•</span> <a href=\"https://seaweedfs.com\" target=\"_blank\" class=\"text-decoration-none\"><i class=\"bi bi-star me-1\"></i>Enterprise Version Available</a>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "</small></div></footer><!-- Bootstrap JS --><script src=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "</small></div></footer><!-- Bootstrap JS --><script src=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var54 string- templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.ResolveAttributeValue(string(view.P("/static/js/bootstrap.bundle.min.js")))+ templ_7745c5c3_Var54, templ_7745c5c3_Err = templruntime.NewAttributeExpression(string(view.P("/static/js/bootstrap.bundle.min.js"))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 366, Col: 70}}@@ -899,12 +968,12 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "\"></script><!-- Modal Alerts JS (replaces native alert/confirm) --><script src=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "\"></script><!-- Modal Alerts JS (replaces native alert/confirm) --><script src=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var55 string- templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.ResolveAttributeValue(string(view.P("/static/js/modal-alerts.js")))+ templ_7745c5c3_Var55, templ_7745c5c3_Err = templruntime.NewAttributeExpression(string(view.P("/static/js/modal-alerts.js"))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 368, Col: 62}}@@ -912,12 +981,12 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "\"></script><!-- Custom JS --><script src=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "\"></script><!-- Custom JS --><script src=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var56 string- templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.ResolveAttributeValue(string(view.P("/static/js/admin.js")))+ templ_7745c5c3_Var56, templ_7745c5c3_Err = templruntime.NewAttributeExpression(string(view.P("/static/js/admin.js"))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 370, Col: 55}}@@ -925,12 +994,12 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "\"></script><script src=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "\"></script><script src=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var57 string- templ_7745c5c3_Var57, templ_7745c5c3_Err = templ.ResolveAttributeValue(string(view.P("/static/js/iam-utils.js")))+ templ_7745c5c3_Var57, templ_7745c5c3_Err = templruntime.NewAttributeExpression(string(view.P("/static/js/iam-utils.js"))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 371, Col: 59}}@@ -938,12 +1007,12 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "\"></script><script src=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "\"></script><script src=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var58 string- templ_7745c5c3_Var58, templ_7745c5c3_Err = templ.ResolveAttributeValue(string(view.P("/static/js/s3tables.js")))+ templ_7745c5c3_Var58, templ_7745c5c3_Err = templruntime.NewAttributeExpression(string(view.P("/static/js/s3tables.js"))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 372, Col: 58}}@@ -951,12 +1020,12 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "\"></script><script src=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "\"></script><script src=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var59 string- templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.ResolveAttributeValue(string(view.P("/static/js/policy_editor.js")))+ templ_7745c5c3_Var59, templ_7745c5c3_Err = templruntime.NewAttributeExpression(string(view.P("/static/js/policy_editor.js"))).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 373, Col: 63}}@@ -964,7 +1033,7 @@ func Layout(view ViewContext, content templ.Component) templ.Component {if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "\"></script></body></html>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "\"></script></body></html>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -988,13 +1057,9 @@ func LoginForm(title string, errorMessage string, csrfToken string) templ.Compon}()}ctx = templ.InitializeContext(ctx)- templ_7745c5c3_Var60 := templ.GetChildren(ctx)- if templ_7745c5c3_Var60 == nil {- templ_7745c5c3_Var60 = templ.NopComponent- }ctx = templ.ClearChildren(ctx)prefix := dash.URLPrefixFromContext(ctx)- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "<!doctype html><html lang=\"en\"><head><meta charset=\"UTF-8\"><title>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "<!doctype html><html lang=\"en\"><head><meta charset=\"UTF-8\"><title>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -1007,46 +1072,46 @@ func LoginForm(title string, errorMessage string, csrfToken string) templ.Componif templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, " - Login</title><link rel=\"icon\" href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, " - Login</title><link rel=\"icon\" href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var62 templ.SafeURL- templ_7745c5c3_Var62, templ_7745c5c3_Err = templ.JoinURLErrs(prefix + "/static/favicon.ico")+ var templ_7745c5c3_Var62 string+ templ_7745c5c3_Var62, templ_7745c5c3_Err = templruntime.NewAttributeExpression(prefix + "/static/favicon.ico").ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 387, Col: 58}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var62))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var62)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "\" type=\"image/x-icon\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><link href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "\" type=\"image/x-icon\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><link href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var63 templ.SafeURL- templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinURLErrs(prefix + "/static/css/bootstrap.min.css")+ var templ_7745c5c3_Var63 string+ templ_7745c5c3_Var63, templ_7745c5c3_Err = templruntime.NewAttributeExpression(prefix + "/static/css/bootstrap.min.css").ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 389, Col: 57}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var63)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "\" rel=\"stylesheet\"><link href=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "\" rel=\"stylesheet\"><link href=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var64 templ.SafeURL- templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinURLErrs(prefix + "/static/css/bootstrap-icons.min.css")+ var templ_7745c5c3_Var64 string+ templ_7745c5c3_Var64, templ_7745c5c3_Err = templruntime.NewAttributeExpression(prefix + "/static/css/bootstrap-icons.min.css").ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 390, Col: 67}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var64)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "\" rel=\"stylesheet\"></head><body class=\"bg-light\"><div class=\"container\"><div class=\"row justify-content-center min-vh-100 align-items-center\"><div class=\"col-md-6 col-lg-4\"><div class=\"card shadow\"><div class=\"card-body p-5\"><div class=\"text-center mb-4\"><i class=\"bi bi-server icon-3x text-primary mb-3\"></i><h4 class=\"card-title\">")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "\" rel=\"stylesheet\"></head><body class=\"bg-light\"><div class=\"container\"><div class=\"row justify-content-center min-vh-100 align-items-center\"><div class=\"col-md-6 col-lg-4\"><div class=\"card shadow\"><div class=\"card-body p-5\"><div class=\"text-center mb-4\"><i class=\"bi bi-server icon-3x text-primary mb-3\"></i><h4 class=\"card-title\">")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -1059,12 +1124,12 @@ func LoginForm(title string, errorMessage string, csrfToken string) templ.Componif templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "</h4><p class=\"text-muted\">Please sign in to continue</p></div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "</h4><p class=\"text-muted\">Please sign in to continue</p></div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}if errorMessage != "" {- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "<div class=\"alert alert-danger\" role=\"alert\"><i class=\"bi bi-exclamation-triangle me-2\"></i> ")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "<div class=\"alert alert-danger\" role=\"alert\"><i class=\"bi bi-exclamation-triangle me-2\"></i> ")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}@@ -1077,30 +1142,30 @@ func LoginForm(title string, errorMessage string, csrfToken string) templ.Componif templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "</div>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "</div>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "<form method=\"POST\" action=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "<form method=\"POST\" action=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- var templ_7745c5c3_Var67 templ.SafeURL- templ_7745c5c3_Var67, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(prefix + "/login"))+ var templ_7745c5c3_Var67 string+ templ_7745c5c3_Var67, templ_7745c5c3_Err = templruntime.NewAttributeExpression(templ.SafeURL(prefix + "/login")).ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 411, Col: 85}}- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var67))+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var67)if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "\"><input type=\"hidden\" name=\"csrf_token\" value=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "\"><input type=\"hidden\" name=\"csrf_token\" value=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var68 string- templ_7745c5c3_Var68, templ_7745c5c3_Err = templ.ResolveAttributeValue(csrfToken)+ templ_7745c5c3_Var68, templ_7745c5c3_Err = templruntime.NewAttributeExpression(csrfToken).Resolve(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 412, Col: 84}}@@ -1108,12 +1173,12 @@ func LoginForm(title string, errorMessage string, csrfToken string) templ.Componif templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "\"><div class=\"mb-3\"><label for=\"username\" class=\"form-label\">Username</label><div class=\"input-group\"><span class=\"input-group-text\"><i class=\"bi bi-person\"></i></span> <input type=\"text\" class=\"form-control\" id=\"username\" name=\"username\" required></div></div><div class=\"mb-4\"><label for=\"password\" class=\"form-label\">Password</label><div class=\"input-group\"><span class=\"input-group-text\"><i class=\"bi bi-lock\"></i></span> <input type=\"password\" class=\"form-control\" id=\"password\" name=\"password\" required></div></div><button type=\"submit\" class=\"btn btn-primary w-100\"><i class=\"bi bi-box-arrow-in-right me-2\"></i>Sign In</button></form></div></div></div></div></div><script src=\"")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "\"><div class=\"mb-3\"><label for=\"username\" class=\"form-label\">Username</label><div class=\"input-group\"><span class=\"input-group-text\"><i class=\"bi bi-person\"></i></span> <input type=\"text\" class=\"form-control\" id=\"username\" name=\"username\" required></div></div><div class=\"mb-4\"><label for=\"password\" class=\"form-label\">Password</label><div class=\"input-group\"><span class=\"input-group-text\"><i class=\"bi bi-lock\"></i></span> <input type=\"password\" class=\"form-control\" id=\"password\" name=\"password\" required></div></div><button type=\"submit\" class=\"btn btn-primary w-100\"><i class=\"bi bi-box-arrow-in-right me-2\"></i>Sign In</button></form></div></div></div></div></div><script src=\"")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}var templ_7745c5c3_Var69 string- templ_7745c5c3_Var69, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "/static/js/bootstrap.bundle.min.js")+ templ_7745c5c3_Var69, templ_7745c5c3_Err = templruntime.NewAttributeExpression(prefix + "/static/js/bootstrap.bundle.min.js").ResolveURL(ctx)if templ_7745c5c3_Err != nil {return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/layout/layout.templ`, Line: 443, Col: 63}}@@ -1121,7 +1186,7 @@ func LoginForm(title string, errorMessage string, csrfToken string) templ.Componif templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "\"></script></body></html>")+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, "\"></script></body></html>")if templ_7745c5c3_Err != nil {return templ_7745c5c3_Err}