@ytsaurus/ui 1.75.1 → 1.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/public/build/assets-manifest.json +75 -75
- package/dist/public/build/css/{job.c7c99207.chunk.css → job.9757ff68.chunk.css} +2 -2
- package/dist/public/build/css/job.9757ff68.chunk.css.map +1 -0
- package/dist/public/build/css/main.0efa9da5.css +10 -0
- package/dist/public/build/css/main.0efa9da5.css.map +1 -0
- package/dist/public/build/css/navigation.c199c4f2.chunk.css +2 -0
- package/dist/public/build/css/navigation.c199c4f2.chunk.css.map +1 -0
- package/dist/public/build/js/{1260.534f3f75.chunk.js → 1260.a1e22005.chunk.js} +2 -2
- package/dist/public/build/js/{1260.534f3f75.chunk.js.map → 1260.a1e22005.chunk.js.map} +1 -1
- package/dist/public/build/js/{1879.23423388.chunk.js → 1879.3975650a.chunk.js} +3 -3
- package/dist/public/build/js/{1879.23423388.chunk.js.map → 1879.3975650a.chunk.js.map} +1 -1
- package/dist/public/build/js/{1983.666923be.chunk.js → 1983.64a2e22f.chunk.js} +2 -2
- package/dist/public/build/js/{1983.666923be.chunk.js.map → 1983.64a2e22f.chunk.js.map} +1 -1
- package/dist/public/build/js/{2447.b2877275.chunk.js → 2447.eb8fde89.chunk.js} +2 -2
- package/dist/public/build/js/{2447.b2877275.chunk.js.map → 2447.eb8fde89.chunk.js.map} +1 -1
- package/dist/public/build/js/3724.3e5848f0.chunk.js +2 -0
- package/dist/public/build/js/{3724.425d01ec.chunk.js.map → 3724.3e5848f0.chunk.js.map} +1 -1
- package/dist/public/build/js/6729.39d7cf60.chunk.js +2 -0
- package/dist/public/build/js/6729.39d7cf60.chunk.js.map +1 -0
- package/dist/public/build/js/{7959.95ebd185.chunk.js → 7959.faac2ff8.chunk.js} +2 -2
- package/dist/public/build/js/{7959.95ebd185.chunk.js.map → 7959.faac2ff8.chunk.js.map} +1 -1
- package/dist/public/build/js/{8390.83f4531a.chunk.js → 8390.c3d2de6a.chunk.js} +2 -2
- package/dist/public/build/js/{8390.83f4531a.chunk.js.map → 8390.c3d2de6a.chunk.js.map} +1 -1
- package/dist/public/build/js/{8460.2d4d237e.chunk.js → 8460.fc8e2238.chunk.js} +2 -2
- package/dist/public/build/js/{8460.2d4d237e.chunk.js.map → 8460.fc8e2238.chunk.js.map} +1 -1
- package/dist/public/build/js/{8778.e18e655b.chunk.js → 8778.f3ea089f.chunk.js} +2 -2
- package/dist/public/build/js/{8778.e18e655b.chunk.js.map → 8778.f3ea089f.chunk.js.map} +1 -1
- package/dist/public/build/js/{9558.a6ea64c9.chunk.js → 9558.6a4bf9a9.chunk.js} +2 -2
- package/dist/public/build/js/{9558.a6ea64c9.chunk.js.map → 9558.6a4bf9a9.chunk.js.map} +1 -1
- package/dist/public/build/js/9569.aac48f3b.chunk.js +2 -0
- package/dist/public/build/js/9569.aac48f3b.chunk.js.map +1 -0
- package/dist/public/build/js/{accounts.2ba221c2.chunk.js → accounts.aa7ed73f.chunk.js} +2 -2
- package/dist/public/build/js/accounts.aa7ed73f.chunk.js.map +1 -0
- package/dist/public/build/js/{acl.c948c339.chunk.js → acl.4cd54663.chunk.js} +2 -2
- package/dist/public/build/js/{acl.c948c339.chunk.js.map → acl.4cd54663.chunk.js.map} +1 -1
- package/dist/public/build/js/{app-navigation.b062662b.chunk.js → app-navigation.13c65573.chunk.js} +2 -2
- package/dist/public/build/js/app-navigation.13c65573.chunk.js.map +1 -0
- package/dist/public/build/js/chyt.0ee6bfa2.chunk.js +2 -0
- package/dist/public/build/js/chyt.0ee6bfa2.chunk.js.map +1 -0
- package/dist/public/build/js/cluster-page-wrapper.bdc8607f.chunk.js +2 -0
- package/dist/public/build/js/cluster-page-wrapper.bdc8607f.chunk.js.map +1 -0
- package/dist/public/build/js/{components.bbe331cb.chunk.js → components.b39828bc.chunk.js} +2 -2
- package/dist/public/build/js/components.b39828bc.chunk.js.map +1 -0
- package/dist/public/build/js/job.ea2ba82d.chunk.js +2 -0
- package/dist/public/build/js/job.ea2ba82d.chunk.js.map +1 -0
- package/dist/public/build/js/main.6375dbc6.js +3 -0
- package/dist/public/build/js/main.6375dbc6.js.map +1 -0
- package/dist/public/build/js/manage-tokens.e1e791fc.chunk.js +2 -0
- package/dist/public/build/js/manage-tokens.e1e791fc.chunk.js.map +1 -0
- package/dist/public/build/js/{navigation-flow.eeb01518.chunk.js → navigation-flow.6d67215a.chunk.js} +2 -2
- package/dist/public/build/js/{navigation-flow.eeb01518.chunk.js.map → navigation-flow.6d67215a.chunk.js.map} +1 -1
- package/dist/public/build/js/navigation.529208de.chunk.js +2 -0
- package/dist/public/build/js/navigation.529208de.chunk.js.map +1 -0
- package/dist/public/build/js/odin.c4c4ef6f.chunk.js +2 -0
- package/dist/public/build/js/odin.c4c4ef6f.chunk.js.map +1 -0
- package/dist/public/build/js/{path-viewer.b1b3328d.chunk.js → path-viewer.c091d9f4.chunk.js} +2 -2
- package/dist/public/build/js/{path-viewer.b1b3328d.chunk.js.map → path-viewer.c091d9f4.chunk.js.map} +1 -1
- package/dist/public/build/js/{query-navigation.9964bfcf.chunk.js → query-navigation.b1574290.chunk.js} +2 -2
- package/dist/public/build/js/{query-navigation.9964bfcf.chunk.js.map → query-navigation.b1574290.chunk.js.map} +1 -1
- package/dist/public/build/js/{query-results.733b1795.chunk.js → query-results.0a05cc41.chunk.js} +2 -2
- package/dist/public/build/js/{query-results.733b1795.chunk.js.map → query-results.0a05cc41.chunk.js.map} +1 -1
- package/dist/public/build/js/query-tracker.515069f6.chunk.js +2 -0
- package/dist/public/build/js/query-tracker.515069f6.chunk.js.map +1 -0
- package/dist/public/build/js/{runtime.481a6d3a.js → runtime.09217c31.js} +2 -2
- package/dist/public/build/js/{runtime.481a6d3a.js.map → runtime.09217c31.js.map} +1 -1
- package/dist/public/build/js/{scheduling.b70d4627.chunk.js → scheduling.6448eabd.chunk.js} +2 -2
- package/dist/public/build/js/{scheduling.b70d4627.chunk.js.map → scheduling.6448eabd.chunk.js.map} +1 -1
- package/dist/public/build/js/system.1114aa96.chunk.js +2 -0
- package/dist/public/build/js/system.1114aa96.chunk.js.map +1 -0
- package/dist/public/build/js/{yt-df-dialog.9ddda260.chunk.js → yt-df-dialog.4ad719bf.chunk.js} +2 -2
- package/dist/public/build/js/yt-df-dialog.4ad719bf.chunk.js.map +1 -0
- package/dist/public/build/manifest.json +70 -70
- package/dist/shared/constants/settings-types.d.ts +1 -0
- package/package.json +3 -2
- package/dist/public/build/css/job.c7c99207.chunk.css.map +0 -1
- package/dist/public/build/css/main.2d3cbfcd.css +0 -10
- package/dist/public/build/css/main.2d3cbfcd.css.map +0 -1
- package/dist/public/build/css/navigation.0a9042b3.chunk.css +0 -2
- package/dist/public/build/css/navigation.0a9042b3.chunk.css.map +0 -1
- package/dist/public/build/js/3724.425d01ec.chunk.js +0 -2
- package/dist/public/build/js/5177.b4cec253.chunk.js +0 -2
- package/dist/public/build/js/5177.b4cec253.chunk.js.map +0 -1
- package/dist/public/build/js/6729.da9aa02f.chunk.js +0 -2
- package/dist/public/build/js/6729.da9aa02f.chunk.js.map +0 -1
- package/dist/public/build/js/accounts.2ba221c2.chunk.js.map +0 -1
- package/dist/public/build/js/app-navigation.b062662b.chunk.js.map +0 -1
- package/dist/public/build/js/chyt.7f99f87d.chunk.js +0 -2
- package/dist/public/build/js/chyt.7f99f87d.chunk.js.map +0 -1
- package/dist/public/build/js/cluster-page-wrapper.894fbacc.chunk.js +0 -2
- package/dist/public/build/js/cluster-page-wrapper.894fbacc.chunk.js.map +0 -1
- package/dist/public/build/js/components.bbe331cb.chunk.js.map +0 -1
- package/dist/public/build/js/job.4fc50056.chunk.js +0 -2
- package/dist/public/build/js/job.4fc50056.chunk.js.map +0 -1
- package/dist/public/build/js/main.7981a440.js +0 -3
- package/dist/public/build/js/main.7981a440.js.map +0 -1
- package/dist/public/build/js/manage-tokens.286a4da9.chunk.js +0 -2
- package/dist/public/build/js/manage-tokens.286a4da9.chunk.js.map +0 -1
- package/dist/public/build/js/navigation.d891266d.chunk.js +0 -2
- package/dist/public/build/js/navigation.d891266d.chunk.js.map +0 -1
- package/dist/public/build/js/odin.df1cfe56.chunk.js +0 -2
- package/dist/public/build/js/odin.df1cfe56.chunk.js.map +0 -1
- package/dist/public/build/js/query-tracker.06cc4fdc.chunk.js +0 -2
- package/dist/public/build/js/query-tracker.06cc4fdc.chunk.js.map +0 -1
- package/dist/public/build/js/system.f759d3f0.chunk.js +0 -2
- package/dist/public/build/js/system.f759d3f0.chunk.js.map +0 -1
- package/dist/public/build/js/yt-df-dialog.9ddda260.chunk.js.map +0 -1
- /package/dist/public/build/js/{1879.23423388.chunk.js.LICENSE.txt → 1879.3975650a.chunk.js.LICENSE.txt} +0 -0
- /package/dist/public/build/js/{main.7981a440.js.LICENSE.txt → main.6375dbc6.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";(self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[7959],{97536:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(40319),o=n(18801),i=(n(77810),n(2211)),a=n(60620),s=n(64922),u=["view","size"];function c(e){var t=e.view,n=void 0===t?"flat-secondary":t,c=e.size,l=void 0===c?"m":c,d=(0,o.A)(e,u);return(0,s.jsx)(i.A,(0,r.A)((0,r.A)({view:n,size:l},d),{},{children:(0,s.jsx)(a.A,{awesome:"at"})}))}},71412:(e,t,n)=>{n.d(t,{W9:()=>S,Ay:()=>_,Fl:()=>x,$x:()=>C});var r=n(40319),o=n(18801),i=n(29121),a=n(12937),s=n(10785),u=n(26718),c=n(77810),l=n(76872),d=n(65692),h=n(34380),m=n(73822),f=n(53332),v=n(26264),p=n(64922),g=["value","onChange","min","max","validator","format","defaultValue"],y=["value","error","onChange"],A=(0,l.A)("yt-number-input");function C(e,t){if(""!==e){var n=e.replace(/\s/g,"");return"Bytes"===t?(0,f.z_)(n):Number(n)}}function x(e,t,n){if(void 0===e)return"";var r="Bytes"===t?m.A.format.Bytes(e,n):m.A.format.Number(e,n);return r===m.A.format.NO_VALUE?"":r}function b(e){return void 0===e?"":e}var S=function(e){(0,s.A)(n,e);var t=(0,u.A)(n);function n(){var e;(0,i.A)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={parsedValue:NaN},e.onChange=function(t){var r=e.parseValue(t),o=n.errorFromValue(r,e.props),i=e.format(null==r?void 0:r.value);e.setState({parsedValue:null==r?void 0:r.value,parsedError:o,rawValue:t,formattedValue:i}),(0,e.props.onChange)({value:null==r?void 0:r.value,error:o})},e.onBlur=function(){e.setState({focused:!1})},e.onFocus=function(){e.setState({focused:!0})},e.onKeyDown=function(t){t.keyCode===v.DD.ENTER&&e.props.onEnterKeyDown&&e.props.onEnterKeyDown()},e}return(0,a.A)(n,[{key:"parseValue",value:function(e){return this.props.parseFn?this.props.parseFn(e):{value:C(e,this.props.format)}}},{key:"format",value:function(e){var t=this.props,n=t.format,r=t.decimalPlaces,o=t.formatFn;return o?o(e):x(e,n,{digits:r})}},{key:"getRestProps",value:function(){var e=this.props;return e.value,e.onChange,e.min,e.max,e.validator,e.format,e.defaultValue,(0,o.A)(e,g)}},{key:"renderMinMaxHint",value:function(){var e=this.props,t=e.min,n=e.max,r=e.showHint,o=e.size,i=!isNaN(t),a=!isNaN(n);return r&&(i||a)?(0,p.jsxs)("div",{className:A("hint",{size:o}),children:[i&&(0,p.jsxs)(h.m,{content:String(t),placement:"bottom",children:["min: ",(0,p.jsx)("b",{children:this.format(t)})]}),i&&(0,p.jsx)(p.Fragment,{children:" "}),a&&(0,p.jsxs)(h.m,{content:String(n),placement:"bottom",children:["max: ",(0,p.jsx)("b",{children:this.format(n)})]})]}):null}},{key:"renderPrettyValue",value:function(){var e=this.props,t=e.size,n=e.hidePrettyValue,r=this.state.formattedValue;return n?null:(0,p.jsxs)("div",{className:A("pretty-value",{size:t}),children:[r," "]})}},{key:"renderDefaultValue",value:function(){var e=this.props,t=e.defaultValue,n=e.defaultValueClassName;return(0,p.jsx)(d.k,{disabled:!0,className:n,value:this.format(t),pin:"clear-round"})}},{key:"isBottomLineVisible",value:function(){var e=this.props.bottomLineVisibility,t=this.state.focused;return"visible"===e||t&&"focused"===e}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.className,o=e.showHint,i=e.hidePrettyValue,a=e.showDefaultValue,s=this.state,u=s.parsedError,l=s.rawValue,h=s.formattedValue,m=s.focused,f=this.getRestProps(),v=f.size,g=f.view,y=f.hasClear,C=(null!=t?t:{}).error||u,x=m?l:h;return(0,p.jsxs)("div",{className:A(null,n),children:[(0,p.jsxs)("div",{className:A("top"),children:[(0,p.jsx)(d.k,(0,r.A)((0,r.A)({},f),{},{error:C,autoComplete:!1,onUpdate:this.onChange,onKeyDown:this.onKeyDown,hasClear:y,value:x,size:v,view:g,onBlur:this.onBlur,onFocus:this.onFocus,pin:a?"round-brick":void 0})),a&&this.renderDefaultValue()]}),!C&&this.isBottomLineVisible()&&(0,p.jsx)(c.Fragment,{children:!o||m&&!i?this.renderPrettyValue():this.renderMinMaxHint()})]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.value,o=e.format,i=e.preciseInitialRawValue,a=e.decimalPlaces,s=e.formatFn;if(void 0===t.rawValue){var u=s?s(null==r?void 0:r.value):x(null==r?void 0:r.value,o,{digits:a});return{parsedValue:null==r?void 0:r.value,parsedError:n.errorFromValue(r,e),rawValue:i?b(null==r?void 0:r.value):u,formattedValue:u}}return null}},{key:"errorFromValue",value:function(e,t){var n=t.validator,r=void 0===n?function(){}:n,o=t.min,i=t.max,a=t.integerOnly,s=e||{},u=s.value,c=s.error;if(c)return c;if(null!=u){try{if(isNaN(u))return"wrong format";var l=r(u);if(l)return l}catch(c){return String(c)}return a&&u%1!=0?"The value must be an integer":void 0!==o&&u<o?"The value must be ≥ ".concat(o):void 0!==i&&u>i?"The value must be ≤ ".concat(i):void 0}}}]),n}(c.Component);S.defaultProps={size:"m",view:"normal",hasClear:!0,bottomLineVisibility:"visible"};var _=function(e){(0,s.A)(n,e);var t=(0,u.A)(n);function n(){var e;(0,i.A)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).onChange=function(t){e.props.onChange(null==t?void 0:t.value)},e}return(0,a.A)(n,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.error,i=(e.onChange,(0,o.A)(e,y));return(0,p.jsx)(S,(0,r.A)((0,r.A)({},i),{},{onChange:this.onChange,value:{value:t,error:n}}))}}],[{key:"format",value:function(e,t,n){return x(e,t,n)}}]),n}(c.Component)},70406:(e,t,n)=>{n.d(t,{A:()=>m});var r=n(29121),o=n(12937),i=n(10785),a=n(26718),s=n(77810),u=n(76872),c=n(73822),l=n(71412),d=n(64922),h=(0,u.A)("yt-quota-editor"),m=function(e){(0,i.A)(n,e);var t=(0,a.A)(n);function n(){var e;(0,r.A)(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).onEnterKeyDown=function(){var t=e.props.onEnterKeyDown;(void 0===t?function(){}:t)()},e.onBytesChange=function(t){var n=e.props,r=n.onChange,o=n.sourceAccount;r({limit:null==t?void 0:t.value,source:o,error:(null==t?void 0:t.error)||e.checkForError(null==t?void 0:t.value,o)})},e.onAccountChange=function(t){var n=e.props,r=n.onChange,o=n.limit;r({limit:o,source:t,error:n.error||e.checkForError(o,t)})},e}return(0,o.A)(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.format,r=e.sourceSuggestTitle,o=e.renderSourceSuggest,i=e.sourceAccount,a=e.limitInputTitle,u=e.showHint,c=e.error,m=e.decimalPlaces,f=e.sourceSuggestDisabled;return(0,d.jsxs)("div",{className:h(null,t),children:[o&&(0,d.jsxs)("div",{className:h("item"),children:[(0,d.jsx)("div",{className:h("item-title"),children:r||"Account to distribution"}),o({value:i||"",onChange:this.onAccountChange,disabled:f}),(0,d.jsx)("div",{className:h("free"),children:(0,d.jsxs)(s.Fragment,{children:["Free to distribute",(0,d.jsxs)("span",{className:h("free-value"),children:[" ",this.getFreeFormatted()]})]})})]}),(0,d.jsxs)("div",{className:h("item"),children:[(0,d.jsx)("div",{className:h("item-title"),children:a||"New quota limit"}),(0,d.jsx)(l.W9,{onChange:this.onBytesChange,value:{value:this.getLimit(),error:c},format:n,showHint:u,min:this.getMinLimit(),max:this.getMaxLimit(),onEnterKeyDown:this.onEnterKeyDown,decimalPlaces:m,qa:"quota-editor-new-limit"})]})]})}},{key:"getLimit",value:function(){var e=this.props,t=e.limit,n=e.prevLimit;return void 0!==t?t:n}},{key:"getFreeImpl",value:function(){var e=this.props.sourceAccount,t=this.calcLimitTotal(e),n=t.limit,r=t.total,o=t.allowChildrenOverCommit,i=t.totalChildrenLimit,a=void 0===i?0:i;if(void 0===n||void 0===r)return{};if(o){var s=Math.max(0,n);return{free:s,maxValue:s}}var u=this.props.prevLimit,c=void 0===u?0:u,l=this.props.limit,d=void 0===l?c:l,h=Math.max(0,n-a);return{free:h+c-d,maxValue:h+c}}},{key:"getFree",value:function(){return this.getFreeImpl().free}},{key:"calcLimitTotal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.props.getInfoByName(e)}},{key:"getMinLimit",value:function(){var e=this.props.min;if(void 0!==e)return e;var t=this.props,n=t.currentAccount,r=(0,t.getInfoByName)(n),o=r.totalChildrenLimit;return(r.total||0)+(o||0)}},{key:"getMaxLimit",value:function(){var e=this.props.max;return void 0!==e?e:this.getFreeImpl().maxValue}},{key:"getFreeFormatted",value:function(){return this.props.sourceAccount?l.Ay.format(Number(this.getFree()),this.props.format):c.A.format.NO_VALUE}},{key:"checkForError",value:function(e,t){if(void 0!==e){if(isNaN(e))return"wrong format!";if(this.props.currentAccount===t)return"The same source account";if(!(e<=this.props.prevLimit)){var n=this.getMaxLimit();return t&&(void 0===n||e>n)?"New value is too big":void 0}}}}]),n}(s.Component)},9772:(e,t,n)=>{n.d(t,{A:()=>g});var r=n(29121),o=n(12937),i=n(10785),a=n(26718),s=n(77810),u=n(76872),c=n(60620),l=n(93209),d=n(2211),h=n(71412),m=n(48109),f=n(70406),v=n(64922),p=(0,u.A)("yt-quota-editor-with-hide"),g=function(e){(0,i.A)(n,e);var t=(0,a.A)(n);function n(){var e;(0,r.A)(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).state={},e.onYes=function(){var t=e.calcLimitTotal(e.props.currentAccount).limit,n=void 0===t?0:t,r=e.getLimit()||0;e.props.onSave(r,r-n,e.getDistributeAccount()),e.setState({showConfirm:!1}),e.props.onHide()},e.onCancel=function(){e.setState({showConfirm:!1})},e.onChange=function(t){var n=t.limit,r=t.source,o=t.error,i=e.props,a=i.parentOfCurrentAccount,s=i.limit;e.setState({newLimit:n,account:r,accountChanged:r!==a,isReadyToSave:!o&&n!==s&&void 0!==n})},e.onSave=function(){e.state.isReadyToSave&&e.setState({showConfirm:!0})},e}return(0,o.A)(n,[{key:"render",value:function(){return this.state.showConfirm?this.renderConfirmation():this.renderEditor()}},{key:"renderConfirmation",value:function(){var e=this.props,t=e.className,n=e.limit;return(0,v.jsxs)("div",{className:p("confirm",t),children:[(0,v.jsx)("div",{className:p("confirm-notice"),children:"Do you really want to change the quota limit?"}),(0,v.jsxs)("div",{className:p("confirm-details"),children:["The previous value is ",this.renderLimit(n),", the new value is"," ",this.renderLimit(this.getLimit())]}),(0,v.jsxs)("div",{className:p("confirm-actions"),children:[(0,v.jsx)(d.A,{className:p("confirm-btn"),view:"action",onClick:this.onYes,qa:"quota-editor-confirmation-yes",children:"Yes"}),(0,v.jsx)(d.A,{className:p("confirm-btn"),view:"flat-secondary",onClick:this.onCancel,children:"Cancel"})]})]})}},{key:"renderLimit",value:function(e){var t=this.props.format;return(0,v.jsx)("span",{className:p("confirm-limit"),children:h.Ay.format(e,t)})}},{key:"renderEditor",value:function(){var e=this.props,t=e.className,n=e.onHide,r=this.state.isReadyToSave;return(0,v.jsxs)("div",{className:p(null,[t,"yt-special-background"].filter(Boolean).join(" ")),children:[(0,v.jsxs)("div",{className:p("top"),children:["Edit Quota limit",(0,v.jsx)(l.S,{className:p("hide"),color:"secondary",onClick:n,children:(0,v.jsx)(c.A,{awesome:"times",face:"light"})})]}),(0,v.jsxs)("div",{className:p("controls"),children:[this.renderControl(),(0,v.jsxs)("div",{className:p("controls-item",{save:!0}),children:[(0,v.jsx)("div",{className:p("control-title"),children:" "}),(0,v.jsx)(d.A,{size:"m",view:"action",disabled:!r,onClick:this.onSave,qa:"quota-editor-save",children:"Save"})]})]})]})}},{key:"renderControl",value:function(){var e=this.props,t=e.format,n=e.limit,r=e.min,o=e.max,i=e.currentAccount,a=e.getInfoByName,s=e.sourceSuggestTitle,u=e.renderSourceSuggest;return(0,v.jsx)(f.A,{className:p("grow"),currentAccount:i,sourceAccount:this.getDistributeAccount(),getInfoByName:a,sourceSuggestTitle:s,renderSourceSuggest:u,format:t,limit:this.getLimit(),prevLimit:n,onChange:this.onChange,onEnterKeyDown:this.onSave,min:r,max:o})}},{key:"getLimit",value:function(){var e=this.state.newLimit,t=this.props.limit;return void 0!==e?e:t}},{key:"getDistributeAccount",value:function(){var e=this.state,t=e.account,n=e.accountChanged?t:this.props.parentOfCurrentAccount;return n===m.$T?"":n}},{key:"calcLimitTotal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.props.getInfoByName(e)}}]),n}(s.Component)},38226:(e,t,n)=>{n.d(t,{A:()=>y});var r,o=n(29121),i=n(12937),a=n(10785),s=n(26718),u=n(68175),c=n(77810),l=n(76872),d=n(64772),h=n(60620),m=n(34380),f=n(44458),v=n(64922),p=(0,l.A)("sort-icon"),g=(r={},(0,u.A)(r,"","sort"),(0,u.A)(r,"asc","sort-up"),(0,u.A)(r,"desc","sort-down"),(0,u.A)(r,"asc-undefined","arrow-to-bottom"),(0,u.A)(r,"desc-undefined","arrow-from-bottom"),(0,u.A)(r,"undefined-asc","arrow-from-top"),(0,u.A)(r,"undefined-desc","arrow-to-top"),r),y=function(e){(0,a.A)(n,e);var t=(0,s.A)(n);function n(){var e;(0,o.A)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).onClick=function(){var t=e.props,n=t.order,r=t.onChange,o=t.allowUnordered,i=t.withUndefined;r&&r((0,f.$N)(n,o,i))},e}return(0,i.A)(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.label,r=e.order,o=e.hidden,i=g[r||""];return(0,v.jsxs)("span",{className:p({hidden:o},t),onClick:this.onClick,children:[n&&(0,v.jsx)("span",{className:p("label"),children:n}),(0,v.jsx)(m.m,{className:p("icon"),content:r?d.A.ReadableField(r):"Unordered",children:(0,v.jsx)(h.A,{awesome:i,face:"solid"})})]})}}]),n}(c.Component)},77723:(e,t,n)=>{n.d(t,{A:()=>N});var r=n(9736),o=n(29121),i=n(12937),a=n(79261),s=n(10785),u=n(26718),c=n(77810),l=n(75826),d=n.n(l),h=n(25147),m=n.n(h),f=n(76872),v=n(23313),p=n.n(v),g=n(95603),y=n.n(g),A=n(90636),C=n.n(A),x=n(65692),b=n(55740),S=n(29241),_=n(64922),k=(0,f.A)("suggest"),N=(d().arrayOf(d().oneOfType([d().string,d().shape({value:d().string,text:d().string,counter:d().oneOfType([d().string,d().number])})])),function(e){(0,s.A)(n,e);var t=(0,u.A)(n);function n(e){var r;return(0,o.A)(this,n),(r=t.call(this,e)).input=c.createRef(),r.isClearClicked=!1,r.isUnmounting=!1,r.skipApplyForNextBlur=!1,r.onTextUpdate=function(e){var t=r.props,n=t.clear,o=t.onTextUpdate;r.setState({text:e}),r.loadSuggestions(e),e.length||null==n||n(),null==o||o(e)},r.showSuggestions=function(e){var t,n;r.isUnmounting||(r.setState({items:e,popupVisible:!0,selectedIndex:0}),null===(t=(n=r.props).onOpenChange)||void 0===t||t.call(n,{open:!0}))},r.state={text:"text"in e?e.text:e.defaultText,items:e.items,selectedIndex:0,popupVisible:!1,prevItems:[]},r.onFocus=r.onFocus.bind((0,a.A)(r)),r.onBlur=r.onBlur.bind((0,a.A)(r)),r.onKeyDown=r.onKeyDown.bind((0,a.A)(r)),r.hideSuggestions=r.hideSuggestions.bind((0,a.A)(r)),r.clearSuggestions=r.clearSuggestions.bind((0,a.A)(r)),r}return(0,i.A)(n,[{key:"componentDidMount",value:function(){this.isClearClicked=!1}},{key:"componentWillUnmount",value:function(){this.isUnmounting=!0}},{key:"onFocus",value:function(){var e,t;this.setState({focused:!0}),this.isClearClicked=!1,this.loadSuggestions(this.state.text),this.skipApplyForNextBlur=!1,null===(e=(t=this.props).onFocus)||void 0===e||e.call(t)}},{key:"onBlur",value:function(){var e,t,n;this.hideSuggestions(),this.isClearClicked||null===(e=(t=this.props).onBlur)||void 0===e||e.call(t),this.skipApplyForNextBlur||this.applySuggestion(null!==(n=this.state.text)&&void 0!==n?n:""),this.setState({focused:!1})}},{key:"onKeyDown",value:function(e){var t=e.keyCode;if(40===t)e.preventDefault(),this.selectNextSuggestion();else if(38===t)e.preventDefault(),this.selectPrevSuggestion();else if(13===t)this.applyOrClearSuggestion();else if(27===t){var n;null===(n=this.input.current)||void 0===n||n.blur()}}},{key:"hideSuggestions",value:function(){var e,t;this.setState({items:[],popupVisible:!1,selectedIndex:0}),null===(e=(t=this.props).onOpenChange)||void 0===e||e.call(t,{open:!1})}},{key:"loadSuggestions",value:function(e){var t=this.props,n=t.filter,r=t.items;Promise.resolve(n(r,e)).then(this.showSuggestions)}},{key:"clearSuggestions",value:function(){var e,t=this.props.clear;null==t||t(),this.isClearClicked=!0,null===(e=this.input.current)||void 0===e||e.blur()}},{key:"applySuggestion",value:function(e){var t,n=this.props.apply;this.setState({text:e}),null==n||n(e),null===(t=this.input.current)||void 0===t||t.blur()}},{key:"getItemIndex",value:function(e){return e-1}},{key:"getSelectedIndex",value:function(e){return e+1}},{key:"getItemValue",value:function(e){return"string"==typeof e?e:e.value}},{key:"applyOrClearSuggestion",value:function(){var e,t=this.state,n=t.selectedIndex,r=t.items;if(0===n?r.length>0&&(e=r[0]):e=r[this.getItemIndex(n)],e){var o=this.getItemValue(e);this.applySuggestion(o);var i=this.props.onItemClick;null==i||i(e)}}},{key:"selectPrevSuggestion",value:function(){var e=this.state,t=e.selectedIndex,n=e.items,r=0===t?this.getSelectedIndex(n.length-1):t-1;this.setState({selectedIndex:r})}},{key:"selectNextSuggestion",value:function(){var e=this.state,t=e.selectedIndex,n=e.items,r=t===this.getSelectedIndex(n.length-1)?0:t+1;this.setState({selectedIndex:r})}},{key:"renderInput",value:function(){var e=this.state.text,t=this.props,n=t.placeholder,r=t.autoFocus,o=t.disabled,i=t.pin;return(0,_.jsx)(x.k,{hasClear:!0,value:e,className:k("control"),placeholder:n,disabled:o,onUpdate:this.onTextUpdate,onFocus:this.onFocus,onBlur:this.onBlur,autoFocus:r,controlRef:this.input,pin:i,onKeyDown:this.onKeyDown})}},{key:"renderCounter",value:function(e){var t=e.counter;return void 0!==t&&(0,_.jsx)("span",{className:k("item-counter"),children:t})}},{key:"renderSimpleItem",value:function(e){var t="string"==typeof e?e:e.text;return(0,_.jsxs)("span",{children:["string"!=typeof e&&this.renderCounter(e),t]})}},{key:"renderItem",value:function(e,t,n,r){var o=this,i=this.state.selectedIndex,a=k("item",{selected:i===this.getSelectedIndex(t)?"yes":void 0},r),s=this.getItemValue(e),u=this.props,c=u.template,l=u.renderItem,d=u.onItemClick,h=null!=l?l:void 0!==c?S.Ay.get(c.key).__default__:this.renderSimpleItem.bind(this);return(0,_.jsx)("li",{title:s,className:a,onMouseDown:function(){o.skipApplyForNextBlur=!0,null==d||d(e),o.applySuggestion(s)},children:h(e)},n)}},{key:"getInputWidth",value:function(){return this.input.current?this.input.current.offsetWidth-2:0}},{key:"restrictItems",value:function(e){var t=this.props.maxItems;if(p()(t))return e.slice(0,t||e.length);if(y()(t)){var n=t.totalAmount,o=t.groupPredicate,i=C()(e,o),a=(0,r.A)(i,2),s=a[0],u=a[1];if(s.length&&u.length){var c=Math.round(Math.max(s.length/e.length*n,1));return s.slice(0,c).concat(u.slice(0,n-c))}return e.slice(0,n||e.length)}return e}},{key:"renderSuggestions",value:function(e){var t=this,n=k("wrapper"),r=k("items"),o=0===e.length&&this.state.text;return e&&(0,_.jsxs)("div",{className:n,children:[o&&this.renderItem("No items",-1,"no_items",k("no-items")),(0,_.jsx)("ul",{className:r,style:{minWidth:this.getInputWidth()},children:(0,_.jsx)(m(),{itemRenderer:function(n,r){return t.renderItem(e[n],n,r)},length:e.length,type:"uniform"})})]})}},{key:"renderPopup",value:function(){var e=this.props,t=e.popupClassName,n=e.popupPlacement,r=this.state.popupVisible,o=this.restrictItems(this.state.items);return(0,_.jsx)(b.z,{className:t,placement:null!=n?n:["bottom-start","top-start"],anchorRef:this.input,open:!this.isClearClicked&&r&&o.length>0,onClose:this.hideSuggestions,children:this.renderSuggestions(o)})}},{key:"render",value:function(){var e=this.props.className;return(0,_.jsxs)("div",{className:k(null,e),children:[this.renderInput(),this.renderPopup()]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=!t.focused&&"text"in e?e.text:t.text;return e.items===t.prevItems&&n===t.text?null:{items:e.filter(e.items,n),prevItems:e.items,text:n}}}]),n}(c.Component));N.defaultProps={disable:!1,text:"",autoFocus:!1,items:[],zIndexGroupLevel:1,onBlur:function(){},focused:!1}},60680:(e,t,n)=>{n.d(t,{yN:()=>l,uL:()=>v,IS:()=>f,L1:()=>c,W1:()=>d,N5:()=>h,T1:()=>m});var r=n(40319),o=(n(77810),n(76872)),i=n(3659),a=n(53332),s=n(64922),u=(0,o.A)("yt-text");function c(e){var t=e.children,n=e.disabled;return(0,s.jsx)("span",{className:u("secondary",{disabled:n}),children:t})}function l(e){var t=e.children;return(0,s.jsx)("span",{className:u("bold"),children:t})}function d(e){var t=e.children;return(0,s.jsx)(c,{children:(0,s.jsx)(l,{children:t})})}function h(e){var t=e.children,n=e.className;return(0,s.jsx)("span",{className:u("warning",n),children:t})}function m(e){var t=e.children,n=e.className;return(0,s.jsx)("span",{className:u("warning-light",n),children:t})}function f(e){var t=e.children;return(0,s.jsx)("span",{className:u("no-wrap"),children:t})}function v(e){var t=e.text,n=e.onClick,o=i.A.prettyprint(t,(0,r.A)((0,r.A)({},a.EP),{},{asHTML:!0}));return(0,s.jsx)("span",{onClick:n,className:u("escaped"),dangerouslySetInnerHTML:{__html:o}})}},37175:(e,t,n)=>{n.d(t,{A:()=>m,_:()=>h}),n(77810);var r=n(76426),o=n(48109),i=n(26264),a=n(15647),s=n(27497),u=n(73822),c=n(34380),l=n(28640),d=n(64922);function h(e,t){return"/".concat(e,"/").concat(i.YW.ACCOUNTS,"/").concat(o.yE.GENERAL,"?account=").concat(t)}function m(e){var t=e.cluster,n=e.account,o=e.className,i=e.inline,m=(0,a.d4)(s.dB),f=t||m;return(0,d.jsx)(c.m,{ellipsis:i,className:o,content:n?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.A,{text:n,view:"flat-secondary"})," ",n]}):null,children:n?(0,d.jsx)(r.A,{theme:"primary",routed:!0,url:h(f,n),children:n}):u.A.format.NO_VALUE})}},84656:(e,t,n)=>{n.d(t,{Oo:()=>x,Dk:()=>_,_C:()=>S,Ay:()=>b});var r=n(40319),o=n(9736),i=n(77810),a=n(15647),s=n(27528),u=n.n(s),c=n(76872),l=n(82060),d=n(48109),h=n(99526),m=n(10352),f=n(88681),v=n(40519),p=n(64714),g=n(50074),y=n(64922),A=(0,c.A)("accounts-suggest"),C="<Root>";function x(e){var t=e.items,n=e.onChange,r=e.placeholder,o=e.allowRootAccount,i=e.disabled,a=e.validate,s=void 0===a?function(){}:a,c=e.touched,l=e.value,h=u()(t,(function(e){return{value:e,text:e}}));o&&h.splice(0,0,{value:d.$T,text:C});var m=c&&s(l);return(0,y.jsxs)("div",{className:A({empty:!l,error:Boolean(m)}),children:[(0,y.jsx)(g.L,{disabled:i,items:h,onChange:n,placeholder:r,value:l,width:"max",hideClear:!0}),m&&(0,y.jsx)("div",{className:A("error"),children:m})]})}x.isEmpty=function(e){return!e},x.getDefaultValue=function(){return""},x.hasErrorRenderer=!0;const b=(0,a.Ng)((function(e){return{items:(0,m.SD)(e)}}))(x);var S=(0,a.Ng)((function(e){return{items:(0,h.nD)(e)}}))(x);function _(e){var t=i.useState({items:[]}),n=(0,o.A)(t,2),a=n[0],s=a.items,u=a.error,c=n[1];return i.useMemo((function(){(0,f.IF)(p.Vu.listAccounts,(0,r.A)({path:"//sys/accounts"},v.R)).then((function(e){c({items:e})})).catch((function(e){c({error:e})}))}),[]),(0,y.jsxs)(i.Fragment,{children:[(0,y.jsx)(x,(0,r.A)((0,r.A)({},e),{},{items:s||[]})),u&&(0,y.jsx)(l.A,{error:u})]})}_.isEmpty=function(e){return!e},_.getDefaultValue=function(){return d.$T}},10199:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(29121),o=n(12937),i=n(4617),a=n(44623),s=function(){function e(t){(0,r.A)(this,e),Object.assign(this,t.perMedium,t.masterMemoryResources,t)}return(0,o.A)(e,[{key:"getDiskSpaceProgressInfo",value:function(t,n){var r=e.GetDataPerMedium(this,t,n);return r?{committed:r.committedDiskSpace,uncommitted:r.uncommittedDiskSpace,total:r.totalDiskSpace,limit:r.diskSpaceLimit,theme:r.diskSpaceProgressTheme,progress:r.diskSpaceProgress,progressText:r.diskSpaceProgressText}:{}}},{key:"getResourceInfoSource",value:function(e){return e&&this.hasRecursiveResources?this.recursiveResources:this}},{key:"getNodeCountProgressInfo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getResourceInfoSource(e);return{committed:t.committedNodeCount,uncommitted:t.uncommittedNodeCount,total:t.totalNodeCount,limit:t.nodeCountLimit,theme:t.nodeCountProgressTheme,progress:t.nodeCountProgress,progressText:t.nodeCountProgressText}}},{key:"getChunkCountProgressInfo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getResourceInfoSource(e);return{committed:t.committedChunkCount,uncommitted:t.uncommittedChunkCount,total:t.totalChunkCount,limit:t.chunkCountLimit,theme:t.chunkCountProgressTheme,progress:t.chunkCountProgress,progressText:t.chunkCountProgressText}}},{key:"getTabletCountProgressInfo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getResourceInfoSource(e);return{committed:t.committedTabletCount,uncommitted:t.uncommittedTabletCount,total:t.totalTabletCount,limit:t.tabletCountLimit,theme:t.tabletCountProgressTheme,progress:t.tabletCountProgress,progressText:t.tabletCountProgressText}}},{key:"getTabletStaticMemoryInfo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getResourceInfoSource(e);return{committed:t.committedTabletStaticMemory,uncommitted:t.uncommittedTabletStaticMemory,total:t.totalTabletStaticMemory,limit:t.tabletStaticMemoryLimit,theme:t.tabletStaticMemoryProgressTheme,progress:t.tabletStaticMemoryProgress,progressText:t.tabletStaticMemoryProgressText}}},{key:"getMasterMemoryMediumInfo",value:function(e,t){return this.getResourceInfoSource(e)[(0,a.o$)("master_memory/"+t)]}}],[{key:"prepareProgressStack",value:function(e,t,n,r){var o=t>0?e+t:e,a=Math.max(o,n);return[{value:(0,i.jP)(t<0?e+t:e,a),theme:r},{value:(0,i.jP)(Math.abs(t),a)}]}},{key:"GetDataPerMedium",value:function(e,t,n){if(n){var r=e.recursiveResources;if(t)return r.perMedium&&r.perMedium[t]}return t?e.perMedium&&e.perMedium[t]:e}}]),e}()},44187:(e,t,n)=>{n.d(t,{A:()=>_,o:()=>x});var r=n(28407),o=n(29121),i=n(12937),a=n(10785),s=n(26718),u=n(70232),c=n.n(u),l=n(77810),d=n(15647),h=n(76872),m=n(20330),f=n(22843),v=n(27497),p=n(79366),g=n(84656),y=(n(97094),n(7787)),A=n(64922),C=(0,h.A)("accounts-editor");function x(e){var t=e.header,n=e.children;return(0,A.jsxs)("div",{className:C(null,"elements-section"),children:[(0,A.jsx)("div",{className:C(null,"elements-heading_size_s"),children:t}),n]})}var b=function(e){(0,a.A)(n,e);var t=(0,s.A)(n);function n(){var e;(0,o.A)(this,n);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return(e=t.call.apply(t,[this].concat(a))).state={abcId:void 0,abcTitle:"",responsibleKey:0},e.onParentChange=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).isOutsideClick)e.forceUpdate();else{var n=e.props,r=n.account,o=r.name,i=r.parent,a=n.setAccountParent;if(i!==t)return a(o,t)}},e.onAbcServiceChanged=function(){var t=(0,r.A)(c().mark((function t(n){var r,o,i,a,s,u,l,d,h,f,v,p=arguments;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(p.length>1&&void 0!==p[1]?p[1]:{}).isOutsideClick){t.next=4;break}return e.forceUpdate(),t.abrupt("return");case 4:if(o=(r=null!=n?n:{}).id,i=r.slug,a=e.props,s=a.account,u=s.name,l=s.abc,h=(d=void 0===l?{}:l).slug,f=d.id,v=a.loadEditedAccount,o!==f||h!==i){t.next=8;break}return t.abrupt("return");case 8:return t.next=10,(0,m.cg)(u,o,i);case 10:v(u);case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return(0,i.A)(n,[{key:"renderParentAccount",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.isDeveloper;return(0,A.jsx)(x,{header:"Parent",children:(0,A.jsx)(g._C,{value:e,onChange:this.onParentChange,disabled:!t,allowRootAccount:!0})})}},{key:"renderAbcServiceId",value:function(){var e=this.props,t=e.account.abc,n=t.id,r=t.slug,o=e.isDeveloper,i=y.Ay.renderControlAbcService({value:{id:n,slug:r},onChange:this.onAbcServiceChanged,placeholder:"Select ABC service...",disabled:!o});return i?(0,A.jsx)(x,{header:"ABC Service",children:i}):null}},{key:"render",value:function(){var e=this.props.account.parent;return(0,A.jsxs)(l.Fragment,{children:[this.renderAbcServiceId(),this.renderParentAccount(e)]})}}]),n}(l.Component),S={loadEditedAccount:f.Pm,setAccountParent:f.cV};const _=(0,d.Ng)((function(e){return{cluster:(0,v.dB)(e),isDeveloper:(0,p.d)(e)}}),S)(b)},25991:(e,t,n)=>{n.d(t,{W:()=>u,p:()=>s});var r=n(27528),o=n.n(r),i=n(77333),a=n(44623);function s(e){return function(t){t({type:i.Hr,data:e})}}function u(e){return Promise.all(o()(e,(function(e){return Promise.resolve((0,a.N3)(e))})))}},22843:(e,t,n)=>{n.d(t,{$W:()=>D,AG:()=>M,Gs:()=>V,I$:()=>T,M7:()=>L,Pm:()=>I,Tq:()=>w,XG:()=>z,Y5:()=>F,_m:()=>B,cV:()=>O,hH:()=>j,i1:()=>R,iw:()=>E,jA:()=>P});var r=n(28407),o=n(9736),i=n(40319),a=n(70232),s=n.n(a),u=n(29746),c=n(49214),l=n.n(c),d=n(27528),h=n.n(d),m=n(19314),f=n(6708),v=n(13724),p=n(20330),g=n(48109),y=n(77333),A=n(40519),C=n(27497),x=n(10352),b=n(64714),S=n(25991),_=n(10199),k=n(11896),N=["abc","diskSpaceLimit","parent_name","responsibles","totalDiskSpace","resource_limits","resource_usage","committed_resource_usage","recursive_resource_usage","recursive_committed_resource_usage","recursive_violated_resource_limits","allow_children_limit_overcommit","total_children_resource_limits","folder_id"];function w(){return function(e,t){e({type:g.Vi.REQUEST});var n=t(),r=(0,C.dB)(n),a=(0,C.ID)(n),s=(0,x.BO)(n)?{}:A.R,c=[{command:"list",parameters:(0,i.A)((0,i.A)({path:"//sys/accounts/",attributes:N},A.v),s)},{command:"get",parameters:{path:"//sys/accounts/@",attributes:["total_resource_limits","total_resource_usage"]}},{command:"get",parameters:{path:"//sys/cluster_nodes/@",attributes:["available_space_per_medium","io_statistics_per_medium","used_space_per_medium"]}},{command:"get",parameters:{path:"//sys/users/"+a+"/@usable_accounts"}}],d=new b.CT(r,k.c.ACCOUNTS);return d.fetch(b.Vu.accountsData,b.Qq.executeBatch(b.Vu.accountsData,{requests:c})).then((function(t){e({type:y.Hr,data:{disableCacheForNextFetch:!1}});var n=(0,o.A)(t,4),r=n[0],i=r.error,a=r.output,s=n[1],c=s.error,m=s.output,f=n[2],v=f.error,p=f.output,A=n[3],C=A.error,x=A.output;Promise.resolve(i).then((function(t){if(t)throw t;var n=l()(u.Ay.getValue(a),(function(e){return u.Ay.getValue(e)!==g.$T}));return d.parse(b.Vu.accountsData,(0,S.W)(n)).then((function(t){e({type:g.Vi.SUCCESS,data:{accounts:h()(t,(function(e){return new _.A(e)}))}})}))})).catch((function(t){e({type:g.Vi.FAILURE,data:{error:t}})})),e(c?{type:g.Xt.FAILURE,data:{error:c}}:{type:g.Xt.SUCCESS,data:m}),e(v?{type:g.A2.FAILURE,data:{error:v}}:{type:g.A2.SUCCESS,data:p}),e(C?{type:g.VY.FAILURE,data:{error:C}}:{type:g.VY.SUCCESS,data:x})}))}}function j(){return function(e,t){var n=(0,x.F2)(t());return{type:y.Hr,data:{editCounter:n+1,disableCacheForNextFetch:!0}}}}function I(e){return function(t,n){var r=n(),i=(0,C.dB)(r);t({type:g.FM.REQUEST});var a=new b.CT(i,k.c.ACCOUNTS);return a.fetch(b.Vu.accountsEditData,b.Qq.get(b.Vu.accountsEditData,{path:"//sys/accounts/"+e+"/@",attributes:N})).then((function(t){return a.parse(b.Vu.accountsEditData,(0,S.W)([{$value:e,$attributes:t}]))})).then((function(e){var n=(0,o.A)(e,1)[0];t({type:g.FM.SUCCESS,data:{account:new _.A(n),cluster:i}})})).catch((function(){t({type:g.FM.FAILURE})}))}}function F(e){return function(t,n){var r=n().tables[g.G5];t({type:g.gt,data:{newFilter:e,sortState:r}})}}function M(e){return{type:g.lo,data:{account:e}}}function T(e){return function(t){return e&&t((0,v.vi)(e)),t({type:g.IC,data:{account:e}})}}function P(){return function(e){return e({type:g.Ps}),e(w())}}function V(e){return{type:g._5,data:{newFilter:e}}}function L(e){return{type:g.FO,data:{newFilter:e}}}function D(){return function(e,t){var n=t().tables[g.G5];e({type:g.vX,data:{sortState:n}})}}function B(e){return{type:g.pN,data:{treeState:e}}}function O(e,t){return function(){var n=(0,r.A)(s().mark((function n(r){return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,p.Qe)(e,t);case 2:return r(w()),n.next=5,r(I(e));case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}function z(e){return function(t){return t((0,f.ZC)(m.Ou.ACCOUNTS.DASHBOARD_VISIBILITY_MODE,m.dK.ACCOUNTS,e))}}function E(e){return function(t){return t((0,f.ZC)(m.Ou.ACCOUNTS.ACCOUNTS_VISIBILITY_MODE,m.dK.ACCOUNTS,e))}}function R(e,t){return function(e){e({type:y.Hr,data:{abcServiceFilter:{slug:t}}})}}},94285:(e,t,n)=>{n.d(t,{DO:()=>z,GR:()=>K,JP:()=>k,K:()=>H,Nd:()=>P,QJ:()=>S,RC:()=>U,U5:()=>q,UI:()=>T,Xj:()=>V,dz:()=>C,jU:()=>E,l9:()=>A,p1:()=>x,px:()=>b,sD:()=>j,tC:()=>N,um:()=>y,uo:()=>L,v8:()=>M,vY:()=>w,yb:()=>D,zQ:()=>R});var r=n(49214),o=n.n(r),i=n(34455),a=n.n(i),s=n(27528),u=n.n(s),c=n(31285),l=n.n(c),d=n(18472),h=n(6184),m=n(27497),f=n(73928),v=n(53332),p=n(44458),g=n(94544),y=function(e){return e.chaos_cell_bundles.loaded},A=function(e){return e.chaos_cell_bundles.loading},C=function(e){return e.chaos_cell_bundles.bundlesSort},x=function(e){return e.chaos_cell_bundles.bundlesNameFilter},b=function(e){return e.chaos_cell_bundles.bundlesAccountFilter},S=function(e){return e.chaos_cell_bundles.bundlesTagNodeFilter},_=function(e){return e.chaos_cell_bundles.bundles},k=function(e){return e.chaos_cell_bundles.activeBundle},N=function(e){return e.chaos_cell_bundles.bundlesTableMode},w=(0,d.Mz)([_,k],(function(e,t){return a()(e,(function(e){return e.bundle===t}))})),j=(0,d.Mz)([_],(function(e){return(0,f.Sx)(e)})),I=new Set(["bundle","health","tabletCells","tablets","uncompressed","compressed","enable_bundle_balancer","node_tag_filter","memory","tablet_count","tablet_count_limit","tablet_count_free","tablet_count_percentage","tablet_static_memory","tablet_static_memory_limit","tablet_static_memory_free","tablet_static_memory_percentage"]),F=(0,d.Mz)([_,x,b,S],(function(e,t,n,r){var i=[];if(t){var a=t.toLowerCase();i.push((function(e){return-1!==e.bundle.toLowerCase().indexOf(a)}))}if(n){var s=n.toLowerCase();i.push((function(e){var t=e.changelog_account,n=e.snapshot_account;return Boolean(t)&&-1!==t.toLowerCase().indexOf(s)||Boolean(n)&&-1!==n.toLowerCase().indexOf(s)}))}if(r){var u=r.toLowerCase();i.push((function(e){var t=e.node_tag_filter;return Boolean(t)&&-1!==t.toLowerCase().indexOf(u)}))}return i.length?o()(e,h.concatByAnd.apply(void 0,i)):e})),M=(0,d.Mz)([F,C],(function(e,t){var n=t.column,r=t.order;return n&&r?(0,g.Af)({bundles:e,column:n,order:r,columnsSortable:I}):e})),T=function(e){return e.chaos_cell_bundles.cells},P=function(e){return e.chaos_cell_bundles.cellsSort},V=function(e){return e.chaos_cell_bundles.cellsIdFilter},L=function(e){return e.chaos_cell_bundles.cellsBundleFilter},D=function(e){return e.chaos_cell_bundles.cellsHostFilter},B=(0,d.Mz)([T,k],(function(e,t){return t?o()(e,(function(e){return Boolean(e.bundle)&&t===e.bundle})):e})),O=(0,d.Mz)([B,V,L,D,k],(function(e,t,n,r){var i=[];return t&&i.push((function(e){return-1!==e.id.indexOf(t)})),n&&i.push((function(e){return Boolean(e.bundle)&&-1!==e.bundle.indexOf(n)})),r&&i.push((function(e){return Boolean(e.peerAddress)&&-1!==e.peerAddress.indexOf(r)})),i.length?o()(e,h.concatByAnd.apply(void 0,i)):e}));function z(e,t){return e?o()(t,(function(t){return t.bundle===e})):[]}var E=(0,d.Mz)([O,P],(function(e,t){return(0,p.gn)(e,t)})),R=(0,d.Mz)([T],(function(e){return l()(u()(e,"bundle")).sort()})),U=(0,d.Mz)([B],(function(e){return l()(u()(e,"peerAddress")).sort()})),K=(0,d.Mz)([k,O],(function(e,t){return e?q(t):""}));function q(e){return l()(u()(e,(function(e){var t=e.peerAddress;return(0,v.Q4)(t)})).filter(Boolean)).sort().join("|")}var H=(0,d.Mz)([m.dB,k],(function(e,t){var n=[{text:"",href:(0,f.Hq)(e),title:"<bundles>"}];return t&&n.push({text:t,href:(0,f.j3)(e,t)}),n}))},39e3:(e,t,n)=>{n.d(t,{Az:()=>k,DL:()=>j,Es:()=>N,FG:()=>C,Gi:()=>x,O1:()=>p,Tf:()=>y,b6:()=>v,c6:()=>g,cD:()=>S,dm:()=>f,rV:()=>A,wz:()=>_});var r=n(13322),o=n(40319),i=n(18472),a=n(31285),s=n.n(a),u=n(29347),c=n.n(u),l=n(6184),d=n(44458),h=n(42772),m=function(e){return e.chyt.list.data},f=(0,i.Mz)([m],(function(e){var t=e.items,n=void 0===t?[]:t;return s()(n.map((function(e){return e.creator}))).sort()})),v=(0,i.Mz)([m],(function(e){var t=e.items,n=void 0===t?[]:t;return c()(s()(n.map((function(e){return e.health}))).sort())})),p=(0,i.Mz)([m],(function(e){var t=e.items,n=void 0===t?[]:t;return s()(n.map((function(e){return e.state}))).sort()})),g=function(e){return e.chyt.clique.currentClique},y=function(e){return e.chyt.listFilters.name},A=function(e){return e.chyt.listFilters.health},C=function(e){return e.chyt.listFilters.creator},x=function(e){return e.chyt.listFilters.state},b={instance_count:!0,total_cpu:!0,total_memory:!0,creation_time:!0,stage:!0,yt_operation_start_time:!0,yt_operation_finish_time:!0,speclet_modification_time:!0,strawberry_state_modification_time:!0,pool:!0,health:!0,creator:!0,state:!0},S=(0,i.Mz)([function(e){var t;return null!==(t=(0,h.u)(e)["global::chyt::list_columns"])&&void 0!==t?t:["health","state","instance_count","total_cpu","total_memory","creator","creation_time"]}],(function(e){var t=new Set(e);return c()(e.map((function(e){return b[e]&&t.has(e)?e:null})))})),_=(0,i.Mz)([S],(function(e){var t=new Set(e),n=e.map((function(e){return{checked:!0,column:e}}));return Object.keys(b).forEach((function(e){var r=e;t.has(r)||n.push({checked:!1,column:r})})),n})),k=function(e){return e.chyt.listFilters.sortState},N=(0,i.Mz)([k],(function(e){return e.reduce((function(t,n,r){return n.column&&(t[n.column]=(0,o.A)((0,o.A)({},n),{},{multisortIndex:e.length>1?r+1:void 0})),t}),{})})),w=(0,i.Mz)([y,C,x,A],(function(e,t,n,o){var i=c()([e?function(t){return-1!==t.alias.indexOf(e)}:void 0,void 0!==t?function(e){return t===e.creator}:void 0,n?function(e){return n===e.state}:void 0,o?function(e){return o===e.health}:void 0]);return i.length?l.concatByAnd.apply(void 0,(0,r.A)(i)):void 0})),j=(0,i.Mz)([m,k,w],(function(e,t,n){var r=e.items,o=void 0===r?[]:r,i=n?o.filter(n):o;return(0,d.jt)(i,t)}))},82947:(e,t,n)=>{n.d(t,{$7:()=>_,As:()=>j,CY:()=>k,En:()=>C,F6:()=>w,Gf:()=>p,M3:()=>y,NF:()=>I,Pc:()=>b,Wl:()=>S,YZ:()=>F,jO:()=>M,qZ:()=>A,sO:()=>T,tZ:()=>g,wE:()=>N});var r=n(34455),o=n.n(r),i=n(63281),a=n.n(i),s=n(18472),u=n(29730),c=n(19314),l=n(99526),d=n(57602),h=n(66205),m=n(85749),f=n(94285),v=n(39e3),p=(0,s.Mz)([u.th,u.O6],P),g=(0,s.Mz)([u.th,u.O6],V),y=(0,s.Mz)([g],L),A=(0,s.Mz)([l.yq,p],D),C=(0,s.Mz)([u.th,u.mR],P),x=(0,s.Mz)([u.th,u.mR],V),b=((0,s.Mz)([x],L),(0,s.Mz)([v.c6,C],D)),S=(0,s.Mz)([u.th,u.sX],P),_=(0,s.Mz)([u.th,u.sX],V),k=(0,s.Mz)([_],L),N=(0,s.Mz)([d.Yn,S],D),w=(0,s.Mz)([u.th,u.cY],P),j=(0,s.Mz)([h.d_,h.Jv,w],(function(e,t,n){return Boolean(o()(n,(function(n){return n.path==="".concat(e,"[").concat(t,"]")})))})),I=(0,s.Mz)([u.th,u.r_],P),F=(0,s.Mz)([m.OR,I],D),M=(0,s.Mz)([u.th,u.VI],P),T=(0,s.Mz)([f.JP,M],D);function P(e,t){var n=e(c.Ou.LOCAL.FAVOURITES,t);return a()(n,"path")}function V(e,t){return e(c.Ou.LOCAL.LAST_VISITED,t)||[]}function L(e){return a()(e,(function(e){return-e.count}))}function D(e,t){return Boolean(o()(t,(function(t){return t.path===e})))}},20330:(e,t,n)=>{n.d(t,{OF:()=>k,Qe:()=>x,YL:()=>C,ZQ:()=>A,cg:()=>b,lw:()=>_});var r=n(75414),o=n.n(r),i=n(84092),a=n.n(i),s=n(48109),u=n(90838),c=n(73822),l=n(78894),d=n(35336),h=n(48971),m=n(63582),f="//sys/accounts/",v=new l.I,p=1e4,g=5e3;function y(e,t,n,r){var o=n;return(0,m.iO)(e,o,{idmKind:d.wf.ACCOUNT,responsible:t,inheritAcl:r})}function A(e,t,n){var r=f+t+n;return a().v3.set({path:r},e)}function C(e,t){return function(){var n,r,o=t.abcService,i=t.account,u=t.parentAccount,c=t.responsibles,l=t.createHome;return(n=i,r=u,a().v3.create({type:"account",attributes:{name:n,parent_name:r}}).then((function(e){return v.add({name:"create account",timeout:g,theme:"success",title:"".concat(n," successfully created")}),e})).catch((function(e){return v.add({name:"create account",timeout:p,theme:"danger",title:"Failed to create account ".concat(n),content:e.message,actions:[{label:" view",onClick:function(){return(0,h.eW)(e)}}]}),Promise.reject(e)}))).then((function(){var t=o||{},n=t.id,r=t.slug;return Promise.all([b(i,n,r).catch((function(){})),l?S(i).catch((function(){})):Promise.resolve(),y(e,c,i,u!==s.$T).catch((function(){}))])}))}}function x(e,t){return a().v3.set({path:f+e+"/@parent_name"},t).then((function(t){return v.add({name:"set parent for account",timeout:g,theme:"success",title:"".concat(e,"'s Parent updated successfully")}),t})).catch((function(t){return v.add({name:"set parent for account",timeout:p,theme:"danger",title:"Failed to set Parent for ".concat(e),content:t.message,actions:[{label:" view",onClick:function(){return(0,h.eW)(t)}}]}),Promise.reject(t)}))}function b(e,t,n){return t&&n?a().v3.set({path:f+e+"/@abc"},{id:t,slug:n}).then((function(t){return v.add({name:"account abc service",timeout:g,theme:"success",title:"".concat(e,"'s ABC Service updated successfully")}),t})).catch((function(t){return v.add({name:"account abc service",timeout:p,theme:"danger",title:"Failed to set ABC for ".concat(e),content:t.message,actions:[{label:" view",onClick:function(){return(0,h.eW)(t)}}]}),Promise.reject(t)})):Promise.resolve()}function S(e){return a().v3.set({path:"//sys/accounts/".concat(e,"/@resource_limits/node_count")},1).then((function(){return a().v3.create({type:"map_node",path:"//home/"+e,attributes:{account:e}}).then((function(t){return v.add({name:"account create home",timeout:g,theme:"success",title:"".concat(e,"'s home directory created successfully")}),t}))})).catch((function(t){return v.add({name:"account create home",timeout:p,theme:"danger",title:"Failed to create home for ".concat(e),content:t.message,actions:[{label:" view",onClick:function(){return(0,h.eW)(t)}}]}),Promise.reject(t)}))}function _(e){return a().v3.remove({path:"//sys/accounts/"+e})}var k=o()(u.BI,(function(e,t){return e.push({value:t,text:c.A.format.ReadableField(t),show:!0}),e}),[])},97094:()=>{}}]);
|
2
|
-
//# sourceMappingURL=7959.
|
1
|
+
"use strict";(self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[7959],{97536:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(40319),o=n(18801),i=(n(77810),n(2211)),a=n(60620),s=n(64922),u=["view","size"];function c(e){var t=e.view,n=void 0===t?"flat-secondary":t,c=e.size,l=void 0===c?"m":c,d=(0,o.A)(e,u);return(0,s.jsx)(i.A,(0,r.A)((0,r.A)({view:n,size:l},d),{},{children:(0,s.jsx)(a.A,{awesome:"at"})}))}},71412:(e,t,n)=>{n.d(t,{W9:()=>S,Ay:()=>_,Fl:()=>x,$x:()=>C});var r=n(40319),o=n(18801),i=n(29121),a=n(12937),s=n(10785),u=n(26718),c=n(77810),l=n(76872),d=n(65692),h=n(34380),m=n(73822),f=n(53332),v=n(26264),p=n(64922),g=["value","onChange","min","max","validator","format","defaultValue"],y=["value","error","onChange"],A=(0,l.A)("yt-number-input");function C(e,t){if(""!==e){var n=e.replace(/\s/g,"");return"Bytes"===t?(0,f.z_)(n):Number(n)}}function x(e,t,n){if(void 0===e)return"";var r="Bytes"===t?m.A.format.Bytes(e,n):m.A.format.Number(e,n);return r===m.A.format.NO_VALUE?"":r}function b(e){return void 0===e?"":e}var S=function(e){(0,s.A)(n,e);var t=(0,u.A)(n);function n(){var e;(0,i.A)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={parsedValue:NaN},e.onChange=function(t){var r=e.parseValue(t),o=n.errorFromValue(r,e.props),i=e.format(null==r?void 0:r.value);e.setState({parsedValue:null==r?void 0:r.value,parsedError:o,rawValue:t,formattedValue:i}),(0,e.props.onChange)({value:null==r?void 0:r.value,error:o})},e.onBlur=function(){e.setState({focused:!1})},e.onFocus=function(){e.setState({focused:!0})},e.onKeyDown=function(t){t.keyCode===v.DD.ENTER&&e.props.onEnterKeyDown&&e.props.onEnterKeyDown()},e}return(0,a.A)(n,[{key:"parseValue",value:function(e){return this.props.parseFn?this.props.parseFn(e):{value:C(e,this.props.format)}}},{key:"format",value:function(e){var t=this.props,n=t.format,r=t.decimalPlaces,o=t.formatFn;return o?o(e):x(e,n,{digits:r})}},{key:"getRestProps",value:function(){var e=this.props;return e.value,e.onChange,e.min,e.max,e.validator,e.format,e.defaultValue,(0,o.A)(e,g)}},{key:"renderMinMaxHint",value:function(){var e=this.props,t=e.min,n=e.max,r=e.showHint,o=e.size,i=!isNaN(t),a=!isNaN(n);return r&&(i||a)?(0,p.jsxs)("div",{className:A("hint",{size:o}),children:[i&&(0,p.jsxs)(h.m,{content:String(t),placement:"bottom",children:["min: ",(0,p.jsx)("b",{children:this.format(t)})]}),i&&(0,p.jsx)(p.Fragment,{children:" "}),a&&(0,p.jsxs)(h.m,{content:String(n),placement:"bottom",children:["max: ",(0,p.jsx)("b",{children:this.format(n)})]})]}):null}},{key:"renderPrettyValue",value:function(){var e=this.props,t=e.size,n=e.hidePrettyValue,r=this.state.formattedValue;return n?null:(0,p.jsxs)("div",{className:A("pretty-value",{size:t}),children:[r," "]})}},{key:"renderDefaultValue",value:function(){var e=this.props,t=e.defaultValue,n=e.defaultValueClassName;return(0,p.jsx)(d.k,{disabled:!0,className:n,value:this.format(t),pin:"clear-round"})}},{key:"isBottomLineVisible",value:function(){var e=this.props.bottomLineVisibility,t=this.state.focused;return"visible"===e||t&&"focused"===e}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.className,o=e.showHint,i=e.hidePrettyValue,a=e.showDefaultValue,s=this.state,u=s.parsedError,l=s.rawValue,h=s.formattedValue,m=s.focused,f=this.getRestProps(),v=f.size,g=f.view,y=f.hasClear,C=(null!=t?t:{}).error||u,x=m?l:h;return(0,p.jsxs)("div",{className:A(null,n),children:[(0,p.jsxs)("div",{className:A("top"),children:[(0,p.jsx)(d.k,(0,r.A)((0,r.A)({},f),{},{error:C,autoComplete:!1,onUpdate:this.onChange,onKeyDown:this.onKeyDown,hasClear:y,value:x,size:v,view:g,onBlur:this.onBlur,onFocus:this.onFocus,pin:a?"round-brick":void 0})),a&&this.renderDefaultValue()]}),!C&&this.isBottomLineVisible()&&(0,p.jsx)(c.Fragment,{children:!o||m&&!i?this.renderPrettyValue():this.renderMinMaxHint()})]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.value,o=e.format,i=e.preciseInitialRawValue,a=e.decimalPlaces,s=e.formatFn;if(void 0===t.rawValue){var u=s?s(null==r?void 0:r.value):x(null==r?void 0:r.value,o,{digits:a});return{parsedValue:null==r?void 0:r.value,parsedError:n.errorFromValue(r,e),rawValue:i?b(null==r?void 0:r.value):u,formattedValue:u}}return null}},{key:"errorFromValue",value:function(e,t){var n=t.validator,r=void 0===n?function(){}:n,o=t.min,i=t.max,a=t.integerOnly,s=e||{},u=s.value,c=s.error;if(c)return c;if(null!=u){try{if(isNaN(u))return"wrong format";var l=r(u);if(l)return l}catch(c){return String(c)}return a&&u%1!=0?"The value must be an integer":void 0!==o&&u<o?"The value must be ≥ ".concat(o):void 0!==i&&u>i?"The value must be ≤ ".concat(i):void 0}}}]),n}(c.Component);S.defaultProps={size:"m",view:"normal",hasClear:!0,bottomLineVisibility:"visible"};var _=function(e){(0,s.A)(n,e);var t=(0,u.A)(n);function n(){var e;(0,i.A)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).onChange=function(t){e.props.onChange(null==t?void 0:t.value)},e}return(0,a.A)(n,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.error,i=(e.onChange,(0,o.A)(e,y));return(0,p.jsx)(S,(0,r.A)((0,r.A)({},i),{},{onChange:this.onChange,value:{value:t,error:n}}))}}],[{key:"format",value:function(e,t,n){return x(e,t,n)}}]),n}(c.Component)},70406:(e,t,n)=>{n.d(t,{A:()=>m});var r=n(29121),o=n(12937),i=n(10785),a=n(26718),s=n(77810),u=n(76872),c=n(73822),l=n(71412),d=n(64922),h=(0,u.A)("yt-quota-editor"),m=function(e){(0,i.A)(n,e);var t=(0,a.A)(n);function n(){var e;(0,r.A)(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).onEnterKeyDown=function(){var t=e.props.onEnterKeyDown;(void 0===t?function(){}:t)()},e.onBytesChange=function(t){var n=e.props,r=n.onChange,o=n.sourceAccount;r({limit:null==t?void 0:t.value,source:o,error:(null==t?void 0:t.error)||e.checkForError(null==t?void 0:t.value,o)})},e.onAccountChange=function(t){var n=e.props,r=n.onChange,o=n.limit;r({limit:o,source:t,error:n.error||e.checkForError(o,t)})},e}return(0,o.A)(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.format,r=e.sourceSuggestTitle,o=e.renderSourceSuggest,i=e.sourceAccount,a=e.limitInputTitle,u=e.showHint,c=e.error,m=e.decimalPlaces,f=e.sourceSuggestDisabled;return(0,d.jsxs)("div",{className:h(null,t),children:[o&&(0,d.jsxs)("div",{className:h("item"),children:[(0,d.jsx)("div",{className:h("item-title"),children:r||"Account to distribution"}),o({value:i||"",onChange:this.onAccountChange,disabled:f}),(0,d.jsx)("div",{className:h("free"),children:(0,d.jsxs)(s.Fragment,{children:["Free to distribute",(0,d.jsxs)("span",{className:h("free-value"),children:[" ",this.getFreeFormatted()]})]})})]}),(0,d.jsxs)("div",{className:h("item"),children:[(0,d.jsx)("div",{className:h("item-title"),children:a||"New quota limit"}),(0,d.jsx)(l.W9,{onChange:this.onBytesChange,value:{value:this.getLimit(),error:c},format:n,showHint:u,min:this.getMinLimit(),max:this.getMaxLimit(),onEnterKeyDown:this.onEnterKeyDown,decimalPlaces:m,qa:"quota-editor-new-limit"})]})]})}},{key:"getLimit",value:function(){var e=this.props,t=e.limit,n=e.prevLimit;return void 0!==t?t:n}},{key:"getFreeImpl",value:function(){var e=this.props.sourceAccount,t=this.calcLimitTotal(e),n=t.limit,r=t.total,o=t.allowChildrenOverCommit,i=t.totalChildrenLimit,a=void 0===i?0:i;if(void 0===n||void 0===r)return{};if(o){var s=Math.max(0,n);return{free:s,maxValue:s}}var u=this.props.prevLimit,c=void 0===u?0:u,l=this.props.limit,d=void 0===l?c:l,h=Math.max(0,n-a);return{free:h+c-d,maxValue:h+c}}},{key:"getFree",value:function(){return this.getFreeImpl().free}},{key:"calcLimitTotal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.props.getInfoByName(e)}},{key:"getMinLimit",value:function(){var e=this.props.min;if(void 0!==e)return e;var t=this.props,n=t.currentAccount,r=(0,t.getInfoByName)(n),o=r.totalChildrenLimit;return(r.total||0)+(o||0)}},{key:"getMaxLimit",value:function(){var e=this.props.max;return void 0!==e?e:this.getFreeImpl().maxValue}},{key:"getFreeFormatted",value:function(){return this.props.sourceAccount?l.Ay.format(Number(this.getFree()),this.props.format):c.A.format.NO_VALUE}},{key:"checkForError",value:function(e,t){if(void 0!==e){if(isNaN(e))return"wrong format!";if(this.props.currentAccount===t)return"The same source account";if(!(e<=this.props.prevLimit)){var n=this.getMaxLimit();return t&&(void 0===n||e>n)?"New value is too big":void 0}}}}]),n}(s.Component)},9772:(e,t,n)=>{n.d(t,{A:()=>g});var r=n(29121),o=n(12937),i=n(10785),a=n(26718),s=n(77810),u=n(76872),c=n(60620),l=n(93209),d=n(2211),h=n(71412),m=n(48109),f=n(70406),v=n(64922),p=(0,u.A)("yt-quota-editor-with-hide"),g=function(e){(0,i.A)(n,e);var t=(0,a.A)(n);function n(){var e;(0,r.A)(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).state={},e.onYes=function(){var t=e.calcLimitTotal(e.props.currentAccount).limit,n=void 0===t?0:t,r=e.getLimit()||0;e.props.onSave(r,r-n,e.getDistributeAccount()),e.setState({showConfirm:!1}),e.props.onHide()},e.onCancel=function(){e.setState({showConfirm:!1})},e.onChange=function(t){var n=t.limit,r=t.source,o=t.error,i=e.props,a=i.parentOfCurrentAccount,s=i.limit;e.setState({newLimit:n,account:r,accountChanged:r!==a,isReadyToSave:!o&&n!==s&&void 0!==n})},e.onSave=function(){e.state.isReadyToSave&&e.setState({showConfirm:!0})},e}return(0,o.A)(n,[{key:"render",value:function(){return this.state.showConfirm?this.renderConfirmation():this.renderEditor()}},{key:"renderConfirmation",value:function(){var e=this.props,t=e.className,n=e.limit;return(0,v.jsxs)("div",{className:p("confirm",t),children:[(0,v.jsx)("div",{className:p("confirm-notice"),children:"Do you really want to change the quota limit?"}),(0,v.jsxs)("div",{className:p("confirm-details"),children:["The previous value is ",this.renderLimit(n),", the new value is"," ",this.renderLimit(this.getLimit())]}),(0,v.jsxs)("div",{className:p("confirm-actions"),children:[(0,v.jsx)(d.A,{className:p("confirm-btn"),view:"action",onClick:this.onYes,qa:"quota-editor-confirmation-yes",children:"Yes"}),(0,v.jsx)(d.A,{className:p("confirm-btn"),view:"flat-secondary",onClick:this.onCancel,children:"Cancel"})]})]})}},{key:"renderLimit",value:function(e){var t=this.props.format;return(0,v.jsx)("span",{className:p("confirm-limit"),children:h.Ay.format(e,t)})}},{key:"renderEditor",value:function(){var e=this.props,t=e.className,n=e.onHide,r=this.state.isReadyToSave;return(0,v.jsxs)("div",{className:p(null,[t,"yt-special-background"].filter(Boolean).join(" ")),children:[(0,v.jsxs)("div",{className:p("top"),children:["Edit Quota limit",(0,v.jsx)(l.S,{className:p("hide"),color:"secondary",onClick:n,children:(0,v.jsx)(c.A,{awesome:"times",face:"light"})})]}),(0,v.jsxs)("div",{className:p("controls"),children:[this.renderControl(),(0,v.jsxs)("div",{className:p("controls-item",{save:!0}),children:[(0,v.jsx)("div",{className:p("control-title"),children:" "}),(0,v.jsx)(d.A,{size:"m",view:"action",disabled:!r,onClick:this.onSave,qa:"quota-editor-save",children:"Save"})]})]})]})}},{key:"renderControl",value:function(){var e=this.props,t=e.format,n=e.limit,r=e.min,o=e.max,i=e.currentAccount,a=e.getInfoByName,s=e.sourceSuggestTitle,u=e.renderSourceSuggest;return(0,v.jsx)(f.A,{className:p("grow"),currentAccount:i,sourceAccount:this.getDistributeAccount(),getInfoByName:a,sourceSuggestTitle:s,renderSourceSuggest:u,format:t,limit:this.getLimit(),prevLimit:n,onChange:this.onChange,onEnterKeyDown:this.onSave,min:r,max:o})}},{key:"getLimit",value:function(){var e=this.state.newLimit,t=this.props.limit;return void 0!==e?e:t}},{key:"getDistributeAccount",value:function(){var e=this.state,t=e.account,n=e.accountChanged?t:this.props.parentOfCurrentAccount;return n===m.$T?"":n}},{key:"calcLimitTotal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.props.getInfoByName(e)}}]),n}(s.Component)},38226:(e,t,n)=>{n.d(t,{A:()=>y});var r,o=n(29121),i=n(12937),a=n(10785),s=n(26718),u=n(68175),c=n(77810),l=n(76872),d=n(64772),h=n(60620),m=n(34380),f=n(44458),v=n(64922),p=(0,l.A)("sort-icon"),g=(r={},(0,u.A)(r,"","sort"),(0,u.A)(r,"asc","sort-up"),(0,u.A)(r,"desc","sort-down"),(0,u.A)(r,"asc-undefined","arrow-to-bottom"),(0,u.A)(r,"desc-undefined","arrow-from-bottom"),(0,u.A)(r,"undefined-asc","arrow-from-top"),(0,u.A)(r,"undefined-desc","arrow-to-top"),r),y=function(e){(0,a.A)(n,e);var t=(0,s.A)(n);function n(){var e;(0,o.A)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).onClick=function(){var t=e.props,n=t.order,r=t.onChange,o=t.allowUnordered,i=t.withUndefined;r&&r((0,f.$N)(n,o,i))},e}return(0,i.A)(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.label,r=e.order,o=e.hidden,i=g[r||""];return(0,v.jsxs)("span",{className:p({hidden:o},t),onClick:this.onClick,children:[n&&(0,v.jsx)("span",{className:p("label"),children:n}),(0,v.jsx)(m.m,{className:p("icon"),content:r?d.A.ReadableField(r):"Unordered",children:(0,v.jsx)(h.A,{awesome:i,face:"solid"})})]})}}]),n}(c.Component)},77723:(e,t,n)=>{n.d(t,{A:()=>N});var r=n(9736),o=n(29121),i=n(12937),a=n(79261),s=n(10785),u=n(26718),c=n(77810),l=n(75826),d=n.n(l),h=n(25147),m=n.n(h),f=n(76872),v=n(23313),p=n.n(v),g=n(95603),y=n.n(g),A=n(90636),C=n.n(A),x=n(65692),b=n(55740),S=n(29241),_=n(64922),k=(0,f.A)("suggest"),N=(d().arrayOf(d().oneOfType([d().string,d().shape({value:d().string,text:d().string,counter:d().oneOfType([d().string,d().number])})])),function(e){(0,s.A)(n,e);var t=(0,u.A)(n);function n(e){var r;return(0,o.A)(this,n),(r=t.call(this,e)).input=c.createRef(),r.isClearClicked=!1,r.isUnmounting=!1,r.skipApplyForNextBlur=!1,r.onTextUpdate=function(e){var t=r.props,n=t.clear,o=t.onTextUpdate;r.setState({text:e}),r.loadSuggestions(e),e.length||null==n||n(),null==o||o(e)},r.showSuggestions=function(e){var t,n;r.isUnmounting||(r.setState({items:e,popupVisible:!0,selectedIndex:0}),null===(t=(n=r.props).onOpenChange)||void 0===t||t.call(n,{open:!0}))},r.state={text:"text"in e?e.text:e.defaultText,items:e.items,selectedIndex:0,popupVisible:!1,prevItems:[]},r.onFocus=r.onFocus.bind((0,a.A)(r)),r.onBlur=r.onBlur.bind((0,a.A)(r)),r.onKeyDown=r.onKeyDown.bind((0,a.A)(r)),r.hideSuggestions=r.hideSuggestions.bind((0,a.A)(r)),r.clearSuggestions=r.clearSuggestions.bind((0,a.A)(r)),r}return(0,i.A)(n,[{key:"componentDidMount",value:function(){this.isClearClicked=!1}},{key:"componentWillUnmount",value:function(){this.isUnmounting=!0}},{key:"onFocus",value:function(){var e,t;this.setState({focused:!0}),this.isClearClicked=!1,this.loadSuggestions(this.state.text),this.skipApplyForNextBlur=!1,null===(e=(t=this.props).onFocus)||void 0===e||e.call(t)}},{key:"onBlur",value:function(){var e,t,n;this.hideSuggestions(),this.isClearClicked||null===(e=(t=this.props).onBlur)||void 0===e||e.call(t),this.skipApplyForNextBlur||this.applySuggestion(null!==(n=this.state.text)&&void 0!==n?n:""),this.setState({focused:!1})}},{key:"onKeyDown",value:function(e){var t=e.keyCode;if(40===t)e.preventDefault(),this.selectNextSuggestion();else if(38===t)e.preventDefault(),this.selectPrevSuggestion();else if(13===t)this.applyOrClearSuggestion();else if(27===t){var n;null===(n=this.input.current)||void 0===n||n.blur()}}},{key:"hideSuggestions",value:function(){var e,t;this.setState({items:[],popupVisible:!1,selectedIndex:0}),null===(e=(t=this.props).onOpenChange)||void 0===e||e.call(t,{open:!1})}},{key:"loadSuggestions",value:function(e){var t=this.props,n=t.filter,r=t.items;Promise.resolve(n(r,e)).then(this.showSuggestions)}},{key:"clearSuggestions",value:function(){var e,t=this.props.clear;null==t||t(),this.isClearClicked=!0,null===(e=this.input.current)||void 0===e||e.blur()}},{key:"applySuggestion",value:function(e){var t,n=this.props.apply;this.setState({text:e}),null==n||n(e),null===(t=this.input.current)||void 0===t||t.blur()}},{key:"getItemIndex",value:function(e){return e-1}},{key:"getSelectedIndex",value:function(e){return e+1}},{key:"getItemValue",value:function(e){return"string"==typeof e?e:e.value}},{key:"applyOrClearSuggestion",value:function(){var e,t=this.state,n=t.selectedIndex,r=t.items;if(0===n?r.length>0&&(e=r[0]):e=r[this.getItemIndex(n)],e){var o=this.getItemValue(e);this.applySuggestion(o);var i=this.props.onItemClick;null==i||i(e)}}},{key:"selectPrevSuggestion",value:function(){var e=this.state,t=e.selectedIndex,n=e.items,r=0===t?this.getSelectedIndex(n.length-1):t-1;this.setState({selectedIndex:r})}},{key:"selectNextSuggestion",value:function(){var e=this.state,t=e.selectedIndex,n=e.items,r=t===this.getSelectedIndex(n.length-1)?0:t+1;this.setState({selectedIndex:r})}},{key:"renderInput",value:function(){var e=this.state.text,t=this.props,n=t.placeholder,r=t.autoFocus,o=t.disabled,i=t.pin;return(0,_.jsx)(x.k,{hasClear:!0,value:e,className:k("control"),placeholder:n,disabled:o,onUpdate:this.onTextUpdate,onFocus:this.onFocus,onBlur:this.onBlur,autoFocus:r,controlRef:this.input,pin:i,onKeyDown:this.onKeyDown})}},{key:"renderCounter",value:function(e){var t=e.counter;return void 0!==t&&(0,_.jsx)("span",{className:k("item-counter"),children:t})}},{key:"renderSimpleItem",value:function(e){var t="string"==typeof e?e:e.text;return(0,_.jsxs)("span",{children:["string"!=typeof e&&this.renderCounter(e),t]})}},{key:"renderItem",value:function(e,t,n,r){var o=this,i=this.state.selectedIndex,a=k("item",{selected:i===this.getSelectedIndex(t)?"yes":void 0},r),s=this.getItemValue(e),u=this.props,c=u.template,l=u.renderItem,d=u.onItemClick,h=null!=l?l:void 0!==c?S.Ay.get(c.key).__default__:this.renderSimpleItem.bind(this);return(0,_.jsx)("li",{title:s,className:a,onMouseDown:function(){o.skipApplyForNextBlur=!0,null==d||d(e),o.applySuggestion(s)},children:h(e)},n)}},{key:"getInputWidth",value:function(){return this.input.current?this.input.current.offsetWidth-2:0}},{key:"restrictItems",value:function(e){var t=this.props.maxItems;if(p()(t))return e.slice(0,t||e.length);if(y()(t)){var n=t.totalAmount,o=t.groupPredicate,i=C()(e,o),a=(0,r.A)(i,2),s=a[0],u=a[1];if(s.length&&u.length){var c=Math.round(Math.max(s.length/e.length*n,1));return s.slice(0,c).concat(u.slice(0,n-c))}return e.slice(0,n||e.length)}return e}},{key:"renderSuggestions",value:function(e){var t=this,n=k("wrapper"),r=k("items"),o=0===e.length&&this.state.text;return e&&(0,_.jsxs)("div",{className:n,children:[o&&this.renderItem("No items",-1,"no_items",k("no-items")),(0,_.jsx)("ul",{className:r,style:{minWidth:this.getInputWidth()},children:(0,_.jsx)(m(),{itemRenderer:function(n,r){return t.renderItem(e[n],n,r)},length:e.length,type:"uniform"})})]})}},{key:"renderPopup",value:function(){var e=this.props,t=e.popupClassName,n=e.popupPlacement,r=this.state.popupVisible,o=this.restrictItems(this.state.items);return(0,_.jsx)(b.z,{className:t,placement:null!=n?n:["bottom-start","top-start"],anchorRef:this.input,open:!this.isClearClicked&&r&&o.length>0,onClose:this.hideSuggestions,children:this.renderSuggestions(o)})}},{key:"render",value:function(){var e=this.props.className;return(0,_.jsxs)("div",{className:k(null,e),children:[this.renderInput(),this.renderPopup()]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=!t.focused&&"text"in e?e.text:t.text;return e.items===t.prevItems&&n===t.text?null:{items:e.filter(e.items,n),prevItems:e.items,text:n}}}]),n}(c.Component));N.defaultProps={disable:!1,text:"",autoFocus:!1,items:[],zIndexGroupLevel:1,onBlur:function(){},focused:!1}},60680:(e,t,n)=>{n.d(t,{yN:()=>l,uL:()=>v,IS:()=>f,L1:()=>c,W1:()=>d,N5:()=>h,T1:()=>m});var r=n(40319),o=(n(77810),n(76872)),i=n(3659),a=n(53332),s=n(64922),u=(0,o.A)("yt-text");function c(e){var t=e.children,n=e.disabled;return(0,s.jsx)("span",{className:u("secondary",{disabled:n}),children:t})}function l(e){var t=e.children;return(0,s.jsx)("span",{className:u("bold"),children:t})}function d(e){var t=e.children;return(0,s.jsx)(c,{children:(0,s.jsx)(l,{children:t})})}function h(e){var t=e.children,n=e.className;return(0,s.jsx)("span",{className:u("warning",n),children:t})}function m(e){var t=e.children,n=e.className;return(0,s.jsx)("span",{className:u("warning-light",n),children:t})}function f(e){var t=e.children;return(0,s.jsx)("span",{className:u("no-wrap"),children:t})}function v(e){var t=e.text,n=e.onClick,o=i.A.prettyprint(t,(0,r.A)((0,r.A)({},a.EP),{},{asHTML:!0}));return(0,s.jsx)("span",{onClick:n,className:u("escaped"),dangerouslySetInnerHTML:{__html:o}})}},37175:(e,t,n)=>{n.d(t,{A:()=>m,_:()=>h}),n(77810);var r=n(76426),o=n(48109),i=n(26264),a=n(15647),s=n(27497),u=n(73822),c=n(34380),l=n(28640),d=n(64922);function h(e,t){return"/".concat(e,"/").concat(i.YW.ACCOUNTS,"/").concat(o.yE.GENERAL,"?account=").concat(t)}function m(e){var t=e.cluster,n=e.account,o=e.className,i=e.inline,m=(0,a.d4)(s.dB),f=t||m;return(0,d.jsx)(c.m,{ellipsis:i,className:o,content:n?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.A,{text:n,view:"flat-secondary"})," ",n]}):null,children:n?(0,d.jsx)(r.A,{theme:"primary",routed:!0,url:h(f,n),children:n}):u.A.format.NO_VALUE})}},84656:(e,t,n)=>{n.d(t,{Oo:()=>x,Dk:()=>_,_C:()=>S,Ay:()=>b});var r=n(40319),o=n(9736),i=n(77810),a=n(15647),s=n(27528),u=n.n(s),c=n(76872),l=n(82060),d=n(48109),h=n(99526),m=n(10352),f=n(88681),v=n(40519),p=n(64714),g=n(50074),y=n(64922),A=(0,c.A)("accounts-suggest"),C="<Root>";function x(e){var t=e.items,n=e.onChange,r=e.placeholder,o=e.allowRootAccount,i=e.disabled,a=e.validate,s=void 0===a?function(){}:a,c=e.touched,l=e.value,h=u()(t,(function(e){return{value:e,text:e}}));o&&h.splice(0,0,{value:d.$T,text:C});var m=c&&s(l);return(0,y.jsxs)("div",{className:A({empty:!l,error:Boolean(m)}),children:[(0,y.jsx)(g.L,{disabled:i,items:h,onChange:n,placeholder:r,value:l,width:"max",hideClear:!0}),m&&(0,y.jsx)("div",{className:A("error"),children:m})]})}x.isEmpty=function(e){return!e},x.getDefaultValue=function(){return""},x.hasErrorRenderer=!0;const b=(0,a.Ng)((function(e){return{items:(0,m.SD)(e)}}))(x);var S=(0,a.Ng)((function(e){return{items:(0,h.nD)(e)}}))(x);function _(e){var t=i.useState({items:[]}),n=(0,o.A)(t,2),a=n[0],s=a.items,u=a.error,c=n[1];return i.useMemo((function(){(0,f.IF)(p.Vu.listAccounts,(0,r.A)({path:"//sys/accounts"},v.R)).then((function(e){c({items:e})})).catch((function(e){c({error:e})}))}),[]),(0,y.jsxs)(i.Fragment,{children:[(0,y.jsx)(x,(0,r.A)((0,r.A)({},e),{},{items:s||[]})),u&&(0,y.jsx)(l.A,{error:u})]})}_.isEmpty=function(e){return!e},_.getDefaultValue=function(){return d.$T}},10199:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(29121),o=n(12937),i=n(4617),a=n(44623),s=function(){function e(t){(0,r.A)(this,e),Object.assign(this,t.perMedium,t.masterMemoryResources,t)}return(0,o.A)(e,[{key:"getDiskSpaceProgressInfo",value:function(t,n){var r=e.GetDataPerMedium(this,t,n);return r?{committed:r.committedDiskSpace,uncommitted:r.uncommittedDiskSpace,total:r.totalDiskSpace,limit:r.diskSpaceLimit,theme:r.diskSpaceProgressTheme,progress:r.diskSpaceProgress,progressText:r.diskSpaceProgressText}:{}}},{key:"getResourceInfoSource",value:function(e){return e&&this.hasRecursiveResources?this.recursiveResources:this}},{key:"getNodeCountProgressInfo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getResourceInfoSource(e);return{committed:t.committedNodeCount,uncommitted:t.uncommittedNodeCount,total:t.totalNodeCount,limit:t.nodeCountLimit,theme:t.nodeCountProgressTheme,progress:t.nodeCountProgress,progressText:t.nodeCountProgressText}}},{key:"getChunkCountProgressInfo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getResourceInfoSource(e);return{committed:t.committedChunkCount,uncommitted:t.uncommittedChunkCount,total:t.totalChunkCount,limit:t.chunkCountLimit,theme:t.chunkCountProgressTheme,progress:t.chunkCountProgress,progressText:t.chunkCountProgressText}}},{key:"getTabletCountProgressInfo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getResourceInfoSource(e);return{committed:t.committedTabletCount,uncommitted:t.uncommittedTabletCount,total:t.totalTabletCount,limit:t.tabletCountLimit,theme:t.tabletCountProgressTheme,progress:t.tabletCountProgress,progressText:t.tabletCountProgressText}}},{key:"getTabletStaticMemoryInfo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getResourceInfoSource(e);return{committed:t.committedTabletStaticMemory,uncommitted:t.uncommittedTabletStaticMemory,total:t.totalTabletStaticMemory,limit:t.tabletStaticMemoryLimit,theme:t.tabletStaticMemoryProgressTheme,progress:t.tabletStaticMemoryProgress,progressText:t.tabletStaticMemoryProgressText}}},{key:"getMasterMemoryMediumInfo",value:function(e,t){return this.getResourceInfoSource(e)[(0,a.o$)("master_memory/"+t)]}}],[{key:"prepareProgressStack",value:function(e,t,n,r){var o=t>0?e+t:e,a=Math.max(o,n);return[{value:(0,i.jP)(t<0?e+t:e,a),theme:r},{value:(0,i.jP)(Math.abs(t),a)}]}},{key:"GetDataPerMedium",value:function(e,t,n){if(n){var r=e.recursiveResources;if(t)return r.perMedium&&r.perMedium[t]}return t?e.perMedium&&e.perMedium[t]:e}}]),e}()},44187:(e,t,n)=>{n.d(t,{A:()=>_,o:()=>x});var r=n(28407),o=n(29121),i=n(12937),a=n(10785),s=n(26718),u=n(70232),c=n.n(u),l=n(77810),d=n(15647),h=n(76872),m=n(20330),f=n(22843),v=n(27497),p=n(79366),g=n(84656),y=(n(97094),n(7787)),A=n(64922),C=(0,h.A)("accounts-editor");function x(e){var t=e.header,n=e.children;return(0,A.jsxs)("div",{className:C(null,"elements-section"),children:[(0,A.jsx)("div",{className:C(null,"elements-heading_size_s"),children:t}),n]})}var b=function(e){(0,a.A)(n,e);var t=(0,s.A)(n);function n(){var e;(0,o.A)(this,n);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return(e=t.call.apply(t,[this].concat(a))).state={abcId:void 0,abcTitle:"",responsibleKey:0},e.onParentChange=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).isOutsideClick)e.forceUpdate();else{var n=e.props,r=n.account,o=r.name,i=r.parent,a=n.setAccountParent;if(i!==t)return a(o,t)}},e.onAbcServiceChanged=function(){var t=(0,r.A)(c().mark((function t(n){var r,o,i,a,s,u,l,d,h,f,v,p=arguments;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(p.length>1&&void 0!==p[1]?p[1]:{}).isOutsideClick){t.next=4;break}return e.forceUpdate(),t.abrupt("return");case 4:if(o=(r=null!=n?n:{}).id,i=r.slug,a=e.props,s=a.account,u=s.name,l=s.abc,h=(d=void 0===l?{}:l).slug,f=d.id,v=a.loadEditedAccount,o!==f||h!==i){t.next=8;break}return t.abrupt("return");case 8:return t.next=10,(0,m.cg)(u,o,i);case 10:v(u);case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return(0,i.A)(n,[{key:"renderParentAccount",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.isDeveloper;return(0,A.jsx)(x,{header:"Parent",children:(0,A.jsx)(g._C,{value:e,onChange:this.onParentChange,disabled:!t,allowRootAccount:!0})})}},{key:"renderAbcServiceId",value:function(){var e=this.props,t=e.account.abc,n=t.id,r=t.slug,o=e.isDeveloper,i=y.Ay.renderControlAbcService({value:{id:n,slug:r},onChange:this.onAbcServiceChanged,placeholder:"Select ABC service...",disabled:!o});return i?(0,A.jsx)(x,{header:"ABC Service",children:i}):null}},{key:"render",value:function(){var e=this.props.account.parent;return(0,A.jsxs)(l.Fragment,{children:[this.renderAbcServiceId(),this.renderParentAccount(e)]})}}]),n}(l.Component),S={loadEditedAccount:f.Pm,setAccountParent:f.cV};const _=(0,d.Ng)((function(e){return{cluster:(0,v.dB)(e),isDeveloper:(0,p.d)(e)}}),S)(b)},25991:(e,t,n)=>{n.d(t,{W:()=>u,p:()=>s});var r=n(27528),o=n.n(r),i=n(77333),a=n(44623);function s(e){return function(t){t({type:i.Hr,data:e})}}function u(e){return Promise.all(o()(e,(function(e){return Promise.resolve((0,a.N3)(e))})))}},22843:(e,t,n)=>{n.d(t,{$W:()=>D,AG:()=>M,Gs:()=>V,I$:()=>T,M7:()=>L,Pm:()=>I,Tq:()=>w,XG:()=>z,Y5:()=>F,_m:()=>B,cV:()=>O,hH:()=>j,i1:()=>R,iw:()=>E,jA:()=>P});var r=n(28407),o=n(9736),i=n(40319),a=n(70232),s=n.n(a),u=n(29746),c=n(49214),l=n.n(c),d=n(27528),h=n.n(d),m=n(19314),f=n(59028),v=n(13724),p=n(20330),g=n(48109),y=n(77333),A=n(40519),C=n(27497),x=n(10352),b=n(64714),S=n(25991),_=n(10199),k=n(11896),N=["abc","diskSpaceLimit","parent_name","responsibles","totalDiskSpace","resource_limits","resource_usage","committed_resource_usage","recursive_resource_usage","recursive_committed_resource_usage","recursive_violated_resource_limits","allow_children_limit_overcommit","total_children_resource_limits","folder_id"];function w(){return function(e,t){e({type:g.Vi.REQUEST});var n=t(),r=(0,C.dB)(n),a=(0,C.ID)(n),s=(0,x.BO)(n)?{}:A.R,c=[{command:"list",parameters:(0,i.A)((0,i.A)({path:"//sys/accounts/",attributes:N},A.v),s)},{command:"get",parameters:{path:"//sys/accounts/@",attributes:["total_resource_limits","total_resource_usage"]}},{command:"get",parameters:{path:"//sys/cluster_nodes/@",attributes:["available_space_per_medium","io_statistics_per_medium","used_space_per_medium"]}},{command:"get",parameters:{path:"//sys/users/"+a+"/@usable_accounts"}}],d=new b.CT(r,k.c.ACCOUNTS);return d.fetch(b.Vu.accountsData,b.Qq.executeBatch(b.Vu.accountsData,{requests:c})).then((function(t){e({type:y.Hr,data:{disableCacheForNextFetch:!1}});var n=(0,o.A)(t,4),r=n[0],i=r.error,a=r.output,s=n[1],c=s.error,m=s.output,f=n[2],v=f.error,p=f.output,A=n[3],C=A.error,x=A.output;Promise.resolve(i).then((function(t){if(t)throw t;var n=l()(u.Ay.getValue(a),(function(e){return u.Ay.getValue(e)!==g.$T}));return d.parse(b.Vu.accountsData,(0,S.W)(n)).then((function(t){e({type:g.Vi.SUCCESS,data:{accounts:h()(t,(function(e){return new _.A(e)}))}})}))})).catch((function(t){e({type:g.Vi.FAILURE,data:{error:t}})})),e(c?{type:g.Xt.FAILURE,data:{error:c}}:{type:g.Xt.SUCCESS,data:m}),e(v?{type:g.A2.FAILURE,data:{error:v}}:{type:g.A2.SUCCESS,data:p}),e(C?{type:g.VY.FAILURE,data:{error:C}}:{type:g.VY.SUCCESS,data:x})}))}}function j(){return function(e,t){var n=(0,x.F2)(t());return{type:y.Hr,data:{editCounter:n+1,disableCacheForNextFetch:!0}}}}function I(e){return function(t,n){var r=n(),i=(0,C.dB)(r);t({type:g.FM.REQUEST});var a=new b.CT(i,k.c.ACCOUNTS);return a.fetch(b.Vu.accountsEditData,b.Qq.get(b.Vu.accountsEditData,{path:"//sys/accounts/"+e+"/@",attributes:N})).then((function(t){return a.parse(b.Vu.accountsEditData,(0,S.W)([{$value:e,$attributes:t}]))})).then((function(e){var n=(0,o.A)(e,1)[0];t({type:g.FM.SUCCESS,data:{account:new _.A(n),cluster:i}})})).catch((function(){t({type:g.FM.FAILURE})}))}}function F(e){return function(t,n){var r=n().tables[g.G5];t({type:g.gt,data:{newFilter:e,sortState:r}})}}function M(e){return{type:g.lo,data:{account:e}}}function T(e){return function(t){return e&&t((0,v.vi)(e)),t({type:g.IC,data:{account:e}})}}function P(){return function(e){return e({type:g.Ps}),e(w())}}function V(e){return{type:g._5,data:{newFilter:e}}}function L(e){return{type:g.FO,data:{newFilter:e}}}function D(){return function(e,t){var n=t().tables[g.G5];e({type:g.vX,data:{sortState:n}})}}function B(e){return{type:g.pN,data:{treeState:e}}}function O(e,t){return function(){var n=(0,r.A)(s().mark((function n(r){return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,p.Qe)(e,t);case 2:return r(w()),n.next=5,r(I(e));case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}function z(e){return function(t){return t((0,f.ZC)(m.Ou.ACCOUNTS.DASHBOARD_VISIBILITY_MODE,m.dK.ACCOUNTS,e))}}function E(e){return function(t){return t((0,f.ZC)(m.Ou.ACCOUNTS.ACCOUNTS_VISIBILITY_MODE,m.dK.ACCOUNTS,e))}}function R(e,t){return function(e){e({type:y.Hr,data:{abcServiceFilter:{slug:t}}})}}},94285:(e,t,n)=>{n.d(t,{DO:()=>z,GR:()=>K,JP:()=>k,K:()=>H,Nd:()=>P,QJ:()=>S,RC:()=>U,U5:()=>q,UI:()=>T,Xj:()=>V,dz:()=>C,jU:()=>E,l9:()=>A,p1:()=>x,px:()=>b,sD:()=>j,tC:()=>N,um:()=>y,uo:()=>L,v8:()=>M,vY:()=>w,yb:()=>D,zQ:()=>R});var r=n(49214),o=n.n(r),i=n(34455),a=n.n(i),s=n(27528),u=n.n(s),c=n(31285),l=n.n(c),d=n(18472),h=n(6184),m=n(27497),f=n(73928),v=n(53332),p=n(44458),g=n(94544),y=function(e){return e.chaos_cell_bundles.loaded},A=function(e){return e.chaos_cell_bundles.loading},C=function(e){return e.chaos_cell_bundles.bundlesSort},x=function(e){return e.chaos_cell_bundles.bundlesNameFilter},b=function(e){return e.chaos_cell_bundles.bundlesAccountFilter},S=function(e){return e.chaos_cell_bundles.bundlesTagNodeFilter},_=function(e){return e.chaos_cell_bundles.bundles},k=function(e){return e.chaos_cell_bundles.activeBundle},N=function(e){return e.chaos_cell_bundles.bundlesTableMode},w=(0,d.Mz)([_,k],(function(e,t){return a()(e,(function(e){return e.bundle===t}))})),j=(0,d.Mz)([_],(function(e){return(0,f.Sx)(e)})),I=new Set(["bundle","health","tabletCells","tablets","uncompressed","compressed","enable_bundle_balancer","node_tag_filter","memory","tablet_count","tablet_count_limit","tablet_count_free","tablet_count_percentage","tablet_static_memory","tablet_static_memory_limit","tablet_static_memory_free","tablet_static_memory_percentage"]),F=(0,d.Mz)([_,x,b,S],(function(e,t,n,r){var i=[];if(t){var a=t.toLowerCase();i.push((function(e){return-1!==e.bundle.toLowerCase().indexOf(a)}))}if(n){var s=n.toLowerCase();i.push((function(e){var t=e.changelog_account,n=e.snapshot_account;return Boolean(t)&&-1!==t.toLowerCase().indexOf(s)||Boolean(n)&&-1!==n.toLowerCase().indexOf(s)}))}if(r){var u=r.toLowerCase();i.push((function(e){var t=e.node_tag_filter;return Boolean(t)&&-1!==t.toLowerCase().indexOf(u)}))}return i.length?o()(e,h.concatByAnd.apply(void 0,i)):e})),M=(0,d.Mz)([F,C],(function(e,t){var n=t.column,r=t.order;return n&&r?(0,g.Af)({bundles:e,column:n,order:r,columnsSortable:I}):e})),T=function(e){return e.chaos_cell_bundles.cells},P=function(e){return e.chaos_cell_bundles.cellsSort},V=function(e){return e.chaos_cell_bundles.cellsIdFilter},L=function(e){return e.chaos_cell_bundles.cellsBundleFilter},D=function(e){return e.chaos_cell_bundles.cellsHostFilter},B=(0,d.Mz)([T,k],(function(e,t){return t?o()(e,(function(e){return Boolean(e.bundle)&&t===e.bundle})):e})),O=(0,d.Mz)([B,V,L,D,k],(function(e,t,n,r){var i=[];return t&&i.push((function(e){return-1!==e.id.indexOf(t)})),n&&i.push((function(e){return Boolean(e.bundle)&&-1!==e.bundle.indexOf(n)})),r&&i.push((function(e){return Boolean(e.peerAddress)&&-1!==e.peerAddress.indexOf(r)})),i.length?o()(e,h.concatByAnd.apply(void 0,i)):e}));function z(e,t){return e?o()(t,(function(t){return t.bundle===e})):[]}var E=(0,d.Mz)([O,P],(function(e,t){return(0,p.gn)(e,t)})),R=(0,d.Mz)([T],(function(e){return l()(u()(e,"bundle")).sort()})),U=(0,d.Mz)([B],(function(e){return l()(u()(e,"peerAddress")).sort()})),K=(0,d.Mz)([k,O],(function(e,t){return e?q(t):""}));function q(e){return l()(u()(e,(function(e){var t=e.peerAddress;return(0,v.Q4)(t)})).filter(Boolean)).sort().join("|")}var H=(0,d.Mz)([m.dB,k],(function(e,t){var n=[{text:"",href:(0,f.Hq)(e),title:"<bundles>"}];return t&&n.push({text:t,href:(0,f.j3)(e,t)}),n}))},39e3:(e,t,n)=>{n.d(t,{Az:()=>k,DL:()=>j,Es:()=>N,FG:()=>C,Gi:()=>x,O1:()=>p,Tf:()=>y,b6:()=>v,c6:()=>g,cD:()=>S,dm:()=>f,rV:()=>A,wz:()=>_});var r=n(13322),o=n(40319),i=n(18472),a=n(31285),s=n.n(a),u=n(29347),c=n.n(u),l=n(6184),d=n(44458),h=n(95942),m=function(e){return e.chyt.list.data},f=(0,i.Mz)([m],(function(e){var t=e.items,n=void 0===t?[]:t;return s()(n.map((function(e){return e.creator}))).sort()})),v=(0,i.Mz)([m],(function(e){var t=e.items,n=void 0===t?[]:t;return c()(s()(n.map((function(e){return e.health}))).sort())})),p=(0,i.Mz)([m],(function(e){var t=e.items,n=void 0===t?[]:t;return s()(n.map((function(e){return e.state}))).sort()})),g=function(e){return e.chyt.clique.currentClique},y=function(e){return e.chyt.listFilters.name},A=function(e){return e.chyt.listFilters.health},C=function(e){return e.chyt.listFilters.creator},x=function(e){return e.chyt.listFilters.state},b={instance_count:!0,total_cpu:!0,total_memory:!0,creation_time:!0,stage:!0,yt_operation_start_time:!0,yt_operation_finish_time:!0,speclet_modification_time:!0,strawberry_state_modification_time:!0,pool:!0,health:!0,creator:!0,state:!0},S=(0,i.Mz)([function(e){var t;return null!==(t=(0,h.u)(e)["global::chyt::list_columns"])&&void 0!==t?t:["health","state","instance_count","total_cpu","total_memory","creator","creation_time"]}],(function(e){var t=new Set(e);return c()(e.map((function(e){return b[e]&&t.has(e)?e:null})))})),_=(0,i.Mz)([S],(function(e){var t=new Set(e),n=e.map((function(e){return{checked:!0,column:e}}));return Object.keys(b).forEach((function(e){var r=e;t.has(r)||n.push({checked:!1,column:r})})),n})),k=function(e){return e.chyt.listFilters.sortState},N=(0,i.Mz)([k],(function(e){return e.reduce((function(t,n,r){return n.column&&(t[n.column]=(0,o.A)((0,o.A)({},n),{},{multisortIndex:e.length>1?r+1:void 0})),t}),{})})),w=(0,i.Mz)([y,C,x,A],(function(e,t,n,o){var i=c()([e?function(t){return-1!==t.alias.indexOf(e)}:void 0,void 0!==t?function(e){return t===e.creator}:void 0,n?function(e){return n===e.state}:void 0,o?function(e){return o===e.health}:void 0]);return i.length?l.concatByAnd.apply(void 0,(0,r.A)(i)):void 0})),j=(0,i.Mz)([m,k,w],(function(e,t,n){var r=e.items,o=void 0===r?[]:r,i=n?o.filter(n):o;return(0,d.jt)(i,t)}))},82947:(e,t,n)=>{n.d(t,{$7:()=>_,As:()=>j,CY:()=>k,En:()=>C,F6:()=>w,Gf:()=>p,M3:()=>y,NF:()=>I,Pc:()=>b,Wl:()=>S,YZ:()=>F,jO:()=>M,qZ:()=>A,sO:()=>T,tZ:()=>g,wE:()=>N});var r=n(34455),o=n.n(r),i=n(63281),a=n.n(i),s=n(18472),u=n(79329),c=n(19314),l=n(99526),d=n(57602),h=n(66205),m=n(85749),f=n(94285),v=n(39e3),p=(0,s.Mz)([u.th,u.O6],P),g=(0,s.Mz)([u.th,u.O6],V),y=(0,s.Mz)([g],L),A=(0,s.Mz)([l.yq,p],D),C=(0,s.Mz)([u.th,u.mR],P),x=(0,s.Mz)([u.th,u.mR],V),b=((0,s.Mz)([x],L),(0,s.Mz)([v.c6,C],D)),S=(0,s.Mz)([u.th,u.sX],P),_=(0,s.Mz)([u.th,u.sX],V),k=(0,s.Mz)([_],L),N=(0,s.Mz)([d.Yn,S],D),w=(0,s.Mz)([u.th,u.cY],P),j=(0,s.Mz)([h.d_,h.Jv,w],(function(e,t,n){return Boolean(o()(n,(function(n){return n.path==="".concat(e,"[").concat(t,"]")})))})),I=(0,s.Mz)([u.th,u.r_],P),F=(0,s.Mz)([m.OR,I],D),M=(0,s.Mz)([u.th,u.VI],P),T=(0,s.Mz)([f.JP,M],D);function P(e,t){var n=e(c.Ou.LOCAL.FAVOURITES,t);return a()(n,"path")}function V(e,t){return e(c.Ou.LOCAL.LAST_VISITED,t)||[]}function L(e){return a()(e,(function(e){return-e.count}))}function D(e,t){return Boolean(o()(t,(function(t){return t.path===e})))}},20330:(e,t,n)=>{n.d(t,{OF:()=>k,Qe:()=>x,YL:()=>C,ZQ:()=>A,cg:()=>b,lw:()=>_});var r=n(75414),o=n.n(r),i=n(84092),a=n.n(i),s=n(48109),u=n(90838),c=n(73822),l=n(78894),d=n(35336),h=n(48971),m=n(63582),f="//sys/accounts/",v=new l.I,p=1e4,g=5e3;function y(e,t,n,r){var o=n;return(0,m.iO)(e,o,{idmKind:d.wf.ACCOUNT,responsible:t,inheritAcl:r})}function A(e,t,n){var r=f+t+n;return a().v3.set({path:r},e)}function C(e,t){return function(){var n,r,o=t.abcService,i=t.account,u=t.parentAccount,c=t.responsibles,l=t.createHome;return(n=i,r=u,a().v3.create({type:"account",attributes:{name:n,parent_name:r}}).then((function(e){return v.add({name:"create account",timeout:g,theme:"success",title:"".concat(n," successfully created")}),e})).catch((function(e){return v.add({name:"create account",timeout:p,theme:"danger",title:"Failed to create account ".concat(n),content:e.message,actions:[{label:" view",onClick:function(){return(0,h.eW)(e)}}]}),Promise.reject(e)}))).then((function(){var t=o||{},n=t.id,r=t.slug;return Promise.all([b(i,n,r).catch((function(){})),l?S(i).catch((function(){})):Promise.resolve(),y(e,c,i,u!==s.$T).catch((function(){}))])}))}}function x(e,t){return a().v3.set({path:f+e+"/@parent_name"},t).then((function(t){return v.add({name:"set parent for account",timeout:g,theme:"success",title:"".concat(e,"'s Parent updated successfully")}),t})).catch((function(t){return v.add({name:"set parent for account",timeout:p,theme:"danger",title:"Failed to set Parent for ".concat(e),content:t.message,actions:[{label:" view",onClick:function(){return(0,h.eW)(t)}}]}),Promise.reject(t)}))}function b(e,t,n){return t&&n?a().v3.set({path:f+e+"/@abc"},{id:t,slug:n}).then((function(t){return v.add({name:"account abc service",timeout:g,theme:"success",title:"".concat(e,"'s ABC Service updated successfully")}),t})).catch((function(t){return v.add({name:"account abc service",timeout:p,theme:"danger",title:"Failed to set ABC for ".concat(e),content:t.message,actions:[{label:" view",onClick:function(){return(0,h.eW)(t)}}]}),Promise.reject(t)})):Promise.resolve()}function S(e){return a().v3.set({path:"//sys/accounts/".concat(e,"/@resource_limits/node_count")},1).then((function(){return a().v3.create({type:"map_node",path:"//home/"+e,attributes:{account:e}}).then((function(t){return v.add({name:"account create home",timeout:g,theme:"success",title:"".concat(e,"'s home directory created successfully")}),t}))})).catch((function(t){return v.add({name:"account create home",timeout:p,theme:"danger",title:"Failed to create home for ".concat(e),content:t.message,actions:[{label:" view",onClick:function(){return(0,h.eW)(t)}}]}),Promise.reject(t)}))}function _(e){return a().v3.remove({path:"//sys/accounts/"+e})}var k=o()(u.BI,(function(e,t){return e.push({value:t,text:c.A.format.ReadableField(t),show:!0}),e}),[])},97094:()=>{}}]);
|
2
|
+
//# sourceMappingURL=7959.faac2ff8.chunk.js.map
|