当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript explore.generateEmptyQuery函数代码示例

本文整理汇总了TypeScript中app/core/utils/explore.generateEmptyQuery函数的典型用法代码示例。如果您正苦于以下问题:TypeScript generateEmptyQuery函数的具体用法?TypeScript generateEmptyQuery怎么用?TypeScript generateEmptyQuery使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了generateEmptyQuery函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1:

 nextQueries = queries.map((query, i) => {
   // Synchronize all queries with local query cache to ensure consistency
   // TODO still needed?
   return i === index
     ? { ...modifier({ ...query }, modification), ...generateEmptyQuery(state.queries) }
     : query;
 });
开发者ID:johntdyer,项目名称:grafana,代码行数:7,代码来源:reducers.ts

示例2: return

  return (dispatch, getState) => {
    // Null query means reset
    if (query === null) {
      query = { ...generateEmptyQuery(getState().explore[exploreId].queries) };
    }

    dispatch(changeQueryAction({ exploreId, query, index, override }));
    if (override) {
      dispatch(runQueries(exploreId));
    }
  };
开发者ID:johntdyer,项目名称:grafana,代码行数:11,代码来源:actions.ts

示例3: dispatch

  return dispatch => {
    // Null query means reset
    if (query === null) {
      query = { ...generateEmptyQuery(index) };
    }

    dispatch(changeQueryAction({ exploreId, query, index, override }));
    if (override) {
      dispatch(runQueries(exploreId));
    }
  };
开发者ID:CorpGlory,项目名称:grafana,代码行数:11,代码来源:actions.ts

示例4: getQueryKeys

    mapper: (state, action): ExploreItemState => {
      const { queries, queryTransactions } = state;
      const { query, index } = action.payload;

      // Override path: queries are completely reset
      const nextQuery: DataQuery = { ...query, ...generateEmptyQuery(index) };
      const nextQueries = [...queries];
      nextQueries[index] = nextQuery;

      // Discard ongoing transaction related to row query
      const nextQueryTransactions = queryTransactions.filter(qt => qt.rowIndex !== index);

      return {
        ...state,
        queries: nextQueries,
        queryTransactions: nextQueryTransactions,
        queryKeys: getQueryKeys(nextQueries, state.datasourceInstance),
      };
    },
开发者ID:CorpGlory,项目名称:grafana,代码行数:19,代码来源:reducers.ts

示例5:

 const refreshQueries = queries.map(q => ({ ...q, ...generateEmptyQuery(itemState.queries) }));
开发者ID:johntdyer,项目名称:grafana,代码行数:1,代码来源:actions.ts

示例6:

 nextQueries = queries.map((query, i) => ({
   ...modifier({ ...query }, modification),
   ...generateEmptyQuery(i),
 }));
开发者ID:CorpGlory,项目名称:grafana,代码行数:4,代码来源:reducers.ts

示例7: addQueryRow

export function addQueryRow(exploreId: ExploreId, index: number): ActionOf<AddQueryRowPayload> {
  const query = generateEmptyQuery(index + 1);
  return addQueryRowAction({ exploreId, index, query });
}
开发者ID:CorpGlory,项目名称:grafana,代码行数:4,代码来源:actions.ts


注:本文中的app/core/utils/explore.generateEmptyQuery函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。