Rename RefreshingViewProperties to QueryViewProperties

pull/10616/head
Christopher Henn 2018-11-27 09:28:09 -08:00 committed by Chris Henn
parent 113093d5c7
commit fea821f54c
5 changed files with 20 additions and 20 deletions

View File

@ -19,7 +19,7 @@ interface Props {
queries: DashboardQuery[]
}
export default class EmptyRefreshingView extends PureComponent<Props> {
export default class EmptyQueryView extends PureComponent<Props> {
public render() {
const {error, isInitialFetch, loading, tables, queries} = this.props

View File

@ -10,7 +10,7 @@ import DygraphContainer from 'src/shared/components/DygraphContainer'
// Types
import {
RefreshingViewProperties,
QueryViewProperties,
ViewType,
SingleStatView,
XYView,
@ -22,12 +22,12 @@ interface Props {
viewID: string
tables: FluxTable[]
loading: RemoteDataState
properties: RefreshingViewProperties
properties: QueryViewProperties
timeRange?: TimeRange
onZoom?: (range: TimeRange) => void
}
export default class RefreshingViewSwitcher extends PureComponent<Props> {
export default class QueryViewSwitcher extends PureComponent<Props> {
public render() {
const {properties, loading, viewID, tables, onZoom, timeRange} = this.props

View File

@ -4,8 +4,8 @@ import _ from 'lodash'
// Components
import TimeSeries from 'src/shared/components/TimeSeries'
import EmptyRefreshingView from 'src/shared/components/EmptyRefreshingView'
import RefreshingViewSwitcher from 'src/shared/components/RefreshingViewSwitcher'
import EmptyQueryView from 'src/shared/components/EmptyQueryView'
import QueryViewSwitcher from 'src/shared/components/QueryViewSwitcher'
// Utils
import {GlobalAutoRefresher} from 'src/utils/AutoRefresher'
@ -13,7 +13,7 @@ import {GlobalAutoRefresher} from 'src/utils/AutoRefresher'
// Types
import {TimeRange} from 'src/types'
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 {
timeRange: TimeRange
@ -21,7 +21,7 @@ interface Props {
inView: boolean
manualRefresh: number
onZoom: (range: TimeRange) => void
properties: RefreshingViewProperties
properties: QueryViewProperties
}
class RefreshingView extends PureComponent<Props> {
@ -49,14 +49,14 @@ class RefreshingView extends PureComponent<Props> {
>
{({tables, loading, error, isInitialFetch}) => {
return (
<EmptyRefreshingView
<EmptyQueryView
error={error}
tables={tables}
loading={loading}
isInitialFetch={isInitialFetch}
queries={this.queries}
>
<RefreshingViewSwitcher
<QueryViewSwitcher
tables={tables}
viewID={viewID}
onZoom={onZoom}
@ -64,7 +64,7 @@ class RefreshingView extends PureComponent<Props> {
timeRange={timeRange}
properties={properties}
/>
</EmptyRefreshingView>
</EmptyQueryView>
)
}}
</TimeSeries>

View File

@ -5,8 +5,8 @@ import {get} from 'lodash'
import {AutoSizer} from 'react-virtualized'
// Components
import EmptyRefreshingView from 'src/shared/components/EmptyRefreshingView'
import RefreshingViewSwitcher from 'src/shared/components/RefreshingViewSwitcher'
import EmptyQueryView from 'src/shared/components/EmptyQueryView'
import QueryViewSwitcher from 'src/shared/components/QueryViewSwitcher'
import RawFluxDataTable from 'src/shared/components/RawFluxDataTable'
// Actions
@ -17,7 +17,7 @@ import {getActiveTimeMachine} from 'src/shared/selectors/timeMachines'
// Types
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'
interface StateProps {
@ -45,7 +45,7 @@ const TimeMachineVis: SFC<Props> = props => {
<div className="time-machine-top">
<div className="time-machine-vis">
<div className="graph-container">
<EmptyRefreshingView
<EmptyQueryView
error={error}
tables={tables}
loading={loading}
@ -63,15 +63,15 @@ const TimeMachineVis: SFC<Props> = props => {
)}
</AutoSizer>
) : (
<RefreshingViewSwitcher
<QueryViewSwitcher
tables={tables}
viewID="time-machine-view"
loading={loading}
timeRange={timeRange}
properties={view.properties as RefreshingViewProperties}
properties={view.properties as QueryViewProperties}
/>
)}
</EmptyRefreshingView>
</EmptyQueryView>
</div>
</div>
</div>

View File

@ -88,7 +88,7 @@ export interface ViewLinks {
export type DygraphViewProperties = XYView | LinePlusSingleStatView
export type RefreshingViewProperties =
export type QueryViewProperties =
| XYView
| LinePlusSingleStatView
| SingleStatView
@ -96,7 +96,7 @@ export type RefreshingViewProperties =
| GaugeView
export type ViewProperties =
| RefreshingViewProperties
| QueryViewProperties
| MarkdownView
| EmptyView
| LogViewerView