Skip to content

Instantly share code, notes, and snippets.

@qw1mb0
Created March 11, 2019 20:32
Show Gist options
  • Save qw1mb0/436b6f750cfed2b0d6d6a4e7e8d7d50c to your computer and use it in GitHub Desktop.
Save qw1mb0/436b6f750cfed2b0d6d6a4e7e8d7d50c to your computer and use it in GitHub Desktop.
--- a/public/app/plugins/datasource/prometheus/datasource.ts 2018-12-10 17:08:32.000000000 +0300
+++ b/public/app/plugins/datasource/prometheus/datasource.ts 2018-12-10 19:03:15.791337923 +0300
@@ -235,6 +235,10 @@
...this.getRangeScopedVars(),
});
}
+ const intervalForRangeVectors = Math.max(kbn.interval_to_seconds(this.interval) * 2, interval);
+ scopedVars = Object.assign({}, scopedVars, {
+ __interval_rv: { text: intervalForRangeVectors + 's', value: intervalForRangeVectors + 's' },
+ });
query.step = interval;
let expr = target.expr;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment