diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-24 06:09:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-24 06:09:36 +0300 |
commit | c37c3ec359084406ca67e175ef66b8c186db6636 (patch) | |
tree | 00c44866e2c85834482de851b3da49eafbcb222a /app | |
parent | 0cfa77ee9ac952f50bb0adce18261730ecc476ed (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
3 files changed, 0 insertions, 79 deletions
diff --git a/app/assets/javascripts/behaviors/shortcuts/keybindings.js b/app/assets/javascripts/behaviors/shortcuts/keybindings.js index a88cc1834ac..bd13bcb35fc 100644 --- a/app/assets/javascripts/behaviors/shortcuts/keybindings.js +++ b/app/assets/javascripts/behaviors/shortcuts/keybindings.js @@ -321,12 +321,6 @@ export const GO_TO_PROJECT_JOBS = { defaultKeys: ['g j'], // eslint-disable-line @gitlab/require-i18n-strings }; -export const GO_TO_PROJECT_METRICS = { - id: 'project.goToMetrics', - description: __('Go to metrics'), - defaultKeys: ['g l'], // eslint-disable-line @gitlab/require-i18n-strings -}; - export const GO_TO_PROJECT_ENVIRONMENTS = { id: 'project.goToEnvironments', description: __('Go to environments'), @@ -506,30 +500,6 @@ const WEB_IDE_COMMIT = { customizable: false, }; -export const METRICS_EXPAND_PANEL = { - id: 'metrics.expandPanel', - description: __('Expand panel'), - defaultKeys: ['e'], -}; - -export const METRICS_DOWNLOAD_CSV = { - id: 'metrics.downloadCSV', - description: __('Download CSV'), - defaultKeys: ['d'], -}; - -export const METRICS_COPY_LINK_TO_CHART = { - id: 'metrics.copyLinkToChart', - description: __('Copy link to chart'), - defaultKeys: ['c'], -}; - -export const METRICS_SHOW_ALERTS = { - id: 'metrics.showAlerts', - description: __('Alerts'), - defaultKeys: ['a'], -}; - // All keybinding groups const GLOBAL_SHORTCUTS_GROUP = { id: 'globalShortcuts', @@ -606,7 +576,6 @@ const PROJECT_SHORTCUTS_GROUP = { GO_TO_PROJECT_MERGE_REQUESTS, GO_TO_PROJECT_PIPELINES, GO_TO_PROJECT_JOBS, - ...(gon.features?.removeMonitorMetrics ? [] : [GO_TO_PROJECT_METRICS]), GO_TO_PROJECT_ENVIRONMENTS, GO_TO_PROJECT_KUBERNETES, GO_TO_PROJECT_SNIPPETS, @@ -670,17 +639,6 @@ const WEB_IDE_SHORTCUTS_GROUP = { keybindings: [WEB_IDE_GO_TO_FILE, WEB_IDE_COMMIT], }; -const METRICS_SHORTCUTS_GROUP = { - id: 'metrics', - name: __('Metrics'), - keybindings: [ - METRICS_EXPAND_PANEL, - METRICS_DOWNLOAD_CSV, - METRICS_COPY_LINK_TO_CHART, - METRICS_SHOW_ALERTS, - ], -}; - export const MISC_SHORTCUTS_GROUP = { id: 'misc', name: __('Miscellaneous'), @@ -701,7 +659,6 @@ export const keybindingGroups = [ MR_COMMITS_SHORTCUTS_GROUP, ISSUES_SHORTCUTS_GROUP, WEB_IDE_SHORTCUTS_GROUP, - ...(gon.features?.removeMonitorMetrics ? [] : [METRICS_SHORTCUTS_GROUP]), MISC_SHORTCUTS_GROUP, ]; diff --git a/app/assets/javascripts/behaviors/shortcuts/shortcuts_navigation.js b/app/assets/javascripts/behaviors/shortcuts/shortcuts_navigation.js index 9e6c9c2e08e..d9dc3aae808 100644 --- a/app/assets/javascripts/behaviors/shortcuts/shortcuts_navigation.js +++ b/app/assets/javascripts/behaviors/shortcuts/shortcuts_navigation.js @@ -17,7 +17,6 @@ import { GO_TO_PROJECT_SNIPPETS, GO_TO_PROJECT_KUBERNETES, GO_TO_PROJECT_ENVIRONMENTS, - GO_TO_PROJECT_METRICS, GO_TO_PROJECT_WEBIDE, NEW_ISSUE, } from './keybindings'; @@ -44,7 +43,6 @@ export default class ShortcutsNavigation extends Shortcuts { [GO_TO_PROJECT_SNIPPETS, () => findAndFollowLink('.shortcuts-snippets')], [GO_TO_PROJECT_KUBERNETES, () => findAndFollowLink('.shortcuts-kubernetes')], [GO_TO_PROJECT_ENVIRONMENTS, () => findAndFollowLink('.shortcuts-environments')], - [GO_TO_PROJECT_METRICS, () => findAndFollowLink('.shortcuts-metrics')], [GO_TO_PROJECT_WEBIDE, ShortcutsNavigation.navigateToWebIDE], [NEW_ISSUE, () => findAndFollowLink('.shortcuts-new-issue')], ]); diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue index 752ba4241d8..cfc20b7b95f 100644 --- a/app/assets/javascripts/monitoring/components/dashboard.vue +++ b/app/assets/javascripts/monitoring/components/dashboard.vue @@ -11,16 +11,8 @@ import { import VueDraggable from 'vuedraggable'; import { mapActions, mapState, mapGetters } from 'vuex'; import { createAlert } from '~/alert'; -import { - keysFor, - METRICS_COPY_LINK_TO_CHART, - METRICS_DOWNLOAD_CSV, - METRICS_EXPAND_PANEL, - METRICS_SHOW_ALERTS, -} from '~/behaviors/shortcuts/keybindings'; import invalidUrl from '~/lib/utils/invalid_url'; import { ESC_KEY } from '~/lib/utils/keys'; -import { Mousetrap } from '~/lib/mousetrap'; import { mergeUrlParams, updateHistory } from '~/lib/utils/url_utility'; import { s__ } from '~/locale'; import { defaultTimeRange } from '~/vue_shared/constants'; @@ -218,32 +210,6 @@ export default { } }, }, - created() { - window.addEventListener('keyup', this.onKeyup); - - Mousetrap.bind(keysFor(METRICS_EXPAND_PANEL), () => - this.runShortcut('onExpandFromKeyboardShortcut'), - ); - Mousetrap.bind(keysFor(METRICS_SHOW_ALERTS), () => - this.runShortcut('showAlertModalFromKeyboardShortcut'), - ); - Mousetrap.bind(keysFor(METRICS_DOWNLOAD_CSV), () => - this.runShortcut('downloadCsvFromKeyboardShortcut'), - ); - Mousetrap.bind(keysFor(METRICS_COPY_LINK_TO_CHART), () => - this.runShortcut('copyChartLinkFromKeyboardShotcut'), - ); - }, - destroyed() { - window.removeEventListener('keyup', this.onKeyup); - - [ - METRICS_COPY_LINK_TO_CHART, - METRICS_DOWNLOAD_CSV, - METRICS_EXPAND_PANEL, - METRICS_SHOW_ALERTS, - ].forEach((command) => Mousetrap.unbind(keysFor(command))); - }, mounted() { if (!this.hasMetrics) { this.setGettingStartedEmptyState(); |