From b0476e265da70dd69c0a3c89f2f5c78df640f3c7 Mon Sep 17 00:00:00 2001 From: Dominik Richter Date: Mon, 25 Sep 2023 12:36:41 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20rename=20fleet=20=3D>=20inventory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This better matches the more commonly used definition. We will keep fleet working for the next major version and then slowly deprecate it. Analogous to: https://github.com/mondoohq/cnquery/pull/1920 Signed-off-by: Dominik Richter --- apps/cnspec/cmd/scan.go | 2 +- apps/cnspec/cmd/vuln.go | 2 +- cli/reporter/print_compact.go | 6 +++--- cli/reporter/testdata/report-ubuntu.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/cnspec/cmd/scan.go b/apps/cnspec/cmd/scan.go index 037291dd..afd7091c 100644 --- a/apps/cnspec/cmd/scan.go +++ b/apps/cnspec/cmd/scan.go @@ -52,7 +52,7 @@ func init() { // v6 should make detect-cicd and category flag public scanCmd.Flags().Bool("detect-cicd", true, "Try to detect CI/CD environments. If detected, set the asset category to 'cicd'.") - scanCmd.Flags().String("category", "fleet", "Set the category for the assets to 'fleet|cicd'.") + scanCmd.Flags().String("category", "inventory", "Set the category for the assets to 'inventory|cicd'.") scanCmd.Flags().MarkHidden("category") } diff --git a/apps/cnspec/cmd/vuln.go b/apps/cnspec/cmd/vuln.go index ac368f03..c99111b8 100644 --- a/apps/cnspec/cmd/vuln.go +++ b/apps/cnspec/cmd/vuln.go @@ -56,7 +56,7 @@ var vulnCmd = &cobra.Command{ // // v6 should make detect-cicd and category flag public, default for "detect-cicd" should switch to true // cmd.Flags().Bool("detect-cicd", true, "Try to detect CI/CD environments. If successful, sets the asset category to 'cicd'.") -// cmd.Flags().String("category", "fleet", "Set the category for the assets to 'fleet|cicd'.") +// cmd.Flags().String("category", "inventory", "Set the category for the assets to 'inventory|cicd'.") // cmd.Flags().MarkHidden("category") // // output rendering diff --git a/cli/reporter/print_compact.go b/cli/reporter/print_compact.go index b4ca704d..d91a81c3 100644 --- a/cli/reporter/print_compact.go +++ b/cli/reporter/print_compact.go @@ -167,15 +167,15 @@ func (r *defaultReporter) printSummary(orderedAssets []assetMrnName) { url := "" if len(orderedAssets) > 1 { // we do not have a space url, so we extract it form the asset url - // https://console.mondoo.com/space/fleet/2JtqGyVTZULTW0uwQ5YxXW4nh6Y?spaceId=dazzling-golick-767384 + // https://console.mondoo.com/space/inventory/2JtqGyVTZULTW0uwQ5YxXW4nh6Y?spaceId=dazzling-golick-767384 // an individual asset url wouldn't make sense here // when runnin inside cicd, we create an url for the cicd project - spaceUrlRegexp := regexp.MustCompile(`^(http.*)/fleet/[a-zA-Z0-9-]+(\?.+)$`) + spaceUrlRegexp := regexp.MustCompile(`^(http.*)/inventory/[a-zA-Z0-9-]+(\?.+)$`) m := spaceUrlRegexp.FindStringSubmatch(assetUrl) if projectId != "" { url = m[1] + "/cicd/jobs" + m[2] + "&projectId=" + projectId } else { - url = m[1] + "/fleet" + m[2] + url = m[1] + "/inventory" + m[2] } } else { diff --git a/cli/reporter/testdata/report-ubuntu.json b/cli/reporter/testdata/report-ubuntu.json index 80225bbf..095020ad 100644 --- a/cli/reporter/testdata/report-ubuntu.json +++ b/cli/reporter/testdata/report-ubuntu.json @@ -38,7 +38,7 @@ "labels": { "mondoo.com/project-id": "" }, - "url": "https://console.mondoo.com/space/fleet/2DRZ1cCWFyTYCArycAXHwvn1oU2?spaceId=dazzling-golick-767384" + "url": "https://console.mondoo.com/space/inventory/2DRZ1cCWFyTYCArycAXHwvn1oU2?spaceId=dazzling-golick-767384" } }, "bundle": {