Skip to content

Commit 8aa8817

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add support for pie charts, incident lists, dropdown groups, error reporting panels, section headers, and styling options on text widgets
docs: updated some comments PiperOrigin-RevId: 605410874
1 parent 671deae commit 8aa8817

23 files changed

Lines changed: 475 additions & 30 deletions

google/monitoring/dashboard/v1/BUILD.bazel

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,16 @@ proto_library(
2828
"dashboard_filter.proto",
2929
"dashboards_service.proto",
3030
"drilldowns.proto",
31+
"error_reporting_panel.proto",
32+
"incident_list.proto",
3133
"layouts.proto",
3234
"logs_panel.proto",
3335
"metrics.proto",
36+
"piechart.proto",
3437
"scorecard.proto",
38+
"section_header.proto",
3539
"service.proto",
40+
"single_view_group.proto",
3641
"table.proto",
3742
"table_display_options.proto",
3843
"text.proto",
@@ -43,7 +48,9 @@ proto_library(
4348
"//google/api:annotations_proto",
4449
"//google/api:client_proto",
4550
"//google/api:field_behavior_proto",
51+
"//google/api:monitored_resource_proto",
4652
"//google/api:resource_proto",
53+
"//google/type:interval_proto",
4754
"@com_google_protobuf//:duration_proto",
4855
"@com_google_protobuf//:empty_proto",
4956
],
@@ -136,6 +143,8 @@ go_proto_library(
136143
protos = [":dashboard_proto"],
137144
deps = [
138145
"//google/api:annotations_go_proto",
146+
"//google/api:monitoredres_go_proto",
147+
"//google/type:interval_go_proto",
139148
],
140149
)
141150

@@ -151,6 +160,7 @@ go_gapic_library(
151160
transport = "grpc+rest",
152161
deps = [
153162
":dashboard_go_proto",
163+
"//google/api:monitoredres_go_proto",
154164
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
155165
],
156166
)
@@ -230,10 +240,13 @@ php_gapic_library(
230240
name = "dashboard_php_gapic",
231241
srcs = [":dashboard_proto_with_info"],
232242
grpc_service_config = "dashboards_grpc_service_config.json",
243+
migration_mode = "PRE_MIGRATION_SURFACE_ONLY",
233244
rest_numeric_enums = True,
234245
service_yaml = "monitoring.yaml",
235246
transport = "grpc+rest",
236-
deps = [":dashboard_php_proto"],
247+
deps = [
248+
":dashboard_php_proto",
249+
],
237250
)
238251

239252
# Open Source Packages

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 2022 Google LLC
1+
// Copyright 2023 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/collapsible_group.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 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/common.proto

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 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,6 +17,7 @@ syntax = "proto3";
1717
package google.monitoring.dashboard.v1;
1818

1919
import "google/protobuf/duration.proto";
20+
import "google/type/interval.proto";
2021

2122
option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1";
2223
option go_package = "cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb;dashboardpb";
@@ -425,6 +426,9 @@ message PickTimeSeriesFilter {
425426

426427
// How to use the ranking to select time series that pass through the filter.
427428
Direction direction = 3;
429+
430+
// Select the top N streams/time series within this time interval
431+
google.type.Interval interval = 4;
428432
}
429433

430434
// A filter that ranks streams based on their statistical relation to other

google/monitoring/dashboard/v1/dashboard.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 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.
@@ -37,8 +37,8 @@ message Dashboard {
3737
pattern: "projects/{project}/dashboards/{dashboard}"
3838
};
3939

40-
// Immutable. The resource name of the dashboard.
41-
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
40+
// Identifier. The resource name of the dashboard.
41+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
4242

4343
// Required. The mutable, human-readable name.
4444
string display_name = 2 [(google.api.field_behavior) = REQUIRED];

google/monitoring/dashboard/v1/dashboard_filter.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 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/dashboards_service.proto

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 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.
@@ -52,6 +52,7 @@ service DashboardsService {
5252
post: "/v1/{parent=projects/*}/dashboards"
5353
body: "dashboard"
5454
};
55+
option (google.api.method_signature) = "parent,dashboard";
5556
}
5657

5758
// Lists the existing dashboards.
@@ -63,6 +64,7 @@ service DashboardsService {
6364
option (google.api.http) = {
6465
get: "/v1/{parent=projects/*}/dashboards"
6566
};
67+
option (google.api.method_signature) = "parent";
6668
}
6769

