From f6c0d53abf641859c57ddd2709dc617416457dc9 Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Thu, 1 Jun 2023 10:31:32 +0800 Subject: [PATCH] =?UTF-8?q?feature(web):=20=E4=BC=98=E5=8C=96=E9=9B=86?= =?UTF-8?q?=E7=BE=A4=E4=BF=A1=E6=81=AF=E5=B1=95=E7=A4=BA=EF=BC=8C=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E9=80=89=E9=A1=B9=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/components/common.js | 7 ++----- web/components/yarn-cluster-tab.js | 21 +++++++++++++++++++-- web/components/yarn-tab.js | 2 +- web/index.html | 6 +----- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/web/components/common.js b/web/components/common.js index 98e7917..b3d0360 100644 --- a/web/components/common.js +++ b/web/components/common.js @@ -70,10 +70,6 @@ function yarnQueueCrud(clusters = undefined, queueNames = undefined) { { name: 'queueName', label: '队列名称', - width: 130, - type: 'tooltip-wrapper', - body: '${TRUNCATE(queueName, 20)}', - content: '${queueName}', }, { label: '当前容量', @@ -94,7 +90,8 @@ function yarnQueueCrud(clusters = undefined, queueNames = undefined) { value: 100, color: "#dc3545" } - ] + ], + width: 1300, }, { label: '进度', diff --git a/web/components/yarn-cluster-tab.js b/web/components/yarn-cluster-tab.js index 51eb1bb..b905894 100644 --- a/web/components/yarn-cluster-tab.js +++ b/web/components/yarn-cluster-tab.js @@ -1,8 +1,25 @@ function yarnClusterTab() { return { - title: '集群资源', + title: '集群概览', tab: [ - yarnQueueCrud('b1,b5,b5-sync,a4,b4') + { + type: 'tabs', + mountOnEnter: true, + unmountOnExit: true, + tabsMode: 'line', + tabs: [ + { + title: '总体情况', + tab: [ + yarnQueueCrud('b1,b5,b5-sync,a4,b4') + ], + }, + yarnTab('b1', '压缩 b1', 'datalake,tyly'), + yarnTab('a4', '压缩 a4'), + yarnTab('b4', '压缩 b4'), + yarnTab('b5', '压缩 b5', 'ten_iap.datalake'), + ] + } ] } } \ No newline at end of file diff --git a/web/components/yarn-tab.js b/web/components/yarn-tab.js index 5ef1a74..5a97595 100644 --- a/web/components/yarn-tab.js +++ b/web/components/yarn-tab.js @@ -1,4 +1,4 @@ -function yarnTab(cluster, title, queueNames = 'default', searchName = undefined) { +function yarnTab(cluster, title, queueNames = 'root', searchName = undefined) { return { title: `${title} 集群`, tab: [ diff --git a/web/index.html b/web/index.html index 1674e91..4499b5d 100644 --- a/web/index.html +++ b/web/index.html @@ -57,16 +57,12 @@ tabs: [ // logTab(), // runningTab(), - // yarnClusterTab(), tableTab(), queueTab(), yarnTab('b5-sync', '同步 b5', undefined, 'Sync'), yarnTab('b1,b5', '压缩 b1 b5', 'datalake,ten_iap.datalake', 'Compaction'), cloudTab(), - yarnTab('b1', '压缩 b1', 'datalake,tyly'), - yarnTab('a4', '压缩 a4'), - yarnTab('b4', '压缩 b4'), - yarnTab('b5', '压缩 b5', 'ten_iap.datalake'), + yarnClusterTab(), ] } }