diff --git a/.gitlab/ci/review-apps/main.gitlab-ci.yml b/.gitlab/ci/review-apps/main.gitlab-ci.yml index 68fc4e48ba9..8b49327b9f4 100644 --- a/.gitlab/ci/review-apps/main.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml @@ -123,7 +123,7 @@ review-deploy: - run_timed_command "check_kube_domain" - run_timed_command "download_chart" - run_timed_command "deploy" || (display_deployment_debug && exit 1) - - run_timed_command "verify_deploy" || exit 1 + - run_timed_command "verify_deploy"|| (display_deployment_debug && exit 1) - run_timed_command "disable_sign_ups" || (delete_release && exit 1) after_script: # Run seed-dast-test-data.sh only when DAST_RUN is set to true. This is to pupulate review app with data for DAST scan. diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index c3191271fd8..f76ff29f1bb 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -a415ff702cfd0755db5d1a09c63c13ce13b54f58 +4b3f2921b5f0d659b44aee6323d82fc3698a8ede diff --git a/app/assets/javascripts/behaviors/shortcuts/keybindings.js b/app/assets/javascripts/behaviors/shortcuts/keybindings.js index 3239375bf7c..38ee02938cc 100644 --- a/app/assets/javascripts/behaviors/shortcuts/keybindings.js +++ b/app/assets/javascripts/behaviors/shortcuts/keybindings.js @@ -93,6 +93,12 @@ export const GO_TO_YOUR_MERGE_REQUESTS = { defaultKeys: ['shift+m'], }; +export const GO_TO_YOUR_REVIEW_REQUESTS = { + id: 'globalShortcuts.goToYourReviewRequests', + description: __('Go to your review requests'), + defaultKeys: ['shift+r'], +}; + export const GO_TO_YOUR_TODO_LIST = { id: 'globalShortcuts.goToYourTodoList', description: __('Go to your To-Do list'), @@ -523,6 +529,7 @@ export const GLOBAL_SHORTCUTS_GROUP = { FOCUS_FILTER_BAR, GO_TO_YOUR_ISSUES, GO_TO_YOUR_MERGE_REQUESTS, + GO_TO_YOUR_REVIEW_REQUESTS, GO_TO_YOUR_TODO_LIST, TOGGLE_PERFORMANCE_BAR, HIDE_APPEARING_CONTENT, diff --git a/app/assets/javascripts/behaviors/shortcuts/shortcuts.js b/app/assets/javascripts/behaviors/shortcuts/shortcuts.js index 4d78c7b56a0..7a1577e97d5 100644 --- a/app/assets/javascripts/behaviors/shortcuts/shortcuts.js +++ b/app/assets/javascripts/behaviors/shortcuts/shortcuts.js @@ -24,6 +24,7 @@ import { GO_TO_MILESTONE_LIST, GO_TO_YOUR_SNIPPETS, GO_TO_PROJECT_FIND_FILE, + GO_TO_YOUR_REVIEW_REQUESTS, } from './keybindings'; import { disableShortcuts, shouldDisableShortcuts } from './shortcuts_toggle'; @@ -94,6 +95,9 @@ export default class Shortcuts { Mousetrap.bind(keysFor(GO_TO_YOUR_MERGE_REQUESTS), () => findAndFollowLink('.dashboard-shortcuts-merge_requests'), ); + Mousetrap.bind(keysFor(GO_TO_YOUR_REVIEW_REQUESTS), () => + findAndFollowLink('.dashboard-shortcuts-review_requests'), + ); Mousetrap.bind(keysFor(GO_TO_YOUR_PROJECTS), () => findAndFollowLink('.dashboard-shortcuts-projects'), ); diff --git a/app/assets/javascripts/ci/runner/components/runner_bulk_delete.vue b/app/assets/javascripts/ci/runner/components/runner_bulk_delete.vue index 703da01d9c8..1ec3f8da7c3 100644 --- a/app/assets/javascripts/ci/runner/components/runner_bulk_delete.vue +++ b/app/assets/javascripts/ci/runner/components/runner_bulk_delete.vue @@ -117,31 +117,34 @@ export default { const { errors, deletedIds } = data.bulkRunnerDelete; if (errors?.length) { - this.onError(new Error(errors.join(' '))); - this.$refs.modal.hide(); - return; + createAlert({ + message: s__( + 'Runners|An error occurred while deleting. Some runners may not have been deleted.', + ), + captureError: true, + error: new Error(errors.join(' ')), + }); } - this.$emit('deleted', { - message: this.toastConfirmationMessage(deletedIds.length), - }); + if (deletedIds?.length) { + this.$emit('deleted', { + message: this.toastConfirmationMessage(deletedIds.length), + }); - // Clean up - - // Remove deleted runners from the cache - deletedIds.forEach((id) => { - const cacheId = cache.identify({ __typename: RUNNER_TYPENAME, id }); - cache.evict({ id: cacheId }); - }); - cache.gc(); - - this.$refs.modal.hide(); + // Remove deleted runners from the cache + deletedIds.forEach((id) => { + const cacheId = cache.identify({ __typename: RUNNER_TYPENAME, id }); + cache.evict({ id: cacheId }); + }); + cache.gc(); + } }, }); } catch (error) { this.onError(error); } finally { this.isDeleting = false; + this.$refs.modal.hide(); } }, onError(error) { diff --git a/app/assets/javascripts/ci/runner/components/runner_delete_button.vue b/app/assets/javascripts/ci/runner/components/runner_delete_button.vue index 13404baad89..32d4076b00f 100644 --- a/app/assets/javascripts/ci/runner/components/runner_delete_button.vue +++ b/app/assets/javascripts/ci/runner/components/runner_delete_button.vue @@ -2,7 +2,7 @@ import { GlButton, GlModalDirective, GlTooltipDirective } from '@gitlab/ui'; import runnerDeleteMutation from '~/ci/runner/graphql/shared/runner_delete.mutation.graphql'; import { createAlert } from '~/flash'; -import { sprintf } from '~/locale'; +import { sprintf, s__ } from '~/locale'; import { captureException } from '~/ci/runner/sentry_utils'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import { I18N_DELETE_RUNNER, I18N_DELETED_TOAST } from '../constants'; @@ -122,8 +122,11 @@ export default { onError(error) { this.deleting = false; const { message } = error; + const title = sprintf(s__('Runner|Runner %{runnerName} failed to delete'), { + runnerName: this.runnerName, + }); - createAlert({ message }); + createAlert({ title, message }); captureException({ error, component: this.$options.name }); }, }, diff --git a/app/assets/javascripts/ci_variable_list/components/ci_admin_variables.vue b/app/assets/javascripts/ci_variable_list/components/ci_admin_variables.vue index 8d891ff1746..afdac28cbd6 100644 --- a/app/assets/javascripts/ci_variable_list/components/ci_admin_variables.vue +++ b/app/assets/javascripts/ci_variable_list/components/ci_admin_variables.vue @@ -1,143 +1,35 @@ diff --git a/app/assets/javascripts/ci_variable_list/components/ci_group_variables.vue b/app/assets/javascripts/ci_variable_list/components/ci_group_variables.vue index 4af696b8dab..c8f5ac1736d 100644 --- a/app/assets/javascripts/ci_variable_list/components/ci_group_variables.vue +++ b/app/assets/javascripts/ci_variable_list/components/ci_group_variables.vue @@ -1,143 +1,53 @@ diff --git a/app/assets/javascripts/ci_variable_list/components/ci_project_variables.vue b/app/assets/javascripts/ci_variable_list/components/ci_project_variables.vue index 6bd549817f8..2c4818e20c1 100644 --- a/app/assets/javascripts/ci_variable_list/components/ci_project_variables.vue +++ b/app/assets/javascripts/ci_variable_list/components/ci_project_variables.vue @@ -1,160 +1,55 @@ diff --git a/app/assets/javascripts/ci_variable_list/components/ci_variable_shared.vue b/app/assets/javascripts/ci_variable_list/components/ci_variable_shared.vue new file mode 100644 index 00000000000..48081fe28f1 --- /dev/null +++ b/app/assets/javascripts/ci_variable_list/components/ci_variable_shared.vue @@ -0,0 +1,226 @@ + + + diff --git a/app/assets/javascripts/ci_variable_list/graphql/mutations/admin_add_variable.mutation.graphql b/app/assets/javascripts/ci_variable_list/graphql/mutations/admin_add_variable.mutation.graphql index eba4b0c32f8..9208c34f154 100644 --- a/app/assets/javascripts/ci_variable_list/graphql/mutations/admin_add_variable.mutation.graphql +++ b/app/assets/javascripts/ci_variable_list/graphql/mutations/admin_add_variable.mutation.graphql @@ -1,7 +1,7 @@ #import "~/ci_variable_list/graphql/fragments/ci_variable.fragment.graphql" mutation addAdminVariable($variable: CiVariable!, $endpoint: String!) { - addAdminVariable(variable: $variable, endpoint: $endpoint) @client { + ciVariableMutation: addAdminVariable(variable: $variable, endpoint: $endpoint) @client { ciVariables { nodes { ...BaseCiVariable diff --git a/app/assets/javascripts/ci_variable_list/graphql/mutations/admin_delete_variable.mutation.graphql b/app/assets/javascripts/ci_variable_list/graphql/mutations/admin_delete_variable.mutation.graphql index 96eb8c794bc..a79b98f5e95 100644 --- a/app/assets/javascripts/ci_variable_list/graphql/mutations/admin_delete_variable.mutation.graphql +++ b/app/assets/javascripts/ci_variable_list/graphql/mutations/admin_delete_variable.mutation.graphql @@ -1,7 +1,7 @@ #import "~/ci_variable_list/graphql/fragments/ci_variable.fragment.graphql" mutation deleteAdminVariable($variable: CiVariable!, $endpoint: String!) { - deleteAdminVariable(variable: $variable, endpoint: $endpoint) @client { + ciVariableMutation: deleteAdminVariable(variable: $variable, endpoint: $endpoint) @client { ciVariables { nodes { ...BaseCiVariable diff --git a/app/assets/javascripts/ci_variable_list/graphql/mutations/admin_update_variable.mutation.graphql b/app/assets/javascripts/ci_variable_list/graphql/mutations/admin_update_variable.mutation.graphql index c0388507bb8..ddea753bf90 100644 --- a/app/assets/javascripts/ci_variable_list/graphql/mutations/admin_update_variable.mutation.graphql +++ b/app/assets/javascripts/ci_variable_list/graphql/mutations/admin_update_variable.mutation.graphql @@ -1,7 +1,7 @@ #import "~/ci_variable_list/graphql/fragments/ci_variable.fragment.graphql" mutation updateAdminVariable($variable: CiVariable!, $endpoint: String!) { - updateAdminVariable(variable: $variable, endpoint: $endpoint) @client { + ciVariableMutation: updateAdminVariable(variable: $variable, endpoint: $endpoint) @client { ciVariables { nodes { ...BaseCiVariable diff --git a/app/assets/javascripts/ci_variable_list/graphql/mutations/group_add_variable.mutation.graphql b/app/assets/javascripts/ci_variable_list/graphql/mutations/group_add_variable.mutation.graphql index f8e4dc55fa4..c44ee2ecc1d 100644 --- a/app/assets/javascripts/ci_variable_list/graphql/mutations/group_add_variable.mutation.graphql +++ b/app/assets/javascripts/ci_variable_list/graphql/mutations/group_add_variable.mutation.graphql @@ -1,16 +1,11 @@ #import "~/ci_variable_list/graphql/fragments/ci_variable.fragment.graphql" -mutation addGroupVariable( - $variable: CiVariable! - $endpoint: String! - $fullPath: ID! - $groupId: ID! -) { - addGroupVariable( +mutation addGroupVariable($variable: CiVariable!, $endpoint: String!, $fullPath: ID!, $id: ID!) { + ciVariableMutation: addGroupVariable( variable: $variable endpoint: $endpoint fullPath: $fullPath - groupId: $groupId + id: $id ) @client { group { id diff --git a/app/assets/javascripts/ci_variable_list/graphql/mutations/group_delete_variable.mutation.graphql b/app/assets/javascripts/ci_variable_list/graphql/mutations/group_delete_variable.mutation.graphql index 310e4a6e551..53e9b411dd2 100644 --- a/app/assets/javascripts/ci_variable_list/graphql/mutations/group_delete_variable.mutation.graphql +++ b/app/assets/javascripts/ci_variable_list/graphql/mutations/group_delete_variable.mutation.graphql @@ -1,16 +1,11 @@ #import "~/ci_variable_list/graphql/fragments/ci_variable.fragment.graphql" -mutation deleteGroupVariable( - $variable: CiVariable! - $endpoint: String! - $fullPath: ID! - $groupId: ID! -) { - deleteGroupVariable( +mutation deleteGroupVariable($variable: CiVariable!, $endpoint: String!, $fullPath: ID!, $id: ID!) { + ciVariableMutation: deleteGroupVariable( variable: $variable endpoint: $endpoint fullPath: $fullPath - groupId: $groupId + id: $id ) @client { group { id diff --git a/app/assets/javascripts/ci_variable_list/graphql/mutations/group_update_variable.mutation.graphql b/app/assets/javascripts/ci_variable_list/graphql/mutations/group_update_variable.mutation.graphql index 5291942eb87..2dddca14bd8 100644 --- a/app/assets/javascripts/ci_variable_list/graphql/mutations/group_update_variable.mutation.graphql +++ b/app/assets/javascripts/ci_variable_list/graphql/mutations/group_update_variable.mutation.graphql @@ -1,16 +1,11 @@ #import "~/ci_variable_list/graphql/fragments/ci_variable.fragment.graphql" -mutation updateGroupVariable( - $variable: CiVariable! - $endpoint: String! - $fullPath: ID! - $groupId: ID! -) { - updateGroupVariable( +mutation updateGroupVariable($variable: CiVariable!, $endpoint: String!, $fullPath: ID!, $id: ID!) { + ciVariableMutation: updateGroupVariable( variable: $variable endpoint: $endpoint fullPath: $fullPath - groupId: $groupId + id: $id ) @client { group { id diff --git a/app/assets/javascripts/ci_variable_list/graphql/mutations/project_add_variable.mutation.graphql b/app/assets/javascripts/ci_variable_list/graphql/mutations/project_add_variable.mutation.graphql index ab3a46da854..39504770e33 100644 --- a/app/assets/javascripts/ci_variable_list/graphql/mutations/project_add_variable.mutation.graphql +++ b/app/assets/javascripts/ci_variable_list/graphql/mutations/project_add_variable.mutation.graphql @@ -1,16 +1,11 @@ #import "~/ci_variable_list/graphql/fragments/ci_variable.fragment.graphql" -mutation addProjectVariable( - $variable: CiVariable! - $endpoint: String! - $fullPath: ID! - $projectId: ID! -) { - addProjectVariable( +mutation addProjectVariable($variable: CiVariable!, $endpoint: String!, $fullPath: ID!, $id: ID!) { + ciVariableMutation: addProjectVariable( variable: $variable endpoint: $endpoint fullPath: $fullPath - projectId: $projectId + id: $id ) @client { project { id diff --git a/app/assets/javascripts/ci_variable_list/graphql/mutations/project_delete_variable.mutation.graphql b/app/assets/javascripts/ci_variable_list/graphql/mutations/project_delete_variable.mutation.graphql index e83dc9a5e5e..f55c255e332 100644 --- a/app/assets/javascripts/ci_variable_list/graphql/mutations/project_delete_variable.mutation.graphql +++ b/app/assets/javascripts/ci_variable_list/graphql/mutations/project_delete_variable.mutation.graphql @@ -4,13 +4,13 @@ mutation deleteProjectVariable( $variable: CiVariable! $endpoint: String! $fullPath: ID! - $projectId: ID! + $id: ID! ) { - deleteProjectVariable( + ciVariableMutation: deleteProjectVariable( variable: $variable endpoint: $endpoint fullPath: $fullPath - projectId: $projectId + id: $id ) @client { project { id diff --git a/app/assets/javascripts/ci_variable_list/graphql/mutations/project_update_variable.mutation.graphql b/app/assets/javascripts/ci_variable_list/graphql/mutations/project_update_variable.mutation.graphql index 4788911431b..fc589e8a939 100644 --- a/app/assets/javascripts/ci_variable_list/graphql/mutations/project_update_variable.mutation.graphql +++ b/app/assets/javascripts/ci_variable_list/graphql/mutations/project_update_variable.mutation.graphql @@ -4,13 +4,13 @@ mutation updateProjectVariable( $variable: CiVariable! $endpoint: String! $fullPath: ID! - $projectId: ID! + $id: ID! ) { - updateProjectVariable( + ciVariableMutation: updateProjectVariable( variable: $variable endpoint: $endpoint fullPath: $fullPath - projectId: $projectId + id: $id ) @client { project { id diff --git a/app/assets/javascripts/ci_variable_list/graphql/settings.js b/app/assets/javascripts/ci_variable_list/graphql/settings.js index ecdc4f220bd..02f6c226b0f 100644 --- a/app/assets/javascripts/ci_variable_list/graphql/settings.js +++ b/app/assets/javascripts/ci_variable_list/graphql/settings.js @@ -36,12 +36,12 @@ const mapVariableTypes = (variables = [], kind) => { }); }; -const prepareProjectGraphQLResponse = ({ data, projectId, errors = [] }) => { +const prepareProjectGraphQLResponse = ({ data, id, errors = [] }) => { return { errors, project: { __typename: GRAPHQL_PROJECT_TYPE, - id: convertToGraphQLId(GRAPHQL_PROJECT_TYPE, projectId), + id: convertToGraphQLId(GRAPHQL_PROJECT_TYPE, id), ciVariables: { __typename: `Ci${GRAPHQL_PROJECT_TYPE}VariableConnection`, pageInfo: { @@ -57,12 +57,12 @@ const prepareProjectGraphQLResponse = ({ data, projectId, errors = [] }) => { }; }; -const prepareGroupGraphQLResponse = ({ data, groupId, errors = [] }) => { +const prepareGroupGraphQLResponse = ({ data, id, errors = [] }) => { return { errors, group: { __typename: GRAPHQL_GROUP_TYPE, - id: convertToGraphQLId(GRAPHQL_GROUP_TYPE, groupId), + id: convertToGraphQLId(GRAPHQL_GROUP_TYPE, id), ciVariables: { __typename: `Ci${GRAPHQL_GROUP_TYPE}VariableConnection`, pageInfo: { @@ -95,20 +95,13 @@ const prepareAdminGraphQLResponse = ({ data, errors = [] }) => { }; }; -async function callProjectEndpoint({ - endpoint, - fullPath, - variable, - projectId, - cache, - destroy = false, -}) { +async function callProjectEndpoint({ endpoint, fullPath, variable, id, cache, destroy = false }) { try { const { data } = await axios.patch(endpoint, { variables_attributes: [prepareVariableForApi({ variable, destroy })], }); - const graphqlData = prepareProjectGraphQLResponse({ data, projectId }); + const graphqlData = prepareProjectGraphQLResponse({ data, id }); cache.writeQuery({ query: getProjectVariables, @@ -122,26 +115,19 @@ async function callProjectEndpoint({ } catch (e) { return prepareProjectGraphQLResponse({ data: cache.readQuery({ query: getProjectVariables, variables: { fullPath } }), - projectId, + id, errors: [...e.response.data], }); } } -const callGroupEndpoint = async ({ - endpoint, - fullPath, - variable, - groupId, - cache, - destroy = false, -}) => { +const callGroupEndpoint = async ({ endpoint, fullPath, variable, id, cache, destroy = false }) => { try { const { data } = await axios.patch(endpoint, { variables_attributes: [prepareVariableForApi({ variable, destroy })], }); - const graphqlData = prepareGroupGraphQLResponse({ data, groupId }); + const graphqlData = prepareGroupGraphQLResponse({ data, id }); cache.writeQuery({ query: getGroupVariables, @@ -152,7 +138,7 @@ const callGroupEndpoint = async ({ } catch (e) { return prepareGroupGraphQLResponse({ data: cache.readQuery({ query: getGroupVariables, variables: { fullPath } }), - groupId, + id, errors: [...e.response.data], }); } @@ -182,23 +168,23 @@ const callAdminEndpoint = async ({ endpoint, variable, cache, destroy = false }) export const resolvers = { Mutation: { - addProjectVariable: async (_, { endpoint, fullPath, variable, projectId }, { cache }) => { - return callProjectEndpoint({ endpoint, fullPath, variable, projectId, cache }); + addProjectVariable: async (_, { endpoint, fullPath, variable, id }, { cache }) => { + return callProjectEndpoint({ endpoint, fullPath, variable, id, cache }); }, - updateProjectVariable: async (_, { endpoint, fullPath, variable, projectId }, { cache }) => { - return callProjectEndpoint({ endpoint, fullPath, variable, projectId, cache }); + updateProjectVariable: async (_, { endpoint, fullPath, variable, id }, { cache }) => { + return callProjectEndpoint({ endpoint, fullPath, variable, id, cache }); }, - deleteProjectVariable: async (_, { endpoint, fullPath, variable, projectId }, { cache }) => { - return callProjectEndpoint({ endpoint, fullPath, variable, projectId, cache, destroy: true }); + deleteProjectVariable: async (_, { endpoint, fullPath, variable, id }, { cache }) => { + return callProjectEndpoint({ endpoint, fullPath, variable, id, cache, destroy: true }); }, - addGroupVariable: async (_, { endpoint, fullPath, variable, groupId }, { cache }) => { - return callGroupEndpoint({ endpoint, fullPath, variable, groupId, cache }); + addGroupVariable: async (_, { endpoint, fullPath, variable, id }, { cache }) => { + return callGroupEndpoint({ endpoint, fullPath, variable, id, cache }); }, - updateGroupVariable: async (_, { endpoint, fullPath, variable, groupId }, { cache }) => { - return callGroupEndpoint({ endpoint, fullPath, variable, groupId, cache }); + updateGroupVariable: async (_, { endpoint, fullPath, variable, id }, { cache }) => { + return callGroupEndpoint({ endpoint, fullPath, variable, id, cache }); }, - deleteGroupVariable: async (_, { endpoint, fullPath, variable, groupId }, { cache }) => { - return callGroupEndpoint({ endpoint, fullPath, variable, groupId, cache, destroy: true }); + deleteGroupVariable: async (_, { endpoint, fullPath, variable, id }, { cache }) => { + return callGroupEndpoint({ endpoint, fullPath, variable, id, cache, destroy: true }); }, addAdminVariable: async (_, { endpoint, variable }, { cache }) => { return callAdminEndpoint({ endpoint, variable, cache }); @@ -238,7 +224,7 @@ export const cacheConfig = { Project: { fields: { ciVariables: { - keyArgs: ['fullPath', 'endpoint', 'projectId'], + keyArgs: ['fullPath', 'endpoint', 'id'], merge: mergeVariables, }, }, diff --git a/app/assets/javascripts/graphql_shared/issuable_client.js b/app/assets/javascripts/graphql_shared/issuable_client.js index 38c7af8cf95..15e7ef7d62c 100644 --- a/app/assets/javascripts/graphql_shared/issuable_client.js +++ b/app/assets/javascripts/graphql_shared/issuable_client.js @@ -5,7 +5,6 @@ import { concatPagination } from '@apollo/client/utilities'; import getIssueStateQuery from '~/issues/show/queries/get_issue_state.query.graphql'; import createDefaultClient from '~/lib/graphql'; import typeDefs from '~/work_items/graphql/typedefs.graphql'; -import { WIDGET_TYPE_MILESTONE } from '~/work_items/constants'; export const config = { typeDefs, @@ -15,10 +14,6 @@ export const config = { // eslint-disable-next-line no-underscore-dangle return object.__typename === 'BoardList' ? object.iid : defaultDataIdFromObject(object); }, - - possibleTypes: { - LocalWorkItemWidget: ['LocalWorkItemMilestone'], - }, typePolicies: { Project: { fields: { @@ -29,28 +24,6 @@ export const config = { }, WorkItem: { fields: { - mockWidgets: { - read(widgets) { - return ( - widgets || [ - { - __typename: 'LocalWorkItemMilestone', - type: WIDGET_TYPE_MILESTONE, - nodes: [ - { - dueDate: null, - expired: false, - id: 'gid://gitlab/Milestone/30', - title: 'v4.0', - // eslint-disable-next-line @gitlab/require-i18n-strings - __typename: 'Milestone', - }, - ], - }, - ] - ); - }, - }, widgets: { merge(existing = [], incoming) { if (existing.length === 0) { diff --git a/app/assets/javascripts/token_access/components/token_access.vue b/app/assets/javascripts/token_access/components/token_access.vue index 4b91872d80d..fe99f3e1fdd 100644 --- a/app/assets/javascripts/token_access/components/token_access.vue +++ b/app/assets/javascripts/token_access/components/token_access.vue @@ -117,7 +117,7 @@ export default { throw new Error(errors[0]); } } catch (error) { - createAlert({ message: error }); + createAlert({ message: error.message }); } }, async addProject() { @@ -140,7 +140,7 @@ export default { throw new Error(errors[0]); } } catch (error) { - createAlert({ message: error }); + createAlert({ message: error.message }); } finally { this.clearTargetProjectPath(); this.getProjects(); @@ -166,7 +166,7 @@ export default { throw new Error(errors[0]); } } catch (error) { - createAlert({ message: error }); + createAlert({ message: error.message }); } finally { this.getProjects(); } diff --git a/app/assets/javascripts/token_access/components/token_projects_table.vue b/app/assets/javascripts/token_access/components/token_projects_table.vue index 82ef3371d91..ce33478cbee 100644 --- a/app/assets/javascripts/token_access/components/token_projects_table.vue +++ b/app/assets/javascripts/token_access/components/token_projects_table.vue @@ -10,14 +10,21 @@ export default { { key: 'project', label: __('Projects that can be accessed'), - tdClass: 'gl-p-5!', - columnClass: 'gl-w-85p', + thClass: 'gl-border-t-none!', + columnClass: 'gl-w-40p', + }, + { + key: 'namespace', + label: __('Namespace'), + thClass: 'gl-border-t-none!', + columnClass: 'gl-w-40p', }, { key: 'actions', label: '', - tdClass: 'gl-p-5! gl-text-right', - columnClass: 'gl-w-15p', + tdClass: 'gl-text-right', + thClass: 'gl-border-t-none!', + columnClass: 'gl-w-10p', }, ], components: { @@ -57,7 +64,11 @@ export default { + +