From 4647eef5bc798dc768455cb57f1d8115c606d585 Mon Sep 17 00:00:00 2001 From: Nut He <18328704+hetao92@users.noreply.github.com> Date: Fri, 10 Mar 2023 14:02:13 +0800 Subject: [PATCH] fix: fix schema stats refresh (#503) --- app/stores/schema.ts | 6 +++--- app/utils/fetch.ts | 11 ----------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/app/stores/schema.ts b/app/stores/schema.ts index 9870a0d7..627112c3 100644 --- a/app/stores/schema.ts +++ b/app/stores/schema.ts @@ -596,7 +596,7 @@ export class SchemaStore { // stats submitStats = async () => { const { code, data } = await service.execNGQL( - { gql: `SUBMIT JOB STATS` }, + { gql: `SUBMIT JOB STATS`, space: this.currentSpace }, { trackEventConfig: { category: 'schema', @@ -608,13 +608,13 @@ export class SchemaStore { }; getStats = async () => { - const { code, data } = await service.execNGQL({ gql: `SHOW STATS` }); + const { code, data } = await service.execNGQL({ gql: `SHOW STATS`, space: this.currentSpace }); return { code, data }; }; getJobStatus = async (id?) => { const gql = id === undefined ? 'SHOW JOBS' : `SHOW JOB ${id}`; - const { code, data } = await service.execNGQL({ gql }); + const { code, data } = await service.execNGQL({ gql, space: this.currentSpace }); return { code, data }; }; diff --git a/app/utils/fetch.ts b/app/utils/fetch.ts index 95ffe114..a69d810b 100644 --- a/app/utils/fetch.ts +++ b/app/utils/fetch.ts @@ -1,6 +1,5 @@ import service from '@app/config/service'; import { handleKeyword, handleVidStringName } from '@app/utils/function'; -import { getExploreGQLWithIndex } from '@app/utils/gql'; interface IMatchVertex { vid?: string; @@ -32,16 +31,6 @@ export async function fetchEdgeProps(payload: { return data; } -export async function fetchVertexPropsWithIndex(payload: { - tag: string; - filters: any[]; - quantityLimit: number | null; -}) { - const gql = getExploreGQLWithIndex(payload); - const { code, data, message } = await service.execNGQL({ gql }); - return { code, data, message }; -} - export async function fetchVertexProps(payload: { ids: string[]; spaceVidType: string;