6870
// Fetches a specific dashboard.
@@ -74,6 +76,7 @@ service DashboardsService {
7476
option (google.api.http) = {
7577
get: "/v1/{name=projects/*/dashboards/*}"
7678
};
79+
option (google.api.method_signature) = "name";
7780
}
7881

7982
// Deletes an existing custom dashboard.
@@ -85,6 +88,7 @@ service DashboardsService {
8588
option (google.api.http) = {
8689
delete: "/v1/{name=projects/*/dashboards/*}"
8790
};
91+
option (google.api.method_signature) = "name";
8892
}
8993

9094
// Replaces an existing custom dashboard with a new definition.
@@ -107,7 +111,12 @@ message CreateDashboardRequest {
107111
// projects/[PROJECT_ID_OR_NUMBER]
108112
//
109113
// The `[PROJECT_ID_OR_NUMBER]` must match the dashboard resource name.
110-
string parent = 1 [(google.api.field_behavior) = REQUIRED];
114+
string parent = 1 [
115+
(google.api.field_behavior) = REQUIRED,
116+
(google.api.resource_reference) = {
117+
type: "cloudresourcemanager.googleapis.com/Project"
118+
}
119+
];
111120

112121
// Required. The initial dashboard specification.
113122
Dashboard dashboard = 2 [(google.api.field_behavior) = REQUIRED];
@@ -133,10 +142,11 @@ message ListDashboardsRequest {
133142
// If unspecified, a default of 1000 is used.
134143
int32 page_size = 2;
135144

136-
// If this field is not empty then it must contain the `nextPageToken` value
137-
// returned by a previous call to this method. Using this field causes the
138-
// method to return additional results from the previous method call.
139-
string page_token = 3;
145+
// Optional. If this field is not empty then it must contain the
146+
// `nextPageToken` value returned by a previous call to this method. Using
147+
// this field causes the method to return additional results from the previous
148+
// method call.
149+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
140150
}
141151

142152
// The `ListDashboards` request.

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 2022 Google LLC
1+
// Copyright 2023 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: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Copyright 2023 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 = "cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb;dashboardpb";
21+
option java_multiple_files = true;
22+
option java_outer_classname = "ErrorReportingPanelProto";
23+
option java_package = "com.google.monitoring.dashboard.v1";
24+
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
25+
26+
// A widget that displays a list of error groups.
27+
message ErrorReportingPanel {
28+
// The resource name of the Google Cloud Platform project. Written
29+
// as `projects/{projectID}` or `projects/{projectNumber}`, where
30+
// `{projectID}` and `{projectNumber}` can be found in the
31+
// [Google Cloud console](https://support.google.com/cloud/answer/6158840).
32+
//
33+
// Examples: `projects/my-project-123`, `projects/5551234`.
34+
repeated string project_names = 1;
35+
36+
// An identifier of the service, such as the name of the
37+
// executable, job, or Google App Engine service name. This field is expected
38+
// to have a low number of values that are relatively stable over time, as
39+
// opposed to `version`, which can be changed whenever new code is deployed.
40+
//
41+
// Contains the service name for error reports extracted from Google
42+
// App Engine logs or `default` if the App Engine default service is used.
43+
repeated string services = 2;
44+
45+
// Represents the source code version that the developer provided,
46+
// which could represent a version label or a Git SHA-1 hash, for example.
47+
// For App Engine standard environment, the version is set to the version of
48+
// the app.
49+
repeated string versions = 3;
50+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright 2023 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+
import "google/api/monitored_resource.proto";
21+
22+
option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1";
23+
option go_package = "cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb;dashboardpb";
24+
option java_multiple_files = true;
25+
option java_outer_classname = "IncidentListProto";
26+
option java_package = "com.google.monitoring.dashboard.v1";
27+
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
28+
option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
29+
30+
// A widget that displays a list of incidents
31+
message IncidentList {
32+
// Optional. The monitored resource for which incidents are listed.
33+
// The resource doesn't need to be fully specified. That is, you can specify
34+
// the resource type but not the values of the resource labels.
35+
// The resource type and labels are used for filtering.
36+
repeated google.api.MonitoredResource monitored_resources = 1
37+
[(google.api.field_behavior) = OPTIONAL];
38+
39+
// Optional. A list of alert policy names to filter the incident list by.
40+
// Don't include the project ID prefix in the policy name. For
41+
// example, use `alertPolicies/utilization`.
42+
repeated string policy_names = 2 [(google.api.field_behavior) = OPTIONAL];
43+
}

0 commit comments

Comments
 (0)