From 599fd54bf120179a80012ee304b5684aafcf3e2a Mon Sep 17 00:00:00 2001 From: Trois-Six Date: Thu, 29 Apr 2021 10:24:08 +0200 Subject: [PATCH] fix: xlabels when labels are an IP --- pkg/diagram/objects.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/diagram/objects.go b/pkg/diagram/objects.go index c32e0dd..f6b5bc1 100644 --- a/pkg/diagram/objects.go +++ b/pkg/diagram/objects.go @@ -241,7 +241,7 @@ func (d *Diagram) GenerateServices(namespace string, services *corev1.ServiceLis d.internet, d.services[svc.Name], func(o *diagram.EdgeOptions) { - o.Attributes["xlabel"] = lb.IP + o.Attributes["xlabel"] = "\"" + lb.IP + "\"" o.Attributes["labelfloat"] = strconv.FormatBool(true) o.Font.Size = 6 }, @@ -300,7 +300,7 @@ func (d *Diagram) GenerateIngresses(namespace string, o *networkingv1.IngressLis d.internet, d.ingresses[ing.Name], func(o *diagram.EdgeOptions) { - o.Attributes["xlabel"] = lb.IP + o.Attributes["xlabel"] = "\"" + lb.IP + "\"" o.Attributes["labelfloat"] = strconv.FormatBool(true) o.Font.Size = 6 },