diff options
Diffstat (limited to 'app/assets/javascripts/environments/components')
15 files changed, 34 insertions, 109 deletions
diff --git a/app/assets/javascripts/environments/components/canary_ingress.vue b/app/assets/javascripts/environments/components/canary_ingress.vue index f8cdbb96bc2..02d660a91c1 100644 --- a/app/assets/javascripts/environments/components/canary_ingress.vue +++ b/app/assets/javascripts/environments/components/canary_ingress.vue @@ -1,6 +1,6 @@ <script> -import { uniqueId } from 'lodash'; import { GlDropdown, GlDropdownItem, GlModalDirective as GlModal } from '@gitlab/ui'; +import { uniqueId } from 'lodash'; import { s__ } from '~/locale'; import { CANARY_UPDATE_MODAL } from '../constants'; diff --git a/app/assets/javascripts/environments/components/canary_update_modal.vue b/app/assets/javascripts/environments/components/canary_update_modal.vue index fc63d6272c8..8b1121c7158 100644 --- a/app/assets/javascripts/environments/components/canary_update_modal.vue +++ b/app/assets/javascripts/environments/components/canary_update_modal.vue @@ -1,8 +1,8 @@ <script> import { GlAlert, GlModal, GlSprintf } from '@gitlab/ui'; import { __, s__ } from '~/locale'; -import updateCanaryIngress from '../graphql/mutations/update_canary_ingress.mutation.graphql'; import { CANARY_UPDATE_MODAL } from '../constants'; +import updateCanaryIngress from '../graphql/mutations/update_canary_ingress.mutation.graphql'; export default { components: { diff --git a/app/assets/javascripts/environments/components/confirm_rollback_modal.vue b/app/assets/javascripts/environments/components/confirm_rollback_modal.vue index b2a8571820b..76ad74e04d0 100644 --- a/app/assets/javascripts/environments/components/confirm_rollback_modal.vue +++ b/app/assets/javascripts/environments/components/confirm_rollback_modal.vue @@ -4,8 +4,8 @@ * Render modal to confirm rollback/redeploy. */ -import { escape } from 'lodash'; import { GlModal } from '@gitlab/ui'; +import { escape } from 'lodash'; import { s__, sprintf } from '~/locale'; import eventHub from '../event_hub'; diff --git a/app/assets/javascripts/environments/components/container.vue b/app/assets/javascripts/environments/components/container.vue index c6b34fecbb7..9e058af56c4 100644 --- a/app/assets/javascripts/environments/components/container.vue +++ b/app/assets/javascripts/environments/components/container.vue @@ -26,26 +26,6 @@ export default { type: Boolean, required: true, }, - deployBoardsHelpPath: { - type: String, - required: false, - default: '', - }, - helpCanaryDeploymentsPath: { - type: String, - required: false, - default: '', - }, - lockPromotionSvgPath: { - type: String, - required: false, - default: '', - }, - userCalloutsPath: { - type: String, - required: false, - default: '', - }, }, methods: { onChangePage(page) { @@ -62,14 +42,7 @@ export default { <slot name="empty-state"></slot> <div v-if="!isLoading && environments.length > 0" class="table-holder"> - <environment-table - :environments="environments" - :can-read-environment="canReadEnvironment" - :user-callouts-path="userCalloutsPath" - :lock-promotion-svg-path="lockPromotionSvgPath" - :help-canary-deployments-path="helpCanaryDeploymentsPath" - :deploy-boards-help-path="deployBoardsHelpPath" - /> + <environment-table :environments="environments" :can-read-environment="canReadEnvironment" /> <table-pagination v-if="pagination && pagination.totalPages > 1" diff --git a/app/assets/javascripts/environments/components/deploy_board.vue b/app/assets/javascripts/environments/components/deploy_board.vue index 07cb968d8d3..f9c4660036b 100644 --- a/app/assets/javascripts/environments/components/deploy_board.vue +++ b/app/assets/javascripts/environments/components/deploy_board.vue @@ -9,7 +9,7 @@ * - Button Actions. * [Mockup](https://gitlab.com/gitlab-org/gitlab-foss/uploads/2f655655c0eadf655d0ae7467b53002a/environments__deploy-graphic.png) */ -import { isEmpty } from 'lodash'; +import deployBoardSvg from '@gitlab/svgs/dist/illustrations/deploy-boards.svg'; import { GlIcon, GlLoadingIcon, @@ -18,9 +18,9 @@ import { GlTooltipDirective, GlSafeHtmlDirective as SafeHtml, } from '@gitlab/ui'; -import deployBoardSvg from '@gitlab/svgs/dist/illustrations/deploy-boards.svg'; -import instanceComponent from '~/vue_shared/components/deployment_instance.vue'; +import { isEmpty } from 'lodash'; import { n__ } from '~/locale'; +import instanceComponent from '~/vue_shared/components/deployment_instance.vue'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { STATUS_MAP, CANARY_STATUS } from '../constants'; import CanaryIngress from './canary_ingress.vue'; @@ -44,11 +44,6 @@ export default { type: Object, required: true, }, - deployBoardsHelpPath: { - type: String, - required: false, - default: '', - }, isLoading: { type: Boolean, required: true, diff --git a/app/assets/javascripts/environments/components/enable_review_app_modal.vue b/app/assets/javascripts/environments/components/enable_review_app_modal.vue index 3dd1d5a1bcc..2494968857c 100644 --- a/app/assets/javascripts/environments/components/enable_review_app_modal.vue +++ b/app/assets/javascripts/environments/components/enable_review_app_modal.vue @@ -1,7 +1,7 @@ <script> import { GlLink, GlModal, GlSprintf } from '@gitlab/ui'; -import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue'; import { s__ } from '~/locale'; +import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue'; export default { components: { diff --git a/app/assets/javascripts/environments/components/environment_actions.vue b/app/assets/javascripts/environments/components/environment_actions.vue index 2192d456861..8911380290a 100644 --- a/app/assets/javascripts/environments/components/environment_actions.vue +++ b/app/assets/javascripts/environments/components/environment_actions.vue @@ -1,7 +1,7 @@ <script> import { GlDropdown, GlDropdownItem, GlIcon, GlLoadingIcon, GlTooltipDirective } from '@gitlab/ui'; -import { __, s__, sprintf } from '~/locale'; import { formatTime } from '~/lib/utils/datetime_utility'; +import { __, s__, sprintf } from '~/locale'; import eventHub from '../event_hub'; export default { diff --git a/app/assets/javascripts/environments/components/environment_delete.vue b/app/assets/javascripts/environments/components/environment_delete.vue index 75d92d3295d..4b7917b4572 100644 --- a/app/assets/javascripts/environments/components/environment_delete.vue +++ b/app/assets/javascripts/environments/components/environment_delete.vue @@ -5,6 +5,7 @@ */ import { GlTooltipDirective, GlButton, GlModalDirective } from '@gitlab/ui'; +import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants'; import { s__ } from '~/locale'; import eventHub from '../event_hub'; @@ -40,7 +41,7 @@ export default { }, methods: { onClick() { - this.$root.$emit('bv::hide::tooltip', this.$options.deleteEnvironmentTooltipId); + this.$root.$emit(BV_HIDE_TOOLTIP, this.$options.deleteEnvironmentTooltipId); eventHub.$emit('requestDeleteEnvironment', this.environment); }, onDeleteEnvironment(environment) { @@ -59,7 +60,7 @@ export default { :loading="isLoading" :title="title" :aria-label="title" - class="gl-display-none gl-display-md-block" + class="gl-display-none gl-md-display-block" variant="danger" category="primary" icon="remove" diff --git a/app/assets/javascripts/environments/components/environment_item.vue b/app/assets/javascripts/environments/components/environment_item.vue index 1724cc692bd..4db0dff16aa 100644 --- a/app/assets/javascripts/environments/components/environment_item.vue +++ b/app/assets/javascripts/environments/components/environment_item.vue @@ -1,22 +1,22 @@ <script> /* eslint-disable @gitlab/vue-require-i18n-strings */ -import { isEmpty } from 'lodash'; import { GlTooltipDirective, GlIcon, GlLink } from '@gitlab/ui'; -import { __, s__, sprintf } from '~/locale'; +import { isEmpty } from 'lodash'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; -import timeagoMixin from '~/vue_shared/mixins/timeago'; -import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; +import { __, s__, sprintf } from '~/locale'; +import CiIcon from '~/vue_shared/components/ci_icon.vue'; import CommitComponent from '~/vue_shared/components/commit.vue'; import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue'; -import CiIcon from '~/vue_shared/components/ci_icon.vue'; +import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; +import timeagoMixin from '~/vue_shared/mixins/timeago'; import eventHub from '../event_hub'; import ActionsComponent from './environment_actions.vue'; +import DeleteComponent from './environment_delete.vue'; import ExternalUrlComponent from './environment_external_url.vue'; import MonitoringButtonComponent from './environment_monitoring.vue'; import PinComponent from './environment_pin.vue'; -import DeleteComponent from './environment_delete.vue'; -import StopComponent from './environment_stop.vue'; import RollbackComponent from './environment_rollback.vue'; +import StopComponent from './environment_stop.vue'; import TerminalButtonComponent from './environment_terminal_button.vue'; /** @@ -549,7 +549,7 @@ export default { upcomingDeploymentCellClasses() { return [ this.tableData.upcoming.spacing, - { 'gl-display-none gl-display-md-block': !this.upcomingDeployment }, + { 'gl-display-none gl-md-display-block': !this.upcomingDeployment }, ]; }, }, diff --git a/app/assets/javascripts/environments/components/environment_monitoring.vue b/app/assets/javascripts/environments/components/environment_monitoring.vue index 4dc2c0ec1bd..7f70433776d 100644 --- a/app/assets/javascripts/environments/components/environment_monitoring.vue +++ b/app/assets/javascripts/environments/components/environment_monitoring.vue @@ -30,7 +30,7 @@ export default { :href="monitoringUrl" :title="title" :aria-label="title" - class="monitoring-url gl-display-none gl-display-sm-none gl-display-md-block" + class="monitoring-url gl-display-none gl-sm-display-none gl-md-display-block" icon="chart" rel="noopener noreferrer nofollow" variant="default" diff --git a/app/assets/javascripts/environments/components/environment_rollback.vue b/app/assets/javascripts/environments/components/environment_rollback.vue index 48edde82ce7..397616c654f 100644 --- a/app/assets/javascripts/environments/components/environment_rollback.vue +++ b/app/assets/javascripts/environments/components/environment_rollback.vue @@ -68,7 +68,7 @@ export default { <gl-button v-gl-tooltip v-gl-modal.confirm-rollback-modal - class="gl-display-none gl-display-md-block text-secondary" + class="gl-display-none gl-md-display-block text-secondary" :loading="isLoading" :title="title" :icon="isLastDeployment ? 'repeat' : 'redo'" diff --git a/app/assets/javascripts/environments/components/environment_stop.vue b/app/assets/javascripts/environments/components/environment_stop.vue index 8e100623199..dceaf3cacf1 100644 --- a/app/assets/javascripts/environments/components/environment_stop.vue +++ b/app/assets/javascripts/environments/components/environment_stop.vue @@ -5,6 +5,7 @@ */ import { GlTooltipDirective, GlButton, GlModalDirective } from '@gitlab/ui'; +import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants'; import { s__ } from '~/locale'; import eventHub from '../event_hub'; @@ -40,7 +41,7 @@ export default { }, methods: { onClick() { - this.$root.$emit('bv::hide::tooltip', this.$options.stopEnvironmentTooltipId); + this.$root.$emit(BV_HIDE_TOOLTIP, this.$options.stopEnvironmentTooltipId); eventHub.$emit('requestStopEnvironment', this.environment); }, onStopEnvironment(environment) { diff --git a/app/assets/javascripts/environments/components/environments_app.vue b/app/assets/javascripts/environments/components/environments_app.vue index 6f68c6e864a..ed852895f10 100644 --- a/app/assets/javascripts/environments/components/environments_app.vue +++ b/app/assets/javascripts/environments/components/environments_app.vue @@ -2,14 +2,14 @@ import { GlBadge, GlButton, GlModalDirective, GlTab, GlTabs } from '@gitlab/ui'; import { deprecatedCreateFlash as Flash } from '~/flash'; import { s__ } from '~/locale'; -import emptyState from './empty_state.vue'; import eventHub from '../event_hub'; import environmentsMixin from '../mixins/environments_mixin'; -import CIPaginationMixin from '~/vue_shared/mixins/ci_pagination_api_mixin'; +import EnvironmentsPaginationApiMixin from '../mixins/environments_pagination_api_mixin'; +import ConfirmRollbackModal from './confirm_rollback_modal.vue'; +import DeleteEnvironmentModal from './delete_environment_modal.vue'; +import emptyState from './empty_state.vue'; import EnableReviewAppModal from './enable_review_app_modal.vue'; import StopEnvironmentModal from './stop_environment_modal.vue'; -import DeleteEnvironmentModal from './delete_environment_modal.vue'; -import ConfirmRollbackModal from './confirm_rollback_modal.vue'; export default { i18n: { @@ -33,7 +33,7 @@ export default { directives: { 'gl-modal': GlModalDirective, }, - mixins: [CIPaginationMixin, environmentsMixin], + mixins: [EnvironmentsPaginationApiMixin, environmentsMixin], props: { endpoint: { type: String, @@ -51,30 +51,10 @@ export default { type: String, required: true, }, - helpCanaryDeploymentsPath: { - type: String, - required: false, - default: '', - }, helpPagePath: { type: String, required: true, }, - deployBoardsHelpPath: { - type: String, - required: false, - default: '', - }, - lockPromotionSvgPath: { - type: String, - required: false, - default: '', - }, - userCalloutsPath: { - type: String, - required: false, - default: '', - }, }, created() { @@ -133,7 +113,7 @@ export default { <confirm-rollback-modal :environment="environmentInRollbackModal" /> <div class="gl-w-full"> - <div class="gl-display-flex gl-flex-direction-column gl-mt-3 gl-display-md-none!"> + <div class="gl-display-flex gl-flex-direction-column gl-mt-3 gl-md-display-none!"> <gl-button v-if="state.reviewAppDetails.can_setup_review_app" v-gl-modal="$options.modal.id" @@ -167,7 +147,7 @@ export default { </gl-tab> <template #tabs-end> <div - class="gl-display-none gl-display-md-flex gl-lg-align-items-center gl-lg-flex-direction-row gl-lg-flex-fill-1 gl-lg-justify-content-end gl-lg-mt-0" + class="gl-display-none gl-md-display-flex gl-lg-align-items-center gl-lg-flex-direction-row gl-lg-flex-fill-1 gl-lg-justify-content-end gl-lg-mt-0" > <gl-button v-if="state.reviewAppDetails.can_setup_review_app" @@ -195,10 +175,6 @@ export default { :environments="state.environments" :pagination="state.paginationInformation" :can-read-environment="canReadEnvironment" - :user-callouts-path="userCalloutsPath" - :lock-promotion-svg-path="lockPromotionSvgPath" - :help-canary-deployments-path="helpCanaryDeploymentsPath" - :deploy-boards-help-path="deployBoardsHelpPath" @onChangePage="onChangePage" > <template v-if="!isLoading && state.environments.length === 0" #empty-state> diff --git a/app/assets/javascripts/environments/components/environments_table.vue b/app/assets/javascripts/environments/components/environments_table.vue index bbb56ca6f26..cbce887f491 100644 --- a/app/assets/javascripts/environments/components/environments_table.vue +++ b/app/assets/javascripts/environments/components/environments_table.vue @@ -5,9 +5,9 @@ import { GlLoadingIcon } from '@gitlab/ui'; import { flow, reverse, sortBy } from 'lodash/fp'; import { s__ } from '~/locale'; -import EnvironmentItem from './environment_item.vue'; -import DeployBoard from './deploy_board.vue'; import CanaryUpdateModal from './canary_update_modal.vue'; +import DeployBoard from './deploy_board.vue'; +import EnvironmentItem from './environment_item.vue'; export default { components: { @@ -23,31 +23,11 @@ export default { required: true, default: () => [], }, - deployBoardsHelpPath: { - type: String, - required: false, - default: '', - }, canReadEnvironment: { type: Boolean, required: false, default: false, }, - helpCanaryDeploymentsPath: { - type: String, - required: false, - default: '', - }, - lockPromotionSvgPath: { - type: String, - required: false, - default: '', - }, - userCalloutsPath: { - type: String, - required: false, - default: '', - }, }, data() { return { @@ -189,7 +169,6 @@ export default { <div class="deploy-board-container"> <deploy-board :deploy-board-data="model.deployBoardData" - :deploy-boards-help-path="deployBoardsHelpPath" :is-loading="model.isLoadingDeployBoard" :is-empty="model.isEmptyDeployBoard" :logs-path="model.logs_path" diff --git a/app/assets/javascripts/environments/components/stop_environment_modal.vue b/app/assets/javascripts/environments/components/stop_environment_modal.vue index 0832822520d..828a7098b36 100644 --- a/app/assets/javascripts/environments/components/stop_environment_modal.vue +++ b/app/assets/javascripts/environments/components/stop_environment_modal.vue @@ -1,7 +1,7 @@ <script> import { GlSprintf, GlTooltipDirective, GlModal } from '@gitlab/ui'; -import eventHub from '../event_hub'; import { __, s__ } from '~/locale'; +import eventHub from '../event_hub'; export default { id: 'stop-environment-modal', |