TypeResample
grafonnet.query.expr.TypeResample
Index
fn withDatasource(value)
fn withDatasourceMixin(value)
fn withDownsampler(value)
fn withExpression(value)
fn withHide(value=true)
fn withIntervalMs(value)
fn withMaxDataPoints(value)
fn withQueryType(value)
fn withRefId(value)
fn withResultAssertions(value)
fn withResultAssertionsMixin(value)
fn withTimeRange(value)
fn withTimeRangeMixin(value)
fn withType()
fn withUpsampler(value)
fn withWindow(value)
obj datasource
obj resultAssertions
obj timeRange
Fields
fn withDatasource
withDatasource(value)
PARAMETERS:
- value (
object
)
Ref to a DataSource instance
fn withDatasourceMixin
withDatasourceMixin(value)
PARAMETERS:
- value (
object
)
Ref to a DataSource instance
fn withDownsampler
withDownsampler(value)
PARAMETERS:
- value (
string
)- valid values:
"sum"
,"mean"
,"min"
,"max"
,"count"
,"last"
,"median"
- valid values:
The downsample function Possible enum values: - "sum"
- "mean"
- "min"
- "max"
- "count"
- "last"
- "median"
fn withExpression
withExpression(value)
PARAMETERS:
- value (
string
)
The math expression
fn withHide
withHide(value=true)
PARAMETERS:
- value (
boolean
)- default value:
true
- default value:
true if query is disabled (ie should not be returned to the dashboard) NOTE: this does not always imply that the query should not be executed since the results from a hidden query may be used as the input to other queries (SSE etc)
fn withIntervalMs
withIntervalMs(value)
PARAMETERS:
- value (
number
)
Interval is the suggested duration between time points in a time series query. NOTE: the values for intervalMs is not saved in the query model. It is typically calculated from the interval required to fill a pixels in the visualization
fn withMaxDataPoints
withMaxDataPoints(value)
PARAMETERS:
- value (
integer
)
MaxDataPoints is the maximum number of data points that should be returned from a time series query. NOTE: the values for maxDataPoints is not saved in the query model. It is typically calculated from the number of pixels visible in a visualization
fn withQueryType
withQueryType(value)
PARAMETERS:
- value (
string
)
QueryType is an optional identifier for the type of query. It can be used to distinguish different types of queries.
fn withRefId
withRefId(value)
PARAMETERS:
- value (
string
)
RefID is the unique identifier of the query, set by the frontend call.
fn withResultAssertions
withResultAssertions(value)
PARAMETERS:
- value (
object
)
Optionally define expected query result behavior
fn withResultAssertionsMixin
withResultAssertionsMixin(value)
PARAMETERS:
- value (
object
)
Optionally define expected query result behavior
fn withTimeRange
withTimeRange(value)
PARAMETERS:
- value (
object
)
TimeRange represents the query range NOTE: unlike generic /ds/query, we can now send explicit time values in each query NOTE: the values for timeRange are not saved in a dashboard, they are constructed on the fly
fn withTimeRangeMixin
withTimeRangeMixin(value)
PARAMETERS:
- value (
object
)
TimeRange represents the query range NOTE: unlike generic /ds/query, we can now send explicit time values in each query NOTE: the values for timeRange are not saved in a dashboard, they are constructed on the fly
fn withType
withType()
fn withUpsampler
withUpsampler(value)
PARAMETERS:
- value (
string
)- valid values:
"pad"
,"backfilling"
,"fillna"
- valid values:
The upsample function Possible enum values: - "pad"
Use the last seen value - "backfilling"
backfill - "fillna"
Do not fill values (nill)
fn withWindow
withWindow(value)
PARAMETERS:
- value (
string
)
The time duration
obj datasource
fn datasource.withType
datasource.withType(value)
PARAMETERS:
- value (
string
)
The plugin type-id
fn datasource.withUid
datasource.withUid(value)
PARAMETERS:
- value (
string
)
Specific datasource instance
obj resultAssertions
fn resultAssertions.withMaxFrames
resultAssertions.withMaxFrames(value)
PARAMETERS:
- value (
integer
)
Maximum frame count
fn resultAssertions.withType
resultAssertions.withType(value)
PARAMETERS:
- value (
string
)- valid values:
""
,"timeseries-wide"
,"timeseries-long"
,"timeseries-many"
,"timeseries-multi"
,"directory-listing"
,"table"
,"numeric-wide"
,"numeric-multi"
,"numeric-long"
,"log-lines"
- valid values:
Type asserts that the frame matches a known type structure. Possible enum values: - ""
- "timeseries-wide"
- "timeseries-long"
- "timeseries-many"
- "timeseries-multi"
- "directory-listing"
- "table"
- "numeric-wide"
- "numeric-multi"
- "numeric-long"
- "log-lines"
fn resultAssertions.withTypeVersion
resultAssertions.withTypeVersion(value)
PARAMETERS:
- value (
array
)
TypeVersion is the version of the Type property. Versions greater than 0.0 correspond to the dataplane contract documentation https://grafana.github.io/dataplane/contract/.
fn resultAssertions.withTypeVersionMixin
resultAssertions.withTypeVersionMixin(value)
PARAMETERS:
- value (
array
)
TypeVersion is the version of the Type property. Versions greater than 0.0 correspond to the dataplane contract documentation https://grafana.github.io/dataplane/contract/.
obj timeRange
fn timeRange.withFrom
timeRange.withFrom(value="now-6h")
PARAMETERS:
- value (
string
)- default value:
"now-6h"
- default value:
From is the start time of the query.
fn timeRange.withTo
timeRange.withTo(value="now")
PARAMETERS:
- value (
string
)- default value:
"now"
- default value:
To is the end time of the query.