update submit

This commit is contained in:
dwertent
2021-10-25 12:05:51 +03:00
parent 3310a6a26f
commit d72700acf6
2 changed files with 6 additions and 4 deletions

View File

@@ -109,8 +109,10 @@ func ClusterConfigSetup(scanInfo *ScanInfo, k8s *k8sinterface.KubernetesApi, beA
return NewEmptyConfig() // local - Delete local config & Do not send report
}
if scanInfo.Local {
scanInfo.Submit = false
return NewEmptyConfig() // local - Do not send report
}
scanInfo.Submit = true
return clusterConfig // submit/default - Submit report
}
@@ -158,7 +160,7 @@ func (c *ClusterConfig) GetDefaultNS() string { return c.defau
func (c *ClusterConfig) GetBackendAPI() getter.IBackend { return c.backendAPI }
func (c *ClusterConfig) GenerateURL() {
message := "\nCheckout for more cool features: "
message := "Checkout for more cool features: "
u := url.URL{}
u.Scheme = "https"
@@ -167,7 +169,7 @@ func (c *ClusterConfig) GenerateURL() {
return
}
if c.configObj.CustomerAdminEMail != "" {
InfoTextDisplay(os.Stdout, message+u.String()+"\n")
InfoTextDisplay(os.Stdout, "\n\n"+message+u.String()+"\n\n")
return
}
u.Path = "account/sign-up"
@@ -176,7 +178,7 @@ func (c *ClusterConfig) GenerateURL() {
q.Add("customerGUID", c.configObj.CustomerGUID)
u.RawQuery = q.Encode()
InfoTextDisplay(os.Stdout, message+u.String()+"\n")
InfoTextDisplay(os.Stdout, "\n\n"+message+u.String()+"\n\n")
}
func (c *ClusterConfig) GetCustomerGUID() string {

View File

@@ -34,7 +34,7 @@ type componentInterfaces struct {
}
func getReporter(scanInfo *cautils.ScanInfo) reporter.IReport {
if scanInfo.Local {
if !scanInfo.Submit {
return reporter.NewReportMock()
}
if !scanInfo.FrameworkScan {