diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 18:11:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 18:11:58 +0300 |
commit | c17eb7c97062d25cdf1b44573e4c0241f52aa2fe (patch) | |
tree | 5164ebf4ccf1701cce78d7b4121c414ab370db6e /app/assets/javascripts/packages_and_registries | |
parent | 60e09a0cef4e104aa41e20ab7a40499f3343e90f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/packages_and_registries')
8 files changed, 36 insertions, 7 deletions
diff --git a/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/details_page/tags_list.vue b/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/details_page/tags_list.vue index 4fda4058711..7659ba5f9ea 100644 --- a/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/details_page/tags_list.vue +++ b/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/details_page/tags_list.vue @@ -7,6 +7,7 @@ import RegistryList from '~/packages_and_registries/shared/components/registry_l import PersistedSearch from '~/packages_and_registries/shared/components/persisted_search.vue'; import { FILTERED_SEARCH_TERM } from '~/packages_and_registries/shared/constants'; +import TagsLoader from '~/packages_and_registries/shared/components/tags_loader.vue'; import { REMOVE_TAGS_BUTTON_TITLE, TAGS_LIST_TITLE, @@ -20,7 +21,6 @@ import { } from '../../constants/index'; import getContainerRepositoryTagsQuery from '../../graphql/queries/get_container_repository_tags.query.graphql'; import TagsListRow from './tags_list_row.vue'; -import TagsLoader from './tags_loader.vue'; export default { name: 'TagsList', diff --git a/app/assets/javascripts/packages_and_registries/container_registry/explorer/pages/details.vue b/app/assets/javascripts/packages_and_registries/container_registry/explorer/pages/details.vue index bb687ffdb89..931849c9918 100644 --- a/app/assets/javascripts/packages_and_registries/container_registry/explorer/pages/details.vue +++ b/app/assets/javascripts/packages_and_registries/container_registry/explorer/pages/details.vue @@ -5,6 +5,7 @@ import createFlash from '~/flash'; import axios from '~/lib/utils/axios_utils'; import { joinPaths } from '~/lib/utils/url_utility'; import Tracking from '~/tracking'; +import TagsLoader from '~/packages_and_registries/shared/components/tags_loader.vue'; import DeleteImage from '../components/delete_image.vue'; import DeleteAlert from '../components/details_page/delete_alert.vue'; import DeleteModal from '../components/details_page/delete_modal.vue'; @@ -12,7 +13,6 @@ import DetailsHeader from '../components/details_page/details_header.vue'; import PartialCleanupAlert from '../components/details_page/partial_cleanup_alert.vue'; import StatusAlert from '../components/details_page/status_alert.vue'; import TagsList from '../components/details_page/tags_list.vue'; -import TagsLoader from '../components/details_page/tags_loader.vue'; import { ALERT_SUCCESS_TAG, diff --git a/app/assets/javascripts/packages_and_registries/container_registry/explorer/pages/list.vue b/app/assets/javascripts/packages_and_registries/container_registry/explorer/pages/list.vue index 3274de05803..ad3a3596991 100644 --- a/app/assets/javascripts/packages_and_registries/container_registry/explorer/pages/list.vue +++ b/app/assets/javascripts/packages_and_registries/container_registry/explorer/pages/list.vue @@ -52,7 +52,7 @@ export default { ), CliCommands: () => import( - /* webpackChunkName: 'container_registry_components' */ '../components/list_page/cli_commands.vue' + /* webpackChunkName: 'container_registry_components' */ '~/packages_and_registries/shared/components/cli_commands.vue' ), GlModal, GlSprintf, @@ -68,7 +68,7 @@ export default { GlTooltip: GlTooltipDirective, }, mixins: [Tracking.mixin()], - inject: ['config'], + inject: ['config', 'dockerBuildCommand', 'dockerPushCommand', 'dockerLoginCommand'], loader: { repeat: 10, width: 1000, @@ -321,7 +321,12 @@ export default { :hide-expiration-policy-data="config.isGroupPage" > <template #commands> - <cli-commands v-if="showCommands" /> + <cli-commands + v-if="showCommands" + :docker-build-command="dockerBuildCommand" + :docker-push-command="dockerPushCommand" + :docker-login-command="dockerLoginCommand" + /> </template> </registry-header> diff --git a/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/list_page/cli_commands.vue b/app/assets/javascripts/packages_and_registries/shared/components/cli_commands.vue index 07ee3c6083b..de7ab3e6d7b 100644 --- a/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/list_page/cli_commands.vue +++ b/app/assets/javascripts/packages_and_registries/shared/components/cli_commands.vue @@ -10,7 +10,7 @@ import { COPY_BUILD_TITLE, PUSH_COMMAND_LABEL, COPY_PUSH_TITLE, -} from '../../constants/index'; +} from '../constants'; const trackingLabel = 'quickstart_dropdown'; @@ -20,7 +20,20 @@ export default { CodeInstruction, }, mixins: [Tracking.mixin({ label: trackingLabel })], - inject: ['config', 'dockerBuildCommand', 'dockerPushCommand', 'dockerLoginCommand'], + props: { + dockerBuildCommand: { + type: String, + required: true, + }, + dockerPushCommand: { + type: String, + required: true, + }, + dockerLoginCommand: { + type: String, + required: true, + }, + }, trackingLabel, i18n: { QUICK_START, diff --git a/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/details_page/tags_loader.vue b/app/assets/javascripts/packages_and_registries/shared/components/tags_loader.vue index b7afa5fba33..b7afa5fba33 100644 --- a/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/details_page/tags_loader.vue +++ b/app/assets/javascripts/packages_and_registries/shared/components/tags_loader.vue diff --git a/app/assets/javascripts/packages_and_registries/shared/constants/index.js b/app/assets/javascripts/packages_and_registries/shared/constants/index.js new file mode 100644 index 00000000000..7659781d96e --- /dev/null +++ b/app/assets/javascripts/packages_and_registries/shared/constants/index.js @@ -0,0 +1,2 @@ +export * from './package_registry'; +export * from './quick_start'; diff --git a/app/assets/javascripts/packages_and_registries/shared/constants.js b/app/assets/javascripts/packages_and_registries/shared/constants/package_registry.js index afc72a2c627..afc72a2c627 100644 --- a/app/assets/javascripts/packages_and_registries/shared/constants.js +++ b/app/assets/javascripts/packages_and_registries/shared/constants/package_registry.js diff --git a/app/assets/javascripts/packages_and_registries/shared/constants/quick_start.js b/app/assets/javascripts/packages_and_registries/shared/constants/quick_start.js new file mode 100644 index 00000000000..6a39c07eba2 --- /dev/null +++ b/app/assets/javascripts/packages_and_registries/shared/constants/quick_start.js @@ -0,0 +1,9 @@ +import { s__ } from '~/locale'; + +export const QUICK_START = s__('ContainerRegistry|CLI Commands'); +export const LOGIN_COMMAND_LABEL = s__('ContainerRegistry|Login'); +export const COPY_LOGIN_TITLE = s__('ContainerRegistry|Copy login command'); +export const BUILD_COMMAND_LABEL = s__('ContainerRegistry|Build an image'); +export const COPY_BUILD_TITLE = s__('ContainerRegistry|Copy build command'); +export const PUSH_COMMAND_LABEL = s__('ContainerRegistry|Push an image'); +export const COPY_PUSH_TITLE = s__('ContainerRegistry|Copy push command'); |