run prettier
This commit is contained in:
committed by
renovate[bot]
parent
486815606c
commit
219f4776a2
@@ -268,8 +268,8 @@ export class StreamingDataFrame implements DataFrame {
|
||||
type: f.type ?? FieldType.other,
|
||||
// transfer old values by type & name, unless we relied on labels to match fields
|
||||
values: isWide
|
||||
? this.fields.find((of) => of.name === f.name && f.type === of.type)?.values ??
|
||||
Array(this.length).fill(undefined)
|
||||
? (this.fields.find((of) => of.name === f.name && f.type === of.type)?.values ??
|
||||
Array(this.length).fill(undefined))
|
||||
: [],
|
||||
};
|
||||
});
|
||||
|
||||
@@ -459,7 +459,7 @@ export function buildHistogram(frames: DataFrame[], options?: HistogramTransform
|
||||
state: undefined,
|
||||
config:
|
||||
bucketDecimals === 0
|
||||
? config ?? {}
|
||||
? (config ?? {})
|
||||
: {
|
||||
...config,
|
||||
decimals: bucketDecimals,
|
||||
|
||||
@@ -118,5 +118,5 @@ const getStyles = (theme: GrafanaTheme2) => {
|
||||
};
|
||||
|
||||
function getOperationDocs(def: QueryBuilderOperationDef, op: QueryBuilderOperation): string {
|
||||
return renderMarkdown(def.explainHandler ? def.explainHandler(op, def) : def.documentation ?? 'no docs');
|
||||
return renderMarkdown(def.explainHandler ? def.explainHandler(op, def) : (def.documentation ?? 'no docs'));
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ export function OperationListExplained<T extends QueryWithOperations>({
|
||||
return `Operation ${op.id} not found`;
|
||||
}
|
||||
const title = def.renderer(op, def, '<expr>');
|
||||
const body = def.explainHandler ? def.explainHandler(op, def) : def.documentation ?? 'no docs';
|
||||
const body = def.explainHandler ? def.explainHandler(op, def) : (def.documentation ?? 'no docs');
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
@@ -44,8 +44,8 @@ export function useTableStyles(theme: GrafanaTheme2, cellHeightOption: TableCell
|
||||
alignItems: 'center',
|
||||
borderRight: `1px solid ${borderColor}`,
|
||||
|
||||
color: rowStyled ? 'inherit' : color ?? undefined,
|
||||
background: rowStyled ? undefined : background ?? undefined,
|
||||
color: rowStyled ? 'inherit' : (color ?? undefined),
|
||||
background: rowStyled ? undefined : (background ?? undefined),
|
||||
backgroundClip: 'padding-box',
|
||||
|
||||
'&:last-child:not(:only-child)': {
|
||||
@@ -60,7 +60,7 @@ export function useTableStyles(theme: GrafanaTheme2, cellHeightOption: TableCell
|
||||
wordBreak: textShouldWrap ? 'break-word' : undefined,
|
||||
whiteSpace: textShouldWrap && overflowOnHover ? 'normal' : 'nowrap',
|
||||
boxShadow: overflowOnHover ? `0 0 2px ${theme.colors.primary.main}` : undefined,
|
||||
background: rowStyled ? 'inherit' : backgroundHover ?? theme.colors.background.primary,
|
||||
background: rowStyled ? 'inherit' : (backgroundHover ?? theme.colors.background.primary),
|
||||
zIndex: 1,
|
||||
'.cellActions': {
|
||||
color: '#FFF',
|
||||
|
||||
@@ -163,7 +163,7 @@ export class UPlotAxisBuilder extends PlotConfigBuilder<AxisProps, Axis> {
|
||||
ticks: Object.assign(
|
||||
{
|
||||
show: true,
|
||||
stroke: border?.show ? color ?? theme.colors.text.primary : gridColor,
|
||||
stroke: border?.show ? (color ?? theme.colors.text.primary) : gridColor,
|
||||
width: 1 / devicePixelRatio,
|
||||
size: 4,
|
||||
},
|
||||
|
||||
@@ -55,8 +55,9 @@ export class UPlotScaleBuilder extends PlotConfigBuilder<ScaleProps, Scale> {
|
||||
: distr === ScaleDistribution.Ordinal
|
||||
? 2
|
||||
: 1,
|
||||
log: distr === ScaleDistribution.Log || distr === ScaleDistribution.Symlog ? this.props.log ?? 2 : undefined,
|
||||
asinh: distr === ScaleDistribution.Symlog ? this.props.linearThreshold ?? 1 : undefined,
|
||||
log:
|
||||
distr === ScaleDistribution.Log || distr === ScaleDistribution.Symlog ? (this.props.log ?? 2) : undefined,
|
||||
asinh: distr === ScaleDistribution.Symlog ? (this.props.linearThreshold ?? 1) : undefined,
|
||||
}
|
||||
: {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user