forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'grafana/master' into anno-regions
* grafana/master: DataFrame: convert from row based to a columnar value format (grafana#18391) Packages: Temporarily skip canary releases if packages build fail (grafana#18577) Update latest.json to latest stable version (grafana#18575) Docs: Update changelog for v6.3.3 (grafana#18569) Graph: Fixed issue clicking on series line icon (grafana#18563) grafana/toolkit: Unpublish previous "next" version when releasing a new one (grafana#18552) Toolkit: write PR report to a folder with the circle build number (grafana#18560) CI: Fail build if yarn.lock is not up to date (grafana#18555) Chore: Updates react-dependant packages to address react warnings (grafana#18549) Prometheus: Fix regression of rerunning query on legend/interval change (grafana#18147) Explore/Prometheus: More consistently allows for multi-line queries (grafana#18362) Login: Fixes undefined redirect (grafana#18545) Plugins: expose react-redux, redux (grafana#18501) TimeSeries: assume values are all numbers (grafana#18540)
- Loading branch information
Showing
85 changed files
with
2,120 additions
and
1,156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"stable": "6.3.2", | ||
"testing": "6.3.2" | ||
"stable": "6.3.3", | ||
"testing": "6.3.3" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
import { Threshold } from './threshold'; | ||
import { ValueMapping } from './valueMapping'; | ||
import { QueryResultBase, Labels, NullValueMode } from './data'; | ||
import { FieldCalcs } from '../utils/index'; | ||
import { DisplayProcessor } from './displayValue'; | ||
|
||
export enum FieldType { | ||
time = 'time', // or date | ||
number = 'number', | ||
string = 'string', | ||
boolean = 'boolean', | ||
other = 'other', // Object, Array, etc | ||
} | ||
|
||
/** | ||
* Every property is optional | ||
* | ||
* Plugins may extend this with additional properties. Somethign like series overrides | ||
*/ | ||
export interface FieldConfig { | ||
title?: string; // The display value for this field. This supports template variables blank is auto | ||
filterable?: boolean; | ||
|
||
// Numeric Options | ||
unit?: string; | ||
decimals?: number | null; // Significant digits (for display) | ||
min?: number | null; | ||
max?: number | null; | ||
|
||
// Convert input values into a display string | ||
mappings?: ValueMapping[]; | ||
|
||
// Must be sorted by 'value', first value is always -Infinity | ||
thresholds?: Threshold[]; | ||
|
||
// Used when reducing field values | ||
nullValueMode?: NullValueMode; | ||
|
||
// Alternative to empty string | ||
noValue?: string; | ||
} | ||
|
||
export interface Vector<T = any> { | ||
length: number; | ||
|
||
/** | ||
* Access the value by index (Like an array) | ||
*/ | ||
get(index: number): T; | ||
|
||
/** | ||
* Get the resutls as an array. | ||
*/ | ||
toArray(): T[]; | ||
|
||
/** | ||
* Return the values as a simple array for json serialization | ||
*/ | ||
toJSON(): any; // same results as toArray() | ||
} | ||
|
||
export interface Field<T = any> { | ||
name: string; // The column name | ||
type: FieldType; | ||
config: FieldConfig; | ||
values: Vector<T>; // `buffer` when JSON | ||
|
||
/** | ||
* Cache of reduced values | ||
*/ | ||
calcs?: FieldCalcs; | ||
|
||
/** | ||
* Convert text to the field value | ||
*/ | ||
parse?: (value: any) => T; | ||
|
||
/** | ||
* Convert a value for display | ||
*/ | ||
display?: DisplayProcessor; | ||
} | ||
|
||
export interface DataFrame extends QueryResultBase { | ||
name?: string; | ||
fields: Field[]; // All fields of equal length | ||
labels?: Labels; | ||
|
||
// The number of rows | ||
length: number; | ||
} | ||
|
||
/** | ||
* Like a field, but properties are optional and values may be a simple array | ||
*/ | ||
export interface FieldDTO<T = any> { | ||
name: string; // The column name | ||
type?: FieldType; | ||
config?: FieldConfig; | ||
values?: Vector<T> | T[]; // toJSON will always be T[], input could be either | ||
} | ||
|
||
/** | ||
* Like a DataFrame, but fields may be a FieldDTO | ||
*/ | ||
export interface DataFrameDTO extends QueryResultBase { | ||
name?: string; | ||
labels?: Labels; | ||
fields: Array<FieldDTO | Field>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.