diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-21 15:11:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-21 15:11:29 +0300 |
commit | 559b1da28e46a9969315beb11ee2d2056f75b06d (patch) | |
tree | fad20c706047f4aca44c1f030cb81d5b1e302cab /app | |
parent | a065770457b66dc856897fc5282bf897b9e4f65b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/admin/application_settings/runner_token_expiration/index.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/analytics/shared/components/value_stream_metrics.vue | 36 | ||||
-rw-r--r-- | app/assets/javascripts/analytics/shared/utils.js | 28 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/admin_runner_show/admin_runner_show_app.vue (renamed from app/assets/javascripts/runner/admin_runner_show/admin_runner_show_app.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/admin_runner_show/index.js (renamed from app/assets/javascripts/runner/admin_runner_show/index.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/admin_runners/admin_runners_app.vue (renamed from app/assets/javascripts/runner/admin_runners/admin_runners_app.vue) | 8 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/admin_runners/index.js (renamed from app/assets/javascripts/runner/admin_runners/index.js) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/cells/link_cell.vue (renamed from app/assets/javascripts/runner/components/cells/link_cell.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/cells/runner_actions_cell.vue (renamed from app/assets/javascripts/runner/components/cells/runner_actions_cell.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/cells/runner_owner_cell.vue (renamed from app/assets/javascripts/runner/components/cells/runner_owner_cell.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/cells/runner_stacked_summary_cell.vue (renamed from app/assets/javascripts/runner/components/cells/runner_stacked_summary_cell.vue) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/cells/runner_status_cell.vue (renamed from app/assets/javascripts/runner/components/cells/runner_status_cell.vue) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/cells/runner_summary_field.vue (renamed from app/assets/javascripts/runner/components/cells/runner_summary_field.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/registration/registration_dropdown.vue (renamed from app/assets/javascripts/runner/components/registration/registration_dropdown.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/registration/registration_token.vue (renamed from app/assets/javascripts/runner/components/registration/registration_token.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/registration/registration_token_reset_dropdown_item.vue (renamed from app/assets/javascripts/runner/components/registration/registration_token_reset_dropdown_item.vue) | 4 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_assigned_item.vue (renamed from app/assets/javascripts/runner/components/runner_assigned_item.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_bulk_delete.vue (renamed from app/assets/javascripts/runner/components/runner_bulk_delete.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_bulk_delete_checkbox.vue (renamed from app/assets/javascripts/runner/components/runner_bulk_delete_checkbox.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_delete_button.vue (renamed from app/assets/javascripts/runner/components/runner_delete_button.vue) | 4 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_delete_modal.vue (renamed from app/assets/javascripts/runner/components/runner_delete_modal.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_detail.vue (renamed from app/assets/javascripts/runner/components/runner_detail.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_details.vue (renamed from app/assets/javascripts/runner/components/runner_details.vue) | 6 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_edit_button.vue (renamed from app/assets/javascripts/runner/components/runner_edit_button.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_filtered_search_bar.vue (renamed from app/assets/javascripts/runner/components/runner_filtered_search_bar.vue) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_groups.vue (renamed from app/assets/javascripts/runner/components/runner_groups.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_header.vue (renamed from app/assets/javascripts/runner/components/runner_header.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_jobs.vue (renamed from app/assets/javascripts/runner/components/runner_jobs.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_jobs_table.vue (renamed from app/assets/javascripts/runner/components/runner_jobs_table.vue) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_list.vue (renamed from app/assets/javascripts/runner/components/runner_list.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_list_empty_state.vue (renamed from app/assets/javascripts/runner/components/runner_list_empty_state.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_membership_toggle.vue (renamed from app/assets/javascripts/runner/components/runner_membership_toggle.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_name.vue (renamed from app/assets/javascripts/runner/components/runner_name.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_pagination.vue (renamed from app/assets/javascripts/runner/components/runner_pagination.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_pause_button.vue (renamed from app/assets/javascripts/runner/components/runner_pause_button.vue) | 4 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_paused_badge.vue (renamed from app/assets/javascripts/runner/components/runner_paused_badge.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_projects.vue (renamed from app/assets/javascripts/runner/components/runner_projects.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_status_badge.vue (renamed from app/assets/javascripts/runner/components/runner_status_badge.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_status_popover.vue (renamed from app/assets/javascripts/runner/components/runner_status_popover.vue) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_tag.vue (renamed from app/assets/javascripts/runner/components/runner_tag.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_tags.vue (renamed from app/assets/javascripts/runner/components/runner_tags.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_type_badge.vue (renamed from app/assets/javascripts/runner/components/runner_type_badge.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_type_tabs.vue (renamed from app/assets/javascripts/runner/components/runner_type_tabs.vue) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/runner_update_form.vue (renamed from app/assets/javascripts/runner/components/runner_update_form.vue) | 8 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/search_tokens/paused_token_config.js (renamed from app/assets/javascripts/runner/components/search_tokens/paused_token_config.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/search_tokens/status_token_config.js (renamed from app/assets/javascripts/runner/components/search_tokens/status_token_config.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/search_tokens/tag_token.vue (renamed from app/assets/javascripts/runner/components/search_tokens/tag_token.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/search_tokens/tag_token_config.js (renamed from app/assets/javascripts/runner/components/search_tokens/tag_token_config.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/search_tokens/upgrade_status_token_config.js (renamed from app/assets/javascripts/runner/components/search_tokens/upgrade_status_token_config.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/stat/runner_count.vue (renamed from app/assets/javascripts/runner/components/stat/runner_count.vue) | 4 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/stat/runner_single_stat.vue (renamed from app/assets/javascripts/runner/components/stat/runner_single_stat.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/components/stat/runner_stats.vue (renamed from app/assets/javascripts/runner/components/stat/runner_stats.vue) | 4 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/constants.js (renamed from app/assets/javascripts/runner/constants.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/edit/runner_fields.fragment.graphql (renamed from app/assets/javascripts/runner/graphql/edit/runner_fields.fragment.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/edit/runner_fields_shared.fragment.graphql (renamed from app/assets/javascripts/runner/graphql/edit/runner_fields_shared.fragment.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/edit/runner_form.query.graphql (renamed from app/assets/javascripts/runner/graphql/edit/runner_form.query.graphql) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/edit/runner_update.mutation.graphql (renamed from app/assets/javascripts/runner/graphql/edit/runner_update.mutation.graphql) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/list/all_runners.query.graphql (renamed from app/assets/javascripts/runner/graphql/list/all_runners.query.graphql) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/list/all_runners_connection.fragment.graphql (renamed from app/assets/javascripts/runner/graphql/list/all_runners_connection.fragment.graphql) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/list/all_runners_count.query.graphql (renamed from app/assets/javascripts/runner/graphql/list/all_runners_count.query.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/list/bulk_runner_delete.mutation.graphql (renamed from app/assets/javascripts/runner/graphql/list/bulk_runner_delete.mutation.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/list/checked_runner_ids.query.graphql (renamed from app/assets/javascripts/runner/graphql/list/checked_runner_ids.query.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/list/group_runner_connection.fragment.graphql (renamed from app/assets/javascripts/runner/graphql/list/group_runner_connection.fragment.graphql) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/list/group_runners.query.graphql (renamed from app/assets/javascripts/runner/graphql/list/group_runners.query.graphql) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/list/group_runners_count.query.graphql (renamed from app/assets/javascripts/runner/graphql/list/group_runners_count.query.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/list/list_item.fragment.graphql (renamed from app/assets/javascripts/runner/graphql/list/list_item.fragment.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/list/list_item_shared.fragment.graphql (renamed from app/assets/javascripts/runner/graphql/list/list_item_shared.fragment.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/list/local_state.js (renamed from app/assets/javascripts/runner/graphql/list/local_state.js) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/list/runners_registration_token_reset.mutation.graphql (renamed from app/assets/javascripts/runner/graphql/list/runners_registration_token_reset.mutation.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/list/typedefs.graphql (renamed from app/assets/javascripts/runner/graphql/list/typedefs.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/shared/runner_delete.mutation.graphql (renamed from app/assets/javascripts/runner/graphql/shared/runner_delete.mutation.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/shared/runner_toggle_active.mutation.graphql (renamed from app/assets/javascripts/runner/graphql/shared/runner_toggle_active.mutation.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/show/runner.query.graphql (renamed from app/assets/javascripts/runner/graphql/show/runner.query.graphql) | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/show/runner_details.fragment.graphql (renamed from app/assets/javascripts/runner/graphql/show/runner_details.fragment.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/show/runner_details_shared.fragment.graphql (renamed from app/assets/javascripts/runner/graphql/show/runner_details_shared.fragment.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/show/runner_jobs.query.graphql (renamed from app/assets/javascripts/runner/graphql/show/runner_jobs.query.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/graphql/show/runner_projects.query.graphql (renamed from app/assets/javascripts/runner/graphql/show/runner_projects.query.graphql) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/group_runner_show/group_runner_show_app.vue (renamed from app/assets/javascripts/runner/group_runner_show/group_runner_show_app.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/group_runner_show/index.js (renamed from app/assets/javascripts/runner/group_runner_show/index.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/group_runners/group_runners_app.vue (renamed from app/assets/javascripts/runner/group_runners/group_runners_app.vue) | 8 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/group_runners/index.js (renamed from app/assets/javascripts/runner/group_runners/index.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/local_storage_alert/constants.js (renamed from app/assets/javascripts/runner/local_storage_alert/constants.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/local_storage_alert/save_alert_to_local_storage.js (renamed from app/assets/javascripts/runner/local_storage_alert/save_alert_to_local_storage.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/local_storage_alert/show_alert_from_local_storage.js (renamed from app/assets/javascripts/runner/local_storage_alert/show_alert_from_local_storage.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/runner_edit/index.js (renamed from app/assets/javascripts/runner/runner_edit/index.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/runner_edit/runner_edit_app.vue (renamed from app/assets/javascripts/runner/runner_edit/runner_edit_app.vue) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/runner_search_utils.js (renamed from app/assets/javascripts/runner/runner_search_utils.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/runner_update_form_utils.js (renamed from app/assets/javascripts/runner/runner_update_form_utils.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/sentry_utils.js (renamed from app/assets/javascripts/runner/sentry_utils.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/ci/runner/utils.js (renamed from app/assets/javascripts/runner/utils.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/gitlab_version_check.js | 3 | ||||
-rw-r--r-- | app/assets/javascripts/pages/admin/runners/edit/index.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/pages/admin/runners/index/index.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/pages/admin/runners/show/index.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/pages/groups/runners/edit/index.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/pages/groups/runners/index/index.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/pages/groups/runners/show/index.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/vue_shared/components/gitlab_version_check.vue | 20 | ||||
-rw-r--r-- | app/assets/stylesheets/_page_specific_files.scss | 1 | ||||
-rw-r--r-- | app/assets/stylesheets/page_bundles/notifications.scss (renamed from app/assets/stylesheets/pages/notifications.scss) | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/notes.scss | 4 | ||||
-rw-r--r-- | app/models/hooks/web_hook.rb | 17 | ||||
-rw-r--r-- | app/services/incident_management/timeline_events/create_service.rb | 10 | ||||
-rw-r--r-- | app/views/admin/dashboard/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/help/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/header/_gitlab_version.html.haml | 10 | ||||
-rw-r--r-- | app/views/profiles/notifications/show.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/deployments/_rollback.haml | 2 | ||||
-rw-r--r-- | app/workers/incident_management/add_severity_system_note_worker.rb | 5 |
109 files changed, 145 insertions, 92 deletions
diff --git a/app/assets/javascripts/admin/application_settings/runner_token_expiration/index.js b/app/assets/javascripts/admin/application_settings/runner_token_expiration/index.js index 79d7ff0451a..8c01a3bc607 100644 --- a/app/assets/javascripts/admin/application_settings/runner_token_expiration/index.js +++ b/app/assets/javascripts/admin/application_settings/runner_token_expiration/index.js @@ -1,5 +1,5 @@ import Vue from 'vue'; -import { parseInterval } from '~/runner/utils'; +import { parseInterval } from '~/ci/runner/utils'; import ExpirationIntervals from './components/expiration_intervals.vue'; const initRunnerTokenExpirationIntervals = (selector = '#js-runner-token-expiration-intervals') => { diff --git a/app/assets/javascripts/analytics/shared/components/value_stream_metrics.vue b/app/assets/javascripts/analytics/shared/components/value_stream_metrics.vue index ffb61230661..cc7b554f32c 100644 --- a/app/assets/javascripts/analytics/shared/components/value_stream_metrics.vue +++ b/app/assets/javascripts/analytics/shared/components/value_stream_metrics.vue @@ -1,33 +1,11 @@ <script> import { GlSkeletonLoader } from '@gitlab/ui'; -import { flatten, isEqual, keyBy } from 'lodash'; +import { isEqual, keyBy } from 'lodash'; import { createAlert } from '~/flash'; import { sprintf, s__ } from '~/locale'; -import { METRICS_POPOVER_CONTENT } from '../constants'; -import { removeFlash, prepareTimeMetricsData } from '../utils'; +import { fetchMetricsData, removeFlash } from '../utils'; import MetricTile from './metric_tile.vue'; -const requestData = ({ request, endpoint, path, params, name }) => { - return request({ endpoint, params, requestPath: path }) - .then(({ data }) => data) - .catch(() => { - const message = sprintf( - s__( - 'ValueStreamAnalytics|There was an error while fetching value stream analytics %{requestTypeName} data.', - ), - { requestTypeName: name }, - ); - createAlert({ message }); - }); -}; - -const fetchMetricsData = (reqs = [], path, params) => { - const promises = reqs.map((r) => requestData({ ...r, path, params })); - return Promise.all(promises).then((responses) => - prepareTimeMetricsData(flatten(responses), METRICS_POPOVER_CONTENT), - ); -}; - const extractMetricsGroupData = (keyList = [], data = []) => { if (!keyList.length || !data.length) return []; const kv = keyBy(data, 'identifier'); @@ -111,7 +89,15 @@ export default { this.isLoading = false; }) - .catch(() => { + .catch((err) => { + const message = sprintf( + s__( + 'ValueStreamAnalytics|There was an error while fetching value stream analytics %{requestTypeName} data.', + ), + { requestTypeName: err.message }, + ); + + createAlert({ message }); this.isLoading = false; }); }, diff --git a/app/assets/javascripts/analytics/shared/utils.js b/app/assets/javascripts/analytics/shared/utils.js index bc52e38fc81..71b719d1ed2 100644 --- a/app/assets/javascripts/analytics/shared/utils.js +++ b/app/assets/javascripts/analytics/shared/utils.js @@ -1,8 +1,9 @@ +import { flatten } from 'lodash'; import { hideFlash } from '~/flash'; import dateFormat from '~/lib/dateformat'; import { slugify } from '~/lib/utils/text_utility'; import { urlQueryToFilter } from '~/vue_shared/components/filtered_search_bar/filtered_search_utils'; -import { dateFormats } from './constants'; +import { dateFormats, METRICS_POPOVER_CONTENT } from './constants'; export const filterBySearchTerm = (data = [], searchTerm = '', filterByKey = 'name') => { if (!searchTerm?.length) return data; @@ -96,3 +97,28 @@ export const prepareTimeMetricsData = (data = [], popoverContent = {}) => description: popoverContent[metricIdentifier]?.description || '', }; }); + +const requestData = ({ request, endpoint, requestPath, params, name }) => { + return request({ endpoint, params, requestPath }) + .then(({ data }) => data) + .catch(() => { + throw new Error(name); + }); +}; + +/** + * Takes a configuration array of metrics requests (key metrics and DORA) and returns + * a flat array of all the responses. Different metrics are retrieved from different endpoints + * additionally we only support certain metrics for FOSS users. + * + * @param {Array} requests - array of metric api requests to be made + * @param {String} requestPath - path for the group / project we are requesting + * @param {Object} params - optional parameters to filter, including `created_after` and `created_before` dates + * @returns a flat array of metrics + */ +export const fetchMetricsData = (requests = [], requestPath, params) => { + const promises = requests.map((r) => requestData({ ...r, requestPath, params })); + return Promise.all(promises).then((responses) => + prepareTimeMetricsData(flatten(responses), METRICS_POPOVER_CONTENT), + ); +}; diff --git a/app/assets/javascripts/runner/admin_runner_show/admin_runner_show_app.vue b/app/assets/javascripts/ci/runner/admin_runner_show/admin_runner_show_app.vue index 9fa4b521ebc..9fa4b521ebc 100644 --- a/app/assets/javascripts/runner/admin_runner_show/admin_runner_show_app.vue +++ b/app/assets/javascripts/ci/runner/admin_runner_show/admin_runner_show_app.vue diff --git a/app/assets/javascripts/runner/admin_runner_show/index.js b/app/assets/javascripts/ci/runner/admin_runner_show/index.js index ea455416648..ea455416648 100644 --- a/app/assets/javascripts/runner/admin_runner_show/index.js +++ b/app/assets/javascripts/ci/runner/admin_runner_show/index.js diff --git a/app/assets/javascripts/runner/admin_runners/admin_runners_app.vue b/app/assets/javascripts/ci/runner/admin_runners/admin_runners_app.vue index 27c9d95bf09..2915e460085 100644 --- a/app/assets/javascripts/runner/admin_runners/admin_runners_app.vue +++ b/app/assets/javascripts/ci/runner/admin_runners/admin_runners_app.vue @@ -4,15 +4,15 @@ import { createAlert } from '~/flash'; import { updateHistory } from '~/lib/utils/url_utility'; import { fetchPolicies } from '~/lib/graphql'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; -import { upgradeStatusTokenConfig } from 'ee_else_ce/runner/components/search_tokens/upgrade_status_token_config'; +import { upgradeStatusTokenConfig } from 'ee_else_ce/ci/runner/components/search_tokens/upgrade_status_token_config'; import { fromUrlQueryToSearch, fromSearchToUrl, fromSearchToVariables, isSearchFiltered, -} from 'ee_else_ce/runner/runner_search_utils'; -import allRunnersQuery from 'ee_else_ce/runner/graphql/list/all_runners.query.graphql'; -import allRunnersCountQuery from 'ee_else_ce/runner/graphql/list/all_runners_count.query.graphql'; +} from 'ee_else_ce/ci/runner/runner_search_utils'; +import allRunnersQuery from 'ee_else_ce/ci/runner/graphql/list/all_runners.query.graphql'; +import allRunnersCountQuery from 'ee_else_ce/ci/runner/graphql/list/all_runners_count.query.graphql'; import RegistrationDropdown from '../components/registration/registration_dropdown.vue'; import RunnerFilteredSearchBar from '../components/runner_filtered_search_bar.vue'; diff --git a/app/assets/javascripts/runner/admin_runners/index.js b/app/assets/javascripts/ci/runner/admin_runners/index.js index 7bb6cd5689e..c6db7148eb1 100644 --- a/app/assets/javascripts/runner/admin_runners/index.js +++ b/app/assets/javascripts/ci/runner/admin_runners/index.js @@ -2,7 +2,7 @@ import { GlToast } from '@gitlab/ui'; import Vue from 'vue'; import VueApollo from 'vue-apollo'; import { visitUrl } from '~/lib/utils/url_utility'; -import { updateOutdatedUrl } from '~/runner/runner_search_utils'; +import { updateOutdatedUrl } from '~/ci/runner/runner_search_utils'; import createDefaultClient from '~/lib/graphql'; import { createLocalState } from '../graphql/list/local_state'; import { showAlertFromLocalStorage } from '../local_storage_alert/show_alert_from_local_storage'; diff --git a/app/assets/javascripts/runner/components/cells/link_cell.vue b/app/assets/javascripts/ci/runner/components/cells/link_cell.vue index 2843ddbacaf..2843ddbacaf 100644 --- a/app/assets/javascripts/runner/components/cells/link_cell.vue +++ b/app/assets/javascripts/ci/runner/components/cells/link_cell.vue diff --git a/app/assets/javascripts/runner/components/cells/runner_actions_cell.vue b/app/assets/javascripts/ci/runner/components/cells/runner_actions_cell.vue index 13f520c4edb..13f520c4edb 100644 --- a/app/assets/javascripts/runner/components/cells/runner_actions_cell.vue +++ b/app/assets/javascripts/ci/runner/components/cells/runner_actions_cell.vue diff --git a/app/assets/javascripts/runner/components/cells/runner_owner_cell.vue b/app/assets/javascripts/ci/runner/components/cells/runner_owner_cell.vue index cb43760b2d6..cb43760b2d6 100644 --- a/app/assets/javascripts/runner/components/cells/runner_owner_cell.vue +++ b/app/assets/javascripts/ci/runner/components/cells/runner_owner_cell.vue diff --git a/app/assets/javascripts/runner/components/cells/runner_stacked_summary_cell.vue b/app/assets/javascripts/ci/runner/components/cells/runner_stacked_summary_cell.vue index e5d49eb7c8e..1e44d5fccc2 100644 --- a/app/assets/javascripts/runner/components/cells/runner_stacked_summary_cell.vue +++ b/app/assets/javascripts/ci/runner/components/cells/runner_stacked_summary_cell.vue @@ -26,7 +26,7 @@ export default { RunnerTags, RunnerTypeBadge, RunnerUpgradeStatusIcon: () => - import('ee_component/runner/components/runner_upgrade_status_icon.vue'), + import('ee_component/ci/runner/components/runner_upgrade_status_icon.vue'), TooltipOnTruncate, }, directives: { diff --git a/app/assets/javascripts/runner/components/cells/runner_status_cell.vue b/app/assets/javascripts/ci/runner/components/cells/runner_status_cell.vue index eb98d4ae2fb..67b9b0a266f 100644 --- a/app/assets/javascripts/runner/components/cells/runner_status_cell.vue +++ b/app/assets/javascripts/ci/runner/components/cells/runner_status_cell.vue @@ -8,7 +8,7 @@ export default { components: { RunnerStatusBadge, RunnerUpgradeStatusBadge: () => - import('ee_component/runner/components/runner_upgrade_status_badge.vue'), + import('ee_component/ci/runner/components/runner_upgrade_status_badge.vue'), RunnerPausedBadge, }, directives: { diff --git a/app/assets/javascripts/runner/components/cells/runner_summary_field.vue b/app/assets/javascripts/ci/runner/components/cells/runner_summary_field.vue index 1bbbd55089a..1bbbd55089a 100644 --- a/app/assets/javascripts/runner/components/cells/runner_summary_field.vue +++ b/app/assets/javascripts/ci/runner/components/cells/runner_summary_field.vue diff --git a/app/assets/javascripts/runner/components/registration/registration_dropdown.vue b/app/assets/javascripts/ci/runner/components/registration/registration_dropdown.vue index 212ad5fa5a0..212ad5fa5a0 100644 --- a/app/assets/javascripts/runner/components/registration/registration_dropdown.vue +++ b/app/assets/javascripts/ci/runner/components/registration/registration_dropdown.vue diff --git a/app/assets/javascripts/runner/components/registration/registration_token.vue b/app/assets/javascripts/ci/runner/components/registration/registration_token.vue index 6b4e6a929b7..6b4e6a929b7 100644 --- a/app/assets/javascripts/runner/components/registration/registration_token.vue +++ b/app/assets/javascripts/ci/runner/components/registration/registration_token.vue diff --git a/app/assets/javascripts/runner/components/registration/registration_token_reset_dropdown_item.vue b/app/assets/javascripts/ci/runner/components/registration/registration_token_reset_dropdown_item.vue index 667cb0090b3..6740065e860 100644 --- a/app/assets/javascripts/runner/components/registration/registration_token_reset_dropdown_item.vue +++ b/app/assets/javascripts/ci/runner/components/registration/registration_token_reset_dropdown_item.vue @@ -4,8 +4,8 @@ import { createAlert } from '~/flash'; import { TYPE_GROUP, TYPE_PROJECT } from '~/graphql_shared/constants'; import { convertToGraphQLId } from '~/graphql_shared/utils'; import { __, s__ } from '~/locale'; -import runnersRegistrationTokenResetMutation from '~/runner/graphql/list/runners_registration_token_reset.mutation.graphql'; -import { captureException } from '~/runner/sentry_utils'; +import runnersRegistrationTokenResetMutation from '~/ci/runner/graphql/list/runners_registration_token_reset.mutation.graphql'; +import { captureException } from '~/ci/runner/sentry_utils'; import { INSTANCE_TYPE, GROUP_TYPE, PROJECT_TYPE } from '../../constants'; const i18n = { diff --git a/app/assets/javascripts/runner/components/runner_assigned_item.vue b/app/assets/javascripts/ci/runner/components/runner_assigned_item.vue index 2fa87bdd776..2fa87bdd776 100644 --- a/app/assets/javascripts/runner/components/runner_assigned_item.vue +++ b/app/assets/javascripts/ci/runner/components/runner_assigned_item.vue diff --git a/app/assets/javascripts/runner/components/runner_bulk_delete.vue b/app/assets/javascripts/ci/runner/components/runner_bulk_delete.vue index 703da01d9c8..703da01d9c8 100644 --- a/app/assets/javascripts/runner/components/runner_bulk_delete.vue +++ b/app/assets/javascripts/ci/runner/components/runner_bulk_delete.vue diff --git a/app/assets/javascripts/runner/components/runner_bulk_delete_checkbox.vue b/app/assets/javascripts/ci/runner/components/runner_bulk_delete_checkbox.vue index 75afb7a00bc..75afb7a00bc 100644 --- a/app/assets/javascripts/runner/components/runner_bulk_delete_checkbox.vue +++ b/app/assets/javascripts/ci/runner/components/runner_bulk_delete_checkbox.vue diff --git a/app/assets/javascripts/runner/components/runner_delete_button.vue b/app/assets/javascripts/ci/runner/components/runner_delete_button.vue index b4f022a7d14..13404baad89 100644 --- a/app/assets/javascripts/runner/components/runner_delete_button.vue +++ b/app/assets/javascripts/ci/runner/components/runner_delete_button.vue @@ -1,9 +1,9 @@ <script> import { GlButton, GlModalDirective, GlTooltipDirective } from '@gitlab/ui'; -import runnerDeleteMutation from '~/runner/graphql/shared/runner_delete.mutation.graphql'; +import runnerDeleteMutation from '~/ci/runner/graphql/shared/runner_delete.mutation.graphql'; import { createAlert } from '~/flash'; import { sprintf } from '~/locale'; -import { captureException } from '~/runner/sentry_utils'; +import { captureException } from '~/ci/runner/sentry_utils'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import { I18N_DELETE_RUNNER, I18N_DELETED_TOAST } from '../constants'; import RunnerDeleteModal from './runner_delete_modal.vue'; diff --git a/app/assets/javascripts/runner/components/runner_delete_modal.vue b/app/assets/javascripts/ci/runner/components/runner_delete_modal.vue index 8be216a7eb5..8be216a7eb5 100644 --- a/app/assets/javascripts/runner/components/runner_delete_modal.vue +++ b/app/assets/javascripts/ci/runner/components/runner_delete_modal.vue diff --git a/app/assets/javascripts/runner/components/runner_detail.vue b/app/assets/javascripts/ci/runner/components/runner_detail.vue index c260670b517..c260670b517 100644 --- a/app/assets/javascripts/runner/components/runner_detail.vue +++ b/app/assets/javascripts/ci/runner/components/runner_detail.vue diff --git a/app/assets/javascripts/runner/components/runner_details.vue b/app/assets/javascripts/ci/runner/components/runner_details.vue index 3d72abcd393..6eba8f2e49f 100644 --- a/app/assets/javascripts/runner/components/runner_details.vue +++ b/app/assets/javascripts/ci/runner/components/runner_details.vue @@ -18,13 +18,13 @@ export default { HelpPopover, RunnerDetail, RunnerMaintenanceNoteDetail: () => - import('ee_component/runner/components/runner_maintenance_note_detail.vue'), + import('ee_component/ci/runner/components/runner_maintenance_note_detail.vue'), RunnerGroups, RunnerProjects, RunnerUpgradeStatusBadge: () => - import('ee_component/runner/components/runner_upgrade_status_badge.vue'), + import('ee_component/ci/runner/components/runner_upgrade_status_badge.vue'), RunnerUpgradeStatusAlert: () => - import('ee_component/runner/components/runner_upgrade_status_alert.vue'), + import('ee_component/ci/runner/components/runner_upgrade_status_alert.vue'), RunnerTags, TimeAgo, }, diff --git a/app/assets/javascripts/runner/components/runner_edit_button.vue b/app/assets/javascripts/ci/runner/components/runner_edit_button.vue index 33e0acaf5c0..33e0acaf5c0 100644 --- a/app/assets/javascripts/runner/components/runner_edit_button.vue +++ b/app/assets/javascripts/ci/runner/components/runner_edit_button.vue diff --git a/app/assets/javascripts/runner/components/runner_filtered_search_bar.vue b/app/assets/javascripts/ci/runner/components/runner_filtered_search_bar.vue index da59de9a9eb..ee56fea8282 100644 --- a/app/assets/javascripts/runner/components/runner_filtered_search_bar.vue +++ b/app/assets/javascripts/ci/runner/components/runner_filtered_search_bar.vue @@ -2,7 +2,7 @@ import { cloneDeep } from 'lodash'; import { __ } from '~/locale'; import FilteredSearch from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue'; -import { searchValidator } from '~/runner/runner_search_utils'; +import { searchValidator } from '~/ci/runner/runner_search_utils'; import { CREATED_DESC, CREATED_ASC, CONTACTED_DESC, CONTACTED_ASC } from '../constants'; const sortOptions = [ diff --git a/app/assets/javascripts/runner/components/runner_groups.vue b/app/assets/javascripts/ci/runner/components/runner_groups.vue index c3b35bd52a9..c3b35bd52a9 100644 --- a/app/assets/javascripts/runner/components/runner_groups.vue +++ b/app/assets/javascripts/ci/runner/components/runner_groups.vue diff --git a/app/assets/javascripts/runner/components/runner_header.vue b/app/assets/javascripts/ci/runner/components/runner_header.vue index 874c234ca4c..874c234ca4c 100644 --- a/app/assets/javascripts/runner/components/runner_header.vue +++ b/app/assets/javascripts/ci/runner/components/runner_header.vue diff --git a/app/assets/javascripts/runner/components/runner_jobs.vue b/app/assets/javascripts/ci/runner/components/runner_jobs.vue index 9003eba3636..9003eba3636 100644 --- a/app/assets/javascripts/runner/components/runner_jobs.vue +++ b/app/assets/javascripts/ci/runner/components/runner_jobs.vue diff --git a/app/assets/javascripts/runner/components/runner_jobs_table.vue b/app/assets/javascripts/ci/runner/components/runner_jobs_table.vue index 3941781408a..efa7909c913 100644 --- a/app/assets/javascripts/runner/components/runner_jobs_table.vue +++ b/app/assets/javascripts/ci/runner/components/runner_jobs_table.vue @@ -4,7 +4,7 @@ import { __, s__ } from '~/locale'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import { durationTimeFormatted } from '~/lib/utils/datetime_utility'; import CiBadge from '~/vue_shared/components/ci_badge_link.vue'; -import RunnerTags from '~/runner/components/runner_tags.vue'; +import RunnerTags from '~/ci/runner/components/runner_tags.vue'; import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue'; import { tableField } from '../utils'; import LinkCell from './cells/link_cell.vue'; diff --git a/app/assets/javascripts/runner/components/runner_list.vue b/app/assets/javascripts/ci/runner/components/runner_list.vue index e895537dcdc..e895537dcdc 100644 --- a/app/assets/javascripts/runner/components/runner_list.vue +++ b/app/assets/javascripts/ci/runner/components/runner_list.vue diff --git a/app/assets/javascripts/runner/components/runner_list_empty_state.vue b/app/assets/javascripts/ci/runner/components/runner_list_empty_state.vue index e6576c83e69..e6576c83e69 100644 --- a/app/assets/javascripts/runner/components/runner_list_empty_state.vue +++ b/app/assets/javascripts/ci/runner/components/runner_list_empty_state.vue diff --git a/app/assets/javascripts/runner/components/runner_membership_toggle.vue b/app/assets/javascripts/ci/runner/components/runner_membership_toggle.vue index 2b37b1cc797..2b37b1cc797 100644 --- a/app/assets/javascripts/runner/components/runner_membership_toggle.vue +++ b/app/assets/javascripts/ci/runner/components/runner_membership_toggle.vue diff --git a/app/assets/javascripts/runner/components/runner_name.vue b/app/assets/javascripts/ci/runner/components/runner_name.vue index d4ecfd2d776..d4ecfd2d776 100644 --- a/app/assets/javascripts/runner/components/runner_name.vue +++ b/app/assets/javascripts/ci/runner/components/runner_name.vue diff --git a/app/assets/javascripts/runner/components/runner_pagination.vue b/app/assets/javascripts/ci/runner/components/runner_pagination.vue index a5bf3074dd1..a5bf3074dd1 100644 --- a/app/assets/javascripts/runner/components/runner_pagination.vue +++ b/app/assets/javascripts/ci/runner/components/runner_pagination.vue diff --git a/app/assets/javascripts/runner/components/runner_pause_button.vue b/app/assets/javascripts/ci/runner/components/runner_pause_button.vue index 334e5f6023a..2c80518e772 100644 --- a/app/assets/javascripts/runner/components/runner_pause_button.vue +++ b/app/assets/javascripts/ci/runner/components/runner_pause_button.vue @@ -1,8 +1,8 @@ <script> import { GlButton, GlTooltipDirective } from '@gitlab/ui'; -import runnerToggleActiveMutation from '~/runner/graphql/shared/runner_toggle_active.mutation.graphql'; +import runnerToggleActiveMutation from '~/ci/runner/graphql/shared/runner_toggle_active.mutation.graphql'; import { createAlert } from '~/flash'; -import { captureException } from '~/runner/sentry_utils'; +import { captureException } from '~/ci/runner/sentry_utils'; import { I18N_PAUSE, I18N_PAUSE_TOOLTIP, I18N_RESUME, I18N_RESUME_TOOLTIP } from '../constants'; export default { diff --git a/app/assets/javascripts/runner/components/runner_paused_badge.vue b/app/assets/javascripts/ci/runner/components/runner_paused_badge.vue index 00fd84a48d8..00fd84a48d8 100644 --- a/app/assets/javascripts/runner/components/runner_paused_badge.vue +++ b/app/assets/javascripts/ci/runner/components/runner_paused_badge.vue diff --git a/app/assets/javascripts/runner/components/runner_projects.vue b/app/assets/javascripts/ci/runner/components/runner_projects.vue index 84008e8eee8..84008e8eee8 100644 --- a/app/assets/javascripts/runner/components/runner_projects.vue +++ b/app/assets/javascripts/ci/runner/components/runner_projects.vue diff --git a/app/assets/javascripts/runner/components/runner_status_badge.vue b/app/assets/javascripts/ci/runner/components/runner_status_badge.vue index d084408781e..d084408781e 100644 --- a/app/assets/javascripts/runner/components/runner_status_badge.vue +++ b/app/assets/javascripts/ci/runner/components/runner_status_badge.vue diff --git a/app/assets/javascripts/runner/components/runner_status_popover.vue b/app/assets/javascripts/ci/runner/components/runner_status_popover.vue index 5b22f7828a1..06174d39a59 100644 --- a/app/assets/javascripts/runner/components/runner_status_popover.vue +++ b/app/assets/javascripts/ci/runner/components/runner_status_popover.vue @@ -12,7 +12,7 @@ import { I18N_STATUS_POPOVER_OFFLINE_DESCRIPTION, I18N_STATUS_POPOVER_STALE, I18N_STATUS_POPOVER_STALE_DESCRIPTION, -} from '~/runner/constants'; +} from '~/ci/runner/constants'; export default { name: 'RunnerStatusPopover', diff --git a/app/assets/javascripts/runner/components/runner_tag.vue b/app/assets/javascripts/ci/runner/components/runner_tag.vue index 6ad2023a866..6ad2023a866 100644 --- a/app/assets/javascripts/runner/components/runner_tag.vue +++ b/app/assets/javascripts/ci/runner/components/runner_tag.vue diff --git a/app/assets/javascripts/runner/components/runner_tags.vue b/app/assets/javascripts/ci/runner/components/runner_tags.vue index 38e566f9f53..38e566f9f53 100644 --- a/app/assets/javascripts/runner/components/runner_tags.vue +++ b/app/assets/javascripts/ci/runner/components/runner_tags.vue diff --git a/app/assets/javascripts/runner/components/runner_type_badge.vue b/app/assets/javascripts/ci/runner/components/runner_type_badge.vue index f568f914004..f568f914004 100644 --- a/app/assets/javascripts/runner/components/runner_type_badge.vue +++ b/app/assets/javascripts/ci/runner/components/runner_type_badge.vue diff --git a/app/assets/javascripts/runner/components/runner_type_tabs.vue b/app/assets/javascripts/ci/runner/components/runner_type_tabs.vue index 6b9e3bf91ad..584236168ac 100644 --- a/app/assets/javascripts/runner/components/runner_type_tabs.vue +++ b/app/assets/javascripts/ci/runner/components/runner_type_tabs.vue @@ -1,6 +1,6 @@ <script> import { GlBadge, GlTabs, GlTab } from '@gitlab/ui'; -import { searchValidator } from '~/runner/runner_search_utils'; +import { searchValidator } from '~/ci/runner/runner_search_utils'; import { formatNumber } from '~/locale'; import { INSTANCE_TYPE, diff --git a/app/assets/javascripts/runner/components/runner_update_form.vue b/app/assets/javascripts/ci/runner/components/runner_update_form.vue index c613e2d2467..a9790d06ca7 100644 --- a/app/assets/javascripts/runner/components/runner_update_form.vue +++ b/app/assets/javascripts/ci/runner/components/runner_update_form.vue @@ -12,11 +12,11 @@ import { import { modelToUpdateMutationVariables, runnerToModel, -} from 'ee_else_ce/runner/runner_update_form_utils'; +} from 'ee_else_ce/ci/runner/runner_update_form_utils'; import { createAlert, VARIANT_SUCCESS } from '~/flash'; import { redirectTo } from '~/lib/utils/url_utility'; import { __ } from '~/locale'; -import { captureException } from '~/runner/sentry_utils'; +import { captureException } from '~/ci/runner/sentry_utils'; import { ACCESS_LEVEL_NOT_PROTECTED, ACCESS_LEVEL_REF_PROTECTED, PROJECT_TYPE } from '../constants'; import runnerUpdateMutation from '../graphql/edit/runner_update.mutation.graphql'; import { saveAlertToLocalStorage } from '../local_storage_alert/save_alert_to_local_storage'; @@ -32,9 +32,9 @@ export default { GlFormInputGroup, GlSkeletonLoader, RunnerMaintenanceNoteField: () => - import('ee_component/runner/components/runner_maintenance_note_field.vue'), + import('ee_component/ci/runner/components/runner_maintenance_note_field.vue'), RunnerUpdateCostFactorFields: () => - import('ee_component/runner/components/runner_update_cost_factor_fields.vue'), + import('ee_component/ci/runner/components/runner_update_cost_factor_fields.vue'), }, directives: { GlTooltip: GlTooltipDirective, diff --git a/app/assets/javascripts/runner/components/search_tokens/paused_token_config.js b/app/assets/javascripts/ci/runner/components/search_tokens/paused_token_config.js index 97ee8ec3eef..97ee8ec3eef 100644 --- a/app/assets/javascripts/runner/components/search_tokens/paused_token_config.js +++ b/app/assets/javascripts/ci/runner/components/search_tokens/paused_token_config.js diff --git a/app/assets/javascripts/runner/components/search_tokens/status_token_config.js b/app/assets/javascripts/ci/runner/components/search_tokens/status_token_config.js index f5c42d120fb..f5c42d120fb 100644 --- a/app/assets/javascripts/runner/components/search_tokens/status_token_config.js +++ b/app/assets/javascripts/ci/runner/components/search_tokens/status_token_config.js diff --git a/app/assets/javascripts/runner/components/search_tokens/tag_token.vue b/app/assets/javascripts/ci/runner/components/search_tokens/tag_token.vue index 6e7c41885f8..6e7c41885f8 100644 --- a/app/assets/javascripts/runner/components/search_tokens/tag_token.vue +++ b/app/assets/javascripts/ci/runner/components/search_tokens/tag_token.vue diff --git a/app/assets/javascripts/runner/components/search_tokens/tag_token_config.js b/app/assets/javascripts/ci/runner/components/search_tokens/tag_token_config.js index fdeba714385..fdeba714385 100644 --- a/app/assets/javascripts/runner/components/search_tokens/tag_token_config.js +++ b/app/assets/javascripts/ci/runner/components/search_tokens/tag_token_config.js diff --git a/app/assets/javascripts/runner/components/search_tokens/upgrade_status_token_config.js b/app/assets/javascripts/ci/runner/components/search_tokens/upgrade_status_token_config.js index 17ee7073360..17ee7073360 100644 --- a/app/assets/javascripts/runner/components/search_tokens/upgrade_status_token_config.js +++ b/app/assets/javascripts/ci/runner/components/search_tokens/upgrade_status_token_config.js diff --git a/app/assets/javascripts/runner/components/stat/runner_count.vue b/app/assets/javascripts/ci/runner/components/stat/runner_count.vue index 37c6f922f9a..4ad9259f59d 100644 --- a/app/assets/javascripts/runner/components/stat/runner_count.vue +++ b/app/assets/javascripts/ci/runner/components/stat/runner_count.vue @@ -1,7 +1,7 @@ <script> import { fetchPolicies } from '~/lib/graphql'; -import allRunnersCountQuery from 'ee_else_ce/runner/graphql/list/all_runners_count.query.graphql'; -import groupRunnersCountQuery from 'ee_else_ce/runner/graphql/list/group_runners_count.query.graphql'; +import allRunnersCountQuery from 'ee_else_ce/ci/runner/graphql/list/all_runners_count.query.graphql'; +import groupRunnersCountQuery from 'ee_else_ce/ci/runner/graphql/list/group_runners_count.query.graphql'; import { captureException } from '../../sentry_utils'; import { INSTANCE_TYPE, GROUP_TYPE } from '../../constants'; diff --git a/app/assets/javascripts/runner/components/stat/runner_single_stat.vue b/app/assets/javascripts/ci/runner/components/stat/runner_single_stat.vue index ae732b052ac..ae732b052ac 100644 --- a/app/assets/javascripts/runner/components/stat/runner_single_stat.vue +++ b/app/assets/javascripts/ci/runner/components/stat/runner_single_stat.vue diff --git a/app/assets/javascripts/runner/components/stat/runner_stats.vue b/app/assets/javascripts/ci/runner/components/stat/runner_stats.vue index 4df59f5a0c9..3965e5551f1 100644 --- a/app/assets/javascripts/runner/components/stat/runner_stats.vue +++ b/app/assets/javascripts/ci/runner/components/stat/runner_stats.vue @@ -1,5 +1,5 @@ <script> -import RunnerSingleStat from '~/runner/components/stat/runner_single_stat.vue'; +import RunnerSingleStat from '~/ci/runner/components/stat/runner_single_stat.vue'; import { I18N_STATUS_ONLINE, I18N_STATUS_OFFLINE, @@ -13,7 +13,7 @@ export default { components: { RunnerSingleStat, RunnerUpgradeStatusStats: () => - import('ee_component/runner/components/stat/runner_upgrade_status_stats.vue'), + import('ee_component/ci/runner/components/stat/runner_upgrade_status_stats.vue'), }, props: { scope: { diff --git a/app/assets/javascripts/runner/constants.js b/app/assets/javascripts/ci/runner/constants.js index dfc5f0c4152..dfc5f0c4152 100644 --- a/app/assets/javascripts/runner/constants.js +++ b/app/assets/javascripts/ci/runner/constants.js diff --git a/app/assets/javascripts/runner/graphql/edit/runner_fields.fragment.graphql b/app/assets/javascripts/ci/runner/graphql/edit/runner_fields.fragment.graphql index b732d587d70..b732d587d70 100644 --- a/app/assets/javascripts/runner/graphql/edit/runner_fields.fragment.graphql +++ b/app/assets/javascripts/ci/runner/graphql/edit/runner_fields.fragment.graphql diff --git a/app/assets/javascripts/runner/graphql/edit/runner_fields_shared.fragment.graphql b/app/assets/javascripts/ci/runner/graphql/edit/runner_fields_shared.fragment.graphql index 29abddf84f5..29abddf84f5 100644 --- a/app/assets/javascripts/runner/graphql/edit/runner_fields_shared.fragment.graphql +++ b/app/assets/javascripts/ci/runner/graphql/edit/runner_fields_shared.fragment.graphql diff --git a/app/assets/javascripts/runner/graphql/edit/runner_form.query.graphql b/app/assets/javascripts/ci/runner/graphql/edit/runner_form.query.graphql index 0bf66c223fc..5599c147c56 100644 --- a/app/assets/javascripts/runner/graphql/edit/runner_form.query.graphql +++ b/app/assets/javascripts/ci/runner/graphql/edit/runner_form.query.graphql @@ -1,4 +1,4 @@ -#import "ee_else_ce/runner/graphql/edit/runner_fields.fragment.graphql" +#import "ee_else_ce/ci/runner/graphql/edit/runner_fields.fragment.graphql" query getRunnerForm($id: CiRunnerID!) { runner(id: $id) { diff --git a/app/assets/javascripts/runner/graphql/edit/runner_update.mutation.graphql b/app/assets/javascripts/ci/runner/graphql/edit/runner_update.mutation.graphql index 8694a51b5a4..9469078c317 100644 --- a/app/assets/javascripts/runner/graphql/edit/runner_update.mutation.graphql +++ b/app/assets/javascripts/ci/runner/graphql/edit/runner_update.mutation.graphql @@ -1,4 +1,4 @@ -#import "ee_else_ce/runner/graphql/edit/runner_fields.fragment.graphql" +#import "ee_else_ce/ci/runner/graphql/edit/runner_fields.fragment.graphql" # Mutation for updates from the runner form, loads # attributes shown in the runner details. diff --git a/app/assets/javascripts/runner/graphql/list/all_runners.query.graphql b/app/assets/javascripts/ci/runner/graphql/list/all_runners.query.graphql index 1160596aff3..15401c25c64 100644 --- a/app/assets/javascripts/runner/graphql/list/all_runners.query.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/all_runners.query.graphql @@ -1,4 +1,4 @@ -#import "~/runner/graphql/list/all_runners_connection.fragment.graphql" +#import "~/ci/runner/graphql/list/all_runners_connection.fragment.graphql" query getAllRunners( $before: String diff --git a/app/assets/javascripts/runner/graphql/list/all_runners_connection.fragment.graphql b/app/assets/javascripts/ci/runner/graphql/list/all_runners_connection.fragment.graphql index 4440b8e98da..39d79df02e7 100644 --- a/app/assets/javascripts/runner/graphql/list/all_runners_connection.fragment.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/all_runners_connection.fragment.graphql @@ -1,4 +1,4 @@ -#import "ee_else_ce/runner/graphql/list/list_item.fragment.graphql" +#import "ee_else_ce/ci/runner/graphql/list/list_item.fragment.graphql" #import "~/graphql_shared/fragments/page_info.fragment.graphql" fragment AllRunnersConnection on CiRunnerConnection { diff --git a/app/assets/javascripts/runner/graphql/list/all_runners_count.query.graphql b/app/assets/javascripts/ci/runner/graphql/list/all_runners_count.query.graphql index 82591b88d3e..82591b88d3e 100644 --- a/app/assets/javascripts/runner/graphql/list/all_runners_count.query.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/all_runners_count.query.graphql diff --git a/app/assets/javascripts/runner/graphql/list/bulk_runner_delete.mutation.graphql b/app/assets/javascripts/ci/runner/graphql/list/bulk_runner_delete.mutation.graphql index b73c016b1de..b73c016b1de 100644 --- a/app/assets/javascripts/runner/graphql/list/bulk_runner_delete.mutation.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/bulk_runner_delete.mutation.graphql diff --git a/app/assets/javascripts/runner/graphql/list/checked_runner_ids.query.graphql b/app/assets/javascripts/ci/runner/graphql/list/checked_runner_ids.query.graphql index c01f1edb451..c01f1edb451 100644 --- a/app/assets/javascripts/runner/graphql/list/checked_runner_ids.query.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/checked_runner_ids.query.graphql diff --git a/app/assets/javascripts/runner/graphql/list/group_runner_connection.fragment.graphql b/app/assets/javascripts/ci/runner/graphql/list/group_runner_connection.fragment.graphql index baef16a4b41..53be8fdc613 100644 --- a/app/assets/javascripts/runner/graphql/list/group_runner_connection.fragment.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/group_runner_connection.fragment.graphql @@ -1,4 +1,4 @@ -#import "ee_else_ce/runner/graphql/list/list_item.fragment.graphql" +#import "ee_else_ce/ci/runner/graphql/list/list_item.fragment.graphql" #import "~/graphql_shared/fragments/page_info.fragment.graphql" fragment GroupRunnerConnection on CiRunnerConnection { diff --git a/app/assets/javascripts/runner/graphql/list/group_runners.query.graphql b/app/assets/javascripts/ci/runner/graphql/list/group_runners.query.graphql index 95f9dd1beb9..08fd8974826 100644 --- a/app/assets/javascripts/runner/graphql/list/group_runners.query.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/group_runners.query.graphql @@ -1,4 +1,4 @@ -#import "~/runner/graphql/list/group_runner_connection.fragment.graphql" +#import "~/ci/runner/graphql/list/group_runner_connection.fragment.graphql" query getGroupRunners( $groupFullPath: ID! diff --git a/app/assets/javascripts/runner/graphql/list/group_runners_count.query.graphql b/app/assets/javascripts/ci/runner/graphql/list/group_runners_count.query.graphql index e88a2c2e7e6..e88a2c2e7e6 100644 --- a/app/assets/javascripts/runner/graphql/list/group_runners_count.query.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/group_runners_count.query.graphql diff --git a/app/assets/javascripts/runner/graphql/list/list_item.fragment.graphql b/app/assets/javascripts/ci/runner/graphql/list/list_item.fragment.graphql index 19a5a48ea75..19a5a48ea75 100644 --- a/app/assets/javascripts/runner/graphql/list/list_item.fragment.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/list_item.fragment.graphql diff --git a/app/assets/javascripts/runner/graphql/list/list_item_shared.fragment.graphql b/app/assets/javascripts/ci/runner/graphql/list/list_item_shared.fragment.graphql index 0dff011daaa..0dff011daaa 100644 --- a/app/assets/javascripts/runner/graphql/list/list_item_shared.fragment.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/list_item_shared.fragment.graphql diff --git a/app/assets/javascripts/runner/graphql/list/local_state.js b/app/assets/javascripts/ci/runner/graphql/list/local_state.js index e0477c660b4..ab53bfdbd5b 100644 --- a/app/assets/javascripts/runner/graphql/list/local_state.js +++ b/app/assets/javascripts/ci/runner/graphql/list/local_state.js @@ -8,7 +8,7 @@ import typeDefs from './typedefs.graphql'; * Usage: * * ``` - * import { createLocalState } from '~/runner/graphql/list/local_state'; + * import { createLocalState } from '~/ci/runner/graphql/list/local_state'; * * // initialize local state * const { cacheConfig, typeDefs, localMutations } = createLocalState(); diff --git a/app/assets/javascripts/runner/graphql/list/runners_registration_token_reset.mutation.graphql b/app/assets/javascripts/ci/runner/graphql/list/runners_registration_token_reset.mutation.graphql index 9c2797732ad..9c2797732ad 100644 --- a/app/assets/javascripts/runner/graphql/list/runners_registration_token_reset.mutation.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/runners_registration_token_reset.mutation.graphql diff --git a/app/assets/javascripts/runner/graphql/list/typedefs.graphql b/app/assets/javascripts/ci/runner/graphql/list/typedefs.graphql index 24e9e20cc8c..24e9e20cc8c 100644 --- a/app/assets/javascripts/runner/graphql/list/typedefs.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/typedefs.graphql diff --git a/app/assets/javascripts/runner/graphql/shared/runner_delete.mutation.graphql b/app/assets/javascripts/ci/runner/graphql/shared/runner_delete.mutation.graphql index d580ea2785e..d580ea2785e 100644 --- a/app/assets/javascripts/runner/graphql/shared/runner_delete.mutation.graphql +++ b/app/assets/javascripts/ci/runner/graphql/shared/runner_delete.mutation.graphql diff --git a/app/assets/javascripts/runner/graphql/shared/runner_toggle_active.mutation.graphql b/app/assets/javascripts/ci/runner/graphql/shared/runner_toggle_active.mutation.graphql index 9b15570dbc0..9b15570dbc0 100644 --- a/app/assets/javascripts/runner/graphql/shared/runner_toggle_active.mutation.graphql +++ b/app/assets/javascripts/ci/runner/graphql/shared/runner_toggle_active.mutation.graphql diff --git a/app/assets/javascripts/runner/graphql/show/runner.query.graphql b/app/assets/javascripts/ci/runner/graphql/show/runner.query.graphql index dec434b43a5..6375b4f35a4 100644 --- a/app/assets/javascripts/runner/graphql/show/runner.query.graphql +++ b/app/assets/javascripts/ci/runner/graphql/show/runner.query.graphql @@ -1,4 +1,4 @@ -#import "ee_else_ce/runner/graphql/show/runner_details.fragment.graphql" +#import "ee_else_ce/ci/runner/graphql/show/runner_details.fragment.graphql" query getRunner($id: CiRunnerID!) { runner(id: $id) { diff --git a/app/assets/javascripts/runner/graphql/show/runner_details.fragment.graphql b/app/assets/javascripts/ci/runner/graphql/show/runner_details.fragment.graphql index 2449ee0fc0f..2449ee0fc0f 100644 --- a/app/assets/javascripts/runner/graphql/show/runner_details.fragment.graphql +++ b/app/assets/javascripts/ci/runner/graphql/show/runner_details.fragment.graphql diff --git a/app/assets/javascripts/runner/graphql/show/runner_details_shared.fragment.graphql b/app/assets/javascripts/ci/runner/graphql/show/runner_details_shared.fragment.graphql index b5689ff7687..b5689ff7687 100644 --- a/app/assets/javascripts/runner/graphql/show/runner_details_shared.fragment.graphql +++ b/app/assets/javascripts/ci/runner/graphql/show/runner_details_shared.fragment.graphql diff --git a/app/assets/javascripts/runner/graphql/show/runner_jobs.query.graphql b/app/assets/javascripts/ci/runner/graphql/show/runner_jobs.query.graphql index edfc22f644b..edfc22f644b 100644 --- a/app/assets/javascripts/runner/graphql/show/runner_jobs.query.graphql +++ b/app/assets/javascripts/ci/runner/graphql/show/runner_jobs.query.graphql diff --git a/app/assets/javascripts/runner/graphql/show/runner_projects.query.graphql b/app/assets/javascripts/ci/runner/graphql/show/runner_projects.query.graphql index e42648b3079..e42648b3079 100644 --- a/app/assets/javascripts/runner/graphql/show/runner_projects.query.graphql +++ b/app/assets/javascripts/ci/runner/graphql/show/runner_projects.query.graphql diff --git a/app/assets/javascripts/runner/group_runner_show/group_runner_show_app.vue b/app/assets/javascripts/ci/runner/group_runner_show/group_runner_show_app.vue index 75138b1bd81..75138b1bd81 100644 --- a/app/assets/javascripts/runner/group_runner_show/group_runner_show_app.vue +++ b/app/assets/javascripts/ci/runner/group_runner_show/group_runner_show_app.vue diff --git a/app/assets/javascripts/runner/group_runner_show/index.js b/app/assets/javascripts/ci/runner/group_runner_show/index.js index e75f337b38e..e75f337b38e 100644 --- a/app/assets/javascripts/runner/group_runner_show/index.js +++ b/app/assets/javascripts/ci/runner/group_runner_show/index.js diff --git a/app/assets/javascripts/runner/group_runners/group_runners_app.vue b/app/assets/javascripts/ci/runner/group_runners/group_runners_app.vue index a3373631c0e..ccccd9fd1b6 100644 --- a/app/assets/javascripts/runner/group_runners/group_runners_app.vue +++ b/app/assets/javascripts/ci/runner/group_runners/group_runners_app.vue @@ -3,16 +3,16 @@ import { GlLink } from '@gitlab/ui'; import { createAlert } from '~/flash'; import { updateHistory } from '~/lib/utils/url_utility'; import { fetchPolicies } from '~/lib/graphql'; -import { upgradeStatusTokenConfig } from 'ee_else_ce/runner/components/search_tokens/upgrade_status_token_config'; +import { upgradeStatusTokenConfig } from 'ee_else_ce/ci/runner/components/search_tokens/upgrade_status_token_config'; import { fromUrlQueryToSearch, fromSearchToUrl, fromSearchToVariables, isSearchFiltered, -} from 'ee_else_ce/runner/runner_search_utils'; +} from 'ee_else_ce/ci/runner/runner_search_utils'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; -import groupRunnersQuery from 'ee_else_ce/runner/graphql/list/group_runners.query.graphql'; -import groupRunnersCountQuery from 'ee_else_ce/runner/graphql/list/group_runners_count.query.graphql'; +import groupRunnersCountQuery from 'ee_else_ce/ci/runner/graphql/list/group_runners_count.query.graphql'; +import groupRunnersQuery from 'ee_else_ce/ci/runner/graphql/list/group_runners.query.graphql'; import RegistrationDropdown from '../components/registration/registration_dropdown.vue'; import RunnerFilteredSearchBar from '../components/runner_filtered_search_bar.vue'; diff --git a/app/assets/javascripts/runner/group_runners/index.js b/app/assets/javascripts/ci/runner/group_runners/index.js index 0e7efd2b8a1..0e7efd2b8a1 100644 --- a/app/assets/javascripts/runner/group_runners/index.js +++ b/app/assets/javascripts/ci/runner/group_runners/index.js diff --git a/app/assets/javascripts/runner/local_storage_alert/constants.js b/app/assets/javascripts/ci/runner/local_storage_alert/constants.js index 69b7418f898..69b7418f898 100644 --- a/app/assets/javascripts/runner/local_storage_alert/constants.js +++ b/app/assets/javascripts/ci/runner/local_storage_alert/constants.js diff --git a/app/assets/javascripts/runner/local_storage_alert/save_alert_to_local_storage.js b/app/assets/javascripts/ci/runner/local_storage_alert/save_alert_to_local_storage.js index ca7c627459a..ca7c627459a 100644 --- a/app/assets/javascripts/runner/local_storage_alert/save_alert_to_local_storage.js +++ b/app/assets/javascripts/ci/runner/local_storage_alert/save_alert_to_local_storage.js diff --git a/app/assets/javascripts/runner/local_storage_alert/show_alert_from_local_storage.js b/app/assets/javascripts/ci/runner/local_storage_alert/show_alert_from_local_storage.js index d768a06494a..d768a06494a 100644 --- a/app/assets/javascripts/runner/local_storage_alert/show_alert_from_local_storage.js +++ b/app/assets/javascripts/ci/runner/local_storage_alert/show_alert_from_local_storage.js diff --git a/app/assets/javascripts/runner/runner_edit/index.js b/app/assets/javascripts/ci/runner/runner_edit/index.js index 5b2ddb8f68e..5b2ddb8f68e 100644 --- a/app/assets/javascripts/runner/runner_edit/index.js +++ b/app/assets/javascripts/ci/runner/runner_edit/index.js diff --git a/app/assets/javascripts/runner/runner_edit/runner_edit_app.vue b/app/assets/javascripts/ci/runner/runner_edit/runner_edit_app.vue index 879162916a9..879162916a9 100644 --- a/app/assets/javascripts/runner/runner_edit/runner_edit_app.vue +++ b/app/assets/javascripts/ci/runner/runner_edit/runner_edit_app.vue diff --git a/app/assets/javascripts/runner/runner_search_utils.js b/app/assets/javascripts/ci/runner/runner_search_utils.js index adc832b0600..adc832b0600 100644 --- a/app/assets/javascripts/runner/runner_search_utils.js +++ b/app/assets/javascripts/ci/runner/runner_search_utils.js diff --git a/app/assets/javascripts/runner/runner_update_form_utils.js b/app/assets/javascripts/ci/runner/runner_update_form_utils.js index 3b519fa7d71..3b519fa7d71 100644 --- a/app/assets/javascripts/runner/runner_update_form_utils.js +++ b/app/assets/javascripts/ci/runner/runner_update_form_utils.js diff --git a/app/assets/javascripts/runner/sentry_utils.js b/app/assets/javascripts/ci/runner/sentry_utils.js index 29de1f9adae..29de1f9adae 100644 --- a/app/assets/javascripts/runner/sentry_utils.js +++ b/app/assets/javascripts/ci/runner/sentry_utils.js diff --git a/app/assets/javascripts/runner/utils.js b/app/assets/javascripts/ci/runner/utils.js index 1ca0a9e86b5..1ca0a9e86b5 100644 --- a/app/assets/javascripts/runner/utils.js +++ b/app/assets/javascripts/ci/runner/utils.js diff --git a/app/assets/javascripts/gitlab_version_check.js b/app/assets/javascripts/gitlab_version_check.js index 2892aded7c5..24dc0294875 100644 --- a/app/assets/javascripts/gitlab_version_check.js +++ b/app/assets/javascripts/gitlab_version_check.js @@ -1,8 +1,10 @@ import Vue from 'vue'; import GitlabVersionCheck from '~/vue_shared/components/gitlab_version_check.vue'; +import { parseBoolean } from '~/lib/utils/common_utils'; const mountGitlabVersionCheck = (el) => { const { size } = el.dataset; + const actionable = parseBoolean(el.dataset.actionable); return new Vue({ el, @@ -10,6 +12,7 @@ const mountGitlabVersionCheck = (el) => { return createElement(GitlabVersionCheck, { props: { size, + actionable, }, }); }, diff --git a/app/assets/javascripts/pages/admin/runners/edit/index.js b/app/assets/javascripts/pages/admin/runners/edit/index.js index 03d31f49a99..dcce2a8dafd 100644 --- a/app/assets/javascripts/pages/admin/runners/edit/index.js +++ b/app/assets/javascripts/pages/admin/runners/edit/index.js @@ -1,3 +1,3 @@ -import { initRunnerEdit } from '~/runner/runner_edit'; +import { initRunnerEdit } from '~/ci/runner/runner_edit'; initRunnerEdit('#js-admin-runner-edit'); diff --git a/app/assets/javascripts/pages/admin/runners/index/index.js b/app/assets/javascripts/pages/admin/runners/index/index.js index f83111b6385..bc7b1421b31 100644 --- a/app/assets/javascripts/pages/admin/runners/index/index.js +++ b/app/assets/javascripts/pages/admin/runners/index/index.js @@ -1,3 +1,3 @@ -import { initAdminRunners } from '~/runner/admin_runners'; +import { initAdminRunners } from '~/ci/runner/admin_runners'; initAdminRunners(); diff --git a/app/assets/javascripts/pages/admin/runners/show/index.js b/app/assets/javascripts/pages/admin/runners/show/index.js index f76f3a2430d..fd38abf221a 100644 --- a/app/assets/javascripts/pages/admin/runners/show/index.js +++ b/app/assets/javascripts/pages/admin/runners/show/index.js @@ -1,3 +1,3 @@ -import { initAdminRunnerShow } from '~/runner/admin_runner_show'; +import { initAdminRunnerShow } from '~/ci/runner/admin_runner_show'; initAdminRunnerShow(); diff --git a/app/assets/javascripts/pages/groups/runners/edit/index.js b/app/assets/javascripts/pages/groups/runners/edit/index.js index febb0026b67..08ae57866e2 100644 --- a/app/assets/javascripts/pages/groups/runners/edit/index.js +++ b/app/assets/javascripts/pages/groups/runners/edit/index.js @@ -1,3 +1,3 @@ -import { initRunnerEdit } from '~/runner/runner_edit'; +import { initRunnerEdit } from '~/ci/runner/runner_edit'; initRunnerEdit('#js-group-runner-edit'); diff --git a/app/assets/javascripts/pages/groups/runners/index/index.js b/app/assets/javascripts/pages/groups/runners/index/index.js index ca1a6bdab75..1cc07d1069a 100644 --- a/app/assets/javascripts/pages/groups/runners/index/index.js +++ b/app/assets/javascripts/pages/groups/runners/index/index.js @@ -1,3 +1,3 @@ -import { initGroupRunners } from '~/runner/group_runners'; +import { initGroupRunners } from '~/ci/runner/group_runners'; initGroupRunners(); diff --git a/app/assets/javascripts/pages/groups/runners/show/index.js b/app/assets/javascripts/pages/groups/runners/show/index.js index c59e3b80dc1..755e38004ad 100644 --- a/app/assets/javascripts/pages/groups/runners/show/index.js +++ b/app/assets/javascripts/pages/groups/runners/show/index.js @@ -1,3 +1,3 @@ -import { initGroupRunnerShow } from '~/runner/group_runner_show'; +import { initGroupRunnerShow } from '~/ci/runner/group_runner_show'; initGroupRunnerShow(); diff --git a/app/assets/javascripts/vue_shared/components/gitlab_version_check.vue b/app/assets/javascripts/vue_shared/components/gitlab_version_check.vue index c2be5e4f7a1..60282d435e0 100644 --- a/app/assets/javascripts/vue_shared/components/gitlab_version_check.vue +++ b/app/assets/javascripts/vue_shared/components/gitlab_version_check.vue @@ -26,6 +26,11 @@ export default { required: false, default: 'md', }, + actionable: { + type: Boolean, + required: false, + default: false, + }, }, data() { return { @@ -44,6 +49,9 @@ export default { return null; }, + badgeUrl() { + return this.actionable ? UPGRADE_DOCS_URL : null; + }, }, created() { this.checkGitlabVersion(); @@ -67,6 +75,8 @@ export default { }); }, onClick() { + if (!this.actionable) return; + this.track('click_version_badge', { label: this.title }); }, }, @@ -78,12 +88,8 @@ export default { <!-- TODO: remove the span element once bootstrap-vue is updated to version 2.21.1 --> <!-- TODO: https://github.com/bootstrap-vue/bootstrap-vue/issues/6219 --> <span v-if="status" data-testid="badge-click-wrapper" @click="onClick"> - <gl-badge - :href="$options.UPGRADE_DOCS_URL" - class="version-check-badge" - :variant="status" - :size="size" - >{{ title }}</gl-badge - > + <gl-badge :href="badgeUrl" class="version-check-badge" :variant="status" :size="size">{{ + title + }}</gl-badge> </span> </template> diff --git a/app/assets/stylesheets/_page_specific_files.scss b/app/assets/stylesheets/_page_specific_files.scss index 21d9db26382..4a9a79e3b07 100644 --- a/app/assets/stylesheets/_page_specific_files.scss +++ b/app/assets/stylesheets/_page_specific_files.scss @@ -13,7 +13,6 @@ @import './pages/monitor'; @import './pages/note_form'; @import './pages/notes'; -@import './pages/notifications'; @import './pages/pipelines'; @import './pages/profile'; @import './pages/projects'; diff --git a/app/assets/stylesheets/pages/notifications.scss b/app/assets/stylesheets/page_bundles/notifications.scss index 2fd2757cf08..88437954f4c 100644 --- a/app/assets/stylesheets/pages/notifications.scss +++ b/app/assets/stylesheets/page_bundles/notifications.scss @@ -1,3 +1,5 @@ +@import 'mixins_and_variables_and_functions'; + .notification-list-item { @include media-breakpoint-down(sm) { .notification-dropdown { diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index 955dcdc1c0f..fa3c87490f1 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -6,7 +6,7 @@ $system-note-svg-size: 1rem; content: ''; border-left: 2px solid var(--gray-10, $gray-10); position: absolute; - top: 0; + top: $gl-padding-6; bottom: 0; left: calc(#{$left} - 1px); height: calc(100% + 1.5rem); @@ -421,7 +421,7 @@ $system-note-svg-size: 1rem; height: $system-note-icon-size; border: 1px solid $gray-10; border-radius: $system-note-icon-size; - margin: -8px 0 0; + margin: -6px 0 0; svg { width: $system-note-svg-size; diff --git a/app/models/hooks/web_hook.rb b/app/models/hooks/web_hook.rb index 2822e3131f8..76bf75016a6 100644 --- a/app/models/hooks/web_hook.rb +++ b/app/models/hooks/web_hook.rb @@ -7,6 +7,7 @@ class WebHook < ApplicationRecord MAX_FAILURES = 100 FAILURE_THRESHOLD = 3 # three strikes + EXCEEDED_FAILURE_THRESHOLD = FAILURE_THRESHOLD + 1 INITIAL_BACKOFF = 1.minute MAX_BACKOFF = 1.day BACKOFF_GROWTH_FACTOR = 2.0 @@ -119,7 +120,7 @@ class WebHook < ApplicationRecord def disable! return if permanently_disabled? - update_attribute(:recent_failures, FAILURE_THRESHOLD + 1) + update_attribute(:recent_failures, EXCEEDED_FAILURE_THRESHOLD) end def enable! @@ -134,10 +135,10 @@ class WebHook < ApplicationRecord def backoff! return if permanently_disabled? || (backoff_count >= MAX_FAILURES && temporarily_disabled?) - attrs = { recent_failures: recent_failures + 1 } + attrs = { recent_failures: next_failure_count } if recent_failures >= FAILURE_THRESHOLD - attrs[:backoff_count] = backoff_count.succ.clamp(1, MAX_FAILURES) + attrs[:backoff_count] = next_backoff_count attrs[:disabled_until] = next_backoff.from_now end @@ -148,7 +149,7 @@ class WebHook < ApplicationRecord def failed! return unless recent_failures < MAX_FAILURES - assign_attributes(disabled_until: nil, backoff_count: 0, recent_failures: recent_failures + 1) + assign_attributes(disabled_until: nil, backoff_count: 0, recent_failures: next_failure_count) save(validate: false) end @@ -211,6 +212,14 @@ class WebHook < ApplicationRecord private + def next_failure_count + recent_failures.succ.clamp(1, MAX_FAILURES) + end + + def next_backoff_count + backoff_count.succ.clamp(1, MAX_FAILURES) + end + def web_hooks_disable_failed? self.class.web_hooks_disable_failed?(self) end diff --git a/app/services/incident_management/timeline_events/create_service.rb b/app/services/incident_management/timeline_events/create_service.rb index 5422b4ad6d2..bf3de5c9293 100644 --- a/app/services/incident_management/timeline_events/create_service.rb +++ b/app/services/incident_management/timeline_events/create_service.rb @@ -49,6 +49,16 @@ module IncidentManagement new(incident, user, note: note, occurred_at: occurred_at, action: action, auto_created: true).execute end + def change_severity(incident, user) + return if Feature.disabled?(:incident_timeline_events_for_severity, incident.project) + + note = "@#{user.username} changed the incident severity to **#{incident.severity.humanize}**" + occurred_at = incident.updated_at + action = 'severity' + + new(incident, user, note: note, occurred_at: occurred_at, action: action, auto_created: true).execute + end + def change_labels(incident, user, added_labels: [], removed_labels: []) return if Feature.disabled?(:incident_timeline_events_from_labels, incident.project) diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index ccea1714973..8dfdb2a3440 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -122,7 +122,7 @@ = s_('AdminArea|Components') - if show_version_check? .float-right - .js-gitlab-version-check{ data: { "size": "lg" } } + .js-gitlab-version-check{ data: { "size": "lg", "actionable": "true" } } = link_to(sprite_icon('question'), "https://gitlab.com/gitlab-org/gitlab/-/blob/master/CHANGELOG.md", class: 'gl-ml-2', target: '_blank', rel: 'noopener noreferrer') %p = link_to _('GitLab'), general_admin_application_settings_path diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml index eaa58580454..d12e51f2727 100644 --- a/app/views/help/index.html.haml +++ b/app/views/help/index.html.haml @@ -11,7 +11,7 @@ %span= link_to_version - if show_version_check? %span.gl-mt-5.gl-mb-3.gl-ml-3 - .js-gitlab-version-check{ data: { "size": "lg" } } + .js-gitlab-version-check{ data: { "size": "lg", "actionable": "true" } } %hr - unless Gitlab::CurrentSettings.help_page_hide_commercial_content? diff --git a/app/views/layouts/header/_gitlab_version.html.haml b/app/views/layouts/header/_gitlab_version.html.haml index fae6926a687..80020e27741 100644 --- a/app/views/layouts/header/_gitlab_version.html.haml +++ b/app/views/layouts/header/_gitlab_version.html.haml @@ -1,6 +1,14 @@ - return unless show_version_check? -%a{ class: 'gl-display-flex! gl-flex-direction-column gl-px-4! gl-py-3! gl-line-height-24!', href: help_page_path('update/index'), 'data-testid': 'gitlab-version-container' } +%a{ + class: 'gl-display-flex! gl-flex-direction-column gl-px-4! gl-py-3! gl-line-height-24!', + href: help_page_path('update/index'), + data: { + testid: 'gitlab-version-container', + track_action: 'click_version_help_dropdown', + track_label: "#{Gitlab.version_info.major}.#{Gitlab.version_info.minor}" + } + } %span = s_("VersionCheck|Your GitLab Version") = emoji_icon('rocket') diff --git a/app/views/profiles/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml index 23a0d824bfe..efc1e23d9b4 100644 --- a/app/views/profiles/notifications/show.html.haml +++ b/app/views/profiles/notifications/show.html.haml @@ -1,3 +1,4 @@ +- add_page_specific_style 'page_bundles/notifications' - page_title _('Notifications') - @content_class = "limit-container-width" unless fluid_layout diff --git a/app/views/projects/deployments/_rollback.haml b/app/views/projects/deployments/_rollback.haml index 223f7520b47..e50fa1fa0f7 100644 --- a/app/views/projects/deployments/_rollback.haml +++ b/app/views/projects/deployments/_rollback.haml @@ -1,4 +1,4 @@ -- if deployment.deployable && can?(current_user, :create_deployment, deployment) +- if deployment.deployable && can?(current_user, :play_job, deployment.deployable) - tooltip = deployment.last? ? s_('Environments|Re-deploy to environment') : s_('Environments|Rollback environment') - icon = deployment.last? ? 'repeat' : 'redo' = render Pajamas::ButtonComponent.new(icon: icon, button_options: { title: tooltip, class: 'js-confirm-rollback-modal-button has-tooltip', data: { environment_name: @environment.name, commit_short_sha: deployment.short_sha, commit_url: project_commit_path(@project, deployment.sha), is_last_deployment: deployment.last?.to_s, retry_path: retry_project_job_path(@environment.project, deployment.deployable) } }) diff --git a/app/workers/incident_management/add_severity_system_note_worker.rb b/app/workers/incident_management/add_severity_system_note_worker.rb index 3a4667bea0a..b2d2d6748ee 100644 --- a/app/workers/incident_management/add_severity_system_note_worker.rb +++ b/app/workers/incident_management/add_severity_system_note_worker.rb @@ -21,7 +21,10 @@ module IncidentManagement user = User.find_by_id(user_id) return unless user - SystemNoteService.change_incident_severity(incident, user) + incident.transaction do + SystemNoteService.change_incident_severity(incident, user) + TimelineEvents::CreateService.change_severity(incident, user) + end end end end |