Skip to content

Commit

Permalink
patch - update line_chart units (#230)
Browse files Browse the repository at this point in the history
* patch - update line_chart units

* CHANGELOG
  • Loading branch information
OrNovo authored May 4, 2024
1 parent 40a721f commit 5023153
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,4 +556,9 @@ Breaking Changes:

Bug fixing:
#### resource/coralogix_dashboard
* fixing [issue](https://github.com/coralogix/terraform-provider-coralogix/issues/224).
* fixing [issue](https://github.com/coralogix/terraform-provider-coralogix/issues/224).

## Release 1.14.1
New Features:
#### resource/coralogix_dashboard
* adding units for `line_chart` query_definitions.
1 change: 1 addition & 0 deletions coralogix/resource_coralogix_alert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ func TestAccCoralogixResourceAlert_uniqueCount(t *testing.T) {
maxUniqueValuesForGroupBy: 20,
}
updatedAlertChecks := extractUniqueCountAlertChecks(updatedAlert)
updatedAlertChecks = updatedAlertChecks[:len(updatedAlertChecks)-1] // remove group_by check

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down
4 changes: 4 additions & 0 deletions coralogix/resource_coralogix_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ var (
"kibytes": dashboards.Unit_UNIT_KIBYTES,
"mibytes": dashboards.Unit_UNIT_MIBYTES,
"gibytes": dashboards.Unit_UNIT_GIBYTES,
"euro_cents": dashboards.Unit_UNIT_EUR_CENTS,
"euro": dashboards.Unit_UNIT_EUR,
"usd_cents": dashboards.Unit_UNIT_USD_CENTS,
"usd": dashboards.Unit_UNIT_USD,
}
dashboardProtoToSchemaUnit = ReverseMap(dashboardSchemaToProtoUnit)
dashboardValidUnits = GetKeys(dashboardSchemaToProtoUnit)
Expand Down
8 changes: 4 additions & 4 deletions docs/data-sources/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ Read-Only:
- `scale_type` (String)
- `sort_by` (String) The field to sort by. Can be one of name, unspecified, value.
- `stack_definition` (Attributes) (see [below for nested schema](#nestedatt--layout--sections--rows--widgets--definition--pie_chart--stack_definition))
- `unit` (String) The unit of the chart. Can be one of gbytes, bytes_iec, mibytes, unspecified, microseconds, milliseconds, mbytes, kibytes, gibytes, seconds, bytes, kbytes.
- `unit` (String) The unit of the chart. Can be one of unspecified, microseconds, seconds, bytes_iec, kibytes, milliseconds, gbytes, euro_cents, usd_cents, kbytes, mbytes, mibytes, gibytes, bytes, euro, usd.
- `xaxis` (Attributes) (see [below for nested schema](#nestedatt--layout--sections--rows--widgets--definition--pie_chart--xaxis))

<a id="nestedatt--layout--sections--rows--widgets--definition--pie_chart--query"></a>
Expand Down Expand Up @@ -1109,7 +1109,7 @@ Read-Only:
- `show_outer_arc` (Boolean)
- `threshold_by` (String) The threshold by. Can be one of ["value" "background" "unspecified"].
- `thresholds` (Attributes List) (see [below for nested schema](#nestedatt--layout--sections--rows--widgets--definition--pie_chart--thresholds))
- `unit` (String) The unit of the gauge. Can be one of ["kbytes" "gibytes" "none" "percent" "bytes_iec" "euro_cents" "euro" "usd_cents" "bytes" "gbytes" "kibytes" "usd" "seconds" "mbytes" "mibytes" "microseconds" "milliseconds"].
- `unit` (String) The unit of the gauge. Can be one of ["milliseconds" "bytes" "mbytes" "mibytes" "euro" "percent" "kbytes" "gibytes" "euro_cents" "usd" "microseconds" "seconds" "gbytes" "bytes_iec" "kibytes" "none" "usd_cents"].

<a id="nestedatt--layout--sections--rows--widgets--definition--pie_chart--query"></a>
### Nested Schema for `layout.sections.rows.widgets.definition.pie_chart.unit`
Expand Down Expand Up @@ -1374,7 +1374,7 @@ Read-Only:
- `scale_type` (String)
- `sort_by` (String)
- `stack_definition` (Attributes) (see [below for nested schema](#nestedatt--layout--sections--rows--widgets--definition--pie_chart--stack_definition))
- `unit` (String) The unit of the chart. Can be one of gbytes, bytes_iec, mibytes, unspecified, microseconds, milliseconds, mbytes, kibytes, gibytes, seconds, bytes, kbytes.
- `unit` (String) The unit of the chart. Can be one of unspecified, microseconds, seconds, bytes_iec, kibytes, milliseconds, gbytes, euro_cents, usd_cents, kbytes, mbytes, mibytes, gibytes, bytes, euro, usd.
- `y_axis_view_by` (String)

<a id="nestedatt--layout--sections--rows--widgets--definition--pie_chart--query"></a>
Expand Down Expand Up @@ -1608,7 +1608,7 @@ Read-Only:
- `scale_type` (String) The scale type. Valid values are: logarithmic, unspecified, linear.
- `series_count_limit` (Number)
- `series_name_template` (String)
- `unit` (String) The unit. Valid values are: gbytes, bytes_iec, mibytes, unspecified, microseconds, milliseconds, mbytes, kibytes, gibytes, seconds, bytes, kbytes.
- `unit` (String) The unit. Valid values are: unspecified, microseconds, seconds, bytes_iec, kibytes, milliseconds, gbytes, euro_cents, usd_cents, kbytes, mbytes, mibytes, gibytes, bytes, euro, usd.

<a id="nestedatt--layout--sections--rows--widgets--definition--pie_chart--tooltip--query"></a>
### Nested Schema for `layout.sections.rows.widgets.definition.pie_chart.tooltip.unit`
Expand Down
14 changes: 7 additions & 7 deletions docs/resources/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ Optional:
- `scale_type` (String)
- `sort_by` (String) The field to sort by. Can be one of name, unspecified, value.
- `stack_definition` (Attributes) (see [below for nested schema](#nestedatt--layout--sections--rows--id--definition--pie_chart--stack_definition))
- `unit` (String) The unit of the chart. Can be one of gbytes, bytes_iec, mibytes, unspecified, microseconds, milliseconds, mbytes, kibytes, gibytes, seconds, bytes, kbytes.
- `unit` (String) The unit of the chart. Can be one of unspecified, microseconds, seconds, bytes_iec, kibytes, milliseconds, gbytes, euro_cents, usd_cents, kbytes, mbytes, mibytes, gibytes, bytes, euro, usd.
- `xaxis` (Attributes) (see [below for nested schema](#nestedatt--layout--sections--rows--id--definition--pie_chart--xaxis))

<a id="nestedatt--layout--sections--rows--id--definition--pie_chart--query"></a>
Expand Down Expand Up @@ -1653,11 +1653,11 @@ Required:
Optional:

- `field` (String)
- `observation_field` (Attributes) (see [below for nested schema](#nestedatt--layout--sections--rows--id--definition--pie_chart--order_by--spans--grouping--group_bys--id--observation_field))
- `observation_field` (Attributes) (see [below for nested schema](#nestedatt--layout--sections--rows--id--definition--pie_chart--order_by--spans--grouping--group_bys--name--observation_field))
- `percent` (Number) The percentage of the aggregation to return. required when type is `percentile`.

<a id="nestedatt--layout--sections--rows--id--definition--pie_chart--order_by--spans--grouping--group_bys--id--observation_field"></a>
### Nested Schema for `layout.sections.rows.id.definition.pie_chart.order_by.spans.grouping.group_bys.id.percent`
<a id="nestedatt--layout--sections--rows--id--definition--pie_chart--order_by--spans--grouping--group_bys--name--observation_field"></a>
### Nested Schema for `layout.sections.rows.id.definition.pie_chart.order_by.spans.grouping.group_bys.name.percent`

Optional:

Expand Down Expand Up @@ -2137,7 +2137,7 @@ Optional:
- `scale_type` (String)
- `sort_by` (String)
- `stack_definition` (Attributes) (see [below for nested schema](#nestedatt--layout--sections--rows--id--definition--pie_chart--stack_definition))
- `unit` (String) The unit of the chart. Can be one of gbytes, bytes_iec, mibytes, unspecified, microseconds, milliseconds, mbytes, kibytes, gibytes, seconds, bytes, kbytes.
- `unit` (String) The unit of the chart. Can be one of unspecified, microseconds, seconds, bytes_iec, kibytes, milliseconds, gbytes, euro_cents, usd_cents, kbytes, mbytes, mibytes, gibytes, bytes, euro, usd.
- `y_axis_view_by` (String)

<a id="nestedatt--layout--sections--rows--id--definition--pie_chart--query"></a>
Expand Down Expand Up @@ -2390,7 +2390,7 @@ Optional:
- `scale_type` (String) The scale type. Valid values are: logarithmic, unspecified, linear.
- `series_count_limit` (Number)
- `series_name_template` (String)
- `unit` (String) The unit. Valid values are: gbytes, bytes_iec, mibytes, unspecified, microseconds, milliseconds, mbytes, kibytes, gibytes, seconds, bytes, kbytes.
- `unit` (String) The unit. Valid values are: unspecified, microseconds, seconds, bytes_iec, kibytes, milliseconds, gbytes, euro_cents, usd_cents, kbytes, mbytes, mibytes, gibytes, bytes, euro, usd.

Read-Only:

Expand Down Expand Up @@ -2493,7 +2493,7 @@ Optional:
Required:

- `metric` (String) Metric name to apply the filter on.
- `operator` (Attributes) Operator to use for filtering. (see [below for nested schema](#nestedatt--layout--sections--rows--id--definition--pie_chart--tooltip--id--metrics--promql_query--operator))
- `operator` (Attributes) Operator to use for filtering. (see [below for nested schema](#nestedatt--layout--sections--rows--id--definition--pie_chart--tooltip--id--metrics--filters--operator))

Optional:

Expand Down

0 comments on commit 5023153

Please sign in to comment.