diff --git a/web/templates/login_templ.go b/web/templates/login_templ.go
index db2b11b..36af401 100644
--- a/web/templates/login_templ.go
+++ b/web/templates/login_templ.go
@@ -10,7 +10,7 @@ import "context"
import "io"
import "bytes"
-func Login(metaContent MetaContent, title string, err error) templ.Component {
+func Login(metaContent MetaContent, title string) templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
@@ -46,7 +46,7 @@ func Login(metaContent MetaContent, title string, err error) templ.Component {
}
return templ_7745c5c3_Err
})
- templ_7745c5c3_Err = wrapBase(metaContent, title, err).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
+ templ_7745c5c3_Err = wrapBase(metaContent, title).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/web/templates/mainComponents.templ b/web/templates/mainComponents.templ
index e71cde0..1514396 100644
--- a/web/templates/mainComponents.templ
+++ b/web/templates/mainComponents.templ
@@ -93,14 +93,14 @@ templ ErrorMessage(title string, content string) {
}
// wrapBase handles the basics of HTML
-templ wrapBase(metaContent MetaContent, title string, err error) {
+templ wrapBase(metaContent MetaContent, title string) {
@head(title)
@navbar(metaContent.IsLoggedIn)
- if err != nil {
- @ErrorMessage("Error", err.Error())
+ if metaContent.ErrorText != "" {
+ @ErrorMessage(metaContent.ErrorTitle, metaContent.ErrorText)
}
{ children... }
@footer(metaContent.Timestamp)
diff --git a/web/templates/mainComponents_templ.go b/web/templates/mainComponents_templ.go
index 8073192..dbc7a86 100644
--- a/web/templates/mainComponents_templ.go
+++ b/web/templates/mainComponents_templ.go
@@ -198,7 +198,7 @@ func ErrorMessage(title string, content string) templ.Component {
}
// wrapBase handles the basics of HTML
-func wrapBase(metaContent MetaContent, title string, err error) templ.Component {
+func wrapBase(metaContent MetaContent, title string) templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
@@ -227,8 +227,8 @@ func wrapBase(metaContent MetaContent, title string, err error) templ.Component
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- if err != nil {
- templ_7745c5c3_Err = ErrorMessage("Error", err.Error()).Render(ctx, templ_7745c5c3_Buffer)
+ if metaContent.ErrorText != "" {
+ templ_7745c5c3_Err = ErrorMessage(metaContent.ErrorTitle, metaContent.ErrorText).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/web/templates/profile.templ b/web/templates/profile.templ
index b762255..41f70bf 100644
--- a/web/templates/profile.templ
+++ b/web/templates/profile.templ
@@ -3,8 +3,8 @@ package templates
import "git.jmbit.de/jmb/goipam/db"
-templ ProfilePage(metaContent MetaContent, title string, user *db.User, err error) {
- @wrapBase(metaContent, title, err) {
+templ ProfilePage(metaContent MetaContent, title string, user *db.User) {
+ @wrapBase(metaContent, title) {
@profileMain(user)
}
}
diff --git a/web/templates/profile_templ.go b/web/templates/profile_templ.go
index c546aec..497befc 100644
--- a/web/templates/profile_templ.go
+++ b/web/templates/profile_templ.go
@@ -12,7 +12,7 @@ import "bytes"
import "git.jmbit.de/jmb/goipam/db"
-func ProfilePage(metaContent MetaContent, title string, user *db.User, err error) templ.Component {
+func ProfilePage(metaContent MetaContent, title string, user *db.User) templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
@@ -40,7 +40,7 @@ func ProfilePage(metaContent MetaContent, title string, user *db.User, err error
}
return templ_7745c5c3_Err
})
- templ_7745c5c3_Err = wrapBase(metaContent, title, err).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
+ templ_7745c5c3_Err = wrapBase(metaContent, title).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/web/templates/structs.go b/web/templates/structs.go
index 4128319..afb317f 100644
--- a/web/templates/structs.go
+++ b/web/templates/structs.go
@@ -6,6 +6,8 @@ import (
"github.com/gin-contrib/sessions"
"github.com/gin-gonic/gin"
+
+ "git.jmbit.de/jmb/goipam/utils"
)
type IndexCounts struct {
@@ -31,6 +33,7 @@ func GenMetaContent(c *gin.Context) MetaContent {
sessionUserName := session.Get("username")
sessionIsLoggedIn := session.Get("isLoggedIn")
sessionIsAdmin := session.Get("isAdmin")
+ errorText := utils.SliceToLines(c.Errors.Errors())
var username string
var isLoggedIn bool
var isAdmin bool
@@ -57,5 +60,7 @@ func GenMetaContent(c *gin.Context) MetaContent {
IsLoggedIn: isLoggedIn,
IsAdmin: isAdmin,
Timestamp: fmt.Sprintf("%d", time.Now().Year()),
+ ErrorText: errorText,
+ ErrorTitle: "Error",
}
}
diff --git a/web/templates/subnetDetails.templ b/web/templates/subnetDetails.templ
new file mode 100644
index 0000000..f31691c
--- /dev/null
+++ b/web/templates/subnetDetails.templ
@@ -0,0 +1,72 @@
+
+package templates
+
+import "git.jmbit.de/jmb/goipam/db"
+import "fmt"
+
+templ SubnetDetails(metaContent MetaContent, title string, subnet *db.Subnet) {
+ @wrapBase(metaContent, title) {
+ @subnetMain(subnet)
+ }
+}
+
+templ subnetMain(subnet *db.Subnet) {
+
+
+ @SubnetStatic(subnet)
+
+
+}
+
+templ SubnetStatic(subnet *db.Subnet) {
+
+
+ Subnet Name { subnet.Name }
+
+
+ Display Name { subnet.DisplayName }
+
+
+ VLAN { fmt.Sprint(subnet.VLAN) }
+
+
+ IPv4 Network Address { subnet.IPv4Net }
+
+
+ IPv6 Network Address { subnet.IPv6Net }
+
+
+
+ Comment { fmt.Sprint(subnet.VLAN) }
+
+
+ Click To Edit
+
+
+}
+
+templ SubnetForm(subnet *db.Subnet) {
+
+}
+
+
diff --git a/web/templates/subnetDetails_templ.go b/web/templates/subnetDetails_templ.go
new file mode 100644
index 0000000..c20b048
--- /dev/null
+++ b/web/templates/subnetDetails_templ.go
@@ -0,0 +1,303 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.2.543
+package templates
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import "context"
+import "io"
+import "bytes"
+
+import "git.jmbit.de/jmb/goipam/db"
+import "fmt"
+
+func SubnetDetails(metaContent MetaContent, title string, subnet *db.Subnet) templ.Component {
+ return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
+ if !templ_7745c5c3_IsBuffer {
+ templ_7745c5c3_Buffer = templ.GetBuffer()
+ defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
+ }
+ 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_Var2 := templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
+ if !templ_7745c5c3_IsBuffer {
+ templ_7745c5c3_Buffer = templ.GetBuffer()
+ defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
+ }
+ templ_7745c5c3_Err = subnetMain(subnet).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ if !templ_7745c5c3_IsBuffer {
+ _, templ_7745c5c3_Err = io.Copy(templ_7745c5c3_W, templ_7745c5c3_Buffer)
+ }
+ return templ_7745c5c3_Err
+ })
+ templ_7745c5c3_Err = wrapBase(metaContent, title).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ if !templ_7745c5c3_IsBuffer {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
+ }
+ return templ_7745c5c3_Err
+ })
+}
+
+func subnetMain(subnet *db.Subnet) templ.Component {
+ return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
+ if !templ_7745c5c3_IsBuffer {
+ templ_7745c5c3_Buffer = templ.GetBuffer()
+ defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var3 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var3 == nil {
+ templ_7745c5c3_Var3 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = SubnetStatic(subnet).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ if !templ_7745c5c3_IsBuffer {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
+ }
+ return templ_7745c5c3_Err
+ })
+}
+
+func SubnetStatic(subnet *db.Subnet) templ.Component {
+ return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
+ if !templ_7745c5c3_IsBuffer {
+ templ_7745c5c3_Buffer = templ.GetBuffer()
+ defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var4 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var4 == nil {
+ templ_7745c5c3_Var4 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Subnet Name ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var5 string
+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(subnet.Name)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnetDetails.templ`, Line: 23, Col: 57}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Display Name ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var6 string
+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(subnet.DisplayName)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnetDetails.templ`, Line: 26, Col: 65}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
VLAN ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var7 string
+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(subnet.VLAN))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnetDetails.templ`, Line: 29, Col: 62}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
IPv4 Network Address ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var8 string
+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(subnet.IPv4Net)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnetDetails.templ`, Line: 32, Col: 69}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
IPv6 Network Address ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var9 string
+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(subnet.IPv6Net)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnetDetails.templ`, Line: 35, Col: 69}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Comment ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var12 string
+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(subnet.VLAN))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnetDetails.templ`, Line: 44, Col: 65}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Click To Edit ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ if !templ_7745c5c3_IsBuffer {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
+ }
+ return templ_7745c5c3_Err
+ })
+}
+
+func SubnetForm(subnet *db.Subnet) templ.Component {
+ return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
+ if !templ_7745c5c3_IsBuffer {
+ templ_7745c5c3_Buffer = templ.GetBuffer()
+ defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var13 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var13 == nil {
+ templ_7745c5c3_Var13 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ if !templ_7745c5c3_IsBuffer {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
+ }
+ return templ_7745c5c3_Err
+ })
+}
diff --git a/web/templates/subnets.templ b/web/templates/subnets.templ
index 1920275..41a71df 100644
--- a/web/templates/subnets.templ
+++ b/web/templates/subnets.templ
@@ -3,8 +3,8 @@ package templates
import "git.jmbit.de/jmb/goipam/db"
import "fmt"
-templ SubnetsPage(metaContent MetaContent, subnets []db.Subnet, err error) {
- @wrapBase(metaContent, "Subnets", err) {
+templ SubnetsPage(metaContent MetaContent, subnets []db.Subnet) {
+ @wrapBase(metaContent, "Subnets") {
@subnetsTable(subnets)
@@ -20,7 +20,6 @@ templ subnetsTable(subnets []db.Subnet) {
- ID
Name
Display Name
VLAN
@@ -39,7 +38,6 @@ templ subnetsTable(subnets []db.Subnet) {
templ subnetsTableRows(subnets []db.Subnet) {
for _, subnet := range subnets {
- { fmt.Sprint(subnet.ID) }
{ subnet.Name }
{ subnet.DisplayName }
{ fmt.Sprint(subnet.VLAN) }
diff --git a/web/templates/subnets_templ.go b/web/templates/subnets_templ.go
index 3cbd6ef..0b75585 100644
--- a/web/templates/subnets_templ.go
+++ b/web/templates/subnets_templ.go
@@ -13,7 +13,7 @@ import "bytes"
import "git.jmbit.de/jmb/goipam/db"
import "fmt"
-func SubnetsPage(metaContent MetaContent, subnets []db.Subnet, err error) templ.Component {
+func SubnetsPage(metaContent MetaContent, subnets []db.Subnet) templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
@@ -49,7 +49,7 @@ func SubnetsPage(metaContent MetaContent, subnets []db.Subnet, err error) templ.
}
return templ_7745c5c3_Err
})
- templ_7745c5c3_Err = wrapBase(metaContent, "Subnets", err).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
+ templ_7745c5c3_Err = wrapBase(metaContent, "Subnets").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -73,7 +73,7 @@ func subnetsTable(subnets []db.Subnet) templ.Component {
templ_7745c5c3_Var3 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Subnets ID Name Display Name VLAN IPv4 IPv6 Location Comment
")
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Subnets Name Display Name VLAN IPv4 IPv6 Location Comment
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -111,9 +111,9 @@ func subnetsTableRows(subnets []db.Subnet) templ.Component {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
- templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(subnet.ID))
+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(subnet.Name)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnets.templ`, Line: 41, Col: 30}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnets.templ`, Line: 40, Col: 20}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -124,9 +124,9 @@ func subnetsTableRows(subnets []db.Subnet) templ.Component {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var6 string
- templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(subnet.Name)
+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(subnet.DisplayName)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnets.templ`, Line: 42, Col: 20}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnets.templ`, Line: 41, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -137,9 +137,9 @@ func subnetsTableRows(subnets []db.Subnet) templ.Component {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var7 string
- templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(subnet.DisplayName)
+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(subnet.VLAN))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnets.templ`, Line: 43, Col: 27}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnets.templ`, Line: 42, Col: 32}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -150,9 +150,9 @@ func subnetsTableRows(subnets []db.Subnet) templ.Component {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var8 string
- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(subnet.VLAN))
+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(subnet.IPv4Net)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnets.templ`, Line: 44, Col: 32}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnets.templ`, Line: 43, Col: 23}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -163,27 +163,14 @@ func subnetsTableRows(subnets []db.Subnet) templ.Component {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var9 string
- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(subnet.IPv4Net)
+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(subnet.IPv6Net)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnets.templ`, Line: 45, Col: 23}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnets.templ`, Line: 44, Col: 23}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- var templ_7745c5c3_Var10 string
- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(subnet.IPv6Net)
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/subnets.templ`, Line: 46, Col: 23}
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("