PageSourceSearch

https://datasuite.fptcloud.com/assets/PipelineTemplateList-BFyIcriy.js

js fptcloud.com collected 2026-09-24 10:11:26 UTC 8,869 bytes, 1 lines download raw bytes

1import{r as x,j as e}from"./react-DJo-hRcj.js";import{D as X}from"./index-CFSyW3hy.js";import{C as Z}from"./index-Gqr0dw3K.js";import{H as J}from"./index-DbgK0TD7.js";import{k as K,k0 as ee,k1 as N,a as k,m as te,r as ie,B as ne,g as H,aj as se,X as oe,S as M,T as w,I as re,j as ae,E as b,a6 as le,b as ce,P as pe,h as de}from"./index-HmRGQEHV.js";import{_ as y,ak as ue,S as me}from"./lodash-5mjDUwsr.js";import{P as Ee}from"./PipelineTemplateHelmet-P7GEJ2mu.js";import{bd as G,b_ as z,bq as Te,bU as D,bc as h,an as v,I as L,c8 as f}from"./vendors-D9FTVJXp.js";import{a as I}from"./toastifyV2-ajHTjSAj.js";import{P as Pe}from"./PipelineTemplateRepository-Bwf6OphS.js";import{S as B}from"./index-CcFATZH7.js";import{L as Ie}from"./Link-CsLQZn-K.js";import{a as U}from"./TimeManager-DGDs3kUD.js";import{D as ge}from"./DotVertical-pQksgbXA.js";import{M as O}from"./index-CwKUy3Cw.js";import{E as xe}from"./Edit-Blbz8Uv9.js";import{C as he}from"./CaretRight-BOmNCn-e.js";import{u as Le}from"./useButtonEnabled-B29iwl3B.js";import{D as fe}from"./DAGRepository-hh7WeSg4.js";import{ar as Ae,aj as j,an as S,aq as Ce}from"./mui-core-CIySj9_k.js";import{u as _e,D as Se,P as Ne}from"./type-DaA-6JV9.js";import{P as V}from"./PipelineStatus-DqQ7ZHr_.js";import{L as je}from"./Layout-lHkxg3IM.js";import{w as Re}from"./withSuspense-B-VWLJlr.js";import{P as ke}from"./Plus-C9bmOFUl.js";import"./mui-x-BIGgJFSO.js";import"./useCheckPermissionSidebar-D3ccSZS-.js";import"./Project-DlhDQHoA.js";import"./index-QNzS2lw3.js";import"./useUrlParams-BXmEcjdH.js";import"./index-d7XnxQEx.js";import"./ModalV2-B3Lw--tU.js";import"./Search-B65Y6qYp.js";import"./LocalStorageManager-DIHYtoBS.js";import"./org-switch-rules-CALv74Cz.js";import"./DashboardQueryRepository-rzvXeoKZ.js";import"./Search-DN2UMn43.js";import"./Building-D1EpsYc0.js";import"./Check-CB4u6cLS.js";import"./languageManager-kFJuVfzY.js";import"./SharedComponents-R9XUbcB5.js";import"./LocalStorageManager-Cf9EMmua.js";import"./constants-BhQb0AAi.js";import"./getHttpStatusCode-D6Fy-dO9.js";import"./getTenantId-BCRwxyc4.js";import"./LogoSkeleton-xtVwDN2G.js";import"./index-Bv-w_pZ0.js";function Me(r){const[o,c]=x.useState([]),[l,p]=x.useState(0),{tenantId:s,workspaceId:t,paginationModel:n}=r,a=G(),u=z(),E=new Pe({queryClient:u}),{data:m,isError:T,isLoading:A}=Te({...E.getPipelineTemplates({workspaceId:t,page:n.page,pageSize:n.pageSize}),enabled:!!t,keepPreviousData:!0}),{mutate:C}=D(i=>k.post("/v1/pipeline-executions/trigger",i),{onSuccess:i=>{const d=i?.data?.data;if(d&&d.dag_run_id){const _=h(N,{tenantId:s,projectId:t,pipelineReleaseId:d.dag_id});a.push(_)}I.success()},onError:i=>{v.isAxiosError(i)?I.error({title:i.response?.data?.message||i.message}):I.error({title:"error"})}}),{mutate:g}=D(i=>k.post("/v1/pipeline-executions/auto-trigger",i),{onSuccess:()=>{I.success()},onError:i=>{v.isAxiosError(i)?I.error({title:i.response?.data?.message||i.message}):I.error({title:"error"})}});return x.useEffect(()=>{const i=y(m,"data.data.rows",[]),d=y(m,"data.data.totalRow",0),_=i.map(R=>{const{pipelineChart:F}=R,{dataModelType:$="",dataSourceType:W,name:Y=""}=F||{},{name:q=""}=$||{},{name:Q=""}=W||{};return{...R,dataModelTypeName:q,dataSourceTypeName:Q,pipelineChartName:Y}});c(_),p(d)},[m]),{pipelineReleases:o,totalPipelineRelease:l,isLoading:A,isError:T,onClickEdit:i=>{const d=h(N,{tenantId:s,projectId:t,pipelineReleaseId:i});a.push(d)},onClickViewIntroduction:i=>{const d=h(ee,{tenantId:s,projectId:t,pipelineReleaseId:i});a.push(d)},onClickTrigger:i=>{K({eventName:ie.PIPELINE_RUN,eventType:te["click-button"],tenantId:s,workspaceId:t,properties:{pipelineReleaseId:i}}),C({pipelineReleaseId:String(i),workspaceId:t})},onClickAutoTrigger:({pipelineReleaseId:i,isAuto:d})=>{g({pipelineReleaseId:i,workspaceId:t,isAuto:d})}}}function we({params:r,onAction:o,projectId:c}){const{t:l}=L(),[p,s]=x.useState(null),t=(m,T)=>{s({el:m.currentTarget,id:T})},n=()=>{s(null)},a=z(),u=new fe({queryClient:a}),{isEnabled:E}=Le({intervalMs:0,...u.getDagInfo({pipelineReleaseId:r.row.id||"",workspaceId:c})});return e.jsxs(e.Fragment,{children:[e.jsx(ne,{sx:{cursor:"pointer"},onClick:m=>t(m,r.row.id),children:e.jsx(ge,{sx:{width:16,height:16,color:H.ic.normal.tertiary}})}),e.jsxs(Ae,{anchorEl:p?.el,open:r.row.id===p?.id,onClose:n,anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"},children:[e.jsx(j,{title:l("PIPELINE_TEMPLATE.TABLE.VIEW_DETAIL"),children:e.jsx("span",{children:e.jsx(O,{icon:e.jsx(xe,{}),text:l("PIPELINE_TEMPLATE.TABLE.VIEW_DETAIL"),onClick:()=>{o("edit",r.row),n()}})})}),e.jsx(j,{title:l(E?"PIPELINE_TEMPLATE.TABLE.TRIGGER_RUN":"PIPELINE_TEMPLATE.TOOLTIP_ACTION_DISABLED"),children:e.jsx("span",{children:e.jsx(O,{icon:e.jsx(he,{}),text:l("PIPELINE_TEMPLATE.TABLE.TRIGGER_RUN"),onClick:()=>{o("manual-trigger",r.row),n()},sx:{pointerEvents:E?void 0:"none"}})})})]})]})}const be=({onAction:r})=>{const{t:o}=L(),{projectId:c,tenantId:l}=f(),p=_e();return[{field:"PipelineName",headerName:o("PIPELINE_TEMPLATE.TABLE.PIPELINE_NAME")||"Pipeline Name",flex:1,renderCell:s=>{const{row:t}=s,{pipelineValue:n,status:a}=t,{name:u=""}=n||{},E=a===V.DONE_SETUP?N:oe;return e.jsx(Ie,{style:{color:se.main.primary},to:h(E,{tenantId:l,projectId:c,pipelineReleaseId:t.id}),underline:"none",children:u})}},{field:"Status",headerName:o("PIPELINE_TEMPLATE.TABLE.STATUS")||"Status",flex:1,renderCell:s=>{const{row:t}=s,{status:n}=t,a=n===V.DONE_SETUP?"success":"warning";return e.jsx(M,{height:"100%",children:e.jsx(B,{status:a,text:o(`PIPELINE_TEMPLATE.TABLE.STATUS_DES.${n?.toUpperCase()}`)})})}},{field:"Schedule",headerName:o("PIPELINE_TEMPLATE.TABLE.SCHEDULE")||"Schedule",flex:1,renderCell:s=>{const{row:t}=s,{pipelineValue:n}=t,{cronPattern:a=""}=n||{},u=ue(p,{value:a});return e.jsx(w,{variant:"bodySmRegular",children:u?.label||a})}},{field:"lastedRunStatus",headerName:o("PIPELINE_TEMPLATE.TABLE.LASTED_RUN_TIME")||"L
1astest Run",flex:1,renderCell:s=>{const{row:t}=s,{lastedRunTime:n,lastedRunStatus:a}=t;return e.jsx(M,{height:"100%",children:a&&e.jsx(B,{status:a,text:U(n,"DD/MM/YY HH:mm:ss")})})}},{field:"nextRunTime",headerName:o("PIPELINE_TEMPLATE.TABLE.NEXT_RUN_TIME")||"Next Run",flex:1,renderCell:s=>{const{row:t}=s,{nextRunTime:n}=t;return e.jsx(w,{variant:"bodySmRegular",children:U(n,"DD/MM/YY HH:mm:ss")})}},{field:"createdUser",headerName:o("PIPELINE_TEMPLATE.TABLE.CREATED_BY")||"Created By",flex:1},{field:"action",headerName:o("actions"),align:"center",width:100,sortable:!1,renderCell:s=>e.jsx(we,{params:s,onAction:r,projectId:c})}]};function ye(){const{t:r}=L(),o=G(),{projectId:c,tenantId:l}=f(),p=()=>{o.push(`/tenant/${l}/project/${c}/pipeline-release/create`)};return e.jsx(j,{title:r("PIPELINE_TEMPLATE.CREATE_TOOLTIP")||"Pipeline creation is coming soon. Use Report Template and generate its built-in Pipeline instead.",placement:"left-start",children:e.jsx("span",{style:{display:"inline-block",cursor:"not-allowed"},children:e.jsx(re,{text:r("PIPELINE_TEMPLATE.CREATE"),size:"md",variant:"primary",icon:e.jsx(ke,{size:"sm"}),disabled:!0,onClick:p})})})}function De(){const{t:r}=L(),{tenantId:o,projectId:c}=f(),l=10,[p,s]=x.useState({page:Se,pageSize:l}),{pipelineReleases:t,totalPipelineRelease:n,isLoading:a,onClickEdit:u,onClickViewIntroduction:E,onClickTrigger:m,onClickAutoTrigger:T}=Me({tenantId:o,workspaceId:c,paginationModel:p}),A=g=>{s(g)},C=(g,P)=>{switch(g){case"edit":{u(P.id);break}case"view-introduction":{E(P.id);break}case"disable-auto-trigger":{T({pipelineReleaseId:P.id,isAuto:!1});break}case"enable-auto-trigger":{T({pipelineReleaseId:P.id,isAuto:!0});break}case"manual-trigger":{m(P.id);break}}};return e.jsxs(je,{children:[e.jsx(Ee,{title:r("PIPELINE_TEMPLATE.TITLE")}),e.jsx(Z,{header:e.jsxs(Ce,{direction:"row",spacing:2,alignItems:"center",children:[e.jsx(S,{flex:1,children:e.jsx(J,{title:r("PIPELINE_TEMPLATE.TITLE"),description:r("PIPELINE_TEMPLATE.DESCRIPTION")})}),e.jsx(ye,{})]}),content:e.jsx(S,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:e.jsx(S,{sx:{bgcolor:H.bg.surface.main,borderRadius:de.large,flexGrow:1,minHeight:0},children:e.jsx(X,{loading:a,columns:be({onAction:C}),rows:t||[],rowCount:n,pagination:!0,paginationMode:"server",initialState:{pinnedColumns:{right:["action"]}},pageSizeOptions:Ne,paginationModel:p,onPaginationModelChange:A,disableColumnFilter:!0,disableColumnMenu:!0,hideFooterSelectedRowCount:!0,disableColumnResize:!0,rowHeight:48})})})})]})}function ve(){const{tenantId:r,projectId:o}=f(),{state:c}=ae(),{tenants:l=[]}=c,p=l.map(n=>n.id);return!me(c)&&!p.includes(Number(r))?e.jsx(b,{}):l.find(n=>n.id===Number(r))?.isPrivate||!1?e.jsx(b,{}):e.jsx(le,{customKey:`data-pipeline-list-workspace_${o}`,action:pe.data_model["read-data_model"],subject:{name:ce.workspace,id:o},children:e.jsx(De,{})})}const bt=Re()(ve);export{bt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.