diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-01 18:22:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-01 18:22:06 +0300 |
commit | 2ccb5c91c82c780c905ee77da144f17825610487 (patch) | |
tree | 92fd3f6a2638474bc0725714a31da365fd80a301 /app/assets/javascripts/runner | |
parent | fbc7e1f503da80d993b970a74637a1edf53f7ab6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/runner')
24 files changed, 29 insertions, 30 deletions
diff --git a/app/assets/javascripts/runner/admin_runner_edit/admin_runner_edit_app.vue b/app/assets/javascripts/runner/admin_runner_edit/admin_runner_edit_app.vue index 4d2ca9b0c58..c2db3b9facd 100644 --- a/app/assets/javascripts/runner/admin_runner_edit/admin_runner_edit_app.vue +++ b/app/assets/javascripts/runner/admin_runner_edit/admin_runner_edit_app.vue @@ -5,7 +5,7 @@ import { convertToGraphQLId } from '~/graphql_shared/utils'; import RunnerHeader from '../components/runner_header.vue'; import RunnerUpdateForm from '../components/runner_update_form.vue'; import { I18N_FETCH_ERROR } from '../constants'; -import getRunnerQuery from '../graphql/get_runner.query.graphql'; +import runnerQuery from '../graphql/details/runner.query.graphql'; import { captureException } from '../sentry_utils'; export default { @@ -27,7 +27,7 @@ export default { }, apollo: { runner: { - query: getRunnerQuery, + query: runnerQuery, variables() { return { id: convertToGraphQLId(TYPE_CI_RUNNER, this.runnerId), diff --git a/app/assets/javascripts/runner/admin_runner_show/admin_runner_show_app.vue b/app/assets/javascripts/runner/admin_runner_show/admin_runner_show_app.vue index 2795ddbbbcb..86ad912f017 100644 --- a/app/assets/javascripts/runner/admin_runner_show/admin_runner_show_app.vue +++ b/app/assets/javascripts/runner/admin_runner_show/admin_runner_show_app.vue @@ -8,7 +8,7 @@ import RunnerPauseButton from '../components/runner_pause_button.vue'; import RunnerHeader from '../components/runner_header.vue'; import RunnerDetails from '../components/runner_details.vue'; import { I18N_FETCH_ERROR } from '../constants'; -import getRunnerQuery from '../graphql/get_runner.query.graphql'; +import runnerQuery from '../graphql/details/runner.query.graphql'; import { captureException } from '../sentry_utils'; export default { @@ -35,7 +35,7 @@ export default { }, apollo: { runner: { - query: getRunnerQuery, + query: runnerQuery, variables() { return { id: convertToGraphQLId(TYPE_CI_RUNNER, this.runnerId), diff --git a/app/assets/javascripts/runner/admin_runners/admin_runners_app.vue b/app/assets/javascripts/runner/admin_runners/admin_runners_app.vue index 3ce9a890b37..5e487ee5c52 100644 --- a/app/assets/javascripts/runner/admin_runners/admin_runners_app.vue +++ b/app/assets/javascripts/runner/admin_runners/admin_runners_app.vue @@ -26,8 +26,8 @@ import { STATUS_STALE, I18N_FETCH_ERROR, } from '../constants'; -import getRunnersQuery from '../graphql/get_runners.query.graphql'; -import getRunnersCountQuery from '../graphql/get_runners_count.query.graphql'; +import runnersAdminQuery from '../graphql/list/admin_runners.query.graphql'; +import runnersAdminCountQuery from '../graphql/list/admin_runners_count.query.graphql'; import { fromUrlQueryToSearch, fromSearchToUrl, @@ -36,7 +36,7 @@ import { import { captureException } from '../sentry_utils'; const runnersCountSmartQuery = { - query: getRunnersCountQuery, + query: runnersAdminCountQuery, fetchPolicy: fetchPolicies.CACHE_AND_NETWORK, update(data) { return data?.runners?.count; @@ -77,7 +77,7 @@ export default { }, apollo: { runners: { - query: getRunnersQuery, + query: runnersAdminQuery, // Runners can be updated by users directly in this list. // A "cache and network" policy prevents outdated filtered // results. diff --git a/app/assets/javascripts/runner/components/registration/registration_token_reset_dropdown_item.vue b/app/assets/javascripts/runner/components/registration/registration_token_reset_dropdown_item.vue index e65d30afee1..1234054c660 100644 --- a/app/assets/javascripts/runner/components/registration/registration_token_reset_dropdown_item.vue +++ b/app/assets/javascripts/runner/components/registration/registration_token_reset_dropdown_item.vue @@ -4,7 +4,7 @@ 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/runners_registration_token_reset.mutation.graphql'; +import runnersRegistrationTokenResetMutation from '~/runner/graphql/list/runners_registration_token_reset.mutation.graphql'; import { captureException } from '~/runner/sentry_utils'; import { INSTANCE_TYPE, GROUP_TYPE, PROJECT_TYPE } from '../../constants'; diff --git a/app/assets/javascripts/runner/components/runner_delete_button.vue b/app/assets/javascripts/runner/components/runner_delete_button.vue index 4a508c64214..cf71a4705ca 100644 --- a/app/assets/javascripts/runner/components/runner_delete_button.vue +++ b/app/assets/javascripts/runner/components/runner_delete_button.vue @@ -1,6 +1,6 @@ <script> import { GlButton, GlModalDirective, GlTooltipDirective } from '@gitlab/ui'; -import runnerDeleteMutation from '~/runner/graphql/runner_delete.mutation.graphql'; +import runnerDeleteMutation from '~/runner/graphql/shared/runner_delete.mutation.graphql'; import { createAlert } from '~/flash'; import { s__, sprintf } from '~/locale'; import { captureException } from '~/runner/sentry_utils'; diff --git a/app/assets/javascripts/runner/components/runner_jobs.vue b/app/assets/javascripts/runner/components/runner_jobs.vue index f9804ed815a..eb77babcc57 100644 --- a/app/assets/javascripts/runner/components/runner_jobs.vue +++ b/app/assets/javascripts/runner/components/runner_jobs.vue @@ -1,7 +1,7 @@ <script> import { GlSkeletonLoading } from '@gitlab/ui'; import { createAlert } from '~/flash'; -import getRunnerJobsQuery from '../graphql/get_runner_jobs.query.graphql'; +import runnerJobsQuery from '../graphql/details/runner_jobs.query.graphql'; import { I18N_FETCH_ERROR, I18N_NO_JOBS_FOUND, RUNNER_DETAILS_JOBS_PAGE_SIZE } from '../constants'; import { captureException } from '../sentry_utils'; import { getPaginationVariables } from '../utils'; @@ -34,7 +34,7 @@ export default { }, apollo: { jobs: { - query: getRunnerJobsQuery, + query: runnerJobsQuery, variables() { return this.variables; }, diff --git a/app/assets/javascripts/runner/components/runner_pause_button.vue b/app/assets/javascripts/runner/components/runner_pause_button.vue index 3ea2006d17a..a1901c55e61 100644 --- a/app/assets/javascripts/runner/components/runner_pause_button.vue +++ b/app/assets/javascripts/runner/components/runner_pause_button.vue @@ -1,6 +1,6 @@ <script> import { GlButton, GlTooltipDirective } from '@gitlab/ui'; -import runnerToggleActiveMutation from '~/runner/graphql/runner_toggle_active.mutation.graphql'; +import runnerToggleActiveMutation from '~/runner/graphql/shared/runner_toggle_active.mutation.graphql'; import { createAlert } from '~/flash'; import { captureException } from '~/runner/sentry_utils'; import { I18N_PAUSE, I18N_RESUME } from '../constants'; diff --git a/app/assets/javascripts/runner/components/runner_projects.vue b/app/assets/javascripts/runner/components/runner_projects.vue index 2040b39e948..f8ec29b8a24 100644 --- a/app/assets/javascripts/runner/components/runner_projects.vue +++ b/app/assets/javascripts/runner/components/runner_projects.vue @@ -2,7 +2,7 @@ import { GlSkeletonLoading } from '@gitlab/ui'; import { sprintf, formatNumber } from '~/locale'; import { createAlert } from '~/flash'; -import getRunnerProjectsQuery from '../graphql/get_runner_projects.query.graphql'; +import runnerProjectsQuery from '../graphql/details/runner_projects.query.graphql'; import { I18N_ASSIGNED_PROJECTS, I18N_NONE, @@ -41,7 +41,7 @@ export default { }, apollo: { projects: { - query: getRunnerProjectsQuery, + query: runnerProjectsQuery, variables() { return this.variables; }, diff --git a/app/assets/javascripts/runner/components/runner_update_form.vue b/app/assets/javascripts/runner/components/runner_update_form.vue index abff3e59407..e44450a2a8d 100644 --- a/app/assets/javascripts/runner/components/runner_update_form.vue +++ b/app/assets/javascripts/runner/components/runner_update_form.vue @@ -15,7 +15,7 @@ import { createAlert, VARIANT_SUCCESS } from '~/flash'; import { __ } from '~/locale'; import { captureException } from '~/runner/sentry_utils'; import { ACCESS_LEVEL_NOT_PROTECTED, ACCESS_LEVEL_REF_PROTECTED, PROJECT_TYPE } from '../constants'; -import runnerUpdateMutation from '../graphql/runner_update.mutation.graphql'; +import runnerUpdateMutation from '../graphql/details/runner_update.mutation.graphql'; export default { name: 'RunnerUpdateForm', diff --git a/app/assets/javascripts/runner/graphql/get_runner.query.graphql b/app/assets/javascripts/runner/graphql/details/runner.query.graphql index f6ce8281c64..4792a186160 100644 --- a/app/assets/javascripts/runner/graphql/get_runner.query.graphql +++ b/app/assets/javascripts/runner/graphql/details/runner.query.graphql @@ -1,10 +1,9 @@ -#import "ee_else_ce/runner/graphql/runner_details.fragment.graphql" +#import "ee_else_ce/runner/graphql/details/runner_details.fragment.graphql" query getRunner($id: CiRunnerID!) { # We have an id in deeply nested fragment # eslint-disable-next-line @graphql-eslint/require-id-when-available runner(id: $id) { - __typename ...RunnerDetails } } diff --git a/app/assets/javascripts/runner/graphql/runner_details.fragment.graphql b/app/assets/javascripts/runner/graphql/details/runner_details.fragment.graphql index 2449ee0fc0f..2449ee0fc0f 100644 --- a/app/assets/javascripts/runner/graphql/runner_details.fragment.graphql +++ b/app/assets/javascripts/runner/graphql/details/runner_details.fragment.graphql diff --git a/app/assets/javascripts/runner/graphql/runner_details_shared.fragment.graphql b/app/assets/javascripts/runner/graphql/details/runner_details_shared.fragment.graphql index 74760bbaa07..d8c67728fac 100644 --- a/app/assets/javascripts/runner/graphql/runner_details_shared.fragment.graphql +++ b/app/assets/javascripts/runner/graphql/details/runner_details_shared.fragment.graphql @@ -1,4 +1,5 @@ fragment RunnerDetailsShared on CiRunner { + __typename id runnerType active @@ -22,7 +23,7 @@ fragment RunnerDetailsShared on CiRunner { groups { # Only a single group can be loaded here, while projects # are loaded separately using the query with pagination - # parameters `get_runner_projects.query.graphql`. + # parameters `runner_projects.query.graphql`. nodes { id avatarUrl diff --git a/app/assets/javascripts/runner/graphql/get_runner_jobs.query.graphql b/app/assets/javascripts/runner/graphql/details/runner_jobs.query.graphql index 2b1decd3ddd..2b1decd3ddd 100644 --- a/app/assets/javascripts/runner/graphql/get_runner_jobs.query.graphql +++ b/app/assets/javascripts/runner/graphql/details/runner_jobs.query.graphql diff --git a/app/assets/javascripts/runner/graphql/get_runner_projects.query.graphql b/app/assets/javascripts/runner/graphql/details/runner_projects.query.graphql index f97237b8267..f97237b8267 100644 --- a/app/assets/javascripts/runner/graphql/get_runner_projects.query.graphql +++ b/app/assets/javascripts/runner/graphql/details/runner_projects.query.graphql diff --git a/app/assets/javascripts/runner/graphql/runner_update.mutation.graphql b/app/assets/javascripts/runner/graphql/details/runner_update.mutation.graphql index 8d1b75828be..e4bf51e2c30 100644 --- a/app/assets/javascripts/runner/graphql/runner_update.mutation.graphql +++ b/app/assets/javascripts/runner/graphql/details/runner_update.mutation.graphql @@ -1,4 +1,4 @@ -#import "ee_else_ce/runner/graphql/runner_details.fragment.graphql" +#import "ee_else_ce/runner/graphql/details/runner_details.fragment.graphql" # Mutation for updates from the runner form, loads # attributes shown in the runner details. diff --git a/app/assets/javascripts/runner/graphql/get_runners.query.graphql b/app/assets/javascripts/runner/graphql/list/admin_runners.query.graphql index ed03a8c34ae..8df4c2fc65c 100644 --- a/app/assets/javascripts/runner/graphql/get_runners.query.graphql +++ b/app/assets/javascripts/runner/graphql/list/admin_runners.query.graphql @@ -1,4 +1,4 @@ -#import "~/runner/graphql/runner_node.fragment.graphql" +#import "~/runner/graphql/list/list_item.fragment.graphql" #import "~/graphql_shared/fragments/pageInfo.fragment.graphql" query getRunners( @@ -24,7 +24,7 @@ query getRunners( sort: $sort ) { nodes { - ...RunnerNode + ...ListItem adminUrl editAdminUrl } diff --git a/app/assets/javascripts/runner/graphql/get_runners_count.query.graphql b/app/assets/javascripts/runner/graphql/list/admin_runners_count.query.graphql index 181a4495cae..181a4495cae 100644 --- a/app/assets/javascripts/runner/graphql/get_runners_count.query.graphql +++ b/app/assets/javascripts/runner/graphql/list/admin_runners_count.query.graphql diff --git a/app/assets/javascripts/runner/graphql/get_group_runners.query.graphql b/app/assets/javascripts/runner/graphql/list/group_runners.query.graphql index f9c7b89fc01..b517f5e89a8 100644 --- a/app/assets/javascripts/runner/graphql/get_group_runners.query.graphql +++ b/app/assets/javascripts/runner/graphql/list/group_runners.query.graphql @@ -1,4 +1,4 @@ -#import "~/runner/graphql/runner_node.fragment.graphql" +#import "~/runner/graphql/list/list_item.fragment.graphql" #import "~/graphql_shared/fragments/pageInfo.fragment.graphql" query getGroupRunners( @@ -29,8 +29,7 @@ query getGroupRunners( webUrl editUrl node { - __typename - ...RunnerNode + ...ListItem } } pageInfo { diff --git a/app/assets/javascripts/runner/graphql/get_group_runners_count.query.graphql b/app/assets/javascripts/runner/graphql/list/group_runners_count.query.graphql index 554eb09e372..554eb09e372 100644 --- a/app/assets/javascripts/runner/graphql/get_group_runners_count.query.graphql +++ b/app/assets/javascripts/runner/graphql/list/group_runners_count.query.graphql diff --git a/app/assets/javascripts/runner/graphql/runner_node.fragment.graphql b/app/assets/javascripts/runner/graphql/list/list_item.fragment.graphql index fbdef817f2f..620c18c5bc0 100644 --- a/app/assets/javascripts/runner/graphql/runner_node.fragment.graphql +++ b/app/assets/javascripts/runner/graphql/list/list_item.fragment.graphql @@ -1,4 +1,4 @@ -fragment RunnerNode on CiRunner { +fragment ListItem on CiRunner { __typename id description diff --git a/app/assets/javascripts/runner/graphql/runners_registration_token_reset.mutation.graphql b/app/assets/javascripts/runner/graphql/list/runners_registration_token_reset.mutation.graphql index 9c2797732ad..9c2797732ad 100644 --- a/app/assets/javascripts/runner/graphql/runners_registration_token_reset.mutation.graphql +++ b/app/assets/javascripts/runner/graphql/list/runners_registration_token_reset.mutation.graphql diff --git a/app/assets/javascripts/runner/graphql/runner_delete.mutation.graphql b/app/assets/javascripts/runner/graphql/shared/runner_delete.mutation.graphql index d580ea2785e..d580ea2785e 100644 --- a/app/assets/javascripts/runner/graphql/runner_delete.mutation.graphql +++ b/app/assets/javascripts/runner/graphql/shared/runner_delete.mutation.graphql diff --git a/app/assets/javascripts/runner/graphql/runner_toggle_active.mutation.graphql b/app/assets/javascripts/runner/graphql/shared/runner_toggle_active.mutation.graphql index 9b15570dbc0..9b15570dbc0 100644 --- a/app/assets/javascripts/runner/graphql/runner_toggle_active.mutation.graphql +++ b/app/assets/javascripts/runner/graphql/shared/runner_toggle_active.mutation.graphql diff --git a/app/assets/javascripts/runner/group_runners/group_runners_app.vue b/app/assets/javascripts/runner/group_runners/group_runners_app.vue index ba33ead6f46..f6b631bd216 100644 --- a/app/assets/javascripts/runner/group_runners/group_runners_app.vue +++ b/app/assets/javascripts/runner/group_runners/group_runners_app.vue @@ -24,8 +24,8 @@ import { STATUS_OFFLINE, STATUS_STALE, } from '../constants'; -import getGroupRunnersQuery from '../graphql/get_group_runners.query.graphql'; -import getGroupRunnersCountQuery from '../graphql/get_group_runners_count.query.graphql'; +import groupRunnersQuery from '../graphql/list/group_runners.query.graphql'; +import groupRunnersCountQuery from '../graphql/list/group_runners_count.query.graphql'; import { fromUrlQueryToSearch, fromSearchToUrl, @@ -34,7 +34,7 @@ import { import { captureException } from '../sentry_utils'; const runnersCountSmartQuery = { - query: getGroupRunnersCountQuery, + query: groupRunnersCountQuery, fetchPolicy: fetchPolicies.CACHE_AND_NETWORK, update(data) { return data?.group?.runners?.count; @@ -84,7 +84,7 @@ export default { }, apollo: { runners: { - query: getGroupRunnersQuery, + query: groupRunnersQuery, // Runners can be updated by users directly in this list. // A "cache and network" policy prevents outdated filtered // results. |