// DashboardQuery includes state for the query builder. This is a transition
// struct while we move to the full InfluxQL AST
typeDashboardQuerystruct{
Commandstring`json:"query"`// Command is the query itself
Labelstring`json:"label,omitempty"`// Label is the Y-Axis label for the data
Range*Range`json:"range,omitempty"`// Range is the default Y-Axis range for the data
QueryConfigQueryConfig`json:"queryConfig,omitempty"`// QueryConfig represents the query state that is understood by the data explorer
Sourcestring`json:"source"`// Source is the optional URI to the data source for this queryConfig
Shifts[]TimeShift`json:"-"`// Shifts represents shifts to apply to an influxql query's time range. Clients expect the shift to be in the generated QueryConfig
}
// Range represents an upper and lower bound for data
typeRangestruct{
Upperint64`json:"upper"`// Upper is the upper bound
Lowerint64`json:"lower"`// Lower is the lower bound
}
// QueryConfig represents UI query from the data explorer
typeQueryConfigstruct{
IDstring`json:"id,omitempty"`
Databasestring`json:"database"`
Measurementstring`json:"measurement"`
RetentionPolicystring`json:"retentionPolicy"`
Fields[]Field`json:"fields"`
Tagsmap[string][]string`json:"tags"`
GroupByGroupBy`json:"groupBy"`
AreTagsAcceptedbool`json:"areTagsAccepted"`
Fillstring`json:"fill,omitempty"`
RawText*string`json:"rawText"`
Range*DurationRange`json:"range"`
Shifts[]TimeShift`json:"shifts"`
}
// TimeShift represents a shift to apply to an influxql query's time range
typeTimeShiftstruct{
Labelstring`json:"label"`// Label user facing description
Unitstring`json:"unit"`// Unit influxql time unit representation i.e. ms, s, m, h, d
Quantitystring`json:"quantity"`// Quantity number of units
}
// Field represent influxql fields and functions from the UI
typeFieldstruct{
Valueinterface{}`json:"value"`
Typestring`json:"type"`
Aliasstring`json:"alias"`
Args[]Field`json:"args,omitempty"`
}
// GroupBy represents influxql group by tags from the UI
typeGroupBystruct{
Timestring`json:"time"`
Tags[]string`json:"tags"`
}
// DurationRange represents the lower and upper durations of the query config
typeDurationRangestruct{
Upperstring`json:"upper"`
Lowerstring`json:"lower"`
}
// Axis represents the visible extents of a visualization
typeAxisstruct{
Bounds[]string`json:"bounds"`// bounds are an arbitrary list of client-defined strings that specify the viewport for a cell
LegacyBounds[2]int64`json:"-"`// legacy bounds are for testing a migration from an earlier version of axis
Labelstring`json:"label"`// label is a description of this Axis
Prefixstring`json:"prefix"`// Prefix represents a label prefix for formatting axis values
Suffixstring`json:"suffix"`// Suffix represents a label suffix for formatting axis values
Basestring`json:"base"`// Base represents the radix for formatting axis values
Scalestring`json:"scale"`// Scale is the axis formatting scale. Supported: "log", "linear"
}
// CellColor represents the encoding of data into visualizations
typeCellColorstruct{
IDstring`json:"id"`// ID is the unique id of the cell color
Typestring`json:"type"`// Type is how the color is used. Accepted (min,max,threshold)
Hexstring`json:"hex"`// Hex is the hex number of the color
Namestring`json:"name"`// Name is the user-facing name of the hex color
Valuestring`json:"value"`// Value is the data value mapped to this color
}
// Legend represents the encoding of data into a legend
typeLegendstruct{
Typestring`json:"type,omitempty"`
Orientationstring`json:"orientation,omitempty"`
}
// TableOptions is a type of options for a DashboardCell with type Table
typeTableOptionsstruct{
VerticalTimeAxisbool`json:"verticalTimeAxis"`
SortByRenamableField`json:"sortBy"`
Wrappingstring`json:"wrapping"`
FixFirstColumnbool`json:"fixFirstColumn"`
}
// RenamableField is a column/row field in a DashboardCell of type Table
typeRenamableFieldstruct{
InternalNamestring`json:"internalName"`
DisplayNamestring`json:"displayName"`
Visiblebool`json:"visible"`
}
// DecimalPlaces indicates whether decimal places should be enforced, and how many digits it should show.