Skip to content

Commit 83f7892

Browse files
feat: add CollapsibleGroup, DashboardFilter, LogsPanel, TableDisplayOptions, TimeSeriesTable (#175)
* fix: fix type in docstring for map fields PiperOrigin-RevId: 440107808 Source-Link: googleapis/googleapis@258ddb2 Source-Link: googleapis/googleapis-gen@df0d09a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGYwZDA5YTJjMzZmZjViYWY5ODY0OGVlZmU1MDI5YzE3MzkwNWQwYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Sync public protos with latests public api state. This adds support for collapsible groups, filters, labels, drilldowns, logs panels and tables PiperOrigin-RevId: 440139643 Source-Link: googleapis/googleapis@2bff0f3 Source-Link: googleapis/googleapis-gen@8c92aa7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGM5MmFhNzc0NjZhMWZlNTAxNmUyNWQ4MDZkZDRlYjQ1YjYyZTVhMiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 69fd2f0 commit 83f7892

File tree

15 files changed

+516
-24
lines changed

15 files changed

+516
-24
lines changed

packages/google-cloud-monitoring-dashboards/google/cloud/monitoring_dashboard/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@
2222
)
2323

2424
from google.cloud.monitoring_dashboard_v1.types.alertchart import AlertChart
25+
from google.cloud.monitoring_dashboard_v1.types.collapsible_group import (
26+
CollapsibleGroup,
27+
)
2528
from google.cloud.monitoring_dashboard_v1.types.common import Aggregation
2629
from google.cloud.monitoring_dashboard_v1.types.common import PickTimeSeriesFilter
2730
from google.cloud.monitoring_dashboard_v1.types.common import (
2831
StatisticalTimeSeriesFilter,
2932
)
3033
from google.cloud.monitoring_dashboard_v1.types.dashboard import Dashboard
34+
from google.cloud.monitoring_dashboard_v1.types.dashboard_filter import DashboardFilter
3135
from google.cloud.monitoring_dashboard_v1.types.dashboards_service import (
3236
CreateDashboardRequest,
3337
)
@@ -50,12 +54,17 @@
5054
from google.cloud.monitoring_dashboard_v1.types.layouts import GridLayout
5155
from google.cloud.monitoring_dashboard_v1.types.layouts import MosaicLayout
5256
from google.cloud.monitoring_dashboard_v1.types.layouts import RowLayout
57+
from google.cloud.monitoring_dashboard_v1.types.logs_panel import LogsPanel
5358
from google.cloud.monitoring_dashboard_v1.types.metrics import Threshold
5459
from google.cloud.monitoring_dashboard_v1.types.metrics import TimeSeriesFilter
5560
from google.cloud.monitoring_dashboard_v1.types.metrics import TimeSeriesFilterRatio
5661
from google.cloud.monitoring_dashboard_v1.types.metrics import TimeSeriesQuery
5762
from google.cloud.monitoring_dashboard_v1.types.metrics import SparkChartType
5863
from google.cloud.monitoring_dashboard_v1.types.scorecard import Scorecard
64+
from google.cloud.monitoring_dashboard_v1.types.table import TimeSeriesTable
65+
from google.cloud.monitoring_dashboard_v1.types.table_display_options import (
66+
TableDisplayOptions,
67+
)
5968
from google.cloud.monitoring_dashboard_v1.types.text import Text
6069
from google.cloud.monitoring_dashboard_v1.types.widget import Widget
6170
from google.cloud.monitoring_dashboard_v1.types.xychart import ChartOptions
@@ -65,10 +74,12 @@
6574
"DashboardsServiceClient",
6675
"DashboardsServiceAsyncClient",
6776
"AlertChart",
77+
"CollapsibleGroup",
6878
"Aggregation",
6979
"PickTimeSeriesFilter",
7080
"StatisticalTimeSeriesFilter",
7181
"Dashboard",
82+
"DashboardFilter",
7283
"CreateDashboardRequest",
7384
"DeleteDashboardRequest",
7485
"GetDashboardRequest",
@@ -79,12 +90,15 @@
7990
"GridLayout",
8091
"MosaicLayout",
8192
"RowLayout",
93+
"LogsPanel",
8294
"Threshold",
8395
"TimeSeriesFilter",
8496
"TimeSeriesFilterRatio",
8597
"TimeSeriesQuery",
8698
"SparkChartType",
8799
"Scorecard",
100+
"TimeSeriesTable",
101+
"TableDisplayOptions",
88102
"Text",
89103
"Widget",
90104
"ChartOptions",

packages/google-cloud-monitoring-dashboards/google/cloud/monitoring_dashboard_v1/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
from .services.dashboards_service import DashboardsServiceAsyncClient
1919

