Repository: vmware-tanzu/octant
Pull request #870 (2020-04-22 22:34:24)

Bump version to 0.12.1 and added changelogs
Signed-off-by: GuessWhoSamFoo <foos@vmware.com>



Patch:
diff --git a/build.go b/build.go
index 975e7948..a9cdd797 100644
--- a/build.go
+++ b/build.go
@@ -21,7 +21,7 @@ import (
 )
 
 var (
-	VERSION    = "v0.12.0"
+	VERSION    = "v0.12.1"
 	GOPATH     = os.Getenv("GOPATH")
 	GIT_COMMIT = gitCommit()
 	BUILD_TIME = time.Now().UTC().Format(time.RFC3339)
diff --git a/changelogs/CHANGELOG-0.12.md b/changelogs/CHANGELOG-0.12.md
index 3fdcb312..e2f3f560 100644
--- a/changelogs/CHANGELOG-0.12.md
+++ b/changelogs/CHANGELOG-0.12.md
@@ -1,3 +1,13 @@
+## v0.12.1
+#### 2020-04-22
+
+### Download
+ - https://github.com/vmware/octant/releases/tag/v0.12.1
+
+### Bug Fixes
+  * Fixed initial active tab to use first tab if url fragment is missing (#868, @GuessWhoSamFoo)
+  * Fixed breadcrumbs for non-CRD types (#869, @mklanjsek)
+
 ## v0.12.0
 #### 2020-04-22
 
diff --git a/changelogs/unreleased/868-GuessWhoSamFoo b/changelogs/unreleased/868-GuessWhoSamFoo
deleted file mode 100644
index 3c1d2518..00000000
--- a/changelogs/unreleased/868-GuessWhoSamFoo
+++ /dev/null
@@ -1,2 +0,0 @@
-Fixed initial active tab to use first tab if url fragment is missing
-
diff --git a/internal/describer/object.go b/internal/describer/object.go
index 0ee67da6..597ce6ee 100644
--- a/internal/describer/object.go
+++ b/internal/describer/object.go
@@ -8,7 +8,6 @@ package describer
 import (
 	"context"
 	"fmt"
-	"path/filepath"
 
 	"k8s.io/apimachinery/pkg/api/meta"
 	"k8s.io/apimachinery/pkg/runtime"
@@ -41,7 +40,6 @@ type ObjectConfig struct {
 	StoreKey       store.Key
 	IconName       string
 	IconSource     string
-	RootPath       ResourceLink
 	TabsGenerator  TabsGenerator
 	TabDescriptors []Tab
 }
@@ -58,7 +56,6 @@ type Object struct {
 	tabFuncDescriptors    []Tab
 	iconName              string
 	iconSource            string
-	rootPath              ResourceLink
 	tabsGenerator         TabsGenerator
 }
 
@@ -82,7 +79,6 @@ func NewObject(c ObjectConfig) *Object {
 		objectType:         c.ObjectType,
 		iconName:           c.IconName,
 		iconSource:         c.IconSource,
-		rootPath:           c.RootPath,
 		tabsGenerator:      tg,
 		tabFuncDescriptors: td,
 	}
@@ -126,16 +122,7 @@ func (d *Object) Describe(ctx context.Context, namespace string, options Options
 	accessor := meta.NewAccessor()
 	objectName, _ := accessor.Name(object)
 
-	kind, _ := accessor.Kind(object)
-
-	nameLink, err := options.Link.ForObject(object, kind)
-
-	if err != nil {
-		return component.EmptyContentResponse, err
-	}
-
-	title := getBreadcrumb(d.rootPath, d.baseTitle, filepath.Dir(nameLink.Ref()), namespace)
-
+	title := append([]component.TitleComponent{}, component.NewText(d.baseTitle))
 	if objectName != "" {
 		title = append(title, component.NewText(objectName))
 	}
diff --git a/internal/describer/objects.go b/internal/describer/objects.go
index 8a76744d..775a8c67 100644
--- a/internal/describer/objects.go
+++ b/internal/describer/objects.go
@@ -182,8 +182,7 @@ func initNamespacedOverview() *Section {
 		ObjectStoreKey: store.Key{APIVersion: "networking.k8s.io/v1", Kind: "NetworkPolicy"},
 		ListType:       &networkingv1.NetworkPolicyList{},
 		ObjectType:     &networkingv1.NetworkPolicy{},
-		Titles:         ResourceTitle{List: "Network Policies", Object: "Network Policy"},
-		RootPath:       ResourceLink{Title: "Discovery and Load Balancing", Url: "/overview/namespace/($NAMESPACE)/discovery-and-load-balancing"},
+		Titles:         ResourceTitle{List: "Discovery & Load Balancing / Network Policies", Object: "Network Policy"},
 		IconName:       icon.OverviewNetworkPolicy,
 	})
 
diff --git a/internal/describer/resource.go b/internal/describer/resource.go
index 34b2c5d8..7f4568a8 100644
--- a/internal/describer/resource.go
+++ b/internal/describer/resource.go
@@ -95,7 +95,6 @@ func (r *Resource) Object() *Object {
 			},
 			IconName:   iconName,
 			IconSource: iconSource,
-			RootPath:   r.RootPath,
 		},
 	)
 }


Test patch:
diff --git a/internal/describer/object_test.go b/internal/describer/object_test.go
index 7d1825d0..a1df1f25 100644
--- a/internal/describer/object_test.go
+++ b/internal/describer/object_test.go
@@ -110,7 +110,7 @@ func TestObjectDescriber(t *testing.T) {
 			)))
 
 	expected := component.ContentResponse{
-		Title:      component.Title(component.NewLink("", "object", "."), component.NewText("pod")),
+		Title:      component.Title(component.NewText("object"), component.NewText("pod")),
 		IconName:   "icon-name",
 		IconSource: "icon-source",
 		Components: []component.Component{