Skip to content

Commit

Permalink
Fix empty data (#25)
Browse files Browse the repository at this point in the history
* Fix empty data

Fixes #24

* Release v0.1.1
  • Loading branch information
simPod authored and andig committed Dec 14, 2018
1 parent d3d1b90 commit f7c8f8d
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 37 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,3 @@ This plugin requires node 6.10.0. To build use of [Yarn](https://yarnpkg.com/lan
yarn install
yarn run build
```

### Changelog

0.1.0

- Added JSON editor for additional query variables
- Support for template variables in /query and /annotations requests
- Rewritten in TypeScript
8 changes: 0 additions & 8 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,3 @@ This plugin requires node 6.10.0. To build use of [Yarn](https://yarnpkg.com/lan
yarn install
yarn run build
```

### Changelog

0.1.0

- Added JSON editor for additional query variables
- Support for template variables in /query and /annotations requests
- Rewritten in TypeScript
2 changes: 1 addition & 1 deletion dist/module.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/module.js.map

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions dist/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
"annotations": true,

"info": {
"description": "json datasource",
"author": {
"name": "Grafana Labs",
"url": "https://grafana.com"
},
"description": "JSON over HTTP datasource",
"logos": {
"small": "img/json-logo.svg",
"large": "img/json-logo.svg"
Expand All @@ -24,12 +20,12 @@
{"name": "GitHub", "url": "https://github.com/simPod/grafana-json-datasource"},
{"name": "MIT License", "url": "https://github.com/simPod/grafana-json-datasource/blob/master/LICENSE"}
],
"version": "0.1.0",
"updated": "2018-08-20"
"version": "0.1.1",
"updated": "2018-12-13"
},

"dependencies": {
"grafanaVersion": "3.x.x",
"grafanaVersion": "5.x.x",
"plugins": [ ]
}
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "grafana-json",
"version": "0.1.0",
"description": "Grafana JSON datasource",
"main": "index.js",
"scripts": {
Expand Down
12 changes: 4 additions & 8 deletions src/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
"annotations": true,

"info": {
"description": "json datasource",
"author": {
"name": "Grafana Labs",
"url": "https://grafana.com"
},
"description": "JSON over HTTP datasource",
"logos": {
"small": "img/json-logo.svg",
"large": "img/json-logo.svg"
Expand All @@ -24,12 +20,12 @@
{"name": "GitHub", "url": "https://github.com/simPod/grafana-json-datasource"},
{"name": "MIT License", "url": "https://github.com/simPod/grafana-json-datasource/blob/master/LICENSE"}
],
"version": "0.1.0",
"updated": "2018-08-20"
"version": "0.1.1",
"updated": "2018-12-13"
},

"dependencies": {
"grafanaVersion": "3.x.x",
"grafanaVersion": "5.x.x",
"plugins": [ ]
}
}
3 changes: 1 addition & 2 deletions src/query_ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export class GenericDatasourceQueryCtrl extends QueryCtrl {
if (!this.target.type) {
this.target.type = this.panelCtrl.panel.type === 'table' ? 'table' : 'timeseries';
}
console.log(this.target.type);
this.target.data = this.target.data || null;
this.target.data = this.target.data || '';

this.types = [
{ text: 'Time series', value: 'timeseries' },
Expand Down

0 comments on commit f7c8f8d

Please sign in to comment.