diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-13 12:09:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-13 12:09:48 +0300 |
commit | 6419f4883904680223a460291f9c538719283058 (patch) | |
tree | 9e1bfd94f9a0ff5f5e11cb6016fe968ea3865de8 /app | |
parent | 00d1f41541a21e13e3c6bd94d897dc5e4da8278a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
4 files changed, 46 insertions, 16 deletions
diff --git a/app/assets/javascripts/packages_and_registries/package_registry/components/details/version_row.vue b/app/assets/javascripts/packages_and_registries/package_registry/components/details/version_row.vue index 9b5c8f63814..d6732cad6c1 100644 --- a/app/assets/javascripts/packages_and_registries/package_registry/components/details/version_row.vue +++ b/app/assets/javascripts/packages_and_registries/package_registry/components/details/version_row.vue @@ -1,15 +1,21 @@ <script> -import { GlLink, GlSprintf, GlTruncate } from '@gitlab/ui'; +import { GlIcon, GlLink, GlSprintf, GlTooltipDirective, GlTruncate } from '@gitlab/ui'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import PackageTags from '~/packages_and_registries/shared/components/package_tags.vue'; import PublishMethod from '~/packages_and_registries/shared/components/publish_method.vue'; import ListItem from '~/vue_shared/components/registry/list_item.vue'; import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; -import { PACKAGE_DEFAULT_STATUS } from '../../constants'; +import { + ERRORED_PACKAGE_TEXT, + ERROR_PUBLISHING, + PACKAGE_ERROR_STATUS, + WARNING_TEXT, +} from '../../constants'; export default { name: 'PackageVersionRow', components: { + GlIcon, GlLink, GlSprintf, GlTruncate, @@ -18,6 +24,9 @@ export default { ListItem, TimeAgoTooltip, }, + directives: { + GlTooltip: GlTooltipDirective, + }, props: { packageEntity: { type: Object, @@ -31,23 +40,23 @@ export default { packageLink() { return `${getIdFromGraphQLId(this.packageEntity.id)}`; }, - disabledRow() { - return this.packageEntity.status && this.packageEntity.status !== PACKAGE_DEFAULT_STATUS; + errorStatusRow() { + return this.packageEntity?.status === PACKAGE_ERROR_STATUS; }, }, + i18n: { + erroredPackageText: ERRORED_PACKAGE_TEXT, + errorPublishing: ERROR_PUBLISHING, + warningText: WARNING_TEXT, + }, }; </script> <template> - <list-item :disabled="disabledRow"> + <list-item> <template #left-primary> <div class="gl-display-flex gl-align-items-center gl-mr-3 gl-min-w-0"> - <gl-link - v-if="containsWebPathLink" - class="gl-text-body gl-min-w-0" - :disabled="disabledRow" - :href="packageLink" - > + <gl-link v-if="containsWebPathLink" class="gl-text-body gl-min-w-0" :href="packageLink"> <gl-truncate :text="packageEntity.name" /> </gl-link> <gl-truncate v-else :text="packageEntity.name" /> @@ -62,7 +71,20 @@ export default { </div> </template> <template #left-secondary> - {{ packageEntity.version }} + <div v-if="errorStatusRow" class="gl-text-red-500"> + <gl-icon + v-gl-tooltip="{ title: $options.i18n.erroredPackageText }" + name="warning" + :aria-label="$options.i18n.warningText" + /> + <span>{{ $options.i18n.errorPublishing }}</span> + </div> + <gl-truncate + v-else + class="gl-max-w-15 gl-md-max-w-26" + :text="packageEntity.version" + :with-tooltip="true" + /> </template> <template #right-primary> diff --git a/app/assets/javascripts/packages_and_registries/package_registry/components/list/package_list_row.vue b/app/assets/javascripts/packages_and_registries/package_registry/components/list/package_list_row.vue index 332ebf4892d..a8a96b89256 100644 --- a/app/assets/javascripts/packages_and_registries/package_registry/components/list/package_list_row.vue +++ b/app/assets/javascripts/packages_and_registries/package_registry/components/list/package_list_row.vue @@ -11,8 +11,11 @@ import { import { s__, __ } from '~/locale'; import ListItem from '~/vue_shared/components/registry/list_item.vue'; import { + ERRORED_PACKAGE_TEXT, + ERROR_PUBLISHING, PACKAGE_ERROR_STATUS, PACKAGE_DEFAULT_STATUS, + WARNING_TEXT, } from '~/packages_and_registries/package_registry/constants'; import { getPackageTypeLabel } from '~/packages_and_registries/package_registry/utils'; import PackagePath from '~/packages_and_registries/shared/components/package_path.vue'; @@ -86,11 +89,11 @@ export default { }, }, i18n: { - erroredPackageText: s__('PackageRegistry|Invalid Package: failed metadata extraction'), + erroredPackageText: ERRORED_PACKAGE_TEXT, createdAt: __('Created %{timestamp}'), deletePackage: s__('PackageRegistry|Delete package'), - errorPublishing: s__('PackageRegistry|Error publishing'), - warning: __('Warning'), + errorPublishing: ERROR_PUBLISHING, + warning: WARNING_TEXT, moreActions: __('More actions'), }, }; diff --git a/app/assets/javascripts/packages_and_registries/package_registry/constants.js b/app/assets/javascripts/packages_and_registries/package_registry/constants.js index beb8d11a944..ddd2fda7733 100644 --- a/app/assets/javascripts/packages_and_registries/package_registry/constants.js +++ b/app/assets/javascripts/packages_and_registries/package_registry/constants.js @@ -128,6 +128,12 @@ export const DELETE_PACKAGE_ERROR_MESSAGE = s__( 'PackageRegistry|Something went wrong while deleting the package.', ); +export const ERRORED_PACKAGE_TEXT = s__( + 'PackageRegistry|Invalid Package: failed metadata extraction', +); +export const ERROR_PUBLISHING = s__('PackageRegistry|Error publishing'); +export const WARNING_TEXT = __('Warning'); + export const PACKAGE_REGISTRY_TITLE = __('Package Registry'); export const PACKAGE_ERROR_STATUS = 'ERROR'; diff --git a/app/services/groups/create_service.rb b/app/services/groups/create_service.rb index 68bb6427350..25a1e9a9873 100644 --- a/app/services/groups/create_service.rb +++ b/app/services/groups/create_service.rb @@ -39,7 +39,6 @@ module Groups if @group.save @group.add_owner(current_user) Integration.create_from_active_default_integrations(@group, :group_id) - Onboarding::Progress.onboard(@group) end end |