Browse Source

clean code

Signed-off-by: nameczz <zizhao.chen@zilliz.com>
nameczz 3 years ago
parent
commit
d2e013c1a4
2 changed files with 2 additions and 6 deletions
  1. 1 2
      client/src/context/Root.tsx
  2. 1 4
      server/src/milvus/milvus.service.ts

+ 1 - 2
client/src/context/Root.tsx

@@ -35,7 +35,7 @@ export const rootContext = React.createContext<RootContextType>({
   setDialog: params => {},
   setDialog: params => {},
   handleCloseDialog: () => {},
   handleCloseDialog: () => {},
   setDrawer: (params: any) => {},
   setDrawer: (params: any) => {},
-  versionInfo: { attu: '1', sdk: '1' },
+  versionInfo: { attu: '', sdk: '' },
 });
 });
 
 
 const { Provider } = rootContext;
 const { Provider } = rootContext;
@@ -112,7 +112,6 @@ export const RootProvider = (props: { children: React.ReactNode }) => {
   useEffect(() => {
   useEffect(() => {
     const fetchVersion = async () => {
     const fetchVersion = async () => {
       const res = await MilvusHttp.getVersion();
       const res = await MilvusHttp.getVersion();
-      console.log(res);
       setVersionInfo(res);
       setVersionInfo(res);
     };
     };
     fetchVersion();
     fetchVersion();

+ 1 - 4
server/src/milvus/milvus.service.ts

@@ -12,10 +12,7 @@ export class MilvusService {
   static activeMilvusClient: MilvusClient;
   static activeMilvusClient: MilvusClient;
 
 
   get sdkInfo() {
   get sdkInfo() {
-    if (!MilvusService.activeMilvusClient) {
-      return {};
-    }
-    return MilvusService.activeMilvusClient.sdkInfo;
+    return MilvusClient.sdkInfo;
   }
   }
 
 
   get collectionManager() {
   get collectionManager() {