Browse Source

Show "Browser access type is not supported" message #345 (#346)

master
rozetko 6 years ago committed by GitHub
parent
commit
8660790ff9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/panel/graph_panel/graph_ctrl.ts

3
src/panel/graph_panel/graph_ctrl.ts

@ -758,6 +758,9 @@ class GraphCtrl extends MetricsPanelCtrl {
private async _getDatasourceRequest() {
if(this._datasourceRequest.type === undefined) {
const datasource = await this._getDatasourceByName(this.panel.datasource);
if(datasource.access !== 'proxy') {
throw new Error(`"${datasource.name}" datasource has "Browser" access type but only "Server" is supported`);
}
this._datasourceRequest.type = datasource.type;
}
return this._datasourceRequest;

Loading…
Cancel
Save