From 1a3d7fe0b65d92e322bfe33aebe6b64419203f4f Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 11 Aug 2020 00:10:18 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../components/dashboard_panel_builder.vue | 30 ++++- .../javascripts/monitoring/requests/index.js | 13 ++- .../javascripts/monitoring/stores/actions.js | 21 +++- .../monitoring/stores/mutation_types.js | 3 + .../monitoring/stores/mutations.js | 6 + .../javascripts/monitoring/stores/state.js | 3 + app/assets/stylesheets/pages/prometheus.scss | 8 ++ .../img/adding_a_secondary_node_v13_3.png | Bin 51774 -> 20195 bytes .../gitaly/img/cluster_example_v13_3.png | Bin 0 -> 27703 bytes .../gitaly/img/shard_example_v13_3.png | Bin 0 -> 14869 bytes doc/administration/gitaly/praefect.md | 42 +++++++ .../packages/container_registry.md | 5 +- doc/api/graphql/audit_report.md | 4 +- doc/api/graphql/getting_started.md | 5 +- .../graphql/img/sample_issue_boards_v13_2.png | Bin 93727 -> 33251 bytes doc/api/instance_level_ci_variables.md | 2 +- doc/ci/yaml/README.md | 40 +++---- doc/development/api_graphql_styleguide.md | 103 +++++++++++++----- doc/development/dangerbot.md | 2 +- .../img/deployment_pipeline_v13_3.png | Bin 32992 -> 7695 bytes doc/img/devops-stages-13_3.png | Bin 77782 -> 24935 bytes .../img/denied_licenses_v13_3.png | Bin 80149 -> 29503 bytes .../img/group_saml_settings_v13_3.png | Bin 73870 -> 25867 bytes .../group/saml_sso/img/scim_token_v13_3.png | Bin 170187 -> 56821 bytes doc/user/infrastructure/index.md | 97 +++++++++++++++++ .../settings/packages_settings_spec.rb | 10 +- .../dashboard_panel_builder_spec.js | 36 ++++++ .../frontend/monitoring/store/actions_spec.js | 3 + spec/requests/api/projects_spec.rb | 12 +- 29 files changed, 363 insertions(+), 82 deletions(-) create mode 100644 doc/administration/gitaly/img/cluster_example_v13_3.png create mode 100644 doc/administration/gitaly/img/shard_example_v13_3.png diff --git a/app/assets/javascripts/monitoring/components/dashboard_panel_builder.vue b/app/assets/javascripts/monitoring/components/dashboard_panel_builder.vue index d838b1db53f..44796d7926d 100644 --- a/app/assets/javascripts/monitoring/components/dashboard_panel_builder.vue +++ b/app/assets/javascripts/monitoring/components/dashboard_panel_builder.vue @@ -9,6 +9,8 @@ import { GlSprintf, GlAlert, } from '@gitlab/ui'; +import DateTimePicker from '~/vue_shared/components/date_time_picker/date_time_picker.vue'; +import { timeRanges } from '~/vue_shared/constants'; import DashboardPanel from './dashboard_panel.vue'; const initialYml = `title: Go heap size @@ -30,6 +32,7 @@ export default { GlSprintf, GlAlert, DashboardPanel, + DateTimePicker, }, data() { return { @@ -41,20 +44,35 @@ export default { 'panelPreviewIsLoading', 'panelPreviewError', 'panelPreviewGraphData', + 'panelPreviewTimeRange', + 'panelPreviewIsShown', 'projectPath', 'addDashboardDocumentationPath', ]), }, methods: { - ...mapActions('monitoringDashboard', ['fetchPanelPreview']), + ...mapActions('monitoringDashboard', [ + 'fetchPanelPreview', + 'fetchPanelPreviewMetrics', + 'setPanelPreviewTimeRange', + ]), onSubmit() { this.fetchPanelPreview(this.yml); }, + onDateTimePickerInput(timeRange) { + this.setPanelPreviewTimeRange(timeRange); + // refetch data only if preview has been clicked + // and there are no errors + if (this.panelPreviewIsShown && !this.panelPreviewError) { + this.fetchPanelPreviewMetrics(); + } + }, }, + timeRanges, };