forked from toolshed/abra
		
	| @ -9,6 +9,7 @@ import ( | ||||
| 	"coopcloud.tech/abra/pkg/autocomplete" | ||||
| 	"coopcloud.tech/abra/pkg/client" | ||||
| 	"coopcloud.tech/abra/pkg/formatter" | ||||
| 	"coopcloud.tech/abra/pkg/i18n" | ||||
| 	"coopcloud.tech/abra/pkg/log" | ||||
| 	"coopcloud.tech/abra/pkg/upstream/convert" | ||||
| 	composetypes "github.com/docker/cli/cli/compose/types" | ||||
| @ -19,11 +20,11 @@ import ( | ||||
| ) | ||||
|  | ||||
| var AppLabelsCommand = &cobra.Command{ | ||||
| 	Use:     "labels <domain> [flags]", | ||||
| 	Aliases: []string{"lb"}, | ||||
| 	Short:   "Show deployment labels", | ||||
| 	Long:    "Both local recipe and live deployment labels are shown.", | ||||
| 	Example: "  abra app labels 1312.net", | ||||
| 	Use:     i18n.G("labels <domain> [flags]"), | ||||
| 	Aliases: []string{i18n.G("lb")}, | ||||
| 	Short:   i18n.G("Show deployment labels"), | ||||
| 	Long:    i18n.G("Both local recipe and live deployment labels are shown."), | ||||
| 	Example: i18n.G("  abra app labels 1312.net"), | ||||
| 	Args:    cobra.ExactArgs(1), | ||||
| 	ValidArgsFunction: func( | ||||
| 		cmd *cobra.Command, | ||||
| @ -49,7 +50,7 @@ var AppLabelsCommand = &cobra.Command{ | ||||
| 		} | ||||
|  | ||||
| 		rows := [][]string{ | ||||
| 			{"DEPLOYED LABELS", "---"}, | ||||
| 			{i18n.G("DEPLOYED LABELS"), "---"}, | ||||
| 		} | ||||
|  | ||||
| 		remoteLabelKeys := make([]string, 0, len(remoteLabels)) | ||||
| @ -67,10 +68,10 @@ var AppLabelsCommand = &cobra.Command{ | ||||
| 		} | ||||
|  | ||||
| 		if len(remoteLabelKeys) == 0 { | ||||
| 			rows = append(rows, []string{"unknown"}) | ||||
| 			rows = append(rows, []string{i18n.G("unknown")}) | ||||
| 		} | ||||
|  | ||||
| 		rows = append(rows, []string{"RECIPE LABELS", "---"}) | ||||
| 		rows = append(rows, []string{i18n.G("RECIPE LABELS"), "---"}) | ||||
|  | ||||
| 		config, err := app.Recipe.GetComposeConfig(app.Env) | ||||
| 		if err != nil { | ||||
| @ -98,7 +99,7 @@ var AppLabelsCommand = &cobra.Command{ | ||||
| 			}) | ||||
| 		} | ||||
|  | ||||
| 		overview := formatter.CreateOverview("LABELS OVERVIEW", rows) | ||||
| 		overview := formatter.CreateOverview(i18n.G("LABELS OVERVIEW"), rows) | ||||
| 		fmt.Println(overview) | ||||
| 	}, | ||||
| } | ||||
| @ -131,9 +132,9 @@ func getLabels(cl *dockerClient.Client, stackName string) (map[string]string, er | ||||
| func init() { | ||||
| 	AppLabelsCommand.Flags().BoolVarP( | ||||
| 		&internal.Chaos, | ||||
| 		"chaos", | ||||
| 		"C", | ||||
| 		i18n.G("chaos"), | ||||
| 		i18n.G("C"), | ||||
| 		false, | ||||
| 		"ignore uncommitted recipes changes", | ||||
| 		i18n.G("ignore uncommitted recipes changes"), | ||||
| 	) | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user