Skip to content

Commit

Permalink
set default report time
Browse files Browse the repository at this point in the history
Signed-off-by: David Wertenteil <dwertent@armosec.io>
  • Loading branch information
David Wertenteil committed Apr 9, 2023
1 parent 875deb7 commit 91c1338
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions core/pkg/resultshandling/reporter/v2/reporteventreceiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"
"net/url"
"os"
"time"

"github.com/armosec/armoapi-go/apis"
logger "github.com/kubescape/go-logger"
Expand Down Expand Up @@ -35,6 +36,7 @@ const (
var _ reporter.IReport = &ReportEventReceiver{}

type ReportEventReceiver struct {
reportTime time.Time
httpClient *http.Client
clusterName string
customerGUID string
Expand All @@ -55,6 +57,7 @@ func NewReportEventReceiver(tenantConfig *cautils.ConfigObj, reportID string, su
customerAdminEMail: tenantConfig.CustomerAdminEMail,
reportID: reportID,
submitContext: submitContext,
reportTime: time.Now().UTC(),
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (report *ReportEventReceiver) setSubReport(opaSessionObj *cautils.OPASessio
CustomerGUID: report.customerGUID,
ClusterName: report.clusterName,
ReportID: report.reportID,
ReportGenerationTime: opaSessionObj.Report.ReportGenerationTime,
ReportGenerationTime: report.reportTime,
SummaryDetails: opaSessionObj.Report.SummaryDetails,
Attributes: opaSessionObj.Report.Attributes,
ClusterAPIServerInfo: opaSessionObj.Report.ClusterAPIServerInfo,
Expand Down

0 comments on commit 91c1338

Please sign in to comment.