Skip to content

Commit

Permalink
Merge pull request #20 from appuio/feat/sales_order_rename
Browse files Browse the repository at this point in the history
Rename label `sales_order_id` to `sales_order` for consistency and clarity
  • Loading branch information
corvus-ch authored Dec 21, 2023
2 parents 098d8bc + 212f243 commit f8eef2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type ReportArgs struct {
OverrideSalesOrderID string
}

const SalesOrderIDLabel = "sales_order_id"
const SalesOrderLabel = "sales_order"

// RunRange executes prometheus queries like Run() until the `until` timestamp is reached or an error occurred.
// Returns the number of reports run and a possible error.
Expand Down Expand Up @@ -110,7 +110,7 @@ func processSample(ctx context.Context, odooClient OdooClient, args ReportArgs,
if args.OverrideSalesOrderID != "" {
salesOrderID = args.OverrideSalesOrderID
} else {
sid, err := getMetricLabel(s.Metric, SalesOrderIDLabel)
sid, err := getMetricLabel(s.Metric, SalesOrderLabel)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/report/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const promTestquery = `
),
"tenant", "my-tenant", "", ""
),
"sales_order_id", "SO00000", "", ""
"sales_order", "SO00000", "", ""
)
`
const promInvalidTestquery = `
Expand Down

0 comments on commit f8eef2d

Please sign in to comment.