本文整理汇总了TypeScript中src/shared/utils/view.defaultViewQuery函数的典型用法代码示例。如果您正苦于以下问题:TypeScript defaultViewQuery函数的具体用法?TypeScript defaultViewQuery怎么用?TypeScript defaultViewQuery使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了defaultViewQuery函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: createView
export const initialStateHelper = (): TimeMachineState => ({
timeRange: {lower: 'now() - 1h'},
autoRefresh: AUTOREFRESH_DEFAULT,
view: createView(),
draftQueries: [{...defaultViewQuery(), hidden: false}],
isViewingRawData: false,
activeTab: TimeMachineTab.Queries,
activeQueryIndex: 0,
queryResults: initialQueryResultsState(),
queryBuilder: {
buckets: [],
bucketsStatus: RemoteDataState.NotStarted,
aggregateWindow: {period: 'auto'},
functions: [],
tags: [
{
valuesSearchTerm: '',
keysSearchTerm: '',
keys: [],
keysStatus: RemoteDataState.NotStarted,
values: [],
valuesStatus: RemoteDataState.NotStarted,
},
],
},
})
示例2: produce
return produce(state, draftState => {
draftState.draftQueries = [
...state.draftQueries,
{...defaultViewQuery(), hidden: false},
]
draftState.activeQueryIndex = draftState.draftQueries.length - 1
resetBuilderState(draftState)
})
示例3: createView
export const initialStateHelper = (): TimeMachineState => ({
timeRange: {lower: 'now() - 1h'},
view: createView(),
draftQueries: [{...defaultViewQuery(), hidden: false}],
isViewingRawData: false,
activeTab: TimeMachineTab.Queries,
activeQueryIndex: 0,
submitToken: 0,
queryBuilder: {
buckets: [],
bucketsStatus: RemoteDataState.NotStarted,
tags: [],
},
})