Skip to content

Commit d36f2e0

Browse files
Merge pull request #877 from etmurasaki/etmura-ou-1217
OU-1217: perses customizable dashboards with perses global datasources for tempo and loki
2 parents ca47ec8 + d9c9398 commit d36f2e0

34 files changed

Lines changed: 2852 additions & 19 deletions
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
import { runCOOCreateImportPersesTests } from '../../support/perses/05.coo_create_import_perses_admin.cy';
2+
import { nav } from '../../views/nav';
3+
4+
// Set constants for the operators that need to be installed for tests.
5+
const MCP = {
6+
namespace: 'openshift-cluster-observability-operator',
7+
packageName: 'cluster-observability-operator',
8+
operatorName: 'Cluster Observability Operator',
9+
config: {
10+
kind: 'UIPlugin',
11+
name: 'monitoring',
12+
},
13+
};
14+
15+
const MP = {
16+
namespace: 'openshift-monitoring',
17+
operatorName: 'Cluster Monitoring Operator',
18+
};
19+
20+
const OTEL = {
21+
namespace: 'openshift-opentelemetry-operator',
22+
packageName: 'opentelemetry-product',
23+
operatorName: 'Red Hat build of OpenTelemetry',
24+
};
25+
26+
const TEMPO = {
27+
namespace: 'openshift-tempo-operator',
28+
packageName: 'tempo-product',
29+
operatorName: 'Tempo Operator',
30+
};
31+
32+
const LOKI = {
33+
namespace: 'openshift-operators-redhat',
34+
packageName: 'loki-operator',
35+
operatorName: 'Loki Operator',
36+
};
37+
38+
const CLO = {
39+
namespace: 'openshift-logging',
40+
packageName: 'cluster-logging',
41+
operatorName: 'Logging Operator',
42+
};
43+
44+
describe(
45+
'COO - Dashboards (Perses) - Perses Global Datasources with Tempo and Loki',
46+
{ tags: ['@perses', '@dashboards'] },
47+
() => {
48+
before(() => {
49+
cy.beforeBlockTempo(TEMPO);
50+
cy.beforeBlockOtel(OTEL);
51+
cy.configureBase();
52+
cy.configureTracingApps();
53+
54+
cy.beforeBlockLoki(LOKI);
55+
cy.beforeBlockLogging(CLO);
56+
cy.configureLoggingLoki();
57+
58+
cy.cleanupDistributeTracingUIPlugin();
59+
cy.cleanupLoggingUIPlugin();
60+
cy.cleanupExtraDashboards();
61+
62+
cy.beforeBlockCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false });
63+
cy.cleanupPersesTestDashboardsBeforeTests();
64+
cy.setupPersesRBACandExtraDashboards();
65+
cy.installDistributeTracingUIPlugin();
66+
cy.installLoggingUIPlugin();
67+
cy.waitForDistributeTracingUIPluginReady();
68+
cy.waitForLoggingUIPluginReady();
69+
70+
cy.createTempoLokiThanosPersesGlobalDatasource();
71+
});
72+
73+
beforeEach(() => {
74+
nav.sidenav.clickNavLink(['Observe', 'Dashboards (Perses)']);
75+
cy.wait(5000);
76+
cy.changeNamespace('All Projects');
77+
});
78+
79+
after(() => {
80+
cy.cleanupTempoLokiThanosPersesGlobalDatasource();
81+
cy.cleanupLoggingUIPlugin();
82+
cy.cleanupDistributeTracingUIPlugin();
83+
cy.cleanupExtraDashboards();
84+
cy.cleanupCOO(MCP, MP, { dashboards: true, troubleshootingPanel: false });
85+
cy.cleanupLoggingLoki();
86+
cy.cleanupLogging(CLO);
87+
cy.cleanupLoki(LOKI);
88+
cy.cleanupTracingApps();
89+
cy.cleanupBase();
90+
cy.cleanupOtel(OTEL);
91+
cy.cleanupTempo(TEMPO);
92+
});
93+
94+
runCOOCreateImportPersesTests({
95+
name: 'Administrator',
96+
});
97+
},
98+
);
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
{
2+
"kind": "Dashboard",
3+
"metadata": {
4+
"createdAt": "2026-04-10T21:51:00.581694831Z",
5+
"name": "tempo_loki_perses_global_datasources_json_import",
6+
"project": "default",
7+
"updatedAt": "2026-04-10T21:52:50.555886464Z",
8+
"version": 1
9+
},
10+
"spec": {
11+
"display": {
12+
"name": "Tempo Loki Perses Global Datasources - JSON Import"
13+
},
14+
"panels": {
15+
"5afa2e46a64a423fac68f7282c6bb43b": {
16+
"kind": "Panel",
17+
"spec": {
18+
"display": {
19+
"description": "This is a line chart test",
20+
"name": "Time Series Chart"
21+
},
22+
"plugin": {
23+
"kind": "TimeSeriesChart",
24+
"spec": {}
25+
},
26+
"queries": [
27+
{
28+
"kind": "TimeSeriesQuery",
29+
"spec": {
30+
"plugin": {
31+
"kind": "PrometheusTimeSeriesQuery",
32+
"spec": {
33+
"query": "up"
34+
}
35+
}
36+
}
37+
}
38+
]
39+
}
40+
},
41+
"82e164e550e84a72b062d0a7d2cb0f3e": {
42+
"kind": "Panel",
43+
"spec": {
44+
"display": {
45+
"description": "This is a trace table test",
46+
"name": "Tempo - Trace Table"
47+
},
48+
"plugin": {
49+
"kind": "TraceTable",
50+
"spec": {}
51+
},
52+
"queries": [
53+
{
54+
"kind": "TraceQuery",
55+
"spec": {
56+
"plugin": {
57+
"kind": "TempoTraceQuery",
58+
"spec": {
59+
"limit": 20,
60+
"query": "{}"
61+
}
62+
}
63+
}
64+
}
65+
]
66+
}
67+
},
68+
"a10cea99a1aa4f80bfe4320ccf2fc8de": {
69+
"kind": "Panel",
70+
"spec": {
71+
"display": {
72+
"description": "This is a logs table test",
73+
"name": "Loki - Logs Table"
74+
},
75+
"plugin": {
76+
"kind": "LogsTable",
77+
"spec": {
78+
"allowWrap": true,
79+
"enableDetails": true,
80+
"showTime": true
81+
}
82+
},
83+
"queries": [
84+
{
85+
"kind": "LogQuery",
86+
"spec": {
87+
"plugin": {
88+
"kind": "LokiLogQuery",
89+
"spec": {
90+
"query": "{ log_type=\"application\" } | json"
91+
}
92+
}
93+
}
94+
}
95+
]
96+
}
97+
},
98+
"e3ed41a6d007492787bafa4dbc527610": {
99+
"kind": "Panel",
100+
"spec": {
101+
"display": {
102+
"description": "This is a scatter chart test",
103+
"name": "Tempo - Scatter Chart"
104+
},
105+
"plugin": {
106+
"kind": "ScatterChart",
107+
"spec": {}
108+
},
109+
"queries": [
110+
{
111+
"kind": "TraceQuery",
112+
"spec": {
113+
"plugin": {
114+
"kind": "TempoTraceQuery",
115+
"spec": {
116+
"limit": 20,
117+
"query": "{}"
118+
}
119+
}
120+
}
121+
}
122+
]
123+
}
124+
}
125+
},
126+
"layouts": [
127+
{
128+
"kind": "Grid",
129+
"spec": {
130+
"display": {
131+
"title": "Panel Group Up",
132+
"collapse": {
133+
"open": true
134+
}
135+
},
136+
"items": [
137+
{
138+
"x": 0,
139+
"y": 0,
140+
"width": 12,
141+
"height": 6,
142+
"content": {
143+
"$ref": "#/spec/panels/e3ed41a6d007492787bafa4dbc527610"
144+
}
145+
},
146+
{
147+
"x": 0,
148+
"y": 6,
149+
"width": 12,
150+
"height": 6,
151+
"content": {
152+
"$ref": "#/spec/panels/82e164e550e84a72b062d0a7d2cb0f3e"
153+
}
154+
},
155+
{
156+
"x": 0,
157+
"y": 12,
158+
"width": 12,
159+
"height": 6,
160+
"content": {
161+
"$ref": "#/spec/panels/a10cea99a1aa4f80bfe4320ccf2fc8de"
162+
}
163+
},
164+
{
165+
"x": 0,
166+
"y": 18,
167+
"width": 12,
168+
"height": 6,
169+
"content": {
170+
"$ref": "#/spec/panels/5afa2e46a64a423fac68f7282c6bb43b"
171+
}
172+
}
173+
]
174+
}
175+
}
176+
],
177+
"variables": [],
178+
"duration": "1h",
179+
"refreshInterval": "30s",
180+
"datasources": {}
181+
}
182+
}
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
kind: Dashboard
2+
metadata:
3+
createdAt: "2026-04-10T21:51:00.581694831Z"
4+
name: tempo_loki_perses_global_datasources_yaml_import
5+
project: default
6+
updatedAt: "2026-04-10T21:52:50.555886464Z"
7+
version: 1
8+
spec:
9+
display:
10+
name: Tempo Loki Perses Global Datasources - YAML Import
11+
panels:
12+
5afa2e46a64a423fac68f7282c6bb43b:
13+
kind: Panel
14+
spec:
15+
display:
16+
description: This is a line chart test
17+
name: Time Series Chart
18+
plugin:
19+
kind: TimeSeriesChart
20+
spec: {}
21+
queries:
22+
- kind: TimeSeriesQuery
23+
spec:
24+
plugin:
25+
kind: PrometheusTimeSeriesQuery
26+
spec:
27+
query: up
28+
82e164e550e84a72b062d0a7d2cb0f3e:
29+
kind: Panel
30+
spec:
31+
display:
32+
description: This is a trace table test
33+
name: Tempo - Trace Table
34+
plugin:
35+
kind: TraceTable
36+
spec: {}
37+
queries:
38+
- kind: TraceQuery
39+
spec:
40+
plugin:
41+
kind: TempoTraceQuery
42+
spec:
43+
limit: 20
44+
query: "{}"
45+
a10cea99a1aa4f80bfe4320ccf2fc8de:
46+
kind: Panel
47+
spec:
48+
display:
49+
description: This is a logs table test
50+
name: Loki - Logs Table
51+
plugin:
52+
kind: LogsTable
53+
spec:
54+
allowWrap: true
55+
enableDetails: true
56+
showTime: true
57+
queries:
58+
- kind: LogQuery
59+
spec:
60+
plugin:
61+
kind: LokiLogQuery
62+
spec:
63+
query: '{ log_type="application" } | json'
64+
e3ed41a6d007492787bafa4dbc527610:
65+
kind: Panel
66+
spec:
67+
display:
68+
description: This is a scatter chart test
69+
name: Tempo - Scatter Chart
70+
plugin:
71+
kind: ScatterChart
72+
spec: {}
73+
queries:
74+
- kind: TraceQuery
75+
spec:
76+
plugin:
77+
kind: TempoTraceQuery
78+
spec:
79+
limit: 20
80+
query: "{}"
81+
layouts:
82+
- kind: Grid
83+
spec:
84+
display:
85+
title: Panel Group Up
86+
collapse:
87+
open: true
88+
items:
89+
- x: 0
90+
"y": 0
91+
width: 12
92+
height: 6
93+
content:
94+
$ref: "#/spec/panels/e3ed41a6d007492787bafa4dbc527610"
95+
- x: 0
96+
"y": 6
97+
width: 12
98+
height: 6
99+
content:
100+
$ref: "#/spec/panels/82e164e550e84a72b062d0a7d2cb0f3e"
101+
- x: 0
102+
"y": 12
103+
width: 12
104+
height: 6
105+
content:
106+
$ref: "#/spec/panels/a10cea99a1aa4f80bfe4320ccf2fc8de"
107+
- x: 0
108+
"y": 18
109+
width: 12
110+
height: 6
111+
content:
112+
$ref: "#/spec/panels/5afa2e46a64a423fac68f7282c6bb43b"
113+
variables: []
114+
duration: 1h
115+
refreshInterval: 30s
116+
datasources: {}

0 commit comments

Comments
 (0)