| @@ -170,7 +170,7 @@ | |||
| </div> | |||
| <!-- 智算中心 --> | |||
| <div class="one wide column text center nowrap" style="width:8% !important;"> | |||
| <span style="font-size: 12px;" class="aicenter_{{.DisplayJobName}}_{{$JobID}}">{{if .AiCenter}}{{.AiCenter}}{{else}}--{{end}}</span> | |||
| <span style="font-size: 12px;" class="aicenter_{{.DisplayJobName}}_{{$JobID}}" title="{{if .AiCenter}}{{.AiCenter}}{{else}}--{{end}}">{{if .AiCenter}}{{.AiCenter}}{{else}}--{{end}}</span> | |||
| </div> | |||
| <!-- XPU类型 --> | |||
| <div class="one wide column text center nowrap" style="width:8% !important;"> | |||
| @@ -184,16 +184,16 @@ | |||
| spanEl.setAttribute('title', cardType); | |||
| spanEl.innerText = cardType; | |||
| var cluster = spec.Cluster || '--'; | |||
| var cluster = {{.Cluster}} || '--'; | |||
| var clusterName = document.querySelector('.cloudbrain_debug').dataset['cluster' + cluster[0] + cluster.toLocaleLowerCase().slice(1)] || '--'; | |||
| spanEl = document.querySelector('.cluster_{{.DisplayJobName}}_{{$JobID}}'); | |||
| spanEl.setAttribute('title', cluster); | |||
| spanEl.innerText = clusterName; | |||
| var aiCenter = spec.AiCenterName || '--'; | |||
| spanEl = document.querySelector('.aicenter_{{.DisplayJobName}}_{{$JobID}}'); | |||
| spanEl.setAttribute('title', aiCenter); | |||
| spanEl.innerText = aiCenter; | |||
| // var aiCenter = spec.AiCenterName || '--'; | |||
| // spanEl = document.querySelector('.aicenter_{{.DisplayJobName}}_{{$JobID}}'); | |||
| // spanEl.setAttribute('title', aiCenter); | |||
| // spanEl.innerText = aiCenter; | |||
| })(); | |||
| </script> | |||
| <!-- 创建者 --> | |||
| @@ -71,22 +71,20 @@ | |||
| document.addEventListener('DOMContentLoaded', function() { | |||
| $.ajax({ | |||
| type: "GET", | |||
| url: "/api/v1/cloudbrain/get_center_info", | |||
| url: "/api/v1/cloudbrainboard/cloudbrain/resource_queues", | |||
| dataType: "json", | |||
| data: {}, | |||
| success: function (res) { | |||
| var data = res || []; | |||
| var data = res.resourceQueues || []; | |||
| var aiCenterSelEl = $('#aiCenter-sel'); | |||
| var itemEl = aiCenterSelEl.find('.menu .item').eq(0); | |||
| var selectAiCenterCode = aiCenterSelEl.find('.default').attr('aicenter'); | |||
| var selectAiCenterName = ''; | |||
| var lang = document.querySelector('html').getAttribute('lang') || 'en-US'; | |||
| var except = ['', 'more']; | |||
| for (var i = 0, iLen = data.length; i < iLen; i++) { | |||
| var dataI = data[i]; | |||
| var aiCenterCode = dataI.name; | |||
| if (except.indexOf(aiCenterCode) >= 0) continue; | |||
| var aiCenterName = lang === 'en-US' ? dataI.content_en : dataI.content; | |||
| var aiCenterCode = dataI.AiCenterCode; | |||
| var aiCenterName = dataI.AiCenterName; | |||
| var itemClone = itemEl.clone(); | |||
| var oHref = itemClone.attr('href'); | |||
| var oId = itemClone.attr('id'); | |||
| @@ -85,22 +85,20 @@ | |||
| document.addEventListener('DOMContentLoaded', function() { | |||
| $.ajax({ | |||
| type: "GET", | |||
| url: "/api/v1/cloudbrain/get_center_info", | |||
| url: "/api/v1/cloudbrainboard/cloudbrain/resource_queues", | |||
| dataType: "json", | |||
| data: {}, | |||
| success: function (res) { | |||
| var data = res || []; | |||
| var data = res.resourceQueues || []; | |||
| var aiCenterSelEl = $('#aiCenter-sel'); | |||
| var itemEl = aiCenterSelEl.find('.menu .item').eq(0); | |||
| var selectAiCenterCode = aiCenterSelEl.find('.default').attr('aicenter'); | |||
| var selectAiCenterName = ''; | |||
| var lang = document.querySelector('html').getAttribute('lang') || 'en-US'; | |||
| var except = ['', 'more']; | |||
| for (var i = 0, iLen = data.length; i < iLen; i++) { | |||
| var dataI = data[i]; | |||
| var aiCenterCode = dataI.name; | |||
| if (except.indexOf(aiCenterCode) >= 0) continue; | |||
| var aiCenterName = lang === 'en-US' ? dataI.content_en : dataI.content; | |||
| var aiCenterCode = dataI.AiCenterCode; | |||
| var aiCenterName = dataI.AiCenterName; | |||
| var itemClone = itemEl.clone(); | |||
| var oHref = itemClone.attr('href'); | |||
| var oId = itemClone.attr('id'); | |||
| @@ -65,7 +65,7 @@ | |||
| </div> | |||
| </div> | |||
| </div> | |||
| {{range .Tasks}} | |||
| {{range .Tasks}} | |||
| {{if .Repo}} | |||
| <div class="ui grid stackable item"> | |||
| <div class="row"> | |||
| @@ -154,7 +154,7 @@ | |||
| <!-- 智算中心 --> | |||
| <div class="one wide column text center nowrap" style="width:8% !important;"> | |||
| <span style="font-size: 12px;" class="aicenter_{{.DisplayJobName}}_{{$JobID}}">{{if .AiCenter}}{{.AiCenter}}{{else}}--{{end}}</span> | |||
| <span style="font-size: 12px;" class="aicenter_{{.DisplayJobName}}_{{$JobID}}" title="{{if .AiCenter}}{{.AiCenter}}{{else}}--{{end}}">{{if .AiCenter}}{{.AiCenter}}{{else}}--{{end}}</span> | |||
| </div> | |||
| <!-- XPU类型 --> | |||
| <div class="one wide column text center nowrap" style="width:10% !important;"> | |||
| @@ -168,16 +168,16 @@ | |||
| spanEl.setAttribute('title', cardType); | |||
| spanEl.innerText = cardType; | |||
| var cluster = spec.Cluster || '--'; | |||
| var cluster = {{.Cluster}} || '--'; | |||
| var clusterName = document.querySelector('.cloudbrain_debug').dataset['cluster' + cluster[0] + cluster.toLocaleLowerCase().slice(1)] || '--'; | |||
| spanEl = document.querySelector('.cluster_{{.DisplayJobName}}_{{$JobID}}'); | |||
| spanEl.setAttribute('title', cluster); | |||
| spanEl.innerText = clusterName; | |||
| var aiCenter = spec.AiCenterName || '--'; | |||
| spanEl = document.querySelector('.aicenter_{{.DisplayJobName}}_{{$JobID}}'); | |||
| spanEl.setAttribute('title', aiCenter); | |||
| spanEl.innerText = aiCenter; | |||
| // var aiCenter = spec.AiCenterName || '--'; | |||
| // spanEl = document.querySelector('.aicenter_{{.DisplayJobName}}_{{$JobID}}'); | |||
| // spanEl.setAttribute('title', aiCenter); | |||
| // spanEl.innerText = aiCenter; | |||
| })(); | |||
| </script> | |||
| <!-- 项目 --> | |||