From c37f1488bd0c45584679fe0ceb52b2428af16fb4 Mon Sep 17 00:00:00 2001 From: myangle1120 <942542838@qq.com> Date: Mon, 23 Aug 2021 23:18:24 +0800 Subject: [PATCH] Task node of SWITCH (#5939) --- .../js/conf/home/pages/dag/_source/config.js | 4 + .../js/conf/home/pages/dag/_source/dag.scss | 3 + .../pages/dag/_source/formModel/formModel.vue | 17 +- .../dag/_source/formModel/tasks/switch.vue | 223 ++++++++++++++++++ .../home/pages/dag/img/toolbar_SWITCH.png | Bin 0 -> 2987 bytes .../src/js/module/i18n/locale/en_US.js | 4 +- .../src/js/module/i18n/locale/zh_CN.js | 4 +- 7 files changed, 252 insertions(+), 3 deletions(-) create mode 100644 dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/switch.vue create mode 100644 dolphinscheduler-ui/src/js/conf/home/pages/dag/img/toolbar_SWITCH.png diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js index fb6c12308a..ce5371013c 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js @@ -308,6 +308,10 @@ const tasksType = { CONDITIONS: { desc: 'CONDITIONS', color: '#E46F13' + }, + SWITCH: { + desc: 'SWITCH', + color: '#E46F13' } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.scss b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.scss index 08f2feccbe..00dfb0001e 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.scss +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.scss @@ -113,6 +113,9 @@ .icos-CONDITIONS { background: url("../img/toolbar_CONDITIONS.png") no-repeat 50% 50%; } + .icos-SWITCH{ + background: url("../img/toolbar_SWITCH.png") no-repeat 50% 50%; + } .toolbar { width: 60px; height: 100%; diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue index 7dfcbc62bb..4da2673579 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue @@ -95,7 +95,7 @@ - +
{{$t('Delay execution time')}}
@@ -258,6 +258,13 @@ :backfill-item="backfillItem" :pre-node="nodeData.preNode"> + +
+ +
{{$t('condition')}}
+
+ +
+
+ + {{$t('Branch flow')}} + + + + + + + + + + + +
+
+
+
+ +
{{$t('Branch flow')}}
+
+ + + +
+
+
+ + + + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/img/toolbar_SWITCH.png b/dolphinscheduler-ui/src/js/conf/home/pages/dag/img/toolbar_SWITCH.png new file mode 100644 index 0000000000000000000000000000000000000000..c3066632f53540cd3f590cba3f8ec1f7490139ed GIT binary patch literal 2987 zcmaJ@c{r47A09hdvW4c%P#I7s7R8@IWKihgA*~Ec5J*CYNg@Me z!cGj0!-7**ec)j%t_TeRSz3p2DYPI40HregnQSZA+glAVD3fjl^F$Mn1g;$;faw^) zV|YZkkZ2J>G;=!4dOOrI3?m|7F#rlQj1|o0W5TRp-*_>i{pv9S2L0v&1X;oUNs3Hx zgW7R;3@93IVn{<7BcZ0|aFhws7>(KrHA13H5lA!wX<~>(VUT7RBNX)e0~1B#(fu$) zoc;G$BFhRE003MJ0wE9x;DT*%4$mKfGB-CzAdL`4Mus8}Lw-0LpoAH+`8q!sa11_; z$K(P`4ja14NTG5<0V|j&(|<}}aevaX`QO_lY8WDn!bPCq$kmd5I1&i|-<8Gs>CFd- zjDPd}pTvApIG2GSGWeWO9!)ejKb_T3T#Ox$K>;{C5{DD~ql<0<9Du_Q;BcXKc2Io+ zg~nvB+6LbM1Omp1%?BuK8p8=^1rt%gnM^tcX^KVL+u51nP0j34D7>vX-WZERW6iL( zw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ztojdI&p(5b7AO^K6`H*(9e+t#jOMpjF#j7b$4n|962#Ra%p zBjn_Fn$`YtN67$vKtn`$k*Aof76Zk^Kk)39W5 zC)Y)rlh#f3^?umOZ21x)`SNczI-8x>fxRz6;Bz{eOcbi@KgW+u^A)X$Fs{eI(PczAch&Yqc^=;lyW?% zDP5-oHA{e3g8k+S#=Y}HONV+U(SY!BXm(_r0`*a#T}uAlTPf{eRuFnhsb@S|FPgZ! z4Tbkm7cMnN&-Hb=PjqE<505nI8D36{HE}q4eza=K!uXitqd2Clxl*xI&EF@FE5~U= z6Bef{qzR2HPi-1*fyPfjix&rXo@u`IG&Sz`;|WXgK|mCPHsRBDa&NLJbvqRg|gvN zqTSgy5lU$!6T?}(z4G?4D)Tz$J`3L-A2{KmG;>2sHxoe7){(>XmOhw6^3(cyZH)| znORFvFbR7BT6tENK^#hoOS`6dQaMeAu3G4<9Hi?N@3}dBgl)IG@b~#Qnh8~k*=lTc z+^feK-NW}xbFH1SboZ+B{a$_L_kr{cNUlQhu;I@#5CQXRLhq@Tq*h~146W;c>OkM% zU3psgX^ivxy_P<$UC(o#ELGgoDds5cv`|xjB6s6U@(62q+XWek7ED}R2`QY^B0KMJ z*u@+GY7z_mXUl5p!&esG-CZ1*l^GY9!32^TT z{p3Vjqe*gwj)P0*0ZrFV4aic6>*V0zsf8OQ&C|`^^;1gDnaRREt!A21L*4HWi%EmF X)x^!rDOdKb{ysb5U2vCdeWU*aF<=i5 literal 0 HcmV?d00001 diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js index 3be86735f4..2dbdd21ad0 100755 --- a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js +++ b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js @@ -695,5 +695,7 @@ export default { 'The workflow canvas is abnormal and cannot be saved, please recreate': 'The workflow canvas is abnormal and cannot be saved, please recreate', Info: 'Info', 'Datasource userName': 'owner', - 'Resource userName': 'owner' + 'Resource userName': 'owner', + condition: 'condition', + 'The condition content cannot be empty': 'The condition content cannot be empty' } diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js index 07803e8e89..3174c132b5 100755 --- a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js +++ b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js @@ -694,5 +694,7 @@ export default { 'The workflow canvas is abnormal and cannot be saved, please recreate': '该工作流画布异常,无法保存,请重新创建', Info: '提示', 'Datasource userName': '所属用户', - 'Resource userName': '所属用户' + 'Resource userName': '所属用户', + condition: '条件', + 'The condition content cannot be empty': '条件内容不能为空' }