2020-03-31 05:08:16 -04:00
|
|
|
import { TEST_HOST } from 'helpers/test_constants';
|
|
|
|
|
2020-03-12 20:09:34 -04:00
|
|
|
export const metricsWithData = ['15_metric_a', '16_metric_b'];
|
2019-07-22 08:01:42 -04:00
|
|
|
|
|
|
|
export const groups = [
|
|
|
|
{
|
|
|
|
panels: [
|
|
|
|
{
|
|
|
|
title: 'Memory Usage (Total)',
|
|
|
|
type: 'area-chart',
|
|
|
|
y_label: 'Total Memory Used',
|
2020-03-12 20:09:34 -04:00
|
|
|
metrics: null,
|
2019-07-22 08:01:42 -04:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2019-11-28 10:06:57 -05:00
|
|
|
const result = [
|
2019-07-22 08:01:42 -04:00
|
|
|
{
|
2019-11-28 10:06:57 -05:00
|
|
|
values: [
|
|
|
|
['Mon', 1220],
|
|
|
|
['Tue', 932],
|
|
|
|
['Wed', 901],
|
|
|
|
['Thu', 934],
|
|
|
|
['Fri', 1290],
|
|
|
|
['Sat', 1330],
|
|
|
|
['Sun', 1320],
|
2019-07-22 08:01:42 -04:00
|
|
|
],
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const metricsData = [
|
|
|
|
{
|
|
|
|
metrics: [
|
|
|
|
{
|
2020-03-12 20:09:34 -04:00
|
|
|
metricId: '15_metric_a',
|
2019-11-28 10:06:57 -05:00
|
|
|
result,
|
2019-07-22 08:01:42 -04:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
metrics: [
|
|
|
|
{
|
2020-03-12 20:09:34 -04:00
|
|
|
metricId: '16_metric_b',
|
2019-11-28 10:06:57 -05:00
|
|
|
result,
|
2019-07-22 08:01:42 -04:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2019-12-11 04:08:12 -05:00
|
|
|
export const initialState = () => ({
|
2019-11-04 04:06:21 -05:00
|
|
|
dashboard: {
|
|
|
|
panel_groups: [],
|
|
|
|
},
|
2019-12-11 04:08:12 -05:00
|
|
|
});
|
2020-03-31 05:08:16 -04:00
|
|
|
|
|
|
|
export const initialEmbedGroupState = () => ({
|
|
|
|
modules: [],
|
|
|
|
});
|
|
|
|
|
|
|
|
export const singleEmbedProps = () => ({
|
|
|
|
dashboardUrl: TEST_HOST,
|
|
|
|
containerClass: 'col-lg-12',
|
|
|
|
namespace: 'monitoringDashboard/0',
|
|
|
|
});
|
|
|
|
|
|
|
|
export const dashboardEmbedProps = () => ({
|
|
|
|
dashboardUrl: TEST_HOST,
|
|
|
|
containerClass: 'col-lg-6',
|
|
|
|
namespace: 'monitoringDashboard/0',
|
|
|
|
});
|
|
|
|
|
|
|
|
export const multipleEmbedProps = () => [
|
|
|
|
{
|
|
|
|
dashboardUrl: TEST_HOST,
|
|
|
|
containerClass: 'col-lg-6',
|
|
|
|
namespace: 'monitoringDashboard/0',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
dashboardUrl: TEST_HOST,
|
|
|
|
containerClass: 'col-lg-6',
|
|
|
|
namespace: 'monitoringDashboard/1',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const addModuleAction = 'embedGroup/addModule';
|