Skip to content

Commit 159ea69

Browse files
committed
fix(OpenTSDB): correct content-type, fixes grafana#4965
1 parent 0ea3458 commit 159ea69

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

public/app/plugins/datasource/opentsdb/datasource.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,6 @@ function (angular, _, dateMath) {
129129
};
130130

131131
this._addCredentialOptions(options);
132-
133-
// In case the backend is 3rd-party hosted and does not suport OPTIONS, urlencoded requests
134-
// go as POST rather than OPTIONS+POST
135-
options.headers = { 'Content-Type': 'application/x-www-form-urlencoded' };
136-
137132
return backendSrv.datasourceRequest(options);
138133
};
139134

public/app/plugins/panel/graph/graph.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,14 @@ function (angular, $, moment, _, kbn, GraphTooltip) {
251251
function callPlot(incrementRenderCounter) {
252252
try {
253253
$.plot(elem, sortedSeries, options);
254-
delete ctrl.error;
255-
delete ctrl.inspector;
254+
if (ctrl.renderError) {
255+
delete ctrl.error;
256+
delete ctrl.inspector;
257+
}
256258
} catch (e) {
257259
console.log('flotcharts error', e);
258260
ctrl.error = e.message || "Render Error";
261+
ctrl.renderError = true;
259262
ctrl.inspector = {error: ctrl.error};
260263
}
261264

0 commit comments

Comments
 (0)