@ytsaurus/ui 1.88.0 → 1.89.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/public/build/assets-manifest.json +48 -48
  2. package/dist/public/build/css/{3508.6c1c2786.chunk.css → 6429.ea79c9b6.chunk.css} +2 -2
  3. package/dist/public/build/css/6429.ea79c9b6.chunk.css.map +1 -0
  4. package/dist/public/build/css/components.70e435f3.chunk.css +2 -0
  5. package/dist/public/build/css/{components.40635897.chunk.css.map → components.70e435f3.chunk.css.map} +1 -1
  6. package/dist/public/build/css/navigation.23c4f062.chunk.css +2 -0
  7. package/dist/public/build/css/navigation.23c4f062.chunk.css.map +1 -0
  8. package/dist/public/build/css/{scheduling.5be9116a.chunk.css → scheduling.caa109d4.chunk.css} +2 -2
  9. package/dist/public/build/css/scheduling.caa109d4.chunk.css.map +1 -0
  10. package/dist/public/build/js/31.7fbb68da.chunk.js +2 -0
  11. package/dist/public/build/js/31.7fbb68da.chunk.js.map +1 -0
  12. package/dist/public/build/js/4326.35533baf.chunk.js +2 -0
  13. package/dist/public/build/js/4326.35533baf.chunk.js.map +1 -0
  14. package/dist/public/build/js/531.c9b75152.chunk.js +2 -0
  15. package/dist/public/build/js/531.c9b75152.chunk.js.map +1 -0
  16. package/dist/public/build/js/655.b9ca9e1c.chunk.js +2 -0
  17. package/dist/public/build/js/655.b9ca9e1c.chunk.js.map +1 -0
  18. package/dist/public/build/js/{6842.bde8a16b.chunk.js → 6842.b271abc1.chunk.js} +2 -2
  19. package/dist/public/build/js/6842.b271abc1.chunk.js.map +1 -0
  20. package/dist/public/build/js/9312.ae95dc3d.chunk.js +3 -0
  21. package/dist/public/build/js/9312.ae95dc3d.chunk.js.map +1 -0
  22. package/dist/public/build/js/cluster-page-wrapper.e590c7e4.chunk.js +2 -0
  23. package/dist/public/build/js/{cluster-page-wrapper.10097b2e.chunk.js.map → cluster-page-wrapper.e590c7e4.chunk.js.map} +1 -1
  24. package/dist/public/build/js/{dashboard.7d59b37c.chunk.js → dashboard.faa22a7b.chunk.js} +2 -2
  25. package/dist/public/build/js/{dashboard.7d59b37c.chunk.js.map → dashboard.faa22a7b.chunk.js.map} +1 -1
  26. package/dist/public/build/js/main.6a7f28d8.js +3 -0
  27. package/dist/public/build/js/main.6a7f28d8.js.map +1 -0
  28. package/dist/public/build/js/navigation.4c787adc.chunk.js +2 -0
  29. package/dist/public/build/js/navigation.4c787adc.chunk.js.map +1 -0
  30. package/dist/public/build/js/odin.94be07ae.chunk.js +2 -0
  31. package/dist/public/build/js/odin.94be07ae.chunk.js.map +1 -0
  32. package/dist/public/build/js/operations.2bf06800.chunk.js +2 -0
  33. package/dist/public/build/js/operations.2bf06800.chunk.js.map +1 -0
  34. package/dist/public/build/js/runtime.013ac4e9.js +2 -0
  35. package/dist/public/build/js/runtime.013ac4e9.js.map +1 -0
  36. package/dist/public/build/js/scheduling.9311689d.chunk.js +2 -0
  37. package/dist/public/build/js/scheduling.9311689d.chunk.js.map +1 -0
  38. package/dist/public/build/js/tablet.bfd0b58c.chunk.js +2 -0
  39. package/dist/public/build/js/tablet.bfd0b58c.chunk.js.map +1 -0
  40. package/dist/public/build/js/{vendors.68feab29.js → vendors.cdadc029.js} +3 -3
  41. package/dist/public/build/js/vendors.cdadc029.js.map +1 -0
  42. package/dist/public/build/js/{yt-df-dialog.aebd8107.chunk.js → yt-df-dialog.d89174c7.chunk.js} +2 -2
  43. package/dist/public/build/js/yt-df-dialog.d89174c7.chunk.js.map +1 -0
  44. package/dist/public/build/manifest.json +42 -42
  45. package/package.json +3 -3
  46. package/dist/public/build/css/3508.6c1c2786.chunk.css.map +0 -1
  47. package/dist/public/build/css/components.40635897.chunk.css +0 -2
  48. package/dist/public/build/css/navigation.3fcb92a4.chunk.css +0 -2
  49. package/dist/public/build/css/navigation.3fcb92a4.chunk.css.map +0 -1
  50. package/dist/public/build/css/scheduling.5be9116a.chunk.css.map +0 -1
  51. package/dist/public/build/js/4326.f0f9ad02.chunk.js +0 -2
  52. package/dist/public/build/js/4326.f0f9ad02.chunk.js.map +0 -1
  53. package/dist/public/build/js/5145.f54452ce.chunk.js +0 -2
  54. package/dist/public/build/js/5145.f54452ce.chunk.js.map +0 -1
  55. package/dist/public/build/js/531.c1a47a3c.chunk.js +0 -2
  56. package/dist/public/build/js/531.c1a47a3c.chunk.js.map +0 -1
  57. package/dist/public/build/js/655.2c8a30bf.chunk.js +0 -2
  58. package/dist/public/build/js/655.2c8a30bf.chunk.js.map +0 -1
  59. package/dist/public/build/js/6842.bde8a16b.chunk.js.map +0 -1
  60. package/dist/public/build/js/9312.54862b59.chunk.js +0 -3
  61. package/dist/public/build/js/9312.54862b59.chunk.js.map +0 -1
  62. package/dist/public/build/js/cluster-page-wrapper.10097b2e.chunk.js +0 -2
  63. package/dist/public/build/js/main.e311e250.js +0 -3
  64. package/dist/public/build/js/main.e311e250.js.map +0 -1
  65. package/dist/public/build/js/navigation.532fa983.chunk.js +0 -2
  66. package/dist/public/build/js/navigation.532fa983.chunk.js.map +0 -1
  67. package/dist/public/build/js/odin.b5abd8af.chunk.js +0 -2
  68. package/dist/public/build/js/odin.b5abd8af.chunk.js.map +0 -1
  69. package/dist/public/build/js/operations.5ab0f962.chunk.js +0 -2
  70. package/dist/public/build/js/operations.5ab0f962.chunk.js.map +0 -1
  71. package/dist/public/build/js/runtime.02e67b1d.js +0 -2
  72. package/dist/public/build/js/runtime.02e67b1d.js.map +0 -1
  73. package/dist/public/build/js/scheduling.34609dfc.chunk.js +0 -2
  74. package/dist/public/build/js/scheduling.34609dfc.chunk.js.map +0 -1
  75. package/dist/public/build/js/tablet.ee9b4b62.chunk.js +0 -2
  76. package/dist/public/build/js/tablet.ee9b4b62.chunk.js.map +0 -1
  77. package/dist/public/build/js/vendors.68feab29.js.map +0 -1
  78. package/dist/public/build/js/yt-df-dialog.aebd8107.chunk.js.map +0 -1
  79. /package/dist/public/build/js/{9312.54862b59.chunk.js.LICENSE.txt → 9312.ae95dc3d.chunk.js.LICENSE.txt} +0 -0
  80. /package/dist/public/build/js/{main.e311e250.js.LICENSE.txt → main.6a7f28d8.js.LICENSE.txt} +0 -0
  81. /package/dist/public/build/js/{vendors.68feab29.js.LICENSE.txt → vendors.cdadc029.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ (self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[31],{14880:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(40319),a=n(18801),i=(n(77810),n(15647)),o=n(97536),s=n(57614),l=n(64922),u=["title","getPathProps","path","exactPath","attribute","attributes","openAttributesModal","withTooltip","tooltipProps"];const c=(0,i.Ng)(null,{openAttributesModal:s.V6})((function(e){var t=e.title,n=e.getPathProps,i=void 0===n?function(){return{}}:n,s=e.path,c=e.exactPath,d=e.attribute,p=e.attributes,m=e.openAttributesModal,v=e.withTooltip,h=void 0===v||v,f=e.tooltipProps,g=void 0===f?{placement:"bottom-end",content:"Show attributes"}:f,A=(0,a.A)(e,u);return(0,l.jsx)(o.A,(0,r.A)((0,r.A)({},A),{},{tooltipProps:g,withTooltip:h,onClick:function(){var e=(0,r.A)({path:s,exactPath:c},i());m((0,r.A)((0,r.A)({title:t},e),{},{attribute:d,attributes:p}))}}))}))},42324:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(77810),a=n(76426),i=n(46282),o=n(64922);function s(e){var t=e.className,n=e.url,s=e.title,l=e.theme,u=e.children,c=e.hideIcon,d=e.face,p=e.wrapContent;if(!n)return null;var m=c?null:(0,o.jsx)(i.A,{awesome:"chart-bar",face:d}),v=u?(0,o.jsxs)(r.Fragment,{children:[m,u]}):m;return(0,o.jsx)(a.A,{className:t,target:"_blank",theme:l,url:n,title:null!=s?s:"View",children:p?p(v):v})}const l=r.memo(s)},70436:(e,t,n)=>{"use strict";n.d(t,{O:()=>f,A:()=>g});var r=n(40319),a=n(9736),i=n(29121),o=n(12937),s=n(10785),l=n(26718),u=n(77810),c=n(76872),d=n(69835),p=n(46282),m=n(64922),v=(0,c.A)("collapsible-section"),h=(0,c.A)("elements-heading"),f=function(e){(0,s.A)(n,e);var t=(0,l.A)(n);function n(){var e;(0,i.A)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(e=t.call.apply(t,[this].concat(a))).toggle=function(){(0,e.props.onToggle)(!e.props.collapsed)},e}return(0,o.A)(n,[{key:"render",value:function(){var e=this.props,t=e.name,n=e.children,r=e.size,a=e.overview,i=e.className,o=e.headingClassName,s=e.collapsed,l=e.marginDirection,u=e.togglerRightPadding;return(0,m.jsx)(d.A,{children:(0,m.jsxs)("div",{className:v({margin:l},i),children:[(0,m.jsxs)("div",{className:h({size:r,overview:"yes"},o),children:[(0,m.jsxs)("span",{className:h("heading",{clickable:"yes"},v("title")),onClick:this.toggle,children:[t,(0,m.jsx)("a",{children:(0,m.jsx)(p.A,{className:v("toggler",{"right-padding":u}),awesome:s?"angle-down":"angle-up"})})]}),a]}),!s&&(0,m.jsx)(d.A,{children:n})]})})}}]),n}(u.Component);function g(e){var t=e.onToggle,n=u.useState(e.collapsed),i=(0,a.A)(n,2),o=i[0],s=i[1],l=u.useCallback((function(e){s(e),t&&t(e)}),[s,t]);return(0,m.jsx)(f,(0,r.A)((0,r.A)({},e),{},{onToggle:l,collapsed:o}))}f.defaultProps={size:"m",collapsed:!1,marginDirection:"top"}},49133:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(40319),a=n(29121),i=n(12937),o=n(10785),s=n(26718),l=n(77810),u=n(76872),c=n(17036),d=n(92736),p=(n(71801),n(64922)),m=function(e){(0,o.A)(n,e);var t=(0,s.A)(n);function n(e){var r;return(0,a.A)(this,n),(r=t.call(this,e)).state={},r}return(0,i.A)(n,[{key:"renderRow",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=this.props,a=r.css,i=r.itemHeight,o=r.templates,s=r.itemMods,l=r.selectedIndex,u=r.computeKey,d=r.cssHover,m=this.state,v=m.columnSet,h=m.columnItems,f=l===t,g="function"==typeof u?u(e):n;return(0,p.jsx)(c.A,{columnSet:v,columnItems:h,item:e,itemHeight:i,css:a,templates:o,selected:f,index:t,itemMods:s,cssHover:d},g)}},{key:"render",value:function(){var e=(0,u.A)(d.R9)("footer"),t=this.props.footer;return(0,p.jsx)("tfoot",{className:e,children:this.renderRow(t,0)})}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.columns,n=(0,d.PM)(t);return{columnItems:n.items,columnSet:n.set}}}]),n}(l.Component);m.defaultProps={templates:{},cssHover:!1};var v=n(53332);const h=function(e){var t;return t=function(t){(0,o.A)(c,t);var n=(0,s.A)(c);function c(){return(0,a.A)(this,c),n.apply(this,arguments)}return(0,i.A)(c,[{key:"renderStickyFooter",value:function(){var e=(0,u.A)("elements-table-wrapper")({sticky:"bottom"}),t=this.props.footer;return(0,p.jsx)("div",{className:e,children:(0,p.jsx)("table",{className:(0,d.xV)(this.props),children:(0,p.jsx)(m,(0,r.A)((0,r.A)({},this.props),{},{footer:t}))})})}},{key:"render",value:function(){return(0,p.jsxs)(l.Fragment,{children:[(0,p.jsx)(e,(0,r.A)({},this.props)),this.props.footer&&this.renderStickyFooter()]})}}]),c}(l.Component),t.displayName="WithStickyFooter(".concat((0,v.Mn)(e),")"),t.defaultProps={size:"m"},t}},41652:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(40319),a=n(29121),i=n(12937),o=n(10785),s=n(26718),l=n(77810),u=n(15647),c=n(5992),d=n(76872),p=n(89067),m=n(33951),v=n(53332),h=n(92736),f=n(26264),g=(n(71801),n(64922)),A={toggleColumnSortOrder:m.z};const b=(0,c.Zz)((0,u.Ng)((function(e){return{sortState:e.tables}}),A),(function(e){var t;return t=function(t){(0,o.A)(u,t);var n=(0,s.A)(u);function u(){return(0,a.A)(this,u),n.apply(this,arguments)}return(0,i.A)(u,[{key:"renderStickyHead",value:function(){var e=this.props.top,t=(0,d.A)("elements-table-wrapper")({sticky:"top"});return(0,g.jsx)("div",{className:t,style:{top:e},children:(0,g.jsx)("table",{className:(0,h.xV)(this.props),children:(0,g.jsx)(p.A,(0,r.A)({},this.props))})})}},{key:"render",value:function(){return(0,g.jsxs)(l.Fragment,{children:[this.renderStickyHead(),(0,g.jsx)(e,(0,r.A)({},this.props))]})}}]),u}(l.Component),t.displayName="WithStickyHead(".concat((0,v.Mn)(e),")"),t.defaultProps={templates:{},size:"m",theme:"bordered",padded:!1,striped:!0,top:f.uF},t}))},78466:(e,t,n)=>{"use strict";n.d(t,{L:()=>c}),n(77810);var r=n(92423),a=n(72679),i=n(39702),o=n(40319),s=n(64922);const l=function(e){return(0,s.jsx)("svg",(0,o.A)((0,o.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,s.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.47 10.97a.75.75 0 1 0 1.06 1.06l3.5-3.5a.75.75 0 0 0 0-1.06l-3.5-3.5a.75.75 0 0 0-1.06 1.06L6.44 8zm5 0a.75.75 0 1 0 1.06 1.06l3.5-3.5a.75.75 0 0 0 0-1.06l-3.5-3.5a.75.75 0 0 0-1.06 1.06L11.44 8z",clipRule:"evenodd"})}))};var u=(0,n(76872).A)("yt-expanded-button"),c=function(e){var t=e.className,n=e.expanded,o=e.inline,c=e.toggleExpanded,d=e.all,p=e.showText,m=e.qa,v=d?"Collapse All":"Collapse",h=d?"Expand All":"Expand";return(0,s.jsxs)(r.$,{className:u({inline:o},t),view:"flat-secondary",title:n?v:h,onClick:c,qa:m,children:[p&&(n?v:h)+" ",(0,s.jsx)(a.I,{className:u("expand",{expanded:n}),data:d?l:i.A,size:16})]})}},16744:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(77810),a=n(76872),i=n(46282),o=n(64922),s=(0,a.A)("expand-icon");function l(e){var t=e.className,n=e.data,a=e.expanded,l=e.visible,u=e.onClick,c=a?"angle-up":"angle-down",d=r.useCallback((function(){u&&u(n,a)}),[n,u,a]);return(0,o.jsx)("span",{className:s({visible:Boolean(l),clickable:void 0!==u},t),onClick:d,children:(0,o.jsx)(i.A,{awesome:c})})}},63588:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(29121),a=n(12937),i=n(10785),o=n(26718),s=n(77810),l=n(78894),u=n(8208),c=n(73822),d=n(48971),p=n(64922),m=new l.I,v=function(e){(0,i.A)(n,e);var t=(0,o.A)(n);function n(){return(0,r.A)(this,n),t.apply(this,arguments)}return(0,a.A)(n,[{key:"componentDidUpdate",value:function(){var e=this.props,t=e.error,n=e.loaded,r=e.errorData;t&&n&&m.add({theme:"danger",name:"network",autoHiding:5e5,title:"Oops! something went wrong.",content:r?r.message:c.A.format.NO_VALUE,actions:[{label:" view",onClick:function(){return(0,d.eW)(r)}}]})}},{key:"render",value:function(){var e=this.props,t=e.alwaysShowError,n=void 0!==t&&t,r=e.error,a=e.errorData,i=e.loaded,o=e.children;return!r||!n&&i?o:(0,p.jsx)(u.z,{error:a})}}]),n}(s.Component)},14391:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(29121),a=n(12937),i=n(10785),o=n(26718),s=n(77810),l=n(76872),u=n(65692),c=n(46282),d=n(39566),p=n(2211),m=n(64922),v=(0,l.A)("elements-pagination"),h=function(e){(0,i.A)(n,e);var t=(0,o.A)(n);function n(){return(0,r.A)(this,n),t.apply(this,arguments)}return(0,a.A)(n,[{key:"renderComponent",value:function(e,t){var n=t.handler,r="boolean"==typeof t.disabled&&t.disabled,a=this.props,i=a.size,o=a.tooltip,s=[{keys:t.hotkey,scope:t.hotkeyScope,handler:t.hotkeyHandler}];return(0,m.jsxs)("span",{title:o,children:[(0,m.jsx)(p.A,{size:i,onClick:n,disabled:r,className:v("control",{name:e}),title:{first:"First page",previous:"Previous page",next:"Next page",last:"Last page"}[e],pin:{first:"round-brick",previous:"clear-brick",next:"brick-clear",last:"brick-round"}[e],children:(0,m.jsx)(c.A,{awesome:{first:"angle-double-left",previous:"angle-left",next:"angle-right",last:"angle-double-right"}[e]})}),void 0!==t.hotkeyHandler&&(0,m.jsx)(d.A,{settings:s})]})}},{key:"renderInput",value:function(){var e=this.props,t=e.showInput,n=e.inputValue,r=e.onChange,a=e.size;return t?(0,m.jsx)(u.k,{qa:"yt-pagination_input",size:a,type:"text",value:n,onUpdate:r,pin:"clear-clear"}):null}},{key:"render",value:function(){var e=this.props,t=e.first,n=e.previous,r=e.next,a=e.last,i=e.className;return(0,m.jsxs)("div",{className:v(null,i),children:[this.renderComponent("first",t),this.renderComponent("previous",n),this.renderInput(),this.renderComponent("next",r),this.renderComponent("last",a)]})}}]),n}(s.Component);h.defaultProps={size:"m",showInput:!1}},33026:(e,t,n)=>{"use strict";n.d(t,{Ye:()=>H,DC:()=>Y,Dz:()=>L});var r=n(40319),a=n(13322),i=n(9736),o=n(77810),s=n(15647),l=n(76872),u=n(46282),c=n(64772),d=n(69835),p=n(11394),m=n(78466),v=n(11843),h=n(34380),f=n(35074),g=n(60680),A=n(84162),b=n(30008),j=n(64922),x=(0,l.A)("elements-toolbar"),y=(0,l.A)("yt-statistics-table");function _(e){var t=o.useCallback((function(){return e.onTreeStateChange("collapsed")}),[e.onTreeStateChange]),n=o.useCallback((function(){return e.onTreeStateChange("expanded")}),[e.onTreeStateChange]),r=(0,s.wA)(),a=(0,o.useCallback)((function(t){return r(e.onFilterChange(t))}),[r]),i="expanded"===e.treeState||"mixed"===e.treeState;return(0,j.jsx)("div",{className:x(null,y("toolbar")),children:(0,j.jsxs)("div",{className:x("container"),children:[(0,j.jsx)("div",{className:x("component",y("filter")),children:(0,j.jsx)(A.A,{size:"m",debounce:500,value:"",onChange:a})}),(0,j.jsx)("div",{className:x("component",y("expand-collapse")),children:(0,j.jsx)("span",{className:y("expand-metrics"),children:(0,j.jsx)(m.L,{expanded:i,toggleExpanded:i?t:n})})}),e.helpUrl&&(0,j.jsx)("div",{className:x("component",y("help")),children:(0,j.jsx)(b.A,{url:e.helpUrl})})]})})}var N=n(70353);function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.measureText(t).width;return Math.max(1,Math.ceil(n))}var w=n(74360),S=n(39760),T=n.n(S),C=n(30002),P=n.n(C),E=n(73822),R="<Root>";function I(e,t){return{name:t,prefix:e,path:e+"/"+t}}function O(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:R,r=t||{children:{},leaves:{}};return T()(e,(function(e,t){if("object"===(0,w.A)(P()(e)[0])){var a=I(n,t);r.children[a.path]=a,r=O(e,r,a.path)}else{var i=function(e,t,n){var r=I(e,t);return r.value=n,r}(n,t,e);r.leaves[i.path]=i}})),r}var V,z=function(e){return t=O(e),n=E.A.treeList.prepareTree(t.children,(function(e){return e.prefix})),(n=E.A.treeList.attachTreeLeaves(n,t.leaves,(function(e){return e.prefix})))[R];var t,n},F=n(68175),M=(V={},(0,F.A)(V,"ms",(function(e,t){return c.A.TimeDuration(Math.round(e),(0,r.A)({format:"milliseconds"},t))})),(0,F.A)(V,"bytes",(function(e,t){return D(e,t)})),(0,F.A)(V,"bytes * sec",(function(e,t){return D(e,t," * sec")})),(0,F.A)(V,"ms * bytes",(function(e,t){return D(e,t," * ms")})),(0,F.A)(V,"Mb*sec",(function(e,t){return D(1024*e*1024,t," * sec")})),V);function D(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return isNaN(e)?c.A.NO_VALUE:c.A.Bytes(Math.round(e),t)+n}function L(e,t,n){var r,a=null!==(r=M[t])&&void 0!==r?r:c.A.Number;return null==a?void 0:a(e,n)}var J=(0,l.A)("yt-statistics-table"),B=40;function U(e){var t=e.item,n=e.unit,r=t.attributes.value;if(r&&r.count&&r.sum){var a=r.sum/r.count;return a<1?L(a,n,{significantDigits:6}):L(a,n)}return c.A.NO_VALUE}function W(e){var t,n,r=e.item,a=e.aggregation,i=e.unit;return r.isLeafNode&&Boolean(r.attributes.value)?"avg"===a?(0,j.jsx)(U,{item:r,unit:i}):"count"===a?c.A.Number(null===(t=r.attributes)||void 0===t||null===(t=t.value)||void 0===t?void 0:t[a]):L(null===(n=r.attributes)||void 0===n||null===(n=n.value)||void 0===n?void 0:n[a],i):c.A.NO_VALUE}function H(e){var t=e.title,n=e.info,r=!(null!=n&&n.description||null!=n&&n.unit);return(0,j.jsxs)(h.m,{content:r?null:(0,j.jsx)(f.Ay,{items:[{key:"Description",value:n.description,visible:Boolean(n.description),className:J("description")},{key:"Unit",value:n.unit,visible:Boolean(n.unit)}]}),children:[t," ",!r&&(0,j.jsx)(g.L1,{children:(0,j.jsx)(u.A,{awesome:"question-circle"})})]})}function q(e){var t=e.item,n=e.itemState,r=e.toggleItemState,a=e.minWidth,i=void 0===a?void 0:a,s=e.renderValue,l=e.info,c=o.useMemo((function(){return{minWidth:i,paddingLeft:((null==t?void 0:t.level)||0)*B}}),[t.level,i]),d=o.useCallback((function(){n.empty||r()}),[n,r]);return t.isLeafNode?(0,j.jsxs)("span",{className:J("metric"),style:c,children:[(0,j.jsx)(u.A,{awesome:"chart-line",className:J("metric-icon")}),(0,j.jsx)(H,{title:s(t),info:l})]}):(0,j.jsxs)("span",{className:J("group"),style:c,onClick:d,children:[(0,j.jsx)(m.L,{expanded:!(n.collapsed||n.empty),toggleExpanded:function(){}}),(0,j.jsx)(u.A,{awesome:n.collapsed||n.empty?"folder":"folder-open",className:J("group-icon")}),(0,j.jsx)("span",{children:s(t)})]})}var $=function(e){var t=e.visibleColumns.reduce((function(e,t){return e[t]={sort:!1,align:"right"},e}),{name:{sort:!1,align:"left"}});return{theme:"light",size:"s",striped:!1,computeKey:function(e){return e.name},tree:!0,columns:{sets:{default:{items:Object.keys(t)}},items:t,mode:"default"}}},K=function(e){var t=e.statistic,n=e.fontFamilies,r=o.useState(""),a=(0,i.A)(r,2),s=a[0],l=a[1],u=o.useState("expanded"),c=(0,i.A)(u,2),d=c[0],p=c[1],m=o.useMemo((function(){return z(t)}),[t]),v=o.useMemo((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e)return[];var n=E.A.treeList.filterTree(e,(function(e){return-1!==e.name.indexOf(t)}),!0),r=E.A.treeList.sortTree(n,{field:"name",asc:!0},{name:{get:function(e){return e.name}}});return E.A.treeList.flattenTree(r)}(m,s)}),[m,s]);return{minWidth:o.useMemo((function(){return function(e,t){var n,r=300,a=function(e){var t=document.createElement("canvas").getContext("2d");return t.font=e,t}('14px / 20.02px "'.concat(t.regular,'", "Helvetica Neue", Arial, Helvetica, sans-serif')),i=(0,N.A)(e);try{for(i.s();!(n=i.n()).done;){var o=n.value,s=o.isLeafNode?20:40,l=k(a,o.attributes.name);r=Math.max(r,l+s+o.level*B)}}catch(e){i.e(e)}finally{i.f()}return Math.round(1.05*r)}(v,n)}),[n,v]),items:v,treeState:d,setTreeState:p,onFilterChange:function(e){return l(e)}}};function Y(e){var t=e.className,n=e.helpUrl,i=e.virtual,l=e.visibleColumns,u=e.fixedHeader,c=e.statistic,m=e.getStatisticInfo,h=(0,s.d4)(v.Y),f=K({statistic:c,fontFamilies:h}),g=f.items,A=f.minWidth,b=f.treeState,x=f.setTreeState,y=f.onFilterChange,N=o.useMemo((function(){return{name:function(e,t,n,r){var a,i=null!==(a=null==m?void 0:m(e.name))&&void 0!==a?a:{};return(0,j.jsx)(q,{item:e,minWidth:A,toggleItemState:n,itemState:r,renderValue:function(e){var t;return null==e||null===(t=e.attributes)||void 0===t?void 0:t.name},info:i})},__default__:function(e,t){if(e.isLeafNode){var n,r=(null!==(n=null==m?void 0:m(e.name))&&void 0!==n?n:{}).unit;return(0,j.jsx)(W,{item:e,aggregation:t,unit:r})}return null}}}),[A,m]),k=o.useMemo((function(){return $({visibleColumns:l})}),(0,a.A)(l));return(0,j.jsx)(d.A,{children:(0,j.jsxs)("div",{className:J(null,t),children:[(0,j.jsx)(_,{helpUrl:n,onFilterChange:y,onTreeStateChange:x,treeState:b}),(0,j.jsx)("div",{className:J("table-container"),children:(0,j.jsx)(p.A,(0,r.A)((0,r.A)({},k),{},{virtual:i,treeState:b,templates:N,items:g,css:J(),headerClassName:J("header",{fixed:u})}))})]})})}},80545:(e,t,n)=>{"use strict";n.d(t,{A:()=>l}),n(77810);var r=n(76872),a=n(73822),i=n(46282),o=n(64922),s=(0,r.A)("status-label");function l(e){var t=e.className,n=e.label,r=e.renderPlaque,l=function(e){var t;return null!==(t={materializing:"preparing",initializing:"preparing",preparing:"preparing",pending:"preparing",starting:"preparing",running:"running",completing:"running",failing:"running",aborting:"running",reviving:"running",suspended:"suspended",failed:"failed",completed:"completed",aborted:"aborted",Unknown:"unknown",Stopped:"suspended",Paused:"suspended",Working:"running",Draining:"running",Pausing:"running",Completed:"completed"}[e])&&void 0!==t?t:"unknown"}(n),u={preparing:"clock",running:"play-circle",suspended:"pause-circle",failed:"times-circle",completed:"check-circle",aborted:"times-circle",unknown:"question-circle"}[l],c={state:l};return n?(0,o.jsxs)("span",{className:s(null,r?s("plaque",c,t):s(c,t)),children:[(0,o.jsx)(i.A,{awesome:u}),(0,o.jsx)("span",{children:a.A.format.ReadableField(n)})]}):(0,o.jsx)("span",{})}},27592:(e,t,n)=>{"use strict";n.d(t,{X:()=>u});var r=n(9736),a=n(77810),i=n(76872),o=n(26264),s=n(64922),l=(0,i.A)("yt-sticky-container");function u(e){var t=e.topOffset,n=void 0===t?o.uF:t,i=e.children,u=a.useState(!1),c=(0,r.A)(u,2),d=c[0],p=c[1],m=a.useState(null),v=(0,r.A)(m,2),h=v[0],f=v[1],g=a.useMemo((function(){var e;return new IntersectionObserver((function(e){0===e[0].intersectionRatio?p(!0):1===e[0].intersectionRatio&&p(!1)}),{threshold:[0,1],rootMargin:"".concat(null!==(e=-n)&&void 0!==e?e:0,"px 0px 0px 0px")})}),[n]);a.useEffect((function(){return h&&g.observe(h),function(){h&&g.unobserve(h)}}),[h]);var A=a.useCallback((function(e){f(e)}),[]);return(0,s.jsxs)("div",{className:l(),children:[(0,s.jsx)("div",{className:l("top"),ref:A}),i({sticky:d,topStickyClassName:d?l("sticky",{top:!0}):void 0})]})}},41007:(e,t,n)=>{"use strict";n.d(t,{A:()=>u}),n(77810);var r=n(76872),a=n(85137),i=n(46282),o=n(34380),s=n(64922),l=(0,r.A)("yt-warning-icon");function u(e){var t=e.className,n=e.hoverContent,r=e.children,u=e.color;return(0,s.jsx)("span",{className:l(null,t),children:(0,s.jsxs)(o.m,{className:l("tooltip"),content:n,children:[(0,s.jsx)(i.A,{className:l("icon",{color:u}),awesome:"exclamation-triangle"}),r&&(0,s.jsx)(a.E,{variant:"inherit",color:u,children:r})]})})}},64675:(e,t,n)=>{"use strict";n.d(t,{A:()=>x,g:()=>j});var r=n(52789),a=n(56911),i=n(77810),o=n(50256),s=n(32286),l=n(87605);const u=i.memo;var c=n(67901);class d extends i.Component{constructor(){super(...arguments),this.state={error:void 0},this.resetError=()=>{this.state.error&&this.setState({error:void 0})}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(){var e,t;const{error:n}=this.state;n&&(null===(t=(e=this.props).onError)||void 0===t||t.call(e,{error:n}))}componentDidUpdate(e){if(e.data!==this.props.data){const{error:e}=this.state;e&&"code"in e&&e.code===s.iY.NO_DATA&&this.resetError()}}render(){const{error:e}=this.state;if(e){const t=function(e){const t="code"in e&&e.code;return(e.message||t||(0,o.R)("error","label_unknown-error")).toString()}(e);return this.props.renderError?this.props.renderError({error:e,message:t,resetError:this.resetError}):i.createElement("div",null,t)}return this.props.children}}var p=n(91326);const m=(0,c.o)("loader"),v=e=>{var{renderPluginLoader:t}=e,n=(0,a.Tt)(e,["renderPluginLoader"]);const r=null==t?void 0:t();return void 0!==r?r:i.createElement("div",{className:m()},i.createElement(p.a,Object.assign({},n)))},h=(0,c.cn)("chartkit"),f=e=>{const t=i.useRef(),{instanceRef:n,id:u,type:c,isMobile:d,renderPluginLoader:p}=e,m=(0,a.Tt)(e,["instanceRef","id","type","isMobile","renderPluginLoader"]),f=i.useMemo((()=>(0,l.d)()),[]),g=u||f,A=r.W.get("lang"),b=r.W.get("plugins").find((e=>e.type===c));if(!b)throw new s.R({code:s.iY.UNKNOWN_PLUGIN,message:(0,o.R)("error","label_unknown-plugin",{type:c})});const j=b.renderer;return i.useImperativeHandle(n,(()=>({reflow(e){var n;(null===(n=t.current)||void 0===n?void 0:n.reflow)&&t.current.reflow(e)}})),[]),i.createElement(i.Suspense,{fallback:i.createElement(v,{renderPluginLoader:p})},i.createElement("div",{className:h({mobile:d},"chartkit-theme_common")},i.createElement(j,Object.assign({ref:t,id:g,lang:A},m))))},g=u(i.forwardRef((function(e,t){return i.createElement(d,{onError:e.onError,data:e.data,renderError:e.renderError},i.createElement(f,Object.assign({instanceRef:t},e)))}))),A={type:"yagr",renderer:i.lazy((()=>Promise.all([n.e(3735),n.e(1195)]).then(n.bind(n,91195))))};n(49096),r.W.set({plugins:[A]});var b=["rgb(77, 162, 241)","rgb(255, 61, 100)"];function j(e){return b[e%b.length]}const x=g},15672:(e,t,n)=>{"use strict";n.d(t,{t1:()=>r.t}),n(40319),n(77810);var r=n(73990);n(64922),r.S},80016:(e,t,n)=>{"use strict";n.d(t,{w:()=>l});var r=n(9736),a=n(77810),i=n(15647),o=n(11843),s=n(27652);function l(e){var t=e.children,n=(0,i.d4)(o.Y),l=n.regular,u=n.monospace,c=a.useState(!1),d=(0,r.A)(c,2),p=d[0],m=d[1];return a.useEffect((function(){Promise.all([(0,s.w)(l),(0,s.w)(u)]).then((function(){return m(!0)}))}),[l,u]),p?t:null}},74069:(e,t,n)=>{"use strict";n.d(t,{BL:()=>c,DG:()=>u,sQ:()=>d,si:()=>l});var r=n(9736),a=n(77810),i=n(15647),o=n(53246),s=n(44611);function l(){var e=(0,i.wA)();a.useEffect((function(){e((0,o.Bg)())}),[e])}function u(){return l(),null}function c(){var e=a.useState(),t=(0,r.A)(e,2),n=t[0],i=t[1];return a.useEffect((function(){(0,s.u)().then((function(e){i(e)}))}),[]),n}function d(e){var t=e.children,n=c();return n?t({defaultPoolTree:n}):null}},36161:(e,t,n)=>{"use strict";n.d(t,{A:()=>l}),n(77810);var r=n(76872),a=n(64965),i=n(73822),o=n(64922),s=(0,r.A)("elements-message");function l(){var e=(0,a.W5)().params.tab;return(0,o.jsx)("div",{className:s({theme:"warning"}),children:(0,o.jsx)("p",{className:s("paragraph"),children:e?'Viewer for tab "'.concat(i.A.format.ReadableField(e),'" is not implemented.'):"Viewer for this tab is not implemented."})})}},40860:(e,t,n)=>{"use strict";n.d(t,{q:()=>i}),n(77810);var r=n(41007),a=n(64922);function i(e){var t=e.className;return(0,a.jsx)(r.A,{className:t,hoverContent:"The job is stale, the information may be obsolete"})}},70917:(e,t,n)=>{"use strict";n.d(t,{A:()=>O});var r=n(40319),a=n(29121),i=n(12937),o=n(10785),s=n(26718),l=n(77810),u=n(75826),c=n.n(u),d=n(76872),p=n(5992),m=n(96843),v=n.n(m),h=n(14880),f=n(11394),g=n(49133),A=n(41652),b=n(65873),j=n(16727),x=n(51744),y=n(73822),_=n(68175),N=n(53332),k={state:{align:"left",get:function(e){return e.state}},phase:{align:"left",caption:"State : Phase",get:function(e){if("total"===e.state)return"Total";var t=y.A.format.Readable,n=t(e.state),r=t(e.phase||y.A.format.NO_VALUE);return"".concat(n," : ").concat(r)}},progress:{align:"center",caption:"",get:function(e){return{value:e.progress&&e.progress.duration,theme:{initializing:"grass",preparing:"mint",pending:"aqua",materializing:"bluejeans",running:"lavander",completing:"grapefruit",reviving:"bittersweet",reviving_jobs:"sunflower",failed:"grapefruit"}[e.state]||"mediumgray"}}},duration:{align:"right",get:function(e){return e.duration}},start_time:{align:"left",get:function(e){return e.time}},actions:{align:"center",caption:""}},w="default",S="withActions";function T(e,t){var n=function(e){var t;return{theme:"light",striped:!1,virtual:!0,header:!1,size:"m",computeKey:function(e){return e.state+"/"+e.time},columns:{items:(0,N.TU)(k),sets:(t={},(0,_.A)(t,w,{items:[e,"progress","duration","start_time"]}),(0,_.A)(t,S,{items:[e,"progress","duration","start_time","actions"]}),t),mode:w}}}(t),a=n;return e&&((a=(0,r.A)({},n)).columns=(0,r.A)((0,r.A)({},a.columns),{},{mode:S})),a}var C=n(64922),P=(c().array,(0,d.A)("events")),E=(0,d.A)("operation-detail"),R=(0,p.Zz)(A.A,g.A)(f.A);function I(e,t){var n;return null===(n=k[t])||void 0===n?void 0:n.get(e)}var O=function(e){(0,o.A)(n,e);var t=(0,s.A)(n);function n(){return(0,a.A)(this,n),t.apply(this,arguments)}return(0,i.A)(n,[{key:"templates",get:function(){return{start_time:function(e,t){var n=I(e,t);return n?(0,C.jsx)(j.Bj.Time,{time:n,settings:{format:"full"},valueFormat:"DateTime"}):null},finish_time:function(e,t){var n=I(e,t);return n?(0,C.jsx)(j.Bj.Time,{time:n,settings:{format:"full"},valueFormat:"DateTime"}):null},duration:function(e,t){if(x.Jh.isFinalState(e))return y.A.format.NO_VALUE;var n=I(e,t);return(0,C.jsx)(j.Bj.Time,{time:n,settings:{format:"milliseconds"},valueFormat:"TimeDuration"})},progress:function(e,t){if(x.Jh.isNotFinalState(e)&&"total"!==e.state){var n=e.progress.duration,r=I(e,t),a=r.theme,i=r.value;return(0,C.jsxs)("div",{className:E("events-progress",{theme:a}),children:[(0,C.jsx)("span",{className:E("events-progress-percentage","elements-secondary-text"),children:y.A.format.Percent(n)}),(0,C.jsx)(b.k,{value:i,size:"s"})]})}},state:function(e,t){var n=I(e,t);return(0,C.jsx)(j.Bj.Readable,{value:n})},phase:function(e,t){var n=I(e,t);return(0,C.jsx)(j.Bj.Readable,{value:n})},actions:function(e){var t=(e||{}).attributes;return v()(t)?null:(0,C.jsx)(h.A,{title:"Event attributes",attributes:e.attributes})}}}},{key:"render",value:function(){var e=this.props,t=e.events,n=e.type,a=t.slice(),i=a.pop(),o=i.showAttributesColumn;return(0,C.jsx)("div",{className:P(),children:(0,C.jsx)(R,(0,r.A)((0,r.A)({},T(o,n)),{},{items:a,css:P(),footer:i,templates:this.templates}))})}}]),n}(l.Component);O.defaultProps={type:"state"}},30031:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>zl});var r=n(77810),a=n(76872),i=n(64965),o=n(9736),s=n(68175),l=n(40319),u=n(15647),c=n(96833),d=n.n(c),p=n(65304),m=n.n(p),v=n(27528),h=n.n(v),f=n(75414),g=n.n(f),A=n(29121),b=n(12937),j=n(10785),x=n(26718),y=n(75826),_=n.n(y),N=n(35074),k=n(29746),w=n(73822);function S(e){return w.A.format.SmallNumber(e,{significantDigits:4})}var T=n(84092),C=n.n(T),P=n(28407),E=n(70232),R=n.n(E),I=n(39760),O=n.n(I),V=n(17239),z=n.n(V),F=n(63281),M=n.n(F);function D(e){return!z()(e,(function(e){return Boolean(k.A.getValue(e))}))}function L(e){return k.A.getValue(e,"/@progress/tasks")}var J=n(70353),B=n(49214),U=n.n(B),W=n(7787),H=n(85593),q="tasks/";function $(e){return{path:k.A.getValue(e),originalPath:k.A.getValue(e,"/@original_path"),name:k.A.getValue(e,"/@file_name"),executable:k.A.getBoolean(e,"/@executable")}}function K(e){var t=h()(e,(function(e,t){return{name:t,value:e}}));return M()(t,"name")}function Y(e){var t=k.A.getValue(e,"/@spec/started_by"),n=k.A.getValue(t,"/command")||[],r=U()(K(t),(function(e){return"command"!==e.name}));if(r.length||n.length)return{fields:r,command:n}}function G(e){var t=k.A.getValue(e,"/@spec/transfer_manager");if(t)return{id:t.task_id,url:W.Ay.makeUrlForTransferTask(e)}}function Z(e,t,n){if(e.isRunning()){var r=e.getLivePreviewPath(t,n),a=r.path,i=r.virtualPath;if(i)return{path:i,supported:!0};if(a)return{path:a,transaction:k.A.getValue(e,"/@async_scheduler_transaction_id"),supported:!0}}return{supported:!1}}function X(e){var t,n=function(e){var t=k.A.getValue(e,"/@ranges");if(void 0===t){var n,r=k.A.getValue(e,"/@upper_limit"),a=k.A.getValue(e,"/@lower_limit");void 0!==r&&((n=n||{}).upper_limit=r),void 0!==a&&((n=n||{}).lower_limit=a),n&&(t=[n]),n&&(t=[n])}return t}(e),r=k.A.getValue(e,"/@columns");return n&&((t=t||{}).ranges=n),r&&((t=t||{}).columns=r),t}function Q(e,t,n,r,a,i){var o=k.A.getValue(n),s=k.A.getValue(n,"/@cluster"),u=k.A.getValue(n,"/@original_path"),c=function(e,t,n,r){return k.A.get(n,"/@transaction_id")||("running"===e.state?k.A.get(e,"/@".concat("stderr"===t?"debug_output":t,"_transaction_id")):r?k.A.get(e,"/@user_transaction_id"):void 0)}(e,t,n,a);return(0,l.A)((0,l.A)({path:o},s?{cluster:s}:{}),{},{originalPath:u,transaction:c,livePreview:Z(e,t,i),append:k.A.getBoolean(n,"/@append"),teleport:k.A.getBoolean(n,"/@teleport"),primary:k.A.getBoolean(n,"/@primary"),foreign:k.A.getBoolean(n,"/@foreign"),filters:X(n),typedFilters:X(r)})}function ee(e){var t,n=[];return O()(e,(function(e){try{var r=e.cluster,a=k.A.YPath.create(e.path,"absolute"),i=a.getKey(),o=a.toSubpath(-2).stringify(),s=r?"".concat(r,":").concat(o):o;t!==s&&(t=s,n.push((0,l.A)({path:o,transaction:e.transaction,isFolder:!0},r?{cluster:r}:{}))),n.push(Object.assign(e,{name:i}))}catch(e){console.error("groupTables error",e)}})),n}function te(e,t){var n,r="input";switch(e.type){case"remote_copy":case"merge":case"map":case"reduce":case"map_reduce":case"sort":case"join_reduce":var a=k.A.get(e.$typedAttributes,"/spec/input_table_paths");n=k.A.get(e,"/@spec/input_table_paths"),n=h()(n,(function(n,i){return Q(e,r,n,a[i],t)}));break;case"erase":var i=k.A.get(e.$typedAttributes,"/spec/input_table_path");n=(n=k.A.get(e,"/@spec/table_path"))&&[Q(e,r,n,i,t)]}return ee(n)}function ne(e,t){var n=k.A.get(e.$typedAttributes,"/spec/input_table_paths"),r=k.A.get(e,"/@spec/stderr_table_path");return ee(r=r&&[Q(e,"stderr",r,n,t)])}function re(e){var t=k.A.get(e.$typedAttributes,"/spec/core_table_path");return ee(t?[Q(e,"core",t,[],!1)]:[])}function ae(e,t){var n,r="output";switch(e.type){case"map":case"reduce":case"map_reduce":case"join_reduce":var a=k.A.get(e.$typedAttributes,"/spec/input_table_paths");n=k.A.get(e,"/@spec/output_table_paths"),n=h()(n,(function(n,i){return Q(e,r,n,a[i],t,i)}));break;case"merge":case"sort":case"remote_copy":var i=k.A.get(e.$typedAttributes,"/spec/input_table_path");n=(n=k.A.get(e,"/@spec/output_table_path"))&&[Q(e,r,n,i,t)]}return ee(n)}function ie(e){var t;switch(e.type){case"map_reduce":case"sort":t=Z(e,"intermediate")}if(t&&t.supported)return t}function oe(e){return 0===e.indexOf(q)?e.substring(q.length)+"_task":e}function se(e,t){try{var n,r=k.A.getValue(e,"/@spec/"+t),a=k.A.getValue(r,"/environment");a=K(a);var i=k.A.getValue(r,"/command"),o=k.A.getValue(r,"/class_name"),s=k.A.getValue(r,"/job_count"),l=h()(k.A.getValue(r,"/file_paths"),$),u=k.A.getValue(r,"/layer_paths");if(i||o||s||null!=l&&l.length||null!==(n=a)&&void 0!==n&&n.length)return{type:t,caption:oe(t),command:i,className:o,jobCount:s,files:l,environment:a,layerPaths:u}}catch(e){console.error("prepareScript error:",e)}}function le(e){var t=k.A.getValue(e,"/@spec/tasks");if(t)return h()(m()(t),(function(t){return se(e,q+t)}))}function ue(e){return U()(e,(function(e){return!e.isFolder}))}function ce(e,t){var n,r=[],a=0,i=(0,J.A)(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.isFolder||a++,a===t+1)break;r.push(o)}}catch(e){i.e(e)}finally{i.f()}return r}var de=n(51744),pe=n(29081);function me(e){return(0,pe.fs)(W.Ay.docsUrls.faq+"#"+e.replace(/_/g,""))}var ve,he=n(24050),fe=n(13322),ge=n(74360),Ae=n(79261),be=n(18801),je=n(41655),xe=n.n(je),ye=n(18472),_e=["id"],Ne=function(){function e(t){(0,A.A)(this,e),this.id=void 0,this.$value=void 0,this.$attributes=void 0,this.state=void 0,this.pools=[];var n=t.id,r=(0,be.A)(t,_e);this.$value=n,this.id=n,this.$attributes=r,this.state=k.A.getValue(r,"/state")}return(0,b.A)(e,[{key:"isRunning",value:function(){return-1!==e.RUNNING_STATES.indexOf(this.state)}},{key:"isPreparing",value:function(){return-1!==e.PREPARING_STATES.indexOf(this.state)}},{key:"inIntermediateState",value:function(){return-1!==e.INTERMEDIATE_STATES.indexOf(this.state)}},{key:"successfullyCompleted",value:function(){return"completed"===this.state}},{key:"computePools",value:function(e){var t=k.A.getValue(e,"/runtime_parameters/scheduling_options_per_pool_tree"),n=k.A.getValue(e,"/scheduling_attributes_per_pool_tree"),r=k.A.getValue(e,"/slot_index_per_pool_tree")||{};this.pools=h()(t,(function(e,t){var a=t,i=e.pool,o=k.A.getValue(n,"/".concat(a));return{tree:a,pool:i,isEphemeral:k.A.getValue(o,"/running_in_ephemeral_pool")||!1,isLightweight:k.A.getValue(o,"/running_in_lightweight_pool")||!1,slotIndex:r[t],weight:e.weight||1}}))}}]),e}();ve=Ne,Ne.PREPARING_STATES=["materializing","initializing","preparing","pending"],Ne.RUNNING_STATES=["running","completing","failing","aborting","reviving"],Ne.INTERMEDIATE_STATES=[].concat((0,fe.A)(ve.RUNNING_STATES),(0,fe.A)(ve.PREPARING_STATES));var ke=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(e){var r;(0,A.A)(this,n),(r=t.call(this,e)).weight=void 0,r.title=void 0,r.type=void 0,r.user=void 0,r.suspended=void 0,r.input=void 0,r.output=void 0,r.startTime=void 0,r.finishTime=void 0,r.duration=void 0,r.jobs=void 0,r.completedJobs=void 0,r.runningJobs=void 0,r.failedJobs=void 0,r.totalJobs=void 0,r.completedJobsProgress=void 0,r.runningJobsProgress=void 0,r.jobsProgress=void 0;var a=r.$attributes,i=k.A.getValue(a,"/brief_spec");r.title=k.A.getValue(i,"/title"),r.type=k.A.getValue(a,"/type"),r.user=k.A.getValue(a,"/authenticated_user"),r.suspended=k.A.getValue(a,"/suspended");var o="remote_copy"===r.type?k.A.get((0,Ae.A)(r),"/@brief_spec/cluster_name"):void 0;r.input=r.computeIOProperties(i,"input",o),r.output=r.computeIOProperties(i,"output"),r.computePools(a),1===r.pools.length&&(r.weight=r.pools[0].weight),r.startTime=k.A.getValue(a,"/start_time"),r.finishTime=k.A.getValue(a,"/finish_time"),r.duration=xe()(r.finishTime)-xe()(r.startTime);var s=k.A.getValue(a,"/brief_progress"),l=r.jobs=k.A.getValue(s,"/jobs");return void 0!==l&&(r.completedJobs="object"===(0,ge.A)(l.completed)?l.completed.total:l.completed,r.runningJobs=l.running,r.failedJobs=l.failed,r.totalJobs=l.total,r.completedJobsProgress=r.completedJobs/r.totalJobs*100,r.runningJobsProgress=r.runningJobs/r.totalJobs*100,r.jobsProgress=r.completedJobsProgress+r.runningJobsProgress),r}return(0,b.A)(n,[{key:"computeIOProperties",value:function(e,t,n){var r=k.A.get(e,"/"+t+"_table_paths"),a={count:k.A.getValue(r,"/@count"),table:k.A.getValue(r,"/0"),url:void 0,remote:void 0};return n&&(a.url=function(e,t,n){return"/"+e+"/navigation?path="+t}(n,a.table),a.remote=!0),a}}]),n}(Ne),we=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(e,r){var a;(0,A.A)(this,n),(a=t.call(this,e)).$typedAttributes=void 0,a.alias=void 0,a.type=void 0,a.user=void 0,a.suspended=void 0,a.startTime=void 0,a.finishTime=void 0,a.duration=void 0,a.jobs=void 0,a.completedJobs=void 0,a.runningJobs=void 0,a.failedJobs=void 0,a.totalJobs=void 0,a.completedJobsProgress=void 0,a.runningJobsProgress=void 0,a.jobsProgress=void 0,a.totalFailedJobs=void 0,a.failedJobsProgress=void 0,a.description=void 0,a.title=void 0,a.typedSpec=void 0,a.typedProvidedSpec=void 0,a.typedFullSpec=void 0,a.typedUnrecognizedSpec=void 0,a.live_preview=void 0,a.$typedAttributes=r;var i=a.$attributes,o=a.$typedAttributes,s=k.A.getValue(i,"/spec"),l=k.A.getValue(i,"/full_spec");a.alias=k.A.getValue(s,"/alias"),a.typedSpec=k.A.getValue(o,"/spec"),a.typedProvidedSpec=k.A.getValue(o,"/provided_spec"),a.typedFullSpec=k.A.getValue(o,"/full_spec"),a.typedUnrecognizedSpec=k.A.getValue(o,"/unrecognized_spec"),a.title=k.A.getValue(s,"/title");var u=k.A.getValue(i,"/runtime_parameters/annotations");a.description=k.A.getValue(u,"/description"),a.description=a.description||k.A.getValue(s,"/description"),a.type=k.A.getValue(i,"/operation_type")||k.A.getValue(i,"/type"),a.user=k.A.getValue(i,"/authenticated_user"),a.suspended=k.A.getValue(i,"/suspended"),a.startTime=k.A.getValue(i,"/start_time"),a.finishTime=k.A.getValue(i,"/finish_time"),a.duration=xe()(a.finishTime)-xe()(a.startTime),a.computePools(i);var c=k.A.getValue(i,"/progress"),d=a.jobs=k.A.getValue(c,"/jobs");return void 0!==d&&(a.completedJobs="object"===(0,ge.A)(d.completed)?d.completed.total:d.completed,a.runningJobs=d.running,a.totalJobs=d.total,a.completedJobsProgress=a.completedJobs/a.totalJobs*100,a.runningJobsProgress=a.runningJobs/a.totalJobs*100,a.jobsProgress=a.completedJobsProgress+a.runningJobsProgress,a.failedJobs=d.failed,l&&(a.totalFailedJobs=k.A.getValue(l,"/max_failed_job_count")),a.failedJobsProgress=a.totalFailedJobs?a.failedJobs/a.totalFailedJobs*100:0),a.live_preview=k.A.getValue(c,"/live_preview"),a}return(0,b.A)(n,[{key:"getLivePreviewPath",value:function(e,t){var n=k.A.getBoolean(this.live_preview,"/virtual_table_format/".concat(e,"_supported")),r=!n&&k.A.getBoolean(this.live_preview,"/".concat(e,"_supported")),a=n?"/controller_orchid/live_previews":"",i="//sys/operations/".concat(w.A.utils.extractFirstByte(this.id),"/").concat(this.id).concat(a);switch(e){case"output":return Se("".concat(i,"/output_").concat(t||0),n,r);case"stderr":return Se("".concat(i,"/stderr"),n,r);case"intermediate":return Se("".concat(i,"/intermediate"),n,r);case"core":return n?Se("".concat(i,"/core"),n,!1):{}}return{}}}]),n}(Ne);function Se(e,t,n){return t?{virtualPath:e}:{path:n?e:void 0}}function Te(e,t){return void 0===e?t:e}function Ce(e){return function(t){var n=t.operations.jobs.filters[e];return Te(n.value,n.defaultValue)}}var Pe=(0,ye.Mz)([Ce("filterBy"),Ce("jobId")],(function(e,t){return"id"===e&&Boolean(t)})),Ee=n(39686),Re=n(53332),Ie=n(48971);function Oe(e){var t="[0-9a-fA-F]{1,8}";return new RegExp("^".concat(t,"-").concat(t,"-").concat(t,"-").concat(t,"$")).test(e)}function Ve(e){var t=new RegExp("^\\*[0-9a-zA-Z_-]+$");return Oe(e)||t.test(e)}var ze=n(78894),Fe=n(76365),Me=n(33952),De=n(64714),Le=(0,ye.Mz)([function(e){return k.A.getValue(e.operations.detail,"/operation/@runtime_parameters/erased_trees")}],(function(e){return g()(e,(function(e,t){return e[k.A.getValue(t)]=!0,e}),{})})),Je=(0,ye.Mz)([function(e){return e.operations.detail.details.alert_events}],(function(e){var t={};return g()(e,(function(e,n){var r=k.A.getValue(n.alert_type),a=k.A.getNumberDeprecated(n,"/error/code",NaN);return!a&&t[r]?(t[r].to=k.A.getValue(n.time),delete t[r]):a?(e.push({from:k.A.getValue(n.time),type:r,error:n.error,url:me(r)}),t[r]=e[e.length-1]):e.push({to:k.A.getValue(n.time),type:r,error:n.error,url:me(r)}),e}),[])})),Be=function(e){return e.operations.detail.operation},Ue=function(e){return k.A.getValue(e.operations.detail.operation)},We=(0,ye.Mz)([Be],(function(e){return k.A.getValue(e,"/@progress/tasks")})),He=(0,ye.Mz)([We],(function(e){return h()(e,"task_name").sort()})),qe=(0,ye.Mz)([function(e){return e.operations.detail.loading},function(e){return e.operations.detail.loaded},function(e){return e.operations.detail.error}],(function(e,t,n){return(0,Ie.Ts)(e,t,n)})),$e=function(e){return e.operations.detail.operation.$typedAttributes},Ke=((0,ye.Mz)([function(e){return e.operations.detail.operation.pools}],(function(e){return h()(e,"pool")})),(0,ye.Mz)([function(e){return e.operations.detail.monitorChartStates}],(function(e){return g()(e,(function(e,t){return t?e+1:e}),0)})),(0,ye.Mz)([function(e){return e.operations.jobs.loading},function(e){return e.operations.jobs.loaded},function(e){return e.operations.jobs.error}],(function(e,t,n){return(0,Ie.Ts)(e,t,n)}))),Ye=(0,ye.Mz)([Be],(function(e){return k.A.getValue(e,"/@experiment_assignments")})),Ge=(0,ye.Mz)([Be],(function(e){return k.A.getNumberDeprecated(e,"/@brief_progress/registered_monitoring_descriptor_count")})),Ze=(0,ye.Mz)([Ge],(function(e){return{visible:e>0&&e<=200,maxJobCount:200}})),Xe=new Fe.A,Qe=new ze.I,et=new Fe.A;function tt(e){return function(t,n){var r=!Oe(e),a=Object.assign({include_scheduler:!0,output_format:{$value:"json",$attributes:{stringify:!0,annotate_with_types:!0,encode_utf8:!1}}},r?{operation_alias:e}:{operation_id:e});return t({type:he.ZO.REQUEST,data:{isAlias:r,id:e}}),De.X8.getOperation(a,et).then(Ee.w1).then((function(n){var r=(0,o.A)(n,2),a=r[0],i=r[1],s=(0,Re.VS)(a),u=new we(s,a),c=function(){var n,r=(0,Ee.pj)(u),a=function(e,t){var n,r,a=function(e){if("remote_copy"===e.type)return{cluster:k.A.getValue(e,"/@spec/cluster_name"),network:k.A.getValue(e,"/@spec/network_name")}}(e);return{startedBy:Y(e),remote:a,transferTask:G(e),mode:k.A.getValue(e,"/@spec/mode"),input:(n=te(e,t),r=null==a?void 0:a.cluster,r?h()(n,(function(e){return(0,l.A)((0,l.A)({},e),{},{remote:!0,url:(0,H.K)((0,l.A)({cluster:r},e))})})):n),output:ae(e,t),stderr:ne(e,t),intermediate:ie(e),coredumps:re(e),mapper:se(e,"mapper"),reducer:se(e,"reducer"),reduceCombiner:se(e,"reduce_combiner"),tasks:le(e)}}(u,i),o=function(e){if(e)return h()(e,(function(e,t){return{error:e,helpURL:me(t)}}))}(k.A.getValue(u,"/@alerts")),s=k.A.getValue(u,"/@alert_events"),c=function(e){if("aborted"===e.state||"failed"===e.state)return k.A.getValue(e,"/@result")}(u),d=function(e){var t=k.A.getValue(e,"/@progress");if(t&&e.isRunning()){var n=k.A.getValue(t,"/scheduling_info_per_pool_tree");return n&&h()(n,(function(e,t){return{progress:e,name:t}}))}}(u),p=(0,de.k7)(u),v=function(e){if(k.A.getValue(e,"/@progress")){var t=[],n=k.A.getValue(e,"/@progress/estimated_input_statistics");return n&&t.push({name:"Estimated input",value:n}),t.concat(function(e){if(L(e))return function(e){var t=k.A.getValue(e,"/@progress/data_flow"),n=k.A.getValue(e,"/@progress/tasks"),r=g()(t,(function(e,t){var n=t.source_name,r=t.target_name,a=t.job_data_statistics,i=t.teleport_data_statistics;return e.push({from:n,to:r,info:t,value:m()(a).reduce((function(e,t){var n=k.A.getValue(a[t]),r=k.A.getValue(i[t]);return e[t]=n+r,e}),{}),job_data_statistics:D(a)?null:a,teleport_data_statistics:D(i)?null:i}),e}),[]),a=g()(n,(function(e,t,n){return e[t.task_name]=n,e}),{});return M()(r,(function(e){var t=e.from;return"input"===t?-1:a[t]}))}(e);var t=k.A.getValue(e,"/@progress/data_flow_graph"),n=k.A.getValue(t,"/topological_ordering"),r=k.A.getValue(t,"/edges"),a=[];return t&&O()(n,(function(e){O()(r[e],(function(t,n){a.push({from:e,to:n,value:t.statistics})}))})),a}(e))}}(u),f={specification:a,alerts:o,alert_events:s,error:c,runtime:d,events:p,resources:v};t({type:he.ZO.SUCCESS,data:{operation:u,actions:r,details:f}}),t((n=e,function(e,t){var r=Ze(t()),a=r.visible,i=r.maxJobCount;if(a)return e({type:he.MZ.REQUEST}),De.Qq.listJobs(De.Vu.listJobs100,{parameters:{operation_id:n,limit:i,with_monitoring_descriptor:!0},cancellation:Xe.removeAllAndSave}).then((function(t){var r=t.jobs;e({type:he.MZ.SUCCESS,data:{jobs:r,operation_id:n}})})).catch((function(t){(0,Fe.m)(t)?e({type:he.MZ.CANCELLED}):e({type:he.MZ.FAILURE,data:{error:t}})}))}))};u.inIntermediateState()?t(function(e,t){return function(){var n=(0,P.A)(R().mark((function n(r){var a;return R().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(a=k.A.get(e,"/@output_transaction_id"))||"0-0-0-0"===a){n.next=6;break}return r({type:he.M2.REQUEST}),n.abrupt("return",De.Qq.get(De.Vu.operationIntermediateResourceUsage,{path:"#"+a+"/@resource_usage"}).then((function(e){t();var n,a=(n=e,h()(n,(function(e,t){return(0,l.A)((0,l.A)({},e),{},{account:t})})));r({type:he.M2.SUCCESS,data:{resources:e,intermediateResources:a}})})).catch((function(){t(),r({type:he.M2.FAILURE})})));case 6:t(),r({type:he.M2.CANCELLED});case 8:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}(u,c)):c()})).catch((function(r){var a=!n().operations.detail.loaded;r.code!==Me.N.CANCELLED&&(a||Qe.add({name:"get operation",autoHiding:!1,theme:"danger",title:"Failed to load operation",content:r.message,actions:[{label:" view",onClick:function(){return(0,Ie.eW)(r)}}]}),t({type:he.ZO.FAILURE,data:{message:'Error occured when loading operation "'.concat(e,'"'),details:r}}))}))}}var nt=n(29063),rt=n(59028),at=n(52797),it=n(53144),ot=n.n(it),st=n(31470),lt=n.n(st),ut=["state"],ct=function(e){return e.operations.list.filters},dt=function(e){var t;return(null===(t=e.operations.list.filters.poolTree.counters)||void 0===t?void 0:t.pool_tree_counts)||{}},pt=function(e){var t;return(null===(t=function(e){return ct(e).pool}(e).counters)||void 0===t?void 0:t.pool_counts)||{}},mt=function(e){var t;return(null===(t=function(e){return ct(e).user}(e).counters)||void 0===t?void 0:t.user_counts)||{}},vt=(0,ye.Mz)([dt],_t),ht=(0,ye.Mz)([at.iq,dt],(function(e,t){return Nt(e,t)})),ft=(0,ye.Mz)([vt,ht],ot()),gt=(0,ye.Mz)([pt],_t),At=(0,ye.Mz)([at.K6,pt],Nt),bt=(0,ye.Mz)([gt,At],ot()),jt=(0,ye.Mz)([mt],_t),xt=(0,ye.Mz)([at.Le,mt],Nt),yt=(0,ye.Mz)([jt,xt],ot());function _t(e){return M()(h()(e,(function(e,t){return{value:t,text:t,counter:e}})),"text")}function Nt(e,t){return M()(h()(U()(e,(function(e){return void 0===t[e]})),(function(e){return{value:e,text:e}})),"text")}var kt=[{value:"withStderr",text:"With stderr"},{value:"withFailContext",text:"With fail context"},{value:"withSpec",text:"With full input"},{value:"withCompetitors",text:"With competitive jobs"},{value:"withMonitoringDescriptor",text:"With monitoring descriptor"}],wt=h()(kt,(function(e){return e.value})),St=(0,ye.Mz)([ct],(function(e){var t=e.text,n=e.user,r=e.subject,a=e.permissions,i=e.pool,o=e.poolTree,s=e.state,u=e.type,c=e.failedJobs,d=Et(r),p=Et(a),m=d||(null==p?void 0:p.length)>0?{subject:d,permissions:p||[]}:void 0,v={filter:Et(t),user:Et(n),pool:Et(i),pool_tree:Et(o),type:Et(u),with_failed_jobs:Et(c),access:m};return(0,l.A)({state:Et(s)},v)}));function Tt(e){var t=e.operations.list.timeRange,n=t.from;return{to_time:t.to,from_time:n}}var Ct=(0,ye.Mz)([St,at.ID,Tt,at.dB],(function(e,t,n,r){var a,i=n.from_time,o=n.to_time;if(null!==(a=(0,at.lt)(r).operationPageSettings)&&void 0!==a&&a.disableOptimizationForYTFRONT2838)return e;var s=e.state,u=(0,be.A)(e,ut);return Boolean(i||o)&&!z()(u,Boolean)&&(u.user=t),(0,l.A)({state:s},u)})),Pt=(0,ye.Mz)([St,Ct],(function(e,t){if(!lt()(e,t))return t.user}));function Et(e){return e.value===e.defaultValue?void 0:e.value}var Rt=n(40519);function It(e,t){return t===nt.Uu.ARCHIVE?xe()(e).toISOString():void 0}function Ot(e,t){return t===nt.Uu.ARCHIVE?xe()(e).subtract(6,"hours").toISOString():void 0}function Vt(e){return(0,l.A)((0,l.A)((0,l.A)((0,l.A)({},function(e){return Ct(e)}(e)),Tt(e)),{cursor_time:(t=e.operations.list.cursor).from,cursor_direction:t.direction}),{},{include_archive:e.operations.list.dataMode===nt.Uu.ARCHIVE,limit:20},Rt.R);var t}var zt=n(19314),Ft=n(11896),Mt=["operations","incomplete"],Dt=new Fe.A;function Lt(e){var t=e.timestamp,n=e.direction,r=e.firstPageReached,a=e.lastPageReached,i=e.resetLoadingStatus,o=void 0===i||i;return{type:nt.DE,data:{timestamp:t,direction:n,firstPageReached:r,lastPageReached:a,resetLoadingStatus:o}}}function Jt(){return function(e,t){var n=t();return e(Bt((0,at.dB)(n),Vt(n)))}}function Bt(e,t){return function(n){n({type:nt.bb});var r=new De.CT(e,Ft.c.OPERATIONS_LIST);return r.fetch(De.Vu.listOperations,De.Qq.listOperations(De.Vu.listOperations,{parameters:t,cancellation:Dt.removeAllAndSave})).then((function(e){var t=e.operations,a=e.incomplete,i=(0,be.A)(e,Mt);n(function(e){return function(t,n){var r=n().operations.list.cursor.direction;r===nt.Iv.PAST?t(Lt({lastPageReached:!e,resetLoadingStatus:!1})):r===nt.Iv.FUTURE&&t(Lt({firstPageReached:!e,resetLoadingStatus:!1}))}}(a)),n({type:nt.xX,data:r.wrap("parse",(function(){return h()(t,(function(e){return new ke(e)}))}))}),n({type:nt.bZ,data:i})})).catch((function(e){e.code===C().codes.CANCELLED?n({type:nt.nO}):n({type:nt.ce,data:{message:"Could not load operations.",details:e}})}))}}function Ut(){return Lt({timestamp:null,direction:nt.Iv.PAST,firstPageReached:!0,lastPageReached:!1})}function Wt(e,t){return function(n){n({type:nt.bS,data:{name:e,value:t}}),n(Ut())}}function Ht(){return function(e,t){var n=t().operations.list.dataMode,r=xe()();e({type:nt.EE,data:{from:Ot(r,n),to:It(r,n)}})}}function qt(e,t){return function(n){n({type:nt.vk,data:{dataMode:nt.Uu.ARCHIVE,from:e,to:t}}),n(Ut())}}function $t(){return{type:nt.FW}}var Kt=n(26264);function Yt(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:nt.dj,data:{operation:e,editable:t}}}var Gt=n(20989),Zt=n(64922),Xt=(0,a.A)("elements-heading"),Qt=(0,a.A)("runtime");function en(e){var t=(e.progress||{}).starvation_status;return(t?w.A.format.Readable(t):void 0)||null}_().arrayOf(_().shape({name:_().string.isRequired,progress:_().object.isRequired})),_().shape({$value:_().string,$attributes:_().object,type:_().string,user:_().string,pool:_().string,state:_().string,title:_().string,suspended:_().bool,duration:_().number,startTime:_().string,finishTime:_().string,description:_().object,pools:_().arrayOf(_().shape({tree:_().string.isRequired,pool:_().string.isRequired}))});var tn=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handlePoolEditClick=function(){var t=e.props;(0,t.showEditPoolsWeightsModal)(t.operation)},e}return(0,b.A)(n,[{key:"renderTree",value:function(e){var t,n,r,a,i=e.progress,o=e.name,s=this.props,l=s.cluster,u=s.operation,c=s.showEditPoolsWeightsModal,d=u.state,p={pool:i.pool,tree:o,weight:i.weight};return(0,Zt.jsxs)("div",{className:Qt("tree"),children:[(0,Zt.jsx)("div",{className:Xt({size:"s"}),children:w.A.format.ReadableField(o)}),(0,Zt.jsx)(N.Ay,{items:[[{key:"pool",value:(0,Zt.jsx)(Gt.s,{onEdit:this.handlePoolEditClick,cluster:l,state:d,pool:p,compact:!0})},{key:"weight",value:(0,Zt.jsx)(N.tJ,{operation:u,pool:p,onEdit:function(){return c(u)}})},{key:"min_share",value:S(i.min_share_ratio)+" / "+S(i.adjusted_min_share_ratio)},{key:"fair_share_ratio",value:S(i.fair_share_ratio)},{key:"usage_ratio",value:S(i.usage_ratio)},{key:"demand_ratio",value:S(i.demand_ratio)}],[{key:"Starvation status",value:(0,Zt.jsx)(en,{progress:i})},{key:"partitions",value:(null===(t=i.partitions)||void 0===t?void 0:t.completed)+" / "+(null===(n=i.partitions)||void 0===n?void 0:n.total),visible:Boolean(i.partitions)},{key:"scheduling_status",value:w.A.format.Readable(i.scheduling_status)},{key:"dominant_resource",value:w.A.format.Readable(i.dominant_resource)},{key:"preemptable_job_count",value:(0,Zt.jsx)(N.Bj.FormattedValue,{value:i.preemptable_job_count,format:"Number"})},{key:"memory_size_per_jobs",value:(0,Zt.jsx)(N.Bj.FormattedValue,{value:(null===(r=i.resource_demand)||void 0===r?void 0:r.memory)/(null===(a=i.resource_demand)||void 0===a?void 0:a.user_slots),format:"Bytes"}),visible:Boolean(i.resource_demand)}]]})]},o)}},{key:"render",value:function(){var e=this,t=this.props.runtime;return(0,Zt.jsx)("div",{className:Qt(),children:h()(t,(function(t){return e.renderTree(t)}))})}}]),n}(r.Component);const nn=(0,u.Ng)(null,{showEditPoolsWeightsModal:Yt})(tn);var rn=n(8208),an=n(11960),on=n(76426),sn=n(90826),ln=n(65692),un=(0,a.A)("operation-pools-weights"),cn=function(e){return g()(e,(function(e,t){var n=t.pool;return e[t.tree]=n,e}),{})},dn=function(e){return g()(e,(function(e,t){var n=t.weight;return e[t.tree]=String(n),e}),{})},pn=function(e){var t=e.cluster,n=e.operation,a=e.editable,i=e.pools,o=e.weights,u=e.setPools,c=e.setWeights;return h()(n.pools,(function(e){var n=e.tree,d=i[n],p="".concat(d," [").concat(n,"]"),m="/".concat(t,"/").concat(Kt.YW.SCHEDULING,"?tree=").concat(n,"&pool=").concat(d,"&tab=monitor");return(0,Zt.jsxs)(r.Fragment,{children:[(0,Zt.jsx)("div",{className:un("pool","elements-form_field"),children:a?(0,Zt.jsx)(ln.k,{value:d,onUpdate:function(e){u((0,l.A)((0,l.A)({},i),{},(0,s.A)({},n,e)))}}):(0,Zt.jsx)("span",{className:"elements-ellipsis",children:(0,Zt.jsx)(on.A,{url:m,title:p,children:(0,Zt.jsx)("span",{className:un("pool-link"),children:d})})})}),(0,Zt.jsx)("div",{className:un("tree","elements-form_field"),children:n}),(0,Zt.jsx)("div",{className:un("weight","elements-form_field"),children:a?(0,Zt.jsx)(ln.k,{value:o[n],onUpdate:function(e){c((0,l.A)((0,l.A)({},o),{},(0,s.A)({},n,e)))}}):(0,Zt.jsx)("span",{className:"elements-ellipsis",children:o[n]})})]},n)}))},mn={hideEditPoolsWeightsModal:function(){return{type:nt.O8}},setPoolsAndWeights:function(e,t,n){var r=window.location.pathname.split("/"),a=3===r.length&&r[2]===Kt.YW.OPERATIONS,i=e.$value,o=g()(e.pools,(function(e,t){return e[t.tree]=t,e}),{});return function(e){e({type:nt.wn.REQUEST});var r=g()(t,(function(e,r,a){var i=o[a];return n[a]&&i.weight!==Number(n[a])&&(e[a]=Object.assign({},{weight:Number(n[a])})),i.pool!==t[a]&&(e[a]=Object.assign(e[a]||{},{pool:t[a]})),e}),{});return C().v3.updateOperationParameters({operation_id:i,_parameters:{scheduling_options_per_pool_tree:r}}).then((function(){e(a?Jt():tt(i)),e({type:nt.wn.SUCCESS}),e({type:nt.O8})})).catch((function(t){t.code===C().codes.CANCELLED?e({type:nt.wn.CANCELLED}):e({type:nt.wn.FAILURE,data:{error:t}})}))}}};const vn=(0,u.Ng)((function(e){var t=e.operations.page.editWeightModal;return{loading:t.loading,loaded:t.loaded,error:t.error,errorData:t.errorData,visible:t.visible,editable:t.editable,operation:t.operation,cluster:(0,at.dB)(e)}}),mn)((function(e){var t=e.operation,n=e.setPoolsAndWeights,a=(0,r.useState)(cn(t.pools)),i=(0,o.A)(a,2),s=i[0],u=i[1],c=(0,r.useState)(dn(t.pools)),p=(0,o.A)(c,2),v=p[0],h=p[1];(0,r.useEffect)((function(){u(cn(t.pools)),h(dn(t.pools))}),[t.$value]);var f=e.loading,g=e.error,A=e.errorData,b=e.visible,j=e.editable,x=e.hideEditPoolsWeightsModal,y=(0,Zt.jsxs)("div",{className:un("title"),children:[j?"Edit":"View"," pools and weights"]});return(0,Zt.jsx)(an.A,{size:"l",title:y,loading:f,visible:b,footer:j,confirmText:"Apply",onConfirm:function(){n(t,s,v)},onCancel:x,isConfirmDisabled:function(){var e={operation:t},n="completed"!==e&&"failed"!==e&&"aborted"!==e,r=d()(m()(v),(function(e){var t=Number(v[e]);return!isNaN(t)&&t>0})),a=d()(m()(s),(function(e){var t=s[e];return Boolean(t)}));return!n||!r||!a},content:(0,Zt.jsxs)(r.Fragment,{children:[(0,Zt.jsx)("div",{className:un("name"),children:(0,Zt.jsx)(sn.A,{value:t.title||t.$value,inline:!0})}),(0,Zt.jsxs)("div",{className:un(),children:[(0,Zt.jsx)("div",{className:un("header"),children:"Pool"}),(0,Zt.jsx)("div",{className:un("header"),children:"Tree"}),(0,Zt.jsx)("div",{className:un("header"),children:"Weight"}),pn((0,l.A)((0,l.A)({},e),{},{pools:s,weights:v,setPools:u,setWeights:h}))]}),g&&(0,Zt.jsx)(rn.z,{className:un("error"),error:A})]})})}));var hn=n(18983),fn=n.n(hn),gn=n(3659),An=n(65873),bn=n(80545),jn=(0,a.A)("operation-progress"),xn=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){return(0,A.A)(this,n),t.apply(this,arguments)}return(0,b.A)(n,[{key:"renderCounter",value:function(e,t,n){var r=this.props,a=r.cluster,i=r.onLinkClick,o=this.props.operation.$value,s="/".concat(a,"/operations/").concat(o,"/jobs?state=").concat(e),l="View ".concat(e," jobs");return(0,Zt.jsxs)("div",{className:"operation-progress__counter",children:[(0,Zt.jsx)("span",{className:"operation-progress__counter-state",children:(0,Zt.jsx)(on.A,{theme:"ghost",title:l,url:s,routed:!0,onClick:i?function(){i(e)}:void 0,children:w.A.format.ReadableField(e)})}),(0,Zt.jsxs)("span",{className:"operation-progress__counter-value",children:[w.A.format.Number(t),"  /  ",w.A.format.Number(n)]})]})}},{key:"renderFailedJobCounters",value:function(){var e=this.props.operation,t=e.failedJobs,n=e.totalFailedJobs;return void 0!==n&&(0,Zt.jsx)("div",{className:"operation-progress__counters",children:this.renderCounter("failed",t,n)})}},{key:"renderJobCounters",value:function(){var e=this.props.operation,t=e.state,n=e.totalJobs,r=e.failedJobs,a=e.completedJobs,i=e.runningJobs;return e.isPreparing()?null:void 0!==n&&(0,Zt.jsxs)("div",{className:"operation-progress__counters",children:[e.inIntermediateState()&&this.renderCounter("running",i,n),"failed"===t&&this.renderCounter("failed",r,n),this.renderCounter("completed",a,n)]})}},{key:"renderState",value:function(){var e=this.props,t=e.showState,n=e.operation,r=n.suspended,a=n.state;return t?(0,Zt.jsx)("div",{className:jn("state"),children:(0,Zt.jsx)(bn.A,{label:r?"suspended":a})}):null}},{key:"renderFailedProgressBar",value:function(){var e=this.props.operation.failedJobsProgress;return(0,Zt.jsxs)("div",{className:"operation-progress__bar",children:[this.renderState(),(0,Zt.jsx)(An.k,{size:"s",value:e||0,theme:"danger"})]})}},{key:"renderProgressBar",value:function(){var e,t=this.props.operation,n=t.state,r=t.jobsProgress,a=t.completedJobsProgress,i=t.runningJobsProgress;switch(n){case"running":e=t.inIntermediateState()&&(0,Zt.jsx)(An.k,{size:"s",value:r||0,stack:[{value:a||0,theme:"success"},{value:i||0,theme:"info"}]});break;case"completed":e=(0,Zt.jsx)(An.k,{size:"s",value:100,theme:"success"});break;case"failed":e=(0,Zt.jsx)(An.k,{size:"s",value:100,theme:"danger"});break;case"aborted":e=(0,Zt.jsx)(An.k,{size:"s",value:100,theme:"default"});break;default:e=(0,Zt.jsx)(An.k,{size:"s",value:0})}return(0,Zt.jsxs)("div",{className:"operation-progress__bar",children:[this.renderState(),e]})}},{key:"render",value:function(){var e=this.props.type;return(0,Zt.jsxs)("div",{className:"operation-progress",children:["running"===e?this.renderProgressBar():this.renderFailedProgressBar(),"running"===e?this.renderJobCounters():this.renderFailedJobCounters()]})}}]),n}(r.Component);xn.defaultProps={type:"running"};const yn=(0,u.Ng)((function(e){return{cluster:(0,at.dB)(e)}}))(xn);var _n=n(28640),Nn=n(11394),kn=n(95664),wn=n(2211),Sn=n(46282),Tn=n(34380),Cn=n(7313),Pn=n(64772),En=n(56765),Rn=["table","count"],In=(0,a.A)("yt-operations-list-path-item");function On(e){var t=e.caption,n=e.item,a=e.transaction_id,i=e.user_transaction_id,s=n.table,u=n.count,c=(0,be.A)(n,Rn),d=r.useState(),p=(0,o.A)(d,2),m=p[0],v=p[1];return r.useEffect((function(){var e=k.A.getValue(s,"/@transaction_id");return(0,Ee.AY)(e)?v(e):(0,Ee.AY)(a)?v(a):void(0,Ee.QB)(i).then((function(){return v(i)}))}),[s,i,a]),(0,Zt.jsxs)("div",{className:In(null,"elements-meta-item"),children:[(0,Zt.jsx)("div",{className:"elements-meta-item__key",children:Pn.A.ReadableField(t)}),(0,Zt.jsx)("div",{className:"elements-meta-item__value",children:(0,Zt.jsxs)("span",{className:In("item-io"),children:[(0,Zt.jsx)("span",{className:In("item-count"),children:u}),(0,Zt.jsx)(En.A,(0,l.A)((0,l.A)({path:k.A.getValue(s)},c),{},{transaction:m,theme:"ghost",className:In("item-io-table")}))]})})]},t)}var Vn=(0,a.A)("operations-list");function zn(e,t){var n=function(e){return void 0!==e.title?e.title:e.$value}(e);return(0,Zt.jsx)(on.A,{routed:!0,className:"elements-ellipsis",url:"".concat(fn()(t,"/"),"/").concat(e.$value),theme:"primary",children:(0,Zt.jsx)("span",{children:gn.A.decode(n)})})}function Fn(e){return(0,Zt.jsx)(_n.A,{text:e.$value,view:"flat-secondary",size:"s",title:"Copy operation id",className:Vn("item-title-copy")})}function Mn(e){var t=e.awesomeIcon,n=e.children,r=e.title;return(0,Zt.jsxs)("div",{className:Vn("user-pool-item"),children:[(0,Zt.jsx)("div",{className:Vn("user-pool-item-icon"),children:(0,Zt.jsx)(Tn.m,{content:r,to:"left",allowUnmounted:!0,children:(0,Zt.jsx)(Sn.A,{face:"solid",awesome:t})})}),(0,Zt.jsx)("div",{className:Vn("user-pool-item-name"),children:n})]})}var Dn=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).renderTitle=function(t){var n=e.props.match.url,r="running"===k.A.getValue(t,"/@state"),a=r?k.A.getValue(t,"/@brief_spec/input_transaction_id"):void 0,i=r?k.A.getValue(t,"/@brief_spec/output_transaction_id"):void 0,o=r?k.A.getValue(t,"/@brief_spec/user_transaction_id"):void 0;return(0,Zt.jsxs)("div",{children:[(0,Zt.jsxs)("div",{className:Vn("item-title"),children:[Fn(t),zn(t,n)]}),(0,Zt.jsxs)("div",{className:Vn("item-io"),children:[t.input.count>0&&(0,Zt.jsx)(On,{caption:"in",item:t.input,user_transaction_id:o,transaction:a}),t.output.count>0&&(0,Zt.jsx)(On,{caption:"out",item:t.output,user_transaction_id:o,transaction:i})]})]})},e.renderUserPool=function(t){var n=e.props,a=n.showEditPoolsWeightsModal,i=n.cluster,o=t.pools,s=t.user,l=t.state,u=(null==o?void 0:o.length)>1||!1;return(0,Zt.jsxs)(r.Fragment,{children:[(0,Zt.jsx)(Mn,{awesomeIcon:"user",title:"User",children:(0,Zt.jsx)(kn.R,{name:s})}),(0,Zt.jsx)(Mn,{awesomeIcon:"poll-people",title:"Pool",children:u?e.renderMultiplePools(t):(0,Zt.jsx)(N.CD,{onEdit:function(){return a(t)},cluster:i,pools:o,state:l,compact:!0,allowDetachEditBtn:!0})}),!u&&(0,Zt.jsx)(Mn,{awesomeIcon:"weight-hanging",title:"Weight",children:(0,Zt.jsx)(N.tJ,{onEdit:function(){return a(t)},operation:t,pool:o[0]})})]})},e.renderActions=function(t){var n=e.props.promptAction,r=(0,Ee.pj)(t);return(0,Zt.jsx)("div",{className:Vn("actions"),children:r.map((function(r){var a=r.icon,i=r.name,o=r.$value,s=w.A.format.Readable(i),u=r.message||(0,Zt.jsxs)("span",{children:["Are you sure you want to ",(0,Zt.jsx)("strong",{children:r.name})," the operation"," ",o,"?"]}),c=function(n){var a=n.currentOption;return(0,Ee.wF)((0,l.A)((0,l.A)({},r),{},{operation:t,currentOption:a})).then((function(){e.props.updateOperationsList()}))};return(0,Zt.jsx)(wn.A,{withTooltip:!0,size:"m",view:"flat-secondary",tooltipProps:{placement:"bottom",content:s},onClick:function(){return n((0,l.A)((0,l.A)({},r),{},{message:u,handler:c}))},children:(0,Zt.jsx)(Sn.A,{awesome:a})},i)}))})},e.settings={css:"operations-list",theme:"light",striped:!1,virtualType:"simple",getItemLink:function(t){return"".concat(e.props.match.url,"/").concat(t.$value)},computeKey:function(e){return e.$value},columns:{sets:{default:{items:["title","type","user_pool","start_time","progress","actions"]}},mode:"default",items:{title:{name:"title",sort:!1,align:"left"},type:{name:"type",sort:!1,align:"left"},user:{name:"user",sort:!1,align:"left"},pool:{name:"pool",sort:!1,align:"left"},user_pool:{name:"user_pool",sort:!1,caption:"User / Pool",align:"left"},start_time:{name:"start_time",sort:!1,align:"left"},progress:{name:"progress",sort:!1,align:"left",caption:"State / Progress"},actions:{name:"actions",caption:"",sort:!1,align:"right"}}},templates:{title:e.renderTitle,user_pool:e.renderUserPool,type:n.renderType,start_time:n.renderStartTime,progress:n.renderProgress,actions:e.renderActions}},e}return(0,b.A)(n,[{key:"renderMultiplePools",value:function(e){var t=this.props.showEditPoolsWeightsModal;return(0,Zt.jsxs)("span",{className:Vn("multiply-pools"),children:[e.pools.length,(0,Zt.jsxs)(wn.A,{size:"s",view:"flat-secondary",title:"Show pools and weights",className:Vn("view-button"),onClick:function(){return t(e,!1)},children:[(0,Zt.jsx)(Sn.A,{awesome:"eye"})," View"]}),(0,Zt.jsx)(wn.A,{size:"s",view:"flat-secondary",title:"Edit pools and weights",className:Vn("edit-button"),onClick:function(){return t(e)},children:(0,Zt.jsx)(Sn.A,{awesome:"pencil"})})]})}},{key:"render",value:function(){var e=this.props,t=e.operations,n=e.initialLoading;return(0,Zt.jsx)(Nn.A,(0,l.A)({emptyDataDescription:"Please, change your filtering settings to see search results",isLoading:n,items:t},this.settings))}}],[{key:"renderType",value:function(e){return(0,Zt.jsx)("span",{className:Vn("item-type"),children:w.A.format.ReadableField(e.type)})}},{key:"renderStartTime",value:function(e){return(0,Zt.jsxs)("div",{className:Vn("item-start-time"),children:[(0,Zt.jsx)("div",{className:Vn("item-start-time-human"),children:w.A.format.DateTime(e.startTime,{format:"human"})}),(0,Zt.jsx)("div",{className:Vn("item-start-time-default"),children:w.A.format.DateTime(e.startTime)}),(0,Zt.jsx)("div",{className:Vn("item-duration"),title:"Duration",children:w.A.format.TimeDuration(e.duration)})]})}},{key:"renderProgress",value:function(e){return(0,Zt.jsx)(yn,{operation:e,showState:!0})}}]),n}(r.Component),Ln={showEditPoolsWeightsModal:Yt,promptAction:Cn.Jm,updateOperationsList:Jt};const Jn=(0,i.y)((0,u.Ng)((function(e){var t=e.operations,n=e.global,r=t.list,a=r.isLoading,i=r.hasLoaded;return{initialLoading:a&&!i,cluster:n.cluster,operations:t.list.operations}}),Ln)(Dn));var Bn=n(27592),Un=n(84162),Wn=(0,a.A)("operations-list"),Hn=(0,a.A)("elements-toolbar"),qn=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={transition:!1,value:""},e.gotoDetails=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.props.filter.value;Ve(t)&&e.setState({transition:!0,value:t})},e.handleKeyDown=function(t){"Enter"===t.key&&e.gotoDetails(t.target.value)},e}return(0,b.A)(n,[{key:"value",get:function(){var e=this.state.value,t=this.props.filter.value;return e||t}},{key:"render",value:function(){var e=this,t=this.props,n=t.match,r=t.updateFilter,a=t.activePreset,o=t.filter.value;return this.state.transition?(0,Zt.jsx)(i.rd,{to:"".concat(n.url,"/").concat(this.value)}):(0,Zt.jsxs)("div",{className:Wn("toolbar-text-filter",Hn("component")),children:[(0,Zt.jsx)(Un.A,{placeholder:"Filter operations...",size:"m",value:this.value,onChange:function(e){return r("text",e)},debounce:500,onKeyDown:this.handleKeyDown,pin:"round-brick"},a),(0,Zt.jsx)(wn.A,{view:"action",pin:"brick-round",onClick:function(){return e.gotoDetails(o)},disabled:!Ve(this.value),children:"Go to operation"})]})}}]),n}(r.Component),$n={updateFilter:Wt};const Kn=(0,i.y)((0,u.Ng)((function(e){var t=e.operations;return{filter:t.list.filters.text,activePreset:t.list.activePreset}}),$n)(qn));var Yn=n(36146),Gn=n.n(Yn),Zn=n(30002),Xn=n.n(Zn),Qn=n(92423),er=(0,a.A)("elements-form"),tr=(0,a.A)("timepicker"),nr="HH:mm",rr=(_().shape({_isAMomentObject:_().oneOf([!0])}),function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={time:"",date:""},e.handleTimeChange=function(t){var n=e.props.onChange,r=e._checkInputTimeValidity(t);e.setState({time:t}),r&&n(e._prepareOutputDate(t))},e}return(0,b.A)(n,[{key:"_checkInputTimeValidity",value:function(e){return new RegExp("[0-9]{2}:[0-9]{2}").test(e)&&xe()(e,nr).isValid()}},{key:"_checkDateValidity",value:function(e){var t=this.props.minDate,n=xe()(e).unix();return!t||n>xe()(t).unix()}},{key:"_prepareOutputDate",value:function(e){var t=this.state.date,n=xe()(t),r=xe()(e,nr);return r.year(n.year()),r.month(n.month()),r.date(n.date()),r.toISOString()}},{key:"renderIcon",value:function(e){return(0,Zt.jsx)(Sn.A,{awesome:e})}},{key:"render",value:function(){var e=this.state.time,t=this.props.disabled,n=this._prepareOutputDate(e),r=this._checkInputTimeValidity(e),a=this._checkDateValidity(n),i=r&&a,o=i?"":"Time should be specified as HH:MM.\nEstimated start time should be less than estimated finish time.";return(0,Zt.jsx)("div",{className:er("field",{theme:i?"valid":"invalid"},tr()),children:(0,Zt.jsx)(ln.k,{theme:"normal",size:"s",value:e,disabled:t,onUpdate:this.handleTimeChange,iconRight:this.renderIcon("clock"),controlAttrs:{maxLength:5,title:o},className:tr("control"),placeholder:"HH:mm"})})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.date!==t.date?{time:xe()(e.date).format(nr),date:e.date}:null}}]),n}(r.Component));rr.defaultProps={minDate:null,disabled:!1};var ar=n(87604),ir=n(15672),or=(0,a.A)("operations-list"),sr=(0,a.A)("elements-toolbar"),lr=(0,a.A)("elements-form"),ur={range:!1,controlSize:"s",format:"dd-MM-yyyy",outputFormat:"datetime",className:"operations-datepicker-control",popupClassName:"operations-datepicker-popup"},cr={custom:{text:"custom",value:"custom"},twoHours:{text:"last 2 hours",value:"twoHours",hours:2},day:{text:"last day",value:"day",hours:24},week:{text:"last week",value:"week",hours:168}};function dr(){var e=(0,u.d4)((function(e){return e.operations.list})),t=e.dataMode,n=e.timeRange,a=n.from,i=n.to,s=(0,u.wA)(),c=(0,r.useState)({modalVisible:!1,activeTypeValue:cr.custom.value,from:a||xe()().subtract(6,"hours").toISOString(),to:i||xe()().toISOString()}),d=(0,o.A)(c,2),p=d[0],m=d[1],v=(0,r.useCallback)((function(){m((0,l.A)((0,l.A)({},p),{},{modalVisible:!0}))}),[p]),h=(0,r.useCallback)((function(){m((0,l.A)((0,l.A)({},p),{},{modalVisible:!1}))}),[p]),f=(0,r.useCallback)((function(){h(),s((function(e){e({type:nt.vk,data:{dataMode:nt.Uu.CURRENT}}),e(Ut())}))}),[s,h]),g=(0,r.useCallback)((function(){h(),"custom"===p.activeTypeValue?s(qt(p.from,p.to)):s(qt(xe()().subtract(cr[p.activeTypeValue].hours,"hours").toISOString(),xe()().toISOString()))}),[s,h,p]),A=(0,r.useCallback)((function(){if(t===nt.Uu.CURRENT)return"Current operations";var e="DD-MM-YYYY HH:mm";return xe()(a).format(e)+" — "+xe()(i).format(e)}),[t,a,i]),b=(0,r.useCallback)((function(e){var t=Gn()(e,(function(e,t){if(e){var n=xe()(p[t]).toObject(),r=n.hours,a=n.minutes;return xe()(e).add({hours:r,minutes:a}).toISOString()}return e}));m((0,l.A)((0,l.A)({},p),t))}),[p]),j=(0,r.useCallback)((function(e){return m((0,l.A)((0,l.A)({},p),e))}),[p]),x=(0,r.useCallback)((function(e){var t=e.target.value;m((0,l.A)((0,l.A)({},p),{},{activeTypeValue:t},"custom"!==t&&{from:xe()().subtract(cr[t].hours,"hours").toISOString(),to:xe()().toISOString()}))}),[p]),y=A(),_=t===nt.Uu.ARCHIVE,N=p.activeTypeValue!==cr.custom.value;return(0,Zt.jsxs)("div",{className:or("archive-range",sr("component")),children:[(0,Zt.jsx)(an.A,{title:"Choose range",size:"s",confirmText:"Apply",cancelText:"Show current",cl:lr("time-modal"),visible:p.modalVisible,content:(0,Zt.jsxs)("div",{className:lr(null,"operations-archive-filter"),children:[(0,Zt.jsx)("div",{className:lr("button-group"),children:(0,Zt.jsx)(ar.A,{name:"time-range",items:Xn()(cr),value:p.activeTypeValue,onChange:x})}),(0,Zt.jsxs)("div",{children:[(0,Zt.jsx)("div",{className:lr("label"),children:"From"}),(0,Zt.jsxs)("div",{className:lr("field-group"),children:[(0,Zt.jsx)("span",{className:lr("field"),children:(0,Zt.jsx)(ir.t1,(0,l.A)((0,l.A)({},ur),{},{disabled:N,from:p.from,onUpdate:function(e){var t=e.from;return t&&b({from:t})}}))}),(0,Zt.jsx)("span",{className:lr("field"),children:p.from&&(0,Zt.jsx)(rr,{disabled:N,date:p.from,onChange:function(e){return j({from:e})}})})]}),(0,Zt.jsx)("div",{className:lr("label"),children:"To"}),(0,Zt.jsxs)("div",{className:lr("field-group"),children:[(0,Zt.jsx)("span",{className:lr("field"),children:(0,Zt.jsx)(ir.t1,(0,l.A)((0,l.A)({},ur),{},{disabled:N,to:p.to,onUpdate:function(e){var t=e.from;return t&&b({to:t})}}))}),(0,Zt.jsx)("span",{className:lr("field"),children:p.to&&(0,Zt.jsx)(rr,{disabled:N,date:p.to,onChange:function(e){return j({to:e})}})})]})]})]}),renderCustomCancel:function(e){return(0,Zt.jsx)(Qn.$,{title:"Show current",className:e,onClick:f,children:"Show current"})},onCancel:h,onConfirm:g}),(0,Zt.jsxs)(wn.J,{type:"submit",selected:_,title:y,onClick:v,children:[y,(0,Zt.jsx)(Sn.A,{awesome:"calendar-alt"})]})]})}var pr=n(50074),mr=n(77723),vr=["name","value","type","placeholder"],hr=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).onRadioChange=function(t){return e.props.updateFilter(e.props.name,t)},e.onCheckChange=function(t){return e.props.updateFilter(e.props.name,t)},e}return(0,b.A)(n,[{key:"items",get:function(){var e=this.props,t=e.value,n=e.states,r=e.counters,a=e.withCounters,i=!1,o=h()(n,(function(e){var n="string"==typeof e?e:e.name,o=r&&(r[n]||0);return n===t&&(i=!0),{value:n,text:e.caption||w.A.format.ReadableField(n),count:a?o:void 0}}));return"string"!=typeof t||i||o.push({value:t,text:w.A.format.ReadableField(t)}),o}},{key:"render",value:function(){var e=this.props,t=e.name,n=e.value,r=e.type,a=e.placeholder,i=(0,be.A)(e,vr),o=this.props.multiple,s="function"==typeof a?a(n):a,u="radio"===r?this.onRadioChange:this.onCheckChange;return(0,Zt.jsx)(pr.A,(0,l.A)((0,l.A)({hideFilter:!0},i),{},{placeholder:s,value:Array.isArray(n)?n:[n],type:r,items:this.items,onUpdate:function(e){return u(o?e:e[0])},label:w.A.format.FirstUppercase(t)+":"}))}}]),n}(r.Component);hr.defaultProps={withCounters:!0,type:"radio"};const fr=(0,u.Ng)((function(e,t){var n=e.operations.list.filters,r=t.name,a=t.states,i=n[r],o=i.defaultValue,s=i.value,l=function(e,t,n){var r=k.A.getValue(n,"/".concat(e,"_counts"));return w.A.filter.countCategoriesNG({items:h()(r,(function(e,t){return{count:e,value:t}})),categories:w.A.filter.flattenCategoriesNG(t,"name"),custom:function(e,t){t[e.value]+=e.count,t.all+=e.count}})}(r,a,i.counters);return{value:Te(s,o),defaultValue:o,counters:l}}),{updateFilter:Wt})(hr);var gr=n(14391),Ar=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).gotoFirstPage=function(){e.props.gotoOperationsPage(nt.b4.FIRST)},e.gotoLastPage=function(){e.props.gotoOperationsPage(nt.b4.LAST)},e.gotoNextPage=function(){e.props.gotoOperationsPage(nt.b4.NEXT)},e.gotoPrevPage=function(){e.props.gotoOperationsPage(nt.b4.PREV)},e}return(0,b.A)(n,[{key:"render",value:function(){var e=this.props,t=e.firstPageReached,n=e.lastPageReached;return(0,Zt.jsx)(gr.A,{size:"s",first:{handler:this.gotoFirstPage,disabled:t},previous:{handler:this.gotoPrevPage,hotkeyHandler:this.gotoPrevPage,hotkeyScope:"all",hotkey:"ctrl+left, command+left"},next:{handler:this.gotoNextPage,hotkeyHandler:this.gotoNextPage,hotkeyScope:"all",hotkey:"ctrl+right, command+right"},last:{handler:this.gotoLastPage,disabled:n}})}}]),n}(r.Component),br={gotoOperationsPage:function(e){return function(t,n){var r=n().operations.list,a=r.dataMode,i=r.timeRange,o=r.cursor,s=r.operations;switch(e){case nt.b4.FIRST:t(Ut()),a===nt.Uu.CURRENT&&t(Ht());break;case nt.b4.LAST:a===nt.Uu.CURRENT&&t(Ht()),t(Lt({timestamp:i.from,direction:nt.Iv.FUTURE,firstPageReached:!1,lastPageReached:!0}));break;case nt.b4.NEXT:o.lastPageReached||(a===nt.Uu.CURRENT&&t(Ht()),t(Lt({timestamp:k.A.getValue(s[s.length-1],"/@start_time"),direction:nt.Iv.PAST,firstPageReached:!1})));break;case nt.b4.PREV:o.firstPageReached||(a===nt.Uu.CURRENT&&t(Ht()),t(Lt({timestamp:k.A.getValue(s[0],"/@start_time"),direction:nt.Iv.FUTURE,lastPageReached:!1})))}}}};const jr=(0,u.Ng)((function(e){var t=e.operations.list.cursor;return{firstPageReached:t.firstPageReached,lastPageReached:t.lastPageReached}}),br)(Ar);var xr=n(16413),yr=n(91071),_r=n(79329),Nr=n(66026),kr=n(21594),wr=(0,ye.Mz)([function(e){return e.operations.list.isLoading},function(e){return e.operations.list.hasLoaded},function(e){return e.operations.list.hasError}],(function(e,t,n){var r=(0,Ie.Ts)(e,t,n);return(0,Ie.RP)(r)})),Sr=(0,ye.Mz)([Nr.Cq,at.ID],(function(e,t){var n=U()(Object.keys(e),(function(e){return e.startsWith(zt.dK.OPERATION_PRESETS.value)}));return(0,l.A)((0,l.A)({},function(e){var t;return t={},(0,s.A)(t,yr.Kp,{name:"My/Running",preconfigured:!0,filters:(0,l.A)((0,l.A)({},yr.E4),{},{user:e,state:"running"})}),(0,s.A)(t,"failed",{name:"My/Failed",preconfigured:!0,filters:(0,l.A)((0,l.A)({},yr.E4),{},{user:e,state:"failed"})}),t}(t)),g()(n,(function(t,n){return t[n.slice((zt.dK.OPERATION_PRESETS.value+kr.yV).length)]=(0,l.A)({},e[n]),t}),{}))})),Tr=(0,ye.Mz)([ct,Sr],(function(e,t){return g()(t,(function(t,n,r){var a=n.filters;return d()(a,(function(t,n){var r,a=n;return lt()(null===(r=e[a])||void 0===r?void 0:r.value,t)}))&&t.add(r),t}),new Set)})),Cr="toolbar-presets",Pr=(0,a.A)("operations-list"),Er=(0,a.A)("elements-toolbar"),Rr=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={presetName:"",isPresetDefault:!1},e.onConfirm=function(){var t=e.props,n=t.saveFilterPreset,r=t.toggleSaveFilterPresetDialog,a=e.state;n(a.presetName,a.isPresetDefault).then((function(){e.setState({presetName:"",isPresetDefault:!1}),r()}))},e.makeRemoveHandler=function(t){return function(n){n.stopPropagation(),e.props.removeFilterPreset(t)}},e.isPresetNameEmpty=function(){return!e.state.presetName},e}return(0,b.A)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.applyFilterPreset,n=e.defaultPreset,r=e.presets;e.location.search.length<=1&&t(r[n],!1)}},{key:"renderSavePresetDialog",value:function(){var e=this,t=this.props,n=t.dialog,i=t.toggleSaveFilterPresetDialog,o=this.state,s=o.presetName,l=o.isPresetDefault,u=(0,a.A)("elements-form"),c="save-preset-filter";return(0,Zt.jsx)(an.A,{title:"Save filter",confirmText:"Save",visible:n.isSaving,onCancel:i,onConfirm:this.onConfirm,isConfirmDisabled:this.isPresetNameEmpty,content:(0,Zt.jsxs)(r.Fragment,{children:[(0,Zt.jsxs)("div",{className:u("field"),children:[(0,Zt.jsx)("label",{htmlFor:c,className:u("label"),title:"Filter name",children:"Filter name"}),(0,Zt.jsx)(ln.k,{id:c,value:s,onUpdate:function(t){return e.setState({presetName:t})},autoFocus:!0})]}),(0,Zt.jsx)("div",{className:u("field"),children:(0,Zt.jsx)(xr.S,{checked:l,onChange:function(t){return e.setState({isPresetDefault:t})},children:"Default filter"})})]})})}},{key:"render",value:function(){var e=this,t=this.props,n=t.defaultPreset,r=t.presets,a=t.applyFilterPreset,i=t.activePresets;return(0,Zt.jsxs)("div",{className:Pr(Cr,Er("container")),children:[this.renderSavePresetDialog(),h()(r,(function(t,r){var o=i.has(r);return(0,Zt.jsx)("div",{className:Pr(Cr,Er("component")),children:(0,Zt.jsx)(Qn.$,{className:Pr("preset",{active:o}),onClick:function(){return a(t)},role:"button",selected:o,children:(0,Zt.jsxs)("span",{className:Pr("preset-content"),children:[(0,Zt.jsxs)("span",{className:Pr("preset-name"),children:[n===r&&(0,Zt.jsx)(Sn.A,{awesome:"star-alt"})," ",t.name]}),!t.preconfigured&&(0,Zt.jsx)("span",{className:Pr("preset-remove"),onClick:e.makeRemoveHandler(r),children:(0,Zt.jsx)(Sn.A,{face:"solid",awesome:"times"})})]})})},r)}))]})}}]),n}(r.Component),Ir={applyFilterPreset:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(n){n({type:nt.a6,data:{preset:e}}),t&&n(Ut())}},removeFilterPreset:function(e){return function(t){t((0,rt.dH)(e,zt.dK.OPERATION_PRESETS))}},saveFilterPreset:function(e,t){return function(n,r){var a=Promise.resolve(),i=w.A.guid();return t&&(a=n((0,rt.ZC)(nt.Pc,zt.dK.OPERATION,i))),a.then((function(){var t,a;n((0,rt.ZC)(i,zt.dK.OPERATION_PRESETS,{name:e,filters:(t=r(),a=t.operations.list.filters,g()(a,(function(e,t,n){var r=t.value;return(0,l.A)((0,l.A)({},e),{},(0,s.A)({},n,r))}),{}))}))}))}},toggleSaveFilterPresetDialog:$t};const Or=(0,i.y)((0,u.Ng)((function(e){var t=e.operations,n=(0,_r.th)(e)(nt.Pc,zt.dK.OPERATION),r=Sr(e);return r[n]||(n=yr.Kp),{presets:r,activePresets:Tr(e),defaultPreset:n,dialog:t.list.savePresetDialog}}),Ir)(Rr));var Vr=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){return(0,A.A)(this,n),t.apply(this,arguments)}return(0,b.A)(n,[{key:"render",value:function(){var e=this.props,t=e.states,r=e.name,a=e.placeholder,i=e.updateFilter,o=e.value,s=e.defaultValue,l=e.pin;return(0,Zt.jsx)(mr.A,{apply:function(e){return i(r,e||s)},filter:n.simpleSuggestLoader,text:o!==s?o:"",items:t,placeholder:a,zIndexGroupLevel:1,clear:function(){return i(r,s)},pin:l},o)}}],[{key:"simpleSuggestLoader",value:function(e,t){return t=t.toLowerCase(),U()(e,(function(e){var n="string"==typeof e?e:e.value;return!t||-1!==n.toLowerCase().indexOf(t)}))}}]),n}(r.Component),zr=function(e,t){var n=ct(e)[t],r=n.defaultValue;return{name:t,value:Te(n.value,r),defaultValue:r}},Fr=(0,u.Ng)((function(e){return(0,l.A)((0,l.A)({},zr(e,"poolTree")),{},{states:ft(e),placeholder:"Pool tree..."})}),{updateFilter:Wt})(Vr),Mr=(0,u.Ng)((function(e){return(0,l.A)((0,l.A)({},zr(e,"pool")),{},{states:bt(e),placeholder:"Filter pool..."})}),{updateFilter:Wt})(Vr),Dr=(0,u.Ng)((function(e){var t=Pt(e);return(0,l.A)((0,l.A)({},zr(e,"user")),{},{states:yt(e),placeholder:t||"Started by..."})}),{updateFilter:Wt})(Vr);function Lr(){var e=(0,u.wA)(),t=(0,u.d4)(ct).subject.value;return(0,Zt.jsx)("div",{children:W.Ay.renderUserSuggest({value:"string"==typeof t&&t?[t]:[],onUpdate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=(0,o.A)(t,1)[0];e(Wt("subject",n))},width:"max",pin:"round-clear",placeholder:"Accessible for...",hasClear:!0})})}var Jr=r.memo(Lr),Br=n(74069),Ur=(0,a.A)("operations-list"),Wr=(0,a.A)("elements-toolbar"),Hr=Wr("component"),qr=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){return(0,A.A)(this,n),t.apply(this,arguments)}return(0,b.A)(n,[{key:"preparePermissionsPlaceholder",value:function(e){return 0===e.length?"Select...":h()(e,(function(e){return e[0].toUpperCase()})).join(", ")}},{key:"renderTopSection",value:function(){return(0,Zt.jsxs)("div",{className:Wr("container"),children:[(0,Zt.jsx)(Kn,{}),(0,Zt.jsxs)("div",{className:Ur("toolbar-pool-filter",Hr),children:[(0,Zt.jsx)(Br.DG,{}),(0,Zt.jsx)(Fr,{pin:"round-clear"}),(0,Zt.jsx)(Mr,{pin:"brick-round"})]}),(0,Zt.jsx)(dr,{}),(0,Zt.jsx)("div",{className:Ur("toolbar-pagination",Hr),children:(0,Zt.jsx)(jr,{})})]})}},{key:"renderBottomSection",value:function(){var e=this.props,t=e.failedJobsFilter,n=e.updateFilter,r=e.toggleSaveFilterPresetDialog;return(0,Zt.jsxs)("div",{className:Wr("container"),children:[(0,Zt.jsx)("div",{className:Ur("toolbar-user-filter",Hr),children:(0,Zt.jsx)(Dr,{})}),(0,Zt.jsxs)("div",{className:Ur("toolbar-access-filters",Hr),children:[(0,Zt.jsx)(Jr,{pin:"round-clear"}),(0,Zt.jsx)(fr,{type:"check",name:"permissions",withCounters:!1,placeholder:this.preparePermissionsPlaceholder,states:[{name:"read",show:!0},{name:"manage",show:!0}],width:170,multiple:!0,pin:"brick-round"})]}),(0,Zt.jsx)("div",{className:Ur("toolbar-state-filter",Hr),children:(0,Zt.jsx)(fr,{name:"state",states:[{name:"all",caption:"All states",show:!0},{name:"pending",show:!0},{name:"running",show:!0},{name:"completed",show:!0},{name:"failed",show:!0},{name:"aborted",show:!0}],width:200})}),(0,Zt.jsx)("div",{className:Ur("toolbar-type-filter",Hr),children:(0,Zt.jsx)(fr,{name:"type",states:[{name:"all",caption:"All types",show:!0},{name:"map",show:!0},{name:"reduce",show:!0},{name:"map_reduce",show:!0},{name:"join_reduce",show:!0},{name:"merge",show:!0},{name:"sort",show:!0},{name:"erase",show:!0},{name:"remote_copy",show:!0},{name:"vanilla",show:!0}],width:200})}),(0,Zt.jsx)("div",{className:Ur("failed-jobs",Hr),children:(0,Zt.jsxs)(wn.J,{selected:t.value,onClick:function(){return n("failedJobs",!t.value)},children:["Only ops with failed jobs:"," ",(0,Zt.jsx)("span",{className:Ur("only-jobs-with-failed-counter"),children:t.counter})]})}),(0,Zt.jsx)("div",{className:Ur("toolbar-save-preset",Hr),children:(0,Zt.jsxs)(wn.A,{title:"Save filter",onClick:r,className:Ur("save-preset"),children:[(0,Zt.jsx)(Sn.A,{awesome:"save",face:"regular"}),"  Save filter"]})})]})}},{key:"renderWarning_uiissue_2838",value:function(){return(0,Zt.jsxs)("div",{className:Ur("ytfront-2838"),children:["At the moment there is the unresolved performance issue with getting unfiltered list of operations from archive,",(0,Zt.jsx)("br",{}),'as a temporary solution UI adds current username to "Started by" filter if there are no any other filters specified.']})}},{key:"render",value:function(){var e=this,t=this.props.fixedStartedByFilter;return(0,Zt.jsx)(Bn.X,{children:function(n){var r=n.sticky,a=n.topStickyClassName;return(0,Zt.jsxs)("div",{className:Ur("toolbar",{sticky:r},[Wr(),a]),children:[e.renderTopSection(),e.renderBottomSection(),t&&e.renderWarning_uiissue_2838(),(0,Zt.jsx)(Or,{})]})}})}}]),n}(r.PureComponent);function $r(){var e=(0,u.d4)(at.Le),t=((0,u.d4)((function(e){return e.operations.list.filters}))||{}).failedJobs,n=(0,u.d4)(Pt),a=(0,u.wA)(),i=r.useCallback((function(){a(Wt.apply(void 0,arguments))}),[a]),o=r.useCallback((function(){a($t.apply(void 0,arguments))}),[a]);return(0,Zt.jsx)(qr,{subjects:e,failedJobsFilter:t,fixedStartedByFilter:n,updateFilter:i,toggleSaveFilterPresetDialog:o})}const Kr=r.memo($r);var Yr=n(13685),Gr=n(46357),Zr=n(22636),Xr=(0,a.A)("operations-list");function Qr(e){var t=e.timeRange,n=(0,u.wA)(),a=(0,u.d4)(at.dB),i=(0,u.d4)(Vt),o=(0,Yr.rN)(a,i),s=r.useCallback((function(){n(Bt.apply(void 0,(0,fe.A)(o)))}),[n,o]);return(0,Yr.Tt)(s,{onlyOnce:ea(t)}),null}function ea(e){var t=e.from,n=e.to;if("string"==typeof t&&"string"==typeof n){var r=xe()(t),a=xe()(n).diff(r);return xe().duration(a).asDays()>=1}return!1}var ta=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){return(0,A.A)(this,n),t.apply(this,arguments)}return(0,b.A)(n,[{key:"isTimeRangeChanged",value:function(e){var t=this.props.timeRange;return t.from!==e.from||t.to!==e.to}},{key:"renderError",value:function(){var e=this.props.error,t=e.message,n=e.details;return(0,Zt.jsx)(rn.z,{message:t,error:n})}},{key:"firstTimeError",value:function(){var e=this.props,t=e.hasLoaded;return e.hasError&&!t}},{key:"render",value:function(){var e=this.props,t=e.hasError,n=e.inDashboard,r=e.timeRange;return(0,Zt.jsxs)("div",{className:Xr(),children:[(0,Zt.jsx)(Qr,{timeRange:r}),n&&(0,Zt.jsx)("div",{className:(0,a.A)("elements-heading")({size:"l"}),children:"Operations"}),(0,Zt.jsx)(Kr,{}),t&&this.renderError(),!this.firstTimeError()&&(0,Zt.jsx)(Jn,{})]})}}]),n}(r.Component);ta.defaultProps={inDashboard:!1};var na=(0,u.Ng)((function(e){var t=e.operations.list,n=t.isLoading,r=t.hasLoaded,a=t.hasError,i=t.error;return{timeRange:t.timeRange,isLoading:n,hasLoaded:r,hasError:a,error:i}}))(ta);function ra(){var e=(0,u.d4)(wr);return(0,Gr.v)({type:Ft.c.OPERATIONS_LIST,startDeps:[e],allowStart:function(e){return!(0,o.A)(e,1)[0]}}),(0,Zr.ol)({type:Ft.c.OPERATIONS_LIST,stopDeps:[e],allowStop:function(e){return(0,o.A)(e,1)[0]}}),(0,Zt.jsx)(na,{})}const aa=r.memo(ra);var ia=n(69835),oa=n(91326),sa=n(83611),la=n(64675),ua=(0,a.A)("yt-histogram");function ca(e){var t=e.className,n=e.data,a=e.xLabel,i=e.yLabel,s=e.yLogarithmic,u=e.yMin,c=e.xFormat,d=void 0===c?Pn.A.Number:c,p=e.yFormat,m=void 0===p?Pn.A.Number:p,v=e.renderTooltip,h=void 0===v?pa:v,f=r.useMemo((function(){var e=function(e){var t=e.min,n=e.max,r=e.count,a=t===n?1:(n-t)/Math.max(r.length,1),i=[void 0].concat((0,fe.A)(r)),o=[t-a/2];if(r.length>1)for(var s=0;s<r.length;++s)o.push(t+s*a+a/2);else o.push(t);return o.push(n+a/2),i.push(void 0),{timeline:o,serieData:i,step:t===n?0:a}}(n),t=e.timeline,r=e.serieData,c=e.step;return{data:{timeline:t,graphs:[(0,l.A)({type:"column",data:s?r.map((function(e){return 0===e?NaN:e})):r,color:(0,la.g)(0),formatter:m},{renderOptions:{size:[1],gap:1}})]},libraryConfig:{axes:{x:{label:a,values:function(e,t){return t.map(d)}},y:{label:i}},scales:{y:{min:u,type:s?"logarithmic":"linear"}},tooltip:{render:function(e){var t,n=e.x,r=(0,o.A)(e.scales,1),a=(0,o.A)(r[0].rows,1)[0].originalValue;return null!==(t=h(m(isNaN(a)?0:a),d(n-c/2),d(n+c/2)))&&void 0!==t?t:"-"}}}}}),[n,a,i,d,m,h,u,s]);return(0,Zt.jsx)("div",{className:ua(null,t),children:(0,Zt.jsx)(la.A,{type:"yagr",data:f})})}const da=r.memo(ca);var pa=function(e,t,n){return"<b>".concat(e,"</b> for range from <b>").concat(t,"</b> to <b>").concat(n,"</b>")};function ma(e,t){var n=null!=e?e:{},r=n.min,a=n.max;if(r!==a&&void 0!==r&&void 0!==a){var i=r+(a-r)/10;if(t(r)===t(i))for(var o=0;o<5;++o){var s={digits:o+2};if(t(r,s)!==t(i,s))return{digits:o+3}}}}var va=(0,a.A)("operation-detail-partition-sizes"),ha=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={},e.formatX=function(t){var n=e.state.formatSettings;return Pn.A.Bytes(t,n)},e.renderTooltip=function(e,t,n){return"<b>".concat(e,"</b> jobs have estimated input job size from ").concat(t," to ").concat(n)},e}return(0,b.A)(n,[{key:"render",value:function(){var e=this.state.data;return e?(0,Zt.jsx)(ia.A,{children:(0,Zt.jsx)("div",{className:va(),children:(0,Zt.jsx)(da,{className:va("charts"),data:e,yLabel:"partition count",xLabel:"partition data weight",xFormat:this.formatX,yMin:.5,yLogarithmic:!0,renderTooltip:this.renderTooltip})})}):null}}],[{key:"getDerivedStateFromProps",value:function(e){var t=k.A.getValue(e.operation,"/@progress"),n=t&&k.A.getValue(t,"/partition_size_histogram");return{formatSettings:ma(n,Pn.A.Bytes),data:n}}}]),n}(r.Component),fa=(0,u.Ng)((function(e){return{operation:e.operations.detail.operation,chartKitTheme:(0,at.O4)(e)}}))(ha);function ga(){var e=(0,u.d4)(qe);return(0,Gr.v)({type:Ft.c.OPERATION_TAB_PARTITION_SIZES,additionalStartType:Ft.c.OPERATION,startDeps:[e],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Ie.RP)(t)}}),(0,Zr.ol)({type:Ft.c.OPERATION_TAB_PARTITION_SIZES,stopDeps:[e],allowStop:function(e){var t=(0,o.A)(e,1)[0];return(0,Ie.RP)(t)}}),(0,Zt.jsx)(fa,{})}var Aa=n(77318),ba=n(16727),ja=n(93209),xa=n(44458),ya=(0,a.A)("alert-events"),_a=[{name:"Type",render:function(e){var t=e.row;return(0,Zt.jsxs)("span",{children:[Pn.A.Readable(t.type),Boolean(t.url)&&(0,Zt.jsxs)(on.A,{url:t.url,theme:"secondary",children:[" ",(0,Zt.jsx)(Sn.A,{awesome:"question-circle"})]})]})}},{name:"Period",render:function(e){var t=e.row,n=t.from,a=t.to;return(0,Zt.jsxs)(r.Fragment,{children:[(0,Zt.jsx)(ba.Bj.Time,{time:n,settings:{format:"full"},valueFormat:"DateTime"})," - ",a?(0,Zt.jsx)(ba.Bj.Time,{time:a,settings:{format:"full"},valueFormat:"DateTime"}):"..."]})}},{name:"",render:function(e){var t=e.row;return(0,Zt.jsx)(ja.S,{onClick:function(){(0,Ie.eW)(t.error,{type:"alert",hideOopsMsg:!0,helpURL:t.url})},children:"Details"})}}];function Na(e){var t=e.className,n=e.items,a=r.useState(!1),i=(0,o.A)(a,2),s=i[0],l=i[1],u=r.useMemo((function(){return n.sort((function(e,t){return(0,xa.IP)(e.to,t.to,-1,-1)||(0,xa.IP)(e.from,t.from,-1,1)}))}),[n]),c=r.useMemo((function(){return s?u:u.slice(0,5)}),[s,u]),d=r.useCallback((function(){l(!s)}),[s,l]);return(0,Zt.jsxs)("div",{className:t,children:[(0,Zt.jsx)(Aa.Ay,{className:ya(),columns:_a,data:c,settings:{displayIndices:!1,sortable:!1},useThemeYT:!0,disableRightGap:!0,rowClassName:function(e){return ya("row",{current:!e.to})}}),u.length>5?(0,Zt.jsx)(ja.S,{onClick:d,children:s?"Less":"More"}):null]})}const ka=r.memo(Na);var wa=n(46099),Sa=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){return(0,A.A)(this,n),t.apply(this,arguments)}return(0,b.A)(n,[{key:"settings",get:function(){return(0,l.A)((0,l.A)({},gn.A.prepareSettings()),{},{escapeWhitespace:!1})}},{key:"renderAsMap",value:function(e){var t=gn.A.utils.yson,n=t.attributes,r=t.type,a=!Object.hasOwnProperty.call(n(e),"_type_tag");return"object"===r(e)&&a}},{key:"renderAsYSON",value:function(e){return(0,Zt.jsx)(sn.A,{settings:this.settings,value:e})}},{key:"renderMetaTable",value:function(e){var t=this,n=k.A.getValue(e),r=m()(n).sort(),a=h()(r,(function(e){return{key:e,value:(0,Zt.jsx)(wa.A,{settings:t.settings,value:n[e]})}}));return(0,Zt.jsx)(N.Ay,{items:a})}},{key:"render",value:function(){var e=this.props.description;return this.renderAsMap(e)?this.renderMetaTable(e):this.renderAsYSON(e)}}]),n}(r.Component),Ta=n(70436),Ca=["row_count","compressed_data_size","uncompressed_data_size","data_weight","chunk_count"],Pa={theme:"light",size:"m",striped:!1,virtual:!1},Ea=(0,l.A)((0,l.A)({},Pa),{},{columns:{sets:{default:{items:["name"].concat(Ca)},withActions:{items:["name"].concat(Ca,["actions"])}},items:(0,Re.TU)({name:{sort:!1,align:"left"},row_count:{sort:!1,align:"right"},compressed_data_size:{sort:!1,align:"right",caption:"Compressed"},uncompressed_data_size:{sort:!1,align:"right",caption:"Uncompressed"},data_weight:{sort:!1,align:"right"},chunk_count:{sort:!1,align:"right",caption:"Slices"},actions:{sort:!1,caption:""}}),mode:"default"}}),Ra=(0,l.A)((0,l.A)({},Pa),{},{columns:{sets:{default:{items:["account","node_count","disk_space","chunk_count"]}},items:(0,Re.TU)({account:{sort:!1,align:"left"},disk_space:{sort:!1,align:"right"},chunk_count:{sort:!1,align:"right",caption:"Slices"},node_count:{sort:!1,align:"right"}}),mode:"default"},templates:{key:"operations/detail/resources/intermediate"}}),Ia=n(14880),Oa=n(16744),Va=(0,a.A)("resources");function za(e,t){return w.A.format.Bytes(e.value[t])}function Fa(e,t){return w.A.format.Number(e.value[t])}function Ma(e,t){return"".concat(e,"->").concat(t)}function Da(e,t,n){return{allowExpand:e,resources:e?g()(t,(function(e,t){var r=t.from,a=t.to,i=n[Ma(r,a)];if(e.push(t),i){var o=t.job_data_statistics,s=t.teleport_data_statistics;o&&e.push({inner:"processed by jobs",value:o}),s&&e.push({inner:"teleported",value:s})}return e}),[]):t}}_().arrayOf(_().shape({name:_().string,value:_().object,from:_().string,to:_().string})),_().array;var La=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={prevProps:void 0,expandedTasks:{},resources:[],allowExpand:!1},e.rowClassName=function(e){return e.name?Va("named-row"):e.inner?Va("inner-row"):null},e}return(0,b.A)(n,[{key:"toggleExpand",value:function(e){var t=(0,l.A)({},this.state.expandedTasks);t[e]?delete t[e]:t[e]=!0;var n=this.state.allowExpand,r=this.props.resources;this.setState((0,l.A)({expandedTasks:t},Da(n,r,t)))}},{key:"getResourceTemplates",value:function(){var e=this.state,t=e.expandedTasks,n=e.allowExpand,a=this;return{name:function(e){var i=e.name,o=e.from,s=e.to,l=e.inner;if(i)return i;if(l)return(0,Zt.jsx)("span",{className:Va("inner"),children:l});var u=(0,Zt.jsxs)("span",{children:[o," -> ",s]});if(n){var c=Ma(o,s),d=t[c],p=function(){a.toggleExpand(c)};return(0,Zt.jsxs)(r.Fragment,{children:[(0,Zt.jsx)(Oa.A,{expanded:d,onClick:p,visible:!0}),(0,Zt.jsx)("span",{onClick:p,className:Va("name"),children:u})]})}return u},chunk_count:function(e,t){return Fa.call(this,e,t)},row_count:Fa,data_weight:za,compressed_data_size:za,uncompressed_data_size:za,actions:function(e){var t=e.info,n=e.from,r=e.to;return t?(0,Zt.jsx)(Ia.A,{title:"Data flow: ".concat(n," -> ").concat(r),attributes:t}):null}}}},{key:"render",value:function(){var e=this.props,t=e.operation,n=e.intermediateResources,r=this.state,a=r.resources,i=r.allowExpand;return(0,Zt.jsxs)("div",{className:Va(),children:[(0,Zt.jsx)("div",{className:Va("table","elements-section"),children:(0,Zt.jsx)(Nn.A,(0,l.A)((0,l.A)({},Ea),{},{columnsMode:i?"withActions":void 0,css:Va(),items:a,templates:this.getResourceTemplates(),rowClassName:this.rowClassName}))}),t.isRunning()&&n&&(0,Zt.jsxs)("div",{className:Va("table","elements-section"),children:[(0,Zt.jsx)("div",{className:"elements-heading elements-heading_size_s",children:"Uncommitted"}),(0,Zt.jsx)(Nn.A,(0,l.A)((0,l.A)({},Ra),{},{css:Va(),items:n}))]})]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e===t.prevProps)return null;var n=e.operation,r=e.resources,a=L(n);return(0,l.A)({allowExpand:a},Da(a,r,t.expandedTasks))}}]),n}(r.Component);const Ja=La;var Ba=n(4214),Ua=["className","renderToggler"],Wa=(0,a.A)("elements-heading"),Ha=(0,a.A)("collapsible-table"),qa=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){return(0,A.A)(this,n),t.apply(this,arguments)}return(0,b.A)(n,[{key:"renderHeading",value:function(){var e=this.props,t=e.heading,n=e.allItemsCount;return(0,Zt.jsxs)("div",{className:Wa({size:"s"}),children:[(0,Zt.jsx)("span",{className:Ha("heading"),children:w.A.format.ReadableField(t)}),(0,Zt.jsx)("span",{className:Ha("size"),children:n})]})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.renderToggler,r=(0,be.A)(e,Ua);return(0,Zt.jsxs)("div",{className:Ha(null,t),children:[this.renderHeading(),(0,Zt.jsx)(Nn.A,(0,l.A)({},r)),n()]})}}]),n}(r.Component);const $a=(0,Ba.A)(qa);var Ka={theme:"light",size:"s",striped:!1,virtual:!1,templates:{key:"operations/detail/specification/io",data:{}},columns:{sets:{input:{items:["name","filters","tags"]},output:{items:["name","live_preview","tags"]},stderr:{items:["name","live_preview","tags"]}},items:{name:{sort:!1,align:"left",name:"name"},live_preview:{sort:!1,align:"left",name:"live_preview"},filters:{sort:!1,align:"left",name:"filters"},tags:{sort:!1,align:"left",name:"tags"}}}},Ya=(0,l.A)((0,l.A)({},Ka),{},{columns:(0,l.A)((0,l.A)({},Ka.columns),{},{mode:"input"})}),Ga=(0,l.A)((0,l.A)({},Ka),{},{columns:(0,l.A)((0,l.A)({},Ka.columns),{},{mode:"output"})}),Za=(0,l.A)((0,l.A)({},Ka),{},{columns:(0,l.A)((0,l.A)({},Ka.columns),{},{mode:"stderr"})}),Xa=(0,a.A)("elements-heading"),Qa=(0,a.A)("specification"),ei=_().shape({type:_().string.isRequired,caption:_().string,command:_().string,className:_().string,jobCount:_().number,files:_().arrayOf(_().shape({path:_().string,name:_().string,executable:_().bool})),environment:_().arrayOf(_().shape({name:_().string,value:_().string}))}),ti=(_().shape({transferTask:_().shape({id:_().string.isRequired,url:_().string}),mode:_().string,remote:_().shape({cluster:_().string.isRequired,network:_().string}),startedBy:_().shape({command:_().arrayOf(_().string).isRequired,fields:_().arrayOf(_().object).isRequired}),intermediate:_().shape({supported:_().bool.isRequired,path:_().string,transaction:_().string}),mapper:ei,reducer:ei,reduceCombiner:ei,tasks:_().arrayOf(ei)}),function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){return(0,A.A)(this,n),t.apply(this,arguments)}return(0,b.A)(n,[{key:"renderTransferTask",value:function(e){var t=e.id,n=e.url,r=e.mode;return(0,Zt.jsx)(N.Ay,{className:Qa("meta"),items:[{key:"mode",value:r,visible:Boolean(r)},{key:"transfer task",value:(0,Zt.jsx)(N.ts,{id:t,url:n}),visible:Boolean(t||n)}]})}},{key:"renderRemote",value:function(e){var t=e.cluster,n=e.network;return(0,Zt.jsxs)("div",{className:Qa("remote"),children:[(0,Zt.jsx)("div",{className:Xa({size:"s"}),children:"Remote"}),(0,Zt.jsx)(N.Ay,{items:[{key:"cluster",value:t},{key:"network",value:n}]})]})}},{key:"renderStartedBy",value:function(e){var t=e.fields,n=void 0===t?[]:t,r=e.command,a=n.map((function(e){return{key:e.name,value:"object"===(0,ge.A)(e.value)?(0,Zt.jsx)(sn.A,{value:e.value}):e.value}}));return a.push({key:"command",value:(0,Zt.jsx)(N.qe,{value:r,lineCount:5}),visible:Boolean(null==r?void 0:r.length)}),(0,Zt.jsxs)("div",{className:Qa("started-by"),children:[(0,Zt.jsx)("div",{className:Xa({size:"s"}),children:"Started by"}),(0,Zt.jsx)(N.Ay,{items:a})]})}},{key:"renderScript",value:function(e){var t=e.type,n=e.caption,r=e.className,a=e.jobCount,i=e.environment,o=e.files,s=e.command,l=e.layerPaths,u=this.props.cluster;return(0,Zt.jsxs)("div",{className:Qa("mapper"),children:[(0,Zt.jsx)("div",{className:Xa({size:"s"}),children:w.A.format.ReadableField(n||t)}),(0,Zt.jsx)(N.Ay,{items:[{key:"class name",value:r,visible:Boolean(r)},{key:"job count",value:a,visible:Boolean(a)},{key:"environment",value:(0,Zt.jsx)(N.u0,{environments:i}),visible:i.length>0},{key:"files",value:(0,Zt.jsx)(N.AA,{files:o,cluster:u}),visible:o.length>0},{key:"command",value:(0,Zt.jsx)(N.qe,{value:s,lineCount:5}),visible:Boolean(s)},{key:"layer paths",value:(0,Zt.jsx)(N.KI,{paths:l,cluster:u}),visible:Boolean(l)}]})]},"".concat(t,"/").concat(n,"/").concat(r))}},{key:"renderIO",value:function(e,t,n){return(0,Zt.jsx)($a,(0,l.A)((0,l.A)({},n),{},{prepareVisibleItems:ue,filterVisibleItems:ce,className:Qa(e),css:Qa("io"),heading:e,items:t}))}},{key:"renderIntermediate",value:function(e,t){var n=this.props.cluster;return(0,Zt.jsxs)("div",{className:Qa("intermediate"),children:[(0,Zt.jsx)("div",{className:Xa({size:"s"}),children:t}),(0,Zt.jsx)(N.dM,(0,l.A)((0,l.A)({},e),{},{cluster:n}))]})}},{key:"renderTasks",value:function(){var e=this;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(t){return t&&e.renderScript(t)}))}},{key:"render",value:function(){var e=this.props.specification,t=e.mode,n=e.transferTask,r=e.remote,a=e.startedBy,i=e.mapper,o=e.reducer,s=e.reduceCombiner,u=e.input,c=e.intermediate,d=e.output,p=e.stderr,m=e.tasks,v=e.coredumps;return(0,Zt.jsxs)("div",{className:Qa(),children:[(n||t)&&this.renderTransferTask((0,l.A)((0,l.A)({},n),{},{mode:t})),r&&this.renderRemote(r),a&&this.renderStartedBy(a),(null==u?void 0:u.length)>0&&this.renderIO("input",u,Ya),c&&this.renderIntermediate(c,"Intermediate"),(null==d?void 0:d.length)>0&&this.renderIO("output",d,Ga),(null==p?void 0:p.length)>0&&this.renderIO("stderr",p,Za),(null==v?void 0:v.length)>0&&this.renderIO("core",v,Za),i&&this.renderScript(i),o&&this.renderScript(o),s&&this.renderScript(s),m&&this.renderTasks(m)]})}}]),n}(r.Component)),ni=n(70917),ri=n(96843),ai=n.n(ri),ii=n(6736),oi=n(84806),si=(0,a.A)("operation-jobs-detailed"),li=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){return(0,A.A)(this,n),t.apply(this,arguments)}return(0,b.A)(n,[{key:"renderSection",value:function(e,t){return(0,Zt.jsxs)("div",{className:"elements-section",children:[(0,Zt.jsx)("div",{className:"elements-heading elements-heading_size_s",children:e}),(0,Zt.jsx)(N.Ay,{items:t})]})}},{key:"renderHelpLink",value:function(e){return(0,pe.fs)((0,Zt.jsx)("div",{className:"elements-section",children:(0,Zt.jsxs)(on.A,{url:e,children:[(0,Zt.jsx)(Sn.A,{awesome:"book"})," Help"]})}))}},{key:"renderAborted",value:function(e){var t=e.scheduled.counters,n=[{key:"total",value:e.scheduled.total}].concat((0,fe.A)(t)),r=e.nonScheduled.counters,a=[{key:"total",value:e.nonScheduled.total}].concat((0,fe.A)(r)),i=W.Ay.docsUrls["operations:overview#aborted_jobs"];return(0,Zt.jsxs)("div",{className:"pretty-scroll",children:[this.renderSection("Scheduled",n),this.renderSection("Non scheduled",a),this.renderHelpLink(i)]})}},{key:"renderCompleted",value:function(e){var t=[{key:"total",value:e.nonInterrupted.total}],n=e.interrupted.counters,r=[{key:"total",value:e.interrupted.total}].concat((0,fe.A)(n)),a=W.Ay.docsUrls["operations:overview#completed_jobs"];return(0,Zt.jsxs)("div",{className:"pretty-scroll",children:[this.renderSection("Non interrupted",t),this.renderSection("Interrupted",r),this.renderHelpLink(a)]})}},{key:"renderModalContent",value:function(e){var t=this.props.item;return"aborted"===e?this.renderAborted(t.abortedStats):this.renderCompleted(t.completedStats)}},{key:"renderCount",value:function(e,t,n){return"aborted"===e?(0,Zt.jsxs)("span",{children:[w.A.format.Number(t)," (",w.A.format.Number(n),")"]}):(0,Zt.jsx)("span",{children:w.A.format.Number(t+n)})}},{key:"render",value:function(){var e=this.props,t=e.primaryValue,n=e.secondaryValue,r=e.handleClose,a=e.handleShow,i=e.visible,o=e.type,s=e.item,l="".concat(w.A.format.ReadableField(o)," statistics: ").concat(s.caption),u=this.renderModalContent(o);return(0,Zt.jsxs)(ii.s,{className:si(),gap:1,children:[(0,Zt.jsxs)(on.A,{theme:"ghost",size:"xs",onClick:a,children:["View"," "]}),this.renderCount(o,t,n),(0,Zt.jsx)(an.A,{onOutsideClick:r,onCancel:r,content:u,visible:i,footer:!1,title:l})]})}}]),n}(r.Component);const ui=(0,oi.A)(li);function ci(e,t){return w.A.utils.compareVectors(["other"===e.key?1:-1,e.key],["other"===t.key?1:-1,t.key],"asc")}function di(e,t){if("object"===(0,ge.A)(e[t])){var n=g()(e[t],(function(e,t,n){return e.counters.push({value:t,key:n}),e.total+=t,e}),{counters:[],total:0});return n.counters.sort(ci),n}return{total:e[t]}}function pi(e){var t=e.completed;return{interrupted:di(t,"interrupted"),nonInterrupted:di(t,"non-interrupted"),total:t.total}}function mi(e){var t=e.aborted;return{scheduled:di(t,"scheduled"),nonScheduled:di(t,"non_scheduled"),total:t.total}}function vi(e){return{counters:e,abortedStats:mi(e),completedStats:pi(e)}}var hi={theme:"light",striped:!1,virtual:!1,size:"m",columns:function(){var e=["total","pending","running","completed","failed","aborted","lost"],t={job_type:{sort:!1,align:"left",caption:"Task"}};return O()(e,(function(e){t[e]={sort:!1,align:"right"}})),t.actions={name:"actions",sort:"false",caption:""},{items:(0,Re.TU)(t),sets:{default:{items:["job_type"].concat(e)},withActions:{items:h()(t,(function(e,t){return t}))}},mode:"default"}}(),computeKey:function(e){return e.type}},fi=n(50432),gi=n(29347),Ai=n.n(gi),bi=n(81214),ji=n.n(bi),xi=n(37918),yi=n.n(xi),_i=n(23488),Ni=n.n(_i),ki=n(70969),wi=n.n(ki);function Si(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(t(e))n(r,void 0,e);else{if(!e)return;r.length&&n(r,e,void 0),Object.keys(null!=e?e:{}).forEach((function(a){r.push(a),Si(e[a],t,n,r),r.pop()}))}}function Ti(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=!0,o={};return Object.keys(e).forEach((function(s){a.push(s);var l=e[s];if(t(l)){if(n(a,void 0,l)){var u=r?r(l):l;void 0!==u&&(o[s]=u,i=!1)}}else if(n(a,l,void 0)){var c=Ti(l,t,n,r,a);void 0!==c&&(o[s]=c,i=!1)}a.pop()})),i?void 0:o}function Ci(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return Object.keys(e).some((function(a){r.push(a);var i=e[a];if(t(i)){if(n(r,void 0,i))return!0}else{if(n(r,i,void 0))return!0;if(Ci(i,t,n,r))return!0}return r.pop(),!1}))}var Pi=n(23860),Ei=["running"],Ri=["running"],Ii=function(e){return e.operations.detail.operation},Oi=(0,ye.Mz)([Ii],(function(e){return k.A.getValue(e,"/@progress/job_statistics_v2")}));function Vi(e){return Array.isArray(e)}var zi=(0,ye.Mz)([Oi],(function(e){var t,n,r=null!==(t=null==e||null===(n=e.time)||void 0===n?void 0:n.total)&&void 0!==t?t:[],a=g()(r,(function(e,t){return O()(t.tags,(function(t,n){var r=n;t&&(e[r]||(e[r]=new Set),e[r].add(t))})),e}),{});return g()(a,(function(e,t,n){return e[n]=(0,fi.A)(Array,(0,fe.A)(t.values())),e}),{})})),Fi=(0,ye.Mz)([function(e){return e.operations.statistics.jobTypeFilter},function(e){return e.operations.statistics.poolTreeFilter},function(e){return e.operations.statistics.filterText},zi],(function(e,t,n,r){var a=r.job_type,i=r.pool_tree;return{activeJobType:-1===a.indexOf(e)?Pi.FB:e,activePoolTree:-1===i.indexOf(t)?Pi.FB:t,filterText:n}})),Mi=function(e){return!ai()(Oi(e))},Di=(0,ye.Mz)([Fi,Oi],(function(e,t){var n=e.activeJobType,r=e.activePoolTree,a=e.filterText;if(!n&&!r&&!a)return t;var i=a.length?function(e){return-1!==e.join("/").indexOf(a)}:function(){return!0};return Ti(null!=t?t:{},Vi,(function(e,t){return!!i(e)||t&&Ci(t,Vi,i,e.slice())}),(function(e){return U()(e,(function(e){var t=e.tags,a=t.job_type,i=t.pool_tree;return!(n&&a!==n||r&&i!==r)}))}))})),Li=(0,ye.Mz)([Di],(function(e){var t=[];return Si(null!=e?e:{},Vi,(function(e,n,r){var a=Boolean(r);t.push({title:e[e.length-1],level:e.length-1,data:r?Ji(r):void 0,isLeafNode:a,name:e.join("/")})})),t}));function Ji(e){var t={};return O()(e,(function(e){var n=e.summary,r=e.tags.job_state;t[r]=function(e,t){if(!t)return e;var n=wi()([e.count,t.count]),r=wi()([e.sum,null==t?void 0:t.sum]);return{min:yi()([e.min,t.min]),max:Ni()([e.max,t.max]),count:n,sum:r}}(n,t[r])})),t}var Bi=(0,ye.Mz)(Oi,(function(e){var t;return Ui(null==e||null===(t=e.time)||void 0===t?void 0:t.total)}));function Ui(e){var t=Ji(null!=e?e:[]),n=(t.running,(0,be.A)(t,Ei)),r=Ai()(h()(n,"sum"));return r.length?wi()(r):Pn.A.NO_VALUE}var Wi=["job_proxy.cpu.user","job_proxy.cpu.system","user_job.cpu.user","user_job.cpu.system"],Hi=(0,ye.Mz)([Oi],(function(e){var t=g()(Wi,(function(t,n){var r=ji()(e,n);if(Vi(r)){var a=Ui(r);void 0!==a&&t.push(a)}return t}),[]);return t.length?wi()(t):Pn.A.NO_VALUE})),qi=(0,ye.Mz)([Ii,Oi],(function(e,t){var n,r,a,i,o=function(e){if(L(e))return function(e){var t=k.A.getValue(e,"/@progress/tasks"),n=h()(t,(function(e){var t=e.task_name,n=e.job_type,r=e.job_counter;return(0,l.A)((0,l.A)({type:t,caption:t,jobType:n},vi(r)),{},{info:e})})),r=k.A.getValue(e,"/@progress/total_job_counter");return n.push((0,l.A)((0,l.A)({type:"total",caption:"total",jobType:"total"},vi(r)),{},{info:r,isTotal:!0})),n}(e);var t=k.A.getValue(e,"/@progress/data_flow_graph"),n=k.A.getValue(t,"/topological_ordering"),r=k.A.getValue(t,"/vertices"),a=[];return t&&(n=function(e){return(e=U()(e,(function(e){var t=String(e).toLowerCase();return"source"!==t&&"sink"!==t}))).push("total"),e}(n),n=U()(n,(function(e){return void 0!==r[e]})),a=h()(n,(function(e){return{type:e,jobType:"total"===e?e:r[e].job_type,counters:r[e].job_counter}})),a=h()(a,(function(e){var t=e.type,n=e.counters;return(0,l.A)({type:t,caption:t,jobType:e.jobType},vi(n))}))),a}(e),s=Ji(null!==(n=null==t||null===(r=t.time)||void 0===r?void 0:r.total)&&void 0!==n?n:[]),u=(s.running,(0,be.A)(s,Ri)),c=null===(a=u.aborted)||void 0===a?void 0:a.sum,d=null===(i=u.completed)||void 0===i?void 0:i.sum,p=function(e,t){var n;return void 0!==t&&void 0!==e&&(e>0&&t>0?n=e/t*100:e>0?n=100:t>0&&(n=0)),n}(c,d),m=function(e){var t,n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN,i=null!==(t=null===(n=Ji((null==e||null===(r=e.data)||void 0===r||null===(r=r.input)||void 0===r?void 0:r.data_weight)||[]).completed)||void 0===n?void 0:n.sum)&&void 0!==t?t:0;return i>0?i/(a/1e3):void 0}(t||{},d),v=function(e){var t,n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN,i=null!==(t=null===(n=Ji((null==e||null===(r=e.data)||void 0===r||null===(r=r.input)||void 0===r?void 0:r.row_count)||[]).completed)||void 0===n?void 0:n.sum)&&void 0!==t?t:0;return a>0?i/(a/1e3):void 0}(t||{},d);return u||c||d||p||m||m||0!==o.length?{items:o,abortedJobsTime:c,completedJobsTime:d,abortedJobsTimeRatio:p,averageReadDataRate:m,averageReadRowRate:v}:{items:[]}})),$i=(0,a.A)("jobs");function Ki(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=[];return O()(e,(function(e){n.push(e);var r=e.caption;t[r]&&n.push({taskInfo:e.info})})),{items:e,visibleItems:n}}var Yi=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(e){var a;(0,A.A)(this,n),(a=t.call(this,e)).state={allowActions:!1,expandedState:{},visibleItems:[],items:[],operation:void 0},a.templates=void 0;var i=(0,Ae.A)(a);return a.templates={__default__:function(e,t){return e.counters?(0,Zt.jsx)("span",{children:w.A.format.Number(e.counters[t])}):null},aborted:function(e){if(null==e||!e.abortedStats)return null;var t=e.abortedStats,n=t.scheduled,r=t.nonScheduled;return(0,Zt.jsx)(ui,{title:"Aborted statistics: ".concat(e.caption),secondaryValue:r.total,primaryValue:n.total,type:"aborted",item:e})},completed:function(e){if(null==e||!e.completedStats)return null;var t=e.completedStats,n=t.nonInterrupted,r=t.interrupted;return(0,Zt.jsx)(ui,{title:"Completed statistics: ".concat(e.caption),secondaryValue:r.total,primaryValue:n.total,type:"completed",item:e})},job_type:function(e){var t=e.caption,n=e.jobType,a=e.taskInfo,o=e.isTotal;if(a)return(0,Zt.jsx)(Gi,(0,l.A)({},a));var s=i.state,u=s.expandedState,c=s.allowActions,d=!o&&c&&t,p=u[t],m=d?function(){return i.toggleExpand(t)}:void 0;return(0,Zt.jsxs)("div",{className:$i("job-type"),children:[(0,Zt.jsx)("div",{children:Boolean(t)&&(0,Zt.jsx)(Oa.A,{visible:Boolean(m),expanded:Boolean(p),onClick:m})}),(0,Zt.jsxs)("div",{onClick:m,className:$i("name",{clickable:Boolean(d)}),children:[(0,Zt.jsx)("span",{title:"Task ".concat(t),children:t}),!o&&(0,Zt.jsxs)(r.Fragment,{children:[(0,Zt.jsx)("br",{}),void 0!==e.jobType&&(0,Zt.jsx)("span",{className:"elements-secondary-text",title:"Job type ".concat(n),children:n})]})]})]})},actions:function(e){var t=e.info,n=e.caption;return t?(0,Zt.jsx)(Ia.A,{title:"Tasks: ".concat(n),attributes:t}):null}},a}return(0,b.A)(n,[{key:"toggleExpand",value:function(e){var t=(0,l.A)({},this.state.expandedState);t[e]?delete t[e]:t[e]=!0,this.setState((0,l.A)({expandedState:t},Ki(this.state.items,t)))}},{key:"rowClassName",value:function(e){return e.taskInfo?$i("row-task-info"):e.isTotal?$i("row-total"):void 0}},{key:"colSpan",value:function(e,t,n){if(e.taskInfo&&0===n)return 8}},{key:"render",value:function(){var e,t=this.props,n=t.className,r=t.jobs,a=t.collapsibleSize;return null!=r&&null!==(e=r.items)&&void 0!==e&&e.length?(0,Zt.jsx)(Ta.A,{name:"Tasks",className:n,size:a,marginDirection:"bottom",children:this.renderContent()}):null}},{key:"renderContent",value:function(){var e=this.props.jobs,t=e.abortedJobsTimeRatio,n=e.abortedJobsTime,r=e.completedJobsTime,a=e.averageReadDataRate,i=e.averageReadRowRate,o=e.items,s=this.state,u=s.allowActions,c=s.visibleItems;return(0,Zt.jsxs)("div",{className:$i(),children:[(0,Zt.jsx)(N.Ay,{items:[[{key:"aborted_jobs_time_ratio",value:(0,Zt.jsx)(N.Bj.FormattedValue,{value:t,format:"Percent"})},{key:"aborted_jobs_time",value:(0,Zt.jsx)(N.Bj.FormattedValue,{value:n,format:"TimeDuration"})},{key:"completed_jobs_time",value:(0,Zt.jsx)(N.Bj.FormattedValue,{value:r,format:"TimeDuration"})}],[{key:"average_read_data_rate",value:(0,Zt.jsx)(N.Bj.FormattedValue,{value:a,format:"BytesPerSecond"})},{key:"average_read_row_rate",value:(0,Zt.jsx)(N.Bj.FormattedValue,{value:i,format:function(e){return w.A.format.NumberPerSecond(e,{measure:"rows"})}})}]]}),(0,Zt.jsx)("div",{className:$i("table-container"),children:o.length>0&&(0,Zt.jsx)(Nn.A,(0,l.A)((0,l.A)({},hi),{},{columnsMode:u?"withActions":void 0,items:c,css:$i(),templates:this.templates,rowClassName:this.rowClassName,colSpan:this.colSpan}))})]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.operation,r=e.jobs.items,a=t.operation,i=t.items,o=t.expandedState,s={};return n!==a&&Object.assign(s,{operation:n,allowActions:L(n)}),r!==i&&Object.assign(s,(0,l.A)({},Ki(r,o))),ai()(s)?null:s}}]),n}(r.Component);function Gi(e){var t=e.job_type,n=e.has_user_job,r=e.input_finished,a=e.completed,i=e.user_job_memory_reserve_factor,o=e.start_time,s=e.completion_time,l=e.ready_time,u=e.exhaust_time,c=k.A.getValue(l),d=k.A.getValue(u),p=c+d;return(0,Zt.jsx)(N.Ay,{className:$i("info-meta"),items:[[{key:"job_type",value:(0,Zt.jsx)(N.Bj.Value,{value:k.A.getValue(t)})},{key:"has_user_job",value:(0,Zt.jsx)(N.Bj.Readable,{value:String(k.A.getValue(n))})},{key:"input_finished",value:(0,Zt.jsx)(N.Bj.Readable,{value:String(k.A.getValue(r))})},{key:"completed",value:(0,Zt.jsx)(N.Bj.Readable,{value:String(k.A.getValue(a))})},{key:"user_job_memory_reserve_factor",value:(0,Zt.jsx)(N.Bj.Number,{value:k.A.getValue(i)})},{key:"start_time",value:(0,Zt.jsx)(N.Bj.Time,{time:k.A.getValue(o)})},{key:"completion_time",value:(0,Zt.jsx)(N.Bj.Time,{time:k.A.getValue(s)})}],[{key:"ready_time",value:(0,Zt.jsx)(N.Bj.Time,{time:c,valueFormat:"TimeDuration",settings:{format:"milliseconds"}})},{key:"exhaust_time",value:(0,Zt.jsx)(N.Bj.Time,{time:d,valueFormat:"TimeDuration",settings:{format:"milliseconds"}})},{key:"tail_time_fraction",value:0===p?"n/a":(0,Zt.jsx)(N.Bj.FormattedValue,{value:d/p*100,format:"Percent",settings:{digits:1}})}]]})}const Zi=(0,u.Ng)((function(e){return{jobs:qi(e),operation:e.operations.detail.operation}}))(Yi);var Xi=n(62250),Qi=(0,a.A)("operation-details"),eo=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleEditClick=function(){var t=e.props,n=t.operation;(0,t.showEditPoolsWeightsModal)(n)},e}return(0,b.A)(n,[{key:"renderDescription",value:function(){var e=this.props.operation,t=e.description,n=e.collapsibleSize;return t&&(0,Zt.jsx)(Ta.A,{name:"Description",className:Qi("description"),size:n,marginDirection:"bottom",children:(0,Zt.jsx)(Sa,{description:t})})}},{key:"renderSpecification",value:function(){var e=this.props,t=e.specification,n=e.cluster,r=e.collapsibleSize;return(0,Zt.jsx)(Ta.A,{name:"Specification",className:Qi("specification"),size:r,marginDirection:"bottom",children:(0,Zt.jsx)(ti,{specification:t,cluster:n})})}},{key:"renderAlerts",value:function(){var e=this.props,t=e.alertEvents,n=e.collapsibleSize;return null!=t&&t.length?(0,Zt.jsx)(Ta.A,{name:"Alerts",size:n,marginDirection:"bottom",children:(0,Zt.jsx)(ka,{items:t})}):null}},{key:"renderError",value:function(){var e=this.props.error;return e&&(0,Zt.jsx)("div",{className:Qi("result"),children:(0,Zt.jsx)(rn.z,(0,l.A)((0,l.A)({},e),{},{disableLogger:!0}))})}},{key:"renderRuntimeOverview",value:function(){return(0,Zt.jsxs)(wn.A,{size:"s",onClick:this.handleEditClick,title:"Edit pools and weights",className:Qi("edit-button"),children:[(0,Zt.jsx)(Sn.A,{awesome:"pencil"})," Edit"]})}},{key:"renderRuntime",value:function(){var e=this.props,t=e.runtime,n=e.operation,r=e.cluster,a=e.collapsibleSize;return(null==t?void 0:t.length)>0&&(0,Zt.jsx)(Ta.A,{name:"Runtime",className:Qi("runtime"),overview:this.renderRuntimeOverview(),size:a,marginDirection:"bottom",children:(0,Zt.jsx)(nn,{runtime:t,operation:n,cluster:r})})}},{key:"renderJobs",value:function(){var e=this.props.collapsibleSize;return(0,Zt.jsx)(Zi,{className:Qi("jobs"),size:e})}},{key:"renderResources",value:function(){var e=this.props,t=e.resources,n=e.intermediateResources,r=e.operation,a=e.collapsibleSize;return t&&(0,Zt.jsx)(Ta.A,{name:"Data flow",className:Qi("resources"),size:a,marginDirection:"bottom",children:(0,Zt.jsx)(Ja,{operation:r,resources:t,intermediateResources:n})})}},{key:"renderEvents",value:function(){var e=this.props,t=e.events,n=e.collapsibleSize;return t&&(0,Zt.jsx)(Ta.A,{name:"Events",className:Qi("events"),size:n,marginDirection:"bottom",children:(0,Zt.jsx)(ni.A,{events:t})})}},{key:"render",value:function(){return(0,Zt.jsxs)("div",{className:Qi(),children:[(0,Zt.jsxs)("div",{className:Qi("section"),children:[this.renderDescription(),this.renderSpecification()]}),(0,Zt.jsxs)("div",{className:Qi("section"),children:[this.renderAlerts(),this.renderError(),this.renderRuntime(),this.renderJobs(),this.renderResources(),this.renderEvents()]})]})}}]),n}(r.Component),to={showEditPoolsWeightsModal:Yt},no=(0,u.Ng)((function(e){var t=e.operations,n=e.global.cluster,r=t.detail.operation;return(0,l.A)((0,l.A)({cluster:n,operation:r},t.detail.details),{},{collapsibleSize:Xi.Y1,alertEvents:Je(e)})}),to)(eo);function ro(){var e=(0,u.d4)(qe);return(0,Gr.v)({type:Ft.c.OPERATION_TAB_DETAILS,additionalStartType:Ft.c.OPERATION,startDeps:[e],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Ie.RP)(t)}}),(0,Zr.ol)({type:Ft.c.OPERATION_TAB_DETAILS,stopDeps:[e],allowStop:function(e){var t=(0,o.A)(e,1)[0];return(0,Ie.RP)(t)}}),(0,Zt.jsx)(no,{})}var ao=n(31680),io=n.n(ao),oo=n(30008),so=n(31229),lo=["id","emptyContent"];function uo(e){var t=e.id,n=e.emptyContent,r=void 0===n?null:n,a=(0,be.A)(e,lo),i=so.mH.trackerBaseUrl,o="".concat(i,"/").concat(t);return t?(0,Zt.jsx)(on.A,(0,l.A)((0,l.A)({},a),{},{url:i?o:void 0,children:t})):(0,Zt.jsx)(Zt.Fragment,{children:r})}const co=r.memo(uo);var po=n(4386),mo=n(88358),vo=["fraction"],ho=(0,a.A)("experiment-assignments");const fo=r.memo(Ao);var go=r.memo(bo);function Ao(e){var t=e.className,n=(0,u.d4)(Ye),a=(0,u.d4)(Ue),i=r.useState(!0),s=(0,o.A)(i,2),l=s[0],c=s[1],d=r.useCallback((function(){c(!l)}),[l,c]);return null!=n&&n.length?(0,Zt.jsx)(Ta.O,{className:ho(null,t),name:"Experiments",onToggle:d,collapsed:l,size:Xi.Y1,marginDirection:"bottom",children:h()(n,(function(e,t){return(0,Zt.jsx)(go,{data:e,operationId:a},t)}))}):null}function bo(e){var t=e.data,n=e.operationId,a=r.useState(!1),i=(0,o.A)(a,2),s=i[0],l=i[1],c=k.A.getValue(t,"/effect"),d=(c.fraction,(0,be.A)(c,vo)),p=(0,u.d4)(po.MZ),m=r.useCallback((function(){l(!s),window.dispatchEvent(new Event("resize"))}),[s,l]);return(0,Zt.jsxs)("div",{children:[(0,Zt.jsx)(N.Ay,{items:[[{key:"Experiment",value:k.A.getValue(t,"/experiment")},{key:"Group",value:k.A.getValue(t,"/group")}],[{key:"Ticket",value:(0,Zt.jsx)(co,{id:k.A.getValue(t,"/ticket")})},{key:"Dimension",value:k.A.getValue(t,"/dimension")}],[{key:"Effect",value:(0,Zt.jsx)(ja.S,{onClick:m,children:s?"Hide":"Show"})}]]}),s&&(0,Zt.jsx)(sn.A,{value:d,settings:p,folding:!0,virtualized:!0,extraTools:(0,Zt.jsx)(mo.O,{value:d,settings:p,name:"experiment_assignments_".concat(n)})})]})}var jo=(0,a.A)("operation-specification"),xo=io()((function(){window.dispatchEvent(new Event("resize"))}),100,{leading:!1}),yo=(0,u.Ng)((function(e){return{operation:e.operations.detail.operation,operationId:Ue(e)}}))((function(e){var t=e.operation,n=e.operationId,a=W.Ay.docsUrls["operations:operations_options"],i=t.typedProvidedSpec||t.typedSpec,s=t.typedUnrecognizedSpec||{},l=t.typedFullSpec,u=m()(s).length>0,c=r.useState({provided:u,unrecognized:!1,resulting:!0}),d=(0,o.A)(c,2),p=d[0],v=d[1],h=r.useCallback((function(e){v({unrecognized:!0,resulting:!0,provided:e}),xo()})),f=r.useCallback((function(e){v({unrecognized:e,provided:!0,resulting:!0}),xo()})),g=r.useCallback((function(e){v({unrecognized:!0,resulting:e,provided:!0}),xo()}));return(0,Zt.jsx)(ia.A,{children:(0,Zt.jsxs)("div",{className:jo(),children:[(0,pe.fs)((0,Zt.jsx)("div",{className:jo("help","elements-section"),children:(0,Zt.jsx)(oo.A,{url:a})})),(0,Zt.jsx)(Ta.O,{name:"Provided specification",onToggle:h,collapsed:p.provided,size:Xi.Y1,marginDirection:"bottom",children:(0,Zt.jsx)(sn.A,{value:i,settings:gn.A.prepareSettings(),folding:!0,virtualized:!0,extraTools:(0,Zt.jsx)(mo.O,{value:i,settings:gn.A.prepareSettings(),name:"provider_specification_".concat(n)})})}),(0,Zt.jsx)(fo,{}),u&&(0,Zt.jsx)(Ta.O,{name:"Unrecognized specification",onToggle:f,collapsed:p.unrecognized,size:Xi.Y1,marginDirection:"bottom",children:(0,Zt.jsx)(sn.A,{value:s,settings:gn.A.prepareSettings(),folding:!0,virtualized:!0,extraTools:(0,Zt.jsx)(mo.O,{value:s,settings:gn.A.prepareSettings(),name:"unrecognized_specification_".concat(n)})})}),l&&(0,Zt.jsx)(Ta.O,{name:"Resulting specification",onToggle:g,collapsed:p.resulting,size:Xi.Y1,marginDirection:"bottom",children:(0,Zt.jsx)(sn.A,{value:l,settings:gn.A.prepareSettings(),folding:!0,virtualized:!0,extraTools:(0,Zt.jsx)(mo.O,{value:l,settings:gn.A.prepareSettings(),name:"resulting_specification_".concat(n)})})})]})})}));function _o(){var e=(0,u.d4)(qe);return(0,Gr.v)({type:Ft.c.OPERATION_TAB_SPECIFICATION,additionalStartType:Ft.c.OPERATION,startDeps:[e],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Ie.RP)(t)}}),(0,Zr.ol)({type:Ft.c.OPERATION_TAB_SPECIFICATION,stopDeps:[e],allowStop:function(e){var t=(0,o.A)(e,1)[0];return(0,Ie.RP)(t)}}),(0,Zt.jsx)(yo,{})}var No=n(83534),ko=n(33023),wo=n(44543),So=(0,a.A)("operation-detail-job-sizes"),To=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={showEstimated:!1},e.formatX=function(t){var n=e.state.formatSettings;return Pn.A.Bytes(t,n)},e.renderTooltip=function(e,t,n){return"<b>".concat(e,"</b> jobs have estimated input job size from <b>").concat(t,"</b> to <b>").concat(n,"</b>")},e.toggleEstimated=function(){var t=e.state.showEstimated;e.setState({showEstimated:!t})},e}return(0,b.A)(n,[{key:"render",value:function(){var e=this.props.className;return(0,Zt.jsx)(No.Ay,{className:e,content:this.renderContent(),toolbar:(0,Zt.jsx)(ko.M,{itemsToWrap:[{name:"showEstimated",node:(0,Zt.jsx)(xr.S,{size:"l",onUpdate:this.toggleEstimated,checked:this.state.showEstimated,children:"Show estimated"})}]})})}},{key:"prepareJobSizes",value:function(){var e=this.props.operation,t=k.A.getValue(e,"/@progress");return t?{estimatedJobSizeHistogram:k.A.getValue(t,"/estimated_input_data_size_histogram"),jobSizeHistogram:k.A.getValue(t,"/input_data_size_histogram")}:{}}},{key:"renderChart",value:function(e,t){return e?(0,Zt.jsxs)("div",{className:So("chart-section"),children:[(0,Zt.jsx)("div",{className:"elements-heading elements-heading_size_m",children:t}),(0,Zt.jsx)(da,{className:So("charts"),data:e,yLabel:"job count",xLabel:"job input data weight",xFormat:this.formatX,yMin:.5,yLogarithmic:!0,renderTooltip:this.renderTooltip})]}):null}},{key:"renderPerTaskCharts",value:function(e){var t=this,n=this.state.showEstimated;return h()(e,(function(e){var r=e.task_name,a=e.estimated_input_data_weight_histogram,i=e.input_data_weight_histogram;return(0,Zt.jsxs)("div",{className:So("task-cell",{"per-task":!0}),children:[t.renderChart(i,'Task "'.concat(r,'" actual data weight')),n&&t.renderChart(a,'Task "'.concat(r,'" estimated data weight'))]},r)}))}},{key:"renderCommon",value:function(){var e=this.state.showEstimated,t=this.prepareJobSizes(),n=t.jobSizeHistogram,r=t.estimatedJobSizeHistogram;return(0,Zt.jsxs)("div",{className:So("task-cell"),children:[this.renderChart(n,"Input"),e&&this.renderChart(r,"Estimated input")]})}},{key:"renderContent",value:function(){var e=this.props.operation,t=k.A.getValue(this.props.operation,"/@progress/tasks");return(0,Zt.jsx)(ia.A,{children:(0,Zt.jsx)("div",{className:So(),children:(0,wo.H)(e)?this.renderPerTaskCharts(t):this.renderCommon()})})}}],[{key:"getDerivedStateFromProps",value:function(e){var t=k.A.getValue(e.operation,"/@progress"),n=t&&k.A.getValue(t,"/partition_size_histogram");return{formatSettings:ma(n,Pn.A.Bytes),data:n}}}]),n}(r.Component),Co=(0,u.Ng)((function(e){return{operation:e.operations.detail.operation,chartKitTheme:(0,at.O4)(e)}}))(To);function Po(e){var t=(0,u.d4)(qe);return(0,Gr.v)({type:Ft.c.OPERATION_TAB_JOB_SIZES,additionalStartType:Ft.c.OPERATION,startDeps:[t],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Ie.RP)(t)}}),(0,Zr.ol)({type:Ft.c.OPERATION_TAB_JOB_SIZES,stopDeps:[t],allowStop:function(e){var t=(0,o.A)(e,1)[0];return(0,Ie.RP)(t)}}),(0,Zt.jsx)(Co,(0,l.A)({},e))}var Eo=n(16883),Ro={completed:{sort:!1,align:"right",tooltipProps:{placement:"bottom",content:"Completed jobs — those which have finished successfully (i.e. consumed entire input and exited with zero exit code). Please note that due to hardware failures some jobs may be run more than once."}},aborted:{sort:!1,align:"right",tooltipProps:{placement:"bottom",content:"Aborted jobs — those with soft failure (i.e. resource overdraft or preemption). Please note that some of aborted jobs may be excluded from statistics."}},failed:{sort:!1,align:"right",tooltipProps:{placement:"bottom",content:"Failed jobs — those with hard failure (i.e. exited with non-zero exit code). Please note that some of failed jobs may be excluded from statistics."}},lost:{sort:!1,align:"right",tooltipProps:{placement:"bottom",content:"Lost jobs — those which have finished successfully but whose results were lost (typically due to hardware failures)."}}},Io={theme:"light",size:"s",striped:!1,computeKey:function(e){return"<Root>/".concat(e.name)},tree:!0,columns:{sets:{default:{items:["metric"].concat(Object.keys(Ro))}},items:(0,l.A)((0,l.A)({},Ro),{},{metric:{sort:!1,align:"left"}}),mode:"default"}},Oo=n(80016),Vo=n(16455),zo=n(33026);function Fo(e){return(0,(0,u.d4)(Vo.jS).getStatisticInfo)(e)}function Mo(e){var t=e.name,n=e.title,r=Fo(t);return(0,Zt.jsx)(zo.Ye,{title:n,info:r})}function Do(e){var t=e.name,n=e.settings,r=e.value,a=Fo(t),i=(0,zo.Dz)(r,null==a?void 0:a.unit,n),o=Pn.A.Number(r,n);return void 0!==i?(0,Zt.jsx)(Tn.m,{placement:["right","left"],content:(0,Zt.jsxs)(ii.s,{gap:1,children:[(0,Zt.jsxs)("span",{children:[" ",o]}),!isNaN(r)&&(0,Zt.jsx)(_n.A,{text:"".concat(r),inlineMargins:!0,view:"flat-outlined"})]}),children:i}):o}var Lo=r.memo(Do),Jo=r.memo(Mo),Bo=(0,a.A)("operation-statistics"),Uo=(0,a.A)("elements-toolbar"),Wo=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).collapseTable=function(){return e.props.setTreeState(Pi.VN.COLLAPSED)},e.expandTable=function(){return e.props.setTreeState(Pi.VN.EXPANDED)},e}return(0,b.A)(n,[{key:"componentWillUnmount",value:function(){this.expandTable()}},{key:"template",get:function(){var e=this.props,t=e.setTreeState,n=e.activeAggregation,r=void 0===n?"avg":n;return{metric:function(e,n,r,a){var i={paddingLeft:40*e.level};if(e.isLeafNode)return(0,Zt.jsxs)("span",{className:Bo("metric"),style:i,children:[(0,Zt.jsx)(Sn.A,{className:Bo("metric-icon"),awesome:"chart-line"}),(0,Zt.jsx)(Jo,{name:e.name,title:e.title})]});var o=a.collapsed||a.empty?"angle-down":"angle-up",s=a.collapsed||a.empty?"folder":"folder-open";return(0,Zt.jsxs)("span",{className:Bo("group"),style:i,onClick:function(){a.empty||(r.apply(void 0,arguments),t("mixed"))},children:[(0,Zt.jsx)(Sn.A,{className:Bo("group-icon-toggler"),awesome:o}),(0,Zt.jsx)(Sn.A,{className:Bo("group-icon"),awesome:s}),(0,Zt.jsx)("span",{children:e.title})]})},__default__:function(e,t){if(e.isLeafNode){var n,a,i,o=null===(n=e.data)||void 0===n?void 0:n[t];return"avg"===r?(a=o&&o.count&&o.sum/o.count)<1&&(i={significantDigits:6}):a=o&&o[r],"count"===r?Pn.A.Number(a,i):(0,Zt.jsx)(Lo,{value:a,settings:i,name:e.name})}return null}}}},{key:"renderToolbar",value:function(){var e=this.props,t=e.filterText,n=e.activeAggregation,r=e.jobTypes,a=e.poolTrees,i=e.activeJobType,o=e.activePoolTree;return(0,Zt.jsx)("div",{className:Uo(null,Bo("toolbar")),children:(0,Zt.jsxs)("div",{className:Uo("container"),children:[(0,Zt.jsx)("div",{className:Uo("component",Bo("filter")),children:(0,Zt.jsx)(Un.A,{size:"m",value:t,debounce:Pi.Op,onChange:this.props.changeFilterText})}),a.length>1&&(0,Zt.jsx)("div",{className:Uo("component"),children:(0,Zt.jsx)(ar.A,{size:"m",value:null!=o?o:"",onUpdate:this.props.changePoolTreeFilter,items:(0,Re.SA)(a,""),name:"operation-statistics-pool-tree"})}),r.length>1&&(0,Zt.jsx)("div",{className:Uo("component"),children:(0,Zt.jsx)(ar.A,{size:"m",value:null!=i?i:"",onUpdate:this.props.changeJobType,items:(0,Re.SA)(r,""),name:"operation-statistics-job-type"})}),(0,Zt.jsx)("div",{className:Uo("component"),children:(0,Zt.jsx)(ar.A,{size:"m",value:n,onChange:this.props.changeAggregation,items:Pi.ne,name:"operation-statistics-aggregator"})}),(0,Zt.jsxs)("div",{className:Uo("component",Bo("expand-collapse")),children:[(0,Zt.jsx)("span",{className:Bo("expand-metrics"),children:(0,Zt.jsx)(wn.A,{size:"m",title:"Expand All",onClick:this.expandTable,children:(0,Zt.jsx)(Sn.A,{awesome:"arrow-to-bottom"})})}),(0,Zt.jsx)("span",{className:Bo("collapse-metrics"),children:(0,Zt.jsx)(wn.A,{size:"m",title:"Collapse All",onClick:this.collapseTable,children:(0,Zt.jsx)(Sn.A,{awesome:"arrow-to-top"})})})]}),(0,pe.fs)((0,Zt.jsx)("div",{className:Uo("component",Bo("help")),children:(0,Zt.jsx)(oo.A,{url:W.Ay.docsUrls["problems:jobstatistics"]})}))]})})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.treeState,r=e.items;return(0,Zt.jsx)(ia.A,{children:(0,Zt.jsxs)("div",{className:Bo(null,t),children:[this.renderToolbar(),(0,Zt.jsx)(Oo.w,{children:(0,Zt.jsx)(Nn.A,(0,l.A)((0,l.A)({},Io),{},{templates:this.template,css:Bo(),treeState:n,items:r}))})]})})}}]),n}(r.Component),Ho={setTreeState:function(e){return{type:Pi.aj,data:{treeState:e}}},changeFilterText:function(e){return{type:Pi.yh,data:{filterText:e}}},changeAggregation:function(e){var t=e.target;return{type:Pi.Wc,data:{activeAggregation:t.value}}},changeJobType:function(e){return function(t,n){t({type:Pi.U8,data:{jobTypeFilter:e}});var r=n(),a=Be(r).type,i=(0,Nr.$_)(r);i&&i[a]!==e&&t((0,Eo.tX)((0,l.A)((0,l.A)({},i),{},(0,s.A)({},a,e))))}},changePoolTreeFilter:function(e){return function(t){t({type:Pi.U8,data:{poolTreeFilter:e}})}}},qo=(0,u.Ng)((function(e){var t=e.operations.statistics,n=t.treeState,r=t.activeAggregation,a=zi(e),i=a.job_type,o=a.pool_tree;return(0,l.A)({items:Li(e),treeState:n,activeAggregation:r,jobTypes:i,poolTrees:o},Fi(e))}),Ho)(Wo);function $o(e){var t=(0,u.d4)(qe);return(0,Gr.v)({type:Ft.c.OPERATION_TAB_STATISTICS,additionalStartType:Ft.c.OPERATION,startDeps:[t],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Ie.RP)(t)}}),(0,Zr.ol)({type:Ft.c.OPERATION_TAB_STATISTICS,stopDeps:[t],allowStop:function(e){var t=(0,o.A)(e,1)[0];return(0,Ie.RP)(t)}}),(0,Zt.jsx)(qo,(0,l.A)({},e))}var Ko=n(85907),Yo=n(33951),Go=function(e){return e.operations.jobs.jobsErrors},Zo=function(e){return e.operations.jobsOperationIncarnations.filter},Xo=function(e){return e.operations.jobsOperationIncarnations.availableValues},Qo=n(31285),es=n.n(Qo),ts=n(82942),ns=new Fe.A,rs=new Fe.A,as=function(e){return e.operations.detail.operation};function is(){return function(e,t){var n=t(),r=(0,at.Si)(n);return rs.removeAllRequests(),De.X8.getJob({parameters:os(n),cancellation:rs.saveCancelToken}).then((function(t){e({type:Ko.dL.SUCCESS,data:{job:t,clusterConfig:r,operationId:as(n).$value}}),e(ss())})).catch((function(t){t.code===C().codes.CANCELLED?e({type:Ko.dL.CANCELLED}):e({type:Ko.dL.FAILURE,data:{error:t}})}))}}function os(e){var t=e.operations.detail.operation,n=e.operations.jobs.filters;return{operation_id:t.$value,job_id:n.jobId.value}}function ss(){return function(e,t){var n=t(),r=(0,at.Si)(n);return De.X8.listJobs({parameters:us(n),cancellation:rs.removeAllAndSave}).then((function(t){var a=t.jobs;e({type:Ko.u2.SUCCESS,data:{jobs:a,clusterConfig:r,operationId:as(n).$value}})})).catch((function(t){t.code===C().codes.CANCELLED?e({type:Ko.u2.CANCELLED}):e({type:Ko.u2.FAILURE,data:{error:t}})}))}}function ls(e){var t,n,r,a=e.operations.detail.operation,i=e.operations.jobs,o=i.filters,s=i.pagination,u=e.tables[Ko.MV],c=Zo(e);return(0,l.A)((0,l.A)((0,l.A)({operation_id:a.$value},function(e,t){var n=e.filterBy.value||e.filterBy.defaultValue;return{state:cs(e,"state"),type:cs(e,"type"),address:"address"===n?cs(e,"address"):void 0,with_stderr:cs(e,"withStderr"),with_monitoring_descriptor:cs(e,"withMonitoringDescriptor"),with_fail_context:cs(e,"withFailContext"),with_spec:cs(e,"withSpec"),with_competitors:cs(e,"withCompetitors"),sort_field:t.field||"none",sort_order:t.asc?"ascending":"descending",task_name:cs(e,"taskName")}}(o,u)),(n=(t=s).offset,r=t.limit,{offset:Math.max(0,n),limit:r+Ko.Ym})),{},{operation_incarnation:c||void 0})}function us(e){var t=e.operations.detail.operation,n=e.operations.jobs.job,r=e.tables[Ko.MV];return{operation_id:t.$value,job_competition_id:null==n?void 0:n.attributes.job_competition_id,sort_field:r.field||"none",sort_order:r.asc?"ascending":"descending"}}function cs(e,t){var n=e[t];return n.value===n.defaultValue?void 0:n.value}var ds=new Fe.A;function ps(){return function(e,t){var n=t(),r=Pe(n),a=as(n);if(e(function(e){return function(t){return ns.removeAllRequests(),t(ts.wd.onRequest({operationId:e.id})),"vanilla"!==e.type?t(ts.wd.onReset()):De.Qq.listJobs(De.Vu.jobsOperationIncarnations,{parameters:{operation_id:e.id,limit:1e3},cancellation:ns.removeAllAndSave}).then((function(e){t(ts.wd.onSuccess({availableValues:es()(Ai()(e.jobs.map((function(e){return e.operation_incarnation}))))}))}))}}({id:a.id,type:a.type})),r)return e(is());e({type:Ko.kf.REQUEST});var i=[{command:"list_jobs",parameters:ls(n)}],s=(0,at.Si)(n);return De.Qq.executeBatch(De.Vu.operationGetJobs,{parameters:{requests:i},cancellation:ds.removeAllAndSave}).then((function(t){var n=(0,o.A)(t,1)[0];if(n.error)return Promise.reject(n.error);var r=n.output,i=r.jobs,l=r.errors,u=r.state_counts,c=r.type_counts;e({type:Ko.kf.SUCCESS,data:{jobs:i,jobsErrors:l,operationId:a.id,clusterConfig:s}}),e({type:Ko.bZ,data:{stateCounters:u,typeCounters:c}})})).catch((function(t){(0,Fe.m)(t)||e({type:Ko.kf.FAILURE,data:{error:t}})}))}}function ms(e){return{type:Ko.Sd,data:e}}function vs(e){return function(t){var n=e.name,r=e.value,a="state"===n;!a||"completed"!==r&&"failed"!==r&&"aborted"!==r?a&&("all"===r||"running"===r)&&t((0,Yo.V)({tableId:Ko.MV,columnName:"start_time",asc:!0})):t((0,Yo.V)({tableId:Ko.MV,columnName:"finish_time",asc:!1})),"jobId"!==n||r||t({type:Ko.Ru}),t(ms(e)),t(fs(yr.b4.FIRST))}}function hs(e){return function(t){var n=e.id;t({type:Ko.qE.REQUEST}),De.X8.getJobInputPaths({job_id:n,output_format:Kt.r$}).then((function(e){t({type:Ko.qE.SUCCESS,data:e})})).catch((function(e){e.code!==C().codes.CANCELLED&&t({type:Ko.qE.FAILURE,data:{error:e}})}))}}function fs(e){return function(t,n){var r=n().operations.jobs.pagination,a=r.limit,i=r.offset,o=null;switch(e){case yr.b4.FIRST:o=0;break;case yr.b4.NEXT:o=i+a;break;case yr.b4.PREV:if((o=Math.max(0,i-a))===i)return;break;default:return}t({type:Ko.GN,data:o}),t(ps())}}var gs=n(63588),As=n(72679),bs=n(55695),js=n(63366),xs=n(42324),ys=n(57614),_s=n(28269);var Ns=n(33497),ks=n(40860);function ws(){}ws.Error=function(e){var t=e.error,n=(0,u.wA)();return(0,Zt.jsx)("div",{children:(0,Zt.jsx)(ba.Bj.Error,{error:t,onClick:function(){return n((0,Cn.Hm)(t))}})})},ws.InputPaths=function(e){var t=e.job,n=(0,u.wA)();return(0,Zt.jsx)(on.A,{theme:"ghost",onClick:function(){return n(hs(t))},children:"View"})},ws.DebugInfo=function(e){var t=e.type,n=e.job.getDebugInfo(t),r=n.size,a=n.url;return(0,Zt.jsx)(ba.Bj.DownloadLink,{url:a,size:r})},ws.Progress=function(e){var t=e.state,n=e.progress;switch(t){case"running":return(0,Zt.jsx)(An.k,{size:"s",value:100*n,theme:"info"});case"completed":return(0,Zt.jsx)(An.k,{size:"s",value:100,theme:"success"});case"failed":return(0,Zt.jsx)(An.k,{size:"s",value:100,theme:"danger"});case"aborted":return(0,Zt.jsx)(An.k,{size:"s",value:100,theme:"default"});default:return(0,Zt.jsx)(An.k,{size:"s",value:0})}};var Ss=n(79703),Ts=function(e){return h()(k.A.getValue(e),(function(e,t){var n=w.A.format.Number(e);return t.endsWith("_data_size")||t.endsWith("_data_weight")?n=w.A.format.Bytes(e):t.endsWith("_time")&&(n=w.A.format.TimeDuration(e,{format:"milliseconds"})),{key:w.A.format.Readable(t),value:(0,Zt.jsx)("div",{style:{textAlign:"right"},children:n})}}))},Cs=function(e){var t=e.statistics,n=e.type;if(!t||"vanilla"===n)return null;var r=k.A.getValues(t,["/processed_input_row_count","/processed_input_uncompressed_data_size"]),a=(0,o.A)(r,2),i=a[0],s=a[1];return i||s?(0,Zt.jsx)(Tn.m,{content:(0,Zt.jsx)(N.Ay,{items:Ts(t)}),children:(0,Zt.jsxs)(ii.s,{gap:2,alignItems:"center",wrap:!0,children:[(0,Zt.jsx)("span",{children:w.A.format.Number(i)}),(0,Zt.jsxs)("span",{children:["(",w.A.format.Bytes(s),")"]}),(0,Zt.jsx)(As.I,{data:Ss.A,size:16})]})}):null};const Ps=function(e){return(0,Zt.jsx)("svg",(0,l.A)((0,l.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,Zt.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M3 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M9.5 8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m5 0a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0",clipRule:"evenodd"})}))};var Es=n(89947),Rs=n(55740),Is=n(77950),Os=n(75299),Vs=(0,a.A)("yt-job-status-info"),zs=function(e){var t=e.state,n=e.info,a=(0,Os.A)(!1),i=(0,o.A)(a,2),s=i[0],l=i[1],u=(0,r.useRef)(null),c=w.A.format.ReadableField((null==n?void 0:n.preemption_reason)||(null==n?void 0:n.interruption_reason));return(0,Zt.jsxs)(ii.s,{alignItems:"center",gap:1,className:Vs(),children:[w.A.format.ReadableField(t),Boolean(c)&&(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)("div",{onMouseEnter:l,children:(0,Zt.jsx)(Es.J,{theme:"warning",ref:u,children:"Interrupted"})}),(0,Zt.jsx)(Rs.z,{open:s,hasArrow:!0,anchorRef:u,onMouseLeave:l,children:(0,Zt.jsxs)("div",{className:Vs("popup"),children:[(0,Zt.jsx)("div",{children:c}),(0,Zt.jsx)(Is.b,{title:"Copy reason",view:"flat-secondary",size:"s",text:c})]})})]})]})},Fs=["text"],Ms=(0,a.A)("operation-detail-jobs"),Ds=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).actions=[{name:"abort",modalKey:"job_abort",successMessage:"Successfully aborted the job.",errorMessage:"Could not abort the job.",text:"Abort",message:"Aborting job will cause losing its progress, are you sure you want to proceed?",confirmationText:Ns.e},{name:"abandon",modalKey:"job_abandon",successMessage:"Successfully abandoned the job.",errorMessage:"Could not abandon the job.",text:"Abandon",message:"Abandoning job will cause losing its progress, are you sure you want to proceed?",confirmationText:Ns.e},{name:"input_context",modalKey:"job_input_context",message:(0,Zt.jsxs)("span",{children:["You are about to ",(0,Zt.jsx)("strong",{children:"dump input context"})," of the job"]}),text:"Dump input context",successMessageTemplate:function(t){var n="/".concat(e.props.cluster,"/navigation?path=").concat(t);return(0,Zt.jsxs)("span",{children:["Successfully dumped the job input context ",(0,Zt.jsx)(on.A,{url:n,children:"here"})]})},errorMessage:"Could not dump the job input context."}],e.prepareJobAction=function(t){var n=t.text,r=(0,be.A)(t,Fs),a=e.props,i=a.login,o=a.promptAction,s=r.message||(0,Zt.jsxs)("span",{children:["You are about to ",(0,Zt.jsx)("strong",{children:r.name})," a job."]});return{text:n,action:function(e){return o((0,l.A)((0,l.A)({},r),{},{message:s,handler:function(t){var n=t.currentOption;return function(e){var t,n=e.login,r=e.name,a={job_id:e.item.id};switch(_s.A.countEvent({"operation_detail_running-jobs_action":r}),r){case"abort":t=C().v3.abortJob(a);break;case"abandon":t=C().v3.abandonJob(a);break;case"input_context":t=function(e){var t="//tmp/ui/"+e;return C().v3.create({path:t,type:"map_node",recursive:!0,ignore_existing:!0}).then((function(){var e="/input_context_"+w.A.format.toBase26(xe()().unix());return t+e}))}(n).then((function(e){return C().v3.dumpJobContext(Object.assign({},a,{path:e})).then((function(){return e}))}));break;case"input":t=Promise.resolve("foo")}return t}((0,l.A)((0,l.A)({},e),{},{name:r.name,currentOption:n,login:i}))}}))}}},e.preparedActions=h()(e.actions,e.prepareJobAction),e.renderIdAddress=function(t){var n=e.props.cluster,a=t.id,i=t.address,o=t.job_competition_id,s=t.operationId,l=t.is_stale,u=t.attributes,c=w.A.format.Address(i),d=k.A.getValue(u,"/start_time"),p=k.A.getValue(u,"/finish_time"),m=k.A.getValue(u,"/monitoring_descriptor"),v=o&&o!==a;return(0,Zt.jsxs)("div",{children:[(0,Zt.jsxs)("div",{className:Ms("id","elements-monospace"),children:[(0,Zt.jsx)(_n.A,{text:a,view:"flat-secondary",size:"s",title:"Copy job id"}),(0,Zt.jsx)(on.A,{className:Ms("id-job-link"),routed:!0,url:"/".concat(n,"/job/").concat(s,"/").concat(a),theme:"primary",children:a}),l&&(0,Zt.jsx)(ks.q,{})]}),(0,Zt.jsxs)("div",{className:Ms("host","elements-monospace"),children:[(0,Zt.jsxs)("span",{className:Ms("host-name"),children:[(0,Zt.jsx)(_n.A,{text:c,view:"flat-secondary",size:"s",title:"Copy host"}),c]}),(0,Zt.jsx)("span",{className:Ms("host-chart-link"),children:(0,Zt.jsx)(xs.A,{url:W.Ay.makeUrlForMonitoringDescriptor(n,{from:d,to:p},m)})})]}),v&&(0,Zt.jsxs)(r.Fragment,{children:[(0,Zt.jsx)("br",{}),(0,Zt.jsxs)("span",{className:Ms("speculative-job-label","elements-monospace elements-ellipsis"),children:["Speculative job for ",o]})]})]})},e.renderErrorAndDebug=function(e){var t=[{key:"error",value:(0,Zt.jsx)(ws.Error,{error:e.error}),visible:Boolean(e.error)},{key:"input_paths",value:(0,Zt.jsx)(ws.InputPaths,{job:e}),visible:e.areInputPathsPresent()},{key:"stderr",value:(0,Zt.jsx)(ws.DebugInfo,{job:e,type:"stderr"}),visible:e.getDebugInfo("stderr").size>0},{key:"fail_context",value:(0,Zt.jsx)(ws.DebugInfo,{job:e,type:"fail_context"}),visible:e.getDebugInfo("fail_context").size>0},{key:"full_input",value:(0,Zt.jsx)(ws.DebugInfo,{job:e,type:"full_input"}),visible:Boolean(e.has_spec)}];return(0,Zt.jsx)(N.Ay,{items:t})},e.renderActions=function(t){var n=e.props.openAttributesModal,r=(0,Zt.jsx)(Qn.$,{view:"flat-secondary",title:"Show actions",children:(0,Zt.jsx)(As.I,{data:Ps,size:16})}),a=h()(e.preparedActions,(function(e){var n=e.action;return{text:e.text,action:function(){return n({item:t})}}})),i=[{text:"Show attributes",action:function(){return n({title:t.id,attributes:t.attributes})}}];return"running"===t.state?(0,Zt.jsx)(bs.r,{switcher:r,items:[a,i]}):(0,Zt.jsx)(bs.r,{switcher:r,items:i})},e.settings={css:Ms(),theme:"light",size:"s",striped:!1,virtual:!1,tableId:Ko.MV,computeKey:function(e){return e.id},columns:{items:{id_address:{name:"id_address",align:"left",caption:"Id / Address",sort:!1},task_name:{name:"task_name",align:"left",caption:"Task name",sort:!0},start_time:{name:"start_time",align:"left",caption:"Start time",sort:!0},finish_time:{name:"finish_time",align:"left",caption:"Finish time",sort:!0},duration:{get:function(e){return e.duration},sort:!0,name:"duration",align:"left"},error:{name:"error",align:"left",caption:"Error / Debug",get:function(e){return e.error}},type:{name:"type",align:"left",sort:!0},progress:{name:"progress",align:"left",sort:!0},actions:{name:"actions",align:"right",caption:"",sort:!1}},sets:{default:{items:["id_address","type","progress","error","start_time","finish_time","duration","actions"]},withTaskName:{items:["id_address","type","progress","error","task_name","start_time","finish_time","duration","actions"]}},mode:e.props.taskNamesNumber>1?"withTaskName":"default"},templates:{id_address:e.renderIdAddress,type:e.renderType,progress:e.renderProgress,error:e.renderErrorAndDebug,start_time:e.renderStartTime,finish_time:e.renderFinishTime,duration:e.renderDuration,actions:e.renderActions,task_name:e.renderTaskName}},e}return(0,b.A)(n,[{key:"renderTaskName",value:function(e){return(0,Zt.jsx)("div",{className:Ms("task-name","elements-ellipsis"),children:e.task_name})}},{key:"renderProgress",value:function(e){var t=e.state,n=e.progress,r=e.brief_statistics,a=e.type,i=e.interruption_info;return(0,Zt.jsxs)("div",{className:Ms("state"),children:[(0,Zt.jsx)("div",{className:Ms("state-section","elements-ellipsis"),children:(0,Zt.jsx)(zs,{info:i,state:t})}),(0,Zt.jsx)("div",{className:Ms("state-section"),children:(0,Zt.jsx)(ws.Progress,{state:t,progress:n})}),(0,Zt.jsx)(Cs,{statistics:r,type:a})]})}},{key:"renderStartTime",value:function(e){return(0,Zt.jsx)("span",{className:Ms("start-time","elements-ellipsis"),children:w.A.format.DateTime(e.startTime)})}},{key:"renderFinishTime",value:function(e){return"running"===e.state?(0,Zt.jsx)("span",{className:Ms("in-progress","elements-ellipsis elements-secondary-text"),children:"In progress..."}):(0,Zt.jsx)("span",{className:Ms("finish-time elements-ellipsis"),children:w.A.format.DateTime(e.finishTime)})}},{key:"renderDuration",value:function(e){return(0,Zt.jsx)("span",{className:"elements-ellipsis",children:w.A.format.TimeDuration(e.duration)})}},{key:"renderType",value:function(e){return(0,Zt.jsx)("span",{children:w.A.format.ReadableField(e.type)})}},{key:"renderInputPathsModal",value:function(){var e=this.props,t=e.inputPaths,n=t.paths,r=t.status,a=t.error,i=e.hideInputPaths;if(r===Kt.EG.UNINITIALIZED)return null;var o=gn.A.prepareSettings(),s=r===Kt.EG.ERROR?(0,Zt.jsx)(rn.z,(0,l.A)({},a)):(0,Zt.jsx)(sn.A,{value:n,settings:o});return(0,Zt.jsx)(js.A,{visible:!0,onCancel:i,loading:r===Kt.EG.LOADING,title:"Input paths",children:s})}},{key:"render",value:function(){var e=this.props,t=e.jobs,n=e.showCompetitiveJobs,a=e.getJobs,i=e.isLoading,o=e.collapsibleSize;if(n){var s=this.props,u=s.job,c=s.competitiveJobs,d=s.getCompetitiveJobs;return(0,Zt.jsxs)(r.Fragment,{children:[this.renderInputPathsModal(),(0,Zt.jsx)(Nn.A,(0,l.A)((0,l.A)({},this.settings),{},{items:[u].filter(Boolean),onSort:d,isLoading:i})),c.length>0&&(0,Zt.jsx)(Ta.A,{name:"All competitive jobs",className:Ms("competitive-jobs"),collapsed:!0,size:o,children:(0,Zt.jsx)(Nn.A,(0,l.A)((0,l.A)({},this.settings),{},{items:c,onSort:d,isLoading:i}))})]})}return(0,Zt.jsxs)(r.Fragment,{children:[this.renderInputPathsModal(),(0,Zt.jsx)(Nn.A,(0,l.A)((0,l.A)({},this.settings),{},{items:t,onSort:a,isLoading:i}))]})}}]),n}(r.Component),Ls={openAttributesModal:ys.V6,showInputPaths:hs,hideInputPaths:function(){return{type:Ko.PN}},showErrorModal:Cn.Hm,promptAction:Cn.Jm,getJobs:ps,getCompetitiveJobs:ss};const Js=(0,u.Ng)((function(e,t){var n,r=e.operations,a=e.global,i=a.cluster,o=a.login,s=Pe(e),l=null===(n=He(e))||void 0===n?void 0:n.length,u=function(e){return e.operations.jobs.operationId}(e),c=Ue(e),d=r.jobs,p=d.jobs;return{jobs:c!==u?[]:p,job:d.job,competitiveJobs:d.competitiveJobs,showCompetitiveJobs:s,inputPaths:d.inputPaths,cluster:i,login:o,collapsibleSize:Xi.Y1,isLoading:t.isLoading||c!==u,taskNamesNumber:l}}),Ls)(Ds),Bs=(0,u.Ng)((function(e,t){var n=e.operations,r=n.jobs.filters,a=t.name,i=t.states,o=t.statesProvider,s=r[a],l=s.defaultValue,u=s.value,c=s.counters,d="function"==typeof o?o(n):i;return{value:Te(u,l),states:d,counters:c}}),{updateFilter:function(e,t){return vs({name:e,value:t})}})(hr);var Us=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).gotoFirstPage=function(){return e.props.gotoJobsPage(nt.b4.FIRST)},e.gotoNextPage=function(){return e.props.gotoJobsPage(nt.b4.NEXT)},e.gotoPrevPage=function(){return e.props.gotoJobsPage(nt.b4.PREV)},e}return(0,b.A)(n,[{key:"render",value:function(){var e=this.props,t=e.firstPageReached,n=e.lastPageReached,r=e.disabled;return(0,Zt.jsx)(gr.A,{size:"s",first:{handler:this.gotoFirstPage,disabled:r||t},previous:{handler:this.gotoPrevPage,hotkeyHandler:this.gotoPrevPage,disabled:r||t,hotkeyScope:"all",hotkey:"ctrl+left, command+left"},next:{handler:this.gotoNextPage,hotkeyHandler:this.gotoNextPage,disabled:r||n,hotkeyScope:"all",hotkey:"ctrl+right, command+right"},last:{disabled:!0}})}}]),n}(r.Component);const Ws=(0,u.Ng)((function(e){var t=e.operations.jobs.pagination;return{firstPageReached:t.firstPageReached,lastPageReached:t.lastPageReached,limit:t.limit,offset:t.offset}}),{gotoJobsPage:fs})(Us);var Hs=n(1686),qs=n.n(Hs);const $s=(0,u.Ng)((function(e,t){var n=e.operations.jobs.filters,r=t.statesProvider,a=t.name,i=n[a],o=i.defaultValue,s=i.value,l=r(i.data);return{value:Te(s,o),states:l,defaultValue:o,placeholder:"Filter ".concat(a,"...")}}),{updateFilter:function(e,t){return vs({name:e,value:t})}})(Vr);var Ks=(0,a.A)("operation-detail-jobs");function Ys(e){var t=e.pin,n=(0,u.d4)(Ce("jobId")),a=(0,u.wA)(),i=(0,r.useCallback)((function(e){a(vs({name:"jobId",value:e}))}),[]);return(0,Zt.jsx)(Un.A,{size:"m",placeholder:"Filter id...",onChange:i,value:null!=n?n:"",pin:t})}const Gs=function(){var e=(0,u.d4)(Ce("filterBy")),t=(0,u.wA)(),n=(0,r.useCallback)((function(e){t(vs({name:"filterBy",value:e}))}),[]);return(0,Zt.jsxs)(r.Fragment,{children:[(0,Zt.jsx)("div",{className:Ks("toolbar-filter-by-select"),children:(0,Zt.jsx)(pr.A,{value:e?[e]:[],items:h()(["address","id"],(function(e){return{value:e}})),onUpdate:function(e){return n(e[0])},pin:"round-clear",width:"max",hideFilter:!0})}),(0,Zt.jsxs)("div",{className:Ks("toolbar-filter-by-value"),children:["address"===e&&(0,Zt.jsx)($s,{name:"address",statesProvider:qs(),pin:"brick-round"}),"id"===e&&(0,Zt.jsx)(Ys,{pin:"brick-round"})]})]})},Zs=function(e){var t,n=(0,u.d4)((t=wt,function(e){return t.filter((function(t){return Ce(t)(e)}))})),a=(0,u.wA)(),i=(0,r.useCallback)((function(e){var t,n;a((t=wt,n=e,function(e){t.forEach((function(t){var r=-1!==n.indexOf(t);e(ms({name:t,value:r}))})),e(fs(yr.b4.FIRST))}))}),[]);return(0,Zt.jsx)(pr.A,(0,l.A)((0,l.A)({},e),{},{multiple:!0,value:n,label:"Attributes:",filterable:!0,items:kt,onUpdate:i}))};var Xs=(0,a.A)("yt-jobs-incarnation-filter");function Qs(e){var t=e.disabled,n=e.wrap,r=(0,u.wA)(),a=(0,u.d4)(Zo),i=(0,u.d4)(Xo);return null!=i&&i.length?n((0,Zt.jsx)(hr,{name:"incarnation",states:i.map((function(e){return{name:e,caption:e}})),disabled:t,width:"auto",value:a,updateFilter:function(e,t){r(function(e){return function(t){t(ts.wd.setFilter({filter:e})),t(ps())}}(t))},hideClear:!1,hideFilter:!1,popupClassName:Xs("popup")})):null}var el=(0,a.A)("operation-detail-jobs"),tl=(0,a.A)("elements-toolbar");function nl(e){var t=e.jobs.filters.type.counters;return w.A.utils.sortInPredefinedOrder(["all"],m()(t))}var rl=tl("component");function al(){var e=(0,u.d4)(Pe),t=(0,u.d4)(He),n=r.useMemo((function(){return[""].concat((0,fe.A)(t.map((function(e){return{name:e,caption:e}}))))}),[t]);return(0,Zt.jsx)("div",{className:el("toolbar"),children:(0,Zt.jsx)("div",{className:tl(),children:(0,Zt.jsxs)("div",{className:tl("container"),children:[(0,Zt.jsx)("div",{className:el("toolbar-filter-by",rl),children:(0,Zt.jsx)(Gs,{})}),(0,Zt.jsx)("div",{className:el("toolbar-filter-by",rl),children:(0,Zt.jsx)(Bs,{name:"taskName",states:n,width:"max"})}),(0,Zt.jsx)("div",{className:el("toolbar-state",rl),children:(0,Zt.jsx)(Bs,{name:"type",statesProvider:nl,disabled:e,width:200})}),(0,Zt.jsx)("div",{className:el("toolbar-state",rl),children:(0,Zt.jsx)(Bs,{name:"state",states:["all","running","completed","failed","aborted"],disabled:e,width:200})}),(0,Zt.jsx)("div",{className:el("toolbar-attributes",rl),children:(0,Zt.jsx)(Zs,{disabled:e,width:200})}),(0,Zt.jsx)(Qs,{disabled:e,wrap:function(e){return(0,Zt.jsxs)("div",{className:el("toolbar-state",rl),children:[e," "]})}}),(0,Zt.jsx)("div",{className:el("toolbar-pagination",rl),children:(0,Zt.jsx)(Ws,{disabled:e})})]})})})}var il=(0,a.A)("operation-jobs-errors");function ol(){var e=(0,u.d4)(Go);return(0,Zt.jsx)("div",{className:il(),children:h()(e,(function(e,t){return(0,Zt.jsx)(rn.z,{error:e},t)}))})}const sl=r.memo(ol);function ll(e){var t=e.className,n=(0,u.wA)(),a=(0,u.d4)((function(e){return e.operations.jobs.loading})),i=(0,u.d4)((function(e){return e.operations.jobs.loaded})),o=(0,u.d4)((function(e){return e.operations.jobs.error})),s=(0,u.d4)((function(e){return e.operations.jobs.errorData})),l=r.useCallback((function(){n(ps())}),[n]);(0,Yr.Tt)(l,{timeout:15e3});var c=a&&!i;return(0,Zt.jsx)(ia.A,{children:(0,Zt.jsxs)("div",{className:"operation-detail-jobs ".concat(t),children:[(0,Zt.jsx)(al,{}),(0,Zt.jsxs)(gs.A,{loaded:i,loading:a,error:o,errorData:s,alwaysShowError:!0,children:[(0,Zt.jsx)(sl,{}),(0,Zt.jsx)(Js,{isLoading:c})]})]})})}function ul(e){var t=(0,u.d4)(Ke),n=(0,u.d4)(qe);return(0,Gr.v)({type:Ft.c.OPERATION_TAB_JOBS,additionalStartType:Ft.c.OPERATION,startDeps:[t,n],allowStart:function(e){var t=(0,o.A)(e,2),n=t[0],r=t[1];return!(0,Ie.RP)(n)||!(0,Ie.RP)(r)}}),(0,Zr.ol)({type:Ft.c.OPERATION_TAB_JOBS,stopDeps:[t,n],allowStop:function(e){var t=(0,o.A)(e,2),n=t[0],r=t[1];return(0,Ie.RP)(n)&&(0,Ie.RP)(r)}}),(0,Zt.jsx)(ll,(0,l.A)({},e))}var cl=n(38198),dl=n(73502),pl=function(e){return e.operations.jobsMonitor.error},ml=function(e){return e.operations.jobsMonitor.loading},vl=function(e){return e.operations.jobsMonitor.loaded},hl=(0,ye.Mz)([function(e){return e.operations.jobsMonitor.jobs}],(function(e){return U()(e,(function(e){var t=e.monitoring_descriptor;return Boolean(t)}))})),fl=(0,ye.Mz)([hl],(function(e){var t,n;return O()(e,(function(e){var r=e.start_time,a=e.finish_time;if(r){var i=xe()(r).valueOf();t=yi()([i,t])}if(a){var o=xe()(a).valueOf();n=Ni()([o,n])}})),{from:t,to:n}})),gl=(0,ye.Mz)([hl],(function(e){return h()(e,"monitoring_descriptor").join("|")})),Al=(0,ye.Mz)([Ue,function(e){return e.operations.jobsMonitor.operation_id},gl,pl],(function(e,t,n,r){return e===t&&(!ai()(r)||Boolean(n))}));function bl(){var e=(0,u.d4)(at.dB),t=(0,u.d4)(gl),n=(0,u.d4)(fl),r=n.from,a=n.to,i=(0,u.d4)(pl),o=(0,u.d4)(vl),s=(0,u.d4)(ml);if(!o&&s)return(0,Zt.jsx)(cl.A,{visible:!0,centered:!0});if(!t&&!i)return(0,Zt.jsx)(dl.R,{warning:'There are no jobs with "monitoring_descriptor"'});var l=W.Ay.getMonitorComponentForJob();return(0,Zt.jsxs)(ia.A,{children:[i&&(0,Zt.jsx)(rn.z,{error:i}),(0,Zt.jsx)(l,{cluster:e,job_descriptor:t,from:r,to:a})]})}const jl=r.memo(bl);function xl(e){var t,n=e.className,r=(0,u.d4)($e),a=(0,u.d4)(po.VK),i=(0,u.d4)(Ue);return t=(0,u.d4)(qe),(0,Gr.v)({type:Ft.c.OPERATION_TAB_ATTRIBUTES,additionalStartType:Ft.c.OPERATION,startDeps:[t],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Ie.RP)(t)}}),(0,Zr.ol)({type:Ft.c.OPERATION_TAB_ATTRIBUTES,stopDeps:[t],allowStop:function(e){var t=(0,o.A)(e,1)[0];return(0,Ie.RP)(t)}}),(0,Zt.jsx)(sn.A,{className:n,value:r,settings:a,extraTools:(0,Zt.jsx)(mo.O,{value:r,settings:a,name:"operation_attributes_".concat(i)}),folding:!0})}const yl=r.memo(xl);var _l=n(36161);function Nl(e){var t=e.component,n=(0,u.d4)(Be),r=(0,u.d4)(at.dB);return(0,Zt.jsx)(ia.A,{children:(0,Zt.jsx)(t,{cluster:r,operation:n})})}const kl=r.memo(Nl);var wl=n(23133),Sl=(0,a.A)("operation-detail"),Tl=(0,a.A)("elements-heading");function Cl(e){var t=e.operationId,n=(0,u.wA)(),a=r.useCallback((function(){n(tt(t))}),[n,t]);return(0,Yr.Tt)(a,{timeout:15e3}),null}var Pl=function(e){(0,j.A)(n,e);var t=(0,x.A)(n);function n(){var e;(0,A.A)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handlePoolsEditClick=function(){var t=e.props,n=t.operation;(0,t.showEditPoolsWeightsModal)(n)},e.renderAction=function(t){var n=e.props,r=n.promptAction,a=n.operation,i=t.message||(0,Zt.jsxs)("span",{children:["Are you sure you want to ",(0,Zt.jsx)("strong",{children:t.name})," the operation?"]}),o=function(n){var r=n.currentOption;return(0,Ee.wF)((0,l.A)((0,l.A)({},t),{},{operation:a,currentOption:r})).then((function(){return e.props.getOperation(a.$value)}))};return(0,Zt.jsxs)(wn.A,{view:t.theme,className:Sl("action"),title:w.A.format.ReadableField(t.name),onClick:function(){return r((0,l.A)((0,l.A)({},t),{},{message:i,handler:o}))},children:[(0,Zt.jsx)(Sn.A,{awesome:t.icon})," ",w.A.format.ReadableField(t.name)]},t.name)},e.onProgressLinkClick=function(t){(0,e.props.updateListJobsFilter)({name:"state",value:t})},e}return(0,b.A)(n,[{key:"settings",get:function(){return gn.A.prepareSettings()}},{key:"renderHeader",value:function(){var e=this.props.actions,t=void 0===e?[]:e,n=this.props.operation,r=n.type,a=n.user,i=void 0===a?"":a,o=n.state,s=n.suspended,l=n.title,u=n.$value,c=s?"suspended":o;return(0,Zt.jsxs)("div",{className:Sl("header","elements-section"),children:[(0,Zt.jsxs)("div",{className:Sl("header-heading",Tl({size:"l"})),children:[w.A.format.ReadableField(r)," operation by ",(0,Zt.jsx)(kn.R,{name:i})," ",(0,Zt.jsx)(bn.A,{label:c,renderPlaque:!0})]}),(0,Zt.jsx)("div",{className:Sl("header-title"),children:(0,Zt.jsx)(sn.A,{value:l||u,inline:!0})}),(0,Zt.jsx)("div",{className:Sl("actions"),children:t.map(this.renderAction)})]})}},{key:"renderOverview",value:function(){var e=this.props,t=e.operation,n=e.cluster,r=e.totalJobWallTime,a=e.cpuTimeSpent,i=e.erasedTrees,o=t.$value,s=t.user,l=void 0===s?"":s,u=t.type,c=t.startTime,d=t.finishTime,p=t.duration,m=t.pools,v=t.state,h=[[{key:"id",value:(0,Zt.jsx)(N.Bj.Id,{id:o})},{key:"user",value:(0,Zt.jsx)(kn.R,{name:l})},{key:"pools",value:(0,Zt.jsx)(N.CD,{onEdit:this.handlePoolsEditClick,cluster:n,pools:m,state:v,erasedTrees:i})},{key:"type",value:(0,Zt.jsx)(N.Bj.Readable,{value:u})}],[{key:"started",value:(0,Zt.jsx)(N.Bj.Time,{time:c,valueFormat:"DateTime"})},{key:"finished",value:(0,Zt.jsx)(N.Bj.Time,{time:d,valueFormat:"DateTime"})},{key:"duration",value:(0,Zt.jsx)(N.Bj.Time,{time:p,valueFormat:"TimeDuration"})},{key:"total job wall time",value:(0,Zt.jsx)(N.Bj.Time,{time:r,valueFormat:"TimeDuration"})},{key:"total cpu time spent",value:(0,Zt.jsx)(N.Bj.Time,{time:a,valueFormat:"TimeDuration"})}]];return(0,Zt.jsxs)("div",{className:Sl("overview"),children:[(0,Zt.jsx)("div",{className:Sl("general"),children:(0,Zt.jsx)(N.Ay,{items:h})}),(0,Zt.jsxs)("div",{className:Sl("progress-wrapper"),children:[(0,Zt.jsx)(yn,{operation:t,onLinkClick:this.onProgressLinkClick}),"failed"!==t.state&&(0,Zt.jsx)(yn,{operation:t,type:"failed",onLinkClick:this.onProgressLinkClick})]})]})}},{key:"renderTabs",value:function(){var e,t=this.props,n=t.match.params,r=n.operationId,a=n.tab,i=t.cluster,o=t.operation,u=t.hasStatististicsTab,c=t.jobsMonitorVisible,d=t.monitorTabVisible,p=t.monitorTabTitle,m=t.monitorTabUrlTemplate,v="/".concat(i,"/").concat(Kt.YW.OPERATIONS,"/").concat(r),h=(0,l.A)((0,l.A)({},(0,Ee.h9)(o)),{},(e={},(0,s.A)(e,he.oz.STATISTICS,{show:u}),(0,s.A)(e,he.oz.JOBS_MONITOR,{show:c||a===he.oz.JOBS_MONITOR}),(0,s.A)(e,he.oz.MONITOR,{show:d}),e));if(m){var f,g=h[he.oz.MONITOR];g.routed=!1,g.external=!0;var A=(null===(f=o.pools)||void 0===f?void 0:f[0])||{};g.url=(0,Ee.tG)((0,l.A)((0,l.A)({cluster:i,operation:o},A),{},{urlTemplate:m}))}var b=(0,Re._4)(v,he.oz,h,void 0,(0,s.A)({},he.oz.MONITOR,null!=p?p:"Monitoring"));return(0,Zt.jsx)("div",{className:Sl("tabs"),children:(0,Zt.jsx)(sa.A,(0,l.A)((0,l.A)({},b),{},{active:a,routed:!0,routedPreserveLocation:!0,size:Xi.jr}))})}},{key:"renderMain",value:function(){var e=this.props,t=e.match,n=e.cluster,r=e.monitorTabVisible,a=e.jobsMonitorIsSupported,o=e.monitoringComponent,s=t.url,l=t.params.operationId,u="/".concat(n,"/").concat(Kt.YW.OPERATIONS,"/").concat(l);return Oe(l)?(0,Zt.jsx)("div",{className:Sl("main"),children:(0,Zt.jsxs)(i.dO,{children:[(0,Zt.jsx)(i.qh,{path:"".concat(u,"/").concat(he.oz.ATTRIBUTES),render:function(){return(0,Zt.jsx)(yl,{className:Sl("attributes")})}}),(0,Zt.jsx)(i.qh,{path:"".concat(u,"/").concat(he.oz.DETAILS),component:ro}),(0,Zt.jsx)(i.qh,{path:"".concat(u,"/").concat(he.oz.SPECIFICATION),component:_o}),(0,Zt.jsx)(i.qh,{path:"".concat(u,"/").concat(he.oz.STATISTICS),render:function(){return(0,Zt.jsx)($o,{className:Sl("statistics")})}}),(0,Zt.jsx)(i.qh,{path:"".concat(u,"/").concat(he.oz.JOBS),render:function(){return(0,Zt.jsx)(ul,{className:Sl("jobs")})}}),(0,Zt.jsx)(i.qh,{path:"".concat(u,"/").concat(he.oz.JOB_SIZES),render:function(){return(0,Zt.jsx)(Po,{className:Sl("job-sizes")})}}),(0,Zt.jsx)(i.qh,{path:"".concat(u,"/").concat(he.oz.PARTITION_SIZES),component:ga}),r&&o&&(0,Zt.jsx)(i.qh,{path:"".concat(u,"/").concat(he.oz.MONITOR),render:function(){return(0,Zt.jsx)(kl,{component:o})}}),a&&(0,Zt.jsx)(i.qh,{path:"".concat(u,"/").concat(he.oz.JOBS_MONITOR),component:jl}),(0,Zt.jsx)(i.qh,{path:"".concat(u,"/:tab"),component:_l.A}),(0,Zt.jsx)(i.rd,{from:s,to:"".concat(u,"/").concat(he._N)})]})}):this.renderAlias()}},{key:"renderAlias",value:function(){var e=this.props,t=e.match,n=e.cluster,r=e.operation,a=t.url,o=t.params,s=o.operationId,l=o.tab;if(s!==k.A.getValue(r,"/@spec/alias"))return null;var u="/".concat(n,"/").concat(Kt.YW.OPERATIONS,"/").concat(r.$value).concat(l?"/"+l:"");return(0,Zt.jsx)(i.rd,{from:a,to:u})}},{key:"renderContent",value:function(e){return e?(0,Zt.jsx)(oa.a,{}):(0,Zt.jsxs)(r.Fragment,{children:[this.renderHeader(),this.renderOverview(),this.renderTabs(),this.renderMain()]})}},{key:"renderError",value:function(){var e=this.props.errorData;return(0,Zt.jsx)(rn.z,{message:e.message,error:e.details})}},{key:"render",value:function(){var e=this.props,t=e.error,n=e.loading,r=e.loaded,a=e.match.params.operationId,i=n&&!r;return(0,Zt.jsxs)(ia.A,{children:[(0,Zt.jsx)(Cl,{operationId:a}),(0,Zt.jsx)("div",{className:Sl({loading:i}),children:t&&!r?this.renderError():this.renderContent(i)})]})}}]),n}(r.Component),El={promptAction:Cn.Jm,getOperation:tt,showEditPoolsWeightsModal:Yt,updateListJobsFilter:vs},Rl=(0,u.Ng)((function(e){var t=e.operations.detail,n=t.operation,r=t.errorData,a=t.loading,i=t.loaded,o=t.error,s=t.actions,l=Bi(e),u=Hi(e),c=Le(e),d=W.Ay.getMonitoringForOperation(n)||{},p=d.component,m=d.urlTemplate,v=d.title,h=Boolean(p)||Boolean(m);return{cluster:(0,wl.KF)(e),operation:n,errorData:r,loading:a,loaded:i,error:o,actions:s,totalJobWallTime:l,cpuTimeSpent:u,erasedTrees:c,monitorTabVisible:h,monitorTabTitle:v,monitorTabUrlTemplate:m,monitoringComponent:p,jobsMonitorIsSupported:Boolean(W.Ay.getMonitorComponentForJob()),jobsMonitorVisible:Al(e),hasStatististicsTab:Mi(e)}}),El),Il=Rl(Pl);function Ol(e){var t=(0,u.d4)(qe);return(0,Gr.v)({type:Ft.c.OPERATION,startDeps:[t],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Ie.RP)(t)}}),(0,Zt.jsx)(Il,(0,l.A)({},e))}var Vl=(0,a.A)("operations");const zl=(0,i.y)((function(e){var t=e.match,n=e.viewContext!==Kt.PB?"elements-main-section":"";return(0,Zt.jsxs)("div",{className:Vl(null,n),children:[(0,Zt.jsx)(vn,{}),(0,Zt.jsxs)(i.dO,{children:[(0,Zt.jsx)(i.qh,{path:t.path,exact:!0,render:function(){return(0,Zt.jsx)(aa,{})}}),(0,Zt.jsx)(i.qh,{path:"".concat(t.path,"/:operationId/:tab?"),component:Ol})]})]})}))},46357:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});var r=n(40319),a=n(22636),i=n(15647),o=n(52797);function s(e){var t=(0,i.d4)(o.dB);(0,a.gj)((0,r.A)((0,r.A)({},e),{},{subPage:e.subPage||"ui.".concat(t)}))}},27652:(e,t,n)=>{"use strict";n.d(t,{c:()=>s,w:()=>o});var r=n(53746),a=n.n(r),i=n(11843);function o(e){return new(a())(e).load(null,1e4)}function s(e){return function(t,n){var r=(0,i.Y)(n());return Promise.all([o(r.regular),o(r.monospace)]).then((function(){return e}))}}},39702:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(40319),a=n(64922);const i=function(e){return(0,a.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,a.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.47 13.03a.75.75 0 0 1 0-1.06L9.44 8 5.47 4.03a.75.75 0 0 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0",clipRule:"evenodd"})}))}},79703:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(40319),a=n(64922);const i=function(e){return(0,a.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,a.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14M6.44 4.54c.43-.354.994-.565 1.56-.565 1.217 0 2.34.82 2.34 2.14 0 .377-.079.745-.298 1.1-.208.339-.513.614-.875.867-.217.153-.326.257-.379.328-.038.052-.038.07-.038.089a.75.75 0 0 1-1.5 0c0-.794.544-1.286 1.057-1.645.28-.196.4-.332.458-.426a.54.54 0 0 0 .074-.312c0-.3-.243-.641-.839-.641a1 1 0 0 0-.608.223c-.167.138-.231.287-.231.418a.75.75 0 1 1-1.5 0c0-.674.345-1.22.78-1.577ZM8 12a1 1 0 1 0 0-2 1 1 0 0 0 0 2",clipRule:"evenodd"})}))}},49096:()=>{},50256:(e,t,n)=>{"use strict";n.d(t,{R:()=>s,J:()=>o});var r=n(50326);const a=JSON.parse('{"common":{"tooltip-sum":"Sum","tooltip-rest":"Rest"},"chartkit":{"error":"Error","legend-series-hide":"Hide all lines","legend-series-show":"Show all lines","tooltip-point-format-size":"Size","tooltip-sum":"Sum","tooltip-rest":"Rest","error-incorrect-key-value-intro":"Incorrect notation of an object passed to","error-incorrect-key":", object keys must be convertible to integer","error-incorrect-value":", object values must be a string or a function which returns a string"},"chartkit-table":{"message-no-data":"No data","paginator-rows":"Rows"},"chartkit-ymap-legend":{"label-more":"Show more {{count}}","label-hide":"Hide","label-heatmap":"Heatmap"},"error":{"label_no-data":"No data","label_unknown-plugin":"Unknown plugin type \\"{{type}}\\"","label_unknown-error":"Unknown error","label_invalid-axis-category-data-point":"It seems you are trying to use inappropriate data type for \\"{{key}}\\" value in series \\"{{seriesName}}\\" for axis with type \\"category\\". Strings and numbers are allowed.","label_invalid-axis-datetime-data-point":"It seems you are trying to use inappropriate data type for \\"{{key}}\\" value in series \\"{{seriesName}}\\" for axis with type \\"datetime\\". Only numbers are allowed.","label_invalid-axis-linear-data-point":"It seems you are trying to use inappropriate data type for \\"{{key}}\\" value in series \\"{{seriesName}}\\" for axis with type \\"linear\\". Numbers and nulls are allowed.","label_invalid-pie-data-value":"It seems you are trying to use inappropriate data type for \\"value\\" value. Only numbers are allowed.","label_invalid-series-type":"It seems you haven\'t defined \\"series.type\\" property, or defined it incorrectly. Available values: [{{types}}].","label_invalid-series-property":"It seems you are trying to use inappropriate value for \\"{{key}}\\", or defined it incorrectly. Available values: [{{values}}].","label_invalid-treemap-redundant-value":"It seems you are trying to set \\"value\\" for container node. Check node with this properties: { id: \\"{{id}}\\", name: \\"{{name}}\\" }","label_invalid-treemap-missing-value":"It seems you are trying to use node without \\"value\\". Check node with this properties: { id: \\"{{id}}\\", name: \\"{{name}}\\" }","label_invalid-y-axis-index":"It seems you are trying to use inappropriate index for Y axis: \\"{{index}}\\""},"highcharts":{"reset-zoom-title":"Reset zoom","decimal-point":".","thousands-sep":" ","Mon":"Mon","Tue":"Tue","Wed":"Wed","Thu":"Thu","Fri":"Fri","Sat":"Sat","Sun":"Sun","Jan":"Jan","January":"January","Feb":"Feb","February":"February","Mar":"Mar","March":"March","Apr":"Apr","April":"April","May":"May","Jun":"Jun","June":"June","Jul":"Jul","July":"July","Aug":"Aug","August":"August","Sep":"Sep","September":"September","Oct":"Oct","October":"October","Nov":"Nov","November":"November","Dec":"Dec","December":"December"}}'),i=JSON.parse('{"common":{"tooltip-sum":"Сумма","tooltip-rest":"Остальные"},"chartkit":{"error":"Ошибка","legend-series-hide":"Скрыть все линии","legend-series-show":"Показать все линии","loading":"Загрузка","tooltip-point-format-size":"Размер","tooltip-sum":"Сумма","tooltip-rest":"Остальные","error-incorrect-key-value-intro":"Некорректный формат объекта переданного как значение в","error-incorrect-key":", ключи объекта должны быть преобразуемы в целое число","error-incorrect-value":", значением объекта может быть либо строка, либо функция возвращающая строку"},"chartkit-table":{"message-no-data":"Нет данных","paginator-rows":"Строки"},"chartkit-ymap-legend":{"label-more":"Показать ещё {{count}}","label-hide":"Свернуть","label-heatmap":"Тепловая карта"},"error":{"label_no-data":"Нет данных","label_unknown-plugin":"Неизвестный тип плагина \\"{{type}}\\"","label_unknown-error":"Неизвестная ошибка","label_invalid-axis-category-data-point":"Похоже, что вы пытаетесь использовать недопустимый тип данных для значения \\"{{key}}\\" в серии \\"{{seriesName}}\\" для оси с типом \\"category\\". Допускается использование строк и чисел.","label_invalid-axis-datetime-data-point":"Похоже, что вы пытаетесь использовать недопустимый тип данных для значения \\"{{key}}\\" в серии \\"{{seriesName}}\\" для оси с типом \\"datetime\\". Допускается только использование чисел.","label_invalid-axis-linear-data-point":"Похоже, что вы пытаетесь использовать недопустимый тип данных для значения \\"{{key}}\\" в серии \\"{{seriesName}}\\" для оси с типом \\"linear\\". Допускается использование чисел и значений null.","label_invalid-pie-data-value":"Похоже, что вы пытаетесь использовать недопустимый тип данных для значения \\"value\\". Допускается только использование чисел.","label_invalid-series-type":"Похоже, что вы не указали значение \\"series.type\\" или указали его неверно. Доступные значения: [{{types}}].","label_invalid-series-property":"Похоже, что вы пытаетесь использовать недопустимое значение для \\"{{key}}\\", или указали его неверно. Доступные значения: [{{values}}].","label_invalid-treemap-redundant-value":"Похоже, что вы пытаетесь установить значение \\"value\\" для узла, используемого в качестве контейнера. Проверьте узел с этими свойствами: { id: \\"{{id}}\\", name: \\"{{name}}\\" }","label_invalid-treemap-missing-value":"Похоже, что вы пытаетесь использовать узел без значения \\"value\\". Проверьте узел с этими свойствами: { id: \\"{{id}}\\", name: \\"{{name}}\\" }","label_invalid-y-axis-index":"Похоже, что вы пытаетесь использовать некорректный индекс для оси Y: \\"{{index}}\\""},"highcharts":{"reset-zoom-title":"Сбросить увеличение","decimal-point":",","thousands-sep":" ","Mon":"Пн","Tue":"Вт","Wed":"Ср","Thu":"Чт","Fri":"Пт","Sat":"Сб","Sun":"Вс","Jan":"Янв","January":"Январь","Feb":"Фев","February":"Февраль","Mar":"Мар","March":"Март","Apr":"Апр","April":"Апрель","May":"Май","Jun":"Июн","June":"Июнь","Jul":"Июл","July":"Июль","Aug":"Авг","August":"Август","Sep":"Сен","September":"Сентябрь","Oct":"Окт","October":"Октябрь","Nov":"Ноя","November":"Ноябрь","Dec":"Дек","December":"Декабрь"}}'),o=new r.TH;o.registerKeysets("en",a),o.registerKeysets("ru",i);const s=o.i18n.bind(o)},32286:(e,t,n)=>{"use strict";n.d(t,{R:()=>a,iY:()=>r});const r={NO_DATA:"ERR.CK.NO_DATA",INVALID_DATA:"ERR.CK.INVALID_DATA",UNKNOWN:"ERR.CK.UNKNOWN_ERROR",UNKNOWN_PLUGIN:"ERR.CK.UNKNOWN_PLUGIN",TOO_MANY_LINES:"ERR.CK.TOO_MANY_LINES"};class a extends Error{constructor({originalError:e,message:t,code:n=r.UNKNOWN}={}){super(t),this.isCustomError=!0,this.code=n,e&&(this.name=e.name,this.stack=e.stack)}}},52789:(e,t,n)=>{"use strict";n.d(t,{W:()=>v});var r=n(44531),a=n(81214),i=n.n(a),o=n(13630),s=n.n(o),l=n(50256),u=n(95603),c=n.n(u);function d(e,t,n){if("plugins"===n){const n=[...e],r=[...t];let a=n.map((e=>{const t=r.findIndex((({type:t})=>t===e.type));if(-1!==t){const n=r[t];return r.splice(t,1),{type:e.type,renderer:n.renderer}}return e}));return r.length>0&&(a=[...a,...r]),a}return c()(e)?s()(e,t,d):t}const p=new class{constructor(){this.events={}}on(e,t){this.events[e]?this.events[e].push(t):this.events[e]=[t]}off(e,t){this.events[e]&&(this.events[e]=this.events[e].filter((({id:e})=>e!==t)))}dispatch(e,t){this.events[e]&&this.events[e].forEach((({action:e})=>{e(t)}))}},m=e=>{(0,r.jK)({lang:e}),l.J.setLang(e)},v=new class{constructor(){this.settings={plugins:[],lang:"en"},m(this.get("lang"))}get(e){return i()(this.settings,e)}set(e){const t=(n=e,Object.entries(n).reduce(((e,[t,n])=>(void 0!==n&&(e[t]=n),e)),{}));var n;if(this.settings=s()(this.settings,t,d),t.lang){const e=t.lang||this.get("lang");m(e),p.dispatch("change-lang",e)}}}},67901:(e,t,n)=>{"use strict";n.d(t,{cn:()=>a,o:()=>i});var r=n(29717);const a=(0,r.withNaming)({e:"__",m:"_"}),i=(0,r.withNaming)({n:"chartkit-",e:"__",m:"_"})},87605:(e,t,n)=>{"use strict";n.d(t,{d:()=>r});const r=()=>`ck.${((e,t)=>{let n="";for(let e=10;e>0;--e)n+=t[Math.floor(36*Math.random())];return n})(0,"0123456789abcdefghijklmnopqrstuvwxyz")}`},53746:e=>{!function(){function t(e,t){document.addEventListener?e.addEventListener("scroll",t,!1):e.attachEvent("scroll",t)}function n(e){this.g=document.createElement("div"),this.g.setAttribute("aria-hidden","true"),this.g.appendChild(document.createTextNode(e)),this.h=document.createElement("span"),this.i=document.createElement("span"),this.m=document.createElement("span"),this.j=document.createElement("span"),this.l=-1,this.h.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.i.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.j.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.m.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;",this.h.appendChild(this.m),this.i.appendChild(this.j),this.g.appendChild(this.h),this.g.appendChild(this.i)}function r(e,t){e.g.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+t+";"}function a(e){var t=e.g.offsetWidth,n=t+100;return e.j.style.width=n+"px",e.i.scrollLeft=n,e.h.scrollLeft=e.h.scrollWidth+100,e.l!==t&&(e.l=t,!0)}function i(e,n){function r(){var e=i;a(e)&&null!==e.g.parentNode&&n(e.l)}var i=e;t(e.h,r),t(e.i,r),a(e)}function o(e,t,n){t=t||{},n=n||window,this.family=e,this.style=t.style||"normal",this.weight=t.weight||"normal",this.stretch=t.stretch||"normal",this.context=n}var s=null,l=null,u=null,c=null;function d(e){return null===c&&(c=!!e.document.fonts),c}function p(e,t){var n=e.style,r=e.weight;if(null===u){var a=document.createElement("div");try{a.style.font="condensed 100px sans-serif"}catch(e){}u=""!==a.style.font}return[n,r,u?e.stretch:"","100px",t].join(" ")}o.prototype.load=function(e,t){var a=this,o=e||"BESbswy",u=0,c=t||3e3,m=(new Date).getTime();return new Promise((function(e,t){if(d(a.context)&&!function(e){return null===l&&(d(e)&&/Apple/.test(window.navigator.vendor)?(e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent),l=!!e&&603>parseInt(e[1],10)):l=!1),l}(a.context)){var v=new Promise((function(e,t){!function n(){(new Date).getTime()-m>=c?t(Error(c+"ms timeout exceeded")):a.context.document.fonts.load(p(a,'"'+a.family+'"'),o).then((function(t){1<=t.length?e():setTimeout(n,25)}),t)}()})),h=new Promise((function(e,t){u=setTimeout((function(){t(Error(c+"ms timeout exceeded"))}),c)}));Promise.race([h,v]).then((function(){clearTimeout(u),e(a)}),t)}else!function(e){document.body?e():document.addEventListener?document.addEventListener("DOMContentLoaded",(function t(){document.removeEventListener("DOMContentLoaded",t),e()})):document.attachEvent("onreadystatechange",(function t(){"interactive"!=document.readyState&&"complete"!=document.readyState||(document.detachEvent("onreadystatechange",t),e())}))}((function(){function l(){var t;(t=-1!=f&&-1!=g||-1!=f&&-1!=A||-1!=g&&-1!=A)&&((t=f!=g&&f!=A&&g!=A)||(null===s&&(t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),s=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))),t=s&&(f==b&&g==b&&A==b||f==j&&g==j&&A==j||f==x&&g==x&&A==x)),t=!t),t&&(null!==y.parentNode&&y.parentNode.removeChild(y),clearTimeout(u),e(a))}var d=new n(o),v=new n(o),h=new n(o),f=-1,g=-1,A=-1,b=-1,j=-1,x=-1,y=document.createElement("div");y.dir="ltr",r(d,p(a,"sans-serif")),r(v,p(a,"serif")),r(h,p(a,"monospace")),y.appendChild(d.g),y.appendChild(v.g),y.appendChild(h.g),a.context.document.body.appendChild(y),b=d.g.offsetWidth,j=v.g.offsetWidth,x=h.g.offsetWidth,function e(){if((new Date).getTime()-m>=c)null!==y.parentNode&&y.parentNode.removeChild(y),t(Error(c+"ms timeout exceeded"));else{var n=a.context.document.hidden;!0!==n&&void 0!==n||(f=d.g.offsetWidth,g=v.g.offsetWidth,A=h.g.offsetWidth,l()),u=setTimeout(e,50)}}(),i(d,(function(e){f=e,l()})),r(d,p(a,'"'+a.family+'",sans-serif')),i(v,(function(e){g=e,l()})),r(v,p(a,'"'+a.family+'",serif')),i(h,(function(e){A=e,l()})),r(h,p(a,'"'+a.family+'",monospace'))}))}))},e.exports=o}()},75299:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(77810),a=function(e,t){return"boolean"==typeof t?t:!e};const i=function(e){return(0,r.useReducer)(a,e)}}}]);
2
+ //# sourceMappingURL=31.7fbb68da.chunk.js.map