2020
from .types.alertchart import AlertChart
21+
from .types.collapsible_group import CollapsibleGroup
2122
from .types.common import Aggregation
2223
from .types.common import PickTimeSeriesFilter
2324
from .types.common import StatisticalTimeSeriesFilter
2425
from .types.dashboard import Dashboard
26+
from .types.dashboard_filter import DashboardFilter
2527
from .types.dashboards_service import CreateDashboardRequest
2628
from .types.dashboards_service import DeleteDashboardRequest
2729
from .types.dashboards_service import GetDashboardRequest
@@ -32,12 +34,15 @@
3234
from .types.layouts import GridLayout
3335
from .types.layouts import MosaicLayout
3436
from .types.layouts import RowLayout
37+
from .types.logs_panel import LogsPanel
3538
from .types.metrics import Threshold
3639
from .types.metrics import TimeSeriesFilter
3740
from .types.metrics import TimeSeriesFilterRatio
3841
from .types.metrics import TimeSeriesQuery
3942
from .types.metrics import SparkChartType
4043
from .types.scorecard import Scorecard
44+
from .types.table import TimeSeriesTable
45+
from .types.table_display_options import TableDisplayOptions
4146
from .types.text import Text
4247
from .types.widget import Widget
4348
from .types.xychart import ChartOptions
@@ -48,26 +53,31 @@
4853
"Aggregation",
4954
"AlertChart",
5055
"ChartOptions",
56+
"CollapsibleGroup",
5157
"ColumnLayout",
5258
"CreateDashboardRequest",
5359
"Dashboard",
60+
"DashboardFilter",
5461
"DashboardsServiceClient",
5562
"DeleteDashboardRequest",
5663
"GetDashboardRequest",
5764
"GridLayout",
5865
"ListDashboardsRequest",
5966
"ListDashboardsResponse",
67+
"LogsPanel",
6068
"MosaicLayout",
6169
"PickTimeSeriesFilter",
6270
"RowLayout",
6371
"Scorecard",
6472
"SparkChartType",
6573
"StatisticalTimeSeriesFilter",
74+
"TableDisplayOptions",
6675
"Text",
6776
"Threshold",
6877
"TimeSeriesFilter",
6978
"TimeSeriesFilterRatio",
7079
"TimeSeriesQuery",
80+
"TimeSeriesTable",
7181
"UpdateDashboardRequest",
7282
"Widget",
7383
"XyChart",

packages/google-cloud-monitoring-dashboards/google/cloud/monitoring_dashboard_v1/services/dashboards_service/async_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
from google.cloud.monitoring_dashboard_v1.services.dashboards_service import pagers
3535
from google.cloud.monitoring_dashboard_v1.types import dashboard
36+
from google.cloud.monitoring_dashboard_v1.types import dashboard_filter
3637
from google.cloud.monitoring_dashboard_v1.types import dashboards_service
3738
from google.cloud.monitoring_dashboard_v1.types import layouts
3839
from .transports.base import DashboardsServiceTransport, DEFAULT_CLIENT_INFO

packages/google-cloud-monitoring-dashboards/google/cloud/monitoring_dashboard_v1/services/dashboards_service/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
from google.cloud.monitoring_dashboard_v1.services.dashboards_service import pagers
3838
from google.cloud.monitoring_dashboard_v1.types import dashboard
39+
from google.cloud.monitoring_dashboard_v1.types import dashboard_filter
3940
from google.cloud.monitoring_dashboard_v1.types import dashboards_service
4041
from google.cloud.monitoring_dashboard_v1.types import layouts
4142
from .transports.base import DashboardsServiceTransport, DEFAULT_CLIENT_INFO

packages/google-cloud-monitoring-dashboards/google/cloud/monitoring_dashboard_v1/types/__init__.py

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,23 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from .alertchart import AlertChart
16+
from .alertchart import (
17+
AlertChart,
18+
)
19+
from .collapsible_group import (
20+
CollapsibleGroup,
21+
)
1722
from .common import (
1823
Aggregation,
1924
PickTimeSeriesFilter,
2025
StatisticalTimeSeriesFilter,
2126
)
22-
from .dashboard import Dashboard
27+
from .dashboard import (
28+
Dashboard,
29+
)
30+
from .dashboard_filter import (
31+
DashboardFilter,
32+
)
2333
from .dashboards_service import (
2434
CreateDashboardRequest,
2535
DeleteDashboardRequest,
@@ -34,27 +44,44 @@
3444
MosaicLayout,
3545
RowLayout,
3646
)
47+
from .logs_panel import (
48+
LogsPanel,
49+
)
3750
from .metrics import (
3851
Threshold,
3952
TimeSeriesFilter,
4053
TimeSeriesFilterRatio,
4154
TimeSeriesQuery,
4255
SparkChartType,
4356
)
44-
from .scorecard import Scorecard
45-
from .text import Text
46-
from .widget import Widget
57+
from .scorecard import (
58+
Scorecard,
59+
)
60+
from .table import (
61+
TimeSeriesTable,
62+
)
63+
from .table_display_options import (
64+
TableDisplayOptions,
65+
)
66+
from .text import (
67+
Text,
68+
)
69+
from .widget import (
70+
Widget,
71+
)
4772
from .xychart import (
4873
ChartOptions,
4974
XyChart,
5075
)
5176

