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>2024-01-02 21:22:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2024-01-02 21:22:43 +0300
commit0cea0a8f44d2cef1d4d132c72a07f8995962115c (patch)
tree201f687b14f7330601e991eaf94acb1185164f58 /app/assets
parentcef74ed0434b53fde0d7dcc2507b6f1639a63e7d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/ci/catalog/graphql/mutations/catalog_resources_create.mutation.graphql (renamed from app/assets/javascripts/pages/projects/shared/permissions/graphql/mutations/catalog_resources_create.mutation.graphql)0
-rw-r--r--app/assets/javascripts/ci/catalog/graphql/mutations/catalog_resources_destroy.mutation.graphql (renamed from app/assets/javascripts/pages/projects/shared/permissions/graphql/mutations/catalog_resources_destroy.mutation.graphql)0
-rw-r--r--app/assets/javascripts/ci/catalog/graphql/queries/get_ci_catalog_settings.query.graphql (renamed from app/assets/javascripts/pages/projects/shared/permissions/graphql/queries/get_ci_catalog_settings.query.graphql)0
-rw-r--r--app/assets/javascripts/pages/projects/shared/permissions/components/ci_catalog_settings.vue6
-rw-r--r--app/assets/javascripts/releases/components/app_index.vue56
5 files changed, 56 insertions, 6 deletions
diff --git a/app/assets/javascripts/pages/projects/shared/permissions/graphql/mutations/catalog_resources_create.mutation.graphql b/app/assets/javascripts/ci/catalog/graphql/mutations/catalog_resources_create.mutation.graphql
index c3b73ebf248..c3b73ebf248 100644
--- a/app/assets/javascripts/pages/projects/shared/permissions/graphql/mutations/catalog_resources_create.mutation.graphql
+++ b/app/assets/javascripts/ci/catalog/graphql/mutations/catalog_resources_create.mutation.graphql
diff --git a/app/assets/javascripts/pages/projects/shared/permissions/graphql/mutations/catalog_resources_destroy.mutation.graphql b/app/assets/javascripts/ci/catalog/graphql/mutations/catalog_resources_destroy.mutation.graphql
index fa42b081a5f..fa42b081a5f 100644
--- a/app/assets/javascripts/pages/projects/shared/permissions/graphql/mutations/catalog_resources_destroy.mutation.graphql
+++ b/app/assets/javascripts/ci/catalog/graphql/mutations/catalog_resources_destroy.mutation.graphql
diff --git a/app/assets/javascripts/pages/projects/shared/permissions/graphql/queries/get_ci_catalog_settings.query.graphql b/app/assets/javascripts/ci/catalog/graphql/queries/get_ci_catalog_settings.query.graphql
index 0de06028386..0de06028386 100644
--- a/app/assets/javascripts/pages/projects/shared/permissions/graphql/queries/get_ci_catalog_settings.query.graphql
+++ b/app/assets/javascripts/ci/catalog/graphql/queries/get_ci_catalog_settings.query.graphql
diff --git a/app/assets/javascripts/pages/projects/shared/permissions/components/ci_catalog_settings.vue b/app/assets/javascripts/pages/projects/shared/permissions/components/ci_catalog_settings.vue
index 32775ac553c..c35e10462a0 100644
--- a/app/assets/javascripts/pages/projects/shared/permissions/components/ci_catalog_settings.vue
+++ b/app/assets/javascripts/pages/projects/shared/permissions/components/ci_catalog_settings.vue
@@ -5,9 +5,9 @@ import { __, s__ } from '~/locale';
import { helpPagePath } from '~/helpers/help_page_helper';
import BetaBadge from '~/vue_shared/components/badges/beta_badge.vue';
-import getCiCatalogSettingsQuery from '../graphql/queries/get_ci_catalog_settings.query.graphql';
-import catalogResourcesCreate from '../graphql/mutations/catalog_resources_create.mutation.graphql';
-import catalogResourcesDestroy from '../graphql/mutations/catalog_resources_destroy.mutation.graphql';
+import getCiCatalogSettingsQuery from '~/ci/catalog/graphql/queries/get_ci_catalog_settings.query.graphql';
+import catalogResourcesCreate from '~/ci/catalog/graphql/mutations/catalog_resources_create.mutation.graphql';
+import catalogResourcesDestroy from '~/ci/catalog/graphql/mutations/catalog_resources_destroy.mutation.graphql';
const i18n = {
catalogResourceQueryError: s__(
diff --git a/app/assets/javascripts/releases/components/app_index.vue b/app/assets/javascripts/releases/components/app_index.vue
index eebaeeea286..31c7ed8482d 100644
--- a/app/assets/javascripts/releases/components/app_index.vue
+++ b/app/assets/javascripts/releases/components/app_index.vue
@@ -1,13 +1,15 @@
<script>
-import { GlButton } from '@gitlab/ui';
+import { GlAlert, GlButton, GlLink, GlSprintf } from '@gitlab/ui';
import { createAlert } from '~/alert';
import { historyPushState } from '~/lib/utils/common_utils';
import { scrollUp } from '~/lib/utils/scroll_utils';
import { setUrlParams, getParameterByName } from '~/lib/utils/url_utility';
-import { __ } from '~/locale';
+import { __, s__ } from '~/locale';
import { PAGE_SIZE, DEFAULT_SORT } from '~/releases/constants';
import { convertAllReleasesGraphQLResponse } from '~/releases/util';
import { popDeleteReleaseNotification } from '~/releases/release_notification_service';
+import { helpPagePath } from '~/helpers/help_page_helper';
+import getCiCatalogSettingsQuery from '~/ci/catalog/graphql/queries/get_ci_catalog_settings.query.graphql';
import allReleasesQuery from '../graphql/queries/all_releases.query.graphql';
import ReleaseBlock from './release_block.vue';
import ReleaseSkeletonLoader from './release_skeleton_loader.vue';
@@ -18,7 +20,10 @@ import ReleasesSort from './releases_sort.vue';
export default {
name: 'ReleasesIndexApp',
components: {
+ GlAlert,
GlButton,
+ GlLink,
+ GlSprintf,
ReleaseBlock,
ReleaseSkeletonLoader,
ReleasesEmptyState,
@@ -79,6 +84,20 @@ export default {
});
},
},
+ isCatalogResource: {
+ query: getCiCatalogSettingsQuery,
+ variables() {
+ return {
+ fullPath: this.projectPath,
+ };
+ },
+ update({ project }) {
+ return project?.isCatalogResource || false;
+ },
+ error() {
+ createAlert({ message: this.$options.i18n.catalogResourceQueryError });
+ },
+ },
},
data() {
return {
@@ -227,13 +246,44 @@ export default {
},
},
i18n: {
- newRelease: __('New release'),
+ alertButtonLink: helpPagePath('ci/components/index', { anchor: 'release-a-component' }),
+ alertButtonText: __('View the publishing guide'),
+ alertInfoMessage: s__(
+ 'CiCatalog|The CI/CD components in this project can be published in the CI/CD Catalog by creating a release. We recommend using the %{linkStart}release%{linkEnd} keyword in a CI/CD job to release new component versions for the Catalog.',
+ ),
+ alertInfoMessageLink: helpPagePath('ci/yaml/index.html', { anchor: 'release' }),
+ alertTitle: __('Publish the CI/CD components in this project to the CI/CD Catalog'),
+ catalogResourceQueryError: s__(
+ 'CiCatalog|There was a problem fetching the CI/CD Catalog setting.',
+ ),
errorMessage: __('An error occurred while fetching the releases. Please try again.'),
+ newRelease: __('New release'),
},
};
</script>
<template>
<div class="gl-display-flex gl-flex-direction-column gl-mt-3">
+ <gl-alert
+ v-if="isCatalogResource"
+ :title="$options.i18n.alertTitle"
+ :primary-button-text="$options.i18n.alertButtonText"
+ :primary-button-link="$options.i18n.alertButtonLink"
+ :dismissible="false"
+ variant="warning"
+ class="mb-3 mt-2"
+ >
+ <gl-sprintf :message="$options.i18n.alertInfoMessage">
+ <template #link="{ content }">
+ <gl-link
+ :href="$options.i18n.alertInfoMessageLink"
+ target="_blank"
+ class="gl-text-decoration-none!"
+ >
+ {{ content }}
+ </gl-link>
+ </template>
+ </gl-sprintf>
+ </gl-alert>
<releases-empty-state v-if="shouldRenderEmptyState" />
<div v-else class="gl-align-self-end gl-mb-3">
<releases-sort :value="sort" class="gl-mr-2" @input="onSortChanged" />