-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Process Prometheus results into Odoo16 metered billing records
- Loading branch information
1 parent
9f0cdea
commit 32b2c97
Showing
85 changed files
with
244 additions
and
6,949 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,18 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/appuio/appuio-cloud-reporting/pkg/db" | ||
"github.com/urfave/cli/v2" | ||
) | ||
|
||
const defaultTestForRequiredFlags = "<required>" | ||
|
||
func newDbURLFlag(destination *string) *cli.StringFlag { | ||
return &cli.StringFlag{Name: "db-url", Usage: "Database connection URL in the form of postgres://user@host:port/db-name?option=value", | ||
EnvVars: envVars("DB_URL"), Destination: destination, Required: true, DefaultText: defaultTestForRequiredFlags} | ||
} | ||
const defaultTextForRequiredFlags = "<required>" | ||
const defaultTextForOptionalFlags = "<optional>" | ||
|
||
func newPromURLFlag(destination *string) *cli.StringFlag { | ||
return &cli.StringFlag{Name: "prom-url", Usage: "Prometheus connection URL in the form of http://host:port", | ||
EnvVars: envVars("PROM_URL"), Destination: destination, Value: "http://localhost:9090"} | ||
} | ||
|
||
func queryNames(queries []db.Query) []string { | ||
names := make([]string, len(queries)) | ||
for i := range queries { | ||
names[i] = queries[i].Name | ||
} | ||
return names | ||
func newOdooURLFlag(destination *string) *cli.StringFlag { | ||
return &cli.StringFlag{Name: "odoo-url", Usage: "URL of the Odoo Metered Billing API", | ||
EnvVars: envVars("ODOO_URL"), Destination: destination, Value: "http://localhost:8080"} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.