Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-67080] fix malformed json #317

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/java/hudson/tasks/junit/History.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public boolean historyAvailable() {

@JavaScriptMethod
@SuppressWarnings("unused") // Called by jelly view
public String getTestResultTrend() {
return JACKSON_FACADE.toJson(createTestResultTrend());
public LinesChartModel getTestResultTrend() {
return createTestResultTrend();
}

private LinesChartModel createTestResultTrend() {
Expand All @@ -88,8 +88,8 @@ private LinesChartModel createTestResultTrend() {

@JavaScriptMethod
@SuppressWarnings("unused") // Called by jelly view
public String getTestDurationTrend() {
return JACKSON_FACADE.toJson(createTestDurationResultTrend());
public LinesChartModel getTestDurationTrend() {
return createTestDurationResultTrend();
}

private LinesChartModel createTestDurationResultTrend() {
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/history/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ document.addEventListener('DOMContentLoaded', function () {
* Requires that a DOM <div> element exists with the ID '#test-duration-trend-chart'.
*/
view.getTestDurationTrend(function (lineModel) {
echartsJenkinsApi.renderZoomableTrendChart('test-duration-trend-chart', lineModel.responseJSON, redrawTrendCharts);
echartsJenkinsApi.renderZoomableTrendChart('test-duration-trend-chart', lineModel.responseText, redrawTrendCharts);
});

/**
* Creates a build trend chart that shows the test results across a number of builds.
* Requires that a DOM <div> element exists with the ID '#test-result-trend-chart'.
*/
view.getTestResultTrend(function (lineModel) {
echartsJenkinsApi.renderZoomableTrendChart('test-result-trend-chart', lineModel.responseJSON, redrawTrendCharts);
echartsJenkinsApi.renderZoomableTrendChart('test-result-trend-chart', lineModel.responseText, redrawTrendCharts);
});
}

Expand Down