Skip to content

Commit

Permalink
add missing key
Browse files Browse the repository at this point in the history
Signed-off-by: shanghaikid <[email protected]>
  • Loading branch information
shanghaikid committed Aug 31, 2023
1 parent 0a0578b commit a34de1a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 30 deletions.
3 changes: 2 additions & 1 deletion client/src/pages/segments/Segments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import { ColDefinitionsType } from '@/components/grid/Types';
import { ToolBarConfig } from '@/components/grid/Types';
import CustomToolBar from '@/components/grid/ToolBar';
import { getQueryStyles } from '../query/Styles';
import { Segment } from './Types';

const Segments: FC<{
collectionName: string;
}> = ({ collectionName }) => {
const classes = getQueryStyles();
const [segments, setSegements] = useState<any[]>([]);
const [segments, setSegements] = useState<Segment[]>([]);
const { t: collectionTrans } = useTranslation('collection');
const [loading, setLoading] = useState<boolean>(true);

Expand Down
46 changes: 17 additions & 29 deletions client/src/pages/segments/Types.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
import { ReactElement } from 'react';
import { LOADING_STATE } from '@/consts';
import { ManageRequestMethods } from '../../types/Common';

export interface PartitionData {
_id: string;
_name: string;
_status: LOADING_STATE;
_rowCount: string;
_formatName: string;
}

export interface PartitionView extends PartitionData {
_nameElement?: ReactElement;
_statusElement?: ReactElement;
}

// delete and create
export interface PartitionManageParam {
collectionName: string;
partitionName: string;
type: ManageRequestMethods;
}

// load and release
export interface PartitionParam {
collectionName: string;
partitionNames: string[];
}
export type Segment = {
collectionID: string;
num_rows: string;
partitionID: string;
q_collectionID: string;
q_indexID: string;
q_index_name: string;
q_mem_size: string;
q_nodeID: string;
q_nodeIds: string[];
q_num_rows: string;
q_partitionID: string;
q_segmentID: string;
q_state: string;
segmentID: string;
state: string;
};

0 comments on commit a34de1a

Please sign in to comment.