Commit f9284ee5 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Added group to the custom metrics table

parent dc9b7a1e
...@@ -9,7 +9,7 @@ function customMetricTemplate(metric) { ...@@ -9,7 +9,7 @@ function customMetricTemplate(metric) {
const editIcon = spriteIcon('pencil'); const editIcon = spriteIcon('pencil');
return ` return `
<li class="custom-metric"> <li class="custom-metric">
${metric.title} ${metric.group} / ${metric.title}
<div <div
class="custom-metric-operation"> class="custom-metric-operation">
<a <a
......
export const metrics = [ const metrics = [
{ {
edit_path: '/root/prometheus-test/prometheus/metrics/3/edit', edit_path: '/root/prometheus-test/prometheus/metrics/3/edit',
id: 3, id: 3,
title: 'Requests', title: 'Requests',
group: 'Business',
}, },
{ {
edit_path: '/root/prometheus-test/prometheus/metrics/2/edit', edit_path: '/root/prometheus-test/prometheus/metrics/2/edit',
id: 2, id: 2,
title: 'Sales by the hour', title: 'Sales by the hour',
group: 'Business',
}, },
{ {
edit_path: '/root/prometheus-test/prometheus/metrics/1/edit', edit_path: '/root/prometheus-test/prometheus/metrics/1/edit',
id: 1, id: 1,
title: 'Requests', title: 'Requests',
group: 'Business',
}, },
]; ];
export const environments = [];
export default metrics;
...@@ -2,7 +2,7 @@ import MockAdapter from 'axios-mock-adapter'; ...@@ -2,7 +2,7 @@ import MockAdapter from 'axios-mock-adapter';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import PrometheusMetrics from 'ee/prometheus_metrics/prometheus_metrics'; import PrometheusMetrics from 'ee/prometheus_metrics/prometheus_metrics';
import PANEL_STATE from '~/prometheus_metrics/constants'; import PANEL_STATE from '~/prometheus_metrics/constants';
import { metrics } from './mock_data'; import metrics from './mock_data';
describe('PrometheusMetrics EE', () => { describe('PrometheusMetrics EE', () => {
const FIXTURE = 'services/prometheus/prometheus_service.html.raw'; const FIXTURE = 'services/prometheus/prometheus_service.html.raw';
......
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