移除ceph
Former-commit-id: 064ce4fba3268c9caa2a73b6fc9092a3da79340b
This commit is contained in:
parent
791fe7bcf3
commit
a1b3aa4ba6
|
@ -898,7 +898,7 @@ type (
|
|||
RegionDict string `json:"regionDict,omitempty" db:"region_dict"`
|
||||
Location string `json:"location,omitempty" db:"location"`
|
||||
CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
|
||||
Environment map[string]string `json:"environment,omitempty" db:"environment"`
|
||||
Environment string `json:"environment,omitempty" db:"environment"`
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -400,10 +400,6 @@ service pcm {
|
|||
group: storage
|
||||
)
|
||||
service pcm {
|
||||
@doc "存储概览"
|
||||
@handler screenStorageHandler
|
||||
get /storage/screenStorage (StorageScreenReq) returns (StorageScreenResp)
|
||||
|
||||
@doc "日常算力查询"
|
||||
@handler dailyPowerScreenHandler
|
||||
get /storage/dailyPowerScreen returns (DailyPowerScreenResp)
|
||||
|
|
|
@ -473,11 +473,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/storage/screenStorage",
|
||||
Handler: storage.ScreenStorageHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/storage/dailyPowerScreen",
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
package storage
|
||||
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/storage"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func ScreenStorageHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.StorageScreenReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
result.ParamErrorResult(r, w, err)
|
||||
return
|
||||
}
|
||||
|
||||
l := storage.NewScreenStorageLogic(r.Context(), svcCtx)
|
||||
resp, err := l.ScreenStorage(&req)
|
||||
result.HttpResult(r, w, resp, err)
|
||||
}
|
||||
}
|
|
@ -26,7 +26,7 @@ func NewGetClusterByIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
|
|||
|
||||
func (l *GetClusterByIdLogic) GetClusterById(req *types.GetClusterByIdReq) (resp *types.GetClusterByIdResp, err error) {
|
||||
resp = &types.GetClusterByIdResp{}
|
||||
tx := l.svcCtx.DbEngin.Raw("select * from t_cluster where id = ?", req.ClusterId).Scan(&resp)
|
||||
tx := l.svcCtx.DbEngin.Raw("select * from t_cluster where id = ?", req.ClusterId).Scan(&resp.ClusterInfo)
|
||||
if tx.Error != nil {
|
||||
logx.Errorf(tx.Error.Error())
|
||||
return nil, errors.New("cluster create failed")
|
||||
|
|
|
@ -834,7 +834,7 @@ type ClusterInfo struct {
|
|||
RegionDict string `json:"regionDict,omitempty" db:"region_dict"`
|
||||
Location string `json:"location,omitempty" db:"location"`
|
||||
CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
|
||||
Environment map[string]string `json:"environment,omitempty" db:"environment"`
|
||||
Environment string `json:"environment,omitempty" db:"environment"`
|
||||
}
|
||||
|
||||
type ClusterDelReq struct {
|
||||
|
|
Loading…
Reference in New Issue