fix-4965
into V20240129
2 months ago
@@ -53,28 +53,6 @@ type SpecificationInfo struct { | |||
ExclusiveOrg string `json:"exclusive_org"` | |||
} | |||
func ParseSpecificationInfo(s *models.Specification) *SpecificationInfo { | |||
return &SpecificationInfo{ | |||
ID: s.ID, | |||
SourceSpecId: s.SourceSpecId, | |||
AccCardsNum: s.AccCardsNum, | |||
AccCardType: s.AccCardType, | |||
CpuCores: s.CpuCores, | |||
MemGiB: s.MemGiB, | |||
GPUMemGiB: s.GPUMemGiB, | |||
ShareMemGiB: s.ShareMemGiB, | |||
ComputeResource: s.ComputeResource, | |||
UnitPrice: s.UnitPrice, | |||
QueueId: s.QueueId, | |||
QueueCode: s.QueueCode, | |||
Cluster: s.Cluster, | |||
AiCenterCode: s.AiCenterCode, | |||
AiCenterName: s.AiCenterName, | |||
IsExclusive: s.IsExclusive, | |||
ExclusiveOrg: s.ExclusiveOrg, | |||
} | |||
} | |||
type PointAccountInfo struct { | |||
AccountCode string `json:"account_code"` | |||
Balance int64 `json:"balance"` | |||
@@ -30,6 +30,13 @@ type CloudbrainSpec struct { | |||
UpdatedTime timeutil.TimeStamp `xorm:"updated"` | |||
} | |||
func (s CloudbrainSpec) ExclusiveType() string { | |||
if s.IsExclusive { | |||
return SpecExclusive | |||
} | |||
return SpecPublic | |||
} | |||
func (s CloudbrainSpec) ConvertToSpecification() *Specification { | |||
return &Specification{ | |||
ID: s.SpecId, | |||
@@ -49,7 +56,7 @@ func (s CloudbrainSpec) ConvertToSpecification() *Specification { | |||
Cluster: s.Cluster, | |||
AiCenterCode: s.AiCenterCode, | |||
AiCenterName: s.AiCenterName, | |||
IsExclusive: s.IsExclusive, | |||
SpecExclusiveType: s.ExclusiveType(), | |||
ExclusiveOrg: s.ExclusiveOrg, | |||
HasInternet: s.HasInternet, | |||
} | |||
@@ -73,7 +80,7 @@ func NewCloudBrainSpec(cloudbrainId int64, s Specification) CloudbrainSpec { | |||
Cluster: s.Cluster, | |||
AiCenterCode: s.AiCenterCode, | |||
AiCenterName: s.AiCenterName, | |||
IsExclusive: s.IsExclusive, | |||
IsExclusive: s.IsSpecExclusive(), | |||
ExclusiveOrg: s.ExclusiveOrg, | |||
HasInternet: s.HasInternet, | |||
} | |||
@@ -172,7 +179,7 @@ func UpdateCloudbrainSpec(cloudbrainId int64, s *Specification) (int64, error) { | |||
Cluster: s.Cluster, | |||
AiCenterCode: s.AiCenterCode, | |||
AiCenterName: s.AiCenterName, | |||
IsExclusive: s.IsExclusive, | |||
IsExclusive: s.IsSpecExclusive(), | |||
ExclusiveOrg: s.ExclusiveOrg, | |||
HasInternet: s.HasInternet, | |||
} | |||
@@ -0,0 +1,63 @@ | |||
package models | |||
import ( | |||
"code.gitea.io/gitea/modules/log" | |||
"code.gitea.io/gitea/modules/timeutil" | |||
) | |||
type ResourceExclusivePool struct { | |||
ID int64 `xorm:"pk autoincr"` | |||
SceneId int64 | |||
OrgName string | |||
JobType string | |||
Cluster string | |||
QueueId int64 | |||
ComputeResource string | |||
CreatedTime timeutil.TimeStamp `xorm:"created"` | |||
CreatedBy int64 | |||
UpdatedTime timeutil.TimeStamp `xorm:"updated"` | |||
UpdatedBy int64 | |||
DeleteTime timeutil.TimeStamp `xorm:"deleted"` | |||
DeletedBy int64 | |||
} | |||
func FindExclusivePools() ([]*ResourceExclusivePool, error) { | |||
sq := make([]*ResourceExclusivePool, 0) | |||
err := x.Find(&sq) | |||
if err != nil { | |||
return nil, err | |||
} | |||
return sq, nil | |||
} | |||
func InsertExclusivePools(queue []ResourceExclusivePool) (int64, error) { | |||
return x.Insert(&queue) | |||
} | |||
func IsQueueInExclusivePool(queueId int64) bool { | |||
n, _ := x.In("queue_id", queueId).Count(&ResourceExclusivePool{}) | |||
return n > 0 | |||
} | |||
func FindExclusiveQueueIds() []int64 { | |||
existsIds := make([]int64, 0) | |||
err := x.Table("resource_exclusive_pool").Distinct("queue_id").Where("delete_time=? OR delete_time IS NULL", 0).Find(&existsIds) | |||
if err != nil { | |||
log.Error("FindQueuesExclusiveMap err.%v", err) | |||
return existsIds | |||
} | |||
return existsIds | |||
} | |||
func FindQueuesExclusiveMap() map[int64]string { | |||
resultMap := make(map[int64]string, 0) | |||
existsIds := FindExclusiveQueueIds() | |||
for _, id := range existsIds { | |||
resultMap[id] = "" | |||
} | |||
return resultMap | |||
} |
@@ -104,6 +104,7 @@ type SearchResourceQueueOptions struct { | |||
AccCardType string | |||
HasInternet SpecInternetQuery | |||
QueueType string | |||
IsQueueExclusive int | |||
} | |||
type ResourceQueueListRes struct { | |||
@@ -137,9 +138,13 @@ type GetQueueCodesOptions struct { | |||
} | |||
func NewResourceQueueListRes(totalSize int64, list []ResourceQueue) *ResourceQueueListRes { | |||
exclusiveMap := FindQueuesExclusiveMap() | |||
resList := make([]*ResourceQueueRes, len(list)) | |||
for i, v := range list { | |||
resList[i] = v.ConvertToRes() | |||
if _, exists := exclusiveMap[v.ID]; exists { | |||
resList[i].IsQueueExclusive = true | |||
} | |||
} | |||
return &ResourceQueueListRes{ | |||
TotalSize: totalSize, | |||
@@ -161,6 +166,7 @@ type ResourceQueueRes struct { | |||
UpdatedTime timeutil.TimeStamp | |||
Remark string | |||
HasInternet AICenterInternetStatus | |||
IsQueueExclusive bool | |||
} | |||
func InsertResourceQueue(queue ResourceQueue) (int64, error) { | |||
@@ -199,6 +205,14 @@ func SearchResourceQueue(opts SearchResourceQueueOptions) (int64, []ResourceQueu | |||
if opts.QueueType != "" { | |||
cond = cond.And(builder.Eq{"queue_type": opts.QueueType}) | |||
} | |||
if opts.IsQueueExclusive > 0 { | |||
queueIds := FindExclusiveQueueIds() | |||
if opts.IsQueueExclusive == 1 { | |||
cond = cond.And(builder.NotIn("id", queueIds)) | |||
} else if opts.IsQueueExclusive == 2 { | |||
cond = cond.And(builder.In("id", queueIds)) | |||
} | |||
} | |||
n, err := x.Where(cond).Unscoped().Count(&ResourceQueue{}) | |||
if err != nil { | |||
return 0, nil, err | |||
@@ -27,7 +27,6 @@ type ResourceScene struct { | |||
JobType string | |||
Cluster string | |||
ComputeResource string | |||
IsExclusive bool | |||
IsSpecExclusive string | |||
SceneType string //共享或者独占场景 | |||
ExclusiveOrg string | |||
@@ -46,22 +45,6 @@ type ResourceSceneSpec struct { | |||
CreatedTime timeutil.TimeStamp `xorm:"created"` | |||
} | |||
type ResourceExclusivePool struct { | |||
ID int64 `xorm:"pk autoincr"` | |||
SceneId int64 | |||
OrgName string | |||
JobType string | |||
Cluster string | |||
QueueId int64 | |||
ComputeResource string | |||
CreatedTime timeutil.TimeStamp `xorm:"created"` | |||
CreatedBy int64 | |||
UpdatedTime timeutil.TimeStamp `xorm:"updated"` | |||
UpdatedBy int64 | |||
DeleteTime timeutil.TimeStamp `xorm:"deleted"` | |||
DeletedBy int64 | |||
} | |||
type ResourceSceneReq struct { | |||
ID int64 | |||
SceneName string | |||
@@ -95,6 +78,7 @@ type ResourceSceneListRes struct { | |||
} | |||
func NewResourceSceneListRes(totalSize int64, list []ResourceSceneRes) *ResourceSceneListRes { | |||
return &ResourceSceneListRes{ | |||
TotalSize: totalSize, | |||
List: list, | |||
@@ -149,6 +133,7 @@ type ResourceSpecInfo struct { | |||
ComputeResource string | |||
AccCardType string | |||
HasInternet int | |||
IsQueueExclusive bool | |||
} | |||
func (ResourceSpecInfo) TableName() string { | |||
@@ -177,7 +162,6 @@ func InsertResourceScene(r ResourceSceneReq) error { | |||
rs := ResourceScene{ | |||
SceneName: r.SceneName, | |||
JobType: r.JobType, | |||
IsExclusive: r.IsSpecExclusive == "exclusive", | |||
IsSpecExclusive: r.IsSpecExclusive, | |||
SceneType: r.SceneType, | |||
Cluster: r.Cluster, | |||
@@ -275,12 +259,11 @@ func UpdateResourceScene(r ResourceSceneReq) error { | |||
//update scene | |||
rs := ResourceScene{ | |||
SceneName: r.SceneName, | |||
IsExclusive: r.IsSpecExclusive == "exclusive", | |||
IsSpecExclusive: r.IsSpecExclusive, | |||
ExclusiveOrg: r.ExclusiveOrg, | |||
SceneType: r.SceneType, | |||
} | |||
if _, err = sess.ID(r.ID).UseBool("is_spec_exclusive", "is_exclusive").Update(&rs); err != nil { | |||
if _, err = sess.ID(r.ID).Cols("is_spec_exclusive", "scene_name", "exclusive_org", "scene_type").Update(&rs); err != nil { | |||
return err | |||
} | |||
@@ -447,7 +430,8 @@ func SearchResourceScene(opts SearchResourceSceneOptions) (int64, []ResourceScen | |||
"resource_queue.ai_center_code", "resource_queue.acc_card_type", | |||
"resource_queue.id as queue_id", "resource_queue.compute_resource", | |||
"resource_queue.queue_code", "resource_queue.ai_center_name", | |||
"resource_queue.has_internet", "resource_queue.queue_name", "resource_queue.queue_type", | |||
"resource_queue.has_internet", "resource_queue.queue_name", | |||
"resource_queue.queue_type", | |||
).In("resource_scene_spec.scene_id", sceneIds). | |||
Join("INNER", "resource_scene_spec", "resource_scene_spec.spec_id = resource_specification.id"). | |||
Join("INNER", "resource_queue", "resource_queue.ID = resource_specification.queue_id"). | |||
@@ -475,17 +459,3 @@ func SearchResourceScene(opts SearchResourceSceneOptions) (int64, []ResourceScen | |||
return count, r, nil | |||
} | |||
func FindExclusivePools() ([]*ResourceExclusivePool, error) { | |||
sq := make([]*ResourceExclusivePool, 0) | |||
err := x.Find(&sq) | |||
if err != nil { | |||
return nil, err | |||
} | |||
return sq, nil | |||
} | |||
func InsertExclusivePools(queue []ResourceExclusivePool) (int64, error) { | |||
return x.Insert(&queue) | |||
} |
@@ -247,10 +247,14 @@ type Specification struct { | |||
Cluster string | |||
AiCenterCode string | |||
AiCenterName string | |||
IsExclusive bool | |||
SpecExclusiveType string `xorm:"is_spec_exclusive"` | |||
ExclusiveOrg string | |||
} | |||
func (s Specification) IsSpecExclusive() bool { | |||
return s.SpecExclusiveType == SpecExclusive | |||
} | |||
func (Specification) TableName() string { | |||
return "resource_specification" | |||
} | |||
@@ -393,7 +397,7 @@ func FilterExclusiveSpecs(r []*Specification, userId int64) []*Specification { | |||
if _, has := specMap[spec.ID]; has { | |||
continue | |||
} | |||
if !spec.IsExclusive { | |||
if !spec.IsSpecExclusive() { | |||
specs = append(specs, spec) | |||
specMap[spec.ID] = "" | |||
continue | |||
@@ -49,6 +49,7 @@ func GetResourceQueueList(ctx *context.Context) { | |||
accCardType := ctx.Query("card") | |||
hasInternet := ctx.QueryInt("hasInternet") | |||
queueType := ctx.Query("queueType") | |||
isQueueExclusive := ctx.QueryInt("isQueueExclusive") | |||
if pageSize > 1000 { | |||
log.Error("GetResourceQueueList pageSize too large.") | |||
@@ -63,6 +64,7 @@ func GetResourceQueueList(ctx *context.Context) { | |||
AccCardType: accCardType, | |||
HasInternet: models.SpecInternetQuery(hasInternet), | |||
QueueType: queueType, | |||
IsQueueExclusive: isQueueExclusive, | |||
}) | |||
if err != nil { | |||
log.Error("GetResourceQueueList error.%v", err) | |||
@@ -56,28 +56,15 @@ func GetAITaskCreationInfo(req entity.GetAITaskCreationInfoReq) (*entity.Creatio | |||
//生成任务名称 | |||
result.DisplayJobName = t.GetDisplayJobName(req.User.Name) | |||
specsMap := make(map[string][]*structs.SpecificationShow, 0) | |||
//查询有网资源规格 | |||
if specs, err := t.GetSpecs(entity.GetSpecOpts{ | |||
UserId: req.User.ID, | |||
ComputeSource: *req.ComputeSource, | |||
HasInternet: 2, //0 all;1 no internet;2 has internet | |||
}); err == nil { | |||
specsMap["has_internet"] = specs | |||
} | |||
//查询无网资源规格 | |||
if specs, err := t.GetSpecs(entity.GetSpecOpts{ | |||
UserId: req.User.ID, | |||
ComputeSource: *req.ComputeSource, | |||
HasInternet: 1, //0 all;1 no internet;2 has internet | |||
}); err == nil { | |||
specsMap["no_internet"] = specs | |||
} | |||
//查询所有资源规格 | |||
if specs, err := t.GetSpecs(entity.GetSpecOpts{ | |||
UserId: req.User.ID, | |||
ComputeSource: *req.ComputeSource, | |||
}); err == nil { | |||
specsMap["all"] = specs | |||
specsMap["has_internet"] = filterHasInternetSpecs(specs) | |||
specsMap["no_internet"] = filterNoInternetSpecs(specs) | |||
} | |||
result.Specs = specsMap | |||
// 查询镜像列表 | |||
@@ -103,6 +90,26 @@ func GetAITaskCreationInfo(req entity.GetAITaskCreationInfoReq) (*entity.Creatio | |||
return result, nil | |||
} | |||
func filterHasInternetSpecs(allSpecs []*structs.SpecificationShow) []*structs.SpecificationShow { | |||
hasInternetSpecs := make([]*structs.SpecificationShow, 0) | |||
for i := 0; i < len(allSpecs); i++ { | |||
if allSpecs[i].HasInternet == int(models.HasInternet) { | |||
hasInternetSpecs = append(hasInternetSpecs, allSpecs[i]) | |||
} | |||
} | |||
return hasInternetSpecs | |||
} | |||
func filterNoInternetSpecs(allSpecs []*structs.SpecificationShow) []*structs.SpecificationShow { | |||
noInternetSpecs := make([]*structs.SpecificationShow, 0) | |||
for i := 0; i < len(allSpecs); i++ { | |||
if allSpecs[i].HasInternet == int(models.NoInternet) { | |||
noInternetSpecs = append(noInternetSpecs, allSpecs[i]) | |||
} | |||
} | |||
return noInternetSpecs | |||
} | |||
func GetAvailableImageInfoBySpec(req entity.GetAITaskCreationImageInfoReq) (*entity.ImageRequiredInfo, *response.BizError) { | |||
result := &entity.ImageRequiredInfo{} | |||
t, err := GetAITaskTemplate(req.JobType, req.ClusterType) | |||
@@ -155,9 +155,14 @@ func GetAllResourceSpecification(opts models.SearchResourceSpecificationOptions) | |||
if err != nil { | |||
return nil, err | |||
} | |||
exclusiveMap := models.FindQueuesExclusiveMap() | |||
res := make([]*models.ResourceSpecInfo, len(r)) | |||
for i := 0; i < len(r); i++ { | |||
res[i] = r[i].ConvertToResourceSpecInfo() | |||
if _, exists := exclusiveMap[res[i].QueueId]; exists { | |||
res[i].IsQueueExclusive = true | |||
} | |||
} | |||
return res, nil | |||
} | |||
@@ -329,7 +334,7 @@ func InsertCloudbrainSpec(cloudbrainId int64, s *models.Specification) error { | |||
Cluster: s.Cluster, | |||
AiCenterCode: s.AiCenterCode, | |||
AiCenterName: s.AiCenterName, | |||
IsExclusive: s.IsExclusive, | |||
IsExclusive: s.IsSpecExclusive(), | |||
ExclusiveOrg: s.ExclusiveOrg, | |||
} | |||
_, err := models.InsertCloudbrainSpec(c) | |||
@@ -194,6 +194,7 @@ const en = { | |||
allExclusiveAndCommonUseSpec: 'All Exclusive and Common Use Spec', | |||
public: "Public", | |||
exclusive: "Exclusive", | |||
exclusiveTxt: "Exclusive", | |||
exclusiveSpec: 'Exclusive Spec', | |||
commonUseSpec: 'Common Use Spec', | |||
exclusiveOrg: 'Exclusive Organization', | |||
@@ -193,6 +193,7 @@ const zh = { | |||
allExclusiveAndCommonUseSpec: "全部专属和通用资源规格", | |||
public: "共享(public)", | |||
exclusive: "独占(exclusive)", | |||
exclusiveTxt: "独占", | |||
exclusiveSpec: "专属资源规格", | |||
commonUseSpec: "通用资源规格", | |||
exclusiveOrg: "专属组织", | |||
@@ -156,6 +156,7 @@ export default { | |||
...item, | |||
StatusStr: statusStr, | |||
QueueStr: `${item.QueueCode}${queueName}${queueType}(${getListValueWithKey(this.clusterList, item.Cluster)} - ${item.AiCenterName})`, | |||
QueueIsExclusiveStr: item.IsQueueExclusive ? `<span style="color:rgb(245, 34, 45);font-weight:bold">(${this.$t('resourcesManagement.exclusiveTxt')})</span>` : '', | |||
SpecStr: `${NGPU}, CPU:${item.CpuCores}, ${this.$t('resourcesManagement.gpuMem')}:${item.GPUMemGiB}GB, ${this.$t('resourcesManagement.mem')}:${item.MemGiB}GB, ${this.$t('resourcesManagement.shareMem')}:${item.ShareMemGiB}GB`, | |||
PriceStr: `, ${this.$t('resourcesManagement.unitPrice')}:${item.UnitPrice}${this.$t('resourcesManagement.point_hr')}`, | |||
NetworkTypeStr: `, ${this.$t('cloudbrainObj.networkType')}:${getListValueWithKey(this.networkTypeList, item.HasInternet)}`, | |||
@@ -33,7 +33,7 @@ | |||
<div class="row-item" v-for="_item in item.queues" :key="_item.ID"> | |||
<el-checkbox :value="_item.checked" @change="selectChange(_item.ID)"> | |||
<span | |||
v-html="_item.QueueStr + _item.PriceStr + _item.NetworkTypeStr + _item.StatusStr"></span> | |||
v-html="_item.QueueStr + _item.PriceStr + _item.NetworkTypeStr + _item.StatusStr + _item.QueueIsExclusiveStr"></span> | |||
</el-checkbox> | |||
</div> | |||
<div class="btn-c"> | |||
@@ -56,7 +56,7 @@ | |||
<div class="row-r" style="flex:1"> | |||
<div class="row-item" v-for="_item in item.specs" :key="_item.ID"> | |||
<el-checkbox :value="_item.checked" @change="selectChange(_item.ID)"> | |||
<span v-html="_item.SpecStr + _item.PriceStr + _item.NetworkTypeStr + _item.StatusStr"></span> | |||
<span v-html="_item.SpecStr + _item.PriceStr + _item.NetworkTypeStr + _item.StatusStr + _item.QueueIsExclusiveStr"></span> | |||
</el-checkbox> | |||
</div> | |||
<div class="btn-c"> | |||
@@ -88,7 +88,7 @@ | |||
<div class="row-l" style="width:400px;">{{ item.SpecStr }}</div> | |||
<div class="row-r" style="flex:1"> | |||
<div class="" v-for="(_item, _index) in item.queues" :key="_index"> | |||
<span v-html="_item.QueueStr + _item.PriceStr + _item.NetworkTypeStr + _item.StatusStr"></span> | |||
<span v-html="_item.QueueStr + _item.PriceStr + _item.NetworkTypeStr + _item.StatusStr + _item.QueueIsExclusiveStr"></span> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -145,6 +145,7 @@ export default { | |||
AiCenterCode: spec.AiCenterCode, | |||
AiCenterName: spec.AiCenterName, | |||
QueueStr: spec.QueueStr, | |||
QueueIsExclusiveStr: spec.QueueIsExclusiveStr, | |||
PriceStr: spec.PriceStr, | |||
NetworkTypeStr: spec.NetworkTypeStr, | |||
checked: this.selectList.indexOf(spec.ID) > -1, | |||
@@ -176,6 +177,7 @@ export default { | |||
AiCenterCode: spec.AiCenterCode, | |||
AiCenterName: spec.AiCenterName, | |||
QueueStr: spec.QueueStr, | |||
QueueIsExclusiveStr: spec.QueueIsExclusiveStr, | |||
PriceStr: spec.PriceStr, | |||
NetworkTypeStr: spec.NetworkTypeStr, | |||
checked: this.selectList.indexOf(spec.ID) > -1, | |||
@@ -208,6 +210,7 @@ export default { | |||
AiCenterCode: spec.AiCenterCode, | |||
AiCenterName: spec.AiCenterName, | |||
QueueStr: spec.QueueStr, | |||
QueueIsExclusiveStr: spec.QueueIsExclusiveStr, | |||
PriceStr: spec.PriceStr, | |||
NetworkTypeStr: spec.NetworkTypeStr, | |||
}; | |||
@@ -2,13 +2,16 @@ | |||
<div> | |||
<div class="title"><span>{{ $t('resourcesManagement.resQueue') }}</span></div> | |||
<div class="tools-bar"> | |||
<div> | |||
<div class="left"> | |||
<el-select class="select" size="medium" v-model="selCluster" @change="selectChange"> | |||
<el-option v-for="item in clusterList" :key="item.k" :label="item.v" :value="item.k" /> | |||
</el-select> | |||
<el-select class="select" size="medium" v-model="selQueueType" @change="selectChange"> | |||
<el-option v-for="item in queueTypeList" :key="item.k" :label="item.v" :value="item.k" /> | |||
</el-select> | |||
<el-select class="select" size="medium" v-model="selQueueIsExclusiveType" @change="selectChange"> | |||
<el-option v-for="item in queueIsExclusiveTypeList" :key="item.k" :label="item.v" :value="item.k" /> | |||
</el-select> | |||
<el-select class="select" size="medium" filterable v-model="selComputingCenter" @change="selectChange"> | |||
<el-option v-for="item in computingCenterList" :key="item.k" :label="item.v" :value="item.k" /> | |||
</el-select> | |||
@@ -22,7 +25,7 @@ | |||
<el-option v-for="item in networkTypeList" :key="item.k" :label="item.v" :value="item.k" /> | |||
</el-select> | |||
</div> | |||
<div> | |||
<div class="right"> | |||
<el-button size="medium" icon="el-icon-refresh" @click="syncComputerNetwork" v-loading="syncLoading"> | |||
{{ $t('resourcesManagement.syncAiNetwork') }}</el-button> | |||
<el-button type="primary" icon="el-icon-plus" size="medium" @click="showDialog('add')"> | |||
@@ -43,6 +46,14 @@ | |||
<el-table-column prop="QueueType" :label="$t('resourcesManagement.resQueueType')" align="center" | |||
header-align="center" width="130"> | |||
</el-table-column> | |||
<el-table-column prop="SceneTypeStr" :label="$t('resourcesManagement.sceneType')" align="center" | |||
header-align="center" width="120"> | |||
<template slot-scope="scope"> | |||
<span :style="{ color: scope.row.IsQueueExclusive ? 'red' : '' }"> | |||
{{ scope.row.IsQueueExclusiveStr }} | |||
</span> | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="ClusterName" :label="$t('resourcesManagement.whichCluster')" align="center" | |||
header-align="center"> | |||
<template slot-scope="scope"> | |||
@@ -114,6 +125,8 @@ export default { | |||
clusterList: [{ k: '', v: this.$t('resourcesManagement.allCluster') }, ...CLUSTERS], | |||
selQueueType: '', | |||
queueTypeList: [{ k: '', v: this.$t('resourcesManagement.allResQueueType') }, { k: 'public', v: 'public' }, { k: 'exclusive', v: 'exclusive' }], | |||
selQueueIsExclusiveType: '', | |||
queueIsExclusiveTypeList: [{ k: '', v: this.$t('resourcesManagement.allSceneType') }, { k: 'public', v: this.$t('resourcesManagement.public') }, { k: 'exclusive', v: this.$t('resourcesManagement.exclusive') }], | |||
selComputingCenter: '', | |||
computingCenterList: [{ k: '', v: this.$t('resourcesManagement.allAiCenter') }], | |||
selComputingType: '', | |||
@@ -159,6 +172,7 @@ export default { | |||
const params = { | |||
cluster: this.selCluster, | |||
queueType: this.selQueueType, | |||
isQueueExclusive: this.selQueueIsExclusiveType ? this.selQueueIsExclusiveType == 'exclusive' ? 2 : 1 : '', | |||
center: this.selComputingCenter, | |||
resource: this.selComputingType, | |||
card: this.selCardType, | |||
@@ -176,6 +190,7 @@ export default { | |||
return { | |||
...item, | |||
QueueCode: item.QueueCode || '--', | |||
IsQueueExclusiveStr: getListValueWithKey(this.queueIsExclusiveTypeList.slice(1, Infinity), item.IsQueueExclusive ? 'exclusive' : 'public'), | |||
ClusterName: getListValueWithKey(this.clusterList, item.Cluster), | |||
ComputeResourceName: getListValueWithKey(this.computingTypeList, item.ComputeResource), | |||
AccCardTypeName: getListValueWithKey(this.cardTypeList, item.AccCardType), | |||
@@ -266,17 +281,22 @@ export default { | |||
.tools-bar { | |||
display: flex; | |||
align-items: center; | |||
align-items: flex-start; | |||
; | |||
justify-content: space-between; | |||
margin-bottom: 10px; | |||
.select { | |||
margin-right: 10px; | |||
margin-bottom: 10px; | |||
/deep/ .el-input__inner { | |||
border-radius: 0; | |||
} | |||
} | |||
.right { | |||
display: flex; | |||
} | |||
} | |||
.table-container { | |||
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》