Commit 25d5116c authored by David O'Regan's avatar David O'Regan

Merge branch 'cngo-convert-threat-monitoring-environment-picker-to-gl-dropdown' into 'master'

Convert Threat Monitoring environment picker to GlDropdown

See merge request gitlab-org/gitlab!54309
parents 5bb7d95c bd859cb1
---
title: Convert Threat Monitoring environment picker to GlDropdown
merge_request: 54309
author:
type: changed
<script>
import { GlFormGroup, GlDeprecatedDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui';
import { GlFormGroup, GlDropdown, GlDropdownItem } from '@gitlab/ui';
import { mapActions, mapGetters, mapState } from 'vuex';
import { ALL_ENVIRONMENT_NAME } from '../constants';
export default {
components: {
GlFormGroup,
GlDeprecatedDropdown,
GlDeprecatedDropdownItem,
GlDropdown,
GlDropdownItem,
},
props: {
includeAll: {
......@@ -40,27 +40,27 @@ export default {
:label-for="$options.environmentFilterId"
class="col-sm-6 col-md-4 col-lg-3 col-xl-2"
>
<gl-deprecated-dropdown
<gl-dropdown
:id="$options.environmentFilterId"
ref="environmentsDropdown"
class="mb-0 d-flex"
toggle-class="d-flex justify-content-between text-truncate"
class="gl-display-flex"
toggle-class="gl-truncate"
:text="environmentName"
:disabled="!canChangeEnvironment"
>
<gl-deprecated-dropdown-item
<gl-dropdown-item
v-for="environment in environments"
:key="environment.id"
ref="environmentsDropdownItem"
@click="setCurrentEnvironmentId(environment.id)"
>{{ environment.name }}</gl-deprecated-dropdown-item
>{{ environment.name }}</gl-dropdown-item
>
<gl-deprecated-dropdown-item
<gl-dropdown-item
v-if="includeAll"
ref="environmentsDropdownItem"
@click="setAllEnvironments"
>{{ $options.ALL_ENVIRONMENT_NAME }}</gl-deprecated-dropdown-item
>{{ $options.ALL_ENVIRONMENT_NAME }}</gl-dropdown-item
>
</gl-deprecated-dropdown>
</gl-dropdown>
</gl-form-group>
</template>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment