Commit 0f863c68 authored by Fatih Acet's avatar Fatih Acet

Merge branch '60687-enviro-dropdown' into 'master'

Fix Metrics environments dropdown

Closes #60687

See merge request gitlab-org/gitlab-ce!27586
parents 04519162 e4d1f5d3
...@@ -221,6 +221,7 @@ export default { ...@@ -221,6 +221,7 @@ export default {
<gl-dropdown-item <gl-dropdown-item
v-for="environment in store.environmentsData" v-for="environment in store.environmentsData"
:key="environment.id" :key="environment.id"
:href="environment.metrics_path"
:active="environment.name === currentEnvironmentName" :active="environment.name === currentEnvironmentName"
active-class="is-active" active-class="is-active"
>{{ environment.name }}</gl-dropdown-item >{{ environment.name }}</gl-dropdown-item
......
import Vue from 'vue'; import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils'; import { parseBoolean } from '~/lib/utils/common_utils';
import Dashboard from './components/dashboard.vue'; import Dashboard from 'ee_else_ce/monitoring/components/dashboard.vue';
export default (props = {}) => { export default (props = {}) => {
const el = document.getElementById('prometheus-graphs'); const el = document.getElementById('prometheus-graphs');
......
---
title: Fix Metrics Environments dropdown
merge_request:
author:
type: fixed
...@@ -175,7 +175,7 @@ describe('Dashboard', () => { ...@@ -175,7 +175,7 @@ describe('Dashboard', () => {
setTimeout(() => { setTimeout(() => {
const dropdownItems = component.$el.querySelectorAll( const dropdownItems = component.$el.querySelectorAll(
'.js-environments-dropdown .dropdown-item[active="true"]', '.js-environments-dropdown .dropdown-item.is-active',
); );
expect(dropdownItems.length).toEqual(1); expect(dropdownItems.length).toEqual(1);
......
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