diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /app/assets/javascripts/monitoring | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) | |
download | gitlab-ce-b595cb0c1dec83de5bdee18284abe86614bed33b.tar.gz |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'app/assets/javascripts/monitoring')
6 files changed, 6 insertions, 49 deletions
diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue index 70e253508ce..250d4b3c55f 100644 --- a/app/assets/javascripts/monitoring/components/dashboard.vue +++ b/app/assets/javascripts/monitoring/components/dashboard.vue @@ -358,10 +358,6 @@ export default { actionToRun = 'onExpandFromKeyboardShortcut'; break; - case keyboardShortcutKeys.VISIT_LOGS: - actionToRun = 'visitLogsPageFromKeyboardShortcut'; - break; - case keyboardShortcutKeys.SHOW_ALERT: actionToRun = 'showAlertModalFromKeyboardShortcut'; break; diff --git a/app/assets/javascripts/monitoring/components/dashboard_header.vue b/app/assets/javascripts/monitoring/components/dashboard_header.vue index f18290e7048..3338635bf96 100644 --- a/app/assets/javascripts/monitoring/components/dashboard_header.vue +++ b/app/assets/javascripts/monitoring/components/dashboard_header.vue @@ -170,7 +170,7 @@ export default { <template> <div ref="prometheusGraphsHeader"> - <div class="mb-2 mr-2 d-flex d-sm-block"> + <div class="gl-mb-3 gl-mr-3 gl-display-flex gl-sm-display-block"> <dashboards-dropdown id="monitor-dashboards-dropdown" data-qa-selector="dashboards_filter_dropdown" @@ -240,7 +240,7 @@ export default { <div class="flex-grow-1"></div> <div class="d-sm-flex"> - <div v-if="showRearrangePanelsBtn" class="mb-2 mr-2 d-flex"> + <div v-if="showRearrangePanelsBtn" class="gl-mb-3 gl-mr-3 gl-display-flex"> <gl-button :pressed="isRearrangingPanels" variant="default" @@ -253,7 +253,7 @@ export default { <div v-if="externalDashboardUrl && externalDashboardUrl.length" - class="mb-2 mr-2 d-flex d-sm-block" + class="gl-mb-3 gl-mr-3 gl-display-flex gl-sm-display-block" > <gl-button class="flex-grow-1 js-external-dashboard-link" @@ -280,7 +280,7 @@ export default { <template v-if="shouldShowSettingsButton"> <span aria-hidden="true" class="gl-pl-3 border-left gl-mb-3 d-none d-sm-block"></span> - <div class="mb-2 mr-2 d-flex d-sm-block"> + <div class="gl-mb-3 gl-mr-3 d-flex d-sm-block"> <gl-button v-gl-tooltip data-testid="metrics-settings-button" diff --git a/app/assets/javascripts/monitoring/components/dashboard_panel.vue b/app/assets/javascripts/monitoring/components/dashboard_panel.vue index ff8ccded83b..7e7dcef7639 100644 --- a/app/assets/javascripts/monitoring/components/dashboard_panel.vue +++ b/app/assets/javascripts/monitoring/components/dashboard_panel.vue @@ -15,15 +15,13 @@ import { } from '@gitlab/ui'; import { mapState } from 'vuex'; import { convertToFixedRange } from '~/lib/utils/datetime_range'; -import invalidUrl from '~/lib/utils/invalid_url'; -import { relativePathToAbsolute, getBaseURL, visitUrl, isSafeURL } from '~/lib/utils/url_utility'; +import { isSafeURL } from '~/lib/utils/url_utility'; import { __, n__ } from '~/locale'; import TrackEventDirective from '~/vue_shared/directives/track_event'; -import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { panelTypes } from '../constants'; import { graphDataToCsv } from '../csv_export'; -import { timeRangeToUrl, downloadCSVOptions, generateLinkToChartOptions } from '../utils'; +import { downloadCSVOptions, generateLinkToChartOptions } from '../utils'; import MonitorAnomalyChart from './charts/anomaly.vue'; import MonitorBarChart from './charts/bar.vue'; import MonitorColumnChart from './charts/column.vue'; @@ -58,7 +56,6 @@ export default { GlTooltip: GlTooltipDirective, TrackEvent: TrackEventDirective, }, - mixins: [glFeatureFlagsMixin()], props: { clipboardText: { type: String, @@ -106,9 +103,6 @@ export default { projectPath(state) { return state[this.namespace].projectPath; }, - logsPath(state) { - return state[this.namespace].logsPath; - }, timeRange(state) { return state[this.namespace].timeRange; }, @@ -142,17 +136,6 @@ export default { const metrics = this.graphData?.metrics || []; return metrics.some(({ loading }) => loading); }, - logsPathWithTimeRange() { - if (!this.glFeatures.monitorLogging) { - return null; - } - const timeRange = this.zoomedTimeRange || this.timeRange; - - if (this.logsPath && this.logsPath !== invalidUrl && timeRange) { - return timeRangeToUrl(timeRange, this.logsPath); - } - return null; - }, csvText() { if (this.graphData) { return graphDataToCsv(this.graphData); @@ -278,16 +261,6 @@ export default { safeUrl(url) { return isSafeURL(url) ? url : '#'; }, - visitLogsPage() { - if (this.logsPathWithTimeRange) { - visitUrl(relativePathToAbsolute(this.logsPathWithTimeRange, getBaseURL())); - } - }, - visitLogsPageFromKeyboardShortcut() { - if (this.isContextualMenuShown) { - this.visitLogsPage(); - } - }, downloadCsvFromKeyboardShortcut() { if (this.csvText && this.isContextualMenuShown) { this.$refs.downloadCsvLink.$el.firstChild.click(); @@ -351,13 +324,6 @@ export default { > {{ editCustomMetricLinkText }} </gl-dropdown-item> - <gl-dropdown-item - v-if="logsPathWithTimeRange" - ref="viewLogsLink" - :href="logsPathWithTimeRange" - > - {{ s__('Metrics|View logs') }} - </gl-dropdown-item> <gl-dropdown-item v-if="csvText" diff --git a/app/assets/javascripts/monitoring/constants.js b/app/assets/javascripts/monitoring/constants.js index 060ed896d7c..1b506c6564b 100644 --- a/app/assets/javascripts/monitoring/constants.js +++ b/app/assets/javascripts/monitoring/constants.js @@ -172,7 +172,6 @@ export const endpointKeys = [ 'dashboardsEndpoint', 'currentDashboard', 'projectPath', - 'logsPath', ]; /** @@ -271,7 +270,6 @@ export const VARIABLE_PREFIX = 'var-'; export const keyboardShortcutKeys = { EXPAND: 'e', - VISIT_LOGS: 'l', SHOW_ALERT: 'a', DOWNLOAD_CSV: 'd', CHART_COPY: 'c', diff --git a/app/assets/javascripts/monitoring/stores/state.js b/app/assets/javascripts/monitoring/stores/state.js index 3883fa3380d..e513b575475 100644 --- a/app/assets/javascripts/monitoring/stores/state.js +++ b/app/assets/javascripts/monitoring/stores/state.js @@ -83,7 +83,6 @@ export default () => ({ externalDashboardUrl: '', projectPath: null, operationsSettingsPath: '', - logsPath: invalidUrl, addDashboardDocumentationPath: '', // static paths diff --git a/app/assets/javascripts/monitoring/utils.js b/app/assets/javascripts/monitoring/utils.js index 221f28e923b..fd8749625da 100644 --- a/app/assets/javascripts/monitoring/utils.js +++ b/app/assets/javascripts/monitoring/utils.js @@ -29,7 +29,6 @@ export const stateAndPropsFromDataset = (dataset = {}) => { canAccessOperationsSettings, operationsSettingsPath, projectPath, - logsPath, externalDashboardUrl, currentEnvironmentName, customDashboardBasePath, @@ -53,7 +52,6 @@ export const stateAndPropsFromDataset = (dataset = {}) => { canAccessOperationsSettings, operationsSettingsPath, projectPath, - logsPath, externalDashboardUrl, currentEnvironmentName, customDashboardBasePath, |