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/filtered_search/available_dropdown_mappings.js')
-rw-r--r--app/assets/javascripts/filtered_search/available_dropdown_mappings.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/app/assets/javascripts/filtered_search/available_dropdown_mappings.js b/app/assets/javascripts/filtered_search/available_dropdown_mappings.js
index 49bd3cda127..d7645f96406 100644
--- a/app/assets/javascripts/filtered_search/available_dropdown_mappings.js
+++ b/app/assets/javascripts/filtered_search/available_dropdown_mappings.js
@@ -15,6 +15,7 @@ export default class AvailableDropdownMappings {
labelsEndpoint,
milestonesEndpoint,
releasesEndpoint,
+ environmentsEndpoint,
groupsOnly,
includeAncestorGroups,
includeDescendantGroups,
@@ -24,6 +25,7 @@ export default class AvailableDropdownMappings {
this.labelsEndpoint = labelsEndpoint;
this.milestonesEndpoint = milestonesEndpoint;
this.releasesEndpoint = releasesEndpoint;
+ this.environmentsEndpoint = environmentsEndpoint;
this.groupsOnly = groupsOnly;
this.includeAncestorGroups = includeAncestorGroups;
this.includeDescendantGroups = includeDescendantGroups;
@@ -69,6 +71,11 @@ export default class AvailableDropdownMappings {
gl: DropdownUser,
element: this.container.querySelector('#js-dropdown-assignee'),
},
+ 'approved-by': {
+ reference: null,
+ gl: DropdownUser,
+ element: this.container.querySelector('#js-dropdown-approved-by'),
+ },
milestone: {
reference: null,
gl: DropdownNonUser,
@@ -144,6 +151,16 @@ export default class AvailableDropdownMappings {
},
element: this.container.querySelector('#js-dropdown-target-branch'),
},
+ environment: {
+ reference: null,
+ gl: DropdownNonUser,
+ extraArguments: {
+ endpoint: this.getEnvironmentsEndpoint(),
+ symbol: '',
+ preprocessing: data => data.map(env => ({ title: env })),
+ },
+ element: this.container.querySelector('#js-dropdown-environment'),
+ },
};
}
@@ -189,6 +206,10 @@ export default class AvailableDropdownMappings {
return mergeUrlParams(params, endpoint);
}
+ getEnvironmentsEndpoint() {
+ return `${this.environmentsEndpoint}.json`;
+ }
+
getGroupId() {
return this.filteredSearchInput.getAttribute('data-group-id') || '';
}