generic repeater
This commit is contained in:
@@ -10,12 +10,12 @@ import { BarGauge, VizRepeater } from '@grafana/ui';
|
||||
|
||||
// Types
|
||||
import { BarGaugeOptions } from './types';
|
||||
import { PanelProps } from '@grafana/ui/src/types';
|
||||
import { PanelProps, SingleStatValueInfo } from '@grafana/ui/src/types';
|
||||
|
||||
interface Props extends PanelProps<BarGaugeOptions> {}
|
||||
|
||||
export class BarGaugePanel extends PureComponent<Props> {
|
||||
renderBarGauge(value, width, height) {
|
||||
renderBarGauge(value: SingleStatValueInfo, width, height) {
|
||||
const { replaceVariables, options } = this.props;
|
||||
const { valueOptions } = options;
|
||||
|
||||
@@ -24,7 +24,7 @@ export class BarGaugePanel extends PureComponent<Props> {
|
||||
|
||||
return (
|
||||
<BarGauge
|
||||
value={value}
|
||||
value={value.value as number | null}
|
||||
width={width}
|
||||
height={height}
|
||||
prefix={prefix}
|
||||
|
||||
@@ -10,12 +10,12 @@ import { Gauge, VizRepeater } from '@grafana/ui';
|
||||
|
||||
// Types
|
||||
import { GaugeOptions } from './types';
|
||||
import { PanelProps, VizOrientation } from '@grafana/ui/src/types';
|
||||
import { PanelProps, VizOrientation, SingleStatValueInfo } from '@grafana/ui/src/types';
|
||||
|
||||
interface Props extends PanelProps<GaugeOptions> {}
|
||||
|
||||
export class GaugePanel extends PureComponent<Props> {
|
||||
renderGauge(value, width, height) {
|
||||
renderGauge(value: SingleStatValueInfo, width, height) {
|
||||
const { replaceVariables, options } = this.props;
|
||||
const { valueOptions } = options;
|
||||
|
||||
@@ -24,7 +24,7 @@ export class GaugePanel extends PureComponent<Props> {
|
||||
|
||||
return (
|
||||
<Gauge
|
||||
value={value}
|
||||
value={value.value as number | null}
|
||||
width={width}
|
||||
height={height}
|
||||
prefix={prefix}
|
||||
|
||||
Reference in New Issue
Block a user