Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
a5deabbe
Unverified
Commit
a5deabbe
authored
May 22, 2020
by
Josh Soref
Committed by
GitHub
May 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chore: spelling - grafana-data (#24436)
parent
5f4526ca
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
33 additions
and
33 deletions
+33
-33
packages/grafana-data/src/dataframe/ArrowDataFrame.test.ts
+1
-1
packages/grafana-data/src/dataframe/DataFrameView.test.ts
+1
-1
packages/grafana-data/src/dataframe/MutableDataFrame.ts
+1
-1
packages/grafana-data/src/dataframe/dimensions.ts
+1
-1
packages/grafana-data/src/dataframe/processDataFrame.test.ts
+7
-7
packages/grafana-data/src/panel/PanelPlugin.test.tsx
+1
-1
packages/grafana-data/src/panel/PanelPlugin.ts
+2
-2
packages/grafana-data/src/transformations/fieldReducer.test.ts
+2
-2
packages/grafana-data/src/transformations/fieldReducer.ts
+1
-1
packages/grafana-data/src/transformations/matchers.ts
+1
-1
packages/grafana-data/src/transformations/matchers/fieldTypeMatcher.ts
+1
-1
packages/grafana-data/src/transformations/matchers/ids.ts
+1
-1
packages/grafana-data/src/transformations/matchers/nameMatcher.ts
+1
-1
packages/grafana-data/src/transformations/standardTransformersRegistry.ts
+1
-1
packages/grafana-data/src/types/datasource.ts
+2
-2
packages/grafana-data/src/types/fieldOverrides.ts
+1
-1
packages/grafana-data/src/types/panel.ts
+1
-1
packages/grafana-data/src/types/vector.ts
+1
-1
packages/grafana-data/src/utils/csv.ts
+1
-1
packages/grafana-data/src/utils/logs.ts
+1
-1
packages/grafana-data/src/utils/namedColorsPalette.test.ts
+1
-1
packages/grafana-data/src/valueFormats/arithmeticFormatters.test.ts
+1
-1
packages/grafana-data/src/valueFormats/valueFormats.test.ts
+1
-1
packages/grafana-data/src/vector/CircularVector.ts
+1
-1
No files found.
packages/grafana-data/src/dataframe/ArrowDataFrame.test.ts
View file @
a5deabbe
...
@@ -17,7 +17,7 @@ describe('Read/Write arrow Table to DataFrame', () => {
...
@@ -17,7 +17,7 @@ describe('Read/Write arrow Table to DataFrame', () => {
},
},
fields
:
[
fields
:
[
{
name
:
'time'
,
config
:
{},
type
:
FieldType
.
time
,
values
:
[
1
,
2
,
3
]
},
{
name
:
'time'
,
config
:
{},
type
:
FieldType
.
time
,
values
:
[
1
,
2
,
3
]
},
{
name
:
'value'
,
config
:
{
min
:
0
,
max
:
50
,
unit
:
'somthing'
},
type
:
FieldType
.
number
,
values
:
[
1
,
2
,
3
]
},
{
name
:
'value'
,
config
:
{
min
:
0
,
max
:
50
,
unit
:
'som
e
thing'
},
type
:
FieldType
.
number
,
values
:
[
1
,
2
,
3
]
},
{
name
:
'str'
,
config
:
{},
type
:
FieldType
.
string
,
values
:
[
'a'
,
'b'
,
'c'
]
},
{
name
:
'str'
,
config
:
{},
type
:
FieldType
.
string
,
values
:
[
'a'
,
'b'
,
'c'
]
},
],
],
});
});
...
...
packages/grafana-data/src/dataframe/DataFrameView.test.ts
View file @
a5deabbe
...
@@ -59,7 +59,7 @@ describe('dataFrameView', () => {
...
@@ -59,7 +59,7 @@ describe('dataFrameView', () => {
expect
(
keys
).
toEqual
([
'time'
,
'name'
,
'value'
]);
expect
(
keys
).
toEqual
([
'time'
,
'name'
,
'value'
]);
});
});
it
(
'has a weird side effect that the object values change after interation'
,
()
=>
{
it
(
'has a weird side effect that the object values change after intera
c
tion'
,
()
=>
{
expect
(
vector
.
length
).
toEqual
(
3
);
expect
(
vector
.
length
).
toEqual
(
3
);
// Get the first value
// Get the first value
...
...
packages/grafana-data/src/dataframe/MutableDataFrame.ts
View file @
a5deabbe
...
@@ -152,7 +152,7 @@ export class MutableDataFrame<T = any> extends FunctionalVector<T> implements Da
...
@@ -152,7 +152,7 @@ export class MutableDataFrame<T = any> extends FunctionalVector<T> implements Da
return
Math
.
max
(
v
,
f
.
values
.
length
);
return
Math
.
max
(
v
,
f
.
values
.
length
);
},
0
);
},
0
);
// Add empty elements until everything ma
s
tches
// Add empty elements until everything matches
for
(
const
field
of
this
.
fields
)
{
for
(
const
field
of
this
.
fields
)
{
while
(
field
.
values
.
length
!==
length
)
{
while
(
field
.
values
.
length
!==
length
)
{
field
.
values
.
add
(
MISSING_VALUE
);
field
.
values
.
add
(
MISSING_VALUE
);
...
...
packages/grafana-data/src/dataframe/dimensions.ts
View file @
a5deabbe
...
@@ -4,7 +4,7 @@ import { KeyValue } from '../types/data';
...
@@ -4,7 +4,7 @@ import { KeyValue } from '../types/data';
export
interface
Dimension
<
T
=
any
>
{
export
interface
Dimension
<
T
=
any
>
{
// Name of the dimension
// Name of the dimension
name
:
string
;
name
:
string
;
// Colection of fields representing dimension
// Col
l
ection of fields representing dimension
// I.e. in 2d graph we have two dimension- X and Y axes. Both dimensions can represent
// I.e. in 2d graph we have two dimension- X and Y axes. Both dimensions can represent
// multiple fields being drawn on the graph.
// multiple fields being drawn on the graph.
// For instance y-axis dimension is a collection of series value fields,
// For instance y-axis dimension is a collection of series value fields,
...
...
packages/grafana-data/src/dataframe/processDataFrame.test.ts
View file @
a5deabbe
...
@@ -70,7 +70,7 @@ describe('toDataFrame', () => {
...
@@ -70,7 +70,7 @@ describe('toDataFrame', () => {
});
});
expect
(
input
.
length
).
toEqual
(
2
);
expect
(
input
.
length
).
toEqual
(
2
);
// If the object is alreay a DataFrame, it should not change
// If the object is alrea
d
y a DataFrame, it should not change
const
again
=
toDataFrame
(
input
);
const
again
=
toDataFrame
(
input
);
expect
(
again
).
toBe
(
input
);
expect
(
again
).
toBe
(
input
);
});
});
...
@@ -97,7 +97,7 @@ describe('toDataFrame', () => {
...
@@ -97,7 +97,7 @@ describe('toDataFrame', () => {
).
toThrowError
(
'Expected table rows to be array, got object.'
);
).
toThrowError
(
'Expected table rows to be array, got object.'
);
});
});
it
(
'Guess Colum Types from value'
,
()
=>
{
it
(
'Guess Colum
n
Types from value'
,
()
=>
{
expect
(
guessFieldTypeFromValue
(
1
)).
toBe
(
FieldType
.
number
);
expect
(
guessFieldTypeFromValue
(
1
)).
toBe
(
FieldType
.
number
);
expect
(
guessFieldTypeFromValue
(
1.234
)).
toBe
(
FieldType
.
number
);
expect
(
guessFieldTypeFromValue
(
1.234
)).
toBe
(
FieldType
.
number
);
expect
(
guessFieldTypeFromValue
(
3.125e7
)).
toBe
(
FieldType
.
number
);
expect
(
guessFieldTypeFromValue
(
3.125e7
)).
toBe
(
FieldType
.
number
);
...
@@ -107,7 +107,7 @@ describe('toDataFrame', () => {
...
@@ -107,7 +107,7 @@ describe('toDataFrame', () => {
expect
(
guessFieldTypeFromValue
(
dateTime
())).
toBe
(
FieldType
.
time
);
expect
(
guessFieldTypeFromValue
(
dateTime
())).
toBe
(
FieldType
.
time
);
});
});
it
(
'Guess Colum Types from strings'
,
()
=>
{
it
(
'Guess Colum
n
Types from strings'
,
()
=>
{
expect
(
guessFieldTypeFromValue
(
'1'
)).
toBe
(
FieldType
.
number
);
expect
(
guessFieldTypeFromValue
(
'1'
)).
toBe
(
FieldType
.
number
);
expect
(
guessFieldTypeFromValue
(
'1.234'
)).
toBe
(
FieldType
.
number
);
expect
(
guessFieldTypeFromValue
(
'1.234'
)).
toBe
(
FieldType
.
number
);
expect
(
guessFieldTypeFromValue
(
'NaN'
)).
toBe
(
FieldType
.
number
);
expect
(
guessFieldTypeFromValue
(
'NaN'
)).
toBe
(
FieldType
.
number
);
...
@@ -118,7 +118,7 @@ describe('toDataFrame', () => {
...
@@ -118,7 +118,7 @@ describe('toDataFrame', () => {
expect
(
guessFieldTypeFromValue
(
'xxxx'
)).
toBe
(
FieldType
.
string
);
expect
(
guessFieldTypeFromValue
(
'xxxx'
)).
toBe
(
FieldType
.
string
);
});
});
it
(
'Guess Colum Types from series'
,
()
=>
{
it
(
'Guess Colum
n
Types from series'
,
()
=>
{
const
series
=
new
MutableDataFrame
({
const
series
=
new
MutableDataFrame
({
fields
:
[
fields
:
[
{
name
:
'A (number)'
,
values
:
[
123
,
null
]
},
{
name
:
'A (number)'
,
values
:
[
123
,
null
]
},
...
@@ -147,7 +147,7 @@ describe('toDataFrame', () => {
...
@@ -147,7 +147,7 @@ describe('toDataFrame', () => {
'@timestamp'
:
[
1570044340458
],
'@timestamp'
:
[
1570044340458
],
tags
:
[
'deploy'
,
'website-01'
],
tags
:
[
'deploy'
,
'website-01'
],
description
:
'Torkel deployed website'
,
description
:
'Torkel deployed website'
,
coordinates
:
{
latitude
:
12
,
longitude
:
121
,
level
:
{
depth
:
3
,
coolnes
:
'very'
}
},
coordinates
:
{
latitude
:
12
,
longitude
:
121
,
level
:
{
depth
:
3
,
coolnes
s
:
'very'
}
},
'unescaped-content'
:
'breaking <br /> the <br /> row'
,
'unescaped-content'
:
'breaking <br /> the <br /> row'
,
},
},
],
],
...
@@ -165,7 +165,7 @@ describe('toDataFrame', () => {
...
@@ -165,7 +165,7 @@ describe('toDataFrame', () => {
});
});
});
});
describe
(
'SerisData backwards compatibility'
,
()
=>
{
describe
(
'Seri
e
sData backwards compatibility'
,
()
=>
{
it
(
'can convert TimeSeries to series and back again'
,
()
=>
{
it
(
'can convert TimeSeries to series and back again'
,
()
=>
{
const
timeseries
=
{
const
timeseries
=
{
target
:
'Field Name'
,
target
:
'Field Name'
,
...
@@ -280,7 +280,7 @@ describe('SerisData backwards compatibility', () => {
...
@@ -280,7 +280,7 @@ describe('SerisData backwards compatibility', () => {
'@timestamp'
:
[
1570044340458
],
'@timestamp'
:
[
1570044340458
],
tags
:
[
'deploy'
,
'website-01'
],
tags
:
[
'deploy'
,
'website-01'
],
description
:
'Torkel deployed website'
,
description
:
'Torkel deployed website'
,
coordinates
:
{
latitude
:
12
,
longitude
:
121
,
level
:
{
depth
:
3
,
coolnes
:
'very'
}
},
coordinates
:
{
latitude
:
12
,
longitude
:
121
,
level
:
{
depth
:
3
,
coolnes
s
:
'very'
}
},
'unescaped-content'
:
'breaking <br /> the <br /> row'
,
'unescaped-content'
:
'breaking <br /> the <br /> row'
,
},
},
],
],
...
...
packages/grafana-data/src/panel/PanelPlugin.test.tsx
View file @
a5deabbe
...
@@ -247,7 +247,7 @@ describe('PanelPlugin', () => {
...
@@ -247,7 +247,7 @@ describe('PanelPlugin', () => {
});
});
});
});
it
(
'should ignore defaults that are not specified as avail
e
ble properties'
,
()
=>
{
it
(
'should ignore defaults that are not specified as avail
a
ble properties'
,
()
=>
{
const
panel
=
new
PanelPlugin
(()
=>
{
const
panel
=
new
PanelPlugin
(()
=>
{
return
<
div
>
Panel
</
div
>;
return
<
div
>
Panel
</
div
>;
});
});
...
...
packages/grafana-data/src/panel/PanelPlugin.ts
View file @
a5deabbe
...
@@ -29,7 +29,7 @@ export interface SetFieldConfigOptionsArgs<TFieldConfigOptions = any> {
...
@@ -29,7 +29,7 @@ export interface SetFieldConfigOptionsArgs<TFieldConfigOptions = any> {
standardOptions
?:
FieldConfigProperty
[];
standardOptions
?:
FieldConfigProperty
[];
/**
/**
* Object spec
yf
ing standard option properties default values
* Object spec
ify
ing standard option properties default values
*
*
* @example
* @example
* ```typescript
* ```typescript
...
@@ -243,7 +243,7 @@ export class PanelPlugin<TOptions = any, TFieldConfigOptions extends object = an
...
@@ -243,7 +243,7 @@ export class PanelPlugin<TOptions = any, TFieldConfigOptions extends object = an
}
}
/**
/**
* Allows spec
yf
ing which standard field config options panel should use and defining default values
* Allows spec
ify
ing which standard field config options panel should use and defining default values
*
*
* @example
* @example
* ```typescript
* ```typescript
...
...
packages/grafana-data/src/transformations/fieldReducer.test.ts
View file @
a5deabbe
...
@@ -97,7 +97,7 @@ describe('Stats Calculators', () => {
...
@@ -97,7 +97,7 @@ describe('Stats Calculators', () => {
expect
(
stats
.
delta
).
toEqual
(
300
);
expect
(
stats
.
delta
).
toEqual
(
300
);
});
});
it
(
'consistenly check allIsNull/allIsZero'
,
()
=>
{
it
(
'consisten
t
ly check allIsNull/allIsZero'
,
()
=>
{
const
empty
=
createField
(
'x'
);
const
empty
=
createField
(
'x'
);
const
allNull
=
createField
(
'x'
,
[
null
,
null
,
null
,
null
]);
const
allNull
=
createField
(
'x'
,
[
null
,
null
,
null
,
null
]);
const
allUndefined
=
createField
(
'x'
,
[
undefined
,
undefined
,
undefined
,
undefined
]);
const
allUndefined
=
createField
(
'x'
,
[
undefined
,
undefined
,
undefined
,
undefined
]);
...
@@ -155,7 +155,7 @@ describe('Stats Calculators', () => {
...
@@ -155,7 +155,7 @@ describe('Stats Calculators', () => {
`Invalid
${
reducer
}
result for: `
+
`Invalid
${
reducer
}
result for: `
+
input
.
data
.
join
(
', '
)
+
input
.
data
.
join
(
', '
)
+
` Expected:
${
input
.
result
}
`
+
// configured
` Expected:
${
input
.
result
}
`
+
// configured
` Rec
ie
ved: Multiple:
${
v1
}
, Single:
${
v2
}
`
;
` Rec
ei
ved: Multiple:
${
v1
}
, Single:
${
v2
}
`
;
expect
(
msg
).
toEqual
(
null
);
expect
(
msg
).
toEqual
(
null
);
}
}
}
}
...
...
packages/grafana-data/src/transformations/fieldReducer.ts
View file @
a5deabbe
...
@@ -245,7 +245,7 @@ export function doStandardCalcs(field: Field, ignoreNulls: boolean, nullAsZero:
...
@@ -245,7 +245,7 @@ export function doStandardCalcs(field: Field, ignoreNulls: boolean, nullAsZero:
delta
:
0
,
delta
:
0
,
step
:
Number
.
MAX_VALUE
,
step
:
Number
.
MAX_VALUE
,
// Just used for calcu
t
ations -- not exposed as a stat
// Just used for calcu
l
ations -- not exposed as a stat
previousDeltaUp
:
true
,
previousDeltaUp
:
true
,
}
as
FieldCalcs
;
}
as
FieldCalcs
;
...
...
packages/grafana-data/src/transformations/matchers.ts
View file @
a5deabbe
// Load the Buil
d
tin matchers
// Load the Builtin matchers
import
{
getFieldPredicateMatchers
,
getFramePredicateMatchers
}
from
'./matchers/predicates'
;
import
{
getFieldPredicateMatchers
,
getFramePredicateMatchers
}
from
'./matchers/predicates'
;
import
{
getFieldNameMatchers
,
getFrameNameMatchers
}
from
'./matchers/nameMatcher'
;
import
{
getFieldNameMatchers
,
getFrameNameMatchers
}
from
'./matchers/nameMatcher'
;
import
{
getFieldTypeMatchers
}
from
'./matchers/fieldTypeMatcher'
;
import
{
getFieldTypeMatchers
}
from
'./matchers/fieldTypeMatcher'
;
...
...
packages/grafana-data/src/transformations/matchers/fieldTypeMatcher.ts
View file @
a5deabbe
...
@@ -52,7 +52,7 @@ const timeMatcher: FieldMatcherInfo = {
...
@@ -52,7 +52,7 @@ const timeMatcher: FieldMatcherInfo = {
};
};
/**
/**
* Registry Initalization
* Registry Init
i
alization
*/
*/
export
function
getFieldTypeMatchers
():
FieldMatcherInfo
[]
{
export
function
getFieldTypeMatchers
():
FieldMatcherInfo
[]
{
return
[
fieldTypeMatcher
,
numericMatcher
,
timeMatcher
];
return
[
fieldTypeMatcher
,
numericMatcher
,
timeMatcher
];
...
...
packages/grafana-data/src/transformations/matchers/ids.ts
View file @
a5deabbe
// This needs to be in its own file to avoid circular references
// This needs to be in its own file to avoid circular references
// Builtin Predicates
// Builtin Predicates
// not using 'any' and 'never' since they are reserve
re
d keywords
// not using 'any' and 'never' since they are reserved keywords
export
enum
MatcherID
{
export
enum
MatcherID
{
anyMatch
=
'anyMatch'
,
// checks children
anyMatch
=
'anyMatch'
,
// checks children
allMatch
=
'allMatch'
,
// checks children
allMatch
=
'allMatch'
,
// checks children
...
...
packages/grafana-data/src/transformations/matchers/nameMatcher.ts
View file @
a5deabbe
...
@@ -124,7 +124,7 @@ const frameNameMatcher: FrameMatcherInfo<string> = {
...
@@ -124,7 +124,7 @@ const frameNameMatcher: FrameMatcherInfo<string> = {
};
};
/**
/**
* Registry Initalization
* Registry Init
i
alization
*/
*/
export
function
getFieldNameMatchers
():
FieldMatcherInfo
[]
{
export
function
getFieldNameMatchers
():
FieldMatcherInfo
[]
{
return
[
fieldNameMatcher
,
regexpFieldNameMatcher
,
multipleFieldNamesMatcher
,
regexpOrMultipleNamesMatcher
];
return
[
fieldNameMatcher
,
regexpFieldNameMatcher
,
multipleFieldNamesMatcher
,
regexpOrMultipleNamesMatcher
];
...
...
packages/grafana-data/src/transformations/standardTransformersRegistry.ts
View file @
a5deabbe
...
@@ -8,7 +8,7 @@ export interface TransformerUIProps<T> {
...
@@ -8,7 +8,7 @@ export interface TransformerUIProps<T> {
*/
*/
options
:
T
;
options
:
T
;
/**
/**
* Pre-transform data rames
* Pre-transform data
f
rames
*/
*/
input
:
DataFrame
[];
input
:
DataFrame
[];
onChange
:
(
options
:
T
)
=>
void
;
onChange
:
(
options
:
T
)
=>
void
;
...
...
packages/grafana-data/src/types/datasource.ts
View file @
a5deabbe
...
@@ -524,9 +524,9 @@ export interface DataSourceInstanceSettings<T extends DataSourceJsonData = DataS
...
@@ -524,9 +524,9 @@ export interface DataSourceInstanceSettings<T extends DataSourceJsonData = DataS
database
?:
string
;
database
?:
string
;
/**
/**
* This is the full Authorization header if basic auth is en
n
abled.
* This is the full Authorization header if basic auth is enabled.
* Only available here when access is Browser (direct), when access is Server (proxy)
* Only available here when access is Browser (direct), when access is Server (proxy)
* The basic auth header, username & password is never expos
t
ed to browser/Frontend
* The basic auth header, username & password is never exposed to browser/Frontend
* so this will be empty then.
* so this will be empty then.
*/
*/
basicAuth
?:
string
;
basicAuth
?:
string
;
...
...
packages/grafana-data/src/types/fieldOverrides.ts
View file @
a5deabbe
...
@@ -24,7 +24,7 @@ export interface ConfigOverrideRule {
...
@@ -24,7 +24,7 @@ export interface ConfigOverrideRule {
}
}
export
interface
FieldConfigSource
<
TOptions
extends
object
=
any
>
{
export
interface
FieldConfigSource
<
TOptions
extends
object
=
any
>
{
// Defa
tul
s applied to all numeric fields
// Defa
ult
s applied to all numeric fields
defaults
:
FieldConfig
<
TOptions
>
;
defaults
:
FieldConfig
<
TOptions
>
;
// Rules to override individual values
// Rules to override individual values
...
...
packages/grafana-data/src/types/panel.ts
View file @
a5deabbe
...
@@ -57,7 +57,7 @@ export interface PanelProps<T = any> {
...
@@ -57,7 +57,7 @@ export interface PanelProps<T = any> {
fieldConfig
:
FieldConfigSource
;
fieldConfig
:
FieldConfigSource
;
/** Field config change handler */
/** Field config change handler */
onFieldConfigChange
:
(
config
:
FieldConfigSource
)
=>
void
;
onFieldConfigChange
:
(
config
:
FieldConfigSource
)
=>
void
;
/** Indicat
h
es whether or not panel should be rendered transparent */
/** Indicates whether or not panel should be rendered transparent */
transparent
:
boolean
;
transparent
:
boolean
;
/** Current width of the panel */
/** Current width of the panel */
width
:
number
;
width
:
number
;
...
...
packages/grafana-data/src/types/vector.ts
View file @
a5deabbe
...
@@ -7,7 +7,7 @@ export interface Vector<T = any> {
...
@@ -7,7 +7,7 @@ export interface Vector<T = any> {
get
(
index
:
number
):
T
;
get
(
index
:
number
):
T
;
/**
/**
* Get the resu
tl
s as an array.
* Get the resu
lt
s as an array.
*/
*/
toArray
():
T
[];
toArray
():
T
[];
}
}
...
...
packages/grafana-data/src/utils/csv.ts
View file @
a5deabbe
...
@@ -150,7 +150,7 @@ export class CSVReader {
...
@@ -150,7 +150,7 @@ export class CSVReader {
this
.
state
=
ParseState
.
ReadingRows
;
this
.
state
=
ParseState
.
ReadingRows
;
// Make sure colum structure is valid
// Make sure colum
n
structure is valid
if
(
line
.
length
>
this
.
current
.
fields
.
length
)
{
if
(
line
.
length
>
this
.
current
.
fields
.
length
)
{
const
{
fields
}
=
this
.
current
;
const
{
fields
}
=
this
.
current
;
for
(
let
f
=
fields
.
length
;
f
<
line
.
length
;
f
++
)
{
for
(
let
f
=
fields
.
length
;
f
<
line
.
length
;
f
++
)
{
...
...
packages/grafana-data/src/utils/logs.ts
View file @
a5deabbe
...
@@ -7,7 +7,7 @@ import { ArrayVector } from '../vector/ArrayVector';
...
@@ -7,7 +7,7 @@ import { ArrayVector } from '../vector/ArrayVector';
// This matches:
// This matches:
// first a label from start of the string or first white space, then any word chars until "="
// first a label from start of the string or first white space, then any word chars until "="
// second either an empty quotes, or anything that starts with quote and ends with unescaped quote,
// second either an empty quotes, or anything that starts with quote and ends with unescaped quote,
// or any non whitespace chars that do not start with q
ou
te
// or any non whitespace chars that do not start with q
uo
te
const
LOGFMT_REGEXP
=
/
(?:
^|
\s)([\w\(\)\[\]\{\}]
+
)
=
(
""|
(?:
".*
?[^\\]
"|
[^
"
\s]\S
*
))
/
;
const
LOGFMT_REGEXP
=
/
(?:
^|
\s)([\w\(\)\[\]\{\}]
+
)
=
(
""|
(?:
".*
?[^\\]
"|
[^
"
\s]\S
*
))
/
;
/**
/**
...
...
packages/grafana-data/src/utils/namedColorsPalette.test.ts
View file @
a5deabbe
...
@@ -38,7 +38,7 @@ describe('colors', () => {
...
@@ -38,7 +38,7 @@ describe('colors', () => {
expect
(
getColorByName
(
'aruba-sunshine'
)).
toBeUndefined
();
expect
(
getColorByName
(
'aruba-sunshine'
)).
toBeUndefined
();
});
});
it
(
'returns color definiton for known color'
,
()
=>
{
it
(
'returns color definit
i
on for known color'
,
()
=>
{
expect
(
getColorByName
(
SemiDarkBlue
.
name
)).
toBe
(
SemiDarkBlue
);
expect
(
getColorByName
(
SemiDarkBlue
.
name
)).
toBe
(
SemiDarkBlue
);
});
});
});
});
...
...
packages/grafana-data/src/valueFormats/arithmeticFormatters.test.ts
View file @
a5deabbe
...
@@ -21,7 +21,7 @@ describe('hex', () => {
...
@@ -21,7 +21,7 @@ describe('hex', () => {
});
});
describe
(
'hex 0x'
,
()
=>
{
describe
(
'hex 0x'
,
()
=>
{
it
(
'positive intege
te
r'
,
()
=>
{
it
(
'positive integer'
,
()
=>
{
const
str
=
toHex0x
(
7999
,
0
);
const
str
=
toHex0x
(
7999
,
0
);
expect
(
formattedValueToString
(
str
)).
toBe
(
'0x1F3F'
);
expect
(
formattedValueToString
(
str
)).
toBe
(
'0x1F3F'
);
});
});
...
...
packages/grafana-data/src/valueFormats/valueFormats.test.ts
View file @
a5deabbe
...
@@ -13,7 +13,7 @@ interface ValueFormatTest {
...
@@ -13,7 +13,7 @@ interface ValueFormatTest {
}
}
const
formatTests
:
ValueFormatTest
[]
=
[
const
formatTests
:
ValueFormatTest
[]
=
[
// Curr
a
ncy
// Curr
e
ncy
{
id
:
'currencyUSD'
,
decimals
:
2
,
value
:
1532.82
,
result
:
'$1.53K'
},
{
id
:
'currencyUSD'
,
decimals
:
2
,
value
:
1532.82
,
result
:
'$1.53K'
},
{
id
:
'currencyKRW'
,
decimals
:
2
,
value
:
1532.82
,
result
:
'₩1.53K'
},
{
id
:
'currencyKRW'
,
decimals
:
2
,
value
:
1532.82
,
result
:
'₩1.53K'
},
...
...
packages/grafana-data/src/vector/CircularVector.ts
View file @
a5deabbe
...
@@ -12,7 +12,7 @@ interface CircularOptions<T> {
...
@@ -12,7 +12,7 @@ interface CircularOptions<T> {
* Circular vector uses a single buffer to capture a stream of values
* Circular vector uses a single buffer to capture a stream of values
* overwriting the oldest value on add.
* overwriting the oldest value on add.
*
*
* This supports add
t
ing to the 'head' or 'tail' and will grow the buffer
* This supports adding to the 'head' or 'tail' and will grow the buffer
* to match a configured capacity.
* to match a configured capacity.
*/
*/
export
class
CircularVector
<
T
=
any
>
extends
FunctionalVector
implements
MutableVector
<
T
>
{
export
class
CircularVector
<
T
=
any
>
extends
FunctionalVector
implements
MutableVector
<
T
>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment