mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove several instances of non-strict null usage (#20563)
This commit is contained in:
@@ -83,7 +83,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => ({
|
||||
}));
|
||||
|
||||
interface Props {
|
||||
isOpen: boolean;
|
||||
isOpen?: boolean;
|
||||
label: string;
|
||||
loading?: boolean;
|
||||
collapsible?: boolean;
|
||||
|
||||
@@ -14,7 +14,7 @@ export interface GraphProps {
|
||||
children?: JSX.Element | JSX.Element[];
|
||||
series: GraphSeriesXY[];
|
||||
timeRange: TimeRange; // NOTE: we should aim to make `time` a property of the axis, not force it for all graphs
|
||||
timeZone: TimeZone; // NOTE: we should aim to make `time` a property of the axis, not force it for all graphs
|
||||
timeZone?: TimeZone; // NOTE: we should aim to make `time` a property of the axis, not force it for all graphs
|
||||
showLines?: boolean;
|
||||
showPoints?: boolean;
|
||||
showBars?: boolean;
|
||||
@@ -246,7 +246,7 @@ export class Graph extends PureComponent<GraphProps, GraphState> {
|
||||
label: 'Datetime',
|
||||
ticks: ticks,
|
||||
timeformat: timeFormat(ticks, min, max),
|
||||
timezone: timeZone ? timeZone : DefaultTimeZone,
|
||||
timezone: timeZone ?? DefaultTimeZone,
|
||||
},
|
||||
yaxes,
|
||||
grid: {
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface Props extends Themeable {
|
||||
logRows?: LogRowModel[];
|
||||
deduplicatedRows?: LogRowModel[];
|
||||
dedupStrategy: LogsDedupStrategy;
|
||||
highlighterExpressions: string[];
|
||||
highlighterExpressions?: string[];
|
||||
showTime: boolean;
|
||||
timeZone: TimeZone;
|
||||
rowLimit?: number;
|
||||
|
||||
@@ -37,7 +37,7 @@ export interface Props {
|
||||
export class RefreshPickerBase extends PureComponent<Props> {
|
||||
static offOption = { label: 'Off', value: '' };
|
||||
static liveOption = { label: 'Live', value: 'LIVE' };
|
||||
static isLive = (refreshInterval: string): boolean => refreshInterval === RefreshPicker.liveOption.value;
|
||||
static isLive = (refreshInterval?: string): boolean => refreshInterval === RefreshPicker.liveOption.value;
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
|
||||
Reference in New Issue
Block a user