@ytsaurus/ui 1.103.0 → 1.103.1

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 (60) hide show
  1. package/dist/public/build/assets-manifest.json +40 -40
  2. package/dist/public/build/css/default-subject-link.b01c2230.chunk.css +2 -0
  3. package/dist/public/build/css/default-subject-link.b01c2230.chunk.css.map +1 -0
  4. package/dist/public/build/css/{main.d1987746.css → main.23e8d0fd.css} +2 -2
  5. package/dist/public/build/css/main.23e8d0fd.css.map +1 -0
  6. package/dist/public/build/js/6157.6786c942.chunk.js +2 -0
  7. package/dist/public/build/js/6157.6786c942.chunk.js.map +1 -0
  8. package/dist/public/build/js/6983.a2b31b33.chunk.js +2 -0
  9. package/dist/public/build/js/6983.a2b31b33.chunk.js.map +1 -0
  10. package/dist/public/build/js/8165.9684f49e.chunk.js +2 -0
  11. package/dist/public/build/js/8165.9684f49e.chunk.js.map +1 -0
  12. package/dist/public/build/js/{accounts.aaa21eca.chunk.js → accounts.f328f823.chunk.js} +2 -2
  13. package/dist/public/build/js/accounts.f328f823.chunk.js.map +1 -0
  14. package/dist/public/build/js/acl.556f2525.chunk.js +2 -0
  15. package/dist/public/build/js/acl.556f2525.chunk.js.map +1 -0
  16. package/dist/public/build/js/{bundles.b851f32c.chunk.js → bundles.0ab2d6f4.chunk.js} +2 -2
  17. package/dist/public/build/js/{bundles.b851f32c.chunk.js.map → bundles.0ab2d6f4.chunk.js.map} +1 -1
  18. package/dist/public/build/js/cluster-page-wrapper.a5c05070.chunk.js +2 -0
  19. package/dist/public/build/js/{cluster-page-wrapper.45436df6.chunk.js.map → cluster-page-wrapper.a5c05070.chunk.js.map} +1 -1
  20. package/dist/public/build/js/dashboard.efdd63a2.chunk.js +3 -0
  21. package/dist/public/build/js/{dashboard.234b8062.chunk.js.map → dashboard.efdd63a2.chunk.js.map} +1 -1
  22. package/dist/public/build/js/main.a89bac74.js +3 -0
  23. package/dist/public/build/js/main.a89bac74.js.map +1 -0
  24. package/dist/public/build/js/{navigation-flow.a79a25f5.chunk.js → navigation-flow.1d83e216.chunk.js} +2 -2
  25. package/dist/public/build/js/{navigation-flow.a79a25f5.chunk.js.map → navigation-flow.1d83e216.chunk.js.map} +1 -1
  26. package/dist/public/build/js/{navigation.b91a7a0b.chunk.js → navigation.0aff5a3a.chunk.js} +2 -2
  27. package/dist/public/build/js/{navigation.b91a7a0b.chunk.js.map → navigation.0aff5a3a.chunk.js.map} +1 -1
  28. package/dist/public/build/js/{query-tracker.5a0d626f.chunk.js → query-tracker.b7334a6f.chunk.js} +2 -2
  29. package/dist/public/build/js/{query-tracker.5a0d626f.chunk.js.map → query-tracker.b7334a6f.chunk.js.map} +1 -1
  30. package/dist/public/build/js/{runtime.8a460b23.js → runtime.d583e98e.js} +2 -2
  31. package/dist/public/build/js/{runtime.8a460b23.js.map → runtime.d583e98e.js.map} +1 -1
  32. package/dist/public/build/js/users.aec1e380.chunk.js +2 -0
  33. package/dist/public/build/js/users.aec1e380.chunk.js.map +1 -0
  34. package/dist/public/build/js/yt-df-dialog.1d05b0a5.chunk.js +3 -0
  35. package/dist/public/build/js/yt-df-dialog.1d05b0a5.chunk.js.map +1 -0
  36. package/dist/public/build/manifest.json +34 -34
  37. package/package.json +4 -3
  38. package/dist/public/build/css/default-subject-link.4dc8a973.chunk.css +0 -2
  39. package/dist/public/build/css/default-subject-link.4dc8a973.chunk.css.map +0 -1
  40. package/dist/public/build/css/main.d1987746.css.map +0 -1
  41. package/dist/public/build/js/2009.8121a60e.chunk.js +0 -2
  42. package/dist/public/build/js/2009.8121a60e.chunk.js.map +0 -1
  43. package/dist/public/build/js/6157.92170346.chunk.js +0 -2
  44. package/dist/public/build/js/6157.92170346.chunk.js.map +0 -1
  45. package/dist/public/build/js/6960.8b7e01c6.chunk.js +0 -2
  46. package/dist/public/build/js/6960.8b7e01c6.chunk.js.map +0 -1
  47. package/dist/public/build/js/accounts.aaa21eca.chunk.js.map +0 -1
  48. package/dist/public/build/js/acl.1ad3d494.chunk.js +0 -2
  49. package/dist/public/build/js/acl.1ad3d494.chunk.js.map +0 -1
  50. package/dist/public/build/js/cluster-page-wrapper.45436df6.chunk.js +0 -2
  51. package/dist/public/build/js/dashboard.234b8062.chunk.js +0 -3
  52. package/dist/public/build/js/main.aa6a17d8.js +0 -3
  53. package/dist/public/build/js/main.aa6a17d8.js.map +0 -1
  54. package/dist/public/build/js/users.a0dc610f.chunk.js +0 -2
  55. package/dist/public/build/js/users.a0dc610f.chunk.js.map +0 -1
  56. package/dist/public/build/js/yt-df-dialog.acab4eb0.chunk.js +0 -3
  57. package/dist/public/build/js/yt-df-dialog.acab4eb0.chunk.js.map +0 -1
  58. /package/dist/public/build/js/{dashboard.234b8062.chunk.js.LICENSE.txt → dashboard.efdd63a2.chunk.js.LICENSE.txt} +0 -0
  59. /package/dist/public/build/js/{main.aa6a17d8.js.LICENSE.txt → main.a89bac74.js.LICENSE.txt} +0 -0
  60. /package/dist/public/build/js/{yt-df-dialog.acab4eb0.chunk.js.LICENSE.txt → yt-df-dialog.1d05b0a5.chunk.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[6582],{5800:(e,t,n)=>{n.d(t,{A:()=>p});var r=n(40319),a=n(18801),o=(n(77810),n(15647)),l=n(97536),s=n(57614),i=n(92611);const c=JSON.parse('{"tooltip-content":"Show attributes"}'),u=JSON.parse('{"tooltip-content":"Показать аттрибуты"}'),d=(0,i.Kc)("yt:attributes-button",{en:c,ru:u});var m=n(64922),h=["title","getPathProps","path","exactPath","attribute","attributes","openAttributesModal","withTooltip","tooltipProps"];const p=(0,o.Ng)(null,{openAttributesModal:s.V6})((function(e){var t=e.title,n=e.getPathProps,o=void 0===n?function(){return{}}:n,s=e.path,i=e.exactPath,c=e.attribute,u=e.attributes,p=e.openAttributesModal,b=e.withTooltip,v=void 0===b||b,_=e.tooltipProps,f=void 0===_?{placement:"bottom-end",content:d("tooltip-content")}:_,g=(0,a.A)(e,h);return(0,m.jsx)(l.A,(0,r.A)((0,r.A)({},g),{},{tooltipProps:f,withTooltip:v,onClick:function(){var e=(0,r.A)({path:s,exactPath:i},o());p((0,r.A)((0,r.A)({title:t},e),{},{attribute:c,attributes:u}))}}))}))},10559:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(40319),a=n(64922);const o=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:"M1 3.25a.75.75 0 0 1 .75-.75h12.5a.75.75 0 0 1 0 1.5H1.75A.75.75 0 0 1 1 3.25M1 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 1 8m.75 4a.75.75 0 0 0 0 1.5h2.5a.75.75 0 0 0 0-1.5z",clipRule:"evenodd"})}))}},11970:(e,t,n)=>{n.d(t,{k:()=>h});var r=n(64922),a=n(77810);const o=(0,n(21086).om)("progress");function l(e){const{text:t,offset:n=0}=e;return t?(0,r.jsx)("div",{className:o("text-inner"),style:{transform:`translateX(calc(var(--g-flow-direction) * ${-n}%))`},children:t}):null}function s({item:e}){const{value:t,color:n,className:a,theme:l,title:s,content:i,loading:c}=e,u={loading:c};return void 0===n&&(u.theme=l||"default"),Number.isFinite(t)?(0,r.jsx)("div",{className:o("item",u,a),style:{width:`${t}%`,backgroundColor:n},title:s,children:i}):null}function i(e){return e<100?e-100:0}function c(e){const{theme:t,colorStops:n,colorStopsValue:r,value:a}=e;if(n){const e=n.find(((e,t)=>{const o="number"==typeof r?r:a,l=t>1?n[t-1].stop:0,s=t<n.length-1?e.stop:100;return o>=l&&o<=s}));return e?e.theme:t}return t}function u(e){const{stack:t,stackClassName:n,value:a,text:c}=e,u=i(a||function(e){return e.reduce(((e,{value:t})=>e+t),0)}(t));return(0,r.jsxs)("div",{className:o("stack",n),style:{transform:`translateX(calc(var(--g-flow-direction) * ${u}%))`},children:[(0,r.jsx)("div",{className:o("item"),style:{width:-u+"%"}}),t.map(((e,t)=>(0,r.jsx)(s,{item:e},t))),(0,r.jsx)(l,{offset:u,text:c})]})}function d(e){const{value:t,loading:n,text:a}=e,s=i(t);return Number.isFinite(t)?(0,r.jsx)("div",{className:o("item",{theme:c(e),loading:n}),style:{transform:`translateX(calc(var(--g-flow-direction) * ${s}%))`},children:(0,r.jsx)(l,{offset:s,text:a})}):null}function m(e){return void 0!==e.stack}const h=a.forwardRef((function(e,t){const{text:n="",theme:a="default",size:l="m",loading:s=!1,className:i,qa:c}=e,h=Object.assign(Object.assign({},e),{text:n,theme:a,size:l,loading:s});return(0,r.jsxs)("div",{ref:t,className:o({size:l},i),"data-qa":c,children:[(0,r.jsx)("div",{className:o("text"),children:n}),m(h)?(0,r.jsx)(u,Object.assign({},h)):(0,r.jsx)(d,Object.assign({},h))]})}))},18058:(e,t,n)=>{n.d(t,{x:()=>v});var r=n(77810),a=n(15647),o=n(76872),l=n(52797),s=n(76426),i=n(44131),c=n(19410),u=n(31229),d=n(771),m=n(64922),h=(0,d.X4)(u.mH.reShortNameFromAddress),p=(0,d.X4)(u.mH.reShortNameFromTabletNodeAddress),b=(0,o.A)("yt-host");function v(e){var t=e.address,n=void 0===t?"":t,o=e.prefix,u=e.className,d=e.copyBtnClassName,v=e.onClick,_=e.useText,f=e.asTabletNode,g=e.inlineMargins,y=r.useMemo((function(){return function(e,t){var n=t?p:h;if(n){var r,a=null==n?void 0:n.exec(e);if(null!=a&&null!==(r=a.groups)&&void 0!==r&&r.shortname)return[a.groups.shortname,a.groups.suffix].filter(Boolean).join("")}}(n,f)||n}),[n,f]),A=(0,a.d4)(l.dB);return(0,m.jsxs)("span",{className:b({hidden:!y,"inline-margins":g},["elements-monospace",u].filter(Boolean).join(" ")),onClick:v,children:[o,(0,m.jsx)(c.m,{className:b("tooltip"),content:n,children:_?y:(0,m.jsx)(s.A,{url:"/".concat(A,"/components/nodes/").concat(n),routed:!0,children:y})}),(0,m.jsx)("span",{className:b("copy-btn",d),children:(0,m.jsx)(i.A,{view:"flat-secondary",text:n})})]})}},26777:(e,t,n)=>{n.d(t,{BZ:()=>k,D1:()=>q,Gy:()=>P,N8:()=>I,O6:()=>L,Rh:()=>F,Sz:()=>H,VS:()=>V,Y:()=>O,Zb:()=>R,o6:()=>z,u_:()=>E,w8:()=>T});var r=n(70353),a=n(53775),o=n(9736),l=n(28407),s=n(40319),i=n(13322),c=n(3009),u=n.n(c),d=n(39760),m=n.n(d),h=n(31470),p=n.n(h),b=n(96843),v=n.n(b),_=n(27528),f=n.n(_),g=n(90636),y=n.n(g),A=n(84092),x=n.n(A),N=n(69313),w=n(48971),j=n(27859),C={labels:["codec:","level:"],items:(0,i.A)(["none","snappy","zlib_","lz4","lz4_high_compression","quick_lz","zstd_","brotli_","lzma_","bzip2_"].map((function(e){return{value:e,content:e}}))),subItemsMap:{zlib_:B(1,9),zstd_:B(1,21),brotli_:B(1,11),lzma_:B(0,9),bzip2_:B(1,9)}};function B(e,t){for(var n=[],r=e;r<=t;++r)n.push({value:String(r),content:String(r)});return n}function k(e){if(!e)return[N.HL];for(var t in C.subItemsMap)if(e.startsWith(t))return[t,e.substr(t.length)];return[e]}function T(e){return p()(e,[N.HL])?"":null==e?void 0:e.join("")}var E={REPLICATION:"replication",ERASURE:"erasure"},S=[{value:"lrc_12_2_2",title:"lrc_12_2_2 (recommended)"},{value:"reed_solomon_6_3",title:"reed_solomon_6_3"}];function L(e){return e&&"none"!==e?E.ERASURE:E.REPLICATION}function R(e){return e&&"none"!==e?e:S[0].value}function z(e,t){return e===E.REPLICATION?"none":t||S[0].value}var O={NONE:"none",COMPRESSED:"compressed",UNCOMPRESSED:"uncompressed"};function F(e){return{ui_marker:e}}function P(e,t,n){return null==t?{command:"remove",parameters:(0,s.A)({path:e},n)}:{command:"set",parameters:(0,s.A)((0,s.A)({path:e},n),{},{force:!0}),input:t}}var I={REPLICATED_TABLE:"replicated_table",REPLICATION_LOG_TABLE:"replication_log_table",CHAOS_REPLICATED_TABLE:"chaos_replicated_table",MAP_NODE:"map_node",TABLE:"table"};function D(e,t){return U.apply(this,arguments)}function U(){return(U=(0,l.A)((0,a.A)().mark((function e(t,n){var o,l,s,i,c;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.length){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:o={},m()(n,(function(e){for(var t=e.split("/"),n=1;n<t.length;++n){var r=t.slice(0,n).join("/");r&&(o[r]=!0)}})),l=Object.keys(o).sort(),s=(0,r.A)(l),e.prev=6,c=(0,a.A)().mark((function e(){var n,r;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.value,r=t+"/@"+n,e.next=4,x().v3.exists({path:r}).then((function(e){if(!e)return x().v3.set({path:r},{})}));case 4:case"end":return e.stop()}}),e)})),s.s();case 9:if((i=s.n()).done){e.next=13;break}return e.delegateYield(c(),"t0",11);case 11:e.next=9;break;case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(6),s.e(e.t1);case 18:return e.prev=18,s.f(),e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[6,15,18,21]])})))).apply(this,arguments)}function q(e,t){if(v()(t))return Promise.resolve();var n=[],r=[],s={};return m()(t,(function(t){var a=t.attr,l=t.value,i=a.split("/");if(1===i.length){var c=e+"/@"+i.join("/");n.push(P(c,l))}else{var u=i.splice(i.length-1,1),d=(0,o.A)(u,1)[0],m=i.join("/");r.push(m);var h=e+"/@"+m;(s[h]=s[h]||{})[d]=l}})),Promise.all([].concat((0,i.A)(n.length?[(0,w.Mt)(j.Qq.executeBatch(j.Vu.updateNodeAttributes,{requests:n}),"Failed to update node attributes")]:[]),[D(e,r).then((function(){if(v()(s))return Promise.resolve([]);var e=f()(s,function(){var e=(0,l.A)((0,a.A)().mark((function e(t,n){var r;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=M(n,t),e.next=3,r;case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());return Promise.all(e)}))]))}function M(e,t){if(v()(t))return Promise.resolve();var n=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=u()(n);return m()(t,(function(e,t){void 0===e?delete r[t]:r[t]=e})),p()(n,r)?Promise.resolve():x().v3.set({path:e},r)};return x().v3.exists({path:e}).then((function(t){return t?j.Qq.get(j.Vu.updateAttributes,{path:e}).then(n):n({})}))}function H(e,t,n){return{command:e,parameters:t,setup:n}}function V(e){var t=y()(e,(function(e){return-1===e.indexOf("/")})),n=(0,o.A)(t,2),r=n[0],a=n[1];return a.length?{keys:r,paths:a}:r}},31710:(e,t,n)=>{n.d(t,{X:()=>s}),n(77810);var r=n(73822),a=n(66133),o=n(64922),l={good:"success",initializing:"warning",degrading:"warning",failed:"danger",changing:"info",pending:"info"};function s(e){var t=e.value,n=e.className,s=l[t||""];return t?(0,o.jsx)(a.A,{className:n,theme:s,children:t}):r.A.format.NO_VALUE}},49524:(e,t,n)=>{n.d(t,{B:()=>j,y:()=>y});var r=n(40319),a=n(18801),o=n(77810),l=n(64922),s=n(13778),i=n(96464),c=n(6542),u=n(80999),d=n(25723);function m(e,t){const n=e.getAttribute("target");return e.href&&(!n||"_self"===n)&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}const h=(0,n(21086).om)("breadcrumbs2");function p(e){var t;const n=e.href?"a":"span",r=(0,d.$)(e,{labelable:!0});let a=e.title;a||"string"!=typeof e.children||(a=e.children);const o=t=>{if(e.disabled)return void t.preventDefault();"function"==typeof e.onAction&&e.onAction();const n=t.currentTarget;"function"==typeof e.navigate&&n instanceof HTMLAnchorElement&&e.href&&!t.isDefaultPrevented()&&m(n,t)&&(t.preventDefault(),e.navigate(e.href,e.routerOptions))},s=e.disabled;let i={title:a,onClick:o,"aria-disabled":!!s||void 0};return"a"===n?(i.href=e.href,i.hrefLang=e.hrefLang,i.target=e.target,i.rel="_blank"!==e.target||e.rel?e.rel:"noopener noreferrer",i.download=e.download,i.ping=e.ping,i.referrerPolicy=e.referrerPolicy):(i.role="link",i.tabIndex=s?void 0:0,i.onKeyDown=e=>{"Enter"===e.key&&o(e)}),e.current&&(i["aria-current"]=null!==(t=e["aria-current"])&&void 0!==t?t:"page"),"menu"===e.itemType&&(i={}),(0,l.jsx)(n,Object.assign({},r,i,{className:"menu"===e.itemType?h("menu"):h("link",{"is-current":e.current,"is-disabled":s&&!e.current}),children:e.children}))}function b({separator:e}){return(0,l.jsx)("div",{"aria-hidden":!0,className:h("divider"),children:null!=e?e:"/"})}p.displayName="Breadcrumbs.Item",b.displayName="Breadcrumbs.Separator";var v=n(37338);const _=JSON.parse('{"breadcrumbs":"Breadcrumbs","label_more":"Show more"}'),f=JSON.parse('{"breadcrumbs":"Навигация","label_more":"Показать больше"}'),g=(0,v.N)({en:_,ru:f},"lab/Breadcrumbs");function y(e){return null}const A=o.forwardRef((function(e,t){const n=o.useRef(null),r=(0,s.N)(t,n),a=[];o.Children.forEach(e.children,((e,t)=>{o.isValidElement(e)&&(void 0!==e.key&&null!==e.key||(e=o.cloneElement(e,{key:t})),a.push(e))}));const[v,_]=o.useState(a.length),[f,y]=o.useState(!1),A=o.useCallback((()=>{y(!1),_(a.length)}),[a.length]);(0,i.w)({ref:n,onResize:A});const x=o.useRef(null);o.useLayoutEffect((()=>{f&&e.children!==x.current&&(x.current=e.children,y(!1),_(a.length))}),[f,a.length,e.children]),o.useLayoutEffect((()=>{f||(t=>{const r=n.current;if(!r)return;const o=Array.from(r.children);if(0===o.length)return;const l=r.offsetWidth;let s=0,i=0,c=e.maxItems||1/0,u=0;if(e.showRoot){const e=o.shift();e&&(u=e.scrollWidth,i+=u),s++}if(a.length>t){const e=o.shift();e&&(i+=e.offsetWidth),c--}e.showRoot&&i>=l&&(i-=u,s--);const d=o.pop();d&&(i+=Math.min(d.offsetWidth,200),i<l&&s++);for(let e=o.length-1;e>=0&&(i+=o[e].offsetWidth,!(i>=l));e--)s++;s=Math.max(Math.min(c,s),1),s===v?y(!0):_(s)})(v)}));const{navigate:N}=e;let w=a;if(a.length>v){w=[];const t=[...a];let n=v;if(e.showRoot&&v>1){const e=t.shift();e&&w.push(e),n--}const r=t.slice(0,-n),o=(0,l.jsx)(p,{itemType:"menu",children:(0,l.jsx)(u.r,{items:r.map(((t,n)=>Object.assign(Object.assign({},t.props),{text:t.props.children,disabled:e.disabled,items:[],action:r=>{var a;"function"==typeof e.onAction&&e.onAction(null!==(a=t.key)&&void 0!==a?a:n);const o=r.currentTarget;"function"==typeof N&&o instanceof HTMLAnchorElement&&t.props.href&&m(o,r)&&(r.preventDefault(),N(t.props.href,t.props.routerOptions))}}))),popupProps:{className:h("popup",{staircase:"staircase"===e.popupStyle}),placement:e.popupPlacement},renderSwitcher:({onClick:t})=>(0,l.jsx)(c.$,{title:g("label_more"),className:h("more-button"),onClick:t,size:"s",view:"flat",disabled:e.disabled,children:(0,l.jsx)(c.$.Icon,{children:"..."})})})});w.push(o),w.push(...t.slice(-n))}const j=w.length-1,C=w.map(((t,n)=>{var r;const a=n===j,s=null!==(r=t.key)&&void 0!==r?r:n;return(0,l.jsxs)("li",{className:h("item",{calculating:!f}),children:[(0,o.createElement)(p,Object.assign({},t.props,{key:s,current:a,disabled:e.disabled||t.props.disabled,onAction:()=>{"function"==typeof e.onAction&&e.onAction(s)},navigate:N}),t.props.children),a?null:(0,l.jsx)(b,{separator:e.separator})]},n)}));return(0,l.jsx)("ol",Object.assign({ref:r},(0,d.$)(e,{labelable:!0}),{"data-qa":e.qa,className:h(null,e.className),style:e.style,children:C}))}));A.Item=y,A.displayName="Breadcrumbs";var x=n(76872),N=["children"],w=(0,x.A)("yt-u-breadcrumbs"),j=function(e){var t=e.children,n=(0,a.A)(e,N);return(0,l.jsx)(A,(0,r.A)((0,r.A)({},n),{},{className:w(null,n.className),children:t}))}},56747:(e,t,n)=>{n.d(t,{A:()=>N});var r=n(40319),a=n(77810),o=n(76872),l=n(88314),s=n.n(l),i=n(10559),c=n(89648),u=n(80999),d=n(6542),m=n(32235),h=n(57486),p=n(44458),b=n(64922),v=(0,o.A)("yt-page-counter");function _(e){var t=e.pageIndex,n=e.pageCount,r=e.className;return void 0===t||void 0===n?null:n>1?(0,b.jsxs)("span",{className:v(null,r),children:["Page: ",(t||0)+1," / ",n]}):null}const f=a.memo(_);var g=n(84549),y=n(12680),A=(0,o.A)("column-header");function x(e){var t=e.column,n=e.title,r=e.shortTitle,a=null!=n?n:s()(t);return{nameContent:r||a,titleContent:a}}function N(e){var t=e.className,n=e.align,o=e.order,l=e.onSort,s=e.multisortIndex,i=e.loading,u=e.pageIndex,d=e.pageCount,m=function(e){if(void 0===e.options){var t=e.column,n=e.allowUnordered,a=e.withUndefined,o=e.title,l=e.shortTitle,s=e.allowedOrderTypes;return(0,r.A)({column:t,allowUnordered:n,withUndefined:a,allowedOrderTypes:s},x({column:t,title:o,shortTitle:l}))}var i=e.column,c=e.options,u=e.title,d=e.shortTitle,m=c.find((function(e){var t=e.column;return i===t}));return m||(0,y.N1)({message:"Unexpected behavior: missing value in ColumnHeader.props.options",additional:e}),(0,r.A)((0,r.A)({subColumn:x((0,r.A)({},m))},m),x({column:"",title:u,shortTitle:d}))}(e),v=m.column,_=m.allowUnordered,N=m.withUndefined,j=m.nameContent,C=m.titleContent,B=m.allowedOrderTypes,k=m.subColumn,T=a.useCallback((function(e){var t=B?(0,p.Pc)(o,B):(0,p.$N)(o,_,N);null==l||l(v,t,{currentOrder:o,multisort:e.ctrlKey||e.metaKey})}),[v,o,l,_,B,N]),E=Boolean(l);return(0,b.jsxs)("div",{className:A(null,t),children:[(0,b.jsxs)("div",{className:A("label-icon",{sortable:E,align:n}),onClick:E?T:void 0,children:[(0,b.jsx)("span",{className:A("label"),title:C,children:j}),E&&(0,b.jsx)("span",{className:A("icon"),children:(0,b.jsx)(h.A,{order:o})}),void 0!==s&&(0,b.jsxs)("span",{className:A("multisort"),children:[" ",(0,b.jsx)("sup",{children:s})]}),Boolean(o)&&Boolean(k)&&(0,b.jsx)(c.E,{className:A("label",{"sub-column":!0}),variant:"caption-2",title:null==k?void 0:k.titleContent,color:"dark-secondary",children:null==k?void 0:k.nameContent})]}),(0,b.jsx)(w,{options:e.options,order:o,onSort:l}),void 0!==i&&(0,b.jsx)("div",{className:A("loader"),children:(0,b.jsx)(g.A,{visible:i})}),Boolean(d)&&(0,b.jsx)(f,{className:A("page-counter"),pageIndex:u,pageCount:d})]})}function w(e){var t=e.order,n=e.options,r=e.onSort;return n?(0,b.jsx)(u.r,{items:n.map((function(e){return{text:x(e).titleContent,action:function(){if(r){var n=e.column,a=e.allowUnordered,o=e.withUndefined,l=e.allowedOrderTypes,s=l?(0,p.Pc)(t,l):(0,p.$N)(t,a,o);r(n,s,{currentOrder:t})}}}})),renderSwitcher:function(e){var t=e.onClick;return(0,b.jsx)(d.$,{onClick:t,view:"flat",size:"xs",children:(0,b.jsx)(m.I,{size:12,data:i.A})})}}):null}},62561:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(77810),a=n(76426),o=n(88787);const l=(0,n(92611).Kc)("yt:chart-link",{en:{View:"View"},ru:{View:"Смотреть"}});var s=n(64922);function i(e){var t=e.className,n=e.url,i=e.title,c=e.theme,u=e.children,d=e.hideIcon,m=e.face,h=e.wrapContent;if(!n)return null;var p=d?null:(0,s.jsx)(o.A,{awesome:"chart-bar",face:m}),b=u?(0,s.jsxs)(r.Fragment,{children:[p,u]}):p;return(0,s.jsx)(a.A,{className:t,target:"_blank",theme:c,url:n,title:null!=i?i:l("View"),children:h?h(b):b})}const c=r.memo(i)},65986:(e,t,n)=>{n.d(t,{C:()=>a,o:()=>o});var r=n(29717);const a="gc-",o=((0,r.withNaming)({e:"__",m:"_",v:"_"}),(0,r.withNaming)({n:a,e:"__",m:"_",v:"_"}))},70909:(e,t,n)=>{n.d(t,{R:()=>c}),n(77810);var r=n(76872),a=n(32235),o=n(40319),l=n(64922);const s=function(e){return(0,l.jsx)("svg",(0,o.A)((0,o.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"},e),{},{children:(0,l.jsx)("path",{fill:"#027BF3",d:"M7 .828C3.521.828.703 3.672.703 7.125A6.296 6.296 0 0 0 7 13.422c3.453 0 6.297-2.818 6.297-6.297C13.297 3.672 10.453.828 7 .828m0 11.375a5.06 5.06 0 0 1-5.078-5.078A5.077 5.077 0 0 1 7 2.047c2.793 0 5.078 2.285 5.078 5.078A5.077 5.077 0 0 1 7 12.203m0-8.582c-.61 0-1.066.483-1.066 1.067 0 .609.457 1.066 1.066 1.066.584 0 1.066-.457 1.066-1.066 0-.584-.482-1.067-1.066-1.067m1.422 6.45v-.61a.33.33 0 0 0-.305-.305h-.305V6.617a.33.33 0 0 0-.304-.304H5.883a.31.31 0 0 0-.305.304v.61c0 .177.127.304.305.304h.305v1.625h-.305a.31.31 0 0 0-.305.305v.61c0 .177.127.304.305.304h2.234a.31.31 0 0 0 .305-.305"})}))};var i=(0,r.A)("info-block");function c(e){var t=e.children,n=e.className;return(0,l.jsxs)("div",{className:i(null,n),children:[(0,l.jsx)("div",{className:i("icon"),children:(0,l.jsx)(a.I,{data:s})}),(0,l.jsx)("div",{className:i("body"),children:t})]})}},79240:(e,t,n)=>{n.d(t,{h:()=>l}),n(77810);var r=n(76872),a=n(64922),o=(0,r.A)("bundle-params-list"),l=function(e){var t=e.className,n=e.params,r=e.size,l=void 0===r?"s":r;return(0,a.jsx)("div",{className:o({size:l},t),children:n.map((function(e){return(0,a.jsxs)("span",{children:[e.title," ",(0,a.jsxs)("span",{className:o("value",{type:e.type}),children:[e.value," ",e.postfix]})]},e.title)}))})}},80016:(e,t,n)=>{n.d(t,{w:()=>i});var r=n(9736),a=n(77810),o=n(15647),l=n(11843),s=n(27652);function i(e){var t=e.children,n=(0,o.d4)(l.Y),i=n.regular,c=n.monospace,u=a.useState(!1),d=(0,r.A)(u,2),m=d[0],h=d[1];return a.useEffect((function(){Promise.all([(0,s.w)(i),(0,s.w)(c)]).then((function(){return h(!0)}))}),[i,c]),m?t:null}},86704:(e,t,n)=>{n.d(t,{A:()=>y});var r=n(40319),a=n(29121),o=n(12937),l=n(66134),s=n(10785),i=n(77810),c=n(75826),u=n.n(c),d=n(76872),m=n(27528),h=n.n(m),p=n(80999),b=n(6542),v=n(88787),_=n(39566),f=n(64922),g=(0,d.A)("favourites"),y=function(e){function t(){var e;(0,a.A)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=(0,l.A)(this,t,[].concat(r))).state={isActive:e.props.isActive},e.toggleActive=function(){var t=e.props.onToggle;e.setState((function(e){return{isActive:!e.isActive}})),t()},e.onItemClick=function(t){(0,e.props.onItemClick)(t)},e}return(0,s.A)(t,e),(0,o.A)(t,[{key:"renderDropDownMenu",value:function(){var e=this,t=this.props.items,n=h()(t,(function(t){return{text:t.path,action:function(){return e.onItemClick(t)}}}));0===t.length&&n.push({action:function(){},text:"No favourites"});var r=this.renderButton({view:"normal",size:"m",pin:"brick-round",title:"View favourites",children:(0,f.jsx)(v.A,{awesome:"angle-down"})});return(0,f.jsx)(p.r,{popupProps:{className:g("popup",{empty:0===t.length})},items:n,switcher:r})}},{key:"renderHotkey",value:function(){return(0,f.jsx)(_.A,{settings:[{keys:"f",handler:this.toggleActive,scope:"all"}]})}},{key:"renderButton",value:function(e){var t=this.props.theme?{view:"outlined"}:{};return(0,f.jsx)(b.$,(0,r.A)((0,r.A)({},e),t))}},{key:"render",value:function(){var e=this.props,t=e.toggleDisabled,n=e.className,r=e.theme,a=this.state.isActive;return(0,f.jsxs)("div",{className:g(null,n),children:[(0,f.jsx)("div",{className:g("star-btn",{clear:"clear"===r}),children:this.renderButton({view:"outlined-info",selected:a,size:"m",pin:"clear"===r?"round-brick":"round-clear",title:"Add to favourites [F]",onClick:this.toggleActive,disabled:t,children:(0,f.jsx)(v.A,{awesome:a?"star-alt":"star"})})}),this.renderDropDownMenu(),this.renderHotkey()]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isActive!==t.isActive?{isActive:e.isActive}:null}}])}(i.Component);y.itemType=u().shape({path:u().string})},95250:(e,t,n)=>{n.r(t),n.d(t,{ChaosCellBundlesTopRow:()=>Ur,TabletCellBundles:()=>Cr,TabletCellBundlesTopRow:()=>Ir});var r=n(40319),a=n(68175),o=n(77810),l=n(76872),s=n(75414),i=n.n(s),c=n(56950),u=n(42265),d=n(64965),m=n(71217),h=n(5675),p=n(15647),b=n(13322),v=n(29121),_=n(12937),f=n(66134),g=n(10785),y=n(49214),A=n.n(y),x=n(44131),N=n(99800),w=n(33023),j=n(87319),C=n(64922),B=(0,l.A)("cells-table-instruments");const k=function(e){function t(){var e;(0,v.A)(this,t);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=(0,f.A)(this,t,[].concat(r))).onIdFilter=function(t){e.props.setTabletsPartial({cellsIdFilter:t})},e.onBundleFilter=function(t){e.props.setTabletsPartial({cellsBundleFilter:t})},e.onHostFilterChange=function(t){e.onHostSelected(t)},e.onHostSelected=function(t){e.props.setTabletsPartial({cellsHostFilter:t})},e.onHostInputBlur=function(){e.setState({hostFilter:e.props.hostFilter})},e.getBundleFilterItems=function(t){var n=e.props.bundles;return t?A()(n,(function(){return-1!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").indexOf(t)})):n},e.getHostFilterItems=function(t){var n=e.props.hosts;return t?A()(n,(function(){return-1!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").indexOf(t)})):n},e}return(0,g.A)(t,e),(0,_.A)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.idFilter,a=t.bundleFilter,o=t.activeBundle,l=t.activeBundleHosts;return(0,C.jsx)(w.M,{className:B(null,n),itemsToWrap:[{name:"id1",node:(0,C.jsx)(N.A,{className:B("text-filter"),hasClear:!0,size:"m",type:"text",value:r,placeholder:"Enter cell id...",onChange:this.onIdFilter,autofocus:!1}),shrinkable:!0,growable:!0,wrapperClassName:B("item")}].concat((0,b.A)(o?[]:[{name:"bundle",node:(0,C.jsx)(j.A,{className:B("suggest"),text:a,apply:function(t){return e.onBundleFilter("string"==typeof t?t:t.value)},filter:function(t,n){return e.getBundleFilterItems(n)},placeholder:"Enter bundle name...",popupClassName:B("suggest-popup")}),growable:!0,shrinkable:!0,wrapperClassName:B("item")}]),[{name:"host",node:(0,C.jsx)(j.A,{className:B("suggest"),text:this.props.hostFilter,onTextUpdate:this.onHostFilterChange,onItemClick:function(t){return e.onHostSelected("string"==typeof t?t:t.value)},onBlur:this.onHostInputBlur,filter:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.getHostFilterItems(n)},placeholder:"Enter host...",autoFocus:!1,popupClassName:B("suggest-popup")}),growable:!0,shrinkable:!0,wrapperClassName:B("item")}],(0,b.A)(l?[{name:"copy-hosts",node:(0,C.jsx)(x.A,{pin:"round",text:l,awesome:"clipboard-list",buttonText:"Copy host list"})}]:[]))})}}])}(o.Component);var T=n(92547),E=n(9736),S=n(27528),L=n.n(S),R=n(90943),z=n.n(R),O=n(73928),F=n(13724),P=n(85749),I=n(623),D=n.n(I),U=n(48971),q=n(52797),M=n(27859),H=n(13542),V=n(63582),W=n(76365),Q=n(40519),K=new W.A;function Y(){return function(e){e({type:u.Nj});var t=[{command:"exists",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles"}},{command:"list",parameters:(0,r.A)({path:"//sys/tablet_cells",attributes:["peers","id","tablet_cell_bundle","total_statistics","status"]},Q.v)},{command:"get",parameters:(0,r.A)({path:"//sys/tablet_cell_bundles",attributes:["nodes","health","options","node_tag_filter","resource_limits","resource_usage","folder_id","abc","dynamic_options","bundle_controller_target_config","enable_bundle_controller","zone"]},Q.v)}];return K.removeAllRequests(),M.Qq.executeBatch(M.Vu.tabletCellBundles,{parameters:{requests:t},cancellation:K.saveCancelToken}).then((function(t){var n=(0,T.A)(t),r=n[0].output,a=n.slice(1),o=(0,E.A)(a,2),l=o[0].output,s=o[1].output,c=(0,U.$7)(a,"Tablet cell bundles cannot be loaded");if(c)throw c;var d=(0,O.VY)(l),m=(0,O.Th)(d,s),h=function(e){var t=new Map;return e.forEach((function(e){var n=e.bundle;t.has(n)||t.set(n,!0)})),(0,b.A)(t.keys())}(m);e(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return function(t,n){var r=(0,q.ID)(n()),a=L()(e,(function(e){return(0,V.jQ)({path:"//sys/tablet_cell_bundles/".concat(e.bundle),user:r,permission:"write"})}));return(0,U.fI)(M.Qq.executeBatch(M.Vu.tabletBundlesCheckWrite,{parameters:{requests:a},cancellation:K.saveCancelToken}).then((function(n){var r=(0,U.hC)(n,"Failed to get bundle permissions"),a=r.error,o=r.outputs,l=i()(o,(function(t,n,r){if("allow"===(null==n?void 0:n.action)){var a=e[r].bundle;t.set(a,!0)}return t}),new Map);return t({type:u.Kh,data:{writableByName:l}}),a?Promise.reject(a):void 0})),{toasterName:"bundleWritePermissions",skipSuccessToast:!0,errorTitle:"Fetch write permissions"})}}(m)),h.length&&r?M.Qq.get(M.Vu.bundleControllerZones,{parameters:{path:"//sys/bundle_controller/controller/zones",attributes:["tablet_node_sizes","rpc_proxy_sizes","data_centers"]},cancellation:K.saveCancelToken}).then((function(t){var n=function(e){return Object.entries(e).reduce((function(e,t){var n=(0,E.A)(t,2),r=n[0],a=n[1];return e[r]=z().getValue(a,"/@"),e}),Object.create(null))}(t);e({type:u.ds,data:{cells:d,bundles:m,bundleDefaultConfig:n}})})).catch((function(t){(0,W.m)(t)||e({type:u.m2,data:t})})):e({type:u.ds,data:{cells:d,bundles:m}})})).catch((function(t){(0,W.m)(t)||e({type:u.m2,data:t})}))}}function X(e){return{type:u.Kh,data:e}}function G(e){return function(t){t((0,F.MV)(e)),t({type:u.p9,data:{activeBundle:e}})}}var $={setTabletsPartial:X};const J=(0,p.Ng)((function(e){return{activeBundle:(0,P.OR)(e),activeBundleHosts:(0,P.j4)(e),idFilter:(0,P.GV)(e),bundleFilter:(0,P.HS)(e),hostFilter:(0,P.HH)(e),bundles:(0,P.Eg)(e),hosts:(0,P.u6)(e)}}),$)(k);var Z=n(88314),ee=n.n(Z),te=n(66944),ne=n(5800),re=n(56747),ae=n(2735),oe=n(88787),le=n(66133),se=n(76426),ie=n(19410),ce=n(31710),ue=n(18058),de=n(82053),me=n.n(de),he=(0,l.A)("cells-table"),pe={leading:"success",none:"default",elections:"warning",leader_recovery:"warning"},be={displayIndices:!1,stickyHead:te.Ay.MOVING,stickyTop:h.kB,syncHeadOnResize:!0,dynamicRender:!0},ve={id:"Cell id",uncompressed:"Uncompressed size",compressed:"Compressed size",peerAddress:"Node",actions:" "};function _e(e){return(0,C.jsx)("span",{className:he("hover-action"),children:e.children})}function fe(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(0,C.jsx)("div",{className:he("wrapped"),children:e.apply(void 0,(0,b.A)(n))})}}var ge=function(e){function t(){var e;(0,v.A)(this,t);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=(0,f.A)(this,t,[].concat(r))).renderColumnHeader=function(t,n){var r,a=e.props.sortState,o=a.column,l=a.order,s=t===o;return(0,C.jsx)(re.A,{className:he("header-cell",{col:t,sortable:n},"data-table__head-cell"),column:t,title:null!==(r=ve[t])&&void 0!==r?r:ee()(t),order:s?l:void 0,onSort:e.onColumnSort,withUndefined:!0})},e.onColumnSort=function(t,n){e.props.setTabletsPartial({cellsSort:{column:t,order:n}})},e.renderId=function(e){var t=((null==e?void 0:e.row)||{}).id;return(0,C.jsxs)("div",{className:he("id"),children:[(0,C.jsx)("span",{className:he("id-id"),children:t}),(0,C.jsx)(_e,{children:(0,C.jsx)(x.A,{view:"flat-secondary",text:t})})]})},e.renderBundle=function(t){var n=e.props,r=n.activeBundleLink,a=n.cluster,o=((null==t?void 0:t.row)||{}).bundle;return(0,C.jsx)(se.A,{routed:!0,theme:"primary",url:r(a,o),onClick:function(){e.props.setTabletsActiveBundle(o)},children:o})},e.renderState=function(e){var t,n=(null!==(t=null==e?void 0:e.row)&&void 0!==t?t:{}).state,r=n?pe[n]:void 0;return(0,C.jsx)(le.A,{theme:r,type:"text",text:n,capitalize:!0})},e.renderActions=function(t){var n=e.props,r=n.attributesPath,a=n.cellNavigationLink,o=n.cluster,l=((null==t?void 0:t.row)||{}).id;return(0,C.jsxs)("div",{className:he("actions"),children:[(0,C.jsx)(ie.m,{placement:["bottom","top"],content:"Go to Navigation",children:(0,C.jsx)(se.A,{url:a(o,l),theme:"ghost",routed:!0,children:(0,C.jsx)(oe.A,{awesome:"folder"})})}),(0,C.jsx)(ne.A,{size:"m",view:"flat-secondary",title:l,path:r(l)})]})},e}return(0,g.A)(t,e),(0,_.A)(t,[{key:"renderNumber",value:function(e,t){var n=((null==t?void 0:t.row)||{})[e];return me().format.Number(n)}},{key:"renderBytes",value:function(e,t){var n=((null==t?void 0:t.row)||{})[e];return me().format.Bytes(n)}},{key:"renderHealth",value:function(e){var t=((null==e?void 0:e.row)||{}).health;return(0,C.jsx)(ce.X,{value:t})}},{key:"renderHost",value:function(e){var t;return(0,C.jsx)(ue.x,{asTabletNode:!0,address:null==e||null===(t=e.row)||void 0===t?void 0:t.peerAddress,copyBtnClassName:he("hover-action")})}},{key:"column",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{name:e,align:"left",sortable:!1,className:he("td",{col:e.toLocaleLowerCase()}),header:this.renderColumnHeader(e,t)}}},{key:"sortableColumn",value:function(e){return this.column(e,!0)}},{key:"render",value:function(){var e=this,t=this.props.columns.map((function(t){return ye[t].call(e)})),n=this.props,r=n.data,a=n.loading,o=n.loaded;return(0,C.jsx)("div",{className:he(),children:(0,C.jsx)(ae.Ay,{loading:a,loaded:o,columns:t,data:r,settings:be,theme:"bundles-table"})})}}])}(o.Component),ye={id:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("id")),{},{render:this.renderId,width:400})},bundle:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("bundle")),{},{render:fe(this.renderBundle)})},health:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("health")),{},{render:fe(this.renderHealth),width:80})},tablets:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablets")),{},{render:fe(this.renderNumber.bind(this,"tablets")),align:"right",width:100})},memory:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("memory")),{},{render:fe(this.renderBytes.bind(this,"memory")),align:"right",width:100})},uncompressed:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("uncompressed")),{},{render:fe(this.renderBytes.bind(this,"uncompressed")),align:"right",width:150})},compressed:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("compressed")),{},{render:fe(this.renderBytes.bind(this,"compressed")),align:"right",width:130})},peerAddress:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("peerAddress")),{},{render:this.renderHost,width:130})},state:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("state")),{},{render:fe(this.renderState),width:100})},actions:function(){return(0,r.A)((0,r.A)({},this.column("actions")),{},{render:this.renderActions,width:70})}};const Ae=ge;var xe=["id","bundle","health","tablets","memory","uncompressed","compressed","peerAddress","state","actions"],Ne={setTabletsPartial:X,setTabletsActiveBundle:G};const we=(0,p.Ng)((function(e){return{cluster:(0,q.dB)(e),loading:(0,P.U7)(e),loaded:(0,P.HF)(e),data:(0,P.It)(e),sortState:(0,P.AC)(e),columns:xe,activeBundleLink:O.d7,attributesPath:O.dh,cellNavigationLink:O.lX}}),Ne)(Ae);function je(){return(0,C.jsx)(m.A,{children:(0,C.jsx)(h.Ay,{hideToolbarShadow:!0,toolbar:(0,C.jsx)(J,{}),content:(0,C.jsx)(we,{})})})}var Ce=n(53332),Be=n(13685),ke=n(94285);function Te(e){return{type:u.lr,data:e}}function Ee(e){return function(t){t((0,F.MV)(e)),t({type:u.SQ,data:{activeBundle:e}})}}var Se=n(8208),Le=n(18472),Re=n(11970);const ze=e=>o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),o.createElement("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-.078.745-.298 1.1-.208.339-.513.614-.875.867-.217.153-.325.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 .075-.312c0-.3-.244-.641-.84-.641a1 1 0 0 0-.608.223c-.167.138-.231.287-.231.418a.75.75 0 0 1-1.5 0c0-.674.345-1.22.78-1.577M8 12a1 1 0 1 0 0-2 1 1 0 0 0 0 2",clipRule:"evenodd"}));var Oe=n(20686),Fe=n(32235);const Pe=(0,n(65986).o)("help-popover");function Ie(e){var t;return o.createElement(Oe.A,Object.assign({},e,{className:Pe(null,e.className)}),o.createElement("button",Object.assign({ref:e.buttonRef,type:"button"},e.buttonProps,{className:Pe("button",null===(t=e.buttonProps)||void 0===t?void 0:t.className)}),o.createElement(Fe.I,{data:ze,size:16})))}var De=n(37175),Ue=n(58299),qe=n(62561),Me=n(42321),He=n(29746),Ve=n(7787),We=(0,l.A)("bundle-general-meta");function Qe(e){var t=e.value,n=void 0===t||t,r=e.blocking;return(0,C.jsx)("span",{className:We("bb",{success:n,blocking:r}),children:n?"on":"off"})}function Ke(){var e=(0,p.d4)(P.EA),t=(0,p.d4)(q.jU),n=(0,p.d4)(q.dB),r=(0,p.d4)(q.qp);if(!e)return null;var a=[].concat((0,b.A)(Ve.Ay.getExtraMetaTableItemsForBundle({bundle:e,clusterUiConfig:t})||[]),[{key:"Health",value:(0,C.jsx)(ce.X,{value:e.health})},{key:"Tablet cells",value:me().format.Number(e.tabletCells)},{key:"Tablets",value:me().format.Number(e.tablets),visible:!r},{key:"Bundle controller",value:(0,C.jsx)(Qe,{value:e.enable_bundle_controller})},{key:"Node tag filter",value:e.node_tag_filter||me().format.NO_VALUE}]),o=[{key:"Memory",value:me().format.Bytes(e.memory),visible:!r},{key:"Tablets",value:Ye(e,"tablet_count"),visible:r},{key:"Tablet static memory",value:Ye(e,"tablet_static_memory"),visible:r},{key:"Uncompressed size",value:me().format.Bytes(e.uncompressed)},{key:"Compressed size",value:me().format.Bytes(e.compressed)},{key:"Changelog account",value:e.changelog_account?(0,C.jsx)(De.A,{className:We("account-link"),account:e.changelog_account,cluster:n}):me().format.NO_VALUE},{key:"Snapshot account",value:e.snapshot_account?(0,C.jsx)(De.A,{className:We("account-link"),account:e.snapshot_account,cluster:n}):me().format.NO_VALUE}];return(0,C.jsx)(Me.Ay,{className:We(),items:[a,o],title:"General"})}function Ye(e,t){var n=He.A.getValue(e,"/resource_usage/".concat(t)),a=He.A.getValue(e,"/resource_limits/".concat(t)),o="tablet_static_memory"===t?"Bytes":"Number",l=(0,U.z)(n,a,o);return(0,C.jsx)(Re.k,(0,r.A)({className:We("progress")},l))}var Xe=n(80016),Ge=(0,l.A)("bundles-table"),$e={displayIndices:!1,stickyHead:te.Ay.MOVING,stickyFooter:te.Ay.MOVING,stickyTop:h.kB,stickyBottom:0,syncHeadOnResize:!0,dynamicRender:!0},Je={bundle:"Bundle / Node tag filter",tabletCells:"Cells",uncompressed:"Uncompressed size",compressed:"Compressed size",enable_bundle_controller:"Bundle controller",changelog_account:"Changelog and Snapshot account",node_tag_filter:"Node tag filter",actions:" ",tablet_count:"Usage",tablet_count_limit:"Limit",tablet_count_free:"Free",tablet_count_percentage:"Percentage",tablet_static_memory:"Usage",tablet_static_memory_limit:"Limit",tablet_static_memory_free:"Free",tablet_static_memory_percentage:"Percentage"},Ze={enable_bundle_controller:"BC"};function et(e){var t=e.bundle,n=e.copyHostListToClipboard,r=o.useCallback((function(){return n(t)}),[t,n]);return(0,C.jsx)("div",{className:Ge("actions-copy-hosts"),onClick:r,children:(0,C.jsx)(ie.m,{content:(0,C.jsx)("span",{className:Ge("no-wrap"),children:"Copy hosts to clipboard"}),placement:"bottom-start",children:(0,C.jsx)(x.A,{view:"flat-secondary",onCopy:r})})})}var tt=function(e){function t(){var e;(0,v.A)(this,t);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=(0,f.A)(this,t,[].concat(r))).renderColumnHeader=function(t,n){var r=e.props.sortState||{},a=r.column,o=r.order,l=t===a;return(0,C.jsx)(re.A,{className:Ge("header-cell",{col:t,sortable:n},"data-table__head-cell"),column:t,title:Je[t],shortTitle:Ze[t],order:l?o:void 0,onSort:n?e.onColumnSort:void 0,withUndefined:!0})},e.onColumnSort=function(t,n){e.props.setBundlesSortState({column:t,order:n})},e.renderBundle=function(t){var n,r=e.props,a=r.activeBundleLink,o=r.cluster,l=r.clusterUiConfig,s=(null==t?void 0:t.row)||{},i=s.bundle,c=s.node_tag_filter,u=s.enable_bundle_controller,d=Boolean(c);return(0,C.jsxs)("div",{className:Ge("bundle"),children:[(0,C.jsxs)("div",{className:Ge("name",{has_tag:d}),children:[i?(0,C.jsx)(se.A,{routed:!0,theme:"primary",url:a(o,i,u),onClick:function(){e.props.setActiveBundle(i)},children:null==t||null===(n=t.row)||void 0===n?void 0:n.bundle}):"Total",d&&(0,C.jsx)("span",{className:Ge("name-tag"),children:c})]}),Ve.Ay.renderBundlesTableItemExtraControls({bundle:t.row,clusterUiConfig:l,itemClassName:Ge("extra-control")})]})},e.renderAccount=function(t){var n=e.props.cluster,r=(null==t?void 0:t.row)||{},a=r.changelog_account,l=r.snapshot_account;return(0,C.jsxs)(o.Fragment,{children:[(0,C.jsx)(De.A,{cluster:n,account:a}),a!==l&&(0,C.jsxs)(o.Fragment,{children:[", ",(0,C.jsx)(De.A,{cluster:n,account:l})]})]})},e.renderNodes=function(e){var t=(null==e?void 0:e.row)||{},n=t.nodes,r=t.node_tag_filter,a=t.unique_node_tag,o=t.bundle;if(!a&&o){var l='This bundle shares nodes with other bundles having node tag filter\n "'.concat(r,'". Actual amount of available resources depends on the number of tablet cells and may\n be less than displayed in this column.');return(0,C.jsxs)("div",{className:Ge("nodes"),children:[(0,C.jsx)(Ie,{className:Ge("help-tooltip"),delayClosing:50,placement:"auto",content:l}),null==n?void 0:n.length]})}return null==n?void 0:n.length},e.renderActions=function(t){var n=e.props,r=n.allowPerBundleAccounting,a=n.bundleDashboardUrl,o=n.cluster,l=n.copyHostListToClipboard,s=n.pathPrefix,i=n.showCellBundleEditor,c=n.writeableByName,u=(null==t?void 0:t.row)||{},d=u.bundle,m=u.nodes,h=u.enable_bundle_controller;if(d){var p="".concat(s).concat(d),b=null!=h?h:null==c?void 0:c.get(d);return(0,C.jsxs)("div",{className:Ge("actions"),children:[(0,C.jsx)("div",{className:Ge("actions-attrs"),children:(0,C.jsx)(ne.A,{size:"m",view:"flat-secondary",title:p,path:p})}),r&&b&&(0,C.jsx)("div",{className:Ge("actions-attrs"),children:(0,C.jsx)(Ue.A,{size:"m",view:"flat-secondary",onClick:function(){return i(d)},children:(0,C.jsx)(oe.A,{awesome:"pencil"})})}),a&&(0,C.jsx)("div",{className:Ge("actions-attrs"),children:(0,C.jsx)(qe.A,{url:a(o,d),wrapContent:function(e){return(0,C.jsx)(Ue.A,{size:"m",view:"flat-secondary",children:e})}})}),m&&m.length>0&&(0,C.jsx)(et,{bundle:d,copyHostListToClipboard:l})]})}},e}return(0,g.A)(t,e),(0,_.A)(t,[{key:"renderNumber",value:function(e,t){var n=((null==t?void 0:t.row)||{})[e];return me().format.Number(n)}},{key:"renderBytes",value:function(e,t){var n=((null==t?void 0:t.row)||{})[e];return me().format.Bytes(n)}},{key:"renderBC",value:function(e){var t=(null==e?void 0:e.row)||{},n=t.bundle,r=t.enable_bundle_controller;return n?(0,C.jsx)(Qe,{value:r}):null}},{key:"renderHealth",value:function(e){var t=((null==e?void 0:e.row)||{}).health;return(0,C.jsx)(ce.X,{value:t})}},{key:"renderTabletCountPercentage",value:function(e){if(void 0===e.row.tablet_count_percentage)return me().format.NO_VALUE;var t=e.row,n=t.tablet_count,r=t.tablet_count_limit,a=(0,U.z)(n,r,"Number"),o=a.value,l=a.theme,s=a.text;return void 0===o?me().format.NO_VALUE:(0,C.jsx)(Re.k,{value:o,theme:l,text:s})}},{key:"renderTabletStaticMemoryPercentage",value:function(e){if(void 0===e.row.tablet_static_memory_percentage)return me().format.NO_VALUE;var t=e.row,n=t.tablet_static_memory,r=t.tablet_static_memory_limit,a=(0,U.z)(n,r,"Bytes"),o=a.value,l=a.theme,s=a.text;return void 0===o?me().format.NO_VALUE:(0,C.jsx)(Re.k,{value:o,theme:l,text:s})}},{key:"column",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{name:e,align:"left",sortable:!1,className:Ge("td",{col:e.toLowerCase()}),header:this.renderColumnHeader(e,t)}}},{key:"sortableColumn",value:function(e){return this.column(e,!0)}},{key:"render",value:function(){var e=this,t=this.props.columns.map((function(t){return nt[t].call(e)})),n=this.props,r=n.data,a=n.total,o=n.loading,l=n.loaded;return(0,C.jsx)("div",{className:Ge(),children:(0,C.jsx)(Xe.w,{children:(0,C.jsx)(ae.Ay,{loading:o,loaded:l,columns:t,data:r,settings:$e,theme:"bundles-table",footerData:r.length?[a]:void 0})})})}}])}(o.Component),nt={bundle:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("bundle")),{},{render:this.renderBundle})},tablet_count_percentage:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_count_percentage")),{},{render:this.renderTabletCountPercentage,width:260,align:"center"})},tablet_count:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_count")),{},{render:this.renderNumber.bind(this,"tablet_count"),align:"right",width:150})},tablet_count_limit:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_count_limit")),{},{render:this.renderNumber.bind(this,"tablet_count_limit"),align:"right",width:150})},tablet_count_free:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_count_free")),{},{render:this.renderNumber.bind(this,"tablet_count_free"),align:"right",width:150})},tablet_static_memory_percentage:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_static_memory_percentage")),{},{render:this.renderTabletStaticMemoryPercentage,width:260,align:"center"})},tablet_static_memory:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_static_memory")),{},{render:this.renderBytes.bind(this,"tablet_static_memory"),align:"right",width:150})},tablet_static_memory_limit:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_static_memory_limit")),{},{render:this.renderBytes.bind(this,"tablet_static_memory_limit"),align:"right",width:150})},tablet_static_memory_free:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_static_memory_free")),{},{render:this.renderBytes.bind(this,"tablet_static_memory_free"),align:"right",width:150})},health:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("health")),{},{render:this.renderHealth,align:"center",width:110})},nodes:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("nodes")),{},{render:this.renderNodes,align:"right",width:85})},tabletCells:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tabletCells")),{},{render:this.renderNumber.bind(this,"tabletCells"),align:"right",width:85})},tablets:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablets")),{},{render:this.renderNumber.bind(this,"tablets"),align:"right",width:100})},memory:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("memory")),{},{render:this.renderBytes.bind(this,"memory"),align:"right",width:100})},uncompressed:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("uncompressed")),{},{align:"right",render:this.renderBytes.bind(this,"uncompressed"),width:150})},compressed:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("compressed")),{},{align:"right",render:this.renderBytes.bind(this,"compressed"),width:120})},enable_bundle_controller:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("enable_bundle_controller")),{},{align:"center",render:this.renderBC,width:80})},changelog_account:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("changelog_account")),{},{render:this.renderAccount,width:235})},actions:function(){return(0,r.A)((0,r.A)({},this.column("actions")),{},{render:this.renderActions,width:100})}};const rt=tt;var at=n(39760),ot=n.n(at),lt=n(65304),st=n.n(lt),it=n(73822),ct=n(26777),ut=n(84092),dt=n.n(ut);function mt(e){return function(t,n){var a=n();t({type:u.N5,data:{bundleName:e}});var o=(0,P.p0)(a).find((function(t){return t.bundle===e}));if(!o)return Promise.resolve();var l=(0,P.q8)(a),s=[{command:"get",parameters:{path:"//sys/tablet_cell_bundles/".concat(e),attributes:["resource_usage","resource_limits","options","abc","folder_id","zone","enable_bundle_controller"]}}];return o.enable_bundle_controller&&s.push({command:"get",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles/".concat(e)}}),(0,U.fI)(M.Qq.executeBatch(M.Vu.tabletCellBundlesEditData,{requests:s}).then((function(e){var t,n=o.enable_bundle_controller&&(null===(t=e[2])||void 0===t||null===(t=t.error)||void 0===t?void 0:t.code)===dt().codes.NODE_DOES_NOT_EXIST,r=(0,U.$7)(n?[e[0]]:e,"Failed to get bundle edit data");if(r)throw r;return e})),{toasterName:"edit-bundle-data",skipSuccessToast:!0,errorContent:"Failed to load bundle details"}).then((function(e){var n,a,s=e,i=(0,E.A)(s,2),c=i[0].output,d=i[1],m=(void 0===d?{output:void 0}:d).output,h=o;null!==(n=o.bundle_controller_target_config)&&void 0!==n&&n.memory_limits.reserved||!l||(h=(0,r.A)((0,r.A)({},o),{},{bundle_controller_target_config:(0,r.A)((0,r.A)({},o.bundle_controller_target_config),{},{memory_limits:(0,r.A)((0,r.A)({},null===(a=o.bundle_controller_target_config)||void 0===a?void 0:a.memory_limits),{},{reserved:l})})})),t({type:u.V,data:{bundleData:h,data:c,bundleControllerData:m}});var p=[].concat((0,b.A)(L()(null==m?void 0:m.allocated_tablet_nodes,(function(e,t){return[(0,ct.Sz)("get",{path:"//sys/cluster_nodes/".concat(t,"/@bundle_controller_annotations/nanny_service")}),(0,ct.Sz)("get",{path:"//sys/cluster_nodes/".concat(t,"/@statistics/memory/tablet_static")})]}))),(0,b.A)(L()(null==m?void 0:m.allocated_rpc_proxies,(function(e,t){return[(0,ct.Sz)("get",{path:"//sys/rpc_proxies/".concat(t,"/@bundle_controller_annotations/nanny_service")})]})))),v=[];(0,U.fI)(M.Qq.executeBatch(M.Vu.tabletCellBundlesInstancesDetails,{requests:L()(p,(function(e){return(0,ct.Sz)("execute_batch",{requests:e})}))}),{toasterName:"bundle-controller-tablet-static-memory",skipSuccessToast:!0,errorContent:"BundleController: Cannot load tablet static memory of isntances"}).then((function(e){var n=[].concat((0,b.A)(st()(null==m?void 0:m.allocated_tablet_nodes)),(0,b.A)(st()(null==m?void 0:m.allocated_rpc_proxies))),r={};ot()(e,(function(e,t){var a=e.output,o=e.error;if(o)v.push(o);else{var l=(0,E.A)(a,2),s=l[0].output,i=l[1],c=(void 0===i?{output:void 0}:i).output;r[n[t]]={nanny_service:s,tablet_static_memory:c}}})),t({type:u.Or,data:{instanceDetailsMap:r}})}))})).catch((function(e){return t({type:u.KI,data:e}),Promise.reject(e)}))}}function ht(e){return function(t){t(mt(e)).then((function(){t({type:u.Or,data:{visibleEditor:!0}})}))}}function pt(e){return function(t){var n=e.bundleName,r=e.data,a="//sys/tablet_cell_bundles/".concat(n),o=L()(r,(function(e,t){return(0,ct.Gy)("".concat(a,"/").concat(t),e)}));return(0,U.fI)(M.Qq.executeBatch(M.Vu.tabletCellBundlesSetAttrs,{requests:o}),{toasterName:"edit_bundle_".concat(n),successContent:"Set bundle edit data",batchType:"v3",errorTitle:"Failed to set bundle edit data"}).then((function(){t(Y())}))}}var bt=n(94544),vt=(0,Le.Mz)([P.Br],(function(e){var t=["bundle"];switch(e){case"tablets":t.push("tablet_count_percentage","tablet_count","tablet_count_limit","tablet_count_free");break;case"tablets_memory":t.push("tablet_static_memory_percentage","tablet_static_memory","tablet_static_memory_limit","tablet_static_memory_free");break;default:t.push("health","nodes","tabletCells","tablets","memory","uncompressed","compressed","enable_bundle_controller","changelog_account")}return t.push("actions"),t})),_t={setBundlesSortState:function(e){return{type:u.Kh,data:{bundlesSort:e}}},setActiveBundle:G,showCellBundleEditor:ht};const ft=(0,p.Ng)((function(e){return{loading:(0,P.U7)(e),loaded:(0,P.HF)(e),data:(0,P.kj)(e),total:(0,P.XL)(e),sortState:(0,P.a1)(e),cluster:(0,q.dB)(e),allowPerBundleAccounting:(0,q.qp)(e),pathPrefix:"//sys/tablet_cell_bundles/",columns:vt(e),activeBundleLink:O.d7,bundleDashboardUrl:bt.Ut,writeableByName:(0,P.nX)(e)}}),_t)(rt);var gt=n(29347),yt=n.n(gt),At=n(87604);function xt(e){var t=e.bundlesTableMode,n=e.setTabletsPartial,r=e.modes,a=(0,p.wA)(),l=(0,p.d4)(q.qp),s=o.useCallback((function(e){a(n({bundlesTableMode:e.target.value}))}),[a]),i=r.map(At.A.prepareSimpleValue);return l?(0,C.jsx)(At.A,{items:i,value:t,onChange:s}):null}const Nt=o.memo(xt);var wt=(0,l.A)("bundles-table-instruments"),jt=function(e){function t(){var e;(0,v.A)(this,t);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=(0,f.A)(this,t,[].concat(r))).onNameEnterKeyDown=function(){e.props.setTabletsFirstBundleAsActive()},e}return(0,g.A)(t,e),(0,_.A)(t,[{key:"render",value:function(){var e=this.props,t=e.accountFilter,n=e.bundlesTableMode,r=e.className,a=e.modes,o=e.nameFilter,l=e.setTabletsPartial,s=e.tagNodeFilter;return(0,C.jsx)(w.M,{className:wt(null,r),itemsToWrap:yt()([{name:"name",node:(0,C.jsx)(N.A,{className:wt("text-filter"),hasClear:!0,autofocus:!0,size:"m",type:"text",value:o,placeholder:"Enter bundle name...",onChange:this.props.setTabletsBundlesNameFilter,onEnterKeyDown:this.onNameEnterKeyDown}),shrinkable:!0,growable:!0,wrapperClassName:wt("item")},{name:"account",node:(0,C.jsx)(N.A,{className:wt("account-filter"),hasClear:!0,size:"m",type:"text",value:t,placeholder:"Enter changelog or snapshot account...",onChange:this.props.setTabletsBundlesAccountFilter,autofocus:!1}),shrinkable:!0,growable:!0,wrapperClassName:wt("item")},{name:"tagNode",node:(0,C.jsx)(N.A,{className:wt("account-filter"),hasClear:!0,size:"m",type:"text",value:s,placeholder:"Enter node tag filter...",onChange:this.props.setTabletsBundlesTagNodeFilter,autofocus:!1}),shrinkable:!0,growable:!0,wrapperClassName:wt("item")},(a.length>1||a[0]!==n)&&{name:"tableMode",node:(0,C.jsx)(Nt,{bundlesTableMode:n,setTabletsPartial:l,modes:a}),shrinkable:!1,growable:!1,wrapperClassName:wt("item")}])})}}])}(o.Component);const Ct=jt;var Bt=["default","tablets","tablets_memory"],kt={setTabletsBundlesNameFilter:function(e){return{type:u.Kh,data:{bundlesNameFilter:e}}},setTabletsBundlesAccountFilter:function(e){return{type:u.Kh,data:{bundlesAccountFilter:e}}},setTabletsBundlesTagNodeFilter:function(e){return{type:u.Kh,data:{bundlesTagNodeFilter:e}}},setTabletsFirstBundleAsActive:function(){return function(e,t){var n=t(),r=(0,P.kj)(n),a=(0,E.A)(r,1)[0];if(a){var o=(0,q.dB)(n);e(G(a.bundle)),(0,H.Q)().push((0,O.d7)(o,a.bundle))}}},setTabletsPartial:X};const Tt=(0,p.Ng)((function(e){return{accountFilter:(0,P.CH)(e),bundlesTableMode:(0,P.Br)(e),nameFilter:(0,P.K2)(e),tagNodeFilter:(0,P.Js)(e),modes:Bt}}),kt)(Ct);function Et(){var e=(0,p.wA)(),t=o.useCallback((function(t){e(function(e){return function(t,n){var r=(0,P.bf)(e,(0,P.xU)(n())),a=(0,P.U5)(r);D()(a||"")}}(t))}),[e]);return o.useEffect((function(){e(G(""))}),[e]),(0,C.jsx)(m.A,{children:(0,C.jsx)(h.Ay,{hideToolbarShadow:!0,toolbar:(0,C.jsx)(Tt,{}),content:(0,C.jsx)(ft,{copyHostListToClipboard:t})})})}var St=n(60192);function Lt(){var e=(0,p.d4)(q.dB),t=(0,p.d4)(P.OR),n=(0,p.d4)(q.O4);if(!t)return(0,C.jsx)(St.R,{warning:"You don't have any selected bundles",hint:"Please choose one to display charts"});var r=Ve.Ay.getStatisticsComponentForBundle();return(0,C.jsx)(m.A,{children:(0,C.jsx)(r,{cluster:e,bundle:t,theme:n})})}const Rt=o.memo(Lt);function zt(e){var t=e.component,n=(0,p.d4)(P.EA),r=(0,p.d4)(q.dB),a=o.useMemo((function(){return He.A.getValue(n,"/bundle")}),[n]);return a?(0,C.jsx)(m.A,{children:(0,C.jsx)(t,{cluster:r,tablet_cell_bundle:a,bundleData:n})}):(0,C.jsx)(St.R,{warning:"You don't have any selected bundles",hint:"Please choose one to display charts"})}const Ot=o.memo(zt);var Ft=n(66205),Pt=n(7452);function It(e){var t=e.className,n=(0,p.d4)(P.OR),r=(0,p.d4)(Ft.Nr);return(0,C.jsx)(m.A,{children:r?(0,C.jsx)(Pt.fw,{path:n,className:t}):(0,C.jsx)(St.R,{className:t,hint:"The cluster is not ready to work with bundle's ACL"})})}var Dt=n(53775),Ut=n(28407),qt=n(5458),Mt=n.n(qt),Ht=n(16737),Vt=n.n(Ht),Wt=n(95976),Qt=n(16770),Kt=(0,l.A)("bundle-meta-resource-progress");function Yt(e,t){var n=t.data,a=t.limit,o=t.resourceType,l=t.postfix,s=function(e){var t=e.data,n=e.limit,r=e.resourceType,a=e.postfix,o={stack:[]},l=i()(t,(function(e,t){return e+Number(t)}),0),s=null!=n?n:l,c="".concat(it.A.format[r](l)," ").concat(a).trim(),u=[];ot()(t,(function(e,t){var n=it.A.format[r](e),l=(0,Qt.H)(o.stack.length);u.push({key:t,label:(0,C.jsxs)("span",{children:[(0,C.jsx)(Wt.c,{color:l,marginRight:!0}),it.A.format.Readable(t)]}),value:"".concat(n," ").concat(a)});var i=Number(e)/s*100;o.stack.push({color:l,value:i})}));var d=(0,C.jsx)(Me.Ay,{items:u});return{props:o,text:c,commonTooltip:d}}({data:n,limit:a,resourceType:o,postfix:void 0===l?"":l}),c=s.props,u=s.text,d=s.commonTooltip;return{key:e,value:(0,C.jsx)("div",{className:Kt(),children:(0,C.jsx)(ie.m,{placement:"bottom",content:d,children:(0,C.jsx)(Re.k,(0,r.A)((0,r.A)({className:Kt("progress")},c),{},{text:u}))})})}}var Xt=(0,l.A)("bundle-configuration-meta"),Gt=["allocating_rpc_proxy_count","allocating_tablet_node_count","deallocating_rpc_proxy_count","deallocating_tablet_node_count","removing_cell_count"];function $t(){var e=(0,p.wA)(),t=(0,p.d4)(P.EA)||{},n=t.bundle,r=t.enable_bundle_controller,a=o.useCallback((function(){n&&e(mt(n))}),[e,n]);(0,Be.Tt)(a);var l=o.useRef(null),s=o.useCallback((0,Ut.A)((0,Dt.A)().mark((function e(){var t,o,s,c,u,d,m,h;return(0,Dt.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&r){e.next=2;break}return e.abrupt("return");case 2:return t=[{command:"get",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles/".concat(n,"/alerts")}}].concat((0,b.A)(L()(Gt,(function(e){return{command:"get",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles/".concat(n,"/").concat(e)}}})))),e.next=5,(0,U.fI)(M.Qq.executeBatch(M.Vu.tabletBundleControllerState,{requests:t}),{toasterName:"active-bundle-controller-status",skipSuccessToast:!0,errorContent:'Cannot load bundle controller details for "'.concat(n,'".')}).catch((function(){return[]}));case 5:if(o=e.sent,s=(0,T.A)(o),c=s[0],u=(void 0===c?{output:[]}:c).output,d=s.slice(1),m=i()(d,(function(e,t){var n=t.output;return e+(null!=n?n:0)}),0),h=tn(u,m),null!==l.current){e.next=16;break}return l.current=h,e.abrupt("return");case 16:l.current!==h&&(l.current=h,a());case 17:case"end":return e.stop()}}),e)}))),[a,n,r]);return(0,Be.Tt)(s,{timeout:3e3}),null}function Jt(){var e=((0,p.d4)(P.EA)||{}).bundle_controller_target_config,t=(0,p.d4)(P.x0);if(!e||!t)return null;var n=[];if(t){var r=t.resource_quota,a=t.resource_allocated,o=r.memory,l=r.vcpu,s=a.memory,c=a.vcpu;n.push(function(e){var t,n,r=e.alerts,a=function(e){var t=e.alerts,n=Mt()(Vt()(e,Gt));return{state:tn(t,i()(n,(function(e,t){var n=(0,E.A)(t,2);return n[0],e+n[1]}),0)),detailsEntries:n}}(e),o=a.state,l=a.detailsEntries;return"good"===o?{key:"State",value:(0,C.jsx)(ce.X,{className:Xt("health",{value:o}),value:o})}:"changing"===o?{key:"State",value:(0,C.jsxs)(ie.m,{content:(t=l,n=t.map((function(e){var t=(0,E.A)(e,2),n=t[0],r=t[1];return"".concat(n," - ").concat(r)})),(0,C.jsx)("ul",{className:Xt("tooltip-list"),children:n.map((function(e,t){return(0,C.jsx)("li",{className:Xt("tooltip-item"),children:e},t)}))})),placement:"bottom",className:Xt("state-with-icon"),children:[(0,C.jsx)(ce.X,{className:Xt("health",{value:o}),value:o})," ",(0,C.jsx)(oe.A,{awesome:"question-circle"})]})}:{key:"State",value:(0,C.jsxs)(ie.m,{content:nn(r),placement:"bottom",className:Xt("state-with-icon"),children:[(0,C.jsx)(ce.X,{className:Xt("health",{value:o}),value:o})," ",(0,C.jsx)(oe.A,{awesome:"exclamation-triangle"})]})}}(t),Zt("Memory allocated/limit",s,o,"Bytes"),Zt("vCPU allocated/limit",c,l,"vCores"))}if(void 0!==e.rpc_proxy_count){var u=e.rpc_proxy_count,d=e.rpc_proxy_resource_guarantee,m=d.memory,h=d.vcpu;n.push(en("RPC proxies",u,m,h))}if(void 0!==e.tablet_node_count){var b=e.tablet_node_count,v=e.tablet_node_resource_guarantee,_=v.memory,f=v.vcpu;n.push(en("Tablet nodes",b,_,f))}if(e.memory_limits){var g=((null==e?void 0:e.tablet_node_resource_guarantee)||{}).memory;n.push(Yt("Memory allocation",{data:e.memory_limits,resourceType:"Bytes",limit:g}))}return e.cpu_limits&&n.push(Yt("vCPU allocation",{data:e.cpu_limits,resourceType:"Number",postfix:"threads"})),(0,C.jsx)(Me.Ay,{className:Xt(),subTitles:["Bundle configuration"],items:[n]})}function Zt(e,t,n,r){var a=it.A.format[r](n),o=it.A.format[r](t),l=it.A.format.Number(t/n*100||0);return{key:e,value:(0,C.jsxs)("span",{children:[(0,Ce.G1)(o,a),(0,C.jsxs)("span",{className:Xt("percentage"),children:[l,"%"]})]})}}function en(e,t,n,r){var a=it.A.format.Bytes(n),o=it.A.format.vCores(r);return{key:e,value:t?"".concat(t," x (").concat(a,", ").concat(o,")"):0}}function tn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null!=e&&e.length||0!==t?(null==e||!e.length)&&t>0?"changing":"failed":"good"}function nn(e){return(0,C.jsx)("ol",{className:Xt("tooltip-list",{alerts:!0}),children:e.map((function(e){return(0,C.jsxs)("li",{className:Xt("tooltip-item"),children:[e.id," - ",e.description]},e.id)}))})}var rn=(0,l.A)("bundle-meta-table");function an(){return(0,C.jsxs)("div",{className:rn("container"),children:[(0,C.jsx)(Ke,{}),(0,C.jsx)(Jt,{}),(0,C.jsx)($t,{})]})}var on=n(64772),ln=n(72902),sn=n(4617),cn=(0,l.A)("cells-bundle-controller"),un=[{name:"Address",render:function(e){var t=e.row,n=t.url,r=t.address;return(0,C.jsxs)("span",{children:[(0,C.jsx)(se.A,{className:cn("address-host"),url:n,routed:!0,children:r}),r&&(0,C.jsx)(x.A,{text:r,view:"flat",inlineMargins:!0,visibleOnRowHover:!0})]})},sortable:!1},{name:"Type",render:function(e){var t,n=(null===(t=e.row.data)||void 0===t?void 0:t.resource)||{},r=n.memory,a=n.vcpu,o=on.A.Bytes(r),l=on.A.vCores(a);return(0,C.jsxs)("div",{children:[o,", ",l]})},sortable:!1,width:200},{name:"tablet_static_memory",header:"Tablet static memory",render:function(e){var t,n=e.row.tablet_static_memory;if(!n)return on.A.NO_VALUE;var r=n.used,a=n.limit,o=(0,Ce.G1)(on.A.Bytes(r),on.A.Bytes(a)),l=null!==(t=(0,sn.jP)(r,a))&&void 0!==t?t:0;return(0,C.jsx)(Re.k,{value:l,theme:(0,sn.F0)(l),text:o})},sortable:!1,width:200,align:"center"},{name:"Allocation request",render:function(e){var t=e.row.hulkRequestPath;if(!t)return on.A.NO_VALUE;var n=(0,Ce.bx)(t,"/").suffix;return(0,C.jsxs)("span",{className:cn("alloc-request"),children:[(0,C.jsx)(ne.A,{className:cn("alloc-request-attrs"),title:n,exactPath:t}),(0,C.jsx)(se.A,{className:cn("alloc-request-url"),url:(0,ln.L$)({path:t}),children:n})]})},width:300,align:"center",sortable:!1},{name:"Allocation state",render:function(e){var t=e.row.allocationState,n="IN_PROGRESS"===t?"Please note that allocating new instances on MapReduce clusters can take several hours.":void 0;return t?(0,C.jsxs)(ie.m,{content:n,useFlex:!0,children:[(0,C.jsx)(le.A,{text:on.A.ReadableField(t.toLocaleLowerCase())}),Boolean(n)&&(0,C.jsx)(oe.A,{awesome:"question-circle",color:"secondary"})]}):on.A.NO_VALUE},sortable:!1,align:"center",width:200},{name:"",render:function(e){var t=e.row;return(0,C.jsxs)(o.Fragment,{children:[dn(t),mn(t)]})},width:80,align:"center"}];function dn(e){var t=e.deployUrl;return t?(0,C.jsx)(ie.m,{className:cn("link-icon"),content:"Deploy",placement:["top-end","bottom-end"],children:(0,C.jsx)(qe.A,{url:t,hideIcon:!0,children:(0,C.jsx)(oe.A,{awesome:"rocket",face:"solid"})})}):null}function mn(e){var t=e.nannyUrl;return t?(0,C.jsx)(ie.m,{className:cn("link-icon"),content:"Nanny",placement:["top-end","bottom-end"],children:(0,C.jsx)(qe.A,{url:t,hideIcon:!0,children:(0,C.jsx)(oe.A,{awesome:"cloud",face:"solid"})})}):null}var hn={displayIndices:!1,stickyHead:te.Ay.MOVING,stickyTop:h.kB,syncHeadOnResize:!0,dynamicRender:!0};function pn(e){var t=e.items,n=e.hideColumns,r=o.useState(""),a=(0,E.A)(r,2),l=a[0],s=a[1],i=o.useMemo((function(){return l?A()(t,(function(e){var t=e.address;return-1!==(null==t?void 0:t.indexOf(l))})):t}),[t,l]),c=function(e){return o.useMemo((function(){if(null==e||!e.length)return un;var t=new Set(e);return un.filter((function(e){return!t.has(e.name)}))}),[e])}(n),u=(0,C.jsx)(w.M,{itemsToWrap:[{name:"filter",node:(0,C.jsx)(N.A,{hasClear:!0,size:"m",type:"text",value:l,placeholder:"Enter address...",onChange:s,autofocus:!1,debounce:400,skipBlurByEnter:!0})}]});return(0,C.jsx)("div",{className:cn(),children:(0,C.jsx)(h.Ay,{hideToolbarShadow:!0,toolbar:u,content:(0,C.jsx)(ae.Ay,{useThemeYT:!0,columns:c,data:i,settings:hn,emptyDataMessage:"No items to show"})})})}var bn=function(){var e=(0,p.d4)(P.Hw);return(0,C.jsx)(m.A,{children:(0,C.jsx)(pn,{items:e})})},vn=function(){var e=(0,p.d4)(P.hz);return(0,C.jsx)(m.A,{children:(0,C.jsx)(pn,{items:e,hideColumns:["tablet_static_memory"]})})},_n=n(96843),fn=n.n(_n),gn=n(70909),yn=n(79240),An=n(20361),xn=n(79366),Nn=n(14145),wn=n(70353),jn=n(81214),Cn=n.n(jn),Bn={keys:{resources:["rpc_proxy_count","rpc_proxy_resource_guarantee","tablet_node_count","tablet_node_resource_guarantee"],memory_limits:["reserved","tablet_static","tablet_dynamic","compressed_block_cache","uncompressed_block_cache","versioned_chunk_meta","lookup_row_cache","key_filter_block_cache","query"],cpu_limits:["lookup_thread_pool_size","query_thread_pool_size","write_thread_pool_size"]},defaults:{memory_limits:{memory_reset:!1,tablet_static:0,tablet_dynamic:0,compressed_block_cache:0,uncompressed_block_cache:0,versioned_chunk_meta:0,lookup_row_cache:0,key_filter_block_cache:0,query:0},cpu_limits:{threadPool_reset:!1,lookup_thread_pool_size:0,query_thread_pool_size:0,write_thread_pool_size:0}}},kn=function(e,t){return{usage:He.A.getValue(e,"/@resource_usage/".concat(t)),limit:He.A.getValue(e,"/@resource_limits/".concat(t))}},Tn=function(e,t){var n=He.A.getValue(e,"/@abc/slug"),r=He.A.getValue(e,"/@options/changelog_account"),a=He.A.getValue(e,"/@options/snapshot_account"),o=kn(e,"tablet_count").limit,l=kn(e,"tablet_static_memory").limit;if(!t)return{general:{abc:{slug:n},changelog_account:r,snapshot_account:a},resources:{tablet_count:o||0,tablet_static_memory:l||0}};var s=t.rpc_proxy_count,i=t.tablet_node_count,c=t.cpu_limits,u=t.memory_limits;return{general:{abc:{slug:n},changelog_account:r,snapshot_account:a},resources:{info:"",tablet_count:o||0,rpc_proxy_count:s,rpc_proxy_resource_guarantee:t.rpc_proxy_resource_guarantee||void 0,tablet_node_count:i,tablet_node_resource_guarantee:t.tablet_node_resource_guarantee||void 0},memory_limits:{memory_reset:!1,reserved:(null==u?void 0:u.reserved)||0,tablet_static:(null==u?void 0:u.tablet_static)||0,tablet_dynamic:(null==u?void 0:u.tablet_dynamic)||0,compressed_block_cache:(null==u?void 0:u.compressed_block_cache)||0,uncompressed_block_cache:(null==u?void 0:u.uncompressed_block_cache)||0,versioned_chunk_meta:(null==u?void 0:u.versioned_chunk_meta)||0,lookup_row_cache:(null==u?void 0:u.lookup_row_cache)||0,key_filter_block_cache:(null==u?void 0:u.key_filter_block_cache)||0,query:(null==u?void 0:u.query)||0},cpu_limits:{threadPool_reset:!1,lookup_thread_pool_size:(null==c?void 0:c.lookup_thread_pool_size)||0,query_thread_pool_size:(null==c?void 0:c.query_thread_pool_size)||0,write_thread_pool_size:(null==c?void 0:c.write_thread_pool_size)||0}}},En=function(e){return Object.entries(e).map((function(e){var t=(0,E.A)(e,2),n=t[0],a=t[1],o=a.resource_guarantee,l=o.net,s=o.net_bytes,i=o.vcpu,c=o.memory;return{id:n,type:n,memory:it.A.format.Bytes(c),net:it.A.format.BytesPerSecond(s||l/8),vcpu:it.A.format.vCores(i),initialData:(0,r.A)((0,r.A)({},a.resource_guarantee),{},{type:n})}}))},Sn=function(e,t,n){var r=it.A.format[e](t).split(" "),a=(0,E.A)(r,2),o=[{title:"Total",value:a[0],postfix:a[1]}];if(void 0!==n){var l=t-n,s=it.A.format[e](l).split(" "),i=(0,E.A)(s,2),c=i[0],u=i[1];o.push({title:"Free",value:c===it.A.format.NO_VALUE?"0":c,postfix:u,type:l>=0?"positive":"negative"})}return o};function Ln(e){var t=e.id,n=e.slug;return t&&n?{id:t,slug:n}:void 0}var Rn=function(e){var t={},n=e.getState(),r=n.dirtyFields,a=n.values;function o(e,n,o){if(r[n]){var l=Cn()(a,n);t[e]="function"==typeof o?o(l):l}}return o("@abc","general.abc",Ln),o("@options/changelog_account","general.changelog_account"),o("@options/snapshot_account","general.snapshot_account"),o("@resource_limits/tablet_count","resources.tablet_count"),o("@resource_limits/tablet_static_memory","resources.tablet_static_memory"),o("@bundle_controller_target_config/rpc_proxy_count","resources.rpc_proxy_count"),o("@bundle_controller_target_config/tablet_node_count","resources.tablet_node_count"),o("@bundle_controller_target_config/rpc_proxy_resource_guarantee","resources.rpc_proxy_resource_guarantee"),o("@bundle_controller_target_config/tablet_node_resource_guarantee","resources.tablet_node_resource_guarantee"),o("@bundle_controller_target_config/memory_limits/reserved","memory_limits.reserved"),o("@bundle_controller_target_config/memory_limits/tablet_static","memory_limits.tablet_static"),o("@bundle_controller_target_config/memory_limits/tablet_dynamic","memory_limits.tablet_dynamic"),o("@bundle_controller_target_config/memory_limits/compressed_block_cache","memory_limits.compressed_block_cache"),o("@bundle_controller_target_config/memory_limits/uncompressed_block_cache","memory_limits.uncompressed_block_cache"),o("@bundle_controller_target_config/memory_limits/versioned_chunk_meta","memory_limits.versioned_chunk_meta"),o("@bundle_controller_target_config/memory_limits/lookup_row_cache","memory_limits.lookup_row_cache"),o("@bundle_controller_target_config/memory_limits/key_filter_block_cache","memory_limits.key_filter_block_cache"),o("@bundle_controller_target_config/memory_limits/query","memory_limits.query"),o("@bundle_controller_target_config/cpu_limits/lookup_thread_pool_size","cpu_limits.lookup_thread_pool_size"),o("@bundle_controller_target_config/cpu_limits/query_thread_pool_size","cpu_limits.query_thread_pool_size"),o("@bundle_controller_target_config/cpu_limits/write_thread_pool_size","cpu_limits.write_thread_pool_size"),t},zn=function(e){var t,n=Number(e);return Number.isFinite(n)||(t="Incorrect value"),n<0&&(t="Must be greater than or equal to zero"),t},On=function(e){var t=e.length;return function(e){var n,r=Number(e);return Number.isFinite(r)?r<0?n="Must be greater than or equal to zero":t>0&&r%t!=0&&(n="Must be divisible by ".concat(t)):n="Incorrect value",n}};function Fn(e,t,n){var r,a={},o=(0,wn.A)(Bn.keys[n]);try{for(o.s();!(r=o.n()).done;){var l,s=r.value;a[s]=null!==(l=e[s])&&void 0!==l?l:t[s]}}catch(e){o.e(e)}finally{o.f()}return a}var Pn=n(29081),In=n(16455);function Dn(e,t){var n=e.ge,r=e.le,a=e.gt,o=e.lt,l=function(e,t){return Number.isFinite(e)||!t?e:null===e||""===e?NaN:Number(e)}(t,e.allowParse);return void 0!==l&&Number.isFinite(l)?void 0===n||l>=n?void 0===r||l<=r?void 0===a||l>a?void 0===o||l<o?void 0:"The value must be < ".concat(o):"The value must be > ".concat(a):"The value must be ≤ ".concat(r):"The value must be ≥ ".concat(n):"Incorrect value"}var Un=(0,l.A)("bundle-editor");function qn(){var e,t=(0,p.d4)(Nn.j),n=t.visibleEditor,a=t.bundleName,o=t.bundleData,l=t.data,s=t.bundleControllerData,i=(0,p.d4)(q.jU),c=(0,p.d4)(In.hM),d=(0,p.d4)(P._t).defaultConfig,m=null==o?void 0:o.bundle_controller_target_config,h=(null==o?void 0:o.enable_bundle_controller)||!1,v=kn(l,"tablet_count").usage,_=kn(l,"tablet_static_memory").usage,f=(0,p.d4)(P.nX).get(null!=a?a:""),g=(0,p.d4)(xn.dU),y=h?m?Tn(l,m):{}:Tn(l),A=function(){if(!d)return[[],[],[]];var e=d.rpc_proxy_sizes,t=d.tablet_node_sizes,n=d.data_centers;return[En(e),En(t),n?(0,b.A)(Object.values(n)):[]]}(),x=(0,E.A)(A,3),N=x[0],w=x[1],j=x[2],B={name:"general",title:"General",type:"tab-vertical",size:"s",fields:[].concat((0,b.A)((0,Ve.Ve)()?[{name:"abc",type:"abc-control",caption:"ABC Service",extras:{placeholder:"Select ABC service...",disabled:!g}}]:[]),[{name:"changelog_account",type:"accounts-suggest-with-loading",caption:"Changelog account",extras:{allowRootAccount:!0,disabled:!g}},{name:"snapshot_account",type:"accounts-suggest-with-loading",caption:"Snapshot account",extras:{allowRootAccount:!0,disabled:!g}}])},k={name:"resources",title:"Resources",type:"tab-vertical",size:"s",fields:[{name:"info",type:"block",fullWidth:!0,touched:!0,extras:{children:(0,C.jsxs)(gn.R,{className:Un("info"),children:[Ve.Ay.renderTableCellBundleEditorNotice({bundleData:o,clusterUiConfig:i}),(0,C.jsx)(yn.h,{className:Un("params"),params:[{title:"Memory",value:it.A.format.Bytes((null==s?void 0:s.resource_quota.memory)||"0")},{title:"vCPU",value:it.A.format.vCores((null==s?void 0:s.resource_quota.vcpu)||"0")},{title:"Tablet count",value:it.A.format.Number(null===(e=y.resources)||void 0===e?void 0:e.tablet_count)}]})]})}}].concat((0,b.A)(f?[{name:"tablet_count",type:"bundle-input",caption:"Tablet count",extras:{format:"Number",withoutDetailedBar:!0,progress:{usage:v}},validator:zn}]:[]),[{section:"RPC proxy"},{type:"bundle-input",name:"rpc_proxy_count",caption:"RPC proxy count",extras:{format:"Number",withoutDetailedBar:!0,hasClear:!0},tooltip:(0,Pn.fs)((0,U.f2)(Ve.Ay.docsUrls["dynamic-tables:cross-dc"],"Help")),validator:On(j)},{type:"bundle-table-field",name:"rpc_proxy_resource_guarantee",caption:"Instance configuration",fullWidth:!0,extras:{data:N}},{section:"Tablet node"},{type:"bundle-input",name:"tablet_node_count",caption:"Tablet node count",extras:{format:"Number",withoutDetailedBar:!0,hasClear:!0},tooltip:(0,Pn.fs)((0,U.f2)(Ve.Ay.docsUrls["dynamic-tables:cross-dc"],"Help")),validator:On(j)},{type:"bundle-table-field",name:"tablet_node_resource_guarantee",caption:"Instance configuration",fullWidth:!0,extras:function(e,t){var n=t.form;return{data:w,onRadioClick:function(t){var a,o=t.type||"",l=(null==d?void 0:d.tablet_node_sizes[o].default_config.memory_limits)||{},s=(null==d?void 0:d.tablet_node_sizes[o].default_config.cpu_limits)||{},i=(null==d||null===(a=d.tablet_node_sizes[o].default_config.memory_limits)||void 0===a?void 0:a.reserved)||void 0,c=Fn(e.memory_limits,l,"memory_limits"),u=Fn(e.cpu_limits,s,"cpu_limits");c.reserved=i,n.change("memory_limits",(0,r.A)((0,r.A)({},Bn.defaults.memory_limits),c)),n.change("cpu_limits",(0,r.A)((0,r.A)({},Bn.defaults.cpu_limits),u))}}}}])},T={name:"resources",title:"Resources",type:"tab-vertical",size:"s",fields:[{name:"tablet_count",type:"bundle-input",caption:"Tablet count",extras:{format:"Number",withoutDetailedBar:!0,progress:{usage:v}},validator:zn},{name:"tablet_static_memory",type:"bundle-input",caption:"Tablet static memory",extras:{format:"Bytes",progress:{usage:_}},validator:zn,tooltip:(0,C.jsx)("span",{children:"Tablet static memory limit is based on hardware resources. Do not increase it unless you fully understand what you are doing. In case of emergency consider adding new tablet cells to the bundle, consulting with Components/Nodes page and increasing the limit only when new nodes are added to the bundle."})}]},S={name:"memory_limits",title:"Memory",type:"tab-vertical",size:"s",visibilityCondition:{when:"resources.tablet_node_resource_guarantee",isActive:function(e){return void 0!==e}},fields:[{name:"memory_reset",type:"bundle-title",caption:"Memory",touched:!0,extras:function(e,t){var n,a=t.form,o=null===(n=e.resources)||void 0===n?void 0:n.tablet_node_resource_guarantee,l=function(){if(o&&o.type&&d){var e=o.type,t=d.tablet_node_sizes[e].default_config.memory_limits;a.change("memory_limits",(0,r.A)((0,r.A)({},Bn.defaults.memory_limits),t))}};if(!o)return{params:[],onReset:l};var s=o.memory,i=Bn.keys.memory_limits.reduce((function(t,n){var r,a=null==e||null===(r=e.memory_limits)||void 0===r?void 0:r[n];return"number"!=typeof a||isNaN(a)?t:t+a}),0);return{params:Sn("Bytes",s,i),onReset:l}}},{name:"reserved",type:"bundle-input",caption:"Reserved",extras:{format:"Bytes",disabled:!0},tooltip:(0,Pn.fs)((0,U.f2)(Ve.Ay.docsUrls["bundle-controller:reserved-memory"],"Help"))},{name:"tablet_static",type:"bundle-input",caption:"Tablet static",extras:{format:"Bytes",hasClear:!0},validator:zn},{name:"tablet_dynamic",type:"bundle-input",caption:"Tablet dynamic",extras:{format:"Bytes",hasClear:!0},validator:zn},{name:"compressed_block_cache",type:"bundle-input",caption:"Compressed block cache",extras:{format:"Bytes",hasClear:!0},validator:zn},{name:"uncompressed_block_cache",type:"bundle-input",caption:"Uncompressed block cache",extras:{format:"Bytes",hasClear:!0},validator:zn},{name:"versioned_chunk_meta",type:"bundle-input",caption:"Versioned chunk meta",extras:{format:"Bytes",hasClear:!0},validator:zn},{name:"lookup_row_cache",type:"bundle-input",caption:"Lookup row cache",extras:{format:"Bytes",hasClear:!0},validator:zn},{name:"key_filter_block_cache",type:"bundle-input",caption:"Key filter block cache",extras:{format:"Bytes",hasClear:!0},validator:zn}]};c&&S.fields.push({name:"query",type:"bundle-input",caption:"Query memory limit",extras:{format:"Bytes",hasClear:!0},validator:zn});var L={name:"cpu_limits",title:"Thread pools",type:"tab-vertical",size:"s",visibilityCondition:{when:"resources.tablet_node_resource_guarantee",isActive:function(e){return void 0!==e}},fields:[{name:"threadPool_reset",type:"bundle-title",caption:"vCPU",extras:function(e,t){var n,a=t.form,o=null===(n=e.resources)||void 0===n?void 0:n.tablet_node_resource_guarantee;if(!o||!o.type||!d)return{params:[],onReset:function(){}};var l=o.vcpu;return{params:Sn("vCores",l),onReset:function(){var e=o.type;if(e){var t=d.tablet_node_sizes[e].default_config.cpu_limits;a.change("cpu_limits",(0,r.A)((0,r.A)({},Bn.defaults.cpu_limits),t))}}}}},{name:"lookup_thread_pool_size",type:"bundle-input",caption:"Lookup thread pool size",extras:{postfix:"threads",format:"Number",hasClear:!0},validator:Dn.bind(null,{gt:0})},{name:"query_thread_pool_size",type:"bundle-input",caption:"Query thread pool size",extras:{postfix:"threads",format:"Number",hasClear:!0},validator:Dn.bind(null,{gt:0})},{name:"write_thread_pool_size",type:"bundle-input",caption:"Tablet cells per node",warning:"Changing tablet cell count is discouraged. Do not modify this parameter unless you understand what you are doing",extras:{postfix:"threads",format:"Number",hasClear:!0},validator:Dn.bind(null,{gt:0})}]},R=[B];h?R.push(k,S,L):R.push(T);var z=(0,p.wA)(),O=function(){var e=(0,Ut.A)((0,Dt.A)().mark((function e(t){var n;return(0,Dt.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a){e.next=2;break}return e.abrupt("return",{});case 2:return n=Rn(t),e.prev=3,e.next=6,z(pt({bundleName:a,data:n}));case 6:return e.abrupt("return",void 0);case 9:return e.prev=9,e.t0=e.catch(3),e.abrupt("return",(0,An.Ln)(e.t0));case 12:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t){return e.apply(this,arguments)}}();return fn()(l)?null:(0,C.jsx)(An.yZ,{className:Un("dialog"),headerProps:{title:a},size:"l",initialValues:y,visible:n,onAdd:O,onClose:function(){z((function(e){e({type:u.Or,data:{bundleName:void 0,loaded:!0,visibleEditor:!1}})}))},fields:R,validate:Mn.bind(null,null==s?void 0:s.resource_quota)})}function Mn(e,t){var n,r,a,o,l,s,i,c={resources:{info:void 0},memory_limits:{memory_reset:void 0}},u=t.resources,d=Object.values(t.memory_limits||{}).reduce((function(e,t){return"number"!=typeof t?e:e+t}),0),m=u.tablet_node_resource_guarantee;c.memory_limits.memory_reset=d>(null!==(n=null==m?void 0:m.memory)&&void 0!==n?n:0)?"The sum of the memory limits exceeds the allowed values":void 0;var h=u.rpc_proxy_count,p=void 0===h?0:h,b=u.tablet_node_count,v=void 0===b?0:b,_=(null!==(r=null==m?void 0:m.vcpu)&&void 0!==r?r:0)*v+(null!==(a=null===(o=u.rpc_proxy_resource_guarantee)||void 0===o?void 0:o.vcpu)&&void 0!==a?a:0)*p,f=[];_>(null==e?void 0:e.vcpu)&&f.push("".concat(it.A.format.Number(_/1e3)," cpu required"));var g=(null!==(l=null==m?void 0:m.memory)&&void 0!==l?l:0)*v+(null!==(s=null===(i=u.rpc_proxy_resource_guarantee)||void 0===i?void 0:i.memory)&&void 0!==s?s:0)*p;return g>(null==e?void 0:e.memory)&&f.push("".concat(it.A.format.Bytes(g)," memory requried")),c.resources.info=f.length?f.join(", "):void 0,c}var Hn=n(26264);function Vn(e){return function(t){return t({type:u.cP}),t({type:u.LJ,data:{bundleName:e,visibleEditor:!0}}),M.Qq.get(M.Vu.chaosCellBundlesEditData,{path:"//sys/chaos_cell_bundles/".concat(e),attributes:["resource_usage","resource_limits","options","abc"]}).then((function(e){t({type:u.sP,data:{data:e}})})).catch((function(e){t({type:u.VA,data:e})}))}}var Wn=["bundle","health","tabletCells","changelog_account","actions"],Qn={setBundlesSortState:function(e){return{type:u.lr,data:{bundlesSort:e}}},setActiveBundle:Ee,showCellBundleEditor:Vn};const Kn=(0,p.Ng)((function(e){return{loading:(0,ke.l9)(e),loaded:(0,ke.um)(e),data:(0,ke.v8)(e),total:(0,ke.sD)(e),sortState:(0,ke.dz)(e),cluster:(0,q.dB)(e),allowPerBundleAccounting:!1,mode:(0,ke.tC)(e),pathPrefix:"//sys/chaos_cell_bundles/",columns:Wn,activeBundleLink:O.pu,writeableByName:{get:function(){return!0}}}}),Qn)(rt);var Yn=["default"],Xn={setTabletsBundlesNameFilter:function(e){return{type:u.lr,data:{bundlesNameFilter:e}}},setTabletsBundlesAccountFilter:function(e){return{type:u.lr,data:{bundlesAccountFilter:e}}},setTabletsBundlesTagNodeFilter:function(e){return{type:u.lr,data:{bundlesTagNodeFilter:e}}},setTabletsFirstBundleAsActive:function(){return function(e,t){var n=t(),r=(0,ke.v8)(n),a=(0,E.A)(r,1)[0];if(a){var o=(0,q.dB)(n);e(Ee(a.bundle)),(0,H.Q)().push((0,O.d7)(o,a.bundle))}}},setTabletsPartial:Te};const Gn=(0,p.Ng)((function(e){return{accountFilter:(0,ke.px)(e),bundlesTableMode:(0,ke.tC)(e),nameFilter:(0,ke.p1)(e),tagNodeFilter:(0,ke.QJ)(e),modes:Yn}}),Xn)(Ct);function $n(){var e=(0,p.wA)(),t=o.useCallback((function(t){e(function(e){return function(t,n){var r=(0,ke.DO)(e,(0,ke.UI)(n())),a=(0,ke.U5)(r);D()(a||"")}}(t))}),[e]);return o.useEffect((function(){e(Ee(""))}),[e]),(0,C.jsx)(m.A,{children:(0,C.jsx)(h.Ay,{hideToolbarShadow:!0,toolbar:(0,C.jsx)(Gn,{}),content:(0,C.jsx)(Kn,{copyHostListToClipboard:t})})})}var Jn=n(39055),Zn=n(1852),er=n(63936),tr=n(87871),nr=n(44187),rr=(0,l.A)("chaos-editor"),ar=[{value:"general",text:"General",show:!0},{value:"resources",text:"Resources",show:!0}];function or(e){var t=e.bundleEditorData,n=e.resourceType,r=e.setBundleQuota,a=t.data,l=He.A.getValue(a,"/@resource_limits/".concat(n)),s=He.A.getValue(a,"/@resource_usage/".concat(n)),i=o.useState(!1),c=(0,E.A)(i,2),u=c[0],d=c[1],m=o.useCallback((function(){d(!u)}),[u,d]),h=(0,U.z)(s,l,lr[n]),p=h.value,b=void 0===p?0:p,v=h.theme,_=h.text;return(0,C.jsxs)("div",{className:rr("item"),children:[(0,C.jsxs)("div",{className:rr("name-usage"),children:[(0,C.jsx)("div",{className:rr("name"),children:(0,C.jsx)(er.yN,{children:it.A.format.Readable(n)})}),(0,C.jsx)(Re.k,{className:rr("progress"),value:b,theme:v,text:_}),(0,C.jsx)(Ue.A,{view:"flat-secondary",onClick:m,children:(0,C.jsx)(oe.A,{awesome:"pencil"})})]}),u&&(0,C.jsx)(sr,{bundleEditorData:t,resourceType:n,setBundleQuota:r,toggleVisibility:m})]})}var lr={tablet_count:"Number",tablet_static_memory:"Bytes"};function sr(e){var t=e.bundleEditorData,n=e.resourceType,r=e.setBundleQuota,a=e.toggleVisibility,l=t.bundleName,s=void 0===l?"":l,i=t.data,c=He.A.getValue(i,"/@resource_limits/".concat(n)),u=He.A.getValue(i,"/@resource_usage/".concat(n)),d=(0,p.wA)(),m=o.useCallback((function(e){d(r({bundleName:s,resourceType:n,limit:e}))}),[n]);return(0,C.jsx)(Zn.A,{format:lr[n],limit:c,onHide:a,onSave:m,getInfoByName:function(){return{limit:c,total:u}},currentAccount:s,parentOfCurrentAccount:"",max:1/0})}function ir(e){var t=e.bundleEditorData,n=e.setBunndleAttributes;return(0,C.jsxs)(o.Fragment,{children:[(0,C.jsx)(cr,{bundleEditorData:t,setBunndleAttributes:n}),(0,C.jsx)(ur,{attributeName:"changelog_account",bundleEditorData:t,setBunndleAttributes:n}),(0,C.jsx)(ur,{attributeName:"snapshot_account",bundleEditorData:t,setBunndleAttributes:n})]})}function cr(e){var t=e.bundleEditorData,n=e.setBunndleAttributes,r=t.bundleName,a=t.data,l=He.A.getValue(a,"/@abc/slug"),s=(0,p.d4)(xn.dU),i=(0,p.wA)(),c=o.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,a=e.slug;if(!r)throw new Error("Name of bundle cannot be empty");i(n(r,{attributes:{abc:t&&a?{id:t,slug:a}:void 0}}))}),[]),u=Ve.Ay.renderControlAbcService({value:{slug:l},onChange:c,placeholder:"Select ABC service...",disabled:!s});return u?(0,C.jsx)(nr.o,{header:"ABC Service",children:(0,C.jsx)(C.Fragment,{children:u})}):null}function ur(e){var t=e.attributeName,n=e.bundleEditorData,r=e.setBunndleAttributes,l=n.bundleName,s=n.data,i=He.A.getValue(s,"/@options/".concat(t)),c=(0,p.d4)(xn.dU),u=(0,p.wA)(),d=o.useCallback((function(e){if(!l)throw new Error("Name of bundle cannot be empty");u(r(l,{options:(0,a.A)({},t,e)}))}),[]);return(0,C.jsx)(nr.o,{header:"".concat(ee()(t)," account"),children:(0,C.jsx)(tr.Dk,{value:i||"",onChange:d,disabled:!c,allowRootAccount:!0})})}var dr=function(e){return e.chaosCellBundleEditor},mr={hideBundleEditor:function(){return function(e){e({type:u.LJ,data:{bundleName:void 0,loaded:!0,visibleEditor:!1}})}},setBundleQuota:function(e){return function(t){var n=e.bundleName,r=e.resourceType,a=e.limit,o=it.A.format.Readable(r);return(0,U.fI)(dt().v3.set({path:"//sys/chaos_cell_bundles/".concat(n,"/@resource_limits/").concat(r)},a),{toasterName:"edit_bundle_".concat(n),successContent:"Set quota limit for ".concat(o),errorContent:"Cannot set quota limit for ".concat(o)}).then((function(){t(Vn(n))}))}},setBunndleAttributes:function(e,t){return function(n){console.log(t);var r=t.attributes,a=t.options,o="//sys/chaos_cell_bundles/".concat(e);return(0,U.fI)(M.Qq.executeBatch(M.Vu.chaosCellBundlesSetAttrs,{requests:[].concat((0,b.A)(L()(r,(function(e,t){return(0,ct.Gy)("".concat(o,"/@").concat(t),e)}))),(0,b.A)(L()(a,(function(e,t){return(0,ct.Gy)("".concat(o,"/@options/").concat(t),e)}))))}),{toasterName:"update-bundle_".concat(e),successContent:"".concat(e," successfully updated"),errorContent:"".concat(e," cannot be updated"),batchType:"v3",errorTitle:"Failed to update bundle configuration"}).then((function(){n(Vn(e))}))}}};const hr=(0,p.Ng)((function(e){return{bundleEditorData:dr(e)}}),mr)((function(e){var t=e.bundleEditorData,n=e.hideBundleEditor,r=e.setBundleQuota,a=e.setBunndleAttributes,l=t.visibleEditor,s=t.bundleName,i=t.error,u=o.useState(ar[0].value),d=(0,E.A)(u,2),m=d[0],h=d[1],b=(0,p.wA)(),v=o.useCallback((function(){b(n())}),[]);return l?(0,C.jsxs)(Jn.K,{open:!0,onClose:v,children:[(0,C.jsx)(Jn.K.Header,{caption:(0,C.jsx)(o.Fragment,{children:s})}),(0,C.jsx)(Jn.K.Divider,{}),(0,C.jsxs)(Jn.K.Body,{className:rr("body"),children:[(0,C.jsx)("div",{className:rr("body-tabs"),children:(0,C.jsx)(c.A,{items:ar,size:"m",layout:"vertical",active:m,onTabChange:h})}),(0,C.jsxs)("div",{className:rr("body-tab-content"),children:["resources"===m&&(0,C.jsxs)(o.Fragment,{children:[(0,C.jsx)(or,{bundleEditorData:t,resourceType:"tablet_count",setBundleQuota:r}),(0,C.jsx)(or,{bundleEditorData:t,resourceType:"tablet_static_memory",setBundleQuota:r}),i&&(0,C.jsx)(Se.z,{error:i})]}),"general"===m&&(0,C.jsx)(ir,{bundleEditorData:t,setBunndleAttributes:a})]})]})]}):null}));var pr={setTabletsPartial:Te};const br=(0,p.Ng)((function(e){return{activeBundle:(0,ke.JP)(e),activeBundleHosts:(0,ke.GR)(e),idFilter:(0,ke.Xj)(e),bundleFilter:(0,ke.uo)(e),hostFilter:(0,ke.yb)(e),bundles:(0,ke.zQ)(e),hosts:(0,ke.RC)(e)}}),pr)(k);var vr=["id","bundle","health","peerAddress","state","actions"],_r={setTabletsPartial:Te,setTabletsActiveBundle:Ee};const fr=(0,p.Ng)((function(e){return{cluster:(0,q.dB)(e),loading:(0,ke.l9)(e),loaded:(0,ke.um)(e),data:(0,ke.jU)(e),sortState:(0,ke.Nd)(e),columns:vr,activeBundleLink:O.pu,attributesPath:O.Dr,cellNavigationLink:O.t8}}),_r)(Ae);function gr(){return(0,C.jsx)(m.A,{children:(0,C.jsx)(h.Ay,{hideToolbarShadow:!0,toolbar:(0,C.jsx)(br,{}),content:(0,C.jsx)(fr,{})})})}var yr=n(35441),Ar=n(62250),xr=(0,n(33882).A)(o.lazy((0,Ut.A)((0,Dt.A)().mark((function e(){return(0,Dt.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([n.e(8096),n.e(2209),n.e(8972),n.e(3266),n.e(958),n.e(6680),n.e(3735),n.e(2238),n.e(1830)]).then(n.bind(n,7370));case 2:return e.t0=e.sent.TabletErrorsByBundle,e.abrupt("return",{default:e.t0});case 4:case"end":return e.stop()}}),e)}))))),Nr=n(31229),wr=(0,l.A)("tablets"),jr=o.memo(kr);function Cr(){var e,t=(0,d.W5)(),n=(0,p.d4)(q.dB),a=(0,p.d4)(P.Mm),l=(0,p.d4)(P.OR),s=((0,p.d4)(P.EA)||{}).enable_bundle_controller,c=void 0!==s&&s,m=(0,p.wA)(),h=o.useCallback((function(){Promise.all([m((function(e){e({type:u.CQ});var t=[{command:"list",parameters:(0,r.A)({path:"//sys/chaos_cells",attributes:["health","id","peers","status","tablet_cell_bundle"]},Q.v)},{command:"get",parameters:(0,r.A)({path:"//sys/chaos_cell_bundles",attributes:["health","id","options"]},Q.v)}];return M.Qq.executeBatch(M.Vu.chaosCellBundles,{requests:t}).then((function(t){var n=(0,E.A)(t,2),r=n[0].output,a=n[1].output,o=(0,U.$7)(t,"Tablet cell bundles cannot be loaded");if(o)throw o;var l=(0,O.VY)(r),s=(0,O.Th)(l,a);e({type:u.CZ,data:{cells:l,bundles:s}})})).catch((function(t){e({type:u.jo,data:t})}))})),m(Y())])}),[m]);(0,Be.Tt)(h);var b=(0,p.d4)(P.nX).get(l),v=c||b,_=function(e,t){return o.useMemo((function(){return i()(u.R_,(function(t,n){return n===u.R_.CHAOS_CELLS?t[n]={show:!1}:t[n]={show:n===u.R_.TABLET_CELLS||Boolean(e)},t}),{})}),[e,t])}(l,c),f=_[u.R_.STATISTICS];f.show=f.show&&Boolean(Ve.Ay.getStatisticsComponentForBundle());var g=_[u.R_.MONITOR],y=null!==(e=Ve.Ay.getMonitoringForBundle())&&void 0!==e?e:{},A=y.component,x=y.urlTemplate,N=y.title;g.show=g.show&&Boolean(A||x),x&&(g.external=!0,g.routed=!1,g.url=(0,yr.j)(x,{ytCluster:n,ytTabletCellBundle:l}));var w=_[u.R_.INSTANCES];w.show=w.show&&c;var j=_[u.R_.PROXIES];j.show=j.show&&c;var B=_[u.R_.TABLET_ERRORS];return B.show=B.show&&(0,Nr.FG)().allowTabletErrorsAPI,(0,C.jsxs)("div",{className:"elements-page__content",children:[(0,C.jsxs)("section",{className:wr(null,"elements-main-section"),children:[(0,C.jsx)("div",{className:wr("content"),children:(0,C.jsxs)("div",{className:wr("heading"),children:[(0,C.jsx)(Br,{allowEdit:v,activeBundle:l,cluster:n}),(0,C.jsx)("div",{className:wr("tabs"),children:(0,C.jsx)(jr,{activeBundle:l,showSettings:_,monitoringTitle:N})})]})}),a&&(0,C.jsx)(Se.z,{error:a}),(0,C.jsx)("div",{className:wr("tab-viewer"),children:(0,C.jsxs)(d.dO,{children:[w&&(0,C.jsx)(d.qh,{path:"".concat(t.path,"/").concat(u.R_.INSTANCES),component:bn}),j&&(0,C.jsx)(d.qh,{path:"".concat(t.path,"/").concat(u.R_.PROXIES),component:vn}),B.show&&(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.TABLET_ERRORS),render:function(){return(0,C.jsx)(xr,{bundle:l})}}),(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.TABLET_CELLS),component:je}),(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.CHAOS_CELL_BUNDLES,"/").concat(u.R_.CHAOS_CELLS),component:gr}),f.show&&(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.STATISTICS),component:Rt}),g.show&&A&&(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.MONITOR),render:function(){return(0,C.jsx)(Ot,{component:A})}}),(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.ACL),render:function(){return(0,C.jsx)(It,{className:wr("acl-tab")})}}),(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES),component:Et}),(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.CHAOS_CELL_BUNDLES),component:$n}),(0,C.jsx)(d.rd,{from:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/*"),to:t.path})]})})]}),(0,C.jsx)(qn,{}),(0,C.jsx)(hr,{})]})}function Br(e){var t=e.activeBundle,n=e.allowEdit,r=e.cluster,a=(0,p.wA)(),l=(0,p.d4)(q.qp),s=o.useCallback((function(){t&&a(ht(t))}),[t,a]);return(0,C.jsxs)(o.Fragment,{children:[t&&(0,C.jsx)("div",{className:"elements-heading elements-heading_size_l",children:(0,C.jsxs)("div",{className:wr("bundle-name"),children:[(0,C.jsxs)("div",{className:wr("bundle-name-left"),children:[t,(0,C.jsx)(qe.A,{className:wr("dashboard-link"),theme:"ghost",url:(0,bt.Ut)(r,t)})]}),l&&n&&(0,C.jsx)("div",{className:wr("tabs-edit-btn"),children:(0,C.jsxs)(Ue.A,{className:wr("edit-btn"),size:"m",onClick:s,children:[(0,C.jsx)(oe.A,{awesome:"pencil"}),"Edit Bundle"]})})]})}),(0,C.jsx)(an,{})]})}function kr(e){var t=e.activeBundle,n=e.showSettings,o=e.monitoringTitle,l=void 0===o?"Monitoring":o,s=(0,d.W5)(),i=s.params.cluster,m=t?(0,Ce._4)(s.url,u.R_,n,void 0,(0,a.A)({},u.R_.MONITOR,l)):function(e,t){var n=(0,Ce._4)(e,{});return n.items=[{value:Hn.YW.TABLET_CELL_BUNDLES,text:"Tablet cell bundles",show:!0,url:"/".concat(t,"/").concat(Hn.YW.TABLET_CELL_BUNDLES)},{value:u.R_.TABLET_CELLS,text:"Tablet cells",show:!0,url:"/".concat(t,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.TABLET_CELLS)},{value:Hn.YW.CHAOS_CELL_BUNDLES,text:"Chaos cell bundles",show:!0,url:"/".concat(t,"/").concat(Hn.YW.CHAOS_CELL_BUNDLES)},{value:u.R_.CHAOS_CELLS,text:"Chaos cells",show:!0,url:"/".concat(t,"/").concat(Hn.YW.CHAOS_CELL_BUNDLES,"/").concat(u.R_.CHAOS_CELLS)}],n}(s.url,i);return(0,C.jsx)(c.A,(0,r.A)((0,r.A)({},m),{},{className:wr("tabs"),routed:!0,routedPreserveLocation:!0,exactNavLink:!0,size:Ar.jr}))}var Tr=n(49524),Er=n(86704),Sr=n(64859),Lr=(0,l.A)("tablet-cell-bundles-top-row-content");function Rr(e){var t=e.isActiveBundleInFavourites,n=e.items,r=e.activeBundle,a=e.page,l=e.setActiveBundle,s=e.toggleFavourite,i=(0,p.d4)(q.dB),c=o.useCallback((function(e){l(e.path),e.path?(0,H.Q)().push("/".concat(i,"/").concat(a,"/").concat(u.R_.TABLET_CELLS,"?activeBundle=").concat(e.path)):(0,H.Q)().push("/".concat(i,"/").concat(a))}),[i,l]),d=o.useCallback((function(){s(r)}),[s]);return(0,C.jsx)(Er.A,{className:Lr("favourites"),isActive:t,items:n,onItemClick:c,onToggle:d,toggleDisabled:!r,theme:"clear"})}function zr(e){var t=e.className,n=e.bcItems,r=e.setActiveBundle,a=(0,d.W6)(),l=o.useCallback((function(e){r(e.toString())}),[r]),s=o.useMemo((function(){return n.map((function(e){var t=e.text||e.title||"";return(0,C.jsx)(Tr.y,{href:e.href,children:t},t)}))}),[n]);return(0,C.jsx)(Tr.B,{navigate:a.push,onAction:l,className:t,showRoot:!0,children:s})}const Or=function(e){var t=e.isActiveBundleInFavourites,n=e.favourites,r=e.toggleFavourite,a=e.activeBundle,o=e.activeBundleData,l=e.bcItems,s=e.page,i=e.setActiveBundle,c=(0,p.d4)(q.jU);return(0,C.jsxs)(Sr.K,{page:s,urlParams:{activeBundle:""},children:[(0,C.jsx)(Rr,{isActiveBundleInFavourites:t,activeBundle:a,page:s,setActiveBundle:i,items:n,toggleFavourite:r}),(0,C.jsx)(zr,{className:Lr("breadcrumbs"),bcItems:l,setActiveBundle:i}),Ve.Ay.renderTopRowExtraControlsForBundle({itemClassName:Lr("extra-control"),clusterUiConfig:c,bundle:o})]})};var Fr=n(82947),Pr={setActiveBundle:G,toggleFavourite:F.BO};const Ir=(0,p.Ng)((function(e){return{activeBundle:(0,P.OR)(e),activeBundleData:(0,P.EA)(e),bcItems:(0,P.tB)(e),page:Hn.YW.TABLET_CELL_BUNDLES,favourites:(0,Fr.NF)(e),isActiveBundleInFavourites:(0,Fr.YZ)(e)}}),Pr)(Or);var Dr={setActiveBundle:Ee};const Ur=(0,p.Ng)((function(e){return{activeBundle:(0,ke.JP)(e),activeBundleData:(0,ke.vY)(e),bcItems:(0,ke.K)(e),page:Hn.YW.CHAOS_CELL_BUNDLES,favourites:(0,Fr.jO)(e),isActiveBundleInFavourites:(0,Fr.sO)(e)}}),Dr)(Or)},95976:(e,t,n)=>{n.d(t,{c:()=>l}),n(77810);var r=n(76872),a=n(64922),o=(0,r.A)("yt-color-circle");function l(e){var t=e.color,n=e.marginRight,r=void 0===n||n;return(0,a.jsx)("div",{className:o({"margin-right":r}),style:{backgroundColor:t}})}},96464:(e,t,n)=>{n.d(t,{w:()=>a});var r=n(77810);function a({ref:e,onResize:t,box:n}){r.useEffect((()=>{const r=null==e?void 0:e.current;if(!r)return;if(void 0===window.ResizeObserver)return window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)};const a=new ResizeObserver((e=>{e.length&&t()}));return a.observe(r,{box:n}),()=>{a.disconnect()}}),[e,t,n])}}}]);
2
- //# sourceMappingURL=bundles.b851f32c.chunk.js.map
1
+ "use strict";(self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[6582],{5800:(e,t,n)=>{n.d(t,{A:()=>p});var r=n(40319),a=n(18801),o=(n(77810),n(15647)),l=n(97536),s=n(57614),i=n(92611);const c=JSON.parse('{"tooltip-content":"Show attributes"}'),u=JSON.parse('{"tooltip-content":"Показать аттрибуты"}'),d=(0,i.Kc)("yt:attributes-button",{en:c,ru:u});var m=n(64922),h=["title","getPathProps","path","exactPath","attribute","attributes","openAttributesModal","withTooltip","tooltipProps"];const p=(0,o.Ng)(null,{openAttributesModal:s.V6})((function(e){var t=e.title,n=e.getPathProps,o=void 0===n?function(){return{}}:n,s=e.path,i=e.exactPath,c=e.attribute,u=e.attributes,p=e.openAttributesModal,b=e.withTooltip,v=void 0===b||b,_=e.tooltipProps,f=void 0===_?{placement:"bottom-end",content:d("tooltip-content")}:_,g=(0,a.A)(e,h);return(0,m.jsx)(l.A,(0,r.A)((0,r.A)({},g),{},{tooltipProps:f,withTooltip:v,onClick:function(){var e=(0,r.A)({path:s,exactPath:i},o());p((0,r.A)((0,r.A)({title:t},e),{},{attribute:c,attributes:u}))}}))}))},10559:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(40319),a=n(64922);const o=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:"M1 3.25a.75.75 0 0 1 .75-.75h12.5a.75.75 0 0 1 0 1.5H1.75A.75.75 0 0 1 1 3.25M1 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 1 8m.75 4a.75.75 0 0 0 0 1.5h2.5a.75.75 0 0 0 0-1.5z",clipRule:"evenodd"})}))}},11970:(e,t,n)=>{n.d(t,{k:()=>h});var r=n(64922),a=n(77810);const o=(0,n(21086).om)("progress");function l(e){const{text:t,offset:n=0}=e;return t?(0,r.jsx)("div",{className:o("text-inner"),style:{transform:`translateX(calc(var(--g-flow-direction) * ${-n}%))`},children:t}):null}function s({item:e}){const{value:t,color:n,className:a,theme:l,title:s,content:i,loading:c}=e,u={loading:c};return void 0===n&&(u.theme=l||"default"),Number.isFinite(t)?(0,r.jsx)("div",{className:o("item",u,a),style:{width:`${t}%`,backgroundColor:n},title:s,children:i}):null}function i(e){return e<100?e-100:0}function c(e){const{theme:t,colorStops:n,colorStopsValue:r,value:a}=e;if(n){const e=n.find(((e,t)=>{const o="number"==typeof r?r:a,l=t>1?n[t-1].stop:0,s=t<n.length-1?e.stop:100;return o>=l&&o<=s}));return e?e.theme:t}return t}function u(e){const{stack:t,stackClassName:n,value:a,text:c}=e,u=i(a||function(e){return e.reduce(((e,{value:t})=>e+t),0)}(t));return(0,r.jsxs)("div",{className:o("stack",n),style:{transform:`translateX(calc(var(--g-flow-direction) * ${u}%))`},children:[(0,r.jsx)("div",{className:o("item"),style:{width:-u+"%"}}),t.map(((e,t)=>(0,r.jsx)(s,{item:e},t))),(0,r.jsx)(l,{offset:u,text:c})]})}function d(e){const{value:t,loading:n,text:a}=e,s=i(t);return Number.isFinite(t)?(0,r.jsx)("div",{className:o("item",{theme:c(e),loading:n}),style:{transform:`translateX(calc(var(--g-flow-direction) * ${s}%))`},children:(0,r.jsx)(l,{offset:s,text:a})}):null}function m(e){return void 0!==e.stack}const h=a.forwardRef((function(e,t){const{text:n="",theme:a="default",size:l="m",loading:s=!1,className:i,qa:c}=e,h=Object.assign(Object.assign({},e),{text:n,theme:a,size:l,loading:s});return(0,r.jsxs)("div",{ref:t,className:o({size:l},i),"data-qa":c,children:[(0,r.jsx)("div",{className:o("text"),children:n}),m(h)?(0,r.jsx)(u,Object.assign({},h)):(0,r.jsx)(d,Object.assign({},h))]})}))},18058:(e,t,n)=>{n.d(t,{x:()=>v});var r=n(77810),a=n(15647),o=n(76872),l=n(52797),s=n(76426),i=n(44131),c=n(19410),u=n(31229),d=n(771),m=n(64922),h=(0,d.X4)(u.mH.reShortNameFromAddress),p=(0,d.X4)(u.mH.reShortNameFromTabletNodeAddress),b=(0,o.A)("yt-host");function v(e){var t=e.address,n=void 0===t?"":t,o=e.prefix,u=e.className,d=e.copyBtnClassName,v=e.onClick,_=e.useText,f=e.asTabletNode,g=e.inlineMargins,y=r.useMemo((function(){return function(e,t){var n=t?p:h;if(n){var r,a=null==n?void 0:n.exec(e);if(null!=a&&null!==(r=a.groups)&&void 0!==r&&r.shortname)return[a.groups.shortname,a.groups.suffix].filter(Boolean).join("")}}(n,f)||n}),[n,f]),A=(0,a.d4)(l.dB);return(0,m.jsxs)("span",{className:b({hidden:!y,"inline-margins":g},["elements-monospace",u].filter(Boolean).join(" ")),onClick:v,children:[o,(0,m.jsx)(c.m,{className:b("tooltip"),content:n,children:_?y:(0,m.jsx)(s.A,{url:"/".concat(A,"/components/nodes/").concat(n),routed:!0,children:y})}),(0,m.jsx)("span",{className:b("copy-btn",d),children:(0,m.jsx)(i.A,{view:"flat-secondary",text:n})})]})}},26777:(e,t,n)=>{n.d(t,{BZ:()=>k,D1:()=>q,Gy:()=>P,N8:()=>I,O6:()=>L,Rh:()=>F,Sz:()=>H,VS:()=>V,Y:()=>O,Zb:()=>R,o6:()=>z,u_:()=>E,w8:()=>T});var r=n(70353),a=n(53775),o=n(9736),l=n(28407),s=n(40319),i=n(13322),c=n(3009),u=n.n(c),d=n(39760),m=n.n(d),h=n(31470),p=n.n(h),b=n(96843),v=n.n(b),_=n(27528),f=n.n(_),g=n(90636),y=n.n(g),A=n(84092),x=n.n(A),N=n(69313),w=n(48971),j=n(27859),C={labels:["codec:","level:"],items:(0,i.A)(["none","snappy","zlib_","lz4","lz4_high_compression","quick_lz","zstd_","brotli_","lzma_","bzip2_"].map((function(e){return{value:e,content:e}}))),subItemsMap:{zlib_:B(1,9),zstd_:B(1,21),brotli_:B(1,11),lzma_:B(0,9),bzip2_:B(1,9)}};function B(e,t){for(var n=[],r=e;r<=t;++r)n.push({value:String(r),content:String(r)});return n}function k(e){if(!e)return[N.HL];for(var t in C.subItemsMap)if(e.startsWith(t))return[t,e.substr(t.length)];return[e]}function T(e){return p()(e,[N.HL])?"":null==e?void 0:e.join("")}var E={REPLICATION:"replication",ERASURE:"erasure"},S=[{value:"lrc_12_2_2",title:"lrc_12_2_2 (recommended)"},{value:"reed_solomon_6_3",title:"reed_solomon_6_3"}];function L(e){return e&&"none"!==e?E.ERASURE:E.REPLICATION}function R(e){return e&&"none"!==e?e:S[0].value}function z(e,t){return e===E.REPLICATION?"none":t||S[0].value}var O={NONE:"none",COMPRESSED:"compressed",UNCOMPRESSED:"uncompressed"};function F(e){return{ui_marker:e}}function P(e,t,n){return null==t?{command:"remove",parameters:(0,s.A)({path:e},n)}:{command:"set",parameters:(0,s.A)((0,s.A)({path:e},n),{},{force:!0}),input:t}}var I={REPLICATED_TABLE:"replicated_table",REPLICATION_LOG_TABLE:"replication_log_table",CHAOS_REPLICATED_TABLE:"chaos_replicated_table",MAP_NODE:"map_node",TABLE:"table"};function D(e,t){return U.apply(this,arguments)}function U(){return(U=(0,l.A)((0,a.A)().mark((function e(t,n){var o,l,s,i,c;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.length){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:o={},m()(n,(function(e){for(var t=e.split("/"),n=1;n<t.length;++n){var r=t.slice(0,n).join("/");r&&(o[r]=!0)}})),l=Object.keys(o).sort(),s=(0,r.A)(l),e.prev=6,c=(0,a.A)().mark((function e(){var n,r;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.value,r=t+"/@"+n,e.next=4,x().v3.exists({path:r}).then((function(e){if(!e)return x().v3.set({path:r},{})}));case 4:case"end":return e.stop()}}),e)})),s.s();case 9:if((i=s.n()).done){e.next=13;break}return e.delegateYield(c(),"t0",11);case 11:e.next=9;break;case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(6),s.e(e.t1);case 18:return e.prev=18,s.f(),e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[6,15,18,21]])})))).apply(this,arguments)}function q(e,t){if(v()(t))return Promise.resolve();var n=[],r=[],s={};return m()(t,(function(t){var a=t.attr,l=t.value,i=a.split("/");if(1===i.length){var c=e+"/@"+i.join("/");n.push(P(c,l))}else{var u=i.splice(i.length-1,1),d=(0,o.A)(u,1)[0],m=i.join("/");r.push(m);var h=e+"/@"+m;(s[h]=s[h]||{})[d]=l}})),Promise.all([].concat((0,i.A)(n.length?[(0,w.Mt)(j.Qq.executeBatch(j.Vu.updateNodeAttributes,{requests:n}),"Failed to update node attributes")]:[]),[D(e,r).then((function(){if(v()(s))return Promise.resolve([]);var e=f()(s,function(){var e=(0,l.A)((0,a.A)().mark((function e(t,n){var r;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=M(n,t),e.next=3,r;case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());return Promise.all(e)}))]))}function M(e,t){if(v()(t))return Promise.resolve();var n=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=u()(n);return m()(t,(function(e,t){void 0===e?delete r[t]:r[t]=e})),p()(n,r)?Promise.resolve():x().v3.set({path:e},r)};return x().v3.exists({path:e}).then((function(t){return t?j.Qq.get(j.Vu.updateAttributes,{path:e}).then(n):n({})}))}function H(e,t,n){return{command:e,parameters:t,setup:n}}function V(e){var t=y()(e,(function(e){return-1===e.indexOf("/")})),n=(0,o.A)(t,2),r=n[0],a=n[1];return a.length?{keys:r,paths:a}:r}},31710:(e,t,n)=>{n.d(t,{X:()=>s}),n(77810);var r=n(73822),a=n(66133),o=n(64922),l={good:"success",initializing:"warning",degrading:"warning",failed:"danger",changing:"info",pending:"info"};function s(e){var t=e.value,n=e.className,s=l[t||""];return t?(0,o.jsx)(a.A,{className:n,theme:s,children:t}):r.A.format.NO_VALUE}},49524:(e,t,n)=>{n.d(t,{B:()=>j,y:()=>y});var r=n(40319),a=n(18801),o=n(77810),l=n(64922),s=n(13778),i=n(96464),c=n(6542),u=n(80999),d=n(25723);function m(e,t){const n=e.getAttribute("target");return e.href&&(!n||"_self"===n)&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}const h=(0,n(21086).om)("breadcrumbs2");function p(e){var t;const n=e.href?"a":"span",r=(0,d.$)(e,{labelable:!0});let a=e.title;a||"string"!=typeof e.children||(a=e.children);const o=t=>{if(e.disabled)return void t.preventDefault();"function"==typeof e.onAction&&e.onAction();const n=t.currentTarget;"function"==typeof e.navigate&&n instanceof HTMLAnchorElement&&e.href&&!t.isDefaultPrevented()&&m(n,t)&&(t.preventDefault(),e.navigate(e.href,e.routerOptions))},s=e.disabled;let i={title:a,onClick:o,"aria-disabled":!!s||void 0};return"a"===n?(i.href=e.href,i.hrefLang=e.hrefLang,i.target=e.target,i.rel="_blank"!==e.target||e.rel?e.rel:"noopener noreferrer",i.download=e.download,i.ping=e.ping,i.referrerPolicy=e.referrerPolicy):(i.role="link",i.tabIndex=s?void 0:0,i.onKeyDown=e=>{"Enter"===e.key&&o(e)}),e.current&&(i["aria-current"]=null!==(t=e["aria-current"])&&void 0!==t?t:"page"),"menu"===e.itemType&&(i={}),(0,l.jsx)(n,Object.assign({},r,i,{className:"menu"===e.itemType?h("menu"):h("link",{"is-current":e.current,"is-disabled":s&&!e.current}),children:e.children}))}function b({separator:e}){return(0,l.jsx)("div",{"aria-hidden":!0,className:h("divider"),children:null!=e?e:"/"})}p.displayName="Breadcrumbs.Item",b.displayName="Breadcrumbs.Separator";var v=n(37338);const _=JSON.parse('{"breadcrumbs":"Breadcrumbs","label_more":"Show more"}'),f=JSON.parse('{"breadcrumbs":"Навигация","label_more":"Показать больше"}'),g=(0,v.N)({en:_,ru:f},"lab/Breadcrumbs");function y(e){return null}const A=o.forwardRef((function(e,t){const n=o.useRef(null),r=(0,s.N)(t,n),a=[];o.Children.forEach(e.children,((e,t)=>{o.isValidElement(e)&&(void 0!==e.key&&null!==e.key||(e=o.cloneElement(e,{key:t})),a.push(e))}));const[v,_]=o.useState(a.length),[f,y]=o.useState(!1),A=o.useCallback((()=>{y(!1),_(a.length)}),[a.length]);(0,i.w)({ref:n,onResize:A});const x=o.useRef(null);o.useLayoutEffect((()=>{f&&e.children!==x.current&&(x.current=e.children,y(!1),_(a.length))}),[f,a.length,e.children]),o.useLayoutEffect((()=>{f||(t=>{const r=n.current;if(!r)return;const o=Array.from(r.children);if(0===o.length)return;const l=r.offsetWidth;let s=0,i=0,c=e.maxItems||1/0,u=0;if(e.showRoot){const e=o.shift();e&&(u=e.scrollWidth,i+=u),s++}if(a.length>t){const e=o.shift();e&&(i+=e.offsetWidth),c--}e.showRoot&&i>=l&&(i-=u,s--);const d=o.pop();d&&(i+=Math.min(d.offsetWidth,200),i<l&&s++);for(let e=o.length-1;e>=0&&(i+=o[e].offsetWidth,!(i>=l));e--)s++;s=Math.max(Math.min(c,s),1),s===v?y(!0):_(s)})(v)}));const{navigate:N}=e;let w=a;if(a.length>v){w=[];const t=[...a];let n=v;if(e.showRoot&&v>1){const e=t.shift();e&&w.push(e),n--}const r=t.slice(0,-n),o=(0,l.jsx)(p,{itemType:"menu",children:(0,l.jsx)(u.r,{items:r.map(((t,n)=>Object.assign(Object.assign({},t.props),{text:t.props.children,disabled:e.disabled,items:[],action:r=>{var a;"function"==typeof e.onAction&&e.onAction(null!==(a=t.key)&&void 0!==a?a:n);const o=r.currentTarget;"function"==typeof N&&o instanceof HTMLAnchorElement&&t.props.href&&m(o,r)&&(r.preventDefault(),N(t.props.href,t.props.routerOptions))}}))),popupProps:{className:h("popup",{staircase:"staircase"===e.popupStyle}),placement:e.popupPlacement},renderSwitcher:({onClick:t})=>(0,l.jsx)(c.$,{title:g("label_more"),className:h("more-button"),onClick:t,size:"s",view:"flat",disabled:e.disabled,children:(0,l.jsx)(c.$.Icon,{children:"..."})})})});w.push(o),w.push(...t.slice(-n))}const j=w.length-1,C=w.map(((t,n)=>{var r;const a=n===j,s=null!==(r=t.key)&&void 0!==r?r:n;return(0,l.jsxs)("li",{className:h("item",{calculating:!f}),children:[(0,o.createElement)(p,Object.assign({},t.props,{key:s,current:a,disabled:e.disabled||t.props.disabled,onAction:()=>{"function"==typeof e.onAction&&e.onAction(s)},navigate:N}),t.props.children),a?null:(0,l.jsx)(b,{separator:e.separator})]},n)}));return(0,l.jsx)("ol",Object.assign({ref:r},(0,d.$)(e,{labelable:!0}),{"data-qa":e.qa,className:h(null,e.className),style:e.style,children:C}))}));A.Item=y,A.displayName="Breadcrumbs";var x=n(76872),N=["children"],w=(0,x.A)("yt-u-breadcrumbs"),j=function(e){var t=e.children,n=(0,a.A)(e,N);return(0,l.jsx)(A,(0,r.A)((0,r.A)({},n),{},{className:w(null,n.className),children:t}))}},56747:(e,t,n)=>{n.d(t,{A:()=>N});var r=n(40319),a=n(77810),o=n(76872),l=n(88314),s=n.n(l),i=n(10559),c=n(89648),u=n(80999),d=n(6542),m=n(32235),h=n(57486),p=n(44458),b=n(64922),v=(0,o.A)("yt-page-counter");function _(e){var t=e.pageIndex,n=e.pageCount,r=e.className;return void 0===t||void 0===n?null:n>1?(0,b.jsxs)("span",{className:v(null,r),children:["Page: ",(t||0)+1," / ",n]}):null}const f=a.memo(_);var g=n(84549),y=n(12680),A=(0,o.A)("column-header");function x(e){var t=e.column,n=e.title,r=e.shortTitle,a=null!=n?n:s()(t);return{nameContent:r||a,titleContent:a}}function N(e){var t=e.className,n=e.align,o=e.order,l=e.onSort,s=e.multisortIndex,i=e.loading,u=e.pageIndex,d=e.pageCount,m=function(e){if(void 0===e.options){var t=e.column,n=e.allowUnordered,a=e.withUndefined,o=e.title,l=e.shortTitle,s=e.allowedOrderTypes;return(0,r.A)({column:t,allowUnordered:n,withUndefined:a,allowedOrderTypes:s},x({column:t,title:o,shortTitle:l}))}var i=e.column,c=e.options,u=e.title,d=e.shortTitle,m=c.find((function(e){var t=e.column;return i===t}));return m||(0,y.N1)({message:"Unexpected behavior: missing value in ColumnHeader.props.options",additional:e}),(0,r.A)((0,r.A)({subColumn:x((0,r.A)({},m))},m),x({column:"",title:u,shortTitle:d}))}(e),v=m.column,_=m.allowUnordered,N=m.withUndefined,j=m.nameContent,C=m.titleContent,B=m.allowedOrderTypes,k=m.subColumn,T=a.useCallback((function(e){var t=B?(0,p.Pc)(o,B):(0,p.$N)(o,_,N);null==l||l(v,t,{currentOrder:o,multisort:e.ctrlKey||e.metaKey})}),[v,o,l,_,B,N]),E=Boolean(l);return(0,b.jsxs)("div",{className:A(null,t),children:[(0,b.jsxs)("div",{className:A("label-icon",{sortable:E,align:n}),onClick:E?T:void 0,children:[(0,b.jsx)("span",{className:A("label"),title:C,children:j}),E&&(0,b.jsx)("span",{className:A("icon"),children:(0,b.jsx)(h.A,{order:o})}),void 0!==s&&(0,b.jsxs)("span",{className:A("multisort"),children:[" ",(0,b.jsx)("sup",{children:s})]}),Boolean(o)&&Boolean(k)&&(0,b.jsx)(c.E,{className:A("label",{"sub-column":!0}),variant:"caption-2",title:null==k?void 0:k.titleContent,color:"dark-secondary",children:null==k?void 0:k.nameContent})]}),(0,b.jsx)(w,{options:e.options,order:o,onSort:l}),void 0!==i&&(0,b.jsx)("div",{className:A("loader"),children:(0,b.jsx)(g.A,{visible:i})}),Boolean(d)&&(0,b.jsx)(f,{className:A("page-counter"),pageIndex:u,pageCount:d})]})}function w(e){var t=e.order,n=e.options,r=e.onSort;return n?(0,b.jsx)(u.r,{items:n.map((function(e){return{text:x(e).titleContent,action:function(){if(r){var n=e.column,a=e.allowUnordered,o=e.withUndefined,l=e.allowedOrderTypes,s=l?(0,p.Pc)(t,l):(0,p.$N)(t,a,o);r(n,s,{currentOrder:t})}}}})),renderSwitcher:function(e){var t=e.onClick;return(0,b.jsx)(d.$,{onClick:t,view:"flat",size:"xs",children:(0,b.jsx)(m.I,{size:12,data:i.A})})}}):null}},62561:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(77810),a=n(76426),o=n(88787);const l=(0,n(92611).Kc)("yt:chart-link",{en:{View:"View"},ru:{View:"Смотреть"}});var s=n(64922);function i(e){var t=e.className,n=e.url,i=e.title,c=e.theme,u=e.children,d=e.hideIcon,m=e.face,h=e.wrapContent;if(!n)return null;var p=d?null:(0,s.jsx)(o.A,{awesome:"chart-bar",face:m}),b=u?(0,s.jsxs)(r.Fragment,{children:[p,u]}):p;return(0,s.jsx)(a.A,{className:t,target:"_blank",theme:c,url:n,title:null!=i?i:l("View"),children:h?h(b):b})}const c=r.memo(i)},65986:(e,t,n)=>{n.d(t,{C:()=>a,o:()=>o});var r=n(29717);const a="gc-",o=((0,r.withNaming)({e:"__",m:"_",v:"_"}),(0,r.withNaming)({n:a,e:"__",m:"_",v:"_"}))},70909:(e,t,n)=>{n.d(t,{R:()=>c}),n(77810);var r=n(76872),a=n(32235),o=n(40319),l=n(64922);const s=function(e){return(0,l.jsx)("svg",(0,o.A)((0,o.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"},e),{},{children:(0,l.jsx)("path",{fill:"#027BF3",d:"M7 .828C3.521.828.703 3.672.703 7.125A6.296 6.296 0 0 0 7 13.422c3.453 0 6.297-2.818 6.297-6.297C13.297 3.672 10.453.828 7 .828m0 11.375a5.06 5.06 0 0 1-5.078-5.078A5.077 5.077 0 0 1 7 2.047c2.793 0 5.078 2.285 5.078 5.078A5.077 5.077 0 0 1 7 12.203m0-8.582c-.61 0-1.066.483-1.066 1.067 0 .609.457 1.066 1.066 1.066.584 0 1.066-.457 1.066-1.066 0-.584-.482-1.067-1.066-1.067m1.422 6.45v-.61a.33.33 0 0 0-.305-.305h-.305V6.617a.33.33 0 0 0-.304-.304H5.883a.31.31 0 0 0-.305.304v.61c0 .177.127.304.305.304h.305v1.625h-.305a.31.31 0 0 0-.305.305v.61c0 .177.127.304.305.304h2.234a.31.31 0 0 0 .305-.305"})}))};var i=(0,r.A)("info-block");function c(e){var t=e.children,n=e.className;return(0,l.jsxs)("div",{className:i(null,n),children:[(0,l.jsx)("div",{className:i("icon"),children:(0,l.jsx)(a.I,{data:s})}),(0,l.jsx)("div",{className:i("body"),children:t})]})}},79240:(e,t,n)=>{n.d(t,{h:()=>l}),n(77810);var r=n(76872),a=n(64922),o=(0,r.A)("bundle-params-list"),l=function(e){var t=e.className,n=e.params,r=e.size,l=void 0===r?"s":r;return(0,a.jsx)("div",{className:o({size:l},t),children:n.map((function(e){return(0,a.jsxs)("span",{children:[e.title," ",(0,a.jsxs)("span",{className:o("value",{type:e.type}),children:[e.value," ",e.postfix]})]},e.title)}))})}},80016:(e,t,n)=>{n.d(t,{w:()=>i});var r=n(9736),a=n(77810),o=n(15647),l=n(11843),s=n(27652);function i(e){var t=e.children,n=(0,o.d4)(l.Y),i=n.regular,c=n.monospace,u=a.useState(!1),d=(0,r.A)(u,2),m=d[0],h=d[1];return a.useEffect((function(){Promise.all([(0,s.w)(i),(0,s.w)(c)]).then((function(){return h(!0)}))}),[i,c]),m?t:null}},86704:(e,t,n)=>{n.d(t,{A:()=>y});var r=n(40319),a=n(29121),o=n(12937),l=n(66134),s=n(10785),i=n(77810),c=n(75826),u=n.n(c),d=n(76872),m=n(27528),h=n.n(m),p=n(80999),b=n(6542),v=n(88787),_=n(39566),f=n(64922),g=(0,d.A)("favourites"),y=function(e){function t(){var e;(0,a.A)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=(0,l.A)(this,t,[].concat(r))).state={isActive:e.props.isActive},e.toggleActive=function(){var t=e.props.onToggle;e.setState((function(e){return{isActive:!e.isActive}})),t()},e.onItemClick=function(t){(0,e.props.onItemClick)(t)},e}return(0,s.A)(t,e),(0,o.A)(t,[{key:"renderDropDownMenu",value:function(){var e=this,t=this.props.items,n=h()(t,(function(t){return{text:t.path,action:function(){return e.onItemClick(t)}}}));0===t.length&&n.push({action:function(){},text:"No favourites"});var r=this.renderButton({view:"normal",size:"m",pin:"brick-round",title:"View favourites",children:(0,f.jsx)(v.A,{awesome:"angle-down"})});return(0,f.jsx)(p.r,{popupProps:{className:g("popup",{empty:0===t.length})},items:n,switcher:r})}},{key:"renderHotkey",value:function(){return(0,f.jsx)(_.A,{settings:[{keys:"f",handler:this.toggleActive,scope:"all"}]})}},{key:"renderButton",value:function(e){var t=this.props.theme?{view:"outlined"}:{};return(0,f.jsx)(b.$,(0,r.A)((0,r.A)({},e),t))}},{key:"render",value:function(){var e=this.props,t=e.toggleDisabled,n=e.className,r=e.theme,a=this.state.isActive;return(0,f.jsxs)("div",{className:g(null,n),children:[(0,f.jsx)("div",{className:g("star-btn",{clear:"clear"===r}),children:this.renderButton({view:"outlined-info",selected:a,size:"m",pin:"clear"===r?"round-brick":"round-clear",title:"Add to favourites [F]",onClick:this.toggleActive,disabled:t,children:(0,f.jsx)(v.A,{awesome:a?"star-alt":"star"})})}),this.renderDropDownMenu(),this.renderHotkey()]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isActive!==t.isActive?{isActive:e.isActive}:null}}])}(i.Component);y.itemType=u().shape({path:u().string})},95250:(e,t,n)=>{n.r(t),n.d(t,{ChaosCellBundlesTopRow:()=>Ur,TabletCellBundles:()=>Cr,TabletCellBundlesTopRow:()=>Ir});var r=n(40319),a=n(68175),o=n(77810),l=n(76872),s=n(75414),i=n.n(s),c=n(56950),u=n(42265),d=n(64965),m=n(71217),h=n(5675),p=n(15647),b=n(13322),v=n(29121),_=n(12937),f=n(66134),g=n(10785),y=n(49214),A=n.n(y),x=n(44131),N=n(99800),w=n(33023),j=n(87319),C=n(64922),B=(0,l.A)("cells-table-instruments");const k=function(e){function t(){var e;(0,v.A)(this,t);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=(0,f.A)(this,t,[].concat(r))).onIdFilter=function(t){e.props.setTabletsPartial({cellsIdFilter:t})},e.onBundleFilter=function(t){e.props.setTabletsPartial({cellsBundleFilter:t})},e.onHostFilterChange=function(t){e.onHostSelected(t)},e.onHostSelected=function(t){e.props.setTabletsPartial({cellsHostFilter:t})},e.onHostInputBlur=function(){e.setState({hostFilter:e.props.hostFilter})},e.getBundleFilterItems=function(t){var n=e.props.bundles;return t?A()(n,(function(){return-1!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").indexOf(t)})):n},e.getHostFilterItems=function(t){var n=e.props.hosts;return t?A()(n,(function(){return-1!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").indexOf(t)})):n},e}return(0,g.A)(t,e),(0,_.A)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.idFilter,a=t.bundleFilter,o=t.activeBundle,l=t.activeBundleHosts;return(0,C.jsx)(w.M,{className:B(null,n),itemsToWrap:[{name:"id1",node:(0,C.jsx)(N.A,{className:B("text-filter"),hasClear:!0,size:"m",type:"text",value:r,placeholder:"Enter cell id...",onChange:this.onIdFilter,autofocus:!1}),shrinkable:!0,growable:!0,wrapperClassName:B("item")}].concat((0,b.A)(o?[]:[{name:"bundle",node:(0,C.jsx)(j.A,{className:B("suggest"),text:a,apply:function(t){return e.onBundleFilter("string"==typeof t?t:t.value)},filter:function(t,n){return e.getBundleFilterItems(n)},placeholder:"Enter bundle name...",popupClassName:B("suggest-popup")}),growable:!0,shrinkable:!0,wrapperClassName:B("item")}]),[{name:"host",node:(0,C.jsx)(j.A,{className:B("suggest"),text:this.props.hostFilter,onTextUpdate:this.onHostFilterChange,onItemClick:function(t){return e.onHostSelected("string"==typeof t?t:t.value)},onBlur:this.onHostInputBlur,filter:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.getHostFilterItems(n)},placeholder:"Enter host...",autoFocus:!1,popupClassName:B("suggest-popup")}),growable:!0,shrinkable:!0,wrapperClassName:B("item")}],(0,b.A)(l?[{name:"copy-hosts",node:(0,C.jsx)(x.A,{pin:"round",text:l,awesome:"clipboard-list",buttonText:"Copy host list"})}]:[]))})}}])}(o.Component);var T=n(92547),E=n(9736),S=n(27528),L=n.n(S),R=n(90943),z=n.n(R),O=n(73928),F=n(13724),P=n(85749),I=n(623),D=n.n(I),U=n(48971),q=n(52797),M=n(27859),H=n(13542),V=n(63582),W=n(76365),Q=n(40519),K=new W.A;function Y(){return function(e){e({type:u.Nj});var t=[{command:"exists",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles"}},{command:"list",parameters:(0,r.A)({path:"//sys/tablet_cells",attributes:["peers","id","tablet_cell_bundle","total_statistics","status"]},Q.v)},{command:"get",parameters:(0,r.A)({path:"//sys/tablet_cell_bundles",attributes:["nodes","health","options","node_tag_filter","resource_limits","resource_usage","folder_id","abc","dynamic_options","bundle_controller_target_config","enable_bundle_controller","zone"]},Q.v)}];return K.removeAllRequests(),M.Qq.executeBatch(M.Vu.tabletCellBundles,{parameters:{requests:t},cancellation:K.saveCancelToken}).then((function(t){var n=(0,T.A)(t),r=n[0].output,a=n.slice(1),o=(0,E.A)(a,2),l=o[0].output,s=o[1].output,c=(0,U.$7)(a,"Tablet cell bundles cannot be loaded");if(c)throw c;var d=(0,O.VY)(l),m=(0,O.Th)(d,s),h=function(e){var t=new Map;return e.forEach((function(e){var n=e.bundle;t.has(n)||t.set(n,!0)})),(0,b.A)(t.keys())}(m);e(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return function(t,n){var r=(0,q.ID)(n()),a=L()(e,(function(e){return(0,V.jQ)({path:"//sys/tablet_cell_bundles/".concat(e.bundle),user:r,permission:"write"})}));return(0,U.fI)(M.Qq.executeBatch(M.Vu.tabletBundlesCheckWrite,{parameters:{requests:a},cancellation:K.saveCancelToken}).then((function(n){var r=(0,U.hC)(n,"Failed to get bundle permissions"),a=r.error,o=r.outputs,l=i()(o,(function(t,n,r){if("allow"===(null==n?void 0:n.action)){var a=e[r].bundle;t.set(a,!0)}return t}),new Map);return t({type:u.Kh,data:{writableByName:l}}),a?Promise.reject(a):void 0})),{toasterName:"bundleWritePermissions",skipSuccessToast:!0,errorTitle:"Fetch write permissions"})}}(m)),h.length&&r?M.Qq.get(M.Vu.bundleControllerZones,{parameters:{path:"//sys/bundle_controller/controller/zones",attributes:["tablet_node_sizes","rpc_proxy_sizes","data_centers"]},cancellation:K.saveCancelToken}).then((function(t){var n=function(e){return Object.entries(e).reduce((function(e,t){var n=(0,E.A)(t,2),r=n[0],a=n[1];return e[r]=z().getValue(a,"/@"),e}),Object.create(null))}(t);e({type:u.ds,data:{cells:d,bundles:m,bundleDefaultConfig:n}})})).catch((function(t){(0,W.m)(t)||e({type:u.m2,data:t})})):e({type:u.ds,data:{cells:d,bundles:m}})})).catch((function(t){(0,W.m)(t)||e({type:u.m2,data:t})}))}}function X(e){return{type:u.Kh,data:e}}function G(e){return function(t){t((0,F.MV)(e)),t({type:u.p9,data:{activeBundle:e}})}}var $={setTabletsPartial:X};const J=(0,p.Ng)((function(e){return{activeBundle:(0,P.OR)(e),activeBundleHosts:(0,P.j4)(e),idFilter:(0,P.GV)(e),bundleFilter:(0,P.HS)(e),hostFilter:(0,P.HH)(e),bundles:(0,P.Eg)(e),hosts:(0,P.u6)(e)}}),$)(k);var Z=n(88314),ee=n.n(Z),te=n(66944),ne=n(5800),re=n(56747),ae=n(2735),oe=n(88787),le=n(66133),se=n(76426),ie=n(19410),ce=n(31710),ue=n(18058),de=n(82053),me=n.n(de),he=(0,l.A)("cells-table"),pe={leading:"success",none:"default",elections:"warning",leader_recovery:"warning"},be={displayIndices:!1,stickyHead:te.Ay.MOVING,stickyTop:h.kB,syncHeadOnResize:!0,dynamicRender:!0},ve={id:"Cell id",uncompressed:"Uncompressed size",compressed:"Compressed size",peerAddress:"Node",actions:" "};function _e(e){return(0,C.jsx)("span",{className:he("hover-action"),children:e.children})}function fe(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(0,C.jsx)("div",{className:he("wrapped"),children:e.apply(void 0,(0,b.A)(n))})}}var ge=function(e){function t(){var e;(0,v.A)(this,t);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=(0,f.A)(this,t,[].concat(r))).renderColumnHeader=function(t,n){var r,a=e.props.sortState,o=a.column,l=a.order,s=t===o;return(0,C.jsx)(re.A,{className:he("header-cell",{col:t,sortable:n},"data-table__head-cell"),column:t,title:null!==(r=ve[t])&&void 0!==r?r:ee()(t),order:s?l:void 0,onSort:e.onColumnSort,withUndefined:!0})},e.onColumnSort=function(t,n){e.props.setTabletsPartial({cellsSort:{column:t,order:n}})},e.renderId=function(e){var t=((null==e?void 0:e.row)||{}).id;return(0,C.jsxs)("div",{className:he("id"),children:[(0,C.jsx)("span",{className:he("id-id"),children:t}),(0,C.jsx)(_e,{children:(0,C.jsx)(x.A,{view:"flat-secondary",text:t})})]})},e.renderBundle=function(t){var n=e.props,r=n.activeBundleLink,a=n.cluster,o=((null==t?void 0:t.row)||{}).bundle;return(0,C.jsx)(se.A,{routed:!0,theme:"primary",url:r(a,o),onClick:function(){e.props.setTabletsActiveBundle(o)},children:o})},e.renderState=function(e){var t,n=(null!==(t=null==e?void 0:e.row)&&void 0!==t?t:{}).state,r=n?pe[n]:void 0;return(0,C.jsx)(le.A,{theme:r,type:"text",text:n,capitalize:!0})},e.renderActions=function(t){var n=e.props,r=n.attributesPath,a=n.cellNavigationLink,o=n.cluster,l=((null==t?void 0:t.row)||{}).id;return(0,C.jsxs)("div",{className:he("actions"),children:[(0,C.jsx)(ie.m,{placement:["bottom","top"],content:"Go to Navigation",children:(0,C.jsx)(se.A,{url:a(o,l),theme:"ghost",routed:!0,children:(0,C.jsx)(oe.A,{awesome:"folder"})})}),(0,C.jsx)(ne.A,{size:"m",view:"flat-secondary",title:l,path:r(l)})]})},e}return(0,g.A)(t,e),(0,_.A)(t,[{key:"renderNumber",value:function(e,t){var n=((null==t?void 0:t.row)||{})[e];return me().format.Number(n)}},{key:"renderBytes",value:function(e,t){var n=((null==t?void 0:t.row)||{})[e];return me().format.Bytes(n)}},{key:"renderHealth",value:function(e){var t=((null==e?void 0:e.row)||{}).health;return(0,C.jsx)(ce.X,{value:t})}},{key:"renderHost",value:function(e){var t;return(0,C.jsx)(ue.x,{asTabletNode:!0,address:null==e||null===(t=e.row)||void 0===t?void 0:t.peerAddress,copyBtnClassName:he("hover-action")})}},{key:"column",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{name:e,align:"left",sortable:!1,className:he("td",{col:e.toLocaleLowerCase()}),header:this.renderColumnHeader(e,t)}}},{key:"sortableColumn",value:function(e){return this.column(e,!0)}},{key:"render",value:function(){var e=this,t=this.props.columns.map((function(t){return ye[t].call(e)})),n=this.props,r=n.data,a=n.loading,o=n.loaded;return(0,C.jsx)("div",{className:he(),children:(0,C.jsx)(ae.Ay,{loading:a,loaded:o,columns:t,data:r,settings:be,theme:"bundles-table"})})}}])}(o.Component),ye={id:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("id")),{},{render:this.renderId,width:400})},bundle:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("bundle")),{},{render:fe(this.renderBundle)})},health:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("health")),{},{render:fe(this.renderHealth),width:80})},tablets:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablets")),{},{render:fe(this.renderNumber.bind(this,"tablets")),align:"right",width:100})},memory:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("memory")),{},{render:fe(this.renderBytes.bind(this,"memory")),align:"right",width:100})},uncompressed:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("uncompressed")),{},{render:fe(this.renderBytes.bind(this,"uncompressed")),align:"right",width:150})},compressed:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("compressed")),{},{render:fe(this.renderBytes.bind(this,"compressed")),align:"right",width:130})},peerAddress:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("peerAddress")),{},{render:this.renderHost,width:130})},state:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("state")),{},{render:fe(this.renderState),width:100})},actions:function(){return(0,r.A)((0,r.A)({},this.column("actions")),{},{render:this.renderActions,width:70})}};const Ae=ge;var xe=["id","bundle","health","tablets","memory","uncompressed","compressed","peerAddress","state","actions"],Ne={setTabletsPartial:X,setTabletsActiveBundle:G};const we=(0,p.Ng)((function(e){return{cluster:(0,q.dB)(e),loading:(0,P.U7)(e),loaded:(0,P.HF)(e),data:(0,P.It)(e),sortState:(0,P.AC)(e),columns:xe,activeBundleLink:O.d7,attributesPath:O.dh,cellNavigationLink:O.lX}}),Ne)(Ae);function je(){return(0,C.jsx)(m.A,{children:(0,C.jsx)(h.Ay,{hideToolbarShadow:!0,toolbar:(0,C.jsx)(J,{}),content:(0,C.jsx)(we,{})})})}var Ce=n(53332),Be=n(13685),ke=n(94285);function Te(e){return{type:u.lr,data:e}}function Ee(e){return function(t){t((0,F.MV)(e)),t({type:u.SQ,data:{activeBundle:e}})}}var Se=n(8208),Le=n(18472),Re=n(11970);const ze=e=>o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),o.createElement("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-.078.745-.298 1.1-.208.339-.513.614-.875.867-.217.153-.325.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 .075-.312c0-.3-.244-.641-.84-.641a1 1 0 0 0-.608.223c-.167.138-.231.287-.231.418a.75.75 0 0 1-1.5 0c0-.674.345-1.22.78-1.577M8 12a1 1 0 1 0 0-2 1 1 0 0 0 0 2",clipRule:"evenodd"}));var Oe=n(20686),Fe=n(32235);const Pe=(0,n(65986).o)("help-popover");function Ie(e){var t;return o.createElement(Oe.A,Object.assign({},e,{className:Pe(null,e.className)}),o.createElement("button",Object.assign({ref:e.buttonRef,type:"button"},e.buttonProps,{className:Pe("button",null===(t=e.buttonProps)||void 0===t?void 0:t.className)}),o.createElement(Fe.I,{data:ze,size:16})))}var De=n(37175),Ue=n(58299),qe=n(62561),Me=n(42321),He=n(29746),Ve=n(7787),We=(0,l.A)("bundle-general-meta");function Qe(e){var t=e.value,n=void 0===t||t,r=e.blocking;return(0,C.jsx)("span",{className:We("bb",{success:n,blocking:r}),children:n?"on":"off"})}function Ke(){var e=(0,p.d4)(P.EA),t=(0,p.d4)(q.jU),n=(0,p.d4)(q.dB),r=(0,p.d4)(q.qp);if(!e)return null;var a=[].concat((0,b.A)(Ve.Ay.getExtraMetaTableItemsForBundle({bundle:e,clusterUiConfig:t})||[]),[{key:"Health",value:(0,C.jsx)(ce.X,{value:e.health})},{key:"Tablet cells",value:me().format.Number(e.tabletCells)},{key:"Tablets",value:me().format.Number(e.tablets),visible:!r},{key:"Bundle controller",value:(0,C.jsx)(Qe,{value:e.enable_bundle_controller})},{key:"Node tag filter",value:e.node_tag_filter||me().format.NO_VALUE}]),o=[{key:"Memory",value:me().format.Bytes(e.memory),visible:!r},{key:"Tablets",value:Ye(e,"tablet_count"),visible:r},{key:"Tablet static memory",value:Ye(e,"tablet_static_memory"),visible:r},{key:"Uncompressed size",value:me().format.Bytes(e.uncompressed)},{key:"Compressed size",value:me().format.Bytes(e.compressed)},{key:"Changelog account",value:e.changelog_account?(0,C.jsx)(De.A,{className:We("account-link"),account:e.changelog_account,cluster:n}):me().format.NO_VALUE},{key:"Snapshot account",value:e.snapshot_account?(0,C.jsx)(De.A,{className:We("account-link"),account:e.snapshot_account,cluster:n}):me().format.NO_VALUE}];return(0,C.jsx)(Me.Ay,{className:We(),items:[a,o],title:"General"})}function Ye(e,t){var n=He.A.getValue(e,"/resource_usage/".concat(t)),a=He.A.getValue(e,"/resource_limits/".concat(t)),o="tablet_static_memory"===t?"Bytes":"Number",l=(0,U.z)(n,a,o);return(0,C.jsx)(Re.k,(0,r.A)({className:We("progress")},l))}var Xe=n(80016),Ge=(0,l.A)("bundles-table"),$e={displayIndices:!1,stickyHead:te.Ay.MOVING,stickyFooter:te.Ay.MOVING,stickyTop:h.kB,stickyBottom:0,syncHeadOnResize:!0,dynamicRender:!0},Je={bundle:"Bundle / Node tag filter",tabletCells:"Cells",uncompressed:"Uncompressed size",compressed:"Compressed size",enable_bundle_controller:"Bundle controller",changelog_account:"Changelog and Snapshot account",node_tag_filter:"Node tag filter",actions:" ",tablet_count:"Usage",tablet_count_limit:"Limit",tablet_count_free:"Free",tablet_count_percentage:"Percentage",tablet_static_memory:"Usage",tablet_static_memory_limit:"Limit",tablet_static_memory_free:"Free",tablet_static_memory_percentage:"Percentage"},Ze={enable_bundle_controller:"BC"};function et(e){var t=e.bundle,n=e.copyHostListToClipboard,r=o.useCallback((function(){return n(t)}),[t,n]);return(0,C.jsx)("div",{className:Ge("actions-copy-hosts"),onClick:r,children:(0,C.jsx)(ie.m,{content:(0,C.jsx)("span",{className:Ge("no-wrap"),children:"Copy hosts to clipboard"}),placement:"bottom-start",children:(0,C.jsx)(x.A,{view:"flat-secondary",onCopy:r})})})}var tt=function(e){function t(){var e;(0,v.A)(this,t);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=(0,f.A)(this,t,[].concat(r))).renderColumnHeader=function(t,n){var r=e.props.sortState||{},a=r.column,o=r.order,l=t===a;return(0,C.jsx)(re.A,{className:Ge("header-cell",{col:t,sortable:n},"data-table__head-cell"),column:t,title:Je[t],shortTitle:Ze[t],order:l?o:void 0,onSort:n?e.onColumnSort:void 0,withUndefined:!0})},e.onColumnSort=function(t,n){e.props.setBundlesSortState({column:t,order:n})},e.renderBundle=function(t){var n,r=e.props,a=r.activeBundleLink,o=r.cluster,l=r.clusterUiConfig,s=(null==t?void 0:t.row)||{},i=s.bundle,c=s.node_tag_filter,u=s.enable_bundle_controller,d=Boolean(c);return(0,C.jsxs)("div",{className:Ge("bundle"),children:[(0,C.jsxs)("div",{className:Ge("name",{has_tag:d}),children:[i?(0,C.jsx)(se.A,{routed:!0,theme:"primary",url:a(o,i,u),onClick:function(){e.props.setActiveBundle(i)},children:null==t||null===(n=t.row)||void 0===n?void 0:n.bundle}):"Total",d&&(0,C.jsx)("span",{className:Ge("name-tag"),children:c})]}),Ve.Ay.renderBundlesTableItemExtraControls({bundle:t.row,clusterUiConfig:l,itemClassName:Ge("extra-control")})]})},e.renderAccount=function(t){var n=e.props.cluster,r=(null==t?void 0:t.row)||{},a=r.changelog_account,l=r.snapshot_account;return(0,C.jsxs)(o.Fragment,{children:[(0,C.jsx)(De.A,{cluster:n,account:a}),a!==l&&(0,C.jsxs)(o.Fragment,{children:[", ",(0,C.jsx)(De.A,{cluster:n,account:l})]})]})},e.renderNodes=function(e){var t=(null==e?void 0:e.row)||{},n=t.nodes,r=t.node_tag_filter,a=t.unique_node_tag,o=t.bundle;if(!a&&o){var l='This bundle shares nodes with other bundles having node tag filter\n "'.concat(r,'". Actual amount of available resources depends on the number of tablet cells and may\n be less than displayed in this column.');return(0,C.jsxs)("div",{className:Ge("nodes"),children:[(0,C.jsx)(Ie,{className:Ge("help-tooltip"),delayClosing:50,placement:"auto",content:l}),null==n?void 0:n.length]})}return null==n?void 0:n.length},e.renderActions=function(t){var n=e.props,r=n.allowPerBundleAccounting,a=n.bundleDashboardUrl,o=n.cluster,l=n.copyHostListToClipboard,s=n.pathPrefix,i=n.showCellBundleEditor,c=n.writeableByName,u=(null==t?void 0:t.row)||{},d=u.bundle,m=u.nodes,h=u.enable_bundle_controller;if(d){var p="".concat(s).concat(d),b=null!=h?h:null==c?void 0:c.get(d);return(0,C.jsxs)("div",{className:Ge("actions"),children:[(0,C.jsx)("div",{className:Ge("actions-attrs"),children:(0,C.jsx)(ne.A,{size:"m",view:"flat-secondary",title:p,path:p})}),r&&b&&(0,C.jsx)("div",{className:Ge("actions-attrs"),children:(0,C.jsx)(Ue.A,{size:"m",view:"flat-secondary",onClick:function(){return i(d)},children:(0,C.jsx)(oe.A,{awesome:"pencil"})})}),a&&(0,C.jsx)("div",{className:Ge("actions-attrs"),children:(0,C.jsx)(qe.A,{url:a(o,d),wrapContent:function(e){return(0,C.jsx)(Ue.A,{size:"m",view:"flat-secondary",children:e})}})}),m&&m.length>0&&(0,C.jsx)(et,{bundle:d,copyHostListToClipboard:l})]})}},e}return(0,g.A)(t,e),(0,_.A)(t,[{key:"renderNumber",value:function(e,t){var n=((null==t?void 0:t.row)||{})[e];return me().format.Number(n)}},{key:"renderBytes",value:function(e,t){var n=((null==t?void 0:t.row)||{})[e];return me().format.Bytes(n)}},{key:"renderBC",value:function(e){var t=(null==e?void 0:e.row)||{},n=t.bundle,r=t.enable_bundle_controller;return n?(0,C.jsx)(Qe,{value:r}):null}},{key:"renderHealth",value:function(e){var t=((null==e?void 0:e.row)||{}).health;return(0,C.jsx)(ce.X,{value:t})}},{key:"renderTabletCountPercentage",value:function(e){if(void 0===e.row.tablet_count_percentage)return me().format.NO_VALUE;var t=e.row,n=t.tablet_count,r=t.tablet_count_limit,a=(0,U.z)(n,r,"Number"),o=a.value,l=a.theme,s=a.text;return void 0===o?me().format.NO_VALUE:(0,C.jsx)(Re.k,{value:o,theme:l,text:s})}},{key:"renderTabletStaticMemoryPercentage",value:function(e){if(void 0===e.row.tablet_static_memory_percentage)return me().format.NO_VALUE;var t=e.row,n=t.tablet_static_memory,r=t.tablet_static_memory_limit,a=(0,U.z)(n,r,"Bytes"),o=a.value,l=a.theme,s=a.text;return void 0===o?me().format.NO_VALUE:(0,C.jsx)(Re.k,{value:o,theme:l,text:s})}},{key:"column",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{name:e,align:"left",sortable:!1,className:Ge("td",{col:e.toLowerCase()}),header:this.renderColumnHeader(e,t)}}},{key:"sortableColumn",value:function(e){return this.column(e,!0)}},{key:"render",value:function(){var e=this,t=this.props.columns.map((function(t){return nt[t].call(e)})),n=this.props,r=n.data,a=n.total,o=n.loading,l=n.loaded;return(0,C.jsx)("div",{className:Ge(),children:(0,C.jsx)(Xe.w,{children:(0,C.jsx)(ae.Ay,{loading:o,loaded:l,columns:t,data:r,settings:$e,theme:"bundles-table",footerData:r.length?[a]:void 0})})})}}])}(o.Component),nt={bundle:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("bundle")),{},{render:this.renderBundle})},tablet_count_percentage:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_count_percentage")),{},{render:this.renderTabletCountPercentage,width:260,align:"center"})},tablet_count:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_count")),{},{render:this.renderNumber.bind(this,"tablet_count"),align:"right",width:150})},tablet_count_limit:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_count_limit")),{},{render:this.renderNumber.bind(this,"tablet_count_limit"),align:"right",width:150})},tablet_count_free:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_count_free")),{},{render:this.renderNumber.bind(this,"tablet_count_free"),align:"right",width:150})},tablet_static_memory_percentage:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_static_memory_percentage")),{},{render:this.renderTabletStaticMemoryPercentage,width:260,align:"center"})},tablet_static_memory:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_static_memory")),{},{render:this.renderBytes.bind(this,"tablet_static_memory"),align:"right",width:150})},tablet_static_memory_limit:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_static_memory_limit")),{},{render:this.renderBytes.bind(this,"tablet_static_memory_limit"),align:"right",width:150})},tablet_static_memory_free:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_static_memory_free")),{},{render:this.renderBytes.bind(this,"tablet_static_memory_free"),align:"right",width:150})},health:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("health")),{},{render:this.renderHealth,align:"center",width:110})},nodes:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("nodes")),{},{render:this.renderNodes,align:"right",width:85})},tabletCells:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tabletCells")),{},{render:this.renderNumber.bind(this,"tabletCells"),align:"right",width:85})},tablets:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablets")),{},{render:this.renderNumber.bind(this,"tablets"),align:"right",width:100})},memory:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("memory")),{},{render:this.renderBytes.bind(this,"memory"),align:"right",width:100})},uncompressed:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("uncompressed")),{},{align:"right",render:this.renderBytes.bind(this,"uncompressed"),width:150})},compressed:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("compressed")),{},{align:"right",render:this.renderBytes.bind(this,"compressed"),width:120})},enable_bundle_controller:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("enable_bundle_controller")),{},{align:"center",render:this.renderBC,width:80})},changelog_account:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("changelog_account")),{},{render:this.renderAccount,width:235})},actions:function(){return(0,r.A)((0,r.A)({},this.column("actions")),{},{render:this.renderActions,width:100})}};const rt=tt;var at=n(39760),ot=n.n(at),lt=n(65304),st=n.n(lt),it=n(73822),ct=n(26777),ut=n(84092),dt=n.n(ut);function mt(e){return function(t,n){var a=n();t({type:u.N5,data:{bundleName:e}});var o=(0,P.p0)(a).find((function(t){return t.bundle===e}));if(!o)return Promise.resolve();var l=(0,P.q8)(a),s=[{command:"get",parameters:{path:"//sys/tablet_cell_bundles/".concat(e),attributes:["resource_usage","resource_limits","options","abc","folder_id","zone","enable_bundle_controller"]}}];return o.enable_bundle_controller&&s.push({command:"get",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles/".concat(e)}}),(0,U.fI)(M.Qq.executeBatch(M.Vu.tabletCellBundlesEditData,{requests:s}).then((function(e){var t,n=o.enable_bundle_controller&&(null===(t=e[2])||void 0===t||null===(t=t.error)||void 0===t?void 0:t.code)===dt().codes.NODE_DOES_NOT_EXIST,r=(0,U.$7)(n?[e[0]]:e,"Failed to get bundle edit data");if(r)throw r;return e})),{toasterName:"edit-bundle-data",skipSuccessToast:!0,errorContent:"Failed to load bundle details"}).then((function(e){var n,a,s=e,i=(0,E.A)(s,2),c=i[0].output,d=i[1],m=(void 0===d?{output:void 0}:d).output,h=o;null!==(n=o.bundle_controller_target_config)&&void 0!==n&&n.memory_limits.reserved||!l||(h=(0,r.A)((0,r.A)({},o),{},{bundle_controller_target_config:(0,r.A)((0,r.A)({},o.bundle_controller_target_config),{},{memory_limits:(0,r.A)((0,r.A)({},null===(a=o.bundle_controller_target_config)||void 0===a?void 0:a.memory_limits),{},{reserved:l})})})),t({type:u.V,data:{bundleData:h,data:c,bundleControllerData:m}});var p=[].concat((0,b.A)(L()(null==m?void 0:m.allocated_tablet_nodes,(function(e,t){return[(0,ct.Sz)("get",{path:"//sys/cluster_nodes/".concat(t,"/@bundle_controller_annotations/nanny_service")}),(0,ct.Sz)("get",{path:"//sys/cluster_nodes/".concat(t,"/@statistics/memory/tablet_static")})]}))),(0,b.A)(L()(null==m?void 0:m.allocated_rpc_proxies,(function(e,t){return[(0,ct.Sz)("get",{path:"//sys/rpc_proxies/".concat(t,"/@bundle_controller_annotations/nanny_service")})]})))),v=[];(0,U.fI)(M.Qq.executeBatch(M.Vu.tabletCellBundlesInstancesDetails,{requests:L()(p,(function(e){return(0,ct.Sz)("execute_batch",{requests:e})}))}),{toasterName:"bundle-controller-tablet-static-memory",skipSuccessToast:!0,errorContent:"BundleController: Cannot load tablet static memory of isntances"}).then((function(e){var n=[].concat((0,b.A)(st()(null==m?void 0:m.allocated_tablet_nodes)),(0,b.A)(st()(null==m?void 0:m.allocated_rpc_proxies))),r={};ot()(e,(function(e,t){var a=e.output,o=e.error;if(o)v.push(o);else{var l=(0,E.A)(a,2),s=l[0].output,i=l[1],c=(void 0===i?{output:void 0}:i).output;r[n[t]]={nanny_service:s,tablet_static_memory:c}}})),t({type:u.Or,data:{instanceDetailsMap:r}})}))})).catch((function(e){return t({type:u.KI,data:e}),Promise.reject(e)}))}}function ht(e){return function(t){t(mt(e)).then((function(){t({type:u.Or,data:{visibleEditor:!0}})}))}}function pt(e){return function(t){var n=e.bundleName,r=e.data,a="//sys/tablet_cell_bundles/".concat(n),o=L()(r,(function(e,t){return(0,ct.Gy)("".concat(a,"/").concat(t),e)}));return(0,U.fI)(M.Qq.executeBatch(M.Vu.tabletCellBundlesSetAttrs,{requests:o}),{toasterName:"edit_bundle_".concat(n),successContent:"Set bundle edit data",batchType:"v3",errorTitle:"Failed to set bundle edit data"}).then((function(){t(Y())}))}}var bt=n(94544),vt=(0,Le.Mz)([P.Br],(function(e){var t=["bundle"];switch(e){case"tablets":t.push("tablet_count_percentage","tablet_count","tablet_count_limit","tablet_count_free");break;case"tablets_memory":t.push("tablet_static_memory_percentage","tablet_static_memory","tablet_static_memory_limit","tablet_static_memory_free");break;default:t.push("health","nodes","tabletCells","tablets","memory","uncompressed","compressed","enable_bundle_controller","changelog_account")}return t.push("actions"),t})),_t={setBundlesSortState:function(e){return{type:u.Kh,data:{bundlesSort:e}}},setActiveBundle:G,showCellBundleEditor:ht};const ft=(0,p.Ng)((function(e){return{loading:(0,P.U7)(e),loaded:(0,P.HF)(e),data:(0,P.kj)(e),total:(0,P.XL)(e),sortState:(0,P.a1)(e),cluster:(0,q.dB)(e),allowPerBundleAccounting:(0,q.qp)(e),pathPrefix:"//sys/tablet_cell_bundles/",columns:vt(e),activeBundleLink:O.d7,bundleDashboardUrl:bt.Ut,writeableByName:(0,P.nX)(e)}}),_t)(rt);var gt=n(29347),yt=n.n(gt),At=n(87604);function xt(e){var t=e.bundlesTableMode,n=e.setTabletsPartial,r=e.modes,a=(0,p.wA)(),l=(0,p.d4)(q.qp),s=o.useCallback((function(e){a(n({bundlesTableMode:e.target.value}))}),[a]),i=r.map(At.A.prepareSimpleValue);return l?(0,C.jsx)(At.A,{items:i,value:t,onChange:s}):null}const Nt=o.memo(xt);var wt=(0,l.A)("bundles-table-instruments"),jt=function(e){function t(){var e;(0,v.A)(this,t);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=(0,f.A)(this,t,[].concat(r))).onNameEnterKeyDown=function(){e.props.setTabletsFirstBundleAsActive()},e}return(0,g.A)(t,e),(0,_.A)(t,[{key:"render",value:function(){var e=this.props,t=e.accountFilter,n=e.bundlesTableMode,r=e.className,a=e.modes,o=e.nameFilter,l=e.setTabletsPartial,s=e.tagNodeFilter;return(0,C.jsx)(w.M,{className:wt(null,r),itemsToWrap:yt()([{name:"name",node:(0,C.jsx)(N.A,{className:wt("text-filter"),hasClear:!0,autofocus:!0,size:"m",type:"text",value:o,placeholder:"Enter bundle name...",onChange:this.props.setTabletsBundlesNameFilter,onEnterKeyDown:this.onNameEnterKeyDown}),shrinkable:!0,growable:!0,wrapperClassName:wt("item")},{name:"account",node:(0,C.jsx)(N.A,{className:wt("account-filter"),hasClear:!0,size:"m",type:"text",value:t,placeholder:"Enter changelog or snapshot account...",onChange:this.props.setTabletsBundlesAccountFilter,autofocus:!1}),shrinkable:!0,growable:!0,wrapperClassName:wt("item")},{name:"tagNode",node:(0,C.jsx)(N.A,{className:wt("account-filter"),hasClear:!0,size:"m",type:"text",value:s,placeholder:"Enter node tag filter...",onChange:this.props.setTabletsBundlesTagNodeFilter,autofocus:!1}),shrinkable:!0,growable:!0,wrapperClassName:wt("item")},(a.length>1||a[0]!==n)&&{name:"tableMode",node:(0,C.jsx)(Nt,{bundlesTableMode:n,setTabletsPartial:l,modes:a}),shrinkable:!1,growable:!1,wrapperClassName:wt("item")}])})}}])}(o.Component);const Ct=jt;var Bt=["default","tablets","tablets_memory"],kt={setTabletsBundlesNameFilter:function(e){return{type:u.Kh,data:{bundlesNameFilter:e}}},setTabletsBundlesAccountFilter:function(e){return{type:u.Kh,data:{bundlesAccountFilter:e}}},setTabletsBundlesTagNodeFilter:function(e){return{type:u.Kh,data:{bundlesTagNodeFilter:e}}},setTabletsFirstBundleAsActive:function(){return function(e,t){var n=t(),r=(0,P.kj)(n),a=(0,E.A)(r,1)[0];if(a){var o=(0,q.dB)(n);e(G(a.bundle)),(0,H.Q)().push((0,O.d7)(o,a.bundle))}}},setTabletsPartial:X};const Tt=(0,p.Ng)((function(e){return{accountFilter:(0,P.CH)(e),bundlesTableMode:(0,P.Br)(e),nameFilter:(0,P.K2)(e),tagNodeFilter:(0,P.Js)(e),modes:Bt}}),kt)(Ct);function Et(){var e=(0,p.wA)(),t=o.useCallback((function(t){e(function(e){return function(t,n){var r=(0,P.bf)(e,(0,P.xU)(n())),a=(0,P.U5)(r);D()(a||"")}}(t))}),[e]);return o.useEffect((function(){e(G(""))}),[e]),(0,C.jsx)(m.A,{children:(0,C.jsx)(h.Ay,{hideToolbarShadow:!0,toolbar:(0,C.jsx)(Tt,{}),content:(0,C.jsx)(ft,{copyHostListToClipboard:t})})})}var St=n(60192);function Lt(){var e=(0,p.d4)(q.dB),t=(0,p.d4)(P.OR),n=(0,p.d4)(q.O4);if(!t)return(0,C.jsx)(St.R,{warning:"You don't have any selected bundles",hint:"Please choose one to display charts"});var r=Ve.Ay.getStatisticsComponentForBundle();return(0,C.jsx)(m.A,{children:(0,C.jsx)(r,{cluster:e,bundle:t,theme:n})})}const Rt=o.memo(Lt);function zt(e){var t=e.component,n=(0,p.d4)(P.EA),r=(0,p.d4)(q.dB),a=o.useMemo((function(){return He.A.getValue(n,"/bundle")}),[n]);return a?(0,C.jsx)(m.A,{children:(0,C.jsx)(t,{cluster:r,tablet_cell_bundle:a,bundleData:n})}):(0,C.jsx)(St.R,{warning:"You don't have any selected bundles",hint:"Please choose one to display charts"})}const Ot=o.memo(zt);var Ft=n(66205),Pt=n(7452);function It(e){var t=e.className,n=(0,p.d4)(P.OR),r=(0,p.d4)(Ft.Nr);return(0,C.jsx)(m.A,{children:r?(0,C.jsx)(Pt.fw,{path:n,className:t}):(0,C.jsx)(St.R,{className:t,warning:"The cluster is not ready to work with bundle's ACL"})})}var Dt=n(53775),Ut=n(28407),qt=n(5458),Mt=n.n(qt),Ht=n(16737),Vt=n.n(Ht),Wt=n(95976),Qt=n(16770),Kt=(0,l.A)("bundle-meta-resource-progress");function Yt(e,t){var n=t.data,a=t.limit,o=t.resourceType,l=t.postfix,s=function(e){var t=e.data,n=e.limit,r=e.resourceType,a=e.postfix,o={stack:[]},l=i()(t,(function(e,t){return e+Number(t)}),0),s=null!=n?n:l,c="".concat(it.A.format[r](l)," ").concat(a).trim(),u=[];ot()(t,(function(e,t){var n=it.A.format[r](e),l=(0,Qt.H)(o.stack.length);u.push({key:t,label:(0,C.jsxs)("span",{children:[(0,C.jsx)(Wt.c,{color:l,marginRight:!0}),it.A.format.Readable(t)]}),value:"".concat(n," ").concat(a)});var i=Number(e)/s*100;o.stack.push({color:l,value:i})}));var d=(0,C.jsx)(Me.Ay,{items:u});return{props:o,text:c,commonTooltip:d}}({data:n,limit:a,resourceType:o,postfix:void 0===l?"":l}),c=s.props,u=s.text,d=s.commonTooltip;return{key:e,value:(0,C.jsx)("div",{className:Kt(),children:(0,C.jsx)(ie.m,{placement:"bottom",content:d,children:(0,C.jsx)(Re.k,(0,r.A)((0,r.A)({className:Kt("progress")},c),{},{text:u}))})})}}var Xt=(0,l.A)("bundle-configuration-meta"),Gt=["allocating_rpc_proxy_count","allocating_tablet_node_count","deallocating_rpc_proxy_count","deallocating_tablet_node_count","removing_cell_count"];function $t(){var e=(0,p.wA)(),t=(0,p.d4)(P.EA)||{},n=t.bundle,r=t.enable_bundle_controller,a=o.useCallback((function(){n&&e(mt(n))}),[e,n]);(0,Be.Tt)(a);var l=o.useRef(null),s=o.useCallback((0,Ut.A)((0,Dt.A)().mark((function e(){var t,o,s,c,u,d,m,h;return(0,Dt.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&r){e.next=2;break}return e.abrupt("return");case 2:return t=[{command:"get",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles/".concat(n,"/alerts")}}].concat((0,b.A)(L()(Gt,(function(e){return{command:"get",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles/".concat(n,"/").concat(e)}}})))),e.next=5,(0,U.fI)(M.Qq.executeBatch(M.Vu.tabletBundleControllerState,{requests:t}),{toasterName:"active-bundle-controller-status",skipSuccessToast:!0,errorContent:'Cannot load bundle controller details for "'.concat(n,'".')}).catch((function(){return[]}));case 5:if(o=e.sent,s=(0,T.A)(o),c=s[0],u=(void 0===c?{output:[]}:c).output,d=s.slice(1),m=i()(d,(function(e,t){var n=t.output;return e+(null!=n?n:0)}),0),h=tn(u,m),null!==l.current){e.next=16;break}return l.current=h,e.abrupt("return");case 16:l.current!==h&&(l.current=h,a());case 17:case"end":return e.stop()}}),e)}))),[a,n,r]);return(0,Be.Tt)(s,{timeout:3e3}),null}function Jt(){var e=((0,p.d4)(P.EA)||{}).bundle_controller_target_config,t=(0,p.d4)(P.x0);if(!e||!t)return null;var n=[];if(t){var r=t.resource_quota,a=t.resource_allocated,o=r.memory,l=r.vcpu,s=a.memory,c=a.vcpu;n.push(function(e){var t,n,r=e.alerts,a=function(e){var t=e.alerts,n=Mt()(Vt()(e,Gt));return{state:tn(t,i()(n,(function(e,t){var n=(0,E.A)(t,2);return n[0],e+n[1]}),0)),detailsEntries:n}}(e),o=a.state,l=a.detailsEntries;return"good"===o?{key:"State",value:(0,C.jsx)(ce.X,{className:Xt("health",{value:o}),value:o})}:"changing"===o?{key:"State",value:(0,C.jsxs)(ie.m,{content:(t=l,n=t.map((function(e){var t=(0,E.A)(e,2),n=t[0],r=t[1];return"".concat(n," - ").concat(r)})),(0,C.jsx)("ul",{className:Xt("tooltip-list"),children:n.map((function(e,t){return(0,C.jsx)("li",{className:Xt("tooltip-item"),children:e},t)}))})),placement:"bottom",className:Xt("state-with-icon"),children:[(0,C.jsx)(ce.X,{className:Xt("health",{value:o}),value:o})," ",(0,C.jsx)(oe.A,{awesome:"question-circle"})]})}:{key:"State",value:(0,C.jsxs)(ie.m,{content:nn(r),placement:"bottom",className:Xt("state-with-icon"),children:[(0,C.jsx)(ce.X,{className:Xt("health",{value:o}),value:o})," ",(0,C.jsx)(oe.A,{awesome:"exclamation-triangle"})]})}}(t),Zt("Memory allocated/limit",s,o,"Bytes"),Zt("vCPU allocated/limit",c,l,"vCores"))}if(void 0!==e.rpc_proxy_count){var u=e.rpc_proxy_count,d=e.rpc_proxy_resource_guarantee,m=d.memory,h=d.vcpu;n.push(en("RPC proxies",u,m,h))}if(void 0!==e.tablet_node_count){var b=e.tablet_node_count,v=e.tablet_node_resource_guarantee,_=v.memory,f=v.vcpu;n.push(en("Tablet nodes",b,_,f))}if(e.memory_limits){var g=((null==e?void 0:e.tablet_node_resource_guarantee)||{}).memory;n.push(Yt("Memory allocation",{data:e.memory_limits,resourceType:"Bytes",limit:g}))}return e.cpu_limits&&n.push(Yt("vCPU allocation",{data:e.cpu_limits,resourceType:"Number",postfix:"threads"})),(0,C.jsx)(Me.Ay,{className:Xt(),subTitles:["Bundle configuration"],items:[n]})}function Zt(e,t,n,r){var a=it.A.format[r](n),o=it.A.format[r](t),l=it.A.format.Number(t/n*100||0);return{key:e,value:(0,C.jsxs)("span",{children:[(0,Ce.G1)(o,a),(0,C.jsxs)("span",{className:Xt("percentage"),children:[l,"%"]})]})}}function en(e,t,n,r){var a=it.A.format.Bytes(n),o=it.A.format.vCores(r);return{key:e,value:t?"".concat(t," x (").concat(a,", ").concat(o,")"):0}}function tn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null!=e&&e.length||0!==t?(null==e||!e.length)&&t>0?"changing":"failed":"good"}function nn(e){return(0,C.jsx)("ol",{className:Xt("tooltip-list",{alerts:!0}),children:e.map((function(e){return(0,C.jsxs)("li",{className:Xt("tooltip-item"),children:[e.id," - ",e.description]},e.id)}))})}var rn=(0,l.A)("bundle-meta-table");function an(){return(0,C.jsxs)("div",{className:rn("container"),children:[(0,C.jsx)(Ke,{}),(0,C.jsx)(Jt,{}),(0,C.jsx)($t,{})]})}var on=n(64772),ln=n(72902),sn=n(4617),cn=(0,l.A)("cells-bundle-controller"),un=[{name:"Address",render:function(e){var t=e.row,n=t.url,r=t.address;return(0,C.jsxs)("span",{children:[(0,C.jsx)(se.A,{className:cn("address-host"),url:n,routed:!0,children:r}),r&&(0,C.jsx)(x.A,{text:r,view:"flat",inlineMargins:!0,visibleOnRowHover:!0})]})},sortable:!1},{name:"Type",render:function(e){var t,n=(null===(t=e.row.data)||void 0===t?void 0:t.resource)||{},r=n.memory,a=n.vcpu,o=on.A.Bytes(r),l=on.A.vCores(a);return(0,C.jsxs)("div",{children:[o,", ",l]})},sortable:!1,width:200},{name:"tablet_static_memory",header:"Tablet static memory",render:function(e){var t,n=e.row.tablet_static_memory;if(!n)return on.A.NO_VALUE;var r=n.used,a=n.limit,o=(0,Ce.G1)(on.A.Bytes(r),on.A.Bytes(a)),l=null!==(t=(0,sn.jP)(r,a))&&void 0!==t?t:0;return(0,C.jsx)(Re.k,{value:l,theme:(0,sn.F0)(l),text:o})},sortable:!1,width:200,align:"center"},{name:"Allocation request",render:function(e){var t=e.row.hulkRequestPath;if(!t)return on.A.NO_VALUE;var n=(0,Ce.bx)(t,"/").suffix;return(0,C.jsxs)("span",{className:cn("alloc-request"),children:[(0,C.jsx)(ne.A,{className:cn("alloc-request-attrs"),title:n,exactPath:t}),(0,C.jsx)(se.A,{className:cn("alloc-request-url"),url:(0,ln.L$)({path:t}),children:n})]})},width:300,align:"center",sortable:!1},{name:"Allocation state",render:function(e){var t=e.row.allocationState,n="IN_PROGRESS"===t?"Please note that allocating new instances on MapReduce clusters can take several hours.":void 0;return t?(0,C.jsxs)(ie.m,{content:n,useFlex:!0,children:[(0,C.jsx)(le.A,{text:on.A.ReadableField(t.toLocaleLowerCase())}),Boolean(n)&&(0,C.jsx)(oe.A,{awesome:"question-circle",color:"secondary"})]}):on.A.NO_VALUE},sortable:!1,align:"center",width:200},{name:"",render:function(e){var t=e.row;return(0,C.jsxs)(o.Fragment,{children:[dn(t),mn(t)]})},width:80,align:"center"}];function dn(e){var t=e.deployUrl;return t?(0,C.jsx)(ie.m,{className:cn("link-icon"),content:"Deploy",placement:["top-end","bottom-end"],children:(0,C.jsx)(qe.A,{url:t,hideIcon:!0,children:(0,C.jsx)(oe.A,{awesome:"rocket",face:"solid"})})}):null}function mn(e){var t=e.nannyUrl;return t?(0,C.jsx)(ie.m,{className:cn("link-icon"),content:"Nanny",placement:["top-end","bottom-end"],children:(0,C.jsx)(qe.A,{url:t,hideIcon:!0,children:(0,C.jsx)(oe.A,{awesome:"cloud",face:"solid"})})}):null}var hn={displayIndices:!1,stickyHead:te.Ay.MOVING,stickyTop:h.kB,syncHeadOnResize:!0,dynamicRender:!0};function pn(e){var t=e.items,n=e.hideColumns,r=o.useState(""),a=(0,E.A)(r,2),l=a[0],s=a[1],i=o.useMemo((function(){return l?A()(t,(function(e){var t=e.address;return-1!==(null==t?void 0:t.indexOf(l))})):t}),[t,l]),c=function(e){return o.useMemo((function(){if(null==e||!e.length)return un;var t=new Set(e);return un.filter((function(e){return!t.has(e.name)}))}),[e])}(n),u=(0,C.jsx)(w.M,{itemsToWrap:[{name:"filter",node:(0,C.jsx)(N.A,{hasClear:!0,size:"m",type:"text",value:l,placeholder:"Enter address...",onChange:s,autofocus:!1,debounce:400,skipBlurByEnter:!0})}]});return(0,C.jsx)("div",{className:cn(),children:(0,C.jsx)(h.Ay,{hideToolbarShadow:!0,toolbar:u,content:(0,C.jsx)(ae.Ay,{useThemeYT:!0,columns:c,data:i,settings:hn,emptyDataMessage:"No items to show"})})})}var bn=function(){var e=(0,p.d4)(P.Hw);return(0,C.jsx)(m.A,{children:(0,C.jsx)(pn,{items:e})})},vn=function(){var e=(0,p.d4)(P.hz);return(0,C.jsx)(m.A,{children:(0,C.jsx)(pn,{items:e,hideColumns:["tablet_static_memory"]})})},_n=n(96843),fn=n.n(_n),gn=n(70909),yn=n(79240),An=n(20361),xn=n(79366),Nn=n(14145),wn=n(70353),jn=n(81214),Cn=n.n(jn),Bn={keys:{resources:["rpc_proxy_count","rpc_proxy_resource_guarantee","tablet_node_count","tablet_node_resource_guarantee"],memory_limits:["reserved","tablet_static","tablet_dynamic","compressed_block_cache","uncompressed_block_cache","versioned_chunk_meta","lookup_row_cache","key_filter_block_cache","query"],cpu_limits:["lookup_thread_pool_size","query_thread_pool_size","write_thread_pool_size"]},defaults:{memory_limits:{memory_reset:!1,tablet_static:0,tablet_dynamic:0,compressed_block_cache:0,uncompressed_block_cache:0,versioned_chunk_meta:0,lookup_row_cache:0,key_filter_block_cache:0,query:0},cpu_limits:{threadPool_reset:!1,lookup_thread_pool_size:0,query_thread_pool_size:0,write_thread_pool_size:0}}},kn=function(e,t){return{usage:He.A.getValue(e,"/@resource_usage/".concat(t)),limit:He.A.getValue(e,"/@resource_limits/".concat(t))}},Tn=function(e,t){var n=He.A.getValue(e,"/@abc/slug"),r=He.A.getValue(e,"/@options/changelog_account"),a=He.A.getValue(e,"/@options/snapshot_account"),o=kn(e,"tablet_count").limit,l=kn(e,"tablet_static_memory").limit;if(!t)return{general:{abc:{slug:n},changelog_account:r,snapshot_account:a},resources:{tablet_count:o||0,tablet_static_memory:l||0}};var s=t.rpc_proxy_count,i=t.tablet_node_count,c=t.cpu_limits,u=t.memory_limits;return{general:{abc:{slug:n},changelog_account:r,snapshot_account:a},resources:{info:"",tablet_count:o||0,rpc_proxy_count:s,rpc_proxy_resource_guarantee:t.rpc_proxy_resource_guarantee||void 0,tablet_node_count:i,tablet_node_resource_guarantee:t.tablet_node_resource_guarantee||void 0},memory_limits:{memory_reset:!1,reserved:(null==u?void 0:u.reserved)||0,tablet_static:(null==u?void 0:u.tablet_static)||0,tablet_dynamic:(null==u?void 0:u.tablet_dynamic)||0,compressed_block_cache:(null==u?void 0:u.compressed_block_cache)||0,uncompressed_block_cache:(null==u?void 0:u.uncompressed_block_cache)||0,versioned_chunk_meta:(null==u?void 0:u.versioned_chunk_meta)||0,lookup_row_cache:(null==u?void 0:u.lookup_row_cache)||0,key_filter_block_cache:(null==u?void 0:u.key_filter_block_cache)||0,query:(null==u?void 0:u.query)||0},cpu_limits:{threadPool_reset:!1,lookup_thread_pool_size:(null==c?void 0:c.lookup_thread_pool_size)||0,query_thread_pool_size:(null==c?void 0:c.query_thread_pool_size)||0,write_thread_pool_size:(null==c?void 0:c.write_thread_pool_size)||0}}},En=function(e){return Object.entries(e).map((function(e){var t=(0,E.A)(e,2),n=t[0],a=t[1],o=a.resource_guarantee,l=o.net,s=o.net_bytes,i=o.vcpu,c=o.memory;return{id:n,type:n,memory:it.A.format.Bytes(c),net:it.A.format.BytesPerSecond(s||l/8),vcpu:it.A.format.vCores(i),initialData:(0,r.A)((0,r.A)({},a.resource_guarantee),{},{type:n})}}))},Sn=function(e,t,n){var r=it.A.format[e](t).split(" "),a=(0,E.A)(r,2),o=[{title:"Total",value:a[0],postfix:a[1]}];if(void 0!==n){var l=t-n,s=it.A.format[e](l).split(" "),i=(0,E.A)(s,2),c=i[0],u=i[1];o.push({title:"Free",value:c===it.A.format.NO_VALUE?"0":c,postfix:u,type:l>=0?"positive":"negative"})}return o};function Ln(e){var t=e.id,n=e.slug;return t&&n?{id:t,slug:n}:void 0}var Rn=function(e){var t={},n=e.getState(),r=n.dirtyFields,a=n.values;function o(e,n,o){if(r[n]){var l=Cn()(a,n);t[e]="function"==typeof o?o(l):l}}return o("@abc","general.abc",Ln),o("@options/changelog_account","general.changelog_account"),o("@options/snapshot_account","general.snapshot_account"),o("@resource_limits/tablet_count","resources.tablet_count"),o("@resource_limits/tablet_static_memory","resources.tablet_static_memory"),o("@bundle_controller_target_config/rpc_proxy_count","resources.rpc_proxy_count"),o("@bundle_controller_target_config/tablet_node_count","resources.tablet_node_count"),o("@bundle_controller_target_config/rpc_proxy_resource_guarantee","resources.rpc_proxy_resource_guarantee"),o("@bundle_controller_target_config/tablet_node_resource_guarantee","resources.tablet_node_resource_guarantee"),o("@bundle_controller_target_config/memory_limits/reserved","memory_limits.reserved"),o("@bundle_controller_target_config/memory_limits/tablet_static","memory_limits.tablet_static"),o("@bundle_controller_target_config/memory_limits/tablet_dynamic","memory_limits.tablet_dynamic"),o("@bundle_controller_target_config/memory_limits/compressed_block_cache","memory_limits.compressed_block_cache"),o("@bundle_controller_target_config/memory_limits/uncompressed_block_cache","memory_limits.uncompressed_block_cache"),o("@bundle_controller_target_config/memory_limits/versioned_chunk_meta","memory_limits.versioned_chunk_meta"),o("@bundle_controller_target_config/memory_limits/lookup_row_cache","memory_limits.lookup_row_cache"),o("@bundle_controller_target_config/memory_limits/key_filter_block_cache","memory_limits.key_filter_block_cache"),o("@bundle_controller_target_config/memory_limits/query","memory_limits.query"),o("@bundle_controller_target_config/cpu_limits/lookup_thread_pool_size","cpu_limits.lookup_thread_pool_size"),o("@bundle_controller_target_config/cpu_limits/query_thread_pool_size","cpu_limits.query_thread_pool_size"),o("@bundle_controller_target_config/cpu_limits/write_thread_pool_size","cpu_limits.write_thread_pool_size"),t},zn=function(e){var t,n=Number(e);return Number.isFinite(n)||(t="Incorrect value"),n<0&&(t="Must be greater than or equal to zero"),t},On=function(e){var t=e.length;return function(e){var n,r=Number(e);return Number.isFinite(r)?r<0?n="Must be greater than or equal to zero":t>0&&r%t!=0&&(n="Must be divisible by ".concat(t)):n="Incorrect value",n}};function Fn(e,t,n){var r,a={},o=(0,wn.A)(Bn.keys[n]);try{for(o.s();!(r=o.n()).done;){var l,s=r.value;a[s]=null!==(l=e[s])&&void 0!==l?l:t[s]}}catch(e){o.e(e)}finally{o.f()}return a}var Pn=n(29081),In=n(16455);function Dn(e,t){var n=e.ge,r=e.le,a=e.gt,o=e.lt,l=function(e,t){return Number.isFinite(e)||!t?e:null===e||""===e?NaN:Number(e)}(t,e.allowParse);return void 0!==l&&Number.isFinite(l)?void 0===n||l>=n?void 0===r||l<=r?void 0===a||l>a?void 0===o||l<o?void 0:"The value must be < ".concat(o):"The value must be > ".concat(a):"The value must be ≤ ".concat(r):"The value must be ≥ ".concat(n):"Incorrect value"}var Un=(0,l.A)("bundle-editor");function qn(){var e,t=(0,p.d4)(Nn.j),n=t.visibleEditor,a=t.bundleName,o=t.bundleData,l=t.data,s=t.bundleControllerData,i=(0,p.d4)(q.jU),c=(0,p.d4)(In.hM),d=(0,p.d4)(P._t).defaultConfig,m=null==o?void 0:o.bundle_controller_target_config,h=(null==o?void 0:o.enable_bundle_controller)||!1,v=kn(l,"tablet_count").usage,_=kn(l,"tablet_static_memory").usage,f=(0,p.d4)(P.nX).get(null!=a?a:""),g=(0,p.d4)(xn.dU),y=h?m?Tn(l,m):{}:Tn(l),A=function(){if(!d)return[[],[],[]];var e=d.rpc_proxy_sizes,t=d.tablet_node_sizes,n=d.data_centers;return[En(e),En(t),n?(0,b.A)(Object.values(n)):[]]}(),x=(0,E.A)(A,3),N=x[0],w=x[1],j=x[2],B={name:"general",title:"General",type:"tab-vertical",size:"s",fields:[].concat((0,b.A)((0,Ve.Ve)()?[{name:"abc",type:"abc-control",caption:"ABC Service",extras:{placeholder:"Select ABC service...",disabled:!g}}]:[]),[{name:"changelog_account",type:"accounts-suggest-with-loading",caption:"Changelog account",extras:{allowRootAccount:!0,disabled:!g}},{name:"snapshot_account",type:"accounts-suggest-with-loading",caption:"Snapshot account",extras:{allowRootAccount:!0,disabled:!g}}])},k={name:"resources",title:"Resources",type:"tab-vertical",size:"s",fields:[{name:"info",type:"block",fullWidth:!0,touched:!0,extras:{children:(0,C.jsxs)(gn.R,{className:Un("info"),children:[Ve.Ay.renderTableCellBundleEditorNotice({bundleData:o,clusterUiConfig:i}),(0,C.jsx)(yn.h,{className:Un("params"),params:[{title:"Memory",value:it.A.format.Bytes((null==s?void 0:s.resource_quota.memory)||"0")},{title:"vCPU",value:it.A.format.vCores((null==s?void 0:s.resource_quota.vcpu)||"0")},{title:"Tablet count",value:it.A.format.Number(null===(e=y.resources)||void 0===e?void 0:e.tablet_count)}]})]})}}].concat((0,b.A)(f?[{name:"tablet_count",type:"bundle-input",caption:"Tablet count",extras:{format:"Number",withoutDetailedBar:!0,progress:{usage:v}},validator:zn}]:[]),[{section:"RPC proxy"},{type:"bundle-input",name:"rpc_proxy_count",caption:"RPC proxy count",extras:{format:"Number",withoutDetailedBar:!0,hasClear:!0},tooltip:(0,Pn.fs)((0,U.f2)(Ve.Ay.docsUrls["dynamic-tables:cross-dc"],"Help")),validator:On(j)},{type:"bundle-table-field",name:"rpc_proxy_resource_guarantee",caption:"Instance configuration",fullWidth:!0,extras:{data:N}},{section:"Tablet node"},{type:"bundle-input",name:"tablet_node_count",caption:"Tablet node count",extras:{format:"Number",withoutDetailedBar:!0,hasClear:!0},tooltip:(0,Pn.fs)((0,U.f2)(Ve.Ay.docsUrls["dynamic-tables:cross-dc"],"Help")),validator:On(j)},{type:"bundle-table-field",name:"tablet_node_resource_guarantee",caption:"Instance configuration",fullWidth:!0,extras:function(e,t){var n=t.form;return{data:w,onRadioClick:function(t){var a,o=t.type||"",l=(null==d?void 0:d.tablet_node_sizes[o].default_config.memory_limits)||{},s=(null==d?void 0:d.tablet_node_sizes[o].default_config.cpu_limits)||{},i=(null==d||null===(a=d.tablet_node_sizes[o].default_config.memory_limits)||void 0===a?void 0:a.reserved)||void 0,c=Fn(e.memory_limits,l,"memory_limits"),u=Fn(e.cpu_limits,s,"cpu_limits");c.reserved=i,n.change("memory_limits",(0,r.A)((0,r.A)({},Bn.defaults.memory_limits),c)),n.change("cpu_limits",(0,r.A)((0,r.A)({},Bn.defaults.cpu_limits),u))}}}}])},T={name:"resources",title:"Resources",type:"tab-vertical",size:"s",fields:[{name:"tablet_count",type:"bundle-input",caption:"Tablet count",extras:{format:"Number",withoutDetailedBar:!0,progress:{usage:v}},validator:zn},{name:"tablet_static_memory",type:"bundle-input",caption:"Tablet static memory",extras:{format:"Bytes",progress:{usage:_}},validator:zn,tooltip:(0,C.jsx)("span",{children:"Tablet static memory limit is based on hardware resources. Do not increase it unless you fully understand what you are doing. In case of emergency consider adding new tablet cells to the bundle, consulting with Components/Nodes page and increasing the limit only when new nodes are added to the bundle."})}]},S={name:"memory_limits",title:"Memory",type:"tab-vertical",size:"s",visibilityCondition:{when:"resources.tablet_node_resource_guarantee",isActive:function(e){return void 0!==e}},fields:[{name:"memory_reset",type:"bundle-title",caption:"Memory",touched:!0,extras:function(e,t){var n,a=t.form,o=null===(n=e.resources)||void 0===n?void 0:n.tablet_node_resource_guarantee,l=function(){if(o&&o.type&&d){var e=o.type,t=d.tablet_node_sizes[e].default_config.memory_limits;a.change("memory_limits",(0,r.A)((0,r.A)({},Bn.defaults.memory_limits),t))}};if(!o)return{params:[],onReset:l};var s=o.memory,i=Bn.keys.memory_limits.reduce((function(t,n){var r,a=null==e||null===(r=e.memory_limits)||void 0===r?void 0:r[n];return"number"!=typeof a||isNaN(a)?t:t+a}),0);return{params:Sn("Bytes",s,i),onReset:l}}},{name:"reserved",type:"bundle-input",caption:"Reserved",extras:{format:"Bytes",disabled:!0},tooltip:(0,Pn.fs)((0,U.f2)(Ve.Ay.docsUrls["bundle-controller:reserved-memory"],"Help"))},{name:"tablet_static",type:"bundle-input",caption:"Tablet static",extras:{format:"Bytes",hasClear:!0},validator:zn},{name:"tablet_dynamic",type:"bundle-input",caption:"Tablet dynamic",extras:{format:"Bytes",hasClear:!0},validator:zn},{name:"compressed_block_cache",type:"bundle-input",caption:"Compressed block cache",extras:{format:"Bytes",hasClear:!0},validator:zn},{name:"uncompressed_block_cache",type:"bundle-input",caption:"Uncompressed block cache",extras:{format:"Bytes",hasClear:!0},validator:zn},{name:"versioned_chunk_meta",type:"bundle-input",caption:"Versioned chunk meta",extras:{format:"Bytes",hasClear:!0},validator:zn},{name:"lookup_row_cache",type:"bundle-input",caption:"Lookup row cache",extras:{format:"Bytes",hasClear:!0},validator:zn},{name:"key_filter_block_cache",type:"bundle-input",caption:"Key filter block cache",extras:{format:"Bytes",hasClear:!0},validator:zn}]};c&&S.fields.push({name:"query",type:"bundle-input",caption:"Query memory limit",extras:{format:"Bytes",hasClear:!0},validator:zn});var L={name:"cpu_limits",title:"Thread pools",type:"tab-vertical",size:"s",visibilityCondition:{when:"resources.tablet_node_resource_guarantee",isActive:function(e){return void 0!==e}},fields:[{name:"threadPool_reset",type:"bundle-title",caption:"vCPU",extras:function(e,t){var n,a=t.form,o=null===(n=e.resources)||void 0===n?void 0:n.tablet_node_resource_guarantee;if(!o||!o.type||!d)return{params:[],onReset:function(){}};var l=o.vcpu;return{params:Sn("vCores",l),onReset:function(){var e=o.type;if(e){var t=d.tablet_node_sizes[e].default_config.cpu_limits;a.change("cpu_limits",(0,r.A)((0,r.A)({},Bn.defaults.cpu_limits),t))}}}}},{name:"lookup_thread_pool_size",type:"bundle-input",caption:"Lookup thread pool size",extras:{postfix:"threads",format:"Number",hasClear:!0},validator:Dn.bind(null,{gt:0})},{name:"query_thread_pool_size",type:"bundle-input",caption:"Query thread pool size",extras:{postfix:"threads",format:"Number",hasClear:!0},validator:Dn.bind(null,{gt:0})},{name:"write_thread_pool_size",type:"bundle-input",caption:"Tablet cells per node",warning:"Changing tablet cell count is discouraged. Do not modify this parameter unless you understand what you are doing",extras:{postfix:"threads",format:"Number",hasClear:!0},validator:Dn.bind(null,{gt:0})}]},R=[B];h?R.push(k,S,L):R.push(T);var z=(0,p.wA)(),O=function(){var e=(0,Ut.A)((0,Dt.A)().mark((function e(t){var n;return(0,Dt.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a){e.next=2;break}return e.abrupt("return",{});case 2:return n=Rn(t),e.prev=3,e.next=6,z(pt({bundleName:a,data:n}));case 6:return e.abrupt("return",void 0);case 9:return e.prev=9,e.t0=e.catch(3),e.abrupt("return",(0,An.Ln)(e.t0));case 12:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t){return e.apply(this,arguments)}}();return fn()(l)?null:(0,C.jsx)(An.yZ,{className:Un("dialog"),headerProps:{title:a},size:"l",initialValues:y,visible:n,onAdd:O,onClose:function(){z((function(e){e({type:u.Or,data:{bundleName:void 0,loaded:!0,visibleEditor:!1}})}))},fields:R,validate:Mn.bind(null,null==s?void 0:s.resource_quota)})}function Mn(e,t){var n,r,a,o,l,s,i,c={resources:{info:void 0},memory_limits:{memory_reset:void 0}},u=t.resources,d=Object.values(t.memory_limits||{}).reduce((function(e,t){return"number"!=typeof t?e:e+t}),0),m=u.tablet_node_resource_guarantee;c.memory_limits.memory_reset=d>(null!==(n=null==m?void 0:m.memory)&&void 0!==n?n:0)?"The sum of the memory limits exceeds the allowed values":void 0;var h=u.rpc_proxy_count,p=void 0===h?0:h,b=u.tablet_node_count,v=void 0===b?0:b,_=(null!==(r=null==m?void 0:m.vcpu)&&void 0!==r?r:0)*v+(null!==(a=null===(o=u.rpc_proxy_resource_guarantee)||void 0===o?void 0:o.vcpu)&&void 0!==a?a:0)*p,f=[];_>(null==e?void 0:e.vcpu)&&f.push("".concat(it.A.format.Number(_/1e3)," cpu required"));var g=(null!==(l=null==m?void 0:m.memory)&&void 0!==l?l:0)*v+(null!==(s=null===(i=u.rpc_proxy_resource_guarantee)||void 0===i?void 0:i.memory)&&void 0!==s?s:0)*p;return g>(null==e?void 0:e.memory)&&f.push("".concat(it.A.format.Bytes(g)," memory requried")),c.resources.info=f.length?f.join(", "):void 0,c}var Hn=n(26264);function Vn(e){return function(t){return t({type:u.cP}),t({type:u.LJ,data:{bundleName:e,visibleEditor:!0}}),M.Qq.get(M.Vu.chaosCellBundlesEditData,{path:"//sys/chaos_cell_bundles/".concat(e),attributes:["resource_usage","resource_limits","options","abc"]}).then((function(e){t({type:u.sP,data:{data:e}})})).catch((function(e){t({type:u.VA,data:e})}))}}var Wn=["bundle","health","tabletCells","changelog_account","actions"],Qn={setBundlesSortState:function(e){return{type:u.lr,data:{bundlesSort:e}}},setActiveBundle:Ee,showCellBundleEditor:Vn};const Kn=(0,p.Ng)((function(e){return{loading:(0,ke.l9)(e),loaded:(0,ke.um)(e),data:(0,ke.v8)(e),total:(0,ke.sD)(e),sortState:(0,ke.dz)(e),cluster:(0,q.dB)(e),allowPerBundleAccounting:!1,mode:(0,ke.tC)(e),pathPrefix:"//sys/chaos_cell_bundles/",columns:Wn,activeBundleLink:O.pu,writeableByName:{get:function(){return!0}}}}),Qn)(rt);var Yn=["default"],Xn={setTabletsBundlesNameFilter:function(e){return{type:u.lr,data:{bundlesNameFilter:e}}},setTabletsBundlesAccountFilter:function(e){return{type:u.lr,data:{bundlesAccountFilter:e}}},setTabletsBundlesTagNodeFilter:function(e){return{type:u.lr,data:{bundlesTagNodeFilter:e}}},setTabletsFirstBundleAsActive:function(){return function(e,t){var n=t(),r=(0,ke.v8)(n),a=(0,E.A)(r,1)[0];if(a){var o=(0,q.dB)(n);e(Ee(a.bundle)),(0,H.Q)().push((0,O.d7)(o,a.bundle))}}},setTabletsPartial:Te};const Gn=(0,p.Ng)((function(e){return{accountFilter:(0,ke.px)(e),bundlesTableMode:(0,ke.tC)(e),nameFilter:(0,ke.p1)(e),tagNodeFilter:(0,ke.QJ)(e),modes:Yn}}),Xn)(Ct);function $n(){var e=(0,p.wA)(),t=o.useCallback((function(t){e(function(e){return function(t,n){var r=(0,ke.DO)(e,(0,ke.UI)(n())),a=(0,ke.U5)(r);D()(a||"")}}(t))}),[e]);return o.useEffect((function(){e(Ee(""))}),[e]),(0,C.jsx)(m.A,{children:(0,C.jsx)(h.Ay,{hideToolbarShadow:!0,toolbar:(0,C.jsx)(Gn,{}),content:(0,C.jsx)(Kn,{copyHostListToClipboard:t})})})}var Jn=n(39055),Zn=n(1852),er=n(63936),tr=n(87871),nr=n(44187),rr=(0,l.A)("chaos-editor"),ar=[{value:"general",text:"General",show:!0},{value:"resources",text:"Resources",show:!0}];function or(e){var t=e.bundleEditorData,n=e.resourceType,r=e.setBundleQuota,a=t.data,l=He.A.getValue(a,"/@resource_limits/".concat(n)),s=He.A.getValue(a,"/@resource_usage/".concat(n)),i=o.useState(!1),c=(0,E.A)(i,2),u=c[0],d=c[1],m=o.useCallback((function(){d(!u)}),[u,d]),h=(0,U.z)(s,l,lr[n]),p=h.value,b=void 0===p?0:p,v=h.theme,_=h.text;return(0,C.jsxs)("div",{className:rr("item"),children:[(0,C.jsxs)("div",{className:rr("name-usage"),children:[(0,C.jsx)("div",{className:rr("name"),children:(0,C.jsx)(er.yN,{children:it.A.format.Readable(n)})}),(0,C.jsx)(Re.k,{className:rr("progress"),value:b,theme:v,text:_}),(0,C.jsx)(Ue.A,{view:"flat-secondary",onClick:m,children:(0,C.jsx)(oe.A,{awesome:"pencil"})})]}),u&&(0,C.jsx)(sr,{bundleEditorData:t,resourceType:n,setBundleQuota:r,toggleVisibility:m})]})}var lr={tablet_count:"Number",tablet_static_memory:"Bytes"};function sr(e){var t=e.bundleEditorData,n=e.resourceType,r=e.setBundleQuota,a=e.toggleVisibility,l=t.bundleName,s=void 0===l?"":l,i=t.data,c=He.A.getValue(i,"/@resource_limits/".concat(n)),u=He.A.getValue(i,"/@resource_usage/".concat(n)),d=(0,p.wA)(),m=o.useCallback((function(e){d(r({bundleName:s,resourceType:n,limit:e}))}),[n]);return(0,C.jsx)(Zn.A,{format:lr[n],limit:c,onHide:a,onSave:m,getInfoByName:function(){return{limit:c,total:u}},currentAccount:s,parentOfCurrentAccount:"",max:1/0})}function ir(e){var t=e.bundleEditorData,n=e.setBunndleAttributes;return(0,C.jsxs)(o.Fragment,{children:[(0,C.jsx)(cr,{bundleEditorData:t,setBunndleAttributes:n}),(0,C.jsx)(ur,{attributeName:"changelog_account",bundleEditorData:t,setBunndleAttributes:n}),(0,C.jsx)(ur,{attributeName:"snapshot_account",bundleEditorData:t,setBunndleAttributes:n})]})}function cr(e){var t=e.bundleEditorData,n=e.setBunndleAttributes,r=t.bundleName,a=t.data,l=He.A.getValue(a,"/@abc/slug"),s=(0,p.d4)(xn.dU),i=(0,p.wA)(),c=o.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,a=e.slug;if(!r)throw new Error("Name of bundle cannot be empty");i(n(r,{attributes:{abc:t&&a?{id:t,slug:a}:void 0}}))}),[]),u=Ve.Ay.renderControlAbcService({value:{slug:l},onChange:c,placeholder:"Select ABC service...",disabled:!s});return u?(0,C.jsx)(nr.o,{header:"ABC Service",children:(0,C.jsx)(C.Fragment,{children:u})}):null}function ur(e){var t=e.attributeName,n=e.bundleEditorData,r=e.setBunndleAttributes,l=n.bundleName,s=n.data,i=He.A.getValue(s,"/@options/".concat(t)),c=(0,p.d4)(xn.dU),u=(0,p.wA)(),d=o.useCallback((function(e){if(!l)throw new Error("Name of bundle cannot be empty");u(r(l,{options:(0,a.A)({},t,e)}))}),[]);return(0,C.jsx)(nr.o,{header:"".concat(ee()(t)," account"),children:(0,C.jsx)(tr.Dk,{value:i||"",onChange:d,disabled:!c,allowRootAccount:!0})})}var dr=function(e){return e.chaosCellBundleEditor},mr={hideBundleEditor:function(){return function(e){e({type:u.LJ,data:{bundleName:void 0,loaded:!0,visibleEditor:!1}})}},setBundleQuota:function(e){return function(t){var n=e.bundleName,r=e.resourceType,a=e.limit,o=it.A.format.Readable(r);return(0,U.fI)(dt().v3.set({path:"//sys/chaos_cell_bundles/".concat(n,"/@resource_limits/").concat(r)},a),{toasterName:"edit_bundle_".concat(n),successContent:"Set quota limit for ".concat(o),errorContent:"Cannot set quota limit for ".concat(o)}).then((function(){t(Vn(n))}))}},setBunndleAttributes:function(e,t){return function(n){console.log(t);var r=t.attributes,a=t.options,o="//sys/chaos_cell_bundles/".concat(e);return(0,U.fI)(M.Qq.executeBatch(M.Vu.chaosCellBundlesSetAttrs,{requests:[].concat((0,b.A)(L()(r,(function(e,t){return(0,ct.Gy)("".concat(o,"/@").concat(t),e)}))),(0,b.A)(L()(a,(function(e,t){return(0,ct.Gy)("".concat(o,"/@options/").concat(t),e)}))))}),{toasterName:"update-bundle_".concat(e),successContent:"".concat(e," successfully updated"),errorContent:"".concat(e," cannot be updated"),batchType:"v3",errorTitle:"Failed to update bundle configuration"}).then((function(){n(Vn(e))}))}}};const hr=(0,p.Ng)((function(e){return{bundleEditorData:dr(e)}}),mr)((function(e){var t=e.bundleEditorData,n=e.hideBundleEditor,r=e.setBundleQuota,a=e.setBunndleAttributes,l=t.visibleEditor,s=t.bundleName,i=t.error,u=o.useState(ar[0].value),d=(0,E.A)(u,2),m=d[0],h=d[1],b=(0,p.wA)(),v=o.useCallback((function(){b(n())}),[]);return l?(0,C.jsxs)(Jn.K,{open:!0,onClose:v,children:[(0,C.jsx)(Jn.K.Header,{caption:(0,C.jsx)(o.Fragment,{children:s})}),(0,C.jsx)(Jn.K.Divider,{}),(0,C.jsxs)(Jn.K.Body,{className:rr("body"),children:[(0,C.jsx)("div",{className:rr("body-tabs"),children:(0,C.jsx)(c.A,{items:ar,size:"m",layout:"vertical",active:m,onTabChange:h})}),(0,C.jsxs)("div",{className:rr("body-tab-content"),children:["resources"===m&&(0,C.jsxs)(o.Fragment,{children:[(0,C.jsx)(or,{bundleEditorData:t,resourceType:"tablet_count",setBundleQuota:r}),(0,C.jsx)(or,{bundleEditorData:t,resourceType:"tablet_static_memory",setBundleQuota:r}),i&&(0,C.jsx)(Se.z,{error:i})]}),"general"===m&&(0,C.jsx)(ir,{bundleEditorData:t,setBunndleAttributes:a})]})]})]}):null}));var pr={setTabletsPartial:Te};const br=(0,p.Ng)((function(e){return{activeBundle:(0,ke.JP)(e),activeBundleHosts:(0,ke.GR)(e),idFilter:(0,ke.Xj)(e),bundleFilter:(0,ke.uo)(e),hostFilter:(0,ke.yb)(e),bundles:(0,ke.zQ)(e),hosts:(0,ke.RC)(e)}}),pr)(k);var vr=["id","bundle","health","peerAddress","state","actions"],_r={setTabletsPartial:Te,setTabletsActiveBundle:Ee};const fr=(0,p.Ng)((function(e){return{cluster:(0,q.dB)(e),loading:(0,ke.l9)(e),loaded:(0,ke.um)(e),data:(0,ke.jU)(e),sortState:(0,ke.Nd)(e),columns:vr,activeBundleLink:O.pu,attributesPath:O.Dr,cellNavigationLink:O.t8}}),_r)(Ae);function gr(){return(0,C.jsx)(m.A,{children:(0,C.jsx)(h.Ay,{hideToolbarShadow:!0,toolbar:(0,C.jsx)(br,{}),content:(0,C.jsx)(fr,{})})})}var yr=n(35441),Ar=n(62250),xr=(0,n(33882).A)(o.lazy((0,Ut.A)((0,Dt.A)().mark((function e(){return(0,Dt.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([n.e(8096),n.e(2209),n.e(8972),n.e(3266),n.e(958),n.e(6680),n.e(3735),n.e(2238),n.e(1830)]).then(n.bind(n,7370));case 2:return e.t0=e.sent.TabletErrorsByBundle,e.abrupt("return",{default:e.t0});case 4:case"end":return e.stop()}}),e)}))))),Nr=n(31229),wr=(0,l.A)("tablets"),jr=o.memo(kr);function Cr(){var e,t=(0,d.W5)(),n=(0,p.d4)(q.dB),a=(0,p.d4)(P.Mm),l=(0,p.d4)(P.OR),s=((0,p.d4)(P.EA)||{}).enable_bundle_controller,c=void 0!==s&&s,m=(0,p.wA)(),h=o.useCallback((function(){Promise.all([m((function(e){e({type:u.CQ});var t=[{command:"list",parameters:(0,r.A)({path:"//sys/chaos_cells",attributes:["health","id","peers","status","tablet_cell_bundle"]},Q.v)},{command:"get",parameters:(0,r.A)({path:"//sys/chaos_cell_bundles",attributes:["health","id","options"]},Q.v)}];return M.Qq.executeBatch(M.Vu.chaosCellBundles,{requests:t}).then((function(t){var n=(0,E.A)(t,2),r=n[0].output,a=n[1].output,o=(0,U.$7)(t,"Tablet cell bundles cannot be loaded");if(o)throw o;var l=(0,O.VY)(r),s=(0,O.Th)(l,a);e({type:u.CZ,data:{cells:l,bundles:s}})})).catch((function(t){e({type:u.jo,data:t})}))})),m(Y())])}),[m]);(0,Be.Tt)(h);var b=(0,p.d4)(P.nX).get(l),v=c||b,_=function(e,t){return o.useMemo((function(){return i()(u.R_,(function(t,n){return n===u.R_.CHAOS_CELLS?t[n]={show:!1}:t[n]={show:n===u.R_.TABLET_CELLS||Boolean(e)},t}),{})}),[e,t])}(l,c),f=_[u.R_.STATISTICS];f.show=f.show&&Boolean(Ve.Ay.getStatisticsComponentForBundle());var g=_[u.R_.MONITOR],y=null!==(e=Ve.Ay.getMonitoringForBundle())&&void 0!==e?e:{},A=y.component,x=y.urlTemplate,N=y.title;g.show=g.show&&Boolean(A||x),x&&(g.external=!0,g.routed=!1,g.url=(0,yr.j)(x,{ytCluster:n,ytTabletCellBundle:l}));var w=_[u.R_.INSTANCES];w.show=w.show&&c;var j=_[u.R_.PROXIES];j.show=j.show&&c;var B=_[u.R_.TABLET_ERRORS];return B.show=B.show&&(0,Nr.FG)().allowTabletErrorsAPI,(0,C.jsxs)("div",{className:"elements-page__content",children:[(0,C.jsxs)("section",{className:wr(null,"elements-main-section"),children:[(0,C.jsx)("div",{className:wr("content"),children:(0,C.jsxs)("div",{className:wr("heading"),children:[(0,C.jsx)(Br,{allowEdit:v,activeBundle:l,cluster:n}),(0,C.jsx)("div",{className:wr("tabs"),children:(0,C.jsx)(jr,{activeBundle:l,showSettings:_,monitoringTitle:N})})]})}),a&&(0,C.jsx)(Se.z,{error:a}),(0,C.jsx)("div",{className:wr("tab-viewer"),children:(0,C.jsxs)(d.dO,{children:[w&&(0,C.jsx)(d.qh,{path:"".concat(t.path,"/").concat(u.R_.INSTANCES),component:bn}),j&&(0,C.jsx)(d.qh,{path:"".concat(t.path,"/").concat(u.R_.PROXIES),component:vn}),B.show&&(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.TABLET_ERRORS),render:function(){return(0,C.jsx)(xr,{bundle:l})}}),(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.TABLET_CELLS),component:je}),(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.CHAOS_CELL_BUNDLES,"/").concat(u.R_.CHAOS_CELLS),component:gr}),f.show&&(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.STATISTICS),component:Rt}),g.show&&A&&(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.MONITOR),render:function(){return(0,C.jsx)(Ot,{component:A})}}),(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.ACL),render:function(){return(0,C.jsx)(It,{className:wr("acl-tab")})}}),(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES),component:Et}),(0,C.jsx)(d.qh,{path:"/".concat(n,"/").concat(Hn.YW.CHAOS_CELL_BUNDLES),component:$n}),(0,C.jsx)(d.rd,{from:"/".concat(n,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/*"),to:t.path})]})})]}),(0,C.jsx)(qn,{}),(0,C.jsx)(hr,{})]})}function Br(e){var t=e.activeBundle,n=e.allowEdit,r=e.cluster,a=(0,p.wA)(),l=(0,p.d4)(q.qp),s=o.useCallback((function(){t&&a(ht(t))}),[t,a]);return(0,C.jsxs)(o.Fragment,{children:[t&&(0,C.jsx)("div",{className:"elements-heading elements-heading_size_l",children:(0,C.jsxs)("div",{className:wr("bundle-name"),children:[(0,C.jsxs)("div",{className:wr("bundle-name-left"),children:[t,(0,C.jsx)(qe.A,{className:wr("dashboard-link"),theme:"ghost",url:(0,bt.Ut)(r,t)})]}),l&&n&&(0,C.jsx)("div",{className:wr("tabs-edit-btn"),children:(0,C.jsxs)(Ue.A,{className:wr("edit-btn"),size:"m",onClick:s,children:[(0,C.jsx)(oe.A,{awesome:"pencil"}),"Edit Bundle"]})})]})}),(0,C.jsx)(an,{})]})}function kr(e){var t=e.activeBundle,n=e.showSettings,o=e.monitoringTitle,l=void 0===o?"Monitoring":o,s=(0,d.W5)(),i=s.params.cluster,m=t?(0,Ce._4)(s.url,u.R_,n,void 0,(0,a.A)({},u.R_.MONITOR,l)):function(e,t){var n=(0,Ce._4)(e,{});return n.items=[{value:Hn.YW.TABLET_CELL_BUNDLES,text:"Tablet cell bundles",show:!0,url:"/".concat(t,"/").concat(Hn.YW.TABLET_CELL_BUNDLES)},{value:u.R_.TABLET_CELLS,text:"Tablet cells",show:!0,url:"/".concat(t,"/").concat(Hn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.TABLET_CELLS)},{value:Hn.YW.CHAOS_CELL_BUNDLES,text:"Chaos cell bundles",show:!0,url:"/".concat(t,"/").concat(Hn.YW.CHAOS_CELL_BUNDLES)},{value:u.R_.CHAOS_CELLS,text:"Chaos cells",show:!0,url:"/".concat(t,"/").concat(Hn.YW.CHAOS_CELL_BUNDLES,"/").concat(u.R_.CHAOS_CELLS)}],n}(s.url,i);return(0,C.jsx)(c.A,(0,r.A)((0,r.A)({},m),{},{className:wr("tabs"),routed:!0,routedPreserveLocation:!0,exactNavLink:!0,size:Ar.jr}))}var Tr=n(49524),Er=n(86704),Sr=n(64859),Lr=(0,l.A)("tablet-cell-bundles-top-row-content");function Rr(e){var t=e.isActiveBundleInFavourites,n=e.items,r=e.activeBundle,a=e.page,l=e.setActiveBundle,s=e.toggleFavourite,i=(0,p.d4)(q.dB),c=o.useCallback((function(e){l(e.path),e.path?(0,H.Q)().push("/".concat(i,"/").concat(a,"/").concat(u.R_.TABLET_CELLS,"?activeBundle=").concat(e.path)):(0,H.Q)().push("/".concat(i,"/").concat(a))}),[i,l]),d=o.useCallback((function(){s(r)}),[s]);return(0,C.jsx)(Er.A,{className:Lr("favourites"),isActive:t,items:n,onItemClick:c,onToggle:d,toggleDisabled:!r,theme:"clear"})}function zr(e){var t=e.className,n=e.bcItems,r=e.setActiveBundle,a=(0,d.W6)(),l=o.useCallback((function(e){r(e.toString())}),[r]),s=o.useMemo((function(){return n.map((function(e){var t=e.text||e.title||"";return(0,C.jsx)(Tr.y,{href:e.href,children:t},t)}))}),[n]);return(0,C.jsx)(Tr.B,{navigate:a.push,onAction:l,className:t,showRoot:!0,children:s})}const Or=function(e){var t=e.isActiveBundleInFavourites,n=e.favourites,r=e.toggleFavourite,a=e.activeBundle,o=e.activeBundleData,l=e.bcItems,s=e.page,i=e.setActiveBundle,c=(0,p.d4)(q.jU);return(0,C.jsxs)(Sr.K,{page:s,urlParams:{activeBundle:""},children:[(0,C.jsx)(Rr,{isActiveBundleInFavourites:t,activeBundle:a,page:s,setActiveBundle:i,items:n,toggleFavourite:r}),(0,C.jsx)(zr,{className:Lr("breadcrumbs"),bcItems:l,setActiveBundle:i}),Ve.Ay.renderTopRowExtraControlsForBundle({itemClassName:Lr("extra-control"),clusterUiConfig:c,bundle:o})]})};var Fr=n(82947),Pr={setActiveBundle:G,toggleFavourite:F.BO};const Ir=(0,p.Ng)((function(e){return{activeBundle:(0,P.OR)(e),activeBundleData:(0,P.EA)(e),bcItems:(0,P.tB)(e),page:Hn.YW.TABLET_CELL_BUNDLES,favourites:(0,Fr.NF)(e),isActiveBundleInFavourites:(0,Fr.YZ)(e)}}),Pr)(Or);var Dr={setActiveBundle:Ee};const Ur=(0,p.Ng)((function(e){return{activeBundle:(0,ke.JP)(e),activeBundleData:(0,ke.vY)(e),bcItems:(0,ke.K)(e),page:Hn.YW.CHAOS_CELL_BUNDLES,favourites:(0,Fr.jO)(e),isActiveBundleInFavourites:(0,Fr.sO)(e)}}),Dr)(Or)},95976:(e,t,n)=>{n.d(t,{c:()=>l}),n(77810);var r=n(76872),a=n(64922),o=(0,r.A)("yt-color-circle");function l(e){var t=e.color,n=e.marginRight,r=void 0===n||n;return(0,a.jsx)("div",{className:o({"margin-right":r}),style:{backgroundColor:t}})}},96464:(e,t,n)=>{n.d(t,{w:()=>a});var r=n(77810);function a({ref:e,onResize:t,box:n}){r.useEffect((()=>{const r=null==e?void 0:e.current;if(!r)return;if(void 0===window.ResizeObserver)return window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)};const a=new ResizeObserver((e=>{e.length&&t()}));return a.observe(r,{box:n}),()=>{a.disconnect()}}),[e,t,n])}}}]);
2
+ //# sourceMappingURL=bundles.0ab2d6f4.chunk.js.map