Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-12-18 21:16:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-18 21:16:08 +0300
commit5ba99858f15c33bf96f94cc5e9663f01c3532689 (patch)
treed9a4f77242ff797c6cdbf8a12f6644d347cf8935 /app/assets
parent9ee9d3012b3747270beb6dec6200d632d8afd0e3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/ci/catalog/components/details/ci_resource_components.vue7
-rw-r--r--app/assets/javascripts/ci/catalog/constants.js34
-rw-r--r--app/assets/javascripts/ci/catalog/graphql/queries/get_ci_catalog_resource_components.query.graphql18
-rw-r--r--app/assets/javascripts/ci/catalog/graphql/settings.js6
-rw-r--r--app/assets/javascripts/sidebar/components/reviewers/uncollapsed_reviewer_list.vue11
5 files changed, 21 insertions, 55 deletions
diff --git a/app/assets/javascripts/ci/catalog/components/details/ci_resource_components.vue b/app/assets/javascripts/ci/catalog/components/details/ci_resource_components.vue
index 91aaf2237b7..6d062d8b7f1 100644
--- a/app/assets/javascripts/ci/catalog/components/details/ci_resource_components.vue
+++ b/app/assets/javascripts/ci/catalog/components/details/ci_resource_components.vue
@@ -31,7 +31,7 @@ export default {
};
},
update(data) {
- return data?.ciCatalogResource?.components?.nodes || [];
+ return data?.ciCatalogResource?.latestVersion?.components?.nodes || [];
},
error() {
createAlert({ message: this.$options.i18n.fetchError });
@@ -64,7 +64,7 @@ export default {
thClass: 'gl-w-40p',
},
{
- key: 'defaultValue',
+ key: 'default',
label: s__('CiCatalogComponent|Default Value'),
thClass: 'gl-w-40p',
},
@@ -103,7 +103,6 @@ export default {
data-testid="component-section"
>
<h3 class="gl-font-size-h2" data-testid="component-name">{{ component.name }}</h3>
- <p class="gl-mt-5">{{ component.description }}</p>
<div class="gl-display-flex">
<pre
class="gl-w-85p gl-py-4 gl-display-flex gl-justify-content-space-between gl-m-0 gl-border-r-none"
@@ -124,7 +123,7 @@ export default {
</div>
<div class="gl-mt-5">
<b class="gl-display-block gl-mb-4"> {{ $options.i18n.inputTitle }}</b>
- <gl-table-lite :items="component.inputs.nodes" :fields="$options.fields">
+ <gl-table-lite :items="component.inputs" :fields="$options.fields">
<template #cell(required)="{ item }">
{{ humanizeBoolean(item.required) }}
</template>
diff --git a/app/assets/javascripts/ci/catalog/constants.js b/app/assets/javascripts/ci/catalog/constants.js
index 9591880e0fa..34c0ac797c1 100644
--- a/app/assets/javascripts/ci/catalog/constants.js
+++ b/app/assets/javascripts/ci/catalog/constants.js
@@ -1,7 +1,5 @@
import { helpPagePath } from '~/helpers/help_page_helper';
-// We disable this for the entire file until the mock data is cleanup
-/* eslint-disable @gitlab/require-i18n-strings */
export const CATALOG_FEEDBACK_DISMISSED_KEY = 'catalog_feedback_dismissed';
export const SORT_OPTION_CREATED = 'CREATED';
@@ -9,35 +7,3 @@ export const SORT_ASC = 'ASC';
export const SORT_DESC = 'DESC';
export const COMPONENTS_DOCS_URL = helpPagePath('ci/components/index');
-
-export const componentsMockData = {
- __typename: 'CiComponentConnection',
- nodes: [
- {
- id: 'gid://gitlab/Ci::Component/1',
- name: 'Ruby gal',
- description: 'This is a pretty amazing component that does EVERYTHING ruby.',
- path: 'gitlab.com/gitlab-org/ruby-gal@~latest',
- inputs: { nodes: [{ name: 'version', defaultValue: '1.0.0', required: true }] },
- },
- {
- id: 'gid://gitlab/Ci::Component/2',
- name: 'Javascript madness',
- description: 'Adds some spice to your life.',
- path: 'gitlab.com/gitlab-org/javascript-madness@~latest',
- inputs: {
- nodes: [
- { name: 'isFun', defaultValue: 'true', required: true },
- { name: 'RandomNumber', defaultValue: '10', required: false },
- ],
- },
- },
- {
- id: 'gid://gitlab/Ci::Component/3',
- name: 'Go go go',
- description: 'When you write Go, you gotta go go go.',
- path: 'gitlab.com/gitlab-org/go-go-go@~latest',
- inputs: { nodes: [{ name: 'version', defaultValue: '1.0.0', required: true }] },
- },
- ],
-};
diff --git a/app/assets/javascripts/ci/catalog/graphql/queries/get_ci_catalog_resource_components.query.graphql b/app/assets/javascripts/ci/catalog/graphql/queries/get_ci_catalog_resource_components.query.graphql
index 92272bd97c5..41ac72aa9de 100644
--- a/app/assets/javascripts/ci/catalog/graphql/queries/get_ci_catalog_resource_components.query.graphql
+++ b/app/assets/javascripts/ci/catalog/graphql/queries/get_ci_catalog_resource_components.query.graphql
@@ -2,17 +2,17 @@ query getCiCatalogResourceComponents($fullPath: ID!) {
ciCatalogResource(fullPath: $fullPath) {
id
webPath
- components @client {
- nodes {
- id
- name
- description
- path
- inputs {
- nodes {
+ latestVersion {
+ id
+ components {
+ nodes {
+ id
+ name
+ path
+ inputs {
name
- defaultValue
required
+ default
}
}
}
diff --git a/app/assets/javascripts/ci/catalog/graphql/settings.js b/app/assets/javascripts/ci/catalog/graphql/settings.js
index c3c6dcca261..4038188a7ce 100644
--- a/app/assets/javascripts/ci/catalog/graphql/settings.js
+++ b/app/assets/javascripts/ci/catalog/graphql/settings.js
@@ -1,4 +1,3 @@
-import { componentsMockData } from '../constants';
import getCurrentPage from './queries/client/get_current_page.query.graphql';
export const ciCatalogResourcesItemsCount = 20;
@@ -40,9 +39,4 @@ export const resolvers = {
});
},
},
- CiCatalogResource: {
- components() {
- return componentsMockData;
- },
- },
};
diff --git a/app/assets/javascripts/sidebar/components/reviewers/uncollapsed_reviewer_list.vue b/app/assets/javascripts/sidebar/components/reviewers/uncollapsed_reviewer_list.vue
index db5f5b02d72..3d0e7db6a68 100644
--- a/app/assets/javascripts/sidebar/components/reviewers/uncollapsed_reviewer_list.vue
+++ b/app/assets/javascripts/sidebar/components/reviewers/uncollapsed_reviewer_list.vue
@@ -131,8 +131,15 @@ export default {
}
},
reviewStateIcon(user) {
- if (user.mergeRequestInteraction.approved) return REVIEW_STATE_ICONS.APPROVED;
-
+ if (user.mergeRequestInteraction.approved) {
+ return {
+ ...REVIEW_STATE_ICONS.APPROVED,
+ class: [
+ REVIEW_STATE_ICONS.APPROVED.class,
+ this.loadingStates[user.id] === JUST_APPROVED && 'merge-request-approved-icon',
+ ],
+ };
+ }
return REVIEW_STATE_ICONS[user.mergeRequestInteraction.reviewState];
},
showRequestReviewButton(user) {