Skip to content

Commit

Permalink
enhance: [skip e2e] refine display format (#38537)
Browse files Browse the repository at this point in the history
issue: #36621

Signed-off-by: jaime <[email protected]>
  • Loading branch information
jaime0815 authored Dec 17, 2024
1 parent decdfda commit 4d5572d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
3 changes: 1 addition & 2 deletions internal/proxy/http_req_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import (
"github.com/milvus-io/milvus/pkg/util/merr"
"github.com/milvus-io/milvus/pkg/util/metricsinfo"
"github.com/milvus-io/milvus/pkg/util/paramtable"
"github.com/milvus-io/milvus/pkg/util/tsoutil"
"github.com/milvus-io/milvus/pkg/util/typeutil"
)

Expand Down Expand Up @@ -340,7 +339,7 @@ func describeCollection(node *Proxy) gin.HandlerFunc {
collection := &metricsinfo.Collection{
CollectionID: strconv.FormatInt(describeCollectionResp.CollectionID, 10),
CollectionName: describeCollectionResp.CollectionName,
CreatedTime: tsoutil.PhysicalTimeFormat(describeCollectionResp.CreatedUtcTimestamp),
CreatedTime: typeutil.TimestampToString(describeCollectionResp.CreatedUtcTimestamp),
ShardsNum: int(describeCollectionResp.ShardsNum),
ConsistencyLevel: describeCollectionResp.ConsistencyLevel.String(),
Aliases: describeCollectionResp.Aliases,
Expand Down
22 changes: 10 additions & 12 deletions pkg/util/metricsinfo/metrics_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ type Field struct {
}

type Collection struct {
CollectionID string `json:"collection_id,omitempty,string"`
CollectionID string `json:"collection_id,omitempty"`
CollectionName string `json:"collection_name,omitempty"`
CreatedTime string `json:"created_time,omitempty"`
ShardsNum int `json:"shards_num,omitempty"`
Expand Down Expand Up @@ -470,15 +470,13 @@ type Databases struct {
}

type Index struct {
CollectionID int64 `json:"collection_id,omitempty,string"`
FieldID int64 `json:"field_id,omitempty,string"`
IndexID int64 `json:"index_id,omitempty,string"`
Name string `json:"name,omitempty"`
IsDeleted bool `json:"is_deleted"`
CreateTime string `json:"create_time,omitempty"`
IndexParams map[string]string `json:"index_params,omitempty"`
IsAutoIndex bool `json:"is_auto_index,omitempty"`
UserIndexParams map[string]string `json:"user_index_params"`
State string `json:"state,omitempty"`
IndexStateFailReason string `json:"index_state_fail_reason,omitempty"`
CollectionID int64 `json:"collection_id,omitempty,string"`
FieldID int64 `json:"field_id,omitempty,string"`
IndexID int64 `json:"index_id,omitempty,string"`
Name string `json:"name,omitempty"`
IsDeleted bool `json:"is_deleted"`
CreateTime string `json:"create_time,omitempty"`
IndexParams map[string]string `json:"index_params,omitempty"`
IsAutoIndex bool `json:"is_auto_index,omitempty"`
UserIndexParams map[string]string `json:"user_index_params"`
}

0 comments on commit 4d5572d

Please sign in to comment.