|
@@ -1,3 +1,4 @@
|
|
|
+import dayjs from 'dayjs';
|
|
|
import { StatusEnum } from '../components/status/Types';
|
|
|
import {
|
|
|
PartitionManageParam,
|
|
@@ -11,7 +12,7 @@ export class PartitionHttp extends BaseModel implements PartitionData {
|
|
|
private id!: string;
|
|
|
private name!: string;
|
|
|
private rowCount!: string;
|
|
|
- private status!: StatusEnum;
|
|
|
+ private createdTime!: string;
|
|
|
|
|
|
constructor(props: {}) {
|
|
|
super(props);
|
|
@@ -83,4 +84,12 @@ export class PartitionHttp extends BaseModel implements PartitionData {
|
|
|
// @TODO replace mock data
|
|
|
return StatusEnum.unloaded;
|
|
|
}
|
|
|
+
|
|
|
+ // Befor milvus-2.0-rc3 will return '0'.
|
|
|
+ // If milvus is stable, we can remote this condition/
|
|
|
+ get _createdTime(): string {
|
|
|
+ return this.createdTime && this.createdTime !== '0'
|
|
|
+ ? dayjs(Number(this.createdTime)).format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ : '';
|
|
|
+ }
|
|
|
}
|