From 2d28ea551af19addc8b9d9f40eef773852a68e8b Mon Sep 17 00:00:00 2001 From: Stevie <4719798+transient1@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:33:45 -0500 Subject: [PATCH] sc/rd 71 add plg link (#896) * Add persistentpostrun to root cmd and postrun to version cmd * Change PLG link * Add PLG link to dashboard * the link Co-authored-by: Andrew Suderman --- cmd/polaris/root.go | 3 +++ cmd/polaris/version.go | 3 +++ pkg/dashboard/templates/navbar.gohtml | 1 + 3 files changed, 7 insertions(+) diff --git a/cmd/polaris/root.go b/cmd/polaris/root.go index 1718cadc5..7db79e8a9 100644 --- a/cmd/polaris/root.go +++ b/cmd/polaris/root.go @@ -76,6 +76,9 @@ var rootCmd = &cobra.Command{ } os.Exit(1) }, + PersistentPostRun: func(cmd *cobra.Command, args []string) { + os.Stderr.WriteString("\n\nWant more? Automate Polaris for free with Fairwinds Insights!\nšŸš€ https://fairwinds.com/insights-signup/polaris šŸš€ \n") + }, } // Execute the stuff diff --git a/cmd/polaris/version.go b/cmd/polaris/version.go index 6074ee31f..f61e2ae31 100644 --- a/cmd/polaris/version.go +++ b/cmd/polaris/version.go @@ -31,4 +31,7 @@ var versionCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { fmt.Println("Polaris version:" + version) }, + PersistentPostRunE: func(cmd *cobra.Command, args []string) error { + return nil + }, } diff --git a/pkg/dashboard/templates/navbar.gohtml b/pkg/dashboard/templates/navbar.gohtml index ae81c4d52..60c5ea779 100644 --- a/pkg/dashboard/templates/navbar.gohtml +++ b/pkg/dashboard/templates/navbar.gohtml @@ -5,6 +5,7 @@ +
Want more? Automate Polaris with Fairwinds Insights