Skip to content

Commit 2bff0f3

Browse files
Google APIscopybara-github
authored andcommitted
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
1 parent e936352 commit 2bff0f3

18 files changed

+303
-17
lines changed

google/monitoring/dashboard/v1/BUILD.bazel

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,30 @@ proto_library(
2222
name = "dashboard_proto",
2323
srcs = [
2424
"alertchart.proto",
25+
"collapsible_group.proto",
2526
"common.proto",
2627
"dashboard.proto",
28+
"dashboard_filter.proto",
2729
"dashboards_service.proto",
2830
"drilldowns.proto",
2931
"layouts.proto",
32+
"logs_panel.proto",
3033
"metrics.proto",
3134
"scorecard.proto",
3235
"service.proto",
36+
"table.proto",
37+
"table_display_options.proto",
3338
"text.proto",
3439
"widget.proto",
3540
"xychart.proto",
3641
],
3742
deps = [
3843
"//google/api:annotations_proto",
3944
"//google/api:client_proto",
40-
"//google/api:distribution_proto",
4145
"//google/api:field_behavior_proto",
4246
"//google/api:resource_proto",
4347
"@com_google_protobuf//:duration_proto",
4448
"@com_google_protobuf//:empty_proto",
45-
"@com_google_protobuf//:field_mask_proto",
4649
],
4750
)
4851

@@ -129,7 +132,6 @@ go_proto_library(
129132
protos = [":dashboard_proto"],
130133
deps = [
131134
"//google/api:annotations_go_proto",
132-
"//google/api:distribution_go_proto",
133135
],
134136
)
135137

@@ -371,7 +373,6 @@ cc_proto_library(
371373
cc_grpc_library(
372374
name = "dashboard_cc_grpc",
373375
srcs = [":dashboard_proto"],
374-
generate_mocks = True,
375376
grpc_only = True,
376377
deps = [":dashboard_cc_proto"],
377378
)

google/monitoring/dashboard/v1/alertchart.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.monitoring.dashboard.v1;
18+
19+
option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1";
20+
option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard";
21+
option java_multiple_files = true;
22+
option java_outer_classname = "CollapsibleGroupProto";
23+
option java_package = "com.google.monitoring.dashboard.v1";
24+
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
25+
option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
26+
27+
// A widget that groups the other widgets. All widgets that are within
28+
// the area spanned by the grouping widget are considered member widgets.
29+
message CollapsibleGroup {
30+
// The collapsed state of the widget on first page load.
31+
bool collapsed = 1;
32+
}

google/monitoring/dashboard/v1/common.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/monitoring/dashboard/v1/dashboard.proto

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@ package google.monitoring.dashboard.v1;
1818

1919
import "google/api/field_behavior.proto";
2020
import "google/api/resource.proto";
21+
import "google/monitoring/dashboard/v1/dashboard_filter.proto";
2122
import "google/monitoring/dashboard/v1/layouts.proto";
2223

2324
option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1";
@@ -69,4 +70,10 @@ message Dashboard {
6970
// arranged vertically.
7071
ColumnLayout column_layout = 9;
7172
}
73+
74+
// Filters to reduce the amount of data charted based on the filter criteria.
75+
repeated DashboardFilter dashboard_filters = 11;
76+
77+
// Labels applied to the dashboard
78+
map<string, string> labels = 12;
7279
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.monitoring.dashboard.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
21+
option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1";
22+
option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "DashboardFilterProto";
25+
option java_package = "com.google.monitoring.dashboard.v1";
26+
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
27+
option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
28+
29+
// A filter to reduce the amount of data charted in relevant widgets.
30+
message DashboardFilter {
31+
// The type for the dashboard filter
32+
enum FilterType {
33+
// Filter type is unspecified. This is not valid in a well-formed request.
34+
FILTER_TYPE_UNSPECIFIED = 0;
35+
36+
// Filter on a resource label value
37+
RESOURCE_LABEL = 1;
38+
39+
// Filter on a metrics label value
40+
METRIC_LABEL = 2;
41+
42+
// Filter on a user metadata label value
43+
USER_METADATA_LABEL = 3;
44+
45+
// Filter on a system metadata label value
46+
SYSTEM_METADATA_LABEL = 4;
47+
48+
// Filter on a group id
49+
GROUP = 5;
50+
}
51+
52+
// Required. The key for the label
53+
string label_key = 1 [(google.api.field_behavior) = REQUIRED];
54+
55+
// The placeholder text that can be referenced in a filter string or MQL
56+
// query. If omitted, the dashboard filter will be applied to all relevant
57+
// widgets in the dashboard.
58+
string template_variable = 3;
59+
60+
// The default value used in the filter comparison
61+
oneof default_value {
62+
// A variable-length string value.
63+
string string_value = 4;
64+
}
65+
66+
// The specified filter type
67+
FilterType filter_type = 5;
68+
}

google/monitoring/dashboard/v1/dashboards_service.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -17,11 +17,11 @@ syntax = "proto3";
1717
package google.monitoring.dashboard.v1;
1818

1919
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
2021
import "google/api/field_behavior.proto";
2122
import "google/api/resource.proto";
2223
import "google/monitoring/dashboard/v1/dashboard.proto";
2324
import "google/protobuf/empty.proto";
24-
import "google/api/client.proto";
2525

2626
option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1";
2727
option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard";

google/monitoring/dashboard/v1/drilldowns.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/monitoring/dashboard/v1/layouts.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.monitoring.dashboard.v1;
18+
19+
option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1";
20+
option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard";
21+
option java_multiple_files = true;
22+
option java_outer_classname = "LogsPanelProto";
23+
option java_package = "com.google.monitoring.dashboard.v1";
24+
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
25+
option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
26+
27+
// A widget that displays a stream of log.
28+
message LogsPanel {
29+
// A filter that chooses which log entries to return. See [Advanced Logs
30+
// Queries](https://cloud.google.com/logging/docs/view/advanced-queries).
31+
// Only log entries that match the filter are returned. An empty filter
32+
// matches all log entries.
33+
string filter = 1;
34+
35+
// The names of logging resources to collect logs for. Currently only projects
36+
// are supported. If empty, the widget will default to the host project.
37+
repeated string resource_names = 2;
38+
}

0 commit comments

Comments
 (0)