Skip to content

Commit

Permalink
support alias src
Browse files Browse the repository at this point in the history
Signed-off-by: ruiyi.jiang <[email protected]>
  • Loading branch information
shanghaikid committed Jul 26, 2023
1 parent 7bcfe42 commit ea41298
Show file tree
Hide file tree
Showing 48 changed files with 295 additions and 285 deletions.
8 changes: 4 additions & 4 deletions client/src/pages/collections/Aliases.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useContext } from 'react';
import { Chip, IconButton, makeStyles, Theme } from '@material-ui/core';
import { useTranslation } from 'react-i18next';
import { rootContext } from '../../context/Root';
import { rootContext } from '@/context/Root';
import { AliasesProps } from './Types';
import icons from '../../components/icons/Icons';
import icons from '@/components/icons/Icons';
import DeleteIcon from '@material-ui/icons/Delete';
import CreateAliasDialog from '../dialogs/CreateAliasDialog';
import DeleteTemplate from '../../components/customDialog/DeleteDialogTemplate';
import { CollectionHttp } from '../../http/Collection';
import DeleteTemplate from '@/components/customDialog/DeleteDialogTemplate';
import { CollectionHttp } from '@/http/Collection';

const useStyles = makeStyles((theme: Theme) => ({
wrapper: {
Expand Down
12 changes: 6 additions & 6 deletions client/src/pages/collections/Collection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { useMemo, useContext } from 'react';
import { useNavigate, useLocation, useParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { makeStyles, Theme } from '@material-ui/core';
import { authContext } from '../../context/Auth';
import { useNavigationHook } from '../../hooks/Navigation';
import { ALL_ROUTER_TYPES } from '../../router/Types';
import CustomTabList from '../../components/customTabList/CustomTabList';
import { ITab } from '../../components/customTabList/Types';
import { authContext } from '@/context/Auth';
import { useNavigationHook } from '@/hooks/Navigation';
import { ALL_ROUTER_TYPES } from '@/router/Types';
import CustomTabList from '@/components/customTabList/CustomTabList';
import { ITab } from '@/components/customTabList/Types';
import Partitions from '../partitions/Partitions';
import { parseLocationSearch } from '../../utils/Format';
import { parseLocationSearch } from '@/utils/Format';
import Schema from '../schema/Schema';
import Query from '../query/Query';
import Preview from '../preview/Preview';
Expand Down
36 changes: 18 additions & 18 deletions client/src/pages/collections/Collections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@ import { useCallback, useContext, useEffect, useMemo, useState } from 'react';
import { Link, useSearchParams } from 'react-router-dom';
import { makeStyles, Theme } from '@material-ui/core';
import { useTranslation } from 'react-i18next';
import { authContext } from '../../context/Auth';
import { useNavigationHook } from '../../hooks/Navigation';
import { ALL_ROUTER_TYPES } from '../../router/Types';
import AttuGrid from '../../components/grid/Grid';
import CustomToolBar from '../../components/grid/ToolBar';
import { authContext } from '@/context/Auth';
import { useNavigationHook } from '@/hooks/Navigation';
import { ALL_ROUTER_TYPES } from '@/router/Types';
import AttuGrid from '@/components/grid/Grid';
import CustomToolBar from '@/components/grid/ToolBar';
import { CollectionView, InsertDataParam } from './Types';
import { ColDefinitionsType, ToolBarConfig } from '../../components/grid/Types';
import { usePaginationHook } from '../../hooks/Pagination';
import icons from '../../components/icons/Icons';
import EmptyCard from '../../components/cards/EmptyCard';
import Status from '../../components/status/Status';
import { ChildrenStatusType } from '../../components/status/Types';
import StatusIcon from '../../components/status/StatusIcon';
import CustomToolTip from '../../components/customToolTip/CustomToolTip';
import { rootContext } from '../../context/Root';
import { ColDefinitionsType, ToolBarConfig } from '@/components/grid/Types';
import { usePaginationHook } from '@/hooks/Pagination';
import icons from '@/components/icons/Icons';
import EmptyCard from '@/components/cards/EmptyCard';
import Status from '@/components/status/Status';
import { ChildrenStatusType } from '@/components/status/Types';
import StatusIcon from '@/components/status/StatusIcon';
import CustomToolTip from '@/components/customToolTip/CustomToolTip';
import { rootContext } from '@/context/Root';
import CreateCollectionDialog from '../dialogs/CreateCollectionDialog';
import { CollectionHttp } from '../../http/Collection';
import { CollectionHttp } from '@/http/Collection';
import LoadCollectionDialog from '../dialogs/LoadCollectionDialog';
import ReleaseCollectionDialog from '../dialogs/ReleaseCollectionDialog';
import DropCollectionDialog from '../dialogs/DropCollectionDialog';
import RenameCollectionDialog from '../dialogs/RenameCollectionDialog';
import Highlighter from 'react-highlight-words';
import InsertDialog from '../dialogs/insert/Dialog';
import ImportSampleDialog from '../dialogs/ImportSampleDialog';
import { MilvusHttp } from '../../http/Milvus';
import { MilvusHttp } from '@/http/Milvus';
import { LOADING_STATE } from '../../consts/Milvus';
import { webSokcetContext } from '../../context/WebSocket';
import { webSokcetContext } from '@/context/WebSocket';
import { WS_EVENTS, WS_EVENTS_TYPE } from '../../consts/Http';
import { checkIndexBuilding, checkLoading } from '../../utils/Validation';
import { checkIndexBuilding, checkLoading } from '@/utils/Validation';
import Aliases from './Aliases';

const useStyles = makeStyles((theme: Theme) => ({
Expand Down
12 changes: 6 additions & 6 deletions client/src/pages/collections/CreateFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import {
} from '@material-ui/core';
import { FC, Fragment, ReactElement, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import CustomSelector from '../../components/customSelector/CustomSelector';
import icons from '../../components/icons/Icons';
import CustomToolTip from '../../components/customToolTip/CustomToolTip';
import { generateId } from '../../utils/Common';
import { getCreateFieldType } from '../../utils/Format';
import CustomSelector from '@/components/customSelector/CustomSelector';
import icons from '@/components/icons/Icons';
import CustomToolTip from '@/components/customToolTip/CustomToolTip';
import { generateId } from '@/utils/Common';
import { getCreateFieldType } from '@/utils/Format';
import {
checkEmptyValid,
checkRange,
getCheckResult,
} from '../../utils/Validation';
} from '@/utils/Validation';
import {
ALL_OPTIONS,
PRIMARY_FIELDS_OPTIONS,
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/collections/Types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Dispatch, ReactElement, SetStateAction } from 'react';
import { ChildrenStatusType } from '../../components/status/Types';
import { ChildrenStatusType } from '@/components/status/Types';
import { LOADING_STATE } from '../../consts/Milvus';
import { FieldData } from '../schema/Types';

Expand Down
22 changes: 11 additions & 11 deletions client/src/pages/connect/AuthForm.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import React, { useContext, useMemo, useState } from 'react';

import { makeStyles, Theme, Typography } from '@material-ui/core';
import CustomButton from '../../components/customButton/CustomButton';
import CustomInput from '../../components/customInput/CustomInput';
import icons from '../../components/icons/Icons';
import CustomButton from '@/components/customButton/CustomButton';
import CustomInput from '@/components/customInput/CustomInput';
import icons from '@/components/icons/Icons';
import { useTranslation } from 'react-i18next';
import { ITextfieldConfig } from '../../components/customInput/Types';
import { useFormValidation } from '../../hooks/Form';
import { formatForm } from '../../utils/Form';
import { MilvusHttp } from '../../http/Milvus';
import { ITextfieldConfig } from '@/components/customInput/Types';
import { useFormValidation } from '@/hooks/Form';
import { formatForm } from '@/utils/Form';
import { MilvusHttp } from '@/http/Milvus';
import { useNavigate } from 'react-router-dom';
import { rootContext } from '../../context/Root';
import { authContext } from '../../context/Auth';
import { rootContext } from '@/context/Root';
import { authContext } from '@/context/Auth';
import { MILVUS_ADDRESS, LAST_TIME_ADDRESS } from '../../consts/Localstorage';
import { MILVUS_URL } from '../../consts/Milvus';
import { CustomRadio } from '../../components/customRadio/CustomRadio';
import { prometheusContext } from '../../context/Prometheus';
import { CustomRadio } from '@/components/customRadio/CustomRadio';
import { prometheusContext } from '@/context/Prometheus';

const useStyles = makeStyles((theme: Theme) => ({
wrapper: {
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/connect/Connect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useContext } from 'react';
import { Navigate } from 'react-router-dom';
import ConnectContainer from './ConnectContainer';
import { AuthForm } from './AuthForm';
import { authContext } from '../../context/Auth';
import GlobalEffect from '../../components/layout/GlobalEffect';
import { authContext } from '@/context/Auth';
import GlobalEffect from '@/components/layout/GlobalEffect';

const Connect = () => {
const { isAuth } = useContext(authContext);
Expand Down
10 changes: 5 additions & 5 deletions client/src/pages/database/Create.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { makeStyles, Theme } from '@material-ui/core';
import { FC, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import DialogTemplate from '../../components/customDialog/DialogTemplate';
import CustomInput from '../../components/customInput/CustomInput';
import { ITextfieldConfig } from '../../components/customInput/Types';
import { useFormValidation } from '../../hooks/Form';
import { formatForm } from '../../utils/Form';
import DialogTemplate from '@/components/customDialog/DialogTemplate';
import CustomInput from '@/components/customInput/CustomInput';
import { ITextfieldConfig } from '@/components/customInput/Types';
import { useFormValidation } from '@/hooks/Form';
import { formatForm } from '@/utils/Form';
import { CreateDatabaseProps, CreateDatabaseParams } from './Types';

const useStyles = makeStyles((theme: Theme) => ({
Expand Down
14 changes: 7 additions & 7 deletions client/src/pages/database/Database.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React, { useContext, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { DatabaseHttp } from '../../http/Database';
import AttuGrid from '../../components/grid/Grid';
import { ColDefinitionsType, ToolBarConfig } from '../../components/grid/Types';
import { DatabaseHttp } from '@/http/Database';
import AttuGrid from '@/components/grid/Grid';
import { ColDefinitionsType, ToolBarConfig } from '@/components/grid/Types';
import {
CreateDatabaseParams,
DropDatabaseParams,
DatabaseData,
} from './Types';
import DeleteTemplate from '../../components/customDialog/DeleteDialogTemplate';
import { rootContext } from '../../context/Root';
import { useNavigationHook } from '../../hooks/Navigation';
import { ALL_ROUTER_TYPES } from '../../router/Types';
import DeleteTemplate from '@/components/customDialog/DeleteDialogTemplate';
import { rootContext } from '@/context/Root';
import { useNavigationHook } from '@/hooks/Navigation';
import { ALL_ROUTER_TYPES } from '@/router/Types';
import CreateUser from './Create';

const Database = () => {
Expand Down
10 changes: 5 additions & 5 deletions client/src/pages/database/Update.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { makeStyles, Theme } from '@material-ui/core';
import { FC, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import DialogTemplate from '../../components/customDialog/DialogTemplate';
import CustomInput from '../../components/customInput/CustomInput';
import { ITextfieldConfig } from '../../components/customInput/Types';
import { useFormValidation } from '../../hooks/Form';
import { formatForm } from '../../utils/Form';
import DialogTemplate from '@/components/customDialog/DialogTemplate';
import CustomInput from '@/components/customInput/CustomInput';
import { ITextfieldConfig } from '@/components/customInput/Types';
import { useFormValidation } from '@/hooks/Form';
import { formatForm } from '@/utils/Form';
import { UpdateUserParams, UpdateUserProps } from './Types';

const useStyles = makeStyles((theme: Theme) => ({
Expand Down
14 changes: 7 additions & 7 deletions client/src/pages/dialogs/CreateAliasDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { FC, useContext, useMemo, useState } from 'react';
import { Typography, makeStyles, Theme } from '@material-ui/core';
import { useTranslation } from 'react-i18next';
import { rootContext } from '../../context/Root';
import DialogTemplate from '../../components/customDialog/DialogTemplate';
import CustomInput from '../../components/customInput/CustomInput';
import { formatForm } from '../../utils/Form';
import { useFormValidation } from '../../hooks/Form';
import { ITextfieldConfig } from '../../components/customInput/Types';
import { CollectionHttp } from '../../http/Collection';
import { rootContext } from '@/context/Root';
import DialogTemplate from '@/components/customDialog/DialogTemplate';
import CustomInput from '@/components/customInput/CustomInput';
import { formatForm } from '@/utils/Form';
import { useFormValidation } from '@/hooks/Form';
import { ITextfieldConfig } from '@/components/customInput/Types';
import { CollectionHttp } from '@/http/Collection';
import { CreateAliasProps } from '../collections/Types';

const useStyles = makeStyles((theme: Theme) => ({
Expand Down
18 changes: 9 additions & 9 deletions client/src/pages/dialogs/CreateCollectionDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { makeStyles, Theme } from '@material-ui/core';
import { FC, useContext, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import DialogTemplate from '../../components/customDialog/DialogTemplate';
import CustomInput from '../../components/customInput/CustomInput';
import CustomSelector from '../../components/customSelector/CustomSelector';
import { ITextfieldConfig } from '../../components/customInput/Types';
import { rootContext } from '../../context/Root';
import { useFormValidation } from '../../hooks/Form';
import { formatForm } from '../../utils/Form';
import { TypeEnum } from '../../utils/Validation';
import DialogTemplate from '@/components/customDialog/DialogTemplate';
import CustomInput from '@/components/customInput/CustomInput';
import CustomSelector from '@/components/customSelector/CustomSelector';
import { ITextfieldConfig } from '@/components/customInput/Types';
import { rootContext } from '@/context/Root';
import { useFormValidation } from '@/hooks/Form';
import { formatForm } from '@/utils/Form';
import { TypeEnum } from '@/utils/Validation';
import CreateFields from '../collections/CreateFields';
import { CollectionHttp } from '../../http/Collection';
import { CollectionHttp } from '@/http/Collection';
import {
CollectionCreateParam,
CollectionCreateProps,
Expand Down
14 changes: 7 additions & 7 deletions client/src/pages/dialogs/CreatePartitionDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { makeStyles, Theme } from '@material-ui/core';
import { FC, useMemo, useState, useContext } from 'react';
import { useTranslation } from 'react-i18next';
import { rootContext } from '../../context/Root';
import DialogTemplate from '../../components/customDialog/DialogTemplate';
import CustomInput from '../../components/customInput/CustomInput';
import { ITextfieldConfig } from '../../components/customInput/Types';
import { useFormValidation } from '../../hooks/Form';
import { formatForm } from '../../utils/Form';
import { rootContext } from '@/context/Root';
import DialogTemplate from '@/components/customDialog/DialogTemplate';
import CustomInput from '@/components/customInput/CustomInput';
import { ITextfieldConfig } from '@/components/customInput/Types';
import { useFormValidation } from '@/hooks/Form';
import { formatForm } from '@/utils/Form';
import { PartitionCreateProps } from './Types';
import { PartitionManageParam } from '../partitions/Types';
import { ManageRequestMethods } from '../../types/Common';
import { PartitionHttp } from '../../http/Partition';
import { PartitionHttp } from '@/http/Partition';

const useStyles = makeStyles((theme: Theme) => ({
input: {
Expand Down
6 changes: 3 additions & 3 deletions client/src/pages/dialogs/DropCollectionDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { FC, useContext } from 'react';
import { useTranslation } from 'react-i18next';
import { rootContext } from '../../context/Root';
import DeleteTemplate from '../../components/customDialog/DeleteDialogTemplate';
import { CollectionHttp } from '../../http/Collection';
import { rootContext } from '@/context/Root';
import DeleteTemplate from '@/components/customDialog/DeleteDialogTemplate';
import { CollectionHttp } from '@/http/Collection';
import { DropCollectionProps } from './Types';

const DropCollectionDialog: FC<DropCollectionProps> = props => {
Expand Down
6 changes: 3 additions & 3 deletions client/src/pages/dialogs/DropPartitionDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { FC, useContext } from 'react';
import { useTranslation } from 'react-i18next';
import { rootContext } from '../../context/Root';
import DeleteTemplate from '../../components/customDialog/DeleteDialogTemplate';
import { rootContext } from '@/context/Root';
import DeleteTemplate from '@/components/customDialog/DeleteDialogTemplate';
import { DropPartitionProps } from './Types';
import { PartitionHttp } from '../../http/Partition';
import { PartitionHttp } from '@/http/Partition';
import { PartitionManageParam } from '../partitions/Types';
import { ManageRequestMethods } from '../../types/Common';

Expand Down
10 changes: 5 additions & 5 deletions client/src/pages/dialogs/ImportSampleDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { makeStyles, Theme, Typography } from '@material-ui/core';
import { FC, useState, useContext } from 'react';
import { useTranslation } from 'react-i18next';
import DialogTemplate from '../../components/customDialog/DialogTemplate';
import CustomSelector from '../../components/customSelector/CustomSelector';
import { rootContext } from '../../context/Root';
import DialogTemplate from '@/components/customDialog/DialogTemplate';
import CustomSelector from '@/components/customSelector/CustomSelector';
import { rootContext } from '@/context/Root';
import { InsertStatusEnum } from './insert/Types';
import { CollectionHttp } from '../../http/Collection';
import { MilvusHttp } from '../../http/Milvus';
import { CollectionHttp } from '@/http/Collection';
import { MilvusHttp } from '@/http/Milvus';
import { LoadSampleParam } from './Types';

const getStyles = makeStyles((theme: Theme) => {
Expand Down
24 changes: 12 additions & 12 deletions client/src/pages/dialogs/LoadCollectionDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import {
FormControlLabel,
} from '@material-ui/core';
import { useTranslation } from 'react-i18next';
import { authContext } from '../../context/Auth';
import { CollectionHttp } from '../../http/Collection';
import { rootContext } from '../../context/Root';
import { useFormValidation } from '../../hooks/Form';
import { formatForm } from '../../utils/Form';
import { parseJson, getNode } from '../../utils/Metric';
import CustomInput from '../../components/customInput/CustomInput';
import { ITextfieldConfig } from '../../components/customInput/Types';
import DialogTemplate from '../../components/customDialog/DialogTemplate';
import { MilvusHttp } from '../../http/Milvus';
import CustomToolTip from '../../components/customToolTip/CustomToolTip';
import { authContext } from '@/context/Auth';
import { CollectionHttp } from '@/http/Collection';
import { rootContext } from '@/context/Root';
import { useFormValidation } from '@/hooks/Form';
import { formatForm } from '@/utils/Form';
import { parseJson, getNode } from '@/utils/Metric';
import CustomInput from '@/components/customInput/CustomInput';
import { ITextfieldConfig } from '@/components/customInput/Types';
import DialogTemplate from '@/components/customDialog/DialogTemplate';
import { MilvusHttp } from '@/http/Milvus';
import CustomToolTip from '@/components/customToolTip/CustomToolTip';
import { MILVUS_NODE_TYPE, MILVUS_DEPLOY_MODE } from '../../consts/Milvus';
import icons from '../../components/icons/Icons';
import icons from '@/components/icons/Icons';

const useStyles = makeStyles((theme: Theme) => ({
desc: {
Expand Down
6 changes: 3 additions & 3 deletions client/src/pages/dialogs/ReleaseCollectionDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useContext, useState } from 'react';
import { Typography, makeStyles, Theme } from '@material-ui/core';
import { useTranslation } from 'react-i18next';
import { CollectionHttp } from '../../http/Collection';
import { rootContext } from '../../context/Root';
import DialogTemplate from '../../components/customDialog/DialogTemplate';
import { CollectionHttp } from '@/http/Collection';
import { rootContext } from '@/context/Root';
import DialogTemplate from '@/components/customDialog/DialogTemplate';

const useStyles = makeStyles((theme: Theme) => ({
desc: {
Expand Down
Loading

0 comments on commit ea41298

Please sign in to comment.