Rename RefreshingViewProperties to QueryViewProperties
parent
113093d5c7
commit
fea821f54c
|
@ -19,7 +19,7 @@ interface Props {
|
||||||
queries: DashboardQuery[]
|
queries: DashboardQuery[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class EmptyRefreshingView extends PureComponent<Props> {
|
export default class EmptyQueryView extends PureComponent<Props> {
|
||||||
public render() {
|
public render() {
|
||||||
const {error, isInitialFetch, loading, tables, queries} = this.props
|
const {error, isInitialFetch, loading, tables, queries} = this.props
|
||||||
|
|
|
@ -10,7 +10,7 @@ import DygraphContainer from 'src/shared/components/DygraphContainer'
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import {
|
import {
|
||||||
RefreshingViewProperties,
|
QueryViewProperties,
|
||||||
ViewType,
|
ViewType,
|
||||||
SingleStatView,
|
SingleStatView,
|
||||||
XYView,
|
XYView,
|
||||||
|
@ -22,12 +22,12 @@ interface Props {
|
||||||
viewID: string
|
viewID: string
|
||||||
tables: FluxTable[]
|
tables: FluxTable[]
|
||||||
loading: RemoteDataState
|
loading: RemoteDataState
|
||||||
properties: RefreshingViewProperties
|
properties: QueryViewProperties
|
||||||
timeRange?: TimeRange
|
timeRange?: TimeRange
|
||||||
onZoom?: (range: TimeRange) => void
|
onZoom?: (range: TimeRange) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class RefreshingViewSwitcher extends PureComponent<Props> {
|
export default class QueryViewSwitcher extends PureComponent<Props> {
|
||||||
public render() {
|
public render() {
|
||||||
const {properties, loading, viewID, tables, onZoom, timeRange} = this.props
|
const {properties, loading, viewID, tables, onZoom, timeRange} = this.props
|
||||||
|
|
|
@ -4,8 +4,8 @@ import _ from 'lodash'
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import TimeSeries from 'src/shared/components/TimeSeries'
|
import TimeSeries from 'src/shared/components/TimeSeries'
|
||||||
import EmptyRefreshingView from 'src/shared/components/EmptyRefreshingView'
|
import EmptyQueryView from 'src/shared/components/EmptyQueryView'
|
||||||
import RefreshingViewSwitcher from 'src/shared/components/RefreshingViewSwitcher'
|
import QueryViewSwitcher from 'src/shared/components/QueryViewSwitcher'
|
||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
import {GlobalAutoRefresher} from 'src/utils/AutoRefresher'
|
import {GlobalAutoRefresher} from 'src/utils/AutoRefresher'
|
||||||
|
@ -13,7 +13,7 @@ import {GlobalAutoRefresher} from 'src/utils/AutoRefresher'
|
||||||
// Types
|
// Types
|
||||||
import {TimeRange} from 'src/types'
|
import {TimeRange} from 'src/types'
|
||||||
import {DashboardQuery} from 'src/types/v2/dashboards'
|
import {DashboardQuery} from 'src/types/v2/dashboards'
|
||||||
import {RefreshingViewProperties, ViewType} from 'src/types/v2/dashboards'
|
import {QueryViewProperties, ViewType} from 'src/types/v2/dashboards'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
timeRange: TimeRange
|
timeRange: TimeRange
|
||||||
|
@ -21,7 +21,7 @@ interface Props {
|
||||||
inView: boolean
|
inView: boolean
|
||||||
manualRefresh: number
|
manualRefresh: number
|
||||||
onZoom: (range: TimeRange) => void
|
onZoom: (range: TimeRange) => void
|
||||||
properties: RefreshingViewProperties
|
properties: QueryViewProperties
|
||||||
}
|
}
|
||||||
|
|
||||||
class RefreshingView extends PureComponent<Props> {
|
class RefreshingView extends PureComponent<Props> {
|
||||||
|
@ -49,14 +49,14 @@ class RefreshingView extends PureComponent<Props> {
|
||||||
>
|
>
|
||||||
{({tables, loading, error, isInitialFetch}) => {
|
{({tables, loading, error, isInitialFetch}) => {
|
||||||
return (
|
return (
|
||||||
<EmptyRefreshingView
|
<EmptyQueryView
|
||||||
error={error}
|
error={error}
|
||||||
tables={tables}
|
tables={tables}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
isInitialFetch={isInitialFetch}
|
isInitialFetch={isInitialFetch}
|
||||||
queries={this.queries}
|
queries={this.queries}
|
||||||
>
|
>
|
||||||
<RefreshingViewSwitcher
|
<QueryViewSwitcher
|
||||||
tables={tables}
|
tables={tables}
|
||||||
viewID={viewID}
|
viewID={viewID}
|
||||||
onZoom={onZoom}
|
onZoom={onZoom}
|
||||||
|
@ -64,7 +64,7 @@ class RefreshingView extends PureComponent<Props> {
|
||||||
timeRange={timeRange}
|
timeRange={timeRange}
|
||||||
properties={properties}
|
properties={properties}
|
||||||
/>
|
/>
|
||||||
</EmptyRefreshingView>
|
</EmptyQueryView>
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</TimeSeries>
|
</TimeSeries>
|
||||||
|
|
|
@ -5,8 +5,8 @@ import {get} from 'lodash'
|
||||||
import {AutoSizer} from 'react-virtualized'
|
import {AutoSizer} from 'react-virtualized'
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import EmptyRefreshingView from 'src/shared/components/EmptyRefreshingView'
|
import EmptyQueryView from 'src/shared/components/EmptyQueryView'
|
||||||
import RefreshingViewSwitcher from 'src/shared/components/RefreshingViewSwitcher'
|
import QueryViewSwitcher from 'src/shared/components/QueryViewSwitcher'
|
||||||
import RawFluxDataTable from 'src/shared/components/RawFluxDataTable'
|
import RawFluxDataTable from 'src/shared/components/RawFluxDataTable'
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
|
@ -17,7 +17,7 @@ import {getActiveTimeMachine} from 'src/shared/selectors/timeMachines'
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import {View, NewView, TimeRange, DashboardQuery, AppState} from 'src/types/v2'
|
import {View, NewView, TimeRange, DashboardQuery, AppState} from 'src/types/v2'
|
||||||
import {RefreshingViewProperties} from 'src/types/v2/dashboards'
|
import {QueryViewProperties} from 'src/types/v2/dashboards'
|
||||||
import {QueriesState} from 'src/shared/components/TimeSeries'
|
import {QueriesState} from 'src/shared/components/TimeSeries'
|
||||||
|
|
||||||
interface StateProps {
|
interface StateProps {
|
||||||
|
@ -45,7 +45,7 @@ const TimeMachineVis: SFC<Props> = props => {
|
||||||
<div className="time-machine-top">
|
<div className="time-machine-top">
|
||||||
<div className="time-machine-vis">
|
<div className="time-machine-vis">
|
||||||
<div className="graph-container">
|
<div className="graph-container">
|
||||||
<EmptyRefreshingView
|
<EmptyQueryView
|
||||||
error={error}
|
error={error}
|
||||||
tables={tables}
|
tables={tables}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
|
@ -63,15 +63,15 @@ const TimeMachineVis: SFC<Props> = props => {
|
||||||
)}
|
)}
|
||||||
</AutoSizer>
|
</AutoSizer>
|
||||||
) : (
|
) : (
|
||||||
<RefreshingViewSwitcher
|
<QueryViewSwitcher
|
||||||
tables={tables}
|
tables={tables}
|
||||||
viewID="time-machine-view"
|
viewID="time-machine-view"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
timeRange={timeRange}
|
timeRange={timeRange}
|
||||||
properties={view.properties as RefreshingViewProperties}
|
properties={view.properties as QueryViewProperties}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</EmptyRefreshingView>
|
</EmptyQueryView>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -88,7 +88,7 @@ export interface ViewLinks {
|
||||||
|
|
||||||
export type DygraphViewProperties = XYView | LinePlusSingleStatView
|
export type DygraphViewProperties = XYView | LinePlusSingleStatView
|
||||||
|
|
||||||
export type RefreshingViewProperties =
|
export type QueryViewProperties =
|
||||||
| XYView
|
| XYView
|
||||||
| LinePlusSingleStatView
|
| LinePlusSingleStatView
|
||||||
| SingleStatView
|
| SingleStatView
|
||||||
|
@ -96,7 +96,7 @@ export type RefreshingViewProperties =
|
||||||
| GaugeView
|
| GaugeView
|
||||||
|
|
||||||
export type ViewProperties =
|
export type ViewProperties =
|
||||||
| RefreshingViewProperties
|
| QueryViewProperties
|
||||||
| MarkdownView
|
| MarkdownView
|
||||||
| EmptyView
|
| EmptyView
|
||||||
| LogViewerView
|
| LogViewerView
|
||||||
|
|
Loading…
Reference in New Issue