From e42f66023eb8b1ab344da400028dc323e26eaa61 Mon Sep 17 00:00:00 2001 From: justinsb Date: Tue, 18 Jun 2024 14:52:58 -0400 Subject: [PATCH] chore: testdata for MonitoringDashboard including export --- ...ted_export_monitoringdashboardbasic.golden | 3 +- ...bject_monitoringdashboardbasic.golden.yaml | 3 +- .../monitoringdashboardbasic/_http.log | 27 +- .../monitoringdashboardbasic/create.yaml | 6 +- .../monitoringdashboardbasic/update.yaml | 3 +- ...ated_export_monitoringdashboardfull.golden | 48 +++ ...object_monitoringdashboardfull.golden.yaml | 66 ++++ .../monitoringdashboardfull/_http.log | 315 ++++++++++++++++++ .../monitoringdashboardfull/create.yaml | 59 ++++ ...ated_export_monitoringdashboardrefs.golden | 1 - ...object_monitoringdashboardrefs.golden.yaml | 1 - .../monitoringdashboardrefs/_http.log | 6 - .../monitoringdashboardrefs/create.yaml | 1 - .../monitoringdashboardrefs/update.yaml | 1 - 14 files changed, 506 insertions(+), 34 deletions(-) create mode 100644 pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/_generated_export_monitoringdashboardfull.golden create mode 100644 pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/_generated_object_monitoringdashboardfull.golden.yaml create mode 100644 pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/_http.log create mode 100644 pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/create.yaml diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_generated_export_monitoringdashboardbasic.golden b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_generated_export_monitoringdashboardbasic.golden index b0ed8ee54e6..bbe56ec3d1f 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_generated_export_monitoringdashboardbasic.golden +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_generated_export_monitoringdashboardbasic.golden @@ -27,14 +27,13 @@ spec: - title: Widget 3 xyChart: dataSets: - - plotType: STACKED_BAR + - plotType: LINE timeSeriesQuery: timeSeriesFilter: aggregation: perSeriesAligner: ALIGN_RATE filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count" unitOverride: "1" - timeshiftDuration: "" yAxis: label: y1Axis scale: LINEAR diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_generated_object_monitoringdashboardbasic.golden.yaml b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_generated_object_monitoringdashboardbasic.golden.yaml index 81e1f8d473b..2899418d31f 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_generated_object_monitoringdashboardbasic.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_generated_object_monitoringdashboardbasic.golden.yaml @@ -36,14 +36,13 @@ spec: - title: Widget 3 xyChart: dataSets: - - plotType: STACKED_BAR + - plotType: LINE timeSeriesQuery: timeSeriesFilter: aggregation: perSeriesAligner: ALIGN_RATE filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count" unitOverride: "1" - timeshiftDuration: 0s yAxis: label: y1Axis scale: LINEAR diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_http.log b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_http.log index a81a02ff3ac..c669dd807f5 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/_http.log @@ -52,7 +52,7 @@ x-goog-request-params: parent=projects%2F${projectId} } } ], - "timeshiftDuration": "0s", + "timeshiftDuration": "100s", "yAxis": { "label": "y1Axis", "scale": 1 @@ -70,7 +70,7 @@ x-goog-request-params: parent=projects%2F${projectId} "xyChart": { "dataSets": [ { - "plotType": 3, + "plotType": 1, "timeSeriesQuery": { "timeSeriesFilter": { "aggregation": { @@ -82,7 +82,7 @@ x-goog-request-params: parent=projects%2F${projectId} } } ], - "timeshiftDuration": "0s", + "timeshiftDuration": "60s", "yAxis": { "label": "y1Axis", "scale": 1 @@ -141,7 +141,7 @@ X-Xss-Protection: 0 } } ], - "timeshiftDuration": "0s", + "timeshiftDuration": "100s", "yAxis": { "label": "y1Axis", "scale": "LINEAR" @@ -160,7 +160,7 @@ X-Xss-Protection: 0 "xyChart": { "dataSets": [ { - "plotType": "STACKED_BAR", + "plotType": "LINE", "targetAxis": "Y1", "timeSeriesQuery": { "timeSeriesFilter": { @@ -173,7 +173,7 @@ X-Xss-Protection: 0 } } ], - "timeshiftDuration": "0s", + "timeshiftDuration": "60s", "yAxis": { "label": "y1Axis", "scale": "LINEAR" @@ -240,7 +240,7 @@ X-Xss-Protection: 0 } } ], - "timeshiftDuration": "0s", + "timeshiftDuration": "100s", "yAxis": { "label": "y1Axis", "scale": "LINEAR" @@ -259,7 +259,7 @@ X-Xss-Protection: 0 "xyChart": { "dataSets": [ { - "plotType": "STACKED_BAR", + "plotType": "LINE", "targetAxis": "Y1", "timeSeriesQuery": { "timeSeriesFilter": { @@ -272,7 +272,7 @@ X-Xss-Protection: 0 } } ], - "timeshiftDuration": "0s", + "timeshiftDuration": "60s", "yAxis": { "label": "y1Axis", "scale": "LINEAR" @@ -345,7 +345,7 @@ x-goog-request-params: dashboard.name=projects%2F${projectId}%2Fdashboards%2Fmon "xyChart": { "dataSets": [ { - "plotType": 3, + "plotType": 1, "timeSeriesQuery": { "timeSeriesFilter": { "aggregation": { @@ -357,7 +357,6 @@ x-goog-request-params: dashboard.name=projects%2F${projectId}%2Fdashboards%2Fmon } } ], - "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", "scale": 1 @@ -432,7 +431,7 @@ X-Xss-Protection: 0 "xyChart": { "dataSets": [ { - "plotType": "STACKED_BAR", + "plotType": "LINE", "targetAxis": "Y1", "timeSeriesQuery": { "timeSeriesFilter": { @@ -445,7 +444,6 @@ X-Xss-Protection: 0 } } ], - "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", "scale": "LINEAR" @@ -528,7 +526,7 @@ X-Xss-Protection: 0 "xyChart": { "dataSets": [ { - "plotType": "STACKED_BAR", + "plotType": "LINE", "targetAxis": "Y1", "timeSeriesQuery": { "timeSeriesFilter": { @@ -541,7 +539,6 @@ X-Xss-Protection: 0 } } ], - "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", "scale": "LINEAR" diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/create.yaml b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/create.yaml index 812543a9eb8..c3f07e130f5 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/create.yaml @@ -32,7 +32,7 @@ spec: perSeriesAligner: "ALIGN_RATE" unitOverride: "1" plotType: LINE - timeshiftDuration: 0s + timeshiftDuration: 100s yAxis: label: y1Axis scale: LINEAR @@ -48,8 +48,8 @@ spec: aggregation: perSeriesAligner: ALIGN_RATE unitOverride: "1" - plotType: "STACKED_BAR" - timeshiftDuration: 0s + plotType: "LINE" + timeshiftDuration: 60s yAxis: label: y1Axis scale: LINEAR diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/update.yaml b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/update.yaml index 6b5d4d9b646..85e5ca13e94 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/update.yaml +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardbasic/update.yaml @@ -48,8 +48,7 @@ spec: aggregation: perSeriesAligner: ALIGN_RATE unitOverride: "1" - plotType: "STACKED_BAR" - timeshiftDuration: 0s + plotType: "LINE" yAxis: label: y1Axis scale: LINEAR diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/_generated_export_monitoringdashboardfull.golden b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/_generated_export_monitoringdashboardfull.golden new file mode 100644 index 00000000000..b78484894e5 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/_generated_export_monitoringdashboardfull.golden @@ -0,0 +1,48 @@ +apiVersion: monitoring.cnrm.cloud.google.com/v1beta1 +kind: MonitoringDashboard +metadata: + name: monitoringdashboard-${uniqueId} +spec: + columnLayout: + columns: + - weight: 2 + widgets: + - title: Widget 1 + xyChart: + dataSets: + - plotType: LINE + timeSeriesQuery: + timeSeriesFilter: + aggregation: + perSeriesAligner: ALIGN_RATE + filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count" + unitOverride: "1" + timeshiftDuration: 600.5s + yAxis: + label: y1Axis + scale: LINEAR + - text: + content: Widget 2 + format: MARKDOWN + - title: Widget 3 + xyChart: + dataSets: + - plotType: STACKED_BAR + timeSeriesQuery: + timeSeriesFilter: + aggregation: + perSeriesAligner: ALIGN_RATE + filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count" + unitOverride: "1" + yAxis: + label: y1Axis + scale: LINEAR + - logsPanel: + filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count" + resourceNames: + - external: projects/${projectId} + kind: Project + title: Widget 4 + displayName: monitoringdashboard-full + projectRef: + external: ${projectId} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/_generated_object_monitoringdashboardfull.golden.yaml b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/_generated_object_monitoringdashboardfull.golden.yaml new file mode 100644 index 00000000000..bb77be910a3 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/_generated_object_monitoringdashboardfull.golden.yaml @@ -0,0 +1,66 @@ +apiVersion: monitoring.cnrm.cloud.google.com/v1beta1 +kind: MonitoringDashboard +metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 2 + labels: + cnrm-test: "true" + name: monitoringdashboard-${uniqueId} + namespace: ${uniqueId} +spec: + columnLayout: + columns: + - weight: 2 + widgets: + - title: Widget 1 + xyChart: + dataSets: + - plotType: LINE + timeSeriesQuery: + timeSeriesFilter: + aggregation: + perSeriesAligner: ALIGN_RATE + filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count" + unitOverride: "1" + timeshiftDuration: 600.500s + yAxis: + label: y1Axis + scale: LINEAR + - text: + content: Widget 2 + format: MARKDOWN + - title: Widget 3 + xyChart: + dataSets: + - plotType: STACKED_BAR + timeSeriesQuery: + timeSeriesFilter: + aggregation: + perSeriesAligner: ALIGN_RATE + filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count" + unitOverride: "1" + yAxis: + label: y1Axis + scale: LINEAR + - logsPanel: + filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count" + resourceNames: + - external: projects/${projectId} + title: Widget 4 + displayName: monitoringdashboard-full + projectRef: + external: ${projectId} + resourceID: monitoringdashboard-${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + etag: abcdef123456 + observedGeneration: 2 diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/_http.log b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/_http.log new file mode 100644 index 00000000000..04691b8a383 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/_http.log @@ -0,0 +1,315 @@ +GET https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdashboards%2Fmonitoringdashboard-${uniqueId} + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "message": "Requested entity was not found.", + "status": "NOT_FOUND" + } +} + +--- + +POST https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards?%24alt=json%3Benum-encoding%3Dint +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: parent=projects%2F${projectId} + +{ + "columnLayout": { + "columns": [ + { + "weight": "2", + "widgets": [ + { + "title": "Widget 1", + "xyChart": { + "dataSets": [ + { + "plotType": 1, + "timeSeriesQuery": { + "timeSeriesFilter": { + "aggregation": { + "perSeriesAligner": 2 + }, + "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" + }, + "unitOverride": "1" + } + } + ], + "timeshiftDuration": "600.500s", + "yAxis": { + "label": "y1Axis", + "scale": 1 + } + } + }, + { + "text": { + "content": "Widget 2", + "format": 1 + } + }, + { + "title": "Widget 3", + "xyChart": { + "dataSets": [ + { + "plotType": 3, + "timeSeriesQuery": { + "timeSeriesFilter": { + "aggregation": { + "perSeriesAligner": 2 + }, + "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" + }, + "unitOverride": "1" + } + } + ], + "yAxis": { + "label": "y1Axis", + "scale": 1 + } + } + }, + { + "logsPanel": { + "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"", + "resourceNames": [ + "projects/${projectId}" + ] + }, + "title": "Widget 4" + } + ] + } + ] + }, + "displayName": "monitoringdashboard-full", + "name": "projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "columnLayout": { + "columns": [ + { + "weight": "2", + "widgets": [ + { + "title": "Widget 1", + "xyChart": { + "dataSets": [ + { + "plotType": "LINE", + "targetAxis": "Y1", + "timeSeriesQuery": { + "timeSeriesFilter": { + "aggregation": { + "perSeriesAligner": "ALIGN_RATE" + }, + "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" + }, + "unitOverride": "1" + } + } + ], + "timeshiftDuration": "600.500s", + "yAxis": { + "label": "y1Axis", + "scale": "LINEAR" + } + } + }, + { + "text": { + "content": "Widget 2", + "format": "MARKDOWN", + "style": {} + } + }, + { + "title": "Widget 3", + "xyChart": { + "dataSets": [ + { + "plotType": "STACKED_BAR", + "targetAxis": "Y1", + "timeSeriesQuery": { + "timeSeriesFilter": { + "aggregation": { + "perSeriesAligner": "ALIGN_RATE" + }, + "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" + }, + "unitOverride": "1" + } + } + ], + "yAxis": { + "label": "y1Axis", + "scale": "LINEAR" + } + } + }, + { + "logsPanel": { + "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"", + "resourceNames": [ + "projects/${projectId}" + ] + }, + "title": "Widget 4" + } + ] + } + ] + }, + "displayName": "monitoringdashboard-full", + "etag": "abcdef0123A=", + "name": "projects/${projectNumber}/dashboards/monitoringdashboard-${uniqueId}" +} + +--- + +GET https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdashboards%2Fmonitoringdashboard-${uniqueId} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "columnLayout": { + "columns": [ + { + "weight": "2", + "widgets": [ + { + "title": "Widget 1", + "xyChart": { + "dataSets": [ + { + "plotType": "LINE", + "targetAxis": "Y1", + "timeSeriesQuery": { + "timeSeriesFilter": { + "aggregation": { + "perSeriesAligner": "ALIGN_RATE" + }, + "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" + }, + "unitOverride": "1" + } + } + ], + "timeshiftDuration": "600.500s", + "yAxis": { + "label": "y1Axis", + "scale": "LINEAR" + } + } + }, + { + "text": { + "content": "Widget 2", + "format": "MARKDOWN", + "style": {} + } + }, + { + "title": "Widget 3", + "xyChart": { + "dataSets": [ + { + "plotType": "STACKED_BAR", + "targetAxis": "Y1", + "timeSeriesQuery": { + "timeSeriesFilter": { + "aggregation": { + "perSeriesAligner": "ALIGN_RATE" + }, + "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"" + }, + "unitOverride": "1" + } + } + ], + "yAxis": { + "label": "y1Axis", + "scale": "LINEAR" + } + } + }, + { + "logsPanel": { + "filter": "metric.type=\"agent.googleapis.com/nginx/connections/accepted_count\"", + "resourceNames": [ + "projects/${projectId}" + ] + }, + "title": "Widget 4" + } + ] + } + ] + }, + "displayName": "monitoringdashboard-full", + "etag": "abcdef0123A=", + "name": "projects/${projectNumber}/dashboards/monitoringdashboard-${uniqueId}" +} + +--- + +DELETE https://monitoring.googleapis.com/v1/projects/${projectId}/dashboards/monitoringdashboard-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdashboards%2Fmonitoringdashboard-${uniqueId} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/create.yaml b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/create.yaml new file mode 100644 index 00000000000..57d88c03baa --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardfull/create.yaml @@ -0,0 +1,59 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: monitoring.cnrm.cloud.google.com/v1beta1 +kind: MonitoringDashboard +metadata: + name: monitoringdashboard-${uniqueId} +spec: + displayName: "monitoringdashboard-full" + columnLayout: + columns: + - weight: 2 + widgets: + - title: "Widget 1" + xyChart: + dataSets: + - timeSeriesQuery: + timeSeriesFilter: + filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count" + aggregation: + perSeriesAligner: "ALIGN_RATE" + unitOverride: "1" + plotType: LINE + timeshiftDuration: 600.500s + yAxis: + label: y1Axis + scale: LINEAR + - text: + content: "Widget 2" + format: "MARKDOWN" + - title: "Widget 3" + xyChart: + dataSets: + - timeSeriesQuery: + timeSeriesFilter: + filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count" + aggregation: + perSeriesAligner: ALIGN_RATE + unitOverride: "1" + plotType: "STACKED_BAR" + yAxis: + label: y1Axis + scale: LINEAR + - title: "Widget 4" + logsPanel: + filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count" + resourceNames: + - external: "projects/${projectId}" diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_generated_export_monitoringdashboardrefs.golden b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_generated_export_monitoringdashboardrefs.golden index 154c7dce417..f7ff2add8ff 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_generated_export_monitoringdashboardrefs.golden +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_generated_export_monitoringdashboardrefs.golden @@ -34,7 +34,6 @@ spec: perSeriesAligner: ALIGN_RATE filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count" unitOverride: "1" - timeshiftDuration: "" yAxis: label: y1Axis scale: LINEAR diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_generated_object_monitoringdashboardrefs.golden.yaml b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_generated_object_monitoringdashboardrefs.golden.yaml index f3ebe5fcc7a..2b0f27ce42f 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_generated_object_monitoringdashboardrefs.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_generated_object_monitoringdashboardrefs.golden.yaml @@ -43,7 +43,6 @@ spec: perSeriesAligner: ALIGN_RATE filter: metric.type="agent.googleapis.com/nginx/connections/accepted_count" unitOverride: "1" - timeshiftDuration: 0s yAxis: label: y1Axis scale: LINEAR diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_http.log b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_http.log index 7d05004891c..095f6b14f98 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/_http.log @@ -234,7 +234,6 @@ x-goog-request-params: parent=projects%2Fother${uniqueId} } } ], - "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", "scale": 1 @@ -325,7 +324,6 @@ X-Xss-Protection: 0 } } ], - "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", "scale": "LINEAR" @@ -424,7 +422,6 @@ X-Xss-Protection: 0 } } ], - "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", "scale": "LINEAR" @@ -509,7 +506,6 @@ x-goog-request-params: dashboard.name=projects%2Fother${uniqueId}%2Fdashboards%2 } } ], - "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", "scale": 1 @@ -597,7 +593,6 @@ X-Xss-Protection: 0 } } ], - "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", "scale": "LINEAR" @@ -693,7 +688,6 @@ X-Xss-Protection: 0 } } ], - "timeshiftDuration": "0s", "yAxis": { "label": "y1Axis", "scale": "LINEAR" diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/create.yaml b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/create.yaml index 1f03f8670b5..d680d314815 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/create.yaml @@ -51,7 +51,6 @@ spec: perSeriesAligner: ALIGN_RATE unitOverride: "1" plotType: "STACKED_BAR" - timeshiftDuration: 0s yAxis: label: y1Axis scale: LINEAR diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/update.yaml b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/update.yaml index cde1f5c1e91..0ac5db79d32 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/update.yaml +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringdashboard/monitoringdashboardrefs/update.yaml @@ -51,7 +51,6 @@ spec: perSeriesAligner: ALIGN_RATE unitOverride: "1" plotType: "STACKED_BAR" - timeshiftDuration: 0s yAxis: label: y1Axis scale: LINEAR