Skip to content

Commit ae0ab5d

Browse files
committed
Add java -version info on TRSS metricsDetails page
resolves: runtimes/automation/issues/635 Signed-off-by: Lan Xia <[email protected]>
1 parent c1a0150 commit ae0ab5d

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

test-result-summary-client/src/TrafficLight/MetricsTable.jsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ const SummaryRow = ({ type, stats }) => {
2323

2424
const MetricsTable = ({ type, id, benchmarkName }) => {
2525
const [data, setData] = useState([]);
26+
const [javaVersion, setJavaVersion] = useState([]);
2627
useEffect(() => {
2728
const updateData = async () => {
2829
let results;
2930
if (id) {
3031
results = await fetchData(`/api/getData?_id=${id}`);
3132
}
3233
if (results && results[0]) {
33-
results = results[0].aggregateInfo;
34-
35-
const fliteredData = Object.values(results).find(
34+
const aggregateInfo = results[0].aggregateInfo;
35+
const fliteredData = Object.values(aggregateInfo).find(
3636
(item) =>
3737
benchmarkName === item.benchmarkName &&
3838
item.buildName.includes(type)
@@ -48,7 +48,17 @@ const MetricsTable = ({ type, id, benchmarkName }) => {
4848
};
4949
});
5050
});
51-
51+
const grandchildrenData = await fetchData(
52+
`/api/getChildBuilds?parentId=${results[0]._id}&buildName=${fliteredData.buildName}`
53+
);
54+
let javaVersion = '';
55+
for (const grandchildData of grandchildrenData) {
56+
if (grandchildData.javaVersion) {
57+
javaVersion = grandchildData.javaVersion;
58+
break;
59+
}
60+
}
61+
setJavaVersion(javaVersion);
5262
setData(rawValues);
5363
}
5464
};
@@ -102,6 +112,7 @@ const MetricsTable = ({ type, id, benchmarkName }) => {
102112
>
103113
{type.toUpperCase()} - {benchmarkName}
104114
</p>
115+
<pre>JDK Version: {javaVersion}</pre>
105116
<Table
106117
bordered
107118
dataSource={data}

test-result-summary-client/src/TrafficLight/TrafficLight.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ function TrafficLight() {
237237
Baseline JavaVersion: {baselineJaveVersion}
238238
</pre>
239239
}
240+
overlayStyle={{ maxWidth: 850 }}
240241
>
241242
<div
242243
style={{

0 commit comments

Comments
 (0)