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:
Diffstat (limited to 'app/assets/javascripts/ci/ci_variable_list/components/ci_variable_shared.vue')
-rw-r--r--app/assets/javascripts/ci/ci_variable_list/components/ci_variable_shared.vue25
1 files changed, 7 insertions, 18 deletions
diff --git a/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_shared.vue b/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_shared.vue
index ee2c0a771cf..9786f25ed87 100644
--- a/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_shared.vue
+++ b/app/assets/javascripts/ci/ci_variable_list/components/ci_variable_shared.vue
@@ -159,12 +159,13 @@ export default {
return this.queryData?.environments?.query || {};
},
skip() {
- return !this.queryData?.environments?.query;
+ return !this.hasEnvScopeQuery;
},
variables() {
return {
+ first: ENVIRONMENT_QUERY_LIMIT,
fullPath: this.fullPath,
- ...this.environmentQueryVariables,
+ search: '',
};
},
update(data) {
@@ -179,23 +180,12 @@ export default {
areEnvironmentsLoading() {
return this.$apollo.queries.environments.loading;
},
- environmentQueryVariables() {
- if (this.glFeatures?.ciLimitEnvironmentScope) {
- return {
- first: ENVIRONMENT_QUERY_LIMIT,
- search: '',
- };
- }
-
- return {};
+ hasEnvScopeQuery() {
+ return Boolean(this.queryData?.environments?.query);
},
isLoading() {
- // TODO: Remove areEnvironmentsLoading and show loading icon in dropdown when
- // environment query is loading and FF is enabled
- // https://gitlab.com/gitlab-org/gitlab/-/issues/396990
return (
(this.$apollo.queries.ciVariables.loading && this.isInitialLoading) ||
- this.areEnvironmentsLoading ||
this.isLoadingMoreItems
);
},
@@ -248,9 +238,7 @@ export default {
this.variableMutation(UPDATE_MUTATION_ACTION, variable);
},
async searchEnvironmentScope(searchTerm) {
- if (this.glFeatures?.ciLimitEnvironmentScope) {
- this.$apollo.queries.environments.refetch({ search: searchTerm });
- }
+ this.$apollo.queries.environments.refetch({ search: searchTerm });
},
async variableMutation(mutationAction, variable) {
try {
@@ -296,6 +284,7 @@ export default {
:are-scoped-variables-available="areScopedVariablesAvailable"
:entity="entity"
:environments="environments"
+ :has-env-scope-query="hasEnvScopeQuery"
:hide-environment-scope="hideEnvironmentScope"
:is-loading="isLoading"
:max-variable-limit="maxVariableLimit"