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/monitoring/components/variables/dropdown_field.vue')
-rw-r--r--app/assets/javascripts/monitoring/components/variables/dropdown_field.vue53
1 files changed, 0 insertions, 53 deletions
diff --git a/app/assets/javascripts/monitoring/components/variables/dropdown_field.vue b/app/assets/javascripts/monitoring/components/variables/dropdown_field.vue
deleted file mode 100644
index ff0327f5f99..00000000000
--- a/app/assets/javascripts/monitoring/components/variables/dropdown_field.vue
+++ /dev/null
@@ -1,53 +0,0 @@
-<script>
-import { GlFormGroup, GlDropdown, GlDropdownItem } from '@gitlab/ui';
-
-export default {
- components: {
- GlFormGroup,
- GlDropdown,
- GlDropdownItem,
- },
- props: {
- name: {
- type: String,
- required: true,
- },
- label: {
- type: String,
- required: true,
- },
- value: {
- type: String,
- required: false,
- default: '',
- },
- options: {
- type: Object,
- required: true,
- },
- },
- computed: {
- text() {
- const selectedOpt = this.options.values?.find((opt) => opt.value === this.value);
- return selectedOpt?.text || this.value;
- },
- },
- methods: {
- onUpdate(value) {
- this.$emit('input', value);
- },
- },
-};
-</script>
-<template>
- <gl-form-group :label="label">
- <gl-dropdown toggle-class="dropdown-menu-toggle" :text="text || s__('Metrics|Select a value')">
- <gl-dropdown-item
- v-for="val in options.values"
- :key="val.value"
- @click="onUpdate(val.value)"
- >{{ val.text }}</gl-dropdown-item
- >
- </gl-dropdown>
- </gl-form-group>
-</template>