You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ki...@apache.org on 2021/12/03 10:16:58 UTC
[dolphinscheduler] branch 2.0.1-prepare updated: [Feature][Workflow relationship] Format name. (#7149)
This is an automated email from the ASF dual-hosted git repository.
kirs pushed a commit to branch 2.0.1-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/2.0.1-prepare by this push:
new 548f43d [Feature][Workflow relationship] Format name. (#7149)
548f43d is described below
commit 548f43dc2602c669fdcb307d91000f81c22af5ea
Author: songjianet <17...@qq.com>
AuthorDate: Fri Dec 3 18:16:52 2021 +0800
[Feature][Workflow relationship] Format name. (#7149)
---
.../home/pages/projects/pages/kinship/_source/graphGridOption.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGridOption.js b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGridOption.js
index 516abaf..8846477 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGridOption.js
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGridOption.js
@@ -30,6 +30,12 @@ const getCategory = (categoryDic, { workFlowPublishStatus, schedulePublishStatus
}
}
+const formatName = (str) => {
+ if (typeof str !== 'string') return ''
+
+ return str.slice(0, 6) + (str.length > 6 ? '\n...' : '')
+}
+
const publishStatusFormat = (status) => {
return status === 0 || status === '0' ? i18n.$t('offline') : status === 1 || status === '1' ? i18n.$t('online') : '-'
}
@@ -116,8 +122,7 @@ export default function (locations, links, sourceWorkFlowCode, isShowLabel) {
position: 'inside',
formatter: (params) => {
if (!params.data.name) return ''
- const str = params.data.name.split('_').map(item => `{a|${item}\n}`).join('')
- return str
+ return formatName(params.data.name)
},
color: '#222222',
textStyle: {