Skip to content

Commit

Permalink
Grafana-datasource-plugin: Remove Incomplete points (https://rbcommon…
Browse files Browse the repository at this point in the history
…s.com/s/pepperdata/r/11685)

Remove points that we don't have enough hosts reporting to show
  • Loading branch information
jeremypepper committed Feb 8, 2017
1 parent 339c8d4 commit fd6198d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ docs/GITCOMMIT
docs/changed-files
docs/changed-files

# rbcommons
.pdreview

# locally required config files
public/css/*.min.css

Expand Down
2 changes: 2 additions & 0 deletions .reviewboardrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
REVIEWBOARD_URL = 'https://rbcommons.com/s/pepperdata/'
REPOSITORY = 'pepperdata-grafana-datasource'
5 changes: 4 additions & 1 deletion dist/datasource.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/datasource.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export class GenericDatasource {
s: templateReplace(options.range.from.format(PEPPERDATA_DATE_FORMAT)),
e: templateReplace(options.range.to.format(PEPPERDATA_DATE_FORMAT)),
tzo: options.range.from.utcOffset() / 60,
sample: sample
sample: sample,
// Remove points without enough hosts reporting
removeincomplete: 1,
omitpoints: "null"
});
const promises = _(options.targets).filter(t => !t.hide).map((target) => {
var qs = Utils.parseQueryString(target.rawDashboardQuery);
Expand Down

0 comments on commit fd6198d

Please sign in to comment.