From bf720401334be171ed74d9fa52a58492b6601232 Mon Sep 17 00:00:00 2001 From: ysh Date: Sat, 12 Oct 2024 14:52:54 +0900 Subject: [PATCH] UI update --- ...SUGyU.js => EventListenerList-Dupg8qUb.js} | 2 +- ...ssList-DdBUFwYX.js => OssList-CPOByWxd.js} | 2 +- .../static/assets/ParamForm-B9giWwXn.css | 1 - .../static/assets/ParamForm-BnhREzMW.js | 1 + .../static/assets/ParamForm-CN6U4gcC.css | 1 + .../static/assets/ParamForm-DWXgfyBu.js | 1 - ...e_vue_type_style_index_0_lang-BirKLkfK.js} | 2 +- .../static/assets/WorkflowForm-B429BoGj.css | 1 + .../static/assets/WorkflowForm-DcXSJfCI.css | 1 - ...m-BIH4a4aC.js => WorkflowForm-DjPJAcvY.js} | 80 +++++++++---------- ...t-BeO8-nqD.js => WorkflowList-BIDvpY4c.js} | 2 +- ...EfeEn.js => WorkflowStageList-K8DpLzr0.js} | 2 +- .../resources/static/assets/index-6aZxCmbx.js | 35 -------- .../resources/static/assets/index-CzX12clX.js | 35 ++++++++ .../{oss-BY1ImqvI.js => oss-BXFdWBTr.js} | 2 +- ...equest-CKqEXO02.js => request-B7gyFUGh.js} | 2 +- src/main/resources/static/index.html | 2 +- workflowFE/src/permission.ts | 45 +++++++++++ workflowFE/src/stores/user.ts | 59 ++++++++++++++ workflowFE/src/views/type/type.ts | 2 +- .../src/views/workflow/WorkflowForm.vue | 6 +- .../views/workflow/components/ParamForm.vue | 29 ++++++- .../workflow/components/PipelineGenerator.vue | 1 + .../workflow/components/PipelineList.vue | 15 +++- 24 files changed, 232 insertions(+), 97 deletions(-) rename src/main/resources/static/assets/{EventListenerList-dh9SUGyU.js => EventListenerList-Dupg8qUb.js} (97%) rename src/main/resources/static/assets/{OssList-DdBUFwYX.js => OssList-CPOByWxd.js} (96%) delete mode 100644 src/main/resources/static/assets/ParamForm-B9giWwXn.css create mode 100644 src/main/resources/static/assets/ParamForm-BnhREzMW.js create mode 100644 src/main/resources/static/assets/ParamForm-CN6U4gcC.css delete mode 100644 src/main/resources/static/assets/ParamForm-DWXgfyBu.js rename src/main/resources/static/assets/{Tabulator.vue_vue_type_style_index_0_lang-D7_tsGwS.js => Tabulator.vue_vue_type_style_index_0_lang-BirKLkfK.js} (99%) create mode 100644 src/main/resources/static/assets/WorkflowForm-B429BoGj.css delete mode 100644 src/main/resources/static/assets/WorkflowForm-DcXSJfCI.css rename src/main/resources/static/assets/{WorkflowForm-BIH4a4aC.js => WorkflowForm-DjPJAcvY.js} (77%) rename src/main/resources/static/assets/{WorkflowList-BeO8-nqD.js => WorkflowList-BIDvpY4c.js} (95%) rename src/main/resources/static/assets/{WorkflowStageList-CDWEfeEn.js => WorkflowStageList-K8DpLzr0.js} (98%) delete mode 100644 src/main/resources/static/assets/index-6aZxCmbx.js create mode 100644 src/main/resources/static/assets/index-CzX12clX.js rename src/main/resources/static/assets/{oss-BY1ImqvI.js => oss-BXFdWBTr.js} (89%) rename src/main/resources/static/assets/{request-CKqEXO02.js => request-B7gyFUGh.js} (87%) create mode 100644 workflowFE/src/stores/user.ts diff --git a/src/main/resources/static/assets/EventListenerList-dh9SUGyU.js b/src/main/resources/static/assets/EventListenerList-Dupg8qUb.js similarity index 97% rename from src/main/resources/static/assets/EventListenerList-dh9SUGyU.js rename to src/main/resources/static/assets/EventListenerList-Dupg8qUb.js index 153183b..0656c89 100644 --- a/src/main/resources/static/assets/EventListenerList-dh9SUGyU.js +++ b/src/main/resources/static/assets/EventListenerList-Dupg8qUb.js @@ -1,4 +1,4 @@ -import{_ as B,a as V}from"./Tabulator.vue_vue_type_style_index_0_lang-D7_tsGwS.js";import{s as _}from"./request-CKqEXO02.js";import{d as $,u as C,c as W,w as S,o as D,r as v,a as b,b as e,t as E,e as N,g as I,v as M,F as q,f as A,k as R,j as Y,h as m,i as y}from"./index-6aZxCmbx.js";import{g as G,P as T}from"./ParamForm-DWXgfyBu.js";const j=()=>_.get("/eventlistener/list");function z(s){return _.get("/eventlistener/"+s)}function H(s){return _.get(`/eventlistener/duplicate?eventlistenerName=${s}`)}function J(s){return _.post("/eventlistener",s)}function K(s){return _.patch(`/eventlistener/${s.eventListenerIdx}`,s)}function O(s){return _.delete(`/eventlistener/${s}`)}const Q={class:"modal",id:"eventListenerForm",tabindex:"-1"},X={class:"modal-dialog modal-lg",role:"document"},Z={class:"modal-content"},ee=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),te={class:"modal-body text-left py-4"},se={class:"mb-5"},ne={class:"row mb-3"},ae=e("label",{class:"form-label required"},"Event Listener 명",-1),oe={class:"grid gap-0 column-gap-3"},le={key:1,class:"btn btn-success",style:{margin:"3px"}},ie={class:"mb-3"},re=e("label",{class:"form-label required"},"Event Listener 설명",-1),ce={class:"mb-3"},de=e("label",{class:"form-label required"},"Workflow",-1),ve=e("option",{value:0},"Select Workflow",-1),ue=["value"],me={class:"modal-footer"},fe=$({__name:"eventListenerForm",props:{mode:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(s,{emit:p}){const o=C(),l=s,u=p,g=W(()=>l.eventListenerIdx);S(g,async()=>{await f(),await L()}),D(async()=>{await f(),await L()});const t=v({}),c=v(!1),f=async()=>{if(l.mode==="new")t.value.eventListenerName="",t.value.eventListenerDesc="",t.value.workflowIdx=0,t.value.workflowParams=[],w.value=!1,c.value=!0;else{const{data:n}=await z(l.eventListenerIdx);t.value=n,w.value=!0,c.value=!0}},k=v([]),L=async()=>{const{data:n}=await G("N");k.value=n},w=v(!1),r=async()=>{const{data:n}=await H(t.value.eventListenerName);n?o.error("이미 사용중인 이름입니다."):(o.success("사용 가능한 이름입니다."),w.value=!0)},d=async()=>{l.mode==="new"?(t.value.workflowParams.forEach(n=>{n.paramIdx=0,n.eventListenerYn="Y"}),await h().then(()=>{u("get-event-listener-list")})):await x().then(()=>{u("get-event-listener-list")}),f()},h=async()=>{const{data:n}=await J(t.value);n?o.success("등록되었습니다."):o.error("등록 할 수 없습니다.")},x=async()=>{const{data:n}=await K(t.value);n?o.success("등록되었습니다."):o.error("등록 할 수 없습니다.")},F=()=>{w.value=!1},U=n=>{k.value.forEach(a=>{a.workflowInfo.workflowIdx===n&&(t.value.workflowParams=a.workflowParams)})};return(n,a)=>(m(),b("div",Q,[e("div",X,[e("div",Z,[ee,e("div",te,[e("h3",se," Event Listener "+E(l.mode==="new"?"생성":"수정"),1),e("div",null,[e("div",ne,[ae,e("div",oe,[N(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Event Listener 명을 입력하세요","onUpdate:modelValue":a[0]||(a[0]=i=>t.value.eventListenerName=i),onFocus:F},null,544),[[I,t.value.eventListenerName]]),w.value?(m(),b("button",le,"중복 체크")):(m(),b("button",{key:0,class:"btn btn-primary chk",onClick:r,style:{margin:"3px"}},"중복 체크"))])]),e("div",ie,[re,N(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Event Listener 설명을 입력하세요","onUpdate:modelValue":a[1]||(a[1]=i=>t.value.eventListenerDesc=i)},null,512),[[I,t.value.eventListenerDesc]])]),e("div",ce,[de,N(e("select",{class:"form-select p-2 g-col-12","onUpdate:modelValue":a[2]||(a[2]=i=>t.value.workflowIdx=i),onChange:a[3]||(a[3]=i=>U(t.value.workflowIdx))},[ve,(m(!0),b(q,null,A(k.value,(i,P)=>(m(),b("option",{value:i.workflowInfo.workflowIdx,key:P},E(i.workflowInfo.workflowName),9,ue))),128))],544),[[M,t.value.workflowIdx]])]),c.value?(m(),R(T,{key:0,popup:!1,"workflow-param-data":t.value.workflowParams,"event-listener-yn":"Y",style:{margin:"0 !important"}},null,8,["workflow-param-data"])):Y("",!0)])]),e("div",me,[e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:a[4]||(a[4]=i=>f())}," Cancel "),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:a[5]||(a[5]=i=>d())},E(l.mode==="new"?"생성":"수정"),1)])])])]))}}),we={class:"modal",id:"deleteEventListener",tabindex:"-1"},be={class:"modal-dialog modal-lg",role:"document"},Le={class:"modal-content"},_e=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),pe=e("div",{class:"modal-status bg-danger"},null,-1),ge={class:"modal-body text-left py-4"},ke=e("h3",{class:"mb-5"}," Event Listener 삭제 ",-1),he={class:"modal-footer"},ye=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1),Ee=$({__name:"deleteEventListener",props:{eventListenerName:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(s,{emit:p}){const o=C(),l=s,u=p,g=async()=>{const{data:t}=await O(l.eventListenerIdx);t?o.success("삭제되었습니다."):o.error("삭제하지 못했습니다."),u("get-event-listener-list")};return(t,c)=>(m(),b("div",we,[e("div",be,[e("div",Le,[_e,pe,e("div",ge,[ke,e("h4",null,E(l.eventListenerName)+"을(를) 정말 삭제하시겠습니까?",1)]),e("div",he,[ye,e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:c[0]||(c[0]=f=>g())}," 삭제 ")])])])]))}}),xe={class:"card card-flush w-100"},De=$({__name:"EventListenerList",setup(s){const p=C(),o=v([]),l=v([]);D(async()=>{f(),await u()});const u=async()=>{try{const{data:r}=await j();o.value=r,o.value.forEach(d=>{d.eventListenerUrl=g(d.eventListenerCallUrl)})}catch(r){console.log(r),p.error("데이터를 가져올 수 없습니다.")}},g=r=>window.location.origin+r,t=v(0),c=v(""),f=()=>{l.value=[{title:"Event Listener Name",field:"eventListenerName",width:"20%"},{title:"Connect Workflow Name",field:"workflowName",width:"20%"},{title:"Event Listener Desc",field:"eventListenerDesc",width:"20%"},{title:"Action URL",field:"eventListenerUrl",width:"20%"},{title:"Action",width:"20%",formatter:k,cellClick:function(r,d){const h=r.target,x=h==null?void 0:h.getAttribute("id");t.value=d.getRow().getData().eventListenerIdx,x==="edit-btn"?L.value="edit":c.value=d.getRow().getData().eventListenerName}}]},k=()=>` +import{_ as B,a as V}from"./Tabulator.vue_vue_type_style_index_0_lang-BirKLkfK.js";import{s as _}from"./request-B7gyFUGh.js";import{d as $,u as C,c as W,w as S,o as D,r as v,a as b,b as e,t as E,e as N,g as I,v as M,F as q,f as A,k as R,j as Y,h as m,i as y}from"./index-CzX12clX.js";import{g as G,P as T}from"./ParamForm-BnhREzMW.js";const j=()=>_.get("/eventlistener/list");function z(s){return _.get("/eventlistener/"+s)}function H(s){return _.get(`/eventlistener/duplicate?eventlistenerName=${s}`)}function J(s){return _.post("/eventlistener",s)}function K(s){return _.patch(`/eventlistener/${s.eventListenerIdx}`,s)}function O(s){return _.delete(`/eventlistener/${s}`)}const Q={class:"modal",id:"eventListenerForm",tabindex:"-1"},X={class:"modal-dialog modal-lg",role:"document"},Z={class:"modal-content"},ee=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),te={class:"modal-body text-left py-4"},se={class:"mb-5"},ne={class:"row mb-3"},ae=e("label",{class:"form-label required"},"Event Listener 명",-1),oe={class:"grid gap-0 column-gap-3"},le={key:1,class:"btn btn-success",style:{margin:"3px"}},ie={class:"mb-3"},re=e("label",{class:"form-label required"},"Event Listener 설명",-1),ce={class:"mb-3"},de=e("label",{class:"form-label required"},"Workflow",-1),ve=e("option",{value:0},"Select Workflow",-1),ue=["value"],me={class:"modal-footer"},fe=$({__name:"eventListenerForm",props:{mode:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(s,{emit:p}){const o=C(),l=s,u=p,g=W(()=>l.eventListenerIdx);S(g,async()=>{await f(),await L()}),D(async()=>{await f(),await L()});const t=v({}),c=v(!1),f=async()=>{if(l.mode==="new")t.value.eventListenerName="",t.value.eventListenerDesc="",t.value.workflowIdx=0,t.value.workflowParams=[],w.value=!1,c.value=!0;else{const{data:n}=await z(l.eventListenerIdx);t.value=n,w.value=!0,c.value=!0}},k=v([]),L=async()=>{const{data:n}=await G("N");k.value=n},w=v(!1),r=async()=>{const{data:n}=await H(t.value.eventListenerName);n?o.error("이미 사용중인 이름입니다."):(o.success("사용 가능한 이름입니다."),w.value=!0)},d=async()=>{l.mode==="new"?(t.value.workflowParams.forEach(n=>{n.paramIdx=0,n.eventListenerYn="Y"}),await h().then(()=>{u("get-event-listener-list")})):await x().then(()=>{u("get-event-listener-list")}),f()},h=async()=>{const{data:n}=await J(t.value);n?o.success("등록되었습니다."):o.error("등록 할 수 없습니다.")},x=async()=>{const{data:n}=await K(t.value);n?o.success("등록되었습니다."):o.error("등록 할 수 없습니다.")},F=()=>{w.value=!1},U=n=>{k.value.forEach(a=>{a.workflowInfo.workflowIdx===n&&(t.value.workflowParams=a.workflowParams)})};return(n,a)=>(m(),b("div",Q,[e("div",X,[e("div",Z,[ee,e("div",te,[e("h3",se," Event Listener "+E(l.mode==="new"?"생성":"수정"),1),e("div",null,[e("div",ne,[ae,e("div",oe,[N(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Event Listener 명을 입력하세요","onUpdate:modelValue":a[0]||(a[0]=i=>t.value.eventListenerName=i),onFocus:F},null,544),[[I,t.value.eventListenerName]]),w.value?(m(),b("button",le,"중복 체크")):(m(),b("button",{key:0,class:"btn btn-primary chk",onClick:r,style:{margin:"3px"}},"중복 체크"))])]),e("div",ie,[re,N(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Event Listener 설명을 입력하세요","onUpdate:modelValue":a[1]||(a[1]=i=>t.value.eventListenerDesc=i)},null,512),[[I,t.value.eventListenerDesc]])]),e("div",ce,[de,N(e("select",{class:"form-select p-2 g-col-12","onUpdate:modelValue":a[2]||(a[2]=i=>t.value.workflowIdx=i),onChange:a[3]||(a[3]=i=>U(t.value.workflowIdx))},[ve,(m(!0),b(q,null,A(k.value,(i,P)=>(m(),b("option",{value:i.workflowInfo.workflowIdx,key:P},E(i.workflowInfo.workflowName),9,ue))),128))],544),[[M,t.value.workflowIdx]])]),c.value?(m(),R(T,{key:0,popup:!1,"workflow-param-data":t.value.workflowParams,"event-listener-yn":"Y",style:{margin:"0 !important"}},null,8,["workflow-param-data"])):Y("",!0)])]),e("div",me,[e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:a[4]||(a[4]=i=>f())}," Cancel "),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:a[5]||(a[5]=i=>d())},E(l.mode==="new"?"생성":"수정"),1)])])])]))}}),we={class:"modal",id:"deleteEventListener",tabindex:"-1"},be={class:"modal-dialog modal-lg",role:"document"},Le={class:"modal-content"},_e=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),pe=e("div",{class:"modal-status bg-danger"},null,-1),ge={class:"modal-body text-left py-4"},ke=e("h3",{class:"mb-5"}," Event Listener 삭제 ",-1),he={class:"modal-footer"},ye=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1),Ee=$({__name:"deleteEventListener",props:{eventListenerName:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(s,{emit:p}){const o=C(),l=s,u=p,g=async()=>{const{data:t}=await O(l.eventListenerIdx);t?o.success("삭제되었습니다."):o.error("삭제하지 못했습니다."),u("get-event-listener-list")};return(t,c)=>(m(),b("div",we,[e("div",be,[e("div",Le,[_e,pe,e("div",ge,[ke,e("h4",null,E(l.eventListenerName)+"을(를) 정말 삭제하시겠습니까?",1)]),e("div",he,[ye,e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:c[0]||(c[0]=f=>g())}," 삭제 ")])])])]))}}),xe={class:"card card-flush w-100"},De=$({__name:"EventListenerList",setup(s){const p=C(),o=v([]),l=v([]);D(async()=>{f(),await u()});const u=async()=>{try{const{data:r}=await j();o.value=r,o.value.forEach(d=>{d.eventListenerUrl=g(d.eventListenerCallUrl)})}catch(r){console.log(r),p.error("데이터를 가져올 수 없습니다.")}},g=r=>window.location.origin+r,t=v(0),c=v(""),f=()=>{l.value=[{title:"Event Listener Name",field:"eventListenerName",width:"20%"},{title:"Connect Workflow Name",field:"workflowName",width:"20%"},{title:"Event Listener Desc",field:"eventListenerDesc",width:"20%"},{title:"Action URL",field:"eventListenerUrl",width:"20%"},{title:"Action",width:"20%",formatter:k,cellClick:function(r,d){const h=r.target,x=h==null?void 0:h.getAttribute("id");t.value=d.getRow().getData().eventListenerIdx,x==="edit-btn"?L.value="edit":c.value=d.getRow().getData().eventListenerName}}]},k=()=>`
-
+ { setMode() setWorkflowFormData() - setWorkflowPurposeList() setOssInfo() + setWorkflowPurposeList() }) // ================================================================================= 모드 set diff --git a/workflowFE/src/views/workflow/components/ParamForm.vue b/workflowFE/src/views/workflow/components/ParamForm.vue index 793fb7a..766f52b 100644 --- a/workflowFE/src/views/workflow/components/ParamForm.vue +++ b/workflowFE/src/views/workflow/components/ParamForm.vue @@ -11,14 +11,22 @@ type="text" placeholder="Key" v-model="paramColum.paramKey" - :disabled="props.popup"> + :disabled="props.popup || + paramColum.paramKey.toUpperCase() === 'MCI' || + paramColum.paramKey.toUpperCase() === 'CLUSTER' || + paramColum.paramKey.toUpperCase() === 'NAMESPACE'" + @blur="inputData(idx)"> - + v-model="paramColum.paramValue" + :disabled=" + paramColum.paramKey === 'MCI' || + paramColum.paramKey === 'CLUSTER' || + paramColum.paramKey === 'NAMESPACE'"> +