diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-04 00:09:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-04 00:09:35 +0300 |
commit | e701659ba316541833e50d68f14720d17be58f8c (patch) | |
tree | 9e123fa2a749deaaf0a97612b05156576f55ff9f /app/assets/javascripts/feature_flags | |
parent | c2a6cc86754adb3c5e064cebc58d206a52cb412e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/feature_flags')
5 files changed, 6 insertions, 53 deletions
diff --git a/app/assets/javascripts/feature_flags/components/edit_feature_flag.vue b/app/assets/javascripts/feature_flags/components/edit_feature_flag.vue index 9ec65bb0b43..b89e9723606 100644 --- a/app/assets/javascripts/feature_flags/components/edit_feature_flag.vue +++ b/app/assets/javascripts/feature_flags/components/edit_feature_flag.vue @@ -4,7 +4,7 @@ import { mapState, mapActions } from 'vuex'; import axios from '~/lib/utils/axios_utils'; import { sprintf, s__ } from '~/locale'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; -import { LEGACY_FLAG, NEW_FLAG_ALERT } from '../constants'; +import { LEGACY_FLAG } from '../constants'; import FeatureFlagForm from './form.vue'; export default { @@ -36,7 +36,6 @@ export default { legacyReadOnlyFlagAlert: s__( 'FeatureFlags|GitLab is moving to a new way of managing feature flags. This feature flag is read-only, and it will be removed in 14.0. Please create a new feature flag.', ), - newFlagAlert: NEW_FLAG_ALERT, }, computed: { ...mapState([ @@ -58,7 +57,7 @@ export default { : sprintf(s__('Edit %{name}'), { name: this.name }); }, deprecated() { - return this.hasNewVersionFlags && this.version === LEGACY_FLAG; + return this.version === LEGACY_FLAG; }, deprecatedAndEditable() { return this.deprecated && !this.hasLegacyReadOnlyFlags; @@ -66,18 +65,12 @@ export default { deprecatedAndReadOnly() { return this.deprecated && this.hasLegacyReadOnlyFlags; }, - hasNewVersionFlags() { - return this.glFeatures.featureFlagsNewVersion; - }, hasLegacyReadOnlyFlags() { return ( this.glFeatures.featureFlagsLegacyReadOnly && !this.glFeatures.featureFlagsLegacyReadOnlyOverride ); }, - shouldShowNewFlagAlert() { - return !this.hasNewVersionFlags && this.userShouldSeeNewFlagAlert; - }, }, created() { return this.fetchFeatureFlag(); @@ -95,14 +88,6 @@ export default { </script> <template> <div> - <gl-alert - v-if="shouldShowNewFlagAlert" - variant="warning" - class="gl-my-5" - @dismiss="dismissNewVersionFlagAlert" - > - {{ $options.translations.newFlagAlert }} - </gl-alert> <gl-loading-icon v-if="isLoading" size="xl" class="gl-mt-7" /> <template v-else-if="!isLoading && !hasError"> diff --git a/app/assets/javascripts/feature_flags/components/feature_flags_table.vue b/app/assets/javascripts/feature_flags/components/feature_flags_table.vue index 54d038606f4..ba46bab2df0 100644 --- a/app/assets/javascripts/feature_flags/components/feature_flags_table.vue +++ b/app/assets/javascripts/feature_flags/components/feature_flags_table.vue @@ -38,9 +38,6 @@ export default { permissions() { return this.glFeatures.featureFlagPermissions; }, - isNewVersionFlagsEnabled() { - return this.glFeatures.featureFlagsNewVersion; - }, isLegacyReadOnlyFlagsEnabled() { return ( this.glFeatures.featureFlagsLegacyReadOnly && @@ -68,7 +65,7 @@ export default { }, methods: { isLegacyFlag(flag) { - return !this.isNewVersionFlagsEnabled || flag.version !== NEW_VERSION_FLAG; + return flag.version !== NEW_VERSION_FLAG; }, statusToggleDisabled(flag) { return this.isLegacyReadOnlyFlagsEnabled && flag.version === LEGACY_FLAG; diff --git a/app/assets/javascripts/feature_flags/components/form.vue b/app/assets/javascripts/feature_flags/components/form.vue index 36ebf893486..12856b79f63 100644 --- a/app/assets/javascripts/feature_flags/components/form.vue +++ b/app/assets/javascripts/feature_flags/components/form.vue @@ -137,14 +137,13 @@ export default { return this.glFeatures.featureFlagPermissions; }, supportsStrategies() { - return this.glFeatures.featureFlagsNewVersion && this.version === NEW_VERSION_FLAG; + return this.version === NEW_VERSION_FLAG; }, showRelatedIssues() { return this.featureFlagIssuesEndpoint.length > 0; }, readOnly() { return ( - this.glFeatures.featureFlagsNewVersion && this.glFeatures.featureFlagsLegacyReadOnly && !this.glFeatures.featureFlagsLegacyReadOnlyOverride && this.version === LEGACY_FLAG diff --git a/app/assets/javascripts/feature_flags/components/new_feature_flag.vue b/app/assets/javascripts/feature_flags/components/new_feature_flag.vue index 9472eddf336..e6949d8028b 100644 --- a/app/assets/javascripts/feature_flags/components/new_feature_flag.vue +++ b/app/assets/javascripts/feature_flags/components/new_feature_flag.vue @@ -1,21 +1,14 @@ <script> import { mapState, mapActions } from 'vuex'; -import { GlAlert } from '@gitlab/ui'; import axios from '~/lib/utils/axios_utils'; import FeatureFlagForm from './form.vue'; -import { - LEGACY_FLAG, - NEW_VERSION_FLAG, - NEW_FLAG_ALERT, - ROLLOUT_STRATEGY_ALL_USERS, -} from '../constants'; +import { NEW_VERSION_FLAG, ROLLOUT_STRATEGY_ALL_USERS } from '../constants'; import { createNewEnvironmentScope } from '../store/helpers'; import featureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; export default { components: { - GlAlert, FeatureFlagForm, }, mixins: [featureFlagsMixin()], @@ -33,9 +26,6 @@ export default { userShouldSeeNewFlagAlert: this.showUserCallout, }; }, - translations: { - newFlagAlert: NEW_FLAG_ALERT, - }, computed: { ...mapState(['error', 'path']), scopes() { @@ -50,13 +40,7 @@ export default { ]; }, version() { - return this.hasNewVersionFlags ? NEW_VERSION_FLAG : LEGACY_FLAG; - }, - hasNewVersionFlags() { - return this.glFeatures.featureFlagsNewVersion; - }, - shouldShowNewFlagAlert() { - return !this.hasNewVersionFlags && this.userShouldSeeNewFlagAlert; + return NEW_VERSION_FLAG; }, strategies() { return [{ name: ROLLOUT_STRATEGY_ALL_USERS, parameters: {}, scopes: [] }]; @@ -75,14 +59,6 @@ export default { </script> <template> <div> - <gl-alert - v-if="shouldShowNewFlagAlert" - variant="warning" - class="gl-my-5" - @dismiss="dismissNewVersionFlagAlert" - > - {{ $options.translations.newFlagAlert }} - </gl-alert> <h3 class="page-title">{{ s__('FeatureFlags|New feature flag') }}</h3> <div v-if="error.length" class="alert alert-danger"> diff --git a/app/assets/javascripts/feature_flags/constants.js b/app/assets/javascripts/feature_flags/constants.js index 4843eca149a..658984456a5 100644 --- a/app/assets/javascripts/feature_flags/constants.js +++ b/app/assets/javascripts/feature_flags/constants.js @@ -21,10 +21,6 @@ export const fetchUserIdParams = property(['parameters', 'userIds']); export const NEW_VERSION_FLAG = 'new_version_flag'; export const LEGACY_FLAG = 'legacy_flag'; -export const NEW_FLAG_ALERT = s__( - 'FeatureFlags|Feature Flags will look different in the next milestone. No action is needed, but you may notice the functionality was changed to improve the workflow.', -); - export const FEATURE_FLAG_SCOPE = 'featureFlags'; export const USER_LIST_SCOPE = 'userLists'; |