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
3a343aa5
Unverified
Commit
3a343aa5
authored
Feb 02, 2021
by
Ryan McKinley
Committed by
GitHub
Feb 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chore: add more docs annotations (#30847)
parent
c9c7bfbc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
11 deletions
+24
-11
packages/grafana-data/src/vector/ArrayVector.ts
+3
-0
packages/grafana-data/src/vector/AsNumberVector.ts
+5
-0
packages/grafana-data/src/vector/BinaryOperationVector.ts
+3
-0
packages/grafana-data/src/vector/CircularVector.ts
+2
-0
packages/grafana-data/src/vector/ConstantVector.ts
+3
-0
packages/grafana-data/src/vector/FormattedVector.ts
+8
-11
No files found.
packages/grafana-data/src/vector/ArrayVector.ts
View file @
3a343aa5
import
{
MutableVector
}
from
'../types/vector'
;
import
{
FunctionalVector
}
from
'./FunctionalVector'
;
/**
* @public
*/
export
class
ArrayVector
<
T
=
any
>
extends
FunctionalVector
<
T
>
implements
MutableVector
<
T
>
{
buffer
:
T
[];
...
...
packages/grafana-data/src/vector/AsNumberVector.ts
View file @
3a343aa5
import
{
Vector
}
from
'../types'
;
import
{
FunctionalVector
}
from
'./FunctionalVector'
;
/**
* This will force all values to be numbers
*
* @public
*/
export
class
AsNumberVector
extends
FunctionalVector
<
number
>
{
constructor
(
private
field
:
Vector
)
{
super
();
...
...
packages/grafana-data/src/vector/BinaryOperationVector.ts
View file @
3a343aa5
...
...
@@ -2,6 +2,9 @@ import { Vector } from '../types/vector';
import
{
vectorToArray
}
from
'./vectorToArray'
;
import
{
BinaryOperation
}
from
'../utils/binaryOperators'
;
/**
* @public
*/
export
class
BinaryOperationVector
implements
Vector
<
number
>
{
constructor
(
private
left
:
Vector
<
number
>
,
private
right
:
Vector
<
number
>
,
private
operation
:
BinaryOperation
)
{}
...
...
packages/grafana-data/src/vector/CircularVector.ts
View file @
3a343aa5
...
...
@@ -14,6 +14,8 @@ interface CircularOptions<T> {
*
* This supports adding to the 'head' or 'tail' and will grow the buffer
* to match a configured capacity.
*
* @public
*/
export
class
CircularVector
<
T
=
any
>
extends
FunctionalVector
<
T
>
implements
MutableVector
<
T
>
{
private
buffer
:
T
[];
...
...
packages/grafana-data/src/vector/ConstantVector.ts
View file @
3a343aa5
import
{
Vector
}
from
'../types/vector'
;
/**
* @public
*/
export
class
ConstantVector
<
T
=
any
>
implements
Vector
<
T
>
{
constructor
(
private
value
:
T
,
private
len
:
number
)
{}
...
...
packages/grafana-data/src/vector/FormattedVector.ts
View file @
3a343aa5
import
{
Vector
}
from
'../types/vector'
;
import
{
DisplayProcessor
}
from
'../types'
;
import
{
formattedValueToString
}
from
'../valueFormats'
;
import
{
vectorToArray
}
from
'./vectorToArray
'
;
import
{
FunctionalVector
}
from
'./FunctionalVector
'
;
export
class
FormattedVector
<
T
=
any
>
implements
Vector
<
string
>
{
constructor
(
private
source
:
Vector
<
T
>
,
private
formatter
:
DisplayProcessor
)
{}
/**
* @public
*/
export
class
FormattedVector
<
T
=
any
>
extends
FunctionalVector
<
string
>
{
constructor
(
private
source
:
Vector
<
T
>
,
private
formatter
:
DisplayProcessor
)
{
super
();
}
get
length
()
{
return
this
.
source
.
length
;
...
...
@@ -14,12 +19,4 @@ export class FormattedVector<T = any> implements Vector<string> {
const
v
=
this
.
source
.
get
(
index
);
return
formattedValueToString
(
this
.
formatter
(
v
));
}
toArray
():
string
[]
{
return
vectorToArray
(
this
);
}
toJSON
():
string
[]
{
return
this
.
toArray
();
}
}
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