All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web.8376.d6bdc6893155a2b0.js Maven / Gradle / Ivy

"use strict";(self.webpackChunkflink=self.webpackChunkflink||[]).push([[8376],{97526:(N,M,i)=>{i.d(M,{E:()=>w});var f=i(77579),v=i(94650);let w=(()=>{class x{constructor(){this.resize$=new f.x}resize(){this.resize$.next()}}return x.\u0275fac=function(u){return new(u||x)},x.\u0275prov=v.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})()},28376:(N,M,i)=>{i.r(M),i.d(M,{JOB_OVERVIEW_ROUTES:()=>fe});var f=i(37340),v=i(19132),w=i(77579),x=i(39841),O=i(54004),u=i(82722),J=i(60006),g=i(85336),h=i(21102),e=i(94650),p=i(47932),m=i(97526);let d=(()=>{class o{constructor(t,n,s,a,c){this.activatedRoute=t,this.router=n,this.jobLocalService=s,this.jobChartService=a,this.moduleConfig=c,this.listOfNavigation=[],this.fullScreen=!1,this.destroy$=new w.x,this.listOfNavigation=c.routerTabs||g.C.routerTabs,this.cachePath=this.listOfNavigation[0]?.path}ngOnInit(){const t=this.activatedRoute.params.pipe((0,O.U)(n=>n.vertexId));(0,x.a)([this.jobLocalService.jobDetailChanges().pipe((0,O.U)(n=>n.plan.nodes)),t]).pipe((0,u.R)(this.destroy$)).subscribe(([n,s])=>{this.activatedRoute.firstChild?this.cachePath=this.activatedRoute.firstChild.snapshot.data.path:this.router.navigate([this.cachePath],{relativeTo:this.activatedRoute}).then(),n&&s&&this.jobLocalService.setSelectedVertex(n.find(a=>a.id===s)||null)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.jobLocalService.setSelectedVertex(null)}closeDrawer(){this.fullScreen?(this.fullScreen=!1,this.jobChartService.resize()):this.router.navigate(["../../"],{relativeTo:this.activatedRoute}).then()}fullDrawer(){this.fullScreen=!0,this.jobChartService.resize()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(v.gz),e.Y36(v.F0),e.Y36(p.R),e.Y36(m.E),e.Y36(g.s))},o.\u0275cmp=e.Xpm({type:o,selectors:[["flink-job-overview-drawer"]],hostVars:3,hostBindings:function(t,n){2&t&&(e.d8E("@drawer",void 0),e.ekj("full-width",n.fullScreen))},standalone:!0,features:[e.jDz],decls:7,vars:2,consts:[[3,"listOfNavigation","size"],[1,"drawer-content"],[1,"handler","close",3,"click"],["nz-icon","","nzType","right"],[1,"handler","full",3,"click"],["nz-icon","","nzType","left"]],template:function(t,n){1&t&&(e._UZ(0,"flink-navigation",0),e.TgZ(1,"div",1),e._UZ(2,"router-outlet"),e.qZA(),e.TgZ(3,"a",2),e.NdJ("click",function(){return n.closeDrawer()}),e._UZ(4,"i",3),e.qZA(),e.TgZ(5,"a",4),e.NdJ("click",function(){return n.fullDrawer()}),e._UZ(6,"i",5),e.qZA()),2&t&&e.Q6J("listOfNavigation",n.listOfNavigation)("size","small")},dependencies:[J.J,v.lC,h.PV,h.Ls],styles:[".handler[_ngcontent-%COMP%]{position:absolute;top:50%;z-index:2;display:block;padding:12px 0;border:1px solid #f0f0f0;background:#fafafa;font-size:14px;transform:translateY(-50%)}.handler.close[_ngcontent-%COMP%]{left:-16px;margin-top:-25px}.handler.full[_ngcontent-%COMP%]{left:-16px;margin-top:25px}.handler[_ngcontent-%COMP%]:hover{background:#1890ff;color:#fff}[_nghost-%COMP%]{position:absolute;top:0;right:0;z-index:10;display:block;width:60%;height:100%;border-left:solid 1px #f0f0f0;background:#fff}.full-width[_nghost-%COMP%]{width:100%;border-left:none}.full-width[_nghost-%COMP%]   .handler.close[_ngcontent-%COMP%]{left:-1px}.full-width[_nghost-%COMP%]   .handler.full[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]     .ant-tabs-bar{margin:0}[_nghost-%COMP%]     .ant-tabs-tab:first-of-type{margin:0 0 0 16px}.drawer-content[_ngcontent-%COMP%]{overflow:auto;height:calc(100% - 38px)}"],data:{animation:[(0,f.X$)("drawer",[(0,f.eR)("void => *",[(0,f.oB)({transform:"translateX(100%)"}),(0,f.jt)(100,(0,f.oB)({transform:"translateX(0)"}))]),(0,f.eR)("* => void",[(0,f.oB)({transform:"translateX(0)"}),(0,f.jt)(100,(0,f.oB)({transform:"translateX(100%)"}))])])]},changeDetection:0}),o})();var r=i(36895),C=i(4128),S=i(39646),U=i(39300),F=i(95577),R=i(70262),k=i(29088),E=i(54968),A=i(7963);const I=["trigger"];var Z=(()=>{return(o=Z||(Z={})).Vertical="vertical",o.Horizontal="horizontal",Z;var o})();let D=(()=>{class o{constructor(t){this.document=t,this.destroy$=new w.x,this.isMoving=!1,this.left=0,this.top=0,this.resizeMin=0,this.mode=Z.Vertical,this.leftChange=new e.vpe,this.topChange=new e.vpe,this.resizeEnd=new e.vpe}startMove(){this.isMoving=!0}getResizeTop(t){const s=(z=>{let P=0;do{(0,A.k)(z.offsetTop)||(P+=z.offsetTop)}while(z=z.offsetParent);return P})(this.baseElement.nativeElement);let c=t.pageY-s;return c>900&&(c=900),c{let P=0;do{(0,A.k)(z.offsetLeft)||(P+=z.offsetLeft)}while(z=z.offsetParent);return P})(this.baseElement.nativeElement),a=this.baseElement.nativeElement.getBoundingClientRect().width-200;let c=t.pageX-s;return c>a&&(c=a),c{this.isMoving=!1,t.target===this.trigger.nativeElement&&(t.stopPropagation(),this.resizeEnd.emit({left:this.left,top:this.top}))}),(0,E.R)(this.document,"mousemove").pipe((0,u.R)(this.destroy$)).subscribe(t=>{!this.isMoving||(t.preventDefault(),this.mode===Z.Vertical?(this.left=this.getResizeLeft(t),this.leftChange.emit(this.left)):(this.top=this.getResizeTop(t),this.topChange.emit(this.top)))})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(r.K0))},o.\u0275cmp=e.Xpm({type:o,selectors:[["flink-resize"]],viewQuery:function(t,n){if(1&t&&e.Gf(I,7),2&t){let s;e.iGM(s=e.CRH())&&(n.trigger=s.first)}},inputs:{left:"left",top:"top",baseElement:"baseElement",resizeMin:"resizeMin",mode:"mode"},outputs:{leftChange:"leftChange",topChange:"topChange",resizeEnd:"resizeEnd"},standalone:!0,features:[e.jDz],decls:4,vars:12,consts:[[1,"resize",3,"mousedown"],["trigger",""],[1,"resize-handle"],["nz-icon","","nzType","ellipsis"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0,1),e.NdJ("mousedown",function(){return n.startMove()}),e.TgZ(2,"div",2),e._UZ(3,"i",3),e.qZA()()),2&t&&(e.Udp("left","vertical"===n.mode?n.left:0,"px")("top","vertical"===n.mode?0:n.top,"px"),e.ekj("vertical","vertical"===n.mode)("horizontal","horizontal"===n.mode),e.xp6(2),e.ekj("horizontal","horizontal"===n.mode)("vertical","vertical"===n.mode))},dependencies:[h.PV,h.Ls],styles:[".resize[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:10;background:transparent}.resize.vertical[_ngcontent-%COMP%]{width:7px;height:100%;border-left:1px solid #f0f0f0;cursor:col-resize}.resize.horizontal[_ngcontent-%COMP%]{width:100%;height:7px;cursor:row-resize;transform:translateY(-3.5px)}.resize-handle[_ngcontent-%COMP%]{position:relative;top:-2px;left:50%;width:30px;height:10px;margin-right:15px;border:1px solid #e8e8e8;border-radius:2px;background:#fbfbfb;line-height:10px;text-align:center;pointer-events:none}.resize-handle.vertical[_ngcontent-%COMP%]{top:50%;left:auto;margin-top:-15px;margin-right:auto;margin-left:5px;transform:rotate(90deg);transform-origin:left top}.resize-handle[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{position:relative;top:-2px}"],changeDetection:0}),o})();var $=i(46470),B=i(42455),W=i(82315),Q=i(27304),Y=i(30500),K=i(70048),y=i(66616),b=i(6675),j=i(37570),V=i(22679),G=i(47044),H=i(21811);function X(o,l){1&o&&(e.TgZ(0,"th",11),e._uU(1,"Scale"),e.qZA())}function _(o,l){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"humanizeBytes"),e.qZA()),2&o){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.lcZ(2,1,t.detail.metrics["read-bytes"])," ")}}function q(o,l){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&o){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,t.detail.metrics["read-records"],"1.0-0")," ")}}function ee(o,l){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"humanizeBytes"),e.qZA()),2&o){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.lcZ(2,1,t.detail.metrics["write-bytes"])," ")}}function te(o,l){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&o){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,t.detail.metrics["write-records"],"1.0-0")," ")}}function ne(o,l){if(1&o&&(e.TgZ(0,"span")(1,"b"),e._UZ(2,"i",21),e._uU(3),e.qZA()()),2&o){const t=e.oxw().$implicit,n=e.oxw();e.xp6(3),e.hij(" ",n.desiredParallelism.get(t.id)," ")}}function ie(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"td",18)(1,"nz-button-group")(2,"button",22),e.NdJ("click",function(s){e.CHM(t);const a=e.oxw().$implicit;return e.oxw().clickScaleUp(a),e.KtG(s.stopPropagation())}),e._UZ(3,"span",23),e.qZA(),e.TgZ(4,"button",22),e.NdJ("click",function(s){e.CHM(t);const a=e.oxw().$implicit;return e.oxw().clickScaleDown(a),e.KtG(s.stopPropagation())}),e._UZ(5,"span",24),e.qZA()()()}}function oe(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"tr",12),e.NdJ("click",function(){const a=e.CHM(t).$implicit,c=e.oxw();return e.KtG(c.clickNode(a))}),e.TgZ(1,"td",13)(2,"a",14),e._uU(3),e.qZA()(),e.TgZ(4,"td"),e._UZ(5,"flink-job-badge",15),e.qZA(),e.TgZ(6,"td"),e.YNc(7,_,3,3,"span",16),e.qZA(),e.TgZ(8,"td"),e.YNc(9,q,3,4,"span",16),e.qZA(),e.TgZ(10,"td"),e.YNc(11,ee,3,3,"span",16),e.qZA(),e.TgZ(12,"td"),e.YNc(13,te,3,4,"span",16),e.qZA(),e.TgZ(14,"td")(15,"span"),e._uU(16),e.qZA(),e.YNc(17,ne,4,1,"span",17),e.qZA(),e.TgZ(18,"td"),e._uU(19),e.ALo(20,"humanizeDate"),e.qZA(),e.TgZ(21,"td"),e._uU(22),e.ALo(23,"humanizeDuration"),e.qZA(),e.TgZ(24,"td"),e._uU(25),e.ALo(26,"humanizeDate"),e.qZA(),e.TgZ(27,"td",18),e._UZ(28,"flink-task-badge",19),e.qZA(),e.YNc(29,ie,6,0,"td",20),e.qZA()}if(2&o){const t=l.$implicit,n=e.oxw(),s=e.MAs(31);e.ekj("selected",(null==n.selectedNode?null:n.selectedNode.id)===t.id),e.xp6(1),e.ekj("selected",(null==n.selectedNode?null:n.selectedNode.id)===t.id),e.xp6(1),e.Q6J("nzTooltipTitle",null==t.detail?null:t.detail.name),e.xp6(1),e.hij(" ",null==t.detail?null:t.detail.name," "),e.xp6(2),e.Q6J("state",null==t.detail?null:t.detail.status),e.xp6(2),e.Q6J("ngIf",(null==t.detail?null:t.detail.metrics)&&t.detail.metrics["read-bytes-complete"])("ngIfElse",s),e.xp6(2),e.Q6J("ngIf",(null==t.detail?null:t.detail.metrics)&&t.detail.metrics["read-records-complete"])("ngIfElse",s),e.xp6(2),e.Q6J("ngIf",(null==t.detail?null:t.detail.metrics)&&t.detail.metrics["write-bytes-complete"])("ngIfElse",s),e.xp6(2),e.Q6J("ngIf",(null==t.detail?null:t.detail.metrics)&&t.detail.metrics["write-records-complete"])("ngIfElse",s),e.xp6(3),e.hij(" ",t.parallelism," "),e.xp6(1),e.Q6J("ngIf",n.desiredParallelism.has(t.id)),e.xp6(2),e.Oqu(e.xi3(20,24,t.detail["start-time"],"yyyy-MM-dd HH:mm:ss.SSS")),e.xp6(3),e.Oqu(e.lcZ(23,27,null==t.detail?null:t.detail.duration)),e.xp6(3),e.Oqu(e.xi3(26,29,t.detail["end-time"],"yyyy-MM-dd HH:mm:ss.SSS")),e.xp6(2),e.ekj("selected",(null==n.selectedNode?null:n.selectedNode.id)===t.id),e.xp6(1),e.Q6J("tasks",null==t.detail?null:t.detail.tasks),e.xp6(1),e.Q6J("ngIf",n.webRescaleEnabled)}}function se(o,l){1&o&&(e.TgZ(0,"span",25),e._uU(1,"loading..."),e.qZA())}const re=function(o){return{x:o}};function T(o){return(l,t)=>o(l)>o(t)?1:-1}let le=(()=>{class o{constructor(t,n){this.elementRef=t,this.statusService=n,this.trackById=(s,a)=>a.id,this.webRescaleEnabled=this.statusService.configuration.features["web-rescale"],this.sortStatusFn=T(s=>s.detail?.status),this.sortReadBytesFn=T(s=>s.detail?.metrics?.["read-bytes"]),this.sortReadRecordsFn=T(s=>s.detail?.metrics?.["read-records"]),this.sortWriteBytesFn=T(s=>s.detail?.metrics?.["write-bytes"]),this.sortWriteRecordsFn=T(s=>s.detail?.metrics?.["write-records"]),this.sortParallelismFn=T(s=>s.parallelism),this.sortStartTimeFn=T(s=>s.detail?.["start-time"]),this.sortDurationFn=T(s=>s.detail?.duration),this.sortEndTimeFn=T(s=>s.detail?.["end-time"]),this.innerNodes=[],this.left=390,this.desiredParallelism=new Map,this.nodeClick=new e.vpe,this.rescale=new e.vpe}set nodes(t){this.innerNodes=t;for(const n of t)n.parallelism==this.desiredParallelism.get(n.id)&&this.desiredParallelism.delete(n.id)}get nodes(){return this.innerNodes}clickNode(t){this.nodeClick.emit(t)}clickScaleUp(t){let n=this.desiredParallelism.get(t.id);null==n&&(n=t.parallelism),this.changeDesiredParallelism(t,n+1)}clickScaleDown(t){let n=this.desiredParallelism.get(t.id);null==n&&(n=t.parallelism);const s=Math.max(1,n-1);this.changeDesiredParallelism(t,s)}changeDesiredParallelism(t,n){n==t.parallelism?this.desiredParallelism.delete(t.id):this.desiredParallelism.set(t.id,n),null!=this.rescaleTimeoutId&&window.clearTimeout(this.rescaleTimeoutId),this.rescaleTimeoutId=window.setTimeout(()=>{this.desiredParallelism.size>0&&this.rescale.emit(this.desiredParallelism)},2500)}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(e.SBq),e.Y36(V.B))},o.\u0275cmp=e.Xpm({type:o,selectors:[["flink-job-overview-list"]],inputs:{selectedNode:"selectedNode",nodes:"nodes"},outputs:{nodeClick:"nodeClick",rescale:"rescale"},standalone:!0,features:[e.jDz],decls:32,vars:23,consts:[[1,"no-border","small",3,"nzSize","nzData","nzScroll","nzFrontPagination","nzShowPagination"],["table",""],["nzLeft","",3,"nzWidth"],["nzWidth","120px",3,"nzSortFn"],["nzWidth","150px",3,"nzSortFn"],["nzWidth","100px",3,"nzSortFn"],["nzWidth","60px","nzRight",""],["nzWidth","80px","nzRight","",4,"ngIf"],["class","clickable",3,"selected","click",4,"ngFor","ngForOf","ngForTrackBy"],[3,"left","baseElement","resizeMin","leftChange"],["loadingTemplate",""],["nzWidth","80px","nzRight",""],[1,"clickable",3,"click"],["nzLeft","",1,"name"],["nzTooltipPlacement","topLeft","nz-tooltip","",3,"nzTooltipTitle"],[3,"state"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["nzRight",""],[3,"tasks"],["nzRight","",4,"ngIf"],["nz-icon","","nzType","sync"],["nz-button","","nzSize","small","nzType","default",3,"click"],["nz-icon","","nzType","plus"],["nz-icon","","nzType","minus"],[1,"text-secondary"]],template:function(t,n){if(1&t&&(e.TgZ(0,"nz-table",0,1)(2,"thead")(3,"tr")(4,"th",2),e._uU(5,"Name"),e.qZA(),e.TgZ(6,"th",3),e._uU(7,"Status"),e.qZA(),e.TgZ(8,"th",4),e._uU(9,"Bytes Received"),e.qZA(),e.TgZ(10,"th",4),e._uU(11,"Records Received"),e.qZA(),e.TgZ(12,"th",4),e._uU(13,"Bytes Sent"),e.qZA(),e.TgZ(14,"th",3),e._uU(15,"Records Sent"),e.qZA(),e.TgZ(16,"th",5),e._uU(17,"Parallelism"),e.qZA(),e.TgZ(18,"th",4),e._uU(19,"Start Time"),e.qZA(),e.TgZ(20,"th",4),e._uU(21,"Duration"),e.qZA(),e.TgZ(22,"th",4),e._uU(23,"End Time"),e.qZA(),e.TgZ(24,"th",6),e._uU(25,"Tasks"),e.qZA(),e.YNc(26,X,2,0,"th",7),e.qZA()(),e.TgZ(27,"tbody"),e.YNc(28,oe,30,32,"tr",8),e.qZA()(),e.TgZ(29,"flink-resize",9),e.NdJ("leftChange",function(a){return n.left=a}),e.qZA(),e.YNc(30,se,2,0,"ng-template",null,10,e.W1O)),2&t){const s=e.MAs(1);e.Q6J("nzSize","small")("nzData",n.nodes)("nzScroll",e.VKq(21,re,1360+n.left+"px"))("nzFrontPagination",!1)("nzShowPagination",!1),e.xp6(4),e.Q6J("nzWidth",n.left+"px"),e.xp6(2),e.Q6J("nzSortFn",n.sortStatusFn),e.xp6(2),e.Q6J("nzSortFn",n.sortReadBytesFn),e.xp6(2),e.Q6J("nzSortFn",n.sortReadRecordsFn),e.xp6(2),e.Q6J("nzSortFn",n.sortWriteBytesFn),e.xp6(2),e.Q6J("nzSortFn",n.sortWriteRecordsFn),e.xp6(2),e.Q6J("nzSortFn",n.sortParallelismFn),e.xp6(2),e.Q6J("nzSortFn",n.sortStartTimeFn),e.xp6(2),e.Q6J("nzSortFn",n.sortDurationFn),e.xp6(2),e.Q6J("nzSortFn",n.sortEndTimeFn),e.xp6(4),e.Q6J("ngIf",n.webRescaleEnabled),e.xp6(2),e.Q6J("ngForOf",s.data)("ngForTrackBy",n.trackById),e.xp6(1),e.Q6J("left",n.left)("baseElement",n.elementRef)("resizeMin",390)}},dependencies:[b.HQ,b.N8,b.qD,b.Uo,b._C,b.Om,b.p0,b.$Z,b.qn,r.sg,j.cg,j.SY,Q.A,r.O5,$.E,r.JJ,B.c,W.w,Y.K,D,y.sL,y.ix,y.fY,G.w,H.dQ,h.PV,h.Ls,K.mS],styles:["[_nghost-%COMP%]{position:relative;display:flex;flex:1}[_nghost-%COMP%]   .text-secondary[_ngcontent-%COMP%]{color:#00000073;font-size:12px}.name[_ngcontent-%COMP%]{overflow:hidden}.name[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{position:absolute;top:0;left:8px;display:inline-block;overflow:hidden;width:calc(100% - 12px);line-height:34px;text-overflow:ellipsis;white-space:nowrap}.selected[_ngcontent-%COMP%]{background:#e6f7ff;color:#000000d9}.selected[_ngcontent-%COMP%]:hover   td[_ngcontent-%COMP%]{background:#e6f7ff}"],changeDetection:0}),o})();var L=i(39597),de=i(105),ce=i(22423),he=i(60387);function pe(o,l){1&o&&e._UZ(0,"nz-alert",4)}function me(o,l){if(1&o){const t=e.EpF();e.ynx(0),e.TgZ(1,"flink-job-overview-list",5),e.NdJ("nodeClick",function(s){e.CHM(t);const a=e.oxw();return e.KtG(a.onNodeClick(s))})("rescale",function(s){e.CHM(t);const a=e.oxw();return e.KtG(a.onRescale(s))}),e.qZA(),e.TgZ(2,"flink-resize",6),e.NdJ("topChange",function(s){e.CHM(t);const a=e.oxw();return e.KtG(a.top=s)})("resizeEnd",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.onResizeEnd())}),e.qZA(),e.BQk()}if(2&o){const t=e.oxw();e.xp6(1),e.Q6J("nodes",t.nodes)("selectedNode",t.selectedNode),e.xp6(1),e.Q6J("top",t.top)("mode","horizontal")("baseElement",t.elementRef)("resizeMin",280)}}const fe=[{path:"",component:(()=>{class o{constructor(t,n,s,a,c,z,P,ge){this.router=t,this.activatedRoute=n,this.elementRef=s,this.metricService=a,this.jobLocalService=c,this.jobService=z,this.notificationService=P,this.cdr=ge,this.nodes=[],this.links=[],this.top=500,this.destroy$=new w.x}ngOnInit(){this.jobLocalService.jobDetailChanges().pipe((0,U.h)(t=>t.jid===this.activatedRoute.parent.parent.snapshot.params.jid),(0,u.R)(this.destroy$)).subscribe(t=>{this.jobId!==t.plan.jid||0===this.nodes.length?(this.nodes=t.plan.nodes,this.links=t.plan.links,this.jobId=t.plan.jid,this.dagreComponent.flush(this.nodes,this.links,!0).then(),this.refreshNodesWithMetrics()):(this.nodes=t.plan.nodes,this.refreshNodesWithMetrics()),this.cdr.markForCheck()}),this.jobLocalService.selectedVertexChanges().pipe((0,u.R)(this.destroy$)).subscribe(t=>{t?this.dagreComponent.focusNode(t):this.selectedNode&&(this.timeoutId=window.setTimeout(()=>this.dagreComponent.redrawGraph())),this.selectedNode=t,this.cdr.markForCheck()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),clearTimeout(this.timeoutId)}onNodeClick(t){this.selectedNode&&this.selectedNode.id===t.id||this.router.navigate([t.id],{relativeTo:this.activatedRoute}).then()}onRescale(t){this.jobService.changeDesiredParallelism(this.jobId,t).subscribe(()=>{this.notificationService.success("Rescaling operation.","Job resources requirements have been updated. Job will now try to rescale.")})}onResizeEnd(){this.selectedNode?this.dagreComponent.focusNode(this.selectedNode,!0):this.dagreComponent.moveToCenter(),this.cdr.markForCheck()}refreshNodesWithMetrics(){this.mergeWithBackPressureAndSkew(this.nodes).pipe((0,F.z)(t=>this.mergeWithWatermarks(t)),(0,u.R)(this.destroy$)).subscribe(t=>{t.forEach(n=>{this.dagreComponent.updateNode(n.id,n),this.cdr.markForCheck()})})}mergeWithBackPressureAndSkew(t){return(0,C.D)(t.map(n=>this.metricService.loadMetricsWithAllAggregates(this.jobId,n.id,["backPressuredTimeMsPerSecond","busyTimeMsPerSecond","numRecordsInPerSecond"]).pipe((0,O.U)(s=>({...n,backPressuredPercentage:Math.min(Math.round(s.backPressuredTimeMsPerSecond.max/10),100),busyPercentage:Math.min(Math.round(s.busyTimeMsPerSecond.max/10),100),dataSkewPercentage:s.numRecordsInPerSecond.skew}))))).pipe((0,R.K)(()=>(0,S.of)(t)))}mergeWithWatermarks(t){return(0,C.D)(t.map(n=>this.metricService.loadWatermarks(this.jobId,n.id).pipe((0,O.U)(s=>({...n,lowWatermark:s.lowWatermark}))))).pipe((0,R.K)(()=>(0,S.of)(t)))}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(v.F0),e.Y36(v.gz),e.Y36(e.SBq),e.Y36(de.K),e.Y36(p.R),e.Y36(ce.O),e.Y36(he.zb),e.Y36(e.sBO))},o.\u0275cmp=e.Xpm({type:o,selectors:[["flink-job-overview"]],viewQuery:function(t,n){if(1&t&&e.Gf(k.B,7),2&t){let s;e.iGM(s=e.CRH())&&(n.dagreComponent=s.first)}},standalone:!0,features:[e.jDz],decls:5,vars:5,consts:[["nzShowIcon","","nzType","info","nzMessage","Job is not running yet.",4,"ngIf"],[1,"container"],[3,"xCenter","nodeClick"],[4,"ngIf"],["nzShowIcon","","nzType","info","nzMessage","Job is not running yet."],[3,"nodes","selectedNode","nodeClick","rescale"],[3,"top","mode","baseElement","resizeMin","topChange","resizeEnd"]],template:function(t,n){1&t&&(e.YNc(0,pe,1,0,"nz-alert",0),e.TgZ(1,"div",1)(2,"flink-dagre",2),e.NdJ("nodeClick",function(a){return n.onNodeClick(a)}),e.qZA(),e._UZ(3,"router-outlet"),e.qZA(),e.YNc(4,me,3,6,"ng-container",3)),2&t&&(e.Q6J("ngIf",0===n.nodes.length),e.xp6(1),e.Udp("height",n.top,"px"),e.xp6(1),e.Q6J("xCenter",4),e.xp6(2),e.Q6J("ngIf",n.nodes.length>0))},dependencies:[L.L,L.r,r.O5,k.B,v.lC,le,D],styles:[".container[_ngcontent-%COMP%]{position:relative;flex:0 1 auto;width:100%;border-bottom:solid 1px #f0f0f0}nz-radio-group[_ngcontent-%COMP%]{position:absolute;top:15px;right:24px;z-index:1;opacity:.7;transition:opacity ease-in .28s}nz-radio-group[_ngcontent-%COMP%]:hover{opacity:1}flink-dagre[_ngcontent-%COMP%]{position:absolute;left:0;width:100%;height:100%}flink-job-overview-drawer[_ngcontent-%COMP%]{position:absolute;right:0;width:60%;height:100%;border-left:solid 1px #f0f0f0;background:#fff}[_nghost-%COMP%]{position:relative;display:flex;flex:1;flex-flow:column nowrap}"],changeDetection:0}),o})(),children:[{path:":vertexId",component:d,children:[{path:"detail",loadComponent:()=>Promise.all([i.e(8592),i.e(8637)]).then(i.bind(i,48637)).then(o=>o.JobOverviewDrawerDetailComponent),data:{path:"detail"}},{path:"subtasks",loadComponent:()=>Promise.all([i.e(8592),i.e(4491)]).then(i.bind(i,84491)).then(o=>o.JobOverviewDrawerSubtasksComponent),data:{path:"subtasks"}},{path:"taskmanagers",loadComponent:()=>Promise.all([i.e(8592),i.e(9354)]).then(i.bind(i,9354)).then(o=>o.JobOverviewDrawerTaskmanagersComponent),data:{path:"taskmanagers"}},{path:"watermarks",loadComponent:()=>Promise.all([i.e(8592),i.e(5426)]).then(i.bind(i,55426)).then(o=>o.JobOverviewDrawerWatermarksComponent),data:{path:"watermarks"}},{path:"accumulators",loadComponent:()=>Promise.all([i.e(8592),i.e(6462)]).then(i.bind(i,86462)).then(o=>o.JobOverviewDrawerAccumulatorsComponent),data:{path:"accumulators"}},{path:"metrics",loadComponent:()=>Promise.all([i.e(170),i.e(4398)]).then(i.bind(i,4398)).then(o=>o.JobOverviewDrawerChartComponent),data:{path:"metrics"}},{path:"backpressure",loadComponent:()=>Promise.all([i.e(8592),i.e(4996)]).then(i.bind(i,94996)).then(o=>o.JobOverviewDrawerBackpressureComponent),data:{path:"backpressure"}},{path:"flamegraph",loadComponent:()=>i.e(8391).then(i.bind(i,78391)).then(o=>o.JobOverviewDrawerFlameGraphComponent),data:{path:"flamegraph"}}]}]}]},105:(N,M,i)=>{i.d(M,{K:()=>O});var f=i(54004),v=i(94650),w=i(80529),x=i(70946);let O=(()=>{class u{constructor(g,h){this.httpClient=g,this.configService=h}loadAllAvailableMetrics(g,h){return this.httpClient.get(`${this.configService.BASE_URL}/jobs/${g}/vertices/${h}/metrics`).pipe((0,f.U)(e=>e.sort((p,m)=>{const d=p.id.toLowerCase(),r=m.id.toLowerCase();return dr?1:0})))}loadMetrics(g,h,e){const p=e.join(",");return this.httpClient.get(`${this.configService.BASE_URL}/jobs/${g}/vertices/${h}/metrics`,{params:{get:p}}).pipe((0,f.U)(m=>{const d={};return m.forEach(r=>{d[r.id]=parseFloat(r.value)}),{timestamp:Date.now(),values:d}}))}loadMetricsWithAllAggregates(g,h,e){const p=e.join(",");return this.httpClient.get(`${this.configService.BASE_URL}/jobs/${g}/vertices/${h}/subtasks/metrics`,{params:{get:p}}).pipe((0,f.U)(m=>{const d={};return m.forEach(r=>{d[r.id]={min:NaN,max:NaN,avg:NaN,sum:NaN,skew:NaN},d[r.id].min=+r.min,d[r.id].max=+r.max,d[r.id].avg=+r.avg,d[r.id].sum=+r.sum,d[r.id].skew=+r.skew}),d}))}loadAggregatedMetrics(g,h,e,p="max"){const m={};return this.loadMetricsWithAllAggregates(g,h,e).pipe((0,f.U)(d=>{for(const r in d){const C=d[r];switch(p){case"min":m[r]=+C.min;break;case"max":m[r]=+C.max;break;case"avg":m[r]=+C.avg;break;case"sum":m[r]=+C.sum;break;case"skew":m[r]=+C.skew;break;default:throw new Error(`Unsupported aggregate: ${p}`)}}return m}))}loadWatermarks(g,h){return this.httpClient.get(`${this.configService.BASE_URL}/jobs/${g}/vertices/${h}/watermarks`).pipe((0,f.U)(e=>{let m,p=NaN;const d={};return e.forEach(r=>{const C=parseInt(r.value,10),S=r.id.replace(".currentInputWatermark","");d[S]=C,(isNaN(p)||Cthis.configService.LONG_MIN_VALUE?p:NaN,{lowWatermark:m,watermarks:d}}))}}return u.\u0275fac=function(g){return new(g||u)(v.LFG(w.eN),v.LFG(x.E))},u.\u0275prov=v.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"}),u})()}}]);




© 2015 - 2025 Weber Informatics LLC | Privacy Policy