Skip to content

Commit 11c1c81

Browse files
feat(cockpit): add support for alerts (#4106)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 7f069ea commit 11c1c81

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

cmd/scw/testdata/test-all-usage-cockpit-data-source-create-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ USAGE:
1212
ARGS:
1313
[project-id] Project ID to use. If none is passed the default project ID will be used
1414
[name] Data source name
15-
[type] Data source type (unknown_type | metrics | logs | traces)
15+
[type] Data source type (unknown_type | metrics | logs | traces | alerts)
1616
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1717

1818
FLAGS:

cmd/scw/testdata/test-all-usage-cockpit-data-source-list-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ARGS:
1010
[order-by] Sort order for data sources in the response (created_at_asc | created_at_desc | name_asc | name_desc | type_asc | type_desc)
1111
[project-id] Project ID to use. If none is passed the default project ID will be used
1212
[origin] Origin to filter for, only data sources with matching origin will be returned (unknown_origin | scaleway | external)
13-
[types.{index}] Types to filter for, only data sources with matching types will be returned (unknown_type | metrics | logs | traces)
13+
[types.{index}] Types to filter for, only data sources with matching types will be returned (unknown_type | metrics | logs | traces | alerts)
1414
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
1515

1616
FLAGS:

docs/commands/cockpit.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ scw cockpit data-source create [arg=value ...]
206206
|------|---|-------------|
207207
| project-id | | Project ID to use. If none is passed the default project ID will be used |
208208
| name | | Data source name |
209-
| type | One of: `unknown_type`, `metrics`, `logs`, `traces` | Data source type |
209+
| type | One of: `unknown_type`, `metrics`, `logs`, `traces`, `alerts` | Data source type |
210210
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
211211

212212

@@ -270,7 +270,7 @@ scw cockpit data-source list [arg=value ...]
270270
| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc`, `type_asc`, `type_desc` | Sort order for data sources in the response |
271271
| project-id | | Project ID to use. If none is passed the default project ID will be used |
272272
| origin | One of: `unknown_origin`, `scaleway`, `external` | Origin to filter for, only data sources with matching origin will be returned |
273-
| types.{index} | One of: `unknown_type`, `metrics`, `logs`, `traces` | Types to filter for, only data sources with matching types will be returned |
273+
| types.{index} | One of: `unknown_type`, `metrics`, `logs`, `traces`, `alerts` | Types to filter for, only data sources with matching types will be returned |
274274
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config |
275275

276276

internal/namespaces/cockpit/v1/cockpit_cli.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ The name of the data source will then be used as reference to name the associate
546546
Required: false,
547547
Deprecated: false,
548548
Positional: false,
549-
EnumValues: []string{"unknown_type", "metrics", "logs", "traces"},
549+
EnumValues: []string{"unknown_type", "metrics", "logs", "traces", "alerts"},
550550
},
551551
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
552552
},
@@ -661,7 +661,7 @@ You can list data sources by Project, type and origin.`,
661661
Required: false,
662662
Deprecated: false,
663663
Positional: false,
664-
EnumValues: []string{"unknown_type", "metrics", "logs", "traces"},
664+
EnumValues: []string{"unknown_type", "metrics", "logs", "traces", "alerts"},
665665
},
666666
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw, scw.Region(core.AllLocalities)),
667667
},

0 commit comments

Comments
 (0)