5277
__all__ = (
5378
"AlertChart",
79+
"CollapsibleGroup",
5480
"Aggregation",
5581
"PickTimeSeriesFilter",
5682
"StatisticalTimeSeriesFilter",
5783
"Dashboard",
84+
"DashboardFilter",
5885
"CreateDashboardRequest",
5986
"DeleteDashboardRequest",
6087
"GetDashboardRequest",
@@ -65,12 +92,15 @@
6592
"GridLayout",
6693
"MosaicLayout",
6794
"RowLayout",
95+
"LogsPanel",
6896
"Threshold",
6997
"TimeSeriesFilter",
7098
"TimeSeriesFilterRatio",
7199
"TimeSeriesQuery",
72100
"SparkChartType",
73101
"Scorecard",
102+
"TimeSeriesTable",
103+
"TableDisplayOptions",
74104
"Text",
75105
"Widget",
76106
"ChartOptions",
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
import proto # type: ignore
17+
18+
19+
__protobuf__ = proto.module(
20+
package="google.monitoring.dashboard.v1",
21+
manifest={
22+
"CollapsibleGroup",
23+
},
24+
)
25+
26+
27+
class CollapsibleGroup(proto.Message):
28+
r"""A widget that groups the other widgets. All widgets that are
29+
within the area spanned by the grouping widget are considered
30+
member widgets.
31+
32+
Attributes:
33+
collapsed (bool):
34+
The collapsed state of the widget on first
35+
page load.
36+
"""
37+
38+
collapsed = proto.Field(
39+
proto.BOOL,
40+
number=1,
41+
)
42+
43+
44+
__all__ = tuple(sorted(__protobuf__.manifest))

packages/google-cloud-monitoring-dashboards/google/cloud/monitoring_dashboard_v1/types/dashboard.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#
1616
import proto # type: ignore
1717

18+
from google.cloud.monitoring_dashboard_v1.types import dashboard_filter
1819
from google.cloud.monitoring_dashboard_v1.types import layouts
1920

2021

@@ -74,6 +75,11 @@ class Dashboard(proto.Message):
7475
columns and the widgets are arranged vertically.
7576
7677
This field is a member of `oneof`_ ``layout``.
78+
dashboard_filters (Sequence[google.cloud.monitoring_dashboard_v1.types.DashboardFilter]):
79+
Filters to reduce the amount of data charted
80+
based on the filter criteria.
81+
labels (Mapping[str, str]):
82+
Labels applied to the dashboard
7783
"""
7884

7985
name = proto.Field(
@@ -112,6 +118,16 @@ class Dashboard(proto.Message):
112118
oneof="layout",
113119
message=layouts.ColumnLayout,
114120
)
121+
dashboard_filters = proto.RepeatedField(
122+
proto.MESSAGE,
123+
number=11,
124+
message=dashboard_filter.DashboardFilter,
125+
)
126+
labels = proto.MapField(
127+
proto.STRING,
128+
proto.STRING,
129+
number=12,
130+
)
115131

116132

117133
__all__ = tuple(sorted(__protobuf__.manifest))
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
import proto # type: ignore
17+
18+
19+
__protobuf__ = proto.module(
20+
package="google.monitoring.dashboard.v1",
21+
manifest={
22+
"DashboardFilter",
23+
},
24+
)
25+
26+
27+
class DashboardFilter(proto.Message):
28+
r"""A filter to reduce the amount of data charted in relevant
29+
widgets.
30+
31+
32+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
33+
34+
Attributes:
35+
label_key (str):
36+
Required. The key for the label
37+
template_variable (str):
38+
The placeholder text that can be referenced
39+
in a filter string or MQL query. If omitted, the
40+
dashboard filter will be applied to all relevant
41+
widgets in the dashboard.
42+
string_value (str):
43+
A variable-length string value.
44+
45+
This field is a member of `oneof`_ ``default_value``.
46+
filter_type (google.cloud.monitoring_dashboard_v1.types.DashboardFilter.FilterType):
47+
The specified filter type
48+
"""
49+
50+
class FilterType(proto.Enum):
51+
r"""The type for the dashboard filter"""
52+
FILTER_TYPE_UNSPECIFIED = 0
53+
RESOURCE_LABEL = 1
54+
METRIC_LABEL = 2
55+
USER_METADATA_LABEL = 3
56+
SYSTEM_METADATA_LABEL = 4
57+
GROUP = 5
58+
59+
label_key = proto.Field(
60+
proto.STRING,
61+
number=1,
62+
)
63+
template_variable = proto.Field(
64+
proto.STRING,
65+
number=3,
66+
)
67+
string_value = proto.Field(
68+
proto.STRING,
69+
number=4,
70+
oneof="default_value",
71+
)
72+
filter_type = proto.Field(
73+
proto.ENUM,
74+
number=5,
75+
enum=FilterType,
76+
)
77+
78+
79+
__all__ = tuple(sorted(__protobuf__.manifest))

0 commit comments

Comments
 (0)