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
0bfdf799
Unverified
Commit
0bfdf799
authored
Oct 20, 2020
by
Ryan McKinley
Committed by
GitHub
Oct 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chore: fix jsdoc desc and return (#28383)
parent
3aa9a0ec
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
22 deletions
+22
-22
packages/grafana-ui/src/utils/ansicolor.ts
+5
-5
packages/jaeger-ui-components/src/TraceTimelineViewer/utils.tsx
+3
-3
packages/jaeger-ui-components/src/model/span.tsx
+1
-1
packages/jaeger-ui-components/src/utils/color-generator.tsx
+1
-1
packages/jaeger-ui-components/src/utils/date.tsx
+6
-6
packages/jaeger-ui-components/src/utils/number.tsx
+1
-1
public/app/features/explore/slate-plugins/prism/index.tsx
+2
-2
public/app/plugins/panel/heatmap/heatmap_data_converter.ts
+3
-3
No files found.
packages/grafana-ui/src/utils/ansicolor.ts
View file @
0bfdf799
...
...
@@ -434,7 +434,7 @@ export default class Colors {
}
/**
* @desc installs String prototype extensions
* @desc
ription
installs String prototype extensions
* @example
* require ('ansicolor').nice
* console.log ('foo'.bright.red)
...
...
@@ -455,17 +455,17 @@ export default class Colors {
}
/**
* @desc parses a string containing ANSI escape codes
* @return {Colors} parsed representation.
* @desc
ription
parses a string containing ANSI escape codes
* @return
s
{Colors} parsed representation.
*/
static
parse
(
s
:
string
)
{
return
new
Colors
(
s
).
parsed
;
}
/**
* @desc strips ANSI codes from a string
* @desc
ription
strips ANSI codes from a string
* @param {string} s a string containing ANSI escape codes.
* @return {string} clean string.
* @return
s
{string} clean string.
*/
static
strip
(
s
:
string
)
{
return
s
.
replace
(
/
[\u
001b
\u
009b
][
[()#;?
]
*
(?:[
0-9
]{1,4}(?:
;
[
0-9
]{0,4})
*
)?[
0-9A-PRZcf-nqry=><
]
/g
,
''
);
// hope V8 caches the regexp
...
...
packages/jaeger-ui-components/src/TraceTimelineViewer/utils.tsx
View file @
0bfdf799
...
...
@@ -40,7 +40,7 @@ export function createViewedBoundsFunc(viewRange: { min: number; max: number; vi
* View bounds function
* @param {number} start The start of the sub-range.
* @param {number} end The end of the sub-range.
* @return {Object} The resultant range.
* @return
s
{Object} The resultant range.
*/
return
(
start
:
number
,
end
:
number
)
=>
({
start
:
(
start
-
viewMin
)
/
viewWindow
,
...
...
@@ -55,7 +55,7 @@ export function createViewedBoundsFunc(viewRange: { min: number; max: number; vi
* @param {any} value The tag value to match.
* @param {{tags}} span An object with a `tags` property of { key, value }
* items.
* @return {boolean} True if a match was found.
* @return
s
{boolean} True if a match was found.
*/
export
function
spanHasTag
(
key
:
string
,
value
:
any
,
span
:
TraceSpan
)
{
if
(
!
Array
.
isArray
(
span
.
tags
)
||
!
span
.
tags
.
length
)
{
...
...
@@ -80,7 +80,7 @@ export const isErrorSpan = (span: TraceSpan) => isErrorBool(span) || isErrorStr(
* @param {number} parentSpanIndex The index of the parent span - only
* subsequent spans with depth less than
* the parent span will be checked.
* @return {boolean} Returns `true` if a descendant contains an error tag.
* @return
s
{boolean} Returns `true` if a descendant contains an error tag.
*/
export
function
spanContainsErredSpan
(
spans
:
TraceSpan
[],
parentSpanIndex
:
number
)
{
const
{
depth
}
=
spans
[
parentSpanIndex
];
...
...
packages/jaeger-ui-components/src/model/span.tsx
View file @
0bfdf799
...
...
@@ -17,7 +17,7 @@ import { TraceSpan } from '@grafana/data';
/**
* Searches the span.references to find 'CHILD_OF' reference type or returns null.
* @param {TraceSpan} span The span whose parent is to be returned.
* @return {TraceSpan|null} The parent span if there is one, null otherwise.
* @return
s
{TraceSpan|null} The parent span if there is one, null otherwise.
*/
export
function
getParent
(
span
:
TraceSpan
)
{
const
parentRef
=
span
.
references
?
span
.
references
.
find
(
ref
=>
ref
.
refType
===
'CHILD_OF'
)
:
null
;
...
...
packages/jaeger-ui-components/src/utils/color-generator.tsx
View file @
0bfdf799
...
...
@@ -62,7 +62,7 @@ class ColorGenerator {
/**
* Retrieve the RGB values associated with a key. Adds the key and associates
* it with a color if the key is not recognized.
* @return {number[]} An array of three ints [0, 255] representing a color.
* @return
s
{number[]} An array of three ints [0, 255] representing a color.
*/
getRgbColorByKey
(
key
:
string
):
[
number
,
number
,
number
]
{
const
i
=
this
.
_getColorIndex
(
key
);
...
...
packages/jaeger-ui-components/src/utils/date.tsx
View file @
0bfdf799
...
...
@@ -31,7 +31,7 @@ export const DEFAULT_MS_PRECISION = Math.log10(ONE_MILLISECOND);
* @param {number} timestamp
* @param {number} initialTimestamp
* @param {number} totalDuration
* @return {number} 0-100 percentage
* @return
s
{number} 0-100 percentage
*/
export
function
getPercentageOfDuration
(
duration
:
number
,
totalDuration
:
number
)
{
return
(
duration
/
totalDuration
)
*
100
;
...
...
@@ -42,7 +42,7 @@ const quantizeDuration = (duration: number, floatPrecision: number, conversionFa
/**
* @param {number} duration (in microseconds)
* @return {string} formatted, unit-labelled string with time in milliseconds
* @return
s
{string} formatted, unit-labelled string with time in milliseconds
*/
export
function
formatDate
(
duration
:
number
)
{
return
moment
(
duration
/
ONE_MILLISECOND
).
format
(
STANDARD_DATE_FORMAT
);
...
...
@@ -50,7 +50,7 @@ export function formatDate(duration: number) {
/**
* @param {number} duration (in microseconds)
* @return {string} formatted, unit-labelled string with time in milliseconds
* @return
s
{string} formatted, unit-labelled string with time in milliseconds
*/
export
function
formatTime
(
duration
:
number
)
{
return
moment
(
duration
/
ONE_MILLISECOND
).
format
(
STANDARD_TIME_FORMAT
);
...
...
@@ -58,7 +58,7 @@ export function formatTime(duration: number) {
/**
* @param {number} duration (in microseconds)
* @return {string} formatted, unit-labelled string with time in milliseconds
* @return
s
{string} formatted, unit-labelled string with time in milliseconds
*/
export
function
formatDatetime
(
duration
:
number
)
{
return
moment
(
duration
/
ONE_MILLISECOND
).
format
(
STANDARD_DATETIME_FORMAT
);
...
...
@@ -66,7 +66,7 @@ export function formatDatetime(duration: number) {
/**
* @param {number} duration (in microseconds)
* @return {string} formatted, unit-labelled string with time in milliseconds
* @return
s
{string} formatted, unit-labelled string with time in milliseconds
*/
export
function
formatMillisecondTime
(
duration
:
number
)
{
const
targetDuration
=
quantizeDuration
(
duration
,
DEFAULT_MS_PRECISION
,
ONE_MILLISECOND
);
...
...
@@ -75,7 +75,7 @@ export function formatMillisecondTime(duration: number) {
/**
* @param {number} duration (in microseconds)
* @return {string} formatted, unit-labelled string with time in seconds
* @return
s
{string} formatted, unit-labelled string with time in seconds
*/
export
function
formatSecondTime
(
duration
:
number
)
{
const
targetDuration
=
quantizeDuration
(
duration
,
DEFAULT_MS_PRECISION
,
ONE_SECOND
);
...
...
packages/jaeger-ui-components/src/utils/number.tsx
View file @
0bfdf799
...
...
@@ -24,7 +24,7 @@
*
* @param {number} number
* @param {number} precision
* @return {number} number at new floating precision
* @return
s
{number} number at new floating precision
*/
export
function
toFloatPrecision
(
number
:
number
,
precision
:
number
):
number
{
const
log10Length
=
Math
.
floor
(
Math
.
log10
(
Math
.
abs
(
number
)))
+
1
;
...
...
public/app/features/explore/slate-plugins/prism/index.tsx
View file @
0bfdf799
...
...
@@ -30,7 +30,7 @@ export default function PrismPlugin({ definition, language }: { definition: any;
* Render a Slate mark with appropriate CSS class names
*
* @param {Object} props
* @return {Element}
* @return
s
{Element}
*/
renderDecoration
(
props
:
any
,
editor
:
Editor
,
next
:
()
=>
any
):
JSX
.
Element
{
...
...
@@ -47,7 +47,7 @@ export default function PrismPlugin({ definition, language }: { definition: any;
* Decorate code blocks with Prism.js highlighting.
*
* @param {Node} node
* @return {Array}
* @return
s
{Array}
*/
decorateNode
(
node
:
any
,
editor
:
Editor
,
next
:
()
=>
any
):
any
[]
{
...
...
public/app/plugins/panel/heatmap/heatmap_data_converter.ts
View file @
0bfdf799
...
...
@@ -88,7 +88,7 @@ function parseHistogramLabel(label: string): number {
/**
* Convert buckets into linear array of "cards" - objects, represented heatmap elements.
* @param {Object} buckets
* @return {Object} Array of "card" objects and stats
* @return
s
{Object} Array of "card" objects and stats
*/
function
convertToCards
(
buckets
:
any
,
hideZero
=
false
):
{
cards
:
HeatmapCard
[];
cardStats
:
HeatmapCardStats
}
{
let
min
=
0
,
...
...
@@ -136,7 +136,7 @@ function convertToCards(buckets: any, hideZero = false): { cards: HeatmapCard[];
*
* @param {Object} buckets Heatmap buckets
* @param {Number} minValue Minimum series value
* @return {Object} Transformed buckets
* @return
s
{Object} Transformed buckets
*/
function
mergeZeroBuckets
(
buckets
:
any
,
minValue
:
number
)
{
_
.
forEach
(
buckets
,
xBucket
=>
{
...
...
@@ -177,7 +177,7 @@ function mergeZeroBuckets(buckets: any, minValue: number) {
/**
* Convert set of time series into heatmap buckets
* @return {Object} Heatmap object:
* @return
s
{Object} Heatmap object:
* {
* xBucketBound_1: {
* x: xBucketBound_1,
...
...
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