Skip to content

Commit

Permalink
fix: fix schema stats refresh (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
hetao92 committed Mar 10, 2023
1 parent cb89b8b commit 4647eef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
6 changes: 3 additions & 3 deletions app/stores/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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 };
};

Expand Down
11 changes: 0 additions & 11 deletions app/utils/fetch.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4647eef

Please sign in to comment.