From 6b456e72fb6da7e60d2117afc1128cdcc8747f1f Mon Sep 17 00:00:00 2001 From: donniean <12584040+donniean@users.noreply.github.com> Date: Wed, 25 Sep 2024 11:57:16 +0800 Subject: [PATCH] chore: update v3dist (#4313) Signed-off-by: donniean --- ...6f25865dc15f37ba.js => 1.0f7d8e3d79d6a20e0b01.js} | 2 +- ...2590882f637028.css => 1.9a3b990356f198aac3eb.css} | 0 ...b82853d31f494.js => main.15103676d9b52014a21a.js} | 4 ++-- ...faa65ce52b4.css => main.3e4253e03359151eb5d0.css} | 0 packages/bootstrap/assets/v3dist/manifest.json | 12 ++++++------ 5 files changed, 9 insertions(+), 9 deletions(-) rename packages/bootstrap/assets/v3dist/{1.c1366f25865dc15f37ba.js => 1.0f7d8e3d79d6a20e0b01.js} (63%) rename packages/bootstrap/assets/v3dist/{1.7f4a9f2590882f637028.css => 1.9a3b990356f198aac3eb.css} (100%) rename packages/bootstrap/assets/v3dist/{main.f8d5cd9b82853d31f494.js => main.15103676d9b52014a21a.js} (99%) rename packages/bootstrap/assets/v3dist/{main.5c7abb88afaa65ce52b4.css => main.3e4253e03359151eb5d0.css} (100%) diff --git a/packages/bootstrap/assets/v3dist/1.c1366f25865dc15f37ba.js b/packages/bootstrap/assets/v3dist/1.0f7d8e3d79d6a20e0b01.js similarity index 63% rename from packages/bootstrap/assets/v3dist/1.c1366f25865dc15f37ba.js rename to packages/bootstrap/assets/v3dist/1.0f7d8e3d79d6a20e0b01.js index 39f7cb59dc1..4b42fd1c336 100644 --- a/packages/bootstrap/assets/v3dist/1.c1366f25865dc15f37ba.js +++ b/packages/bootstrap/assets/v3dist/1.0f7d8e3d79d6a20e0b01.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],Array(787).concat([function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(1473)),l=r(a(2042));n.default.Form=l.default;var u=n.default;t.default=u},function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(4),r(23),r(17),r(934),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(42),r(4),r(23),r(57),r(17),r(934);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=r(186),d=n(r(3)),p=n(r(1)),m=n(r(194)),h=n(r(0)),v=r(433),g=n(r(2378));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var E=function(e){(0,i.default)(r,e);var a=y(r);function r(){return(0,u.default)(this,r),a.apply(this,arguments)}return(0,o.default)(r,[{key:"renderClusterTip",value:function(){return h.default.createElement("div",null,h.default.createElement("div",{className:"tooltip-title"},t("MULTI_CLUSTER_PROJECT")),h.default.createElement("p",null,t("MULTI_CLUSTER_PROJECT_TIP")))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.avatar,r=e.icon,n=e.iconSize,u=e.iconType,o=void 0===u?"dark":u,i=e.title,c=e.desc,s=e.to,p=e.noLink,y=e.onClick,E=e.isMultiCluster,b="string"==typeof i?h.default.createElement("span",{title:i},i):i,_=s?h.default.createElement(v.Link,{to:s},b):b;return h.default.createElement("div",{className:(0,d.default)(g.default.wrapper,t,(0,l.default)({},g.default.link,p||s)),onClick:y},a?h.default.createElement("img",{className:g.default.image,src:a||"/assets/default-user.svg",alt:""}):(0,m.default)(r)?r():r&&h.default.createElement(f.Icon,{className:g.default.icon,name:r,size:n,type:o}),(a||r)&&E&&h.default.createElement(f.Tooltip,{content:this.renderClusterTip()},h.default.createElement("img",{className:g.default.indicator,src:"/assets/cluster.svg"})),h.default.createElement("div",{className:g.default.text},h.default.createElement("div",{className:g.default.title},_),h.default.createElement("div",{className:(0,d.default)(g.default.description,"ks-avatar-desc"),title:"string"==typeof c?c:void 0},c)))}}]),r}(h.default.Component);a.default=E,E.propTypes={avatar:p.default.string,icon:p.default.string,iconSize:p.default.number,to:p.default.string},E.defaultProps={iconSize:20,iconType:"dark"}},function(e,a,r){"use strict";r(15);var n=r(20);r(73),r(4),r(23),r(24),r(17),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(73),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(3)),d=r(186),p=n(r(2452));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var h=function(e){(0,o.default)(r,e);var a=m(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){var e=this.props,a=e.className,r=e.title,n=e.loading,l=void 0!==n&&n,u=e.children,o=e.extras,i=s.default.createElement("div",{className:p.default.empty},t("NO_AVAILABLE_RESOURCE_VALUE",{resource:r}));return s.default.createElement("div",{className:p.default.wrapper,"data-test":"panel-".concat(r?r.toLowerCase().split(" ").join("-"):"default")},r&&s.default.createElement("div",{className:p.default.title},r),s.default.createElement("div",{className:(0,f.default)(p.default.panel,a)},l?s.default.createElement(d.Loading,{className:p.default.loading}):u||i),o)}}]),r}(s.default.Component);a.default=h},function(e,t,a){"use strict";a(15);var r=a(20);a(12),a(109),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(109),a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(30)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=a(186),d=r(a(194)),p=r(a(158)),m=r(a(3)),h=r(a(2041));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var g=function(e){(0,o.default)(a,e);var t=v(a);function a(){return(0,l.default)(this,a),t.apply(this,arguments)}return(0,u.default)(a,[{key:"render",value:function(){var e,t=this.props,a=t.icon,r=t.title,l=t.description,u=t.className,o=t.ellipsis,i=t.extra,c=t.onClick,v=t.iconAsset,g=(0,d.default)(r)?r():(0,p.default)(r)||""===r?"-":r;return s.default.createElement("div",{className:(0,m.default)(h.default.wrapper,(e={},(0,n.default)(e,h.default.clickable,!!c),(0,n.default)(e,h.default.ellipsis,o),e),u),onClick:c},a&&((0,d.default)(a)?a():a?s.default.createElement(f.Icon,{className:h.default.icon,name:a,size:40}):v),s.default.createElement("div",{className:h.default.text},s.default.createElement("div",null,g),s.default.createElement("div",null,l)),i)}}]),a}(s.default.PureComponent);t.default=g},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.trigger=void 0,a(12),a(11),a(6),a(28),a(34),a(15),a(9),a(13),a(10),a(4),a(7);var n=r(a(30)),l=r(a(26));function u(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},a=(0,l.default)(this,"props.rootStore")||this.rootStore;a&&a.triggerAction(e,o({store:this.store},t))},e}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(12),a(109),a(5),a(11),a(84),a(73),a(18),a(4),a(23),a(24),a(17),a(85),a(136),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(109),a(45),a(5),a(11),a(84),a(73),a(18),a(42),a(4),a(23),a(57),a(17),a(85);var l=n(a(315)),u=n(a(61)),o=n(a(36)),i=n(a(37)),c=n(a(55)),s=n(a(56)),f=n(a(51)),d=n(a(0)),p=r(a(1)),m=n(a(63)),h=n(a(194)),v=a(186),g=n(a(3)),y=a(72),E=n(a(3064)),b=n(a(3065)),_=n(a(3066)),O=n(a(1196));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var C=function(e){(0,c.default)(a,e);var t=S(a);function a(){var e;(0,o.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&void 0!==i[0]?i[0]:{},r=t.silent,n=(0,c.default)(t,["silent"]),a.query=n,l={},a.props.clusterStore&&(l.namespace=a.props.clusterStore.project),r&&(a.list.silent=!0),u=N(N(N({},l),a.props.match.params),n),a.searchByApp&&(u.searchByApp=a.searchByApp),e.next=9,a.store.fetchList(u);case 9:a.list.silent=!1;case 10:case"end":return e.stop()}}),e)}))),a.getSortOrder=function(e){return a.list.order===e&&(a.list.reverse?"descend":"ascend")},a.getFilteredValue=function(e){return a.list.filters[e]},a.store=e.store||t.store||{},a.list=a.store.list||{},a.module=e.module||"",a.authKey=e.authKey||e.module,a.name=e.name||"",a.title="".concat(e.name,"_PL"),a.rowKey=e.rowKey||"name",a.query={},a.skipAuth=e.skipAuth,a}return(0,d.default)(l,[{key:"getTableProps",value:function(){var e=this.list,t=e.data,a=e.filters,r=void 0===a?{}:a,n=e.keyword,l=e.selectedRowKeys,u=e.isLoading,o=e.total,i=e.page,c=e.limit,s=e.silent,f={total:o,page:i,limit:c},d=!1===u&&0===o&&Object.keys(r).length<=0&&(0,b.default)(n);return{data:t,filters:r,keyword:n,pagination:f,isLoading:u,selectedRowKeys:(0,g.toJS)(l),silentLoading:s,isEmptyList:d,rowKey:this.rowKey,module:this.module,name:this.name,enabledActions:this.enabledActions,itemActions:this.defaultItemActions,tableActions:this.defaultTableActions,tableId:this.props.match.path}}},{key:"getBannerProps",value:function(){return{className:"margin-b12",title:t(this.title),description:t("".concat(this.name.replace(/\s+/g,"_").toUpperCase(),"_DESC")),module:this.module}}},{key:"render",value:function(){return v.default.createElement(r,(0,u.default)({name:this.name,module:this.module,store:this.store,prefix:this.prefix,routing:this.routing,query:this.query,bannerProps:this.getBannerProps(),tableProps:this.getTableProps(),getSortOrder:this.getSortOrder,getFilteredValue:this.getFilteredValue,enabledActions:this.enabledActions,trigger:this.trigger.bind(this),getData:this.getData},this.props))}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"prefix",get:function(){return this.props.match.url}},{key:"defaultItemActions",get:function(){var e=this;return[{key:"edit",icon:"pen",text:t("EDIT_INFORMATION"),action:"edit",onClick:function(t){return e.trigger("resource.baseinfo.edit",{detail:t,success:e.routing.query})}},{key:"delete",icon:"trash",text:t("DELETE"),action:"delete",onClick:function(t){return e.trigger("resource.delete",{type:e.name,resource:t.name,detail:t,success:e.routing.query})}}]}},{key:"enabledActions",get:function(){var e=this.props.match.url;return globals.app.getActions(N(N({module:this.authKey,skipAuth:this.skipAuth},this.props.match.params),{},{project:this.props.match.params.namespace,fedproject:e.indexOf("federatedprojects")>-1,devops:this.props.match.params.devops,nodegroup:this.props.match.params.group}))}},{key:"defaultTableActions",get:function(){var e=this;return{onFetch:this.routing.query,onSelectRowKeys:this.list.setSelectRowKeys,selectActions:[{key:"delete",type:"danger",text:t("DELETE"),action:"delete",onClick:function(){return e.trigger("resource.batch.delete",{type:e.name,rowKey:e.rowKey,success:e.routing.query,k8sVersion:e.props.k8sVersion})}}]}}},{key:"searchByApp",get:function(){var t;return null!==(t=e.searchByApp)&&void 0!==t&&t}}]),l}(v.default.Component),i=e.injectStores||["rootStore"];return y.inject.apply(void 0,(0,l.default)(i))((0,y.observer)((0,C.trigger)(n)))}}var w=function(e){(0,p.default)(a,e);var t=T(a);function a(){return(0,f.default)(this,a),t.apply(this,arguments)}return(0,d.default)(a,[{key:"componentDidMount",value:function(){var e=this;this.props.noWatch||this.initWebsocket(),this.unsubscribe=this.routing.history.subscribe((function(t){if(t.pathname===e.props.match.url){var a=(0,_.parse)(t.search.slice(1));e.query=a||{},e.props.getData(a)}}))}},{key:"componentDidUpdate",value:function(e){(0,O.default)(e.match.params,this.props.match.params)||(this.props.getData(),this.props.noWatch||this.initWebsocket())}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe(),this.disposer&&this.disposer()}},{key:"initWebsocket",value:function(){var e=this,t=this.props.isFederated;if("getWatchListUrl"in this.store){var a=this.store.getWatchListUrl(this.props.match.params);this.websocket.watch(a);var r=(0,E.default)((function(t){if(!e.store.list.isLoading){var a=(0,_.parse)(location.search.slice(1));return e.props.getData(N(N(N({},a),t),{},{silent:!0}))}}),1e3),n=S.MODULE_KIND_MAP[this.props.module];t&&(n="Federated".concat(n));var l=t?D.default.federated(this.store.mapper):this.store.mapper;this.disposer=(0,g.reaction)((function(){return e.websocket.message}),this.props.onMessage||function(t){if(t.object.kind===n)if("MODIFIED"===t.type){var a=N(N({},e.props.match.params),l((0,g.toJS)(t.object)));e.store.list.updateItem(a)}else"DELETED"!==t.type&&"ADDED"!==t.type||r()})}}},{key:"render",value:function(){return this.props.children}},{key:"store",get:function(){return this.props.store}},{key:"websocket",get:function(){return this.props.rootStore.websocket}},{key:"routing",get:function(){return this.props.rootStore.routing}}]),a}(v.default.Component);a.ListPage=w},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(84),r(29),r(18),r(87),r(97),r(320),r(27),r(190),r(98),r(9),r(13),r(10),r(4),r(316),r(24),r(62),r(64),r(7),r(32),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.CreateUidFactory=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={IDList:e,maxID:e.length?Math.max.apply(null,e):0};return{generateUID:function(){var e=++t.maxID;return t.IDList.push(e),e},clear:function(){t.IDList=[],t.maxID=0}}},a.avgs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.length,a=e.reduce((function(e,t){return e+t}),0);return a/t},a.unitTransformGroupFactory=P,a.unitTransformFactory=A,a.unitTransformMap=a.fillEmptyMetrics=a.timestampify=a.timeAliasReg=a.isSameDay=a.stopAutoRefresh=a.startAutoRefresh=a.getColorByName=a.getZeroValues=a.getTimesData=a.getLastMonitoringData=a.getXAxisTickFormatter=a.getAreaChartOps=a.getChartData=a.getFormatTime=a.getValueByUnit=a.getSuitableValue=a.getSuitableUnit=void 0;var l=n(r(61)),u=n(r(58)),o=n(r(30)),i=n(r(96));r(12),r(5),r(11),r(6),r(84),r(29),r(18),r(28),r(87),r(97),r(320),r(442),r(42),r(27),r(190),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(316),r(436),r(319),r(24),r(62),r(64),r(7),r(32),r(110);var c=n(r(63)),s=n(r(60)),f=n(r(925)),d=n(r(158)),p=n(r(459)),m=n(r(195)),h=n(r(26)),v=n(r(74)),g=n(r(449)),y=n(r(450)),E=n(r(967)),b=n(r(1155)),_=r(52),O=r(72),S=n(r(243));function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t=e}));return l&&(n=a.units[t]),l})),n};a.getSuitableUnit=N;a.getSuitableValue=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(0,p.default)(e)&&!(0,m.default)(e)||(0,f.default)(Number(e)))return r;var n=N(e,a),l=T(e,n||a),u=(0,_.coreUnitTS)(l,n);return"".concat(l," ").concat(t(u))};var T=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3?arguments[3]:void 0,n="NAN"===e?0:parseFloat(e);if(r!==t)switch(t){default:break;case"":case"default":return n;case"iops":return Math.round(n);case"%":n*=100;break;case"m":if((n*=1e3)<1)return 0;break;case"Ki":n/=1024;break;case"Mi":n/=Math.pow(1024,2);break;case"Gi":n/=Math.pow(1024,3);break;case"Ti":n/=Math.pow(1024,4);break;case"Bytes":case"B":case"B/s":break;case"K":case"KB":case"KB/s":n/=1e3;break;case"M":case"MB":case"MB/s":n/=Math.pow(1e3,2);break;case"G":case"GB":case"GB/s":n/=Math.pow(1e3,3);break;case"T":case"TB":case"TB/s":n/=Math.pow(1e3,4);break;case"bps":n*=8;break;case"Kbps":n=8*n/1024;break;case"Mbps":n=8*n/1024/1024;break;case"ms":n*=1e3}return 0===Number(n)?0:Number(n.toFixed(a))};a.getValueByUnit=T;var R=function(e,t){return(0,_.getLocalTime)(Number(e)).format(t?"MM-DD HH:mm":"HH:mm:ss").replace(/(\d+:\d+)(:00)$/g,"$1")};a.getFormatTime=R;var w=function(e){var t=e.type,a=e.unit,r=e.xKey,n=void 0===r?"time":r,l=e.legend,u=void 0===l?[]:l,c=e.valuesData,s=void 0===c?[]:c,f=e.dot,p=void 0===f?2:f,m=e.originalUnit,v=e.workload_kind,g=0,y=0,E={};s.forEach((function(e,r){e.forEach((function(e){var n=parseInt((0,h.default)(e,[0],0),10),l=(0,h.default)(e,[1]),o=(0,h.default)(u,[r]);if(n&&!E[n]&&(E[n]=u.reduce((function(e,t){return e[t]||(e[t]=null),e}),{})),null!=o&&E[n]){var i="-1"===l?null:T(l,(0,d.default)(a)?t:a,p,m);"statefulset"===v&&E[n][o]&&!i||(E[n][o]=i)}(!g||g>n)&&(g=n),(!y||y86400;return Object.entries(E).map((function(e){var t=(0,i.default)(e,2),a=t[0],r=t[1];return D((0,o.default)({},n,function(e){return"time"===n?R(1e3*e,b):e}(a)),r)}))};a.getChartData=w;a.getAreaChartOps=function(e){var t=e.type,a=e.title,r=e.unitType,n=e.xKey,l=void 0===n?"time":n,o=e.legend,i=void 0===o?[]:o,f=e.data,d=void 0===f?[]:f,p=e.alert,m=e.workload_kind,v=(0,u.default)(e,["type","title","unitType","xKey","legend","data","alert","workload_kind"]),g=((0,s.default)(d)?d:[]).map((function(e){return(0,h.default)(e,"values")||[]})),E=r?N((0,y.default)(g),r):v.unit;!(0,c.default)(p)&&"value"in p&&(p=D(D({},p),{},{value:T(p.value,E),unit:E}));var b=w({type:t,unit:E,xKey:l,legend:i,valuesData:g,dot:v.dot,originalUnit:v.originalUnit,workload_kind:m});return D(D({},v),{},{title:a,unit:E,alert:p,data:b})};a.getXAxisTickFormatter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){var t=e.time;return+new Date(t)})),a=(0,E.default)(t),r=(0,b.default)(t);return r-a>864e4?function(e){return(0,S.default)(e).format("MM-DD HH:mm")}:function(e){return(0,S.default)(e).format("HH:mm:ss")}};a.getLastMonitoringData=function(e){var t={};return Object.entries(e).forEach((function(e){var a=(0,i.default)(e,2),r=a[0],n=a[1],l=(0,h.default)(n,"data.result[0].values",[])||[],u=(0,c.default)(l)?(0,h.default)(n,"data.result[0].value",[])||[]:(0,g.default)(l);(0,v.default)(t,"[".concat(r,"].value"),u)})),t};a.getTimesData=function(e){var t=[];return e.forEach((function(e){((0,h.default)(e,"values")||[]).forEach((function(e){var a=(0,h.default)(e,"[0]",0);t.includes(a)||t.push(a)}))})),t.sort()};a.getZeroValues=function(){for(var e=[],t=parseInt(Date.now()/1e3,10)-6e3,a=0;a<10;a++)e[a]=[t,0],t+=600;return e};a.getColorByName=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#fff";return O.COLORS_MAP[e]||e};a.startAutoRefresh=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=D({method:"fetchData",interval:5e3,leading:!0},t);if(e&&e[a.method]){var r=e[a.method];a.leading&&r({silentLoading:!0}),e.timer=setInterval((function(){r({silentLoading:!0})}),a.interval)}};a.stopAutoRefresh=function(e){e&&e.timer&&(clearInterval(e.timer),e.timer=null)};a.isSameDay=function(e,t){return Math.floor(e/864e5)===Math.floor(t/864e5)};var I=/(\d+)(\w+)/;a.timeAliasReg=I;a.timestampify=function(e){var t=e.match(I)||[],a=(0,i.default)(t,3),r=a[1],n=void 0===r?0:r,l=a[2];return Number(n)*(O.MILLISECOND_IN_TIME_UNIT[l]||0)};a.fillEmptyMetrics=function(e,t){if(!e.times||!e.start||!e.end)return t;var a=function(e){return String(e).replace(/\..*$/,"")},r=Math.floor((e.end-e.start)/e.times),n=e.times+1;return Object.values(t).forEach((function(t){var l=(0,h.default)(t,"data.result");(0,c.default)(l)||l.forEach((function(t){var l=t.values||[],u=l.reduce((function(e,t){return D(D({},e),{},(0,o.default)({},a(t[0]),t[1]))}),{});if(l.length1&&void 0!==arguments[1]?arguments[1]:0,r=t<0,n=Math.abs(t),l=0,u=0;u=c))break;l=u}var s=(0,i.default)(e[l],2),f=s[0],d=s[1],p=0===d?n:n/d,m=p.toFixed(a);return 0===Number(m)?"0":"".concat(r?"-":"").concat(m," ").concat(f)}}a.unitTransformMap=M},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(16),a(4),a(23),a(57),a(17);var l=n(a(36)),u=n(a(37)),o=n(a(55)),i=n(a(56)),c=n(a(51)),s=n(a(158)),f=r(a(0)),d=n(a(1)),p=n(a(3)),m=n(a(839)),h=n(a(2389));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var g=function(e){(0,o.default)(a,e);var t=v(a);function a(){return(0,l.default)(this,a),t.apply(this,arguments)}return(0,u.default)(a,[{key:"render",value:function(){var e=this.props,t=e.style,a=e.className,r=e.name,n=e.type,l=e.total,u=e.ready,o=e.flicker;return f.default.createElement("span",{className:(0,p.default)(h.default.status,a),style:t},f.default.createElement(m.default,{className:h.default.indicator,type:n,flicker:o}),f.default.createElement("span",{className:"font-bold"},r),!(0,s.default)(l)&&!(0,s.default)(u)&&f.default.createElement("span",null," (",u,"/",l,")"))}}]),a}(f.PureComponent);t.default=g,g.propTypes={style:d.default.string,className:d.default.string,name:d.default.string,total:d.default.number,ready:d.default.number,type:d.default.string,flicker:d.default.bool},g.defaultProps={type:"Running",flicker:!1}},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(873)),l=(0,r(a(1324)).default)(n.default);t.default=l},,function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TinyArea",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"MediumArea",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"SimpleArea",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"MultiArea",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"PercentArea",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"SimpleBar",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"StackedBar",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"SimpleCircle",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"PieChart",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"MultiPie",{enumerable:!0,get:function(){return p.default}});var n=r(a(2124)),l=r(a(2168)),u=r(a(2170)),o=r(a(2174)),i=r(a(2176)),c=r(a(2178)),s=r(a(2180)),f=r(a(2232)),d=r(a(1530)),p=r(a(2234))},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(27),r(9),r(13),r(10),r(4),r(23),r(17),r(111),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(28),r(42),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(193),r(17),r(111),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(58)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(158)),m=n(r(63)),h=n(r(470)),v=n(r(0)),g=n(r(1)),y=n(r(3)),E=r(186),b=n(r(2088));function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;tn&&(i=n),l||!u.endsWith(".")&&!u.endsWith("0")||i!==Number(u)||"".concat(i)===u||(i=u),o&&o(i))}}else o(u)},t.handleAdd=function(){var e=t.props,a=e.value,r=e.max,n=e.onChange;((0,p.default)(r)||ar)&&n(Number(a)-1)},t.handleBlur=function(){var e=t.props,a=e.onChange,r=e.unit,n=t.state.inputValue;""===n||"-"===n||(0,m.default)(n)||(n=Number(n)),!(0,p.default)(n)&&r&&(n="".concat(n).concat(r)),a&&a(n)};var n=e.value,l=e.defaultValue,u=e.unit,o=null!=n?n:l;return u&&(o=(0,h.default)(o,u)),t.state={inputValue:o},t}return(0,c.default)(r,[{key:"componentDidUpdate",value:function(e){if(e.value!==this.props.value){var t=this.props.value,a=this.props.unit;a&&(t=(0,h.default)(t,a)),this.state.inputValue!==t&&this.setState({inputValue:t})}}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.unit,n=e.showUnit,u=(e.value,e.defaultValue,e.onChange,e.integer),i=e.controls,c=(0,o.default)(e,["className","unit","showUnit","value","defaultValue","onChange","integer","controls"]),s=u?/[-0-9]/:/[-.0-9]/,f=this.state.inputValue,d=O(O({type:"text"},c),{},{onKeyPress:function(e){s.test(e.key)||e.preventDefault()},value:f,onChange:this.handleChange,onBlur:this.handleBlur});return r&&n?v.default.createElement("div",{className:(0,y.default)(a,b.default.withUnit)},v.default.createElement(E.Input,d),v.default.createElement("span",{className:b.default.unit},"core"===r?t("CORE_PL"):r)):i?v.default.createElement("div",{className:(0,y.default)(a,b.default.withUnit)},v.default.createElement(E.Input,d),v.default.createElement("div",{className:b.default.buttonWrapper},v.default.createElement(E.Icon,{className:b.default.iconUp,name:"chevron-up",clickable:!0,onClick:this.handleAdd}),v.default.createElement(E.Icon,{className:b.default.iconDown,name:"chevron-down",clickable:!0,onClick:this.handleSubtract}))):v.default.createElement(E.Input,(0,l.default)({className:a},d))}}]),r}(v.default.Component);C.propTypes={unit:g.default.string,showUnit:g.default.bool,value:g.default.oneOfType([g.default.string,g.default.number]),defaultValue:g.default.oneOfType([g.default.string,g.default.number]),min:g.default.number,max:g.default.number,integer:g.default.bool,controls:g.default.bool,onChange:g.default.func},C.defaultProps={unit:"",showUnit:!1,integer:!1,controls:!1,onChange:function(){}};var D=C;a.default=D},,function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var l=n(a(315)),u=n(a(58)),o=n(a(36)),i=n(a(37)),c=n(a(55)),s=n(a(56)),f=n(a(51)),d=r(a(0)),p=n(a(1)),m=n(a(3)),h=n(a(195)),v=a(186),g=n(a(2386));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=function(e){(0,c.default)(a,e);var t=y(a);function a(){return(0,o.default)(this,a),t.apply(this,arguments)}return(0,i.default)(a,[{key:"renderTitle",value:function(){var e=this.props,t=e.header,a=e.title,r=e.operations;return t||(a||r?d.default.createElement("div",{className:g.default.title},r&&d.default.createElement("div",{className:g.default.operations},r),a):null)}},{key:"renderContent",value:function(){var e=this.props,t=e.empty,a=e.children;return e.isEmpty||!a?(0,h.default)(t)?d.default.createElement("div",{className:g.default.empty},t):t:a}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.type,r=e.loading,n=(e.refreshing,e.title,e.operations,e.empty,e.children,e.isEmpty,(0,u.default)(e,["className","type","loading","refreshing","title","operations","empty","children","isEmpty"]));return d.default.createElement("div",(0,l.default)({className:(0,m.default)(g.default.card,t,g.default[a])},n),this.renderTitle(),r?d.default.createElement(v.Loading,{className:g.default.loading}):this.renderContent())}}]),a}(d.PureComponent);t.default=E,E.propTypes={className:p.default.string,type:p.default.string,loading:p.default.bool,refreshing:p.default.bool,title:p.default.oneOfType([p.default.string,p.default.element,p.default.node]),operations:p.default.oneOfType([p.default.string,p.default.element,p.default.node]),header:p.default.node,empty:p.default.oneOfType([p.default.string,p.default.element,p.default.node]),isEmpty:p.default.bool},E.defaultProps={title:"",type:"default",isEmpty:!1}},,,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=e.data,r=e.status,n=e.reason,c=e.type,s=void 0===c?"workload":c,f=e.onShowEvents,d=o.default.createElement("div",null,o.default.createElement("div",{className:"tooltip-title"},t("STATUS_INFORMATION")),o.default.createElement("div",null,(0,u.default)(a,"status.conditions",[]).map((function(e){return o.default.createElement("div",{key:e.type,className:i.default.condition},o.default.createElement("div",{className:i.default.title},function(e,t){var a=t.type,r=t.status;if("volume"===e)return"True"===r;return"ReplicaFailure"===a?"False"===r:"True"===r}(s,e)?o.default.createElement(l.Icon,{name:"success",type:"coloured"}):o.default.createElement(l.Icon,{name:"error",color:{primary:"#ffffff",secondary:"#ea4641"}}),o.default.createElement("span",null,t("".concat(s.toUpperCase(),"_CONDITION_").concat(e.type.toUpperCase()),{defaultValue:e.type}))),e.status&&o.default.createElement("p",null,t("STATUS_VALUE",{value:"True"===e.status?"True":"False"})),e.reason&&o.default.createElement("p",null,t("REASON_VALUE",{value:t("".concat(s.toUpperCase(),"_REASON_").concat(e.reason.toUpperCase()),{defaultValue:e.reason})})),e.message&&o.default.createElement("p",null,t("MESSAGE_VALUE",{value:e.message})))}))),f&&o.default.createElement(l.Button,{type:"primary",onClick:f,className:"margin-t8 width-full"},t("VIEW_EVENTS")));return o.default.createElement("span",{className:i.default.reason},o.default.createElement(l.Tooltip,{placement:"right",content:d,positionFixed:!0},o.default.createElement("span",{className:i.default.reasonDesc},o.default.createElement(l.Icon,{name:"information",color:{primary:"#ffffff",secondary:"error"===r?"#ab2f29":"#f5a623"}}),n&&o.default.createElement("span",{className:"error"===r?i.default.error:i.default.warning},t(n)))))},r(5),r(18);var l=r(186),u=n(r(26)),o=n(r(0)),i=n(r(2954))},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(86),a(137),a(9),a(13),a(10),a(4),a(23),a(24),a(17),a(62),a(75),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(86),a(28),a(42),a(137),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(24),a(17),a(62),a(75),a(7);var n,l,u=r(a(30)),o=r(a(36)),i=r(a(37)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(26)),p=a(898),m=a(14),h=a(239),v=a(433),g=a(72);function y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function E(e){for(var t=1;t-1},this.inCluster?{cluster:a}:{cluster:a,workspace:t,project:r}))}}]),a}(p.Component))||l)||l)||l);t.default=_},,,,,function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(11),a(6),a(48),a(9),a(13),a(10),a(24),a(188),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=n(a(315)),u=n(a(30));a(12),a(11),a(6),a(28),a(48),a(34),a(15),a(9),a(13),a(10),a(4),a(24),a(188),a(7);var o=n(a(1324)),i=n(a(873)),c=n(a(63)),s=n(a(189)),f=a(239),d=a(244),p=r(a(0)),m=n(a(3759));function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return t.fetchProjects(v(v({cluster:u},(0,s.default)(t.projects.filters,"nameAndAlias","name")),e))},onChange:function(e){t.setProject(e),f({},!0)}}),showEmpty:h},e))}))));t.default=g},,function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(2348)),l=r(a(2349)),u=r(a(2350));n.default.Item=l.default,n.default.Add=u.default;var o=n.default;t.default=o},function(e,t,a){"use strict";a(15);var r=a(20);a(16),a(4),a(23),a(24),a(17),a(62),Object.defineProperty(t,"__esModule",{value:!0}),t.Component=t.default=void 0,a(45),a(42),a(16),a(4),a(23),a(57),a(24),a(17),a(62);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=a(14),f=a(239),d=a(72),p=a(52),m=r(a(1110)),h=r(a(1635)),v=r(a(1405));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var y=function(e){(0,u.default)(a,e);var t=g(a);function a(e){var r;return(0,n.default)(this,a),(r=t.call(this,e)).eventStore=(0,p.isEdgeWizePage)()?new h.default:new m.default,r}return(0,l.default)(a,[{key:"componentDidMount",value:function(){this.fetchData()}},{key:"fetchData",value:function(){var e=this.store.detail,t=e.uid,a=e.name,r=e.namespace,n=e._originData,l={"involvedObject.name":a,"involvedObject.namespace":r,"involvedObject.kind":(void 0===n?{}:n).kind||this.kind,"involvedObject.uid":t};this.eventStore.fetchList({namespace:r,cluster:this.cluster,fieldSelector:(0,p.joinSelector)(l)})}},{key:"render",value:function(){var e=(0,s.toJS)(this.eventStore.list),t=e.data,a=e.isLoading;return c.default.createElement(v.default,{data:t,loading:a})}},{key:"store",get:function(){return this.props.detailStore}},{key:"cluster",get:function(){return this.props.match.params.cluster}},{key:"module",get:function(){return this.store.module}},{key:"kind",get:function(){return d.MODULE_KIND_MAP[this.module]}}]),a}(c.default.Component),E=(0,f.inject)("detailStore")((0,f.observer)(y));t.default=E;var b=y;t.Component=b},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(109),r(5),r(11),r(6),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var u=l(r(30)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=r(186),p=l(r(3)),m=l(r(996)),h=l(r(839)),v=l(r(26)),g=l(r(189)),y=r(1),E=n(r(0)),b=r(52),_=r(72),O=l(r(2112));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t0),(0,h.default)(E,"spec.redisProxy.replicas",d),(0,h.default)(E,"spec.redisProxy.predixyConfigParams.clusterName",t);var b=K(m);return(0,h.default)(E,"spec.redisProxy.resources.requests",b),(0,h.default)(E,"spec.redisProxy.resources.limits",b),JSON.stringify(E)},a.getRedisClusterRelatedResources=function(e){return Z(g.redisCluster,e)},a.mergeRedisSentinelInstallationData=function(e){var t=e.name,a=e.namespace,r=e.valuesJson,n=(0,f.default)({},q[T.MySQL],(0,p.default)(r,H)),l=n.version,u=n.volume,o=n.volumeType,i=n.nodes,c=n.password,s=K(n.specifications),d=N({},g.redisSentinal.resource);return J(d,{name:t,namespace:a,volume:u,volumeType:o,password:c,cm:s,version:l}),(0,h.default)(d,"spec.clusterSize",i),(0,h.default)(d,"spec.redisReplica.replicas",i),(0,h.default)(d,"spec.kubernetesConfig.image","radondb/redis:v".concat(l)),(0,h.default)(d,"spec.redisReplica.redisConfig.additionalRedisConfig","".concat(t,"-external-config")),(0,h.default)(d,"spec.redisSentinel.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[0].values",[t]),(0,h.default)(d,"spec.redisReplica.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[0].values",[t]),JSON.stringify(d)},a.getRedisSentinelRelatedResources=function(e){return Z(g.redisSentinal,e)},a.mergeMongoDBInstallationData=function(e){var t=e.name,a=e.namespace,r=e.valuesJson,n=(0,f.default)({},q[T.MySQL],(0,p.default)(r,H)),l=n.specifications,u=n.nodes,o=n.volume,i=n.volumeType,c=n.version,s=K(l),d=N({},y.mongoYaml.resources);return(0,h.default)(d,"metadata.name",t),(0,h.default)(d,"metadata.namespace",a),(0,h.default)(d,"spec.members",u),(0,h.default)(d,"spec.version",c),(0,h.default)(d,"spec.statefulSet.spec.template.spec.containers[0].resources.requests",s),(0,h.default)(d,"spec.statefulSet.spec.template.spec.containers[0].resources.limits",s),(0,h.default)(d,"spec.prometheus.passwordSecretRef.name","".concat(t,"-metrics-password")),(0,h.default)(d,"spec.statefulSet.spec.volumeClaimTemplates[0].spec.storageClassName",i),(0,h.default)(d,"spec.statefulSet.spec.volumeClaimTemplates[0].spec.resources.requests.storage",o),(0,h.default)(d,"spec.users[0].passwordSecretRef.name","".concat(t,"-operator-password")),(0,h.default)(d,"spec.users[0].scramCredentialsSecretName","".concat(t,"-operator-password")),(0,h.default)(d,"spec.users[1].passwordSecretRef.name","".concat(t,"-root-password")),(0,h.default)(d,"spec.users[1].scramCredentialsSecretName","".concat(t,"-root-password")),(0,h.default)(d,"spec.statefulSet.spec.template.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[0].values",[t]),JSON.stringify(d)},a.getMongoDBRelatedResources=function(e){var t=e.name,a=e.namespace,r=[],n=y.mongoYaml.masterSecret;(0,h.default)(n,"metadata.name","".concat(t,"-operator-password")),(0,h.default)(n,"metadata.namespace",a),r.push({name:"masterSecret",data:JSON.stringify(n)});var l=y.mongoYaml.rootSecret;return(0,h.default)(l,"metadata.name","".concat(t,"-root-password")),(0,h.default)(l,"metadata.namespace",a),r.push({name:"rootSecret",data:JSON.stringify(l)}),r},a.getSecretCrd=function(e){var t=e.name,a=e.namespace,r={apiVersion:"v1",kind:"Secret",type:"Opaque",metadata:{name:"".concat(t,"-userpassword-secret"),namespace:a}};return JSON.stringify(r)},a.mergePGInstallationData=function(e){var t=e.name,a=e.valuesJson,r=e.namespace,n=e.restoreParams,l=(0,f.default)({},q[T.PostgreSQL],(0,p.default)(a,H)),u=l.specifications,o=l.nodes,i=l.volume,c=l.volumeType,s=l.version,d=K(u),m=JSON.parse(JSON.stringify(b.pgYaml.resources));if((0,h.default)(m,"metadata.name",t),(0,h.default)(m,"metadata.namespace",r),(0,h.default)(m,"spec.postgresql.readwriteinstance.podspec.containers[0].resources",{requests:d,limits:d}),(0,h.default)(m,"spec.autofailover.volumeClaimTemplates[0].spec.storageClassName",c),(0,h.default)(m,"spec.postgresql.readwriteinstance.volumeClaimTemplates[0].spec.storageClassName",c),(0,h.default)(m,"spec.postgresql.readwriteinstance.volumeClaimTemplates[0].spec.resources.requests.storage",i),(0,h.default)(m,"spec.postgresql.readwriteinstance.replicas",o),(0,h.default)(m,"spec.autofailover.podspec.containers[0].image","".concat(A[s],"-v1.2.0")),(0,h.default)(m,"spec.postgresql.readwriteinstance.podspec.containers[0].image","".concat(A[s],"-v1.2.0")),(0,h.default)(m,"spec.postgresql.readonlyinstance.podspec.containers[0].image","".concat(A[s],"-v1.2.0")),(0,h.default)(m,"spec.deletes3",!0),n){var v=n.backupId,g=n.S3,y=n.backupToS3Name;(0,h.default)(m,"spec.restore.froms3.recovery",v),(0,h.default)(m,"spec.restore.froms3.name",y),(0,h.default)(m,"spec.S3",g)}return JSON.stringify(m)},a.mergeECKInstallationData=function(e){var t=e.name,a=e.valuesJson,r=e.namespace,n=(0,f.default)({},q[T.Elasticsearch],(0,p.default)(a,H)),l=JSON.parse(JSON.stringify(O.eckYaml.resources));(0,h.default)(l,"metadata.name",t),(0,h.default)(l,"metadata.namespace",r);var u=(0,m.default)(l,"spec.nodeSets"),i=Object.entries(n).map((function(e){var t=(0,o.default)(e,2),a=t[0],r=t[1],n=r.nodes,l=r.specifications,i=r.volume,c=r.volumeType,s=u.find((function(e){return e.name===a}));if(s){var f=K(l),d=(0,m.default)(s,"name");(0,h.default)(s,"name","".concat(d,"-").concat(i.toLowerCase())),(0,h.default)(s,"count",n),(0,h.default)(s,"podTemplate.spec.containers[0].resources",{limits:f,requests:f}),(0,h.default)(s,"podTemplate.spec.containers[0].env[0].value","-Xms".concat(parseInt(f.memory,10)/2,"g -Xmx").concat(parseInt(f.memory,10)/2,"g")),(0,h.default)(s,"volumeClaimTemplates[0].spec.resources.requests.storage",i),(0,h.default)(s,"volumeClaimTemplates[0].spec.storageClassName",c)}return s})).filter((function(e){return e&&e.count>0}));return(0,h.default)(l,"spec.nodeSets",i),JSON.stringify(l)},a.getECKRelatedResources=function(e){var t=e.name,a=e.kibanaValues,r=e.namespace,n=a.nodes,l=a.specifications,u=JSON.parse(JSON.stringify(O.eckYaml.kibana)),o=K(l);return(0,h.default)(u,"metadata.name",t),(0,h.default)(u,"metadata.namespace",r),(0,h.default)(u,"spec.count",n),(0,h.default)(u,"spec.elasticsearchRef.name",t),(0,h.default)(u,"spec.elasticsearchRef.namespace",r),(0,h.default)(u,"spec.podTemplate.spec.containers[0].resources.requests",o),(0,h.default)(u,"spec.podTemplate.spec.containers[0].resources.limits",o),[{name:"kibana",data:JSON.stringify(u)}]},a.mergeKafkaInstallationData=function(e){var t=e.name,a=e.valuesJson,r=e.namespace,n=(0,f.default)({},q[T.Kafka],(0,p.default)(a,H)),l=JSON.parse(JSON.stringify(S.kafkaYaml.resources));(0,h.default)(l,"metadata.name",t),(0,h.default)(l,"metadata.namespace",r);var u=n.kafka,o=n.zookeeper,i=K(u.specifications);(0,h.default)(l,"spec.kafka.version",u.version),(0,h.default)(l,"spec.kafka.replicas",u.nodes),(0,h.default)(l,"spec.kafka.resources.requests",i),(0,h.default)(l,"spec.kafka.resources.limits",i),(0,h.default)(l,"spec.kafka.storage.volumes[0]",{id:0,type:"persistent-claim",class:u.volumeType,size:u.volume,deleteClaim:!0}),(0,h.default)(l,"spec.kafka.metricsConfig.valueFrom.configMapKeyRef.name","".concat(t,"-kafka-metrics"));var c=K(o.specifications);return(0,h.default)(l,"spec.zookeeper.replicas",o.nodes),(0,h.default)(l,"spec.zookeeper.resources.requests",c),(0,h.default)(l,"spec.zookeeper.resources.limits",c),(0,h.default)(l,"spec.zookeeper.storage",{type:"persistent-claim",class:o.volumeType,size:o.volume,deleteClaim:!0}),(0,h.default)(l,"spec.zookeeper.metricsConfig.valueFrom.configMapKeyRef.name","".concat(t,"-kafka-metrics")),JSON.stringify(l)},a.getKafkaRelatedResources=function(e){var t=e.namespace,a=e.name,r=JSON.parse(JSON.stringify(S.kafkaYaml.configMap));(0,h.default)(r,"metadata.name","".concat(a,"-kafka-metrics")),(0,h.default)(r,"metadata.namespace",t);var n=JSON.parse(JSON.stringify(S.kafkaYaml.podMonitor));return(0,h.default)(n,"metadata.name","".concat(a,"-kafka-resources-metrics")),(0,h.default)(n,"metadata.namespace",t),(0,h.default)(n,"spec.namespaceSelector.matchNames",[t]),[{name:"configMap",data:JSON.stringify(r)},{name:"podMonitor",data:JSON.stringify(n)}]},a.mergeOpenSearchInstallationData=function(e){var t=e.name,a=e.valuesJson,r=e.namespace,n=(0,f.default)({},q[T.OpenSearch],(0,p.default)(a,H)),u=n.version,i=(n.password,n.username,n.logstash,n.dashboard),c=(0,l.default)(n,["version","password","username","logstash","dashboard"]),s=JSON.parse(JSON.stringify(C.opensearchYaml.resources));(0,h.default)(s,"metadata.name",t),(0,h.default)(s,"metadata.namespace",r),(0,h.default)(s,"spec.general.serviceName",t),(0,h.default)(s,"spec.general.version",u),(0,h.default)(s,"spec.dashboards.version",u),"2.8.0"===u&&(0,h.default)(s,'spec.general.additionalConfig["prometheus.indices"]',"false");(0,h.default)(s,"spec.dashboards.enable",i.nodes>0),(0,h.default)(s,"spec.dashboards.replicas",i.nodes),(0,h.default)(s,"spec.security.config.securityConfigSecret.name","".concat(t,"-securityconfig-secret")),(0,h.default)(s,"spec.security.config.adminCredentialsSecret.name","".concat(t,"-admin-secret"));var d=K(i.specifications);(0,h.default)(s,"spec.dashboards.resources",{limits:d,requests:d});var v=(0,m.default)(s,"spec.nodePools"),g=Object.entries(c).map((function(e){var t=(0,o.default)(e,2),a=t[0],r=t[1],n=r.nodes,l=r.specifications,u=r.volume,i=r.volumeType,c=v.find((function(e){return(0,m.default)(e,'additionalConfig["node.attr.datatier"]')===a}));c||(c=JSON.parse(JSON.stringify(C.opensearchYaml.node)),(0,h.default)(c,'additionalConfig["node.attr.datatier"]',a),(0,h.default)(c,"component","data-node-".concat(a)));var s=K(l);return(0,h.default)(c,"replicas",n),(0,h.default)(c,"resources",{limits:s,requests:s}),(0,h.default)(c,"diskSize",u),(0,h.default)(c,"persistence.pvc.storageClass",i),c})).filter((function(e){return e&&e.replicas>0}));return(0,h.default)(s,"spec.nodePools",g),JSON.stringify(s)},a.getOpenSearchRelatedResources=function(e){var t=e.name,a=e.logstashValues,r=e.namespace,n=e.username,l=e.password,u=a.nodes,o=a.specifications,i=JSON.parse(JSON.stringify(C.opensearchYaml.logstash)),c=K(o);(0,h.default)(i,"metadata.name",t),(0,h.default)(i,"metadata.namespace",r),(0,h.default)(i,"spec.replicas",u);var s=parseInt(c.memory,10)/2;(0,h.default)(i,"spec.config.jvm","-Xms".concat(s,"g -Xmx").concat(s,"g")),(0,h.default)(i,"spec.config.openSearchInfo.openSearchCluster.name",t),(0,h.default)(i,"spec.config.openSearchInfo.openSearchCluster.namespace",r),(0,h.default)(i,"spec.config.openSearchInfo.openSearchService.name",t),(0,h.default)(i,"spec.podTemplate.spec.containers[0].resources.requests",c),(0,h.default)(i,"spec.podTemplate.spec.containers[0].resources.limits",c);var f=JSON.parse(JSON.stringify(C.opensearchYaml.logstashSecret));(0,h.default)(f,"metadata.name","".concat(t,"-logstash-password")),(0,h.default)(f,"metadata.namespace",r);var d=JSON.parse(JSON.stringify(C.opensearchYaml.adminSecret));(0,h.default)(d,"metadata.name","".concat(t,"-admin-secret")),(0,h.default)(d,"metadata.namespace",r),(0,h.default)(d,"data.username",(0,v.safeBtoa)(n||"admin")),(0,h.default)(d,"data.password",(0,v.safeBtoa)(l||"RadonDB@123"));var p=JSON.parse(JSON.stringify(C.opensearchYaml.securityConfigSecret));return(0,h.default)(p,"metadata.name","".concat(t,"-securityconfig-secret")),(0,h.default)(p,"metadata.namespace",r),[{name:"logstash",data:JSON.stringify(i)},{name:"logstashSecret",data:JSON.stringify(f)},{name:"adminSecret",data:JSON.stringify(d)},{name:"securityConfigSecret",data:JSON.stringify(p)}]},a.ValuesJSON=a.ValuesSchema=a.SpecificationOptionsObject=a.getNodeRoleOptions=a.SpecificationsOptions=a.PGImage=a.RedisImage=a.MySQLOptsImage=a.MySQLSidecarImage=a.RadonDBAppIds=a.RadonDBAppId=void 0;var l=n(r(58)),u=n(r(30)),o=n(r(96));r(12),r(109),r(5),r(11),r(31),r(6),r(18),r(28),r(48),r(191),r(16),r(159),r(27),r(1537),r(931),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(316),r(436),r(319),r(24),r(193),r(64),r(7);var i,c,s,f=n(r(902)),d=n(r(63)),p=n(r(334)),m=n(r(26)),h=n(r(74)),v=r(440),g=r(2276),y=r(2277),E=r(2278),b=r(2279),_=r(2280),O=r(1539),S=r(1093),C=r(1540),D=r(1295);function k(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function N(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=a.app_id,n=a.max,l=a.nodeRole,u=a.oldStorage,o=parseFloat(e);if(!Number.isInteger(o))return{error:!0,message:t("VALUE_MUST_BE_INTEGER")};if(n&&o>n)return{error:!0,message:t("VALUE_CANNOT_BE_GREATER_THAN_VALUE",{max:n})};switch(r){case T.Elasticsearch:if(Number.isNaN(o)||o<20)return{error:!0,message:t("VALUE_CANNOT_BE_LESS_THAN_20")};break;case T.Kafka:if(u&&o",value:">"},{label:">=",value:">="},{label:"<",value:"<"},{label:"<=",value:"<="}];t.SEVERITY_LEVEL=[{type:"critical",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#ca2621"},label:"CRITICAL_ALERT",value:"critical"},{type:"error",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#f5a623"},label:"ERROR_ALERT",value:"error"},{className:"tag-ffd939",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#FFD939"},label:"WARNING_ALERT",value:"warning"},{type:"secondary",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#79879c"},label:"INFO_ALERT",value:"info"}];var i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.condition,a=void 0===t?{}:t,r=e.thresholds,n=void 0===r?{}:r;return[u({name:"condition_type",options:o},a),u({type:"number",name:"thresholds",placeholder:"THRESHOLD"},n)]};t.getBaseRuleConfig=i;var c=i({thresholds:{min:0}});t.BASE_RULE_CONFIG=c;var s=i({thresholds:{min:0,max:100,unit:"%",converter:function(e){return e/100}}});t.PERCENT_RULE_CONFIG=s;var f=i({thresholds:{unit:"core",min:0}});t.CPU_RULE_CONFIG=f;var d=i({thresholds:{unit:"Mi",min:0,converter:function(e){return e*Math.pow(1024,2)}}});t.MEMORY_RULE_CONFIG=d;var p=i({thresholds:{unit:"GB",min:0,converter:function(e){return e*Math.pow(1e3,3)}}});t.DISK_RULE_CONFIG=p;var m=i({thresholds:{unit:"KB/s",min:0,converter:function(e){return 1e3*e}}});t.THROUGHPUT_RULE_CONFIG=m;var h=i({thresholds:{unit:"Mbps",min:0,converter:function(e){return e*(Math.pow(1024,2)/8)}}});t.BANDWIDTH_RULE_CONFIG=h},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=r(a(3)),d=a(186),p=r(a(2506));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var h=function(e){(0,u.default)(a,e);var t=m(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"render",value:function(){var e=this.props,t=e.image,a=e.icon,r=e.title,n=e.desc,l=e.actions,u=e.className;return c.default.createElement("div",{className:(0,f.default)(p.default.wrapper,u)},c.default.createElement("div",{className:p.default.image},t?c.default.createElement("img",{src:t,alt:""}):c.default.createElement(d.Icon,{name:a,size:48})),c.default.createElement("div",{className:p.default.title},r),c.default.createElement("p",{className:p.default.desc},n),l&&c.default.createElement("div",{className:p.default.actions},l))}}]),a}(c.default.PureComponent);t.default=h,h.propTypes={icon:s.default.string,title:s.default.string,desc:s.default.oneOfType([s.default.string,s.default.element]),actions:s.default.oneOfType([s.default.node,s.default.element])},h.defaultProps={icon:"appcenter"}},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(24),a(17),a(188),a(136),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(24),a(17),a(188),a(7);var n=r(a(61)),l=r(a(30)),u=r(a(58)),o=r(a(43));a(41);var i,c,s,f,d=r(a(44)),p=r(a(65)),m=r(a(36)),h=r(a(37)),v=r(a(88)),g=r(a(55)),y=r(a(56)),E=r(a(51)),b=r(a(49)),_=(r(a(66)),r(a(26))),O=r(a(63)),S=r(a(189)),C=r(a(74)),D=r(a(894)),k=r(a(454)),N=a(14),T=a(72),R=r(a(105)),w=a(244),I=r(a(68)),M=r(a(120));function P(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r=e.workspace,n="";return t&&(n+="/klusters/".concat(t)),r&&!a&&(n+="/workspaces/".concat(r)),a&&(n+="/namespaces/".concat(a)),n}},{key:"isNotClusterGateway",value:function(e){return e&&"kubesphere-controls-system"!==e}},{key:"getGatewayAppVersions",value:(z=(0,d.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r="".concat(a?"/clusters/".concat(a):"","/").concat(this.apiVersion,"/appversions"),e.next=4,this.submitting(request.get(r));case 4:return n=e.sent,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return z.apply(this,arguments)})},{key:"getHelmChart",value:(U=(0,d.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.appversion,n="".concat(a?"/clusters/".concat(a):"","/").concat(this.apiVersion,"/appversions/").concat(r,"/values"),e.abrupt("return",this.submitting(request.get(n)));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return U.apply(this,arguments)})},{key:"getGateway",value:(x=(0,d.default)(o.default.mark((function e(t){var a,r,n,l,i,c,s,f,d,p,m;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,n=t.workspace,l=t.type,i=(0,u.default)(t,["cluster","namespace","workspace","type"]),this.gateway.isLoading=!0,c=this.getListUrl({cluster:a,workspace:n,namespace:r}),s=A({labelSelector:"kubesphere.io/gateway-type=".concat(l)},i),e.next=6,request.get(c,s);case 6:return f=e.sent,d=(0,_.default)(f,"items[0]",null),p={},(0,O.default)(d)||(p=R.default.gateway(d),!0===(null===(m=p)||void 0===m?void 0:m.isDeleteLoading)&&(p={})),this.detail=p,this.gateway.data=p,this.gateway.isLoading=!1,e.abrupt("return",p);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return x.apply(this,arguments)})},{key:"getGatewayReplica",value:(L=(0,d.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="".concat(this.gatewayPodsUrl(t),"/pods"),e.next=3,this.submitting(request.get(a));case 3:return r=e.sent,n=[],r&&r.totalItems>0&&(n=r.items.map((function(e){return R.default.pods(e)}))),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"getGatewayByProject",value:(P=(0,d.default)(o.default.mark((function e(t){var a,r,n,l,i,c,s,f,d,p;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cluster,n=t.workspace,l=t.namespace,i=(0,u.default)(t,["cluster","workspace","namespace"]),this.gateway.isLoading=!0,c=this.getListUrl({cluster:r,workspace:n,namespace:l}),e.next=5,request.get(c,i);case 5:return s=e.sent,f=(0,_.default)(s,"items",[]),d=null===(a=(0,D.default)(f,(function(e){return R.default.gateway(e)})))||void 0===a?void 0:a.filter((function(e){return!e.isDeleteLoading})),p=(0,k.default)(d,(function(e){return"project"===e.gatewayType})),this.detail=p,this.gateway.data=p,this.gateway.isLoading=!1,e.abrupt("return",d);case 13:case"end":return e.stop()}}),e,this)}))),function(e){return P.apply(this,arguments)})},{key:"getNewGatewayByProject",value:(M=(0,d.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.gateway.isLoading=!0,a=this.gatIngressUrl(t),e.next=4,request.get(a,null,null,(function(){}));case 4:return r=e.sent,n=(0,D.default)(r,(function(e){return R.default.ingressClassScopes(e)})),this.gateway.isLoading=!1,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:"getGatewayByWorkspace",value:(I=(0,d.default)(o.default.mark((function e(t){var a,r,n,l,u,i,c,s,f,d;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cluster,n=t.workspace,l=t.type,this.gateway.isLoading=!0,u=this.getListUrl({cluster:r,workspace:n}),i={labelSelector:"kubesphere.io/gateway-type=".concat(l),includeUpper:!0},e.next=6,request.get(u,i);case 6:return c=e.sent,s=(0,_.default)(c,"items",[]),f=null===(a=(0,D.default)(s,(function(e){return R.default.gateway(e)})))||void 0===a?void 0:a.filter((function(e){return!e.isDeleteLoading})),d=(0,k.default)(f,(function(e){return"workspace"===e.gatewayType})),this.detail=d,this.gateway.data=d,this.gateway.isLoading=!1,e.abrupt("return",f);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"addGateway",value:(b=(0,d.default)(o.default.mark((function e(t,a){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.submitting(request.post(this.getListUrl(t),a)));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"editGateway",value:(E=(0,d.default)(o.default.mark((function e(t,a){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.submitting(request.put(this.getDetailUrl(t),a)));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"deleteGateway",value:(y=(0,d.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.cluster,r=t.namespace,n=t.workspace,!t.isOld){e.next=3;break}return e.abrupt("return",this.submitting(request.delete(this.getOldGatewayUrl({cluster:a,namespace:r}))));case 3:return e.abrupt("return",this.submitting(request.delete(this.gatewayeditUrl({cluster:a,namespace:r,workspace:n}))));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"updateGateway",value:(i=(0,d.default)(o.default.mark((function e(t,a){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat(this.gatewayeditUrl(t),"/upgrade"),e.abrupt("return",this.submitting(request.post(r,a)));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getGatewayLogs",value:(l=(0,d.default)(o.default.mark((function e(t){var a,r,n,l,i,c,s;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,n=t.gatewayName,t.component,l=t.workspace,i=(0,u.default)(t,["cluster","namespace","gatewayName","component","workspace"]),this.logs.isLoading=!0,e.next=4,request.get("".concat(this.gatewayPodsUrl({cluster:a,namespace:r,gatewayName:n,workspace:l}),"/logs"),A(A({},i),{},{start_time:i.start_time?Math.floor(i.start_time/1e3):void 0,end_time:i.end_time?Math.floor(i.end_time/1e3):void 0,container_query:"controller",cluster:a}),{},(function(){return[]}));case 4:return c=e.sent,s=(0,_.default)(c,"query.records")||[],this.logs=A(A({data:s,total:(0,_.default)(c,"query.total")||s.length||0},i),{},{size:Number(i.size)||10,from:Number(i.from)||0,isLoading:!1}),e.abrupt("return",s);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"exportLinkFactory",value:function(e){var t=e.cluster,a=e.namespace,r=e.gatewayName,n=e.workspace,l=e.start_time,o=e.end_time,i=(0,u.default)(e,["cluster","namespace","gatewayName","workspace","start_time","end_time"]),c="".concat(this.gatewayPodsUrl({cluster:t,namespace:a,gatewayName:r,workspace:n}),"/logs");return"/".concat(c,"?").concat((0,w.stringify)(A(A({sort:"asc"},i),{},{start_time:Math.floor(l/1e3),end_time:Math.floor(o/1e3),operation:"export",cluster:t})))}},{key:"getGatewayPods",value:(r=(0,d.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="".concat(this.gatewayPodsUrl(t),"/pods"),e.next=3,this.submitting(request.get(a,{limit:10,sortBy:"createTime"}));case 3:return r=e.sent,n=[],r&&r.totalItems>0&&(n=r.items.map((function(e){return R.default.pods(e)}))),this.gateway.data.pods=n,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getGatewayPodsList",value:(a=(0,d.default)(o.default.mark((function e(t){var a,r,l,i,c,s,f,d,p;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,t.name,r=t.gatewayName,l=t.namespace,i=t.workspace,c=t.more,t.component,s=t.search,f=(0,u.default)(t,["cluster","name","gatewayName","namespace","workspace","more","component","search"]),this.podList.isLoading=!0,f.sortBy||void 0!==f.ascending||(f.sortBy=T.LIST_DEFAULT_ORDER[this.module]||"createTime"),f.limit!==1/0&&-1!==f.limit||(f.limit=-1,f.page=1),f.limit=f.limit||10,e.next=7,request.get("".concat(this.gatewayPodsUrl({cluster:a,namespace:l,gatewayName:r,workspace:i}),"/pods"),A(A({},f),{},{name:s}),{},(function(){return[]}));case 7:return d=e.sent,p=((0,_.default)(d,"items")||[]).map((function(e){return A({cluster:a,namespace:e.metadata.name.split("kubesphere-router-")[1]},R.default.pods(e))})),this.podList.update(A(A({data:c?[].concat((0,n.default)(this.podList.data),(0,n.default)(p)):p,total:d.totalItems||d.total_count||p.length||0},f),{},{limit:Number(f.limit)||10,page:Number(f.page)||1,isLoading:!1},this.podList.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",[]);case 11:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"scale",value:function(e,t){var a=(0,N.toJS)(this.gateway.data._originData);return(0,C.default)(a,"spec.values.controller.replicaCount",t),(0,C.default)(a,"metadata.resourceVersion",this.gateway.data.resourceVersion),this.editGateway(e,a)}},{key:"fetchList",value:(t=(0,d.default)(o.default.mark((function e(t){var a,r,l,i,c,s,f,d,p,m;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cluster,l=t.namespace,i=t.workspace,c=t.more,t.component,s=t.type,f=(0,u.default)(t,["cluster","namespace","workspace","more","component","type"]),this.list.isLoading=!0,f.sortBy||void 0!==f.ascending||(f.sortBy=T.LIST_DEFAULT_ORDER[this.module]||"createTime"),f.limit!==1/0&&-1!==f.limit||(f.limit=-1,f.page=1),f.limit=f.limit||10,e.next=7,request.get("".concat(this.apiVersion).concat(this.getPath({cluster:r,workspace:i,namespace:l}),"/").concat("workspace"===s?"projectgateways":"gateways"),A({},f),{},(function(){return[]}));case 7:return d=e.sent,p=null===(a=((0,_.default)(d,"items")||[]).map((function(e){return A({cluster:r,namespace:e.metadata.name.split("kubesphere-router-")[1]},R.default.gateway(e))})))||void 0===a?void 0:a.filter((function(e){return!e.isDeleteLoading})),m=(0,S.default)(f,"labelSelector"),this.list.update(A(A({data:c?[].concat((0,n.default)(this.list.data),(0,n.default)(p)):p,total:d.totalItems||d.total_count||p.length||0},m),{},{limit:Number(f.limit)||10,page:Number(f.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",[]);case 12:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),G}(I.default),c=(0,b.default)(i.prototype,"gateway",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:{},isLoading:!0}}}),s=(0,b.default)(i.prototype,"podList",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new M.default}}),f=(0,b.default)(i.prototype,"logs",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new M.default}}),(0,b.default)(i.prototype,"getGatewayAppVersions",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayAppVersions"),i.prototype),(0,b.default)(i.prototype,"getHelmChart",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getHelmChart"),i.prototype),(0,b.default)(i.prototype,"getGateway",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGateway"),i.prototype),(0,b.default)(i.prototype,"getGatewayReplica",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayReplica"),i.prototype),(0,b.default)(i.prototype,"getGatewayByProject",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayByProject"),i.prototype),(0,b.default)(i.prototype,"getNewGatewayByProject",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getNewGatewayByProject"),i.prototype),(0,b.default)(i.prototype,"getGatewayByWorkspace",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayByWorkspace"),i.prototype),(0,b.default)(i.prototype,"addGateway",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"addGateway"),i.prototype),(0,b.default)(i.prototype,"editGateway",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"editGateway"),i.prototype),(0,b.default)(i.prototype,"deleteGateway",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"deleteGateway"),i.prototype),(0,b.default)(i.prototype,"updateGateway",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"updateGateway"),i.prototype),(0,b.default)(i.prototype,"getGatewayLogs",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayLogs"),i.prototype),(0,b.default)(i.prototype,"getGatewayPods",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayPods"),i.prototype),(0,b.default)(i.prototype,"getGatewayPodsList",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayPodsList"),i.prototype),(0,b.default)(i.prototype,"scale",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"scale"),i.prototype),(0,b.default)(i.prototype,"fetchList",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),i);t.default=L},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(84),a(4),a(23),a(17),a(85),a(75),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(84),a(42),a(4),a(23),a(57),a(17),a(85),a(75),a(1079);var n=r(a(315)),l=r(a(58)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=r(a(1)),p=r(a(3)),m=r(a(2040));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var v=function(e){(0,i.default)(a,e);var t=h(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l12?g:12,"px"),f.default.createElement("span",(0,n.default)({className:(0,p.default)(m.default.letter,u),style:h},c),v)}return null}return f.default.createElement("img",(0,n.default)({src:d,"data-origin-url":d,className:(0,p.default)(m.default.img,u),ref:function(t){e.img=t}},c))}}]),a}(f.default.Component);t.default=v,v.propTypes={className:d.default.string,iconLetter:d.default.string,iconSize:d.default.number,isBase64Str:d.default.bool,src:d.default.string},v.defaultProps={iconSize:32,src:"",iconLetter:"",isBase64Str:!1}},,,function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var l=n(a(30)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51)),f=r(a(0)),d=n(a(1)),p=n(a(3)),m=n(a(2111));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var v=function(e){(0,i.default)(a,e);var t=h(a);function a(){return(0,u.default)(this,a),t.apply(this,arguments)}return(0,o.default)(a,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.type,r=e.flicker;return f.default.createElement("i",{className:(0,p.default)(m.default.icon,m.default[a.toLowerCase()],(0,l.default)({},m.default.flicker,r),t)})}}]),a}(f.PureComponent);t.default=v,v.propTypes={className:d.default.string,type:d.default.string,flicker:d.default.bool},v.defaultProps={type:"Running",flicker:!1}},,function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(4),a(22),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=n(a(315)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51));a(45),a(29),a(42),a(4),a(22),a(23),a(57),a(17),a(38),a(32);var f=r(a(0)),d=n(a(1)),p=n(a(3)),m=a(186),h=n(a(2053));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=(0,f.lazy)((function(){return Promise.all([a.e(0),a.e(13)]).then(a.t.bind(null,5287,7))})),y=function(e){(0,i.default)(a,e);var t=v(a);function a(){return(0,u.default)(this,a),t.apply(this,arguments)}return(0,o.default)(a,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.mode,r=e.options,n=e.value,u=e.onChange;return f.default.createElement(f.Suspense,{fallback:f.default.createElement(m.Loading,{className:"ks-page-loading"})},f.default.createElement(g,(0,l.default)({},r,{className:(0,p.default)(h.default.editor,t),value:n,mode:a,onChange:u})))}}]),a}(f.PureComponent);y.propTypes={value:d.default.oneOfType([d.default.string,d.default.object,d.default.arrayOf(d.default.string),d.default.arrayOf(d.default.object)]),mode:d.default.string,options:d.default.object,onChange:d.default.func},y.defaultProps={value:"",mode:"yaml",options:{},onChange:function(){}};var E=y;t.default=E},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(187),r(11),r(6),r(18),r(87),r(97),r(9),r(13),r(10),r(4),r(23),r(139),r(24),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(187),r(11),r(6),r(18),r(28),r(87),r(97),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(139),r(251),r(24),r(252),r(193),r(17),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(61)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=r(186),m=n(r(3)),h=n(r(198)),v=n(r(63)),g=n(r(1)),y=n(r(0)),E=n(r(1479)),b=n(r(2061));function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;t=u?null:y.default.createElement("div",{className:"text-right"},y.default.createElement(p.Button,{className:E.default.add,onClick:this.handleAdd,disabled:!this.isAddEnable()},r)))}}],[{key:"getValues",value:function(e){var t=e.value||{},a=[],r=[],n=[];return Object.keys(t).forEach((function(l){e.hiddenKeys.some((function(e){return new RegExp(e).test(l)}))?a.push({key:l,value:t[l]}):e.readOnlyKeys.some((function(e){return new RegExp(e).test(l)}))?r.push({key:l,value:t[l]}):n.push({key:l,value:t[l]})})),(0,v.default)(n)&&(0,v.default)(r)&&n.push({key:""}),{hiddenValues:a,readOnlyValues:r,arrayValues:n}}}]),r}(y.default.Component);a.default=C,C.propTypes={name:g.default.string,value:g.default.object,hiddenKeys:g.default.arrayOf(g.default.string),readOnlyKeys:g.default.arrayOf(g.default.string),controlled:g.default.bool,onChange:g.default.func,onError:g.default.func,maxLen:g.default.number},C.defaultProps={name:"",value:{},hiddenKeys:[],readOnlyKeys:[],controlled:!1,onChange:function(){}}},,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(31),a(6),a(29),a(73),a(48),a(137),a(9),a(13),a(10),a(4),a(316),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.getTimeRange=t.getMinuteValue=void 0;var n=r(a(43));a(41);var l=r(a(44)),u=r(a(61)),o=r(a(30)),i=r(a(58)),c=r(a(65)),s=r(a(36)),f=r(a(37)),d=r(a(49));r(a(66));a(12),a(5),a(11),a(31),a(6),a(29),a(73),a(28),a(48),a(442),a(137),a(34),a(15),a(9),a(13),a(10),a(4),a(316),a(436),a(22),a(7),a(32);var p,m,h,v,g,y=a(14),E=r(a(63)),b=r(a(60)),_=r(a(26)),O=r(a(74)),S=a(52),C=a(794);function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"60s",t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=e.slice(-1),r=parseFloat(e);switch(a){default:case"s":break;case"m":r*=60;break;case"h":r*=3600;break;case"d":r=24*r*60*60}return t?"".concat(r,"s"):r};t.getMinuteValue=N;var T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.step,a=void 0===t?"600s":t,r=e.times,n=void 0===r?20:r,l=parseFloat(a)*n,u=Math.floor(Date.now()/1e3),o=Math.floor(u-l);return{start:o,end:u}};t.getTimeRange=T;var R=(p=function(){function e(){var t=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.default)(this,e),(0,c.default)(this,"isLoading",m,this),(0,c.default)(this,"isRefreshing",h,this),(0,c.default)(this,"etcdChecking",v,this),(0,c.default)(this,"supportETCD",g,this),this.isConfirmSupportETCD=!1,this.data={},this.resourceName="resource_name",this.getApi=function(e){var a=e.namespace,r=e.workspace,n=e.component,l=e.module,u=e.container,o=e.nodeName,i=e.persistentvolumeclaim,c=e.pvc,s=e.pod,f=e.workload;return n||l?"".concat(t.apiVersion,"/component_metrics"):s?"".concat(t.apiVersion,"/pod_metrics"):u?"".concat(t.apiVersion,"/container_metrics"):o?"".concat(t.apiVersion,"/node_metrics"):i||c?"".concat(t.apiVersion,"/persistentvolumeclaim_metrics"):f?"".concat(t.apiVersion,"/workload_metrics"):a?"".concat(t.apiVersion,"/namespace_metrics"):r?"".concat(t.apiVersion,"/workspace_metrics"):globals.app.isMultiCluster&&t.cluster?"".concat(t.apiVersion,"/cluster_metrics"):t.apiVersion},this.getParams=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=e.start,r=e.end,n=e.step,l=void 0===n?"600s":n,u=e.times,o=void 0===u?20:u,c=e.resources,s=void 0===c?[]:c,f=e.metrics,d=void 0===f?[]:f,p=e.cluster_resources_filter,m=void 0===p?t.cluster_resources_filter:p,h=e.last,v=void 0!==h&&h,g=e.pvcName,y=e.nodeName,b=e.module,_=(0,i.default)(e,["start","end","step","times","resources","metrics","cluster_resources_filter","last","pvcName","nodeName","module"]),O=k({},_);if((b||t.module)&&(O.component=b||t.module,delete O.module),g&&(O.pvc=g),y&&(O.node=y),t.cluster&&(O.cluster=t.cluster),!v&&(Object.assign(O,{start:a,end:r,step:N(l),times:o}),!a||!r)){var S=T(O);O.start=S.start,O.end=S.end}return O.start&&(O.start=Math.floor(O.start)),O.end&&(O.end=Math.floor(O.end)),(0,E.default)(s)||(O.resources_filter="".concat(s.join("|"))),(0,E.default)(m)||(O.cluster_resources_filter="".concat(m.join("|"))),(0,E.default)(d)||(O.metrics_filter="".concat(d.join("|"))),t.handleParams(O)},this.handleParams=function(e){return e},this.getResult=function(e){var t={},a=(0,b.default)(e)?e:(0,_.default)(e,"results",[])||[];if((0,E.default)(a)){var r=(0,_.default)(e,"metric_name");r&&(t[r]=e)}else a.forEach((function(e,a){t[e.metric_name||a+1]=e,e.metric_name=e.metric_name||a+1}));return t},this.getNewValues=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=(0,E.default)(e)?[]:(0,u.default)(e),r=t||[];return(0,E.default)(r)||(a.length>10&&a.shift(),a.push(r)),a},this.getNewRefreshedResult=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=(0,u.default)(a);return e.forEach((function(e,a){var n=(0,_.default)(e,"metric.".concat(t.resourceName)),l=null;if(n){var u=r.find((function(e){return(0,_.default)(e,"metric.".concat(t.resourceName))===n}));(0,E.default)(u)?r.push(e):l=u}else l=r[a];if(!(0,E.default)(l)){var o=t.getNewValues(l.values,e.value);(0,O.default)(l,"values",o)}})),r},this.getRefreshResult=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,y.toJS)(a);return(0,E.default)(r)?e:(Object.values(e).forEach((function(e){var a=(0,_.default)(e,"metric_name"),n=r[a];if(n){var l=(0,_.default)(e,"data.result")||[],u=(0,_.default)(n,"data.result",(0,_.default)(n,"data.results"))||[];(0,O.default)(n,"data.result",t.getNewRefreshedResult(l,u))}})),r)},this.getMoreResult=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=(0,y.toJS)(t);return(0,E.default)(a)?e:(Object.values(e).forEach((function(e){var t=(0,_.default)(e,"metric_name"),r=a[t];if(r){var n=(0,_.default)(r,"data.result",(0,_.default)(r,"data.results"))||[],l=(0,_.default)(e,"data.result")||[],o=[].concat((0,u.default)(n),(0,u.default)(l));(0,O.default)(r,"data.result",o)}})),a)},this.checkEtcd=function(){t.etcdChecking=!0,t.supportETCD=globals.app.hasMonitoringExtensionExtraModule("enable-etcd-monitoring"),t.etcdChecking=!1},this.getStatisticUrl=function(e){var t=e.cluster,a=e.namespace,r=e.workspace,n=t?"/klusters/".concat(t):"",l=a?"/namespaces/".concat(a):"",u=r?"/workspaces/".concat(r):"",o="/resources.kubesphere.io/v1alpha3";return t||(o="/tenant.kubesphere.io/v1beta1"),"/kapis".concat(o).concat(n).concat(l).concat(u,"/metrics")},Object.keys(a).forEach((function(e){return(0,O.default)(t,e,a[e])}))}var t,a;return(0,f.default)(e,[{key:"fetchMetrics",value:(a=(0,l.default)(n.default.mark((function e(t){var a,r,l,u,o,c,s,f,d,p,m;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.autoRefresh,r=void 0!==a&&a,l=t.more,u=void 0!==l&&l,o=t.fillZero,c=void 0===o||o,s=(0,i.default)(t,["autoRefresh","more","fillZero"]),r?(s.last=!0,this.isRefreshing=!0):this.isLoading=!0,s.cluster&&(this.cluster=s.cluster),this.cluster&&(s.cluster=this.cluster),f=this.getParams(s),d=this.getApi(s),e.next=8,(0,S.to)(request.get(d,f));case 8:return p=e.sent,m=this.getResult(p),r&&(m=this.getRefreshResult(m,this.data)),u&&(m=this.getMoreResult(m,this.data)),this.data=c?(0,C.fillEmptyMetrics)(f,m):m,this.isLoading=!1,this.isRefreshing=!1,e.abrupt("return",m);case 16:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchStatisticsQuery",value:(t=(0,l.default)(n.default.mark((function e(t){var a,r,l,u,o,i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,l=t.workspace,u=this.getStatisticUrl({cluster:a,namespace:r,workspace:l}),e.next=4,(0,S.to)(request.get(u));case 4:return o=e.sent,i=this.getResult(o),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"kapis/monitoring.kubesphere.io/v1beta1"}}]),e}(),m=(0,d.default)(p.prototype,"isLoading",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),h=(0,d.default)(p.prototype,"isRefreshing",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),v=(0,d.default)(p.prototype,"etcdChecking",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),g=(0,d.default)(p.prototype,"supportETCD",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),(0,d.default)(p.prototype,"fetchMetrics",[y.action],Object.getOwnPropertyDescriptor(p.prototype,"fetchMetrics"),p.prototype),(0,d.default)(p.prototype,"fetchStatisticsQuery",[y.action],Object.getOwnPropertyDescriptor(p.prototype,"fetchStatisticsQuery"),p.prototype),p);t.default=R},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(3)),p=n(r(2320));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var h=function(e){(0,o.default)(r,e);var a=m(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){var e=this.props,a=e.className,r=e.img,n=e.desc;return s.default.createElement("div",{className:(0,d.default)(p.default.wrapper,a)},s.default.createElement("img",{src:r,alt:"No data"}),s.default.createElement("div",{className:p.default.content},t(n)))}}]),r}(s.default.PureComponent);a.default=h,h.propTypes={className:f.default.string,img:f.default.string,desc:f.default.string},h.defaultProps={img:"/assets/empty-card.svg",desc:"NO_DATA"}},,,function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(86),r(18),r(16),r(98),r(9),r(13),r(10),r(4),r(316),r(23),r(24),r(17),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(86),r(18),r(28),r(42),r(16),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(24),r(17),r(188),r(7);var l=n(r(315)),u=n(r(96)),o=n(r(43)),i=n(r(30)),c=n(r(58));r(41);var s,f,d,p=n(r(44)),m=n(r(36)),h=n(r(37)),v=n(r(55)),g=n(r(56)),y=n(r(51)),E=n(r(0)),b=r(14),_=r(239),O=n(r(1)),S=n(r(806)),C=n(r(63)),D=n(r(198)),k=n(r(26)),N=n(r(854)),T=r(186),R=n(r(3)),w=n(r(789)),I=r(791),M=n(r(105)),P=r(72),A=r(794),j=n(r(452)),L=n(r(325)),x=n(r(1374)),U=n(r(989)),z=n(r(1408)),F=n(r(1409)),G=r(52),V=n(r(3882)),B=n(r(1823));function Y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function W(e){for(var t=1;t0&&void 0!==i[0]?i[0]:{},a=t.noMetrics,r=t.silent,l=(0,c.default)(t,["noMetrics","silent"]),!(0,C.default)(n.state.params)){e.next=4;break}return n.store.list.isLoading=!1,e.abrupt("return");case 4:return u=n.props.limit,r&&(n.store.list.silent=!0),e.next=8,n.store.fetchList(W(W({limit:u},n.state.params),l));case 8:n.store.list.silent=!1,a||n.fetchMetrics();case 10:case"end":return e.stop()}}),e)}))),n.fetchMetrics=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.state.selectCluster,a=n.store.list,r=a.data,l=a.isLoading;return!((0,C.default)(r)||l||(0,C.default)(n.state.params))&&(!!globals.app.hasClusterModule(t,"whizard-monitoring")&&void n.monitorStore.fetchMetrics(W(W({step:"1m",times:30,resources:r.map((function(e){return e.name})),metrics:Object.values((0,G.hideGPUByLicense)(H,t))},n.state.params),e)))},n.getPagination=function(){var e=n.store.list;return{page:e.page,limit:e.limit,total:e.total}},n.getPodMetrics=function(e){var t=n.monitorStore.data,a={},r=n.state.cluster;return Object.entries((0,G.hideGPUByLicense)(H,r)).forEach((function(r){var n=(0,u.default)(r,2),l=n[0],o=n[1],i=(0,k.default)(t,"".concat(o,".data.result"))||[];a[l]=i.find((function(t){return(0,k.default)(t,"metric.pod")===e.name}))})),a},n.handleSearch=function(e){n.searchValue=e,n.fetchData({name:e}).then((function(){n.props.onSearch(e)}))},n.handleRefresh=function(){var e=n.searchValue?{name:n.searchValue}:{};n.fetchData(e).then((function(){var t=n.props,a=t.onSearch,r=t.onRefresh;(0,C.default)(e)?r():a(n.searchValue)}))},n.handlePage=function(e){n.fetchData({page:e}).then((function(){n.props.onPage(e)}))},n.handleExpand=function(e){n.setState((function(t){return{expandItem:t.expandItem===e?"":e}}))},n.getClustersOptions=function(){return n.props.clusters.map((function(e){return{label:E.default.createElement("span",null,(0,G.showNameAndAlias)(e,"cluster")),value:e}}))},n.handleClusterChange=function(e){n.setState({selectCluster:e,params:n.getParams(e)},(function(){n.fetchData(),n.initWebsocket()}))},n.renderHeader=function(){var e=n.props.isFederated,a=n.state.selectCluster;return E.default.createElement("div",{className:B.default.header},e&&E.default.createElement(T.Select,{key:a,name:"cluster",prefixIcon:E.default.createElement(T.Icon,{name:"cluster"}),className:B.default.cluster,value:a,options:n.getClustersOptions(),onChange:n.handleClusterChange}),E.default.createElement(T.InputSearch,{className:B.default.search,name:"search",placeholder:t("SEARCH_BY_NAME"),onSearch:n.handleSearch}),E.default.createElement("div",{className:B.default.actions},E.default.createElement(T.Button,{type:"flat",icon:"refresh",onClick:n.handleRefresh})))},n.handleShowEvents=function(e){n.trigger("pod.events",{detail:e,title:E.default.createElement("span",null,E.default.createElement(T.Icon,{name:"event"}),t("VIEW_EVENTS")),isEdgeWize:n.props.isEdgeWize,cluster:e.cluster})},n.renderFooter=function(){var e=n.getPagination(),a=e.total;return E.default.createElement(T.Level,{className:B.default.footer},E.default.createElement(T.LevelLeft,null,t("TOTAL_ITEMS",{num:a})),E.default.createElement(T.LevelRight,null,E.default.createElement(T.Pagination,(0,l.default)({},e,{onChange:n.handlePage}))))};var i=(0,k.default)(n.props.rootStore,"routing.location.pathname","").indexOf("observability")>-1;n.store=e.isEdgeWize?new x.default:new j.default,n.monitorStore=i?new F.default:e.isEdgeWize?new z.default:new U.default;var s=e.isFederated?(0,k.default)(e,"clusters[0]"):e.detail.cluster;return n.state={expandItem:"",selectCluster:s||"",params:n.getParams(s)},n.websocket=new L.default,n.initWebsocket(),n}return(0,h.default)(r,[{key:"initWebsocket",value:function(){var e=this,t=this.props.getReplica,a=this.state,r=a.selectCluster,n=a.params,l=void 0===n?{}:n,u=l.namespace,o=l.labelSelector,i="".concat(this.props.isEdgeWize?P.API_VERSIONS.edgewize:"").concat(r?"/".concat(r):"","/api/v1/watch/namespaces/").concat(u,"/pods?labelSelector=").concat(o);i&&u&&o&&(this.websocket.watch(i),this.fetchData=(0,N.default)(this.fetchData,2e3),this.disposer=(0,b.reaction)((function(){return e.websocket.message}),(function(a){if("Pod"===a.object.kind)if("MODIFIED"===a.type){var n=W({cluster:r},M.default.pods((0,b.toJS)(a.object)));e.store.list.updateItem(n),t&&t()}else"DELETED"!==a.type&&"ADDED"!==a.type||(e.fetchData({silent:!0}),t&&t())})))}},{key:"componentDidUpdate",value:function(e){var t=this,a=this.props,r=a.detail,n=a.details,l=a.isFederated,u=l&&!(0,S.default)(n,e.details);if(r!==e.detail||u){var o=l?(0,k.default)(this.props,"clusters[0]"):r.cluster;this.setState({expandItem:"",selectCluster:o||"",params:this.getParams(o)},(function(){t.fetchData(),t.initWebsocket()}))}}},{key:"componentDidMount",value:function(){this.fetchData(),(0,A.startAutoRefresh)(this,{method:"fetchMetrics",leading:!1})}},{key:"componentWillUnmount",value:function(){(0,A.stopAutoRefresh)(this),this.disposer&&this.disposer()}},{key:"renderContent",value:function(){var e=this,a=this.props,r=a.prefix,n=a.isFederated,l=a.isEdgeWize,u=a.showMonitoring,o=this.store.list,i=o.data,c=o.isLoading,s=o.silent,f=this.state.selectCluster,d=E.default.createElement("div",{className:B.default.body},(0,C.default)(i)?E.default.createElement("div",{className:B.default.empty},t("NO_RESOURCE_FOUND")):i.map((function(t){return E.default.createElement(V.default,{isEdgeWize:l,key:t.uid,prefix:n?"".concat(r,"/clusters/").concat(f):r,detail:t,showMonitoring:u,metrics:e.getPodMetrics(t),loading:e.monitorStore.isLoading,refreshing:e.monitorStore.isRefreshing,isExpand:e.state.expandItem===t.uid,onExpand:e.handleExpand,onShowEvents:e.handleShowEvents})})));return s?d:E.default.createElement(T.Loading,{spinning:c},d)}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.title,n=e.hideHeader,l=e.hideFooter,u=e.noWrapper,o=this.store.list.data;return u?this.renderContent():E.default.createElement(w.default,{className:(0,R.default)(B.default.main,a),title:t(r),empty:t("EMPTY_WRAPPER",{resource:t("POD")}),isEmpty:(0,C.default)(o)},!n&&this.renderHeader(),this.renderContent(),!l&&this.renderFooter())}}]),r}(E.default.Component),f.propTypes={prefix:O.default.string,isEdgeWize:O.default.bool,title:O.default.string,detail:O.default.object,details:O.default.object,hideHeader:O.default.bool,hideFooter:O.default.bool,isFederated:O.default.bool,onSearch:O.default.func,onRefresh:O.default.func,onPage:O.default.func,limit:O.default.number,showMonitoring:O.default.bool},f.defaultProps={title:"PODS",detail:{},details:{},isEdgeWize:!1,hideHeader:!1,hideFooter:!1,isFederated:!1,showMonitoring:!0,onSearch:function(){},onRefresh:function(){},onPage:function(){}},s=d))||s)||s)||s;a.default=Q},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var l=n(a(30)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51)),f=n(a(63)),d=r(a(0)),p=n(a(1)),m=n(a(3)),h=a(186),v=n(a(2044));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var y=function(e){(0,i.default)(a,e);var t=g(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&void 0!==d[0]?d[0]:{},a=t.cluster,r=t.namespace,n=t.module,l=(0,u.default)(t,["cluster","namespace","module"]),this.list.isLoading=!0,n&&(this.module=n),i=l,e.next=6,request.get(this.getListUrl({cluster:a,namespace:r,module:n}),i,{},(function(){return{items:[]}}));case 6:return c=e.sent,s=Array.isArray(c.items)?c.items.map((function(e){return O({cluster:a,module:n||f.module,config:(0,E.getValueObj)((0,y.safeAtob)((0,v.default)(e,'data["sink.yaml"]',"")))},f.mapper(e))})):[],this.list.update({data:s,total:c.items.length||0,isLoading:!1}),e.abrupt("return",s);case 10:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"fetchDetail",value:(a=(0,c.default)(o.default.mark((function e(t){var a,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get(this.getDetailUrl(t));case 3:return a=e.sent,(r=O(O({},t),this.mapper(a))).config=(0,E.getValueObj)((0,y.safeAtob)((0,v.default)(r._originData,'data["sink.yaml"]',""))),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"apiVersion",get:function(){return b.API_VERSIONS[this.module]}}]),p}(n(r(68)).default),(0,h.default)(i.prototype,"validateImageRegistrySecret",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"validateImageRegistrySecret"),i.prototype),(0,h.default)(i.prototype,"setDefault",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"setDefault"),i.prototype),(0,h.default)(i.prototype,"fetchListByK8s",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchListByK8s"),i.prototype),(0,h.default)(i.prototype,"fetchDetail",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),i);a.default=C},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(61)),u=r(a(58));a(41);var o,i=r(a(44)),c=r(a(30)),s=r(a(36)),f=r(a(37)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=a(14),g=r(a(26)),y=r(a(189)),E=a(72),b=r(a(105));function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module)},e}return(0,f.default)(C,[{key:"fetchChildResource",value:(v=(0,i.default)(n.default.mark((function e(){var t,a,r,o,i,c,s,f,d=this,p=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},a=t.kind,r=t.cluster,o=t.more,i=t.group,c=(0,u.default)(t,["kind","cluster","more","group"]),this.list.isLoading=!0,c.sortBy||void 0!==c.ascending||(c.sortBy=E.LIST_DEFAULT_ORDER[this.module]||"createTime"),c.limit!==1/0&&-1!==c.limit||(c.limit=-1,c.page=1),c.limit=c.limit||10,e.next=7,request.get("".concat(this.getDetailUrl({cluster:r,name:i}),"/").concat(a),this.getFilterParams(c));case 7:return s=e.sent,f=((0,g.default)(s,"items")||[]).map((function(e){return O({cluster:r},d.edgeNodeMapper(e))})),this.list.update(O(O({data:o?[].concat((0,l.default)(this.list.data),(0,l.default)(f)):f,total:s.totalItems||s.totalCount||s.total_count||f.length||0},c),{},{limit:Number(c.limit)||10,page:Number(c.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",{data:f,total:s.totalItems});case 11:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"fetchResourceList",value:(h=(0,i.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,l="/kapis/resources.kubesphere.io/v1alpha3".concat(this.getPath({cluster:a}),"/").concat(this.module).concat(r?"?labelSelector=apps.edgewize.io/namespace-".concat(r):""),e.next=4,request.get(l);case 4:return u=e.sent,o=(0,g.default)(u,"items"),e.abrupt("return",o);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"boundNamespace",value:(m=(0,i.default)(n.default.mark((function e(t){var a,r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.group,l=t.namespace,e.abrupt("return",this.submitting(request.post("".concat(this.getDetailUrl({cluster:a,name:r}),"/namespaces/").concat(l))));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return m.apply(this,arguments)})},{key:"unboundNamespace",value:(p=(0,i.default)(n.default.mark((function e(t){var a,r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.group,l=t.namespace,e.abrupt("return",this.submitting(request.delete("".concat(this.getDetailUrl({cluster:a,name:r}),"/namespaces/").concat(l))));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:"batchBoundNamespaces",value:(c=(0,i.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.group,l=t.namespaces,u="".concat(this.getDetailUrl({cluster:a,name:r}),"/namespaces"),o=l.map((function(e){return{op:"add",path:"/metadata/labels/apps.edgewize.io~1namespace-".concat(e),value:""}})),e.abrupt("return",this.submitting(request.patch(u,o)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"batchUnboundNamespaces",value:(o=(0,i.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.group,l=t.namespaces,u="".concat(this.getDetailUrl({cluster:a,name:r}),"/namespaces"),o=l.map((function(e){return{op:"remove",path:"/metadata/labels/apps.edgewize.io~1namespace-".concat(e),value:""}})),e.abrupt("return",this.submitting(request.patch(u,o)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"addGroupNode",value:(r=(0,i.default)(n.default.mark((function e(t){var a,r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.group,l=t.node,e.abrupt("return",this.submitting(request.post("".concat(this.getDetailUrl({cluster:a,name:r}),"/nodes/").concat(l))));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"fetchAllNamespaces",value:(a=(0,i.default)(n.default.mark((function e(){var t,a,r,l,o,i=this,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),e.next=3,request.get("".concat(this.getResourceUrl({cluster:a}),"/namespaces"),r);case 3:return l=e.sent,o=((0,g.default)(l,"items")||[]).map((function(e){return O({cluster:a},i.edgeNodeMapper(e))})),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchListProjectGroups",value:(t=(0,i.default)(n.default.mark((function e(){var t,a,r,o,i,c,s,f,d,p=this,m=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},a=t.cluster,r=t.workspace,o=t.namespace,i=t.more,c=t.devops,s=(0,u.default)(t,["cluster","workspace","namespace","more","devops"]),this.list.isLoading=!0,s.sortBy||void 0!==s.ascending||(s.sortBy=E.LIST_DEFAULT_ORDER[this.module]||"createTime"),s.limit!==1/0&&-1!==s.limit||(s.limit=-1,s.page=1),s.limit=s.limit||10,e.next=7,request.get(this.getResourceUrl({cluster:a,workspace:r,namespace:o,devops:c}),this.getFilterParams(s));case 7:return f=e.sent,d=((0,g.default)(f,"items")||[]).map((function(e){return O({cluster:a,namespace:o,workspace:r},p.mapper(e))})),this.list.update(O(O({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(d)):d,total:f.totalItems||f.totalCount||f.total_count||d.length||0},(0,y.default)(s,"labelSelector")),{},{limit:Number(s.limit)||10,page:Number(s.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",d);case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"edgeNodeMapper",get:function(){return b.default.edgenodes}}]),C}(r(a(68)).default),(0,h.default)(o.prototype,"fetchChildResource",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchChildResource"),o.prototype),(0,h.default)(o.prototype,"fetchResourceList",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchResourceList"),o.prototype),(0,h.default)(o.prototype,"boundNamespace",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"boundNamespace"),o.prototype),(0,h.default)(o.prototype,"unboundNamespace",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"unboundNamespace"),o.prototype),(0,h.default)(o.prototype,"batchBoundNamespaces",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"batchBoundNamespaces"),o.prototype),(0,h.default)(o.prototype,"batchUnboundNamespaces",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"batchUnboundNamespaces"),o.prototype),(0,h.default)(o.prototype,"addGroupNode",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"addGroupNode"),o.prototype),(0,h.default)(o.prototype,"fetchListProjectGroups",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchListProjectGroups"),o.prototype),o);t.default=C},function(e,t,a){e.exports={CodeEditor:"fWKJIVIp0j8BpxLeQvB84",clickable:"_1MWvcZ4Nk-gUkGBi2mTlT5",dockerCredentialsContent:"_1Ft3A_KxSha1ekW7Kj7PhV",dockerCredentialsContent__title:"cvH0AdmzBm64wtNfOw-r6",dockerCredentialsContent__content:"_6e1Y_TkD0j9LQti3mZtTI",dockerCredentialsContent__trashicon:"_2OKbHoYbk9D8ava2syyAkO",desc:"_3dhQzgRA0CKwra7jXP8LIj",info:"_1tc604kXLhTZ5HZc1wTviA",columns:"_2BKaEhU1omIebd5PVjl-mC"}},,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(84),a(29),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(22),a(23),a(17),a(85),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(84),a(29),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(85),a(38),a(7),a(32);var n=r(a(43)),l=r(a(61)),u=r(a(58));a(41);var o,i,c,s,f,d,p=r(a(44)),m=r(a(30)),h=r(a(65)),v=r(a(36)),g=r(a(37)),y=r(a(88)),E=r(a(55)),b=r(a(56)),_=r(a(51)),O=r(a(49)),S=(r(a(66)),a(14)),C=a(444),D=r(a(26)),k=r(a(189)),N=a(72);function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t0&&void 0!==v[0]?v[0]:{},a=t.cluster,r=t.workspace,o=t.namespace,i=t.more,c=t.devops,s=t.type,f=void 0===s?"node":s,d=(0,u.default)(t,["cluster","workspace","namespace","more","devops","type"]),this.list.isLoading=!0,d.sortBy||void 0!==d.ascending||(d.sortBy=N.LIST_DEFAULT_ORDER[this.module]||"createTime"),d.limit!==1/0&&-1!==d.limit||(d.limit=-1,d.page=1),d.limit=d.limit||10,e.next=7,request.get(this.getResourceUrl({cluster:a,workspace:r,devops:c}),this.withTypeSelectParams(d,f));case 7:return p=e.sent,m=((0,D.default)(p,"items")||[]).map((function(e){return R(R({cluster:a,namespace:o},e),h.mapper(e))})),this.list.update(R(R({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(m)):m,total:p.totalItems||p.total_count||m.length||0},(0,k.default)(d,"labelSelector")),{},{limit:Number(d.limit)||10,page:Number(d.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",m);case 11:case"end":return e.stop()}}),e,this)}))),function(){return _.apply(this,arguments)})},{key:"fetchDetail",value:(b=(0,p.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get("".concat(this.getResourceUrl(t),"/").concat(t.name));case 3:return a=e.sent,r=R(R(R({},t),this.mapper(a)),{},{kind:"Node"}),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return b.apply(this,arguments)})},{key:"fetchCount",value:(m=(0,p.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get(this.getResourceUrl(t),{labelSelector:"node-role.kubernetes.io/master"});case 2:a=e.sent,r=a.items.filter((function(e){return(0,C.getNodeRoles)(e.metadata.labels).includes("worker")})).length,this.masterNum=a.items.filter((function(e){var t=(0,C.getNodeRoles)(e.metadata.labels);return t.includes("master")||t.includes("control-plane")})).length,this.masterCount=a.totalItems,this.masterWorkerCount=r;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return m.apply(this,arguments)})},{key:"batchPatchTaints",value:(o=(0,p.default)(n.default.mark((function e(t){var a=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.submitting(Promise.all(t.map((function(e){var t=e.taints;return request.patch(a.getDetailUrl(e),{spec:{taints:t}})}))));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"cordon",value:(r=(0,p.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.name,l={spec:{unschedulable:!0}},e.next=4,request.patch(this.getDetailUrl({cluster:a,name:r}),l);case 4:u=e.sent,this.detail=this.mapper(u),this.originDetail=u;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"uncordon",value:(a=(0,p.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.name,l={spec:{unschedulable:null}},e.next=4,request.patch(this.getDetailUrl({cluster:a,name:r}),l);case 4:u=e.sent,this.detail=this.mapper(u),this.originDetail=u;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"deleteSelected",value:(t=(0,p.default)(n.default.mark((function e(t){var a=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){var t=a.list.data[e];return"master"===t.role?null:request.delete(a.getDetailUrl(t),{orphanDependents:!1})})));case 2:this.list.selectedRowKeys=[];case 3:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),S}(r(a(68)).default),i=(0,O.default)(o.prototype,"nodesMetrics",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),c=(0,O.default)(o.prototype,"nodeMetrics",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),s=(0,O.default)(o.prototype,"masterNum",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),f=(0,O.default)(o.prototype,"masterCount",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),d=(0,O.default)(o.prototype,"masterWorkerCount",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),(0,O.default)(o.prototype,"fetchList",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchList"),o.prototype),(0,O.default)(o.prototype,"fetchDetail",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchDetail"),o.prototype),(0,O.default)(o.prototype,"fetchCount",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchCount"),o.prototype),(0,O.default)(o.prototype,"batchPatchTaints",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"batchPatchTaints"),o.prototype),(0,O.default)(o.prototype,"cordon",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"cordon"),o.prototype),(0,O.default)(o.prototype,"uncordon",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"uncordon"),o.prototype),(0,O.default)(o.prototype,"deleteSelected",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"deleteSelected"),o.prototype),o);t.default=I},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(16),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(16),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l,u=r(a(44)),o=r(a(36)),i=r(a(37)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(49)),p=r(a(26)),m=a(14),h=a(72),v=r(a(1090)),g=r(a(1091));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=(l=function(e){(0,c.default)(r,e);var t,a=y(r);function r(e){var t;return(0,o.default)(this,r),(t=a.call(this,e)).getWatchListUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/".concat("cronjobs"===t.module?"apis/batch/v1":h.API_VERSIONS[t.module],"/watch").concat(t.getPath(e),"/").concat(t.module)},t.getWatchUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(t.getWatchListUrl(e),"/").concat(e.name)},t.getListUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/".concat("cronjobs"===t.module?"apis/batch/v1":h.API_VERSIONS[t.module]).concat(t.getPath(e),"/").concat(t.module).concat(e.dryRun?"?dryRun=All":"")},t.getResourceUrl=function(e){var a=e.cluster,r=e.namespace;return"/kapis/resources.kubesphere.io/v1alpha3".concat(t.getPath({namespace:r,cluster:a}),"/").concat(t.module)},t.getServiceRequest=function(e,t){var a=new g.default;return t.namespace=t.namespace||(0,p.default)(e,"metadata.namespace"),{url:a.getListUrl(t),data:e}},t.hpaStore=new v.default,t}return(0,i.default)(r,[{key:"rerun",value:(t=(0,u.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.cluster,l=t.namespace,e.next=3,request.get(this.getDetailUrl({name:a,cluster:r,namespace:l}));case 3:return u=e.sent,o=(0,p.default)(u,"metadata.resourceVersion"),e.abrupt("return",this.submitting(request.post("/kapis/operations.kubesphere.io/v1alpha3".concat(this.getPath({namespace:l,cluster:r}),"/jobs/").concat(a,"?action=rerun&resourceVersion=").concat(o))));case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),r}(r(a(318)).default),(0,d.default)(l.prototype,"rerun",[m.action],Object.getOwnPropertyDescriptor(l.prototype,"rerun"),l.prototype),l);t.default=E},,,,function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(86),r(18),r(16),r(27),r(9),r(13),r(10),r(24),r(64),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(30));r(12),r(5),r(11),r(31),r(6),r(86),r(18),r(28),r(16),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(24),r(64),r(7);var u=n(r(0)),o=n(r(26)),i=n(r(63)),c=n(r(925)),s=r(52),f=r(72),d=r(1513),p=n(r(2166));function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function h(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};if(!e.active)return null;var a=e.renderLabel,r=e.payload,n=e.usageData,l=e.totalData,m=e.tailText,v=e.alert,g=e.isTranslate,y=void 0===g||g,E=r||[],b=e.label,_=(0,o.default)(E,"[0].unit")||"",O="default"===_?"":"%"===_?"%":"".concat(t(_)),S=a?a(e):b,C=function(e){var a=e.indexOf("gpu")>-1?"gpu":e,r="gpu"===a?"".concat(a,".limit"):a;return f.ICON_TYPES[a]?t(r.replace(/[. ]/g,"_").toUpperCase()):r};return u.default.createElement("div",{className:p.default.tooltip},v&&u.default.createElement("div",{className:p.default.item},u.default.createElement(d.ReactComponent,null),"".concat(t(C(v.name||"")),":").concat("core"===v.unit?t("VALUE_CORES",{value:v.value}):t("VALUE_UNIT",h({},v)))),u.default.createElement("div",{className:p.default.label,style:{marginTop:"".concat(v?"8px":"0px")}},u.default.createElement("span",null,S),m&&u.default.createElement("span",null,m)),u.default.createElement("div",{className:p.default.list},E.map((function(e){var a=e.dataKey,r=e.name,f=e.value,d=void 0===f?0:f;if((0,c.default)(Number(d)))return null;var m=(0,o.default)(e,"stroke"),h="";if(!(0,i.default)(n)&&!(0,i.default)(l)){var v=(0,o.default)(n.find((function(e){return e.time===b})),r)||0,g=(0,o.default)(l.find((function(e){return e.time===b})),r)||0;h=" (".concat(v,"/").concat(g,")")}var E=(0,s.coreUnitTS)(d,O);return u.default.createElement("div",{key:a,className:p.default.item},u.default.createElement("i",{style:{background:m}}),y?t(r):r,": ",d," ".concat(t(E)),h)}))))};a.default=v},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(22),r(23),r(57),r(17);var l=n(r(43));r(41);var u=n(r(44)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=n(r(63)),v=n(r(26)),g=n(r(854)),y=n(r(158)),E=r(186),b=n(r(846)),_=n(r(2321));function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var S=function(e){var t=e.data,a=e.total,r=e.isEnd;return(0,y.default)(r)?!(0,h.default)(t)&&t.length0&&e<1?e.toFixed(2):e>1&&e!==1/0?e.toFixed(1):e},n.memoryFormatter=function(e){return(e=Math.round(e))>0&&e<1e3?e-e%10:e>1e3&&e<2e3?e-e%50:e>2e3&&e!==1/0?e-e%100:e},n.checkError=function(e){var t="",a="",r=e.requests,n=e.limits;return n.cpu&&!String(n.cpu).endsWith(".")&&Number(r.cpu)>Number(n.cpu)&&(t="RequestExceed"),n.memory&&!String(n.memory).endsWith(".")&&Number(r.memory)>Number(n.memory)&&(a="RequestExceed"),{cpuError:t,memoryError:a}},n.checkAndTrigger=function(){var e=n.state,t=e.requests,a=e.limits,r=e.gpu,l=e.workspaceLimits,u=e.workspaceRequests;n.setState({workspaceLimitCheck:{requestCpuError:n.checkNumOutLimit(t.cpu,u.cpu),requestMemoryError:n.checkNumOutLimit(t.memory,u.memory),limitCpuError:n.checkNumOutLimit(a.cpu,l.cpu),limitMemoryError:n.checkNumOutLimit(a.memory,l.memory),gpuLimitError:n.checkGpuOutOfLimit(r)}},n.triggerChange)},n.checkGpuOutOfLimit=function(e){var t=e.type,a=(0,h.default)(n.props,"workspaceLimitProps.gpuLimit",[]).filter((function(e){return Object.keys(e)[0].endsWith(t)})),r=a.length>0?Object.values(a[0])[0]:"Not Limited";return n.checkNumOutLimit(e.value,r)},n.checkNumOutLimit=function(e,t){var a=n.props.omitQuotaCheck;return void 0!==a&&a?"":"Not Limited"!==t&&(0,y.default)(Number(e))&&Number(e)>t?"workspaceRequestExceed":""},n.triggerChange=function(){var e=n.props,t=e.onChange,a=e.onError,r=n.state,l=r.requests,o=r.limits,i=r.cpuError,c=r.memoryError,s=r.workspaceLimitCheck,f=r.gpu,d=n.memoryUnit,p="Core"===n.cpuUnit?"":n.cpuUnit,m=n.getWorkspaceCheckError();m.length>0?a(i||c||s[m[0]]):a(i||c);var h={};""!==l.cpu&&l.cpu>=0&&l.cpu<1/0&&(0,v.default)(h,"requests.cpu","".concat(l.cpu).concat(p)),""!==l.memory&&l.memory>=0&&l.memory<1/0&&(0,v.default)(h,"requests.memory","".concat(l.memory).concat(d)),""!==o.cpu&&o.cpu>=0&&o.cpu<1/0&&(0,v.default)(h,"limits.cpu","".concat(o.cpu).concat(p)),""!==o.memory&&o.memory>=0&&o.memory<1/0&&(0,v.default)(h,"limits.memory","".concat(o.memory).concat(d)),f.type&&f.value&&((0,v.default)(h,"limits",N(N({},h.limits),{},(0,u.default)({},"".concat(f.type),f.value))),(0,v.default)(h,"requests",N(N({},h.requests),{},(0,u.default)({},"".concat(f.type),f.value)))),t(h)},n.getWorkspaceCheckError=function(){return Object.keys(n.state.workspaceLimitCheck).filter((function(e){return""!==n.state.workspaceLimitCheck[e]}))},n.handleCPUChange=function(e){n.setState((function(t){var a=t.requests,r=t.limits;return{requests:N(N({},a),{},{cpu:0===e[0]?"":e[0]}),limits:N(N({},r),{},{cpu:0===e[1]?"":e[1]})}}),n.checkAndTrigger)},n.handleMemoryChange=function(e){n.setState((function(t){var a=t.requests,r=t.limits;return{requests:N(N({},a),{},{memory:0===e[0]?"":e[0]}),limits:N(N({},r),{},{memory:0===e[1]?"":e[1]})}}),n.checkAndTrigger)},n.handleInputChange=function(e){return function(t){var a;a=""===t||void 0===t?"":t,n.setState((function(t){return(0,v.default)(t,e,(0,b.default)(a)?"":a),N(N({},t),n.checkError(t))}),n.checkAndTrigger)}},n.handleGpuInputChange=function(e,t){var a;if(""===t)a="";else{var r=/^(0|[1-9][0-9]*)$/.exec(t);a=null==r?(0,h.default)(n.state,"gpu.value",""):r[0]}n.setState({gpu:{type:n.state.gpu.type,value:a}},n.checkAndTrigger)},n.gpuSelectChange=function(e){n.setState({gpu:{type:e,value:n.state.gpu.value}},n.checkAndTrigger)},n.renderLimitTip=function(e,a){return"Not Limited"!==e?"".concat(e," ").concat(a):t("NO_LIMIT")},n.renderGpuTip=function(){var e=n.props.workspaceLimitProps,a=n.state.gpu,r=null==e?void 0:e.gpuLimit.filter((function(e){return(0,E.default)(e)?e:Object.keys(e)[0].endsWith(a.type)}))[0];return d.default.createElement("div",{className:D.default.message},!(0,_.default)(r)&&d.default.createElement(d.default.Fragment,null,d.default.createElement("span",null,t("GPU_TYPE"),":"),d.default.createElement("span",null,a.type),d.default.createElement("br",null)),d.default.createElement("span",null,t("GPU_LIMIT"),":"),d.default.createElement("span",null,(0,_.default)(r)?t("NO_LIMIT"):Object.values(r)[0]))},n.renderGpuSelect=function(){return d.default.createElement(O.Column,null,d.default.createElement("div",{className:D.default.inputGroup},d.default.createElement("img",{src:"/assets/GPU.svg",size:48}),d.default.createElement("div",{className:(0,m.default)(D.default.input)},d.default.createElement("div",{className:D.default.label},d.default.createElement("span",null,t("GPU_TYPE"))),d.default.createElement("div",{className:D.default.inputBox},d.default.createElement(O.Select,{options:n.gpuOption,value:n.state.gpu.type,onChange:n.gpuSelectChange,placeholder:" "}))),d.default.createElement("div",{className:(0,m.default)(D.default.input)},d.default.createElement("div",{className:D.default.label},d.default.createElement("span",null,t("GPU_LIMIT"))),d.default.createElement("div",{className:D.default.inputBox},d.default.createElement(C.default,{name:"gpu.value",value:n.state.gpu.value,onChange:n.handleGpuInputChange,placeholder:t("NO_LIMIT")})))))},n.state=N(N({},r.getValue(e)),{},{defaultValue:e.defaultValue,cpuError:"",memoryError:"",workspaceLimitCheck:{}}),n}return(0,i.default)(r,[{key:"componentDidUpdate",value:function(e,t){e.isEdit&&!this.props.isEdit&&(0,g.default)(e.defaultValue,t.defaultValue)&&this.setState(N(N({},r.getValue(this.props)),{},{defaultValue:this.props.defaultProps}))}},{key:"getLimit",value:function(e){return(0,y.default)(Number(e))?e:""}},{key:"getRequest",value:function(e){return null==e?"":e}},{key:"renderQuotasTip",value:function(){var e=this,a=this.props,r=a.workspaceLimitProps,n=a.supportGpuSelect,l=this.state,u=l.workspaceLimits,o=l.workspaceRequests,i=this.memoryUnit,c=this.cpuUnit,s=t("AVAILABLE_QUOTAS");return d.default.createElement(O.Alert,{title:s,type:"info",className:"margin-t12",message:d.default.createElement(d.default.Fragment,null,d.default.createElement("div",null,d.default.createElement("div",{className:D.default.message},d.default.createElement("span",null,t("RESOURCE_REQUESTS"),":"),d.default.createElement("span",null,"CPU ",e.renderLimitTip(o.cpu,c),", ",t("MEMORY")," ",e.renderLimitTip(o.memory,i))),d.default.createElement("div",{className:D.default.message},d.default.createElement("span",null,t("RESOURCE_LIMITS"),":"),d.default.createElement("span",null,"CPU ",e.renderLimitTip(u.cpu,c),", ",t("MEMORY")," ",e.renderLimitTip(u.memory,i))),n&&r.gpuLimit&&e.renderGpuTip()))})}},{key:"render",value:function(){var e=this.state,a=e.cpuError,r=e.memoryError,n=e.workspaceLimitCheck,l=this.props.supportGpuSelect,o=this.getWorkspaceCheckError();return d.default.createElement("div",{className:D.default.wrapper},d.default.createElement("div",{className:D.default.inputWrapper},d.default.createElement(O.Columns,{className:"is-gapless"},d.default.createElement(O.Column,null,d.default.createElement("div",{className:D.default.inputGroup},d.default.createElement(O.Icon,{name:"cpu",size:48}),d.default.createElement("div",{className:(0,m.default)(D.default.input,(0,u.default)({},D.default.error,a||n.requestCpuError))},d.default.createElement("span",{className:D.default.label},t("CPU_REQUEST")),d.default.createElement("div",{className:D.default.inputBox},d.default.createElement(C.default,{name:"requests.cpu",value:this.getRequest(this.state.requests.cpu),onChange:this.handleInputChange("requests.cpu"),placeholder:t("NO_REQUEST")}),d.default.createElement("span",{className:D.default.unit},this.cpuUnit))),d.default.createElement("div",{className:(0,m.default)(D.default.input,(0,u.default)({},D.default.error,a||n.limitCpuError))},d.default.createElement("span",{className:D.default.label},t("CPU_LIMIT")),d.default.createElement("div",{className:D.default.inputBox},d.default.createElement(C.default,{name:"limits.cpu",value:this.getLimit(this.state.limits.cpu),onChange:this.handleInputChange("limits.cpu"),placeholder:t("NO_LIMIT")}),d.default.createElement("span",{className:D.default.unit},this.cpuUnit))))),d.default.createElement(O.Column,null,d.default.createElement("div",{className:D.default.inputGroup},d.default.createElement(O.Icon,{name:"memory",size:48}),d.default.createElement("div",{className:(0,m.default)(D.default.input,(0,u.default)({},D.default.error,r||n.requestMemoryError))},d.default.createElement("span",{className:D.default.label},t("MEMORY_REQUEST")),d.default.createElement("div",{className:D.default.inputBox},d.default.createElement(C.default,{name:"requests.memory",value:this.getRequest(this.state.requests.memory),onChange:this.handleInputChange("requests.memory"),placeholder:t("NO_REQUEST")}),d.default.createElement("span",{className:D.default.unit},this.memoryUnit))),d.default.createElement("div",{className:(0,m.default)(D.default.input,(0,u.default)({},D.default.error,r||n.limitMemoryError))},d.default.createElement("span",{className:D.default.label},t("MEMORY_LIMIT")),d.default.createElement("div",{className:D.default.inputBox},d.default.createElement(C.default,{name:"limits.memory",value:this.getLimit(this.state.limits.memory),onChange:this.handleInputChange("limits.memory"),placeholder:t("NO_LIMIT")}),d.default.createElement("span",{className:D.default.unit},this.memoryUnit))))),l&&this.renderGpuSelect())),this.ifRenderTip&&this.renderQuotasTip(),(a||r)&&d.default.createElement(O.Alert,{type:"error",className:"margin-t12",message:t("REQUEST_EXCEED_LIMIT")}),o.length>0&&d.default.createElement(O.Alert,{type:"error",className:"margin-t12",message:t("REQUEST_EXCEED_AVAILABLE_QUOTA")}))}},{key:"cpuUnit",get:function(){return this.props.cpuProps.unit||"Core"}},{key:"memoryUnit",get:function(){return this.props.memoryProps.unit||"Mi"}},{key:"gpuOption",get:function(){return globals.config.supportGpuType.reduce((function(e,a){return[].concat((0,l.default)(e),[{value:a,label:t(a.replace(/[-/.]/g,"_").toUpperCase())}])}),[])}},{key:"gpuType",get:function(){return this.state.gpu.type}},{key:"ifRenderTip",get:function(){var e=this.props.workspaceLimitProps;return!(0,E.default)(e)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return(0,g.default)(e.defaultValue,t.defaultValue)&&(0,g.default)(e.workspaceLimitProps,t.workspaceLimitProps)?null:N(N({},r.getValue(e)),{},{defaultValue:e.defaultValue,workspaceLimitProps:e.workspaceLimitProps})}},{key:"allowInputDot",value:function(e,t,a){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e===1/0)return e;var n=e&&r?e.slice(0,-2):e;if(n&&String(n).endsWith(".")){var l=a(e,t);return"".concat(l,".")}if(n&&String(n).endsWith(".0")){var u=a(e,t);return"".concat(u,".0")}return a(e,t)}},{key:"getValue",value:function(e){var t=(0,h.default)(e,"cpuProps.unit","Core"),a=(0,h.default)(e,"memoryProps.unit","Mi"),n=r.getDefaultRequestValue(e,"cpu"),l=r.getDefaultRequestValue(e,"memory"),u=r.getDefaultLimitValue(e,"cpu"),o=r.getDefaultLimitValue(e,"memory"),i=r.allowInputDot(n,t,S.cpuFormat),c=r.allowInputDot(l,a,S.memoryFormat,!0),s=r.allowInputDot(u,t,S.cpuFormat),f=r.allowInputDot(o,a,S.memoryFormat,!0),d=(0,S.memoryFormat)("".concat(r.getWorkspaceRequestLimit(e,"memory"),"Mi"),a),p=(0,S.memoryFormat)("".concat(r.getWorkspaceLimitValue(e,"memory"),"Mi"),a),m=(0,S.cpuFormat)(r.getWorkspaceRequestLimit(e,"cpu"),t),v=(0,S.cpuFormat)(r.getWorkspaceLimitValue(e,"cpu"),t);return{requests:{cpu:i,memory:c},limits:{cpu:s,memory:f},workspaceRequests:{cpu:(0,b.default)(m)?"Not Limited":m,memory:(0,b.default)(d)?"Not Limited":d},workspaceLimits:{cpu:(0,b.default)(v)?"Not Limited":v,memory:(0,b.default)(p)?"Not Limited":p},gpu:r.gpuSetting(e)}}},{key:"getGpuFromProps",value:function(e){var t=globals.config.supportGpuType;if(!e)return{type:t[0],value:""};var a=Object.keys((0,h.default)(e,"requests",{})).filter((function(e){return t.some((function(t){return e.endsWith(t)}))})),r=(0,E.default)(a)?t[0]:a[0];return{type:r,value:(0,E.default)(a)?"":e.requests["".concat(r)]}}},{key:"gpuSetting",value:function(e){var t=(0,h.default)(e,"value",{}),a=(0,h.default)(e,"defaultValue",{});return(0,E.default)(t)?(0,E.default)(a)?r.getGpuFromProps():r.getGpuFromProps(a):r.getGpuFromProps(t)}},{key:"getDefaultRequestValue",value:function(e,t){var a;return(0,h.default)(e,"value.requests.".concat(t),null!==(a=(0,h.default)(e,"defaultValue.requests.".concat(t)))&&void 0!==a?a:"")}},{key:"getDefaultLimitValue",value:function(e,t){var a;return(0,h.default)(e,"value.limits.".concat(t),null!==(a=(0,h.default)(e,"defaultValue.limits.".concat(t)))&&void 0!==a?a:1/0)}},{key:"getWorkspaceRequestLimit",value:function(e,t){return(0,h.default)(e,"workspaceLimitProps.requests.".concat(t),"Not Limited")}},{key:"getWorkspaceLimitValue",value:function(e,t){return(0,h.default)(e,"workspaceLimitProps.limits.".concat(t),"Not Limited")}}]),r}(d.default.Component);a.default=R,R.propTypes={value:p.default.object,defaultValue:p.default.object,onChange:p.default.func,onError:p.default.func,supportGpuSelect:p.default.bool},R.defaultProps={value:{},onChange:function(){},onError:function(){},cpuProps:{},memoryProps:{},supportGpuSelect:!1}},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(84),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(85),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(84),r(18),r(28),r(191),r(42),r(16),r(159),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(85),r(188),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=n(r(837)),v=r(14),g=n(r(26)),y=n(r(63)),E=r(186),b=r(52),_=n(r(2458)),O=n(r(1047)),S=n(r(915)),C=n(r(874)),D=n(r(886)),k=n(r(2476));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var R={ascend:!1,descend:!0},w=function(e){(0,c.default)(r,e);var a=T(r);function r(e){var n;(0,o.default)(this,r),(n=a.call(this,e)).handleChange=function(e,t){n.props.onFetch(function(e){for(var t=1;t0&&!n.props.disabledSelectActions?n.renderSelectedTitle():n.renderNormalTitle()},n.renderTableFooter=function(){if(!n.props.pagination)return null;var e=n.props.pagination,t=e.total,a=e.page,r=e.limit;return d.default.createElement(D.default,{page:a,total:t,limit:r,onChange:n.handlePagination})};var l=(0,g.default)((0,b.safeParseJSON)(localStorage.getItem("hide-columns"),{}),e.tableId,[]);return n.state={hideColumns:l},n}return(0,i.default)(r,[{key:"shouldComponentUpdate",value:function(e,t){return!!this.props.alwaysUpdate||(e.data!==this.props.data||e.columns.length!==this.props.columns.length||e.selectedRowKeys.length!==this.props.selectedRowKeys.length||!(0,h.default)(e.filters,this.props.filters)||e.isLoading!==this.props.isLoading||!(0,h.default)(e.pagination,this.props.pagination)||t.hideColumns.length!==this.state.hideColumns.length)}},{key:"renderSelectActions",value:function(){var e=this.props,a=e.onDelete,r=e.selectActions;return r?d.default.createElement("div",null,r.map((function(e){return d.default.createElement(E.Button,{key:e.key,type:e.type,disabled:e.disabled,className:k.default.button,onClick:e.onClick,"data-test":"table-".concat(e.key)},e.text)}))):d.default.createElement("div",null,a&&d.default.createElement(E.Button,{type:"danger",className:k.default.button,onClick:a,"data-test":"table-delete"},t("DELETE")))}},{key:"renderSearch",value:function(){var e=this.props,a=e.hideSearch,r=e.searchType,n=e.filters,l=e.columns,u=e.columnSearch,o=e.showTimeSelector,i=e.onTimeSelectorChange,c=e.onTimeSelectorDelete,s=e.showKeywords;if(a)return null;if(r){var f=this.props.placeholder||t("SEARCH_BY_NAME");return d.default.createElement(E.InputSearch,{className:k.default.search,value:n[r],onSearch:this.handleSearch,placeholder:f})}return d.default.createElement(S.default,{className:k.default.search,columns:u||l,filters:n,showTimeSelector:o,showKeywords:s,onTimeSelectorChange:i,onTimeSelectorDelete:c,onChange:this.handleFilterInput})}},{key:"renderActions",value:function(){var e=this.props,a=e.onCreate,r=e.createText,n=e.actions;return n?n.map((function(e){return e.customDom?e.customDom:e.tooltip?d.default.createElement(_.default,{key:"".concat(e.key,"_tooltip"),content:e.tooltip.message,placement:e.tooltip.placement},d.default.createElement("div",{className:k.default.tooltipBox},d.default.createElement(E.Button,{key:e.key,type:e.type,className:k.default.create,onClick:e.onClick,"data-test":"table-".concat(e.key),disabled:e.forbidden||!1},e.text))):d.default.createElement(E.Button,{key:e.key,type:e.type,className:k.default.create,onClick:e.onClick,"data-test":"table-".concat(e.key),disabled:e.forbidden||!1},e.text)})):a?d.default.createElement(E.Button,{type:"control",className:k.default.create,onClick:a,"data-test":"table-create"},t(r||"CREATE")):null}},{key:"renderNormalTitle",value:function(){var e=this.props,a=e.hideCustom,r=e.customFilter,n=e.columns,l=this.state.hideColumns;return d.default.createElement(E.Level,null,r&&d.default.createElement(E.LevelLeft,null,r),d.default.createElement(E.LevelItem,null,this.renderSearch()),d.default.createElement(E.LevelRight,null,d.default.createElement("div",null,d.default.createElement(E.Button,{type:"flat",icon:"refresh",onClick:this.handleRefresh,"data-test":"table-refresh"}),!a&&d.default.createElement(O.default,{className:k.default.columnMenu,title:t("CUSTOM_COLUMNS"),columns:n,value:l,onChange:this.handleColumnsHide}),this.renderActions())))}},{key:"renderEmptyText",value:function(){return this.props.emptyText||d.default.createElement("div",{className:k.default.emptyText},d.default.createElement("span",{className:k.default.emptyTipIcon},d.default.createElement(E.Icon,{name:"exclamation",size:48})),d.default.createElement("div",null,t("NO_MATCHING_RESULT_FOUND")),d.default.createElement("p",null,t("YOU_CAN_TRY_TO"),d.default.createElement("span",{className:k.default.action,onClick:this.handleRefresh,"data-test":"table-empty-refresh"},t("REFRESH_DATA")),t("OR"),d.default.createElement("span",{className:k.default.action,onClick:this.clearFilter,"data-test":"table-empty-clear-filter"},t("CLEAR_SEARCH_CONDITIONS"))))}},{key:"renderEmpty",value:function(){var e=this.props,t=e.module,a=e.name,r=e.emptyProps,n=void 0===r?{}:r;return d.default.createElement(C.default,(0,l.default)({action:this.renderActions(),name:a,module:t},n))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.data,r=e.isLoading,n=e.silentLoading,u=e.rowKey,o=e.selectedRowKeys,i=e.onSelectRowKeys,c=e.hideHeader,s=e.hideFooter,f=e.extraProps,p=e.getCheckboxProps,h=e.expandedRowRender,g=e.rowExpandable;if(this.showEmpty)return this.renderEmpty();var y={};return c||(y.title=this.renderTableTitle()),s||(y.footer=this.renderTableFooter()),i&&(y.rowSelection={selectedRowKeys:o,getCheckboxProps:p,onSelect:function(e,t,a){i(a)},onSelectAll:function(e,t){i(t)}}),d.default.createElement(E.Table,(0,l.default)({className:(0,m.default)(k.default.table,"ks-table",t,k.default.filterMenu),rowKey:u,columns:this.filteredColumns,dataSource:(0,v.toJS)(a),loading:!n&&r,onChange:this.handleChange,emptyText:this.renderEmptyText(),expandedRowRender:h,rowExpandable:g},y,f))}},{key:"showEmpty",get:function(){var e=this.props,t=e.filters,a=e.pagination,r=e.isLoading;return"showEmpty"in this.props?this.props.showEmpty:!r&&(0,y.default)(t)&&0===a.total}},{key:"filteredColumns",get:function(){var e=this.state.hideColumns,t=void 0===e?[]:e;return this.props.columns.filter((function(e){return e&&!t.includes(e.key||e.dataIndex)}))}}]),r}(d.default.Component);a.default=w,w.propTypes={data:p.default.oneOfType([p.default.array,p.default.object]).isRequired,columns:p.default.array.isRequired,selectedRowKeys:p.default.array,isLoading:p.default.bool,pagination:p.default.object,filters:p.default.object,rowKey:p.default.any,onFetch:p.default.func,onRefresh:p.default.func,onSelectRowKeys:p.default.func,getCheckboxProps:p.default.func,onDelete:p.default.func,onCreate:p.default.func,hideHeader:p.default.bool,hideFooter:p.default.bool,hideSearch:p.default.bool,hideCustom:p.default.bool,actions:p.default.array,selectActions:p.default.array,extraProps:p.default.object,alwaysUpdate:p.default.bool,emptyText:p.default.any},w.defaultProps={rowKey:"name",selectedRowKeys:[],onFetch:function(){},hideHeader:!1,hideFooter:!1,hideSearch:!1,hideCustom:!1,extraProps:{},pagination:{},filters:{}}},function(e,a,r){"use strict";r(15);var n=r(20);r(16),r(4),r(23),r(24),r(17),r(64),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(16),r(4),r(23),r(57),r(24),r(17),r(64);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(3)),p=n(r(158)),m=n(r(194)),h=r(186),v=r(72),g=n(r(2474));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var E=function(e){(0,o.default)(r,e);var a=y(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){var e=this.props,a=e.module,r=e.icon,n=e.title,l=e.name,u=e.desc,o=e.action,i=e.className,c=(0,p.default)(u)?t.html("".concat(l.replace(/[-\s]/g,"_").toUpperCase(),"_EMPTY_DESC")):u,f=s.default.createElement(h.Icon,{name:r||v.ICON_TYPES[a]||"appcenter",size:48});return(0,m.default)(r)&&(f=r()),s.default.createElement("div",{className:(0,d.default)(g.default.wrapper,i)},s.default.createElement("div",{className:g.default.image},f),s.default.createElement("div",{className:g.default.title},n||t("EMPTY_WRAPPER",{resource:t(l.replace(/[- ]/g,"_").toUpperCase())})),s.default.createElement("p",{className:g.default.desc},c),o&&s.default.createElement("div",{className:g.default.actions},o))}}]),r}(s.default.PureComponent);a.default=E,E.propTypes={module:f.default.string,name:f.default.string,title:f.default.string,desc:f.default.string,className:f.default.string,action:f.default.node},E.defaultProps={name:"",module:""}},,,,function(e,t,a){"use strict";a(15),a(5),a(31),a(73),a(18),a(16),a(24),a(64),a(75),Object.defineProperty(t,"__esModule",{value:!0}),t.ALERTING_STATUS=t.getAlertingResource=t.getQuery=void 0,a(5),a(31),a(73),a(18),a(16),a(4),a(24),a(64),a(75);var r=a(1797);t.getQuery=function(e){var t=e.kind,a=e.rule,n=e.resources,l="",u=a._metricType,o=a.thresholds,i=a.condition_type;switch(t){case"Node":l=u.replace("$1","node=".concat(n.length>1?"~":"",'"').concat(n.join("|"),'"'));break;case"Deployment":case"StatefulSet":case"DaemonSet":l=u.replace("$1","workload=".concat(n.length>1?"~":"",'"').concat(n.map((function(e){return"".concat(t,":").concat(e)})).join("|"),'"')).replace("$2",t.toLowerCase())}var c=o,s=r.ALL_METRICS_CONFIG[u].ruleConfig.find((function(e){return"thresholds"===e.name}));return s&&s.converter&&(c=s.converter(o)),l+=" ".concat(i," ").concat(c)};var n={Deployment:"deployments",StatefulSet:"statefulsets",DaemonSet:"daemonsets",Pod:"pods"};t.getAlertingResource=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=function(e,t){var a=e.pod;return a&&a.startsWith(e[t])?{module:"pods",name:e.pod,namespace:e.namespace}:{module:"job_name"===t?"jobs":"".concat(t,"s"),name:e[t],namespace:e.namespace}};if(e.node)return{module:"nodes",name:e.node};if(e.namespace){if(e.workload)return{module:n[e.owner_kind],name:e.workload.replace("".concat(e.owner_kind,":"),""),namespace:e.namespace};if(e.job_name)return t(e,"job_name");if(e.cronjob)return t(e,"cronjob");if(e.hpa)return{module:"hpas",name:e.hpa,namespace:e.namespace};if(e.deployment)return t(e,"deployment");if(e.statefulset)return t(e,"statefulset");if(e.daemonset)return t(e,"daemonset");if(e.pod)return{module:"pods",name:e.pod,namespace:e.namespace};if(e.service)return{module:"services",name:e.service,namespace:e.namespace}}return{}};t.ALERTING_STATUS=["disabled","inactive","pending","firing"]},,function(e,a,r){"use strict";r(15);var n=r(20);r(31),Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=e.data;if(a){var r=u.severityOptions.find((function(e){return e.value===a}));if(r)return l.default.createElement("span",{style:{backgroundColor:r.bgColor,color:r.color,fontWeight:600,padding:"0px 4px",whiteSpace:"nowrap"}},t(r.label))}return"-"},r(31),r(4);var l=n(r(0)),u=r(993)},function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return c}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("path",{d:"M17.613 10.43c1.07.653 2.38 2.418 2.926 4.543.546 2.124.455 4.027.455 4.027s-.706-1.172-.992-1.582c-.287-.411-1.494-1.941-3.367-2.828-1.874-.887-5.005-.73-5.005-.73l.37 3.705-9-6.288 9-6.266-.37 3.716s2.073.16 3.157.39c1.825.389 2.826 1.312 2.826 1.312z"}),i=u.a.createElement("path",{fill:"currentColor",d:"M12 17.564l-9-6.287 9-6.267z"}),c=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 24 24",width:"1em",height:"1em"},e),o,i)};t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxnPgogICAgICAgIDxwYXRoIGQ9Ik0xNy42MTMgMTAuNDNjMS4wNy42NTMgMi4zOCAyLjQxOCAyLjkyNiA0LjU0My41NDYgMi4xMjQuNDU1IDQuMDI3LjQ1NSA0LjAyN3MtLjcwNi0xLjE3Mi0uOTkyLTEuNTgyYy0uMjg3LS40MTEtMS40OTQtMS45NDEtMy4zNjctMi44MjgtMS44NzQtLjg4Ny01LjAwNS0uNzMtNS4wMDUtLjczbC4zNyAzLjcwNS05LTYuMjg4IDktNi4yNjYtLjM3IDMuNzE2czIuMDczLjE2IDMuMTU3LjM5YzEuODI1LjM4OSAyLjgyNiAxLjMxMiAyLjgyNiAxLjMxMnoiLz4KICAgICAgICA8cGF0aCBmaWxsPSJjdXJyZW50Q29sb3IiIGQ9Ik0xMiAxNy41NjRsLTktNi4yODcgOS02LjI2N3oiLz4KICAgIDwvZz4KPC9zdmc+Cg=="},,function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(29),a(73),a(18),a(16),a(137),a(98),a(9),a(13),a(10),a(4),a(316),a(22),a(23),a(17),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(160),a(29),a(73),a(18),a(28),a(42),a(16),a(137),a(34),a(15),a(98),a(9),a(13),a(10),a(4),a(316),a(22),a(23),a(57),a(17),a(38),a(7),a(32);var n=r(a(58)),l=r(a(30)),u=r(a(96)),o=r(a(43));a(41);var i,c,s,f,d,p,m,h=r(a(44)),v=r(a(65)),g=r(a(36)),y=r(a(37)),E=r(a(88)),b=r(a(55)),_=r(a(56)),O=r(a(51)),S=r(a(49)),C=(r(a(66)),a(14)),D=a(52),k=a(794),N=r(a(74)),T=r(a(845));function R(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return(0,g.default)(this,O),e=_.call(this,t),(0,v.default)(e,"baseResourcesSummary",c,(0,E.default)(e)),(0,v.default)(e,"monitorData",s,(0,E.default)(e)),(0,v.default)(e,"roleAndMember",f,(0,E.default)(e)),(0,v.default)(e,"alertData",d,(0,E.default)(e)),(0,v.default)(e,"PodData",p,(0,E.default)(e)),(0,v.default)(e,"clusters",m,(0,E.default)(e)),e.getApi=function(t){var a=t.namespace,r=t.workspace,n=t.component,l=t.container,u=t.nodeName,o=t.persistentvolumeclaim,i=t.pvc,c=t.pod,s=t.workload;return n?"".concat(e.apiVersion,"/component_metrics"):c?"".concat(e.apiVersion,"/pod_metrics"):l?"".concat(e.apiVersion,"/container_metrics"):u?"".concat(e.apiVersion,"/node_metrics"):o||i?"".concat(e.apiVersion,"/persistentvolumeclaim_metrics"):s?"".concat(e.apiVersion,"/workload_metrics"):a?"".concat(e.apiVersion,"/namespace_metrics"):r?"".concat(e.apiVersion,"/workspace_metrics"):globals.app.isMultiCluster&&e.clusters?"".concat(e.apiVersion,"/cluster_metrics"):e.apiVersion},Object.keys(t).forEach((function(a){(0,N.default)((0,E.default)(e),a,t[a])})),e}return(0,y.default)(O,[{key:"setClusters",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.clusters=Array.isArray(e)?e:[]}},{key:"getBaseResourcesSummary",value:(i=(0,h.default)(o.default.mark((function e(){var t,a,r,n,l,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.clusters.map((function(e){return e.name})).join("|"),a=M.join("|"),r=this.getApi({}),this.baseResourcesSummary.isLoading=!0,e.next=6,(0,D.to)(request.get(r,{resources_filter:t,metrics_filter:a}));case 6:return n=e.sent,l=this.getResult(n),u=(0,k.getLastMonitoringData)(l),this.baseResourcesSummary.isLoading=!1,this.baseResourcesSummary.data=u,e.abrupt("return",u);case 12:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"fetchAllMetricsData",value:(l=(0,h.default)(o.default.mark((function e(){var t,a,r,n=this;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],A.forEach((function(e){var a,r=null===(a=n.clusters.map((function(e){return e.name})))||void 0===a?void 0:a.join("|"),l=Object.values(e)[0].join("|"),u=n.getApi({});t.push((0,D.to)(request.get(u,{resources_filter:r,metrics_filter:l})))})),this.monitorData.isLoading=!0,e.next=5,Promise.all(t);case 5:return a=e.sent,r=a.map((function(e,t){var a=(0,k.getLastMonitoringData)(n.getResult(e)),r=A.map((function(e){return Object.keys(e)[0]})),l={};return Object.entries(a).forEach((function(e){var t,a,r=(0,u.default)(e,2),n=r[0],o=r[1];l[n]=null!==(t=null==o||null===(a=o.value)||void 0===a?void 0:a[1])&&void 0!==t?t:0})),{resource:r[t],data:l}})),this.monitorData={isLoading:!1,data:r},e.abrupt("return",r);case 9:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"fetchAlertData",value:(r=(0,h.default)(o.default.mark((function e(t){var a,r,n,l,u,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Object.assign({},t),r=this.clusters.map((function(e){return e.name})),this.alertData.isLoading=!0,n=this.getParams(w({metrics:P,resources:r},a)),l=this.getApi({}),e.next=7,(0,D.to)(request.get(l,n));case 7:u=e.sent,i=this.getResult(u),this.alertData={isLoading:!1,data:i};case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"fetchPodData",value:(a=(0,h.default)(o.default.mark((function e(t){var a,r,l,u,i,c;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.fillZero,r=(0,n.default)(t,["fillZero"]),l=this.getParams(r),u=this.getApi({}),this.PodData.isLoading=!0,e.next=6,(0,D.to)(request.get(u,l));case 6:i=e.sent,c=this.getResult(i),this.PodData={isLoading:!1,data:a?(0,k.fillEmptyMetrics)(l,c):c};case 9:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchRoleAndMember",value:(t=(0,h.default)(o.default.mark((function e(){var t,a,r,n,l,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.clusters.map((function(e){return e.name})).join("|"),a=j.join("|"),r=this.getApi({}),this.roleAndMember.isLoading=!1,e.next=6,(0,D.to)(request.get(r,{resources_filter:t,metrics_filter:a}));case 6:n=e.sent,l=this.getResult(n),u=(0,k.getLastMonitoringData)(l),this.roleAndMember.isLoading=!1,this.roleAndMember.data=u;case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"kapis/monitoring.kubesphere.io/v1beta1"}}]),O}(T.default),c=(0,S.default)(i.prototype,"baseResourcesSummary",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{isLoading:!0,data:{}}}}),s=(0,S.default)(i.prototype,"monitorData",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{isLoading:!1,data:[]}}}),f=(0,S.default)(i.prototype,"roleAndMember",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],isLoading:!0}}}),d=(0,S.default)(i.prototype,"alertData",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{isLoading:!1,data:[]}}}),p=(0,S.default)(i.prototype,"PodData",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{isLoading:!1,data:[]}}}),m=(0,S.default)(i.prototype,"clusters",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,S.default)(i.prototype,"setClusters",[C.action],Object.getOwnPropertyDescriptor(i.prototype,"setClusters"),i.prototype),(0,S.default)(i.prototype,"getBaseResourcesSummary",[C.action],Object.getOwnPropertyDescriptor(i.prototype,"getBaseResourcesSummary"),i.prototype),(0,S.default)(i.prototype,"fetchAllMetricsData",[C.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchAllMetricsData"),i.prototype),(0,S.default)(i.prototype,"fetchAlertData",[C.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchAlertData"),i.prototype),(0,S.default)(i.prototype,"fetchPodData",[C.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchPodData"),i.prototype),(0,S.default)(i.prototype,"fetchRoleAndMember",[C.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchRoleAndMember"),i.prototype),i);t.default=L},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(84),a(73),a(18),a(4),a(316),a(23),a(24),a(17),a(136),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51));a(45),a(5),a(11),a(84),a(73),a(18),a(42),a(4),a(316),a(23),a(57),a(24),a(17),a(85),a(136);var c=r(a(0)),s=r(a(1)),f=r(a(3)),d=a(909),p=r(a(26)),m=r(a(63)),h=r(a(195)),v=r(a(2051)),g=a(186),y=r(a(841)),E=a(899),b=r(a(2054));function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var O=function(e,t){var a=(0,E.getAllYAMLValue)(e);return t&&1===a.length?a[0]:a},S=function(e){(0,u.default)(a,e);var t=_(a);function a(e){var r,l;return(0,n.default)(this,a),(r=t.call(this,e)).handleUpload=function(e){var t=new FileReader;t.onload=function(e){(0,m.default)(e.target.result)||(r.value=e.target.result,r.forceUpdate(),r.props.onChange&&r.props.onChange(r.value))},t.readAsText(e[0])},r.handleDownload=function(){var e,t=r.props,a=t.value,n=t.mode;if(a.metadata)e=a;else{var l=Object.values(a);l&&l[0]&&l[0].metadata&&(e=l[0])}var u=[(0,p.default)(e,"metadata.name","default"),(0,p.default)(e,"metadata.namespace",""),(0,p.default)(e,"kind","").toLowerCase()].filter((function(e){return e})).join(".");r.saveAsFile(r.value,"".concat(u,".").concat(n))},r.saveAsFile=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default.txt",a=new Blob([e],{type:"text/plain;charset=utf-8"});(0,d.saveAs)(a,t)},r.handleChange=function(e){r.value=e,"obj"===r.props.returnType?r.props.onChange&&r.props.onChange(O(r.value,!0)):r.props.onChange&&r.props.onChange(e)},r.getData=function(){return O(r.value,!!r.props.value.metadata)},r.value=(l=e.value,[void 0,null].includes(l)?"":(null==l?void 0:l.metadata)?(0,E.getValue)(l):(0,h.default)(l)?l:Object.values(l).map((function(e){return(0,E.getValue)(e||{})})).join("---\n")),r}return(0,l.default)(a,[{key:"options",get:function(){return{readOnly:this.props.readOnly,width:"100%",height:"100%"}}}]),(0,l.default)(a,[{key:"render",value:function(){var e=this.props,t=e.mode,a=e.className,r=e.editorClassName,n=e.readOnly;return c.default.createElement("div",{className:(0,f.default)(b.default.mode,a)},c.default.createElement("div",{className:(0,f.default)(b.default.edit,r)},c.default.createElement(y.default,{className:b.default.editor,mode:t,value:this.value,options:this.options,onChange:this.handleChange}),c.default.createElement("div",{className:b.default.ops,onClick:this.handleModeChange},!n&&c.default.createElement(c.default.Fragment,null,c.default.createElement(v.default,{fileTypes:[".yaml"],handleFiles:this.handleUpload},c.default.createElement(g.Icon,{name:"upload",size:20,color:{primary:"#fff",secondary:"#fff"},clickable:!0,changeable:!0})),c.default.createElement("span",{className:b.default.split},"|")),c.default.createElement(g.Icon,{name:"download",size:20,color:{primary:"#fff",secondary:"#fff"},onClick:this.handleDownload,clickable:!0,changeable:!0}))))}}]),a}(c.default.Component);t.default=S,S.propTypes={className:s.default.string,mode:s.default.string,value:s.default.oneOfType([s.default.object,s.default.arrayOf(s.default.object),s.default.string]),readOnly:s.default.bool},S.defaultProps={mode:"yaml",readOnly:!1}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l,u,o=r(a(44)),i=r(a(65)),c=r(a(36)),s=r(a(37)),f=r(a(88)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=(r(a(66)),a(14));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var y=(l=function(e){(0,d.default)(r,e);var t,a=g(r);function r(){var e;(0,c.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0){var a=Array.from({length:e.totalPage},(function(e,t){var a=++t;return{id:a,value:a}}));return a.length<=10?m.default.createElement(d.Menu,{className:(0,p.default)(g.default.menu)},m.default.createElement(m.default.Fragment,null,a.map((function(a){return m.default.createElement(d.Menu.MenuItem,{className:(0,p.default)(g.default.menuitem,(0,u.default)({},g.default.menuActive,t===a.value)),key:a.id,onClick:function(){return e.handlePageMenuClick(a.value)}},a.value)})))):m.default.createElement(d.Menu,{className:(0,p.default)(g.default.menu)},m.default.createElement(v.default,{data:a,key:"page-dropdown",itemKey:"id",height:160,itemHeight:32},(function(a){return m.default.createElement(d.Menu.MenuItem,{className:(0,p.default)(g.default.menuitem,(0,u.default)({},g.default.menuActive,t===a.value)),key:a.id,onClick:function(){return e.handlePageMenuClick(a.value)}},a.value)})))}return null},e.handlePageMenuClick=function(t){var a=e.props,r=a.onChange,n=a.limit;r&&r({page:Math.min(t,e.totalPage),limit:n})},e}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props.page;return m.default.createElement(d.Level,{className:g.default.wrapper},m.default.createElement(d.LevelLeft,null,this.renderPagesize()),m.default.createElement(d.LevelRight,null,m.default.createElement(d.LevelItem,{className:g.default.pagination},m.default.createElement(d.Button,{className:g.default.button,type:"flat",icon:"previous",iconSize:16,disabled:e<=1,onClick:this.handlePrev}),m.default.createElement(d.Dropdown,{placement:"bottom",trigger:"hover",content:this.renderPageDropDown()},m.default.createElement("div",{className:g.default.pages},m.default.createElement("span",null,e," / ",this.totalPage))),m.default.createElement(d.Button,{className:g.default.button,type:"flat",icon:"next",iconSize:16,disabled:e>=this.totalPage,onClick:this.handleNext}))))}},{key:"totalPage",get:function(){var e=this.props,t=e.total,a=e.limit,r=t%a;return 0===r?Math.max(t/a,1):(t-r)/a+1}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.limit!==t.pagesize?{pagesize:e.limit}:null}}]),r}(m.Component);a.default=E},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u-1}))}}]),r}(v.default.Component),R=(0,y.inject)("rootStore")((0,g.withRouter)(T));a.default=R;var w=T;a.Component=w},function(e,t,a){"use strict";a(15);var r=a(20);a(84),a(73),a(18),a(316),Object.defineProperty(t,"__esModule",{value:!0}),t.objectToYaml=t.getAllYAMLValue=t.getValueObj=t.getValue=void 0,a(84),a(73),a(18),a(28),a(191),a(159),a(10),a(316),a(85);var n=r(a(76)),l=r(a(195)),u=r(a(1268)),o=function(e){if((0,n.default)(e))try{return u.default.safeDump(JSON.parse(JSON.stringify(e)),{noRefs:!0})}catch(t){return console.error(t),JSON.stringify(e,null,2)}return String(e)};t.getValue=o;t.getValueObj=function(e){if(!(0,n.default)(e))try{return u.default.safeLoad(e)}catch(e){}return e};t.getAllYAMLValue=function(e){var t=[];try{u.default.safeLoadAll(e,(function(e){t.push(e)}),{noRefs:!0})}catch(e){}return t};t.objectToYaml=function(e){return[void 0,null].includes(e)?"":(null==e?void 0:e.metadata)?o(e):(0,l.default)(e)?e:Object.values(e).map((function(e){return o(e||{})})).join("---\n")}},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(30));a(5);var l=r(a(26)),u={},o={get:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.pathname;return(0,l.default)(u,"".concat(e,".").concat(t))},set:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:location.pathname;u[e]=(0,n.default)({},a,t)},delete:function(e){delete u[e]}};t.default=o},,function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Avatar",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Banner",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"Nav",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Bar",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"Breadcrumb",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Card",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"CodeEditor",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"Empty",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"Indicator",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"Label",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"List",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"Modal",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"Drawer",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"TypeSelect",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"Status",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"Steps",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(t,"Switch",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"Markdown",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"Upload",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"CheckableText",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(t,"Dragger",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(t,"ScrollLoad",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(t,"RadioGroup",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(t,"NotifyConfirm",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(t,"Panel",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"ToggleField",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"DataEmptyTip",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(t,"Progress",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"RecordSelect",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"SeverityTag",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(t,"Notify",{enumerable:!0,get:function(){return L.default}});var n=r(a(788)),l=r(a(2379)),u=r(a(2381)),o=r(a(1044)),i=r(a(2384)),c=r(a(801)),s=r(a(841)),f=r(a(846)),d=r(a(839)),p=r(a(1045)),m=r(a(812)),h=r(a(787)),v=r(a(1170)),g=r(a(816)),y=r(a(795)),E=r(a(1266)),b=r(a(850)),_=r(a(1001)),O=r(a(952)),S=r(a(1099)),C=r(a(1171)),D=r(a(863)),k=r(a(1314)),N=r(a(1102)),T=r(a(789)),R=r(a(790)),w=r(a(836)),I=r(a(1576)),M=r(a(1103)),P=r(a(1315)),A=r(a(1562)),j=r(a(880)),L=r(a(240))},,,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(16),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(28),a(42),a(16),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(30));a(41);var u,o=r(a(44)),i=r(a(36)),c=r(a(37)),s=r(a(55)),f=r(a(56)),d=r(a(51)),p=r(a(49)),m=r(a(26)),h=r(a(74)),v=a(14);function g(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function y(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getResourceUrl(t),"/").concat(t.name)},e.getKs8Url=function(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"api/v1".concat(e.getPath(a),"/").concat(e.module,"/").concat(null!==(t=a.name)&&void 0!==t?t:"")},e}return(0,c.default)(u,[{key:"fetchDetail",value:(r=(0,o.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get(this.getKs8Url(t));case 3:return a=e.sent,r=y(y({},t),this.mapper(a)),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"create",value:(a=(0,o.default)(n.default.mark((function e(t,a){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.submitting(request.post(this.getKs8Url(t),a)));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"update",value:(t=(0,o.default)(n.default.mark((function e(t,a){var r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get(this.getResourceUrl(t));case 2:return r=e.sent,(l=(0,m.default)(r,"metadata.resourceVersion"))&&(0,h.default)(a,"metadata.resourceVersion",l),e.abrupt("return",this.submitting(request.put(this.getKs8Url(t),a)));case 6:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})},{key:"patch",value:function(e,t){return this.submitting(request.patch(this.getKs8Url(e),t))}},{key:"delete",value:function(e){return this.submitting(request.delete(this.getKs8Url(e)))}}]),u}(r(a(68)).default),(0,p.default)(u.prototype,"fetchDetail",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchDetail"),u.prototype),(0,p.default)(u.prototype,"create",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"create"),u.prototype),(0,p.default)(u.prototype,"update",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"update"),u.prototype),(0,p.default)(u.prototype,"patch",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"patch"),u.prototype),(0,p.default)(u.prototype,"delete",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"delete"),u.prototype),u);t.default=b},,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(29),a(18),a(9),a(13),a(10),a(4),a(22),a(23),a(17),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(29),a(18),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(38),a(7),a(32);var n=r(a(43));a(41);var l,u=r(a(44)),o=r(a(30)),i=r(a(36)),c=r(a(37)),s=r(a(332)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=r(a(49)),h=a(14);function v(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function g(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.workspace,r="";return t&&(r+="/klusters/".concat(t)),a&&(r+="/workspaces/".concat(a)),r}},{key:"fetchDetail",value:(t=(0,o.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get(this.getDetailUrl(t),{},{},(function(){}));case 3:return a=e.sent,r=y(y({},t),this.mapper(a)),this.detail=r,this.isLoading=!1,e.abrupt("return",(0,v.default)(a,"status.total"));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"kapis/tenant.kubesphere.io/v1beta1"}}]),r}(m.default),(0,p.default)(u.prototype,"fetchDetail",[h.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchDetail"),u.prototype),u);t.default=b},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(73),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(73),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(61)),l=r(a(30)),u=r(a(58)),o=r(a(43));a(41);var i,c=r(a(44)),s=r(a(36)),f=r(a(37)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=r(a(26)),g=a(14),y=a(72);function E(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function b(e){for(var t=1;t0&&void 0!==h[0]?h[0]:{},a=t.cluster,r=t.workspace,l=t.namespace,i=t.more,c=t.devops,s=(0,u.default)(t,["cluster","workspace","namespace","more","devops"]),this.list.isLoading=!0,f=[],s.sortBy||void 0!==s.ascending||(s.sortBy=y.LIST_DEFAULT_ORDER[this.module]||"createTime"),s.limit!==1/0&&-1!==s.limit||(s.limit=-1,s.page=1),s.readyToUse&&f.push("status.readyToUse=".concat(s.readyToUse)),s.volumeSnapshotClassName&&(f.push("spec.volumeSnapshotClassName=".concat(s.volumeSnapshotClassName)),delete s.volumeSnapshotClassName),s.persistentVolumeClaimName&&(f.push("spec.source.persistentVolumeClaimName=".concat(s.persistentVolumeClaimName)),delete s.persistentVolumeClaimName),f=f.join(",")||void 0,s.fieldSelector=f,s.limit=s.limit||10,e.next=13,request.get(this.getResourceUrl({cluster:a,workspace:r,namespace:l,devops:c}),this.getFilterParams(s));case 13:return d=e.sent,p=((0,v.default)(d,"items")||[]).map((function(e){return b({cluster:a,namespace:l,workspace:r},m.mapper(e))})),this.list.update(b(b({data:i?[].concat((0,n.default)(this.list.data),(0,n.default)(p)):p,total:d.totalItems||d.totalCount||d.total_count||p.length||0},s),{},{limit:Number(s.limit)||10,page:Number(s.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",p);case 17:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"resourceKind",get:function(){return"VolumeSnapshot"}},{key:"apiVersion",get:function(){return"apis/snapshot.storage.k8s.io/v1"}}]),l}(r(a(68)).default),(0,h.default)(i.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),i);t.default=O},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(5),r(11),r(6),r(84),r(18),r(97),r(98),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(85),r(64),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(84),r(160),r(18),r(28),r(97),r(42),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(85),r(64),r(188),r(7);var u=l(r(61)),o=l(r(30)),i=l(r(36)),c=l(r(37)),s=l(r(55)),f=l(r(56)),d=l(r(51)),p=l(r(96)),m=l(r(246)),h=n(r(0)),v=l(r(3)),g=l(r(837)),y=l(r(454)),E=l(r(63)),b=l(r(972)),_=l(r(189)),O=l(r(1504)),S=l(r(26)),C=r(186),D=r(453),k=l(r(2471)),N=l(r(2473));function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t0?d:f,m=s.map((function(e){return R(R({},e),{},{value:e.key})})),g="tags"===i&&p.length>=5;return 0===m.length?h.default.createElement("div",{className:N.default.multi},h.default.createElement("div",{className:N.default.empty},t("NO_DATA_DESC"))):h.default.createElement("div",{className:N.default.multi},h.default.createElement(C.CheckboxGroup,{value:p,onChange:function(e){n.multiValues=(0,o.default)({},i,e),n.forceUpdate()}},m.map((function(e,t){var a=p.includes(e.key);return h.default.createElement(C.Checkbox,{className:(0,v.default)(N.default.option,(0,o.default)({},N.default.checked,a)),value:e.value,disabled:g&&!a,key:"".concat(e.value,"-").concat(t)},c?c(e):e.label)}))))},n.merageMultiTags=function(e){for(var t=[],a=0;a1&&(a=r+a-1),t.push(R(R({},n),{},{total:r}))}return t};var l=n.getSuggestions(e.columns),u=I(l,e.filters);return n.state={suggestions:l,activeSuggestion:null,optionVisible:!1,tags:u,activeTimeselector:!1,index:0},n.input=h.default.createRef(),n.filterInput=h.default.createRef(),n}return(0,c.default)(r,[{key:"componentDidUpdate",value:function(e){var t=this.state.suggestions;this.props.columns!==e.columns&&(t=this.getSuggestions(this.props.columns),this.setState({suggestions:t})),(0,g.default)(this.props.filters,e.filters)||this.setState({value:"",activeSuggestion:null,optionVisible:!1,tags:I(t,this.props.filters)})}},{key:"getSuggestions",value:function(e){var t=this.props,a=t.showTimeSelector,r=t.showKeywords,n=e.filter((function(e){return e.search&&e.dataIndex})).map((function(e){return{label:e.title,key:e.searchKey||e.dataIndex,options:e.filters&&e.filters.map((function(e){return{label:e.text,key:e.value}})),multi:e.multi,render:e.renderSearch}}));return a?[].concat((0,u.default)(n),[M]):r?[P].concat((0,u.default)(n)):n}},{key:"renderMenu",value:function(){var e=this.state,t=e.suggestions,a=e.tags,r=document.getElementsByClassName("table-body"),n=(0,S.default)(r,"[0].clientHeight","none"),l=t.filter((function(e){return e.multi||!a.some((function(t){return t.filter===e.key}))}));return l.length<1?null:h.default.createElement(C.Menu,{onClick:this.handleMenuClick,style:{maxHeight:n,overflowY:"auto"}},l.map((function(e){return h.default.createElement(C.Menu.MenuItem,{key:e.key,value:e},e.label)})))}},{key:"renderTags",value:function(){var e=this,t=this.state.tags;return this.merageMultiTags(t).map((function(t){return h.default.createElement(C.Tag,{key:"".concat(t.filter,"-").concat(t.value)},h.default.createElement("span",null,t.filterLabel,":",t.valueLabel),t.total>1&&h.default.createElement("span",{style:{marginLeft:"6px"}},"(+",t.total-1,")"),h.default.createElement(C.Icon,{name:"close",type:"light",clickable:!0,onClick:function(){return e.handleTagDelete(t)}}))}))}},{key:"renderInput",value:function(){var e,a=this.state,r=a.activeSuggestion,n=a.optionVisible,l=a.value,u=h.default.createElement(C.Input,{type:"text",innerRef:this.input,placeholder:t("SEARCH"),onChange:this.handleChange,onKeyUp:this.handleKeyUp,value:l||"",onFocus:this.handleFocus,onBlur:this.handleBlur});return r?r.options&&!r.multi?e=this.renderSuggestionOptions():r.options&&r.multi&&(e=this.renderMultiSuggestionOptions()):e=this.renderMenu(),e?h.default.createElement(C.Dropdown,{onClose:this.handleOnClose,theme:"dark",content:e,visible:n,closeAfterClick:!1},u):u}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.contentClassName,r=e.showTimeSelector,n=this.state,l=n.value,u=n.tags,i=n.activeTimeselector,c=!(0,E.default)(l)||!(0,E.default)(u);return h.default.createElement("div",{className:(0,v.default)(N.default.wrapper,(0,o.default)({},N.default.hasValue,c),t),ref:this.filterInput},h.default.createElement(C.Icon,{className:"is-left",name:"magnifier"}),h.default.createElement("div",{className:(0,v.default)(N.default.content,a)},this.renderTags(),this.renderInput()),c&&h.default.createElement(C.Icon,{className:"is-right",name:"close",clickable:!0,onClick:this.handleClear}),r&&h.default.createElement(k.default,{visible:i,onChange:this.handleTimeSelectorChange,onToggle:this.handleTimeSelectorToggle}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var a,r=(null===(a=e.filters)||void 0===a?void 0:a.__index)||0;return r!==t.index?{index:r,value:"",activeSuggestion:null,optionVisible:!1,tags:I(t.suggestions,e.filters)}:null}}]),r}(h.Component);a.default=A},function(e,a,r){"use strict";r(15);var n=r(20);r(73),r(18),r(16),r(24),r(64),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.checkRepoInvalidReason=a.compareVersion=a.downloadFileFromBase64=a.getAppCategoryNames=a.getVersionTypesName=a.transferReviewStatus=a.transferVersionStatus=a.transferAppStatus=void 0;var l=n(r(246));r(73),r(18),r(16),r(319),r(24),r(64);var u=n(r(451)),o=r(1049);a.transferAppStatus=function(e){return o.STATUS_TRANSFER_MAP[e]?t("APP_STATUS_".concat(o.STATUS_TRANSFER_MAP[e].toUpperCase().replace(/[^A-Z]+/g,"_"))):e};a.transferVersionStatus=function(e){return o.STATUS_TRANSFER_MAP[e]?"draft"===e?t("APP_STATUS_NOT_SUBMITTED"):t("APP_STATUS_".concat(o.STATUS_TRANSFER_MAP[e].toUpperCase().replace(/[^A-Z]+/g,"_"))):e};a.transferReviewStatus=function(e){var t;switch(e){case"submitted":t="to-be-reviewed";break;case"passed":case"suspended":case"rejected":case"active":t=e;break;default:t="in-review"}return t};a.getVersionTypesName=function(e){return e?e.split(",").map((function(e){return(0,u.default)(e)})).join(" "):"-"};a.getAppCategoryNames=function(e){var a,r,n,l,u=null==e||null===(a=e.metadata)||void 0===a||null===(r=a.annotations)||void 0===r?void 0:r["kubesphere.io/alias-name"];if(u)return u;var o=null==e||null===(n=e.metadata)||void 0===n?void 0:n.name;return"kubesphere-app-uncategorized"===o?t("APP_CATE_UNCATEGORIZED"):t("APP_CATE_".concat(null==o?void 0:o.toUpperCase().replace(/[^A-Z]+/g,"_")),{defaultValue:o||(null==e||null===(l=e.metadata)||void 0===l?void 0:l.name)})};a.downloadFileFromBase64=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,a=document.createElement("a");a.href="data:application/tar+gzip;base64,".concat(e),a.download="".concat(t,".tgz"),a.click()};a.compareVersion=function(e,t){if((0,l.default)(e)+(0,l.default)(t)!=="stringstring")return!1;for(var a=e.split("."),r=t.split("."),n=Math.max(a.length,r.length),u=0;u0||parseInt(a[u],10)>parseInt(r[u],10))return 1;if(r[u]&&!a[u]&&parseInt(r[u],10)>0||parseInt(a[u],10)0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat("put"===a?"/".concat(t.name):"","?dryRun=All")},e.checkValidDomain=function(t,a){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"post";return request[r](e.getValiddomainUrl(t,r),a,{headers:{"x-ignore-error-notify":!0}}).then((function(e){return 403===e.status?{exist:!0}:200===e.status?{exist:!1}:e}))},e}return a}(r(a(68)).default);t.default=c},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;uNumber(Object.values(t)[0])?ne(ne({},e),t):ne({},e):ne(ne({},e),t)}),{})},l.fetchQuota=(0,i.default)(o.default.mark((function e(){var t,a,r,n,u,i,c,s,f,d;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=l.namespace,r=l.props,n=r.cluster,u=r.projectDetail,i=r.isFederated,!(t=u?u.workspace:l.props.workspace)||!a){e.next=15;break}if(i){e.next=14;break}return e.next=7,l.singleClusterQuota(t,a,n);case 7:c=e.sent,s=c.workspaceQuota,f=c.namespaceQuota,d={workspace:s,namespace:f},l.setState({leftQuota:d,availableQuota:d}),e.next=15;break;case 14:l.multiClusterQuota(t,a);case 15:case"end":return e.stop()}}),e)}))),l.handleReplicaChange=function(e){l.setState({replicas:e})},l.handleClusterUpdate=function(){l.updateService()},l.showContainer=function(e){l.setState({showContainer:!0,selectContainer:e||{}})},l.hideContainer=function(){l.setState({showContainer:!1,selectContainer:{}})},l.updateTimeZone=function(e){var t=(0,b.default)(l.fedFormTemplate,"".concat(l.prefix,"spec.volumes"),[]);e.some((function(e){return(e.volumeMounts||[]).some((function(e){return"/etc/localtime"===e.mountPath}))}))?t.every((function(e){return"host-time"!==e.name}))&&t.push({hostPath:{path:"/etc/localtime",type:""},name:"host-time"}):t=t.filter((function(e){var t;return!("host-time"===e.name&&"/etc/localtime"===(null==e||null===(t=e.hostPath)||void 0===t?void 0:t.path))})),(0,w.default)(l.fedFormTemplate,"".concat(l.prefix,"spec.volumes"),t)},l.updatePullSecrets=function(){var e={},t="".concat(l.prefix,"spec.imagePullSecrets"),a="".concat(l.prefix,'metadata.annotations["kubesphere.io/imagepullsecrets"]'),r=(0,b.default)(l.fedFormTemplate,"".concat(l.prefix,"spec.containers"),[]),n=(0,b.default)(l.fedFormTemplate,"".concat(l.prefix,"spec.initContainers"),[]);(0,y.default)(r,n).forEach((function(t){t.pullSecret&&(e[t.name]=t.pullSecret),t.annotationOfImagePullSecrets&&delete t.annotationOfImagePullSecrets}));var u=(0,b.default)(l.fedFormTemplate,t,[]),o=(0,b.default)(l.fedFormTemplate,a,null);if(!(0,O.default)(e)){var i=Object.values(e).map((function(e){return{name:e}}));u=u.concat(i).reduce((function(e,t){return e.find((function(e){return e.name===t.name}))||e.push(t),e}),[])}var c=JSON.stringify(e);if(null!==o){var s=ne(ne({},JSON.parse(o)),e);c=JSON.stringify(s)}(0,w.default)(l.fedFormTemplate,t,u),(0,w.default)(l.fedFormTemplate,a,c)},l.updateService=function(){var e=l.props,t=e.formTemplate;if(e.withService){var a=(0,b.default)(l.fedFormTemplate,"".concat(l.prefix,"spec.containers"),[]),r=[];a.forEach((function(e){e.ports&&e.ports.forEach((function(e){e.servicePort&&r.push({name:e.name,protocol:e.protocol,port:e.servicePort,targetPort:e.containerPort})}))}));var n=t.Service,u=l.props.isFederated?"spec.template.":"";(0,w.default)(n,"".concat(u,"spec.ports"),r);var o=(0,b.default)(l.formTemplate,"metadata.labels",{}),i=(0,b.default)(l.fedFormTemplate,"".concat(l.prefix,"metadata.labels"),{});(0,w.default)(n,"metadata.labels",o),(0,w.default)(n,"".concat(u,"spec.selector"),(0,k.default)(i,"version"));var c=(0,b.default)(l.formTemplate,"spec.placement");c?(0,w.default)(n,"spec.placement",c):(0,I.default)(n,"spec.placement"),"statefulsets"===l.module?(0,w.default)(n,"".concat(u,"spec.clusterIP"),"None"):(0,I.default)(n,"".concat(u,"spec.clusterIP"))}},l.handleDelete=function(){l.updatePullSecrets(),l.updateService()},l.containersValidator=function(e,a,r){if((0,O.default)(a))return r({message:t("CONTAINER_EMPTY_DESC")});r()},l.state={showContainer:!1,selectContainer:{},limitRange:{},imageRegistries:[],replicas:l.getReplicas(),leftQuota:{}},l.module=["apptemplates","apptemplateversions"].includes(e.module)?"deployments":null!==(n=e.module)&&void 0!==n?n:"deployments";var u=(0,A.isEdgeWizePage)();return l.limitRangeStore=u?new V.default:new W.default,l.imageRegistryStore=u?new z.default:new L.default,l.quotaStore=u?new U.default:new q.default,l.workspaceQuotaStore=u?new B.default:new x.default,l.projectStore=u?new F.default:new H.default,e.isFederated&&(l.limitRangeStore=u?new G.default({module:l.limitRangeStore.module}):new Y.default({module:l.limitRangeStore.module}),l.imageRegistryStore=u?new G.default({module:l.imageRegistryStore.module}):new Y.default({module:l.imageRegistryStore.module})),l.handleContainer=l.handleContainer.bind((0,d.default)(l)),l.containerRef=v.default.createRef(),l}return(0,f.default)(r,[{key:"componentDidMount",value:function(){var e=this.props.store;this.fetchData(),this.fetchQuota(),this.props.withService&&this.initService(this.formTemplate),e.renderScheduleTab&&this.props.store.setMetadata(this.formTemplate.metadata)}},{key:"componentDidUpdate",value:function(){var e=this.containerRef.current,t=(0,b.default)(e,"state.error",null),a=(0,b.default)(this.props.formTemplate,"".concat(this.prefix,"spec.containers"),[]);t&&a.length>0&&e.setState({error:null})}},{key:"initService",value:function(){var e=(0,b.default)(this.formTemplate,"metadata.name"),t=(0,b.default)(this.props.formTemplate,"Service.metadata.name");e&&!t&&(t="".concat(e.slice(0,57),"-").concat((0,A.generateId)(4)),/^[a-z]/.test(t)||(t="s".concat(t)),(0,w.default)(this.props.formTemplate,"Service.metadata.name",t),(0,w.default)(this.props.formTemplate,'Service.metadata.annotations["kubesphere.io/alias-name"]',e),(0,w.default)(this.props.formTemplate,'Service.metadata.annotations["kubesphere.io/serviceType"]',"statefulservice"),(0,w.default)(this.fedFormTemplate,"spec.serviceName",t))}},{key:"fetchData",value:function(){var e=this,t=this.props,a=t.cluster,r=t.isFederated,n={cluster:a,namespace:(0,b.default)(this.formTemplate,"metadata.namespace")};Promise.all([this.limitRangeStore.fetchListByK8s(n),r?this.imageRegistryStore.fetchList(ne(ne({},n),{},{limit:-1,type:"kubernetes.io/dockerconfigjson"})):this.imageRegistryStore.fetchListByK8s(ne(ne({},n),{},{fieldSelector:"type=kubernetes.io/dockerconfigjson"}))]).then((function(t){var a=(0,u.default)(t,2),r=a[0],n=a[1];e.setState({limitRange:(0,b.default)(r,"[0].limit"),imageRegistries:n})}))}},{key:"handleContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,_.default)(e,"resources.limits")&&(e.resources.limits=(0,N.default)(e.resources.limits,O.default)),e.type=e.type||"worker";var t=(0,b.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.containers"),[]).map((function(e){return ne(ne({},e),{},{type:"worker"})})),a=(0,b.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.initContainers"),[]).map((function(e){return ne(ne({},e),{},{type:"init"})})),r=(0,y.default)(t,a),n=this.state.selectContainer,l=r.findIndex((function(e){return e.name===n.name}));l>-1?r[l]=e:r.push(e);var u=[],o=[];r.forEach((function(e){"worker"===e.type?(delete e.type,u.push(e)):(delete e.type,o.push(e))})),o.forEach((function(e){(0,A.cancelContainerDot)(e)})),u.forEach((function(e){(0,A.cancelContainerDot)(e)})),(0,w.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.containers"),u),(0,w.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.initContainers"),o),this.updateTimeZone(r),this.updatePullSecrets(),this.updateService(),this.hideContainer()}},{key:"renderContainerForm",value:function(e){var t=this.props,a=t.onlyDockerHub,r=t.withService,n=t.isFederated,u=t.cluster,o=t.supportGpuSelect,i=t.projectDetail,c=this.state,s=c.limitRange,f=c.imageRegistries,d=e.image?"Edit":"Add",p={limitRange:s,onlyDockerHub:a,imageRegistries:f};return v.default.createElement(Q.default,(0,l.default)({type:d,module:this.module,namespace:this.namespace,data:e,projectDetail:i,onSave:this.handleContainer,onCancel:this.hideContainer,withService:r,isFederated:n,workspaceQuota:this.workspaceQuota,cluster:u,supportGpuSelect:o,containers:this.containers,isEdit:this.props.isEdit,isEdgeWize:(0,A.isEdgeWizePage)()},p))}},{key:"renderDeployPlacementTip",value:function(){return v.default.createElement("div",{className:ae.default.tipBox},v.default.createElement("div",{className:ae.default.tipTitle},t("SPECIFY_REPLICAS")),v.default.createElement("p",null,t("SPECIFY_REPLICAS_DESC")),v.default.createElement("br",null),v.default.createElement("div",{className:ae.default.tipTitle},t("SPECIFY_WEIGHTS")),v.default.createElement("p",null,t("SPECIFY_WEIGHTS_DESC")))}},{key:"renderDeployPlace",value:function(){var e=this.props.projectDetail;return v.default.createElement(g.Form.Item,{className:"margin-b12",label:t("POD_REPLICAS"),tip:this.renderDeployPlacementTip()},v.default.createElement(K.default,{module:this.module,template:this.formTemplate,clusters:e.clusters,onClusterUpdate:this.handleClusterUpdate,omitAlias:12}))}},{key:"renderDeployMode",value:function(){var e=this.props.projectDetail;return v.default.createElement("div",{className:"margin-b12"},v.default.createElement("div",{className:ae.default.formTip},v.default.createElement("span",{className:ae.default.tipLabel},t("REPLICA_SCHEDULING_MODE")),v.default.createElement(g.Tooltip,{placement:"right",content:this.renderDeployPlacementTip()},v.default.createElement(g.Icon,{name:"question",size:"20"}))),v.default.createElement(g.Form.Item,null,v.default.createElement(K.default,{module:this.module,template:this.formTemplate,clusters:e.clusters,onClusterUpdate:this.handleClusterUpdate,store:this.props.store,omitAlias:12})))}},{key:"renderReplicasControl",value:function(){if("daemonsets"===this.module)return null;var e=this.props,t=e.isFederated,a=e.store,r=e.replicasExtraControl,n=e.isEdit;return t?a.renderScheduleTab?this.renderDeployMode():this.renderDeployPlace():v.default.createElement("div",{className:"margin-b12"},v.default.createElement(X.default,{module:this.module,replicas:this.state.replicas,template:this.formTemplate,replicasExtraControl:null==r?void 0:r({isEdit:n}),onChange:this.handleReplicaChange}))}},{key:"renderContainerList",value:function(){var e=this.props,a=e.isReadOnlyContainers,r=e.isShowAddContainer,n=(0,b.default)(this.fedFormTemplate,"".concat(this.prefix,"spec"));return v.default.createElement(g.Form.Item,{label:t("CONTAINERS"),rules:[{validator:this.containersValidator}],ref:this.containerRef},v.default.createElement($.default,{name:"".concat(this.prefix,"spec.containers"),onShow:this.showContainer,onDelete:this.handleDelete,specTemplate:n,leftQuota:this.state.leftQuota,projectDetail:this.props.projectDetail,replicas:this.state.replicas,isEdit:this.props.isEdit,isReadOnlyContainers:a,isShowAddContainer:r}))}},{key:"renderUpdateStrategy",value:function(){return v.default.createElement("div",{className:"margin-t12"},v.default.createElement(ee.default,{module:this.module,data:this.fedFormTemplate}))}},{key:"renderPodSecurityContext",value:function(){return v.default.createElement("div",{className:"margin-t12"},v.default.createElement(Z.default,{prefix:"".concat(this.prefix,"spec.securityContext")}))}},{key:"renderPodAffinity",value:function(){var e=this.props,t=e.cluster,a=e.namespace;return v.default.createElement("div",{className:"margin-b12"},v.default.createElement(j.default,{initial:!0,data:this.fedFormTemplate,module:this.module,cluster:t,namespace:a,checkable:!0}))}},{key:"renderTerminationSeconds",value:function(){return v.default.createElement("div",{className:"margin-b12"},v.default.createElement(g.Form.Group,{label:t("POD_GRACE_PERIOD"),desc:t("POD_GRACE_PERIOD_DESC"),keepDataWhenUnCheck:!0,checkable:!0},v.default.createElement(J.default,{prefix:this.prefix})))}},{key:"renderMetadata",value:function(){return v.default.createElement("div",{className:"margin-b12"},v.default.createElement(g.Form.Group,{label:t("ADD_METADATA"),desc:t("POD_ADD_METADATA_DESC"),keepDataWhenUnCheck:!0,checkable:!0},v.default.createElement(te.default,null)))}},{key:"render",value:function(){var e=this.props,t=e.formRef,a=e.className,r=this.state,n=r.showContainer,l=r.selectContainer,u=JSON.parse((0,b.default)(this.fedFormTemplate,'metadata.annotations["kubesphere.io/imagepullsecrets"]',"{}"));return n?this.renderContainerForm(ne(ne({},l),{},{annotationOfImagePullSecrets:u})):v.default.createElement(g.Form,{data:this.fedFormTemplate,ref:t,className:a},this.renderReplicasControl(),this.renderContainerList(),this.renderUpdateStrategy(),this.renderPodSecurityContext(),this.renderPodAffinity(),this.renderTerminationSeconds(),this.renderMetadata())}},{key:"prefix",get:function(){return this.props.prefix||"spec.template."}},{key:"namespace",get:function(){return(0,b.default)(this.formTemplate,"metadata.namespace")}},{key:"formTemplate",get:function(){var e=this.props.formTemplate,t=(0,b.default)(e,P.MODULE_KIND_MAP[this.module],e);return t.totalReplicas="",t}},{key:"fedFormTemplate",get:function(){return this.props.isFederated?(0,b.default)(this.formTemplate,"spec.template"):this.formTemplate}},{key:"workspaceQuota",get:function(){var e=(0,b.default)(this.state.availableQuota,"namespace",{}),t=(0,b.default)(this.state.availableQuota,"workspace",{});return(0,C.default)(e,t,(function(e,t){if(e||t)return(0,S.default)(e)?t:e0&&void 0!==f[0]?f[0]:{},a=t.cluster,t.namespace,r=t.module,l=(0,u.default)(t,["cluster","namespace","module"]),this.list.isLoading=!0,r&&(this.module=r),o="".concat(this.apiVersion,"/").concat(this.module).concat(l.dryRun?"?dryRun=All":""),e.next=6,request.get(o,l,{},(function(){return{items:[]}}));case 6:return i=e.sent,c=Array.isArray(i.items)?i.items.map((function(e){return g({cluster:a,module:r||s.module},s.mapper(e))})):[],this.list.update({data:c,total:i.items.length||0,isLoading:!1}),e.abrupt("return",c);case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(r(a(851)).default),(0,m.default)(o.prototype,"fetchListByK8s",[h.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchListByK8s"),o.prototype),o);t.default=E},,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(86),a(16),a(137),a(9),a(13),a(10),a(4),a(22),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(86),a(28),a(42),a(16),a(137),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(24),a(193),a(17),a(7);var n=r(a(30)),l=r(a(43)),u=r(a(58));a(41);var o,i,c,s,f,d,p,m,h,v=r(a(44)),g=r(a(65)),y=r(a(36)),E=r(a(37)),b=r(a(88)),_=r(a(55)),O=r(a(56)),S=r(a(51)),C=r(a(49)),D=(r(a(66)),a(14)),k=r(a(122)),N=a(440),T=a(916),R=a(327);function w(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function I(e){for(var t=1;t0&&void 0!==c[0]?c[0]:{},a=t.app_id,r=t.version_id,n=(0,u.default)(t,["app_id","version_id"]),this.isLoading=!0,this.filters=Object.assign(this.filters,n),e.next=5,request.get(this.getUrl({app_id:a,version_id:r}),this.filters,null,this.reject);case 5:(o=e.sent)&&(i=o.files||{},Object.keys(i).forEach((function(e){i[e]=(0,N.safeAtob)(i[e])})),this.files=i,this.isLoading=!1);case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(r(a(458)).default),i=(0,C.default)(o.prototype,"files",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),c=(0,C.default)(o.prototype,"isLoading",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),(0,C.default)(o.prototype,"fetch",[D.action],Object.getOwnPropertyDescriptor(o.prototype,"fetch"),o.prototype),s=(0,C.default)(o.prototype,"checkFile",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(e,t){var a=R.UPLOAD_CHECK_RULES[t];return a.format.test(e.name.toLocaleLowerCase())?e.size>a.size?"FILE_MAX_".concat(t.toLocaleUpperCase()):"":"FILE_FORMAT_".concat(t.toLocaleUpperCase())}}}),f=(0,C.default)(o.prototype,"handleFileByBase64Str",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(){var e=(0,v.default)(l.default.mark((function e(t,a){var r;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r=new FileReader).readAsDataURL(t,"UTF-8"),r.addEventListener("load",(0,v.default)(l.default.mark((function e(){var t,n;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.result,n=t.substring(t.indexOf(",")+1,t.length),e.next=4,a(n);case 4:case"end":return e.stop()}}),e)}))));case 3:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()}}),d=(0,C.default)(o.prototype,"validateImageSize",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(){var e=(0,v.default)(l.default.mark((function e(t){var a;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(a=new Image).src=t,e.abrupt("return",new Promise((function(e){a.addEventListener("load",(0,v.default)(l.default.mark((function t(){var r;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=!0,(a.width>96||a.height>96)&&(r=!1),e(r);case 3:case"end":return t.stop()}}),t)}))))})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}),p=(0,C.default)(o.prototype,"validatePackage",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,v.default)(l.default.mark((function t(a,r){var n,u,o;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.isSubmitting=!0,n={},r?(n.type="helm",n.package=a):(n.version_type="helm",n.version_package=a),u=r?"versions":"apps",t.next=6,request.post("".concat(e.getUrl({app_id:r,name:u}),"?validate=true"),n,{},e.reject);case 6:return o=t.sent,e.isSubmitting=!1,o&&o.name&&(o.base64Str=a),o&&o.error_details&&(o.missFile=(0,k.default)(o.error_details),o.error="MISS_FILE_NOTE"),t.abrupt("return",o);case 11:case"end":return t.stop()}}),t)})));return function(e,a){return t.apply(this,arguments)}}()}}),m=(0,C.default)(o.prototype,"uploadPackage",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(){var e=(0,v.default)(l.default.mark((function e(t){var a,r,n,u=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=u.length>1&&void 0!==u[1]?u[1]:{},r=u.length>2?u[2]:void 0,n=I({},a),"CREATE_APP"===t?n.version_package=a.base64Str:n.package=a.base64Str,delete n.base64Str,e.next=7,r(n);case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}),h=(0,C.default)(o.prototype,"downloadPackage",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return(0,v.default)(l.default.mark((function t(){var a,r,n,u,o,i,c=arguments;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>0&&void 0!==c[0]?c[0]:{},r=a.app_id,n=a.version_id,u=a.packageName,o=e.getUrl({app_id:r,version_id:n,name:"package"}),t.next=4,e.submitting(request.get(o));case 4:i=t.sent,(0,T.downloadFileFromBase64)(i.package,u);case 6:case"end":return t.stop()}}),t)})))}}),o);t.default=P},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(73),a(18),a(48),a(4),a(23),a(24),a(17),a(64),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var a="id-".concat(Math.random().toString(32).slice(2));return function(r){(0,u.default)(m,r);var f,d,p=(f=m,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,i.default)(f);if(d){var a=(0,i.default)(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return(0,o.default)(this,e)});function m(){return(0,n.default)(this,m),p.apply(this,arguments)}return(0,l.default)(m,[{key:"componentDidMount",value:function(){!function(e,t){!function(e,t){if(document.querySelector("#".concat(t)))return;var a=document.createElement("div");a.innerHTML='').concat(e,"");var r=a.getElementsByTagName("svg")[0];r&&r.innerHTML&&(r.setAttribute("aria-hidden","true"),r.style.position="absolute",r.style.width=0,r.style.height=0,r.style.overflow="hidden",n=r,(l=document.body).firstChild?l.insertBefore(n,l.firstChild):l.appendChild(n));var n,l}(e.map((function(e){var t=s.default[e];return t&&!document.querySelector("#icon-".concat(e.replace("_","-")))?t:""})).join("\n"),t)}(e,a)}},{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){return c.default.createElement(t,this.props)}}]),m}(c.default.Component)}};var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51));a(45),a(5),a(73),a(18),a(48),a(42),a(4),a(23),a(57),a(24),a(17),a(64);var c=r(a(0)),s=r(a(2771))},,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(22),a(23),a(57),a(17);var n=r(a(43)),l=r(a(58));a(41);var u,o,i=r(a(44)),c=r(a(65)),s=r(a(36)),f=r(a(88)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=(r(a(66)),a(14)),g=a(1049);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var E=(u=function(e){(0,d.default)(a,e);var t=y(a);function a(){var e;(0,s.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&void 0!==s[0]?s[0]:{},r=a.app_id,u=a.version_id,o=a.workspace,i=(0,l.default)(a,["app_id","version_id","workspace"]),c=e.getUrl({app_id:r,version_id:u,workspace:o,name:"action"}),t.next=4,e.submitting(request.post(c,i));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))}}),u);t.default=E},function(e,t,a){"use strict";a(15),a(10),Object.defineProperty(t,"__esModule",{value:!0}),t.UNIT_CONFIG=t.PIE_COLORS=t.AREA_COLORS=t.METER_RESOURCE_USAGE=t.FEE_CONFIG=t.LEVEL_CONFIG=t.MERTER_TYPE=t.METER_RESOURCE_USAGE_TITLE=t.METER_RESOURCE_TITLE=t.RESOURCE_TITLE=t.RESOURCES_TYPE=t.RESOURCES_METER_TYPE=t.CARD_CONFIG=void 0,a(10);t.CARD_CONFIG=[{icon:"cluster",subTitle:"CLUSTER_CONSUMPTION",type:"cluster",desc:"CLUSTER_CONSUMPTION_DESC",infos:["CLUSTER_RESOURCE_CONSUMPTION_DESC","CLUSTER_NODE_CONSUMPTION_DESC","CLUSTER_POD_CONSUMPTION_DESC"]},{icon:"enterprise",subTitle:"WORKSPACE_CONSUMPTION",type:"workspaces",desc:"WORKSPACE_CONSUMPTION_DESC",infos:["WORKSPACE_RESOURCE_CONSUMPTION_DESC","WORKSPACE_PROJECT_CONSUMPTION_DESC","PROJECT_CONSUMPTION_DESC"]}];t.RESOURCES_METER_TYPE={deployments:"workload",statefulsets:"workload",daemonsets:"workload",nodes:"node",workspaces:"workspace",namespaces:"namespace",applications:"application",openpitrixs:"application",services:"service",pods:"pod",cluster:"cluster"};t.RESOURCES_TYPE=["namespaces","applications","services","deployments","statefulsets","daemonsets","openpitrixs","nodes","pods"];t.RESOURCE_TITLE={nodes:"Cluster Node",pods:"Pod",openpitrixs:"App Template",applications:"Composing App",deployments:"Deployment",statefulsets:"StatefulSet",daemonsets:"DaemonSet",workspaces:"Workspace",cluster:"Cluster",namespaces:"Project",services:"Service"};t.METER_RESOURCE_TITLE={cpu:"CPU",memory:"Memory",disk:"Volumes",net_received:"Net Received",net_transmitted:"Net Transmitted"};var r={cpu:"Meter CPU Usage",memory:"Meter Memory Usage",disk:"Meter Volume Usage",net_received:"Meter Net Received Usage",net_transmitted:"Meter Net Transmitted Usage"};t.METER_RESOURCE_USAGE_TITLE=r;var n=Object.keys(r);t.MERTER_TYPE=n;t.LEVEL_CONFIG={openpitrix:[{type:"openpitrix",children:["service"]}],workspaces:[{type:"workspaces",children:["namespaces"]},{type:"namespaces",children:["applications","deployments","statefulsets","openpitrixs","daemonsets"],parent:["workspaces"]},{type:"applications",children:["deployments","statefulsets","daemonsets"],parent:["namespaces"]},{type:"openpitrixs",children:["deployments","statefulsets","daemonsets"],parent:["namespaces"]},{type:"services",children:["pods"],parent:["applications","namespaces","openpitrixs","daemonsets"]},{type:["deployments","statefulsets","daemonsets"],children:["pods"],parent:["applications","namespaces","openpitrixs"]},{type:"pods",parent:["deployments","statefulsets","namespaces","services","daemonsets"]}],cluster:[{type:"cluster",children:["nodes"]},{type:"nodes",children:["pods"],parent:["cluster"]},{type:"pods",parent:["nodes"]}]};t.FEE_CONFIG={cpu_per_core_per_hour:"cpu",egress_network_traffic_per_megabytes_per_hour:"net_transmitted",ingress_network_traffic_per_megabytes_per_hour:"net_received",mem_per_gigabytes_per_hour:"memory",pvc_per_gigabytes_per_hour:"disk",currency:"currency"};t.METER_RESOURCE_USAGE={cpu:"cpu_usage",memory:"memory_usage_wo_cache",net_received:"net_bytes_received",net_transmitted:"net_bytes_transmitted",disk:"pvc_bytes_total"};t.AREA_COLORS=["green","blue","yellow","red","darkestGreen","darkestBlue","darkestYellow","darkestRed","lightestGreen","lightestBlue","lightestYellow","lightestRed"];t.PIE_COLORS=["#3b747a","#479e88","#55bc8a","#a2d8bb","#326e93","#3385b0","#329dce","#7eb8dc","#c7deef","#8c3231","#ab2f29","#ca2621","#ea8573","#fae7e5","#8d663e","#e0992c","#f5a623","#ffc781","#ffe1be"];t.UNIT_CONFIG={cpu:{label:"Core",value:"core"},memory:{label:"Gi",value:"Gi"},number:{label:"M",value:"Mi"},disk:{label:"GB",value:"Gi"},net_received:{label:"M",value:"Mi"},net_transmitted:{label:"M",value:"Mi"}}},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(5),r(18),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(16),r(4),r(23),r(57),r(17);var u,o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=l(r(0)),p=r(239),m=r(433),h=n(r(321)),v=r(186),g=n(r(789)),y=n(r(814)),E=n(r(438)),b=n(r(437)),_=n(r(955)),O=n(r(999)),S=n(r(3896));function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var D=(0,p.observer)(u=function(e){(0,c.default)(r,e);var a=C(r);function r(){var e;(0,o.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/nodes").concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=function(t){var a=t.cluster;return"/kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath({cluster:a}),"/nodes")},e.createEdgeNode=function(){var t=(0,o.default)(u.default.mark((function t(a){var r,n,l,o,i,c,s,f,d,p;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,n=a.name,l=a.ip,o=a.defaultTaint,i=a.runtime,c=a.imageRepository,s=a.nodegroup,f="/kapis/infra.edgewize.io/v1alpha1".concat(e.getPath({cluster:r}),"/nodes/join"),d={node_name:n,node_ip:l,add_default_taint:o,runtime:i,"image-repository":c},s&&(d.node_group=s),t.next=6,request.get(f,d,{},(function(e){return e}));case 6:return p=t.sent,t.abrupt("return",p);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.getTreeNode=function(){var t=(0,o.default)(u.default.mark((function t(a){var r,n,o,i,c,s;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,n=a.nodetree,o=a.namespace,i=(0,l.default)(a,["cluster","nodetree","namespace"]),c="/clusters/".concat(r).concat(e.apiVersion,"/nodegroups/").concat(n,"/nodes"),t.next=4,request.get(c,i);case 4:return(s=t.sent).items=((0,m.default)(s,"items")||[]).map((function(e){return v(v({cluster:r,namespace:o},e),{},{name:e.metadata.name})})),t.abrupt("return",s);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.checkNodeGroupEdgeNode=function(){var t=(0,o.default)(u.default.mark((function t(a){var r,n,l,o;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,n=a.nodegroup,l=a.name,o="/clusters/".concat(r).concat(e.apiVersion,"/nodegroups/").concat(n,"/nodes/").concat(l),t.next=4,request.get(o);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.removeNodeGroupEdgeNode=function(){var t=(0,o.default)(u.default.mark((function t(a){var r,n,l,o;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,n=a.nodegroup,l=a.name,o="/clusters/".concat(r).concat(e.apiVersion,"/nodegroups/").concat(n,"/nodes/").concat(l),t.next=4,request.delete(o);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return(0,c.default)(a,[{key:"apiVersion",get:function(){return p.API_VERSIONS.nodegroups||""}}]),a}(r(a(856)).default);t.default=y},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(973)).default);t.default=c},function(e,a,r){"use strict";(function(e){var n=r(20);r(12),r(5),r(11),r(31),r(6),r(29),r(18),r(16),r(27),r(9),r(13),r(10),r(4),r(22),r(23),r(24),r(17),r(38),r(64),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(29),r(18),r(28),r(42),r(16),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(38),r(64),r(7),r(32);var l=n(r(43)),u=n(r(61)),o=n(r(30)),i=n(r(58));r(41);var c,s,f,d,p,m,h,v,g,y,E=n(r(44)),b=n(r(65)),_=n(r(36)),O=n(r(37)),S=n(r(88)),C=n(r(55)),D=n(r(56)),k=n(r(51)),N=n(r(49)),T=(n(r(66)),n(r(26))),R=n(r(135)),w=n(r(74)),I=r(14),M=r(72),P=n(r(68)),A=n(r(120)),j=n(r(2749));function L(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"kapis/tenant.kubesphere.io/v1beta1".concat(e.getPath(t),"/").concat(e.module)},e.getResourceUrl=function(){return"/kapis/infra.edgewize.io/v1alpha1/edgeclusters"},e.getListResourceUrl=function(){return"/kapis/tenant.kubesphere.io/v1beta1/clusters"},e.getDetailUrl=function(e){var t=e.name;return"/apis/cluster.kubesphere.io/v1alpha1/clusters/".concat(t)},e.getEdgeDetailUrl=function(e){var t=e.name;return"/apis/infra.edgewize.io/v1alpha1/clusters/".concat(t)},e.getListUrl=function(e){var t=e.name;return"/kapis/infra.edgewize.io/v1alpha1/edgeclusters/".concat(t)},(0,b.default)(e,"createWithKubeConfig",g,(0,S.default)(e)),(0,b.default)(e,"delete",y,(0,S.default)(e)),e}return(0,O.default)(P,[{key:"setProject",value:function(e){this.project=e}},{key:"fetchList",value:(N=(0,E.default)(l.default.mark((function e(){var t,a,r,n,o,c=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=c.length>0&&void 0!==c[0]?c[0]:{}).from,a=t.more,r=(0,i.default)(t,["from","more"]),this.list.isLoading=!0,r.sortBy||void 0!==r.ascending||(r.sortBy=M.LIST_DEFAULT_ORDER[this.module]||"createTime"),r.limit!==1/0&&-1!==r.limit||(r.limit=-1,r.page=1),r.limit=r.limit||10,e.next=7,request.get(this.getListResourceUrl({}),x(x({},r),{},{labelSelector:"cluster-role.kubesphere.io/edge"}));case 7:return n=e.sent,o=(0,T.default)(n,"items",[]).map(this.mapper),this.list.update(x(x({data:a?[].concat((0,u.default)(this.list.data),(0,u.default)(o)):o,total:n.totalItems||n.total_count||o.length||0},r),{},{limit:Number(r.limit)||10,page:Number(r.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)}))),function(){return N.apply(this,arguments)})},{key:"fetchDetail",value:(k=(0,E.default)(l.default.mark((function t(a){var r,n;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.isLoading=!0,globals.app.isMultiCluster){t.next=5;break}r=this.mapper((0,R.default)(M.DEFAULT_CLUSTER)),t.next=9;break;case 5:return t.next=7,request.get(this.getDetailUrl(a),null,null,(function(t,a){"Not Found"===a.reason&&e.navigateTo("/404")}));case 7:n=t.sent,r=x(x({},a),this.mapper(n));case 9:return this.detail=r,this.isLoading=!1,t.abrupt("return",r);case 12:case"end":return t.stop()}}),t,this)}))),function(e){return k.apply(this,arguments)})},{key:"fetchProjects",value:(D=(0,E.default)(l.default.mark((function e(){var t,a,r,n,o,c,s,f=this,d=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},a=t.cluster,r=t.namespace,n=t.more,o=(0,i.default)(t,["cluster","namespace","more"]),this.projects.isLoading=!0,o.sortBy||void 0!==o.ascending||(o.sortBy=M.LIST_DEFAULT_ORDER[this.module]||"createTime"),o.limit!==1/0&&-1!==o.limit||(o.limit=-1,o.page=1),o.limit=o.limit||10,e.next=7,request.get("/kapis/resources.kubesphere.io/v1alpha3".concat(this.getPath({cluster:a,namespace:r}),"/namespaces"),x({labelSelector:"!kubesphere.io/devopsproject"},o));case 7:c=e.sent,s=(0,T.default)(c,"items",[]).map((function(e){return x({cluster:a},f.mapper(e))})),this.projects.update(x(x({data:n?[].concat((0,u.default)(this.projects.data),(0,u.default)(s)):s,total:c.totalItems||c.total_count||s.length||0},o),{},{limit:Number(o.limit)||10,page:Number(o.page)||1,isLoading:!1},this.projects.silent?{}:{selectedRowKeys:[]}));case 10:case"end":return e.stop()}}),e,this)}))),function(){return D.apply(this,arguments)})},{key:"fetchClusterConfigz",value:(c=(0,E.default)(l.default.mark((function e(t){var a;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,e.next=3,this.fetchDetail({name:a});case 3:return(0,w.default)(globals,"edgeClusterConfig.".concat(a),this.detail.configz),e.abrupt("return",""!==(0,T.default)(this.detail.configz,"ksVersion",""));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"fetchKubeEdgeIp",value:(o=(0,E.default)(l.default.mark((function e(){var t,a;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get("/kapis/infra.edgewize.io/v1alpha1/config");case 2:return t=e.sent,a=(0,T.default)(t,"data.advertiseAddress",[]),e.abrupt("return",a);case 5:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)})},{key:"validate",value:(n=(0,E.default)(l.default.mark((function e(a){var r=this;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isValidating=!0,e.next=3,request.post("".concat(this.getResourceUrl(),"/validation"),a,{},(function(e,a){if(430!==e.status)return r.isValidating=!1,window.onunhandledrejection({status:400,reason:t("VALIDATION_FAILED"),message:a.message}),Promise.reject()}));case 3:this.isValidating=!1;case 4:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"batchDelete",value:function(e){var t=this;return this.submitting(Promise.all(e.map((function(e){var a=t.list.data.find((function(t){return t.name===e}));return request.delete(t.getListUrl(a))}))))}},{key:"checkName",value:function(e,t){var a=this.getDetailUrl(e);return request.get(a,x({},t),{headers:{"x-check-exist":!0}})}},{key:"fetchVersion",value:(r=(0,E.default)(l.default.mark((function e(t){var a,r;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,e.next=3,request.get("kapis/clusters/".concat(a,"/version").replace("/clusters/default",""));case 3:r=e.sent,this.version=(0,T.default)(r,"kubernetes.gitVersion");case 5:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})}]),P}(P.default),s=(0,N.default)(c.prototype,"initializing",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),f=(0,N.default)(c.prototype,"isAgentLoading",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),d=(0,N.default)(c.prototype,"agent",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),p=(0,N.default)(c.prototype,"isValidating",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),m=(0,N.default)(c.prototype,"isSubmitting",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),h=(0,N.default)(c.prototype,"version",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),v=(0,N.default)(c.prototype,"project",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),(0,N.default)(c.prototype,"setProject",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"setProject"),c.prototype),(0,N.default)(c.prototype,"fetchList",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchList"),c.prototype),(0,N.default)(c.prototype,"fetchDetail",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchDetail"),c.prototype),(0,N.default)(c.prototype,"fetchProjects",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchProjects"),c.prototype),(0,N.default)(c.prototype,"fetchClusterConfigz",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchClusterConfigz"),c.prototype),(0,N.default)(c.prototype,"fetchKubeEdgeIp",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchKubeEdgeIp"),c.prototype),(0,N.default)(c.prototype,"validate",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"validate"),c.prototype),g=(0,N.default)(c.prototype,"createWithKubeConfig",[I.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t,a){var r=a.name;return request.post("".concat(e.getResourceUrl(),"/").concat(r),t)}}}),y=(0,N.default)(c.prototype,"delete",[I.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){return e.submitting(request.delete("".concat(e.getResourceUrl(),"/").concat(t.name)))}}}),(0,N.default)(c.prototype,"batchDelete",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"batchDelete"),c.prototype),(0,N.default)(c.prototype,"checkName",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"checkName"),c.prototype),(0,N.default)(c.prototype,"fetchVersion",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchVersion"),c.prototype),c);a.default=z}).call(this,r(69))},,,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(30)),l=r(a(43));a(41);var u,o,i,c=r(a(44)),s=r(a(65)),f=r(a(36)),d=r(a(37)),p=r(a(88)),m=r(a(55)),h=r(a(56)),v=r(a(51)),g=r(a(49)),y=(r(a(66)),a(14)),E=a(52),b=a(794),_=r(a(845));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){for(var t=1;t0&&void 0!==a[0]?a[0]:{},this.alertData.isLoading=!0,e.next=4,this.fetchMetrics(S({metrics:D},t));case 4:this.alertData={isLoading:!1,data:this.data};case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),n}(_.default),o=(0,g.default)(u.prototype,"baseResourcesSummary",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{isLoading:!0,data:{}}}}),i=(0,g.default)(u.prototype,"alertData",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{isLoading:!1,data:{}}}}),(0,g.default)(u.prototype,"getBaseResourcesSummary",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"getBaseResourcesSummary"),u.prototype),(0,g.default)(u.prototype,"fetchAlertData",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchAlertData"),u.prototype),u);t.default=k},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(86),r(18),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(24),r(17),r(64),r(7),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(86),r(160),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(319),r(22),r(23),r(57),r(24),r(17),r(64),r(7),r(110);var l=n(r(43)),u=n(r(30)),o=n(r(58));r(41);var i,c,s,f,d,p,m,h,v,g,y,E,b,_,O,S,C,D,k,N,T=n(r(44)),R=n(r(65)),w=n(r(36)),I=n(r(37)),M=n(r(88)),P=n(r(55)),A=n(r(56)),j=n(r(51)),L=n(r(49)),x=(n(r(66)),r(909)),U=n(r(135)),z=n(r(26)),F=n(r(60)),G=n(r(63)),V=n(r(189)),B=n(r(74)),Y=r(14),W=r(52),q=n(r(201)),H=n(r(323));function Q(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function K(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default.txt",a=new Blob([e],{type:"text/plain;charset=utf-8"});(0,x.saveAs)(a,t)},e}return(0,I.default)(de,[{key:"getPipelineUrl",value:function(e){var t=e.cluster,a=e.devops,r=e.name;return"".concat(this.getDevopsUrlV2({cluster:t,devops:a||this.devops}),"pipelines/").concat(decodeURIComponent(r),"/")}},{key:"fetchList",value:(se=(0,T.default)(l.default.mark((function e(){var t,a,r,n,u,i,c,s,f,d,p,m,h,v,g,y,E,b=this,_=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=_.length>0&&void 0!==_[0]?_[0]:{},r=a.devops,a.workspace,n=a.devopsName,u=a.silent,i=a.cluster,c=(0,o.default)(a,["devops","workspace","devopsName","silent","cluster"]),u||(this.list.isLoading=!0),s=c.page,f=c.limit,d=c.name,p=c.filter,m=c.type,h=c.ascending,v=d?"".concat(encodeURIComponent(d)):void 0,g="".concat(this.getBaseUrl({cluster:i,devops:r}),"pipelines"),e.next=7,request.get(g,{page:s||1,limit:f||10,name:v,filter:p||void 0,type:m||void 0,ascending:h},{params:K({},c)});case 7:y=e.sent,E=(null!==(t=y.items)&&void 0!==t?t:[]).filter((function(e){return!e.metadata.deletionTimestamp})).map((function(e){return K({},b.mapper(e))})),this.setDevops(r),this.devopsName=n,this.list={data:E||[],total:y.totalItems||0,limit:parseInt(f,10)||10,page:parseInt(s,10)||1,filters:(0,V.default)(c,"devops","ascending"),selectedRowKeys:[],isLoading:!1};case 12:case"end":return e.stop()}}),e,this)}))),function(){return se.apply(this,arguments)})},{key:"fetchDetail",value:(ce=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,o,i;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.name,n=t.isSilent,u=t.devops,n||(this.isLoading=!0),e.next=4,request.get("".concat(this.getBaseUrl({devops:u,cluster:a})).concat(this.module,"/").concat(r));case 4:return o=e.sent,i=this.mapper(o),this.setPipelineConfig(o),this.detail=i,this.isLoading=!1,e.abrupt("return",i);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return ce.apply(this,arguments)})},{key:"fetchDetailUntilEditModeNull",value:(ie=(0,T.default)(l.default.mark((function e(a){var r,n,u,o=this;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.cluster,n=a.name,u=a.devops,e.abrupt("return",new Promise((function(e,a){var i=setTimeout((function(){clearTimeout(o.timer),clearTimeout(i),a(t("CONNECTION_TIMEOUT"))}),6e4),c=function(){var t=(0,T.default)(l.default.mark((function t(){var a,s;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,request.get("".concat(o.getBaseUrl({devops:u,cluster:r})).concat(o.module,"/").concat(n));case 2:a=t.sent,s=o.mapper(a),clearTimeout(o.timer),(0,z.default)(s,"annotations['pipeline.devops.kubesphere.io/jenkinsfile.edit.mode']")?o.timer=setTimeout(c,1e3):(clearTimeout(i),e(s));case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();c()})));case 2:case"end":return e.stop()}}),e)}))),function(e){return ie.apply(this,arguments)})},{key:"checkPipelineName",value:(oe=(0,T.default)(l.default.mark((function e(t){var a,r,n,u=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.name,r=t.cluster,n=t.devops,u.length>1&&void 0!==u[1]&&!u[1]){e.next=6;break}return e.next=5,request.get(this.getPipelineUrl({cluster:r,name:a,devops:n}),{},{headers:{"x-check-exist":!0}});case 5:return e.abrupt("return",e.sent);case 6:return e.next=8,request.get("/kapis/devops.kubesphere.io/v1alpha2".concat(this.getPath({cluster:r,devops:n}),"/pipelines/").concat(a),{check:!0});case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return oe.apply(this,arguments)})},{key:"getJenkinsFile",value:(ue=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,o,i=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.cluster,r=t.name,n=t.devops,u=i.length>1&&void 0!==i[1]&&i[1],this.pipelineJsonData.isLoading=!0,e.t0=u,!e.t0){e.next=7;break}return e.next=7,this.fetchDetail({cluster:a,name:r,devops:n});case 7:this.jenkinsFile=(0,z.default)(this.pipelineConfig,"spec.pipeline.jenkinsfile",""),o=(0,z.default)(this.pipelineConfig,"metadata.annotations['pipeline.devops.kubesphere.io/jenkinsfile']"),this.pipelineJsonData={pipelineJson:o?{json:JSON.parse(o)}:void 0,isLoading:!1};case 10:case"end":return e.stop()}}),e,this)}))),function(e){return ue.apply(this,arguments)})},{key:"setPipelineJsonData",value:function(e){this.pipelineJsonData={pipelineJson:e?{json:JSON.parse(e)}:void 0,isLoading:!1}}},{key:"convertJenkinsFileToJson",value:(le=(0,T.default)(l.default.mark((function e(t,a,r,n,u){var o,i,c,s;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u&&(this.isSubmitting=!0),o=a&&"default"!==a?"/klusters/".concat(a):"",e.next=4,request.put("/kapis/devops.kubesphere.io/v1alpha3".concat(o,"/namespaces/").concat(r,"/pipelines/").concat(n,"/jenkinsfile?mode=raw"),{data:t},{headers:{"content-type":"application/json"}});case 4:return i="raw",e.prev=5,e.next=8,this.fetchDetailUntilEditModeNull({cluster:a,devops:r,name:n});case 8:s=e.sent,c=(0,z.default)(s,'annotations["pipeline.devops.kubesphere.io/jenkinsfile"]'),i="",e.next=17;break;case 13:e.prev=13,e.t0=e.catch(5),i="raw",c=void 0;case 17:return e.prev=17,u&&(this.isSubmitting=!1),e.finish(17);case 20:return e.abrupt("return",{mode:i,jsonData:c});case 21:case"end":return e.stop()}}),e,this,[[5,13,17,20]])}))),function(e,t,a,r,n){return le.apply(this,arguments)})},{key:"getPullRequest",value:(ne=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,i,c,s,f,d;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.name,r=t.devops,t.workspace,n=t.cluster,u=(0,o.default)(t,["name","devops","workspace","cluster"]),i=decodeURIComponent(a),c=u.page,s=u.limit,f=void 0===s?10:s,!(0,G.default)(this.detail)){e.next=6;break}return e.next=6,this.fetchDetail({name:i,devops:r});case 6:return e.next=8,request.get("".concat(this.getBaseUrl({cluster:n,namespace:r}),"pipelines/").concat(decodeURIComponent(a),"/branches"),{filter:"pull-requests",page:c||1,limit:f});case 8:d=e.sent,Array.isArray(d.items)&&d.items.forEach((function(e){e.id=e.latestRun.endTime})),this.pullRequestList={data:d.items||[],total:d.totalItems||0,limit:f,page:parseInt(c,10)||1,filters:(0,V.default)(u,"devops"),isLoading:!1,selectedRowKeys:[]};case 11:case"end":return e.stop()}}),e,this)}))),function(e){return ne.apply(this,arguments)})},{key:"getBranches",value:(re=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,i,c,s,f,d,p;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.cluster,r=t.devops,n=t.name,u=t.branch,i=(0,o.default)(t,["cluster","devops","name","branch"]),c=decodeURIComponent(n),s=i.page,f=i.limit,d=void 0===f?10:f,!(0,G.default)(this.detail)){e.next=6;break}return e.next=6,this.fetchDetail({cluster:a,name:c,devops:r});case 6:return e.next=8,request.get("".concat(this.getBaseUrl({cluster:a,namespace:r}),"pipelines/").concat(decodeURIComponent(n),"/branches"),{filter:"origin",page:s||1,limit:d,branch:encodeURIComponent(u)});case 8:p=e.sent,this.branchList={data:p.items||[],limit:d,total:p.totalItems||0,page:parseInt(s,10)||1,filters:(0,V.default)(i,"devops"),isLoading:!1,selectedRowKeys:[]};case 10:case"end":return e.stop()}}),e,this)}))),function(e){return re.apply(this,arguments)})},{key:"getActivities",value:(ae=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,i,c,s,f,d,p,m,h;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.name,r=t.branch,n=t.devops,u=t.cluster,i=t.backward,c=void 0!==i&&i,s=(0,o.default)(t,["name","branch","devops","cluster","backward"]),a=decodeURIComponent(a),f=s.page,d=s.limit,p=void 0===d?10:d,!(0,G.default)(this.detail)){e.next=6;break}return e.next=6,this.fetchDetail({cluster:u,name:a,devops:n});case 6:return m={page:f||1,limit:p,branch:r,backward:c},f<0&&(delete m.page,delete m.limit),e.next=10,request.get("".concat(this.getBaseUrl({cluster:u,namespace:n}),"pipelines/").concat(a,"/pipelineruns"),K({},m));case 10:return h=e.sent,(0,F.default)(h)&&(h=h.filter((function(e){return e._links}))),!1===c&&!(0,G.default)(h)&&(0,F.default)(h.items)&&(h.items=h.items.map((function(e){var t,a=(0,W.safeParseJSON)((0,z.default)(e,"metadata.annotations.['devops.kubesphere.io/jenkins-pipelinerun-status']"),{});return K(K({},a),{},{id:null!==(t=a.id)&&void 0!==t?t:(0,z.default)(e,'metadata.annotations["devops.kubesphere.io/jenkins-pipelinerun-id"]'),uid:e.metadata.uid,_originData:e})}))),this.activityList={limit:p,data:h.items||[],total:h.totalItems||0,page:parseInt(f,10)||1,filters:(0,V.default)(s,"devops"),isLoading:!1,selectedRowKeys:[]},e.abrupt("return",h.items);case 15:case"end":return e.stop()}}),e,this)}))),function(e){return ae.apply(this,arguments)})},{key:"getBranchDetail",value:(te=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,o;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.devops,r=t.cluster,n=t.name,u=t.branch,e.prev=1,e.next=4,request.get("".concat(this.getBaseUrl({cluster:r,namespace:a}),"pipelines/").concat(decodeURIComponent(n),"/branches/").concat(encodeURIComponent(u)));case 4:return(o=e.sent).name&&(this.branchDetail=o),e.abrupt("return",o);case 9:return e.prev=9,e.t0=e.catch(1),e.abrupt("return",[]);case 12:case"end":return e.stop()}}),e,this,[[1,9]])}))),function(e){return te.apply(this,arguments)})},{key:"handleActivityReplay",value:(ee=(0,T.default)(l.default.mark((function e(t,a){var r,n,u,o;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.url,n=t.devops,u=t.name,o=t.cluster,e.next=3,request.post("".concat(this.getPipelineUrl({cluster:o,devops:n,name:u})).concat(r,"/replay/"),void 0,void 0,a);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return ee.apply(this,arguments)})},{key:"handleActivityStop",value:($=(0,T.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.url,r=t.devops,n=t.name,u=t.cluster,e.next=3,request.post("".concat(this.getPipelineUrl({cluster:u,devops:r,name:n})).concat(a,"/stop/?blocking=true&timeOutInSecs=10"));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return $.apply(this,arguments)})},{key:"runBranch",value:(X=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,o,i,c,s=this;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.devops,n=t.name,u=t.branch,o=t.parameters,i="".concat(this.getBaseUrl({cluster:a,namespace:r}),"pipelines/").concat(n,"/pipelineruns").concat(u?"?branch=".concat(encodeURIComponent(u)):""),c=(0,G.default)(o)?{parameters:[]}:{parameters:o},e.next=5,request.post(i,c).then((function(){setTimeout((function(){s.fetchDetail({cluster:a,devops:r,name:n,isSilent:!0})}),1e3)}));case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return X.apply(this,arguments)})},{key:"getPipeLineConfig",value:function(){var e=(0,U.default)((0,Y.toJS)(this.pipelineConfig));return delete(e=K(K({},(0,Y.toJS)(e.spec)),(0,Y.toJS)(e))).spec,delete e.kind,delete e.apiVersion,e}},{key:"setDevops",value:function(e){this.devops=e}},{key:"createPipeline",value:(Q=(0,T.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.data,r=t.devops,n=t.cluster,a.kind="Pipeline",a.apiVersion="devops.kubesphere.io/v1alpha3",u="".concat(this.getBaseUrl({devops:r,cluster:n}),"pipelines"),e.next=6,request.post(u,a);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return Q.apply(this,arguments)})},{key:"updatePipeline",value:(H=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,o;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.data,n=t.devops,r.kind="Pipeline",r.apiVersion="devops.kubesphere.io/v1alpha3",u="".concat(this.getBaseUrl({devops:n,cluster:a}),"pipelines/").concat(r.metadata.name),e.next=6,request.put(u,r);case 6:return o=e.sent,this.setPipelineConfig(o),e.abrupt("return",o);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return H.apply(this,arguments)})},{key:"updateJenkinsFile",value:function(e){var t=(0,U.default)((0,Y.toJS)(this.pipelineConfig));(0,B.default)(t,"spec.pipeline.jenkinsfile",e),this.setPipelineConfig(t)}},{key:"delete",value:(L=(0,T.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.devops,n=t.cluster,u="".concat(this.getBaseUrl({devops:r,cluster:n}),"pipelines/").concat(a),e.next=4,request.delete(u);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"scanRepository",value:(j=(0,T.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.devops,r=t.name,n=t.cluster,u={},e.next=4,request.defaults({method:"POST",url:"".concat(this.getPipelineUrl({cluster:n,devops:a||this.devops,name:r||this.detail.name}),"scan"),options:u,handler:function(e){return e.text().then((function(){if(e.redirected)return"Scan success"}))}});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return j.apply(this,arguments)})},{key:"getRepoScanLogs",value:(A=(0,T.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.devops,r=t.name,n=t.cluster,e.next=3,request.get("".concat(this.getPipelineUrl({cluster:n,name:r,devops:a}),"consolelog"));case 3:u=e.sent,this.repositoryLog=u;case 5:case"end":return e.stop()}}),e,this)}))),function(e){return A.apply(this,arguments)})},{key:"checkCron",value:(i=(0,T.default)(l.default.mark((function e(t){return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get("".concat(this.getDevopsUrlV2(),"check/cron?value=").concat(t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"checkScriptCompile",value:(u=(0,T.default)(l.default.mark((function e(t,a){var r,n,u,o;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.devops,n=t.pipeline,u=t.value,o=t.cluster,e.abrupt("return",request.post("".concat(this.getPipelineUrl({cluster:o,name:n,devops:r}),"checkScriptCompile"),{value:u},Z,a));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getBranchLists",value:(n=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,i,c,s;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.devops,r=t.name,t.workspace,n=t.cluster,u=(0,o.default)(t,["devops","name","workspace","cluster"]),i=u.page,c=u.limit,s=void 0===c?10:c,e.next=4,request.get("".concat(this.getPipelineUrl({cluster:n,name:r,devops:a}),"branches/"),{filter:"origin",start:(i-1)*s||0,limit:s});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getPipelineTemplateList",value:(r=(0,T.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="zh"===(0,q.default)("lang")?"ZH":"EN",e.next=3,request.get("".concat(this.getBaseUrl(t),"clustertemplates?limit=100"));case 3:return r=e.sent,n=r.items,u=(void 0===n?[]:n).map((function(e){var t={},r=(0,z.default)(e,"metadata.annotations",{}),n=r["devops.kubesphere.io/icon"];return t.type=e.metadata.name,t.desc=r["devops.kubesphere.io/description".concat(a)]||r["devops.kubesphere.io/descriptionEN"],t.title=r["devops.kubesphere.io/displayName".concat(a)]||r["devops.kubesphere.io/displayNameEN"]||r.displayNameEN,t.image=n&&n.indexOf("http")>-1?n:"/assets/pipeline/".concat(n),t.parameters=(0,z.default)(e,"spec.parameters",[]),t})),e.abrupt("return",u);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getTempleJenkins",value:(a=(0,T.default)(l.default.mark((function e(t,a,r){var n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.post("".concat(this.getBaseUrl(r),"clustertemplates/").concat(t,"/render"),a);case 2:return n=e.sent,u=(0,z.default)(n,'metadata.annotations["devops.kubesphere.io/render-result"]',""),e.abrupt("return",u);case 5:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return a.apply(this,arguments)})}]),de}(H.default),c=(0,L.default)(i.prototype,"pipelineConfig",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),s=(0,L.default)(i.prototype,"originalList",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),f=(0,L.default)(i.prototype,"list",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",reverse:!1,filters:{},isLoading:!0}}}),d=(0,L.default)(i.prototype,"branchList",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",reverse:!1,filters:{},isLoading:!0}}}),p=(0,L.default)(i.prototype,"activityList",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",reverse:!1,filters:{},isLoading:!0}}}),m=(0,L.default)(i.prototype,"pullRequestList",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",reverse:!1,filters:{},isLoading:!0,selectedRowKeys:[]}}}),h=(0,L.default)(i.prototype,"credentialsList",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],total:0,isLoading:!0}}}),v=(0,L.default)(i.prototype,"detail",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),g=(0,L.default)(i.prototype,"isLoading",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),y=(0,L.default)(i.prototype,"notFound",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),E=(0,L.default)(i.prototype,"repositoryLog",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),b=(0,L.default)(i.prototype,"isSubmitting",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_=(0,L.default)(i.prototype,"pipelineJsonData",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{pipelineJson:{},isLoading:!0}}}),O=(0,L.default)(i.prototype,"branchDetail",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),S=(0,L.default)(i.prototype,"jenkinsFile",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),C=(0,L.default)(i.prototype,"devops",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),D=(0,L.default)(i.prototype,"devopsName",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),(0,L.default)(i.prototype,"fetchList",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,L.default)(i.prototype,"fetchDetail",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),k=(0,L.default)(i.prototype,"setPipelineConfig",[Y.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.pipelineConfig=t}}}),N=(0,L.default)(i.prototype,"setSelectRowKeys",[Y.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.list.selectedRowKeys.replace(t)}}}),(0,L.default)(i.prototype,"checkPipelineName",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"checkPipelineName"),i.prototype),(0,L.default)(i.prototype,"getJenkinsFile",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"getJenkinsFile"),i.prototype),(0,L.default)(i.prototype,"setPipelineJsonData",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"setPipelineJsonData"),i.prototype),(0,L.default)(i.prototype,"convertJenkinsFileToJson",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"convertJenkinsFileToJson"),i.prototype),(0,L.default)(i.prototype,"getPullRequest",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"getPullRequest"),i.prototype),(0,L.default)(i.prototype,"getBranches",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"getBranches"),i.prototype),(0,L.default)(i.prototype,"getActivities",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"getActivities"),i.prototype),(0,L.default)(i.prototype,"getBranchDetail",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"getBranchDetail"),i.prototype),(0,L.default)(i.prototype,"getPipeLineConfig",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"getPipeLineConfig"),i.prototype),(0,L.default)(i.prototype,"setDevops",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"setDevops"),i.prototype),(0,L.default)(i.prototype,"createPipeline",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"createPipeline"),i.prototype),(0,L.default)(i.prototype,"updatePipeline",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"updatePipeline"),i.prototype),(0,L.default)(i.prototype,"updateJenkinsFile",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"updateJenkinsFile"),i.prototype),(0,L.default)(i.prototype,"delete",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"delete"),i.prototype),(0,L.default)(i.prototype,"scanRepository",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"scanRepository"),i.prototype),i);a.default=X},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(84),a(29),a(87),a(16),a(27),a(9),a(13),a(10),a(4),a(316),a(22),a(23),a(24),a(17),a(85),a(38),a(64),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(58)),l=r(a(43)),u=r(a(30)),o=r(a(96));a(41);var i=r(a(44)),c=r(a(65)),s=r(a(36)),f=r(a(37)),d=r(a(88)),p=r(a(55)),m=r(a(56)),h=r(a(51)),v=r(a(49));r(a(66));a(12),a(45),a(5),a(11),a(6),a(84),a(29),a(28),a(87),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(316),a(22),a(23),a(57),a(24),a(17),a(85),a(38),a(64),a(7),a(32);var g,y,E,b=r(a(26)),_=r(a(74)),O=r(a(198)),S=r(a(480)),C=a(14),D=a(52),k=a(72),N=a(1021),T=r(a(68));function R(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t=400&&(a+=n)})),(0,_.default)(e,"requests.errorRatio",Math.max(100*a/t,0)),e},P=(g=function(e){(0,p.default)(m,e);var t,a,r=I(m);function m(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"applications";return(0,s.default)(this,m),e=r.call(this,t),(0,c.default)(e,"isTracingLoading",y,(0,d.default)(e)),e.tracing={data:[],total:0},e.graph={data:{},health:{}},(0,c.default)(e,"env",E,(0,d.default)(e)),e.getListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module)},e.getGraphUrl=function(t){var a=t.cluster,r=t.namespace,n=t.duration;return"kapis/servicemesh.kubesphere.io/v1alpha2".concat(e.getPath({cluster:a,namespace:r}),"/graph?duration=").concat(n,"s&graphType=versionedApp&injectServiceNodes=true&groupBy=app&appenders=deadNode,sidecarsCheck,serviceEntry,istio,responseTime")},e.getHealthUrl=function(t){var a=t.cluster,r=t.namespace,n=t.type,l=t.duration;return"kapis/servicemesh.kubesphere.io/v1alpha2".concat(e.getPath({cluster:a,namespace:r}),"/health?rateInterval=").concat(l,"s&type=").concat(n)},e}return(0,f.default)(m,[{key:"fetchGraph",value:(a=(0,i.default)(l.default.mark((function e(){var t,a,r,n,i,c,s,f,d,p,m,h,v,g,y,E=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=E.length>0&&void 0!==E[0]?E[0]:{},a=t.cluster,r=t.namespace,n=t.app,i=t.duration,e.next=3,Promise.all([request.get(this.getGraphUrl({cluster:a,namespace:r,app:n,duration:i})),request.get(this.getHealthUrl({cluster:a,namespace:r,type:"app",duration:i})),request.get(this.getHealthUrl({cluster:a,namespace:r,type:"service",duration:i})),request.get(this.getHealthUrl({cluster:a,namespace:r,type:"workload",duration:i}))]);case 3:c=e.sent,s=(0,o.default)(c,4),f=s[0],d=s[1],p=s[2],m=s[3],h=this.detail.services||[],v=this.detail.workloads||[],g={},d&&p&&m&&(this.graph.health=h.reduce((function(e,t){if(!d[t])return e;var a=d[t],r=a.requests,n=a.workloadStatuses,l=n.reduce((function(e,t){return w(w({},e),{},(0,u.default)({},t.name,M(m[t.name])))}),{});return Object.keys(l).forEach((function(e){g[e]=t})),w(w({},e),{},(0,u.default)({},t,{requests:r,workloadStatuses:n,workloads:l,service:M(p[t])}))}),{})),f&&f.elements&&(y=[],f.elements.nodes.forEach((function(e){"service"===e.data.nodeType&&h.includes(e.data.service)?y.push(e):"app"===e.data.nodeType&&e.data.workload&&v.includes(e.data.workload)&&(e.data.app=g[e.data.workload],y.push(e)),e.data.isRoot&&e.data.namespace!==r&&(e.data.targetNamespace=r,y.push(e))})),this.graph.data={nodes:y,edges:f.elements.edges});case 14:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchAppMetrics",value:function(e){var t=e.name,a=e.cluster,r=e.namespace,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=Math.floor((new Date).getTime()/1e3),u=w({queryTime:l,duration:60,step:20,rateInterval:"20s","filters[]":["request_count","request_duration","request_error_count","tcp_sent","tcp_received"],direction:"inbound",reporter:"destination"},n);return request.get("kapis/servicemesh.kubesphere.io/v1alpha2".concat(this.getPath({cluster:a,namespace:r}),"/apps/").concat(t,"/metrics"),u)}},{key:"fetchServiceMetrics",value:function(e){var t=e.name,a=e.cluster,r=e.namespace,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=Math.floor((new Date).getTime()/1e3),u=w({queryTime:l,duration:60,step:20,rateInterval:"20s",direction:"inbound",reporter:"source"},n);return request.get("kapis/servicemesh.kubesphere.io/v1alpha2".concat(this.getPath({cluster:a,namespace:r}),"/services/").concat(t,"/metrics"),u)}},{key:"fetchWorkloadMetrics",value:function(e){var t=e.name,a=e.cluster,r=e.namespace,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=w({duration:60,step:20,rateInterval:"20s",direction:"inbound",reporter:"source"},n);return request.get("kapis/servicemesh.kubesphere.io/v1alpha2".concat(this.getPath({cluster:a,namespace:r}),"/workloads/").concat(t,"/metrics"),l)}},{key:"fetchTracing",value:(t=(0,i.default)(l.default.mark((function e(t){var a,r,u,o,i,c,s;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.service,r=t.cluster,u=t.namespace,o=(0,n.default)(t,["service","cluster","namespace"]),this.isTracingLoading=!0,i=w({limit:5},o),c=(new Date).getTime(),i.start="".concat(i.start||"".concat(c-k.TIME_MICROSECOND_MAP[i.lookback]),"000"),i.end="".concat(i.end||"".concat(c),"000"),e.prev=6,e.next=9,request.get("kapis/servicemesh.kubesphere.io/v1alpha2".concat(this.getPath({cluster:r,namespace:u}),"/services/").concat(a,"/traces"),i);case 9:(s=e.sent)&&s.data&&(this.tracing.data=(0,N.transformTraces)(s.data)),e.next=15;break;case 13:e.prev=13,e.t0=e.catch(6);case 15:this.isTracingLoading=!1;case 16:case"end":return e.stop()}}),e,this,[[6,13]])}))),function(e){return t.apply(this,arguments)})},{key:"setSelectRowKeys",value:function(e){this.list.selectedRowKeys.replace(e)}},{key:"create",value:function(e,t){var a=this,r=e.application,l=e.ingress,u=(0,n.default)(e,["application","ingress"]),o="true"===(0,b.default)(r,'metadata.annotations["servicemesh.kubesphere.io/enabled"]'),i=[{url:this.getListUrl(t),data:r}];if((0,b.default)(l,"spec.rules",[]).length>0){var c=(0,b.default)(r,"metadata.name");if((0,b.default)(l,"metadata.name")||(0,_.default)(l,"metadata.name","".concat(c,"-ingress-").concat((0,D.generateId)())),o){var s=(0,b.default)(l,"spec.rules[0].http.paths[0].backend.service.name");s&&(0,_.default)(l,'metadata.annotations["nginx.ingress.kubernetes.io/upstream-vhost"]',"".concat(s,".").concat(t.namespace,".svc.cluster.local"))}i.push({url:"apis/networking.k8s.io/v1".concat(this.getPath(t),"/ingresses"),data:l})}return Object.values(u).forEach((function(e){if(e.workload&&e.service){var r=(0,S.default)(k.MODULE_KIND_MAP,(function(t){return t===e.workload.kind}))||"deployments";i.push({url:"apis/apps/v1".concat(a.getPath(t),"/").concat(r),data:e.workload},{url:"api/v1".concat(a.getPath(t),"/services"),data:e.service})}})),this.submitting((0,D.withDryRun)(i))}},{key:"addComponent",value:function(e,t){var a=[];if(t.namespace){if(e.workload&&e.service){var r=(0,S.default)(k.MODULE_KIND_MAP,(function(t){return t===e.workload.kind}))||"deployments";a.push({url:"apis/apps/v1".concat(this.getPath(t),"/").concat(r),data:e.workload},{url:"api/v1".concat(this.getPath(t),"/services"),data:e.service})}return this.submitting((0,D.withDryRun)(a))}}},{key:"patch",value:function(e,t){var a=e.namespace,r=e.cluster,n=e.name;return this.submitting(request.patch(this.getDetailUrl({name:n,cluster:r,namespace:a}),t))}},{key:"delete",value:function(e){var t=e.name,a=e.cluster,r=e.namespace;return this.submitting(request.delete(this.getDetailUrl({name:t,cluster:a,namespace:r})))}},{key:"checkName",value:function(e){var t=e.name,a=e.cluster,r=e.namespace;return request.get(this.getDetailUrl({name:t,cluster:a,namespace:r}),{},{headers:{"x-check-exist":!0}})}},{key:"fetchSampleData",value:function(e){return request.get("sample/".concat(e))}}]),m}(T.default),y=(0,v.default)(g.prototype,"isTracingLoading",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),E=(0,v.default)(g.prototype,"env",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:{},isLoading:!1}}}),(0,v.default)(g.prototype,"fetchGraph",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"fetchGraph"),g.prototype),(0,v.default)(g.prototype,"fetchAppMetrics",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"fetchAppMetrics"),g.prototype),(0,v.default)(g.prototype,"fetchServiceMetrics",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"fetchServiceMetrics"),g.prototype),(0,v.default)(g.prototype,"fetchWorkloadMetrics",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"fetchWorkloadMetrics"),g.prototype),(0,v.default)(g.prototype,"fetchTracing",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"fetchTracing"),g.prototype),(0,v.default)(g.prototype,"setSelectRowKeys",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"setSelectRowKeys"),g.prototype),(0,v.default)(g.prototype,"create",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"create"),g.prototype),(0,v.default)(g.prototype,"addComponent",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"addComponent"),g.prototype),(0,v.default)(g.prototype,"patch",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"patch"),g.prototype),(0,v.default)(g.prototype,"delete",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"delete"),g.prototype),(0,v.default)(g.prototype,"checkName",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"checkName"),g.prototype),(0,v.default)(g.prototype,"fetchSampleData",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"fetchSampleData"),g.prototype),g);t.default=P},function(e,t,a){"use strict";a(15);var r=a(20);a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.Component=t.default=void 0,a(45),a(18),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=a(14),f=a(239),d=r(a(63)),p=r(a(26)),m=r(a(1406)),h=r(a(1407));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var g=function(e){(0,u.default)(a,e);var t=v(a);function a(e){var r;return(0,n.default)(this,a),(r=t.call(this,e)).fetchData=function(){r.envStore.fetchList({namespace:r.namespace,cluster:r.cluster,containers:r.containers,initContainers:r.initContainers})},r.envStore=new m.default,r.fetchData(),r}return(0,l.default)(a,[{key:"render",value:function(){var e=(0,s.toJS)(this.envStore.list),t=e.data,a=e.isLoading;return c.default.createElement("div",null,t.map((function(e,t){return c.default.createElement(h.default,{key:t,detail:e,expand:0===t,loading:a})})))}},{key:"module",get:function(){return this.store.module}},{key:"store",get:function(){return this.props.detailStore}},{key:"namespace",get:function(){return this.store.detail.namespace}},{key:"cluster",get:function(){return this.store.detail.cluster}},{key:"containers",get:function(){var e=(0,s.toJS)(this.store.detail),t=e.spec,a=e.containers,r=void 0===a?[]:a;return"containers"===this.module?[e]:(0,d.default)(r)?(0,d.default)(t)?[]:(0,p.default)(t,"template.spec.containers",[]):r}},{key:"initContainers",get:function(){var e=(0,s.toJS)(this.store.detail),t=e.spec,a=e.initContainers,r=void 0===a?[]:a;return"containers"===this.module?[e]:(0,d.default)(r)?(0,d.default)(t)?[]:(0,p.default)(t,"template.spec.initContainers",[]):r}}]),a}(c.default.Component),y=(0,f.inject)("rootStore","detailStore")((0,f.observer)(g));t.default=y;var E=g;t.Component=E},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=r(a(3)),d=r(a(3928));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var m=function(e){(0,u.default)(a,e);var t=p(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.desc;return c.default.createElement("div",{className:(0,f.default)(d.default.wrapper,t)},c.default.createElement("div",null,c.default.createElement("img",{src:"/assets/empty-card.svg",alt:""})),c.default.createElement("div",null,c.default.createElement("p",{className:d.default.desc,dangerouslySetInnerHTML:{__html:a}}),this.props.children))}}]),a}(c.default.Component);t.default=m,m.propTypes={className:s.default.string,title:s.default.string,desc:s.default.string,onCreate:s.default.func}},,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(86),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(86),a(42),a(4),a(23),a(57),a(17);var n=r(a(315)),l=r(a(58)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=a(186);function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var m=function(e){(0,i.default)(a,e);var t=p(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return(0,N.isNotPersistentVolume)(t)?t:{name:e.name||"volume-".concat((0,k.generateId)()),persistentVolumeClaim:{claimName:t.name}}},t.updateVolumes=function(e){var a=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.volumes"),[]),r=[],n=(0,b.default)(t.selectVolume)?void 0:(0,v.default)(t.selectVolume,"specVolume",t.selectVolume),l=t.formatSpecVolume(n,e);r=n?a.map((function(e){return e.name===n.name?l:e})):[].concat((0,i.default)(a),[l]),(0,g.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.volumes"),r),t.checkMaxUnavalable(a)},t.updateVolumeMounts=function(e,a){var r=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.containers"),[]).map((function(e){return G(G({},e),{},{type:"worker"})})),n=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.initContainers"),[]).map((function(e){return G(G({},e),{},{type:"init"})})),l=(0,h.default)(r,n),o=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.volumes"),[]);e.forEach((function(e){var t=e.containerName,r=e.volume,n=(0,u.default)(e,["containerName","volume"]),i=l.find((function(e){return e.name===t})),c=(0,N.findVolume)(o,r);if(c&&i){i.volumeMounts=i.volumeMounts||[];var s=G({name:c.name},n);i.volumeMounts.find((function(e){return e.name===c.name}))?i.volumeMounts=i.volumeMounts.map((function(e){return e.name===c.name?s:e})):i.volumeMounts.push(s),a&&a.name!==c.name&&(i.volumeMounts=i.volumeMounts.filter((function(e){return e.name!==a.name}))),i.volumeMounts=i.volumeMounts.filter((function(e){return"null"!==e.readOnly})).map((function(e){e.logPath;var t=(0,u.default)(e,["logPath"]);return G(G({},t),{},{readOnly:"true"===String(t.readOnly)})}))}}));var i=[],c=[];l.forEach((function(e){"worker"===e.type?(delete e.type,i.push(e)):(delete e.type,c.push(e))})),(0,g.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.containers"),i),(0,g.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.initContainers"),c)},t.checkMaxUnavalable=function(e){if(["deployments","daemonsets"].includes(t.props.module)&&"RollingUpdate"===(0,v.default)(t.fedFormTemplate,"spec.strategy.type")){var a=e.some((function(e){return!(0,b.default)(e.persistentVolumeClaim)})),r=(0,v.default)(t.fedFormTemplate,"spec.strategy.rollingUpdate.maxUnavailable",null);a&&!r&&(0,g.default)(t.fedFormTemplate,"spec.strategy.rollingUpdate.maxUnavailable",1)}},t.updateLogConfigs=function(e){var a=(0,k.safeParseJSON)((0,v.default)(t.fedFormTemplate,t.logPathPrefix,""),{}),r=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.volumes"),[]);e.forEach((function(e){var t=(0,N.findVolume)(r,e.volume);if(t){var n="containerLogConfigs.".concat(e.containerName,".").concat(e.name||t.name);e.logPath?(0,g.default)(a,n,e.logPath.split(",")):(0,y.default)(a,n)}})),(0,g.default)(t.fedFormTemplate,t.logPathPrefix,JSON.stringify(a))},t.updateVolumeTemplate=function(e){var a=(0,v.default)(t.formTemplate,"metadata.namespace"),r=(0,v.default)(t.fedFormTemplate,"spec.volumeClaimTemplates",[]);(0,g.default)(e,"metadata.namespace",a);var n=[];n=r.find((function(t){return t.metadata.name===e.metadata.name}))?r.map((function(t){return t.metadata.name===e.metadata.name?e:t})):[].concat((0,i.default)(r),[e]),(0,g.default)(t.fedFormTemplate,"spec.volumeClaimTemplates",n)},t.updateVolumeTemplateMounts=function(e){var a=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.containers"),[]).map((function(e){return G(G({},e),{},{type:"worker"})})),r=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.initContainers"),[]).map((function(e){return G(G({},e),{},{type:"init"})})),n=(0,h.default)(a,r);e.forEach((function(e){var t=e.containerName,a=(0,u.default)(e,["containerName"]),r=n.find((function(e){return e.name===t}));if(r){r.volumeMounts=r.volumeMounts||[];var l=a;r.volumeMounts.find((function(e){return e.name===l.name}))?r.volumeMounts=r.volumeMounts.map((function(e){return e.name===l.name?l:e})):r.volumeMounts.push(l),r.volumeMounts=r.volumeMounts.filter((function(e){return"null"!==e.readOnly})).map((function(e){return G(G({},e),{},{readOnly:"true"===e.readOnly})}))}}));var l=[],o=[];n.forEach((function(e){"worker"===e.type?(delete e.type,l.push(e)):(delete e.type,o.push(e))})),(0,g.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.containers"),l),(0,g.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.initContainers"),o)},t.checkVolumeNameExist=function(e){var a=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.volumes"),[]),r=(0,v.default)(t.fedFormTemplate,"spec.volumeClaimTemplates",[]);return a.some((function(t){return t.name===e}))||r.some((function(t){return t.name===e}))},t.state={state:"",selectVolume:{},collectSavedLog:(0,v.default)(t.fedFormTemplate,t.collectSavedLogPath)};var n=(0,k.isEdgeWizePage)();return t.store=n?new I.default:new T.default,t.projectStore=n?new P.default:new w.default,e.isFederated&&(t.projectStore=n?new M.default({module:t.projectStore.module}):new R.default({module:t.projectStore.module}),t.store=n?new M.default({module:t.store.module}):new R.default({module:t.store.module})),t.store.fetchList({namespace:t.namespace,cluster:t.cluster,limit:-1}),t.handleVolume=t.handleVolume.bind((0,f.default)(t)),t.handleVolumeTemplate=t.handleVolumeTemplate.bind((0,f.default)(t)),t.handleLogToggle=t.handleLogToggle.bind((0,f.default)(t)),t}return(0,s.default)(r,[{key:"componentDidMount",value:function(){this.namespace&&this.projectStore.fetchDetail({name:this.namespace,namespace:this.namespace,cluster:this.cluster})}},{key:"handleVolume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0;e.uid||t.forEach((function(t){t.name=e.name})),this.updateVolumes(e),this.updateVolumeMounts(t,a),this.updateLogConfigs(t),this.resetState()}},{key:"handleVolumeTemplate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.forEach((function(t){t.name=e.name||(0,v.default)(e,"metadata.name")})),this.updateVolumeTemplate(e),this.updateVolumeTemplateMounts(t),this.updateLogConfigs(t),this.resetState()}},{key:"renderVolume",value:function(){var e=this.state.collectSavedLog,t=(0,O.toJS)(this.store.list.data),a=this.store.list.isLoading,r=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.containers"),[]),n=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.initContainers"),[]),l=(0,h.default)(r,n);return _.default.createElement(j.default,{volumes:t,volume:this.selectVolume,namespace:this.namespace,module:this.props.module,containers:l,onSave:this.handleVolume,onCancel:this.resetState,isLoading:a,checkVolumeNameExist:this.checkVolumeNameExist,collectSavedLog:e})}},{key:"renderConfig",value:function(){var e=this.props,t=e.isFederated,a=e.projectDetail,r=e.isEdgeWize,n=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.containers"),[]),l=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.initContainers"),[]),u=(0,h.default)(n,l);return _.default.createElement(L.default,{isEdgeWize:r,volume:this.selectVolume,containers:u,cluster:this.cluster,namespace:this.namespace,onSave:this.handleVolume,onCancel:this.resetState,isFederated:t,projectDetail:a,checkVolumeNameExist:this.checkVolumeNameExist})}},{key:"renderVolumeTemplate",value:function(){var e=this.props,t=e.cluster,a=e.isEdgeWize,r=this.state.collectSavedLog,n=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.containers"),[]),l=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.initContainers"),[]),u=(0,h.default)(n,l),o=(0,v.default)(this.formTemplate,"metadata.namespace","");return _.default.createElement(U.default,{isEdgeWize:a,volume:this.selectVolume,containers:u,cluster:t,namespace:o,onSave:this.handleVolumeTemplate,onCancel:this.resetState,checkVolumeNameExist:this.checkVolumeNameExist,collectSavedLog:r})}},{key:"handleLogToggle",value:function(){var e=this;this.setState((function(e){return{collectSavedLog:"true"===e.collectSavedLog?"false":"true"}}),(function(){(0,g.default)(e.fedFormTemplate,e.collectSavedLogPath,e.state.collectSavedLog),"false"===e.state.collectSavedLog&&(0,y.default)(e.fedFormTemplate,e.logPathPrefix)}))}},{key:"renderToolTipContent",value:function(){return _.default.createElement("div",null,_.default.createElement("p",null,t("COLLECT_LOGS_ON_VOLUMES_DESC")))}},{key:"renderToggle",value:function(e){var t=this.state.collectSavedLog;return _.default.createElement("span",null,_.default.createElement(C.Toggle,{disabled:e,checked:"true"===t,onChange:this.handleLogToggle}))}},{key:"renderTitle",value:function(){return _.default.createElement("div",{className:"font-bold margin-b8 relative"},_.default.createElement("span",null,t("STORAGE_SETTINGS")),globals.app.hasClusterExtensionModule(this.cluster,"whizard-logging")&&_.default.createElement("div",{className:z.default.toggle},this.projectEnableCollectingFileLog?this.renderToggle():_.default.createElement(C.Tooltip,{content:t.html("PROJECT_COLLECT_SAVED_DISABLED_DESC")},this.renderToggle(!0)),_.default.createElement("span",{className:"text-secondary align-middle"}," ",t("COLLECT_LOGS_ON_VOLUMES")," "),_.default.createElement(C.Tooltip,{content:this.renderToolTipContent()},_.default.createElement(C.Icon,{name:"question"}))))}},{key:"renderList",value:function(){var e=this.props,a=e.formRef,r=e.formProps,n=void 0===r?{}:r,u=e.module,o=e.hideVolumeSetting,i=void 0!==o&&o,c=this.state.collectSavedLog,s=(0,O.toJS)(this.store.list.data),f=this.store.list.isLoading,d=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.containers"),[]),p=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.initContainers"),[]),m=(0,h.default)(d,p),g=0===(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.volumes"),[]).length&&0===(0,v.default)(this.fedFormTemplate,"spec.volumeClaimTemplates",[]).length,y=(0,k.safeParseJSON)((0,v.default)(this.fedFormTemplate,this.logPathPrefix,[])),E="statefulsets"===u;return _.default.createElement(C.Form,(0,l.default)({data:this.fedFormTemplate,ref:a},n),this.renderTitle(),"true"===c&&g&&_.default.createElement(C.Alert,{className:"margin-b12",icon:"information",type:"warning",message:t(E?"PVC_OR_TEMPLATE_EMPTY":"PVC_EMPTY")}),_.default.createElement("div",{className:z.default.volumes},E&&_.default.createElement(C.Form.Item,null,_.default.createElement(x.default,{prefix:this.prefix,name:"spec.volumeClaimTemplates",containers:m,onShowAddVolume:this.showVolumeTemplate,onShowEdit:this.showEditVolumeTemplate,collectSavedLog:c,logPath:y,hideVolumeSetting:i})),_.default.createElement(C.Form.Item,null,_.default.createElement(A.default,{prefix:this.prefix,name:"".concat(this.prefix,"spec.volumes"),volumes:s,containers:m,loading:f,onShowVolume:this.showVolume,onShowConfig:this.showConfig,onShowEdit:this.showEditVolume,collectSavedLog:c,logPath:y}))))}},{key:"render",value:function(){var e=null;switch(this.state.state){case"ShowVolume":e=this.renderVolume();break;case"ShowConfig":e=this.renderConfig();break;case"ShowVolumeTemplate":e=this.renderVolumeTemplate();break;default:e=this.renderList()}return e}},{key:"prefix",get:function(){return this.props.prefix||"spec.template."}},{key:"cluster",get:function(){return this.props.cluster}},{key:"namespace",get:function(){return this.props.namespace||(0,v.default)(this.formTemplate,"metadata.namespace","")}},{key:"collectSavedLogPath",get:function(){return"".concat(this.prefix,'metadata.annotations["kubesphere.io/collectSavedLog"]')}},{key:"logPathPrefix",get:function(){return"".concat(this.prefix,'metadata.annotations["logging.kubesphere.io/logsidecar-config"]')}},{key:"projectEnableCollectingFileLog",get:function(){return"enabled"===(0,v.default)(this.projectStore.detail,'labels["logging.kubesphere.io/logsidecar-injection"]')}},{key:"formTemplate",get:function(){var e=this.props,t=e.formTemplate,a=e.module;return(0,v.default)(t,D.MODULE_KIND_MAP[a],t)}},{key:"fedFormTemplate",get:function(){return this.props.isFederated?(0,v.default)(this.formTemplate,"spec.template"):this.formTemplate}},{key:"selectVolume",get:function(){return G({},this.state.selectVolume)}}]),r}(_.default.Component),Y=B;a.Component=Y;var W=(0,S.observer)(B);a.default=W},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u1&&void 0!==arguments[1]&&arguments[1],a=e.multi_branch_pipeline,r=e.pipeline,n=(e.type,(0,i.default)(e,["multi_branch_pipeline","pipeline","type"]));t&&!n.description&&(n.description="");var l=(0,s.default)(n);if(l.metadata&&delete l.metadata,a&&(t?Object.assign(e.multi_branch_pipeline,l):n&&Object.assign(e.multi_branch_pipeline,n),e.type="multi-branch-pipeline",v(e.multi_branch_pipeline)),r&&(t?Object.assign(e.pipeline,l):Object.assign(e.pipeline,n),e.type="pipeline",v(e.pipeline)),!t)for(var u in n)"devopsName"!==u&&delete e[u]};a.resetPipelineMultiBranch=function(e){e.multi_branch_pipeline&&e.__multi_branch_pipeline&&(e.multi_branch_pipeline=(0,d.default)(e.__multi_branch_pipeline,e.multi_branch_pipeline)),delete e.__multi_branch_pipeline};a.updatePipelineParamsInSpec=function(e,t){e.multi_branch_pipeline&&(delete(e=(0,p.default)(e,"metadata.name",e.multi_branch_pipeline.name)).multi_branch_pipeline.metadata,e.spec={multi_branch_pipeline:h({},e.multi_branch_pipeline),type:e.type},delete e.multi_branch_pipeline),e.pipeline&&(delete(e=(0,p.default)(e,"metadata.name",e.pipeline.name)).pipeline.metadata,e.spec={pipeline:h({},e.pipeline),type:e.type},delete e.pipeline),delete e.type,delete e.description,e=(0,p.default)(e,"metadata.namespace",t)};a.groovyToJS=function(e){for(var t,a=/([\w-]*) ?: '?([\w-:/_.]*)'?/g,r={};null!==(t=a.exec(e));)t[1]&&(r[t[1]]=t[2]);return r};a.getLanguageIcon=function(e,t){return["java","gradle","javascript","php","python","golang","nodejs","jar","war","binary"].includes(e)?e:t};a.getRepoUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.provider,a=e.owner,r=e.repo,n=e.server,l=e.url,u=e.api_uri;if(l)return l;switch(t){case"github":return"https://github.com/".concat(a,"/").concat(r);case"gitlab":return"".concat(n,"/").concat(a,"/").concat(r);case"bitbucket_server":var o=u,i="/"===o.substr(o.length-1)?o:"".concat(o,"/");return/https:\/\/bitbucket.org\/?/gm.test(i)||(i+="scm/"),"".concat(i).concat(a,"/").concat(r);default:return""}};a.getCommonSource=function(e){var t=e.provider,a=e.owner,r=e.repo,n=e.url,l=e.secret,u=e.server;return"git"===t?{url:n,discover_branches:!0,credential_id:null==l?void 0:l.name}:{owner:a,repo:r,server_name:u,url:n,credential_id:null==l?void 0:l.name,discover_branches:1,discover_pr_from_forks:{strategy:2,trust:2},discover_pr_from_origin:2,discover_tags:!0}};a.checkRepoSource=function(e){var a=e.source_type,r=(0,i.default)(e,["source_type"]),n=(0,f.default)(r,"".concat(a,"_source"),{}),l=n.owner,u=n.repo,o=n.server_name,s=n.url,d=n.remote,p=l&&u;switch(a){case"svn":case"single_svn":p=!!d;break;case"git":p=!!s;break;case"gitlab":p=p&&o}if(!p)throw c.default.error(t("NOT_VALID_REPO")),Error(t("NOT_VALID_REPO"))};a.isSvnRepo=function(e){return["svn","single_svn"].includes(e)};var g=function(e){var t=e.match(/(.+)(>|>=|==|!=)(.+)/),a=(0,u.default)(t,4),r=a[1],n=a[2],l=a[3];return{key:r.replace(".param.",""),operator:n,value:l}},y=function(e,t){var a=(0,f.default)(t,e.key);switch(e.operator){case"==":return a===e.value;case">=":return a>=e.value;case"<=":return a<=e.value;case"!=":return a!==e.value;default:return!1}},E="argocd"===globals.config.gitopsEngine;a.isArgo=E;a.parseCondition=function(e,t){try{var a=e.match(/(.+?)(&&|\|\|)/g);if(!a)return y(g(e),t);var r=[].concat((0,l.default)(a.map((function(e){return e.slice(0,-2)}))),[e.slice(a.reduce((function(e,t){return e+t.length}),0))]).map(g);return a.map((function(e){return e.slice(-2)})).reduce((function(e,a,n){var l=0===n?y(r[0],t):e,u=y(r[n+1],t);switch(a){case"&&":return l&&u;case"||":return l||u;default:return!1}}),!1)}catch(e){return!1}}},function(e,t,a){"use strict";a(15),a(12),a(109),a(5),a(11),a(84),a(16),Object.defineProperty(t,"__esModule",{value:!0}),t.getRegisterFormTemplate=t.getEdgeSofts=t.getContainerEngineSofts=t.getNodeSpecification=t.getAccessNodeDisplayName=t.getSoftStatus=t.getSoftIconName=void 0,a(12),a(109),a(5),a(11),a(84),a(16),a(4);var r=["docker","containerd","nvidia-docker2"];t.getSoftIconName=function(e){switch(e){case"edgecore":return"iot-duotone";case"nvidia-docker2":return"docker";case"containerd":return"container";default:return e}};t.getSoftStatus=function(e){switch(e){case"installed":return{name:"success",color:{primary:"#ffffff",secondary:"#55bc8a"}};default:return{name:"information",color:{primary:"#ffffff"}}}};t.getAccessNodeDisplayName=function(e){var t=e.name,a=e.alias;return a?"".concat(a," (").concat(t,")"):t};t.getNodeSpecification=function(e){var t=e.cpu,a=e.mem,r=e.disk;return"".concat(t,"核 CPU | ").concat(a,"M 内存 | ").concat(r,"GB 磁盘")};t.getContainerEngineSofts=function(e){return e.filter((function(e){var t=e.name;return r.includes(t)}))};t.getEdgeSofts=function(e){return e.filter((function(e){var t=e.name;return!r.includes(t)}))};t.getRegisterFormTemplate=function(e,t){if(!t)return{clusterName:e,edgeNodeName:"",edgeNodeAlias:"",edgeIpList:[],arch:"",userName:"",password:"",description:""};var a=t.name,r=t.alias,n=t.description;return{clusterName:e,edgeNodeName:a,edgeNodeAlias:r,edgeIpList:[t.nodeIP],arch:t.arch,userName:"",password:"",description:n}}},,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(31),r(18),r(98),r(9),r(10),r(4),r(23),r(24),r(17),r(62),r(818),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(65)),u=n(r(36)),o=n(r(37)),i=n(r(88)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(49));n(r(66));r(45),r(5),r(31),r(18),r(28),r(442),r(42),r(98),r(9),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(818);var p,m,h,v,g,y,E,b,_,O,S,C,D,k,N=n(r(96)),T=n(r(0)),R=n(r(1)),w=n(r(3)),I=r(14),M=r(239),P=n(r(26)),A=r(186),j=n(r(1165)),L=n(r(1166)),x=r(950),U=n(r(3450));function z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var F=function(e){var t=e.match(/(\d+)(\w+)/),a=(0,N.default)(t,3),r=a[1],n=void 0===r?0:r,l=a[2];return n*{s:1,m:60,h:3600,d:86400}[void 0===l?"s":l]},G=(0,M.observer)((k=D=function(e){(0,c.default)(r,e);var a=z(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),o=0;o0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=(0,f.default)(a);return t.forEach((function(t,a){var n=(0,O.default)(t,"metric.__name__"),l=null;if(n){var u=(0,O.default)(t,"metric.quantile"),o=(0,O.default)(t,"metric.verb"),i=(0,O.default)(t,"metric.result"),c=r.find((function(e){return u?(0,O.default)(e,"metric.quantile")===u:o?(0,O.default)(e,"metric.verb")===o:i?(0,O.default)(e,"metric.result")===i:(0,O.default)(e,"metric.__name__")===n}));(0,_.default)(c)?r.push(t):l=c}else l=r[a];if(!(0,_.default)(l)){var s=e.getNewValues(l.values,t.value);(0,S.default)(l,"values",s)}})),r},e}return(0,m.default)(n,[{key:"fetchHealthMetrics",value:(a=(0,s.default)(u.default.mark((function e(){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.health.isLoading=!0,e.next=3,this.requestHealthMetrics();case 3:this.health.isLoading=!1;case 4:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"requestHealthMetrics",value:(t=(0,s.default)(u.default.mark((function e(){var t,a,r,n,o,i,c,s,f;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.cluster&&globals.app.isMultiCluster?"kapis/clusters/".concat(this.cluster,"/resources.kubesphere.io/v1alpha2/componenthealth"):"kapis/resources.kubesphere.io/v1alpha2/componenthealth",e.next=3,(0,D.to)(request.get(t));case 3:a=e.sent,r=a.kubesphereStatus||[],n=(0,C.default)(r,"namespace"),o=r.some((function(e){return"kube-scheduler"===(0,O.default)(e,"label.component")&&(0,O.default)(e,"healthyBackends",0)})),i=r.some((function(e){return"kube-controller-manager"===(0,O.default)(e,"label.component")&&(0,O.default)(e,"healthyBackends",0)})),c={kubernetes:(0,O.default)(a,"kubernetesStatus",[]),node:(0,O.default)(a,"nodeStatus",{}),kubesphere:(0,O.default)(n,"kubesphere-system",[]),openpitrix:(0,O.default)(n,"openpitrix-system",[]),istio:(0,O.default)(n,"istio-system",[]),monitoring:(0,O.default)(n,"kubesphere-monitoring-system",[]),logging:(0,O.default)(n,"kubesphere-logging-system",[]),devops:(0,O.default)(n,"kubesphere-devops-system",[]),kubeSystem:(0,O.default)(n,"kube-system",[])},s={},f={},Object.entries(c).forEach((function(e){var t=(0,l.default)(e,2),a=t[0],r=t[1],n={total:0,health:0},u={total:0,health:0};"node"===a?(n.total=(0,O.default)(r,"totalNodes",0),n.health=(0,O.default)(r,"healthyNodes",0)):"kubernetes"===a?(n.total=r.length,n.health=r.filter((function(e){return"Healthy"===(0,k.getComponentStatus)(e)})).length):r.forEach((function(e){n.total+=e.totalBackends,n.health+=e.healthyBackends;var t=(0,k.getComponentStatus)(e);u.health+="Healthy"===t?1:0,u.total+="Stopped"===t?0:1})),s[a]=n,f[a]=u})),this.health=T(T({},this.health||{}),{data:c,counts:s,componentCounts:f,supportKsScheduler:o,supportControllerManager:i});case 13:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),n}(r(a(845)).default),i=(0,E.default)(o.prototype,"health",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:{},counts:{},supportKsScheduler:!1,supportControllerManager:!1,isLoading:!1}}}),c=(0,E.default)(o.prototype,"etcd",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),(0,E.default)(o.prototype,"fetchHealthMetrics",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchHealthMetrics"),o.prototype),(0,E.default)(o.prototype,"requestHealthMetrics",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"requestHealthMetrics"),o.prototype),o);t.default=w},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(73),a(320),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(73),a(28),a(320),a(42),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o,i,c=r(a(44)),s=r(a(65)),f=r(a(36)),d=r(a(37)),p=r(a(88)),m=r(a(55)),h=r(a(56)),v=r(a(51)),g=r(a(49)),y=(r(a(66)),a(14)),E=r(a(63)),b=a(52);function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;t0&&Array.prototype.forEach.call(this.iframeMedias,(function(t){t.removeEventListener("load",e.updateIFrame),t.addEventListener("load",e.updateIFrame)}))}},{key:"removeMediaListeners",value:function(){var e=this;this.iframeMedias&&this.iframeMedias.length>0&&Array.prototype.forEach.call(this.iframeMedias,(function(t){t.removeEventListener("load",e.updateIFrame)}))}},{key:"updateMarkdown",value:function(){var e=this.iframe.contentDocument;this.iframeLoaded&&(e.body.innerHTML=this.md.render(this.props.source),this.iframe.style.height="".concat(e.body.scrollHeight+16,"px")),this.removeMediaListeners(),this.addMediaListeners()}},{key:"render",value:function(){var e=this.props.className;return s.default.createElement("div",null,this.state.loading&&s.default.createElement(m.Loading,{className:"loading"}),s.default.createElement("iframe",{className:(0,d.default)(h.default.markdown,e),ref:this.handleIFrameRef,src:"/blank_md",name:"frame_markdown",width:"100%",frameBorder:"0",scrolling:"no"}))}}]),a}(s.default.Component);y.propTypes={source:f.default.string,options:f.default.object},y.defaultProps={source:"",options:{}};var E=y;t.default=E},,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(16),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l=r(a(44)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=a(72);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var p=function(e){(0,i.default)(a,e);var t=d(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/nodes").concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=function(t){var a=t.cluster;return"/kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath({cluster:a}),"/nodes")},e.createEdgeNode=function(){var t=(0,l.default)(n.default.mark((function t(a){var r,l,u,o,i,c,s,f,d,p;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,l=a.name,u=a.ip,o=a.defaultTaint,i=a.runtime,c=a.imageRepository,s=a.nodegroup,f="/kapis/infra.edgewize.io/v1alpha1".concat(e.getPath({cluster:r}),"/nodes/join"),d={node_name:l,node_ip:u,add_default_taint:o,runtime:i,"image-repository":c},s&&(d.node_group=s),t.next=6,request.get(f,d,{},(function(e){return e}));case 6:return p=t.sent,t.abrupt("return",p);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return(0,o.default)(a,[{key:"apiVersion",get:function(){return f.API_VERSIONS.nodes||""}}]),a}(r(a(856)).default);t.default=p},,,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(61)),u=r(a(30)),o=r(a(58));a(41);var i,c,s=r(a(44)),f=r(a(65)),d=r(a(36)),p=r(a(37)),m=r(a(88)),h=r(a(55)),v=r(a(56)),g=r(a(51)),y=r(a(49)),E=(r(a(66)),r(a(26))),b=r(a(74)),_=a(14),O=a(72);function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getDetailUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getListUrl(t),"/").concat(t.name)},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module)},e}return(0,p.default)(i,[{key:"getPath",value:function(e){var t=e.user,a="";return t&&(a+="/users/".concat(t)),a}},{key:"fetchList",value:(r=(0,s.default)(n.default.mark((function e(){var t,a,r,u,i,c,s=this,f=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=f.length>0&&void 0!==f[0]?f[0]:{},a=t.more,r=t.user,u=(0,o.default)(t,["more","user"]),this.list.isLoading=!0,u.sortBy||void 0!==u.ascending||(u.sortBy=O.LIST_DEFAULT_ORDER[this.module]||"createTime"),u.limit!==1/0&&-1!==u.limit||(u.limit=-1,u.page=1),u.limit=u.limit||10,e.next=7,request.get(this.getResourceUrl({user:r}),this.getFilterParams(u),null,(function(){return{}}));case 7:return i=e.sent,c=((0,E.default)(i,"items")||[]).map((function(e){return C({},s.mapper(e))})),this.list.update(C(C({data:a?[].concat((0,l.default)(this.list.data),(0,l.default)(c)):c,total:i.totalItems||i.total_count||i.total||c.length||0},u),{},{limit:Number(u.limit)||10,page:Number(u.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",c);case 11:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getResource",value:(a=(0,s.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get(this.getDetailUrl(t),{},null,(function(){return{}}));case 2:return a=e.sent,r=(0,E.default)(a,"metadata.resourceVersion"),this.resourceVersion=r||"",e.abrupt("return",void 0!==r);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"update",value:(t=(0,s.default)(n.default.mark((function e(t,a){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getResource(t);case 2:return(0,b.default)(a,"metadata.resourceVersion",this.resourceVersion),e.abrupt("return",this.submitting(request.put(this.getDetailUrl(t),a)));case 4:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"kapis/notification.kubesphere.io/v2beta2"}}]),i}(r(a(68)).default),c=(0,y.default)(i.prototype,"resourceVersion",[_.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),(0,y.default)(i.prototype,"fetchList",[_.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,y.default)(i.prototype,"getResource",[_.action],Object.getOwnPropertyDescriptor(i.prototype,"getResource"),i.prototype),(0,y.default)(i.prototype,"update",[_.action],Object.getOwnPropertyDescriptor(i.prototype,"update"),i.prototype),i);t.default=k},,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(31),a(6),a(29),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(22),a(23),a(17),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(31),a(6),a(29),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(38),a(7),a(32);var n=r(a(61)),l=r(a(58)),u=r(a(43));a(41);var o,i,c,s,f=r(a(44)),d=r(a(30)),p=r(a(65)),m=r(a(36)),h=r(a(37)),v=r(a(88)),g=r(a(55)),y=r(a(56)),E=r(a(51)),b=r(a(49)),_=(r(a(66)),r(a(26))),O=r(a(74)),S=a(14);function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.getRulePath(t)).concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=e.getListUrl,(0,p.default)(e,"ruleCount",i,(0,v.default)(e)),(0,p.default)(e,"builtinRuleCount",c,(0,v.default)(e)),(0,p.default)(e,"targetsMetadata",s,(0,v.default)(e)),e.getParamsType=function(e){var t={};return e.namespace||e.cluster&&("builtin"===e.type?t.builtin=!0:t.builtin=!1),t},e.getFilterParams=function(e){var t=D({},e);return t.enable&&(t.labelSelector="alerting.kubesphere.io/enable=".concat(t.enable),delete t.enable),t},e.fetchMetric=function(){var e=(0,f.default)(u.default.mark((function e(t){var a,r,n,l,o,i,c;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.expr,r=t.step,n=t.start,l=t.end,o=t.cluster,i=t.namespace,a){e.next=3;break}return e.abrupt("return",[]);case 3:return e.next=5,request.get("kapis/monitoring.kubesphere.io/v1beta1/targets/query",{cluster:o,namespace:i,expr:a,step:r,start:n,end:l},null,(function(){}));case 5:return c=e.sent,e.abrupt("return",(0,_.default)(c,"data.result",[]));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}return(0,h.default)(y,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r="";return t&&(r+="/clusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"fetchList",value:(o=(0,f.default)(u.default.mark((function e(){var t,a,r,o,i,c,s,f,d,p=this,m=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},a=t.cluster,t.workspace,r=t.namespace,o=t.more,i=t.type,c=(0,l.default)(t,["cluster","workspace","namespace","more","type"]),this.list.isLoading=!0,c.sortBy||void 0!==c.ascending||(c.sortBy="createTime"),c.limit!==1/0&&-1!==c.limit||(c.limit=-1,c.page=1),c.limit=c.limit||10,"builtin"===i&&(c.builtin=!0),e.next=8,request.get(this.getResourceUrl({cluster:a,namespace:r,type:i}),D(D({},this.getFilterParams(c)),this.getParamsType({namespace:r,cluster:a,type:i})));case 8:return s=e.sent,f=((0,_.default)(s,"items")||[]).map((function(e){return D({cluster:a,namespace:r},p.mapper(e))})),d=s.totalItems,this.list.update(D(D({data:o?[].concat((0,n.default)(this.list.data),(0,n.default)(f)):f,total:d},c),{},{limit:Number(c.limit)||10,page:Number(c.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",f);case 13:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"fetchCount",value:(r=(0,f.default)(u.default.mark((function e(t){var a,r,n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,e.next=3,Promise.all([request.get(this.getResourceUrl({cluster:a,namespace:r}),{page:1,limit:1,builtin:!1}),request.get(this.getResourceUrl({cluster:a,namespace:r,type:"builtin"}),{page:1,limit:1,builtin:!0})]);case 3:n=e.sent,this.ruleCount=(0,_.default)(n,"0.totalItems",0),this.builtinRuleCount=(0,_.default)(n,"1.totalItems",0);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"fetchMetadata",value:(a=(0,f.default)(u.default.mark((function e(t){var a,r,n,l;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,e.next=3,request.get("kapis/monitoring.kubesphere.io/v1beta1/targets/metadata",{cluster:a,namespace:r});case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={data:[]};case 6:n=e.t0,l=n.data,this.targetsMetadata=l||[];case 9:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"create",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.submitting(request.post(this.getListUrl(D(D({},t),{},{k8sOpt:!0})),e))}},{key:"update",value:(t=(0,f.default)(u.default.mark((function e(t,a){var r,n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get(this.getDetailUrl(D(D({},t),{},{k8sOpt:!0})));case 2:return r=e.sent,(n=(0,_.default)(r,"metadata.resourceVersion"))&&(0,O.default)(a,"metadata.resourceVersion",n),e.abrupt("return",this.submitting(request.put(this.getDetailUrl(D(D({},t),{},{k8sOpt:!0})),a)));case 6:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})},{key:"patch",value:function(e,t){return this.submitting(request.patch(this.getDetailUrl(D(D({},e),{},{k8sOpt:!0})),t))}},{key:"batchPatch",value:function(e,t,a){var r=this;return this.submitting(Promise.all(e.map((function(e){return request.patch(r.getDetailUrl(D(D({},t),{},{name:e,k8sOpt:!0})),a)}))))}},{key:"delete",value:function(e){return this.submitting(request.delete(this.getDetailUrl(D(D({},e),{},{k8sOpt:!0}))))}},{key:"batchDelete",value:function(e){var t=this;return this.submitting(Promise.all(e.map((function(e){var a=t.list.data.find((function(t){return t.name===e}));return request.delete(t.getDetailUrl(D(D({},a),{},{k8sOpt:!0})))}))))}},{key:"checkName",value:function(e,t){return request.get(this.getDetailUrl(D(D({},e),{},{k8sOpt:!0})),D({},t),{headers:{"x-check-exist":!0}})}},{key:"yamlApiVersion",get:function(){return"alerting.kubesphere.io/v2beta1"}},{key:"apiVersion",get:function(){return"proxy-api/proxy/alerting.kubesphere.io/v2beta1/"}}]),y}(r(a(68)).default),i=(0,b.default)(o.prototype,"ruleCount",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),c=(0,b.default)(o.prototype,"builtinRuleCount",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),s=(0,b.default)(o.prototype,"targetsMetadata",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,b.default)(o.prototype,"fetchList",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchList"),o.prototype),(0,b.default)(o.prototype,"fetchCount",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchCount"),o.prototype),(0,b.default)(o.prototype,"fetchMetadata",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchMetadata"),o.prototype),(0,b.default)(o.prototype,"create",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"create"),o.prototype),(0,b.default)(o.prototype,"update",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"update"),o.prototype),(0,b.default)(o.prototype,"patch",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"patch"),o.prototype),(0,b.default)(o.prototype,"batchPatch",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"batchPatch"),o.prototype),(0,b.default)(o.prototype,"delete",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"delete"),o.prototype),(0,b.default)(o.prototype,"batchDelete",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"batchDelete"),o.prototype),(0,b.default)(o.prototype,"checkName",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"checkName"),o.prototype),o);t.default=N},function(e,t,a){"use strict";a(15);var r=a(20);a(5),Object.defineProperty(t,"__esModule",{value:!0}),t.getManifestApi=function(e){var t=e.workspace,a=e.namespace,r=e.cluster,n=e.cluster_id,l="/kapis/application.kubesphere.io/v2";t&&(l+="/workspaces/".concat(t));globals.app.isMultiCluster&&r&&(l+="/clusters/".concat(r));a&&(l+="/namespaces/".concat(a));l+="/manifests",n&&(l+="/".concat(n));return l},t.getDmpSecrets=function(e){var t=e.namespace,a=e.cluster_id,r="/api/v1";t&&(r+="/namespaces/".concat(t));r+="/secrets",a&&(r+="/".concat(a));return r},t.getStatusFromYaml=function(e){var t=(0,n.default)(e,"status.conditions[0]");if(t)return"".concat(t.status,"-").concat(t.type);return""},a(5);var n=r(a(26))},function(e,t,a){e.exports={sider:"_3y7-mTgYjs2dHEX56ZcZlC",sheet:"_1VTQEGDBWPuUTtcgiyEAOC",title:"vlfMOA3JURdw5nk7WeIqH",delete:"_1kpyCW22GDVJh1I5gLyodh",edit:"_17i-NSdS-P7GUZCw1-YPnt",describtion:"_1ZLAf7WvHoqwp-0F-8tdTc",form:"_1LP-CIeypBa9wbadIjZn8d",name_input:"_1JAZWUE9yJWoVQUSCQPHM7",form_lable:"_5Q1qFPpM3eL-rJAdDuEs-",footer:"_3bSiW6kTLb3kTBF6VFFXXK",clickable:"_23bCX01Ss7OCfh3hJlUDtX",pipelineCard__item__drag:"_2c5vlHp7UGoWb30NL5EO4d",conditionList:"_3v2nj92lVAeDDd8IDTPLPt"}},,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(31),a(6),a(29),a(18),a(87),a(97),a(320),a(16),a(326),a(27),a(1782),a(190),a(10),a(4),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.COORD_COUNT=t.renderIntoCanvas=t.createViewedBoundsFunc=t.formatDuration=t.formatRelativeDate=t.isErrorSpan=t.isServerSpan=t.isClientSpan=t.spanHasTag=t.transformTraces=t.transformTraceItem=void 0,a(250),a(45),a(5),a(11),a(31),a(6),a(160),a(29),a(18),a(28),a(87),a(245),a(97),a(320),a(42),a(448),a(16),a(326),a(1782),a(190),a(10),a(4),a(38),a(7),a(32);var n=r(a(36)),l=r(a(37)),u=r(a(446)),o=r(a(243)),i=a(72),c=function(){function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,n.default)(this,e),this.value=t,this.children=a}return(0,l.default)(e,null,[{key:"iterFunction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(a){return e(a.value,a,t)}}},{key:"searchFunction",value:function(t){return"function"==typeof t?t:function(a,r){return t instanceof e?r===t:a===t}}}]),(0,l.default)(e,[{key:"addChild",value:function(t){return this.children.push(t instanceof e?t:new e(t)),this}},{key:"find",value:function(t){if(e.iterFunction(e.searchFunction(t))(this))return this;for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:0,a=[],r=t;for(a.push({node:this,depth:r});a.length;){var n=a.pop(),l=n.node,u=n.depth;e(l.value,l,u),r=u+1;for(var o=l.children.length-1;o>=0;)a.push({node:l.children[o],depth:r}),o--}}},{key:"depth",get:function(){return this.children.reduce((function(e,t){return Math.max(t.depth+1,e)}),1)}},{key:"size",get:function(){var e=0;return this.walk((function(){return e++})),e}}]),e}(),s=function(e){var t=e.traceID;if(!t)return null;t=t.toLowerCase();var a=0,r=Number.MAX_SAFE_INTEGER,n=new Map,l=new Map;e.spans=e.spans.filter((function(e){return Boolean(e.startTime)}));for(var u=e.spans.length,o=0;oa&&(a=s+f);var m=n.get(p);null!=m?(n.set(p,m+1),p="".concat(p,"_").concat(m),i.spanID=p):n.set(p,1),i.process=e.processes[d],l.set(p,i)}var h=function(e){var t=new Map(e.spans.map((function(e){return[e.spanID,new c(e.spanID)]}))),a=new Map(e.spans.map((function(e){return[e.spanID,e]}))),r=new c("__root__");e.spans.forEach((function(e){var a=t.get(e.spanID);if(Array.isArray(e.references)&&e.references.length){var n=e.references[0],l=n.refType,u=n.spanID;if("CHILD_OF"!==l&&"FOLLOWS_FROM"!==l)throw new Error("Unrecognized ref type: ".concat(l));(t.get(u)||r).children.push(a)}else r.children.push(a)}));var n=function(e,t){var r=a.get(e.value),n=a.get(t.value);return+(r.startTime>n.startTime)||+(r.startTime===n.startTime)-1};return e.spans.forEach((function(e){var a=t.get(e.spanID);a.children.length>1&&a.children.sort(n)})),r.children.sort(n),r}(e),v=[],g={},y="";return h.walk((function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if("__root__"!==e){var n=l.get(e);if(n){var u=n.process.serviceName;g[u]=(g[u]||0)+1,n.references&&n.references.length||(y="".concat(u,": ").concat(n.operationName)),n.relativeStartTime=n.startTime-r,n.depth=a-1,n.hasChildren=t.children.length>0,n.references.forEach((function(e){var t=l.get(e.spanID);t&&(e.span=t)})),v.push(n)}}})),{services:Object.keys(g).map((function(e){return{name:e,numberOfSpans:g[e]}})),spans:v,traceID:t,traceName:y,processes:e.processes,duration:a-r,startTime:r,endTime:a}};t.transformTraceItem=s;t.transformTraces=function(e){var t=e.map(s),a=0,r=0,n={};return t.forEach((function(e){e.duration&&(a=Math.max(a,e.duration)),e.services.forEach((function(e){n[e.name]||(n[e.name]=i.TRACING_COLORS_HEX[r++])}))})),t.forEach((function(e){a&&(e.durationPercent=100*e.duration/a),e.serviceColorMap=n})),(0,u.default)(t,"startTime").reverse()};var f=function(e,t,a){return!(!Array.isArray(a.tags)||!a.tags.length)&&a.tags.some((function(a){return a.key===e&&a.value===t}))};t.spanHasTag=f;var d=f.bind(null,"span.kind","client");t.isClientSpan=d;var p=f.bind(null,"span.kind","server");t.isServerSpan=p;var m=f.bind(null,"error",!0),h=f.bind(null,"error","true");t.isErrorSpan=function(e){return m(e)||h(e)};t.formatRelativeDate=function(e,t){var a=o.default.isMoment(e)?e:(0,o.default)(e),r=t?"MMMM":"MMM",n=new Date;if(n.getFullYear()!==a.year())return a.format("".concat(r," D, YYYY"));var l=a.month(),u=a.date(),i=n.getDate();return l===n.getMonth()&&u===i?"Today":(n.setDate(i-1),l===n.getMonth()&&u===n.getDate()?"Yesterday":a.format("".concat(r," D")))};t.formatDuration=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"microseconds",a=e;"microseconds"===t&&(a=e/1e3);var r="ms";return a>=1e3&&(r="s",a/=1e3),a.toFixed(2)+r};t.createViewedBoundsFunc=function(e){var t=e.min,a=e.max,r=e.viewStart,n=e.viewEnd,l=a-t,u=t+r*l,o=a-(1-n)*l-u;return function(e,t){return{start:(e-u)/o,end:(t-u)/o}}};t.renderIntoCanvas=function(e,t,a,r){var n=new Map,l=(t.length<60?60:Math.min(t.length,200))-1,u=2*window.innerWidth;e.width=u,e.height=l;var o=Math.min(Math.max(2,(l-(1*t.length-1))/t.length),4),i=l/t.length,c=e.getContext("2d",{alpha:!1});c.fillStyle="#fff",c.fillRect(0,0,u,l);for(var s=0;s=.8&&(u="warning"),t>=.95&&(u="danger");var o={left:"".concat(t>.35?t/2*100:100*(t+.01),"%"),transform:t>.35?"translateX(-50%)":"",color:t>.35?"#fff":"#79879c"};return c.default.createElement("div",{className:(0,f.default)(d.default.wrapper,a)},c.default.createElement("div",{className:(0,f.default)(d.default.bar,d.default[u]),style:l}),r&&!!t&&c.default.createElement("span",{className:d.default.text,style:o},r),n&&c.default.createElement("span",{className:d.default.rightText},n))}}]),a}(c.default.Component);t.default=m,m.propTypes={value:s.default.number.isRequired,className:s.default.string},m.defaultProps={value:0}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(16),a(4),a(23),a(57),a(17);var l=n(a(315)),u=n(a(58)),o=n(a(36)),i=n(a(37)),c=n(a(55)),s=n(a(56)),f=n(a(51)),d=r(a(0)),p=n(a(1)),m=n(a(3)),h=n(a(2387));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var g=function(e){(0,c.default)(a,e);var t=v(a);function a(){return(0,o.default)(this,a),t.apply(this,arguments)}return(0,i.default)(a,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.name,r=e.value,n=(0,u.default)(e,["className","name","value"]);return d.default.createElement("div",(0,l.default)({className:(0,m.default)(h.default.label,t)},n),d.default.createElement("span",{className:h.default.name},a),r)}}]),a}(d.PureComponent);t.default=g,g.propTypes={className:p.default.string,name:p.default.string,value:p.default.string},g.defaultProps={name:"",value:""}},,function(e,t,a){"use strict";a(15);var r=a(20),n=a(157);a(5),a(11),a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(11),a(18),a(28),a(42),a(4),a(23),a(57),a(17);var l,u,o,i=r(a(61)),c=r(a(36)),s=r(a(37)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=n(a(0)),h=r(a(3)),v=r(a(1)),g=a(186),y=r(a(249)),E=r(a(928)),b=r(a(26)),_=r(a(158)),O=r(a(63)),S=a(239),C=r(a(2470));function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var k=(0,S.observer)((o=u=function(e){(0,f.default)(a,e);var t=D(a);function a(){var e;(0,c.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/scaledobjects")},e.getListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/scaledobjects").concat(t.dryRun?"?dryRun=All":"")},e}return(0,f.default)(p,[{key:"fetchList",value:(u=(0,c.default)(n.default.mark((function e(){var t,a,r,u,i,c,s,f=this,d=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},a=t.cluster,t.workspace,r=t.namespace,u=t.more,t.type,i=(0,o.default)(t,["cluster","workspace","namespace","more","type"]),this.list.isLoading=!0,i.sortBy||void 0!==i.ascending||(i.sortBy=E.LIST_DEFAULT_ORDER[this.module]||"createTime"),i.limit!==1/0&&-1!==i.limit||(i.limit=-1,i.page=1),i.limit=i.limit||10,e.next=7,request.get(this.getResourceUrl({cluster:a,namespace:r}),i).catch((function(){}));case 7:if(e.t0=e.sent,e.t0){e.next=10;break}e.t0={};case 10:return c=e.t0,s=(0,v.default)(c,"items",[]).map((function(e){return _({cluster:a},f.mapper(e))})),this.list.update(_(_({data:u?[].concat((0,l.default)(this.list.data),(0,l.default)(s)):s,total:c.totalItems||c.total_count||s.length||0},(0,g.default)(i,"labelSelector")),{},{limit:Number(i.limit)||10,page:Number(i.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",s);case 14:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"fetchDetail",value:(r=(0,c.default)(n.default.mark((function t(a,r){var l,u,o,i,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=a.cluster,u=a.namespace,o=a.name,this.isLoading=!0,t.next=4,request.get(this.getDetailUrl({cluster:l,namespace:u,name:o}),null,null,r||function(t){"NotFound"!==t.reason&&"Forbidden"!==t.reason||e.navigateTo("/404")});case 4:return i=t.sent,c=_({cluster:l},this.mapper(i)),this.detail=c,this.isLoading=!1,t.abrupt("return",c);case 9:case"end":return t.stop()}}),t,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"create",value:(a=(0,c.default)(n.default.mark((function e(t){var a,r=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.length>1&&void 0!==r[1]?r[1]:{},e.abrupt("return",this.submitting(request.post(this.getListUrl(a),t)));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"patch",value:function(e,t){return this.submitting(request.put(this.getDetailUrl(e),t))}}]),p}(r(a(68)).default),(0,h.default)(i.prototype,"fetchList",[y.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,h.default)(i.prototype,"fetchDetail",[y.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),(0,h.default)(i.prototype,"create",[y.action],Object.getOwnPropertyDescriptor(i.prototype,"create"),i.prototype),(0,h.default)(i.prototype,"patch",[y.action],Object.getOwnPropertyDescriptor(i.prototype,"patch"),i.prototype),i);t.default=S}).call(this,a(69))},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.REVIEW_PASS_ACTIONS=t.ACTION_TO_NAME=t.HANDLE_TYPE_TO_SHOW=t.ACTION_TO_STATUS=t.STATUS_TO_ACTION_ADMIN=t.STATUS_TO_ACTION=t.APP_STORE_ACTIONS=t.CAN_DELETE_STATUS=t.CAN_EDIT_STATUS=t.STATUS_TO_ICON=t.STATUS_TRANSFER_MAP=t.DEFAULT_QUERY_STATUS=void 0;t.DEFAULT_QUERY_STATUS="draft|submitted|rejected|in-review|passed|active|suspended";t.STATUS_TRANSFER_MAP={active:"active",suspended:"suspended",suspend:"suspending",submitted:"submitted",passed:"passed",draft:"draft",rejected:"rejected"};t.STATUS_TO_ICON={submitted:"review","in-review":"review",rejected:"suspended",active:"passed"};t.CAN_EDIT_STATUS=["draft","rejected"];t.CAN_DELETE_STATUS=["draft","rejected","passed","suspended"];t.APP_STORE_ACTIONS=["suspend","recover"];t.STATUS_TO_ACTION={draft:"submit",submitted:"cancel",rejected:"submit",passed:"release",active:"view"};t.STATUS_TO_ACTION_ADMIN={active:"suspend",suspended:"recover"};t.ACTION_TO_STATUS={suspend:"active",recover:"suspended"};t.HANDLE_TYPE_TO_SHOW={recover:"activate"};t.ACTION_TO_NAME={submit:"SUBMIT_FOR_REVIEW",cancel:"CANCEL_SUBMISSION",release:"RELEASE",view:"VIEW_IN_STORE",suspend:"SUSPEND",recover:"RELEASE"};t.REVIEW_PASS_ACTIONS=[{role:"isv",action:"review"},{role:"isv",action:"pass"},{role:"business",action:"review"},{role:"business",action:"pass"},{role:"technical",action:"review"},{role:"technical",action:"pass"}]},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(315)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=a(186),d=r(a(842)),p=a(72),m=r(a(2611));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(a,e);var t=h(a);function a(){return(0,l.default)(this,a),t.apply(this,arguments)}return(0,u.default)(a,[{key:"render",value:function(){var e={keyProps:{component:f.AutoComplete,className:m.default.dropdown,options:this.props.options||p.INGRESS_ANNOTATIONS}};return s.default.createElement(d.default,(0,n.default)({},this.props,{itemProps:e}))}}]),a}(s.default.Component);t.default=v},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var u=l(r(36)),o=l(r(37)),i=l(r(55)),c=l(r(56)),s=l(r(51)),f=n(r(0)),d=r(186),p=l(r(828)),m=l(r(2622));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var v=function(e){(0,i.default)(r,e);var a=h(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module)},e}return(0,l.default)(a,[{key:"apiVersion",get:function(){return"apis/springcloud.kubesphere.io/v1alpha1"}}]),a}(r(a(68)).default);t.default=s},,,,,,function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(3)),d=r(186),p=n(r(799)),m=n(r(2924));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(r,e);var a=h(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){var e=this.props,a=e.className,r=e.readOnly,n=e.renderHostInput,l=e.exampleValue;return s.default.createElement(d.Columns,{className:(0,f.default)(m.default.columns,a)},s.default.createElement(d.Column,{className:"is-7"},s.default.createElement(d.Form.Item,{rules:this.props.hostRules},n||s.default.createElement(d.Input,{name:this.props.hostName,placeholder:t("EXAMPLE_VALUE",{value:l||"192.168.1.10"}),readOnly:r}))),s.default.createElement(d.Column,null,s.default.createElement(d.Form.Item,{rules:this.props.portRules},s.default.createElement(p.default,{min:0,max:65535,name:this.props.portName,onChange:this.onPortChange,defaultValue:this.props.defaultPort,placeholder:t("EXAMPLE_VALUE",{value:9200}),readOnly:r,integer:!0}))))}}]),r}(s.default.Component);a.default=v,v.defaultProps={hostName:"Host",portName:"Port",defaultPort:9200,hostRules:[{required:!0,message:t("ENTER_SERVICE_ADDRESS")}],portRules:[{required:!0,message:t("PORT_NUMBER_EMPTY")}]}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=n(r(63)),v=n(r(972)),g=r(186),y=r(1193),E=n(r(2928));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var _=function(e){(0,c.default)(r,e);var a=b(r);function r(){var e;(0,o.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0),"Match"===e.operator&&(t=t&&e.regexValue),t},e.itemValidator=function(a,r,n){return r?r.some((function(t){return!e.checkItemValid(t)}))?n({message:t("INVALID_NOTIFICATION_CONDITION")}):void n():n()},e.handleSwitch=function(t){e.setState({enabled:t})},e.handleVerify=function(){var a=e.props,r=a.user,n=a.getVerifyFormTemplate,l=a.onVerify,u=e.formRef.current;u&&u.validate((function(){var a=u.getData(),o=C.default.notificationVerify({user:r}),i=(0,v.default)(n(a)),c=i.config,s=i.receiver;l&&!l(a)||((0,p.default)(o,"config.spec",(0,d.default)(c,"spec",{})),(0,p.default)(o,"receiver.spec",(0,d.default)(s,"spec",{})),(0,h.default)(c)&&(0,m.default)(o,"config"),e.setState({isVerifying:!0}),e.verifyStore.checkInfo(o,{user:r}).then((function(a){e.setState({isVerifying:!1}),200===a.Status?y.default.success({content:t("SEND_TEST_MESSAGE_SUCCESS_DESC")}):y.default.error({content:a.Message})})))}))},e.handleSubmit=function(){var t=e.formRef.current;t&&t.validate((function(){e.props.onSubmit(t.getData())}))},e}return(0,o.default)(r,[{key:"renderEnableService",value:function(){var e=this.props,a=e.user,r=e.name,n=e.module,l=e.icon,u=e.noConfig,o=void 0===u||u,i=this.state.enabled;return a&&!o?f.default.createElement("div",{className:k.default.contentWrapper},f.default.createElement(g.Form.Item,{className:k.default.isHorizon,label:t(i?t("NOTIFICATION_ENABLED"):t("NOTIFICATION_DISABLED"))},f.default.createElement(_.default,{name:"receiver.spec.".concat(r,".enabled"),value:i,onChange:this.handleSwitch}))):f.default.createElement("div",{className:k.default.header},f.default.createElement(E.default,{className:k.default.title,icon:l,title:t("".concat(n.toUpperCase(),"_TITLE")),description:t("".concat(n.toUpperCase(),"_DESC"))}),!o&&f.default.createElement("div",{className:k.default.action},f.default.createElement(g.Form.Item,null,f.default.createElement(b.default,{name:"receiver.spec.".concat(r,".enabled"),text:t(i?t("ENABLED"):t("DISABLED")),checked:i,onChange:this.handleSwitch}))))}},{key:"renderControlAnnotation",value:function(){return f.default.createElement("div",{className:k.default.annotation},f.default.createElement(g.Icon,{name:"question"}),f.default.createElement("p",{className:k.default.desc},t.html("NOTIFICATION_CONDITION_SETTING_TIP")))}},{key:"renderControlSetting",value:function(){var e=this.props,a=e.name,r=e.user;return f.default.createElement(g.Form.Group,{label:t("FILTER_CONDITIONS"),desc:t("NOTIFICATION_CONDITION_SETTINGS_DESC"),checkable:!0,keepDataWhenUnCheck:Boolean(r)},f.default.createElement(g.Form.Item,{rules:[{validator:this.itemValidator,checkOnSubmit:!0}]},f.default.createElement(O.default,{name:"receiver.spec.".concat(a,".alertSelector.matchExpressions"),itemType:"object",addText:t("ADD"),checkItemValid:this.checkItemValid,desc:this.renderControlAnnotation()},f.default.createElement(D.default,null))))}},{key:"renderVerifyAction",value:function(){var e=this.state.isVerifying;return f.default.createElement("div",{className:k.default.contentWrapper},f.default.createElement("p",null,t("SEND_TEST_MESSAGE_DESC")),f.default.createElement(g.Button,{className:k.default.action,onClick:this.handleVerify,loading:e},t("SEND_TEST_MESSAGE")))}},{key:"renderFooterBtns",value:function(){var e=this.props,a=e.onCancel,r=e.isSubmitting;return f.default.createElement("div",{className:k.default.footer},f.default.createElement(g.Button,{onClick:a},t("CANCEL")),f.default.createElement(g.Button,{type:"control",loading:r,onClick:this.handleSubmit},t("OK")))}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.onChange,r=e.hideFooter,n=e.children,l=e.module,u=e.user;return f.default.createElement(g.Form,{ref:this.formRef,data:t,onChange:a},f.default.createElement("div",{className:k.default.formBody},this.renderEnableService(),f.default.createElement("div",{className:k.default.contentWrapper},n,("mail"!==l||"mail"===l&&u)&&this.renderControlSetting()),("mail"!==l||"mail"===l&&u)&&this.renderVerifyAction()),!r&&this.renderFooterBtns())}}]),r}(f.Component);a.default=T},function(e,t,a){e.exports={pipelineCard:"uLmxymVsGkkYEf4yNccS6",pipelineCard__title:"_374bDv2bi1dgj-3Ep0nJtt","pipelineCard__title-error":"_2f_2SEsh5G2oZIyeNZAaOj",pipelineCard__content:"_1yZ2ddWm3YllTHSa1mSMac",pipelineCard__item:"_1j55rjwffi54nOaArMvQB2","pipelineCard-error":"rUnBDmlIjlvSq8C8rupWI",errorTip:"_1xCvRnuQl_HK5ABGqg_4Gt","pipelineCard-active":"_2RjzuvDfXn-yRmy6gVBXQ",content__title:"_1LbrO1eYXEftlLojLl8elX",content__title__error:"dL6e5rCCy45AlcnTNKd8c",content__title__noDetail:"dN_jyqpuK7-wjUCtyBwgQ",content__title__text:"_2i2A2H340NtX7tTERjbDnT",content__text:"_2TlASMvryC2WAexUpv5Pt5",content__detail:"_1EDW6C4SqJ_GXk04u0vtVo",pipeline_column:"_2Vr4U7R21ewKodQbQ3yxvA",addSteps:"_1XL2Tx9WZXsq6XUPqcr2-n",addBranchCard:"_1TrqGHHYXzKjWoHt9nGppf",conditions:"_1Clw9YoUbLC8bkdFwJyCp4",nestStage_content:"_8fLMHq9hBtobMpLMRVB6p",indentBorder:"pgY1DAUVAYW-QogDMobqg",nestsStage_detail:"_3vTIWGQ45B-Lpw4vdbSQIO"}},,,function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(18),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(4),r(319),r(23),r(57),r(24),r(17),r(62);var u=l(r(96)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=n(r(0)),p=l(r(243)),m=l(r(1)),h=l(r(3));r(1278);var v=l(r(1033)),g=l(r(869)),y=l(r(870)),E=l(r(1277)),b=l(r(871)),_=r(794),O=l(r(3448));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var C=function(e){(0,c.default)(r,e);var a=S(r);function r(){var e;(0,o.default)(this,r);for(var n=arguments.length,l=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=t.state.pods;(0,g.default)(a)?t.resourceStore.fetchSortedMetrics(I(I({},t.resourceParams),{},{metrics:[P.cpu_usage],limit:5})).then((function(a){var r=((0,y.default)(a[P.cpu_usage],"data.result")||[]).map((function(e){return(0,y.default)(e,"metric.pod")}));t.setState({pods:r},(function(){t.fetchMetrics(I({resources:r},e))}))})):t.fetchMetrics(I({resources:a},e))},t.fetchMetrics=function(e){var a=t.store.detail.cluster;t.monitorStore.fetchMetrics(I(I({resources:[],metrics:Object.values((0,C.hideGPUByLicense)(P,a))},t.resourceParams),e))},t.getMonitoringCfgs=function(){return[{type:"cpu",title:"CPU_USAGE",unitType:"cpu",metricType:P.cpu_usage},{type:"memory",title:"MEMORY_USAGE",unitType:"memory",metricType:P.memory_usage},{type:"gpu",title:"GPU_USAGE",unitType:"gpu",metricType:P.gpu_usage},{type:"gpu_memory",title:"GPU_MEMORY_USAGE",unitType:"memory",metricType:P.gpu_memory_usage},{type:"bandwidth",title:"OUTBOUND_TRAFFIC",unitType:"bandwidth",metricType:P.net_transmitted},{type:"bandwidth",title:"INBOUND_TRAFFIC",unitType:"bandwidth",metricType:P.net_received}]},t.showMultipleModal=function(e){return(0,C.cacheFunc)("_showMultipleModal_".concat(e.title),(function(){t.setState({showMultipleModal:!0,selectItem:I(I({},e),{},{legend:["USAGE"]})})}),(0,f.default)(t))},t.hideMultipleModal=function(){t.setState({showMultipleModal:!1,selectItem:{}})},t.state={showMultipleModal:!1,selectItem:{},pods:[]};var n=(0,y.default)(t.props.rootStore,"routing.location.pathname","").indexOf("observability")>-1,l=(0,C.isEdgeWizePage)();return t.monitorStore=n?new N.default:l?new k.default:new D.default,t.resourceStore=n?new N.default:l?new k.default:new D.default,t}return(0,s.default)(r,[{key:"renderCard",value:function(){var e=this,a=this.store.detail,r=a.createTime,n=a.cluster,l=this.monitorStore,u=l.isLoading,i=l.isRefreshing,c=(0,C.hideGPUByLicense)(this.getMonitoringCfgs(),n),s=this.isMore;return h.default.createElement(O.Controller,{createTime:r,onFetch:this.fetchData,loading:u,refreshing:i,isEmpty:(0,g.default)(this.metrics)},s&&h.default.createElement(b.Alert,{message:t.html("MONITORING_ALERT_DESC"),type:"info"}),c.map((function(a){a.data=(0,y.default)(e.metrics,"".concat(a.metricType,".data.result"))||[{values:(0,S.getZeroValues)()}],a.legend=a.data.map((function(e,t){return(0,y.default)(e,"metric.pod","pod".concat(t))})),a.workload_kind=e.monitoringModule;var r=(0,S.getAreaChartOps)(a);return h.default.createElement("div",{key:a.title,className:(0,v.default)(R.default.item)},s&&h.default.createElement("div",{className:R.default.more,onClick:e.showMultipleModal(a)},t("VIEW_ALL_REPLICAS")),h.default.createElement(_.MultiArea,(0,o.default)({width:"100%"},r)))})))}},{key:"renderModal",value:function(){var e=this.state,t=e.showMultipleModal,a=e.selectItem,r=this.store.detail,n=r.name,l=r.cluster,u=r.namespace;return h.default.createElement("div",null,h.default.createElement(T.default,{visible:t,module:this.monitoringModule,name:n,cluster:l,namespace:u,config:a,onCancel:this.hideMultipleModal}))}},{key:"render",value:function(){return h.default.createElement("div",null,this.renderCard(),this.renderModal())}},{key:"store",get:function(){return this.props.detailStore}},{key:"monitoringModule",get:function(){return A[this.store.module]}},{key:"metrics",get:function(){var e={};return Object.entries(this.monitorStore.data).forEach((function(t){var a=(0,u.default)(t,2),r=a[0],n=a[1];(0,y.default)(n,"data.result")&&(e["".concat(r)]=n)})),e}},{key:"resourceParams",get:function(){var e=this.store.detail,t=e.cluster,a=e.namespace,r=e.name;return{cluster:t,namespace:a,workload_kind:this.monitoringModule,workload_name:r}}},{key:"isMore",get:function(){var e=this.store.detail,t=e.podNums,a=e.status;return(t||a.numberAvailable)>5}}]),r}(h.default.Component))||l)||l;a.default=j},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(7);var l,u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(14),m=r(239),h=r(52),v=r(72),g=n(r(789)),y=n(r(795)),E=n(r(873)),b=n(r(322)),_=n(r(4050));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},r=e.props.match.params,n=r.name,l=r.namespace,o=r.workspace,i=r.cluster,c=e.props.detailStore.module;e.store.fetchList(S((t={},(0,u.default)(t,v.ROLE_QUERY_KEY[c],n),(0,u.default)(t,"namespace",l),(0,u.default)(t,"workspace",o),(0,u.default)(t,"cluster",i),t),a))},e.getColumns=function(){return[{title:t("USERNAME"),dataIndex:"username",width:"33%"},{title:t("STATUS"),dataIndex:"status",width:"33%",render:function(e){return d.default.createElement(y.default,{type:e,name:t("USER_".concat(e.toUpperCase()))})}},{title:t("LAST_LOGIN"),dataIndex:"lastLoginTime",width:"33%",render:function(e){return d.default.createElement("p",null,e?(0,h.getLocalTime)(e).format("YYYY-MM-DD HH:mm:ss"):t("NOT_LOGIN_YET"))}}]},e}return(0,i.default)(r,[{key:"componentDidMount",value:function(){this.fetchData()}},{key:"render",value:function(){var e=(0,p.toJS)(this.store.list),a=e.data,r=e.total,n=e.page,l=e.limit,u=e.isLoading,o={total:r,page:n,limit:l};return d.default.createElement(g.default,{title:t("AUTHORIZED_USER_PL")},d.default.createElement(E.default,{className:_.default.table,data:a,columns:this.getColumns(),pagination:o,isLoading:u,onFetch:this.fetchData,emptyProps:this.emptyProps,hideCustom:!0,hideHeader:!0}))}},{key:"emptyProps",get:function(){return{icon:"human",name:"USER",desc:t("NO_AUTHORIZED_USER_DESC"),className:_.default.table}}}]),r}(d.default.Component))||l)||l;a.default=D},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(73),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(73),a(28),a(442),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43));a(41);var l=r(a(44)),u=r(a(30)),o=r(a(58)),i=r(a(36)),c=r(a(37)),s=r(a(55)),f=r(a(56)),d=r(a(51)),p=r(a(63)),m=a(794),h=a(52);function v(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function g(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.resources,a=void 0===t?[]:t,r=e.metrics,n=void 0===r?[]:r,l=(0,o.default)(e,["resources","metrics"]),u=g({},l);return(0,p.default)(a)||(u.resources_filter="".concat(a.join("|"),"$")),(0,p.default)(n)||(u.metrics_filter="".concat(n.join("|"),"$")),u.time=Math.floor(Date.now()/1e3),u},e}return(0,c.default)(r,[{key:"fetchGatewayMetrics",value:(t=(0,l.default)(n.default.mark((function e(t){var a,r,l,u,i,c,s,f,d,p,v;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.autoRefresh,r=void 0!==a&&a,l=t.more,u=void 0!==l&&l,i=t.fillZero,c=void 0===i||i,s=(0,o.default)(t,["autoRefresh","more","fillZero"]),r?(s.last=!0,this.isRefreshing=!0):this.isLoading=!0,s.cluster&&(this.cluster=s.cluster),f=this.getGatewayParams(s),d=this.getApi(s),e.next=7,(0,h.to)(request.get(d,f));case 7:return p=e.sent,v=this.getResult(p),r&&(v=this.getRefreshResult(v,this.data)),u&&(v=this.getMoreResult(v,this.data)),this.data=c?(0,m.fillEmptyMetrics)(f,v):v,this.isLoading=!1,this.isRefreshing=!1,e.abrupt("return",v);case 15:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),r}(r(a(845)).default);t.default=E},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Header",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Nav",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"GlobalNav",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Selector",{enumerable:!0,get:function(){return o.default}});var n=r(a(4103)),l=r(a(4115)),u=r(a(4117)),o=r(a(4119))},,,,,function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(6),a(16),a(4),a(23),a(17),a(111),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(6),a(42),a(16),a(4),a(23),a(57),a(17),a(111),a(7);var l=n(a(36)),u=n(a(37)),o=n(a(55)),i=n(a(56)),c=n(a(51)),s=r(a(0)),f=a(186),d=n(a(63)),p=n(a(158)),m=n(a(470)),h=n(a(3)),v=n(a(2098));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=function(e){(0,o.default)(a,e);var t=g(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u0&&void 0!==arguments[0]?arguments[0]:{},a=e.className,r=e.payload,n=e.activeSeries,s=void 0===n?[]:n,f=e.showAll,d=void 0!==f&&f,p=e.isTranslate,m=void 0===p||p,h=e.extraLegend,v=r||[];if(v.length<2&&!d)return u.default.createElement("div",{className:c.default.legend});var g=function(t){var a=e.onClick;if(a){var r=(0,i.default)(t.target,"dataset.key");r&&a(t,r)}};return u.default.createElement("div",{className:(0,o.default)(a,c.default.legend),onClick:g},h&&u.default.createElement("div",{className:c.default.item},h),v.map((function(e){var a=!s.includes(e.value),r=(0,i.default)(e,"payload.stroke");return u.default.createElement("div",{key:e.dataKey,"data-key":e.dataKey,className:(0,o.default)(c.default.item,(0,l.default)({},c.default.inactive,a))},u.default.createElement("i",{style:{backgroundColor:r}}),m?t(e.value):e.value)})))};a.default=s},function(e,t,a){"use strict";a(15),a(11),a(10),Object.defineProperty(t,"__esModule",{value:!0}),t.getActiveSeries=void 0,a(11),a(10),a(4);t.getActiveSeries=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.xKey,a=e.data;return Object.keys(a[0]||{}).filter((function(e){return e!==t}))}},,,function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(468)).default);t.default=c},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(443)).default);t.default=c},,function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.kafkaYaml=void 0;t.kafkaYaml={resources:{apiVersion:"kafka.strimzi.io/v1beta2",kind:"Kafka",metadata:{name:"my-cluster"},spec:{clusterCa:{renewalDays:30,validityDays:3650},clientsCa:{renewalDays:30,validityDays:3650},kafka:{version:"3.2.0",replicas:1,resources:{requests:{memory:"64Gi",cpu:"8"},limits:{memory:"64Gi",cpu:"12"}},listeners:[{name:"external",port:9092,type:"nodeport",tls:!0,authentication:{type:"tls"}}],metricsConfig:{type:"jmxPrometheusExporter",valueFrom:{configMapKeyRef:{key:"kafka-metrics-config.yml",name:"kafka-metrics"}}},authorization:{superUsers:["saas"],type:"simple"},storage:{type:"jbod",volumes:[{id:0,type:"persistent-claim",size:"100Gi",deleteClaim:!0}]},config:{"default.replication.factor":3,"min.insync.replicas":2,"auto.create.topics.enable":!1,"num.partitions":3}},zookeeper:{replicas:1,metricsConfig:{type:"jmxPrometheusExporter",valueFrom:{configMapKeyRef:{key:"zookeeper-metrics-config.yml",name:"kafka-metrics"}}},resources:{requests:{memory:"8Gi",cpu:"2"},limits:{memory:"8Gi",cpu:"2"}},storage:{type:"persistent-claim",size:"100Gi",deleteClaim:!0}},entityOperator:{topicOperator:{},userOperator:{}},cruiseControl:{},kafkaExporter:{groupRegex:".*",topicRegex:".*"}}},user:{apiVersion:"kafka.strimzi.io/v1beta2",kind:"KafkaUser",metadata:{name:"saas",labels:{"strimzi.io/cluster":"my-cluster"}},spec:{authentication:{type:"scram-sha-512"},authorization:{type:"simple",acls:[{type:"allow",operation:"Read",resource:{type:"topic",patternType:"literal",name:""}}]}}},topic:{apiVersion:"kafka.strimzi.io/v1beta2",kind:"KafkaTopic",metadata:{name:"my-topic2",labels:{"strimzi.io/cluster":"my-cluster"}},spec:{partitions:3,replicas:1,config:{"retention.ms":6048e5}}},configMap:{kind:"ConfigMap",apiVersion:"v1",metadata:{name:"kafka-metrics",namespace:"test",labels:{app:"strimzi",component:"configmap"}},data:{"kafka-metrics-config.yml":'# See https://github.com/prometheus/jmx_exporter for more info about JMX Prometheus Exporter metrics\nlowercaseOutputName: true\nrules:\n- pattern: kafka.(\\w+)<>MeanRate\n name: kafka_$1_$2_$3_percent\n type: GAUGE\n- pattern: kafka.(\\w+)<>Value\n name: kafka_$1_$2_$3_percent\n type: GAUGE\n- pattern: kafka.(\\w+)<>Value\n name: kafka_$1_$2_$3_percent\n type: GAUGE\n labels:\n "$4": "$5"\n- pattern: kafka.(\\w+)<>Count\n name: kafka_$1_$2_$3_total\n type: COUNTER\n labels:\n "$4": "$5"\n "$6": "$7"\n- pattern: kafka.(\\w+)<>Count\n name: kafka_$1_$2_$3_total\n type: COUNTER\n labels:\n "$4": "$5"\n- pattern: kafka.(\\w+)<>Count\n name: kafka_$1_$2_$3_total\n type: COUNTER\n- pattern: kafka.cluster<>Value\n name: kafka_cluster_$1_underminisr\n type: GAUGE\n labels:\n "$2": "$3"\n "$4": "$5"\n- pattern: kafka.cluster<>Value\n name: kafka_cluster_$1_underminisr\n type: GAUGE\n labels:\n "$2": "$3"\n- pattern: kafka.cluster<>Value\n name: kafka_cluster_$1_underminisr\n type: GAUGE\n- pattern: kafka.controller<>Value\n name: kafka_controller_$1_$2\n type: GAUGE\n labels:\n "$3": "$4"\n "$5": "$6"\n- pattern: kafka.controller<>Value\n name: kafka_controller_$1_$2\n type: GAUGE\n labels:\n "$3": "$4"\n- pattern: kafka.controller<>Value\n name: kafka_controller_$1_$2\n type: GAUGE\n- pattern: kafka.server<>Value\n name: kafka_server_$1_$2\n type: GAUGE\n labels:\n "$3": "$4"\n "$5": "$6"\n- pattern: kafka.server<>Value\n name: kafka_server_$1_$2\n type: GAUGE\n labels:\n "$3": "$4"\n- pattern: kafka.server<>Value\n name: kafka_server_$1_$2\n type: GAUGE',"zookeeper-metrics-config.yml":'# See https://github.com/prometheus/jmx_exporter for more info about JMX Prometheus Exporter metrics\nlowercaseOutputName: true\nrules:\n# replicated Zookeeper\n- pattern: "org.apache.ZooKeeperService<>(\\\\w+)"\n name: "zookeeper_$2"\n type: GAUGE\n- pattern: "org.apache.ZooKeeperService<>(\\\\w+)"\n name: "zookeeper_$3"\n type: GAUGE\n labels:\n replicaId: "$2"\n- pattern: "org.apache.ZooKeeperService<>(Packets\\\\w+)"\n name: "zookeeper_$4"\n type: COUNTER\n labels:\n replicaId: "$2"\n memberType: "$3"\n- pattern: "org.apache.ZooKeeperService<>(\\\\w+)"\n name: "zookeeper_$4"\n type: GAUGE\n labels:\n replicaId: "$2"\n memberType: "$3"\n- pattern: "org.apache.ZooKeeperService<>(\\\\w+)"\n name: "zookeeper_$4_$5"\n type: GAUGE\n labels:\n replicaId: "$2"\n memberType: "$3"'}},podMonitor:{apiVersion:"monitoring.coreos.com/v1",kind:"PodMonitor",metadata:{name:"kafka-resources-metrics",namespace:"test",labels:{app:"strimzi",component:"podmonitor"}},spec:{selector:{matchExpressions:[{key:"strimzi.io/kind",operator:"In",values:["Kafka","KafkaConnect","KafkaMirrorMaker","KafkaMirrorMaker2"]},{key:"strimzi.io/component-type",operator:"NotIn",values:["kafka-exporter"]}]},namespaceSelector:{matchNames:["namespace"]},podMetricsEndpoints:[{path:"/metrics",port:"tcp-prometheus",relabelings:[{separator:";",regex:"__meta_kubernetes_pod_label_(strimzi_io_.+)",replacement:"$1",action:"labelmap"},{sourceLabels:["__meta_kubernetes_namespace"],separator:";",regex:"(.*)",targetLabel:"namespace",replacement:"$1",action:"replace"},{sourceLabels:["__meta_kubernetes_pod_name"],separator:";",regex:"(.*)",targetLabel:"kubernetes_pod_name",replacement:"$1",action:"replace"},{sourceLabels:["__meta_kubernetes_pod_node_name"],separator:";",regex:"(.*)",targetLabel:"node_name",replacement:"$1",action:"replace"},{sourceLabels:["__meta_kubernetes_pod_host_ip"],separator:";",regex:"(.*)",targetLabel:"node_ip",replacement:"$1",action:"replace"}]}]}},rebalance:{apiVersion:"kafka.strimzi.io/v1beta2",kind:"KafkaRebalance",metadata:{name:"my-rebalance2",labels:{"strimzi.io/cluster":"my-cluster"},annotations:{"strimzi.io/rebalance":"approve"}},spec:{mode:"full"}}}},,function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(885)).default);t.default=c},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o,i=r(a(44)),c=r(a(36)),s=r(a(37)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=r(a(49)),h=r(a(68)),v=a(14),g=a(52);function y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function E(e){for(var t=1;t0&&void 0!==d[0]?d[0]:{},a=t.cluster,r=t.namespace,l=t.module,o=(0,u.default)(t,["cluster","namespace","module"]),this.list.isLoading=!0,l&&(this.module=l),i=o,e.next=6,request.get(this.getListUrl({cluster:a,namespace:r,module:l}),i);case 6:return c=e.sent,s=c.items.map((function(e){return E({cluster:a,module:l||f.module},f.mapper(e))})),(0,g.LimitsEqualRequests)(s),this.list.update({data:s,total:c.items.length,isLoading:!1}),e.abrupt("return",s);case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(h.default),(0,m.default)(o.prototype,"fetchListByK8s",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchListByK8s"),o.prototype),o);t.default=_},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(84),r(18),r(16),r(27),r(4),r(23),r(24),r(17),r(136),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(6),r(84),r(18),r(28),r(42),r(16),r(27),r(4),r(23),r(57),r(24),r(193),r(17),r(7);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=r(72),p=r(186),m=n(r(63)),h=n(r(74)),v=n(r(1545)),g=n(r(1546)),y=n(r(829)),E=n(r(2298));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var _=function(e){(0,o.default)(r,e);var a=b(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,u=new Array(n),o=0;o0){var l=[];r.forEach((function(a){return!a.name||!a.containerPort||e.props.withService&&!a.servicePort?n({message:t("INVALID_PORT")}):l.includes(a.name)?n({message:t("PORT_INPUT_DESC")}):a.name&&(a.name.length>15||!d.PATTERN_PORT_NAME.test(a.name))?n({message:t("WORKLOAD_PORT_NAME_DESC")}):void l.push(a.name)}))}n()},e.checkContainerPortValid=function(t){return e.props.withService?t&&t.name&&t.containerPort&&t.servicePort:t&&t.name&&t.containerPort},e.handleFillPorts=function(){var t,a=e.context.imageDetail.exposedPorts,r=(void 0===a?[]:a).map((function(e){var t=e.split("/")[1],a=Number(e.split("/")[0]);return{name:"".concat(t,"-").concat(a),protocol:t.toUpperCase(),containerPort:a,servicePort:a}}));(0,m.default)(r)||((0,h.default)(e.props.data,"ports",r),null===(t=e.context)||void 0===t||t.forceUpdate())},e}return(0,u.default)(r,[{key:"render",value:function(){var e,a,r,n=this.props,l=n.withService,u=n.className;return s.default.createElement(p.Form.Group,{className:u,label:t("PORT_SETTINGS"),desc:t("PORT_SETTINGS_DESC")},s.default.createElement(p.Form.Item,{rules:[{required:l,message:t("PORT_EMPTY")},{validator:this.portsValidator,checkOnSubmit:!0}]},s.default.createElement(y.default,{name:"".concat(this.prefix,"ports"),itemType:"object",addText:t("ADD_PORT"),checkItemValid:this.checkContainerPortValid,extraAdd:!(0,m.default)(null!==(e=null===(a=this.context)||void 0===a||null===(r=a.imageDetail)||void 0===r?void 0:r.exposedPorts)&&void 0!==e?e:[])&&s.default.createElement(p.Button,{className:E.default.defaultButton,onClick:this.handleFillPorts},t("USE_IMAGE_DEFAULT_PORTS"))},l?s.default.createElement(g.default,null):s.default.createElement(v.default,null))))}},{key:"prefix",get:function(){var e=this.props.prefix;return e?"".concat(e,"."):""}}]),r}(s.default.Component);a.default=_,_.defaultProps={prefix:""},_.contextTypes={imageDetail:f.default.object,forceUpdate:f.default.func}},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var n=r(a(30)),l=r(a(58)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=r(a(1)),p=r(a(3)),m=r(a(2295));function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=t.cluster,r=void 0===a?"":a,n=t.workspace,l=void 0===n?"":n;return"/kapis".concat(r&&"/clusters/".concat(r),"/apps.edgewize.io/v1alpha1").concat(l&&"/workspaces/".concat(l),"/").concat(e.module)},e}return(0,f.default)(r,[{key:"fetchDetail",value:(t=(0,i.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get("".concat(this.getResourceUrl(t),"/").concat(t.name));case 3:return a=e.sent,r=b(b({},t),this.mapper(a)),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"create",value:function(e,t){var a=e.cluster,r=(0,g.default)(t,"metadata.name"),n=this.getUrl({cluster:a,name:r});return this.submitting(request.post(n,t))}},{key:"delete",value:function(e){var t=e.cluster,a=e.name,r=this.getUrl({cluster:t,name:a});return this.submitting(request.delete(r))}}]),r}(r(a(68)).default),o=(0,v.default)(u.prototype,"allTemplates",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,v.default)(u.prototype,"fetchDetail",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchDetail"),u.prototype),(0,v.default)(u.prototype,"create",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"create"),u.prototype),(0,v.default)(u.prototype,"delete",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"delete"),u.prototype),u);t.default=O},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(31),r(6),r(18),r(48),r(16),r(27),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(31),r(6),r(18),r(28),r(48),r(42),r(16),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(319),r(23),r(57),r(17),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(26)),p=n(r(925)),m=n(r(242)),h=n(r(241)),v=n(r(158)),g=n(r(63)),y=n(r(0)),E=r(14),b=r(1),_=r(52),O=r(72),S=r(186),C=n(r(966)),D=n(r(866)),k=n(r(1560));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};n.setState({isLoading:!0});var t=n.context.formData,a=(0,d.default)(t,"spec.storageClassName");return n.store.fetchList(T(T({},e),{},{cluster:n.props.cluster})).then((function(){var e=(0,E.toJS)(n.store.list.data);n.setState({storageClasses:(0,E.toJS)(n.store.list.data),storageClass:e.find((function(e){return a===e.name}))||e.find((function(e){return e.default}))||{},isLoading:!1})}))},n.getStorageClasses=function(){return n.state.storageClasses.map((function(e){return{label:e.name,value:e.name}}))},n.getSupportedAccessModes=function(){var e=n.state.storageClass,t=null;return e&&(t=(0,_.safeParseJSON)((0,d.default)(e,'annotations["storageclass.kubesphere.io/supported-access-modes"]',""))),(0,v.default)(t)?[]:t},n.handleStorageClassChange=function(e){var t=n.state.storageClasses.find((function(t){return t.name===e}))||{};(0,m.default)(n.context.formData,"spec.accessModes"),n.setState({storageClass:t})},n.sizeValidator=function(e,a,r){return parseInt(a,10)<=0?r({message:t("VOLUME_SIZE_TIP"),field:e.field}):r()},n.store=e.isEdgeWize?new k.default:new D.default,n.state={storageClasses:[],storageClass:{},isLoading:!1},n}return(0,i.default)(r,[{key:"componentDidMount",value:function(){this.updateStorageClass()}},{key:"getSliderProps",value:function(e){var t={min:0,max:2048,defaultValue:"10Gi",step:1,unit:"Gi"},a=Number((0,d.default)(e,"parameters.minSize")),r=Number((0,d.default)(e,"parameters.maxSize")),n=Number((0,d.default)(e,"parameters.stepSize"));(0,p.default)(a)||(t.min=a),(0,p.default)(r)||(t.max=r),(0,p.default)(n)||(t.step=n);for(var l=(t.max/t.step-t.min/t.step)/4,u={},o=0;o<4;o++){var i=Math.floor(l*o)*t.step+t.min;u[i]=0===i?"0":"".concat(i,"Gi")}return u[t.max]="".concat(t.max,"Gi"),t.marks=u,t}},{key:"render",value:function(){var e=this.state,a=e.storageClass,r=e.isLoading,n=this.props,u=n.editModalTitle,o=n.tabTitle,i=n.isFederated,c=n.isEdit,s=this.getStorageClasses(),f=this.store.list||{},d=this.getSupportedAccessModes(),p=(0,g.default)(d)?Object.keys(O.ACCESS_MODES):d,m=p.map((function(e){return{value:e,label:e}})),v="ReadWriteOnce"in p?["ReadWriteOnce"]:p.slice(0,1);return y.default.createElement(y.default.Fragment,null,!i&&!c&&y.default.createElement(S.Form.Item,{label:t("STORAGE_CLASS"),desc:t("VOLUME_STORAGE_CLASS_DESC"),rules:[{required:!0,message:t("PARAM_REQUIRED")}]},y.default.createElement(S.Select,{name:"spec.storageClassName",defaultValue:a.name,pagination:(0,h.default)(f,["page","limit","total"]),isLoading:f.isLoading,onChange:this.handleStorageClassChange,options:s,onFetch:this.updateStorageClass,searchable:!0,clearable:!0})),"EDIT_SETTINGS"!==u&&"CLUSTER_DIFF"!==o?y.default.createElement(S.Form.Item,{label:t("ACCESS_MODE"),rules:[{required:!0,message:t("PARAM_REQUIRED")}],desc:t("ACCESS_MODES_DESC")},y.default.createElement(S.Select,{name:"spec.accessModes",options:m,loading:r,defaultValue:v,multi:!0})):"",y.default.createElement(S.Form.Item,{label:t("VOLUME_CAPACITY"),rules:[{validator:this.sizeValidator}]},y.default.createElement(C.default,(0,l.default)({name:"spec.resources.requests.storage"},this.getSliderProps(a),{withInput:!0}))))}}]),r}(y.default.Component);a.default=w,w.contextTypes={formData:b.PropTypes.object}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17),r(110);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=r(186),h=n(r(2451));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=function(e){(0,i.default)(r,e);var a=v(r);function r(e){var t;return(0,u.default)(this,r),(t=a.call(this,e)).getIconColr=function(){var e={primary:"#fff"};switch(t.props.type){default:case"info":e.secondary="#329dce"}return e},t.handleCancel=function(){t.setState({show:!1},(function(){var e=setTimeout((function(){t.props.onCancel(),clearTimeout(e)}),1e3)}))},t.state={show:e.visible},t}return(0,o.default)(r,[{key:"renderBtns",value:function(){var e=this.props,a=e.btns,r=e.confirmText,n=e.cancelText,l=e.onConfirm,u=e.isSubmitting;return a||f.default.createElement("div",null,f.default.createElement(m.Button,{onClick:this.handleCancel},t(n)),f.default.createElement(m.Button,{type:"control",onClick:l,loading:u},t(r)))}},{key:"renderCard",value:function(){var e,t=this.props,a=t.visible,r=t.width,n=t.title,u=t.content;if(!a)return null;var o=this.state.show,i={width:r};return f.default.createElement("div",{className:(0,p.default)(h.default.card,(e={},(0,l.default)(e,h.default.in,o),(0,l.default)(e,h.default.out,!o),e)),style:i},f.default.createElement("div",{className:h.default.cardMain},f.default.createElement("div",{className:h.default.title},f.default.createElement(m.Icon,{name:"information",size:20,color:this.getIconColr()}),f.default.createElement("strong",null,n)),f.default.createElement("div",{className:h.default.content},u)),f.default.createElement("div",{className:h.default.cardFoot},this.renderBtns()))}},{key:"render",value:function(){return f.default.createElement("div",{className:h.default.wrapper},this.renderCard())}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.visible!==t.show?{show:e.visible}:null}}]),r}(f.default.PureComponent);a.default=g,g.propTypes={visible:d.default.bool,width:d.default.number,type:d.default.string,title:d.default.string,content:d.default.oneOfType([d.default.node,d.default.element]),btns:d.default.oneOfType([d.default.node,d.default.element]),confirmText:d.default.string,cancelText:d.default.string,onConfirm:d.default.func,onCancel:d.default.func,isSubmitting:d.default.bool},g.defaultProps={visible:!1,isSubmitting:!1,width:"auto",type:"info",title:"title",content:"content",confirmText:"OK",cancelText:"CANCEL",onConfirm:function(){},onCancel:function(){}}},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(0)),l=r(a(3)),u=r(a(2453));var o=function(e){var t=e.className,a=e.text,r=e.icon;return n.default.createElement("div",{className:(0,l.default)(u.default.emptyTip,t)},r||n.default.createElement("img",{width:32,height:32,src:"/assets/data_empty.svg"}),a||n.default.createElement("p",{className:u.default.emptyText},"暂无相关数据"))};t.default=o},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(16),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o=r(a(44)),i=r(a(36)),c=r(a(37)),s=r(a(55)),f=r(a(56)),d=r(a(51)),p=r(a(68)),m=r(a(26));function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=t.cluster,r=t.name;return"".concat(e.getNetworkUrl).concat(e.getPath({cluster:a}),"/").concat(e.module,"/").concat(r,"/migrate")},e}return(0,c.default)(l,[{key:"fetchMigrateIpPool",value:(a=(0,o.default)(n.default.mark((function e(){var t,a,r,l,o,i,c,s=this,f=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=f.length>0&&void 0!==f[0]?f[0]:{},a=t.cluster,r=t.namespace,l=t.name,o=(0,u.default)(t,["cluster","namespace","name"]),e.next=3,request.get(this.getNetworkResourceUrl({name:l,cluster:a}),this.getFilterParams(o));case 3:return i=e.sent,c=((0,m.default)(i,"items")||[]).map((function(e){return v({cluster:a,namespace:r},s.mapper(e))})),e.abrupt("return",c);case 6:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchNamespacesIpPools",value:(t=(0,o.default)(n.default.mark((function e(){var t,a,r,l,o,i=this,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:{},a=t.namespace,r=t.cluster,l=(0,u.default)(t,["namespace","cluster"]),e.next=3,request.get("".concat(this.getNetworkUrl).concat(this.getPath({namespace:a,cluster:r}),"/").concat(this.module),this.getFilterParams(l));case 3:return o=e.sent,e.abrupt("return",o.map((function(e){return v({cluster:r,namespace:a},i.mapper(e))})));case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),l}(p.default);t.default=E},,,function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(5),r(11),r(31),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(859),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var u,o=n(r(315)),i=n(r(58)),c=n(r(30)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=l(r(0)),v=r(239),g=n(r(241)),y=r(186),E=n(r(439)),b=r(52),_=n(r(2600));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=e.props.cluster;return t.name&&(t.nameAndAlias=t.name,delete t.name),e.projectStore.fetchList(S({cluster:a},t))},e.optionRenderer=function(a){return h.default.createElement("div",{className:_.default.option,key:a.value},a.isFedManaged?h.default.createElement("img",{className:_.default.indicator,src:"/assets/cluster.svg"}):h.default.createElement(y.Icon,{name:"project"}),a.label,a.isFedManaged&&h.default.createElement(y.Tooltip,{content:e.props.tipMessage||t("FEDPROJECT_RESOURCE_TIP")},h.default.createElement(y.Icon,{className:_.default.tip,name:"question"})))},e}return(0,f.default)(r,[{key:"componentDidMount",value:function(){var e=this.props.labelSelector;this.fetchProjects(e?{labelSelector:e}:void 0)}},{key:"getProjects",value:function(){var e=this.props.defaultValue,t=this.projectStore.list.data,a=t.filter((function(e){return"Terminating"!==e.status})).map((function(e){return{label:(0,b.showNameAndAlias)(e),value:e.name,disabled:e.isFedManaged,isFedManaged:e.isFedManaged}}));return e&&!t.find((function(t){return t.name===e}))&&a.unshift({label:e,value:e}),a}},{key:"render",value:function(){var e=this.props,t=(e.cluster,(0,i.default)(e,["cluster"]));return!t.value&&t.defaultValue&&(t.value=t.defaultValue),h.default.createElement(y.Select,(0,o.default)({options:this.getProjects(),pagination:(0,g.default)(this.projectStore.list,["page","limit","total"]),isLoading:this.projectStore.list.isLoading,valueRenderer:this.optionRenderer,optionRenderer:this.optionRenderer,onFetch:this.fetchProjects,searchable:!0,clearable:!0,disableRemoteSearch:!0,placeholder:" "},t))}}]),r}(h.Component))||u;a.default=D},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(11),a(18),a(48),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(11),a(18),a(48),a(42),a(16),a(4),a(23),a(57),a(17);var l=n(a(315)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51)),f=a(186),d=n(a(321)),p=r(a(0)),m=a(52),h=a(72),v=n(a(2602));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var y=function(e){(0,i.default)(a,e);var t=g(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,n=new Array(r),o=0;o2&&void 0!==arguments[2]&&arguments[2],n=(0,d.default)(e.props.clustersDetail,"name"),u=e.props.children,o=n[t.name]||t;return p.default.createElement("span",{className:r?v.default.tagItem:"",title:(0,m.getDisplayNameNew)(o,!1),key:"".concat(o.name,"-").concat(a)},p.default.createElement(f.Tag,{key:o.name,type:r?"info":h.CLUSTER_GROUP_TAG_TYPE[o.group]},p.default.createElement(f.Icon,(0,l.default)({name:h.CLUSTER_PROVIDER_ICON[o.provider]||"kubernetes",size:16},"default"!==h.CLUSTER_GROUP_TAG_TYPE[o.group]||r?{}:{type:"light"})),u?u(o):(0,m.getDisplayNameNew)(o)))},e.renderItem1=function(t,a){return e.renderItem(t,a,!1)},e.renderTooltip=function(t,a){return e.renderItem(t,a,!0)},e}return(0,o.default)(a,[{key:"render",value:function(){var e=this.props.clusters,t=void 0===e?[]:e,a=(0,d.default)(this.props.clustersDetail,"name"),r=t.filter((function(e){return a[e.name]})),n=r.slice(2),l=r.slice(0,2);return p.default.createElement("div",{className:v.default.wrapper},p.default.createElement("div",{className:v.default.tags},l.map(this.renderItem1),n.length?p.default.createElement(f.Tooltip,{content:p.default.createElement("div",{className:"flexbox items-center ".concat(v.default.tooltipContent)},n.map(this.renderTooltip))},p.default.createElement(f.Tag,{type:"primary"},r.length)):null,0===r.length&&"-"))}}]),a}(p.Component);t.default=y},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(160),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(61)),u=r(a(30)),o=r(a(58));a(41);var i,c,s,f,d=r(a(44)),p=r(a(65)),m=r(a(36)),h=r(a(37)),v=r(a(88)),g=r(a(55)),y=r(a(56)),E=r(a(51)),b=r(a(49)),_=(r(a(66)),r(a(189))),O=a(14);function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/gitrepositories").concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/gitrepositories")},e.getDetailUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getListUrl(t),"/").concat(t.name)},(0,p.default)(e,"setSelectRowKeys",f,(0,v.default)(e)),e}return(0,h.default)(E,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.namespace,a=e.cluster,r="";return a&&(r+="/klusters/".concat(a)),t&&(r+="/namespaces/".concat(t)),r}},{key:"fetchList",value:(i=(0,d.default)(n.default.mark((function e(){var t,a,r,u,i,c,s,f,d=this,p=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},a=t.devops,t.workspace,r=t.cluster,u=t.more,i=(0,o.default)(t,["devops","workspace","cluster","more"]),this.list.isLoading=!0,i.limit!==1/0&&-1!==i.limit||(i.limit=-1,i.page=1),i.limit=i.limit||10,c="".concat(this.getResourceUrl({namespace:a,cluster:r})),e.next=7,request.get(c,C({},i),{},(function(){return[]}));case 7:return s=e.sent,f=Array.isArray(s.items)?s.items.map((function(e){return C({},d.mapper(C(C({},e),{},{devops:a})))})):[],this.list.update(C(C({data:u?[].concat((0,l.default)(this.list.data),(0,l.default)(f)):f,total:s.totalItems||s.total_count||f.length||0},i),{},{limit:Number(i.limit)||10,page:Number(i.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",f);case 11:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"create",value:(u=(0,d.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.data,r=t.devops,l=t.cluster,u="".concat(this.getResourceUrl({namespace:r,cluster:l})),e.next=4,request.post(u,a);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"edit",value:(r=(0,d.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.data,r=t.devops,l=t.name,u=t.cluster,o="".concat(this.getResourceUrl({namespace:r,cluster:u}),"/").concat(l),e.abrupt("return",this.submitting(request.put(o,a)));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"update",value:(a=(0,d.default)(n.default.mark((function e(t,a){var r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat(this.getResourceUrl({namespace:t.devops,cluster:t.cluster}),"/").concat(a.metadata.name),e.abrupt("return",this.submitting(request.put(r,a)));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"delete",value:function(e){var t=(0,_.default)(C(C({},e),{},{namespace:e.devops}),"devops");return this.submitting(request.delete(this.getDetailUrl(t)))}},{key:"fetchDetail",value:(t=(0,d.default)(n.default.mark((function e(t){var a,r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="".concat(this.getResourceUrl({namespace:t.devops,cluster:t.cluster}),"/").concat(t.name),e.next=3,this.submitting(request.get(a),null,null,(function(){return{}}));case 3:return r=e.sent,l=this.mapper(r),this.detail=l,e.abrupt("return",l);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),E}(r(a(68)).default),c=(0,b.default)(i.prototype,"list",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",filters:{},isLoading:!1,selectedRowKeys:[]}}}),s=(0,b.default)(i.prototype,"detail",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),f=(0,b.default)(i.prototype,"setSelectRowKeys",[O.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.list.selectedRowKeys=t}}}),(0,b.default)(i.prototype,"fetchList",[O.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,b.default)(i.prototype,"create",[O.action],Object.getOwnPropertyDescriptor(i.prototype,"create"),i.prototype),(0,b.default)(i.prototype,"edit",[O.action],Object.getOwnPropertyDescriptor(i.prototype,"edit"),i.prototype),(0,b.default)(i.prototype,"update",[O.action],Object.getOwnPropertyDescriptor(i.prototype,"update"),i.prototype),(0,b.default)(i.prototype,"delete",[O.action],Object.getOwnPropertyDescriptor(i.prototype,"delete"),i.prototype),(0,b.default)(i.prototype,"fetchDetail",[O.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),i);t.default=k},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(18),a(16),a(9),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(5),a(18),a(16),a(9),a(4),a(22);var n=r(a(43)),l=r(a(58));a(41);var u,o,i=r(a(44)),c=r(a(65)),s=r(a(36)),f=r(a(37)),d=r(a(49)),p=(r(a(66)),r(a(1344))),m=a(14),h=r(a(105)),v=(u=function(){function e(){(0,s.default)(this,e),(0,c.default)(this,"list",o,this)}var t;return(0,f.default)(e,[{key:"fetchList",value:(t=(0,i.default)(n.default.mark((function e(t){var a,r,u,o,i,c;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.name,a=t.cluster,r=t.namespace,u=(0,l.default)(t,["name","cluster","namespace"]),this.list.isLoading=!0,o=a?"/klusters/".concat(a):"",i=r?"/namespaces/".concat(r):"",e.next=6,request.get("api/v1".concat(o).concat(i,"/events"),u);case 6:c=e.sent,this.list={data:(0,p.default)(c.items.map(h.default.events),"lastTimestamp"),total:c.items.length,isLoading:!1};case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),o=(0,d.default)(u.prototype,"list",[m.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,isLoading:!0}}}),(0,d.default)(u.prototype,"fetchList",[m.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchList"),u.prototype),u);t.default=v},function(e,t,a){"use strict";var r=a(20);a(12),a(109),a(5),a(11),a(6),a(84),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(24),a(17),a(85),a(136),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(109),a(45),a(5),a(11),a(6),a(84),a(160),a(18),a(28),a(191),a(42),a(16),a(159),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(85),a(7);var n=r(a(246)),l=r(a(43)),u=r(a(61)),o=r(a(30)),i=r(a(58));a(41);var c,s,f,d,p=r(a(44)),m=r(a(65)),h=r(a(36)),v=r(a(37)),g=r(a(88)),y=r(a(55)),E=r(a(56)),b=r(a(51)),_=r(a(49)),O=(r(a(66)),r(a(74))),S=r(a(26)),C=r(a(63)),D=r(a(76)),k=r(a(242)),N=r(a(158)),T=a(14),R=a(440),w=a(72),I=r(a(435)),M=r(a(323));function P(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a="".concat(e.getBaseUrl(t),"credentials");return t.name?"".concat(a,"/").concat(t.name):a},e}return(0,v.default)(b,[{key:"setParams",value:function(e){this.params=e}},{key:"fetchList",value:(c=(0,p.default)(l.default.mark((function e(){var t,a,r,n,o,c,s,f=this,d=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},a=t.devops,r=t.cluster,n=(0,i.default)(t,["devops","cluster"]),this.list.isLoading=!0,n.limit===1/0||-1===n.limit?(n.limit=-1,n.page=1):n.limit=n.limit||10,o=n.more||!1,(0,k.default)(n,"more"),n.sortBy=n.sortBy||"createTime",e.next=8,request.get(this.getResourceUrl({devops:a,cluster:r}),A({},n));case 8:return c=e.sent,s=Array.isArray(c.items)?c.items.filter((function(e){return w.CREDENTIAL_TYPE_LIST.includes(e.type)})).map((function(e){return(e=f.mapper(e)).type=w.CREDENTIAL_DISPLAY_KEY[e.type.split("/")[1]],e})):[],this.list.update({data:o?[].concat((0,u.default)(this.list.data),(0,u.default)(s)):s,total:c.totalItems||s.length||0,filters:n,limit:Number(n.limit)||10,page:Number(n.page)||1,isLoading:!1}),e.abrupt("return",s);case 12:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"handleCreate",value:(o=(0,p.default)(l.default.mark((function e(t,a){var r,n,u,o,i;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.devops,n=a.cluster,u=I.default[this.module]({namespace:r}),o=(0,S.default)(t,t.type,{}),i=o.id||t.id,(0,O.default)(u,"metadata.labels.app",i),(0,O.default)(u,'metadata.annotations["kubesphere.io/description"]',t.description),(0,O.default)(u,"metadata.name",i),delete t.description,o.id&&delete o.id,!(0,C.default)(o)&&(0,D.default)(o)&&Object.keys(o).forEach((function(e){o[e]&&(o[e]=(0,R.safeBtoa)(o[e]))})),delete t[t.type],u.data=A({},o),u.type="credential.devops.kubesphere.io/".concat(w.CREDENTIAL_KEY[t.type]),e.next=15,request.post(this.getResourceUrl({devops:r,cluster:n}),u,null,null);case 15:return e.abrupt("return",e.sent);case 16:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"fetchDetail",value:(r=(0,p.default)(l.default.mark((function e(t){var a,r,n,u,o,i;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,N.default)(t)||(0,C.default)(t)||(this.params=t),a=this.params,r=a.devops,n=a.credential_id,u=a.cluster,e.next=4,request.get("".concat(this.getResourceUrl({devops:r,name:n,cluster:u}),"?content=1"));case 4:o=e.sent,(i=this.mapper(o)).display_name=i.name,i.id=i.name,i.type=w.CREDENTIAL_DISPLAY_KEY[i.type.split("/")[1]],this.detail=i,this.isLoading=!1;case 11:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"updateCredential",value:(a=(0,p.default)(l.default.mark((function e(t,a){var r,u,o,i,c;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.devops,u=a.cluster,o=t[t.type],i=t.description,c=t._originData,"{}"!==JSON.stringify(o)&&"object"===(0,n.default)(o)&&Object.keys(o).forEach((function(e){o[e]=(0,R.safeBtoa)(o[e])})),(0,O.default)(c,"data",o),(0,O.default)(c,'metadata.annotations["kubesphere.io/description"]',i),e.next=9,request.put("".concat(this.getResourceUrl({devops:r,name:t.name,cluster:u}),"?content=1"),c);case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"delete",value:(t=(0,p.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.id,r=this.params,n=r.devops,u=r.cluster,e.next=4,request.delete("".concat(this.getResourceUrl({devops:n,name:a,cluster:u})));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"checkName",value:function(e){return request.get(this.getResourceUrl(e),{},{headers:{"x-check-exist":!0}})}},{key:"apiVersion",get:function(){return w.API_VERSIONS.devops}}]),b}(M.default),s=(0,_.default)(c.prototype,"list",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",reverse:!1,filters:{},isLoading:!0}}}),f=(0,_.default)(c.prototype,"detail",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),d=(0,_.default)(c.prototype,"params",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),(0,_.default)(c.prototype,"setParams",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"setParams"),c.prototype),(0,_.default)(c.prototype,"fetchList",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchList"),c.prototype),(0,_.default)(c.prototype,"handleCreate",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"handleCreate"),c.prototype),(0,_.default)(c.prototype,"fetchDetail",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchDetail"),c.prototype),(0,_.default)(c.prototype,"updateCredential",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"updateCredential"),c.prototype),(0,_.default)(c.prototype,"delete",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"delete"),c.prototype),(0,_.default)(c.prototype,"checkName",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"checkName"),c.prototype),c);t.default=L},,,,,,,,,,,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(315)),u=n(r(58)),o=n(r(30)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51));r(45),r(5),r(42),r(4),r(23),r(57),r(24),r(193),r(17);var p=n(r(0)),m=n(r(63)),h=r(186),v=n(r(3)),g=r(72),y=n(r(2922));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var b=/(?=.*?[A-Z])(?=.*?[a-z])/,_=/(?=.*?[~!@#$%^&*()\-_=+\\|\[\{\}\];:'",<.>/? ])/,O=/(?=.*?[0-9])/,S=function(e){if((0,m.default)(e))return-1;var t=0;return b.test(e)&&(t+=4),O.test(e)&&(t+=2),_.test(e)&&(t+=2),e.length>=6&&e<12?t+=2:e.length>=12&&(t+=4),g.PATTERN_PASSWORD.test(e)?t:0},C=function(e){(0,s.default)(r,e);var a=E(r);function r(){var e;(0,i.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l-1})}},e.handleDropdownClose=function(t){t&&t.target&&e.ref&&e.ref.current&&e.ref.current.contains(t.target)?e.setState({showTip:!0}):e.setState({showTip:!1})},e.handleInputClick=function(){var t=e.state.strength;e.setState({showTip:t>-1})},e.handleInputBlur=function(){e.setState({showTip:!1})},e.getColor=function(){var t=e.state.strength;return-1===t?{width:0,backgroundColor:"#fff"}:t>=0&&t<6?{width:"33%",backgroundColor:"#ca2621"}:t>=6&&t<8?{width:"66%",backgroundColor:"#f5a623"}:t>=8?{width:"100%",backgroundColor:"#55bc8a"}:void 0},e}return(0,c.default)(r,[{key:"renderStrengthContent",value:function(){var e=this.props.value,a=void 0===e?"":e;return p.default.createElement("div",{className:y.default.content},p.default.createElement("p",null,t("PASSWORD_MUST")),p.default.createElement("ul",{className:y.default.rules},p.default.createElement("li",null,p.default.createElement(h.Icon,{className:(0,v.default)(y.default.icon,(0,o.default)({},y.default.selected,b.test(a))),name:"check",size:12,type:"light"}),t("PASSWORD_LETTER")),p.default.createElement("li",null,p.default.createElement(h.Icon,{className:(0,v.default)(y.default.icon,(0,o.default)({},y.default.selected,O.test(a))),name:"check",size:12,type:"light"}),t("PASSWORD_NUMBER")),p.default.createElement("li",null,p.default.createElement(h.Icon,{className:(0,v.default)(y.default.icon,(0,o.default)({},y.default.selected,_.test(a))),name:"check",size:12,type:"light"}),t("PASSWORD_CHARACTERS")),p.default.createElement("li",null,p.default.createElement(h.Icon,{className:(0,v.default)(y.default.icon,(0,o.default)({},y.default.selected,a.length>=8)),name:"check",size:12,type:"light"}),t("PASSWORD_LENGTH"))),p.default.createElement("p",null,t("PASSWORD_STRENGTH"),":"),p.default.createElement("div",{className:y.default.barWrapper},p.default.createElement("div",{className:y.default.bar,style:this.getColor()})),p.default.createElement("p",{className:y.default.tip},t("PASSWORD_STRENGTH_DESC")))}},{key:"render",value:function(){var e=this.props,t=e.withStrength,a=e.tipClassName,r=(0,u.default)(e,["withStrength","tipClassName"]),n=this.state,o=n.showTip,i=n.strength;return t?p.default.createElement("div",{className:y.default.wrapper,ref:this.ref},p.default.createElement(h.Dropdown,{className:a,visible:o&&i>-1,content:this.renderStrengthContent(),placement:"bottomRight",closeAfterClick:!1,onClose:this.handleDropdownClose},p.default.createElement("div",{className:y.default.trigger})),p.default.createElement(h.InputPassword,(0,l.default)({},r,{onChange:this.handleChange,onBlur:this.handleInputBlur,onClick:this.handleInputClick}))):p.default.createElement(h.InputPassword,r)}}]),r}(p.default.Component);a.default=C},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(63)),h=n(r(787)),v=n(r(2973)),g=n(r(2975));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=function(e){(0,c.default)(r,e);var a=y(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.visible,r=e.title,n=e.module,o=e.store,i=e.forms,c=e.onOk,s=e.onCancel,f=e.cluster,p=e.namespace,m=(0,u.default)(e,["visible","title","module","store","forms","onOk","onCancel","cluster","namespace"]);return d.default.createElement(h.default,(0,l.default)({width:1162,bodyClassName:g.default.body,title:t(r),visible:a,onCancel:s,hideFooter:!0},m),d.default.createElement(v.default,(0,l.default)({},m,{module:n,store:o,forms:i,cluster:f,namespace:p,data:this.formData,onSubmit:c,onCancel:s})))}},{key:"formData",get:function(){var e=this.props,t=e.detail,a=e.formData;return(0,m.default)(a)?t:a}}]),r}(d.default.Component);a.default=E,E.propTypes={visible:p.default.bool,title:p.default.string,module:p.default.string,store:p.default.object,forms:p.default.array,formData:p.default.object,detail:p.default.object,onOk:p.default.func,onCancel:p.default.func},E.defaultProps={visible:!1,title:"EDIT",store:{},forms:[],formData:{},detail:{},onCancel:function(){}}},,function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l,u,o,i,c,s,f,d=n(r(30)),p=n(r(65)),m=n(r(36)),h=n(r(37)),v=n(r(88)),g=n(r(55)),y=n(r(56)),E=n(r(51)),b=n(r(49)),_=(n(r(66)),n(r(3))),O=n(r(1171)),S=n(r(1102)),C=n(r(26)),D=n(r(63)),k=r(14),N=r(239),T=n(r(0)),R=n(r(1733)),w=n(r(3269)),I=n(r(3273)),M=n(r(3320));function P(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,E.default)(e);if(t){var n=(0,E.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,y.default)(this,a)}}var j={json:{pipeline:{stages:[],agent:{type:"any"}}}},L=(0,N.observer)((f=s=function(e){(0,g.default)(r,e);var a=A(r);function r(e){var t;if((0,m.default)(this,r),t=a.call(this,e),(0,p.default)(t,"clearFocus",o,(0,v.default)(t)),(0,p.default)(t,"handleContinue",i,(0,v.default)(t)),(0,p.default)(t,"handleDiscard",c,(0,v.default)(t)),t.state={},e.isEditMode){t.store=new M.default,t.store.params=e.params;var n=e.params,l=n.devops,u=n.name,s=n.cluster;t.prevData=JSON.parse(localStorage.getItem("".concat(globals.user.username,"-").concat(l,"-").concat(u))),t.store.fetchLabel({cluster:s}),(0,D.default)(e.jsonData)?t.store.setData(t.prevData||j):(t.store.jsonData=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.getAlertPath(t)).concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=e.getListUrl,e.getFilterParams=function(e){var t=C({},e),a=[];return t["labels.severity"]&&(a.push("severity=".concat(t["labels.severity"])),delete t["labels.severity"]),t["labels.alertname"]&&(a.push("alertname~".concat(t["labels.alertname"])),delete t["labels.alertname"]),a.length>0&&(t.label_filters=a.join(",")),t},e.getParamsType=function(e){var t={};return e.cluster&&("builtin"===e.type?t.builtin=!0:t.builtin=!1),t},e}return(0,m.default)(o,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r="";return t&&(r+="/clusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"fetchList",value:(a=(0,s.default)(n.default.mark((function e(){var t,a,r,o,i,c,s,f,d,p,m,h=this,v=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=v.length>0&&void 0!==v[0]?v[0]:{},a=t.cluster,r=t.workspace,o=t.namespace,i=t.more,c=t.ruleName,s=t.type,f=(0,u.default)(t,["cluster","workspace","namespace","more","ruleName","type"]),this.list.isLoading=!0,f.sortBy||void 0!==f.ascending||(f.sortBy=O.LIST_DEFAULT_ORDER[this.module]||"createTime"),f.limit!==1/0&&-1!==f.limit||(f.limit=-1,f.page=1),f.limit=f.limit||10,"builtin"===s&&(f.builtin=!0),e.next=8,request.get(this.getResourceUrl({cluster:a,workspace:r,namespace:o,ruleName:c,type:s}),C(C({},this.getFilterParams(f)),this.getParamsType({cluster:a,type:s})));case 8:return d=e.sent,p=((0,b.default)(d,"items")||[]).map((function(e,t){return C({cluster:a,namespace:o,id:t},h.mapper(e))})),m=d.totalItems,this.list.update(C(C({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(p)):p,total:m},f),{},{limit:Number(f.limit)||10,page:Number(f.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",p);case 13:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchCount",value:(t=(0,s.default)(n.default.mark((function e(t){var a,r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,e.next=3,Promise.all([request.get(this.getResourceUrl({cluster:a,namespace:r}),{page:1,limit:1,builtin:!1}),request.get(this.getResourceUrl({cluster:a,namespace:r,type:"builtin"}),{page:1,limit:1,builtin:!0})]);case 3:l=e.sent,this.ruleCount=(0,b.default)(l,"0.totalItems",0),this.builtinRuleCount=(0,b.default)(l,"1.totalItems",0);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"proxy-api/proxy/alerting.kubesphere.io/v2beta1/"}}]),o}(r(a(68)).default),i=(0,E.default)(o.prototype,"ruleCount",[_.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),c=(0,E.default)(o.prototype,"builtinRuleCount",[_.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),(0,E.default)(o.prototype,"fetchList",[_.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchList"),o.prototype),(0,E.default)(o.prototype,"fetchCount",[_.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchCount"),o.prototype),o);t.default=k},function(e,t,a){"use strict";a(15);var r=a(20);a(6),a(87),a(137),a(9),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(6),a(87),a(191),a(159),a(137),a(9),a(10),a(4),a(22),a(7);var n=r(a(43));a(41);var l,u,o,i,c,s,f,d,p,m,h,v,g=r(a(44)),y=r(a(65)),E=r(a(36)),b=r(a(37)),_=r(a(49)),O=(r(a(66)),a(14)),S=r(a(63)),C=r(a(26)),D=r(a(902)),k=r(a(74)),N=a(52),T=a(909),R=(l=function(){function e(){var t=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,E.default)(this,e),(0,y.default)(this,"page",u,this),(0,y.default)(this,"data",o,this),(0,y.default)(this,"total_page",i,this),(0,y.default)(this,"total",c,this),(0,y.default)(this,"isLoading",s,this),(0,y.default)(this,"limit",f,this),(0,y.default)(this,"sort_metric",d,this),(0,y.default)(this,"sort_type",p,this),(0,y.default)(this,"changeSortType",m,this),(0,y.default)(this,"changeSortMetric",h,this),(0,y.default)(this,"changePagination",v,this),this.download=function(e){var a=JSON.stringify(t.data,null,2),r=new Blob([a],{type:"text/plain;charset=utf-8"});(0,T.saveAs)(r,e)},this.handleResult=function(e){var t=(0,C.default)(e,"results",[]);return(0,S.default)(t)?[]:t.reduce((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.metric_name,r=(0,C.default)(t,"data.result")||[];return r.forEach((function(t,r){var n=e[r]||{},l=(0,C.default)(t,"value",[]),u=(0,C.default)(t,"metric",{});n[a]=l[1],Object.assign(n,u),e[r]=n})),e}),[])},Object.keys(a).forEach((function(e){return(0,k.default)(t,e,a[e])}))}var t;return(0,b.default)(e,[{key:"fetchAll",value:(t=(0,g.default)(n.default.mark((function e(){var t,a,r,l,u=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u.length>0&&void 0!==u[0]?u[0]:{},this.isLoading=!0,a={type:this.rankRequestTag,metrics_filter:this.metrics_filter,page:this.page,limit:this.limit,sort_type:this.sort_type,sort_metric:this.sort_metric||(0,C.default)(this,"sort_metric_options.[0]")},this.cluster&&(a.cluster=this.cluster),this.namespaces&&(a.namespace=this.namespaces),this.kind&&(a.workload_kind=this.kind),this.workspace&&(a.workspace=this.workspace),e.next=9,(0,N.to)(request.get(this.fetchUrl,(0,D.default)(a,t)));case 9:return r=e.sent,l=this.handleResult(r),this.total_page=r.total_page,this.total=r.total_item,this.data=l,this.isLoading=!1,e.abrupt("return",l);case 16:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"kapis/monitoring.kubesphere.io/v1beta1"}},{key:"fetchUrl",get:function(){return"nodes"===this.resource?"".concat(this.apiVersion,"/node_metrics"):"pods"===this.resource?"".concat(this.apiVersion,"/pod_metrics"):"workspaces"===this.resource?"".concat(this.apiVersion,"/workspace_metrics"):"namespaces"===this.resource?"".concat(this.apiVersion,"/namespace_metrics"):"clusters"===this.resource?"".concat(this.apiVersion,"/cluster_metrics"):"".concat(this.apiVersion)}},{key:"rankRequestTag",get:function(){return"rank"}},{key:"defaultParams",get:function(){return{type:this.rankRequestTag}}}]),e}(),u=(0,_.default)(l.prototype,"page",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),o=(0,_.default)(l.prototype,"data",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),i=(0,_.default)(l.prototype,"total_page",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),c=(0,_.default)(l.prototype,"total",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),s=(0,_.default)(l.prototype,"isLoading",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),f=(0,_.default)(l.prototype,"limit",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 10}}),d=(0,_.default)(l.prototype,"sort_metric",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),p=(0,_.default)(l.prototype,"sort_type",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"desc"}}),m=(0,_.default)(l.prototype,"changeSortType",[O.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a="desc"===e.sort_type?"asc":"desc";e.sort_type=a,e.fetchAll(t)}}}),h=(0,_.default)(l.prototype,"changeSortMetric",[O.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t,a){e.sort_metric=t,e.fetchAll(a)}}}),v=(0,_.default)(l.prototype,"changePagination",[O.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t,a){var r=t.page,n=t.limit;e.page=r,e.limit=n,e.fetchAll(a)}}}),(0,_.default)(l.prototype,"fetchAll",[O.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchAll"),l.prototype),l);t.default=R},function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(42),a(4),a(23),a(57),a(17);var n,l,u,o=r(a(65)),i=r(a(36)),c=r(a(37)),s=r(a(88)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=r(a(49)),h=(r(a(66)),a(14)),v=a(52),g=r(a(1129));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var E=["namespace_cpu_usage","namespace_memory_usage_wo_cache","namespace_cpu_used_requests_utilisation","namespace_cpu_used_limits_utilisation","namespace_memory_used_requests_utilisation","namespace_memory_used_limits_utilisation","namespace_pvc_bytes_used","namespace_gpu_usage","namespace_gpu_memory_usage","namespace_pod_count","namespace_net_bytes_received","namespace_net_bytes_transmitted"],b=["namespace_memory_usage_wo_cache","namespace_memory_limit_hard","namespace_cpu_usage","namespace_cpu_limit_hard","namespace_gpu_limit_hard","namespace_gpu_usage","namespace_gpu_memory_usage","namespace_pod_count","namespace_pods_hard","namespace_net_bytes_received","namespace_net_bytes_transmitted","namespace_cpu_used_requests_utilisation","namespace_cpu_used_limits_utilisation","namespace_memory_used_requests_utilisation","namespace_memory_used_limits_utilisation","namespace_pvc_bytes_used","namespace_pvc_count"],_=(n=function(e){(0,f.default)(a,e);var t=y(a);function a(e){var r;return(0,i.default)(this,a),r=t.call(this,e),(0,o.default)(r,"sort_metric",l,(0,s.default)(r)),(0,o.default)(r,"changeWorkSpace",u,(0,s.default)(r)),r.sort_metric_options=(0,v.hideGPUByLicense)(e.sort_metric_options||E,r.cluster),r.metrics_filter=(0,v.hideGPUByLicense)(b,r.cluster).join("|"),r}return(0,c.default)(a,[{key:"fetchUrl",get:function(){return"".concat(this.apiVersion,"/namespace_metrics")}}]),a}(g.default),l=(0,m.default)(n.prototype,"sort_metric",[h.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return E[0]}}),u=(0,m.default)(n.prototype,"changeWorkSpace",[h.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.workspace=t,e.fetchAll()}}}),n);t.default=_},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var u=l(r(43));r(41);var o=l(r(44)),i=l(r(96));r(16),r(4),r(22);var c=n(r(0)),s=l(r(452)),f=function(e){var a=e.name,r=e.namespace,n=e.cluster,l=(0,c.useState)(!0),f=(0,i.default)(l,2),d=f[0],p=f[1],m=(0,c.useState)(!1),h=(0,i.default)(m,2),v=h[0],g=h[1],y=function(){var e=(0,o.default)(u.default.mark((function e(){var t,l;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new s.default,p(!0),e.next=4,t.fetchList({cluster:n,namespace:r,pvcName:a});case 4:l=e.sent,g(l.length>0),p(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,c.useEffect)((function(){y()}),[]);var E=v?t("MOUNTED"):t("NOT_MOUNTED");return d?"":c.default.createElement("span",null,E)};a.default=f},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ClusterResourceStatus",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"ServiceComponentStatus",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"ETCDStatus",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"ETCDNodes",{enumerable:!0,get:function(){return o.default}});var n=r(a(3804)),l=r(a(3807)),u=r(a(3810)),o=r(a(3813))},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(9),a(4),a(316),a(23),a(24),a(17),a(64),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(9),a(4),a(316),a(22),a(23),a(57),a(24),a(17),a(64);var n=r(a(58)),l=r(a(43));a(41);var u,o,i,c=r(a(44)),s=r(a(65)),f=r(a(36)),d=r(a(37)),p=r(a(88)),m=r(a(55)),h=r(a(56)),v=r(a(51)),g=r(a(49)),y=(r(a(66)),a(14)),E=r(a(26)),b=a(52),_=r(a(845)),O=r(a(323));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,v.default)(e);if(t){var n=(0,v.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,h.default)(this,a)}}var C=(u=function(e){(0,m.default)(h,e);var t,a,r,u=S(h);function h(){var e;(0,f.default)(this,h);for(var t=arguments.length,a=new Array(t),r=0;r1&&void 0!==c[1]?c[1]:{},r=a.cluster,this.statistics.isLoading=!0,n={type:"statistics"},u=this.getApi({workspace:t,cluster:r}),e.next=6,(0,b.to)(request.get(u,n));case 6:return o=e.sent,i=this.getResult(o),this.statistics={data:i,isLoading:!1},e.abrupt("return",i);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getDevopsCount",value:(a=(0,c.default)(l.default.mark((function e(t){var a,r,n;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new O.default,e.next=3,request.get(a.getBaseUrl({workspace:t}),{paging:"limit=Infinity"});case 3:return r=e.sent,n=r&&r.items.length>0?r.items.length:0,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"fetchApplicationResourceMetrics",value:(t=(0,c.default)(l.default.mark((function e(t){var a,r,u,o,i,c,s,f,d,p;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.workspace,r=t.namespace,u=t.autoRefresh,o=void 0!==u&&u,i=(0,n.default)(t,["workspace","namespace","autoRefresh"]),o?i.last=!0:this.resourceMetrics.isLoading=!0,i.cluster&&(this.cluster=i.cluster),c=this.getParams(i),s=/^[a-zA-Z]+_/g,f=(0,E.default)(i.metrics,"[0]","").replace(s,"workspace_"),r&&"all"!==r&&(c.metrics_filter="".concat(f.replace(s,"namespace_"),"$")),e.next=9,(0,b.to)(request.get("".concat(this.getApi({cluster:this.cluster,workspace:a,namespace:r})),c));case 9:return d=e.sent,p=this.getResult(d),o&&(p=this.getRefreshResult(p,this.resourceMetrics.originData)),this.resourceMetrics={originData:p,data:(0,E.default)(Object.values(p),"[0].data.result",{}),isLoading:!1},e.abrupt("return",p);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),h}(_.default),o=(0,g.default)(u.prototype,"statistics",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:{},isLoading:!1}}}),i=(0,g.default)(u.prototype,"resourceMetrics",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{originData:{},data:{},isLoading:!1}}}),(0,g.default)(u.prototype,"fetchStatistics",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchStatistics"),u.prototype),(0,g.default)(u.prototype,"getDevopsCount",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"getDevopsCount"),u.prototype),(0,g.default)(u.prototype,"fetchApplicationResourceMetrics",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchApplicationResourceMetrics"),u.prototype),u);t.default=C},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(31),r(84),r(73),r(18),r(192),r(16),r(98),r(4),r(23),r(24),r(17),r(85),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(31),r(84),r(73),r(18),r(28),r(192),r(42),r(16),r(98),r(4),r(23),r(57),r(24),r(17),r(85),r(62);var l,u,o,i=n(r(61)),c=n(r(96)),s=n(r(30)),f=n(r(36)),d=n(r(37)),p=n(r(55)),m=n(r(56)),h=n(r(51)),v=n(r(0)),g=r(14),y=r(239),E=r(1818),b=r(186),_=n(r(789)),O=r(52),S=n(r(3)),C=n(r(63)),D=n(r(60)),k=n(r(26)),N=r(791),T=r(72),R=n(r(240)),w=n(r(3862)),I=n(r(3864));function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,h.default)(e);if(t){var n=(0,h.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,m.default)(this,a)}}var P=(0,y.inject)("rootStore")(l=(0,y.observer)(l=(0,N.trigger)((o=u=function(e){(0,p.default)(r,e);var a=M(r);function r(){var e;(0,f.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u0){var c={step:a,times:Math.floor(i/(60*(0,v.getMinutes)(a)))||1,start:u,end:o,lastTime:""};n.props.onSubmit(c)}else h.default.error({content:t("TIMERANGE_SELECTOR_MSG")})}else h.default.error({content:t("TIMERANGE_SELECTOR_ERROR_MSG")})};var l=new Date,o=new Date(l.valueOf()-36e5);return n.formData={step:e.step,start:e.start?[e.start]:[o],end:e.end?[e.end]:[l]},n}return(0,o.default)(r,[{key:"handlerDateClose",value:function(e){var t=this;return function(a){t.formData[e]=a,t.forceUpdate()}}},{key:"render",value:function(){var e=this.props,a=e.onCancel,r=e.className,n=this.formData,u=n.start,o=n.end;return f.default.createElement("div",{className:(0,p.default)(g.default.custom,r)},f.default.createElement("div",{className:g.default.title},t("CUSTOM_TIME_RANGE")),f.default.createElement(m.Form,{data:this.formData},f.default.createElement(m.Form.Item,{label:t("START_TIME")},f.default.createElement(m.DatePicker,{name:"start",defaultDate:u[0],maxDate:o[0],enableTime:!0,enableSeconds:!0,dateFormat:"Y-m-d H:i:S",onClose:this.handlerStartDateClose})),f.default.createElement(m.Form.Item,{label:t("END_TIME")},f.default.createElement(m.DatePicker,{name:"end",defaultDate:o[0],maxDate:o[0],enableTime:!0,enableSeconds:!0,dateFormat:"Y-m-d H:i:S",onClose:this.handlerEndDateClose})),this.props.showStep&&f.default.createElement(m.Form.Item,{label:t("SAMPLING_INTERVAL")},f.default.createElement(m.Select,{className:g.default.selectBox,defaultValue:"1m",name:"step",options:(0,v.getTimeOptions)(E)})),f.default.createElement("div",{className:(0,p.default)(g.default.actions,(0,l.default)({},g.default.bottom10,!this.props.showStep))},f.default.createElement(m.Button,{onClick:a},t("CANCEL")),f.default.createElement(m.Button,{type:"control",onClick:this.handleOk},t("OK")))))}}]),r}(f.default.Component);a.default=b,b.propTypes={showStep:d.default.bool,step:d.default.string,times:d.default.number,onSubmit:d.default.func,onCancel:d.default.func},b.defaultProps={showStep:!0,step:"10m",times:30,onSubmit:function(){},onCancel:function(){}}},,,function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1e3)).default);t.default=c},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(1566)),l=r(a(2388));n.default.Form=l.default;var u=n.default;t.default=u},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(9),a(4),a(23),a(57),a(17);var n,l,u,o,i,c,s,f,d,p,m,h,v,g,y,E,b,_,O,S,C,D,k=r(a(65)),N=r(a(36)),T=r(a(88)),R=r(a(37)),w=r(a(55)),I=r(a(56)),M=r(a(51)),P=(r(a(66)),r(a(49))),A=r(a(0)),j=a(1),L=r(a(3)),x=r(a(74)),U=a(239),z=a(14),F=a(186),G=a(453),V=r(a(2450));function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,M.default)(e);if(t){var n=(0,M.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,I.default)(this,a)}}var Y=(0,U.observer)((D=C=function(e){(0,w.default)(a,e);var t=B(a);function a(e){var r;return(0,N.default)(this,a),(r=t.call(this,e)).handleContainerClick=function(e){Math.abs(r.deltaX)>10||Math.abs(r.deltaY)>10?e.stopPropagation():r.props.onClick(e)},r.fullScreenFlagChange=function(){r.isFullscreen=!r.isFullscreen},(0,k.default)(r,"scale",u,(0,T.default)(r)),(0,k.default)(r,"translateX",o,(0,T.default)(r)),(0,k.default)(r,"translateY",i,(0,T.default)(r)),(0,k.default)(r,"isFullscreen",c,(0,T.default)(r)),(0,k.default)(r,"initialComponent",s,(0,T.default)(r)),(0,k.default)(r,"initialPosition",f,(0,T.default)(r)),(0,k.default)(r,"initialScale",d,(0,T.default)(r)),(0,k.default)(r,"handleWheel",p,(0,T.default)(r)),r.stopPropagation=function(e){e.stopPropagation()},(0,k.default)(r,"handleZoomOut",m,(0,T.default)(r)),(0,k.default)(r,"handleZoomIn",h,(0,T.default)(r)),(0,k.default)(r,"handleNormalSize",v,(0,T.default)(r)),(0,k.default)(r,"handleAutoSize",g,(0,T.default)(r)),(0,k.default)(r,"handleContentMove",y,(0,T.default)(r)),(0,k.default)(r,"handleMouseLeave",E,(0,T.default)(r)),(0,k.default)(r,"handleMouseDown",b,(0,T.default)(r)),(0,k.default)(r,"handleMouseUp",_,(0,T.default)(r)),(0,k.default)(r,"handleChangeScale",O,(0,T.default)(r)),(0,k.default)(r,"toggleFullscreen",S,(0,T.default)(r)),r.initPosition={x:0,y:0},r.lastPosition={x:0,y:0},r.isMoved=!1,r}return(0,R.default)(a,[{key:"getChildContext",value:function(){return{scale:this.scale}}}]),(0,R.default)(a,[{key:"componentDidMount",value:function(){var e=this;if(this.initialComponent(),(0,G.addFullScreenChangeEvents)(this.fullScreenFlagChange),this.container&&this.container.addEventListener("wheel",this.handleWheel),this.content){var t=this.content.getBoundingClientRect(),a=t.left,r=t.top;this.domOffsetX=a,this.domOffsetY=r}this.content&&(this.setStyleReaction=(0,z.reaction)((function(){return e.styles}),(function(){(0,x.default)(e.content,"style.transform",(0,z.toJS)(e.styles).transform)}),{fireImmediately:!0}))}},{key:"componentWillUnmount",value:function(){(0,G.removeFullScreenChangeEvents)(this.fullScreenFlagChange),this.container&&this.container.removeEventListener("wheel",this.handleWheel,!1),this.setStyleReaction&&this.setStyleReaction()}},{key:"render",value:function(){var e=this,t=this.props,a=t.children,r=t.className,n=t.contentClassName,l=t.controlStyle,u=t.enableToggleFullScreen,o=t.onRefresh;return A.default.createElement("div",{className:(0,L.default)(V.default.container,r),onClickCapture:this.handleContainerClick,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleContentMove,onMouseUp:this.handleMouseUp,onMouseDown:this.handleMouseDown,"data-container":"pipeline",ref:function(t){e.container=t}},A.default.createElement("div",{className:V.default.controls,style:l,onMouseLeave:this.stopPropagation,onMouseMove:this.stopPropagation},u?A.default.createElement("div",{className:V.default.control,onClick:this.toggleFullscreen},A.default.createElement(F.Icon,{name:this.isFullscreen?"minimize":"maximize",clickable:!0})):null,A.default.createElement("div",{className:V.default.control,onClick:this.handleZoomOut},A.default.createElement(F.Icon,{name:"add",clickable:!0})),A.default.createElement("div",{className:V.default.control,onClick:this.handleZoomIn},A.default.createElement(F.Icon,{name:"substract",clickable:!0})),o&&A.default.createElement("div",{className:V.default.control,onClick:o},A.default.createElement(F.Icon,{name:"refresh",clickable:!0}))),A.default.createElement("div",{className:(0,L.default)(V.default.main_content,n),ref:function(t){e.content=t}},a))}},{key:"styles",get:function(){return{transform:"translate3d(".concat(this.translateX,"px, ").concat(this.translateY,"px, 0)\n scale(").concat(this.scale,")")}}}]),a}(A.default.Component),C.defaultProps={onClick:function(){},enableToggleFullScreen:!0,XOffset:0,YOffset:0},C.childContextTypes={scale:j.PropTypes.number},l=D,(0,P.default)(l.prototype,"styles",[z.computed],Object.getOwnPropertyDescriptor(l.prototype,"styles"),l.prototype),u=(0,P.default)(l.prototype,"scale",[z.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),o=(0,P.default)(l.prototype,"translateX",[z.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),i=(0,P.default)(l.prototype,"translateY",[z.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 60}}),c=(0,P.default)(l.prototype,"isFullscreen",[z.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),s=(0,P.default)(l.prototype,"initialComponent",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.props.initialScale?e.scale=e.props.initialScale:e.initialScale(),e.initialPosition()}}}),f=(0,P.default)(l.prototype,"initialPosition",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=e.props,a=t.XOffset,r=t.YOffset;e.translateX=a,e.translateY=r,e.lastPosition={x:e.translateX,y:e.translateY}}}}),d=(0,P.default)(l.prototype,"initialScale",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=e.container.clientWidth/e.content.clientWidth,a=e.container.clientHeight/e.content.clientHeight,r=Math.min(t,a);e.scale=r>1?1:Math.max(r,.6)}}}),p=(0,P.default)(l.prototype,"handleWheel",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){t.preventDefault(),t.stopPropagation();var a=t.deltaY>0?1:-1,r=t.clientY-e.domOffsetY,n=t.clientX-e.domOffsetX,l=-.01*(Math.abs(t.deltaY)>5?5*a:t.deltaY),u=e.scale+l;if(u<1&&u>.2){var o=e.content.clientWidth*e.scale,i=e.content.clientHeight*e.scale;n>e.translateX+o?e.translateX=-l*e.content.clientWidth+e.translateX:n>=e.translateX&&(e.translateX=-l*(n-e.translateX)/e.scale+e.translateX),r>e.translateY+i?e.translateY=-l*e.content.clientHeight+e.translateY:r>=e.translateY&&(e.translateY=-l*(r-e.translateY)/e.scale+e.translateY),e.scale=u,e.lastPosition={x:e.translateX,y:e.translateY},e.isMoved=!0}}}}),m=(0,P.default)(l.prototype,"handleZoomOut",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.scale<1&&(e.scale+=.2,e.isMoved=!0)}}}),h=(0,P.default)(l.prototype,"handleZoomIn",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.scale>.4&&(e.scale-=.2,e.isMoved=!0)}}}),v=(0,P.default)(l.prototype,"handleNormalSize",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.scale=1,e.translateX=30,e.translateY=60,e.lastPosition={x:e.translateX,y:e.translateY}}}}),g=(0,P.default)(l.prototype,"handleAutoSize",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.initialScale(),e.initialPosition()}}}),y=(0,P.default)(l.prototype,"handleContentMove",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.DragContent&&(e.translateX=t.clientX-e.initPosition.x+e.lastPosition.x,e.translateY=t.clientY-e.initPosition.y+e.lastPosition.y,e.isMoved=!0)}}}),E=(0,P.default)(l.prototype,"handleMouseLeave",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){"pipeline"===t.currentTarget.dataset.container&&(e.lastPosition={x:e.translateX,y:e.translateY},e.DragContent=!1)}}}),b=(0,P.default)(l.prototype,"handleMouseDown",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){t.preventDefault(),0===t.button&&(e.initPosition={x:t.clientX,y:t.clientY},e.DragContent=!0)}}}),_=(0,P.default)(l.prototype,"handleMouseUp",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.DragContent&&(e.deltaX=t.clientX-e.initPosition.x,e.deltaY=t.clientY-e.initPosition.y,e.translateX=e.deltaX+e.lastPosition.x,e.translateY=e.deltaY+e.lastPosition.y,e.lastPosition={x:e.translateX,y:e.translateY},e.DragContent=!1)}}}),O=(0,P.default)(l.prototype,"handleChangeScale",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.scale=t/100}}}),S=(0,P.default)(l.prototype,"toggleFullscreen",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=e.props.onFullScreen;if(t)return e.fullScreenFlagChange(),t();e.isFullscreen?(0,G.exitFullScreen)(e.container):(0,G.enterFullScreen)(e.container)}}}),n=l))||n;t.default=Y},,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(22),a(196),a(7),a(110),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(5),a(11),a(6),a(18),a(28),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(196),a(7),a(110);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o,i,c,s=r(a(44)),f=r(a(65)),d=r(a(36)),p=r(a(37)),m=r(a(49)),h=(r(a(66)),r(a(26))),v=r(a(74)),g=a(14),y=r(a(105));function E(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function b(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(a.apiVersion).concat(a.getPath(e),"/").concat(a.module)},this.getDetailUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(a.getListUrl(e),"/").concat(e.name)},(0,f.default)(this,"submitting",c,this),this.module=r,this.kind=n,this.apiVersion=l}var t,a;return(0,p.default)(e,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r="";return t&&(r+="/klusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"fetchList",value:(a=(0,s.default)(n.default.mark((function e(){var t,a,r,l,o,i,c,s,f,d,p=this,m=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},a=t.cluster,r=t.namespace,l=t.page,o=void 0===l?this.list.page:l,i=t.name,c=(0,u.default)(t,["cluster","namespace","page","name"]),this.list.isLoading=!0,(s=c).limit?this.list.limit=s.limit:s.limit=this.list.limit,this.list.continues[o]&&(s.continue=this.list.continues[o]),i&&(s.fieldSelector="metadata.name=".concat(i)),e.next=8,request.get(this.getListUrl({cluster:a,namespace:r}),s);case 8:return f=e.sent,d=f.items.map((function(e){return b({cluster:a,namespace:r},p.mapper(e))})),this.list.continues[Number(o)+1]=f.metadata.continue,1===o&&(this.list.total=d.length+(f.metadata.remainingItemCount||0)),(0,g.extendObservable)(this.list,{data:d,page:Number(o),name:i}),this.list.isLoading=!1,e.abrupt("return",this.list);case 15:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"update",value:(t=(0,s.default)(n.default.mark((function e(t,a){var r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get(this.getDetailUrl(t));case 2:return r=e.sent,(l=(0,h.default)(r,"metadata.resourceVersion"))&&(0,v.default)(a,"metadata.resourceVersion",l),e.abrupt("return",this.submitting(request.put(this.getDetailUrl(t),a)));case 6:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})},{key:"patch",value:function(e,t){return this.submitting(request.patch(this.getDetailUrl(e),t))}},{key:"delete",value:function(e){return this.submitting(request.delete(this.getDetailUrl(e)))}},{key:"mapper",get:function(){return y.default.customresourcedefinitions}}]),e}(),i=(0,m.default)(o.prototype,"list",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,continues:{1:""},isLoading:!0}}}),c=(0,m.default)(o.prototype,"submitting",[g.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){return e.isSubmitting=!0,setTimeout((function(){t.catch((function(){})).finally((function(){e.isSubmitting=!1}))}),500),t}}}),(0,m.default)(o.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchList"),o.prototype),(0,m.default)(o.prototype,"update",[g.action],Object.getOwnPropertyDescriptor(o.prototype,"update"),o.prototype),(0,m.default)(o.prototype,"patch",[g.action],Object.getOwnPropertyDescriptor(o.prototype,"patch"),o.prototype),(0,m.default)(o.prototype,"delete",[g.action],Object.getOwnPropertyDescriptor(o.prototype,"delete"),o.prototype),o);t.default=_},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(16),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l=r(a(44)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=a(72);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var p=function(e){(0,i.default)(a,e);var t=d(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/nodes").concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath(t),"/nodes")},e.createEdgeNode=function(){var t=(0,l.default)(n.default.mark((function t(a){var r,l,u,o,i,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,l=a.name,u=a.ip,o=a.defaultTaint,i="kapis/kubeedge.kubesphere.io/v1beta1/".concat(e.getPath({cluster:r}),"/nodes/join"),t.next=4,request.get(i,{node_name:l,node_ip:u,add_default_taint:o},{},(function(e){return e}));case 4:return c=t.sent,t.abrupt("return",c);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return(0,o.default)(a,[{key:"apiVersion",get:function(){return f.API_VERSIONS.nodes||""}}]),a}(r(a(856)).default);t.default=p},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(61)),u=r(a(30)),o=r(a(58));a(41);var i,c=r(a(44)),s=r(a(36)),f=r(a(37)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=r(a(1173)),g=a(14),y=r(a(26)),E=a(72);function b(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function _(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"clusters/".concat(t.cluster,"/").concat(e.getNetworkUrl).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getNetDetailUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getNetWorkUrl(t),"/").concat(t.name)},e.store=new v.default({module:"ippools",kind:"IPPool",apiVersion:"kapis/crd.projectcalico.org/v1"}),e}return(0,f.default)(p,[{key:"fetchList",value:(u=(0,c.default)(n.default.mark((function e(){var t,a,r,u,i,c,s,f,d,p,m=this,h=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.length>0&&void 0!==h[0]?h[0]:{},a=t.cluster,r=t.workspace,u=t.namespace,i=t.more,c=t.devops,s=(0,o.default)(t,["cluster","workspace","namespace","more","devops"]),this.list.isLoading=!0,s.sortBy||void 0!==s.ascending||(s.sortBy=E.LIST_DEFAULT_ORDER[this.module]||"createTime"),s.limit!==1/0&&-1!==s.limit||(s.page=1),s.limit=s.limit||10,s.page=s.page||1,e.next=8,request.get(this.getNetWorkUrl({cluster:a,workspace:r,namespace:u,devops:c}),this.getFilterParams(s));case 8:return f=e.sent,d=((0,y.default)(f,"items")||[]).map((function(e){return _(_({cluster:a,namespace:u},e),m.mapper(e))})),p=1===s.page?d.length+(f.metadata.remainingItemCount||0):this.list.total,this.list.update(_(_({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(d)):d,total:p},s),{},{limit:Number(s.limit)||10,page:Number(s.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",d);case 13:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"fetchDetail",value:(r=(0,c.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get(this.getNetDetailUrl(t));case 3:return a=e.sent,r=_(_({},t),this.mapper(a)),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"bindIpPoolToNodeGroup",value:(a=(0,c.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.nodetree,l=t.params,u="/clusters/".concat(a,"/kapis/infra.kubesphere.io/v1alpha1/nodetrees/").concat(r),e.abrupt("return",request.patch(u,l));case 3:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"delIpPoolToNodeGroup",value:(t=(0,c.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.nodetree,l=t.params,u="/clusters/".concat(a,"/kapis/infra.kubesphere.io/v1alpha1/nodetrees/").concat(r),e.abrupt("return",request.patch(u,l));case 3:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"kapis/crd.projectcalico.org/v1"}}]),p}(r(a(1323)).default),(0,h.default)(i.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,h.default)(i.prototype,"fetchDetail",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),(0,h.default)(i.prototype,"bindIpPoolToNodeGroup",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"bindIpPoolToNodeGroup"),i.prototype),(0,h.default)(i.prototype,"delIpPoolToNodeGroup",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"delIpPoolToNodeGroup"),i.prototype),i);t.default=S},,function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(18),r(16),r(10),r(4),r(22),r(196),r(23),r(24),r(17),r(62),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(18),r(42),r(16),r(10),r(4),r(22),r(196),r(23),r(57),r(24),r(17),r(62);var l=n(r(30)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(26)),h=n(r(74)),v=n(r(3)),g=r(186),y=r(52),E=r(72),b=n(r(851)),_=n(r(456)),O=n(r(933)),S=n(r(1341)),C=n(r(951)),D=n(r(1620)),k=n(r(1622)),N=n(r(2649));function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var R=function(e){(0,s.default)(r,e);var a=T(r);function r(e){var n;return(0,i.default)(this,r),(n=a.call(this,e)).fetchData=(0,o.default)(u.default.mark((function e(){var t,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.secretStore.fetchListByK8s({namespace:n.namespace,cluster:n.props.cluster,fieldSelector:"type=kubernetes.io/basic-auth"});case 2:t=e.sent,a=t.map((function(e){return{label:(0,y.getDisplayName)(e),value:e.name,type:"basic-auth"}})),n.setState({basicSecretOptions:a});case 5:case"end":return e.stop()}}),e)}))),n.fetchImageSecrets=(0,o.default)(u.default.mark((function e(){var t,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.secretStore.fetchListByK8s({namespace:n.namespace,cluster:n.props.cluster,fieldSelector:"type=kubernetes.io/dockerconfigjson"});case 2:t=e.sent,a=t.map((function(e){var t=(0,m.default)(e,'data[".dockerconfigjson"].auths',{}),a=Object.keys(t)[0]||"";return{label:(0,y.getDisplayName)(e),value:e.name,repoUrl:a,type:"dockerconfigjson"}})),n.setState({imageSecretOptions:a});case 5:case"end":return e.stop()}}),e)}))),n.getTemplateList=(0,o.default)(u.default.mark((function e(){var t;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.setState({isGetTemplateListLoading:!0}),e.next=3,n.builderStore.getBuilderTemplate({cluster:n.props.cluster});case 3:t=e.sent,n.setState({builderTemplateLists:(0,m.default)(t,"items",[]),isGetTemplateListLoading:!1});case 5:case"end":return e.stop()}}),e)}))),n.handleImageTemplateChange=function(e){var t=e.environment,a=e.docUrl,r=(0,m.default)(globals,"user.lang","zh"),l=(t||[]).map((function(e){var t=(e.description||"").split(". "),a="zh"===r?(0,m.default)(t,"1",e.description):(0,m.default)(t,"0",e.description);return e.label="".concat(e.key," (").concat(a,")"),e.value=e.key,e}));n.setState({environment:l,docUrl:a})},n.handleSecretChange=function(){n.handleRepoReadableCheck()},n.handleImageSecretChange=function(e,t){var a=n.props.formTemplate,r=(0,m.default)(t,"[0]repoUrl","");(0,h.default)(a,"".concat(n.prefix,'metadata.annotations["kubesphere.io/repoUrl"]'),r)},n.handleRepoReadableCheck=(0,o.default)(u.default.mark((function e(){var a,r,l,o,i,c,s;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.props,r=a.formTemplate,l=a.isEdgeWize,o=(0,m.default)(r,"".concat(n.prefix,"spec.config.sourceUrl"),"")){e.next=4;break}return e.abrupt("return");case 4:return n.setState({readRepoLoading:!0}),i=(0,m.default)(r,"".concat(n.prefix,"spec.config.gitSecretRef.name"),""),e.next=8,n.builderStore.verifyRepoReadable(o,i,n.namespace,l?n.cluster:void 0).finally((function(){n.setState({readRepoLoading:!1})}));case 8:if(c=e.sent,"success"!==(s=(0,m.default)(c,"message",""))){e.next=14;break}return n.setState({repoReadError:null}),i||n.setState({repoNeedSecret:!1}),e.abrupt("return");case 14:n.setState({repoReadError:{message:t(s)},repoNeedSecret:!0});case 15:case"end":return e.stop()}}),e)}))),n.isEdgeWize=(0,y.isEdgeWizePage)(),n.secretStore=n.isEdgeWize?new O.default:new b.default,n.builderStore=n.isEdgeWize?new S.default:new _.default,n.state={isGetTemplateListLoading:!0,environment:[],basicSecretOptions:[],imageSecretOptions:[],repoReadError:null,repoNeedSecret:!0,readRepoLoading:!1,docUrl:""},n}return(0,c.default)(r,[{key:"componentDidMount",value:function(){this.fetchData(),this.fetchImageSecrets(),this.getTemplateList(),this.handleRepoReadableCheck()}},{key:"renderAdvancedSetting",value:function(){var e=t.html("S2I_ENVIRONMENT_DESC",{link:this.state.docUrl||(0,y.getDocsUrl)("s2i_template")});return p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{className:N.default.margin_b_10},p.default.createElement(g.Form.Item,{label:t("TRIGGER_TOKEN"),desc:t("TRIGGER_TOKEN_DESC"),rules:[{pattern:/^[a-zA-Z0-9]+$/,message:"".concat(t("INVALID_TRIGGER_TOKEN_DESC"))}]},p.default.createElement(g.Input,{name:"".concat(this.prefix,"spec.config.secretCode"),defaultValue:""}))),p.default.createElement("div",{className:N.default.margin_b_10},p.default.createElement(g.Form.Item,{label:t("CODE_RELATIVE_PATH"),desc:t("CODE_RELATIVE_PATH_DESC")},p.default.createElement(g.Input,{name:"".concat(this.prefix,"spec.config.contextDir"),defaultValue:"/"}))),p.default.createElement(g.Alert,{className:N.default.margin_b_10,message:(0,y.learnMoreTip)(e),type:"info"}),p.default.createElement(g.Form.Item,null,p.default.createElement(D.default,{name:"".concat(this.prefix,"spec.config.environment"),options:this.state.environment})))}},{key:"render",value:function(){var e=this.props,a=e.formTemplate,r=e.formRef,n=e.mode,u=e.prefix,o=t.html("S2I_TARGET_IMAGE_REPOSITORY_DESC",{link:(0,y.getDocsUrl)("secrets")});return p.default.createElement(g.Form,{ref:r,data:a},p.default.createElement(k.default,{loading:this.state.isGetTemplateListLoading,formTemplate:u?a[u]:a,builderTemplate:this.state.builderTemplateLists,onEnvironmentChange:this.handleImageTemplateChange}),p.default.createElement("div",{className:(0,v.default)(N.default.columns,(0,l.default)({},N.default.columsEdit,"edit"===n))},p.default.createElement("div",{className:N.default.column},p.default.createElement(g.Loading,{spinning:this.state.readRepoLoading,size:18},p.default.createElement(g.Form.Item,{label:t("CODE_REPOSITORY_URL"),desc:t("CODE_REPOSITORY_URL_DESC"),error:this.state.repoReadError,rules:[{required:!0,message:t("PARAM_REQUIRED")}]},p.default.createElement(g.Input,{name:"".concat(this.prefix,"spec.config.sourceUrl"),onBlur:this.handleRepoReadableCheck})))),p.default.createElement("div",{className:"is-2"},p.default.createElement(g.Form.Item,{label:t("CODE_REPOSITORY_BRANCH"),rules:[{required:!0,message:t("PARAM_REQUIRED")}]},p.default.createElement(g.Input,{name:"".concat(this.prefix,"spec.config.revisionId"),defaultValue:"master"}))),p.default.createElement("div",{className:"is-half"},p.default.createElement(g.Loading,{spinning:this.state.readRepoLoading,size:18},p.default.createElement(g.Form.Item,{className:this.state.repoNeedSecret?"":N.default.disabled,label:t("CODE_REPOSITORY_KEY"),desc:this.state.repoNeedSecret?t("CODE_REPOSITORY_KEY_DESC"):t("CODE_REPOSITORY_KEY_NOT_REQUIRED")},p.default.createElement(g.Select,{onChange:this.handleSecretChange,options:this.state.basicSecretOptions,name:"".concat(this.prefix,"spec.config.gitSecretRef.name"),placeholder:" "}))))),p.default.createElement("div",{className:(0,v.default)(N.default.columns,(0,l.default)({},N.default.columsEdit,"edit"===n))},p.default.createElement("div",{className:N.default.column},p.default.createElement(g.Form.Item,{label:t("IMAGE_NAME"),desc:t("S2I_IMAGE_NAME_DESC"),rules:[{required:!0,message:t("PARAM_REQUIRED")},{pattern:E.PATTERN_IMAGE_NAME,message:t("INVALID_NAME_DESC",{message:t("S2I_IMAGE_NAME_DESC")})}]},p.default.createElement(g.Input,{name:"".concat(this.prefix,"spec.config.imageName")}))),p.default.createElement("div",{className:"is-2"},p.default.createElement(g.Form.Item,{label:t("IMAGE_TAG"),rules:[{required:!0,message:t("PARAM_REQUIRED")}]},p.default.createElement(g.Input,{name:"".concat(this.prefix,"spec.config.tag"),defaultValue:"latest"}))),p.default.createElement("div",{className:"is-half"},p.default.createElement(g.Form.Item,{label:t("TARGET_IMAGE_REPOSITORY"),desc:(0,y.learnMoreTip)(o),rules:[{required:!0,message:t("PARAM_REQUIRED")}]},p.default.createElement(g.Select,{name:"".concat(this.prefix,"spec.config.pushAuthentication.secretRef.name"),options:this.state.imageSecretOptions,onChange:this.handleImageSecretChange,placeholder:" "})))),p.default.createElement(C.default,null,this.renderAdvancedSetting()))}},{key:"prefix",get:function(){var e=this.props.prefix;return e?"".concat(e,"."):""}},{key:"namespace",get:function(){return this.props.namespace}},{key:"cluster",get:function(){return this.props.match.cluster}}]),r}(p.default.Component);a.default=R,R.defaultProps={mode:"create",prefix:""}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51));function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var s=function(e){(0,u.default)(a,e);var t=c(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/applications").concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/applications")},e.getDetailUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getListUrl(t),"/").concat(t.name)},(0,v.default)(e,"setSelectRowKeys",m,(0,E.default)(e)),e}return(0,y.default)(T,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r=e.workspace,n=e.devops,l="";return t&&(l+="/klusters/".concat(t)),r&&(l+="/workspaces/".concat(r)),a&&(l+="/namespaces/".concat(a)),n&&(l+="/namespaces/".concat(n)),l}},{key:"fetchList",value:(O=(0,h.default)(n.default.mark((function e(){var t,a,r,u,i,c,s,f,d=this,p=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},a=t.devops,t.workspace,r=t.cluster,u=t.more,i=(0,o.default)(t,["devops","workspace","cluster","more"]),this.list.isLoading=!0,i.limit!==1/0&&-1!==i.limit||(i.limit=-1,i.page=1),i.limit=i.limit||10,c="".concat(this.getResourceUrl({namespace:a,cluster:r})),e.next=7,request.get(c,M({},i),{},(function(){return[]}));case 7:return s=e.sent,f=Array.isArray(s.items)?s.items.map((function(e){return M({},d.mapper(M(M({},e),{},{devops:a})))})):[],this.list.update(M(M({data:u?[].concat((0,l.default)(this.list.data),(0,l.default)(f)):f,total:s.totalItems||s.total_count||f.length||0},i),{},{limit:Number(i.limit)||10,page:Number(i.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",f);case 11:case"end":return e.stop()}}),e,this)}))),function(){return O.apply(this,arguments)})},{key:"create",value:(_=(0,h.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.data,r=t.devops,l=t.cluster,u="".concat(this.getResourceUrl({namespace:r,cluster:l})),e.next=4,request.post(u,a);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return _.apply(this,arguments)})},{key:"updateSync",value:(i=(0,h.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.data,r=t.application,l=t.devops,u=t.cluster,o="".concat(this.getResourceUrl({namespace:l,cluster:u}),"/").concat(r,"/sync"),e.abrupt("return",this.submitting(request.post(o,a)));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"update",value:(u=(0,h.default)(n.default.mark((function e(t,a){var r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat(this.getResourceUrl({namespace:t.devops,cluster:t.cluster}),"/").concat(a.metadata.name),e.abrupt("return",this.submitting(request.put(r,a)));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"patch",value:function(e,t){var a="".concat(this.getResourceUrl({namespace:e.devops,cluster:e.cluster}),"/").concat(t.metadata.name);return this.submitting(request.put(a,t))}},{key:"delete",value:function(e){var t=(0,C.default)(M(M({},e),{},{namespace:e.devops}),"devops");return this.submitting(request.delete("".concat(this.getDetailUrl(t)).concat(t.isRelated?"?cascade=true":"")))}},{key:"fetchDetail",value:(r=(0,h.default)(n.default.mark((function e(t){var a,r,l,u,o,i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.isSilent,l=t.devops,u=t.cluster,r||(this.isLoading=!0),e.next=4,request.get("".concat(this.getResourceUrl({namespace:l,cluster:u}),"/").concat(a));case 4:return o=e.sent,i=this.mapper(M(M({},o),{},{devops:l})),this.detail=i,this.isLoading=!1,e.abrupt("return",i);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getClustersList",value:(a=(0,h.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="".concat(this.apiVersion,"/clusters"),e.next=3,request.get(a,null,null,(function(){return[]}));case 3:if(r=e.sent,l="default",!globals.app.isMultiCluster){e.next=11;break}return e.next=8,request.get("kapis/tenant.kubesphere.io/v1beta1/clusters");case 8:u=e.sent,o=u.items.find((function(e){return(0,k.default)(e,'metadata.labels["cluster-role.kubesphere.io/host"]')})),l=(0,N.default)(o,"metadata.name",t||(0,w.getHostClusterName)());case 11:(0,D.default)(r)?this.clustersList=[{server:"https://kubernetes.default.svc",name:"in-cluster",label:l}]:this.clustersList=r.map((function(e){return M(M({},e),{},{label:"in-cluster"===e.name?l:e.name})})),globals.hostClusterName=l;case 13:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchStatusSummary",value:(t=(0,h.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.devops,r=t.cluster,l="".concat(this.apiVersion).concat(this.getPath({namespace:a,cluster:r}),"/application-summary"),e.next=4,request.get(l);case 4:u=e.sent,this.summary=u||{};case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),T}(R.default),c=(0,S.default)(i.prototype,"list",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",filters:{},isLoading:!1,selectedRowKeys:[]}}}),s=(0,S.default)(i.prototype,"clustersList",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),f=(0,S.default)(i.prototype,"detail",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),d=(0,S.default)(i.prototype,"syncResult",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,total:0,filters:{},isLoading:!1}}}),p=(0,S.default)(i.prototype,"summary",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),m=(0,S.default)(i.prototype,"setSelectRowKeys",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.list.selectedRowKeys=t}}}),(0,S.default)(i.prototype,"fetchList",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,S.default)(i.prototype,"create",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"create"),i.prototype),(0,S.default)(i.prototype,"updateSync",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"updateSync"),i.prototype),(0,S.default)(i.prototype,"update",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"update"),i.prototype),(0,S.default)(i.prototype,"patch",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"patch"),i.prototype),(0,S.default)(i.prototype,"delete",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"delete"),i.prototype),(0,S.default)(i.prototype,"fetchDetail",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),(0,S.default)(i.prototype,"getClustersList",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"getClustersList"),i.prototype),(0,S.default)(i.prototype,"fetchStatusSummary",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchStatusSummary"),i.prototype),i);t.default=A},function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(109),r(5),r(11),r(31),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(316),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.MetricTypes=void 0,r(12),r(109),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(24),r(17),r(62),r(7);var u=n(r(315)),o=n(r(43)),i=n(r(58));r(41);var c,s=n(r(44)),f=n(r(30)),d=n(r(36)),p=n(r(37)),m=n(r(55)),h=n(r(56)),v=n(r(51)),g=n(r(0)),y=n(r(26)),E=n(r(189)),b=n(r(788)),_=n(r(795)),O=n(r(792)),S=l(r(793)),C=n(r(796)),D=r(52),k=n(r(439)),N=r(794),T=n(r(959));function R(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t0&&void 0!==u[0]?u[0]:{},r=a.silent,n=(0,i.default)(a,["silent"]),e.query=n,n.type=n.type||"user",e.type=n.type,l=e.props.store,r&&(l.list.silent=!0),t.next=8,l.fetchList(w(w({},e.props.match.params),n));case 8:return t.next=10,e.monitoringStore.fetchMetrics(w(w({},e.props.match.params),{},{resources:l.list.data.map((function(e){return e.name})),metrics:Object.values((0,D.hideGPUByLicense)(M,e.cluster)),last:!0}));case 10:l.list.silent=!1;case 11:case"end":return t.stop()}}),t)}))),e.getLastValue=function(t,a){var r=e.monitoringStore.data,n=((0,y.default)(r,"".concat(a,".data.result"))||[]).find((function(e){return(0,y.default)(e,"metric.namespace")===t.name}));return(0,y.default)(n,"value[1]",0)},e.getColumns=function(){var a=e.props,r=a.getSortOrder,n=a.prefix,l=[{title:t("NAME"),dataIndex:"name",sorter:!0,sortOrder:r("name"),search:!0,render:function(e,t){return g.default.createElement(b.default,{to:"Terminating"===t.status?null:"".concat(n,"/").concat(e),icon:"project",iconSize:40,isMultiCluster:t.isFedHostNamespace,desc:t.description||"-",title:(0,D.getDisplayNameNew)(t)})}},{title:t("STATUS"),dataIndex:"status",isHideable:!0,search:!0,render:function(e){return g.default.createElement(_.default,{type:e,name:t(e.toUpperCase()),flicker:!0})}},{title:t("WORKSPACE"),dataIndex:"workspace",isHideable:!0,search:!0,render:function(e){return(0,D.showNameAndAlias)(e,"workspace")}}];return globals.app.hasClusterModule(e.cluster,"whizard-monitoring")&&l.push({title:t("CPU_USAGE"),key:"namespace_cpu_usage",isHideable:!0,render:function(t){return(0,N.getSuitableValue)(e.getLastValue(t,M.cpu),"cpu","-")}},{title:t("MEMORY_USAGE"),key:"namespace_memory_usage_wo_cache",isHideable:!0,render:function(t){return(0,N.getSuitableValue)(e.getLastValue(t,M.memory),"memory","-")}},{title:t("GPU_USAGE"),key:"namespace_gpu_usage",isHideable:!0,render:function(t){return(0,N.getSuitableValue)(e.getLastValue(t,M.gpu),"gpu","-")}},{title:t("GPU_MEMORY_USAGE"),key:"namespace_gpu_memory_usage",isHideable:!0,render:function(t){return(0,N.getSuitableValue)(e.getLastValue(t,M.gpu_memory),"memory","-")}},{title:t("POD_PL"),key:"namespace_pod_count",isHideable:!0,render:function(t){return e.getLastValue(t,M.pod)}}),l},e.showCreate=function(){return e.props.trigger("project.create",w(w({},e.props.match.params),{},{success:function(){return e.getData()}}))},e}return(0,p.default)(r,[{key:"render",value:function(){var e=this.props,t=e.bannerProps,a=e.tableProps,r=this.monitoringStore.isLoading,n=(0,D.hideGPUByLicense)(this.getColumns(),this.cluster);return g.default.createElement(S.ListPage,(0,u.default)({},this.props,{getData:this.getData,module:"namespaces"}),g.default.createElement(O.default,(0,u.default)({},t,{tabs:this.tabs})),g.default.createElement(C.default,(0,u.default)({},a,{className:"table-2-6 table-4-3",itemActions:this.itemActions,tableActions:this.tableActions,columns:n,columnSearch:this.columnSearch,onCreate:"system"===this.type?null:this.showCreate,isLoading:a.isLoading||r})))}},{key:"itemActions",get:function(){var e=this,a=this.props,r=a.trigger,n=a.routing,l=a.name;return[{key:"edit",icon:"pen",text:t("EDIT_INFORMATION"),action:"edit",show:this.showAction,onClick:function(e){return r("resource.baseinfo.edit",{detail:(0,E.default)(e,"workspace"),success:n.query})}},{key:"edit-annotations",icon:"pen",text:t("EDIT_ANNOTATIONS"),action:"manage",show:function(t){return t.workspace!==globals.config.systemWorkspace&&e.showAction(t)},onClick:function(e){return r("resource.annotations.edit",{detail:e})}},{key:"modify",icon:"restart",text:t("ASSIGN_WORKSPACE"),action:"manage",show:function(t){return!t.workspace&&e.showAction(t)},onClick:function(e){return r("project.assignworkspace",{detail:e,success:n.query})}},{key:"delete",icon:"trash",text:t("DELETE"),action:"delete",show:function(t){return t.workspace!==globals.config.systemWorkspace&&e.showAction(t)},onClick:function(e){return r("resource.delete",{type:l,resource:e.name,detail:(0,E.default)(e,"workspace"),success:n.query})}}]}},{key:"tabs",get:function(){return{value:this.type||"user",onChange:this.handleTabChange,options:[{value:"user",label:t("USER_PROJECTS")},{value:"system",label:t("SYSTEM_PROJECTS")}]}}},{key:"tableActions",get:function(){return w(w({},this.props.tableProps.tableActions),{},{onFetch:this.handleFetch})}},{key:"cluster",get:function(){return this.props.match.params.cluster}},{key:"columnSearch",get:function(){var e=(0,D.compareVersion)((0,D.getClusterVersion)(this.cluster),"3.4.0")>=0;return[{dataIndex:"name",title:t("NAME"),search:!0},{dataIndex:"alias",title:t("ALIAS"),search:e}]}}]),r}(g.default.Component))||c;a.default=P},function(e,t,a){e.exports={wrapper:"k0vk_c1ZyPCRUMMpipwCh",titleWrapper:"_2uqWBIFfRH4KunvhbfjI7B",icon:"_1ItfxPdCoCJbI5IBYM8qFz",title:"ThEs3yhp382IH4lTVQgX5",more:"_1b6Sz4BPMxD6xHHK-kt11i",tip:"_2L9SGDIY7BXd_hPf_5P6Rh",tipIcon:"_3SM5xM4niT8oxCDuqIJ7II",operations:"oN75oPJD3rroOyRPHKbui",tipContent:"_1bQzGX9rIXqPoeFOyVVDT8",tabsWrapper:"_2_45-StQhVb_5fgk6w8OF9",banLink:"_1B81eItlzKbA79NDBS3LGZ"}},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(959)).default);t.default=c},,,function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(18),r(97),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(250),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(97),r(191),r(42),r(16),r(159),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(7);var l=n(r(61)),u=n(r(43)),o=n(r(30));r(41);var i=n(r(44)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=r(186),h=n(r(240)),v=n(r(3)),g=n(r(0)),y=n(r(1109)),E=r(1183),b=r(14),_=r(982),O=r(903),S=n(r(3266));function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t=0){var n=t[r];t[r]=t[a],t[a]=n}})),t=t.filter((function(e){return!!e})))};t.handleLevelParams=function(e){var t=e.module,a=v.RESOURCES_METER_TYPE[t];return{level:"Level".concat((0,m.default)(a))}};t.getRetentionDay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"7d";return(0,O.default)().endOf("day").add(1,"second").subtract(1,"day").subtract(e.slice(0,-1),"day")};var N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.step,a=void 0===t?"600s":t,r=e.times,n=void 0===r?20:r,l=parseFloat(a)*n,u=Math.floor((0,O.default)().endOf("day").add(1,"second").subtract(1,"day")/1e3),o=Math.floor(u-l);return{start:o,end:u}};t.getTimeRange=N;t.getTimeParams=function(e){var t=e.isTime,a=e.start,r=e.end,n=e.step,l=void 0===n?"1h":n,u={};if(t){var o=l;if(!r||!a){var i=N({step:(0,_.getMinuteValue)(l)});u.start=i.start,u.end=i.end}a&&(u.start=Math.floor(a/1e3)),r&&(u.end=Math.floor(r/1e3)),Math.floor((u.end-u.start)/3600/24)>=30&&(o="1d"),u.step=(0,_.getMinuteValue)(o)}return u};t.getMetricsFilters=function(e){var t=e.meters,a=e.module,r=[];if((0,f.default)(t)||(0,h.default)(D(a)(t),(function(e){r.push(e)})),!(0,f.default)(r))return{metrics_filter:r.join("|")}};t.getResourceFilters=function(e){var t=e.resources,a=e.module;if(!(0,f.default)(t)){var r=t.join("|"),n={};switch(a){case"applications":n={applications:r};break;case"openpitrixs":n={openpitrixs_ids:r};break;case"services":n={services:r};break;default:n={resources_filter:t.join("|")}}return n}};t.fillEmptyMeterValue=function(e,t){if(!e.step||!e.start||!e.end)return t;var a,r=e.step,n=Math.floor((e.end-e.start)/r)+1;if(((0,p.default)(t)||!(0,s.default)(t)?0:t.length)-1&&(a[e]=(0,b.getValueByUnit)(a[e],n.value,3),a.unit=n)})),a};t.handleWorkloadToKind=function(e){var t=e.deployments,a=e.statefulsets,r=e.daemonsets,n={};return t&&(n.kind="deployments"),a&&(n.kind="statefulsets"),r&&(n.kind="daemonsets"),n};t.handleNodeParams=function(e){var t=e.nodes,a=e.pods,r=e.resources;if(t&&a&&r.length>1)return{resources_filter:void 0}};var T=function(e){var t="";return!e||(0,f.default)(e)?t:(Object.keys(e).forEach((function(a){t+="".concat(a,"=").concat(e[a],",")})),t=t.slice(0,-1))};t.handleLabelSelector=T;t.hasNameSpacesType=function(e){return["services","deployments","statefulsets","daemonsets","pods"].indexOf(e)>-1};t.filterListByType=function(e){var t=e.type,a=(0,u.default)(e,["type"]);return(a.services||a.deployments||a.statefulsets||a.daemonsets)&&"pods"===t&&(0,f.default)(a.labelSelector)?function(){return!1}:function(){return!0}};var R=function(){var e=(0,l.default)(n.default.mark((function e(t){var a,r,l,o,i,s,m,h,v,g,y,E,b;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.levelMeterData,r=t.type,l=t.data,o=t.levelKey,i=(0,u.default)(t,["levelMeterData","type","data","levelKey"]),s=o||i.namespaces,m=(0,c.default)(a,s),h=[],v=[],g="applications"===r?"apps":r,!["services","deployments","statefulsets","daemonsets"].includes(r)){e.next=23;break}if(!i.applications&&!i.openpitrixs){e.next=19;break}return y=(0,d.default)(i),E=i.applications||i.openpitrixs,b=i.applications?"apps":"openpitrixs",s="".concat(s,".").concat(b,".").concat(E),delete y.openpitrixs,delete y.applications,e.next=16,R(C({levelMeterData:a,type:r,data:l,levelKey:s},y));case 16:v=e.sent,e.next=21;break;case 19:h=m&&m[g]?Object.keys(m[g]):[],v=l.map((function(e){var t=h.find((function(t){return t===e.name}));return(0,p.default)(t)||(0,f.default)(t)?void 0:e}));case 21:e.next=29;break;case 23:if("applications"!==r&&"openpitrixs"!==r){e.next=28;break}h=m[g]?Object.keys(m[g]):[],v=l.map((function(e){var t=h.find((function(t){return t===e.name||t===e.cluster_id}));return(0,p.default)(t)||(0,f.default)(t)?void 0:e})),e.next=29;break;case 28:return e.abrupt("return",l);case 29:return v=v.filter((function(e){return!(0,p.default)(e)})),e.abrupt("return",v);case 31:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.filterResourceLevel=R;t.handleWSChartData=function(e){var t,a=e.levelMeterData,r=e.meters,n=e.type,l=e.params;switch(n){case"applications":case"openpitrixs":t=function(e,t,a,r){var n=[],l="applications"===r?"apps":"openpitrixs",u=e[t.namespaces]["".concat(l)];return!(0,f.default)(u)&&Object.keys(u).forEach((function(e){if(u[e]){var t=u[e][v.METER_RESOURCE_USAGE[a]]||0,l=v.UNIT_CONFIG[a];n.push({name:e,value:(0,b.getValueByUnit)(t,l.value,3),unit:l.label,type:r})}})),n}(a,l,r,n);break;case"services":case"deployments":case"statefulsets":case"daemonsets":t=function(e,t,a,r){var n=[],l="";if(a.applications||a.openpitrixs){var u=a.applications?"apps":"openpitrixs";l=e[a.namespaces][u];var o=a.applications||a.openpitrixs,i=Object.keys(l).find((function(e){return e.indexOf(o)>-1}));l=l[i][t]}else l=e[a.namespaces][t];return!(0,f.default)(l)&&Object.keys(l).forEach((function(e){var a=(0,c.default)(l,"".concat(e,".").concat(v.METER_RESOURCE_USAGE[r]),0),u=v.UNIT_CONFIG[r];n.push({name:e,value:(0,b.getValueByUnit)(a,u.value,3),unit:u.label,type:t})})),n}(a,n,l,r);break;default:t=function(e,t,a,r){var n=[],l="";if(a.applications||a.openpitrixs){var u=a.applications?"apps":"openpitrixs";l=e[a.namespaces][u];var o=a.applications||a.openpitrixs,i=Object.keys(l).find((function(e){return e.indexOf(o)>-1}));l=l[i]}else l=e[a.namespaces];return a.deployments&&(l=l.deployments[a.deployments][t]),a.services&&(l=l.services[a.services][t]),a.statefulsets&&(l=l.statefulsets[a.statefulsets][t]),a.daemonsets&&(l=l.daemonsets[a.daemonsets][t]),!(0,f.default)(l)&&Object.keys(l).forEach((function(e){var a=(0,c.default)(l,"".concat(e,".").concat(v.METER_RESOURCE_USAGE[r]),0),u=v.UNIT_CONFIG[r];n.push({name:e,value:(0,b.getValueByUnit)(a,u.value,3),unit:u.label,type:t})})),n}(a,n,l,r)}return t};t.getFetchParams=function(e){var t=e.isMultiCluster,a=e.type,r=e.cluster,n=e.namespaces,l=e.workspaces,o=e.applications,i=e.openpitrixs,c=(0,u.default)(e,["isMultiCluster","type","cluster","namespaces","workspaces","applications","openpitrixs"]),s=globals.app.hasPermission({module:"clusters",action:"view"});return{cluster:t||!s?[{page:1,limit:-1}]:[{page:1,limit:-1,labelSelector:"cluster-role.kubesphere.io/host"},{page:1,limit:-1,labelSelector:"!cluster-role.kubesphere.io/host"}],nodes:[{limit:-1,page:1,cluster:r}],workspaces:[{limit:-1,page:1,namespace:n,workspace:l}],namespaces:[{page:1,limit:-1,cluster:r,namespace:n,workspace:l,labelSelector:"!kubesphere.io/devopsproject"}],openpitrixs:[{page:1,limit:-1,workspace:l,cluster:r,namespace:n,openpitrix:i}],applications:[{page:1,limit:-1,workspace:l,cluster:r,namespace:n,application:o}],services:[{page:1,limit:-1,cluster:r,namespace:n,labelSelector:T(c.labelSelector)}],deployments:[{page:1,limit:-1,cluster:r,namespace:n,labelSelector:T(c.labelSelector)}],statefulsets:[{page:1,limit:-1,cluster:r,namespace:n,labelSelector:T(c.labelSelector)}],daemonsets:[{page:1,limit:-1,cluster:r,namespace:n,labelSelector:T(c.labelSelector)}],pods:[{page:1,limit:-1,cluster:r,namespace:n,labelSelector:T(c.labelSelector),nodeName:c.nodes,ownerKind:c.statefulsets?"StatefulSet":c.deployments?"ReplicaSet":void 0}]}[a]};t.getListConfig=function(e){var t=e.type;return{cluster:e.isMultiCluster?[{status:function(e){return e.isReady?"ready":"stop"},desc:""}]:[{status:function(e){return e.isReady?"ready":"stop"},desc:"HOST_CLUSTER"},{status:function(e){return e.isReady?"ready":"stop"},desc:"MEMBER_CLUSTER"}],nodes:[{status:function(e){return(0,g.getNodeStatus)(e)},desc:v.RESOURCE_TITLE[t]}],workspaces:[{desc:v.RESOURCE_TITLE[t]}],namespaces:[{status:function(e){return e.status},desc:v.RESOURCE_TITLE[t]}],applications:[{status:function(e){return e.status||""},desc:v.RESOURCE_TITLE[t]}],openpitrixs:[{status:function(e){return e.status||""},desc:v.RESOURCE_TITLE[t]}],services:[{desc:v.RESOURCE_TITLE[t]}],daemonsets:[{status:function(e){var a=(0,y.getWorkloadStatus)(e,t).status;return a},desc:v.RESOURCE_TITLE[t]}],deployments:[{status:function(e){var a=(0,y.getWorkloadStatus)(e,t).status;return a},desc:v.RESOURCE_TITLE[t]}],statefulsets:[{status:function(e){var a=(0,y.getWorkloadStatus)(e,t).status;return a},desc:v.RESOURCE_TITLE[t]}],pods:[{status:function(e){return(0,c.default)(e,"podStatus.status","")},desc:v.RESOURCE_TITLE[t]}]}[t]};t.handleStrTimeToX=function(e){return 1e3*(0,O.default)(e).format("X")}},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(29),a(18),a(16),a(27),a(137),a(9),a(13),a(10),a(4),a(22),a(23),a(17),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(61)),l=r(a(58)),u=r(a(43));a(41);var o=r(a(44)),i=r(a(65)),c=r(a(36)),s=r(a(37)),f=r(a(88)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49));r(a(66));a(12),a(45),a(5),a(11),a(6),a(29),a(18),a(28),a(245),a(42),a(16),a(27),a(137),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(38),a(7),a(32);var v,g,y,E,b,_,O,S,C,D=r(a(30)),k=r(a(26)),N=r(a(63)),T=a(14),R=a(52),w=a(327),I=r(a(443)),M=r(a(452)),P=r(a(458));function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}function j(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function L(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace;return"apis/application.kubesphere.io/v1alpha1/watch/helmreleases?labelSelector=".concat((0,R.joinSelector)({"kubesphere.io/cluster":globals.app.isMultiCluster?t:null,"kubesphere.io/namespace":a}))},e.getUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.workspace,r=t.namespace,n=t.cluster,l=t.cluster_id,u="".concat(e.baseUrl).concat(e.getPath({workspace:a,namespace:r,cluster:n}),"/applications");return l?"".concat(u,"/").concat(l):u},(0,i.default)(e,"env",y,(0,f.default)(e)),(0,i.default)(e,"fetchList",E,(0,f.default)(e)),(0,i.default)(e,"fetchDetail",b,(0,f.default)(e)),(0,i.default)(e,"update",_,(0,f.default)(e)),(0,i.default)(e,"patch",O,(0,f.default)(e)),(0,i.default)(e,"delete",S,(0,f.default)(e)),(0,i.default)(e,"batchDelete",C,(0,f.default)(e)),e}return(0,s.default)(r,[{key:"upgrade",value:(t=(0,o.default)(u.default.mark((function e(t,a){var r,n,l,o;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.workspace,n=a.namespace,l=a.cluster,o=a.cluster_id,e.abrupt("return",this.submitting(request.post(this.getUrl({workspace:r,namespace:n,cluster:l,cluster_id:o}),t)));case 2:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})}]),r}(P.default),g=(0,h.default)(v.prototype,"components",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],total:0,isLoading:!0}}}),y=(0,h.default)(v.prototype,"env",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:{},isLoading:!1}}}),E=(0,h.default)(v.prototype,"fetchList",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return(0,o.default)(u.default.mark((function t(){var a,r,o,i,c,s,f,d,p,m,h,v,g,y,E,b=arguments;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=b.length>0&&void 0!==b[0]?b[0]:{},r=a.limit,o=a.page,i=a.cluster,c=a.namespace,s=a.workspace,f=a.more,d=a.status,p=a.sortBy,m=a.reverse,h=(0,l.default)(a,["limit","page","cluster","namespace","workspace","more","status","sortBy","reverse"]),e.list.isLoading=!0,v={conditions:(0,R.getFilterString)({status:d||e.defaultStatus})},p||void 0!==m||(p="status_time"),(0,N.default)(h)||(g=(0,R.getFilterString)(h))&&(v.conditions+=",".concat(g)),r!==1/0&&(v.paging="limit=".concat(r||10,",page=").concat(o||1)),p&&(v.orderBy=p),m&&(v.reverse=!0),t.next=10,request.get(e.getUrl({workspace:s,namespace:c,cluster:i}),v);case 10:return y=t.sent,E=(y.items||[]).map((function(e){return L(L({},U(e)),{},{workspace:s,cluster:i})})),Object.assign(e.list,{data:f?[].concat((0,n.default)(e.list.data),(0,n.default)(E)):E,total:y.total_count||0,limit:Number(r)||10,page:Number(o)||1,order:p,reverse:m,filters:h,selectedRowKeys:[]}),e.list.isLoading=!1,t.abrupt("return",E);case 15:case"end":return t.stop()}}),t)})))}}),b=(0,h.default)(v.prototype,"fetchDetail",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,o.default)(u.default.mark((function t(a){var r,n,l,o,i;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.workspace,n=a.namespace,l=a.cluster,o=a.id,e.isLoading=!0,t.next=4,request.get(e.getUrl({workspace:r,namespace:n,cluster:l,cluster_id:o}));case 4:i=t.sent,e.detail=L(L({},U(i)),{},{workspace:r,namespace:n,cluster:l}),e.isLoading=!1;case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),(0,h.default)(v.prototype,"upgrade",[T.action],Object.getOwnPropertyDescriptor(v.prototype,"upgrade"),v.prototype),_=(0,h.default)(v.prototype,"update",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.cluster_id,r=t.cluster,n=t.workspace,u=t.zone,o=(0,l.default)(t,["cluster_id","cluster","workspace","zone"]);return e.submitting(request.patch(e.getUrl({namespace:u,cluster_id:a,cluster:r,workspace:n}),o))}}}),O=(0,h.default)(v.prototype,"patch",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t,a){var r=t.cluster_id,n=t.cluster,l=t.workspace,u=t.zone;return e.submitting(request.patch(e.getUrl({namespace:u,cluster_id:r,cluster:n,workspace:l}),a))}}}),S=(0,h.default)(v.prototype,"delete",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.cluster_id,r=t.cluster,n=t.workspace,l=t.zone;return e.submitting(request.delete(e.getUrl({namespace:l,cluster_id:a,cluster:r,workspace:n})))}}}),C=(0,h.default)(v.prototype,"batchDelete",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t,a){var r=a.namespace,n=a.cluster,l=a.workspace;return e.submitting(Promise.all(t.map((function(t){return request.delete(e.getUrl({namespace:r,cluster:n,workspace:l,cluster_id:t}))}))))}}}),v);t.default=z},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(18),a(16),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(11),a(18),a(42),a(16),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l,u,o,i=r(a(44)),c=r(a(65)),s=r(a(36)),f=r(a(37)),d=r(a(88)),p=r(a(55)),m=r(a(56)),h=r(a(51)),v=r(a(49)),g=(r(a(66)),a(14)),y=a(52),E=a(248),b=r(a(105)),_=a(72);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,h.default)(e);if(t){var n=(0,h.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,m.default)(this,a)}}var S=(l=function(e){(0,p.default)(h,e);var t,a,r,l,m=O(h);function h(e){var t;return(0,s.default)(this,h),t=m.call(this),(0,c.default)(t,"workloadDetail",u,(0,d.default)(t)),(0,c.default)(t,"currentRevision",o,(0,d.default)(t)),t.getDetailUrl=function(e){var a=e.name,r=e.cluster,n=e.namespace,l=e.revision;return"kapis/resources.kubesphere.io/v1alpha2".concat(t.getPath({cluster:r,namespace:n}),"/").concat(t.module,"/").concat(a,"/revisions/").concat(l)},t.module=e,t}return(0,f.default)(h,[{key:"fetchList",value:(l=(0,i.default)(n.default.mark((function e(t){var a,r,l,u,o,i,c,s,f=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,l=t.name,u=t.selector,this.list.isLoading=!0,o=(0,y.joinSelector)(u),i="deployments"===this.module?"apis/apps/v1".concat(this.getPath({cluster:a,namespace:r}),"/replicasets"):"apis/apps/v1".concat(this.getPath({cluster:a,namespace:r}),"/controllerrevisions"),e.next=6,request.get("".concat(i,"?labelSelector=").concat(o));case 6:c=e.sent,s=c.items.map(b.default.revisions).filter((function(e){return e.ownerName===l&&e.ownerKind===_.MODULE_KIND_MAP[f.module]})),this.list.update({data:s,isLoading:!1});case 9:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"fetchDetail",value:(r=(0,i.default)(n.default.mark((function e(t){var a,r,l,u,o,i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.cluster,l=t.namespace,u=t.revision,this.isLoading=!0,e.next=4,request.get(this.getDetailUrl({name:a,cluster:r,namespace:l,revision:u}));case 4:o=e.sent,i=b.default.revisions(o),this.detail=i,this.isLoading=!1;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"fetchWorkloadDetail",value:(a=(0,i.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.cluster,l=t.namespace,e.next=3,request.get("apis/apps/v1".concat(this.getPath({cluster:r,namespace:l}),"/").concat(this.module,"/").concat(a));case 3:u=e.sent,this.workloadDetail=b.default[this.module](u);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchCurrentRevision",value:(t=(0,i.default)(n.default.mark((function e(){var t,a=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.fetchList(t);case 3:this.currentRevision=(0,E.getCurrentRevision)((0,g.toJS)(t),(0,g.toJS)(this.list.data),this.module);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),h}(r(a(68)).default),u=(0,v.default)(l.prototype,"workloadDetail",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),o=(0,v.default)(l.prototype,"currentRevision",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),(0,v.default)(l.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchList"),l.prototype),(0,v.default)(l.prototype,"fetchDetail",[g.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchDetail"),l.prototype),(0,v.default)(l.prototype,"fetchWorkloadDetail",[g.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchWorkloadDetail"),l.prototype),(0,v.default)(l.prototype,"fetchCurrentRevision",[g.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchCurrentRevision"),l.prototype),l);t.default=S},function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(42),a(4),a(23),a(57),a(17);var n,l,u=r(a(65)),o=r(a(36)),i=r(a(88)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(49)),p=(r(a(66)),a(14)),m=a(52),h=r(a(1129));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var g=["node_cpu_usage","node_cpu_utilisation","node_load1","node_load5","node_load15","node_memory_utilisation","node_memory_usage_wo_cache","node_gpu_usage","node_gpu_memory_usage","node_disk_size_utilisation","node_disk_inode_utilisation","node_pod_utilisation"],y=["node_cpu_utilisation","node_cpu_usage","node_cpu_total","node_memory_utilisation","node_memory_usage_wo_cache","node_memory_total","node_gpu_utilization","node_gpu_usage","node_gpu_total","node_gpu_memory_utilization","node_gpu_memory_usage","node_gpu_memory_total","node_disk_size_utilisation","node_disk_size_usage","node_disk_size_capacity","node_pod_utilisation","node_pod_running_count","node_pod_quota","node_disk_inode_utilisation","node_disk_inode_total","node_disk_inode_usage","node_load1","node_load5","node_load15"],E=(n=function(e){(0,c.default)(a,e);var t=v(a);function a(e){var r;return(0,o.default)(this,a),r=t.call(this,e),(0,u.default)(r,"sort_metric",l,(0,i.default)(r)),r.resource="nodes",r.sort_metric_options=(0,m.hideGPUByLicense)(e.sort_metric_options||g,r.cluster),r.metrics_filter=(0,m.hideGPUByLicense)(y,r.cluster).join("|"),r}return a}(h.default),l=(0,d.default)(n.prototype,"sort_metric",[p.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return g[0]}}),n);t.default=E},function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(42),a(4),a(23),a(57),a(17);var n,l,u=r(a(65)),o=r(a(36)),i=r(a(88)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(49)),p=(r(a(66)),a(14)),m=a(52),h=r(a(1210));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var g=["node_cpu_usage","node_cpu_utilisation","node_load1","node_load5","node_load15","node_memory_usage_wo_cache","node_memory_utilisation","node_gpu_usage","node_gpu_memory_usage","node_disk_size_utilisation","node_pod_count","node_pod_utilisation","node_disk_inode_utilisation"],y=["node_cpu_utilisation","node_cpu_usage","node_cpu_total","node_memory_utilisation","node_memory_usage_wo_cache","node_memory_total","node_gpu_utilization","node_gpu_usage","node_gpu_total","node_gpu_memory_utilization","node_gpu_memory_usage","node_gpu_memory_total","node_disk_size_utilisation","node_disk_size_usage","node_disk_size_capacity","node_pod_utilisation","node_pod_running_count","node_pod_quota","node_disk_inode_utilisation","node_disk_inode_total","node_disk_inode_usage","node_pod_count","node_load1","node_load5","node_load15"],E=(n=function(e){(0,c.default)(a,e);var t=v(a);function a(e){var r;return(0,o.default)(this,a),r=t.call(this,e),(0,u.default)(r,"sort_metric",l,(0,i.default)(r)),r.resource="nodes",r.sort_metric_options=(0,m.hideGPUByLicense)(g,r.cluster),r.metrics_filter=(0,m.hideGPUByLicense)(y,r.cluster).join("|"),r}return a}(h.default),l=(0,d.default)(n.prototype,"sort_metric",[p.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return g[0]}}),n);t.default=E},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51));function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var s=function(e){(0,u.default)(a,e);var t=c(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"apiVersion",get:function(){return"kapis/monitoring.kubesphere.io/v1beta1"}}]),a}(r(a(1129)).default);t.default=s},function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(42),a(4),a(23),a(57),a(17);var n,l,u,o=r(a(65)),i=r(a(36)),c=r(a(37)),s=r(a(88)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=r(a(49)),h=(r(a(66)),a(14)),v=a(52),g=r(a(1210));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var E=["namespace_cpu_usage","namespace_cpu_used_requests_utilisation","namespace_cpu_used_limits_utilisation","namespace_memory_usage_wo_cache","namespace_memory_used_requests_utilisation","namespace_memory_used_limits_utilisation","namespace_pvc_bytes_used","namespace_gpu_usage","namespace_gpu_memory_usage","namespace_pod_count","namespace_net_bytes_received","namespace_net_bytes_transmitted"],b=["namespace_memory_usage_wo_cache","namespace_memory_limit_hard","namespace_cpu_usage","namespace_cpu_limit_hard","namespace_gpu_limit_hard","namespace_gpu_usage","namespace_gpu_memory_usage","namespace_pod_count","namespace_pods_hard","namespace_net_bytes_received","namespace_net_bytes_transmitted","namespace_cpu_used_requests_utilisation","namespace_cpu_used_limits_utilisation","namespace_memory_used_requests_utilisation","namespace_memory_used_limits_utilisation","namespace_pvc_bytes_used","namespace_pvc_count"],_=(n=function(e){(0,f.default)(a,e);var t=y(a);function a(e){var r;return(0,i.default)(this,a),r=t.call(this,e),(0,o.default)(r,"sort_metric",l,(0,s.default)(r)),(0,o.default)(r,"changeWorkSpace",u,(0,s.default)(r)),r.resource="namespaces",r.sort_metric_options=(0,v.hideGPUByLicense)(E,r.cluster),r.metrics_filter=(0,v.hideGPUByLicense)(b,r.cluster).join("|"),r}return(0,c.default)(a,[{key:"fetchUrl",get:function(){return this.workspace?"".concat(this.apiVersion,"/workspace_metrics"):"".concat(this.apiVersion,"/namespace_metrics")}}]),a}(g.default),l=(0,m.default)(n.prototype,"sort_metric",[h.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return E[0]}}),u=(0,m.default)(n.prototype,"changeWorkSpace",[h.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.workspace=t,e.fetchAll()}}}),n);t.default=_},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l,u=r(a(44)),o=r(a(36)),i=r(a(37)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(49)),p=a(14);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var h=(l=function(e){(0,c.default)(r,e);var t,a=m(r);function r(){var e;(0,o.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a="";return t&&(a+="/klusters/".concat(t)),a}},{key:"fetchDetail",value:(a=(0,c.default)(u.default.mark((function e(t){var a,r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get(this.getDetailUrl(t));case 3:return a=e.sent,r=b(b({},t),this.mapper(a)),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchList",value:(t=(0,c.default)(u.default.mark((function e(){var t,a,r,o,i,c,s,f,d,p,m=this,h=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.length>0&&void 0!==h[0]?h[0]:{},a=t.cluster,r=t.workspace,o=t.namespace,i=t.more,c=t.devops,s=(0,l.default)(t,["cluster","workspace","namespace","more","devops"]),this.list.isLoading=!0,f=[],s.sortBy||void 0!==s.ascending||(s.sortBy=y.LIST_DEFAULT_ORDER[this.module]||"createTime"),s.limit!==1/0&&-1!==s.limit||(s.limit=-1,s.page=1),s.readyToUse&&f.push("status.readyToUse=".concat(s.readyToUse)),f=f.join(",")||void 0,s.fieldSelector=f,s.limit=s.limit||10,e.next=11,request.get(this.getResourceUrl({cluster:a,workspace:r,namespace:o,devops:c}),this.getFilterParams(s));case 11:return d=e.sent,p=((0,v.default)(d,"items")||[]).map((function(e){return b({cluster:a,namespace:o,workspace:r},m.mapper(e))})),this.list.update(b(b({data:i?[].concat((0,n.default)(this.list.data),(0,n.default)(p)):p,total:d.totalItems||d.totalCount||d.total_count||p.length||0},s),{},{limit:Number(s.limit)||10,page:Number(s.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",p);case 15:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"resourceKind",get:function(){return"VolumeSnapshotContent"}},{key:"apiVersion",get:function(){return"apis/snapshot.storage.k8s.io/v1"}}]),o}(r(a(68)).default),(0,h.default)(i.prototype,"fetchDetail",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),(0,h.default)(i.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),i);t.default=O},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u0&&void 0!==arguments[0]?arguments[0]:{},a=t.state.cluster;e.name&&(e.nameAndAlias=e.name,delete e.name),a&&t.projectStore.fetchList(M({cluster:a,workspace:t.props.workspace},e))},t.fetchData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.monitorStore.fetchApplicationResourceMetrics(M(M({metrics:[t.metricType],workspace:t.props.workspace,cluster:t.state.cluster},t.state),e))},t.handleClusterChange=function(e){t.workspaceStore&&t.workspaceStore.selectCluster(e),t.setState({cluster:e},t.fetchNamespaces)},t.handleNamespaceChange=function(e){t.setState({namespace:e})},t.handleSubmit=function(){var e=t.state,a=e.times,r=e.step,n=t.formRef.current&&t.formRef.current.getData();t.setState(n,(function(){t.fetchData(M(M({},n),{},{times:a,step:r}))}))},t.onCancel=function(){t.setState(M(M({},A),{},{namespace:"all",metrics_filter:void 0}),(function(){t.props.onCancel()}))},t.updateMonitorOptions=function(e){var a=e.times,r=e.step;t.setState({times:a,step:r})},t.projectOptionRenderer=function(e){return g.default.createElement("span",{className:w.default.option},e.isFedManaged?g.default.createElement("img",{className:w.default.indicator,src:"/assets/cluster.svg"}):g.default.createElement(N.Icon,{name:"project"}),e.label)},t.clusterOptionRenderer=function(e){return g.default.createElement("span",{className:w.default.option},g.default.createElement(N.Icon,{name:"cluster",type:"light"}),e.label)},t.clusterValueRenderer=function(e){return g.default.createElement("span",{className:w.default.option},g.default.createElement(N.Icon,{name:"cluster"}),e.label)},t.workspaceStore=e.workspaceStore,t.state=M(M({cluster:t.workspaceStore?t.workspaceStore.cluster:(0,O.default)(e,"cluster",""),namespace:(0,O.default)(e.detail,"namespace","all")},A),{},{metrics_filter:void 0}),t.projectStore=new D.default,t.monitorStore=new k.default,t.formRef=g.default.createRef(),t}return(0,p.default)(n,[{key:"componentDidUpdate",value:(a=(0,s.default)(u.default.mark((function e(t){var a,r,n=this;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(a=this.props.visible)&&a!==t.visible&&(r=this.props.workspaceStore,this.setState({cluster:r?r.cluster:(0,O.default)(this.props,"cluster","")},(0,s.default)(u.default.mark((function e(){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.fetchNamespaces();case 2:return e.next=4,n.fetchData();case 4:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"renderFilterForm",value:function(){var e=this,a=this.state,r=a.cluster,n=a.namespace,l=M({},this.state),u=this.projectStore.list,o={total:u.total,page:u.page,limit:u.limit};return g.default.createElement(N.Form,{className:w.default.form,ref:this.formRef,data:l},this.props.workspace&&g.default.createElement(N.Form.Item,{label:t("CLUSTER")},g.default.createElement(N.Select,{name:"cluster",placeholder:" ",defaultValue:r,options:this.clusters,onChange:this.handleClusterChange,valueRenderer:this.clusterValueRenderer,optionRenderer:this.clusterOptionRenderer,showTip:!0})),g.default.createElement(N.Form.Item,{label:t("PROJECT")},g.default.createElement(N.Select,{name:"namespace",placeholder:" ",defaultValue:n,options:this.namespaces,onFetch:this.fetchNamespaces,onChange:this.handleNamespaceChange,valueRenderer:this.projectOptionRenderer,optionRenderer:this.projectOptionRenderer,isLoading:this.projectStore.list.isLoading,pagination:o,searchable:!0,clearable:!0})),this.isPvc&&this.props.detail.filters&&g.default.createElement(N.Form.Item,{label:t("storageclasses")},g.default.createElement(N.Select,{name:"metrics_filter",defaultValue:"workspace_pvc_bytes_used",onChange:function(t){e.setState({metrics_filter:t})},options:this.props.detail.filters.options.map((function(t){return{label:t.label,value:e.props.detail.filters.getMetricsFilter(t.value)}}))})),g.default.createElement(N.Form.Item,null,g.default.createElement(N.Button,{type:"control",onClick:this.handleSubmit},t("OK"))))}},{key:"renderChart",value:function(){var e=M(M({},this.props.detail),{},{data:this.monitoringData}),t=(0,C.getAreaChartOps)(e);return g.default.createElement("div",{className:w.default.chart},(0,_.default)(t.data)?g.default.createElement("div",{className:w.default.empty},g.default.createElement("img",{src:"/assets/empty-card.svg"})):g.default.createElement(T.SimpleArea,(0,l.default)({width:"100%",height:"100%"},t)))}},{key:"renderTable",value:function(){var e=this.props.detail.title,a=M({},this.props.detail),r=a.unitType,n=a.unit,l=((0,O.default)(this.monitoringData,"[0].values")||[]).reverse().map((function(e){return{time:1e3*(0,O.default)(e,"[0]",0),value:(0,C.getSuitableValue)((0,O.default)(e,"[1]",0),r||n)}})),u=[{key:"time",title:t("TIME"),dataIndex:"time",width:"30%",render:function(e){return(0,S.getLocalTime)(e).format("YYYY-MM-DD HH:mm:ss")}},{key:"usage",title:t("USAGE"),dataIndex:"value"}];return g.default.createElement("div",{className:w.default.table},g.default.createElement("div",{className:w.default.box},g.default.createElement("div",{className:w.default.title},t(e)||t("RESOURCE_USAGE")),g.default.createElement(N.Table,{columns:u,dataSource:l,scroll:{y:200},expandIconAsCell:!1,rowKey:"time"})))}},{key:"render",value:function(){var e=this.state,t=e.times,a=e.step,r=this.props.visible,n=this.monitorStore.resourceMetrics,l=n.isLoading,u=n.isRefreshing;return r?g.default.createElement(R.default,{visible:r,onFetch:this.fetchData,onCancel:this.onCancel,loading:l,refreshing:u,times:t,step:a,updateMonitorOptions:this.updateMonitorOptions},g.default.createElement("div",{className:w.default.content},this.renderFilterForm(),this.renderChart(),this.renderTable())):null}},{key:"metrics",get:function(){return(0,y.toJS)(this.monitorStore.resourceMetrics.data)}},{key:"metricType",get:function(){var e;return this.isPvc&&null!==(e=this.state.metrics_filter)&&void 0!==e?e:this.props.detail.metricType}},{key:"clusters",get:function(){return this.workspaceStore.clusters.data.map((function(e){return{label:(0,S.showNameAndAlias)(e),value:e.name,cluster:e,disabled:!e.isReady}}))}},{key:"namespaces",get:function(){var e=(0,y.toJS)(this.projectStore.list.data).map((function(e){return{label:(0,S.getDisplayName)(e),value:e.name,isFedManaged:e.isFedManaged}}));return e.unshift({label:t("ALL"),value:"all"}),e}},{key:"monitoringData",get:function(){return(0,y.toJS)(this.monitorStore.resourceMetrics.data)}},{key:"isPvc",get:function(){return"pvc"===this.props.detail.type}}]),n}(g.default.Component),i.propTypes={visible:b.default.bool,detail:b.default.object,onCancel:b.default.func},i.defaultProps={visible:!1,detail:{},onCancel:function(){}},o=c))||o;a.default=j},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=e.className,r=void 0===a?"":a,n=e.content,l=(0,o.useState)(!0),f=(0,u.default)(l,2),d=f[0],p=f[1];return o.default.createElement("div",{className:(0,c.default)(s.default.manage,r)},o.default.createElement(i.Dropdown,{theme:"dark",content:n,trigger:"click",placement:"bottomRight",onClick:function(){return p(!d)}},o.default.createElement("div",{className:s.default.button},o.default.createElement("span",null,t("MANAGE")),o.default.createElement(i.Icon,{name:d?"caret-down":"caret-up",type:"dark"}))))};var u=l(r(96)),o=n(r(0)),i=r(186),c=l(r(3)),s=l(r(3844))},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(5),r(11),r(6),r(84),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(85),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.Component=a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(84),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(85),r(62),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(43));r(41);var i=n(r(44)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(14),v=r(239),g=n(r(63)),y=r(186),E=r(52),b=r(791),_=n(r(318)),O=n(r(468)),S=n(r(1048)),C=n(r(858)),D=n(r(1090)),k=n(r(805)),N=n(r(3878));function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t=0&&e.props.onScale(t)},e}return(0,l.default)(a,[{key:"render",value:function(){var e=this.props.className;return c.default.createElement(p.default,{className:(0,f.default)(h.default.replica,e)},c.default.createElement("div",{className:h.default.replicaCount},c.default.createElement(m.default,this.replicaStatus)))}},{key:"replicaStatus",get:function(){var e=this.props,t=e.module,a=e.detail,r=e.enableScale,n={};switch(t){default:case"deployments":n={current:a.availablePodNums||0,desire:a.podNums||0};break;case"statefulsets":n={current:(0,d.default)(a,"status.currentReplicas",a.readyPodNums),desire:a.podNums||0};break;case"daemonsets":n={current:(0,d.default)(a,"status.numberReady",0),desire:(0,d.default)(a,"status.desiredNumberScheduled",0)};break;case"gateways":n={current:Array.isArray(a.pods)?a.pods.length:1,desire:(0,d.default)(a,"replicas",0)}}return n.onScale=r?this.handleReplicaChange:null,n}}]),a}(c.default.Component);t.default=g,g.propTypes={module:s.default.string,detail:s.default.object,enableScale:s.default.bool,onScale:s.default.func},g.defaultProps={module:"deployments",enableScale:!0,onScale:function(){}}},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(5),r(11),r(6),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.Component=a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(14),m=r(239),h=n(r(63)),v=r(186),g=r(52),y=r(791),E=n(r(318)),b=n(r(858)),_=n(r(805)),O=n(r(3908));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r="";return t&&(r+="/klusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"checkService",value:(a=(0,c.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.name,r=t.cluster,l=t.namespace,a&&l){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,request.get(this.getServiceUrl({name:a,cluster:r,namespace:l}),{},{headers:{"x-check-exist":!0}});case 5:u=e.sent,this.isExistService=u.exist;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchService",value:(t=(0,c.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.cluster,l=t.namespace,this.isLoading=!0,e.next=4,(0,h.to)(request.get(this.getServiceUrl({name:a,cluster:r,namespace:l})));case 4:u=e.sent,this.service=v.default.services(u),this.isLoading=!1;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),u=(0,p.default)(l.prototype,"isExistService",[m.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),o=(0,p.default)(l.prototype,"service",[m.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),i=(0,p.default)(l.prototype,"isLoading",[m.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),(0,p.default)(l.prototype,"checkService",[m.action],Object.getOwnPropertyDescriptor(l.prototype,"checkService"),l.prototype),(0,p.default)(l.prototype,"fetchService",[m.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchService"),l.prototype),l);t.default=g},function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(16),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.Component=a.default=void 0,r(12),r(109),r(45),r(5),r(28),r(42),r(16),r(4),r(22),r(23),r(57),r(24),r(17),r(62);var l=n(r(315)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=r(14),h=r(239),v=n(r(26)),g=n(r(63)),y=r(186),E=r(52),b=r(434),_=r(791),O=n(r(318)),S=n(r(858)),C=n(r(805)),D=n(r(3915));function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var N=function(e){(0,s.default)(f,e);var a,r,n=k(f);function f(){var e;(0,i.default)(this,f);for(var a=arguments.length,r=new Array(a),l=0;l-1||t.indexOf("/workspaces/")>-1?localStorage.getItem("federated-cluster"):e}},{key:"namespace",get:function(){return this.props.match.params.namespace}},{key:"workspace",get:function(){return this.props.match.params.workspace}},{key:"type",get:function(){return this.cluster&&!this.workspace?"cluster":this.workspace&&!this.cluster?"workspace":"project"}},{key:"listUrl",get:function(){var e=this.props.match.params.workspace,t=this.props.match.url.split("gateways")[0];return"".concat(t,e?"gateways":"gateways/cluster")}}]),r}(d.default.Component))||l)||l)||l;a.default=C},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=r(186),p=n(r(790)),m=n(r(2046));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v={current:"CURRENT",finished:"FINISHED",notfinish:"NOT_SET"},g=function(e){var a=e.step,r=e.state;return s.default.createElement("li",{className:m.default[r]},s.default.createElement("div",{className:m.default.icon},s.default.createElement(d.Icon,{name:a.icon||"appcenter",size:40})),s.default.createElement(p.default,{className:m.default.text,title:t(a.title),description:t(v[r])}))},y=function(e){(0,o.default)(a,e);var t=h(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u",value:">"},{label:">=",value:">="},{label:"<",value:"<"},{label:"<=",value:"<="}];t.SEVERITY_LEVEL=[{type:"critical",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#ca2621"},label:"CRITICAL_ALERT",value:"critical"},{type:"warning",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#f5a623"},label:"ERROR_ALERT",value:"error"},{className:"tag-ffd939",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#FFD939"},label:"WARNING_ALERT",value:"warning"},{type:"secondary",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#79879c"},label:"INFO_ALERT",value:"info"}];var c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.comparator,a=void 0===t?{}:t,r=e.thresholds,n=void 0===r?{}:r;return[o({name:"comparator",placeholder:"CONDITION_OPERATOR",options:i},a),o({type:"number",name:"thresholds",placeholder:"THRESHOLD"},n)]};t.getBaseRuleConfig=c;var s=c({thresholds:{min:0,converter:function(e){return Number(e)},reverser:function(e){return Number(e)}}});t.BASE_RULE_CONFIG=s;var f=c({thresholds:{min:0,max:100,unit:"%",converter:function(e){var t=new l.default(e);return Number(t.div(100).toString())},reverser:function(e){var t=new l.default(e);return Number(t.times(100).toString())}}});t.PERCENT_RULE_CONFIG=f;var d=c({thresholds:{unit:"core",min:0,converter:function(e){return Number(e)},reverser:function(e){return Number(e)}}});t.CORE_RULE_CONFIG=d;var p=c({thresholds:{unit:"GiB",min:0,converter:function(e){var t=new l.default(e),a=new l.default(1024).pow(3);return Number(t.times(a).toString())},reverser:function(e){var t=new l.default(e),a=new l.default(1024).pow(3);return Number(t.div(a).toString())}}});t.GIB_RULE_CONFIG=p;var m=c({thresholds:{unit:"MiB",min:0,converter:function(e){var t=new l.default(e),a=new l.default(1024).pow(2);return Number(t.times(a).toString())},reverser:function(e){var t=new l.default(e),a=new l.default(1024).pow(2);return Number(t.div(a).toString())}}});t.MIB_RULE_CONFIG=m;var h=c({thresholds:{unit:"GB",min:0,converter:function(e){var t=new l.default(e),a=new l.default(1e3).pow(3);return Number(t.times(a).toString())},reverser:function(e){var t=new l.default(e),a=new l.default(1e3).pow(3);return Number(t.div(a).toString())}}});t.GB_RULE_CONFIG=h;var v=c({thresholds:{unit:"KB/s",min:0,converter:function(e){var t=new l.default(e),a=new l.default(1e3);return Number(t.times(a).toString())},reverser:function(e){var t=new l.default(e),a=new l.default(1e3);return Number(t.div(a).toString())}}});t.KBS_RULE_CONFIG=v;var g=c({thresholds:{unit:"Mbps",min:0,converter:function(e){var t=new l.default(e),a=new l.default(1e3).pow(2);return Number(t.times(a).toString())},reverser:function(e){var t=new l.default(e),a=new l.default(1e3).pow(2);return Number(t.div(a).toString())}}});t.MBPS_RULE_CONFIG=g},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(5),r(11),r(18),r(16),r(9),r(4),r(23),r(24),r(17),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(18),r(42),r(16),r(9),r(4),r(23),r(57),r(24),r(193),r(17);var u,o,i=n(r(61)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(49)),h=l(r(0)),v=n(r(894)),g=n(r(855)),y=n(r(446)),E=r(14),b=r(239),_=n(r(3)),O=r(186),S=n(r(1486)),C=n(r(1488)),D=n(r(2108));function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var N=(0,b.observer)((o=function(e){(0,f.default)(r,e);var a=k(r);function r(){var e;(0,c.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l/? ]).)*$/;a.PATTERN_EXCLUDE_CHARACTERS=v;var g=/(?=.*?[0-9])/;a.PATTERN_NUMBER=g;var y={name:"name",label:"USERNAME",type:"text",description:"DATABASE_USERNAME_DESC",rules:[{pattern:c,message:t("INVALID_DATABASE_USERNAME_DESC")},{pattern:s,message:t("USERNAME_FORBIDDEN_STRINGS")},{required:!0,message:t("USERNAME_EMPTY_DESC")}],range:{max:26}};a.UserName=y;var E={name:"password",label:"PASSWORD",type:"password",description:t("DATABASE_PASSWORD_DESC"),rules:[{pattern:m,message:t("PASSWORD_LETTER")},{pattern:h,message:t("DATABASE_PASSWORD_CHARACTERS")},{pattern:v,message:t("DATABASE_PASSWORD_CHARACTERS_EXCLUDE")},{pattern:g,message:t("PASSWORD_NUMBER")},{required:!0,message:t("ENTER_PASSWORD_TIP")},{pattern:d,message:t("INVALID_DATABASE_PASSWORD_DESC")}],range:{max:32}};a.Password=E;var b={name:"database",label:"AUTHORIZED_DATABASES",type:"text",description:"AUTHORIZED_DATABASES_DESC",rules:[]};a.Database=b;var _=[i(i({},y),{},{rules:[].concat((0,l.default)(y.rules),[{pattern:/^(?!(clickhouse_operator)$)/,message:t("USERNAME_CANNOT_BE_CLICKHOUSE")}])}),E,{name:"description",label:"DESCRIPTION",type:"textarea",description:"DESCRIPTION_DESC",rules:[]}];a.CKAccount=_;a.getPGAccount=function(e){return[{name:"name",label:"USERNAME",type:"text",description:"PG_USERNAME_DESC",rules:[{pattern:f,message:t("INVALID_PG_USERNAME_DESC")},{pattern:/^(?!(postgres|pgautofailover_monitor|pgautofailover_replicator)$)/,message:t("USERNAME_CANNOT_BE_PROGRES")},{pattern:s,message:t("USERNAME_FORBIDDEN_STRINGS")},{required:!0,message:t("USERNAME_EMPTY_DESC")}],range:{max:26},disabled:e},E,{name:"permission",label:"PERMISSIONS",type:"select",disabled:e,options:[{label:t("GENERAL_PERMISSIONS"),value:"General"},{label:t("ADVANCED_PERMISSIONS"),value:"Advanced"}]}]};var O=[y,E,b,{name:"permission",label:"PERMISSIONS",type:"select",options:[{label:t("GENERAL_PERMISSIONS"),value:"General"},{label:t("ADVANCED_PERMISSIONS"),value:"Advanced"}]},{name:"host",label:"AUTHORIZED_HOSTS",type:"text",description:"AUTHORIZED_HOSTS_DESC"}];a.MySQLAccount=O;var S=[{name:"name",label:"USERNAME",type:"text",description:"KAFKA_USERNAME_DESC",rules:[{pattern:p,message:t("KAFKA_USERNAME_DESC")},{required:!0,message:t("USERNAME_EMPTY_DESC")}],range:{max:64}},{name:"authentication",label:"AUTHENTICATION_MODE",type:"select",options:[{label:"TLS",value:"tls"},{label:"SCRAM-SHA-512",value:"scram-sha-512"}]},{name:"authorization",label:"AUTHORIZATION_MODE",type:"select",disabled:!0,description:"AUTHORIZATION_MODE_DESC",options:[{label:t("SIMPLE_AUTHORIZATION"),value:"simple"}]}];a.KafkaAccount=S;a.DefaultPermissionRuleString='{"type":"allow","operation":"Read","resource":{"type":"topic","patternType":"literal","name":""}}'},function(e,a,r){"use strict";(function(e){var n=r(20);r(12),r(11),r(31),r(6),r(84),r(73),r(18),r(16),r(9),r(13),r(10),r(316),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(96)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(30)),c=n(r(58));r(12),r(11),r(31),r(6),r(84),r(73),r(18),r(28),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(85),r(7);var s=n(r(26)),f=n(r(195)),d=n(r(240)),p=r(440),m=n(r(435)),h=n(r(787)),v=n(r(825)),g=n(r(2289)),y=n(r(1557)),E=n(r(1586)),b=n(r(1587)),_=n(r(105)),O=r(1588),S=r(899);function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";e.envError=t},e.envValidator=function(t,a,r){""===e.envError&&r()},e}return(0,u.default)(r,[{key:"componentDidMount",value:function(){var e=this;h().then((function(t){return e.rootStore.registerActions(t.default)}))}},{key:"render",value:function(){var e=this.props,a=e.checkable,r=e.namespace,n=e.isFederated,l=e.isEdgeWize,u=e.cluster,o=e.projectDetail;return s.default.createElement(f.Form.Group,{label:t("ENVIRONMENT_VARIABLE_PL"),desc:t("CONTAINER_ENVIRONMENT_DESC"),checkable:a},s.default.createElement(f.Form.Item,{rules:[{validator:this.envValidator}]},s.default.createElement(d.default,{isEdgeWize:l,rootStore:this.rootStore,name:"".concat(this.prefix,"env"),namespace:r,isFederated:n,cluster:u,projectDetail:o,handleInputError:this.handleErrorStatus})))}},{key:"prefix",get:function(){var e=this.props.prefix;return e?"".concat(e,"."):""}}]),r}(s.default.Component);a.default=v,v.defaultProps={prefix:"",checkable:!0}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(29),r(87),r(16),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(17),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(160),r(29),r(28),r(87),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(17),r(38),r(7),r(32);var l=n(r(315)),u=n(r(58)),o=n(r(43));r(41);var i,c,s,f=n(r(44)),d=n(r(30)),p=n(r(61)),m=n(r(96)),h=n(r(36)),v=n(r(37)),g=n(r(55)),y=n(r(56)),E=n(r(51)),b=n(r(0)),_=n(r(1)),O=n(r(1e3)),S=n(r(851)),C=n(r(437)),D=n(r(1169)),k=n(r(933)),N=n(r(999)),T=n(r(135)),R=n(r(26)),w=n(r(63)),I=r(791),M=n(r(2300)),P=n(r(2302)),A=n(r(829)),j=n(r(1547)),L=n(r(2303));function x(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function U(e){for(var t=1;t1){var a={};return t.forEach((function(e,t){var r,n=null!==(r=null==e?void 0:e.name)&&void 0!==r?r:"";""!==e.name&&(a[n]?a[n].push("".concat(t)):a[n]=[])})),Object.values(a).reduce((function(e,t){return[].concat((0,p.default)(e),(0,p.default)(t))}),[])}return[]}}]),r}(b.default.Component),c.propTypes={name:_.default.string,value:_.default.array,onChange:_.default.func,handleInputError:_.default.func},c.defaultProps={name:"",onChange:function(){},handleInputError:function(){}},i=s))||i;a.default=F},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(816));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=function(e){(0,o.default)(r,e);var a=p(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"getImagePullPolicyOptions",value:function(){return[{icon:"timed-task",label:t("IMAGE_PULL_POLICY_ALWAYS"),value:"Always",description:t("IMAGE_PULL_POLICY_ALWAYS_DESC")},{icon:"timed-task",label:t("IMAGE_PULL_POLICY_IFNOTPRESENT"),value:"IfNotPresent",description:t("IMAGE_PULL_POLICY_IFNOTPRESENT_DESC")},{icon:"timed-task",label:t("IMAGE_PULL_POLICY_NEVER"),value:"Never",description:t("IMAGE_PULL_POLICY_NEVER_DESC")}]}},{key:"render",value:function(){return s.default.createElement(f.Form.Item,null,s.default.createElement(d.default,{name:"".concat(this.prefix,"imagePullPolicy"),defaultValue:"IfNotPresent",options:this.getImagePullPolicyOptions()}))}},{key:"prefix",get:function(){var e=this.props.prefix;return e?"".concat(e,"."):""}}]),r}(s.default.Component);a.default=m,m.defaultProps={prefix:""}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(1548)),p=n(r(2309));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var h=function(e){(0,o.default)(r,e);var a=m(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement(f.Form.Group,{label:t("HEALTH_CHECK"),desc:t("HEALTH_CHECKER_DESC"),checkable:!0},s.default.createElement(f.Form.Item,{className:p.default.item,label:t("LIVENESS_CHECK"),desc:t("LIVENESS_CHECK_DESC")},s.default.createElement(d.default,{name:"".concat(this.prefix,"livenessProbe"),probType:"livenessProbe"})),s.default.createElement(f.Form.Item,{className:p.default.item,label:t("READINESS_CHECK"),desc:t("READINESS_CHECK_DESC")},s.default.createElement(d.default,{name:"".concat(this.prefix,"readinessProbe"),probType:"readinessProbe"})),s.default.createElement(f.Form.Item,{className:p.default.item,label:t("STARTUP_CHECK"),tip:t("STARTUP_CHECK_TIP"),desc:t("STARTUP_CHECK_DESC")},s.default.createElement(d.default,{name:"".concat(this.prefix,"startupProbe"),probType:"startupProbe"})))}},{key:"prefix",get:function(){var e=this.props.prefix;return e?"".concat(e,"."):""}}]),r}(s.default.Component);a.default=h,h.defaultProps={prefix:""}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(84),r(18),r(16),r(10),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(84),r(18),r(42),r(16),r(10),r(4),r(23),r(57),r(17),r(85);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(26)),d=n(r(63)),p=r(52),m=r(72),h=r(186),v=n(r(872)),g=n(r(951)),y=n(r(2313)),E=n(r(2323));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var _=function(e){(0,o.default)(r,e);var a=b(r);function r(e){var n;return(0,l.default)(this,r),(n=a.call(this,e)).limitError="",n.valueRenderer=function(e){return s.default.createElement(h.Tag,{className:E.default.type,type:"init"===e.value?"warning":"default"},e.label)},n.renderImageForm=function(){var e=n.props,t=e.data,a=e.namespace,r=e.cluster,l=e.type,u=e.isEdit,o=e.isEdgeWize,i=n.imageRegistries,c=n.getFormTemplate(t,i);return s.default.createElement(y.default,{className:E.default.imageSearch,name:"image",namespace:a,formTemplate:c,imageRegistries:i,isEdgeWize:o,cluster:r,type:u?"Edit":l})},n.handleError=function(e){n.limitError=e},n.limitValidator=function(e,t,a){""!==n.limitError&&a({message:""}),a()},n.duplicatedNameValidator=function(e,a,r){n.props.containers.map((function(e){return e.name})).filter((function(e){return e!==n.state.originName})).includes(a)&&r({message:t("NAME_EXIST_DESC")}),r()},n.state={originName:e.data.name},n}return(0,u.default)(r,[{key:"getGpuLimit",value:function(){return(0,p.gpuLimitsArr)(this.props.workspaceQuota)}},{key:"getFormTemplate",value:function(e){if(e&&e.image&&!e.pullSecret){var t=e.annotationOfImagePullSecrets;!(0,d.default)(e.annotationOfImagePullSecrets)&&t[e.name]&&(e.pullSecret=t[e.name])}return e}},{key:"renderAdvancedSettings",value:function(){var e=this.props,a=e.defaultContainerType,r=e.onContainerTypeChange,n=e.supportGpuSelect,l=this.defaultResourceLimit;return s.default.createElement(g.default,{defaultShow:(0,d.default)(l)},s.default.createElement(s.default.Fragment,null,s.default.createElement(h.Columns,{className:E.default.columns},s.default.createElement(h.Column,null,s.default.createElement(h.Form.Item,{label:t("CONTAINER_NAME"),desc:t("NAME_DESC"),rules:[{required:!0,message:t("NAME_EMPTY_DESC")},{pattern:m.PATTERN_NAME,message:t("INVALID_NAME_DESC",{message:t("NAME_DESC")})},{validator:this.duplicatedNameValidator}]},s.default.createElement(h.Input,{name:"name",defaultValue:"container-".concat((0,p.generateId)()),maxLength:63}))),s.default.createElement(h.Column,null,s.default.createElement(h.Form.Item,{label:t("CONTAINER_TYPE")},s.default.createElement(h.Select,{name:"type",defaultValue:a,options:this.containerTypes,onChange:r,valueRenderer:this.valueRenderer})))),s.default.createElement(h.Alert,{className:"margin-b12",type:"info",message:t("CONTAINER_RESOURCE_LIMIT_TIP")}),s.default.createElement(h.Form.Item,{rules:[{validator:this.limitValidator,checkOnSubmit:!0}]},s.default.createElement(v.default,{name:"resources",defaultValue:l,onError:this.handleError,workspaceLimitProps:this.workspaceLimitProps,supportGpuSelect:n}))))}},{key:"render",value:function(){var e=this.props.className;return s.default.createElement(h.Form.Group,{className:e,label:t("CONTAINER_SETTINGS"),desc:t("CONTAINER_SETTINGS_DESC"),noWrapper:!0},this.renderImageForm(),this.renderAdvancedSettings())}},{key:"defaultResourceLimit",get:function(){var e=this.props.limitRange,t=void 0===e?{}:e;if(t.defaultRequest||t.default)return{requests:t.defaultRequest||{},limits:t.default||{}}}},{key:"containerTypes",get:function(){return[{label:t("WORKER_CONTAINER"),value:"worker"},{label:t("INIT_CONTAINER"),value:"init"}]}},{key:"imageRegistries",get:function(){var e=this.props.imageRegistries;return(void 0===e?[]:e).map((function(e){var t=(0,f.default)(e,'data[".dockerconfigjson"].auths',{}),a=Object.keys(t)[0]||"",r=(0,f.default)(t[a],"username"),n=e.isFedManaged?(0,f.default)(e,"clusters[0].name"):e.cluster,l=Boolean((0,f.default)(e,'annotations["secret.kubesphere.io/force-insecure"]',!1)),u=Boolean((0,f.default)(e,"isDefault",!1)),o=(0,f.default)(t[a],"auth");return{url:a,username:r,label:e.aliasName?"".concat(e.aliasName,"(").concat(e.name,")"):e.name,value:e.name,cluster:n,isSkipTLS:l,isDefault:u,auth:o}}))}},{key:"workspaceLimitProps",get:function(){var e=this.props.workspaceQuota;return(0,d.default)(e)?{}:{limits:{cpu:(0,f.default)(e,"limits.cpu"),memory:(0,f.default)(e,"limits.memory")},requests:{cpu:(0,f.default)(e,"requests.cpu"),memory:(0,f.default)(e,"requests.memory")},gpuLimit:this.getGpuLimit()}}}]),r}(s.default.Component);a.default=_},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(84),a(27),a(931),a(85),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(84),a(27),a(931),a(436),a(319),a(24),a(193),a(85);var l=n(a(315)),u=n(a(30)),o=n(a(96)),i=n(a(58)),c=a(186),s=n(a(1040)),f=n(a(3)),d=r(a(0)),p=n(a(2310)),m=function(e){var t=e.unit,a=e.value,r=e.defaultValue,n=e.onChange,m=e.min,h=void 0===m?Number.NEGATIVE_INFINITY:m,v=e.max,g=void 0===v?Number.POSITIVE_INFINITY:v,y=e.integer,E=void 0!==y&&y,b=e.error,_=void 0!==b&&b,O=e.onBlur,S=(0,i.default)(e,["unit","value","defaultValue","onChange","min","max","integer","error","onBlur"]),C=null!=a?a:r,D=d.useState(C===1/0?void 0:C),k=(0,o.default)(D,2),N=k[0],T=k[1],R=d.useState(_),w=(0,o.default)(R,2),I=w[0],M=w[1],P=d.useReducer((function(e){return e+1}),0),A=(0,o.default)(P,2),j=A[0],L=A[1];d.useEffect((function(){a!==N&&T(a===1/0?void 0:a)}),[a]);var x=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a="string"==typeof e?E?parseInt(e,10):parseFloat(e):e;if(void 0===e||""===e||isNaN(a))return T(""),null==n||n(""),void(t&&void 0!==e&&""!==e&&M(!0));a=Math.max(h,Math.min(a,g)),T(a),null==n||n(a),M(!1)},U=E?/[-0-9]/:/[-.0-9]/;return d.createElement(c.Input,(0,l.default)({},S,{className:(0,f.default)(p.default.wrapper,(0,u.default)({},p.default.error,I||_)),key:j,value:N,onChange:function(e){var t=e.target.value,a=t.includes("-"),r=t.includes("."),n=Number(t);(Number.isNaN(n)||(0,s.default)(n))&&(r||a?(M(!1),T(e.target.value)):x(t,!0))},onKeyPress:function(e){"e"!==e.key&&"E"!==e.key||e.preventDefault(),U.test(e.key)||e.preventDefault()},suffix:t,onBlur:function(){x(N,!1),M(!1),L(),null==O||O()}}))};t.default=m},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1041)).default);t.default=c},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(3)),d=n(r(1)),p=n(r(74)),m=n(r(800)),h=r(186),v=n(r(799)),g=n(r(2347));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var E=function(e){(0,o.default)(r,e);var a=y(r);function r(){var e;(0,l.default)(this,r);for(var t=arguments.length,n=new Array(t),u=0;u=70&&a<90&&(t=e.get(70)),a>=90&&(t=e.get(100)),b(t)}),[a,n]),o.default.createElement("div",{className:i.default.progress},o.default.createElement("div",{className:i.default.line_box},o.default.createElement("div",{className:i.default.line_split_items,style:{background:_}}),o.default.createElement("div",{className:i.default.line_block_mask_items,style:{width:"".concat(100-a<0?0:100-a,"%"),background:s}}),o.default.createElement("div",{className:i.default.line_block_items,style:{background:h}})),o.default.createElement("span",{style:{color:E}},O))},a(5),a(6),a(160),a(29),a(73),a(18),a(326),a(190),a(98),a(4),a(319),a(38),a(7),a(32);var l=n(a(246)),u=n(a(96)),o=r(a(0)),i=n(a(2454))},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(36)),l=a(52),u=r(a(26)),o=r(a(1104)),i=r(a(2477));t.default=function e(t){var a=this;(0,n.default)(this,e),this.store=null,this.setStore=function(e){a.store=e},this.isCalico=function(e){var t,a,r,n=null!==(t=null===(a=window.parent)||void 0===a?void 0:a.globals)&&void 0!==t?t:window.globals,o=(null==n||null===(r=n.app)||void 0===r?void 0:r.isMultiCluster)?(0,u.default)(n,"clusterConfig.".concat(e,".ksVersion")):(0,u.default)(n,"ksConfig.ksVersion");return(0,l.compareVersion)(o,"3.4.1")>=0},this.isOutdated=function(e){var t,a,r,n=null!==(t=null===(a=window.parent)||void 0===a?void 0:a.globals)&&void 0!==t?t:window.globals;if(!(null==n||null===(r=n.app)||void 0===r?void 0:r.isMultiCluster))return!1;var o=(0,u.default)(n,"clusterConfig.".concat(e,".ksVersion"));return(0,l.compareVersion)(o,"3.4.0")<0},this.getStoreByCluster=function(e){return a.isCalico(e)?i.default:o.default},this.setStoreByCluster=function(e){var t=a.getStoreByCluster(e);a.setStore(new t)},t&&(this.store=t)}},function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(11),a(6),a(16),a(9),a(13),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.NodeTreeSelect=g,t.default=void 0,a(12),a(11),a(6),a(28),a(16),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(7);var l=n(a(43));a(41);var u=n(a(30)),o=n(a(44)),i=n(a(96)),c=r(a(0)),s=a(186),f=n(a(953)),d=n(a(1318)),p=n(a(2484));function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function h(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[];return null==t||t.map((function(t){if(a.push(t.parentKey),t.children)return e(t.children,a)})),a}(S)}),[S]);function U(e){var t,a,n,l=e.metadata,u=l.name,o=l.annotations["kubesphere.io/alias-name"],s=((null==b||null===(t=b.current)||void 0===t?void 0:t.offsetWidth)||290)-(null===(a=e.parentKey)||void 0===a?void 0:a.length)/2*22-80,f=E?" (".concat((null===(n=e.spec.nodes)||void 0===n?void 0:n.length)||0,")"):"";return i.default.createElement(i.default.Fragment,null,i.default.createElement("span",{className:m.default["tree-node-title"],title:(o||u)+f,style:{minWidth:s,maxWidth:s}},i.default.createElement("span",{className:m.default["tree-node-title-text"]},o||u),u&&o&&i.default.createElement("span",{className:m.default["tree-node-des"]},"(",u,")"),f),i.default.createElement("span",{className:(0,c.default)("rc-tree-node-right",j===e.key&&"rc-tree-node-select")},null==r?void 0:r(e)))}return(0,i.useEffect)((function(){T(a)}),[a]),(0,i.useEffect)((function(){if(n){var e=null==x?void 0:x.filter((function(e){return e.find((function(e){return null==e?void 0:e.includes(n)}))}));M((0,s.default)((0,f.default)(e)))}else l&&M(l)}),[n,l]),(0,i.useEffect)((function(){C(function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t=t.map((function(t){var r;t.key=t.metadata.name;var n=[t.key,null===(r=t.metadata.annotations)||void 0===r?void 0:r["kubesphere.io/alias-name"]];return t.aliasName=n[1]?"".concat(n[1],"(").concat(n[0],")"):n[0],t.parentKey=[].concat((0,u.default)(a),n),t.title=U(t),t.spec.children&&(t.children=e(t.spec.children,t.parentKey)),t}))}(t))}),[t,a,j]),i.default.createElement("div",{ref:b},i.default.createElement(d.default,{treeData:S,icon:function(e){return(null==h?void 0:h(e))||i.default.createElement("img",{width:16,src:"/assets/disk_group.svg",alt:""})},switcherIcon:g,itemHeight:36,autoExpandParent:N,expandedKeys:I,onExpand:function(e){M(e),T(!1)},onClick:function(e,t){if(j.includes(t.key)||L(t.key),!t.selected&&p){var a,r=!(null===(a=t.spec.children)||void 0===a?void 0:a.length);null==p||p(v(v({},t),{},{selected:!t.selected}),r)}},filterTreeNode:n&&function(e){var t,a,r;return!!n&&(e.key.includes(n)||(null===(t=e.metadata)||void 0===t||null===(a=t.annotations)||void 0===a||null===(r=a["kubesphere.io/alias-name"])||void 0===r?void 0:r.includes(n)))}}))}var E=y;t.default=E},,function(e,t,a){e.exports={status:"_1dL0EeNSXN669XzDa7U4qr","node-tree":"_1SgVDKBokdg6tuQpWCF-c","node-tree-left":"vmuMPLSpP2B_7LmOZJDLB","node-tree-right":"_6xV5xu34ztjX6K4aYg5_",title:"_3C4btdBl2rx-5OjQHqIWJb","node-group__tree-item":"_2kQA2n6B5FG12JjJZTCpwH","node-group__tree-item-margin":"_3sUzjEfV2GUFiQ5KxGgxrO","node-group__tree-item-title":"_2cxoKgG4S6Z0qODlPgrT7O","node-group__tree-item-icon-hover":"_2zJyN7BKJvEHVizJbpVT-c","node-group__tree-item-add":"_412g1f0bUVJPkxVUpMx6a","node-tooltip-item":"AArIX4vLMptXXa3UW80e1","node-tooltip-active":"_1t4Rx4z68MRfpYggELWTv3"}},function(e,t,a){e.exports={nodeSelectorsWrapper:"_3Ntw-JKc4povnOp_c2BVl",nodeSelectors:"_1_7JWPBL0Vh2u4OtOnKKm",add:"tpwxGXK_uiC1ZlYfss91c",confirm:"V1tSzvZVaXXeUDnHfLcaZ","edge-table-selector-box":"_3ZkpGzChQs7JJ1TkvWSlOJ",columns:"_3Duos79G-2Eubl4CnnlyHQ",column:"_2WynhuPhAS_PYjxZy6lEmC","select-nodes":"_3VGVKprUvfs8AeufyvgfM2","select-nodes-normal":"_3NO1k8Sa2jw9c2uiH9g5b","select-nodes-icon":"_30A_R4LX4qncbURGVN1kDf",trees:"_1CZYo9RhgLGtYsjUW7khGO",switch:"_2nGfUqPrwCtStabrmKQkm_"}},function(e,t,a){e.exports={editContainer:"_2TTFcQ4vnnv51E8aVOlqFz",title:"_3PgCFKRywYHFJwJrJKxF3m",container:"_2fym1soTGH0nCcnJNCZACw",card:"_25qqt5BRSnexUkWmCPRQcM",listItem:"_1h6ZZgEGOGKQWEfx1sDpzn",action:"f7esabqGfBkJU8t1jqErp",workspace:"Mp4BNazHY5E22a2HDXjTP",edit:"_2CYvqg-lEuCoI3kTR9LSG_",info:"_29cU7cbTcEu9SKI99wmXj0",editRow:"_2MaigTYE6ndKSETELA5RYY",confirm:"_3DMLykQMW4cpIWefbESdUs",editForm:"osoVqI1mtNOROFTJFuHTq",switch:"_2cBLDmbg9s7yq1QtcE2ZnP",codeWrapper:"_2kpTK_dneC0klEnq214ET9",tabPanel:"fiprQmqMIUoOnRlM_XLHP",option:"_3A-tSaOoHgsRn0jXj7EHqh",label:"_2PaxwDrSSXY0bv-vsZ3gR-",description:"i8TRLE1iF7-TfKCpvwaFM",desc:"rVLbCCPYagcj54caTsfVJ"}},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(16),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o=r(a(44)),i=r(a(36)),c=r(a(37)),s=r(a(55)),f=r(a(56)),d=r(a(51)),p=r(a(68)),m=r(a(26));function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getNetworkUrl,"/").concat(e.getPath(t),"/").concat(e.module)},e.migrate=function(t,a,r){var n="".concat(e.getNetworkUrl,"/").concat(e.getPath({cluster:t}),"/ippoolmigrations");return e.submitting(request.post(n,{oldippool:a,newippool:r},y))},e.getNetworkResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getNetworkUrl,"/").concat(e.module,"/").concat(t.name,"/migrate")},e}return(0,c.default)(l,[{key:"fetchMigrateIpPool",value:(a=(0,o.default)(n.default.mark((function e(){var t,a,r,l,o,i,c,s=this,f=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=f.length>0&&void 0!==f[0]?f[0]:{},a=t.cluster,r=t.namespace,l=t.name,o=(0,u.default)(t,["cluster","namespace","name"]),e.next=3,request.get(this.getNetworkResourceUrl({name:l}),this.getFilterParams(o));case 3:return i=e.sent,c=((0,m.default)(i,"items")||[]).map((function(e){return v({cluster:a,namespace:r},s.mapper(e))})),e.abrupt("return",c);case 6:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchNamespacesIpPools",value:(t=(0,o.default)(n.default.mark((function e(){var t,a,r,l,o,i=this,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:{},a=t.namespace,r=t.cluster,l=(0,u.default)(t,["namespace","cluster"]),e.next=3,request.get("".concat(this.getNetworkUrl).concat(this.getPath({namespace:a,cluster:r}),"/").concat(this.module),this.getFilterParams(l));case 3:return o=e.sent,e.abrupt("return",o.map((function(e){return v({cluster:r,namespace:a},i.mapper(e))})));case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return this.getNetworkUrl}}]),l}(p.default);t.default=E},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(187),a(11),a(31),a(84),a(18),a(137),a(4),a(23),a(17),a(85),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(187),a(11),a(31),a(84),a(18),a(42),a(137),a(4),a(23),a(57),a(17),a(85);var n=r(a(315)),l=r(a(58)),u=r(a(61)),o=r(a(36)),i=r(a(37)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(0)),p=a(239),m=r(a(63)),h=r(a(194)),v=r(a(26)),g=a(186);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=function(e){var t=function(t){(0,c.default)(r,t);var a=y(r);function r(){var e;(0,o.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r="";return t&&(r+="/clusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"apiVersion",get:function(){return"/kapis/resources.kubesphere.io/v1alpha3/customresourcedefinitions"}}]),a}(r(a(68)).default);t.default=d},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(26)),f=n(r(74)),d=n(r(0)),p=r(186),m=r(72);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(r,e);var a=h(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"componentDidMount",value:function(){"ExternalName"!==(0,s.default)(this.formTemplate,"spec.type")&&(0,f.default)(this.formTemplate,"spec",{type:"ExternalName"})}},{key:"render",value:function(){var e=this.props.formRef;return d.default.createElement(p.Form,{data:this.formTemplate,ref:e},d.default.createElement(p.Form.Item,{label:t("EXTERNAL_SERVICE_ADDRESS"),desc:t("EXTERNAL_SERVICE_ADDRESS_DESC"),rules:[{required:!0,message:t("EXTERNAL_SERVICE_ADDRESS_EMPTY_DESC")}]},d.default.createElement(p.Input,{name:"spec.externalName",placeholder:"foo.bar.example.com"})))}},{key:"formTemplate",get:function(){var e=this.props,t=e.formTemplate,a=e.module;return(0,s.default)(t,m.MODULE_KIND_MAP[a],t)}}]),r}(d.default.Component);a.default=v},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(84),r(16),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(6),r(84),r(28),r(42),r(16),r(4),r(23),r(57),r(24),r(193),r(17),r(7);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(26)),f=n(r(74)),d=n(r(242)),p=n(r(63)),m=n(r(0)),h=r(186),v=n(r(816)),g=n(r(829)),y=n(r(1339)),E=r(52),b=r(72),_=n(r(1618)),O=n(r(2640));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var C=function(e){(0,o.default)(r,e);var a=S(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,u=new Array(n),o=0;o0){var n=[];a.forEach((function(e){return e.name&&e.port?n.includes(e.name)?r({message:t("PORT_INPUT_DESC")}):e.name&&(e.name.length>63||!b.PATTERN_PORT_NAME.test(e.name))?r({message:t("PORT_NAME_DESC")}):void n.push(e.name):r({message:t("INVALID_PORT")})}))}r()},e.labelsValidator=function(e,a,r){return a?(0,p.default)(a)?r({message:t("ENTER_SELECTOR_TIP")}):(0,E.isValidLabel)(a)?r():r({message:t("LABEL_FORMAT_DESC")}):r()},e}return(0,u.default)(r,[{key:"renderTypeSelect",value:function(){return m.default.createElement(h.Form.Item,{label:t("INTERNAL_ACCESS_MODE")},m.default.createElement(v.default,{className:"margin-b12",value:this.state.serviceType,onChange:this.handleTypeChange,options:this.types}))}},{key:"renderLabelSelector",value:function(){return m.default.createElement(h.Form.Item,{label:t("WORKLOAD_SELECTOR"),rules:[{required:!0,message:t("ENTER_SELECTOR_TIP")},{validator:this.labelsValidator}]},m.default.createElement(_.default,{name:"spec.selector",cluster:this.props.cluster,namespace:this.namespace,addText:t("ADD")}))}},{key:"renderPorts",value:function(){return m.default.createElement(h.Form.Group,{label:t("PORT_PL"),desc:t("SERVICE_PORTS_DESC")},m.default.createElement(h.Form.Item,{rules:[{required:!0,message:t("PORT_EMPTY")},{validator:this.portsValidator,checkOnSubmit:!0}]},m.default.createElement(g.default,{name:"spec.ports",itemType:"object",addText:t("ADD")},m.default.createElement(y.default,null))))}},{key:"render",value:function(){var e=this.props.formRef;return m.default.createElement("div",{className:O.default.wrapper},m.default.createElement(h.Form,{data:this.formTemplate,ref:e},this.renderTypeSelect(),this.renderLabelSelector(),this.renderPorts()))}},{key:"formTemplate",get:function(){var e=this.props,t=e.formTemplate,a=e.module;return(0,s.default)(t,b.MODULE_KIND_MAP[a],t)}},{key:"namespace",get:function(){return(0,s.default)(this.formTemplate,"metadata.namespace")}},{key:"types",get:function(){return[{icon:"cluster",label:t("VIRTUAL_IP_TITLE"),description:t("VIRTUAL_IP_DESC"),value:"virtualIP"},{icon:"blockchain",label:t("INTERNAL_DOMAIN_NAME"),description:t("INTERNAL_DOMAIN_NAME_DESC"),value:"headlessSelector"}]}}]),r}(m.default.Component);a.default=C},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(97),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(64),r(75),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51));r(12),r(45),r(5),r(11),r(6),r(28),r(97),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(64),r(75),r(7);var f=n(r(800)),d=n(r(158)),p=n(r(0)),m=r(186),h=n(r(799)),v=n(r(1098)),g=r(72),y=n(r(2636));function E(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function b(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"/".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getWatchListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/".concat(e.apiVersion,"/watch").concat(e.getPath(t),"/").concat(e.module)},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath(t),"/").concat(e.module)},e.getBuilderTemplate=function(){var t=(0,i.default)(l.default.mark((function t(a){return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,request.get("/apis/devops.kubesphere.io/v1alpha1".concat(e.getPath(a),"/s2ibuildertemplates"));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),(0,n.default)(e,"fetchDetail",o,(0,f.default)(e)),e}return(0,s.default)(r,[{key:"creatBinary",value:function(e,t,a){var r=y.default.b2iBuilders({name:e,namespace:t});return request.post("/apis/devops.kubesphere.io/v1alpha1".concat(this.getPath({namespace:t,cluster:a}),"/s2ibinaries/").concat(e),r)}},{key:"verifyRepoReadable",value:(t=(0,i.default)(l.default.mark((function e(t,a,r,n){var u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return u=a?{remoteUrl:t,secretRef:{name:a,namespace:r}}:{remoteUrl:t},e.next=5,request.post("/kapis/resources.kubesphere.io/v1alpha2".concat(this.getPath({cluster:n}),"git/verify"),u,{},(function(e){var t=(0,v.default)(e,"message","");return t?Promise.resolve({message:t}):Promise.reject(e)}));case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)}))),function(e,a,r,n){return t.apply(this,arguments)})}]),r}(E.default),o=(0,h.default)(u.prototype,"fetchDetail",[g.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,i.default)(l.default.mark((function t(a){var r,n,u,o;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,n=a.namespace,u=a.name,e.isLoading=!0,t.next=4,request.get("/apis/devops.kubesphere.io/v1alpha1".concat(e.getPath({namespace:n}),"/s2ibuilders/").concat(u),void 0,void 0,(function(e){if("NotFound"===e.reason)return e;Promise.reject(e)}));case 4:return o=t.sent,e.detail=e.mapper(o),e.detail.cluster=r,e.isLoading=!1,t.abrupt("return",e.detail);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),u);t.default=O},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(61)),u=r(a(30)),o=r(a(58));a(41);var i,c=r(a(44)),s=r(a(36)),f=r(a(37)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=r(a(26)),g=a(14);function y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function E(e){for(var t=1;t0&&void 0!==p[0]?p[0]:{},a=t.cluster,r=t.workspace,u=t.namespace,i=t.more,t.devops,c=(0,o.default)(t,["cluster","workspace","namespace","more","devops"]),this.list.isLoading=!0,c.limit=c.limit||10,c.sortBy="createTime",e.next=6,request.get(this.getUrl({cluster:a,workspace:r}),c);case 6:return s=e.sent,f=(0,v.default)(s,"items",[]).map((function(e){return E({cluster:a,namespace:u,workspace:r},d.mapper(e))})),this.list.update(E(E({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(f)):f,total:s.totalItems||s.totalCount||s.total_count||f.length||0},c),{},{limit:Number(c.limit)||10,page:Number(c.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",f);case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"create",value:function(e,t){var a=e.cluster,r=(0,v.default)(t,"metadata.name"),n=this.getUrl({cluster:a,name:r});return this.submitting(request.post(n,t))}},{key:"patch",value:function(e,t){var a=e.cluster,r=(0,v.default)(t,"metadata.name"),n=this.getUrl({cluster:a,name:r});return request.patch(n,t)}},{key:"delete",value:function(e){var t=e.cluster,a=e.name,r=this.getUrl({cluster:t,name:a});return this.submitting(request.delete(r))}}]),r}(r(a(68)).default),(0,h.default)(i.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,h.default)(i.prototype,"create",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"create"),i.prototype),(0,h.default)(i.prototype,"patch",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"patch"),i.prototype),(0,h.default)(i.prototype,"delete",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"delete"),i.prototype),i);t.default=_},,,function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(800)),p=r(186),m=n(r(790)),h=n(r(841)),v=n(r(2798));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=function(e){(0,o.default)(r,e);var a=g(r);function r(e){var t;(0,l.default)(this,r),(t=a.call(this,e)).triggerChange=(0,d.default)((function(){var e=t.state,a=e.mode,r=e.config;t.props.onChange({mode:a,config:r})}),300),t.handleModeChange=function(e){t.setState({mode:e},(function(){t.triggerChange()}))},t.handleConfigChange=function(e){t.setState({config:e},(function(){t.triggerChange()}))};var n=e.data,u=n.mode,o=n.config;return t.state={mode:u,config:o},t}return(0,u.default)(r,[{key:"render",value:function(){var e=this.props,a=e.title,r=e.showSelect,n=e.selectDisabled,l=e.editorClassName,u=e.readOnly,o=this.state,i=o.mode,c=o.config;return s.default.createElement("div",{className:v.default.wrapper},s.default.createElement("div",{className:v.default.header},s.default.createElement("div",{className:v.default.title},s.default.createElement(p.Icon,{name:"coding",size:20}),s.default.createElement(m.default,{title:t(a)})),r&&s.default.createElement("div",{className:v.default.select},s.default.createElement(p.Select,{disabled:n,options:this.options,value:i,onChange:this.handleModeChange}))),s.default.createElement(h.default,{className:l,options:{readOnly:u},mode:i,value:c,onChange:this.handleConfigChange}))}},{key:"options",get:function(){return[{label:"YAML",value:"yaml"},{label:"Properties",value:"properties"},{label:"JSON",value:"json"},{label:"Text",value:"text"}]}}]),r}(s.default.Component);a.default=y,y.propTypes={data:f.default.object,showSelect:f.default.bool,onChange:f.default.func},y.defaultProps={data:{mode:"yaml",config:""},showSelect:!0,onChange:function(){}}},,,,,,,,,,,,,,,,,,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(84),r(18),r(16),r(10),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(315));r(5),r(11),r(84),r(18),r(16),r(10),r(4),r(85);var u=n(r(60)),o=n(r(0)),i=r(186),c=r(72),s=n(r(2917)),f=function(e){var a=e.name,r=e.value;return o.default.createElement("div",{className:s.default.accessMode},o.default.createElement("p",{className:"name"},"".concat(a,"(").concat(r,")")),o.default.createElement("p",{className:"desc"},t("ACCESS_MODE_".concat(r))))},d=function(e){if(e.loading)return null;var t=Object.keys(c.ACCESS_MODES).map((function(e){return{label:o.default.createElement(f,{name:e,value:c.ACCESS_MODES[e]}),value:e}}));return(0,u.default)(e.supportedAccessModes)&&(t=t.filter((function(t){return e.supportedAccessModes.includes(t.value)}))),o.default.createElement("div",{className:s.default.accessModeWrapper},o.default.createElement(i.RadioGroup,(0,l.default)({options:t},e)))};a.default=d},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(158)),p=n(r(0)),m=r(186),h=n(r(2923));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var g={className:h.default.slider,railStyle:{height:30,backgroundColor:"#7eb8dc",borderRadius:2},handleStyle:{width:14,height:30,marginTop:0,backgroundColor:"#fff",borderRadius:0,border:"none"},trackStyle:{height:30,borderRadius:2,backgroundColor:"#329dce"}},y=function(e){(0,c.default)(r,e);var a=v(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.leftContent,r=e.rightContent,n=e.defaultValue,o=(0,u.default)(e,["leftContent","rightContent","defaultValue"]),i=(0,d.default)(o.value)?n:o.value;return p.default.createElement("div",{className:h.default.wrapper},p.default.createElement(m.Slider,(0,l.default)({min:0,max:100,defaultValue:i},o,g)),p.default.createElement("span",{className:h.default.floatContent,style:{left:"".concat(Math.floor(i/2),"%"),maxWidth:"".concat(i,"%")}},t("VERSION_TRAFFIC_PERCENT",{version:a,percent:i})),p.default.createElement("span",{className:h.default.floatContent,style:{left:"".concat(Math.floor(i/2)+50,"%"),maxWidth:"".concat(100-i,"%")}},t("VERSION_TRAFFIC_PERCENT",{version:r,percent:100-i})))}}]),r}(p.default.PureComponent);a.default=y,y.defaultProps={defaultValue:50}},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(5),r(18),r(16),r(137),r(9),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(16),r(137),r(9),r(4),r(23),r(57),r(17);var u,o,i=n(r(315)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(49)),h=l(r(0)),v=r(14),g=r(239),y=n(r(26)),E=r(186),b=n(r(441)),_=n(r(2926));function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var S=(0,g.observer)((o=function(e){(0,f.default)(r,e);var a=O(r);function r(){var e;(0,c.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{},a=t.workspace,r=t.repo_id,n=t.name,l=e.baseUrl;return a&&(l+="/workspaces/".concat(a)),r?"".concat(l,"/repos/").concat(r,"/").concat(n||""):"".concat(l,"/repos")},e.getWatchListUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.workspace;return"apis/application.kubesphere.io/v1alpha1/watch/helmrepos?labelSelector=kubesphere.io/workspace=".concat(t)},(0,d.default)(e,"fetchDetail",o,(0,h.default)(e)),(0,d.default)(e,"update",i,(0,h.default)(e)),(0,d.default)(e,"delete",c,(0,h.default)(e)),e}return(0,m.default)(r,[{key:"validate",value:function(e){var t=e.workspace,a=(0,f.default)(e,["workspace"]);return request.post("".concat(this.getUrl({workspace:t}),"?validate=true"),a)}},{key:"index",value:function(e){var t=e.workspace,a=e.repo_id;if(a)return request.post(this.getUrl({workspace:t,repo_id:a,name:"action"}),{action:"index"})}},{key:"fetchEvents",value:(t=(0,s.default)(n.default.mark((function e(t){var a,r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.workspace,r=t.repo_id,this.events.isLoading=!0,e.next=4,request.get(this.getUrl({workspace:a,repo_id:r,name:"events"}),{});case 4:l=e.sent,this.events.update({data:(0,_.default)(l,"items",[]),total:(0,_.default)(l,"total_count",0)}),this.events.isLoading=!1;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"setSelectRowKeys",value:function(e){this.list.selectedRowKeys=e}}]),r}(O.default),u=(0,E.default)(l.prototype,"events",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new S.default}}),o=(0,E.default)(l.prototype,"fetchDetail",[b.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return(0,s.default)(n.default.mark((function t(){var a,r,l,u,o=arguments;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=o.length>0&&void 0!==o[0]?o[0]:{},r=a.workspace,l=a.repo_id,e.isLoading=!0,t.next=4,request.get(e.getUrl({workspace:r,repo_id:l}));case 4:u=t.sent,e.detail=u||{},e.detail.workspace=r,e.isLoading=!1;case 8:case"end":return t.stop()}}),t)})))}}),(0,E.default)(l.prototype,"validate",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"validate"),l.prototype),(0,E.default)(l.prototype,"index",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"index"),l.prototype),(0,E.default)(l.prototype,"fetchEvents",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchEvents"),l.prototype),i=(0,E.default)(l.prototype,"update",[b.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return(0,s.default)(n.default.mark((function t(){var a,r,l,u,o=arguments;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=o.length>0&&void 0!==o[0]?o[0]:{},r=a.workspace,l=a.repo_id,u=(0,f.default)(a,["workspace","repo_id"]),t.next=3,e.submitting(request.patch(e.getUrl({workspace:r,repo_id:l}),u));case 3:case"end":return t.stop()}}),t)})))}}),c=(0,E.default)(l.prototype,"delete",[b.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.workspace,r=t.repo_id;return e.submitting(request.delete(e.getUrl({workspace:a,repo_id:r}),{}))}}}),(0,E.default)(l.prototype,"setSelectRowKeys",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"setSelectRowKeys"),l.prototype),l);t.default=D},,function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(109),r(11),r(6),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(6),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(7);var u=l(r(30)),o=l(r(43));r(41);var i=l(r(44)),c=l(r(36)),s=l(r(37)),f=l(r(55)),d=l(r(56)),p=l(r(51)),m=n(r(0)),h=l(r(1)),v=l(r(3)),g=r(186),y=l(r(240)),E=l(r(952)),b=r(327),_=r(52),O=l(r(3182));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};(0,m.default)(this,t),(0,p.default)(this,"isLoading",i,this),(0,p.default)(this,"pathParams",c,this),(0,p.default)(this,"data",s,this),(0,p.default)(this,"headers",f,this),Object.getOwnPropertyNames(r).forEach((function(e){a[e]=r[e]})),this.headers={"X-Remote-User":e.globals.user.username}}return(0,h.default)(t,[{key:"getApiPath",value:function(){return"kapis/logging.kubesphere.io/v1alpha2/logs"}},{key:"request",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((0,d.default)(n.default.mark((function e(){var t,a,r,l,o,i,c,s=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=s.length>1&&void 0!==s[1]?s[1]:"get",this.isLoading=!0,r=t.start_time,l=t.end_time,o=t.cluster,i=(0,u.default)(t,["start_time","end_time","cluster"]),e.next=6,request[a](this.getApiPath(),E(E({},i),{},{start_time:r?Math.floor(r/1e3):void 0,end_time:l?Math.floor(l/1e3):void 0,cluster:o}),{headers:this.headers});case 6:return c=e.sent,this.isLoading=!1,e.abrupt("return",c);case 9:case"end":return e.stop()}}),e,this)}))))},{key:"apiVersion",get:function(){return"kapis/logging.kubesphere.io/v1alpha2"}}]),t}(),i=(0,v.default)(o.prototype,"isLoading",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),c=(0,v.default)(o.prototype,"pathParams",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),s=(0,v.default)(o.prototype,"data",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),f=(0,v.default)(o.prototype,"headers",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),(0,v.default)(o.prototype,"request",[g.action],Object.getOwnPropertyDescriptor(o.prototype,"request"),o.prototype),o);t.default=b}).call(this,a(69))},,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(87),a(48),a(139),a(24),a(17),a(62),a(64),Object.defineProperty(t,"__esModule",{value:!0}),t.mark=o,t.markAll=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o;if(!t.length)return[e];return t.reduce((function(e,t){return e.reduce((function(e,r){return e.concat(a(r,t))}),[])}),[e])},t.esMark=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hightLighted";if(!(0,l.default)(e))return e;var r=t.match(/\w+|[\u4e00-\u9fa5]/g)||[],n=r.reduce((function(e,t){var a=e.slice(-1),r=i.test(t),n=i.test(a);return"".concat(e,"[^\\w\\u4e00-\\u9fa5]{").concat(r||n?0:1,",}").concat(t)}),"");if(!n)return[e];var u=new RegExp(n,"ig");return c(e,u,a)},t.markStrAsArray=c;var n=r(a(30));a(5),a(28),a(87),a(48),a(4),a(139),a(251),a(24),a(252),a(193),a(17),a(62),a(64);var l=r(a(195)),u=/[|\\{}()[\]^$+*?.]/g;function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hightLighted";if(!(0,l.default)(e))return e;if(!t)return[e];var r=t.replace(u,"\\$&"),n=new RegExp(r,"ig");return c(e,n,a)}var i=/[\u4e00-\u9fa5]/;function c(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hightLighted",r=[e],l=0;return e.replace(t,(function(e,t){var u=r.length-1,o=r[u],i=t-l,c=o.slice(0,i),s=o.slice(i+e.length);r[u]=c,r.push((0,n.default)({},a,e),s),l+=t+e.length})),r}},function(e,t,a){"use strict";a(15);var r=a(20);a(16),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(16);var n=r(a(0)),l=a(186),u=r(a(836)),o=r(a(3566)),i=function(e){var t=e.type,a=e.name,r=e.isActive,i=void 0!==r&&r,c=e.icon,s=e.crumb,f=void 0!==s&&s?18:"openpitrixs"===t?35:40;return n.default.createElement(n.default.Fragment,null,"openpitrixs"===t?n.default.createElement("div",{className:o.default.img},n.default.createElement(u.default,{src:null,iconLetter:a,iconSize:f})):n.default.createElement(l.Icon,{name:c,size:f,type:i?"light":"dark"}))};t.default=i},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1207)).default);t.default=c},function(e,a,r){"use strict";r(15);var n=r(20);r(187),r(11),r(31),r(84),r(18),r(87),r(16),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=function(t){var a=e.itemActions.map((function(e){return l.default.createElement(u.Menu.MenuItem,{key:e.key},l.default.createElement(u.Icon,{name:e.icon})," ",l.default.createElement("span",{"data-test":"table-item-".concat(e.key)},e.text))}));return a.every((function(e){return null===e}))?null:l.default.createElement(u.Menu,{onClick:r(t)},a)},r=function(t){return function(a,r){var n=e.itemActions.find((function(e){return e.key===r}));n&&n.onClick&&n.onClick(t)}},n=e.data,v=e.tagList,g=e.checked,y=e.showCheckbox,E=e.isEdgeWize,b=e.hideColumns,_=void 0===b?[]:b,O=n.expiredDay,S=O&&O<0,C=O&&O<=10&&O>=0,D=_.reduce((function(e,t){return m[t]+e}),0);return l.default.createElement("li",{className:p.default.wrapper,"data-test":"cluster-item"},l.default.createElement(u.Columns,null,l.default.createElement(u.Column,{className:"is-4 flexbox items-center",style:{width:"".concat(h(4,D),"%")}},!!y&&l.default.createElement(u.Checkbox,{className:"margin-r8",onChange:function(t){var a=e.onChangeChecked,r=e.data;a&&a(r.name,t)},checked:n.tags.length<5&&g,disabled:n.tags.length>=5}),l.default.createElement(s.default,{className:"flex",cluster:n,onClick:function(){var t=e.data,a=e.onEnter;a&&a(t.name,t.provider)},isEdgeWize:E,isExpired:S})),!_.includes("nodeCount")&&l.default.createElement(u.Column,{className:"is-1",style:{width:"".concat(h(E?2:1,D),"%")}},l.default.createElement(i.default,{title:n.nodeCount,description:t("NODE_COUNT")})),!_.includes("version")&&l.default.createElement(u.Column,{className:"is-1",style:{width:"".concat(h(E?2:1,D),"%")}},l.default.createElement(i.default,{title:n.kubernetesVersion,description:t("KUBERNETES_VERSION")})),!_.includes(E?"hostCluster":"provider")&&l.default.createElement(u.Column,{className:"is-1",style:{width:"".concat(h(1,D),"%")}},l.default.createElement(i.default,{title:(0,f.getDomTitle)((E?n.hostCluster:n.provider)||"-"),description:E?t("HOSTED_IN"):t("PROVIDER")})),!E&&!_.includes("tags")&&l.default.createElement(u.Column,{className:"is-2",style:{width:"".concat(h(2,D),"%")}},l.default.createElement(i.default,{title:l.default.createElement(c.ClusterTagGroup,{data:n.tags.map((function(e){return(v||[]).find((function(t){return e.name===t.name}))})).filter(Boolean),empty:"-"}),description:t("TAG_PL")})),!_.includes("createTime")&&l.default.createElement(u.Column,{className:"is-2",style:{width:"".concat(h(2,D),"%")}},C?l.default.createElement(i.default,{title:l.default.createElement("span",null,t.html("LAST_KUBE_CONFIG_EXPIRED",{count:parseInt(O,10)})),description:t("EXPIRE_DATE")}):l.default.createElement(i.default,{title:(0,f.getLocalTime)(n.createTime).format("YYYY-MM-DD HH:mm:ss"),description:t("CREATION_TIME")})),l.default.createElement(u.Column,null,l.default.createElement(d.default,{item:{id:n.uid,name:n.name,url:"/clusters/".concat(n.name,"/overview"),type:"Cluster",isHost:n.isHost},user:globals.user.username})),l.default.createElement(u.Column,{className:(0,o.default)("is-1",p.default.options)},function(t){if(!e.isOperation)return null;var r=a(t);return l.default.createElement(u.Dropdown,{content:r,trigger:"click",placement:"bottomRight"},l.default.createElement(u.Button,{icon:"more",type:"flat"}))}(n))))},r(187),r(11),r(31),r(84),r(18),r(87),r(16),r(4),r(319),r(85);var l=n(r(0)),u=r(186),o=n(r(3)),i=n(r(790)),c=r(924),s=n(r(814)),f=r(52),d=n(r(3712)),p=n(r(3720)),m={nodeCount:1,version:1,provider:2,tags:2,createTime:2},h=function(e,t){return e/(11-t)*11/12*100}},function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(42),a(4),a(23),a(57),a(17);var n,l,u=r(a(65)),o=r(a(36)),i=r(a(88)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(49)),p=(r(a(66)),a(14)),m=a(52),h=r(a(1210));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var g=["pod_cpu_usage","pod_cpu_used_requests_utilisation","pod_cpu_used_limits_utilisation","pod_memory_usage_wo_cache","pod_memory_used_requests_utilisation","pod_memory_used_limits_utilisation","pod_gpu_usage","pod_gpu_memory_usage","pod_pvc_bytes_usage","pod_pvc_bytes_utilisation","pod_net_bytes_transmitted","pod_net_bytes_received"],y=["pod_cpu_usage","pod_cpu_used_requests_utilisation","pod_cpu_used_limits_utilisation","pod_memory_usage_wo_cache","pod_memory_used_requests_utilisation","pod_memory_used_limits_utilisation","pod_gpu_usage","pod_gpu_memory_usage","pod_net_bytes_transmitted","pod_net_bytes_received","pod_pvc_bytes_usage","pod_pvc_bytes_utilisation"],E=(n=function(e){(0,c.default)(a,e);var t=v(a);function a(e){var r;return(0,o.default)(this,a),r=t.call(this,e),(0,u.default)(r,"sort_metric",l,(0,i.default)(r)),r.resource="pods",r.sort_metric_options=(0,m.hideGPUByLicense)(g,r.cluster),r.metrics_filter=(0,m.hideGPUByLicense)(y,r.cluster).join("|"),r}return a}(h.default),l=(0,d.default)(n.prototype,"sort_metric",[p.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return g[0]}}),n);t.default=E},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=n(a(96)),u=r(a(0)),o=n(a(3)),i=n(a(3743)),c=function(e){var t=e.content,a=e.className,r=e.percent,n=(0,u.useRef)(),c=(0,u.useState)(!1),s=(0,l.default)(c,2),f=s[0],d=s[1],p=(0,u.useState)({x:0,y:0}),m=(0,l.default)(p,2),h=m[0],v=m[1];return u.default.createElement("div",{ref:n,className:(0,o.default)(i.default.background,a),onMouseMove:function(e){if(f){var t=n.current.getBoundingClientRect(),a=e.clientX-t.x,r=e.clientY-t.y;v({x:a+20,y:r})}},onMouseEnter:function(){return d(!0)},onMouseLeave:function(){return d(!1)}},u.default.createElement("div",{className:i.default.percent,style:{width:"".concat(r,"%")}}),f&&u.default.createElement("div",{style:{left:h.x,top:h.y},className:i.default.tooltip},t))};t.default=c},,function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var u=l(r(36)),o=l(r(37)),i=l(r(55)),c=l(r(56)),s=l(r(51)),f=n(r(0)),d=r(186),p=l(r(996)),m=r(52),h=l(r(3865));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=function(e){(0,i.default)(r,e);var a=v(r);function r(){var e;(0,u.default)(this,r);for(var n=arguments.length,l=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r="";return t&&(r+="/klusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"fetchList",value:(a=(0,s.default)(n.default.mark((function e(t){var a,r,l,o,i,c,s,f,d=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,l=t.containers,o=void 0===l?[]:l,i=t.initContainers,c=void 0===i?[]:i,this.list.isLoading=!0,o=(0,g.default)(o)?[]:o,c=(0,g.default)(c)?[]:c,s=[].concat((0,u.default)(c.map((function(e){return b(b({},e),{},{type:"init"})}))),(0,u.default)(o.map((function(e){return b(b({},e),{},{type:"work"})})))),e.next=7,Promise.all(s.map((function(e){return e.cluster=a,e.namespace=r,d.fetchVariables(e)})));case 7:f=e.sent,this.list={data:f,isLoading:!1};case 9:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchVariables",value:(t=(0,s.default)(n.default.mark((function e(t){var a,r,l,u,o,i,c,s=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.variables.isLoading=!0,a=t.cluster,r=t.namespace,l=t.env,u=[],o=[],(void 0===l?[]:l).forEach((function(e){if("valueFrom"in e){var t=e.valueFrom,n=t.secretKeyRef,l=t.configMapKeyRef;n&&(o.push({name:e.name,key:n.key}),u.push(request.get("api/v1".concat(s.getPath({cluster:a,namespace:r}),"/secrets/").concat(n.name)))),l&&(o.push({name:e.name,key:l.key}),u.push(request.get("api/v1".concat(s.getPath({cluster:a,namespace:r}),"/configmaps/").concat(l.name))))}else o.push(e),u.push(e.value||"")})),e.next=7,Promise.all(u);case 7:return i=e.sent,c=o.map((function(e,t){var a=i[t];return"Secret"===a.kind&&e.key?{name:e.name,value:(0,y.safeAtob)((0,v.default)(a.data,e.key,""))}:"ConfigMap"===a.kind&&e.key?{name:e.name,value:(0,v.default)(a.data,e.key,"")}:b({value:""},e)})),this.variables={data:c,isLoading:!1},t.variables=c,e.abrupt("return",t);case 12:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),i=(0,m.default)(o.prototype,"list",[h.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],isLoading:!0}}}),c=(0,m.default)(o.prototype,"variables",[h.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],isLoading:!0}}}),(0,m.default)(o.prototype,"fetchList",[h.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchList"),o.prototype),(0,m.default)(o.prototype,"fetchVariables",[h.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchVariables"),o.prototype),o);t.default=_},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(84),r(18),r(16),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(6),r(84),r(18),r(42),r(16),r(4),r(23),r(57),r(17),r(85);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=n(r(63)),h=r(186),v=n(r(801)),g=n(r(3880));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var E=["password","secret"],b=function(e){(0,i.default)(r,e);var a=y(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:"namespacenetworkpolicies";return(0,f.default)(this,r),e=a.call(this,t),(0,s.default)(e,"list",i,(0,p.default)(e)),e.getResourceUrl=function(t){return"/kapis/network.kubesphere.io/v1alpha1".concat(e.getPath(t),"/").concat(e.module)},e}return(0,d.default)(r,[{key:"fetchListOut",value:(t=(0,c.default)(n.default.mark((function e(){var t,a,r,l,o,i,c,s,f,d,p,m,h=this,v=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=v.length>0&&void 0!==v[0]?v[0]:{},l=r.cluster,o=r.namespace,i=r.page,c=void 0===i?this.list.page:i,s=r.name,f=(0,u.default)(r,["cluster","namespace","page","name"]),this.list.isLoading=!0,(d=f).limit?this.list.limit=d.limit:d.limit=this.list.limit,(null===(t=this.list)||void 0===t||null===(a=t.continues)||void 0===a?void 0:a[c])?d.continue=this.list.continues[c]:this.list.continues={1:""},d.page=c,e.next=8,request.get(this.getResourceUrl({cluster:l,namespace:o}),d);case 8:return p=e.sent,m=p.items.map((function(e){return _({cluster:l,namespace:o},h.mapper(e))})),this.list.continues[Number(c)+1]=p.metadata.continue,1===Number(c)&&(this.list.total=m.length+(p.metadata.remainingItemCount||0)),(0,E.extendObservable)(this.list,{data:m,page:Number(c),name:s}),this.list.isLoading=!1,e.abrupt("return",this.list);case 15:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(y.default),i=(0,g.default)(o.prototype,"list",[E.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,continues:{1:""},isLoading:!0}}}),(0,g.default)(o.prototype,"fetchListOut",[E.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchListOut"),o.prototype),o);t.default=S},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(62),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(43));r(41);var i,c=n(r(44)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(0)),v=n(r(63)),g=n(r(26)),y=r(239),E=r(186),b=n(r(831)),_=n(r(795)),O=r(52),S=r(791),C=r(14),D=n(r(914)),k=n(r(910)),N=n(r(805)),T=n(r(907)),R=n(r(3967));function w(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function I(e){for(var t=1;t=172800}),p.default.createElement(R.default,{type:"memory",title:t("MEMORY_USAGE_TIME",{time:u.label}),metrics:(0,v.default)(r,"namespace_memory_usage_wo_cache.data.result"),isLoading:n||l,showDay:u.value>=172800}),this.showLicenseTip&&p.default.createElement(p.default.Fragment,null,p.default.createElement(R.default,{type:"cpu",title:t("GPU_USAGE_TIME",{time:u.label}),metrics:(0,v.default)(r,"namespace_gpu_usage.data.result"),isLoading:n||l,showDay:u.value>=172800}),p.default.createElement(R.default,{type:"memory",title:t("GPU_MEMORY_USAGE_TIME",{time:u.label}),metrics:(0,v.default)(r,"namespace_gpu_memory_usage.data.result"),isLoading:n||l,showDay:u.value>=172800})))}},{key:"renderHeader",value:function(){return globals.app.hasClusterModule(this.cluster,"whizard-monitoring")?p.default.createElement("div",{className:w.default.header},p.default.createElement(k.RadioGroup,{mode:"button",value:this.state.resourceType,onChange:this.handleResouceTypeChange,size:"small"},p.default.createElement(k.RadioButton,{value:"application"},t("APPLICATION_RESOURCE_PL")),p.default.createElement(k.RadioButton,{value:"physical"},t("PHYSICAL_RESOURCE_PL"))),p.default.createElement(k.Select,{className:w.default.timeSelect,defaultValue:this.state.range,options:this.timeOptions,onChange:this.handleRangeChange})):null}},{key:"render",value:function(){var e=this.state.resourceType;return p.default.createElement(N.default,{className:w.default.wrapper,title:t("RESOURCE_STATUS")},this.renderHeader(),"application"===e?this.renderApplicationResource():this.renderPhysicalResource())}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"namespace",get:function(){return(0,v.default)(this.props.match,"params.namespace")}},{key:"cluster",get:function(){return(0,v.default)(this.props.match,"params.cluster")}},{key:"timeOptions",get:function(){return[{label:t("LAST_TIME_H",{num:1}),value:3600},{label:t("LAST_TIME_H",{num:2}),value:7200},{label:t("LAST_TIME_H",{num:5}),value:18e3},{label:t("LAST_TIME_H",{num:12}),value:43200},{label:t("LAST_TIME_D",{num:1}),value:86400},{label:t("LAST_TIME_D",{num:2}),value:172800},{label:t("LAST_TIME_D",{num:3}),value:259200},{label:t("LAST_TIME_D",{num:7}),value:604800}]}},{key:"showLicenseTip",get:function(){var e;return!(null===(e=globals.licenseInfo)||void 0===e?void 0:e.showLicenseTip)&&(0,v.default)(globals,'ksConfig["gpu.monitoring"]',!1)}}]),r}(p.default.Component))||l)||l;a.default=L},function(e,t,a){"use strict";a(15);var r=a(20);a(29),a(9),a(4),a(22),a(38),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(29),a(9),a(4),a(22),a(38),a(32);var n=r(a(43)),l=r(a(96));a(41);var u,o,i=r(a(44)),c=r(a(65)),s=r(a(36)),f=r(a(37)),d=r(a(49)),p=(r(a(66)),a(14)),m=a(52),h=(u=function(){function e(){(0,s.default)(this,e),(0,c.default)(this,"resource",o,this)}var t;return(0,f.default)(e,[{key:"getPath",value:function(e){var t=e.cluster,a=e.namespace,r="";return t&&(r+="/klusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"fetchResourceStatus",value:(t=(0,i.default)(n.default.mark((function e(t){var a,r,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.resource.isLoading=!0,e.next=3,Promise.all([(0,m.to)(request.get("kapis/resources.kubesphere.io/v1alpha2".concat(this.getPath(t),"/quotas"))),(0,m.to)(request.get("kapis/resources.kubesphere.io/v1alpha2".concat(this.getPath(t),"/abnormalworkloads")))]);case 3:a=e.sent,r=(0,l.default)(a,2),u=r[0],o=r[1],this.resource={quota:u.data,status:o.data,isLoading:!1};case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),o=(0,d.default)(u.prototype,"resource",[p.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{quota:{},status:{},isLoading:!0}}}),(0,d.default)(u.prototype,"fetchResourceStatus",[p.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchResourceStatus"),u.prototype),u);t.default=h},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(86),r(18),r(97),r(16),r(27),r(190),r(24),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(86),r(18),r(97),r(16),r(27),r(190),r(4);var u=l(r(30)),o=l(r(96)),i=n(r(0)),c=r(186),s=l(r(3)),f=l(r(1044)),d=r(52),p=l(r(4030)),m=function(e){var a=(0,i.useState)(!1),r=(0,o.default)(a,2),n=r[0],l=r[1];return i.default.createElement("div",{className:p.default.card,onClick:function(){return l(!n)}},i.default.createElement("div",{className:p.default.Head},i.default.createElement(c.Icon,{name:"database",size:40}),i.default.createElement("div",{className:p.default.item},i.default.createElement("p",{className:p.default.title},"storageclass.storage.k8s.io/requests.storage"===e.name?t("STORAGE_RELATED_RESOURCE_LIMIT"):t("STORAGE_RELATED_RESOURCE")),i.default.createElement("p",{className:p.default.desc},t("RESOURCE_TYPE"))),i.default.createElement("div",{className:p.default.item},i.default.createElement("p",{className:p.default.title},e.allStorageClass.length),i.default.createElement("p",{className:p.default.desc},t("TOTAL_STORAGE_CLASS"))),i.default.createElement("div",{className:p.default.item},i.default.createElement("p",{className:p.default.title},e.data.length),i.default.createElement("p",{className:p.default.desc},t("LIMITED_STORAGE_CLASS"))),i.default.createElement("div",{className:(0,s.default)(p.default.icon,(0,u.default)({},p.default.open,n))},e.data.length>0&&i.default.createElement(c.Icon,{name:"chevron-down",size:20}))),n&&e.data.length>0&&i.default.createElement("ul",{className:p.default.List},e.data.map((function(a){var r=-1!==e.name.indexOf("requests.storage"),n=a.name.split(".")[0],l=0;l=r?Number((0,d.memoryFormat)(a.used,"Gi"))/Number((0,d.memoryFormat)(a.total,"Gi")):Number(a.used,"Gi")/Number(a.total,"Gi"),l=Math.min(Math.max(l,0),1);var u=e.allStorageClass.some((function(e){return e.name===n&&e.default})),o=(0,d.memoryFormat)(a.used,"Gi");return o=isNaN(o)?0:o,i.default.createElement("div",{className:p.default.inline,key:n},i.default.createElement(c.Icon,{name:"database",size:40}),i.default.createElement("div",{className:p.default.item},i.default.createElement("p",{className:p.default.title},n,u&&i.default.createElement("span",{className:p.default.default},t("DEFAULT"))),i.default.createElement("p",{className:p.default.desc},t("NAME"))),i.default.createElement("div",{className:p.default.item},i.default.createElement("p",{className:p.default.title},r?"".concat(o," Gi"):a.used),i.default.createElement("p",{className:p.default.desc},t("USED"))),i.default.createElement("div",{className:p.default.item},i.default.createElement("p",{className:p.default.title},r?"".concat((0,d.memoryFormat)(a.total,"Gi")," Gi"):a.total),i.default.createElement("p",{className:p.default.desc},t("RELATED_RESOURCE_QUOTA"))),i.default.createElement("div",{className:p.default.barItem},i.default.createElement("div",{className:p.default.title},t("USAGE")),i.default.createElement(f.default,{value:Math.min(l,1),className:p.default.bar,rightText:a.total?"":t("NO_LIMIT"),text:t("USED_PERCENT",{percent:Number((100*l).toFixed(2))})})))}))))};a.default=m},function(e,a,r){"use strict";r(15);var n=r(20);r(86),r(16),r(27),r(190),r(24),r(64),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(86),r(16),r(27),r(190),r(24),r(64);var l=n(r(0)),u=n(r(158)),o=r(186),i=n(r(1044)),c=r(52),s=r(72),f=n(r(4031)),d=function(e){var a=e.name,r=e.total,n=e.used,d=-1!==a.indexOf("requests.storage"),p=0;"limits.cpu"===a||"requests.cpu"===a?r&&(p=Number((0,c.cpuFormat)(n))/Number((0,c.cpuFormat)(r)),n="".concat((0,c.cpuFormat)(n)," Core"),r="".concat((0,c.cpuFormat)(r)," Core")):"limits.memory"===a||"requests.memory"===a?r&&(p=Number((0,c.memoryFormat)(n))/Number((0,c.memoryFormat)(r)),n="".concat((0,c.memoryFormat)(n,"Gi")," Gi"),r="".concat((0,c.memoryFormat)(r,"Gi")," Gi")):r&&(p=Number(n)/Number(r)),p=Math.min(Math.max(p,0),1);var m=a.indexOf("gpu")>-1?"gpu":a,h="gpu"===m?"".concat(m,".limit"):m;return l.default.createElement("div",{className:f.default.quota},l.default.createElement(o.Icon,{name:s.ICON_TYPES[m]||"resource",size:40}),l.default.createElement("div",{className:f.default.item},l.default.createElement("div",null,t(h.replace(/[. ]/g,"_").toUpperCase())),l.default.createElement("p",null,t("RESOURCE_TYPE_SCAP"))),l.default.createElement("div",{className:f.default.item},l.default.createElement("div",null,n," ",d&&"Gi"),l.default.createElement("p",null,t("USED"))),l.default.createElement("div",{className:f.default.item},l.default.createElement("div",null,(0,u.default)(r)?t("NO_LIMIT"):d?"".concat(r," Gi"):r),l.default.createElement("p",null,t("RESOURCE_LIMIT"))),l.default.createElement("div",{className:f.default.item,style:{flex:3}},l.default.createElement("div",null,t("USAGE")),l.default.createElement(i.default,{value:Math.min(p,1),className:f.default.bar,rightText:r?"":t("NO_LIMIT"),text:t("USED_PERCENT",{percent:Number((100*p).toFixed(2))})})))};a.default=d},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(e.disabled)return n.default.createElement("a",e);return n.default.createElement(l.Link,e)};var n=r(a(0)),l=a(433)},,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(42),a(4),a(23),a(57),a(17);var n,l,u,o,i=r(a(65)),c=r(a(36)),s=r(a(37)),f=r(a(88)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=(r(a(66)),a(14)),g=a(52),y=r(a(1129));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var b=["workload_cpu_usage","workload_memory_usage_wo_cache","workload_gpu_usage","workload_gpu_memory_usage","workload_net_bytes_transmitted","workload_net_bytes_received"],_=["workload_cpu_usage","workload_memory_usage_wo_cache","workload_gpu_usage","workload_gpu_memory_usage","workload_net_bytes_transmitted","workload_net_bytes_received"],O=(n=function(e){(0,d.default)(a,e);var t=E(a);function a(e){var r;return(0,c.default)(this,a),r=t.call(this,e),(0,i.default)(r,"namespaces",l,(0,f.default)(r)),(0,i.default)(r,"sort_metric",u,(0,f.default)(r)),(0,i.default)(r,"changeNamespace",o,(0,f.default)(r)),r.sort_metric_options=(0,g.hideGPUByLicense)(e.sort_metric_options||b,r.cluster),r.metrics_filter=(0,g.hideGPUByLicense)(_,r.cluster).join("|"),r}return(0,s.default)(a,[{key:"fetchUrl",get:function(){return"".concat(this.apiVersion,"/workload_metrics")}}]),a}(y.default),l=(0,h.default)(n.prototype,"namespaces",[v.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),u=(0,h.default)(n.prototype,"sort_metric",[v.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return b[0]}}),o=(0,h.default)(n.prototype,"changeNamespace",[v.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.namespaces=t,e.fetchAll()}}}),n);t.default=O},,,,,,,,,,,,,,,,function(e,t,a){e.exports={title:"_23ICmTFZPZciTzxk6GwlL7",workloads:"_2pydmsXzGwPczsCCJ75una",trafficCard:"_1IK6lET9gevbaUDSF49pYC"}},,,,,,,,,,,,,,,,,,,,,,,function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(11),r(6),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(6),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(30)),p=n(r(26)),m=n(r(189)),h=n(r(158)),v=n(r(194)),g=n(r(0)),y=n(r(106)),E=n(r(1264)),b=r(239),_=n(r(1)),O=n(r(3)),S=r(186),C=n(r(836)),D=n(r(790)),k=n(r(1477));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t=8?8:e.length,a={};if(this.ref&&this.ref.current){var r=this.ref.current.getBoundingClientRect();window.innerHeight-r.top>31.5*t+8+r.height?a.top=r.top+r.height+8:a.top=r.top-8-31.5*t,a.left=r.left}return a}},{key:"render",value:function(){var e=this.props,t=e.children,a=e.options,r=this.state.isOpen;return s.default.createElement("div",{className:d.default.wrapper,ref:this.ref},s.default.createElement("div",{className:d.default.trigger,onClick:this.triggerOpen},t),r&&s.default.createElement(f.default,{style:this.getOptionsStyle(a),options:a,level:0,onSelect:this.handleSelect}))}}]),a}(s.Component);t.default=m,m.defaultProps={options:[],children:"",onSelect:function(){}}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(42),a(4),a(23),a(57),a(17);var l=n(a(36)),u=n(a(37)),o=n(a(55)),i=n(a(56)),c=n(a(51)),s=r(a(0)),f=n(a(2100)),d=n(a(1271));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=function(e){(0,o.default)(a,e);var t=p(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u=0;i--)if(d.OPERATORS.includes(r[i])||""===r[i]){u=i+1;break}var c=r.substring(0,u)+t+r.substring(u+o),s=u+t.length;e.setState({visible:!1,value:c,focusValue:t,position:s},(function(){if(e.triggerChange(c),"{"===r[s]&&e.handleLabelSearch(),e.editor.current){var t=e.editor.current;t.innerHTML=(0,d.highlightPromql)(c),(0,d.setCaretPosition)(t,s)}}))},e.handleDOMClick=function(t){e.wrapper&&e.wrapper.current&&!e.wrapper.current.contains(t.target)&&e.setState({visible:!1}),e.editor&&e.editor.current&&e.editor.current.contains(t.target)&&e.handleCursorChange()},e}return(0,u.default)(a,[{key:"componentDidMount",value:function(){if(this.editor.current){var e=this.state.value;this.editor.current.addEventListener("input",this.handleInput),this.editor.current.addEventListener("keydown",this.handleKeyDown),this.editor.current.addEventListener("keyup",this.handleKeyUp),this.handleValueUpdateFromProps(e)}document.addEventListener("click",this.handleDOMClick)}},{key:"componentDidUpdate",value:function(e,t){var a=this,r=this.props.value;t.value!==r&&this.setState({value:r},(function(){a.handleValueUpdateFromProps(r)}))}},{key:"componentWillUnmount",value:function(){this.editor.current&&(this.editor.current.removeEventListener("input",this.handleInput),this.editor.current.removeEventListener("keydown",this.handleKeyDown),this.editor.current.removeEventListener("keyup",this.handleKeyUp)),document.removeEventListener("click",this.handleDOMClick)}},{key:"render",value:function(){var e=this.state,t=e.visible,a=e.focusValue,r=e.tokenContext,n=this.props,l=n.metrics,u=n.labelsets;return s.default.createElement("div",{className:m.default.wrapper,ref:this.wrapper},s.default.createElement("pre",null,s.default.createElement("code",{className:m.default.input,ref:this.editor,spellCheck:"false",contentEditable:!0})),t&&a&&s.default.createElement(f.default,{className:m.default.suggestions,value:a,metrics:l,tokenContext:r,labelsets:u,onSelect:this.handleSuggestionSelect}))}},{key:"keydownHandler",get:function(){return{219:this.handleLabelSearch}}},{key:"keyupHandler",get:function(){return{37:this.handleCursorChange,39:this.handleCursorChange}}}]),a}(s.Component);t.default=v,v.defaultProps={value:""}},function(e,t,a){"use strict";a(15),a(5),a(73),a(18),a(139),a(24),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FUNCTIONS=t.OPERATORS=t.RATE_RANGES=void 0,a(5),a(73),a(18),a(139),a(251),a(24),a(252),a(17);t.RATE_RANGES=[{label:"$__interval",sortText:"$__interval"},{label:"$__rate_interval",sortText:"$__rate_interval"},{label:"1m",sortText:"00:01:00"},{label:"5m",sortText:"00:05:00"},{label:"10m",sortText:"00:10:00"},{label:"30m",sortText:"00:30:00"},{label:"1h",sortText:"01:00:00"},{label:"1d",sortText:"24:00:00"}];var r=["by","group_left","group_right","ignoring","on","offset","without"];t.OPERATORS=r;var n=[].concat([{label:"sum",insertText:"sum",documentation:"Calculate sum over dimensions"},{label:"min",insertText:"min",documentation:"Select minimum over dimensions"},{label:"max",insertText:"max",documentation:"Select maximum over dimensions"},{label:"avg",insertText:"avg",documentation:"Calculate the average over dimensions"},{label:"stddev",insertText:"stddev",documentation:"Calculate population standard deviation over dimensions"},{label:"stdvar",insertText:"stdvar",documentation:"Calculate population standard variance over dimensions"},{label:"count",insertText:"count",documentation:"Count number of elements in the vector"},{label:"count_values",insertText:"count_values",documentation:"Count number of elements with the same value"},{label:"bottomk",insertText:"bottomk",documentation:"Smallest k elements by sample value"},{label:"topk",insertText:"topk",documentation:"Largest k elements by sample value"},{label:"quantile",insertText:"quantile",documentation:"Calculate φ-quantile (0 ≤ φ ≤ 1) over dimensions"}],[{insertText:"abs",label:"abs",detail:"abs(v instant-vector)",documentation:"Returns the input vector with all sample values converted to their absolute value."},{insertText:"absent",label:"absent",detail:"absent(v instant-vector)",documentation:"Returns an empty vector if the vector passed to it has any elements and a 1-element vector with the value 1 if the vector passed to it has no elements. This is useful for alerting on when no time series exist for a given metric name and label combination."},{insertText:"ceil",label:"ceil",detail:"ceil(v instant-vector)",documentation:"Rounds the sample values of all elements in `v` up to the nearest integer."},{insertText:"changes",label:"changes",detail:"changes(v range-vector)",documentation:"For each input time series, `changes(v range-vector)` returns the number of times its value has changed within the provided time range as an instant vector."},{insertText:"clamp_max",label:"clamp_max",detail:"clamp_max(v instant-vector, max scalar)",documentation:"Clamps the sample values of all elements in `v` to have an upper limit of `max`."},{insertText:"clamp_min",label:"clamp_min",detail:"clamp_min(v instant-vector, min scalar)",documentation:"Clamps the sample values of all elements in `v` to have a lower limit of `min`."},{insertText:"count_scalar",label:"count_scalar",detail:"count_scalar(v instant-vector)",documentation:"Returns the number of elements in a time series vector as a scalar. This is in contrast to the `count()` aggregation operator, which always returns a vector (an empty one if the input vector is empty) and allows grouping by labels via a `by` clause."},{insertText:"day_of_month",label:"day_of_month",detail:"day_of_month(v=vector(time()) instant-vector)",documentation:"Returns the day of the month for each of the given times in UTC. Returned values are from 1 to 31."},{insertText:"day_of_week",label:"day_of_week",detail:"day_of_week(v=vector(time()) instant-vector)",documentation:"Returns the day of the week for each of the given times in UTC. Returned values are from 0 to 6, where 0 means Sunday etc."},{insertText:"days_in_month",label:"days_in_month",detail:"days_in_month(v=vector(time()) instant-vector)",documentation:"Returns number of days in the month for each of the given times in UTC. Returned values are from 28 to 31."},{insertText:"delta",label:"delta",detail:"delta(v range-vector)",documentation:"Calculates the difference between the first and last value of each time series element in a range vector `v`, returning an instant vector with the given deltas and equivalent labels. The delta is extrapolated to cover the full time range as specified in the range vector selector, so that it is possible to get a non-integer result even if the sample values are all integers."},{insertText:"deriv",label:"deriv",detail:"deriv(v range-vector)",documentation:"Calculates the per-second derivative of the time series in a range vector `v`, using simple linear regression."},{insertText:"drop_common_labels",label:"drop_common_labels",detail:"drop_common_labels(instant-vector)",documentation:"Drops all labels that have the same name and value across all series in the input vector."},{insertText:"exp",label:"exp",detail:"exp(v instant-vector)",documentation:"Calculates the exponential function for all elements in `v`.\nSpecial cases are:\n* `Exp(+Inf) = +Inf` \n* `Exp(NaN) = NaN`"},{insertText:"floor",label:"floor",detail:"floor(v instant-vector)",documentation:"Rounds the sample values of all elements in `v` down to the nearest integer."},{insertText:"histogram_quantile",label:"histogram_quantile",detail:"histogram_quantile(φ float, b instant-vector)",documentation:"Calculates the φ-quantile (0 ≤ φ ≤ 1) from the buckets `b` of a histogram. The samples in `b` are the counts of observations in each bucket. Each sample must have a label `le` where the label value denotes the inclusive upper bound of the bucket. (Samples without such a label are silently ignored.) The histogram metric type automatically provides time series with the `_bucket` suffix and the appropriate labels."},{insertText:"holt_winters",label:"holt_winters",detail:"holt_winters(v range-vector, sf scalar, tf scalar)",documentation:"Produces a smoothed value for time series based on the range in `v`. The lower the smoothing factor `sf`, the more importance is given to old data. The higher the trend factor `tf`, the more trends in the data is considered. Both `sf` and `tf` must be between 0 and 1."},{insertText:"hour",label:"hour",detail:"hour(v=vector(time()) instant-vector)",documentation:"Returns the hour of the day for each of the given times in UTC. Returned values are from 0 to 23."},{insertText:"idelta",label:"idelta",detail:"idelta(v range-vector)",documentation:"Calculates the difference between the last two samples in the range vector `v`, returning an instant vector with the given deltas and equivalent labels."},{insertText:"increase",label:"increase",detail:"increase(v range-vector)",documentation:"Calculates the increase in the time series in the range vector. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for. The increase is extrapolated to cover the full time range as specified in the range vector selector, so that it is possible to get a non-integer result even if a counter increases only by integer increments."},{insertText:"irate",label:"irate",detail:"irate(v range-vector)",documentation:"Calculates the per-second instant rate of increase of the time series in the range vector. This is based on the last two data points. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for."},{insertText:"label_replace",label:"label_replace",detail:"label_replace(v instant-vector, dst_label string, replacement string, src_label string, regex string)",documentation:"For each timeseries in `v`, `label_replace(v instant-vector, dst_label string, replacement string, src_label string, regex string)` matches the regular expression `regex` against the label `src_label`. If it matches, then the timeseries is returned with the label `dst_label` replaced by the expansion of `replacement`. `$1` is replaced with the first matching subgroup, `$2` with the second etc. If the regular expression doesn't match then the timeseries is returned unchanged."},{insertText:"ln",label:"ln",detail:"ln(v instant-vector)",documentation:"calculates the natural logarithm for all elements in `v`.\nSpecial cases are:\n * `ln(+Inf) = +Inf`\n * `ln(0) = -Inf`\n * `ln(x < 0) = NaN`\n * `ln(NaN) = NaN`"},{insertText:"log2",label:"log2",detail:"log2(v instant-vector)",documentation:"Calculates the binary logarithm for all elements in `v`. The special cases are equivalent to those in `ln`."},{insertText:"log10",label:"log10",detail:"log10(v instant-vector)",documentation:"Calculates the decimal logarithm for all elements in `v`. The special cases are equivalent to those in `ln`."},{insertText:"minute",label:"minute",detail:"minute(v=vector(time()) instant-vector)",documentation:"Returns the minute of the hour for each of the given times in UTC. Returned values are from 0 to 59."},{insertText:"month",label:"month",detail:"month(v=vector(time()) instant-vector)",documentation:"Returns the month of the year for each of the given times in UTC. Returned values are from 1 to 12, where 1 means January etc."},{insertText:"predict_linear",label:"predict_linear",detail:"predict_linear(v range-vector, t scalar)",documentation:"Predicts the value of time series `t` seconds from now, based on the range vector `v`, using simple linear regression."},{insertText:"rate",label:"rate",detail:"rate(v range-vector)",documentation:"Calculates the per-second average rate of increase of the time series in the range vector. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for. Also, the calculation extrapolates to the ends of the time range, allowing for missed scrapes or imperfect alignment of scrape cycles with the range's time period."},{insertText:"resets",label:"resets",detail:"resets(v range-vector)",documentation:"For each input time series, `resets(v range-vector)` returns the number of counter resets within the provided time range as an instant vector. Any decrease in the value between two consecutive samples is interpreted as a counter reset."},{insertText:"round",label:"round",detail:"round(v instant-vector, to_nearest=1 scalar)",documentation:"Rounds the sample values of all elements in `v` to the nearest integer. Ties are resolved by rounding up. The optional `to_nearest` argument allows specifying the nearest multiple to which the sample values should be rounded. This multiple may also be a fraction."},{insertText:"scalar",label:"scalar",detail:"scalar(v instant-vector)",documentation:"Given a single-element input vector, `scalar(v instant-vector)` returns the sample value of that single element as a scalar. If the input vector does not have exactly one element, `scalar` will return `NaN`."},{insertText:"sort",label:"sort",detail:"sort(v instant-vector)",documentation:"Returns vector elements sorted by their sample values, in ascending order."},{insertText:"sort_desc",label:"sort_desc",detail:"sort_desc(v instant-vector)",documentation:"Returns vector elements sorted by their sample values, in descending order."},{insertText:"sqrt",label:"sqrt",detail:"sqrt(v instant-vector)",documentation:"Calculates the square root of all elements in `v`."},{insertText:"time",label:"time",detail:"time()",documentation:"Returns the number of seconds since January 1, 1970 UTC. Note that this does not actually return the current time, but the time at which the expression is to be evaluated."},{insertText:"vector",label:"vector",detail:"vector(s scalar)",documentation:"Returns the scalar `s` as a vector with no labels."},{insertText:"year",label:"year",detail:"year(v=vector(time()) instant-vector)",documentation:"Returns the year for each of the given times in UTC."},{insertText:"avg_over_time",label:"avg_over_time",detail:"avg_over_time(range-vector)",documentation:"The average value of all points in the specified interval."},{insertText:"min_over_time",label:"min_over_time",detail:"min_over_time(range-vector)",documentation:"The minimum value of all points in the specified interval."},{insertText:"max_over_time",label:"max_over_time",detail:"max_over_time(range-vector)",documentation:"The maximum value of all points in the specified interval."},{insertText:"sum_over_time",label:"sum_over_time",detail:"sum_over_time(range-vector)",documentation:"The sum of all values in the specified interval."},{insertText:"count_over_time",label:"count_over_time",detail:"count_over_time(range-vector)",documentation:"The count of all values in the specified interval."},{insertText:"quantile_over_time",label:"quantile_over_time",detail:"quantile_over_time(scalar, range-vector)",documentation:"The φ-quantile (0 ≤ φ ≤ 1) of the values in the specified interval."},{insertText:"stddev_over_time",label:"stddev_over_time",detail:"stddev_over_time(range-vector)",documentation:"The population standard deviation of the values in the specified interval."},{insertText:"stdvar_over_time",label:"stdvar_over_time",detail:"stdvar_over_time(range-vector)",documentation:"The population standard variance of the values in the specified interval."}]);t.FUNCTIONS=n;var l={comment:{pattern:/#.*/},"context-aggregation":{pattern:/((by|without)\s*)\([^)]*\)/,lookbehind:!0,inside:{"label-key":{pattern:/[^(),\s][^,)]*[^),\s]*/,alias:"attr-name"},punctuation:/[()]/}},"context-labels":{pattern:/\{[^}]*(?=})/,greedy:!0,inside:{comment:{pattern:/#.*/},"label-key":{pattern:/[a-z_]\w*(?=\s*(=|!=|=~|!~))/,alias:"attr-name",greedy:!0},"label-value":{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0,alias:"attr-value"},punctuation:/[{]/}},function:new RegExp("\\b(?:".concat(n.map((function(e){return e.label})).join("|"),")(?=\\s*\\()"),"i"),"context-range":[{pattern:/\[[^\]]*(?=])/,inside:{"range-duration":{pattern:/\b\d+[smhdwy]\b/i,alias:"number"}}},{pattern:/(offset\s+)\w+/,lookbehind:!0,inside:{"range-duration":{pattern:/\b\d+[smhdwy]\b/i,alias:"number"}}}],number:/\b-?\d+((\.\d*)?([eE][+-]?\d+)?)?\b/,operator:new RegExp("/[-+*/=%^~]|&&?|\\|?\\||!=?|<(?:=>?|<|>)?|>[>=]?|\\b(?:".concat(r.join("|"),")\\b"),"i"),punctuation:/[{};()`,.]/};t.default=l},function(e,t,a){e.exports={wrapper:"_14f5Z8AW-sO-D5eOUy8VOK",group:"_3IFETh-yDAtvA1RpJm_nuS",groupTitle:"_1EI8CS41YrdnEKUGY2JhS4",item:"_1L9wOQP2fgWpJRSXX_gfSy"}},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(86),a(73),a(18),a(9),a(13),a(10),a(4),a(24),a(17),a(64),a(136),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.getTokenContext=t.highlightPromql=t.OPERATORS=t.PUNCTUATION_MAP=t.setCaretPosition=t.getCaretCharacterOffsetWithin=void 0;var n=r(a(30));a(12),a(45),a(11),a(6),a(86),a(73),a(18),a(28),a(245),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(24),a(17),a(64),a(7);var l=r(a(26)),u=r(a(2104)),o=r(a(1489));function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}a(2105),u.default.languages.promql=o.default;t.getCaretCharacterOffsetWithin=function(e){var t=0,a=e.ownerDocument||e.document,r=a.defaultView||a.parentWindow;if(void 0!==r.getSelection){if(r.getSelection().rangeCount>0){var n=r.getSelection().getRangeAt(0),l=n.cloneRange();l.selectNodeContents(e),l.setEnd(n.endContainer,n.endOffset),t=l.toString().length}}else if("Control"!==a.selection.type){var u=a.selection.createRange(),o=a.body.createTextRange();o.moveToElementText(e),o.setEndPoint("EndToEnd",u),t=o.text.length}return t};t.setCaretPosition=function(e,t){var a=document.createRange(),r=window.getSelection(),n=[];!function e(t,a){t&&3===t.nodeType&&a.push(t);for(var r=t.childNodes,n=0;n0;)u-=(0,l.default)(n,"[".concat(o,"].length"),0),o++;var i=n[o-1];null!=i&&(a.setStart(i,u+i.length),a.collapse(!0),r.removeAllRanges(),r.addRange(a))};t.PUNCTUATION_MAP={"(":")","[":"]","{":"}",'"':'"',"'":"'"};t.OPERATORS=["(","[","{",'"',"'",'""',"''","=",","];t.highlightPromql=function(e){return u.default.highlight(e,u.default.languages.promql,"promql")};t.getTokenContext=function(e,t){for(var a=[],r=t;r.parentNode&&e!==r.parentNode;)a.push(r.parentNode),r=r.parentNode;var u=a.reverse().map((function(e){return e.className&&e.className.split(" ")[1]||""})).join("."),o={},c=t.parentNode.className;return c.indexOf("label-key")>-1?o.label="":c.indexOf("label-value")>-1?(o.label=(0,l.default)(t,"parentNode.previousSibling.previousSibling.textContent",""),o.value=""):c.indexOf("context-labels")>-1&&(t.previousSibling?t.previousSibling.className.indexOf("label-key")>-1?(o.label=t.previousSibling.textContent.replace(/{,/g,""),o.value=""):t.previousSibling.className.indexOf("label-value")>-1&&(o.label=t.textContent.replace(/{,/g,"")):o.label=""),function(e){for(var t=1;t8||a.length>8)&&!r?s.createElement(p.Tooltip,{placement:"top",appendToBody:!0,content:this.renderClusterItem(!0)},this.renderClusterItem()):this.renderClusterItem())}}]),a}(s.Component);t.default=g,g.propTypes={label:d.default.string,value:d.default.string,onDelete:d.default.func,name:d.default.string.isRequired}},,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return c}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.898 2l6.666 11.547H2.231L8.898 2zm.666 10a.667.667 0 11-1.333 0 .667.667 0 011.333 0zm0-6H8.231l.133 4.667h1.067L9.564 6z",fill:"#F5A623"}),i=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.564 6H8.231l.133 4.667h1.067L9.564 6zm-.666 6.667a.667.667 0 100-1.333.667.667 0 000 1.333z",fill:"#fff"}),c=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 17 16",fill:"none",width:"1em",height:"1em"},e),o,i)};t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNyAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04Ljg5NzYyIDJMMTUuNTY0MyAxMy41NDY3SDIuMjMwOTZMOC44OTc2MiAyWk05LjU2NDI5IDEyLjAwMDdDOS41NjQyOSAxMi4zNjg5IDkuMjY1ODEgMTIuNjY3NCA4Ljg5NzYyIDEyLjY2NzRDOC41Mjk0MyAxMi42Njc0IDguMjMwOTYgMTIuMzY4OSA4LjIzMDk2IDEyLjAwMDdDOC4yMzA5NiAxMS42MzI1IDguNTI5NDMgMTEuMzM0IDguODk3NjIgMTEuMzM0QzkuMjY1ODEgMTEuMzM0IDkuNTY0MjkgMTEuNjMyNSA5LjU2NDI5IDEyLjAwMDdaTTkuNTY0MjkgNkg4LjIzMDk2TDguMzY0MjkgMTAuNjY2N0g5LjQzMDk2TDkuNTY0MjkgNloiIGZpbGw9IiNGNUE2MjMiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05LjU2NDI5IDZIOC4yMzA5Nkw4LjM2NDI5IDEwLjY2NjdIOS40MzA5Nkw5LjU2NDI5IDZaTTguODk3NjIgMTIuNjY3NEM5LjI2NTgxIDEyLjY2NzQgOS41NjQyOSAxMi4zNjg5IDkuNTY0MjkgMTIuMDAwN0M5LjU2NDI5IDExLjYzMjUgOS4yNjU4MSAxMS4zMzQgOC44OTc2MiAxMS4zMzRDOC41Mjk0MyAxMS4zMzQgOC4yMzA5NiAxMS42MzI1IDguMjMwOTYgMTIuMDAwN0M4LjIzMDk2IDEyLjM2ODkgOC41Mjk0MyAxMi42Njc0IDguODk3NjIgMTIuNjY3NFoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo="},,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(18),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(18),a(42),a(16),a(4),a(23),a(57),a(17);var n=r(a(315)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=r(a(1)),d=r(a(998)),p=r(a(1036)),m=r(a(1089));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(a,e);var t=h(a);function a(){return(0,l.default)(this,a),t.apply(this,arguments)}return(0,u.default)(a,[{key:"render",value:function(){var e=this.props,t=e.width,a=e.height,r=e.data,l=e.dataKey,u=e.innerRadius,o=void 0===u?"60%":u,i=e.outerRadius,c=void 0===i?"100%":i;return s.default.createElement(m.default,{width:t,height:a},s.default.createElement(p.default,{data:r,dataKey:l,innerRadius:o,outerRadius:c,animationDuration:1e3},r.map((function(e){return s.default.createElement(d.default,(0,n.default)({key:"cell-".concat(e.name)},e.itemStyle,{strokeWidth:0}))}))))}}]),a}(s.default.Component);t.default=v,v.propTypes={width:f.default.oneOfType([f.default.string,f.default.number]),height:f.default.oneOfType([f.default.string,f.default.number])},v.defaultProps={width:100,height:100,dataKey:"value"}},function(e,t,a){e.exports={title:"_3R9eLWdkRd9o_flAlWvHLx",default:"_2G2DnMhtpeqDEv91UyFh3A",cur:"_1c1g45SkasImY0_alODa4h",custom:"_1zLUgkVtJ5Jr-NdoWiK6aj",selectBox:"_3DT0sgCFRXpA-LxQ7eKvqn",bottom10:"QH6NAxOiq9B6Q6ihrskOG",actions:"_3zCFT6vGh-Uu2uYIZEtuUx"}},,,,,,,,function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.eckYaml=void 0;t.eckYaml={resources:{apiVersion:"elasticsearch.k8s.elastic.co/v1",kind:"Elasticsearch",metadata:{name:"quickstart"},spec:{version:"7.17.5",nodeSets:[{name:"master",count:3,config:{"node.roles":["master"]},podTemplate:{spec:{initContainers:[{name:"sysctl",securityContext:{privileged:!0,runAsUser:0},command:["sh","-c","sysctl -w vm.max_map_count=262144"]}],containers:[{name:"elasticsearch",resources:{limits:{memory:"8Gi",cpu:2},requests:{memory:"8Gi",cpu:2}},env:[{name:"ES_JAVA_OPTS",value:"-Xms4g -Xmx4g"}]}]}},volumeClaimTemplates:[{metadata:{name:"elasticsearch-data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"20Gi"}},storageClassName:"csi-high-capacity"}}]},{name:"hot",count:2,config:{"node.roles":["data_hot","data_content"]},podTemplate:{spec:{initContainers:[{name:"sysctl",securityContext:{privileged:!0,runAsUser:0},command:["sh","-c","sysctl -w vm.max_map_count=262144"]}],containers:[{name:"elasticsearch",resources:{limits:{memory:"8Gi",cpu:2},requests:{memory:"8Gi",cpu:2}},env:[{name:"ES_JAVA_OPTS",value:"-Xms4g -Xmx4g"}]}]}},volumeClaimTemplates:[{metadata:{name:"elasticsearch-data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"40Gi"}},storageClassName:"csi-high-capacity"}}]},{name:"warm",count:0,config:{"node.roles":["data_warm"]},podTemplate:{spec:{initContainers:[{name:"sysctl",securityContext:{privileged:!0,runAsUser:0},command:["sh","-c","sysctl -w vm.max_map_count=262144"]}],containers:[{name:"elasticsearch",resources:{limits:{memory:"8Gi",cpu:2},requests:{memory:"8Gi",cpu:2}},env:[{name:"ES_JAVA_OPTS",value:"-Xms4g -Xmx4g"}]}]}},volumeClaimTemplates:[{metadata:{name:"elasticsearch-data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"40Gi"}},storageClassName:"csi-high-capacity"}}]},{name:"cold",count:0,config:{"node.roles":["data_cold"]},podTemplate:{spec:{initContainers:[{name:"sysctl",securityContext:{privileged:!0,runAsUser:0},command:["sh","-c","sysctl -w vm.max_map_count=262144"]}],containers:[{name:"elasticsearch",resources:{limits:{memory:"8Gi",cpu:2},requests:{memory:"8Gi",cpu:2}},env:[{name:"ES_JAVA_OPTS",value:"-Xms4g -Xmx4g"}]}]}},volumeClaimTemplates:[{metadata:{name:"elasticsearch-data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"40Gi"}},storageClassName:"csi-high-capacity"}}]}]}},kibana:{apiVersion:"kibana.k8s.elastic.co/v1",kind:"Kibana",metadata:{name:"quickstart"},spec:{version:"7.17.5",count:1,elasticsearchRef:{name:"quickstart",namespace:"default"},podTemplate:{spec:{containers:[{name:"kibana",resources:{requests:{cpu:"1000m",memory:"2Gi"},limits:{cpu:"2000m",memory:"4Gi"}}}]}}}}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.opensearchYaml=void 0;t.opensearchYaml={resources:{apiVersion:"opensearch.opster.io/v1",kind:"OpenSearchCluster",metadata:{name:"cluster"},spec:{general:{version:"2.3.0",httpPort:9200,vendor:"opensearch",serviceName:"cluster"},dashboards:{version:"2.3.0",enable:!0,replicas:1,resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}}},confMgmt:{smartScaler:!0},security:{config:{securityConfigSecret:{name:"securityconfig-secret"},adminCredentialsSecret:{name:"admin-credentials-secret"}},tls:{transport:{generate:!0},http:{generate:!0}},keyStoreConfig:[]},nodePools:[{component:"masters",replicas:2,diskSize:"50Gi",persistence:{pvc:{storageClass:"csi-qingcloud",accessModes:["ReadWriteOnce"]}},additionalConfig:{"node.attr.datatier":"master"},resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}},roles:["cluster_manager"]},{component:"data-node-hot",replicas:2,diskSize:"30Gi",persistence:{pvc:{storageClass:"csi-qingcloud",accessModes:["ReadWriteOnce"]}},additionalConfig:{"node.attr.datatier":"hot"},resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}},roles:["data"]},{component:"data-node-warm",replicas:2,diskSize:"30Gi",persistence:{pvc:{storageClass:"csi-qingcloud",accessModes:["ReadWriteOnce"]}},additionalConfig:{"node.attr.datatier":"warm"},resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}},roles:["data"]}]}},node:{component:"data-node-hot",replicas:2,diskSize:"30Gi",persistence:{pvc:{storageClass:"csi-qingcloud",accessModes:["ReadWriteOnce"]}},additionalConfig:{"node.attr.datatier":"hot"},resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}},roles:["data"]},logstash:{apiVersion:"opensearch.opster.io/v1",kind:"Logstash",metadata:{name:"logstash-sample"},spec:{replicas:1,config:{jvm:"-Xms512m -Xmx512m",openSearchInfo:{openSearchCluster:{name:"my-cluster",namespace:"default"},openSearchService:{name:"my-cluster"}},logstashConfig:[],ports:[8080],pipelineConfig:{inputs:'http {\n host => "0.0.0.0"\n port => 8080\n}',filters:'mutate {\n add_field => { "LogstashHost" => "${HOSTNAME}" }\n}',outputs:null,openSearchIndex:'index => "logstash-%{+YYYY.MM.dd}"'}},podTemplate:{spec:{containers:[{name:"logstash",resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}}},{name:"exporter",resources:{requests:{memory:"400Mi",cpu:"200m"},limits:{memory:"400Mi",cpu:"200m"}}}]}}}},logstashSecret:{apiVersion:"v1",kind:"Secret",metadata:{name:"logstash-credential"},type:"Opaque",data:{username:"bG9nc3Rhc2g=",password:"bG9nc3Rhc2g="}},adminSecret:{apiVersion:"v1",kind:"Secret",metadata:{name:"admin-credentials-secret"},type:"Opaque",data:{username:"UmFkb25EQkAxMjM=",password:"UmFkb25EQkAxMjM="}},securityConfigSecret:{apiVersion:"v1",kind:"Secret",metadata:{name:"securityconfig-secret"},type:"Opaque",stringData:{"action_groups.yml":'_meta:\n type: "actiongroups"\n config_version: 2',"internal_users.yml":'_meta:\n type: "internalusers"\n config_version: 2\nroot:\n hash: "$2y$12$JwL3peIal4VShAgkyZlMG.t1zwcCnPSAJ2E6GHCDoGhZJLkRX11b2"\n reserved: true\n hidden: true\n backend_roles:\n - "admin"\n description: "Internal root user for cluster"\nadmin:\n hash: "$2a$10$ihutvIcl7kp9PF2RFMZeXuZb2RdUpBFR5t4W0KV5LFZylPheworfW"\n reserved: false\n backend_roles:\n - "admin"\n description: "custom admin user"\ndashboarduser:\n hash: "$2y$12$o8Uxs2c6T8wzTfOpf1Pxvulqxs6BigWaJhSldWUtRdbDa555GM7F6"\n reserved: false\n description: "OpenSearch internal dashboards user"\nlogstash:\n hash: "$2y$12$sjAmhIfYAJsPJXNm2WI29e/rLX5V.OxV1l8L1An7wO2pz6WX5NIpy"\n reserved: false\n description: "OpenSearch internal logstash user"\nprometheus:\n hash: "$2y$12$wml4GdNlHOos1FgNWk1zSu9sWV2JE0.CkWsLP0YHFPxojW/v2EGeq"\n reserved: true\n hidden: true\n backend_roles:\n - "admin"\n description: "OpenSearch internal prometheus user"',"nodes_dn.yml":'_meta:\n type: "nodesdn"\n config_version: 2',"whitelist.yml":'_meta:\n type: "whitelist"\n config_version: 2',"tenants.yml":'_meta:\n type: "tenants"\n config_version: 2',"roles_mapping.yml":'_meta:\n type: "rolesmapping"\n config_version: 2\nall_access:\n reserved: false\n backend_roles:\n - "admin"\n description: "Maps admin to all_access"\nown_index:\n reserved: false\n users:\n - "*"\n description: "Allow full access to an index named like the username"\nreadall:\n reserved: false\n backend_roles:\n - "readall"\nmanage_snapshots:\n reserved: false\n backend_roles:\n - "snapshotrestore"\ndashboard_server:\n reserved: true\n users:\n - "dashboarduser"',"roles.yml":"_meta:\n type: \"roles\"\n config_version: 2\ndashboard_read_only:\n reserved: true\nsecurity_rest_api_access:\n reserved: true\n# Allows users to view monitors, destinations and alerts\nalerting_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/alerting/alerts/get'\n - 'cluster:admin/opendistro/alerting/destination/get'\n - 'cluster:admin/opendistro/alerting/monitor/get'\n - 'cluster:admin/opendistro/alerting/monitor/search'\n# Allows users to view and acknowledge alerts\nalerting_ack_alerts:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/alerting/alerts/*'\n# Allows users to use all alerting functionality\nalerting_full_access:\n reserved: true\n cluster_permissions:\n - 'cluster_monitor'\n - 'cluster:admin/opendistro/alerting/*'\n index_permissions:\n - index_patterns:\n - '*'\n allowed_actions:\n - 'indices_monitor'\n - 'indices:admin/aliases/get'\n - 'indices:admin/mappings/get'\n# Allow users to read Anomaly Detection detectors and results\nanomaly_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/ad/detector/info'\n - 'cluster:admin/opendistro/ad/detector/search'\n - 'cluster:admin/opendistro/ad/detectors/get'\n - 'cluster:admin/opendistro/ad/result/search'\n - 'cluster:admin/opendistro/ad/tasks/search'\n - 'cluster:admin/opendistro/ad/detector/validate'\n - 'cluster:admin/opendistro/ad/result/topAnomalies'\n# Allows users to use all Anomaly Detection functionality\nanomaly_full_access:\n reserved: true\n cluster_permissions:\n - 'cluster_monitor'\n - 'cluster:admin/opendistro/ad/*'\n index_permissions:\n - index_patterns:\n - '*'\n allowed_actions:\n - 'indices_monitor'\n - 'indices:admin/aliases/get'\n - 'indices:admin/mappings/get'\n# Allows users to read Notebooks\nnotebooks_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/notebooks/list'\n - 'cluster:admin/opendistro/notebooks/get'\n# Allows users to all Notebooks functionality\nnotebooks_full_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/notebooks/create'\n - 'cluster:admin/opendistro/notebooks/update'\n - 'cluster:admin/opendistro/notebooks/delete'\n - 'cluster:admin/opendistro/notebooks/get'\n - 'cluster:admin/opendistro/notebooks/list'\n# Allows users to read observability objects\nobservability_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opensearch/observability/get'\n# Allows users to all Observability functionality\nobservability_full_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opensearch/observability/create'\n - 'cluster:admin/opensearch/observability/update'\n - 'cluster:admin/opensearch/observability/delete'\n - 'cluster:admin/opensearch/observability/get'\n# Allows users to read and download Reports\nreports_instances_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/reports/instance/list'\n - 'cluster:admin/opendistro/reports/instance/get'\n - 'cluster:admin/opendistro/reports/menu/download'\n# Allows users to read and download Reports and Report-definitions\nreports_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/reports/definition/get'\n - 'cluster:admin/opendistro/reports/definition/list'\n - 'cluster:admin/opendistro/reports/instance/list'\n - 'cluster:admin/opendistro/reports/instance/get'\n - 'cluster:admin/opendistro/reports/menu/download'\n# Allows users to all Reports functionality\nreports_full_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/reports/definition/create'\n - 'cluster:admin/opendistro/reports/definition/update'\n - 'cluster:admin/opendistro/reports/definition/on_demand'\n - 'cluster:admin/opendistro/reports/definition/delete'\n - 'cluster:admin/opendistro/reports/definition/get'\n - 'cluster:admin/opendistro/reports/definition/list'\n - 'cluster:admin/opendistro/reports/instance/list'\n - 'cluster:admin/opendistro/reports/instance/get'\n - 'cluster:admin/opendistro/reports/menu/download'\n# Allows users to use all asynchronous-search functionality\nasynchronous_search_full_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/asynchronous_search/*'\n index_permissions:\n - index_patterns:\n - '*'\n allowed_actions:\n - 'indices:data/read/search*'\n# Allows users to read stored asynchronous-search results\nasynchronous_search_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/asynchronous_search/get'\n# Allows user to use all index_management actions - ism policies, rollups, transforms\nindex_management_full_access:\n reserved: true\n cluster_permissions:\n - \"cluster:admin/opendistro/ism/*\"\n - \"cluster:admin/opendistro/rollup/*\"\n - \"cluster:admin/opendistro/transform/*\"\n index_permissions:\n - index_patterns:\n - '*'\n allowed_actions:\n - 'indices:admin/opensearch/ism/*'\n# Allows users to use all cross cluster replication functionality at leader cluster\ncross_cluster_replication_leader_full_access:\n reserved: true\n index_permissions:\n - index_patterns:\n - '*'\n allowed_actions:\n - \"indices:admin/plugins/replication/index/setup/validate\"\n - \"indices:data/read/plugins/replication/changes\"\n - \"indices:data/read/plugins/replication/file_chunk\"\n# Allows users to use all cross cluster replication functionality at follower cluster\ncross_cluster_replication_follower_full_access:\n reserved: true\n cluster_permissions:\n - \"cluster:admin/plugins/replication/autofollow/update\"\n index_permissions:\n - index_patterns:\n - '*'\n allowed_actions:\n - \"indices:admin/plugins/replication/index/setup/validate\"\n - \"indices:data/write/plugins/replication/changes\"\n - \"indices:admin/plugins/replication/index/start\"\n - \"indices:admin/plugins/replication/index/pause\"\n - \"indices:admin/plugins/replication/index/resume\"\n - \"indices:admin/plugins/replication/index/stop\"\n - \"indices:admin/plugins/replication/index/update\"\n - \"indices:admin/plugins/replication/index/status_check\"","config.yml":'_meta:\n type: "config"\n config_version: "2"\nconfig:\n dynamic:\n http:\n anonymous_auth_enabled: false\n authc:\n basic_internal_auth_domain:\n http_enabled: true\n transport_enabled: true\n order: "4"\n http_authenticator:\n type: basic\n challenge: true\n authentication_backend:\n type: intern'}}}},function(e,t,a){e.exports={modal:"_1wTsZBkkGMAzL2u8JX3Dlu",body:"_3HlZ33d_2YBiDbpExsvcbT",close:"_1QA0P_s0N5ObNWIz-PIN5W"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(31),r(6),r(18),r(97),r(16),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(31),r(6),r(18),r(97),r(42),r(16),r(10),r(4),r(23),r(57),r(17),r(7);var l,u,o,i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(1)),h=r(239),v=r(186),g=n(r(26)),y=n(r(74)),E=n(r(63)),b=n(r(806)),_=r(52),O=n(r(816)),S=n(r(829)),C=n(r(867)),D=n(r(318)),k=n(r(858));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var T=(0,h.observer)((o=u=function(e){(0,s.default)(r,e);var a=N(r);function r(e){var n;return(0,i.default)(this,r),(n=a.call(this,e)).handleAffinityChange=function(e){var t=n.replicasPolicyOptions.find((function(t){return t.value===e}));(0,y.default)(n.props.data,"spec.template.spec.affinity",t.affinity),"custom"===e?(0,y.default)(n.props.data,"spec.template.spec.customMode",[{}]):delete n.props.data.spec.template.spec.customMode,n.setState({mode:e},(function(){n.props.formProps&&n.props.formProps.onChange()}))},n.handleChange=function(e){var t={};e.forEach((function(e){"preferredDuringSchedulingIgnoredDuringExecution"===e.type?t[e.policy]={preferredDuringSchedulingIgnoredDuringExecution:[{weight:100,podAffinityTerm:{labelSelector:{matchExpressions:[{key:"app",operator:"In",values:[e.target]}]},topologyKey:"kubernetes.io/hostname"}}]}:"requiredDuringSchedulingIgnoredDuringExecution"===e.type&&(t[e.policy]={requiredDuringSchedulingIgnoredDuringExecution:[{labelSelector:{matchExpressions:[{key:"app",operator:"In",values:[e.target]}]},topologyKey:"kubernetes.io/hostname"}]})})),(0,y.default)(n.props.data,"spec.template.spec.affinity",t)},n.checkItemValid=function(e){return e.policy&&e.type&&e.target},n.modeValidator=function(e,a,r){return a?a.some((function(e){return!n.checkItemValid(e)}))?(r({message:t("RULE_NOT_COMPLETE"),field:e.field}),void n.forceUpdate()):void r():r()},n.state={mode:"default"},n.store=(0,_.isEdgeWizePage)()?new k.default(e.module):new D.default(e.module),n}return(0,c.default)(r,[{key:"replicasPolicyOptions",get:function(){var e={preferredDuringSchedulingIgnoredDuringExecution:[{weight:100,podAffinityTerm:{labelSelector:{matchLabels:(0,g.default)(this.props.data,"spec.template.metadata.labels",{})},topologyKey:"kubernetes.io/hostname"}}]};return[{value:"default",label:t("DEFAULT_RULES"),affinity:{},description:t("DEFAULT_RULES_DESC")},{value:"decentralized",label:t("DECENTRALIZED_SCHEDULING"),affinity:{podAntiAffinity:e},description:t("DECENTRALIZED_SCHEDULING_DESC")},{value:"aggregation",label:t("CENTRALIZED_SCHEDULING"),affinity:{podAffinity:e},description:t("CENTRALIZED_SCHEDULING_DESC")},{value:"custom",label:t("CUSTOM_RULES"),affinity:{},description:t("CUSTOM_RULES_DESC")}]}},{key:"policys",get:function(){return[{label:t("SCHEDULE_WITH_TARGET"),value:"podAffinity"},{label:t("SCHEDULE_AWAY_FROM_TARGET"),value:"podAntiAffinity"}]}},{key:"types",get:function(){return[{label:t("MATCH_IF_POSSIBLE"),value:"preferredDuringSchedulingIgnoredDuringExecution"},{label:t("MUST_MATCH"),value:"requiredDuringSchedulingIgnoredDuringExecution"}]}}]),(0,c.default)(r,[{key:"componentDidMount",value:function(){var e=this,t=(0,g.default)(this.props.data,"spec.template.spec.affinity",{});if((0,E.default)(t))this.setState({mode:"default"});else{var a=this.replicasPolicyOptions.find((function(e){return(0,b.default)(e.affinity,t)}));a?(this.setState({mode:a.value}),delete this.props.data.spec.template.spec.customMode):this.setState({mode:"custom"},(function(){var a=Object.keys(t).map((function(e){var a=Object.keys(t[e])[0];return{policy:e,type:a,target:(0,g.default)(t,"requiredDuringSchedulingIgnoredDuringExecution"===a?"[".concat(e,"][").concat(a,'][0]["labelSelector"]["matchExpressions"][0]["values"][0]'):"[".concat(e,"][").concat(a,'][0]["podAffinityTerm"]["labelSelector"]["matchExpressions"][0]["values"][0]'),"")}}));(0,y.default)(e.props.data,"spec.template.spec.customMode",a)}))}var r=this.props,n=r.cluster,l=r.namespace;this.store.fetchList({cluster:n,namespace:l,limit:1/0})}},{key:"renderAffinityParams",value:function(){var e=this.state.mode,a=this.replicasPolicyOptions,r=(0,g.default)(this.store,"list.data",[]).map((function(e){return{label:e.name,value:e.name}}));return p.default.createElement(p.default.Fragment,null,p.default.createElement(v.Form.Item,null,p.default.createElement(O.default,{value:e,options:a,onChange:this.handleAffinityChange,defaultValue:a[0].value})),"custom"===e&&p.default.createElement(v.Form.Item,{label:t("CUSTOM_RULES"),rules:[{validator:this.modeValidator,checkOnSubmit:!0}]},p.default.createElement(S.default,{name:"spec.template.spec.customMode",itemType:"object",addText:t("ADD"),checkItemValid:this.checkItemValid,onChange:this.handleChange},p.default.createElement(C.default,null,p.default.createElement(v.Select,{name:"policy",placeholder:t("TYPE"),options:this.policys}),p.default.createElement(v.Select,{name:"type",placeholder:t("STRATEGY"),options:this.types}),p.default.createElement(v.Select,{name:"target",placeholder:t("TARGET"),options:r,style:{marginLeft:20}})))))}},{key:"render",value:function(){var e=this.props.checkable;return p.default.createElement(v.Form.Group,{label:t("POD_SCHEDULING_RULES"),desc:t("POD_SCHEDULING_RULES_DESC"),keepDataWhenUnCheck:!0,checkable:e},this.renderAffinityParams())}}]),r}(p.default.Component),u.propTypes={data:m.default.object,checkable:m.default.bool,initial:m.default.bool},u.defaultProps={data:{},checkable:!1,initial:!1},l=o))||l;a.default=T},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o,i=r(a(44)),c=r(a(36)),s=r(a(37)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=r(a(49)),h=r(a(68)),v=a(14),g=a(52);function y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function E(e){for(var t=1;t0&&void 0!==d[0]?d[0]:{},a=t.cluster,t.namespace,r=t.module,l=(0,u.default)(t,["cluster","namespace","module"]),this.list.isLoading=!0,r&&(this.module=r),o=l,i="".concat(this.apiVersion,"/").concat(this.module).concat(o.dryRun?"?dryRun=All":""),e.next=7,request.get(i,o);case 7:return c=e.sent,s=c.items.map((function(e){return E({cluster:a,module:r||f.module},f.mapper(e))})),(0,g.LimitsEqualRequests)(s),this.list.update({data:s,total:c.items.length,isLoading:!1}),e.abrupt("return",s);case 12:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(h.default),(0,m.default)(o.prototype,"fetchListByK8s",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchListByK8s"),o.prototype),o);t.default=_},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(913)).default);t.default=c},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(97),r(16),r(4),r(23),r(24),r(17),r(62),r(64),r(75),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51));r(45),r(5),r(97),r(42),r(16),r(4),r(23),r(57),r(24),r(17),r(62),r(64),r(75);var s=n(r(800)),f=n(r(158)),d=n(r(0)),p=r(186),m=n(r(799)),h=n(r(1098)),v=r(72),g=n(r(2296));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var E=function(e){var t="HTTP",a=e.value,r=a.name,n=a.containerPort,l=e.index;if(!(0,f.default)(r)){var u=r.match(/^(\w+)-(.*)/);u&&(t=(u[1]||"HTTP").toUpperCase())}return{name:(0,f.default)(r)?"".concat(t.toLowerCase(),"-").concat(l):r,protocol:v.PROTOCOLS.some((function(e){return e.value===t}))?t:e.value.protocol,containerPort:n,propsValue:e.value}},b=function(e){(0,o.default)(r,e);var a=y(r);function r(e){var t;return(0,l.default)(this,r),(t=a.call(this,e)).triggerChange=(0,s.default)((function(){var e=t.state,a=e.name,r=e.protocol,n=e.containerPort;t.props.onChange({name:a,protocol:"UDP"===r?"UDP":"TCP",containerPort:n})}),300),t.handleNameChange=function(e,a){t.setState({name:a},(function(){return t.triggerChange()}))},t.handleProtocolChange=function(e){var a,r=t.state.name,n="".concat(t.state.protocol.toLowerCase(),"-"),l=t.props.index;a=r.startsWith(n)?"".concat(e.toLowerCase(),"-").concat(r.replace(n,"")):"".concat(e.toLowerCase(),"-").concat(l),t.setState({name:a,protocol:e},(function(){return t.triggerChange()}))},t.handleContainerPortChange=function(e){t.setState({containerPort:e},(function(){return t.triggerChange()}))},t.state=E(e),t}return(0,u.default)(r,[{key:"componentDidMount",value:function(){this.triggerChange()}},{key:"render",value:function(){var e=this.state,a=e.name,r=e.protocol,n=e.containerPort;return d.default.createElement("div",{className:g.default.wrapper},d.default.createElement(h.default,{prefix:d.default.createElement("div",{className:g.default.tip},d.default.createElement("span",null,t("PROTOCOL")),d.default.createElement(p.Tooltip,{content:t("ISTIO_PROTOCOL_TIP")},d.default.createElement(p.Icon,{name:"question"})))},d.default.createElement(p.Select,{name:"protocol",value:r,options:v.PROTOCOLS,defaultValue:"HTTP",onChange:this.handleProtocolChange})),d.default.createElement(h.default,{prefix:t("NAME")},d.default.createElement(p.Input,{name:"name",value:a,placeholder:t("REQUIRED"),onChange:this.handleNameChange})),d.default.createElement(h.default,{prefix:t("CONTAINER_PORT")},d.default.createElement(m.default,{name:"containerPort",min:1,max:65535,value:n,integer:!0,onChange:this.handleContainerPortChange})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.value!==t.propsValue?E(e):null}}]),r}(d.default.Component);a.default=b,b.defaultProps={value:{},onChange:function(){}}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(97),r(16),r(4),r(23),r(24),r(17),r(62),r(64),r(75),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51));r(45),r(5),r(97),r(42),r(16),r(4),r(23),r(57),r(24),r(17),r(62),r(64),r(75);var s=n(r(800)),f=n(r(158)),d=n(r(0)),p=r(186),m=n(r(799)),h=n(r(1098)),v=r(72),g=n(r(2297));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var E=function(e){var t="HTTP",a=e.value,r=a.name,n=a.containerPort,l=a.servicePort,u=e.index;if(!(0,f.default)(r)){var o=r.match(/^(\w+)-(.*)/);o&&(t=(o[1]||"HTTP").toUpperCase())}return{name:(0,f.default)(r)?"".concat(t.toLowerCase(),"-").concat(u):r,protocol:v.PROTOCOLS.some((function(e){return e.value===t}))?t:e.value.protocol,containerPort:n,servicePort:l,propsValue:e.value}},b=function(e){(0,o.default)(r,e);var a=y(r);function r(e){var t;return(0,l.default)(this,r),(t=a.call(this,e)).triggerChange=(0,s.default)((function(){var e=t.state,a=e.name,r=e.protocol,n=e.containerPort,l=e.servicePort;t.props.onChange({name:a,protocol:"UDP"===r?"UDP":"TCP",containerPort:n,servicePort:l})}),300),t.handleNameChange=function(e,a){t.setState({name:a},(function(){return t.triggerChange()}))},t.handleProtocolChange=function(e){var a,r=t.state.name,n="".concat(t.state.protocol.toLowerCase(),"-"),l=t.props.index;a=r.startsWith(n)?"".concat(e.toLowerCase(),"-").concat(r.replace(n,"")):"".concat(e.toLowerCase(),"-").concat(l),t.setState({name:a,protocol:e},(function(){return t.triggerChange()}))},t.handleContainerPortChange=function(e){t.setState({containerPort:e},(function(){return t.triggerChange()}))},t.handleServicePortChange=function(e){t.setState({servicePort:e},(function(){return t.triggerChange()}))},t.state=E(e),t}return(0,u.default)(r,[{key:"render",value:function(){var e=this.state,a=e.name,r=e.protocol,n=e.containerPort,l=e.servicePort;return d.default.createElement("div",{className:g.default.wrapper},d.default.createElement(h.default,{prefix:d.default.createElement("div",{className:g.default.tip},d.default.createElement("span",null,t("PROTOCOL")),d.default.createElement(p.Tooltip,{content:t("ISTIO_PROTOCOL_TIP")},d.default.createElement(p.Icon,{name:"question"})))},d.default.createElement(p.Select,{name:"protocol",value:r,options:v.PROTOCOLS,defaultValue:"HTTP",onChange:this.handleProtocolChange})),d.default.createElement(h.default,{prefix:t("NAME")},d.default.createElement(p.Input,{name:"name",value:a,placeholder:t("REQUIRED"),onChange:this.handleNameChange})),d.default.createElement(h.default,{prefix:t("CONTAINER_PORT")},d.default.createElement(m.default,{name:"containerPort",min:1,max:65535,value:n,integer:!0,placeholder:t("REQUIRED"),onChange:this.handleContainerPortChange})),d.default.createElement(h.default,{prefix:t("SERVICE_PORT")},d.default.createElement(m.default,{name:"servicePort",min:1,max:65535,value:l,integer:!0,placeholder:t("REQUIRED"),onChange:this.handleServicePortChange})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.value!==t.propsValue?E(e):null}}]),r}(d.default.Component);a.default=b,b.defaultProps={value:{},onChange:function(){}}},function(e,t,a){e.exports={wrapper:"_-4cD0WdpjLQRRfr3eATB5",desc:"_2trN64nTOrpOtASKkHhxbZ",extraBtn:"_3NUIXlnSX0odfiMD6xuinj",formError:"_1xwVkCYNchrNAw08m7njse",nameTip:"_3_TvkG3h8EIIY2xImC5li9",typeBox:"_1ct3Xc_GatVlbSJhR46WFq",textContent:"_3tiLSem7va-QAMUpYlyOLJ"}},function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(4),r(23),r(24),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(42),r(4),r(23),r(57),r(24),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(3)),p=n(r(63)),m=n(r(26)),h=r(186),v=n(r(2305)),g=n(r(2308));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var E=function(e){(0,o.default)(r,e);var a=y(r);function r(){var e;(0,l.default)(this,r);for(var t=arguments.length,n=new Array(t),u=0;u1&&" ..."),s.default.createElement("p",null,t("COMMANDS")))}return null}},{key:"renderProbeForm",value:function(){var e=this.props,t=e.probType,a=e.value,r=e.componentType;return s.default.createElement(v.default,{className:g.default.form,data:a,probType:t,onSave:this.handleForm,onCancel:this.hideForm,componentType:r})}},{key:"render",value:function(){var e=this.props,a=e.description,r=e.value,n=e.componentType,l=e.label;return this.state.showForm?s.default.createElement("div",{className:g.default.probe},this.renderProbeForm()):(0,p.default)(r)?s.default.createElement("div",{className:(0,d.default)(g.default.empty),onClick:this.showForm},s.default.createElement("div",null,l||t("ADD_PROBE")),s.default.createElement("p",{className:"text-secondary"},a)):s.default.createElement("div",{className:g.default.probe},s.default.createElement("div",{className:g.default.content},s.default.createElement(h.Icon,{name:"monitor",size:40}),s.default.createElement("div",null,s.default.createElement("strong",null,t(this.getProbeTypeText(r))),"heal"===n&&s.default.createElement("p",null,s.default.createElement("span",null,t("INITIAL_DELAY_TIMEOUT_VALUE",{delay:r.initialDelaySeconds||0,timeout:r.timeoutSeconds||0})))),this.renderProbeInfo()),s.default.createElement("div",{className:"buttons"},s.default.createElement(h.Button,{type:"flat",icon:"trash",onClick:this.handleDelete}),s.default.createElement(h.Button,{type:"flat",icon:"pen",onClick:this.showForm})))}}]),r}(s.default.Component);a.default=E,E.propTypes={name:f.default.string,label:f.default.string,value:f.default.object,onChange:f.default.func,onShowForm:f.default.func,deleteNoObject:f.default.bool},E.defaultProps={name:"",label:"",value:{},onChange:function(){},onShowForm:function(){},componentType:"heal",deleteNoObject:!1}},function(e,t,a){e.exports={wrapper:"_2qA0DfrVhnER8QvH0wQNVs",radioGroup:"lTdgbwVyGMyso1J2-ZyQQ",confirm:"_3750no6wmEKmoHmvmyPMsm",object:"_2y_cKPnzZxbXLF_dVafN1k"}},function(e,t,a){e.exports={dropContent:"_1dgWc_FlxZ0I2I8eO_mtsY",header:"_1eg7T1EUzEx9lO_Vk2smqx",listContent:"_1R7XJrTUSk0K11NbeSsvLQ",starContainer:"_4tmFCc6PQiPbAgn206MC8",actions:"_3F90TmEUEEPlTASxdMgZNV",info:"_2R3U9MOi9qgl_FL21JznCz",tabs:"_28RQBc6TkhuRe7tAIJCGmp",tab:"_2hTxWsg41px5hCSv1Wm99F",selected:"_2VkYzhd5Ow_BEjxkhOq3eX",search:"_1XQXLeI-z0GOUpjlyPkOfe",message:"KvW_BUlNf1lu0E8HSDczo",selectedContent:"_3KFGJfmozlVYx4gEvbu6dA",selectedImageInfo:"_3v0zkUOyV-JibpFOGMj7Xt",selectedInfo:"_25UPs6oZb2m0_CwkRBpmWK",icon:"_10xemcZ1Xi6n-LscTe8-8U",logo:"_2C8Gd9hCy9D14behvqpKSG",imageInfo:"_2-qLBNFfWh3DKt1NKsQZBH",emptyContent:"_1NipMFmAIiG0us8zcmeW3p",desc:"_2qpXEBvwkvD9MmvpqIxKu9",textConfirm:"_1EMGC0hNKltp9Gqej1THm9",registryFooter:"_1ohyELTkhVtaqqWwThH647",dropContent_hide:"_1trQN1nAMesw9gU4dm2GmW",dropDownIcon:"_2Ispz9PQoN4qvKuwb3ZVWB",clickable:"_3dHyyekpvmPUPtbo3xQG0Z",star:"_1SkfiEdBayGXiRRaBkwk7H",imageInput:"DhITaL97AQEJeR5vr14Je"}},function(e,t,a){e.exports={content:"_3wriWVsghyEeMHLsxqYuhC",radioListContent:"_6OcLzfJRUG_EEwKee4cRi",radioOnlyOneListContent:"_1vdnayTJXtlQIl5FjEbAXn",radioList:"_1U2J5xETOAh5sL0WjecCxJ",imageTagDetailItem:"_1yRt9fX0qMa0ara4u5hKhu",icon:"_2oschSYAXruRPq7qHwTSTX",tagName:"_3Q77ElyimDbKWMAq6wz-Qb"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(1099)),p=n(r(799)),m=n(r(2328));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(r,e);var a=h(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement("div",{className:"margin-b12"},s.default.createElement("div",{className:m.default.title},t("USER_AND_USER_GROUP")),s.default.createElement("div",{className:m.default.content},s.default.createElement(f.Form.Item,null,s.default.createElement(d.default,{name:"".concat(this.prefix,".runAsNonRoot"),title:t("RUN_AS_NON_ROOT"),description:t("RUN_AS_NON_ROOT_DESC")})),s.default.createElement("div",{className:"padding-12"},s.default.createElement(f.Columns,null,s.default.createElement(f.Column,null,s.default.createElement(f.Form.Item,{label:t("USER"),desc:t("RUN_AS_USER_DESC")},s.default.createElement(p.default,{name:"".concat(this.prefix,".runAsUser"),integer:!0}))),s.default.createElement(f.Column,null,s.default.createElement(f.Form.Item,{label:t("USER_GROUP"),desc:t("RUN_AS_USER_GROUP_DESC")},s.default.createElement(p.default,{name:"".concat(this.prefix,".runAsGroup"),integer:!0})))))))}},{key:"prefix",get:function(){return this.props.prefix||"securityContext"}}]),r}(s.default.Component);a.default=v},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(2329));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=function(e){(0,o.default)(r,e);var a=p(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement("div",{className:"margin-b12"},s.default.createElement("div",{className:d.default.title},t("SELINUX_CONTEXT")),s.default.createElement("div",{className:d.default.content},s.default.createElement(f.Columns,null,s.default.createElement(f.Column,null,s.default.createElement(f.Form.Item,{label:t("LEVEL")},s.default.createElement(f.Input,{name:"".concat(this.prefix,".seLinuxOptions.level")}))),s.default.createElement(f.Column,null,s.default.createElement(f.Form.Item,{label:t("ROLE")},s.default.createElement(f.Input,{name:"".concat(this.prefix,".seLinuxOptions.role")})))),s.default.createElement(f.Columns,null,s.default.createElement(f.Column,null,s.default.createElement(f.Form.Item,{label:t("TYPE")},s.default.createElement(f.Input,{name:"".concat(this.prefix,".seLinuxOptions.type")}))),s.default.createElement(f.Column,null,s.default.createElement(f.Form.Item,{label:t("USER")},s.default.createElement(f.Input,{name:"".concat(this.prefix,".seLinuxOptions.user")}))))))}},{key:"prefix",get:function(){return this.props.prefix||"securityContext"}}]),r}(s.default.Component);a.default=m},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(799));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=function(e){(0,o.default)(r,e);var a=p(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement(s.default.Fragment,null,s.default.createElement(f.Form.Item,{label:t("TERMINATION_GRACEPERIOD_SECONDS")},s.default.createElement(d.default,{name:"".concat(this.prefix,"spec.terminationGracePeriodSeconds"),integer:!0,min:0,autoFocus:!0,defaultValue:30,style:{maxWidth:"100%"}})))}},{key:"prefix",get:function(){var e=this.props,t=e.isFederated;return e.prefix||(t?"spec.template.spec.template.":"spec.template.")}}]),r}(s.default.Component);a.default=m},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(84),r(18),r(16),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(84),r(18),r(42),r(16),r(4),r(23),r(57),r(17),r(85);var l=n(r(61)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(3)),p=n(r(1)),m=n(r(812)),h=n(r(2351)),v=n(r(2352)),g=n(r(1307));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var E=function(e){(0,i.default)(r,e);var a=y(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),o=0;o0;return!o&&l&&_.default.error(t("NODE_SELECTORS_EMPTY_DESC")),o},n.handlePrev=function(){n.setState((function(e){var t=e.currentStep;return{currentStep:Math.max(0,t-1)}}))},n.handleNext=function(){var e=n.formRef.current,t=n.state.formTemplate,a=n.checkNodeSelectors({formTemplate:t});e&&e.validate((function(){a&&n.setState((function(e){var t=e.currentStep;return{currentStep:Math.min(n.steps.length-1,t+1)}}))}))},n.handleOk=function(){var e=n.props.onOk,t=n.state,a=t.isCodeMode,r=t.formTemplate;if(a){var l,u=null===(l=n.editor.current)||void 0===l?void 0:l.getData();n.checkNodeSelectors({formTemplate:u})&&e(u)}else{var o,i=n.checkNodeSelectors({formTemplate:r});null===(o=n.formRef.current)||void 0===o||o.validate((function(){var t,a,n,l,u,o=null==r||null===(t=r.spec)||void 0===t||null===(a=t.deploymentTemplate)||void 0===a||null===(n=a.spec)||void 0===n||null===(l=n.template)||void 0===l||null===(u=l.spec)||void 0===u?void 0:u.deploymentTemplate;o&&(0,g.default)(r,{spec:{deploymentTemplate:o}}),i&&e(r)}))}},n.handleSubFormSave=function(){var e=n.state.subRoute;e&&e.onSave&&e.onSave((function(){n.setState({subRoute:{}})}))},n.handleSubFormCancel=function(){var e=n.state.subRoute;e&&e.onCancel&&(e.onCancel(),n.setState({subRoute:{}}))},n.renderSaveBar=function(){var e=n.state.subRoute;return(0,v.default)(e)?null:h.default.createElement(D.default,{className:w.default.confirm,onOk:n.handleSubFormSave,onCancel:n.handleSubFormCancel})},n.state={codeMode:!1,currentStep:0,subRoute:{},formTemplate:e.formTemplate,intializing:!1},n.formRef=h.default.createRef(),n.editor=h.default.createRef(),n}return(0,f.default)(r,[{key:"getChildContext",value:function(){return{registerSubRoute:this.registerSubRoute,resetSubRoute:this.resetSubRoute}}},{key:"renderSteps",value:function(){var e=this.state,a=e.currentStep,r=e.isCodeMode;return h.default.createElement("div",{className:w.default.stepsWrapper},!r&&h.default.createElement(T.default,{steps:this.steps,current:a}),h.default.createElement(C.default,{className:w.default.codeMode,text:t("EDIT_YAML"),onChange:this.handleModeChange,checked:r}))}},{key:"renderForm",value:function(){var e=this.state,t=e.formTemplate,a=e.currentStep,r=this.props,n=r.cluster,l=r.workspace,u=r.namespace,o=r.store,i=r.isEdgeTable,c=this.steps[a],s=c.component,f=c.onlyMetaData,d={formRef:this.formRef,formTemplate:t,cluster:n,workspace:l,isEdgeTable:i,namespace:u,module:"edgeappsets",onlyMetaData:f,prefix:"spec.deploymentTemplate.spec.template.",store:o};return h.default.createElement(s,d)}},{key:"renderBody",value:function(){var e=this.state,t=e.intializing,a=e.isCodeMode;return t?h.default.createElement(b.Loading,{className:w.default.loading}):h.default.createElement("div",{className:w.default.form},a?h.default.createElement(O.default,{ref:this.editor,value:this.state.formTemplate}):this.renderForm(),this.renderSaveBar())}},{key:"renderFooter",value:function(){var e=this.props.onCancel,a=this.props.store.isSubmitting,r=this.state,n=r.isCodeMode,l=r.currentStep;if(n)return h.default.createElement("div",{className:w.default.footer},h.default.createElement(b.Button,{onClick:e},t("CANCEL")),h.default.createElement(b.Button,{type:"control",onClick:this.handleOk,loading:a,disabled:a},t("INSTALL")));var u=this.steps.length-1;return h.default.createElement("div",{className:w.default.footer},l>0&&h.default.createElement(b.Button,{type:"control",onClick:this.handlePrev},t("PREVIOUS")),l=e}},O=function(e){var a=e.cluster,r=e.namespace,n=e.replicas,l=void 0===n?0:n,u=e.isEdgeWize,y=d.useMemo((function(){return function(e){return[b,_(l)].every((function(t){return t(e)}))}}),[l]),O=d.useMemo((function(){if(!globals.app.isMultiCluster)return!1;var e=(0,s.default)(globals,"clusterConfig.".concat(a,".ksVersion"));return(0,h.compareVersion)(e,"3.4.0")<0}),[a]),S=e.prefix||"spec.template.",C=d.useRef(u?new m.default:new p.default("ippools")),D=d.useState([]),k=(0,o.default)(D,2),N=k[0],T=k[1],R=(0,f.default)(e.data);return d.useEffect((function(){C.current.fetchNamespacesIpPools({cluster:a,namespace:r,limit:-1}).then((function(e){T(e.filter(y).map((function(e){return E(E({},e),{},{label:e.name,value:e.name})})))}))}),[]),d.createElement(i.Form.Group,{label:R?t("ADD_EDGE_IPPOOL"):"",desc:R?t("ADD_EDGE_IPPOOL_DES"):"",checkable:R,keepDataWhenUnCheck:!0},u?d.createElement(c.default,{isOutdated:O,type:"array",name:"".concat(S,'metadata.annotations["cni.projectcalico.org/ipv4pools"]'),list:N,icon:v.ICON_TYPES[C.current.module],hideColumns:["workspace"]}):d.createElement(g.default,{isOutdated:O,type:"array",cluster:a,namespace:r,name:"".concat(S,'metadata.annotations["cni.projectcalico.org/ipv4pools"]'),icon:v.ICON_TYPES[C.current.module],hideColumns:["workspace"],rootStore:e.rootStore,formTemplate:e.formTemplate,data:e.data,formProps:e.formProps}))};a.default=O},function(e,t,a){"use strict";a(15);var r=a(20);a(12),a(109),a(11),a(31),a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(109),a(45),a(11),a(31),a(18),a(42),a(4),a(23),a(57),a(17);var n=r(a(30)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=a(186),f=r(a(3)),d=a(903),p=r(a(800)),m=r(a(63)),h=r(a(195)),v=r(a(158)),g=r(a(1)),y=r(a(0)),E=r(a(837)),b=r(a(2455));function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var O=function(e){(0,o.default)(a,e);var t=_(a);function a(e){var r;return(0,l.default)(this,a),(r=t.call(this,e)).handleDOMClick=function(e){r.optionsRef&&r.optionsRef.current&&!r.optionsRef.current.contains(e.target)&&r.controlRef&&r.controlRef.current&&!r.controlRef.current.contains(e.target)&&r.setState({showOptions:!1})},r.triggerChange=(0,p.default)((function(){(0,r.props.onChange)(r.state.value)})),r.handleClick=function(e){r.setState({value:e,showOptions:!1},(function(){r.triggerChange()}))},r.toggleOptions=function(){r.setState((function(e){return{showOptions:!e.showOptions}}),(function(){document.removeEventListener("click",r.handleDOMClick),r.state.showOptions&&document.addEventListener("click",r.handleDOMClick)}))},r.state={value:(0,v.default)(e.value)?e.defaultValue:e.value,showOptions:!1},r.optionsRef=y.default.createRef(),r.controlRef=y.default.createRef(),r}return(0,u.default)(a,[{key:"componentDidUpdate",value:function(e,t){this.props.value!==t.value&&this.setState({value:this.props.value})}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleDOMClick)}},{key:"renderDetail",value:function(e){return e.map((function(e,t){return y.default.createElement("div",{key:t,className:b.default.text},y.default.createElement("div",null,e.label),e.description&&y.default.createElement("p",null,e.description))}))}},{key:"renderOption",value:function(e,t){var a=this,r=this.props.renderOption;return y.default.createElement("div",{key:e.uid||e.value,onClick:function(){return a.handleClick(e.value)},className:(0,f.default)(b.default.option,(0,n.default)({},b.default.selected,t),(0,n.default)({},b.default.withIcon,e.icon))},r?r(e):y.default.createElement(y.default.Fragment,null,this.renderIcon(e),y.default.createElement("div",{className:b.default.text},y.default.createElement("div",null,e.label),e.description&&y.default.createElement("p",null,e.description)),e.details&&this.renderDetail(e.details)))}},{key:"renderIcon",value:function(e){return e.icon?(0,h.default)(e.icon)?y.default.createElement(s.Icon,{className:b.default.leftIcon,name:e.icon,size:40,type:"dark"}):e.icon:null}},{key:"renderOptions",value:function(){var e=this,t=this.props,a=t.options,r=t.disabled,n=this.state,l=n.value,u=n.showOptions;if(r||!u)return null;if((0,m.default)(a))return y.default.createElement("div",{className:b.default.options,ref:this.optionsRef},y.default.createElement(d.Empty,null));var o=a.find((function(e){return(0,E.default)(e.value,l)}));return y.default.createElement("div",{className:b.default.options,ref:this.optionsRef},o&&this.renderOption(o,!0),a.filter((function(e){return!(0,E.default)(e.value,l)})).map((function(t){return e.renderOption(t)})))}},{key:"renderControl",value:function(){var e,t=this.props,a=t.placeholder,r=t.options,l=t.disabled,u=t.renderOption,o=this.state,i=o.value,c=o.showOptions,d=r.find((function(e){return(0,E.default)(e.value,i)}))||a||{__empty:!0};return y.default.createElement("div",{className:(0,f.default)(b.default.control,(e={},(0,n.default)(e,b.default.withIcon,d.icon),(0,n.default)(e,b.default.open,c),e)),ref:this.controlRef,onClick:this.toggleOptions},u?u(d):y.default.createElement(y.default.Fragment,null,this.renderIcon(d),y.default.createElement("div",{className:b.default.text},y.default.createElement("div",null,d.label),d.description&&y.default.createElement("p",null,d.description)),d.details&&this.renderDetail(d.details)),!l&&y.default.createElement(s.Icon,{className:b.default.rightIcon,name:"chevron-down",size:"small",clickable:!0}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.disabled;return y.default.createElement("div",{className:(0,f.default)(b.default.wrapper,(0,n.default)({},b.default.disabled,a),t)},this.renderControl(),this.renderOptions())}}]),a}(y.default.Component);t.default=O,O.propTypes={className:g.default.string,value:g.default.any,defaultValue:g.default.any,options:g.default.array.isRequired,onChange:g.default.func,renderOption:g.default.func},O.defaultProps={className:"",options:[],onChange:function(){}}},,,,function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(11),r(6),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(6),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(30)),p=n(r(26)),m=n(r(189)),h=n(r(158)),v=n(r(194)),g=n(r(0)),y=n(r(106)),E=n(r(1264)),b=r(239),_=n(r(1)),O=n(r(3)),S=r(186),C=n(r(836)),D=n(r(790)),k=n(r(1567));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getWatchListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion,"/watch").concat(e.getPath(t),"/").concat(e.module)},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath(t),"/").concat(e.module)},e}return(0,l.default)(a,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.namespace,a="";return t&&(a+="/namespaces/".concat(t)),a}}]),a}(r(a(68)).default);t.default=s},,,function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(18),r(192),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(192),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(7);var l=n(r(58)),u=n(r(43));r(41);var o,i=n(r(44)),c=n(r(30)),s=n(r(61)),f=n(r(36)),d=n(r(37)),p=n(r(55)),m=n(r(56)),h=n(r(51)),v=n(r(0)),g=n(r(3)),y=n(r(26)),E=r(239),b=r(186),_=n(r(790)),O=n(r(2479)),S=n(r(2480)),C=n(r(2486));function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;tthis.state.formData.length&&v.default.createElement(_.default,{className:C.default.add,onClick:this.handleAdd,title:t("ADD_EDGE_NODE"),description:t("ADD_EDGE_NODE_DESC")})))}}]),n}(v.default.Component))||o;a.default=T},,function(e,t,a){e.exports={body:"_3rLLKpT8IgpcqWhzTXPWzb",footer:"_1FN6kDx_4OYTrAeMzmz6lJ",nodes:"_2K0nFAD8XjT_-g3jP0gfYz",item:"_2szAjgdbfftm9dnv4On9sC",selected:"_4IuUl9x4GeLgtthhM3Cby",ring:"_2mjDKl7noCA52Dkwojasqj",name:"sgFMlcJBkaU6RLJu0NSHo",taints:"_3VFxaVUiKAEp4AZAT4_tG5"}},function(e,t,a){e.exports={body:"cx9CuoGasIzKuoPV-SX2x",footer:"_3PO41zve62tsAkM30z0T3b",nodes:"_1TqujrdBgpQqMUZwVQnvUo",item:"_1UmxvIzRiQQrZ5iwHfbeuy",selected:"LuUQg8XP2-9uUx7goKJdp",ring:"_24FDmv6VPjHWOPFRy5UJJO",name:"_50ZNy-lVF8cVuxAandCZS",taints:"_3d-N5il7f1CkzJzvPDo8tR"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(31),r(84),r(73),r(18),r(16),r(10),r(24),r(85),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var u=l(r(43));r(41);var o=l(r(44)),i=l(r(96));r(5),r(31),r(84),r(73),r(18),r(16),r(10),r(4),r(22),r(85);var c=n(r(0)),s=l(r(2501)),f=r(186),d=l(r(1176)),p=l(r(2502)),m=new d.default;var h=function(e){var a,r,n,l,d=e.detail,h=e.cluster,v=e.handleBindIp,g=e.renderBtn,y=d||{},E=y.metadata,b=y.parentKey,_=(0,s.default)(b||[],2).map((function(e){return e[1]||e[0]})),O=(null==E?void 0:E.annotations)||{},S=Object.keys(O).find((function(e){return e.includes("infra.kubesphere.io/ippool")})),C=(0,c.useState)([]),D=(0,i.default)(C,2),k=D[0],N=D[1];function T(){return(T=(0,o.default)(u.default.mark((function e(){var t,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={limit:-1,page:1,hasStatus:!this.isCalico&&void 0,cluster:h},(null==E?void 0:E.name)&&(t.labelSelector="nodegroup.infra.kubesphere.io/".concat(null==E?void 0:E.name)),e.next=4,m.fetchList(t);case 4:(a=e.sent)&&N(a);case 6:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}(0,c.useEffect)((function(){S?function(){T.apply(this,arguments)}():N([])}),[S,d]);var R=c.default.createElement("div",null,k.map((function(e){return c.default.createElement("div",{key:e.name},c.default.createElement("div",{className:p.default["top-bar-ip-tooltip-item"]},e.name),c.default.createElement("div",{className:p.default["top-bar-ip-tooltip-item-ip"]},t("NETWORK_SEGMENT")," :",e.cidr))}))),w="".concat(t("全部节点组")," / ").concat(_.join(" / "));return c.default.createElement("div",{className:p.default["top-bar"]},c.default.createElement("div",{className:p.default["top-bar-left"]},c.default.createElement("div",null,c.default.createElement("img",{className:p.default.icon,width:20,src:"/assets/disk_group.svg",alt:""}),c.default.createElement("span",{className:p.default["top-bar-title"]},null==d||null===(a=d.aliasName)||void 0===a||null===(r=a.split("("))||void 0===r?void 0:r[0]),c.default.createElement("span",{className:p.default["top-bar-title-label"]},"(",null==d||null===(n=d.aliasName)||void 0===n||null===(l=n.split("("))||void 0===l?void 0:l[1])),c.default.createElement("div",{className:p.default["top-bar-des"]},c.default.createElement("span",{className:p.default["top-bar-des-group"],title:w},t("FROM_NODE_GROUP"),":",w),c.default.createElement("span",{className:p.default["top-bar-bind"]},t("IP 池"),":",c.default.createElement("span",{className:p.default["top-bar-ip"]},S?c.default.createElement(f.Tooltip,{className:p.default["top-bar-ip-tooltip"],content:R},c.default.createElement("span",null,O[S])):v?c.default.createElement("span",{onClick:v},"点击添加"):"-")),k.length>1&&c.default.createElement(f.Tag,{type:"primary"},"+",k.length))),g)};a.default=h},function(e,t,a){e.exports={taints:"_1ULrfSas_sAVfa3od9d8ax",overview:"_1e24H-JEunBA2J5HWPxFaT",resource:"_3zvW-M_VBK7leGvGXjwR3w"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(6),r(84),r(29),r(73),r(18),r(16),r(4),r(22),r(23),r(17),r(85),r(38),r(7),r(32),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(6),r(84),r(29),r(73),r(18),r(28),r(42),r(16),r(4),r(22),r(23),r(57),r(17),r(85),r(38),r(7),r(32),r(110);var l=n(r(315)),u=n(r(58)),o=n(r(30)),i=n(r(61)),c=n(r(43));r(41);var s=n(r(44)),f=n(r(36)),d=n(r(37)),p=n(r(55)),m=n(r(56)),h=n(r(51)),v=r(186),g=n(r(3)),y=n(r(787)),E=n(r(833)),b=n(r(450)),_=n(r(26)),O=n(r(60)),S=n(r(63)),C=n(r(241)),D=n(r(861)),k=n(r(1)),N=n(r(0)),T=n(r(1048)),R=n(r(437)),w=n(r(443)),I=n(r(831)),M=r(52),P=r(72),A=n(r(2507));function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,h.default)(e);if(t){var n=(0,h.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,m.default)(this,a)}}var L=function(e){(0,p.default)(n,e);var a,r=j(n);function n(e){var a;return(0,f.default)(this,n),(a=r.call(this,e)).stopPropagation=function(e){return e.stopPropagation()},a.handleOk=(0,s.default)(c.default.mark((function e(){var t,r,n,l,u,o,i,s,f,d,p,m,h,v,g;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.props,r=t.onOk,n=t.resource,l=t.k8sVersion,u=t.store,o=a.state,i=o.selectedRelatedResourceIds,s=o.relatedResources,f=o.scheduledProjectList,d=o.customScaling,p=[],s.forEach((function(e){i.includes(e.uid)&&("services"===e.module?p.push(a.serviceStore.delete(e)):"persistentvolumeclaims"===e.module&&p.push(a.volumeStore.delete(e)))})),m=[],d.forEach((function(e){m.push(a.hpaStore.delete((0,C.default)(e,"cluster","namespace","name"),l))})),e.next=8,Promise.all(m);case 8:return e.next=10,Promise.all(p);case 10:if(!(0,O.default)(n)){e.next=21;break}return h=n[0].namespace,v=n.map((function(e){return e.name})),g=v.filter((function(e){return f.includes(e)})),e.next=16,Promise.all(n.map((function(e){return u.delete(e,l)})));case 16:return e.next=18,Promise.all(g.map((function(e){return u.deleteSchedule({name:e,namespace:h})})));case 18:u.list.setSelectRowKeys([]),e.next=27;break;case 21:return e.next=23,u.delete(n,l);case 23:if(e.t0=f.includes(n.name),!e.t0){e.next=27;break}return e.next=27,u.deleteSchedule({name:n.name,namespace:n.namespace});case 27:r();case 28:case"end":return e.stop()}}),e)}))),a.handleItemClick=function(e){var t=e.currentTarget.dataset.uid;a.setState((function(e){var a=e.selectedRelatedResourceIds;return{selectedRelatedResourceIds:a.includes(t)?a.filter((function(e){return e!==t})):[].concat((0,i.default)(a),[t])}}))},a.handleSelectAll=function(){var e=a.state,t=e.relatedResources,r=e.selectedRelatedResourceIds;(0,S.default)(r)&&a.setState({selectedRelatedResourceIds:t.map((function(e){return e.uid}))})},a.renderContentItem=function(e){var r=a.state.selectedRelatedResourceIds;return N.default.createElement("div",{key:e.uid,"data-uid":e.uid,className:(0,g.default)(A.default.resource,(0,o.default)({},A.default.selected,r.includes(e.uid))),onClick:a.handleItemClick},N.default.createElement(v.Checkbox,{checked:r.includes(e.uid),onClick:a.stopPropagation}),N.default.createElement(v.Icon,{name:P.ICON_TYPES[e.module],size:20,type:r.includes(e.uid)?"light":"dark"}),N.default.createElement("span",{className:A.default.resourceName},e.name),N.default.createElement("span",{className:A.default.resourceType},t(P.MODULE_KIND_MAP[e.module])))},a.renderCustomScalingIterm=function(e){return N.default.createElement("div",{key:e.uid,"data-uid":e.uid,className:(0,g.default)(A.default.resource,A.default.selected,A.default.disabled,A.default.customScalingItem)},N.default.createElement("div",{className:A.default.disabled},N.default.createElement(v.Checkbox,{checked:!0}),N.default.createElement(v.Icon,{name:P.ICON_TYPES[e.module],size:20,type:"light"}),N.default.createElement("span",{className:A.default.resourceName},e.name),N.default.createElement("span",{className:A.default.resourceType},t(P.MODULE_KIND_MAP[e.module]))),N.default.createElement(v.Tooltip,{content:t("DELETE_CUSTOM_SCALING_WITH_WORKLOAD")},N.default.createElement(v.Icon,{name:"question",size:20,type:"light"})))},a.serviceStore=new w.default,a.volumeStore=new I.default,a.hpaStore=new T.default,e.isFederated&&(a.serviceStore=new R.default({module:a.serviceStore.module}),a.volumeStore=new R.default({module:a.volumeStore.module})),a.state={relatedResources:[],selectedRelatedResourceIds:[],enableConfirm:!1,timer:3,scheduledProjectList:[],customScaling:[]},a}return(0,d.default)(n,[{key:"componentDidMount",value:function(){this.props.visible&&(this.fetchRelatedResources(this.props.resource),this.startTimer())}},{key:"componentWillUnmount",value:function(){this.timer&&clearInterval(this.timer)}},{key:"startTimer",value:function(){var e=this;this.timer&&clearInterval(this.timer),this.timer=setInterval((function(){e.setState((function(e){var t=e.timer;return{timer:Math.max(t-1,0),enableConfirm:t<=1}}),(function(){e.state.enableConfirm&&e.timer&&clearInterval(e.timer)}))}),1e3)}},{key:"fetchRelatedResources",value:(a=(0,s.default)(c.default.mark((function e(t){var a,r,n,l,u,o,i,s,f,d,p,m=this;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.props.store,this.setState({isLoading:!0}),r=[],u=[],(0,O.default)(t)?(n=t[0].namespace,l=t[0].cluster,r=t.map((function(e){return e.selector||(0,_.default)(e,"resource.selector")}))):(n=t.namespace,l=t.cluster,r.push(t.selector||(0,_.default)(t,"resource.selector"))),o=[].concat(t).map((function(e){return(0,_.default)(e,'labels["autoscaling.kubeshpere.io/name"]')})).filter(Boolean).map((function(e){return{cluster:l,namespace:n,module:m.hpaStore.module,uid:e,name:e}})),i=[],r.forEach((function(e){if(!(0,S.default)(e)){var t=(0,M.joinSelector)(e);i.push(m.volumeStore.fetchListByK8s({cluster:l,namespace:n,labelSelector:t}),m.serviceStore.fetchListByK8s({cluster:l,namespace:n,labelSelector:t}))}})),e.next=10,Promise.all(i);case 10:if(s=e.sent,"deployments"!==a.module){e.next=25;break}return e.next=14,null===(d=a.getAllScheduleProject)||void 0===d?void 0:d.call(a,{namespace:n});case 14:if(e.t1=f=e.sent,e.t0=null!==e.t1,!e.t0){e.next=18;break}e.t0=void 0!==f;case 18:if(!e.t0){e.next=22;break}e.t2=f,e.next=23;break;case 22:e.t2=[];case 23:p=e.t2,(0,S.default)(p)||(u=p.items.map((function(e){return e.metadata.name})));case 25:this.setState({relatedResources:(0,D.default)((0,b.default)(s),"uid"),isLoading:!1,scheduledProjectList:u,customScaling:o});case 26:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"renderContent",value:function(){var e=this.state,a=e.isLoading,r=e.relatedResources,n=e.selectedRelatedResourceIds,l=e.customScaling;return!1===a&&(0,S.default)(r)&&(0,S.default)(l)?N.default.createElement(E.default,{icon:"appcenter",className:A.default.empty,title:t("NO_RELATED_RESOURCE_FOUND"),desc:t("NO_WORKLOAD_RELATED_RESOURCE_DESC")}):N.default.createElement("div",{className:A.default.resources},!(0,S.default)(r)&&N.default.createElement("div",{className:A.default.resource},N.default.createElement(v.Checkbox,{checked:!(0,S.default)(n),onClick:this.handleSelectAll,indeterminate:!((0,S.default)(n)||r.length===n.length)}),N.default.createElement("span",{className:A.default.resourceName},t("SELECT_ALL"))),r.map(this.renderContentItem),l.map(this.renderCustomScalingIterm))}},{key:"render",value:function(){var e=this.state,a=e.enableConfirm,r=e.timer,n=this.props,o=n.resource,i=(n.onOk,n.onCancel),c=n.isSubmitting,s=(0,u.default)(n,["resource","onOk","onCancel","isSubmitting"]),f=(0,O.default)(o)&&1!==o.length?t("DELETE_MULTIPLE_WORKLOADS"):t("DELETE_WORKLOAD"),d=(0,O.default)(o)&&1!==o.length?t.html("DELETE_WORKLOAD_DESC_PL",{resource:o.map((function(e){return e.name})).join(", ")}):(0,O.default)(o)?t.html("DELETE_WORKLOAD_DESC_SI",{resource:o.map((function(e){return e.name})).join(", ")}):t.html("DELETE_WORKLOAD_DESC_SI",{resource:o.name});return N.default.createElement(y.default,(0,l.default)({width:520,icon:"question",title:f,description:d,closable:!1,headerClassName:A.default.modalHeader,bodyClassName:A.default.modalBody,hideFooter:!0},s),N.default.createElement("div",{className:A.default.body},this.renderContent()),N.default.createElement("div",{className:A.default.footer},N.default.createElement(v.Button,{onClick:i,"data-test":"modal-cancel"},t("CANCEL")),N.default.createElement(v.Button,{type:"danger",loading:c,disabled:!a||c,onClick:this.handleOk,"data-test":"modal-ok"},t("OK"),!a&&"(".concat(r,"s)"))))}}]),n}(N.default.Component);a.default=L,L.propTypes={resource:k.default.any,visible:k.default.bool,onOk:k.default.func,onCancel:k.default.func,isSubmitting:k.default.bool},L.defaultProps={visible:!1,isSubmitting:!1,onOk:function(){},onCancel:function(){}}},function(e,t,a){"use strict";a(15);var r=a(20),n=a(157);a(11),a(84),a(18),a(4),a(23),a(17),a(85),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(11),a(84),a(18),a(42),a(4),a(22),a(23),a(57),a(17),a(85);var l=r(a(315)),u=r(a(58)),o=r(a(43));a(41);var i,c,s,f=r(a(44)),d=r(a(36)),p=r(a(37)),m=r(a(55)),h=r(a(56)),v=r(a(51)),g=n(a(0)),y=r(a(1)),E=a(14),b=a(239),_=r(a(26)),O=r(a(74)),S=r(a(241)),C=r(a(800)),D=r(a(135)),k=r(a(122)),N=a(186),T=r(a(787)),R=r(a(2508)),w=r(a(2510)),I=r(a(2512)),M=r(a(2515)),P=r(a(935)),A=r(a(2516));function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,v.default)(e);if(t){var n=(0,v.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,h.default)(this,a)}}var L=(0,b.observer)((s=c=function(e){(0,m.default)(a,e);var t=j(a);function a(e){var r;return(0,d.default)(this,a),(r=t.call(this,e)).handleAppChange=(0,C.default)((function(e,t){var a=r.state.detail,n=(0,D.default)(a);(0,O.default)(n,t,e),r.setState({detail:n})}),200),r.handleOk=(0,f.default)(o.default.mark((function e(){var t,a,n,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=(0,S.default)(r.state.detail,["name","aliasName","abstraction","description","appHome","categoryName","readme","icon"]),(null===(t=r.state.detail)||void 0===t?void 0:t.attachments)&&(a.attachments=((null===(n=r.state.detail)||void 0===n?void 0:n.attachments)||[]).map((function(e){return(0,k.default)(e)[0]}))),(l=r.formRef.current)&&l.validate((function(){var e,t=null===(e=r.props.detail.attachments)||void 0===e?void 0:e.filter((function(e){var t;return!(null===(t=a.attachments)||void 0===t?void 0:t.includes(e))}));(null==t?void 0:t.length)&&t.map((function(e){var t;return r.store.deleteImage({id:e,workspace:null===(t=r.state.detail)||void 0===t?void 0:t.workspace})})),r.props.onOk(a)}));case 4:case"end":return e.stop()}}),e)}))),r.onCancel=function(){var e=r.state.oldScreenshots;r.handleAppChange(e,"attachments"),r.props.onCancel()},r.store=r.props.store,r.categoryStore=new M.default,r.fileStore=new P.default,r.formRef=g.default.createRef(),r.state={detail:(0,D.default)((0,E.toJS)(r.props.detail)),oldScreenshots:(0,_.default)(r.props.detail,"attachments")},r}return(0,p.default)(a,[{key:"componentDidMount",value:function(){this.categoryStore.fetchList({noLimit:!0})}},{key:"render",value:function(){var e=this.props,t=e.visible,a=e.isSubmitting,r=(e.onCancel,(0,u.default)(e,["visible","isSubmitting","onCancel"])),n=(0,E.toJS)((0,_.default)(this.categoryStore,"list.data",[])),o=this.state.detail;return g.default.createElement(T.default,(0,l.default)({},r,{className:A.default.modal,bodyClassName:A.default.body,onOk:this.handleOk,onCancel:this.onCancel,visible:t,isSubmitting:a,fullScreen:!0}),g.default.createElement(N.Columns,{className:"height-full is-gapless"},g.default.createElement(N.Column,{className:"is-narrow"},g.default.createElement(R.default,{store:this.store,formData:o,categories:n,fileStore:this.fileStore,formRef:this.formRef,handleChange:this.handleAppChange})),g.default.createElement(N.Column,null,g.default.createElement(w.default,{handleChange:this.handleAppChange,store:this.store,detail:o,fileStore:this.fileStore}),g.default.createElement(I.default,{handleChange:this.handleAppChange,store:this.store,detail:o}))))}}]),a}(g.Component),c.propTypes={store:y.default.object,detail:y.default.object,visible:y.default.bool,onOk:y.default.func,onCancel:y.default.func},c.defaultProps={store:{},detail:{},visible:!1,onOk:function(){},onCancel:function(){}},i=s))||i;t.default=L},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.APP_TEMPLATE_VERSION_FORM=t.APP_TEMPLATES_FORM=void 0;var n=r(a(2517)),l=r(a(932)),u=[{title:"BASIC_INFORMATION",icon:"cdn",component:n.default,required:!0},{title:"POD_SETTINGS",icon:"docker",component:l.default,required:!0}];t.APP_TEMPLATES_FORM=u;var o=[{title:"BASIC_INFORMATION",icon:"cdn",component:l.default,required:!0}];t.APP_TEMPLATE_VERSION_FORM=o},,,,,,,,,,,,,,,,,,,function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(31),r(84),r(18),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(5),r(31),r(84),r(18),r(4),r(85);var l=n(r(26)),u=n(r(60)),o=n(r(0)),i=n(r(1)),c=r(186),s=n(r(790)),f=n(r(1108)),d=n(r(1608)),p=function(e){var a=e.index,r=e.rule,n=e.tls,i=void 0===n?[]:n,p=e.projectDetail,m=e.onDelete,h=e.onEdit,v=i.find((function(e){return e.hosts&&e.hosts.includes(r.host)})),g=v?"https":"http",y=(0,u.default)(r.clusters)&&r.clusters.map((function(e){return{name:e}}));return o.default.createElement("div",{className:d.default.item},o.default.createElement("div",{className:d.default.texts},o.default.createElement(s.default,{icon:"earth",title:r.host,description:o.default.createElement("div",{className:d.default.description},o.default.createElement("span",null,t("PROTOCOL_VALUE",{value:g.toUpperCase()})),"https"===g&&o.default.createElement("span",null,t("CERTIFICATE_VALUE",{value:v.secretName})))}),(0,u.default)(y)&&o.default.createElement(s.default,{title:o.default.createElement(f.default,{clusters:y,clustersDetail:p.clusters}),description:t("CLUSTER")})),o.default.createElement("div",{className:d.default.paths},r.http.paths.map((function(e,a){return o.default.createElement("div",{key:"".concat(e.path,"-").concat(a),className:d.default.path},o.default.createElement(c.Columns,null,o.default.createElement(c.Column,null,o.default.createElement("span",null,t("PATH_VALUE",{value:e.path}))),o.default.createElement(c.Column,null,o.default.createElement("span",null,t("SERVICE_VALUE",{value:(0,l.default)(e,"backend.service.name")}))),o.default.createElement(c.Column,null,o.default.createElement("span",null,t("PORT_VALUE",{value:(0,l.default)(e,"backend.service.port.number")})))))}))),o.default.createElement("div",{className:"buttons"},o.default.createElement(c.Button,{type:"flat",icon:"trash",onClick:function(){return m(a)}}),o.default.createElement(c.Button,{type:"flat",icon:"pen",onClick:function(){return h(a)}})))};p.propTypes={rule:i.default.object};var m=p;a.default=m},function(e,t,a){e.exports={wrapper:"_284aGjeDc3Uk3LO7g2rowk",item:"my6nlJHVChE52IZiKWdVb",texts:"_1yy5gvLzkXqOotnVq-jQ6u",description:"_1tlfloLSiJeUMQ-FyCn8CE",clusters:"_1syXUJ7F5BYlpz5yEGJFbc",text:"rs7zBfbhTmwlfIFuDt9am",title:"_1gOz0zu0HbDowoy4JxPNfJ",add:"_2rqJgLlKvmtvwGzZG3jKXD",paths:"_3IlHyvAlhdaotlptF5rQ4w",path:"_3yf0E7_uPDFXwIFcT8Q_aV",error:"_2XVUGBf34mWkPMEhwt3zCO"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(84),r(86),r(18),r(192),r(16),r(10),r(4),r(316),r(23),r(17),r(85),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(6),r(84),r(86),r(18),r(192),r(42),r(16),r(10),r(4),r(316),r(22),r(23),r(57),r(17),r(85),r(7);var l=n(r(43));r(41);var u=n(r(44)),o=n(r(58)),i=n(r(36)),c=n(r(37)),s=n(r(88)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(26)),h=n(r(74)),v=n(r(894)),g=n(r(194)),y=n(r(63)),E=n(r(0)),b=n(r(1)),_=r(186),O=n(r(240)),S=n(r(787)),C=n(r(850)),D=r(52),k=n(r(435)),N=n(r(834)),T=n(r(2614)),R=n(r(2616)),w=n(r(2618)),I=n(r(2668)),M=n(r(2673)),P=n(r(2675));function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var j=function(e){(0,f.default)(n,e);var a,r=A(n);function n(e){var a;return(0,i.default)(this,n),(a=r.call(this,e)).handleOk=function(){var e,t=a.props.isFederated;if(e=a.state.isCodeMode&&(0,g.default)((0,m.default)((0,s.default)(a),"codeRef.current.getData"))?a.getFormDataFromCode(a.codeRef.current.getData()):a.state.formData,t){var r={},n=e,l=n.application,u=n.ingress,i=(0,o.default)(n,["application","ingress"]);r.Application=l,r.Ingress=u;var c=[];Object.keys(i).forEach((function(e){var t=i[e];t.Deployment&&(c=(0,m.default)(t.Deployment,"spec.overrides").map((function(e){return e.clusterName}))),r["".concat(e,"-workload")]=t.workload,r["".concat(e,"-service")]=t.service})),e=r,(0,v.default)(e,(function(e){var t=(0,m.default)(e,"spec.overrides",[]);!(0,y.default)(c)&&t.forEach((function(e,a){c.includes(e.clusterName)||t.splice(a,1)}));var a=(0,m.default)(e,"spec.placement.clusters",[]);return!(0,y.default)(c)&&a.forEach((function(e,t){c.includes(e.name)||a.splice(t,1)})),e}))}0===(0,m.default)(e,"Ingress.spec.template.spec.rules.length",0)&&delete e.Ingress,a.props.onOk(e)},a.handlePrev=function(){a.setState((function(e){var t=e.currentStep;return{currentStep:Math.max(0,t-1)}}))},a.handleNext=function(){var e=a.formRef.current;e&&e.validate((function(){a.setState((function(e){var t=e.currentStep;return{currentStep:Math.min(a.steps.length-1,t+1)}}))}))},a.handleModeChange=function(){a.setState((function(e){var r=e.isCodeMode,n=e.formData;return!r&&(0,g.default)((0,m.default)((0,s.default)(a),"resourcesFormRef.current.hasSubRoute"))&&a.resourcesFormRef.current.hasSubRoute()?O.default.warning(t("SAVE_FORM_TIP")):(r&&(0,g.default)((0,m.default)((0,s.default)(a),"codeRef.current.getData"))&&(n=a.getFormDataFromCode(a.codeRef.current.getData())),{isCodeMode:!r,formData:n})}))},a.handleAppLabelsChange=function(e){var t=a.state.formData,r=(t.application,t.ingress),n=(0,o.default)(t,["application","ingress"]);(0,D.mergeLabels)(r,e),Object.values(n).forEach((function(t){(0,D.mergeLabels)(t.service,e),(0,D.mergeLabels)(t.workload,e)}))},a.handleGovernanceChange=function(e){var t=a.props.isFederated,r=a.state.formData,n=(r.application,r.ingress,(0,o.default)(r,["application","ingress"]));a.setState({isGovernance:"true"===e}),Object.values(n).forEach((function(a){(0,h.default)(a.workload,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',e),(0,h.default)(a.service,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',e),(0,h.default)(a.workload,'spec.template.metadata.annotations["sidecar.istio.io/inject"]',e),t&&((0,D.updateFederatedAnnotations)(a.workload),(0,D.updateFederatedAnnotations)(a.service))}))},a.state={currentStep:0,formData:a.federatedWrapper({application:k.default.applications({namespace:e.namespace}),ingress:k.default.ingresses({namespace:e.namespace})}),isCodeMode:!1,isGovernance:!1},a.formRef=E.default.createRef(),a.codeRef=E.default.createRef(),a.gatewayStore=new N.default,a}return(0,c.default)(n,[{key:"componentDidMount",value:function(){var e=this;this.props.isFederated?((0,h.default)(this.state.formData.application,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',"false"),this.setState({isGovernance:!1})):this.fetchData().then((function(){var t=e.props.sampleApp;t&&e.fetchSampleData(t)}))}},{key:"federatedWrapper",value:function(e){var t=this.props,a=t.isFederated,r=t.projectDetail;if(a){Object.keys(e).forEach((function(t){e[t]=k.default.federated({data:e[t],clusters:r.clusters.map((function(e){return e.name})),kind:e[t].kind})}));var n=(0,m.default)(e.application,"spec.template.metadata.labels",{});(0,h.default)(e.application,"metadata.labels",n)}return e}},{key:"setServicemeshValue",value:function(e){var t=this.props.isFederated,a=this.state.isGovernance,r=e.application,n=(e.ingress,(0,o.default)(e,["application","ingress"])),l=String(a);(0,h.default)(r,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',l),Object.values(n).forEach((function(e){(0,h.default)(e.workload,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',l),(0,h.default)(e.service,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',l),(0,h.default)(e.workload,'spec.template.metadata.annotations["sidecar.istio.io/inject"]',l),t&&((0,D.updateFederatedAnnotations)(e.workload),(0,D.updateFederatedAnnotations)(e.service))}))}},{key:"fetchSampleData",value:function(e){var t=this,a=this.props,r=a.namespace,n=a.store,l=this.state.gateway;n.fetchSampleData(e).then((function(e){var a=t.getFormDataFromCode(e);(0,h.default)(a.ingress,'metadata.annotations["nginx.ingress.kubernetes.io/upstream-vhost"]',"productpage.".concat((0,D.withDot)(r),"svc.cluster.local")),(0,y.default)(l)?(0,h.default)(a.ingress,"spec.rules",[]):(0,h.default)(a.ingress,"spec.rules[0].host","productpage.".concat((0,D.withDot)(r)).concat((0,D.withDot)(l.ingressIp),"nip.io")),t.setServicemeshValue(a),t.setState({formData:a})}))}},{key:"getFormDataFromCode",value:function(e){var t=this.props.namespace,a={};return e.forEach((function(e){if((0,h.default)(e,"metadata.namespace",t),-1!==e.kind.indexOf("Application"))a.application=e;else if(-1!==e.kind.indexOf("Service")){var r=(0,m.default)(e,"metadata.labels.app");(0,h.default)(a,"".concat(r,".service"),e)}else if(-1!==e.kind.indexOf("Ingress"))a.ingress=e;else{var n=(0,m.default)(e,"metadata.labels.app");(0,h.default)(a,"".concat(n,".workload"),e)}})),a}},{key:"fetchData",value:(a=(0,u.default)(l.default.mark((function e(){var t,a,r,n,u,o,i=this;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,a=t.cluster,r=t.namespace,n=function(){return i.gatewayStore.getNewGatewayByProject({namespace:r,cluster:a})},e.next=4,n();case 4:u=e.sent,o=!!this.serviceMeshEnable,(0,h.default)(this.state.formData.application,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',String(o)),this.setState({gateway:(0,m.default)(u,"[0]"),isGovernance:o});case 8:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"renderHeader",value:function(){var e=this.props.onCancel,a=this.state,r=a.currentStep,n=a.isCodeMode;return E.default.createElement("div",{className:P.default.header},E.default.createElement("div",{className:P.default.title},E.default.createElement(_.Icon,{name:"close",size:20,clickable:!0,onClick:e}),E.default.createElement("span",null),E.default.createElement(_.Icon,{name:"appcenter",size:20}),E.default.createElement("span",null,t("CREATE_COMPOSED_APP"))),!n&&E.default.createElement("div",{className:P.default.steps},E.default.createElement("div",null),E.default.createElement(T.default,{steps:this.steps,current:r})),E.default.createElement(C.default,{className:P.default.switch,text:t("EDIT_YAML"),onChange:this.handleModeChange,checked:n}),E.default.createElement("div",{className:P.default.headerBottom}))}},{key:"renderForm",value:function(){var e=this.props,t=e.cluster,a=e.namespace,r=e.store,n=e.isFederated,l=e.projectDetail,u=this.state,o=u.formData,i=u.gateway,c=u.currentStep,s=u.isGovernance,f=this.steps[c],d=f.component,p={store:r,cluster:t,namespace:a,formData:o,gateway:i,isGovernance:s,isFederated:n,projectDetail:l,serviceMeshEnable:this.serviceMeshEnable,onLabelsChange:this.handleAppLabelsChange,onGovernanceChange:this.handleGovernanceChange};return f.isForm?p.formRef=this.formRef:p.ref=this.formRef,E.default.createElement("div",{className:P.default.wrapper},E.default.createElement("div",{className:P.default.form},E.default.createElement(d,p)))}},{key:"renderCode",value:function(){var e=this.state.formData;return E.default.createElement(M.default,{ref:this.codeRef,formTemplate:e})}},{key:"renderFooter",value:function(){var e=this.props,a=e.onCancel,r=e.store,n=this.state,l=n.currentStep;if(n.isCodeMode)return E.default.createElement("div",{className:P.default.footer},E.default.createElement("div",{className:P.default.wrapper},E.default.createElement("div",{className:"text-right"},E.default.createElement(_.Button,{onClick:a},t("CANCEL")),E.default.createElement(_.Button,{type:"control",onClick:this.handleOk,loading:r.isSubmitting},t("CREATE")))));var u=this.steps.length-1;return E.default.createElement("div",{className:P.default.footer},E.default.createElement("div",{className:P.default.wrapper},E.default.createElement("div",{className:"text-right"},E.default.createElement(_.Button,{onClick:a},t("CANCEL")),l>0&&E.default.createElement(_.Button,{type:"control",onClick:this.handlePrev},t("PREVIOUS")),l0)return r({message:o.join("; "),field:e.field});r()},n.state={formTemplate:n.props.formTemplate},n}return(0,o.default)(r,[{key:"render",value:function(){var e,a,r,n,l=this,u=this.props,o=u.formRef,i=u.formTemplate,c=u.isEdit,s=u.className;c||(0,m.default)(i,"metadata.labels['infra.edgewize.io/hosted']",null!==(e=null===(a=this.options[0])||void 0===a?void 0:a.value)&&void 0!==e?e:null===(r=this.options[0])||void 0===r||null===(n=r.options[0])||void 0===n?void 0:n.value);return f.default.createElement(v.Form,{ref:o,data:i,className:(0,d.default)(y.default.wrapper,s),onChange:function(e,t){"metadata.name"===e&&l.setState((function(e){var a=e.formTemplate;return a.spec.name=t,a.spec.namespace=t,{formTemplate:a}}))}},f.default.createElement(v.Form.Item,{label:t("CLUSTER_NAME"),desc:t("NAME_DESC"),rules:[{required:!0,message:t("CLUSTER_NAME_EMPTY")},{pattern:g.PATTERN_NAME,message:t("INVALID_NAME_DESC")},{validator:this.nameValidator}]},f.default.createElement(v.Input,{name:"metadata.name",maxLength:63,disabled:c})),f.default.createElement(v.Form.Item,{label:t("ALIAS"),desc:t("ALIAS_DESC")},f.default.createElement(v.Input,{name:["metadata","annotations","kubesphere.io/alias-name"],maxLength:63})),c&&f.default.createElement(f.default.Fragment,null,f.default.createElement(v.Form.Item,{label:t("HOSTED_IN"),desc:t("HOSTED_IN_DESC"),rules:[{required:!0,message:t("HOSTED_IN_EMPTY")}]},f.default.createElement(v.Select,{searchable:!0,placeholder:" ",name:["metadata","labels","infra.edgewize.io/hosted"],options:this.options,disabled:!0})),f.default.createElement(v.Form.Item,{label:t("ADVERTISE_ADDRESS"),desc:t("ADVERTISE_ADDRESS_DESC"),rules:[{required:!0,message:t("HOSTED_IN_EMPTY")},{pattern:g.PATTERN_IP,message:t("INVALID_IP_DESC")}]},f.default.createElement(v.Input,{name:["metadata","labels","infra.edgewize.io/advertise-address"],disabled:!0}))),f.default.createElement(v.Form.Item,{label:t("DESCRIPTION"),desc:t("DESCRIPTION_DESC")},f.default.createElement(v.TextArea,{name:["metadata","annotations","kubesphere.io/description"],maxLength:256})))}},{key:"options",get:function(){var e=this.props.hostedInOptions,t=void 0===e?[]:e,a=(0,p.default)(this.state.formTemplate,"metadata.name");return!globals.app.isMultiCluster&&a?[{label:a,value:a}]:t}}]),r}(f.default.Component))||l;a.default=b},,function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1110)).default);t.default=c},,,,,,,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(320),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(320),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(61)),u=r(a(30)),o=r(a(58));a(41);var i,c=r(a(44)),s=r(a(36)),f=r(a(37)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=a(14),g=r(a(26));function y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function E(e){for(var t=1;t0&&void 0!==h[0]?h[0]:{},a=t.cluster,r=t.workspace,u=t.namespace,i=t.more,c=t.devops,s=t.searchByApp,f=(0,o.default)(t,["cluster","workspace","namespace","more","devops","searchByApp"]),this.list.isLoading=!0,e.next=4,request.get(this.getResourceUrl({cluster:a,workspace:r,namespace:u,devops:c}),this.getFilterParams(E({searchByApp:s},f)));case 4:return d=e.sent,p=((0,g.default)(d,"items")||[]).map((function(e){return E({cluster:a,namespace:u},m.mapper(e))})).sort((function(e,t){return new Date(t.createTime).getTime()-new Date(e.createTime).getTime()})),this.list.update(E(E({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(p)):p},f),{},{isLoading:!1})),e.abrupt("return",p);case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(r(a(1053)).default),(0,h.default)(i.prototype,"fetchList",[v.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),i);t.default=_},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(84),a(18),a(4),a(23),a(17),a(85),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(11),a(84),a(18),a(42),a(4),a(23),a(57),a(17),a(85);var n=r(a(30)),l=r(a(61)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=r(a(1)),p=r(a(3)),m=a(186),h=r(a(2918));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=function(e){(0,i.default)(a,e);var t=v(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,n=new Array(r),o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return request.post("".concat(this.apiVersion).concat(this.getPath(t),"/").concat(this.module),e)}},{key:"apiVersion",get:function(){return"kapis/notification.kubesphere.io/v2beta2"}}]),a}(r(a(1012)).default),(0,s.default)(n.prototype,"checkInfo",[f.action],Object.getOwnPropertyDescriptor(n.prototype,"checkInfo"),n.prototype),n);t.default=p},function(e,t,a){e.exports={title:"Bq_DxvwoIbzNgUSGKKu74",urlInput:"_2iZy25kg8Y2xv_sPplOguB",row:"hJoducYzaKZSPuoAyXEF2",item:"_3Ut4KGvHM3y-EKah95yER_",wrapper:"_1y_QA9-eVFRkSPgVLTD4wj",listWrapper:"_2nnbmvgr5xxxdGUFDz24co",listItem:"_3QzQe3Rj1Hb6gV7rN2TR6t",annotation:"_1T2F7a_9lb3gfvILxQLV-b",desc:"_1oKV-aygbwGohZMHFzZVge"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(84),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(84),r(42),r(4),r(23),r(57),r(17),r(85);var u=l(r(315)),o=l(r(58)),i=l(r(36)),c=l(r(37)),s=l(r(55)),f=l(r(56)),d=l(r(51)),p=n(r(0)),m=l(r(26)),h=r(186),v=l(r(240)),g=l(r(1061)),y=l(r(3128)),E=l(r(1379)),b=l(r(1378));function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var O=h.Tabs.TabPanel,S=function(e){(0,s.default)(r,e);var a=_(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;un-1)v.default.error({content:t.html("MAX_CID_COUNT",{count:n}),durantion:1e3});else{if(!r.includes(a))return!0;v.default.error({content:t("CHAT_ID_EXISTS"),duration:1e3})}else v.default.error({content:t("ENTER_CHAT_ID_DESC"),durantion:1e3})},e.validateKeywords=function(a){var r=(0,m.default)(e.props.data,"receiver.spec.dingtalk.chatbot.keywords",[]),n=globals.config.notification.dingtalk.max_number_of_keyword;if(a)if(r.length>n-1)v.default.error({content:t.html("MAX_KEYWORD_COUNT",{count:n}),durantion:1e3});else{if(!r.includes(a))return!0;v.default.error({content:t("KEYWORD_EXISTS"),duration:1e3})}else v.default.error({content:t("ENTER_KEYWORD_DESC"),durantion:1e3})},e}return(0,c.default)(r,[{key:"renderLabel",value:function(){return p.default.createElement("div",{className:b.default.labelWrapper},p.default.createElement("span",null,"Chat ID"),this.props.user&&p.default.createElement(h.Tooltip,{content:t("CHAT_ID_TIP")},p.default.createElement(h.Icon,{className:b.default.tip,name:"question"})))}},{key:"renderServiceSetting",value:function(){return p.default.createElement("div",{className:b.default.row},p.default.createElement("div",{className:b.default.title},t("APP_SETTINGS")),p.default.createElement("div",{className:b.default.item},p.default.createElement(h.Form.Item,{label:"App Key"},p.default.createElement(h.Input,{name:"secret.data.appkey"})),p.default.createElement(h.Form.Item,{label:"App Secret"},p.default.createElement(h.Input,{name:"secret.data.appsecret"}))))}},{key:"renderReceiverSetting",value:function(){var e=this.props.wrapperClassName;return p.default.createElement("div",{className:b.default.row},p.default.createElement("div",{className:b.default.title},p.default.createElement("span",null,t("RECIPIENT_SETTINGS"))),p.default.createElement("div",{className:b.default.item},p.default.createElement(h.Form.Item,{label:this.renderLabel()},p.default.createElement(y.default,{className:e,name:"receiver.spec.dingtalk.conversation.chatids",title:"Chat ID",placeholder:" ",validate:this.validateCid}))))}},{key:"renderChatSetting",value:function(){var e=this.props.wrapperClassName;return p.default.createElement("div",{className:b.default.row},p.default.createElement("div",{className:b.default.title},p.default.createElement("span",null,t("CHATBOT_SETTINGS"))),p.default.createElement("div",{className:b.default.item},p.default.createElement(h.Form.Item,{label:"Webhook URL"},p.default.createElement(h.Input,{name:"secret.data.webhook"})),p.default.createElement(h.Form.Item,{label:"Secret"},p.default.createElement(h.Input,{name:"secret.data.chatbotsecret"})),p.default.createElement(h.Form.Item,null,p.default.createElement(E.default,{className:e,name:"receiver.spec.dingtalk.chatbot.keywords",validate:this.validateKeywords}))))}},{key:"render",value:function(){var e=this.props,a=e.user,r=e.data,n=e.onChange,l=e.hideFooter,i=(0,o.default)(e,["user","data","onChange","hideFooter"]);return p.default.createElement(g.default,(0,u.default)({name:"dingtalk",module:"DingTalk",icon:"dingtalk",data:r,onChange:n,hideFooter:l,user:a},i),p.default.createElement(h.Tabs,{type:"button"},p.default.createElement(O,{label:t("CHAT_SETTINGS"),name:"conversation"},p.default.createElement(p.default.Fragment,null,!a&&this.renderServiceSetting(),this.renderReceiverSetting())),p.default.createElement(O,{label:t("CHATBOT_SETTINGS"),name:"chatbot"},this.renderChatSetting())))}}]),r}(p.Component);a.default=S},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(187),r(84),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(187),r(84),r(42),r(4),r(23),r(57),r(17),r(85);var u=l(r(315)),o=l(r(58)),i=l(r(36)),c=l(r(37)),s=l(r(55)),f=l(r(56)),d=l(r(51)),p=n(r(0)),m=l(r(26)),h=l(r(63)),v=r(186),g=l(r(240)),y=l(r(1314)),E=l(r(1061)),b=l(r(3130)),_=l(r(1717));function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var S=v.Tabs.TabPanel,C=function(e){(0,s.default)(r,e);var a=O(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;ul-1)g.default.error({content:t.html("MAX_".concat(r.toUpperCase(),"_COUNT"),{count:l}),duration:1e3});else{if(!n.includes(a))return!0;g.default.error({content:t("".concat(r.toUpperCase(),"_EXISTS")),duration:1e3})}else g.default.error({content:t("ENTER_".concat(r.toUpperCase(),"_TIP")),duration:1e3})},e.receiverValidator=function(a,r,n){if(["toParty","toUser","toTag"].every((function(t){return(0,h.default)((0,m.default)(e.props.data,"receiver.spec.wechat.".concat(t)))})))return n({message:t("RECIPIENT_SETTINGS_TIP")});n()},e.handleTypeChange=function(t){e.setState({type:t})},e.handleChatTypeChange=function(t){e.setState({chatbotType:t})},e}return(0,c.default)(r,[{key:"renderServiceSetting",value:function(){return p.default.createElement("div",{className:_.default.row},p.default.createElement("div",{className:_.default.title},t("SERVER_SETTINGS")),p.default.createElement("div",{className:_.default.item},p.default.createElement(v.Form.Item,{label:"Corp ID",rules:[{required:!0,message:t("ENTER_WECOM_CORP_ID_DESC")}]},p.default.createElement(v.Input,{name:"config.spec.wechat.wechatApiCorpId"})),p.default.createElement(v.Form.Item,{label:"Agent ID",rules:[{required:!0,message:t("ENTER_WECOM_AGENT_ID_DESC")}]},p.default.createElement(v.Input,{name:"config.spec.wechat.wechatApiAgentId"})),p.default.createElement(v.Form.Item,{label:"Secret",rules:[{required:!0,message:t("ENTER_WECOM_SECRET_DESC")}]},p.default.createElement(v.Input,{name:"secret.data.appsecret"}))))}},{key:"renderReceiverSetting",value:function(){var e=this.state.type,a=this.props.wrapperClassName;return p.default.createElement("div",{className:_.default.row},p.default.createElement("div",{className:_.default.title},t("RECIPIENT_SETTINGS")),p.default.createElement("div",{className:_.default.subTitle},t("RECIPIENT_SETTINGS_TIP")),p.default.createElement("div",{className:_.default.item},p.default.createElement("div",{className:"margin-b12"},p.default.createElement(y.default,{value:e,onChange:this.handleTypeChange,options:this.tabs})),p.default.createElement(v.Form.Item,{rules:[{validator:this.receiverValidator}]},p.default.createElement(b.default,{name:"receiver.spec.wechat.".concat(e),className:a,validate:this.validate,type:e}))))}},{key:"renderChatbotSetting",value:function(){return p.default.createElement("div",{className:_.default.row},p.default.createElement("div",{className:_.default.title},p.default.createElement("span",null,t("CHATBOT_SETTINGS"))),p.default.createElement("div",{className:_.default.item},p.default.createElement(v.Form.Item,{label:"Webhook URL"},p.default.createElement(v.Input,{name:"secret.data.webhook"}))))}},{key:"renderChatbotReceiverSetting",value:function(){var e=this.state.chatbotType,a=this.props.wrapperClassName;return p.default.createElement("div",{className:_.default.row},p.default.createElement("div",{className:_.default.title},t("RECIPIENT_SETTINGS")),p.default.createElement("div",{className:_.default.item},p.default.createElement("div",{className:"margin-b12"},p.default.createElement(y.default,{value:e,onChange:this.handleChatTypeChange,options:this.chatbotTabs})),p.default.createElement(v.Form.Item,null,p.default.createElement(b.default,{name:"receiver.spec.wechat.chatbot.".concat(e),className:a,validate:this.validate,type:e}))))}},{key:"render",value:function(){var e=this.props,a=e.user,r=e.data,n=e.onChange,l=e.hideFooter,i=(0,o.default)(e,["user","data","onChange","hideFooter"]);return p.default.createElement(E.default,(0,u.default)({name:"wechat",module:"WeCom",icon:"wecom",data:r,onChange:n,hideFooter:l,user:a},i),p.default.createElement(v.Tabs,{type:"button"},p.default.createElement(S,{label:t("CHAT_SETTINGS"),name:"conversation"},!a&&this.renderServiceSetting(),this.renderReceiverSetting()),p.default.createElement(S,{label:t("CHATBOT_SETTINGS"),name:"chatbot"},this.renderChatbotSetting(),this.renderChatbotReceiverSetting())))}},{key:"tabs",get:function(){return[{label:"User ID",value:"toUser"},{label:"Department ID",value:"toParty"},{label:"Tag ID",value:"toTag"}]}},{key:"chatbotTabs",get:function(){return[{label:"User ID",value:"atUsers"},{label:t("WHIZARD_NOTIFICATION.PHONE_NUMBER"),value:"atMobiles"}]}}]),r}(p.Component);a.default=C},function(e,t,a){e.exports={title:"IKj2QMOz04C12iP1VFDNL",subTitle:"_3K5t_PpqMH_7kKHPzcLCco",row:"ChmNt1kcK1XD-oKuGaup5",wrapper:"Z0KFimX54l9rVcMJUe3wp",item:"_1s7eK7cotVqGxPePQ3rUw7",boxWrapper:"_3AstjCLI3Fv8pmh3KAOBP8",empty:"_1W7NXKcHzz0De9UuYrjWm",tag:"_1Sx0_dd2bUpcOt6bBuHbQH"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(97),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(97),r(42),r(4),r(23),r(57),r(17);var u=l(r(315)),o=l(r(58)),i=l(r(36)),c=l(r(37)),s=l(r(55)),f=l(r(56)),d=l(r(51)),p=n(r(0)),m=l(r(26)),h=r(186),v=l(r(240)),g=l(r(1061)),y=l(r(1379)),E=l(r(3132));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var _=function(e){(0,s.default)(r,e);var a=b(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;ul-1)v.default.error({content:t.html("MAX_CHANNEL_COUNT",{count:l}),durantion:1e3});else{if(!n.some((function(e){return e===a})))return!0;v.default.error({content:t("CHANNEL_EXISTS"),duration:1e3})}else v.default.error({content:t("ADD_CHANNEL_TIP"),duration:1e3})},e}return(0,c.default)(r,[{key:"renderServiceSetting",value:function(){return p.default.createElement("div",{className:E.default.row},p.default.createElement("div",{className:E.default.title},t("SERVER_SETTINGS")),p.default.createElement("div",{className:E.default.item},p.default.createElement(h.Form.Item,{label:t("SLACK_TOKEN"),rules:[{required:!0,message:t("SLACK_TOKEN_DESC")}]},p.default.createElement(h.Input,{name:"secret.data.token"}))))}},{key:"renderReceiverSetting",value:function(){var e=this.props.wrapperClassName;return p.default.createElement("div",{className:E.default.row},p.default.createElement("div",{className:E.default.title},t("CHANNEL_SETTINGS")),p.default.createElement("div",{className:E.default.item},p.default.createElement(h.Form.Item,{rules:[{required:!0,message:t("ADD_CHANNEL_TIP")}]},p.default.createElement(y.default,{className:e,name:"receiver.spec.slack.channels",validate:this.validateChannel,title:t("SLACK_CHANNEL"),listTitle:t("ADDED_CHANNELS"),emptyDesc:t("EMPTY_CHANNEL_DESC")}))))}},{key:"render",value:function(){var e=this.props,t=e.user,a=e.data,r=e.onChange,n=e.hideFooter,l=(0,o.default)(e,["user","data","onChange","hideFooter"]);return p.default.createElement(g.default,(0,u.default)({name:"slack",module:"slack",icon:"slack",data:a,onChange:r,hideFooter:n,user:t},l),!t&&this.renderServiceSetting(),this.renderReceiverSetting())}}]),r}(p.Component);a.default=_},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var u=l(r(315)),o=l(r(58)),i=l(r(36)),c=l(r(37)),s=l(r(55)),f=l(r(56)),d=l(r(51)),p=n(r(0)),m=l(r(26)),h=r(186),v=l(r(1122)),g=l(r(1061)),y=l(r(3134));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var b=function(e){(0,s.default)(r,e);var a=E(r);function r(){var e;(0,i.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;ln-1)v.default.error({content:t.html("MAX_KEYWORD_COUNT",{count:n}),durantion:1e3});else{if(!r.includes(a))return!0;v.default.error({content:t("KEYWORD_EXISTS"),duration:1e3})}else v.default.error({content:t("ENTER_KEYWORD_DESC"),durantion:1e3})},e}return(0,c.default)(r,[{key:"renderServiceSetting",value:function(){return p.default.createElement("div",{className:E.default.row},p.default.createElement("div",{className:E.default.title},t("CHAT_SETTINGS")),p.default.createElement("div",{className:E.default.item},p.default.createElement(h.Form.Item,{label:"App Key"},p.default.createElement(h.Input,{name:"secret.data.appkey"})),p.default.createElement(h.Form.Item,{label:"App Secret"},p.default.createElement(h.Input,{name:"secret.data.appsecret"}))))}},{key:"renderReceiverSetting",value:function(){var e=this.props.wrapperClassName;return p.default.createElement("div",{className:E.default.row},p.default.createElement("div",{className:E.default.title},p.default.createElement("span",null,t("RECIPIENT_SETTINGS")),p.default.createElement("p",{className:E.default.subtitle},t("FEISHU_RECEIPIENT_SETTINGS_DESC"))),p.default.createElement("div",{className:E.default.item},p.default.createElement(h.Tabs,{type:"button"},p.default.createElement(_,{label:t("USER_ID"),name:"conversation"},p.default.createElement(h.Form.Item,null,p.default.createElement(y.default,{className:e,title:t(""),listTitle:t("TOUSER_LIST"),emptyDesc:t("EMPTY_TOUSER_DESC"),placeholder:" ",name:"receiver.spec.feishu.user",validate:this.validateKeywords}))),p.default.createElement(_,{label:t("DEPARTMENT_ID"),name:"chatbot"},p.default.createElement(h.Form.Item,null,p.default.createElement(y.default,{className:e,title:t(""),listTitle:t("TOPARTY_LIST"),emptyDesc:t("EMPTY_TOPARTY_DESC"),placeholder:" ",name:"receiver.spec.feishu.department",validate:this.validateKeywords}))))))}},{key:"renderChatSetting",value:function(){var e=this.props.wrapperClassName;return p.default.createElement("div",{className:E.default.row},p.default.createElement("div",{className:E.default.title},p.default.createElement("span",null,t("CHATBOT_SETTINGS"))),p.default.createElement("div",{className:E.default.item},p.default.createElement(h.Form.Item,{label:"Webhook URL"},p.default.createElement(h.Input,{name:"secret.data.webhook"})),p.default.createElement(h.Form.Item,{label:t("FEISHU_SECRET")},p.default.createElement(h.Input,{name:"secret.data.chatbotsecret"})),p.default.createElement(h.Form.Item,null,p.default.createElement(y.default,{className:e,name:"receiver.spec.feishu.chatbot.keywords",validate:this.validateKeywords}))))}},{key:"render",value:function(){var e=this.props,a=e.user,r=e.data,n=e.onChange,l=e.hideFooter,i=(0,o.default)(e,["user","data","onChange","hideFooter"]);return p.default.createElement(g.default,(0,u.default)({name:"feishu",module:"Feishu",icon:"feishu",data:r,onChange:n,hideFooter:l,user:a},i),p.default.createElement(h.Tabs,{type:"button"},p.default.createElement(_,{label:t("CHAT_SETTINGS"),name:"conversation"},!a&&this.renderServiceSetting(),p.default.createElement(p.default.Fragment,null,this.renderReceiverSetting())),p.default.createElement(_,{label:t("CHATBOT_SETTINGS"),name:"chatbot"},this.renderChatSetting())))}}]),r}(p.Component);a.default=O},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(10),r(4),r(23),r(24),r(17),r(64),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(191),r(42),r(159),r(10),r(4),r(23),r(57),r(24),r(17),r(64);var l=n(r(315)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=r(186),m=r(909),h=n(r(1268)),v=n(r(841)),g=n(r(3143));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var E=function(e){(0,i.default)(r,e);var a=y(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{};n.setState({checkStatus:e.status,resultInfo:e})},n.changeIcon=function(e){n.setState({icon:e})},n.onCancel=function(){n.props.onCancel(),n.reset()},n.createApp=(0,s.default)(c.default.mark((function e(){var t,a,r,l,u,o,i,s,f;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=n.props,a=t.type,r=t.onOk,(l=n.state.canCreate)?(u=n.state,o=u.icon,i=u.resultInfo,s=o||i.icon,f={version_type:"helm",name:i.name,base64Str:i.base64Str,icon:s},n.fileStore.uploadPackage(a,f,r).then((function(){n.reset()}))):n.setState({canCreate:!l});case 3:case"end":return e.stop()}}),e)}))),n.handleSubmit=function(){var e=n.props,a=e.appId,r=e.workspace,l=e.type,u=e.onOk,o=n.state.resultInfo;if("success"!==n.state.checkStatus)return b.default.error({content:"".concat(t("UPLOAD_PACKAGE_OK_NOTE"))}),!1;if("CREATE_APP"===l)n.createApp();else{var i={type:"helm",app_id:a,workspace:r,base64Str:o.base64Str};n.fileStore.uploadPackage(l,i,u).then((function(){n.setState({checkStatus:"init"})}))}},n.fileStore=new C.default,n.state={checkStatus:"init",canCreate:!1,resultInfo:{},icon:""},n}return(0,d.default)(r,[{key:"renderCheckFiles",value:function(){var e=this.props.errorFiles;return v.default.createElement("div",null,v.default.createElement("div",{className:k.default.checkFiles},v.default.createElement("ul",null,D.default.map((function(a){return v.default.createElement("li",{key:a.name,className:(0,y.default)((0,i.default)({},k.default.error,e.includes(a.name)))},v.default.createElement("span",{className:k.default.name},a.name),v.default.createElement("div",{className:k.default.description},"#  ",a.isOptional&&v.default.createElement("span",null,"[",t("OPTIONAL"),"]  "),t(a.description)))}))),"success"!==this.state.checkStatus&&v.default.createElement("div",{className:k.default.configMask})))}},{key:"render",value:function(){var e=this.props,t=e.appId,a=(0,o.default)(e,["appId"]),r=this.state,n=r.canCreate,l=r.resultInfo;return v.default.createElement(_.default,(0,u.default)({width:960,bodyClassName:k.default.body},a,{onOk:this.handleSubmit,onCancel:this.onCancel,disableSubmit:!l.name}),v.default.createElement("div",{className:k.default.content},v.default.createElement("div",{className:k.default.helmIcon},v.default.createElement(E.Icon,{name:"helm",size:60})),v.default.createElement(O.default,{className:(0,y.default)(k.default.upload,(0,i.default)({},k.default.canCreate,n)),canCreate:n,changeCheckStatus:this.changeCheckStatus,fileStore:this.fileStore,appId:t}),n?v.default.createElement(S.default,{createInfo:l,uploadIcon:this.changeIcon,fileStore:this.fileStore}):this.renderCheckFiles()))}}]),r}(v.Component);a.default=T,T.propTypes={detail:g.default.object,visible:g.default.bool,isSubmitting:g.default.bool,errorFiles:g.default.array,appId:g.default.string,type:g.default.string,onOk:g.default.func,onCancel:g.default.func},T.defaultProps={visible:!1,isSubmitting:!1,errorFiles:[],type:"CREATE_APP",appId:"",onOk:function(){},onCancel:function(){}}},,function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(42),r(16),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=r(186),p=n(r(787)),m=n(r(3198));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(r,e);var a=h(r);function r(){var e;(0,l.default)(this,r);for(var t=arguments.length,n=new Array(t),u=0;u0&&void 0!==E[0]?E[0]:{},a=t.cluster,t.workspace,r=t.namespace,u=t.more,i=t.id,c=(0,o.default)(t,["cluster","workspace","namespace","more","id"]),this.list.isLoading=!0,c.sortBy||void 0!==c.ascending||(c.sortBy="createTime"),c.limit!==1/0&&-1!==c.limit||(c.limit=-1,c.page=1),s=this.getFilterParams(c),f=s.labelSelector,d=(0,o.default)(s,["labelSelector"]),p=f,f?p+=",app_instance=".concat(i):p="app_instance=".concat(i),c.limit=c.limit||10,e.next=10,request.get(this.getResourceUrl({cluster:a,namespace:r}),C(C({},d),{},{labelSelector:p}));case 10:return m=e.sent,h=((0,v.default)(m,"items")||[]).map((function(e){return C({cluster:a,namespace:r},y.mapper(e))})),g=m.totalItems||m.items.length,this.list.update(C(C({data:u?[].concat((0,l.default)(this.list.data),(0,l.default)(h)):h,total:g},c),{},{limit:Number(c.limit)||10,page:Number(c.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",h);case 15:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"create",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,y.default)(e,"metadata.name","".concat(t.cluster_id,"-").concat(e.metadata.name)),this.submitting(request.post(this.getListUrl(C(C({},t),{},{k8sOpt:!0})),e))}},{key:"createDefaultAlert",value:function(e,t){var a=t.name,r=t.namespace,n=t.cluster,l={};function u(e){return e=e.replaceAll("namespaceName",r).replaceAll("clusterId",a),JSON.parse(e)}switch(e){case O.RadonDBAppId.RedisCluster:case O.RadonDBAppId.RedisSentinel:l=u(JSON.stringify(_.redisAlertYaml));break;case O.RadonDBAppId.OpenSearch:l=u(JSON.stringify(_.openSearchAlertYaml));break;case O.RadonDBAppId.Kafka:l=u(JSON.stringify(_.kafkaAlertYaml));break;case O.RadonDBAppId.PostgreSQL:l=u(JSON.stringify(_.pgAlertYaml));break;case O.RadonDBAppId.MySQL:l=u(JSON.stringify(_.MySQLAlertYaml));break;default:l={}}if(!(0,g.default)(l))return this.submitting(request.post(this.getListUrl({cluster:n,namespace:r,name:a,k8sOpt:!0}),l))}}]),r}(b.default),(0,h.default)(i.prototype,"fetchList",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,h.default)(i.prototype,"create",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"create"),i.prototype),(0,h.default)(i.prototype,"createDefaultAlert",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"createDefaultAlert"),i.prototype),i);t.default=k},function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(11),r(18),r(16),r(4),r(23),r(24),r(17),r(136),r(818),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(160),r(18),r(42),r(16),r(4),r(23),r(57),r(17),r(818);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(3)),p=n(r(243)),m=n(r(26)),h=r(52),v=n(r(1001)),g=n(r(3234)),y=n(r(3236));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var b=function(e){(0,o.default)(r,e);var a=E(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"filterImages",value:function(e){return"string"==typeof e?e.split(",").map((function(e){return e.trim()})).filter(Boolean):Array.isArray(e)?e:[]}},{key:"renderVersionTable",value:function(){var e=this.props.versions,a=(0,m.default)(globals.user,"lang")||(0,h.getBrowserLang)();return s.default.createElement("table",{className:y.default.versions},s.default.createElement("thead",null,s.default.createElement("tr",null,s.default.createElement("th",null,t("VERSION_NUMBER")),s.default.createElement("th",null,t("UPDATE_LOG")))),s.default.createElement("tbody",null,e.map((function(e){var t=e.name,r=e.description,n=void 0===r?"-":r,l=e.status_time,u=e.version_id;return s.default.createElement("tr",{key:u},s.default.createElement("td",null,s.default.createElement("p",{className:y.default.name},t),s.default.createElement("p",{className:y.default.date},(0,p.default)(l).format("YYYY-MM-DD"))),s.default.createElement("td",null,s.default.createElement("pre",{className:y.default.desc},(0,m.default)(e,"description_".concat(a),n))))}))))}},{key:"renderAppDeployAgreement",value:function(){var e=this.props,a=e.isCheck,r=e.onChange,n=t.html("APP_DEPLOY_AGREEMENT_2");return s.default.createElement("div",{className:y.default.agree},s.default.createElement("p",null,t("APP_DEPLOY_AGREEMENT_1")),s.default.createElement("p",null,(0,h.htmlLinkControl)(n)),s.default.createElement("div",{className:"margin-t12"},s.default.createElement(Checkbox,{checked:a,onChange:r},t("APP_DEPLOY_AGREEMENT_CHEKC"))))}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.app,n=r.abstraction,l=r.screenshots;return s.default.createElement("div",{className:(0,d.default)(y.default.appInfo,a)},s.default.createElement("div",null,s.default.createElement("h3",{className:y.default.title},t("APP_INTRODUCTION")),s.default.createElement(v.default,{source:n||t("NONE")})),s.default.createElement("div",null,s.default.createElement("h3",{className:y.default.title},t("APP_SCREENSHOTS")),s.default.createElement(g.default,{images:this.filterImages(l)})),s.default.createElement("div",null,s.default.createElement("h3",{className:y.default.title},t("APP_VERSIONS_TITLE")),this.renderVersionTable()))}}]),r}(s.default.PureComponent);a.default=b,b.propTypes={className:f.default.string,app:f.default.object.isRequired,versions:f.default.array},b.defaultProps={app:{},versions:[]}},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(11),r(6),r(84),r(18),r(320),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(85),r(136),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(6),r(84),r(160),r(18),r(28),r(320),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(85),r(7);var l=n(r(30)),u=n(r(58)),o=n(r(43));r(41);var i,c,s,f=n(r(44)),d=n(r(36)),p=n(r(37)),m=n(r(55)),h=n(r(56)),v=n(r(51)),g=n(r(0)),y=n(r(1)),E=r(186),b=r(239),_=n(r(787)),O=n(r(195)),S=n(r(26)),C=n(r(63)),D=n(r(960)),k=n(r(3258));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){for(var t=1;tt.value?1:0}))}}]),r}(g.default.Component),c.propTypes={name:y.default.string,branches:y.default.array},c.defaultProps={branches:[],visible:!1,name:"",onOk:function(){},onCancel:function(){}},i=s))||i;a.default=w},,,,function(e,t,a){e.exports={pipeline_column:"nWZ33DmaBbhEDSesc0DiU",content:"_1-oRV7NPr1NxWnH05jzHGL",clickable:"_3YhfWUE0e_VnI4wVC083Mj"}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(28),a(42),a(4),a(23),a(57),a(17);var n=r(a(61)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=r(a(60)),d=r(a(63)),p=r(a(3272));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var h=function(e){(0,o.default)(a,e);var t=m(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,u=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/groups")},e.getDetailUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getResourceUrl(t),"/").concat(t.name)},e.getWatchListUrl=function(t){var a=t.workspace,r=(0,f.default)(t,["workspace"]);return"apis/iam.kubesphere.io/v1beta1/watch".concat(e.getPath(r),"/groups?labelSelector=kubesphere.io/workspace=").concat(a)},e}return(0,m.default)(y,[{key:"getPath",value:function(e){var t=e.cluster,a=e.workspace,r=e.namespace,n=e.devops,l="";return t&&(l+="/klusters/".concat(t)),r?"".concat(l,"/namespaces/").concat(r):n?"".concat(l,"/namespaces/").concat(n):a?"".concat(l,"/workspaces/").concat(a):l}},{key:"fetchGroup",value:(o=(0,s.default)(l.default.mark((function e(){var t,a,r,n,u,o,i=this,c=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=c.length>0&&void 0!==c[0]?c[0]:{},r=a.workspace,n=(0,f.default)(a,["workspace"]),this.isLoading=!0,n.sortBy="createTime",n.limit=-1,e.next=6,request.get(this.getResourceUrl(N({workspace:r},n)));case 6:u=e.sent,o=null===(t=(0,_.default)(u,"items",[]))||void 0===t?void 0:t.map((function(e){return N({},i.mapper(e))})),this.total=(0,_.default)(u,"totalItems"),this.treeData=[{key:"root",title:r,group_id:"root",group_name:r,path:[r],children:(0,C.formatTreeData)(o,r)}],this.rowTreeData=(0,C.flattenTreeData)(this.treeData),this.isLoading=!1,this.list.update(N(N({data:o,total:u.totalItems||0},n),{},{limit:Number(n.limit)||10,page:Number(n.page)||1,isLoading:!1}));case 13:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"create",value:function(e,t){var a=(0,_.default)(e,'metadata.annotations["kubesphere.io/project-roles"]',[]),r=(0,_.default)(e,'metadata.annotations["kubesphere.io/devops-roles"]',[]);return(0,O.default)(e,'metadata.annotations["kubesphere.io/project-roles"]',JSON.stringify(a)),(0,O.default)(e,'metadata.annotations["kubesphere.io/devops-roles"]',JSON.stringify(r)),this.submitting(request.post(this.getResourceUrl(t),e))}},{key:"createGroup",value:(u=(0,s.default)(l.default.mark((function e(t,a){var r,u,o,i,c,s,d,p=this;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.create((0,S.default)(t),a);case 2:return r=e.sent,u=(0,_.default)(r,"metadata.name"),o=(0,_.default)(t,'metadata.annotations["kubesphere.io/workspace-role"]'),i=(0,_.default)(t,'metadata.annotations["kubesphere.io/project-roles"]',[]),c=(0,_.default)(t,'metadata.annotations["kubesphere.io/devops-roles"]',[]),s=[this.addWorkspaceRoleBinding([{username:u,roleRef:o}],a)],(d=[].concat((0,n.default)(i),(0,n.default)(c))).length>0&&d.forEach((function(e){var t=e.role,a=(0,f.default)(e,["role"]);return t&&s.push(p.addRolebindings([{username:u,roleRef:t}],N({},a)))})),e.abrupt("return",this.submitting(Promise.all(s)));case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"update",value:(r=(0,s.default)(l.default.mark((function e(t,a,r){var u,o,i,c,s,f,d,p,m,h,v,g,y,E;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=(0,_.default)(t,"metadata.name"),o={},i=(0,_.default)(t,'metadata.annotations["kubesphere.io/alias-name"]'),c=(0,_.default)(t,'metadata.annotations["kubesphere.io/workspace-role"]'),s=(0,_.default)(t,'metadata.annotations["kubesphere.io/project-roles"]',[]),f=(0,_.default)(t,'metadata.annotations["kubesphere.io/devops-roles"]',[]),(0,O.default)(o,'metadata.annotations["kubesphere.io/alias-name"]',i),(0,O.default)(o,'metadata.annotations["kubesphere.io/workspace-role"]',c),(0,O.default)(o,'metadata.annotations["kubesphere.io/project-roles"]',JSON.stringify(s)),(0,O.default)(o,'metadata.annotations["kubesphere.io/devops-roles"]',JSON.stringify(f)),d=[request.patch(this.getDetailUrl(N(N({},r),{},{name:u})),o)],p=(0,_.default)(a,'metadata.annotations["kubesphere.io/workspace-role"]'),c===p){e.next=19;break}return e.next=15,this.getWorkspaceRoleBinding(u,r);case 15:return m=e.sent,e.next=18,this.deleteWorkspaceRoleBinding((0,_.default)(m,"items[0].metadata.name"),r);case 18:d.push(this.addWorkspaceRoleBinding([D.default.workspacerolebinding({name:u,role:c})],r));case 19:return h=(0,_.default)(a,'metadata.annotations["kubesphere.io/project-roles"]'),v=(0,_.default)(a,'metadata.annotations["kubesphere.io/devops-roles"]'),g=[].concat((0,n.default)(s),(0,n.default)(f)),y=[].concat((0,n.default)(h),(0,n.default)(v)),(E=this.getUpdateRolebindsRequests(g,y,t)).length>0&&d.push(E),e.abrupt("return",this.submitting(Promise.all(d)));case 26:case"end":return e.stop()}}),e,this)}))),function(e,t,a){return r.apply(this,arguments)})},{key:"getUpdateRolebindsRequests",value:function(e,t,a){var r=this,n=(0,_.default)(a,"metadata.name"),l=[];return e.forEach((function(e){var a=e.role,u=e.namespace,o=e.cluster;t.find((function(e){return e.cluster===o&&e.namespace===u&&e.role===a}))||l.push(r.addRolebindings([D.default.rolebinding({name:n,role:a})],{cluster:o,namespace:u}))})),t.forEach((function(t){var a=t.namespace,n=t.cluster,u=t.role,o=t.name;e.find((function(e){return e.cluster===n&&e.namespace===a&&e.role===u}))||l.push(r.deleteRolebindings(o,{cluster:n,namespace:a}))})),l}},{key:"checkName",value:(a=(0,s.default)(l.default.mark((function e(t){var a,r,n;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=(0,f.default)(t,["name"]),e.next=3,request.get("".concat(this.getResourceUrl(r)),{name:a});case 3:if(!(n=e.sent).items||!n.items.some((function(e){return(0,_.default)(e,"metadata.generateName")===a}))){e.next=6;break}return e.abrupt("return",{exist:!0});case 6:return e.abrupt("return",{exist:!1});case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"addGroupBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.post("".concat(this.apiVersion).concat(this.getPath(t),"/groupbindings"),e)}},{key:"deleteGroupBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.delete("".concat(this.apiVersion).concat(this.getPath(t),"/groupbindings/").concat(e))}},{key:"addWorkspaceRoleBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.post("".concat(this.apiVersion).concat(this.getPath(t),"/workspacemembers"),e)}},{key:"deleteWorkspaceRoleBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.delete("".concat(this.apiVersion).concat(this.getPath(t),"/workspacemembers/").concat(e))}},{key:"addRolebindings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.post("".concat(this.apiVersion).concat(this.getPath(t),"/namespacemembers"),e)}},{key:"deleteRolebindings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.delete("".concat(this.apiVersion).concat(this.getPath(t),"/namespacemembers/").concat(e))}},{key:"getGroupBinding",value:function(e){var t=e.group,a=e.user,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.get("".concat(this.apiVersion).concat(this.getPath(r),"/groupbindings"),{labelSelector:"iam.kubesphere.io/group-ref=".concat(t,",iam.kubesphere.io/user-ref=").concat(a)})}},{key:"getWorkspaceRoleBinding",value:(t=(0,s.default)(l.default.mark((function e(t,a){var r,n,u,o,i;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.cluster,n=a.workspace,u=a.namespace,o=(0,f.default)(a,["cluster","workspace","namespace"]),i=o,t&&(i.labelSelector="iam.kubesphere.io/group-ref=".concat(t)),e.next=5,request.get("".concat(this.apiVersion).concat(this.getPath({cluster:r,workspace:n,namespace:u}),"/workspacemembers"),i);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})},{key:"getRoleBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.get("".concat(this.apiVersion).concat(this.getPath(t),"/namespacemembers"),{labelSelector:"iam.kubesphere.io/group-ref=".concat(e)})}},{key:"fetchRoleBinding",value:function(e,t){var a=this,r=t.clusters,n=(0,f.default)(t,["clusters"]),l=[];return r.length>0?r.forEach((function(t){l.push(a.getRoleBinding(e,N({cluster:t},n)))})):l.push(this.getRoleBinding(e,N({},n))),Promise.all(l)}},{key:"deleteGroup",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.delete("".concat(this.apiVersion).concat(this.getPath(t),"/groups/").concat(e))}},{key:"apiVersion",get:function(){return"kapis/iam.kubesphere.io/v1beta1"}}]),y}(r(a(68)).default),i=(0,E.default)(o.prototype,"treeData",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),c=(0,E.default)(o.prototype,"rowTreeData",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),(0,E.default)(o.prototype,"fetchGroup",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchGroup"),o.prototype),(0,E.default)(o.prototype,"create",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"create"),o.prototype),(0,E.default)(o.prototype,"createGroup",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"createGroup"),o.prototype),(0,E.default)(o.prototype,"update",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"update"),o.prototype),(0,E.default)(o.prototype,"checkName",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"checkName"),o.prototype),(0,E.default)(o.prototype,"addGroupBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"addGroupBinding"),o.prototype),(0,E.default)(o.prototype,"deleteGroupBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"deleteGroupBinding"),o.prototype),(0,E.default)(o.prototype,"addWorkspaceRoleBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"addWorkspaceRoleBinding"),o.prototype),(0,E.default)(o.prototype,"deleteWorkspaceRoleBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"deleteWorkspaceRoleBinding"),o.prototype),(0,E.default)(o.prototype,"addRolebindings",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"addRolebindings"),o.prototype),(0,E.default)(o.prototype,"deleteRolebindings",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"deleteRolebindings"),o.prototype),(0,E.default)(o.prototype,"getGroupBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"getGroupBinding"),o.prototype),(0,E.default)(o.prototype,"getWorkspaceRoleBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"getWorkspaceRoleBinding"),o.prototype),(0,E.default)(o.prototype,"getRoleBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"getRoleBinding"),o.prototype),(0,E.default)(o.prototype,"fetchRoleBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchRoleBinding"),o.prototype),(0,E.default)(o.prototype,"deleteGroup",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"deleteGroup"),o.prototype),o);t.default=R},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(6),a(18),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.getBreadCrumbData=t.flattenTreeData=t.formatTreeData=void 0;var n=r(a(61));a(5),a(11),a(6),a(18),a(859),a(4),a(7);t.formatTreeData=function(e,t){return null==e?void 0:e.map((function(a){var r=a;return r.children=[],r.path=[t,r.group_name],r.parent_id=a.parent_id||"root",e.forEach((function(e){r.group_id===e.parent_id&&(e.parent_name=r.group_name,e.path=[].concat((0,n.default)(r.path),[e.group_name]),r.children=[].concat((0,n.default)(r.children),[e]))})),"root"===r.parent_id?(r.parent_name=t,r):null})).filter((function(e){return e}))};t.flattenTreeData=function(e){var t={};return e.map((function e(a){var r;if(a.group_id&&(t[a.group_id]=a),(null==a||null===(r=a.children)||void 0===r?void 0:r.length)>0)return a.children.map((function(t){return e(t)}))})),t};t.getBreadCrumbData=function(e,t){for(var a=[],r=t[e];r;)a.unshift(r),r=t[r.parent_id];return a}},,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(18),a(16),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(42),a(16),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(315)),l=r(a(43));a(41);var u,o,i,c,s=r(a(44)),f=r(a(36)),d=r(a(37)),p=r(a(55)),m=r(a(56)),h=r(a(51)),v=r(a(49)),g=r(a(0)),y=r(a(1)),E=a(239),b=a(14),_=r(a(26)),O=r(a(902)),S=r(a(438)),C=a(3446);function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,h.default)(e);if(t){var n=(0,h.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,m.default)(this,a)}}var k=(0,E.observer)((c=i=function(e){(0,p.default)(r,e);var t,a=D(r);function r(){var e,t;(0,f.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u0&&void 0!==l[0]?l[0]:{},a={operation:"histogram",start_time:this.startTime,end_time:this.endTime,interval:this.interval},e.next=4,this.request((0,_.default)(a,t));case 4:r=e.sent,this.histograms=(0,O.default)(r,"histogram.histograms",[])||[],this.logsCount=(0,O.default)(r,"histogram.total",0);case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"handleResult",value:function(e){return e}}]),r}(r(a(1391)).default),u=(0,E.default)(l.prototype,"startTime",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),o=(0,E.default)(l.prototype,"endTime",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),i=(0,E.default)(l.prototype,"interval",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"15m"}}),c=(0,E.default)(l.prototype,"histograms",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),s=(0,E.default)(l.prototype,"logsCount",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),(0,E.default)(l.prototype,"fetch",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"fetch"),l.prototype),l);t.default=C},,,,,,,,,,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(320),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(320),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(58)),l=r(a(43)),u=r(a(30));a(41);var o,i,c,s,f,d,p,m,h,v,g,y=r(a(44)),E=r(a(65)),b=r(a(36)),_=r(a(37)),O=r(a(88)),S=r(a(55)),C=r(a(56)),D=r(a(51)),k=r(a(49)),N=(r(a(66)),a(14)),T=r(a(902)),R=r(a(26)),w=a(244),I=r(a(1396)),M=a(52);function P(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){for(var t=1;t0&&void 0!==c[0]?c[0]:{},a=c.length>1&&void 0!==c[1]?c[1]:{},r={operation:"query",start_time:this.startTime,end_time:this.endTime,log_query:this.log_query,pods:this.pods,sort:this.sort,containers:this.containers,from:this.from,size:this.size},n=(0,T.default)(r,t),e.next=6,this.requestLogs(n);case 6:u=e.sent,o=(0,R.default)(u,"query",{}),i=this.stripAnsiRecords(o.records),this.records=a.loadMore?this.records.concat(i):i,this.workspace=u.workspace,this.total=o.total||0,this.from=n.from,this.size=n.size,this.preParams=n;case 15:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"stripAnsiRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){return A(A({},e),{},{logStripANSI:(0,I.default)(e.log)})}))}},{key:"exportLinkFactory",value:function(e){var t=e.cluster,a=e.start_time,r=e.end_time,l=(0,n.default)(e,["cluster","start_time","end_time"]),u=(0,M.getClusterUrl)(this.getApiPath(t));return"/".concat(u,"?").concat((0,w.stringify)(A(A({sort:"asc"},l),{},{start_time:Math.floor(a/1e3),end_time:Math.floor(r/1e3),operation:"export",cluster:t})))}},{key:"haveMore",get:function(){return this.total>this.from+this.size}}]),o}(r(a(1391)).default),i=(0,k.default)(o.prototype,"size",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 10}}),c=(0,k.default)(o.prototype,"from",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),s=(0,k.default)(o.prototype,"total",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),f=(0,k.default)(o.prototype,"records",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),d=(0,k.default)(o.prototype,"log_query",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),p=(0,k.default)(o.prototype,"startTime",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),m=(0,k.default)(o.prototype,"endTime",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),h=(0,k.default)(o.prototype,"workspace",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),v=(0,k.default)(o.prototype,"pods",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),g=(0,k.default)(o.prototype,"containers",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),(0,k.default)(o.prototype,"setQuery",[N.action],Object.getOwnPropertyDescriptor(o.prototype,"setQuery"),o.prototype),(0,k.default)(o.prototype,"haveMore",[N.computed],Object.getOwnPropertyDescriptor(o.prototype,"haveMore"),o.prototype),(0,k.default)(o.prototype,"loadMoreLogs",[N.action],Object.getOwnPropertyDescriptor(o.prototype,"loadMoreLogs"),o.prototype),(0,k.default)(o.prototype,"fetch",[N.action],Object.getOwnPropertyDescriptor(o.prototype,"fetch"),o.prototype),o);t.default=L},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(18),a(16),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(42),a(16),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(315)),l=r(a(43));a(41);var u,o,i=r(a(44)),c=r(a(36)),s=r(a(37)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=r(a(49)),h=r(a(0)),v=a(239),g=a(14),y=r(a(26)),E=r(a(438)),b=a(3528);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var O=(0,v.observer)((o=function(e){(0,f.default)(r,e);var t,a=_(r);function r(){var e,t;(0,c.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u0&&void 0!==arguments[0]?arguments[0]:{};(0,O.default)(this,t),(0,_.default)(this,"isLoading",i,this),(0,_.default)(this,"histogramTodayData",c,this),(0,_.default)(this,"histogramData",s,this),(0,_.default)(this,"interval",f,this),(0,_.default)(this,"data",d,this),(0,_.default)(this,"from",p,this),(0,_.default)(this,"total",m,this),(0,_.default)(this,"size",h,this),(0,_.default)(this,"namespaces",v,this),(0,_.default)(this,"logsCount",g,this),(0,_.default)(this,"headers",y,this),(0,_.default)(this,"changeTimeRang",E,this),Object.getOwnPropertyNames(r).forEach((function(e){a[e]=r[e]})),this.headers={"X-Remote-User":e.globals.user.username}}var a,r,n;return(0,S.default)(t,[{key:"fetchUrl",value:function(){return"kapis/logging.kubesphere.io/v1alpha2/events"}},{key:"fetchTodayHistogram",value:(n=(0,b.default)(l.default.mark((function e(){var t,a,r,n,o,i,c,s=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),this.isLoading=!0,n={operation:"statistics",start_time:Math.ceil((0,R.default)().startOf("day").valueOf()/1e3),end_time:Math.ceil(Date.now()/1e3),interval:this.interval,cluster:a},e.next=5,(0,T.to)(request.get(this.fetchUrl(),(0,k.default)(n,r),{headers:this.headers}));case 5:o=e.sent,i=o.statistics,c=void 0===i?{}:i,this.isLoading=!1,this.histogramTodayData=c;case 10:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"fetchHistogram",value:(r=(0,b.default)(l.default.mark((function e(){var t,a,r,n,o,i,c,s=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),this.isLoading=!0,n={operation:"histogram",start_time:Math.ceil(Date.now()/1e3)-43200,end_time:Math.ceil(Date.now()/1e3),interval:this.interval,cluster:a},e.next=5,(0,T.to)(request.get(this.fetchUrl(),(0,k.default)(n,r),{headers:this.headers}));case 5:o=e.sent,i=o.histogram,c=void 0===i?{}:i,this.logsCount=c.total||0,this.isLoading=!1,this.histogramData=c;case 11:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"fetchQuery",value:(a=(0,b.default)(l.default.mark((function e(){var t,a,r,n,o,i,c,s,f,d=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),n=d.length>1&&void 0!==d[1]?d[1]:{},this.isLoading=!0,o={operation:"query",from:this.from,size:this.size,cluster:a},i=(0,k.default)(o,r),e.next=7,(0,T.to)(request.get(this.fetchUrl(),i),{headers:this.headers});case 7:c=e.sent,s=(0,N.default)(c,"query",{}),f=this.stripAnsiRecords(s.records||[]),this.data=n.loadMore?this.data.concat(f):f,this.total=s.total||0,this.isLoading=!1,this.from=i.from,this.size=i.size,this.preParams=i;case 16:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"stripAnsiRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){return M(M({},e),{},{logStripANSI:(0,w.default)(e.log)})}))}}]),t}(),i=(0,C.default)(o.prototype,"isLoading",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),c=(0,C.default)(o.prototype,"histogramTodayData",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),s=(0,C.default)(o.prototype,"histogramData",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),f=(0,C.default)(o.prototype,"interval",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"30m"}}),d=(0,C.default)(o.prototype,"data",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),p=(0,C.default)(o.prototype,"from",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),m=(0,C.default)(o.prototype,"total",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),h=(0,C.default)(o.prototype,"size",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 10}}),v=(0,C.default)(o.prototype,"namespaces",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),g=(0,C.default)(o.prototype,"logsCount",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),y=(0,C.default)(o.prototype,"headers",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),E=(0,C.default)(o.prototype,"changeTimeRang",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.time_rang=t,e.fetchQuery()}}}),(0,C.default)(o.prototype,"fetchTodayHistogram",[D.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchTodayHistogram"),o.prototype),(0,C.default)(o.prototype,"fetchHistogram",[D.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchHistogram"),o.prototype),(0,C.default)(o.prototype,"fetchQuery",[D.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchQuery"),o.prototype),o);t.default=P}).call(this,a(69))},function(e,a,r){"use strict";r(15),r(4),r(22);var n=r(20);r(18),r(10),r(24),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.toArray=function e(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[],n=Object.keys(t),l=a+1,i=0,c=n.length;i0&&void 0!==arguments[0]?arguments[0]:{};(0,C.default)(this,t),(0,S.default)(this,"isLoading",i,this),(0,S.default)(this,"isHistogramTodayLoading",c,this),(0,S.default)(this,"isHistogramLoading",s,this),(0,S.default)(this,"histogramTodayData",f,this),(0,S.default)(this,"histogramData",d,this),(0,S.default)(this,"interval",p,this),(0,S.default)(this,"data",m,this),(0,S.default)(this,"from",h,this),(0,S.default)(this,"total",v,this),(0,S.default)(this,"size",g,this),(0,S.default)(this,"namespaces",y,this),(0,S.default)(this,"logsCount",E,this),(0,S.default)(this,"headers",b,this),(0,S.default)(this,"changeTimeRang",_,this),Object.getOwnPropertyNames(r).forEach((function(e){a[e]=r[e]})),this.headers={"X-Remote-User":e.globals.user.username}}var a,r,n;return(0,D.default)(t,[{key:"fetchUrl",value:function(){return"kapis/logging.kubesphere.io/v1alpha2/auditing"}},{key:"fetchTodayHistogram",value:(n=(0,O.default)(l.default.mark((function e(){var t,a,r,n,o,i,c,s=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),this.isLoading=!0,this.isHistogramTodayLoading=!0,n={operation:"statistics",start_time:Math.ceil((0,I.default)().startOf("day").valueOf()/1e3),end_time:Math.ceil(Date.now()/1e3),interval:this.interval,cluster:a},e.next=6,(0,w.to)(request.get(this.fetchUrl(),(0,T.default)(n,r),{headers:this.headers}));case 6:o=e.sent,i=o.statistics,c=void 0===i?{}:i,this.isLoading=!1,this.isHistogramTodayLoading=!1,this.histogramTodayData=c;case 12:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"fetchHistogram",value:(r=(0,O.default)(l.default.mark((function e(){var t,a,r,n,o,i,c,s=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),this.isLoading=!0,this.isHistogramLoading=!0,n={operation:"histogram",start_time:Math.ceil(Date.now()/1e3)-43200,end_time:Math.ceil(Date.now()/1e3),interval:this.interval,cluster:a},e.next=6,(0,w.to)(request.get(this.fetchUrl(),(0,T.default)(n,r),{headers:this.headers}));case 6:o=e.sent,i=o.histogram,c=void 0===i?{}:i,this.logsCount=c.total||0,this.isLoading=!1,this.isHistogramLoading=!1,this.histogramData=c;case 13:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"fetchQuery",value:(a=(0,O.default)(l.default.mark((function e(){var t,a,r,n,o,i,c,s,f,d=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),n=d.length>1&&void 0!==d[1]?d[1]:{},this.isLoading=!0,o={operation:"query",from:this.from,size:this.size,cluster:a},i=(0,T.default)(o,r),e.next=7,(0,w.to)(request.get(this.fetchUrl(),i,{headers:this.headers}));case 7:c=e.sent,s=(0,R.default)(c,"query",{}),f=this.stripAnsiRecords(s.records||[]),this.data=n.loadMore?this.data.concat(f):f,this.total=s.total||0,this.isLoading=!1,this.from=i.from,this.size=i.size,this.preParams=i;case 16:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"stripAnsiRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){return A(A({},e),{},{logStripANSI:(0,M.default)(e.log)})}))}}]),t}(),i=(0,k.default)(o.prototype,"isLoading",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),c=(0,k.default)(o.prototype,"isHistogramTodayLoading",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),s=(0,k.default)(o.prototype,"isHistogramLoading",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),f=(0,k.default)(o.prototype,"histogramTodayData",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),d=(0,k.default)(o.prototype,"histogramData",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),p=(0,k.default)(o.prototype,"interval",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"30m"}}),m=(0,k.default)(o.prototype,"data",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),h=(0,k.default)(o.prototype,"from",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),v=(0,k.default)(o.prototype,"total",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),g=(0,k.default)(o.prototype,"size",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 10}}),y=(0,k.default)(o.prototype,"namespaces",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),E=(0,k.default)(o.prototype,"logsCount",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),b=(0,k.default)(o.prototype,"headers",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),_=(0,k.default)(o.prototype,"changeTimeRang",[N.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.time_rang=t,e.fetchQuery()}}}),(0,k.default)(o.prototype,"fetchTodayHistogram",[N.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchTodayHistogram"),o.prototype),(0,k.default)(o.prototype,"fetchHistogram",[N.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchHistogram"),o.prototype),(0,k.default)(o.prototype,"fetchQuery",[N.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchQuery"),o.prototype),o);t.default=j}).call(this,a(69))},function(e,a,r){"use strict";r(15),r(4),r(22);var n=r(20);r(18),r(10),r(24),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.toArray=function e(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[],n=Object.keys(t),l=a+1,i=0,c=n.length;i1&&void 0!==arguments[1]?arguments[1]:{},a=function(a){(0,i.default)(c,a);var r=h(c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}return(0,o.default)(c,[{key:"pageClose",value:function(){window.opener=null,window.open("","_self",""),window.close()}},{key:"render",value:function(){var a=this.props,r=a.title,u=a.onCancel,o=a.icon,i=a.description,c=(0,l.default)(a,["title","onCancel","icon","description"]);return f.default.createElement(d.default,{visible:!0,fullScreen:!0,hideFooter:!0,title:r,icon:o,description:i,onCancel:u,className:m.default.container,headerClassName:m.default.header,bodyClassName:(0,p.default)(m.default.body,m.default.fullScreen)},f.default.createElement(e,(0,n.default)({onCancel:t.isSinglePage?this.pageClose:u},c)))}}]),c}(f.default.Component);return a},a(12),a(109),a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(315)),l=r(a(58)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=r(a(787)),p=r(a(3)),m=r(a(3549));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(9),a(13),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(5),a(11),a(6),a(28),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(7);var n=r(a(30)),l=r(a(43));a(41);var u,o,i,c,s,f=r(a(44)),d=r(a(65)),p=r(a(36)),m=r(a(37)),h=r(a(49)),v=(r(a(66)),a(14)),g=r(a(26)),y=r(a(902));function E(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function b(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster;return t?"/klusters/".concat(t):""}},{key:"kubeWebsocketUrl",value:(r=(0,f.default)(l.default.mark((function e(){var t,a,r,n,u,o,i,c;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.kubectl,a=t.cluster,r=t.namespace,n=t.nodename,u=t.pod,o=t.container,i=t.shell,c=void 0===i?"sh":i,!n){e.next=3;break}return e.abrupt("return","kapis/terminal.kubesphere.io/v1alpha2".concat(this.getClusterPath({cluster:a}),"/nodes/").concat(n,"/exec"));case 3:return e.next=5,request.get("kapis/terminal.kubesphere.io/v1alpha2".concat(this.getClusterPath({cluster:a}),"/namespaces/").concat(r,"/pods/").concat(u,"/exec?container=").concat(o,"&shell=").concat(c),null,null,(function(e){return 404!==e.status}));case 5:if(e.sent){e.next=8;break}return e.abrupt("return","kapis/terminal.kubesphere.io/v1alpha2".concat(this.getClusterPath({cluster:a}),"/namespaces/").concat(r,"/pods/").concat(u,"?container=").concat(o,"&shell=").concat(c));case 8:return e.abrupt("return","kapis/terminal.kubesphere.io/v1alpha2".concat(this.getClusterPath({cluster:a}),"/namespaces/").concat(r,"/pods/").concat(u,"/exec?container=").concat(o,"&shell=").concat(c));case 9:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"fetchKubeCtl",value:(a=(0,f.default)(l.default.mark((function e(t){var a;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=t.cluster,this.kubectl.isLoading=!0,this.kubectl=b(b({},this.kubectl),{},{cluster:a,isLoading:!1});case 3:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchKubeConfig",value:(t=(0,f.default)(l.default.mark((function e(t){var a;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get("kapis/resources.kubesphere.io/v1alpha2".concat(this.getClusterPath(t),"/users/").concat(this.username,"/kubeconfig"));case 2:a=e.sent,this.kubeconfig=a;case 4:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"connect",value:function(){this.connected=!0}},{key:"disconnect",value:function(){this.connected=!1}}]),e}(),o=(0,h.default)(u.prototype,"kubectl",[v.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{cluster:"",namespace:"",pod:"",container:"",nodename:"",shell:"bash",isLoading:!0}}}),i=(0,h.default)(u.prototype,"kubeconfig",[v.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),c=(0,h.default)(u.prototype,"connected",[v.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),(0,h.default)(u.prototype,"fetchKubeCtl",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchKubeCtl"),u.prototype),s=(0,h.default)(u.prototype,"setNodename",[v.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.kubectl.nodename=t}}}),(0,h.default)(u.prototype,"fetchKubeConfig",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchKubeConfig"),u.prototype),(0,h.default)(u.prototype,"connect",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"connect"),u.prototype),(0,h.default)(u.prototype,"disconnect",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"disconnect"),u.prototype),u);t.default=_},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var l,u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=r(239),p=n(r(3)),m=r(909),h=n(r(1777)),v=n(r(1776)),g=r(186),y=n(r(841)),E=n(r(26)),b=r(52),_=n(r(1778)),O=n(r(3551));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var C=(0,h.default)(l=(0,d.observer)(l=function(e){(0,i.default)(r,e);var a=S(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{},a=t.start,r=t.end,n=t.step,l=void 0===n?"1h":n,u=t.resources,o=void 0===u?[]:u,i=t.meters,c=void 0===i?[]:i,s=t.module,d=t.isTime,p=void 0!==d&&d,m=t.deployments,h=t.statefulsets,v=t.daemonsets,g=t.nodes,y=t.pods,E=(0,f.default)(t,["start","end","step","resources","meters","module","isTime","deployments","statefulsets","daemonsets","nodes","pods"]),b=(0,S.default)(w({},E),(0,D.getTimeParams)({start:a,end:r,step:l,isTime:p}),(0,D.getMetricsFilters)({module:s,meters:c}),(0,D.getResourceFilters)({module:s,resources:o}),(0,D.handleWorkloadToKind)({deployments:m,statefulsets:h,daemonsets:v}),(0,D.handleNodeParams)({nodes:g,pods:y,resources:o,module:s}));return e.setParams(b)},e.setParams=function(e){return e},e.getResource=function(e){var t=e.cluster,a=e.workspaces,r=e.namespaces,n=e.applications,l=e.openpitrixs,u=e.services,o=e.deployments,i=e.statefulsets,c=e.daemonsets,s=e.nodes,f=e.pods,d={cluster:t,namespaces:r,workspaces:a};return f?w({pods:f,nodes:s||void 0},d):s?w({nodes:s},d):o||i||c?w({deployments:o,statefulsets:i,daemonsets:c},d):u?w({services:u},d):l?w({openpitrixs:l},d):n?w({applications:n},d):d},e.setOneSourceAllMeterByType=function(e,t){var a=e.data,r=e.metric_name,n=(0,O.default)(a,"result.0",{});return w({type:r,module:k.RESOURCES_METER_TYPE[t]},n)},e.getOneSourceAllMeterData=function(e,t,a){return t.start&&(e.start=1e3*t.start),t.end&&(e.end=1e3*t.end),t.step&&(e.step=(0,T.getTimeStr)(t.step)),e.values=(0,D.fillEmptyMeterValue)({start:t.start,end:t.end,step:t.step.slice(0,-1)},e.values),(0,D.handleValueByUnit)(e,a)},e.handleAllMeterData=function(t,a,r){var n=t.results.map((function(t){if(t.data.result){var n=e.setOneSourceAllMeterByType(t,r);return e.getOneSourceAllMeterData(n,a,r)}return!1}));return(0,D.handleSortBySourceType)(n)},e.handleOneMeterData=function(e,t){var a=e.results[0],r=(0,O.default)(a,"data.result",[]),n=(0,O.default)(a,"metric_name",""),l=[];return(0,_.default)(r)||(l=r.map((function(e){return e=w({type:n,module:k.RESOURCES_METER_TYPE[t]},e),(0,D.handleValueByUnit)(e,t)}))),l},(0,d.default)(e,"fetchPrice",i,(0,h.default)(e)),e}return(0,m.default)(r,[{key:"getPaths",value:function(e){var t=e.cluster,a=e.workspaces,r=e.namespaces,n=e.applications,l=e.services,u=e.deployments,o=e.statefulsets,i=e.openpitrixs,c=e.daemonsets,s=e.pods,f=e.nodes,d=e.module,p="";return t&&(p+="cluster"===d?"/cluster":""),a&&(p+="/workspaces/".concat(a)),(r||"namespaces"===d)&&(p+="namespaces"===d?"/namespaces":"/namespaces/".concat(r)),n&&(p+="/applications"),i&&!l&&(p+="/openpitrixs"),l&&(p+="/services"),!s&&(u||o||c)&&(p+="/workloads"),f&&!s&&(p+="/nodes"),f&&s&&(p+="/nodes/".concat(f)),s&&(p+="/pods"),p}},{key:"fetchMeter",value:(t=(0,c.default)(n.default.mark((function e(){var t,a,r,l,u,o,i,c,s,d,p,m,h,v,g,y,E,O,S,C,k,N=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=N.length>0&&void 0!==N[0]?N[0]:{},a=t.cluster,r=t.workspaces,l=t.namespaces,u=t.openpitrixs,o=t.applications,i=t.services,c=t.deployments,s=t.statefulsets,d=t.daemonsets,p=t.pods,m=t.nodes,h=(0,f.default)(t,["cluster","workspaces","namespaces","openpitrixs","applications","services","deployments","statefulsets","daemonsets","pods","nodes"]),this.isLoading=!0,v="",g={},this.cluster=a,y=this.getResource({cluster:a,workspaces:r,namespaces:l,openpitrixs:u,applications:o,services:i,deployments:c,statefulsets:s,daemonsets:d,pods:p,nodes:m}),g=h.operation?this.getExportParams(w(w({},y),h)):this.getParams(w({deployments:c,statefulsets:s,daemonsets:d,pods:p,nodes:m},h)),"namespaces"===h.module?(v=this.getTenantApi(w({module:h.module},y)),E=y.workspaces&&y.namespaces?{workspaces:y.workspaces}:{},g=w(w(w({},g),E),(0,D.handleLevelParams)({module:h.module}))):v=this.getApi(w({module:h.module},y)),"openpitrixs"===h.module&&(g.cluster=this.cluster),e.next=11,request.get(v,g,{},(function(){return[]}));case 11:if(O=e.sent,this.isLoading=!1,!h.operation){e.next=15;break}return e.abrupt("return",O);case 15:if((0,_.default)(O)||!(0,b.default)(O.results)){e.next=24;break}if(S=h.module,"all"!==h.meters){e.next=21;break}return C=this.handleAllMeterData(O,g,S),this.data=C,e.abrupt("return",C);case 21:return k=this.handleOneMeterData(O,S),this.data=k,e.abrupt("return",k);case 24:return this.data=[],e.abrupt("return",[]);case 26:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return globals.app.isMultiCluster&&this.cluster?"kapis/clusters/".concat(this.cluster,"/metering.kubesphere.io/v1alpha1"):"kapis/metering.kubesphere.io/v1alpha1"}}]),r}(r(a(68)).default),u=(0,E.default)(l.prototype,"isLoading",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),o=(0,E.default)(l.prototype,"data",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,E.default)(l.prototype,"fetchMeter",[C.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchMeter"),l.prototype),i=(0,E.default)(l.prototype,"fetchPrice",[C.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,c.default)(n.default.mark((function t(a){var r,l,u,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,l="".concat(e.tenantUrl({cluster:r}),"/metering/price"),t.next=4,request.get(l,{},{},(function(){}));case 4:if(!(u=t.sent)||(0,_.default)(u)){t.next=13;break}if(!Object.values(u).some((function(e){return"number"==typeof e&&e<0}))&&""!==u.currency){t.next=9;break}return t.abrupt("return",{cluster:r});case 9:return o={},Object.keys(u).forEach((function(e){!["currency","retention_day"].includes(e)&&u[e]>0&&(o[k.FEE_CONFIG[e]]=u[e])})),(0,_.default)(o)||(o.currency=u.currency,o.retention_day=(0,O.default)(u,"retention_day","7d"),o.cluster=r||(0,O.default)(N.DEFAULT_CLUSTER,"metadata.name")),t.abrupt("return",o);case 13:return t.abrupt("return",{cluster:r});case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),l);t.default=M},,,,,,,,function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(5),r(11),r(31),r(6),r(84),r(73),r(18),r(97),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(85),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(84),r(73),r(18),r(28),r(97),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(85),r(7);var u=n(r(43));r(41);var o,i=n(r(44)),c=n(r(61)),s=n(r(30)),f=n(r(36)),d=n(r(37)),p=n(r(55)),m=n(r(56)),h=n(r(51)),v=l(r(0)),g=n(r(3)),y=n(r(63)),E=n(r(189)),b=n(r(1029)),_=r(14),O=r(239),S=r(186),C=n(r(814)),D=n(r(438)),k=n(r(915)),N=n(r(790)),T=r(924),R=n(r(945)),w=n(r(874)),I=n(r(3665));function M(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function P(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,a=e.group,r=e.tags,n=void 0===r?[]:r;return a&&(a="cluster.kubesphere.io/group=".concat(a)),n=n.map((function(e){return"label.cluster.kubesphere.io/".concat(e)})),P(P({},(0,E.default)(e,"group","tags","__index")),{},{labelSelector:[a].concat((0,c.default)(n),[t]).filter(Boolean).join(",")})},e.handleClick=function(t){var a,r=e.props,n=r.value,l=void 0===n?[]:n,u=r.onChange,o=t.currentTarget.dataset.cluster;a=l.some((function(e){return e.name===o}))?l.filter((function(e){return e.name!==o})):[].concat((0,c.default)(l),[{name:o}]),e.setState({showTip:a.some((function(t){return e.state.hostClusters.includes(t.name)}))}),u(a)},e.handleCheckboxClick=function(e){return e.stopPropagation()},e.clearFilter=function(){e.setState({filters:{}}),e.fetchData()},e.handleReset=function(){var t=e.state.filters;e.fetchData(t)},e.sortClusters=function(e){var t=e.filter((function(e){return e&&e.isHost})),a=e.filter((function(e){return e&&!e.isHost}));return[].concat((0,c.default)(t),(0,c.default)(a))},e}return(0,d.default)(n,[{key:"componentDidMount",value:function(){this.fetchData(),this.tagsStore.fetchGroupList()}},{key:"fetchData",value:(a=(0,i.default)(u.default.mark((function e(){var t,a,r=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]?r[0]:{},a="!cluster-role.kubesphere.io/edge",!globals.app.hasPermission({module:"clusters",action:"manage"})){e.next=7;break}return e.next=5,this.clusterStore.fetchList(P({limit:-1},this.getParams(t,a)));case 5:e.next=9;break;case 7:return e.next=9,this.clusterStore.fetchGrantedList(P({limit:-1},this.getParams(t,a)));case 9:this.setState({hostClusters:this.clusterStore.list.data.filter((function(e){return e.isHost})).map((function(e){return e.name}))});case 10:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"render",value:function(){var e=this,a=this.props,r=a.value,n=void 0===r?[]:r,l=a.noTip,u=void 0!==l&&l,o=this.state.filters,i=(0,_.toJS)(this.clusterStore.list),c=i.data,f=i.isLoading;if((0,y.default)(c)&&(0,y.default)(o)&&!f)return v.default.createElement(S.Alert,{type:"warning",message:t("NO_CLUSTER_AVAILABLE_DESC",{type:t("KS_CLUSTER")})});var d=(0,b.default)(this.sortClusters(c),(function(e){return globals.app.hasClusterModule(e.name,"whizard-monitoring")}));return v.default.createElement("div",{className:I.default.wrapper},this.state.showTip&&!u&&v.default.createElement(S.Alert,{className:"margin-b12",type:"warning",message:t("SELECT_HOST_CLUSTER_WARNING")}),v.default.createElement("div",null,v.default.createElement("div",{className:"margin-b12"},v.default.createElement(k.default,{placeholder:t("SEARCH_BY_NAME"),columns:this.columns,onChange:function(t){e.setState({filters:t}),e.fetchData(t)},filters:this.state.filters}))),d.map((function(a){var r;return v.default.createElement("div",{key:a.name,className:(0,g.default)(I.default.item,(0,s.default)({},I.default.disabled,!globals.app.isMultiCluster)),"data-cluster":a.name,onClick:globals.app.isMultiCluster?e.handleClick:null},v.default.createElement(S.Checkbox,{checked:n.some((function(e){return e.name===a.name})),disabled:!globals.app.isMultiCluster,onClick:e.handleCheckboxClick}),v.default.createElement(C.default,{className:I.default.cluster,cluster:a,noTip:!0}),v.default.createElement(N.default,{title:v.default.createElement(T.ClusterTagGroup,{data:(null!==(r=a.tags)&&void 0!==r?r:[]).map((function(t){return(e.tagsStore.tags||[]).find((function(e){return t.name===e.name}))})).filter(Boolean),empty:"-"}),description:t("TAG_PL")}))})),f&&v.default.createElement(S.Loading,{size:"large",className:I.default.loading}),(0,y.default)(c)&&v.default.createElement(w.default,{icon:"exclamation",title:t("NO_MATCHING_RESULT_FOUND"),desc:null,action:v.default.createElement("p",null,t("YOU_CAN_TRY_TO"),v.default.createElement("span",{className:I.default.action,onClick:this.handleReset,"data-test":"table-empty-refresh"},t("REFRESH_DATA")),t("OR"),v.default.createElement("span",{className:I.default.action,onClick:this.clearFilter,"data-test":"table-empty-clear-filter"},t("CLEAR_SEARCH_CONDITIONS")))}))}},{key:"columns",get:function(){var e,a;return[{dataIndex:"name",title:t("NAME"),search:!0},{dataIndex:"alias",title:t("ALIAS"),search:!0},{dataIndex:"group",title:t("TYPE"),search:!0,filters:(null!==(e=this.tagsStore.group)&&void 0!==e?e:[]).map((function(e){return{text:e,value:e}})),renderSearch:function(e){return v.default.createElement("div",{className:"flex"},v.default.createElement("div",{className:(0,g.default)(I.default.clusterGroupTag,(0,s.default)({},I.default[e.key],!0))},t("ENV_".concat(e.label.toUpperCase()))),e.label)}},{dataIndex:"tags",title:t("TAG_PL"),filters:(null!==(a=this.tagsStore.tags)&&void 0!==a?a:[]).map((function(e){return{text:"".concat(e.label,":").concat(e.value),value:e.name}})),search:!0,multi:!0,renderSearch:function(e){return v.default.createElement("div",null,e.label)}}]}}]),n}(v.Component))||o;a.default=j},,,function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return g}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("path",{transform:"matrix(.86603 -.5 0 1 9.11 14.822)",stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8",d:"M0 0h18.294v18.431H0z"}),i=u.a.createElement("path",{d:"M40.797 33.116l-15.843 9.147L8.91 32.999M9.004 14.452l16.142 9.835",stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8"}),c=u.a.createElement("mask",{id:"a",fill:"#fff"},u.a.createElement("rect",{width:10.297,height:10.297,rx:.6})),s=u.a.createElement("rect",{width:10.297,height:10.297,rx:.6,transform:"matrix(-.86603 -.5 0 1 15.146 27.033)",fill:"url(#paint0_linear_14176_514037)",stroke:"#119E8F",strokeWidth:3.6,mask:"url(#a)"}),f=u.a.createElement("path",{d:"M24.853 24.114l-.047 18.54",stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8"}),d=u.a.createElement("mask",{id:"b",fill:"#fff"},u.a.createElement("rect",{width:20.352,height:20.352,rx:.6})),p=u.a.createElement("rect",{width:20.352,height:20.352,rx:.6,transform:"matrix(-.86603 -.5 0 1 41.77 14.376)",fill:"url(#paint1_linear_14176_514037)",stroke:"#119E8F",strokeWidth:3.6,mask:"url(#b)"}),m=u.a.createElement("circle",{cx:9.15,cy:14.702,r:1.537,fill:"url(#paint2_linear_14176_514037)"}),h=u.a.createElement("circle",{cx:24.953,cy:42.263,r:1.537,fill:"url(#paint3_linear_14176_514037)"}),v=u.a.createElement("defs",null,u.a.createElement("linearGradient",{id:"paint0_linear_14176_514037",x1:5.149,y1:10.297,x2:5.149,y2:-.236,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"})),u.a.createElement("linearGradient",{id:"paint1_linear_14176_514037",x1:10.176,y1:20.352,x2:10.176,y2:-.466,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"})),u.a.createElement("linearGradient",{id:"paint2_linear_14176_514037",x1:8.21,y1:14.054,x2:8.21,y2:16.239,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"})),u.a.createElement("linearGradient",{id:"paint3_linear_14176_514037",x1:24.013,y1:41.615,x2:24.013,y2:43.8,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"}))),g=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 48 48",fill:"none",width:"1em",height:"1em"},e),o,i,c,s,f,d,p,m,h,v)};t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxyZWN0IHdpZHRoPSIxOC4yOTQiIGhlaWdodD0iMTguNDMxMiIgdHJhbnNmb3JtPSJtYXRyaXgoMC44NjYwMjUgLTAuNSAyLjIwMzA1ZS0wOCAxIDkuMTEwMDQgMTQuODIxOCkiCiAgICAgICAgICBzdHJva2U9IiNBNUVBRTMiIHN0cm9rZS13aWR0aD0iMC42IiBzdHJva2UtZGFzaGFycmF5PSIxLjggMS44Ii8+CiAgICA8cGF0aCBkPSJNNDAuNzk2OCAzMy4xMTU2TDI0Ljk1MzggNDIuMjYyNkw4LjkwOTY1IDMyLjk5OTUiIHN0cm9rZT0iI0E1RUFFMyIgc3Ryb2tlLXdpZHRoPSIwLjYiCiAgICAgICAgICBzdHJva2UtZGFzaGFycmF5PSIxLjggMS44Ii8+CiAgICA8cGF0aCBkPSJNOS4wMDM3MyAxNC40NTE3TDI1LjE0NTggMjQuMjg3MSIgc3Ryb2tlPSIjQTVFQUUzIiBzdHJva2Utd2lkdGg9IjAuNiIgc3Ryb2tlLWRhc2hhcnJheT0iMS44IDEuOCIvPgogICAgPG1hc2sgaWQ9InBhdGgtNC1pbnNpZGUtMV8xNDE3Nl81MTQwMzciIGZpbGw9IndoaXRlIj4KICAgICAgICA8cmVjdCB3aWR0aD0iMTAuMjk3MiIgaGVpZ2h0PSIxMC4yOTcyIiByeD0iMC42Ii8+CiAgICA8L21hc2s+CiAgICA8cmVjdCB3aWR0aD0iMTAuMjk3MiIgaGVpZ2h0PSIxMC4yOTcyIiByeD0iMC42IiB0cmFuc2Zvcm09Im1hdHJpeCgtMC44NjYwMjUgLTAuNSAtMi4yMDMwNWUtMDggMSAxNS4xNDY1IDI3LjAzMzIpIgogICAgICAgICAgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzE0MTc2XzUxNDAzNykiIHN0cm9rZT0iIzExOUU4RiIgc3Ryb2tlLXdpZHRoPSIzLjYiCiAgICAgICAgICBtYXNrPSJ1cmwoI3BhdGgtNC1pbnNpZGUtMV8xNDE3Nl81MTQwMzcpIi8+CiAgICA8cGF0aCBkPSJNMjQuODUzMyAyNC4xMTM4TDI0LjgwNjUgNDIuNjU0OCIgc3Ryb2tlPSIjQTVFQUUzIiBzdHJva2Utd2lkdGg9IjAuNiIgc3Ryb2tlLWRhc2hhcnJheT0iMS44IDEuOCIvPgogICAgPG1hc2sgaWQ9InBhdGgtNi1pbnNpZGUtMl8xNDE3Nl81MTQwMzciIGZpbGw9IndoaXRlIj4KICAgICAgICA8cmVjdCB3aWR0aD0iMjAuMzUxNyIgaGVpZ2h0PSIyMC4zNTE3IiByeD0iMC42Ii8+CiAgICA8L21hc2s+CiAgICA8cmVjdCB3aWR0aD0iMjAuMzUxNyIgaGVpZ2h0PSIyMC4zNTE3IiByeD0iMC42IiB0cmFuc2Zvcm09Im1hdHJpeCgtMC44NjYwMjUgLTAuNSAtMi4yMDMwNWUtMDggMSA0MS43NzA4IDE0LjM3NTcpIgogICAgICAgICAgZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzE0MTc2XzUxNDAzNykiIHN0cm9rZT0iIzExOUU4RiIgc3Ryb2tlLXdpZHRoPSIzLjYiCiAgICAgICAgICBtYXNrPSJ1cmwoI3BhdGgtNi1pbnNpZGUtMl8xNDE3Nl81MTQwMzcpIi8+CiAgICA8Y2lyY2xlIGN4PSI5LjE1MDE2IiBjeT0iMTQuNzAxOSIgcj0iMS41Mzc0IiBmaWxsPSJ1cmwoI3BhaW50Ml9saW5lYXJfMTQxNzZfNTE0MDM3KSIvPgogICAgPGNpcmNsZSBjeD0iMjQuOTUzNSIgY3k9IjQyLjI2MjciIHI9IjEuNTM3NCIgZmlsbD0idXJsKCNwYWludDNfbGluZWFyXzE0MTc2XzUxNDAzNykiLz4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xNDE3Nl81MTQwMzciIHgxPSI1LjE0ODY0IiB5MT0iMTAuMjk3MiIgeDI9IjUuMTQ4NjQiIHkyPSItMC4yMzU5NTMiCiAgICAgICAgICAgICAgICAgICAgICAgIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzE2RDJCRiIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MV9saW5lYXJfMTQxNzZfNTE0MDM3IiB4MT0iMTAuMTc1OSIgeTE9IjIwLjM1MTYiIHgyPSIxMC4xNzU5IiB5Mj0iLTAuNDY2MzQxIgogICAgICAgICAgICAgICAgICAgICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMxNkQyQkYiLz4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDJfbGluZWFyXzE0MTc2XzUxNDAzNyIgeDE9IjguMjA5NTkiIHkxPSIxNC4wNTQzIiB4Mj0iOC4yMDk1OSIgeTI9IjE2LjIzOTMiCiAgICAgICAgICAgICAgICAgICAgICAgIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzM2RDZDNCIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMxNUJFQUMiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQzX2xpbmVhcl8xNDE3Nl81MTQwMzciIHgxPSIyNC4wMTMiIHkxPSI0MS42MTUxIiB4Mj0iMjQuMDEzIiB5Mj0iNDMuODAwMSIKICAgICAgICAgICAgICAgICAgICAgICAgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjMzZENkM0Ii8+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE1QkVBQyIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8L2RlZnM+Cjwvc3ZnPgo="},function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return h}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("path",{d:"M38.498 18.155L9.618 34.682M9.66 18.155l28.88 16.527M24.1 10.815v30.89",stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8"}),i=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.407 21.99l5.336-3.192-3.348-1.906-5.37 3.134.787.457-.79-.458v5.813l3.385 1.88V21.99z",fill:"url(#paint0_linear_14176_514054)"}),c=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.458 21.675l-5.335-3.192 3.348-1.906 5.37 3.134-.128.074.13-.075v5.813l-3.385 1.88v-5.728z",fill:"url(#paint1_linear_14176_514054)"}),s=u.a.createElement("path",{d:"M9.618 17.935L24 9.853l14.383 8.082v16.073L24 42 9.618 34.008V17.935z",stroke:"#119E8F",strokeWidth:1.8,strokeLinejoin:"round"}),f=u.a.createElement("path",{d:"M6.989 25.504l8.003 4.47-.035 8.856-8.003-4.47.035-8.856z",fill:"url(#paint2_linear_14176_514054)",stroke:"#119E8F",strokeWidth:1.5}),d=u.a.createElement("path",{d:"M41.011 25.504l-8.003 4.47.035 8.856 8.003-4.47-.035-8.856z",fill:"url(#paint3_linear_14176_514054)",stroke:"#119E8F",strokeWidth:1.5}),p=u.a.createElement("path",{d:"M24.055 5.68l8.992 5.021-8.902 5.016-8.992-5.021 8.902-5.016z",fill:"url(#paint4_linear_14176_514054)",stroke:"#119E8F",strokeWidth:1.5}),m=u.a.createElement("defs",null,u.a.createElement("linearGradient",{id:"paint0_linear_14176_514054",x1:14.714,y1:20.025,x2:14.714,y2:27.717,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"})),u.a.createElement("linearGradient",{id:"paint1_linear_14176_514054",x1:35.186,y1:22.251,x2:35.186,y2:27.717,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"})),u.a.createElement("linearGradient",{id:"paint2_linear_14176_514054",x1:10.973,y1:40.105,x2:10.973,y2:23.865,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"})),u.a.createElement("linearGradient",{id:"paint3_linear_14176_514054",x1:37.027,y1:40.105,x2:37.027,y2:23.865,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"})),u.a.createElement("linearGradient",{id:"paint4_linear_14176_514054",x1:24.1,y1:16.577,x2:24.1,y2:4.55,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"}))),h=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 48 48",fill:"none",width:"1em",height:"1em"},e),o,i,c,s,f,d,p,m)};t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0zOC40OTg0IDE4LjE1NUw5LjYxODE2IDM0LjY4MjQiIHN0cm9rZT0iI0E1RUFFMyIgc3Ryb2tlLXdpZHRoPSIwLjYiIHN0cm9rZS1kYXNoYXJyYXk9IjEuOCAxLjgiLz4KICAgIDxwYXRoIGQ9Ik05LjY1OTc2IDE4LjE1NUwzOC41NCAzNC42ODI0IiBzdHJva2U9IiNBNUVBRTMiIHN0cm9rZS13aWR0aD0iMC42IiBzdHJva2UtZGFzaGFycmF5PSIxLjggMS44Ii8+CiAgICA8cGF0aCBkPSJNMjQuMTAwMiAxMC44MTUyVjQxLjcwNTMiIHN0cm9rZT0iI0E1RUFFMyIgc3Ryb2tlLXdpZHRoPSIwLjYiIHN0cm9rZS1kYXNoYXJyYXk9IjEuOCAxLjgiLz4KICAgIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIgogICAgICAgICAgZD0iTTE2LjQwNjkgMjEuOTkwNkwyMS43NDI2IDE4Ljc5OEwxOC4zOTUxIDE2Ljg5MjNMMTMuMDI0OSAyMC4wMjU4TDEzLjgxMTggMjAuNDgzTDEzLjAyMTggMjAuMDI0OVYyNS44Mzc3TDE2LjQwNjUgMjcuNzE3NVYyMS45OTA0TDE2LjQwNjkgMjEuOTkwNloiCiAgICAgICAgICBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfMTQxNzZfNTE0MDU0KSIvPgogICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiCiAgICAgICAgICBkPSJNMzIuNDU3NyAyMS42NzQ3TDI3LjEyMyAxOC40ODI4TDMwLjQ3MDUgMTYuNTc3MUwzNS44NDA4IDE5LjcxMDZMMzUuNzEzNCAxOS43ODQ2TDM1Ljg0MjQgMTkuNzA5OFYyNS41MjI2TDMyLjQ1NzcgMjcuNDAyNFYyMS42NzQ3WiIKICAgICAgICAgIGZpbGw9InVybCgjcGFpbnQxX2xpbmVhcl8xNDE3Nl81MTQwNTQpIi8+CiAgICA8cGF0aCBkPSJNOS42MTgxNiAxNy45MzQ3TDI0LjAwMDUgOS44NTMwM0wzOC4zODI4IDE3LjkzNDdWMzQuMDA4MUwyNC4wMDA1IDQyTDkuNjE4MTYgMzQuMDA4MVYxNy45MzQ3WiIKICAgICAgICAgIHN0cm9rZT0iIzExOUU4RiIgc3Ryb2tlLXdpZHRoPSIxLjgiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KICAgIDxwYXRoIGQ9Ik02Ljk4ODk2IDI1LjUwNDFMMTQuOTkyNCAyOS45NzM4TDE0Ljk1NzQgMzguODMwM0w2Ljk1Mzg5IDM0LjM2MDVMNi45ODg5NiAyNS41MDQxWiIKICAgICAgICAgIGZpbGw9InVybCgjcGFpbnQyX2xpbmVhcl8xNDE3Nl81MTQwNTQpIiBzdHJva2U9IiMxMTlFOEYiIHN0cm9rZS13aWR0aD0iMS41Ii8+CiAgICA8cGF0aCBkPSJNNDEuMDExIDI1LjUwNDFMMzMuMDA3NiAyOS45NzM4TDMzLjA0MjYgMzguODMwM0w0MS4wNDYxIDM0LjM2MDVMNDEuMDExIDI1LjUwNDFaIgogICAgICAgICAgZmlsbD0idXJsKCNwYWludDNfbGluZWFyXzE0MTc2XzUxNDA1NCkiIHN0cm9rZT0iIzExOUU4RiIgc3Ryb2tlLXdpZHRoPSIxLjUiLz4KICAgIDxwYXRoIGQ9Ik0yNC4wNTU0IDUuNjc5NzdMMzMuMDQ3MiAxMC43MDE1TDI0LjE0NDkgMTUuNzE3NEwxNS4xNTMxIDEwLjY5NTdMMjQuMDU1NCA1LjY3OTc3WiIKICAgICAgICAgIGZpbGw9InVybCgjcGFpbnQ0X2xpbmVhcl8xNDE3Nl81MTQwNTQpIiBzdHJva2U9IiMxMTlFOEYiIHN0cm9rZS13aWR0aD0iMS41Ii8+CiAgICA8ZGVmcz4KICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfMTQxNzZfNTE0MDU0IiB4MT0iMTQuNzE0NSIgeTE9IjIwLjAyNDgiIHgyPSIxNC43MTQ1IiB5Mj0iMjcuNzE3NCIKICAgICAgICAgICAgICAgICAgICAgICAgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjMzZENkM0Ii8+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE1QkVBQyIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDFfbGluZWFyXzE0MTc2XzUxNDA1NCIgeDE9IjM1LjE4NTkiIHkxPSIyMi4yNTA5IiB4Mj0iMzUuMTg1OSIgeTI9IjI3LjcxNzQiCiAgICAgICAgICAgICAgICAgICAgICAgIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzM2RDZDNCIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMxNUJFQUMiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQyX2xpbmVhcl8xNDE3Nl81MTQwNTQiIHgxPSIxMC45NzMyIiB5MT0iNDAuMTA1MyIgeDI9IjEwLjk3MzIiIHkyPSIyMy44NjUyIgogICAgICAgICAgICAgICAgICAgICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMxNkQyQkYiLz4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDNfbGluZWFyXzE0MTc2XzUxNDA1NCIgeDE9IjM3LjAyNjgiIHkxPSI0MC4xMDUzIiB4Mj0iMzcuMDI2OCIgeTI9IjIzLjg2NTIiCiAgICAgICAgICAgICAgICAgICAgICAgIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzE2RDJCRiIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50NF9saW5lYXJfMTQxNzZfNTE0MDU0IiB4MT0iMjQuMTAwMiIgeTE9IjE2LjU3NzMiIHgyPSIyNC4xMDAyIiB5Mj0iNC41NTA0MSIKICAgICAgICAgICAgICAgICAgICAgICAgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjMTZEMkJGIi8+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0id2hpdGUiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgo8L3N2Zz4K"},function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return O}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("ellipse",{cx:24,cy:25.753,rx:15.209,ry:8.969,stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8"}),i=u.a.createElement("path",{d:"M24.001 8.084v32.191",stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8"}),c=u.a.createElement("ellipse",{cx:24,cy:33.196,rx:15.209,ry:8.969,stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8"}),s=u.a.createElement("mask",{id:"a",fill:"#fff"},u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.27 31.989c-.168-.522-.898-.425-1.126.073-1.757 3.83-7.423 6.633-14.141 6.633-6.72 0-12.385-2.804-14.141-6.633-.229-.499-.958-.596-1.126-.074a5.361 5.361 0 00-.26 1.644c0 4.953 6.952 8.968 15.527 8.968s15.526-4.015 15.526-8.968c0-.561-.09-1.11-.26-1.643z"})),f=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.27 31.989c-.168-.522-.898-.425-1.126.073-1.757 3.83-7.423 6.633-14.141 6.633-6.72 0-12.385-2.804-14.141-6.633-.229-.499-.958-.596-1.126-.074a5.361 5.361 0 00-.26 1.644c0 4.953 6.952 8.968 15.527 8.968s15.526-4.015 15.526-8.968c0-.561-.09-1.11-.26-1.643z",fill:"url(#paint0_linear_14176_514100)"}),d=u.a.createElement("path",{d:"M38.144 32.062l-1.09-.5 1.09.5zm1.125-.073l-1.143.366 1.143-.366zm-2.216-.427c-.724 1.58-2.32 3.067-4.635 4.169-2.299 1.095-5.216 1.764-8.415 1.764v2.4c3.52 0 6.794-.734 9.447-1.997 2.638-1.257 4.752-3.086 5.784-5.335l-2.18-1.001zm-13.05 5.933c-3.2 0-6.117-.669-8.416-1.764-2.314-1.103-3.91-2.59-4.635-4.17l-2.181 1c1.032 2.251 3.146 4.08 5.784 5.337 2.653 1.263 5.928 1.997 9.448 1.997v-2.4zM9.676 33.632c0-.433.069-.859.203-1.277l-2.286-.733a6.562 6.562 0 00-.317 2.01h2.4zM24.003 41.4c-4.116 0-7.782-.966-10.379-2.466-2.628-1.518-3.948-3.436-3.948-5.302h-2.4c0 3.086 2.156 5.653 5.148 7.38 3.022 1.747 7.119 2.788 11.579 2.788v-2.4zm14.326-7.768c0 1.866-1.32 3.784-3.948 5.302-2.596 1.5-6.263 2.466-10.378 2.466v2.4c4.46 0 8.556-1.041 11.579-2.787 2.99-1.728 5.147-4.295 5.147-7.381h-2.4zm-.203-1.277c.134.419.203.844.203 1.277h2.4c0-.69-.11-1.363-.317-2.01l-2.286.733zm-27.174-.793a1.928 1.928 0 00-1.566-1.115c-.687-.063-1.507.284-1.793 1.175l2.286.733a.716.716 0 01-.713.482.472.472 0 01-.395-.275l2.181-1zm28.282 1a.472.472 0 01-.395.276.717.717 0 01-.713-.483l2.286-.732c-.286-.891-1.105-1.238-1.792-1.175a1.928 1.928 0 00-1.567 1.114l2.181 1z",fill:"#119E8F",mask:"url(#a)"}),p=u.a.createElement("mask",{id:"b",fill:"#fff"},u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.27 24.71c-.168-.522-.897-.425-1.126.073-1.756 3.83-7.422 6.633-14.141 6.633s-12.385-2.803-14.141-6.633c-.229-.498-.958-.595-1.125-.073a5.362 5.362 0 00-.26 1.643c0 4.953 6.951 8.969 15.526 8.969s15.526-4.016 15.526-8.969c0-.561-.089-1.11-.26-1.643z"})),m=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.27 24.71c-.168-.522-.897-.425-1.126.073-1.756 3.83-7.422 6.633-14.141 6.633s-12.385-2.803-14.141-6.633c-.229-.498-.958-.595-1.125-.073a5.362 5.362 0 00-.26 1.643c0 4.953 6.951 8.969 15.526 8.969s15.526-4.016 15.526-8.969c0-.561-.089-1.11-.26-1.643z",fill:"url(#paint1_linear_14176_514100)"}),h=u.a.createElement("path",{d:"M38.144 24.783l-1.09-.5 1.09.5zm1.125-.073l-1.142.366 1.142-.366zm-2.216-.427c-.724 1.58-2.32 3.067-4.635 4.17-2.299 1.095-5.216 1.763-8.415 1.763v2.4c3.52 0 6.795-.733 9.448-1.997 2.637-1.256 4.752-3.085 5.784-5.335l-2.182-1zm-13.05 5.933c-3.2 0-6.116-.669-8.415-1.764-2.315-1.102-3.911-2.59-4.635-4.169l-2.182 1c1.032 2.25 3.147 4.08 5.784 5.336 2.653 1.264 5.928 1.997 9.448 1.997v-2.4zM9.677 26.353c0-.432.068-.858.202-1.277l-2.285-.732a6.561 6.561 0 00-.317 2.009h2.4zm14.326 7.769c-4.115 0-7.782-.966-10.379-2.466-2.628-1.518-3.947-3.436-3.947-5.303h-2.4c0 3.087 2.156 5.653 5.147 7.381 3.023 1.746 7.12 2.788 11.579 2.788v-2.4zm14.326-7.769c0 1.867-1.32 3.785-3.947 5.303-2.597 1.5-6.264 2.466-10.379 2.466v2.4c4.46 0 8.556-1.042 11.579-2.788 2.991-1.728 5.147-4.294 5.147-7.381h-2.4zm-.202-1.277c.134.419.202.845.202 1.277h2.4c0-.69-.11-1.363-.317-2.01l-2.285.733zm-27.174-.793a1.928 1.928 0 00-1.567-1.114c-.687-.063-1.507.284-1.792 1.175l2.285.732a.716.716 0 01-.712.483.472.472 0 01-.396-.275l2.182-1zm28.282 1a.472.472 0 01-.395.276.716.716 0 01-.713-.483l2.285-.732c-.285-.891-1.105-1.238-1.792-1.175a1.928 1.928 0 00-1.567 1.114l2.182 1z",fill:"#119E8F",mask:"url(#b)"}),v=u.a.createElement("path",{d:"M38.626 16.1c0 2.02-1.424 4.019-4.098 5.563-2.65 1.531-6.37 2.507-10.528 2.507s-7.879-.976-10.529-2.507c-2.673-1.544-4.098-3.543-4.098-5.562 0-2.02 1.425-4.018 4.098-5.563 2.65-1.53 6.37-2.506 10.529-2.506 4.158 0 7.878.975 10.528 2.506 2.674 1.544 4.098 3.543 4.098 5.563z",stroke:"#119E8F",strokeWidth:1.8}),g=u.a.createElement("circle",{cx:9.29,cy:16.101,r:2.097,fill:"url(#paint2_linear_14176_514100)"}),y=u.a.createElement("circle",{cx:24.003,cy:24.704,r:2.097,fill:"url(#paint3_linear_14176_514100)"}),E=u.a.createElement("circle",{cx:24.003,cy:7.498,r:2.097,fill:"url(#paint4_linear_14176_514100)"}),b=u.a.createElement("circle",{cx:38.711,cy:16.101,r:2.097,fill:"url(#paint5_linear_14176_514100)"}),_=u.a.createElement("defs",null,u.a.createElement("linearGradient",{id:"paint0_linear_14176_514100",x1:24.003,y1:42.6,x2:24.003,y2:31.763,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"})),u.a.createElement("linearGradient",{id:"paint1_linear_14176_514100",x1:24.003,y1:35.322,x2:24.003,y2:24.484,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"})),u.a.createElement("linearGradient",{id:"paint2_linear_14176_514100",x1:8.007,y1:15.217,x2:8.007,y2:18.198,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"})),u.a.createElement("linearGradient",{id:"paint3_linear_14176_514100",x1:22.719,y1:23.82,x2:22.719,y2:26.801,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"})),u.a.createElement("linearGradient",{id:"paint4_linear_14176_514100",x1:22.719,y1:6.614,x2:22.719,y2:9.595,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"})),u.a.createElement("linearGradient",{id:"paint5_linear_14176_514100",x1:37.427,y1:15.217,x2:37.427,y2:18.198,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"}))),O=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 48 48",fill:"none",width:"1em",height:"1em"},e),o,i,c,s,f,d,p,m,h,v,g,y,E,b,_)};t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxlbGxpcHNlIGN4PSIyNCIgY3k9IjI1Ljc1MzEiIHJ4PSIxNS4yMDkzIiByeT0iOC45Njg5MSIgc3Ryb2tlPSIjQTVFQUUzIiBzdHJva2Utd2lkdGg9IjAuNiIKICAgICAgICAgICAgIHN0cm9rZS1kYXNoYXJyYXk9IjEuOCAxLjgiLz4KICAgIDxwYXRoIGQ9Ik0yNC4wMDEzIDguMDgzOThMMjQuMDAxNiA0MC4yNzUiIHN0cm9rZT0iI0E1RUFFMyIgc3Ryb2tlLXdpZHRoPSIwLjYiIHN0cm9rZS1kYXNoYXJyYXk9IjEuOCAxLjgiLz4KICAgIDxlbGxpcHNlIGN4PSIyNCIgY3k9IjMzLjE5NTUiIHJ4PSIxNS4yMDkzIiByeT0iOC45Njg5MSIgc3Ryb2tlPSIjQTVFQUUzIiBzdHJva2Utd2lkdGg9IjAuNiIKICAgICAgICAgICAgIHN0cm9rZS1kYXNoYXJyYXk9IjEuOCAxLjgiLz4KICAgIDxtYXNrIGlkPSJwYXRoLTQtaW5zaWRlLTFfMTQxNzZfNTE0MTAwIiBmaWxsPSJ3aGl0ZSI+CiAgICAgICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiCiAgICAgICAgICAgICAgZD0iTTM5LjI2OTEgMzEuOTg5QzM5LjEwMTggMzEuNDY2OSAzOC4zNzI0IDMxLjU2MzkgMzguMTQzOCAzMi4wNjIzQzM2LjM4NzQgMzUuODkxMyAzMC43MjE0IDM4LjY5NDcgMjQuMDAyOCAzOC42OTQ3QzE3LjI4MzkgMzguNjk0NyAxMS42MTc2IDM1Ljg5MSA5Ljg2MTU2IDMyLjA2MTdDOS42MzMwMSAzMS41NjMzIDguOTAzNTYgMzEuNDY2MiA4LjczNjIxIDMxLjk4ODNDOC41NjU0NiAzMi41MjEgOC40NzYyMSAzMy4wNzAyIDguNDc2MjEgMzMuNjMxNUM4LjQ3NjIxIDM4LjU4NDkgMTUuNDI3NiA0Mi42MDA0IDI0LjAwMjUgNDIuNjAwNEMzMi41Nzc1IDQyLjYwMDQgMzkuNTI4OSAzOC41ODQ5IDM5LjUyODkgMzMuNjMxNUMzOS41Mjg5IDMzLjA3MDUgMzkuNDM5NyAzMi41MjE1IDM5LjI2OTEgMzEuOTg5WiIvPgogICAgPC9tYXNrPgogICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiCiAgICAgICAgICBkPSJNMzkuMjY5MSAzMS45ODlDMzkuMTAxOCAzMS40NjY5IDM4LjM3MjQgMzEuNTYzOSAzOC4xNDM4IDMyLjA2MjNDMzYuMzg3NCAzNS44OTEzIDMwLjcyMTQgMzguNjk0NyAyNC4wMDI4IDM4LjY5NDdDMTcuMjgzOSAzOC42OTQ3IDExLjYxNzYgMzUuODkxIDkuODYxNTYgMzIuMDYxN0M5LjYzMzAxIDMxLjU2MzMgOC45MDM1NiAzMS40NjYyIDguNzM2MjEgMzEuOTg4M0M4LjU2NTQ2IDMyLjUyMSA4LjQ3NjIxIDMzLjA3MDIgOC40NzYyMSAzMy42MzE1QzguNDc2MjEgMzguNTg0OSAxNS40Mjc2IDQyLjYwMDQgMjQuMDAyNSA0Mi42MDA0QzMyLjU3NzUgNDIuNjAwNCAzOS41Mjg5IDM4LjU4NDkgMzkuNTI4OSAzMy42MzE1QzM5LjUyODkgMzMuMDcwNSAzOS40Mzk3IDMyLjUyMTUgMzkuMjY5MSAzMS45ODlaIgogICAgICAgICAgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzE0MTc2XzUxNDEwMCkiLz4KICAgIDxwYXRoIGQ9Ik0zOC4xNDM4IDMyLjA2MjNMMzcuMDUzMSAzMS41NjJMMzguMTQzOCAzMi4wNjIzWk0zOS4yNjkxIDMxLjk4OUwzOC4xMjYzIDMyLjM1NTJMMzkuMjY5MSAzMS45ODlaTTM3LjA1MzEgMzEuNTYyQzM2LjMyODcgMzMuMTQxMSAzNC43MzIzIDM0LjYyODUgMzIuNDE4IDM1LjczMUMzMC4xMTkxIDM2LjgyNjIgMjcuMjAxOCAzNy40OTQ3IDI0LjAwMjggMzcuNDk0N1YzOS44OTQ3QzI3LjUyMjQgMzkuODk0NyAzMC43OTc0IDM5LjE2MTUgMzMuNDUwMiAzNy44OTc3QzM2LjA4NzcgMzYuNjQxMyAzOC4yMDI1IDM0LjgxMjUgMzkuMjM0NSAzMi41NjI2TDM3LjA1MzEgMzEuNTYyWk0yNC4wMDI4IDM3LjQ5NDdDMjAuODAzNiAzNy40OTQ3IDE3Ljg4NjIgMzYuODI2MSAxNS41ODcyIDM1LjczMDlDMTMuMjcyOSAzNC42MjgzIDExLjY3NjUgMzMuMTQwNyAxMC45NTIzIDMxLjU2MTVMOC43NzA3OCAzMi41NjE5QzkuODAyNjEgMzQuODEyIDExLjkxNzQgMzYuNjQwOSAxNC41NTUgMzcuODk3NUMxNy4yMDc5IDM5LjE2MTQgMjAuNDgzMSAzOS44OTQ3IDI0LjAwMjggMzkuODk0N1YzNy40OTQ3Wk05LjY3NjIxIDMzLjYzMTVDOS42NzYyMSAzMy4xOTkyIDkuNzQ0NzEgMzIuNzczNCA5Ljg3ODk0IDMyLjM1NDZMNy41OTM0NyAzMS42MjJDNy4zODYyMiAzMi4yNjg2IDcuMjc2MjEgMzIuOTQxMyA3LjI3NjIxIDMzLjYzMTVIOS42NzYyMVpNMjQuMDAyNSA0MS40MDA0QzE5Ljg4NzQgNDEuNDAwNCAxNi4yMjA2IDQwLjQzNDMgMTMuNjI0IDM4LjkzNDRDMTAuOTk1OSAzNy40MTYyIDkuNjc2MjEgMzUuNDk4MyA5LjY3NjIxIDMzLjYzMTVINy4yNzYyMUM3LjI3NjIxIDM2LjcxODEgOS40MzIyNSAzOS4yODQ2IDEyLjQyMzUgNDEuMDEyNkMxNS40NDY0IDQyLjc1ODcgMTkuNTQyOCA0My44MDA0IDI0LjAwMjUgNDMuODAwNFY0MS40MDA0Wk0zOC4zMjg5IDMzLjYzMTVDMzguMzI4OSAzNS40OTgzIDM3LjAwOTIgMzcuNDE2MiAzNC4zODExIDM4LjkzNDRDMzEuNzg0NSA0MC40MzQzIDI4LjExNzcgNDEuNDAwNCAyNC4wMDI1IDQxLjQwMDRWNDMuODAwNEMyOC40NjIzIDQzLjgwMDQgMzIuNTU4NyA0Mi43NTg3IDM1LjU4MTYgNDEuMDEyNkMzOC41NzI4IDM5LjI4NDYgNDAuNzI4OSAzNi43MTgxIDQwLjcyODkgMzMuNjMxNUgzOC4zMjg5Wk0zOC4xMjYzIDMyLjM1NTJDMzguMjYwNCAzMi43NzM4IDM4LjMyODkgMzMuMTk5NCAzOC4zMjg5IDMzLjYzMTVINDAuNzI4OUM0MC43Mjg5IDMyLjk0MTYgNDAuNjE5IDMyLjI2OTIgNDAuNDExOSAzMS42MjI5TDM4LjEyNjMgMzIuMzU1MlpNMTAuOTUyMyAzMS41NjE1QzEwLjY0OSAzMC45IDEwLjAyMDkgMzAuNTA1NyA5LjM4NTc2IDMwLjQ0NzNDOC42OTg5NCAzMC4zODQyIDcuODc5MTMgMzAuNzMwOCA3LjU5MzQ3IDMxLjYyMkw5Ljg3ODk0IDMyLjM1NDZDOS44MzQ5OCAzMi40OTE3IDkuNzI5NjUgMzIuNjQyNyA5LjU2MTgzIDMyLjc0MkM5LjQwNzg3IDMyLjgzMzIgOS4yNjE3MyAzMi44NDYxIDkuMTY2MTIgMzIuODM3M0M4Ljk5NDY5IDMyLjgyMTUgOC44NDU1OSAzMi43MjUgOC43NzA3OCAzMi41NjE5TDEwLjk1MjMgMzEuNTYxNVpNMzkuMjM0NSAzMi41NjI2QzM5LjE1OTcgMzIuNzI1NyAzOS4wMTA2IDMyLjgyMjIgMzguODM5MSAzMi44Mzc5QzM4Ljc0MzUgMzIuODQ2NyAzOC41OTc0IDMyLjgzMzggMzguNDQzNCAzMi43NDI2QzM4LjI3NTYgMzIuNjQzMyAzOC4xNzAzIDMyLjQ5MjMgMzguMTI2MyAzMi4zNTUyTDQwLjQxMTkgMzEuNjIyOUM0MC4xMjY0IDMwLjczMTYgMzkuMzA2NiAzMC4zODQ5IDM4LjYxOTggMzAuNDQ4QzM3Ljk4NDYgMzAuNTA2MyAzNy4zNTY1IDMwLjkwMDUgMzcuMDUzMSAzMS41NjJMMzkuMjM0NSAzMi41NjI2WiIKICAgICAgICAgIGZpbGw9IiMxMTlFOEYiIG1hc2s9InVybCgjcGF0aC00LWluc2lkZS0xXzE0MTc2XzUxNDEwMCkiLz4KICAgIDxtYXNrIGlkPSJwYXRoLTYtaW5zaWRlLTJfMTQxNzZfNTE0MTAwIiBmaWxsPSJ3aGl0ZSI+CiAgICAgICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiCiAgICAgICAgICAgICAgZD0iTTM5LjI2OTQgMjQuNzEwMUMzOS4xMDIxIDI0LjE4OCAzOC4zNzI3IDI0LjI4NTEgMzguMTQ0MSAyNC43ODM0QzM2LjM4NzkgMjguNjEyNiAzMC43MjE3IDMxLjQxNiAyNC4wMDMgMzEuNDE2QzE3LjI4NDMgMzEuNDE2IDExLjYxODEgMjguNjEyNiA5Ljg2MTkgMjQuNzgzM0M5LjYzMzM0IDI0LjI4NDkgOC45MDM5IDI0LjE4NzkgOC43MzY1NiAyNC43MUM4LjU2NTg2IDI1LjI0MjYgOC40NzY2NCAyNS43OTE4IDguNDc2NjQgMjYuMzUzQzguNDc2NjQgMzEuMzA2NCAxNS40MjggMzUuMzIxOSAyNC4wMDMgMzUuMzIxOUMzMi41Nzc5IDM1LjMyMTkgMzkuNTI5MyAzMS4zMDY0IDM5LjUyOTMgMjYuMzUzQzM5LjUyOTMgMjUuNzkxOCAzOS40NDAxIDI1LjI0MjcgMzkuMjY5NCAyNC43MTAxWiIvPgogICAgPC9tYXNrPgogICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiCiAgICAgICAgICBkPSJNMzkuMjY5NCAyNC43MTAxQzM5LjEwMjEgMjQuMTg4IDM4LjM3MjcgMjQuMjg1MSAzOC4xNDQxIDI0Ljc4MzRDMzYuMzg3OSAyOC42MTI2IDMwLjcyMTcgMzEuNDE2IDI0LjAwMyAzMS40MTZDMTcuMjg0MyAzMS40MTYgMTEuNjE4MSAyOC42MTI2IDkuODYxOSAyNC43ODMzQzkuNjMzMzQgMjQuMjg0OSA4LjkwMzkgMjQuMTg3OSA4LjczNjU2IDI0LjcxQzguNTY1ODYgMjUuMjQyNiA4LjQ3NjY0IDI1Ljc5MTggOC40NzY2NCAyNi4zNTNDOC40NzY2NCAzMS4zMDY0IDE1LjQyOCAzNS4zMjE5IDI0LjAwMyAzNS4zMjE5QzMyLjU3NzkgMzUuMzIxOSAzOS41MjkzIDMxLjMwNjQgMzkuNTI5MyAyNi4zNTNDMzkuNTI5MyAyNS43OTE4IDM5LjQ0MDEgMjUuMjQyNyAzOS4yNjk0IDI0LjcxMDFaIgogICAgICAgICAgZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzE0MTc2XzUxNDEwMCkiLz4KICAgIDxwYXRoIGQ9Ik0zOC4xNDQxIDI0Ljc4MzRMMzcuMDUzMyAyNC4yODMyTDM4LjE0NDEgMjQuNzgzNFpNMzkuMjY5NCAyNC43MTAxTDM4LjEyNjcgMjUuMDc2M0wzOS4yNjk0IDI0LjcxMDFaTTM3LjA1MzMgMjQuMjgzMkMzNi4zMjkxIDI1Ljg2MjMgMzQuNzMyNyAyNy4zNDk4IDMyLjQxODQgMjguNDUyM0MzMC4xMTk0IDI5LjU0NzUgMjcuMjAyMSAzMC4yMTYgMjQuMDAzIDMwLjIxNlYzMi42MTZDMjcuNTIyNiAzMi42MTYgMzAuNzk3NyAzMS44ODI4IDMzLjQ1MDYgMzAuNjE5QzM2LjA4ODEgMjkuMzYyNSAzOC4yMDI5IDI3LjUzMzcgMzkuMjM0OCAyNS4yODM3TDM3LjA1MzMgMjQuMjgzMlpNMjQuMDAzIDMwLjIxNkMyMC44MDM5IDMwLjIxNiAxNy44ODY2IDI5LjU0NzUgMTUuNTg3NiAyOC40NTIzQzEzLjI3MzMgMjcuMzQ5OCAxMS42NzY5IDI1Ljg2MjMgMTAuOTUyNyAyNC4yODMxTDguNzcxMTQgMjUuMjgzNkM5LjgwMzA2IDI3LjUzMzYgMTEuOTE3OSAyOS4zNjI1IDE0LjU1NTQgMzAuNjE5QzE3LjIwODMgMzEuODgyOCAyMC40ODM0IDMyLjYxNiAyNC4wMDMgMzIuNjE2VjMwLjIxNlpNOS42NzY2NCAyNi4zNTNDOS42NzY2NCAyNS45MjA3IDkuNzQ1MTEgMjUuNDk1IDkuODc5MzEgMjUuMDc2Mkw3LjU5MzgyIDI0LjM0MzhDNy4zODY2MSAyNC45OTAzIDcuMjc2NjQgMjUuNjYyOSA3LjI3NjY0IDI2LjM1M0g5LjY3NjY0Wk0yNC4wMDMgMzQuMTIxOUMxOS44ODc4IDM0LjEyMTkgMTYuMjIxIDMzLjE1NTggMTMuNjI0NCAzMS42NTU5QzEwLjk5NjMgMzAuMTM3NyA5LjY3NjY0IDI4LjIxOTggOS42NzY2NCAyNi4zNTNINy4yNzY2NEM3LjI3NjY0IDI5LjQzOTYgOS40MzI2OCAzMi4wMDYxIDEyLjQyNCAzMy43MzQxQzE1LjQ0NjggMzUuNDgwMiAxOS41NDMyIDM2LjUyMTkgMjQuMDAzIDM2LjUyMTlWMzQuMTIxOVpNMzguMzI5MyAyNi4zNTNDMzguMzI5MyAyOC4yMTk4IDM3LjAwOTcgMzAuMTM3NyAzNC4zODE1IDMxLjY1NTlDMzEuNzg0OSAzMy4xNTU4IDI4LjExODIgMzQuMTIxOSAyNC4wMDMgMzQuMTIxOVYzNi41MjE5QzI4LjQ2MjggMzYuNTIxOSAzMi41NTkyIDM1LjQ4MDIgMzUuNTgyIDMzLjczNDFDMzguNTczMyAzMi4wMDYxIDQwLjcyOTMgMjkuNDM5NiA0MC43MjkzIDI2LjM1M0gzOC4zMjkzWk0zOC4xMjY3IDI1LjA3NjNDMzguMjYwOCAyNS40OTUgMzguMzI5MyAyNS45MjA4IDM4LjMyOTMgMjYuMzUzSDQwLjcyOTNDNDAuNzI5MyAyNS42NjI5IDQwLjYxOTQgMjQuOTkwNCA0MC40MTIyIDI0LjM0MzlMMzguMTI2NyAyNS4wNzYzWk0xMC45NTI3IDI0LjI4MzFDMTAuNjQ5MyAyMy42MjE2IDEwLjAyMTIgMjMuMjI3NCA5LjM4NjAzIDIzLjE2OUM4LjY5OTIxIDIzLjEwNTkgNy44Nzk0MyAyMy40NTI2IDcuNTkzODIgMjQuMzQzOEw5Ljg3OTMxIDI1LjA3NjJDOS44MzUzNiAyNS4yMTM0IDkuNzMwMDQgMjUuMzY0MyA5LjU2MjIyIDI1LjQ2MzdDOS40MDgyNyAyNS41NTQ4IDkuMjYyMTIgMjUuNTY3NyA5LjE2NjUxIDI1LjU1ODlDOC45OTUwNyAyNS41NDMyIDguODQ1OTYgMjUuNDQ2NyA4Ljc3MTE0IDI1LjI4MzZMMTAuOTUyNyAyNC4yODMxWk0zOS4yMzQ4IDI1LjI4MzdDMzkuMTYgMjUuNDQ2OCAzOS4wMTA5IDI1LjU0MzMgMzguODM5NSAyNS41NTkxQzM4Ljc0MzkgMjUuNTY3OSAzOC41OTc3IDI1LjU1NSAzOC40NDM3IDI1LjQ2MzhDMzguMjc1OSAyNS4zNjQ0IDM4LjE3MDYgMjUuMjEzNSAzOC4xMjY3IDI1LjA3NjNMNDAuNDEyMiAyNC4zNDM5QzQwLjEyNjYgMjMuNDUyNyAzOS4zMDY4IDIzLjEwNjEgMzguNjIgMjMuMTY5MUMzNy45ODQ5IDIzLjIyNzUgMzcuMzU2NyAyMy42MjE3IDM3LjA1MzMgMjQuMjgzMkwzOS4yMzQ4IDI1LjI4MzdaIgogICAgICAgICAgZmlsbD0iIzExOUU4RiIgbWFzaz0idXJsKCNwYXRoLTYtaW5zaWRlLTJfMTQxNzZfNTE0MTAwKSIvPgogICAgPHBhdGggZD0iTTM4LjYyNjIgMTYuMTAwN0MzOC42MjYyIDE4LjEyIDM3LjIwMiAyMC4xMTkgMzQuNTI4NCAyMS42NjM0QzMxLjg3ODUgMjMuMTk0MSAyOC4xNTgxIDI0LjE2OTcgMjMuOTk5OCAyNC4xNjk3QzE5Ljg0MTYgMjQuMTY5NyAxNi4xMjExIDIzLjE5NDEgMTMuNDcxMiAyMS42NjM0QzEwLjc5NzcgMjAuMTE5IDkuMzczNSAxOC4xMiA5LjM3MzUgMTYuMTAwN0M5LjM3MzUgMTQuMDgxNSAxMC43OTc3IDEyLjA4MjUgMTMuNDcxMiAxMC41MzgxQzE2LjEyMTEgOS4wMDczNiAxOS44NDE2IDguMDMxODQgMjMuOTk5OCA4LjAzMTg0QzI4LjE1ODEgOC4wMzE4NCAzMS44Nzg1IDkuMDA3MzYgMzQuNTI4NCAxMC41MzgxQzM3LjIwMiAxMi4wODI1IDM4LjYyNjIgMTQuMDgxNSAzOC42MjYyIDE2LjEwMDdaIgogICAgICAgICAgc3Ryb2tlPSIjMTE5RThGIiBzdHJva2Utd2lkdGg9IjEuOCIvPgogICAgPGNpcmNsZSBjeD0iOS4yODk4IiBjeT0iMTYuMTAwOCIgcj0iMi4wOTc0MiIgZmlsbD0idXJsKCNwYWludDJfbGluZWFyXzE0MTc2XzUxNDEwMCkiLz4KICAgIDxjaXJjbGUgY3g9IjI0LjAwMjUiIGN5PSIyNC43MDM5IiByPSIyLjA5NzQyIiBmaWxsPSJ1cmwoI3BhaW50M19saW5lYXJfMTQxNzZfNTE0MTAwKSIvPgogICAgPGNpcmNsZSBjeD0iMjQuMDAyNSIgY3k9IjcuNDk3NTciIHI9IjIuMDk3NDIiIGZpbGw9InVybCgjcGFpbnQ0X2xpbmVhcl8xNDE3Nl81MTQxMDApIi8+CiAgICA8Y2lyY2xlIGN4PSIzOC43MTA2IiBjeT0iMTYuMTAwOCIgcj0iMi4wOTc0MiIgZmlsbD0idXJsKCNwYWludDVfbGluZWFyXzE0MTc2XzUxNDEwMCkiLz4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xNDE3Nl81MTQxMDAiIHgxPSIyNC4wMDI2IiB5MT0iNDIuNjAwMiIgeDI9IjI0LjAwMjYiIHkyPSIzMS43NjI2IgogICAgICAgICAgICAgICAgICAgICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMxNkQyQkYiLz4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDFfbGluZWFyXzE0MTc2XzUxNDEwMCIgeDE9IjI0LjAwMyIgeTE9IjM1LjMyMTkiIHgyPSIyNC4wMDMiIHkyPSIyNC40ODQzIgogICAgICAgICAgICAgICAgICAgICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMxNkQyQkYiLz4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDJfbGluZWFyXzE0MTc2XzUxNDEwMCIgeDE9IjguMDA2NjIiIHkxPSIxNS4yMTczIiB4Mj0iOC4wMDY2MiIgeTI9IjE4LjE5ODMiCiAgICAgICAgICAgICAgICAgICAgICAgIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzM2RDZDNCIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMxNUJFQUMiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQzX2xpbmVhcl8xNDE3Nl81MTQxMDAiIHgxPSIyMi43MTkzIiB5MT0iMjMuODIwMyIgeDI9IjIyLjcxOTMiIHkyPSIyNi44MDEzIgogICAgICAgICAgICAgICAgICAgICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMzNkQ2QzQiLz4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMTVCRUFDIi8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50NF9saW5lYXJfMTQxNzZfNTE0MTAwIiB4MT0iMjIuNzE5MyIgeTE9IjYuNjE0MDMiIHgyPSIyMi43MTkzIiB5Mj0iOS41OTQ5OSIKICAgICAgICAgICAgICAgICAgICAgICAgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjMzZENkM0Ii8+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE1QkVBQyIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDVfbGluZWFyXzE0MTc2XzUxNDEwMCIgeDE9IjM3LjQyNzQiIHkxPSIxNS4yMTczIiB4Mj0iMzcuNDI3NCIgeTI9IjE4LjE5ODMiCiAgICAgICAgICAgICAgICAgICAgICAgIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzM2RDZDNCIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMxNUJFQUMiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgo8L3N2Zz4K"},,function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(5),r(11),r(6),r(86),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(86),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(188),r(7);var u,o=n(r(315)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=n(r(451)),v=n(r(26)),g=r(433),y=n(r(790)),E=n(r(795)),b=n(r(880)),_=n(r(792)),O=l(r(793)),S=r(52),C=n(r(796)),D=r(72),k=r(878),N=r(832),T=n(r(3)),R=n(r(1128)),w=n(r(3706));function I(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function M(e){for(var t=1;t0?"builtin":"custom"},e.handleTabChange=function(t){e.setState({type:t},(function(){e.props.store.list.reset(),e.getData()}))},e.getData=function(t){e.props.store.fetchList(M(M(M({},e.props.match.params),t),{},{sortBy:"activeAt",type:e.state.type}))},e.getResourceType=function(e){var a=(0,h.default)(e);return t("ALERT_TYPE",{type:t(a)})},e.getColumns=function(){var a=e.props,r=a.getFilteredValue,n=a.getSortOrder;return[{title:t("MESSAGE"),dataIndex:"name",render:function(e,t){return m.default.createElement(y.default,{icon:"loudspeaker",title:(0,v.default)(t,"annotations.summary"),description:(0,v.default)(t,"annotations.message")||(0,v.default)(t,"annotations.description","-")})}},{title:t("STATUS"),dataIndex:"state",filters:e.getStatus(),filteredValue:r("state"),isHideable:!0,search:!0,width:"12%",render:function(e){return m.default.createElement(E.default,{type:e,name:t("ALERT_RULE_".concat(e.toUpperCase()),{defaultValue:e})})}},{title:t("SEVERITY"),dataIndex:"labels.severity",filters:e.getAlertingTypes(),filteredValue:r("labels.severity"),isHideable:!0,search:!0,width:"12%",render:function(e){return m.default.createElement(b.default,{data:e})}},{title:t("ALERTING_RULE_NAME"),dataIndex:"labels.alertname",filteredValue:r("labels.alertname"),isHideable:!0,width:"12%",search:!0},{title:t("ALERTING_POLICY"),dataIndex:"ruleName",isHideable:!0,width:"12%",render:function(t,a){var r=(0,v.default)(a,"labels.rule_group");return m.default.createElement(g.Link,{to:"builtin"===e.state.type?"".concat(e.getPrefix(),"/alert-rules/builtin/").concat(r):"".concat(e.getPrefix(),"/alert-rules/").concat(r)},r)}},{title:t("MONITORING_TARGET"),dataIndex:"labels",isHideable:!0,width:"16%",render:function(a){if("template"!==a.rule_type)return"-";var r=(0,k.getAlertingResource)(a),n=r.module,l=r.name,u=r.namespace;return n?"hpas"===n?m.default.createElement("span",null,t(D.MODULE_KIND_MAP[n]),": ",l):m.default.createElement(g.Link,{to:"".concat(e.getPrefix({namespace:u}),"/").concat(n,"/").concat(l)},t(D.MODULE_KIND_MAP[n]),": ",l):"-"}},{title:t("TRIGGER_TIME"),dataIndex:"activeAt",isHideable:!0,width:200,sorter:!0,sortOrder:n("activeAt"),render:function(e){return(0,S.getLocalTime)(e).format("YYYY-MM-DD HH:mm:ss")}}]},e}return(0,s.default)(r,[{key:"componentDidMount",value:function(){var e=this.props.match.params,t=e.cluster;!e.namespace&&this.props.store.fetchCount({cluster:t})}},{key:"getPrefix",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r=this.props.match.params,n=r.cluster,l=r.namespace,u=r.workspace;return t=t||n,a=a||l,"".concat(u?"/".concat(u):"","/clusters/").concat(t).concat(a?"/projects/".concat(a):"")}},{key:"getTableProps",value:function(){return{tableActions:M(M({},this.props.tableProps.tableActions),{},{selectActions:[]}),emptyProps:{desc:t("ALERTING_MESSAGE_EMPTY_DESC")}}}},{key:"getAlertingTypes",value:function(){return N.SEVERITY_LEVEL.map((function(e){return{text:t(e.label),value:e.value}}))}},{key:"getStatus",value:function(){return["pending","firing"].map((function(e){return{text:t("ALERT_RULE_".concat(e.toUpperCase())),value:e}}))}},{key:"render",value:function(){var e=this.props,a=e.bannerProps,r=e.tableProps;return m.default.createElement(O.ListPage,(0,o.default)({},this.props,{getData:this.getData,noWatch:!0}),m.default.createElement(_.default,(0,o.default)({},a,{tips:this.tips,tabs:this.tabs,icon:"loudspeaker",title:t("ALERTING_MESSAGE_PL"),description:t("ALERT_MESSAGE_DESC"),className:(0,T.default)(w.default.tab_button,a.className)})),m.default.createElement(C.default,(0,o.default)({},r,this.getTableProps(),{rowKey:"id",itemActions:[],columns:this.getColumns(),onCreate:this.showCreate,showKeywords:!0})))}},{key:"tabs",get:function(){var e,a,r=this.props.match.params.namespace,n=globals.app.hasKSModule("whizard"),l="none"!==(null===(e=window.parent.globals.ksConfig)||void 0===e||null===(a=e.multicluster)||void 0===a?void 0:a.clusterRole);if(r)return{};var u={value:this.state.type,onChange:this.handleTabChange,options:[{value:"custom",label:t("ALERTS_FROM_CUSTOM_POLICIES"),count:this.props.store.ruleCount}]},o=(0,S.checkComponentAuthorized)({componentName:"whizard",componentConstraints:(0,v.default)(globals,"licenseInfo.componentConstraints",[])});return l&&n?u.options.push(M({value:"builtin",label:t("ALERTS_FROM_BUILT_IN_POLICIES"),disabled:!0},o&&{tooltip:{content:t("BUILT_IN_POLICIES_TOOLTIP"),placement:"left"}})):u.options.push({value:"builtin",label:t("ALERTS_FROM_BUILT_IN_POLICIES"),count:this.props.store.builtinRuleCount}),u}},{key:"tips",get:function(){return[{title:t("REQUESTS_FOR_TRIGGER_AN_ALARM_Q"),description:t("REQUESTS_FOR_TRIGGER_AN_ALARM_A")}]}}]),r}(m.default.Component))||u;a.default=A},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_METRICS_CONFIG=t.RESOURCE_METRICS_CONFIG=void 0,a(12),a(11),a(6),a(28),a(34),a(15),a(9),a(13),a(10),a(4),a(7);var n=r(a(30)),l=r(a(3703)),u=r(a(3704)),o=r(a(3705));function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function c(e){for(var t=1;t0?"builtin":"custom"},e.fetchCount=function(){var t=e.props.match.params,a=t.cluster;!t.namespace&&e.props.store.fetchCount({cluster:a})},e.handleTabChange=function(t){e.setState({type:t},(function(){e.props.store.list.reset(),e.getData()}))},e.getData=(0,p.default)(i.default.mark((function t(){var a,r,n,l,u=arguments;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=u.length>0&&void 0!==u[0]?u[0]:{},r=a.silent,n=(0,s.default)(a,["silent"]),l=e.props.store,r&&(l.list.silent=!0),t.next=5,l.fetchList(j(j(j({},e.props.match.params),n),{},{limit:n.limit||l.list.limit||10,page:n.page||l.list.page||1,type:e.state.type}));case 5:l.list.silent=!1;case 6:case"end":return t.stop()}}),t)}))),e.getColumns=function(){var a=e.props.getFilteredValue;return[{title:t("NAME"),dataIndex:"name",search:!0,render:function(t,a){return S.default.createElement(E.default,{avatar:"/assets/bell_gear_duotone.svg",title:(0,N.getDisplayName)(a),desc:a.description,className:P.default["table-icon"],to:"builtin"===e.state.type?"".concat(e.props.match.url,"/builtin/").concat(a.name):"".concat(e.props.match.url,"/").concat(t)})}},{title:t("POLICY_STATUS"),dataIndex:"enable",filters:e.getEnableFilter(),filteredValue:a("enable"),isHideable:!0,search:!0,width:"16%",render:function(e,a){return S.default.createElement(b.default,{className:P.default.status_icon,type:a.enabled&&JSON.parse(a.enabled)?"active":"disabled",name:a.enabled&&JSON.parse(a.enabled)?t("ENABLED"):t("DISABLED")})}},{title:t("RULE_STATUS"),dataIndex:"state",search:!0,filters:e.getStatus(),isHideable:!0,width:"16%",render:function(e,t){return S.default.createElement(M.default,{rulesStats:t.rulesStats})}},{title:t("TIME_SPENT"),dataIndex:"evaluationTime",isHideable:!0,width:"12%",render:function(e){return S.default.createElement("span",null,"-"!==e?t("TIME_S",{num:e}):e)}},{title:t("RECENT_DETECT_TIME"),dataIndex:"lastEvaluation",isHideable:!0,width:"15.8%",render:function(e,t){var a=(0,k.default)(t._originDataWithStatus,"status.lastEvaluation");return S.default.createElement("span",null,a?(0,N.getLocalTime)(a).format("YYYY-MM-DD HH:mm:ss"):"-")}}]},e.showCreate=function(){var a=e.props,r=a.match,n=a.routing,l=a.module;return e.props.trigger("alerting.policy.create",{module:l,cluster:r.params.cluster,namespace:r.params.namespace,title:t("CREATE_ALERTING_POLICY"),success:function(){n.query(),e.fetchCount()}})},e}return(0,h.default)(n,[{key:"componentDidMount",value:function(){this.fetchCount(),localStorage.removeItem("alert-policy-detail-referrer")}},{key:"getStatus",value:function(){return T.ALERTING_STATUS.map((function(e){return{text:t("ALERT_RULE_".concat(e.toUpperCase())),value:e}}))}},{key:"getEnableFilter",value:function(){return[{text:t("ENABLED"),value:"true"},{text:t("DISABLED"),value:"false"}]}},{key:"getAlertingTypes",value:function(){return D.SEVERITY_LEVEL.map((function(e){return{text:t(e.label),value:e.value}}))}},{key:"render",value:function(){var e=this.props,t=e.bannerProps,a=e.tableProps,r=this.showCreate,n=this.tableActions;return"builtin"===this.state.type&&(n.selectActions=n.selectActions.filter((function(e){return"delete"!==e.action})).concat(this.resetPolicy),r=null),S.default.createElement(O.ListPage,(0,o.default)({},this.props,{getData:this.getData,noWatch:!0}),S.default.createElement(_.default,(0,o.default)({},t,{icon:function(){return S.default.createElement("img",{src:"/assets/bell_gear_duotone.svg"})},tips:this.tips,tabs:this.tabs,className:(0,R.default)(P.default.tab_button,t.className)})),S.default.createElement(C.default,(0,o.default)({},a,{rowKey:"name",itemActions:this.itemActions,columns:this.getColumns(),tableActions:n,onCreate:r})))}},{key:"tabs",get:function(){var e,a,r=this.props.match.params.namespace,n=globals.app.hasKSModule("whizard"),l="none"!==(null===(e=window.parent.globals.ksConfig)||void 0===e||null===(a=e.multicluster)||void 0===a?void 0:a.clusterRole);if(r)return{};var u={value:this.state.type,onChange:this.handleTabChange,options:[{value:"custom",label:t("CUSTOM_POLICIES"),count:this.props.store.ruleCount}]},o=(0,N.checkComponentAuthorized)({componentName:"whizard",componentConstraints:(0,k.default)(globals,"licenseInfo.componentConstraints",[])});return l&&n?u.options.push(j({value:"builtin",label:t("BUILT_IN_POLICIES"),disabled:!0},o&&{tooltip:{content:t("BUILT_IN_POLICIES_TOOLTIP"),placement:"left"}})):u.options.push({value:"builtin",label:t("BUILT_IN_POLICIES"),count:this.props.store.builtinRuleCount}),u}},{key:"tips",get:function(){return[{title:t("REQUESTS_FOR_PUSH_AN_ALARM_Q"),description:t("REQUESTS_FOR_PUSH_AN_ALARM_A")}]}},{key:"itemActions",get:function(){var a=this,r=this.props,n=r.trigger,l=r.routing,u=r.match,o=r.name,i=this.state.type,c=[{key:"edit",icon:"pen",text:t("EDIT_INFORMATION"),action:"edit",onClick:function(a){n("alerting.baseinfo.edit",{type:i,detail:a,module:e,cluster:u.params.cluster,namespace:u.params.namespace,title:t("EDIT_ALERTING_POLICY"),success:l.query})}},{key:"editYaml",icon:"pen",text:t("EDIT_YAML"),action:"edit",onClick:function(e){return n("alerting.yaml.edit",{type:i,detail:e,cluster:u.params.cluster,namespace:u.params.namespace,title:t("EDIT_ALERTING_POLICY"),success:l.query})}},{key:"editRule",icon:"wrench",text:t("EDIT_ALERT_RULES"),action:"edit",onClick:function(e){n("alerting.rule.edit",{type:i,detail:e,cluster:u.params.cluster,namespace:u.params.namespace,success:l.query})}},{key:"disablePolicy",icon:function(e){return JSON.parse(e.enabled)?"stop":"start"},text:function(e){return JSON.parse(e.enabled)?t("DISABLE"):t("ENABLE")},action:"edit",onClick:function(e){var a=JSON.parse(e.enabled);n(a?"alerting.rule.update":"enable.alerting.rule",{type:i,detail:e,cluster:u.params.cluster,namespace:u.params.namespace,resourceName:o,success:l.query,title:a?t("DISABLE_ALERTING_POLICY"):t("ENABLE_ALERTING_POLICY"),enabled:a})}}];return"builtin"===i?c.push(this.resetPolicy):c.push({key:"delete",icon:"trash",text:t("DELETE"),action:"delete",onClick:function(e){return n("alerting.rule.delete",{type:i,name:o,cluster:u.params.cluster,namespace:u.params.namespace,detail:e,success:function(){l.query(),a.fetchCount()}})}}),c}},{key:"tableActions",get:function(){var e=this.props,a=e.tableProps,r=e.trigger,n=e.name,l=e.store,o=e.match,i=e.routing,c=this.state.type,s=(0,w.toJS)(l.list.data),f=(0,w.toJS)(l.list.selectedRowKeys),d=s.filter((function(e){return f.includes(e.name)})).every((function(e){return!JSON.parse(e.enabled)})),p=s.filter((function(e){return f.includes(e.name)})).every((function(e){return JSON.parse(e.enabled)}));return j(j({},a.tableActions),{},{selectActions:[].concat((0,u.default)(a.tableActions.selectActions),[{key:"enable",text:t("ENABLE"),action:"edit",disabled:p,onClick:function(){r("enable.alerting.rule",{type:c,resourceName:n,cluster:o.params.cluster,namespace:o.params.namespace,title:t("ENABLE_ALERTING_POLICY"),enabled:!1,success:i.query,batchMode:!0})}},{key:"disable",text:t("DISABLE"),action:"edit",disabled:d,onClick:function(){r("alerting.rule.update",{type:c,resourceName:n,cluster:o.params.cluster,namespace:o.params.namespace,enabled:!0,success:i.query,batchMode:!0})}}])})}},{key:"resetPolicy",get:function(){var e=this.props,a=e.match,r=e.trigger,n=e.routing,l=this.state.type;return{key:"reset",icon:"restart",text:t("RESET"),action:"edit",onClick:function(e){return r("alerting.rule.reset",{type:l,cluster:a.params.cluster,detail:e,success:n.query})}}}}]),n}(S.default.Component),U=(0,O.default)({store:new I.default,module:"rules",authKey:"rulegroups",name:"ALERTING_POLICY"})(d=function(e){(0,v.default)(a,e);var t=L(a);function a(){return(0,m.default)(this,a),t.apply(this,arguments)}return a}(x))||d;a.default=U;var z=(0,O.default)({store:new I.default,module:"rules",authKey:"clusterrulegroups",name:"ALERTING_POLICY"})(f=function(e){(0,v.default)(a,e);var t=L(a);function a(){return(0,m.default)(this,a),t.apply(this,arguments)}return a}(x))||f;a.ClusterAlertingPolicies=z}).call(this,r(138)(e))},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(98),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(30)),u=n(r(96));r(18),r(98);var o=n(r(0)),i=r(186),c=n(r(3)),s=n(r(3707)),f=function(e){var a=e.rulesStats,r={pending:t("ALERT_RULE_PENDING"),inactive:t("ALERT_RULE_INACTIVE"),firing:t("ALERT_RULE_FIRING"),disabled:t("DISABLED")},n=Object.entries(a).map((function(e){var t=(0,u.default)(e,2),a=t[0],n=t[1];return{label:r[a],type:a,value:n}}));return o.default.createElement(i.Tooltip,{content:o.default.createElement(o.default.Fragment,null,n.map((function(e,t){return o.default.createElement("div",{key:t,className:(0,c.default)(s.default.tipContent,[s.default[e.type]],(0,l.default)({},s.default.disabled,0===e.value))},o.default.createElement("span",null,e.label),o.default.createElement("span",null,e.value))}))),placement:"right"},o.default.createElement("ul",{className:s.default.statusBox},n.map((function(e,t){return o.default.createElement("li",{key:t,className:(0,c.default)([s.default["li-".concat(e.type)]],(0,l.default)({},s.default.iconDisabled,0===e.value))},e.value)}))))};a.default=f},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(827),a(11),a(6),a(9),a(13),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.getClassNames=c,t.mapProps=void 0;var n=r(a(30)),l=r(a(58));a(12),a(5),a(827),a(11),a(6),a(28),a(34),a(15),a(9),a(13),a(10),a(4),a(7);var u=r(a(3));function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:24,n=c(e),u=n.className,o=n.colorProps,s=e.size,f=e.width,d=e.height,p=(e.primary,e.secondary,e.variant,(0,l.default)(e,["size","width","height","primary","secondary","variant"]));return i(i(i({width:null!==(t=null!=s?s:f)&&void 0!==t?t:r,height:null!==(a=null!=s?s:d)&&void 0!==a?a:r,viewBox:"0 0 ".concat(r," ").concat(r),xmlns:"http://www.w3.org/2000/svg"},p),o),{},{className:u})}},,,function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(84),r(86),r(18),r(48),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(17),r(85),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.Component=a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(84),r(86),r(18),r(28),r(48),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(85),r(7);var l,u,o,i,c,s=n(r(61)),f=n(r(30)),d=n(r(65)),p=n(r(36)),m=n(r(37)),h=n(r(88)),v=n(r(55)),g=n(r(56)),y=n(r(51)),E=n(r(49)),b=(n(r(66)),r(186)),_=n(r(3)),O=n(r(788)),S=n(r(846)),C=n(r(1047)),D=n(r(886)),k=n(r(987)),N=n(r(158)),T=r(14),R=r(239),w=n(r(0)),I=n(r(1209)),M=n(r(1401)),P=n(r(1211)),A=r(52),j=r(72),L=r(794),x=n(r(3727));function U(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function z(e){for(var t=1;t0||a.indexOf("used_requests")>0)&&(r=(0,N.default)(l)||""===l?"N/A":""),!r){var u=j.MONITOR_RANK_UNIT_MAP[a],o=null!=l?l:0;"%"===u?r="".concat((0,L.getValueByUnit)(o,u),"%"):""===u?r=Math.round(100*o)/100:(n=(0,L.getSuitableUnit)(o,u),r=(0,L.getValueByUnit)(o,n))}return"".concat("gpu"===n?"".concat(r," GPU"):"core"===n?t("VALUE_CORES",{value:r}):t("VALUE_UNIT",{value:r,unit:n}))},e.renderQos=function(e){return w.default.createElement(w.default.Fragment,null,e.qos_class&&w.default.createElement(b.Tooltip,{content:j.COLOR_QOS[e.qos_class].label},w.default.createElement("span",{style:{display:"inline-block",marginRight:"4px",width:"16px",height:"16px",lineHeight:"16px",textAlign:"center",borderRadius:"2px",color:j.COLOR_QOS[e.qos_class].color,background:j.COLOR_QOS[e.qos_class].background}},e.qos_class.slice(0,1).toUpperCase())))},e.fetchRankData=function(t){e.store.fetchAll(z(z({},t),{},{cluster_resources_filter:e.clusters}))},(0,d.default)(e,"onChange",i,(0,h.default)(e)),(0,d.default)(e,"handleColumnsHide",c,(0,h.default)(e)),e}return(0,m.default)(r,[{key:"componentDidMount",value:function(){this.fetchRankData()}},{key:"renderToolbar",value:function(){return w.default.createElement("div",{className:(0,_.default)(x.default.toolbar,x.default.pane__toolbar,x.default.pane)},w.default.createElement(b.RadioGroup,{wrapClassName:"radio-group-button",value:this.type,onChange:this.onChange},w.default.createElement(b.RadioButton,{value:"node"},t("NODE_PL")),w.default.createElement(b.RadioButton,{value:"project"},t("PROJECT_PL")),w.default.createElement(b.RadioButton,{value:"pod"},t("POD_PL"))),w.default.createElement("div",{className:x.default.toolbar_filter},w.default.createElement(C.default,{className:x.default.columnMenu,title:t("CUSTOM_COLUMNS"),columns:this.columns,value:(0,T.toJS)(this.hideColumns),onChange:this.handleColumnsHide}),w.default.createElement(b.Select,{value:this.store.sort_metric,onChange:this.store.changeSortMetric,options:this.options}),w.default.createElement(b.Select,{className:x.default.sortTypeSelect,value:this.store.sort_type,onChange:this.store.changeSortType,options:[{value:"desc",label:t("SORT_BY_DESC")},{value:"asc",label:t("SORT_BY_ASC")}]})))}},{key:"renderList",value:function(){var e=this.store.data.toJS();return w.default.createElement("div",{className:x.default.listContainer},w.default.createElement(k.default,{columns:this.filteredColumns,dataSource:e,emptyText:w.default.createElement(S.default,null),loading:this.store.isLoading,store:this.store}),this.renderPagination())}},{key:"renderPagination",value:function(){var e=this.store,t=e.page,a=e.total,r=e.limit;return w.default.createElement("div",{className:(0,_.default)(x.default.pane,x.default.pane__pagination)},w.default.createElement(D.default,{page:t,total:a,limit:r,onChange:this.store.changePagination}))}},{key:"render",value:function(){return w.default.createElement("div",{className:x.default.wrapper},this.renderToolbar(),this.renderList())}},{key:"store",get:function(){return this.sourceMap[this.type].store}},{key:"cluster",get:function(){return this.props.cluster}},{key:"options",get:function(){var e=this,a=this.sourceMap[this.type].name;return this.store.sort_metric_options.filter((function(t){return!(0,T.toJS)(e.hideColumns).includes("".concat(t,"-").concat(a))})).map((function(e){return{value:e,label:t("SORT_BY_".concat(e.toUpperCase()))}}))}},{key:"columns",get:function(){var e,a=this,r=this.sourceMap[this.type],n=r.store,l=r.icon,u=r.name,o=r.url,i=r.desc,c=r.descLabel,f=null===(e=n.sort_metric_options)||void 0===e?void 0:e.map((function(e){return{key:"".concat(e,"-").concat(u),sort_metric:e,title:t("".concat(j.MONITOR_RANK_METERIC_LOCALS[e],"_TCAP")),isHideable:!0,render:function(t){return w.default.createElement("div",null,w.default.createElement("h3",null,a.transData(t,e)))}}})),d=[{title:t("namespace"===u?"PROJECT":u.toUpperCase()),width:"15%",key:u,render:function(e){var r=c?"".concat(t(c),": ").concat(null==e?void 0:e[i]," || '-'"):null==e?void 0:e[i];"WORKSPACES"===c&&(r=w.default.createElement("span",null,"".concat(t(c),": "),(0,A.showNameAndAlias)(null==e?void 0:e[i],"workspace")||"-")),"PROJECTS"===c&&(r=w.default.createElement("span",null,"".concat(t(c),": "),(0,A.showNameAndAlias)(null==e?void 0:e[i],"project")||"-"));var n=a.renderQos(e);return w.default.createElement(O.default,{className:x.default.avatar,icon:l,title:w.default.createElement(w.default.Fragment,null,n,"namespace"===u?(0,A.showNameAndAlias)(null==e?void 0:e[u],"project"):(null==e?void 0:e[u])||"-"),desc:r,iconSize:40,to:o(null==e?void 0:e[u],null==e?void 0:e.namespace)})}}];return(0,A.hideGPUByLicense)([].concat(d,(0,s.default)(f)),this.cluster)}},{key:"filteredColumns",get:function(){var e=this;return this.columns.filter((function(t){return!e.hideColumns.includes(t.key||t.dataIndex)}))}}]),r}(w.default.Component),u=(0,E.default)(l.prototype,"type",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"node"}}),o=(0,E.default)(l.prototype,"hideColumns",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),i=(0,E.default)(l.prototype,"onChange",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.store.sort_metric=e.store.sort_metric_options[0],e.hideColumns=[],new Promise((function(a){e.type=t,a()})).then((function(){e.fetchRankData()}))}}}),c=(0,E.default)(l.prototype,"handleColumnsHide",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.hideColumns=t;var a=e.sourceMap[e.type].name;if(t.includes("".concat(e.store.sort_metric,"-").concat(a))){var r,n=e.store.sort_metric_options.filter((function(e){return!t.includes("".concat(e,"-").concat(a))}));e.store.changeSortMetric(null!==(r=n[0])&&void 0!==r?r:"")}}}}),l),B=(0,R.inject)("rootStore")((0,R.observer)(V));a.default=B;var Y=V;a.Component=Y},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=e.mertic,r=void 0===a?{}:a,n=e.unit,l=e.resourceType,d=(0,o.useState)("requests"),p=(0,u.default)(d,2),m=p[0],h=p[1],v=(0,o.useState)(0),g=(0,u.default)(v,2),y=g[0],E=g[1];(0,o.useEffect)((function(){var e=0;0===r.total||(0,s.default)(r)||(e=("requests"===m?r.requests:r.limits)/r.total*100);E(e)}),[m,r]),(0,o.useEffect)((function(){h("requests")}),[l]);var b=(0,o.useCallback)((function(e){h(e)}),[]);return o.default.createElement("div",{className:f.default.resourceRatio},o.default.createElement("div",{className:f.default.subTitle},o.default.createElement(i.RadioGroup,{mode:"button",value:m,onChange:b},o.default.createElement(i.RadioButton,{value:"requests"},t("QUOTA_REQUEST")),o.default.createElement(i.RadioButton,{value:"limit"},t("QUOTA_LIMIT")))),o.default.createElement("div",{className:f.default.radio},o.default.createElement("div",{className:f.default.radioWrapper},o.default.createElement("p",null,t("QUOTA_ALLOCATED")),o.default.createElement("p",null,"core"===n?t("VALUE_CORES",{value:"requests"===m?r.requests:r.limits}):t("VALUE_UNIT",{value:"requests"===m?r.requests:r.limits,unit:n}))),o.default.createElement("div",{className:f.default.middleStyle},"VS"),o.default.createElement("div",{className:f.default.radioWrapper},o.default.createElement("p",null,t("QUOTA_TOTAL")),o.default.createElement("p",null,"core"===n?t("VALUE_CORES",{value:r.total}):t("VALUE_UNIT",{value:r.total,unit:n})))),o.default.createElement(c.default,{bgColor:"#eff4f9",maskBgColor:"#E3E9EF",percent:y}))};var u=l(r(96)),o=n(r(0)),i=r(186),c=l(r(1315)),s=l(r(63)),f=l(r(3739))},,,,function(e,t,a){e.exports={wrapper:"_7Y1PQK32lHq_nx8invFr0",title:"_5BsEswWpOXBRPzjAZKp1l",list:"_1-TRSuTGmycV9Jbf6f7cpA",item:"_1pTjLQ2gTmTYiDPkGxZqs2",icon:"_2cbC1jSIwrgYRS-VGF7pLk",status:"_2WFWmQJcW69bXrhE9fKVNp",info:"JQMG4HZH7ovOKnUMWyvnA",tag:"_2eqdBFa45ohBJ99HTLfZZX",emtpy:"_1Pwr7wYX9Uxhe5lB9-IvjM"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(84),r(27),r(190),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(84),r(42),r(27),r(190),r(4),r(23),r(57),r(17),r(85);var l,u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=r(239),p=n(r(26)),m=n(r(158)),h=r(52),v=r(794),g=r(186),y=n(r(846)),E=n(r(1810)),b=n(r(987)),_=n(r(3825));function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var S=(0,d.observer)(l=function(e){(0,i.default)(r,e);var a=O(r);function r(){var e;(0,u.default)(this,r);for(var n=arguments.length,l=new Array(n),o=0;o1&&void 0!==arguments[1]?arguments[1]:"";return isNaN(e)?"-":"".concat(e," ").concat(t)}},{key:"render",value:function(){var e=this.props,t=e.theme,a=e.store,r=e.cluster,n=this.props.store.data,l=(0,v.hideGPUByLicense)(this.columns,r);return h.default.createElement(p.default,{rowKey:"namespace",theme:t,columns:l,store:a,dataSource:n.toJS(),emptyText:h.default.createElement(d.default,null)})}},{key:"prefix",get:function(){var e=this.props,t=e.workspace,a=e.cluster;return"".concat(t?"/".concat(t):"","/clusters/").concat(a,"/projects")}}]),r}(h.default.Component))||l)||l;a.default=E},function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return i}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("g",{fill:"none",fillRule:"evenodd"},u.a.createElement("path",{fill:"#FFF",d:"M40 20.95c0-3.376-2.09-6.294-5.192-7.442.131-.714.197-1.438.196-2.164C35.004 5.082 29.943 0 23.706 0c-3.624 0-7.02 1.738-9.143 4.721a5.878 5.878 0 00-3.657-1.246c-3.298 0-6.008 2.689-6.008 6.033 0 .721.13 1.443.36 2.099C2.122 12.689 0 15.705 0 19.049a7.93 7.93 0 005.224 7.476 11.64 11.64 0 00-.195 2.163c0 6.23 5.06 11.312 11.265 11.312 3.657 0 7.02-1.77 9.143-4.721a6.002 6.002 0 003.69 1.278c3.297 0 6.008-2.688 6.008-6.032 0-.722-.131-1.443-.36-2.099 3.07-1.115 5.225-4.13 5.225-7.475z"}),u.a.createElement("path",{fill:"#F4BD19",d:"M15.38 17.726l8.98 4.092 9.08-7.921c.131-.658.198-1.327.196-1.997 0-5.565-4.539-10.082-10.131-10.082-3.356 0-6.48 1.637-8.355 4.386l-1.514 7.791 1.744 3.732z"}),u.a.createElement("path",{fill:"#3CBEB1",d:"M6.56 26.097a10.3 10.3 0 00-.196 2.02c0 5.537 4.557 10.065 10.13 10.065a10.21 10.21 0 008.394-4.398l1.476-7.752-2-3.779-8.984-4.071-8.82 7.915z"}),u.a.createElement("path",{fill:"#E9478C",d:"M5.764 11.246l6.429 1.481 1.443-7.172c-.893-.673-1.96-1.01-3.094-1.01-2.784 0-5.087 2.223-5.087 4.984 0 .572.103 1.178.309 1.717z"}),u.a.createElement("path",{fill:"#2C458F",d:"M5.473 12.727c-2.7.884-4.564 3.534-4.564 6.413 0 2.814 1.703 5.333 4.275 6.315l8.452-7.787-1.542-3.37-6.621-1.57z"}),u.a.createElement("path",{fill:"#95C63D",d:"M25.455 34.41a5.115 5.115 0 003.072 1.045c2.796 0 5.11-2.223 5.11-4.984 0-.606-.104-1.178-.311-1.717l-6.456-1.481-1.415 7.138z"}),u.a.createElement("path",{fill:"#176655",d:"M27.192 25.702l6.505 1.57c2.653-.915 4.485-3.533 4.485-6.412 0-2.814-1.674-5.3-4.2-6.315l-8.527 7.722 1.737 3.435z"})),i=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 40 40",width:"1em",height:"1em"},e),o)};t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggZmlsbD0iI0ZGRiIgZD0iTTQwIDIwLjk1YzAtMy4zNzYtMi4wOS02LjI5NC01LjE5Mi03LjQ0Mi4xMzEtLjcxNC4xOTctMS40MzguMTk2LTIuMTY0QzM1LjAwNCA1LjA4MiAyOS45NDMgMCAyMy43MDYgMGMtMy42MjQgMC03LjAyIDEuNzM4LTkuMTQzIDQuNzIxYTUuODc4IDUuODc4IDAgMCAwLTMuNjU3LTEuMjQ2Yy0zLjI5OCAwLTYuMDA4IDIuNjg5LTYuMDA4IDYuMDMzIDAgLjcyMS4xMyAxLjQ0My4zNiAyLjA5OUMyLjEyMiAxMi42ODkgMCAxNS43MDUgMCAxOS4wNDlhNy45MyA3LjkzIDAgMCAwIDUuMjI0IDcuNDc2Yy0uMTMuNjg4LS4xOTUgMS40MS0uMTk1IDIuMTYzIDAgNi4yMyA1LjA2IDExLjMxMiAxMS4yNjUgMTEuMzEyIDMuNjU3IDAgNy4wMi0xLjc3IDkuMTQzLTQuNzIxYTYuMDAyIDYuMDAyIDAgMCAwIDMuNjkgMS4yNzhjMy4yOTcgMCA2LjAwOC0yLjY4OCA2LjAwOC02LjAzMiAwLS43MjItLjEzMS0xLjQ0My0uMzYtMi4wOTkgMy4wNy0xLjExNSA1LjIyNS00LjEzIDUuMjI1LTcuNDc1eiIvPgogICAgICAgIDxwYXRoIGZpbGw9IiNGNEJEMTkiIGQ9Ik0xNS4zOCAxNy43MjZsOC45OCA0LjA5MiA5LjA4LTcuOTIxYy4xMzEtLjY1OC4xOTgtMS4zMjcuMTk2LTEuOTk3IDAtNS41NjUtNC41MzktMTAuMDgyLTEwLjEzMS0xMC4wODItMy4zNTYgMC02LjQ4IDEuNjM3LTguMzU1IDQuMzg2bC0xLjUxNCA3Ljc5MSAxLjc0NCAzLjczMnoiLz4KICAgICAgICA8cGF0aCBmaWxsPSIjM0NCRUIxIiBkPSJNNi41NiAyNi4wOTdhMTAuMyAxMC4zIDAgMCAwLS4xOTYgMi4wMmMwIDUuNTM3IDQuNTU3IDEwLjA2NSAxMC4xMyAxMC4wNjVhMTAuMjEgMTAuMjEgMCAwIDAgOC4zOTQtNC4zOThsMS40NzYtNy43NTItMi0zLjc3OS04Ljk4NC00LjA3MS04LjgyIDcuOTE1eiIvPgogICAgICAgIDxwYXRoIGZpbGw9IiNFOTQ3OEMiIGQ9Ik01Ljc2NCAxMS4yNDZsNi40MjkgMS40ODEgMS40NDMtNy4xNzJjLS44OTMtLjY3My0xLjk2LTEuMDEtMy4wOTQtMS4wMS0yLjc4NCAwLTUuMDg3IDIuMjIzLTUuMDg3IDQuOTg0IDAgLjU3Mi4xMDMgMS4xNzguMzA5IDEuNzE3eiIvPgogICAgICAgIDxwYXRoIGZpbGw9IiMyQzQ1OEYiIGQ9Ik01LjQ3MyAxMi43MjdjLTIuNy44ODQtNC41NjQgMy41MzQtNC41NjQgNi40MTMgMCAyLjgxNCAxLjcwMyA1LjMzMyA0LjI3NSA2LjMxNWw4LjQ1Mi03Ljc4Ny0xLjU0Mi0zLjM3LTYuNjIxLTEuNTd6Ii8+CiAgICAgICAgPHBhdGggZmlsbD0iIzk1QzYzRCIgZD0iTTI1LjQ1NSAzNC40MWE1LjExNSA1LjExNSAwIDAgMCAzLjA3MiAxLjA0NWMyLjc5NiAwIDUuMTEtMi4yMjMgNS4xMS00Ljk4NCAwLS42MDYtLjEwNC0xLjE3OC0uMzExLTEuNzE3bC02LjQ1Ni0xLjQ4MS0xLjQxNSA3LjEzOHoiLz4KICAgICAgICA8cGF0aCBmaWxsPSIjMTc2NjU1IiBkPSJNMjcuMTkyIDI1LjcwMmw2LjUwNSAxLjU3YzIuNjUzLS45MTUgNC40ODUtMy41MzMgNC40ODUtNi40MTIgMC0yLjgxNC0xLjY3NC01LjMtNC4yLTYuMzE1bC04LjUyNyA3LjcyMiAxLjczNyAzLjQzNXoiLz4KICAgIDwvZz4KPC9zdmc+Cg=="},function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return i}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("path",{fill:"#231F20",d:"M9.057 3.472c-.453-.453-1.057-.68-1.736-.68-.68 0-1.283.302-1.66.68-.453.453-.68 1.056-.68 1.736 0 .679.302 1.283.68 1.735.452.453 1.056.68 1.66.68.679 0 1.283-.302 1.736-.68.452-.452.679-1.056.679-1.735 0-.68-.302-1.283-.68-1.736zM7.32 36.982c.679 0 1.283-.303 1.736-.68.452-.453.679-1.057.679-1.736 0-.68-.302-1.283-.68-1.736-.452-.453-1.056-.68-1.735-.68-.68 0-1.283.303-1.66.68-.453.453-.68 1.057-.68 1.736 0 .68.302 1.283.68 1.736.377.377.98.68 1.66.68zm13.132-7.397a2.152 2.152 0 001.434-1.132l.075-.076c.302-.528.378-1.207.227-1.735-.151-.604-.529-1.133-1.132-1.51-.529-.302-1.208-.377-1.812-.226a2.152 2.152 0 00-1.434 1.132 2.71 2.71 0 00-.226 1.887c.15.603.528 1.132 1.132 1.509.453.226 1.132.302 1.736.15zM9.81 17.358c-.603-.603-1.51-1.056-2.49-1.056-.981 0-1.812.377-2.49 1.056-.605.604-.982 1.51-.982 2.491 0 .981.377 1.887.981 2.49.604.604 1.51 1.057 2.49 1.057.982 0 1.812-.377 2.491-1.056.604-.68.981-1.51.981-2.49 0-.982-.377-1.812-.98-2.492zm-1.434-4.15c1.434.226 2.642.905 3.623 1.886.15.151.302.302.453.529l2.415-1.434c-.302-.981-.302-2.038-.076-3.02C15.17 9.888 16 8.68 17.208 8h.075c1.208-.68 2.642-.83 3.925-.528a5.407 5.407 0 013.17 2.49 5.759 5.759 0 01.528 4c-.378 1.283-1.208 2.49-2.415 3.17l-.302.226c-1.132.529-2.415.68-3.547.302-.982-.226-1.812-.83-2.491-1.585l-2.415 1.434a6.26 6.26 0 01.453 2.416c0 .83-.151 1.66-.453 2.415l2.415 1.434c.68-.755 1.585-1.283 2.49-1.585a4.829 4.829 0 013.925.528h.076c1.207.755 1.962 1.887 2.34 3.17.376 1.283.226 2.717-.53 4l-.075.075c-.754 1.208-1.811 2.038-3.094 2.415a4.829 4.829 0 01-3.925-.528 5.581 5.581 0 01-2.415-3.17c-.226-.98-.226-2.037.076-3.019l-2.566-1.51-.453.454c-.981.98-2.189 1.66-3.623 1.887v2.792a5.41 5.41 0 012.566 1.434c.906.981 1.51 2.264 1.51 3.698 0 1.434-.604 2.793-1.51 3.698-.98.981-2.264 1.51-3.698 1.51-1.434 0-2.717-.604-3.698-1.51-.905-.98-1.51-2.264-1.51-3.698 0-1.434.605-2.792 1.51-3.698a5.41 5.41 0 012.566-1.434v-2.792c-1.434-.227-2.641-.906-3.622-1.887a6.8 6.8 0 01-1.963-4.755c0-1.887.755-3.547 1.963-4.755.98-.98 2.188-1.66 3.622-1.886v-2.793a5.41 5.41 0 01-2.566-1.434C2.642 8 2.037 6.717 2.037 5.283c0-1.434.605-2.792 1.51-3.698C4.453.604 5.811 0 7.245 0c1.434 0 2.717.604 3.698 1.585.906.981 1.51 2.264 1.51 3.698 0 1.434-.604 2.792-1.51 3.698a5.41 5.41 0 01-2.566 1.434v2.793zm13.51-1.887c-.378-.604-.906-.981-1.434-1.132-.604-.151-1.283-.076-1.811.226-.604.302-.982.906-1.133 1.51a2.76 2.76 0 00.227 1.886c.302.604.83.981 1.434 1.132.604.151 1.283.076 1.811-.226.528-.377.906-.906 1.057-1.434.226-.68.15-1.358-.151-1.962z"}),i=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 26 40",width:"1em",height:"1em"},e),o)};t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNiIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDI2IDQwIj4KICAgIDxwYXRoIGZpbGw9IiMyMzFGMjAiIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTkuMDU3IDMuNDcyYy0uNDUzLS40NTMtMS4wNTctLjY4LTEuNzM2LS42OC0uNjggMC0xLjI4My4zMDItMS42Ni42OC0uNDUzLjQ1My0uNjggMS4wNTYtLjY4IDEuNzM2IDAgLjY3OS4zMDIgMS4yODMuNjggMS43MzUuNDUyLjQ1MyAxLjA1Ni42OCAxLjY2LjY4LjY3OSAwIDEuMjgzLS4zMDIgMS43MzYtLjY4LjQ1Mi0uNDUyLjY3OS0xLjA1Ni42NzktMS43MzUgMC0uNjgtLjMwMi0xLjI4My0uNjgtMS43MzZ6TTcuMzIgMzYuOTgyYy42NzkgMCAxLjI4My0uMzAzIDEuNzM2LS42OC40NTItLjQ1My42NzktMS4wNTcuNjc5LTEuNzM2IDAtLjY4LS4zMDItMS4yODMtLjY4LTEuNzM2LS40NTItLjQ1My0xLjA1Ni0uNjgtMS43MzUtLjY4LS42OCAwLTEuMjgzLjMwMy0xLjY2LjY4LS40NTMuNDUzLS42OCAxLjA1Ny0uNjggMS43MzYgMCAuNjguMzAyIDEuMjgzLjY4IDEuNzM2LjM3Ny4zNzcuOTguNjggMS42Ni42OHptMTMuMTMyLTcuMzk3YTIuMTUyIDIuMTUyIDAgMCAwIDEuNDM0LTEuMTMybC4wNzUtLjA3NmMuMzAyLS41MjguMzc4LTEuMjA3LjIyNy0xLjczNS0uMTUxLS42MDQtLjUyOS0xLjEzMy0xLjEzMi0xLjUxLS41MjktLjMwMi0xLjIwOC0uMzc3LTEuODEyLS4yMjZhMi4xNTIgMi4xNTIgMCAwIDAtMS40MzQgMS4xMzIgMi43MSAyLjcxIDAgMCAwLS4yMjYgMS44ODdjLjE1LjYwMy41MjggMS4xMzIgMS4xMzIgMS41MDkuNDUzLjIyNiAxLjEzMi4zMDIgMS43MzYuMTV6TTkuODEgMTcuMzU4Yy0uNjAzLS42MDMtMS41MS0xLjA1Ni0yLjQ5LTEuMDU2LS45ODEgMC0xLjgxMi4zNzctMi40OSAxLjA1Ni0uNjA1LjYwNC0uOTgyIDEuNTEtLjk4MiAyLjQ5MSAwIC45ODEuMzc3IDEuODg3Ljk4MSAyLjQ5LjYwNC42MDQgMS41MSAxLjA1NyAyLjQ5IDEuMDU3Ljk4MiAwIDEuODEyLS4zNzcgMi40OTEtMS4wNTYuNjA0LS42OC45ODEtMS41MS45ODEtMi40OSAwLS45ODItLjM3Ny0xLjgxMi0uOTgtMi40OTJ6bS0xLjQzNC00LjE1YzEuNDM0LjIyNiAyLjY0Mi45MDUgMy42MjMgMS44ODYuMTUuMTUxLjMwMi4zMDIuNDUzLjUyOWwyLjQxNS0xLjQzNGMtLjMwMi0uOTgxLS4zMDItMi4wMzgtLjA3Ni0zLjAyQzE1LjE3IDkuODg4IDE2IDguNjggMTcuMjA4IDhoLjA3NWMxLjIwOC0uNjggMi42NDItLjgzIDMuOTI1LS41MjhhNS40MDcgNS40MDcgMCAwIDEgMy4xNyAyLjQ5Yy42NzkgMS4yODMuODMgMi43MTcuNTI4IDQtLjM3OCAxLjI4My0xLjIwOCAyLjQ5LTIuNDE1IDMuMTdsLS4zMDIuMjI2Yy0xLjEzMi41MjktMi40MTUuNjgtMy41NDcuMzAyLS45ODItLjIyNi0xLjgxMi0uODMtMi40OTEtMS41ODVsLTIuNDE1IDEuNDM0Yy4zMDIuNzU1LjQ1MyAxLjUxLjQ1MyAyLjQxNiAwIC44My0uMTUxIDEuNjYtLjQ1MyAyLjQxNWwyLjQxNSAxLjQzNGMuNjgtLjc1NSAxLjU4NS0xLjI4MyAyLjQ5LTEuNTg1YTQuODI5IDQuODI5IDAgMCAxIDMuOTI1LjUyOGguMDc2YzEuMjA3Ljc1NSAxLjk2MiAxLjg4NyAyLjM0IDMuMTcuMzc2IDEuMjgzLjIyNiAyLjcxNy0uNTMgNGwtLjA3NS4wNzVjLS43NTQgMS4yMDgtMS44MTEgMi4wMzgtMy4wOTQgMi40MTVhNC44MjkgNC44MjkgMCAwIDEtMy45MjUtLjUyOCA1LjU4MSA1LjU4MSAwIDAgMS0yLjQxNS0zLjE3Yy0uMjI2LS45OC0uMjI2LTIuMDM3LjA3Ni0zLjAxOWwtMi41NjYtMS41MS0uNDUzLjQ1NGMtLjk4MS45OC0yLjE4OSAxLjY2LTMuNjIzIDEuODg3djIuNzkyYTUuNDEgNS40MSAwIDAgMSAyLjU2NiAxLjQzNGMuOTA2Ljk4MSAxLjUxIDIuMjY0IDEuNTEgMy42OTggMCAxLjQzNC0uNjA0IDIuNzkzLTEuNTEgMy42OTgtLjk4Ljk4MS0yLjI2NCAxLjUxLTMuNjk4IDEuNTEtMS40MzQgMC0yLjcxNy0uNjA0LTMuNjk4LTEuNTEtLjkwNS0uOTgtMS41MS0yLjI2NC0xLjUxLTMuNjk4IDAtMS40MzQuNjA1LTIuNzkyIDEuNTEtMy42OThhNS40MSA1LjQxIDAgMCAxIDIuNTY2LTEuNDM0di0yLjc5MmMtMS40MzQtLjIyNy0yLjY0MS0uOTA2LTMuNjIyLTEuODg3YTYuOCA2LjggMCAwIDEtMS45NjMtNC43NTVjMC0xLjg4Ny43NTUtMy41NDcgMS45NjMtNC43NTUuOTgtLjk4IDIuMTg4LTEuNjYgMy42MjItMS44ODZ2LTIuNzkzYTUuNDEgNS40MSAwIDAgMS0yLjU2Ni0xLjQzNEMyLjY0MiA4IDIuMDM3IDYuNzE3IDIuMDM3IDUuMjgzYzAtMS40MzQuNjA1LTIuNzkyIDEuNTEtMy42OThDNC40NTMuNjA0IDUuODExIDAgNy4yNDUgMGMxLjQzNCAwIDIuNzE3LjYwNCAzLjY5OCAxLjU4NS45MDYuOTgxIDEuNTEgMi4yNjQgMS41MSAzLjY5OCAwIDEuNDM0LS42MDQgMi43OTItMS41MSAzLjY5OGE1LjQxIDUuNDEgMCAwIDEtMi41NjYgMS40MzR2Mi43OTN6bTEzLjUxLTEuODg3Yy0uMzc4LS42MDQtLjkwNi0uOTgxLTEuNDM0LTEuMTMyLS42MDQtLjE1MS0xLjI4My0uMDc2LTEuODExLjIyNi0uNjA0LjMwMi0uOTgyLjkwNi0xLjEzMyAxLjUxYTIuNzYgMi43NiAwIDAgMCAuMjI3IDEuODg2Yy4zMDIuNjA0LjgzLjk4MSAxLjQzNCAxLjEzMi42MDQuMTUxIDEuMjgzLjA3NiAxLjgxMS0uMjI2LjUyOC0uMzc3LjkwNi0uOTA2IDEuMDU3LTEuNDM0LjIyNi0uNjguMTUtMS4zNTgtLjE1MS0xLjk2MnoiLz4KPC9zdmc+Cg=="},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(9),a(4),a(23),a(57),a(17);var n,l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(49)),f=a(14);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var p=(n=function(e){(0,o.default)(a,e);var t=d(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u0&&void 0!==arguments[0]?arguments[0]:{};return"kapis/monitoring.kubesphere.io/v1alpha1".concat(e.getPath(t),"/").concat(e.module)},e}return(0,u.default)(a,[{key:"createGrafana",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.submitting(request.post("/kapis/monitoring.kubesphere.io/v1alpha1/".concat(this.getPath(t),"/clusterdashboards/").concat(e.grafanaDashboardName,"/template"),e))}}]),a}(r(a(68)).default),(0,s.default)(n.prototype,"createGrafana",[f.action],Object.getOwnPropertyDescriptor(n.prototype,"createGrafana"),n.prototype),n);t.default=p},function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return i}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.4 25L8.733 23.75V0L20.4 25zm-20 0l6.667-1.25V10L.4 25zm0 1.667h20L7.9 30 .4 26.667z",fill:"#36435C"}),i=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 21 30",fill:"none",width:"1em",height:"1em"},e),o)};t.default="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjEgMzAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjAuNCAyNUw4LjczMzM2IDIzLjc1VjBMMjAuNCAyNVpNMC40MDAwMjQgMjVMNy4wNjY2OSAyMy43NVYxMEwwLjQwMDAyNCAyNVpNMC40MDAwMjQgMjYuNjY2N0gyMC40TDcuOTAwMDIgMzBMMC40MDAwMjQgMjYuNjY2N1oiIGZpbGw9IiMzNjQzNUMiLz4KPC9zdmc+Cg=="},function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(5),r(11),r(6),r(73),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(136),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(73),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(62),r(7);var u=n(r(315)),o=n(r(43)),i=n(r(30)),c=n(r(58));r(41);var s,f=n(r(44)),d=n(r(36)),p=n(r(37)),m=n(r(55)),h=n(r(56)),v=n(r(51)),g=n(r(0)),y=n(r(834)),E=l(r(793)),b=n(r(796)),_=n(r(1404)),O=r(186),S=n(r(63)),C=n(r(26)),D=r(52);function k(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function N(e){for(var t=1;t0&&void 0!==i[0]?i[0]:{},a=t.silent,r=(0,c.default)(t,["silent"]),l=n.props.store,a&&(l.list.silent=!0),u=N(N(N({},n.props.match.params),r),{},{cluster:(null==r?void 0:r.cluster)||n.state.cluster,labelSelector:n.labelSelector}),e.next=6,l.fetchList(u);case 6:l.list.silent=!1;case 7:case"end":return e.stop()}}),e)}))),n.getGatewayResource=function(e){var t=e.cluster;return n.isProjectGateway?{cluster:t,namespace:e.name.split("kubesphere-router-")[1],type:"project"}:n.isProjectGateway?void 0:{cluster:t,workspace:e.name.split("kubesphere-router-workspace-")[1],type:"workspace"}},n.handleFetch=function(e,t){n.routing.query(N(N({},e),{},{type:n.type}),t)},n.getColumns=function(){var e=n.props.getSortOrder;return[{title:t("NAME"),dataIndex:"name",sorter:!0,sortOrder:e("name"),render:function(e,t){return g.default.createElement(g.default.Fragment,null,g.default.createElement("span",{style:{fontWeight:700,cursor:"auto",marginRight:"4px"}},e),n.renderDisabledTip(t))}},{title:t("ACCESS_MODE"),dataIndex:"type"},{title:t("IP_ADDRESS"),dataIndex:"defaultIngress"},{title:t("NODE_PORTS"),dataIndex:"ports",render:function(e){return(0,S.default)(e)?"-":e.map((function(e){return"".concat(e.name.toUpperCase(),": ").concat(e.nodePort)})).join("/")}},{title:t("REPLICA_COUNT"),dataIndex:"replicas"},{title:t("TRACING"),dataIndex:"serviceMeshEnable",render:function(e){return e?t("ON"):t("OFF")}}]},n.renderDesc=function(){var e=n.props.type,a=n.props.match.params.cluster,r=globals.app.isMultiCluster?(0,C.default)(globals,"clusterConfig.".concat(a,".ksVersion")):(0,C.default)(globals,"ksConfig.ksVersion");return"workspace"===e&&(0,D.compareVersion)(r,"v3.4.0")<0?t("CLUSTER_NOT_SUPPORT_WORKSPACE_GATEWAY"):t("ENT_".concat(e.toUpperCase(),"_ENABLE_GATEWAY_DESC"))},n.handleClusterChange=function(e){n.setState({cluster:e}),n.getData({cluster:e})};var l=(0,D.getHostClusterName)();return n.state={cluster:(null==e?void 0:e.cluster)||(0,C.default)(e,"workspaceStore.cluster",l)},n}return(0,p.default)(r,[{key:"renderDisabledTip",value:function(e){return e.createTime?null:g.default.createElement(O.Tooltip,{content:t("UPDATE_GATEWAY_DESC"),placement:"top"},g.default.createElement(O.Icon,{size:20,name:"update",color:{primary:"#f5a623 ",secondary:"#ffe1be"}}))}},{key:"renderCustomFilter",value:function(){var e=this.state.cluster;return this.props.showClusterSelect?g.default.createElement(_.default,{cluster:e,clusters:this.clusters,onChange:this.handleClusterChange}):null}},{key:"render",value:function(){var e=this.props,a=e.tableProps,r=e.type,n=e.inCluster;return g.default.createElement(E.ListPage,(0,u.default)({},this.props,{getData:this.getData,noWatch:!0}),g.default.createElement(b.default,(0,u.default)({},a,this.tableOtherProps,{name:"".concat(r.toUpperCase(),"_GATEWAY"),emptyProps:{desc:n?this.renderDesc():t("PROJECT_ENABLE_GATEWAY_DESC_WS")},itemActions:this.itemActions,tableActions:this.tableActions,columns:this.getColumns(),onCreate:null,customFilter:this.renderCustomFilter(),searchType:"name",isLoading:a.isLoading})))}},{key:"labelSelector",get:function(){return"kubesphere.io/gateway-type=".concat(this.props.type)}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"isProjectGateway",get:function(){var e=this.props.type;return!e||"project"===e}},{key:"workspaceStore",get:function(){return this.props.workspaceStore}},{key:"clusters",get:function(){return this.workspaceStore?this.workspaceStore.clusters.data.map((function(e){return{label:e.name,value:e.name,cluster:e}})).filter((function(e){return(0,C.default)(globals,"ksConfig.enabledExtensionModulesStatus.gateway.clusterSchedulingStatuses.".concat(e.value),!1)})):[]}},{key:"cluster",get:function(){return this.workspaceStore?this.workspaceStore.cluster:null}},{key:"itemActions",get:function(){var e=this,a=this.props.trigger;return[{key:"edit",icon:"pen",text:t("EDIT"),action:"edit",show:function(e){return e.createTime},onClick:function(t){a("gateways.edit",N(N({detail:t._originData,type:"",name:t.name},e.getGatewayResource(t)),{},{success:e.routing.query}))}},{key:"update",icon:"update",text:t("UPDATE"),action:"manage",show:function(e){return!e.createTime},onClick:function(t){return a("gateways.update",N(N({detail:t._originData},e.getGatewayResource(t)),{},{success:e.routing.query}))}},{key:"delete",icon:"trash",text:t("DISABLE"),action:"delete",onClick:function(t){return a("gateways.delete",N(N({type:e.props.name,detail:t,name:t.name},e.getGatewayResource(t)),{},{resource:t.name,success:e.routing.query}))}}]}},{key:"tableActions",get:function(){var e=this,a=this.props,r=a.tableProps,n=a.trigger;return N(N({},r.tableActions),{},{selectActions:[{key:"delete",type:"danger",text:t("DISABLE"),action:"delete",onClick:function(){return n("gateways.batch.delete",{type:e.props.name,rowKey:"name",success:e.routing.query})}}],onFetch:this.handleFetch})}},{key:"tableOtherProps",get:function(){return this.props.showClusterSelect?{showEmpty:!1,emptyText:t("PROJECT_ENABLE_GATEWAY_DESC_WS")}:{}}}]),r}(g.default.Component))||s;a.default=R},function(e,t,a){e.exports={attributes:"_1qLfwlSNMUvx_q8t-EGpKu",item:"_2ImD6g_VbE6ZdbovBHYIpG",name:"_3oXgWAWaKT0svZ3eswccyw",value:"_1b7KLypukIC6d3iPAamFVA"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(18),r(98),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(98),r(4),r(23),r(57),r(17);var u=l(r(96)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=n(r(0)),p=l(r(789)),m=l(r(1045)),h=l(r(63));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var g=function(e){(0,c.default)(r,e);var a=v(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.className,r=e.labels;return(0,h.default)(r)?null:d.default.createElement(p.default,{title:t("LABEL_PL"),className:a},d.default.createElement("div",null,Object.entries(r).map((function(e){var t=(0,u.default)(e,2),a=t[0],r=t[1];return d.default.createElement(m.default,{key:a,name:a,value:r})}))))}}]),r}(d.Component);a.default=g},function(e,t,a){e.exports={wrapper:"QpFfgb7JJ7HRNLfqWCXji",item:"_2Ls9YLPpw8lkrD3lNui_GK",icon:"_38CQvuXRNm-XbTdpOmjFCM",indicator:"_3O2Bu_ul1hd0RWHSc0uyYY",text:"_2sD8JpjsJvGHwUybEZWCex",name:"_1Sivzw33_5Gsqakv7IJdNz",probeItem:"_1KcpnN-7kCl_NT5wZuH3zy",probeType:"si5bO7SNMAMGa-Y28HKrr",probeTime:"_2ZEFKQF67O0DnJj3L3PcxT",noLink:"_3TsdKO2ShBqmPwtineCIMt"}},function(e,t,a){e.exports={main:"_1mP4Qf6JdvK0Zws9GzHH_m",header:"_38YMa1McIH2a3XFjNFm0Qv",search:"_2iBh5XNyrUQs_npRhRtu-N",actions:"SOTGp48SZ36hInD3GvDqW",body:"_1E1bcvmD960HViEUNPWIj-",footer:"_2wm_WVdZeY_H8Dthsg7qEZ",item:"DfokFLfXy9QDbluhfn4mC",expanded:"_1Upgy-BC2S8CbTT7SwXJsD",arrow:"_2oh1nTH5L2f2z2s_G_Eu6J",itemMain:"_37pJP5bk2g9FqBysuK4mh5",content:"_1QXeIqcQeKMp8jjbDJUQ9R",text:"_1eubB8Mc7lqOuhCmWiSLto",monitors:"XtUDQAWv16NYrbCMYx11z",itemExtra:"_2qw5HNgGsizb6Yt_fColhG",icon:"_2khy6lzSeTcSnB9QLHOBd3",indicator:"_1nnELAL1b4Y_7-IdgMTmJG",statusTip:"_1IQ9UXag7Oj8C5vl685TuJ",charts:"JZvd7sINr_-hgLfx-_Qm3",podip:"_2yAbsvJ0HwjDLmoJoLfek2",ipTip:"_3FpDrLOumpuGj3VMwTeY9-",containers:"_2Vbw0pvM32OD13r9WIDwjd",loading:"_2_wICcLc7ldhJDkDX3UntK",empty:"_26YNgZC9m7cd39OC8YZlxM",cluster:"_1DOCSy9WSCVCd5lDQ942Uu"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(31),r(18),r(16),r(4),r(23),r(17),r(111),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(31),r(18),r(42),r(16),r(4),r(319),r(23),r(57),r(17),r(111);var l,u,o,i=n(r(315)),c=n(r(58)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(0)),v=r(239),g=n(r(1)),y=n(r(3)),E=n(r(158)),b=n(r(468)),_=r(186),O=n(r(240)),S=n(r(801)),C=r(794),D=r(52),k=n(r(3886));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var T=(0,v.observer)((o=u=function(e){(0,d.default)(r,e);var a=N(r);function r(e){var n;return(0,s.default)(this,r),(n=a.call(this,e)).getValue=function(e,t){var a=(0,C.getSuitableUnit)(e,t),r=(0,C.getValueByUnit)(e,a),n=(0,D.coreUnitTS)(r,a);return"".concat(r," ").concat(n)},n.getHPAData=function(){var e,a,r,l,u,o,i,c,s,f,d,p,m=n.props.detail,h=(null==m||null===(e=m._originData)||void 0===e||null===(a=e.spec)||void 0===a?void 0:a.minReplicas)||0,v=(null==m||null===(r=m._originData)||void 0===r||null===(l=r.spec)||void 0===l?void 0:l.maxReplicas)||0,g=(null===(u=m._originData.spec.metrics)||void 0===u||null===(o=u.find((function(e){return"Resource"===e.type&&"cpu"===e.resource.name})))||void 0===o?void 0:o.resource.target.averageUtilization)||0,y=(null===(i=m._originData.spec.metrics)||void 0===i||null===(c=i.find((function(e){return"Resource"===e.type&&"memory"===e.resource.name})))||void 0===c?void 0:c.resource.target.averageValue)||0,b=(null===(s=m.status.currentMetrics)||void 0===s||null===(f=s.find((function(e){return"Resource"===e.type&&"cpu"===e.resource.name})))||void 0===f?void 0:f.resource.current.averageUtilization)||0,_=(null===(d=m.status.currentMetrics)||void 0===d||null===(p=d.find((function(e){return"Resource"===e.type&&"memory"===e.resource.name})))||void 0===p?void 0:p.resource.current.averageValue)||0;return[{icon:"chevron-down",name:t("MINIMUM_REPLICAS"),value:h},{icon:"chevron-up",name:t("MAXIMUM_REPLICAS"),value:v},{icon:"cpu",name:t("TARGET_CPU_USAGE"),value:(0,E.default)(g)||""===g?t("NONE"):"".concat(g,"%"),current:"".concat(b,"%")},{icon:"memory",name:t("TARGET_MEMORY_USAGE"),value:(0,E.default)(y)||""===y?t("NONE"):y,current:n.getValue(String(_).endsWith("m")?parseInt(_,10)/1e3:_,"memory")}]},n.getOperations=function(){return[{key:"cancel",icon:"close",text:t("CANCEL"),onClick:n.handleCancel}]},n.handleMoreClick=function(e,t){var a=n.getOperations().find((function(e){return e.key===t})).onClick;a&&a()},n.handleCancel=function(){var e=n.props,a=e.detail,r=e.onDeleted,l=e.k8sVersion;n.store.delete(a,l).then((function(){O.default.success({content:"".concat(t("CANCEL_SUCCESSFUL"))}),r()}))},n.renderCard=function(e){var a=e.icon,r=e.name,n=e.value,l=e.current;return h.default.createElement("div",{key:a,className:k.default.box},h.default.createElement("div",{className:k.default.card},h.default.createElement(_.Icon,{name:a,size:40}),h.default.createElement("div",null,h.default.createElement("div",{className:k.default.name,title:r},r),h.default.createElement("p",{className:k.default.value},l?t("TARGET_CURRENT",{target:n,current:l}):n))))},n.store=e.store||new b.default,n}return(0,f.default)(r,[{key:"renderOperations",value:function(){var e=this.getOperations(),t=h.default.createElement(_.Menu,{onClick:this.handleMoreClick},e.map((function(e){var t=e.icon,a=e.text,r=e.show,n=void 0===r||r,l=(0,c.default)(e,["icon","text","show"]);return n?h.default.createElement(_.Menu.MenuItem,(0,i.default)({key:a},l),t&&h.default.createElement(_.Icon,{name:t,type:"light"})," ",a):null})));return h.default.createElement(_.Dropdown,{theme:"dark",content:t},h.default.createElement(_.Button,{type:"ghost",icon:"more"}))}},{key:"renderContent",value:function(){if(!this.props.detail.name)return null;var e=this.getHPAData();return h.default.createElement("div",{className:k.default.wrapper},e.map(this.renderCard))}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.loading,n=e.enableCancelHpa,l=void 0===n||n,u=this.props.title||t("AUTOSCALING");return h.default.createElement(S.default,{className:(0,y.default)(k.default.main,a),title:u,operations:l?this.renderOperations():null,empty:t("NOT_ENABLE",{resource:t("AUTOSCALING")}),loading:r},this.renderContent())}}]),r}(h.default.Component),u.propTypes={className:g.default.string,title:g.default.string,store:g.default.object,detail:g.default.object,loading:g.default.bool,onDeleted:g.default.func},u.defaultProps={detail:{},loading:!0,onDelete:function(){}},l=o))||l;a.default=T},function(e,a,r){"use strict";r(15);var n=r(20);r(16),r(27),r(4),r(23),r(17),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51));r(45),r(42),r(16),r(27),r(4),r(23),r(57),r(17),r(110);var s=n(r(0)),f=n(r(1)),d=n(r(3)),p=n(r(1102)),m=r(798),h=n(r(3889)),v=n(r(1826));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=function(e){return Number(e||0)},E=function(e){(0,o.default)(r,e);var a=g(r);function r(e){var t;(0,l.default)(this,r),(t=a.call(this,e)).showConfirm=function(){t.setState({showConfirm:!0},(function(){t.startTimer()}))},t.hideConfirm=function(){t.setState({showConfirm:!1},(function(){t.stopTimer()}))},t.handleCancel=function(){t.setState({desire:t.props.desire},(function(){t.hideConfirm()}))},t.handleConfirm=function(){t.props.onScale(t.state.desire),t.hideConfirm()},t.handleScale=function(e){e>=0&&t.setState({desire:e,seconds:5},(function(){t.showConfirm()}))},t.updateTime=function(){var e=t.state.seconds;t.timer=setTimeout((function(){e>0?t.setState({seconds:e-1},(function(){t.updateTime()})):(t.handleConfirm(),t.handleCancel())}),1e3)},t.startTimer=function(){t.timer&&t.stopTimer(),t.updateTime()},t.stopTimer=function(){clearTimeout(t.timer),t.timer=null};var n=y(e.desire);return t.state={prevPropDesire:n,desire:n,seconds:5,showConfirm:!1},t}return(0,u.default)(r,[{key:"componentWillUnmount",value:function(){this.stopTimer()}},{key:"renderScaleOperation",value:function(){if(!this.props.onScale)return null;var e=this.state.desire;return s.default.createElement("div",{className:v.default.scale},s.default.createElement(h.default,{value:e,onChange:this.handleScale}))}},{key:"render",value:function(){var e=this.props,a=e.theme,r=e.className,n=e.name,l=e.current,u=this.state,o=u.showConfirm,i=u.seconds,c=u.desire,f=t(n),h=t("REPLICAS_CURRENT"),g=t("REPLICAS_DESIRED");return s.default.createElement("div",{className:(0,d.default)(v.default.card,r,v.default[a])},s.default.createElement("img",{className:v.default.cardImg,src:"/assets/banner-icon-1.svg"}),s.default.createElement("div",{className:v.default.chart},s.default.createElement(m.SimpleCircle,{theme:a,title:f,legend:[h,g],value:l,total:c})),s.default.createElement("div",{className:v.default.status},s.default.createElement("div",{className:v.default.title},f),s.default.createElement("div",{className:v.default.detail},s.default.createElement("p",null,s.default.createElement("label",null,g,":")," ",c),s.default.createElement("p",null,s.default.createElement("label",null,h,":")," ",l))),this.renderScaleOperation(),s.default.createElement(p.default,{visible:o,width:400,title:t("ADJUST_REPLICAS"),content:t.html("REPLICAS_SCALE_NOTIFY_CONTENT",{num:c}),cancelText:t("REPLICAS_SCALE_NOTIFY_CANCEL"),confirmText:t("REPLICAS_SCALE_NOTIFY_CONFIRM",{seconds:i}),onCancel:this.handleCancel,onConfirm:this.handleConfirm}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.desire!==t.prevPropDesire){var a=y(e.desire);return{prevPropDesire:a,desire:a}}return null}}]),r}(s.default.Component);a.default=E,E.propTypes={theme:f.default.string,className:f.default.string,name:f.default.string,current:f.default.number,desire:f.default.number,onScale:f.default.func},E.defaultProps={theme:"dark",name:"REPLICA_PL",current:0,desire:0,onScale:null}},function(e,t,a){e.exports={card:"_1c8ZZJMInbKhNSrY7LtWOz",cardImg:"_2qWxZcMVoJcyTOmp888Qza",dark:"TGr9GCblFo2j_1lfxKdqy",status:"_3XPNv-eRTc_sRrHrDOGDN_",title:"_1Pjqebw9E-Ge5JTqdWweF9",detail:"_1XLvvOKXnflr9NmFv3HM_S",scale:"_1d_O-hnlw9YGlAqNVrW-Sl",control:"nB11JF3vqmggYgl2OHs6s",add:"_2CqxRZ0d1OYdLPjbX03KEK",substract:"_2oexUYxDtB2oVt85gxb8yu"}},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(4),r(23),r(17),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(4),r(22),r(23),r(57),r(17),r(110);var l=n(r(43));r(41);var u=n(r(44)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(26)),m=r(186),h=n(r(789)),v=n(r(456)),g=n(r(472)),y=n(r(105)),E=n(r(3891)),b=n(r(3893)),_=n(r(3895)),O=n(r(1828));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var C=function(e){(0,c.default)(r,e);var a=S(r);function r(e){var n;(0,o.default)(this,r),(n=a.call(this,e)).showRerun=function(){n.setState({showRerun:!0})},n.hideRerun=function(){n.setState({showRerun:!1})},n.handleCurrentBuilderChange=function(e){n.setState({currentBuilderName:e,builderDetail:{},runDetail:{}}),n.fetchData(e)},n.fetchData=function(){var e=(0,u.default)(l.default.mark((function e(t){var a,r;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.getBuilderDetail(t);case 2:a=e.sent,(r=(0,p.default)(a,"status.lastRunName"))&&n.getRunDetail(r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.getBuilderDetail=function(){var e=(0,u.default)(l.default.mark((function e(t){var a,r;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.props.namespace,e.next=3,n.builderStore.fetchDetail({cluster:n.cluster,name:t,namespace:a});case 3:if(r=e.sent,"NotFound"!==(0,p.default)(r,"_originData.reason","")){e.next=7;break}return n.setState({notFound:!0}),e.abrupt("return");case 7:return n.setState({builderDetail:r}),e.abrupt("return",r);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.getRunDetail=function(){var e=(0,u.default)(l.default.mark((function e(t){var a,r,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.props.namespace,n.setState({getRunDetailLoading:!0}),clearTimeout(n.refreshTimer),r=(0,p.default)(n.state.builderDetail,"status.lastRunName"),e.next=6,n.runStore.fetchRunDetail({namespace:a,runName:t||r});case 6:u=e.sent,"running"===(0,p.default)(u,"status","")&&(n.refreshTimer=setTimeout(n.getRunDetail,4e3)),n.setState({runDetail:u,getRunDetailLoading:!1});case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.handleRerun=function(){var e=(0,u.default)(l.default.mark((function e(t){var a,r,u,o,i;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.newTag,r=t.isUpdateWorkload,u=n.props.namespace,o=n.state.currentBuilderName,clearTimeout(n.refreshTimer),e.next=6,n.builderStore.rerun({cluster:n.cluster,newTag:a,name:o,namespace:u,isUpdateWorkload:r});case 6:i=e.sent,n.setState({runDetail:y.default.s2iruns(i),getRunDetailLoading:!1,showRerun:!1}),setTimeout((function(){n.fetchData(o)}),1e3);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.renderBuilderSelect=function(){var e=n.props.builderNames;if(1===e.length)return null;var t=e.map((function(e){return{label:e,value:e}}));return d.default.createElement(m.Select,{className:O.default.builderSelector,onChange:n.handleCurrentBuilderChange,options:t,defaultValue:t[0]})},n.renderLog=function(){var e=n.state.runDetail,a=e.logURL,r=e.status;return!a&&"Running"===r?d.default.createElement("div",{className:O.default.title},d.default.createElement(m.Loading,{size:"16"}),d.default.createElement("p",null,t("TASK"),d.default.createElement("span",{className:O.default.taskName},n.state.currentBuilderName),t("IN_PROGRESS"))):a?d.default.createElement(_.default,{onRerun:n.showRerun,runDetail:n.state.runDetail,builderName:n.state.currentBuilderName}):null};var i=e.builderNames;return n.state={builderDetail:{},runDetail:{},getRunDetailLoading:!0,currentBuilderName:i[0],showRerun:!1,notFound:!1},n.refreshTimer=null,n.builderStore=new v.default,n.runStore=new g.default,n}return(0,i.default)(r,[{key:"componentDidMount",value:function(){var e=this.props.builderNames;this.fetchData(e[0])}},{key:"componentWillUnmount",value:function(){clearTimeout(this.refreshTimer)}},{key:"render",value:function(){var e=this.props.className,a=(0,p.default)(this.state.builderDetail,"spec.config");return this.state.notFound?null:d.default.createElement(h.default,{title:t("IMAGE_BUILDING"),operations:this.renderBuilderSelect()},d.default.createElement(E.default,{config:a,className:e}),this.renderLog(),d.default.createElement(b.default,{detail:this.state.builderDetail,visible:this.state.showRerun,onOk:this.handleRerun,onCancel:this.hideRerun}))}},{key:"cluster",get:function(){return this.props.cluster}}]),r}(d.default.Component);a.default=C,C.defaultProps={builderNames:[]}},function(e,t,a){e.exports={logContainer:"_2bPpJA94l-RyZOyRbjENrM",title:"_1e1_E7xie5w_hppm1LIgSZ",builderSelector:"_2qowcESuT9kmoK7enz5NOI",icon:"_3swHDfiS90QRAWqxRgv4Xw",noneLogDesc:"_2USfiSziwn36bQFEDdxt19",running:"_1QDO-cklO54JfNi3pfh5U8",rotate:"_1Ut0AdFDAAK29Q2sVx4kSM",failed:"_2PhKayJM_cv-avOySIoKM-",unknow:"_1U7K-MS0M-X-097gFQDhAn",successful:"_3Fqsco2IMj-fabpd1-oASz"}},,,function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(31),a(6),a(84),a(18),a(48),a(97),a(16),a(9),a(13),a(10),a(4),a(23),a(17),a(85),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(31),a(6),a(84),a(18),a(28),a(48),a(97),a(42),a(16),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(85),a(7);var n=r(a(315)),l=r(a(43)),u=r(a(30));a(41);var o,i,c,s=r(a(44)),f=r(a(36)),d=r(a(37)),p=r(a(55)),m=r(a(56)),h=r(a(51)),v=r(a(0)),g=a(14),y=a(239),E=r(a(1)),b=r(a(63)),_=r(a(26)),O=r(a(989)),S=r(a(1812)),C=r(a(3904)),D=r(a(3905)),k=r(a(1410));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){for(var t=1;t0&&void 0!==a[0]?a[0]:{},r.params=t,e.next=4,r.fetchResources();case 4:return e.next=6,r.fetchMonitorings(t);case 6:case"end":return e.stop()}}),e)}))),r.handleChangeChecked=function(e){r.setState({checked:e},(function(){var e=r.state.checked,t=r.monitorsData.map(r.getItemName);e.some((function(e){return!t.includes(e)&&(r.fetchMonitorings(T({pods:[e],more:!0},r.params)),!0)}))}))},r.state={checked:[]},r.init(),r}return(0,d.default)(a,[{key:"componentDidMount",value:function(){var e=this;(0,g.when)((function(){return!(0,b.default)(e.resourcesData)&&(0,b.default)(e.state.checked)}),(function(){var t=e.props.defaultChecked,a=e.resourcesData.map((function(t){return e.getItemName(t)})).slice(0,t);e.setState({checked:a})}))}},{key:"init",value:function(){var e=new O.default;this.resourceStore=e,this.monitorStore=e}},{key:"renderCharts",value:function(){var e=this,t=this.props.config,a=this.state.checked,r=[];return a.forEach((function(t){var a=e.monitorsData.find((function(a){return e.getItemName(a)===t}));a&&r.push(a)})),v.default.createElement(D.default,{loading:this.monitorStore.isLoading,config:t,data:r})}},{key:"renderResroucesList",value:function(){var e=this.props.config,t=this.state.checked,a=this.resources,r=a.page,n=a.total,l=a.isLoading;return v.default.createElement(C.default,{loading:l,config:e,name:this.name,page:r,total:n,checked:t,data:this.resourcesData,onFetch:this.fetchResources,onChange:this.handleChangeChecked})}},{key:"render",value:function(){var e=this.monitorStore,t=e.isLoading,a=e.isRefreshing,r=this.props,l=r.visible,u=r.onCancel;return v.default.createElement(S.default,(0,n.default)({visible:l,onFetch:this.fetchData,onCancel:u,loading:t,refreshing:a},this.monitorOptions),v.default.createElement("div",{className:k.default.content},this.renderResroucesList(),this.renderCharts()))}},{key:"monitorOptions",get:function(){return{times:50,step:"5m"}}},{key:"name",get:function(){return"POD_PL"}},{key:"metrics",get:function(){return this.monitorStore.data}},{key:"metricType",get:function(){return this.props.config.metricType}},{key:"resourceParams",get:function(){var e=this.props,t=e.module;return{cluster:e.cluster,namespace:e.namespace,workload_kind:t,workload_name:e.name}}},{key:"resources",get:function(){return(0,g.toJS)((0,_.default)(this.resourceStore,"sort",{}))}},{key:"resourcesData",get:function(){return(0,_.default)(this.resources,"data[".concat(this.metricType,"].data.result"),[])}},{key:"monitorsData",get:function(){return(0,_.default)(this.monitorStore,"data[".concat(this.metricType,"].data.result"),[])}}]),a}(v.default.Component),i.propTypes={visible:E.default.bool,defaultChecked:E.default.number,limit:E.default.number,config:E.default.object,onCancel:E.default.func,module:E.default.string,name:E.default.string,namespace:E.default.string,cluster:E.default.string},i.defaultProps={visible:!1,defaultChecked:5,limit:10,config:{},module:"deployments",name:"",namespace:"",cluster:"",onCancel:function(){}},o=c))||o;t.default=w},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1412)).default);t.default=c},function(e,t,a){e.exports={content:"_2ZwGdPpxAhTzLkxSVThCmZ",item:"_1ObwvAEb1U4k8T2gv7yvsU",empty:"KMh3PEpKo6Jg0Ucbgyq00"}},function(e,t,a){e.exports={content:"_3T2qUTrs27LXHme2DOQQXA",item:"_1E3QOQ7mYtLGZc1fl1NMWq"}},function(e,t,a){e.exports={ports:"z2EiKOPaSXkGmpQpoE-H_",card:"_3Q35ZuHxAjDj669cnT2Khd",content:"_1YLdx1Yt-6gMzruD-S8Bot",title:"_1Smdy_zt_LHm1hSRt0Eef-",path:"xGHTWxqXrFVtpy7Zwr6vD",access:"YE_7nvMY_-UKJNrL4GkGh",tip:"Tjbb2yi464EU4fTNJAmIL"}},function(e,t,a){e.exports={secretWrapper:"_2w2dYzN4wuGp_wajpcdrcB",title:"_2NnR7nZbdx5sVyDkdr_G-f",defaultWrapper:"_2s4vOIBr8xBPyb5h4ilFgc",configWrapper:"_2R-aXaN8GH_Hz7c1wmLJre",codeEditor:"_1LuBGW3lud3xrU-Jon909o",ops:"Iwmqd8wJBrfmpDxheVZbw",split:"rtimVCShoOZggbnsmeQzP"}},function(e,a,r){"use strict";r(15);var n=r(20);r(73),r(48),r(16),r(4),r(23),r(24),r(17),r(62),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(73),r(48),r(42),r(16),r(4),r(23),r(57),r(24),r(17),r(62);var l,u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=r(14),p=n(r(63)),m=r(239),h=r(52),v=n(r(3941)),g=n(r(1838));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var E=(0,m.inject)("detailStore")(l=(0,m.observer)(l=function(e){(0,i.default)(r,e);var a=y(r);function r(){return(0,u.default)(this,r),a.apply(this,arguments)}return(0,o.default)(r,[{key:"renderContainers",value:function(){var e=(0,d.toJS)(this.store.detail),a=e.name,r=e.cluster,n=e.containers,l=e.initContainers;return f.default.createElement(v.default,{prefix:this.prefix,isEdgeWize:(0,h.isEdgeWizePage)(),cluster:r,title:t("CONTAINER_PL"),containers:n,initContainers:l,podName:a})}},{key:"renderVolumes",value:function(){var e=(0,d.toJS)(this.store.detail),t=e.volumes,a=e.containers;return(0,p.default)(t)?null:f.default.createElement(g.default,{isEdgeWize:(0,h.isEdgeWizePage)(),volumes:t,containers:a,loading:this.store.isLoading,match:this.props.match})}},{key:"renderContent",value:function(){return f.default.createElement("div",null,this.renderContainers(),this.renderVolumes())}},{key:"render",value:function(){return f.default.createElement("div",null,this.renderContent())}},{key:"module",get:function(){return this.props.detailStore.module}},{key:"store",get:function(){return this.props.detailStore}},{key:"prefix",get:function(){return this.props.match.url.split("/").slice(0,-1).join("/")}}]),r}(f.default.Component))||l)||l;a.default=E},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(7);var l,u,o,i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=n(r(1)),v=n(r(63)),g=r(239),y=n(r(789)),E=n(r(3942)),b=n(r(1839));function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;t-1;return r.monitorStore=n?new b.default:(0,g.isEdgeWizePage)()?new E.default:new y.default,r}return(0,i.default)(a,[{key:"render",value:function(){var e=this,t=this.store.detail,a=t.createTime,r=t.cluster,n=this.monitorStore,u=n.isLoading,o=n.isRefreshing,i=(0,g.hideGPUByLicense)(this.getMonitoringCfgs(),r);return d.default.createElement(O.Controller,{createTime:a,onFetch:this.fetchData,loading:u,refreshing:o,isEmpty:(0,m.default)(this.metrics)},i.map((function(t){t.data=(0,m.default)(t.data)?[{values:(0,v.getZeroValues)()}]:t.data,t.legend=t.data.map((function(){return t.legend})),t.workload_kind=e.monitoringModule;var a=(0,v.getAreaChartOps)(t);return d.default.createElement(_.SimpleArea,(0,l.default)({key:t.title,width:"100%"},a))})))}},{key:"store",get:function(){return this.props.detailStore}},{key:"monitoringModule",get:function(){var e;return null!==(e=k[this.store.detail.ownerKind])&&void 0!==e?e:this.store.detail.ownerKind}},{key:"metrics",get:function(){var e={};return Object.entries(this.monitorStore.data).forEach((function(t){var a=(0,n.default)(t,2),r=a[0],l=a[1];(0,h.default)(l,"data.result")&&(e["".concat(r)]=l)})),e}}]),a}(d.default.Component),T=(0,p.inject)("rootStore","detailStore")((0,p.observer)(N));t.default=T;var R=N;t.Component=R},function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(16),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(28),r(42),r(16),r(4),r(22),r(23),r(57),r(24),r(17),r(62);var l=n(r(315)),u=n(r(43));r(41);var o,i=n(r(44)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(14),v=n(r(63)),g=r(239),y=r(186),E=r(52),b=r(791),_=n(r(1417)),O=n(r(3953)),S=n(r(805)),C=n(r(3954));function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var k=(0,g.inject)("rootStore")(o=(0,g.observer)(o=(0,b.trigger)(o=function(e){(0,f.default)(r,e);var a=D(r);function r(){var e;(0,c.default)(this,r);for(var n=arguments.length,l=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.default)(this,a),(e=t.call(this,"volumes")).getApi=function(){return"".concat(e.apiVersion,"/persistentvolumeclaim_metrics")},e.handleParams=function(e){return e},e.filters=r,e}return(0,u.default)(a,[{key:"fetchMetrics",value:function(e){(0,o.default)((0,s.default)(a.prototype),"fetchMetrics",this).call(this,d(d({},this.filters),e))}},{key:"monitoringMetrics",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interval:5e3};return this.fetchMetrics(t),setInterval((function(){e.fetchMetrics(d(d({},t),{},{autoRefresh:!0}))}),a.interval)}}]),a}(r(a(845)).default);t.default=m},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=r(a(3)),d=a(794),p=r(a(3964));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var h=function(e){(0,u.default)(a,e);var t=m(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"getWavePath",value:function(){var e=this.props.rate,t=100*(1-e),a=20*(.5-Math.abs(.5-e));return"\n M0 ".concat(t,"\n \n Q ").concat(12.5," ").concat(t+a,", ").concat(25," ").concat(t,"\n T ").concat(50," ").concat(t,"\n\n T ").concat(75," ").concat(t,"\n T ").concat(100," ").concat(t,"\n\n T ").concat(125," ").concat(t,"\n T ").concat(150," ").concat(t,"\n\n T ").concat(175," ").concat(t,"\n T ").concat(200," ").concat(t,"\n\n V 100\n H 0\n\n Z\n ")}},{key:"render",value:function(){var e=this.props.className;return c.default.createElement("div",{className:(0,f.default)(p.default.container,e)},this.renderForeground(),this.renderCapacity())}},{key:"renderForeground",value:function(){var e=this.props.rate,t=(0,d.getSuitableValue)(e,"%");return c.default.createElement("div",{className:p.default.foreground},c.default.createElement("h3",null,t,"%"))}},{key:"renderCapacity",value:function(){var e="0 0 ".concat(100," ").concat(100),t=this.getWavePath();return c.default.createElement("svg",{width:"100%",height:"100%",viewBox:e,preserveAspectRatio:"none"},c.default.createElement("path",{className:p.default.wave,d:t}),c.default.createElement("path",{className:p.default.wave2,d:t}))}}]),a}(c.default.Component);t.default=h,h.propTypes={rate:s.default.number,className:s.default.string},h.defaultProps={rate:0}},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(5),r(11),r(6),r(86),r(48),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.ClusterAlertPolicyDetail=a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(86),r(28),r(48),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(7);var l,u,o=n(r(315)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(14),v=r(239),g=n(r(26)),y=n(r(63)),E=r(186),b=n(r(795)),_=r(52),O=r(791),S=n(r(1014)),C=n(r(823)),D=n(r(3970)),k=n(r(3976));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){for(var t=1;t0?"builtin":""}},{key:"listUrl",get:function(){var e=localStorage.getItem("alert-policy-detail-referrer");if(e)return e;var t=this.props.match.params,a=t.cluster,r=t.namespace,n=t.workspace,l=this.type;return"".concat(n?"/".concat(n):"","/clusters/").concat(a).concat(r?"/projects/".concat(r):"","/alert-rules").concat(l?"?type=".concat(l):"")}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"resetPolicy",get:function(){var e=this,a=this.props.match,r=(0,h.toJS)(this.store.detail);return{key:"reset",icon:"restart",text:t("RESET"),action:"edit",onClick:function(){return e.trigger("alerting.rule.reset",{type:e.type,cluster:a.params.cluster,detail:r,success:e.fetchData})}}}}]),r}(m.default.Component),I=(0,v.inject)("rootStore")(u=(0,v.observer)(u=(0,O.trigger)(u=function(e){(0,f.default)(a,e);var t=R(a);function a(e){var r;return(0,c.default)(this,a),(r=t.call(this,e)).authKey="rulegroups",r}return a}(w))||u)||u)||u;a.default=I;var M=(0,v.inject)("rootStore")(l=(0,v.observer)(l=(0,O.trigger)(l=function(e){(0,f.default)(a,e);var t=R(a);function a(e){var r;return(0,c.default)(this,a),(r=t.call(this,e)).authKey="clusterrulegroups",r}return a}(w))||l)||l)||l;a.ClusterAlertPolicyDetail=M},function(e,t,a){e.exports={header:"kLqf1HbgvncE_HpM34pz4",search:"_2_FuLSz9uWr12KC15lfVgB",actions:"_2_X5wj9y3MiCGon2LqOvXK",item:"_3Zyk52RkFf1sJz6rCX9PdB",content:"nHupxm2Fr2hsA70BXmCKN",head:"_26x7hW6cCUZ-jNjoMlz-56",headIcon:"_2zH27wjttK1MAnhYIEvJWh",headLine:"_I9pYkuXNGV4wRoBIk-9w",severity:"_3ftTZ15mo7eNhRbe8GIvxN",statusLine:"_3-tu95Qm7-kM1YwibFjhWN",target:"w-DTcIKKfNBbC723WxjTS",timeLabel:"_3-SLBePAUSVb9piaAaiJv6",time:"_1xi2aj1lis8IlK4lX9oUC4",time_white:"_2YRlqM_uPS-IuAc6Dm3Lar",title:"_211aVPR605bgjtrOcTWe99",desc:"_2KuzGiTKDnVpB887eRwSRz",expanded:"_2ivanZgb206WfuwTkaGR4U",itemExtra:"_3gRU7EtrPOVED1ctMRYwn5",ms_content:"_2U7VzbHDMRe6mcoNQKsQsv",ruleExpr:"_1Vs-uBGpunsZAje7BcRVkl",label:"MCJ6H_Tsq-M_mowtNX2NH",value:"_14L4I6leaLrDqGAi-BM0DB",itemExtraShow:"o39HqtWv_n8C8zXjQT687",status_disabled:"_1_FWg1Q_7iBuDn_hUtwwoG",status_pending:"_2wh_BTk8chvd5Z9FAA0zHt",status_firing:"_1aJNiGa073rYjGOpa0U5Ua",status_inactive:"_2FzW2eq7FwtTKw1wAn8LZW",info_disabled:"_36OFVtqLZnnzMguM9B3L-k",info_pending:"_8NCXFvYUdsUdu1_TPKbtr",info_firing:"_1G7NJEfDx_c-id8qzfDDKW",info_inactive:"_3NcF9w2Q47PUQ2Tr4wU19z",critical:"_1x23r_vnCw6lc_RAMI0ZK6",error:"fgjhWF7q-KzUaSQ46tj_x",footer:"_3l9tqtCU4hqyc4JWray_jm",pageSizeBox:"_10j4h-LctO_jPpSyi1Zghz",pagesize:"_2yV7RI7ixs2RUbaXgGCg-D",text:"_1Zxl_B6ruwO6hH-8rZBVyV",gap:"_1TdIBwMMx-AgnbaFZSa8Mr",pageSizeMenu:"_3rg_nQe9ZDhv-EWKgtwOCQ",pageSizeMenuitem:"MxEk4SUq6JJUAiQVFlwTF"}},function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(86),r(73),r(16),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.Component=a.default=void 0,r(12),r(109),r(45),r(5),r(86),r(73),r(28),r(42),r(16),r(4),r(22),r(23),r(57),r(24),r(17),r(62);var l=n(r(315)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(63)),h=n(r(26)),v=r(239),g=r(186),y=n(r(795)),E=r(52),b=r(791),_=r(14),O=n(r(907)),S=n(r(805)),C=n(r(3985));function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var k=function(e){(0,s.default)(r,e);var a=D(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),c=0;c-1,onClick:function(){return e.trigger("resource.delete",{type:e.name,detail:(0,_.toJS)(e.store.detail),success:e.returnTolist})}}]},e.getAttrs=function(){var a=e.store.detail,r=void 0===a?{}:a,n=r.createTime,l=r.phase,u=r.storageClassName,o=r.volumeHandle,i=r.persistentVolumeReclaimPolicy,c=r.accessModes,s=void 0===c?["-"]:c,f=r.capacity,d=r.volumeMode;return(0,m.default)((0,_.toJS)(r))?null:[{name:t("STATUS"),value:p.default.createElement("div",null,p.default.createElement(y.default,{type:l,name:t("PV_STATUS_".concat(l.toUpperCase()))}))},{name:t("CAPACITY"),value:"".concat((0,E.memoryFormat)(f,"Gi"),"Gi")},{name:t("ACCESS_MODE_TCAP"),value:s.join(",")},{name:t("STORAGE_CLASS"),value:u},{name:t("VOLUME_HANDLE"),value:o},{name:t("RECLAIM_POLICY"),value:i},{name:t("VOLUME_MODE"),value:t("VOLUME_MODE_".concat(d.toUpperCase()))},{name:t("CREATION_TIME_TCAP"),value:(0,E.getLocalTime)(n).format("YYYY-MM-DD HH:mm:ss")}]},e.returnTolist=function(){e.props.rootStore.routing.push(e.listUrl)},e}return(0,c.default)(r,[{key:"componentDidMount",value:function(){this.fetchData()}},{key:"render",value:function(){var e={detailStore:this.store};if(this.store.isLoading&&!this.store.detail.name)return p.default.createElement(g.Loading,{className:"ks-page-loading"});var a={module:this.module,authKey:this.authKey,name:(0,E.getDisplayName)(this.store.detail),desc:this.store.detail.description,attrs:this.getAttrs(),operations:this.isFedManaged?[]:this.getOperations(),icon:"storage",breadcrumbs:[{label:t("PERSISTENT_VOLUME_PL"),url:this.listUrl}]};return p.default.createElement(S.default,(0,l.default)({stores:e},a,{routes:(0,C.default)(this.props.match.path)}))}},{key:"name",get:function(){return"PERSISTENT_VOLUME"}},{key:"module",get:function(){return"persistentvolumes"}},{key:"authKey",get:function(){return"persistentvolumeclaims"}},{key:"listUrl",get:function(){var e=this.props.match.params.cluster;return"/clusters/".concat(e,"/volumes/PV")}},{key:"isFedManaged",get:function(){return this.store.detail.isFedManaged}}]),r}(p.default.Component),N=(0,v.inject)("rootStore")((0,v.observer)((0,b.trigger)(k)));a.default=N;var T=k;a.Component=T},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u=0?(d-f)/86400/1e3:d-f,m=p>=0?p>=0&&p<1?Math.ceil(p):Math.floor(p):d-f;return _.LICENSE_UNAUTHORIZED_STATUS_MAP.includes(u)?a=!0:"Time expired"===u&&"subscription"===o?r=!0:_.LICENSE_OVERLIMIT_STATUS_MAP.includes(u)?t=!0:(m>0&&m<=30||m<=0&&"subscription"!==o)&&(n=!0),C({showLicenseTip:_.STATUS_MAPPER.includes(u),isExpired:r,isUnAuthorized:a,isOverLimit:t,unExpired:n,dueDate:m},l)},e}return(0,f.default)(i,[{key:"getUrl",value:function(e){var t=e.name;return"".concat(this.apiVersion,"/").concat(this.module,"/").concat(t)}},{key:"fetchLicense",value:(r=(0,o.default)(n.default.mark((function e(){var t,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={},e.next=3,request.get(this.getUrl({name:"ks-license"}),{},{},(function(){return{}}));case 3:return a=e.sent,(0,g.default)(a)||(t=C({},this.mapper(a))),this.licenseInfo=this.handleLicenseInfo(t),e.abrupt("return",(0,b.toJS)(this.licenseInfo));case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"updateLicense",value:(a=(0,o.default)(n.default.mark((function e(t){var a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={data:t},e.abrupt("return",this.submitting(request.put(this.getUrl({name:"ks-license"}),a)));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"invalidLicense",value:(t=(0,o.default)(n.default.mark((function e(t){var a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={data:t},e.abrupt("return",this.submitting(request.put("".concat(this.getUrl({name:"ks-license"}),"?validate=true"),a)));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),i}(r(a(68)).default),u=(0,v.default)(l.prototype,"licenseInfo",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),(0,v.default)(l.prototype,"fetchLicense",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchLicense"),l.prototype),(0,v.default)(l.prototype,"updateLicense",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"updateLicense"),l.prototype),(0,v.default)(l.prototype,"invalidLicense",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"invalidLicense"),l.prototype),l);t.default=k},function(e,t,a){e.exports={subNav:"_1pmI9ndWK9rEGV4MJm4HOX",title:"_2noUEB0newe-2ZeJc6_vQM",extraIcon:"_106IDsxUlkAKzEMJPQb_VE",select:"zbwCmzs7IGtLHtKeFTk5q",open:"_1_5lTDnCWRT_bjONGPwjJ-",innerNav:"_1lx3cQgES6ywH7v7ewNDW9",childSelect:"IYCaQMTl6Z32Tj4im7ux3",disabled:"_3NGHEZvhf1DSOaNTdwoIMo",hide:"_2IhCm1aqthcg__sRJCh2Ro",tip:"_3w0p4MCdcQ_5cKyY7YyaCc",back:"_24MRiw49Mh9WeerGEXAX8o",rightIcon:"_15BwbKp8iiYrESLkQE3AtK"}},function(e,t,a){e.exports={modal:"_2Ma6l2-1qGALcBbXeHSfD",body:"e9-9CWzdPlOWpemV7BFST",close:"_2b1a8uCSxC1Ze6-JIVKUbg",navs:"_2vO2KN0ZszlryTe-zGdisF",nav:"_2QN673FlOzj6UzAeVlo0Pt",active:"_3qkHuByT9irpB_OBNODDMe",bottomIcon:"_1Pkkvq4S3sY9dJ6JsDaxLd",icon:"_2SFazppVz_WfLkpJRqznL",title:"xVfoJz14QNXprPQT4yzRz",desc:"_2j8YMUiWW7wv32Owr4hleS",unAuthorized:"_1gj9hTwvscNQSCl0xMt4oU",operators:"_2UTTnW2Wpc9T1bRxtcGQvO",operate:"_3laRx0YKqrTFaENMnE7VLu","left-icon":"R5uTL-NlmklkYHWBRcr2M",enabled:"_1JYwilpJhc73NIHl_zS0u-",disabled:"_2YMjlSJCN-GRNLUtXhqKBg"}},,,,,,,,,,,,,,,,,,,,,function(e,a,r){"use strict";var n=r(20);r(12),r(187),r(11),r(6),r(84),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(85),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(187),r(11),r(6),r(84),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(85),r(62),r(7);var l=n(r(315)),u=n(r(43));r(41);var o,i,c,s,f=n(r(44)),d=n(r(30)),p=n(r(65)),m=n(r(36)),h=n(r(37)),v=n(r(88)),g=n(r(55)),y=n(r(56)),E=n(r(51)),b=n(r(49)),_=(n(r(66)),n(r(63))),O=n(r(26)),S=n(r(74)),C=n(r(0)),D=r(14),k=r(239),N=r(186),T=n(r(789)),R=n(r(790)),w=n(r(1134)),I=n(r(814)),M=n(r(834)),P=n(r(438)),A=r(791),j=r(52),L=n(r(240)),x=n(r(4434));function U(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function z(e){for(var t=1;t=0},this.isOutdated=function(e){if(!globals.app.isMultiCluster)return!1;var t=(0,u.default)(globals,"clusterConfig.".concat(e,".ksVersion"));return(0,l.compareVersion)(t,"3.4.0")<0},this.getStoreByCluster=function(e){return o.default},this.setStoreByCluster=function(e){var t=a.getStoreByCluster(e);a.setStore(new t)},t&&(this.store=t)}},function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(109),r(5),r(11),r(6),r(84),r(48),r(16),r(27),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(85),r(62),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(84),r(28),r(48),r(42),r(16),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(85),r(62),r(188),r(7);var u,o=n(r(315)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=n(r(240)),v=n(r(788)),g=n(r(801)),y=n(r(795)),E=n(r(790)),b=n(r(792)),_=l(r(793)),O=n(r(796)),S=n(r(2001)),C=r(52),D=r(72),k=r(434),N=r(244),T=r(239),R=r(14),w=n(r(5261));function I(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function M(e){for(var t=1;t1&&e.rootStore.routing.query(M(M({},a),{},{page:1}))}),[l]),m.default.createElement(A,(0,o.default)({store:n},e))}));a.default=j},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={letter:"MtAEvDDok76bC5n6BMeYs",img:"_1p0huC_MiGExAG5cffowO-"}},function(e,t,a){e.exports={wrapper:"_1XkdSSXdX86U8l_DnkJPqJ",text:"awHbyBWcJ6ZsY7PX_d-UQ",ellipsis:"_3zTrKZJ2zDD4H30HDygv9k",icon:"_2nWo_V38K9qDtgmudAI-ai",clickable:"_16dsw4IFfxE-j09HQTBZtZ"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=r(186),v=n(r(1473)),g=n(r(1477));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=function(e){(0,c.default)(r,e);var a=y(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.formRef,r=e.data,n=e.children,o=e.hideFooter,i=e.onCancel,c=e.onOk,s=e.cancelText,f=e.okText,p=e.isSubmitting,y=e.bodyClassName,E=e.formClassName,b=e.disableOk,_=(0,u.default)(e,["formRef","data","children","hideFooter","onCancel","onOk","cancelText","okText","isSubmitting","bodyClassName","formClassName","disableOk"]);return d.default.createElement(v.default,(0,l.default)({},_,{bodyClassName:(0,m.default)(g.default.formBody,y),onCancel:i,hideFooter:!0}),d.default.createElement(h.Form,{ref:a,data:r,onSubmit:c},d.default.createElement("div",{className:(0,m.default)(g.default.formWrapper,E)},n),!o&&d.default.createElement("div",{className:g.default.formFooter},d.default.createElement(h.Button,{type:"default",onClick:i,"data-test":"modal-cancel"},s||t("CANCEL")),d.default.createElement(h.Button,{type:"control",htmlType:"submit",loading:p,disabled:b||p,"data-test":"modal-ok"},f||t("OK")))))}}]),r}(d.default.Component);a.default=E,E.propTypes={data:p.default.object,isSubmitting:p.default.bool}},function(e,t,a){e.exports={modalBody:"_2emSCCZW7Any6zY9sbt0dh",body:"_3zk4pcFFwHI55jC3hhKShH",content:"_2AVQmoTGa5M_aaHwB5m25A",closeIcon:"_3ZNMNqX719F5uyujlsIEEX",footer:"Pv1Crv3p0hsWafBqva7XY"}},function(e,t,a){e.exports={wrapper:"_2WgnPoNTBlYxMadUOp6X6F",primary:"_1N_xYp5Mlw_vRt2GBQPG3_",control:"_1GBzD41XmCACAyrxXIpA2g",switch:"obdQdmNh6a9AylYbpxZXo",inner:"_24C6iSzaC5OhGiAjheEbHW",on:"u9GufWWwHgs1SY_uAQQuU",disabled:"_2MD8-ccizgfYBdMPKkj0Zv"}},function(e,a,r){"use strict";var n=r(20);r(12),r(187),r(11),r(6),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(187),r(11),r(6),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=r(186),p=n(r(1266)),m=n(r(828)),h=n(r(26)),v=n(r(63)),g=n(r(854)),y=n(r(1)),E=n(r(0)),b=n(r(2048));function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;t=t})),p=n0?r.map((function(t,a){var r=t.cluster;return i.default.createElement("div",{key:"".concat(r,"-").concat(a)},i.default.createElement(p.default,{cluster:r,allClusters:e.allClusters}))})):t("ALL_CLUSTERS"),n.length>0&&function(t){var a=i.default.createElement("div",{className:m.default.tipContentBox,style:{minWidth:"0px"}},t.map((function(t,a){return i.default.createElement("div",{className:(0,d.default)(m.default.tipLineItem,m.default.custom_line),key:"".concat(t.cluster,"-").concat(a)},i.default.createElement(p.default,{cluster:t.cluster,allClusters:e.allClusters}))})));return i.default.createElement(c.Tooltip,{content:a,placement:"top"},i.default.createElement("div",{className:m.default.targetTipRest},t.length))}(n))),i.default.createElement("div",{className:m.default.cus_text},i.default.createElement("span",{className:m.default.pr_title},t("RULE_EXPRESSION"),":"),i.default.createElement("span",{className:m.default.exprText},e.rule.expr))))))};a.default=h},function(e,t,a){e.exports={tags:"_72IXnbKwDL_C2VKhWGqOF"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(11),r(6),r(73),r(18),r(87),r(48),r(16),r(27),r(98),r(10),r(316),r(24),r(64),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var u=l(r(61)),o=l(r(30)),i=l(r(96));r(5),r(11),r(6),r(73),r(18),r(87),r(48),r(16),r(27),r(98),r(10),r(4),r(316),r(24),r(64),r(7);var c=r(186),s=l(r(3)),f=r(923),d=l(r(135)),p=l(r(26)),m=l(r(994)),h=l(r(880)),v=n(r(0)),g=r(52),y=l(r(1480)),E={cpu:"cpu",pod:"pod",memory:"memory",disk:"storage",network:"network"},b=function(e){var a,r,n,l,b,_,O,S,C,D,k,N,T,R,w=e.rule,I=e.handleEdit,M=e.allClusters,P=void 0===M?[]:M,A=Object.keys(w.exprBuilder)[0],j=(0,p.default)(w,"exprBuilder.workload.kind","Deployment"),L=(0,v.useState)((0,p.default)(w,"disable",!1)),x=(0,i.default)(L,2),U=x[0],z=x[1],F=(0,v.useReducer)((function(e){return e+1}),0),G=(0,i.default)(F,2)[1],V=function(e){return(0,g.showNameAndAlias)(e,"cluster",{},!0,(function(){G()}))},B=function(e){return v.default.createElement("div",{className:y.default.tipContentBox,style:{minWidth:"200px"}},e.map((function(e,a){return v.default.createElement("div",{className:y.default.tipLineItem,style:{alignItems:"flex-start"},key:a},v.default.createElement("div",{className:y.default.tipText_title},v.default.createElement("img",{src:"/assets/alarmProject.svg"}),v.default.createElement("span",null,e.namespace)),v.default.createElement("div",{className:y.default.tipText_deploy},v.default.createElement("span",null,t("".concat(j.toUpperCase(),"S_VALUES"),{values:e.names.join(", ")}))))})))},Y=function(){var e=(0,p.default)(w,"exprBuilder.".concat(A,".names"),[]),a={};e.forEach((function(e){a[e.cluster]?a[e.cluster]=[].concat((0,u.default)(a[e.cluster]),[{cluster:e.cluster,namespace:(0,p.default)(e,"namespace",""),names:(0,p.default)(e,"names",[])}]):a[e.cluster]=[{cluster:e.cluster,namespace:(0,p.default)(e,"namespace",""),names:(0,p.default)(e,"names",[])}]}));var r=Object.entries(a).map((function(e){var t=(0,i.default)(e,2);return[t[0],t[1]]})),n=r.slice(0,3),l=r.slice(3).map((function(e){return(0,i.default)(e,2)[1]}));return v.default.createElement(v.default.Fragment,null,n.map((function(e,a){var r="".concat(V(e[0])," | ").concat(e[1].reduce((function(e,t){return e+t.names.length}),0));return v.default.createElement(c.Tooltip,{content:"node"===A?v.default.createElement("div",{className:y.default.tipContentBox_cluster},v.default.createElement("span",null,t("NODES_VALUES",{values:e[1][0].names.join(", ")}))):B(e[1]),key:e},v.default.createElement("div",{key:a},v.default.createElement(m.default,{cluster:e[0],allClusters:P,title:r})))})),l.length>0&&function(e){var a=v.default.createElement("div",{className:y.default.tipContentBox,style:{minWidth:"200px"}},e.map((function(e,a){var r=e.reduce((function(e,t){return e+t.names.length}),0);return v.default.createElement("div",{className:y.default.tipLineItem,style:{alignItems:"flex-start"},key:a},v.default.createElement("div",{style:{marginBottom:"8px"}},v.default.createElement(m.default,{cluster:e.cluster,allClusters:P,title:"".concat(V(e[0].cluster)," | ").concat(r)})),"node"===A?v.default.createElement(v.default.Fragment,null,e.map((function(e,a){return v.default.createElement("div",{className:y.default.tipText_nodes,key:a},t("NODES_VALUES",{values:e.names.join(", ")}))}))):v.default.createElement(v.default.Fragment,null,e.map((function(e,a){return v.default.createElement(v.default.Fragment,null,v.default.createElement("div",{className:y.default.tipText_title,key:"".concat(a,"_0")},v.default.createElement("img",{src:"/assets/alarmProject.svg"}),v.default.createElement("span",null,e.namespace)),v.default.createElement("div",{className:y.default.tipText_deploy,key:"".concat(a,"_1")},v.default.createElement("span",null,t("".concat(j.toUpperCase(),"S_VALUES"),{values:e.names.join(",")}))))}))))})));return v.default.createElement(c.Tooltip,{content:a,placement:"right"},v.default.createElement("div",{className:y.default.targetTipRest},e.length))}(l))},W=(0,d.default)(f.RESOURCE_METRICS_CONFIG[A||"node"])||{};return v.default.createElement("div",{className:y.default.container},v.default.createElement("div",{className:y.default.head},v.default.createElement("div",{className:y.default.title},(R=Object.keys((0,p.default)(w.exprBuilder,"".concat(A,".metricThreshold."),{}))[0]||"pod",v.default.createElement("div",{className:(0,s.default)(y.default.icon,(T={},(0,o.default)(T,y.default.iconDisabled,U),(0,o.default)(T,y.default.iconOn,!U),T))},v.default.createElement(c.Icon,{size:40,name:E[R]}))),v.default.createElement("div",{className:y.default.text},v.default.createElement("p",null,v.default.createElement("span",{className:y.default.ruleName},w.alert),v.default.createElement(h.default,{data:(0,p.default)(w,"severity")})),v.default.createElement("p",null,U?t("DISABLED"):t("ENABLED")))),v.default.createElement("div",{className:y.default.opt},!e.builtInRule&&v.default.createElement("div",{className:y.default.iconBg},v.default.createElement(c.Icon,{name:"trash",size:16,onClick:function(){e.handleDelete()}})),v.default.createElement("div",{className:y.default.iconBg},v.default.createElement(c.Icon,{name:"pen",size:16,onClick:function(){return I()}})),v.default.createElement("div",{className:y.default.sToggle},v.default.createElement("div",{className:y.default.tooltip},v.default.createElement("span",null,U?t("ENABLE_RULE"):t("DISABLE_RULE"))),v.default.createElement("div",{className:y.default.triangle}),v.default.createElement(c.Toggle,{checked:!U,onChange:function(){z(!U),e.handleDisable(!U)}})))),v.default.createElement("div",{className:y.default.desc},(a=(0,p.default)(w,"exprBuilder.".concat(A,".metricThreshold")),r=Object.keys(a)[0],n=Object.keys(a[r])[0],l="".concat(r,":").concat(n),b=W[l],_=b.ruleConfig.filter((function(e){return"thresholds"===e.name}))[0].reverser,O=t("".concat(b.label)).replace(/[((]%[))]/g,""),S=(0,p.default)(w,"exprBuilder.".concat(A,".comparator")),C=_(Number(Object.values(a[r])[0])),D="core"===b.ruleConfig[1].unit?1===C?t("CORE"):t("CORE_PL"):b.ruleConfig[1].unit,k=w.for.slice(0,-1),N=w.for.slice(-1),v.default.createElement(v.default.Fragment,null,v.default.createElement("div",{className:y.default.exprLine},v.default.createElement("span",{className:y.default.title},"".concat(t("MONITORING_TARGET"),":")),v.default.createElement("span",{className:y.default.descTextCL},Y())),v.default.createElement("div",{className:y.default.exprLine},v.default.createElement("span",{className:y.default.pr_title},"".concat(t("ALERTING_RULE"),":")),v.default.createElement("span",{className:y.default.exprText},"%"===D?t({s:"ALERT_RULE_TEXT_PERCENT_SECOND",m:"ALERT_RULE_TEXT_PERCENT_MINUTE",h:"ALERT_RULE_TEXT_PERCENT_HOUR"}[N],{alterTypeText:O,comparator:S,thresholds:C,durationValue:k}):t({s:"ALERT_RULE_TEXT_SECOND",m:"ALERT_RULE_TEXT_MINUTE",h:"ALERT_RULE_TEXT_HOUR"}[N],{alterTypeText:O,comparator:S,thresholds:C,unit:D,durationValue:k})))))))};a.default=b},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NODE_ALERTING_CONFIG=void 0;var r=a(1269),n={"cpu:utilization":{label:"CPU_UTILIZATION_SCAP",tcapLabel:"CPU_UTILIZATION_NO_PERCENT_TCAP",prefixIcon:"cpu",ruleConfig:r.PERCENT_RULE_CONFIG},"cpu:load1m":{label:"CPU_LOAD_1",tcapLabel:"CPU_LOAD_1_TCAP",prefixIcon:"cpu",ruleConfig:r.BASE_RULE_CONFIG},"cpu:load5m":{label:"CPU_LOAD_5",tcapLabel:"CPU_LOAD_5_TCAP",prefixIcon:"cpu",ruleConfig:r.BASE_RULE_CONFIG},"cpu:load15m":{label:"CPU_LOAD_15",tcapLabel:"CPU_LOAD_15_TCAP",prefixIcon:"cpu",ruleConfig:r.BASE_RULE_CONFIG},"memory:utilization":{label:"MEMORY_UTILIZATION_SCAP",tcapLabel:"MEMORY_UTILIZATION_NO_PERCENT_TCAP",prefixIcon:"memory",ruleConfig:r.PERCENT_RULE_CONFIG},"memory:available":{label:"MEMORY_AVAILABLE",tcapLabel:"MEMORY_AVAILABLE_TCAP",prefixIcon:"memory",ruleConfig:r.GIB_RULE_CONFIG},"network:transmittedRate":{label:"DATA_SEND_RATE",tcapLabel:"DATA_SEND_RATE_TCAP",prefixIcon:"network",ruleConfig:r.MBPS_RULE_CONFIG},"network:receivedRate":{label:"DATA_RECEIVE_RATE",tcapLabel:"DATA_RECEIVE_RATE_TCAP",prefixIcon:"network",ruleConfig:r.MBPS_RULE_CONFIG},"disk:spaceUtilization":{label:"DISK_SPACE_UTILIZATION",tcapLabel:"DISK_SPACE_UTILIZATION_NO_PERCENT_TCAP",prefixIcon:"storage",ruleConfig:r.PERCENT_RULE_CONFIG},"disk:spaceAvailable":{label:"DISK_SPACE_AVAILABLE",tcapLabel:"DISK_SPACE_AVAILABLE_TCAP",prefixIcon:"storage",ruleConfig:r.GB_RULE_CONFIG},"disk:inodeUtilization":{label:"INODE_UTILIZATION",tcapLabel:"INODE_UTILIZATION_NO_PERCENT_TCAP",prefixIcon:"storage",ruleConfig:r.PERCENT_RULE_CONFIG},"disk:iopsRead":{label:"DISK_READ_IOPS",tcapLabel:"DISK_READ_IOPS_TCAP",prefixIcon:"storage",ruleConfig:r.BASE_RULE_CONFIG},"disk:iopsWrite":{label:"DISK_WRITE_IOPS",tcapLabel:"DISK_WRITE_IOPS_TCAP",prefixIcon:"storage",ruleConfig:r.BASE_RULE_CONFIG},"disk:throughputRead":{label:"DISK_READ_THROUGHPUT",tcapLabel:"DISK_READ_THROUGHPUT_TCAP",prefixIcon:"storage",ruleConfig:r.KBS_RULE_CONFIG},"disk:throughputWrite":{label:"DISK_WRITE_THROUGHPUT",tcapLabel:"DISK_WRITE_THROUGHPUT_TCAP",prefixIcon:"storage",ruleConfig:r.KBS_RULE_CONFIG},"pod:abnormalRatio":{label:"UNAVAILABLE_POD_RATIO",tcapLabel:"UNAVAILABLE_POD_RATIO_NO_PERCENT_TCAP",prefixIcon:"pod",ruleConfig:r.PERCENT_RULE_CONFIG},"pod:utilization":{label:"POD_QUOTA_UTILIZATION_SCAP",tcapLabel:"POD_QUOTA_UTILIZATION_NO_PERCENT_TCAP",prefixIcon:"pod",ruleConfig:r.PERCENT_RULE_CONFIG}};t.NODE_ALERTING_CONFIG=n;var l=n;t.default=l},,function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(1269),n={"cpu:usage":{label:"CPU_USAGE_SCAP",tcapLabel:"CPU_USAGE_TCAP",prefixIcon:"cpu",ruleConfig:r.CORE_RULE_CONFIG},"memory:usage":{label:"MEMORY_USAGE_SCAP",tcapLabel:"MEMORY_USAGE_TCAP",prefixIcon:"memory",ruleConfig:r.MIB_RULE_CONFIG},"memory:usageWoCache":{label:"MEMORY_USAGE_WO_CACHE_SCAP",tcapLabel:"MEMORY_USAGE_WO_CACHE_TCAP",prefixIcon:"memory",ruleConfig:r.MIB_RULE_CONFIG},"network:transmittedRate":{label:"DATA_SEND_RATE",tcapLabel:"DATA_SEND_RATE_TCAP",prefixIcon:"network",ruleConfig:r.MBPS_RULE_CONFIG},"network:receivedRate":{label:"DATA_RECEIVE_RATE",tcapLabel:"DATA_RECEIVE_RATE_TCAP",prefixIcon:"network",ruleConfig:r.MBPS_RULE_CONFIG},"replica:unavailableRatio":{label:"UNAVAILABLE_WORKLOAD_REPLICA_RATIO",tcapLabel:"UNAVAILABLE_WORKLOAD_REPLICA_RATIO_NO_PERCENT_TCAP",prefixIcon:"backup",ruleConfig:r.PERCENT_RULE_CONFIG}};t.default=n},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(18),r(10),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(18),r(10);var u=l(r(315)),o=l(r(96)),i=n(r(0)),c=l(r(1)),s=r(186),f=l(r(63)),d=l(r(26)),p=l(r(74)),m=l(r(242)),h=l(r(2077)),v=l(r(2078)),g=l(r(2096)),y=[{label:t("RULE_TEMPLATE"),value:"ruleTemplate"},{label:t("CUSTOM_RULE"),value:"customRule"}],E=function(e,a){var r=e.editRule,n=(0,f.default)(r)?y[0].value:(0,f.default)((0,d.default)(r,"exprBuilder",{}))?y[1].value:y[0].value,l=(0,i.useState)(n),c=(0,o.default)(l,2),E=c[0],b=c[1],_=(0,i.useRef)(),O=function(t){var a=e.onSave,r=_.current.target;r&&r.validate((function(){var e=r.getData();if("ruleTemplate"===E){var n=Object.keys((0,d.default)(e,"exprBuilder"))[0],l=(0,d.default)(e,"exprBuilder.".concat(n,".for")),u=(0,d.default)(e,"exprBuilder.".concat(n,".severity"));(0,p.default)(e,"for",l),(0,p.default)(e,"severity",u),(0,m.default)(e,"exprBuilder.".concat(n,".for")),(0,m.default)(e,"exprBuilder.".concat(n,".severity"))}else(0,p.default)(e,"exprBuilder",{});a(e),t&&t()}))};return(0,i.useEffect)((function(){var t=a.registerSubRoute,r=e.onCancel;t&&t(O,r)}),[E]),i.default.createElement("div",{className:h.default.AddRuleContainer},i.default.createElement("div",{className:"h6",style:{display:"flex",alignItems:"center"}},i.default.createElement(s.Icon,{name:"return",size:20,onClick:function(){var t=a.resetSubRoute;t&&t(),e.onCancel()}}),i.default.createElement("span",null,t("ADD_ALERTING_RULE"))),i.default.createElement("div",{className:h.default.AddForm},i.default.createElement(s.RadioGroup,{buttonWidth:132,value:E,wrapClassName:"radio",onChange:function(e){return b(e)}},y.map((function(e){return i.default.createElement(s.RadioButton,{key:e.value,value:e.value},e.label)}))),"ruleTemplate"===E?i.default.createElement(v.default,(0,u.default)({ref:_},e)):i.default.createElement(g.default,(0,u.default)({ref:_},e))))};E.contextTypes={registerSubRoute:c.default.func,resetSubRoute:c.default.func};var b=E;a.default=b},function(e,t,a){e.exports={AddRuleContainer:"WpgwYfFtGYQ9bOabv902A",AddForm:"xiV4clfTcv89q6y8rXZlp"}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(10),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(10);var l=n(a(315)),u=n(a(96)),o=r(a(0)),i=n(a(26)),c=n(a(2079)),s=n(a(2092)),f=function(e,t){var a=e.editRule,r=(0,i.default)(a,"exprBuilder",{node:{}}),n=(0,o.useState)(Object.keys(r)[0]),f=(0,u.default)(n,2),d=f[0],p=f[1],m=(0,o.useRef)(),h=(0,o.useRef)();return(0,o.useImperativeHandle)(t,(function(){return{target:"node"===d?m.current.target:h.current.target}})),"node"===d?o.default.createElement(c.default,(0,l.default)({ref:m,exprBuilderTypeChange:p},e)):o.default.createElement(s.default,(0,l.default)({ref:h,exprBuilderTypeChange:p},e))},d=(0,o.forwardRef)(f);t.default=d},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(11),r(31),r(6),r(97),r(16),r(98),r(10),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(5),r(11),r(31),r(6),r(97),r(16),r(98),r(10),r(4),r(7);var u=l(r(96)),o=n(r(0)),i=r(186),c=l(r(26)),s=l(r(63)),f=l(r(247)),d=l(r(855)),p=l(r(447)),m=l(r(158)),h=l(r(1481)),v=l(r(1482)),g=l(r(2087)),y=l(r(995)),E=i.Tabs.TabPanel,b=function(e,a){var r=e.editRule,n=e.exprBuilderTypeChange,l=(0,o.useState)("node"),b=(0,u.default)(l,1)[0],_=(0,o.useState)((function(){return(0,c.default)(r,"clusterSelector.inValues",[])})),O=(0,u.default)(_,1)[0],S=(0,o.useCallback)((function(e,t){return!!r.exprBuilder?(0,c.default)(r,e,t):t}),[r]),C=(0,o.useState)((function(){var e="node";if(!(0,s.default)(r)&&r.exprBuilder){var t=r.exprBuilder;e=Object.keys(t)[0]}var a="node"!==e;return{alert:S("alert",""),annotations:{summary:S("annotations.summary",""),message:S("annotations.message","")},clusterSelector:{inValues:S("clusterSelector.inValues",[])},exprBuilder:{node:{names:a?[{cluster:"",names:[]}]:S("exprBuilder.node.names",[{cluster:"",names:[]}]),comparator:S("exprBuilder.node.comparator",">"),metricThreshold:a?{}:S("exprBuilder.node.metricThreshold",{}),for:S("for","1m"),severity:S("severity","critical")}},disable:S("disable",!1),labels:(0,c.default)(r,"labels")}})),D=(0,u.default)(C,1)[0],k=(0,o.useRef)();(0,o.useImperativeHandle)(a,(function(){return{target:k.current}}));var N=function(e,a,r){if(!a)return r();if((0,s.default)(a.comparator))return r({message:t("OPERATOR_REQUIRED"),field:e.field});if((0,s.default)(a.metricThreshold))return r({message:t("THRESHOLD_REQUIRED"),field:e.field});var n=Object.keys(a.metricThreshold)[0],l=Object.keys(a.metricThreshold[n])[0],u=a.metricThreshold[n][l];return""===u||!u||(0,m.default)(u)?r({message:t("THRESHOLD_REQUIRED"),field:e.field}):(0,p.default)(u,".")?r({message:t("THRESHOLD_INVALID"),field:e.field}):void r()},T=function(a,r,n){var l=(0,d.default)(r.filter((function(e){return""!==e&&""!==e.cluster})),(function(e){return e.cluster}));return Object.entries(l).some((function(e){var t=(0,u.default)(e,2)[1],a=[];return t.forEach((function(e){a=a.concat(e.names)})),(0,f.default)(a).length!==a.length}))?n({message:t("NODE_TARGET_REPEAT")}):(r.forEach((function(a){return""===a?n({message:t("MONITOR_TARGET_EMPTY")}):""===a.cluster?n({message:t("CLUSTER_FIELD_EMPTY")}):e.allClusters.find((function(e){return e.name===a.cluster}))?(0,s.default)(a.names)?n({message:t("SELECT_A_TARGET_NODE")}):void 0:n({message:t("MONITOR_TARGET_CLUSTER_DELETED_DESC")})})),n())};return o.default.createElement(i.Form,{data:D,ref:k},o.default.createElement("div",{className:h.default.label},t("RULE_SETTINGS")),o.default.createElement("div",{className:h.default.contentGroup},o.default.createElement(i.Form.Item,{label:t("RULE_NAME"),desc:t("CUSTOM_RULE_NAME_DESC"),rules:[{required:!0,message:t("RULE_NAME_REQUIRED")}]},o.default.createElement(i.Input,{name:"alert",maxLength:63})),o.default.createElement("div",{className:h.default.tabs},o.default.createElement(i.Tabs,{type:"button",activeName:b,onChange:function(e){return n(e)}},o.default.createElement(E,{label:t("NODE"),name:"node"}),o.default.createElement(E,{label:t("WORKLOAD"),name:"workload"}))),o.default.createElement(i.Form.Item,{label:t("MONITORING_TARGETS"),rules:[{required:!0,message:t("MONITOR_TARGET_EMPTY")},{validator:T}]},o.default.createElement(v.default,{monitorLevel:"node",resourceType:"node",name:"exprBuilder.node.names",clusterTargets:O,allClusters:e.allClusters})),o.default.createElement(i.Form.Item,{label:t("TRIGGER_CONDITION"),rules:[{required:!0,message:t("SET_ACTIVATION_CONDITION_DESC")},{validator:N}]},o.default.createElement(g.default,{resourceType:"node",name:"exprBuilder.node"}))),o.default.createElement(y.default,null),o.default.createElement("div",{className:h.default.label},t("MESSAGE_SETTINGS")),o.default.createElement("div",{className:h.default.contentGroup},o.default.createElement(i.Form.Item,{className:h.default.message,label:t("MESSAGE_SUMMARY"),desc:t("MESSAGE_SUMMARY_DESC"),rules:[{required:!0,message:t("MESSAGE_REQUIRED")}]},o.default.createElement(i.Input,{name:"annotations.summary",maxLength:63})),o.default.createElement(i.Form.Item,{className:h.default.message,label:t("MESSAGE_DETAILS"),desc:t("MESSAGE_DETAILS_DESC")},o.default.createElement(i.TextArea,{name:"annotations.message",maxLength:256}))))},_=(0,o.forwardRef)(b);a.default=_},function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(5),a(11),a(6),a(18),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var l=n(a(30)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51)),f=r(a(0)),d=n(a(829)),p=n(a(439)),m=n(a(189)),h=n(a(2082)),v=n(a(1484));function g(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function y(e){for(var t=1;t0)},e.fetchNsList=function(t){var a=t.cluster,r=t.workspace;return e.store.fetchList({cluster:a,workspace:r,labelSelector:"kubefed.io/managed!=true, kubesphere.io/kubefed-host-namespace!=true",limit:-1})},e}return(0,o.default)(a,[{key:"render",value:function(){return f.default.createElement("div",{className:v.default.wrapper},f.default.createElement(d.default,{value:this.props.value.map((function(e,t){return y(y({},e),{},{id:t})})),onChange:this.handleSelectChange,checkItemValid:this.checkItemValid,itemType:"object"},f.default.createElement(h.default,{clusterOptions:this.clusterOptions,fetchNsList:this.fetchNsList,allWorkspace:this.props.allWorkspace,workloadType:this.props.workloadType})))}},{key:"clusterOptions",get:function(){return this.props.allClusters}}]),a}(f.Component);t.default=b},function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(11),a(6),a(28),a(34),a(15),a(9),a(13),a(10),a(4),a(7);var l=n(a(30)),u=n(a(96)),o=r(a(0)),i=a(186),c=n(a(1483));function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function f(e){for(var t=1;ti-30&&(n=t,a=!0)}));var c=t.map((function(e,t){return{label:e,value:e,hide:-1!==n&&t>n}}));r>i-30?(c[n].label="+".concat(t.length-n),w((0,u.default)(c))):w((0,u.default)(c));var s=O.current.selectRef.current.children[0].children[0].children;c.forEach((function(e,t){if(s[t]&&(e.hide||s[t].setAttribute("style","display:inline-block;"),(0,f.default)(e.label,"+"))){var a=v.default.hideIcon;s[t]&&s[t].setAttribute("class","tag tag-default select-multi-value-item ".concat(a))}}))}}),[l]),(0,d.useEffect)((function(){var e=l.cluster,t=void 0===e?"":e,a=l.namespace,r=void 0===a?"":a;""!==t&&""!==r&&r!==j.current&&Promise.all([_.current[b].fetchList({cluster:l.cluster,namespace:l.namespace,limit:-1})]).then((function(e){var t=(0,o.default)(e,1)[0];A(t.map((function(e){return e.name})))})),j.current=l.namespace}),[l,b]);var L=(0,d.useCallback)((function(e){e!==l.cluster&&(k(""),E({cluster:e,namespace:"",names:[]}))}),[l]),x=(0,d.useCallback)((function(e){var t=e.namespace,a=e.workspace;k(a),E({cluster:l.cluster,namespace:t,names:[]})}),[l]),U=(0,d.useCallback)((function(e){E({cluster:l.cluster,namespace:l.namespace,names:e})}),[l]),z=(0,d.useCallback)((function(e){var t=n.filter((function(t){return t.name===e.value}))[0];return e.value?d.default.createElement(d.default.Fragment,null,d.default.createElement(i.Icon,{name:h.CLUSTER_PROVIDER_ICON[t.provider]||"kubernetes",size:20,type:"light"}),d.default.createElement("span",{className:v.default.optionText},e.label)):null}),[n]),F=(0,d.useCallback)((function(e){if(""===e.value)return d.default.createElement("span",null,e.label);var t=n.filter((function(t){return t.name===e.value}))[0];if(!t)return d.default.createElement(d.default.Fragment,null,d.default.createElement(i.Icon,{name:"question",size:20}),d.default.createElement("span",{className:v.default.optionText},e.label));var a=(0,c.default)(t,"provider",!1)?h.CLUSTER_PROVIDER_ICON[t.provider]:"kubernetes";return d.default.createElement(d.default.Fragment,null,d.default.createElement(i.Icon,{name:a,size:20}),d.default.createElement("span",{className:v.default.optionText},e.label))}),[n]),G=(0,d.useCallback)((function(e){var t=R.filter((function(t){return t.value===e.value}));return t.length>0&&d.default.createElement("span",{className:v.default.nodeLabel},t[0].label)}),[R]);return d.default.createElement("div",{className:v.default.selectItem},d.default.createElement(i.Select,{className:v.default.clusterOpt,value:null!==(a=null===(r=n.filter((function(e){return e.name===l.cluster}))[0])||void 0===r?void 0:r.name)&&void 0!==a?a:l.cluster,options:n.map((function(e){return{label:(0,m.getDomTitle)((0,m.showNameAndAlias)(e.name,"cluster",{},!0,(function(){return(void 0).forceUpdate()}))),value:e.name}})),onChange:L,optionRenderer:z,valueRenderer:F,placeholder:t("CLUSTER")}),d.default.createElement(g.default,{selectedWs:D,value:l.namespace,allWorkspace:e.allWorkspace,fetchNsList:e.fetchNsList,cluster:l.cluster,onChange:x}),d.default.createElement(i.Select,{ref:O,className:v.default.nodeOpt,value:(0,s.default)(l.names)?"":l.names,options:P.map((function(e){return{label:e,value:e}})),valueRenderer:G,onChange:U,placeholder:t("WORKLOAD"),multi:!0}))};a.default=E},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(11),r(31),r(29),r(18),r(97),r(16),r(4),r(22),r(38),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(11),r(31),r(29),r(18),r(97),r(16),r(4),r(22),r(38),r(32);var u=l(r(30)),o=l(r(61)),i=l(r(96)),c=r(186),s=l(r(3)),f=n(r(0)),d=r(52),p=l(r(2084)),m=function(e){var a,r=e.allWorkspace,n=void 0===r?[]:r,l=e.cluster,m=void 0===l?"":l,h=e.selectedWs,v=e.value,g=(0,f.useState)(!1),y=(0,i.default)(g,2),E=y[0],b=y[1],_=(0,f.useState)(h),O=(0,i.default)(_,2),S=O[0],C=O[1],D=(0,f.useState)([]),k=(0,i.default)(D,2),N=k[0],T=k[1],R=(0,f.useState)([]),w=(0,i.default)(R,2),I=w[0],M=w[1],P=(0,f.useState)(!1),A=(0,i.default)(P,2),j=A[0],L=A[1],x=(0,f.useRef)();(0,f.useEffect)((function(){""!==S&&""!==m&&Promise.all([e.fetchNsList({cluster:m,workspace:S})]).then((function(e){var t=(0,i.default)(e,1)[0];L(!1),t.length>0?M(t.map((function(e){return{label:(0,d.getDisplayNameNew)(e),value:e.name}}))):M([])})),m&&v&&!h&&e.fetchNsList({cluster:m}).then((function(e){if(L(!1),e.length>0){var t=e.find((function(e){return e.name===v}));t&&C(t.workspace)}}))}),[S,m]),(0,f.useEffect)((function(){var e=n.filter((function(e){return e.clusters.some((function(e){return e.name===m}))||"system-workspace"===e.name}));T((0,o.default)(e))}),[m,n]),(0,f.useEffect)((function(){var e=function(e){var t=e.target,a=x.current;a&&!a.contains(t)&&b(!1)};return document.addEventListener("click",e),function(){return document.removeEventListener("click",e)}}),[]);var U=(0,f.useCallback)((function(){b(!E)}),[]);return f.default.createElement("div",{className:p.default.selectBox,ref:x},f.default.createElement("div",{className:(0,s.default)("select-control",p.default.innerBox),onClick:U},f.default.createElement("input",{readOnly:!0,autoComplete:"off",placeholder:t("PROJECT"),value:(null===(a=I.find((function(e){return e.value===v})))||void 0===a?void 0:a.label)||""}),f.default.createElement("div",{className:(0,s.default)((0,u.default)({},p.default.iconRotate,E))},f.default.createElement(c.Icon,{name:"chevron-down",size:16}))),f.default.createElement("div",{className:(0,s.default)(p.default.options,(0,u.default)({},p.default.show,E))},f.default.createElement("ul",null,N.map((function(e){return f.default.createElement("li",{className:(0,s.default)(p.default.ws,(0,u.default)({},p.default.isActive,S===e.name)),key:e.name,onClick:function(){var t;(t=e.name)!==S&&(C(t),L(!0))}},f.default.createElement(c.Icon,{name:"enterprise",color:{primary:"#fff"},size:16}),f.default.createElement("span",{className:p.default.wsName},(0,d.showNameAndAlias)(e.name,"workspace",{},!1,void 0,!0)),f.default.createElement(c.Icon,{name:"chevron-right",color:{primary:"#fff"},size:16}))}))),f.default.createElement("ul",{className:p.default.ListWrapper},""===m?f.default.createElement("div",{className:p.default.loadingBox},t("CLUSTER_FIELD_EMPTY")):j?f.default.createElement("div",{className:p.default.loadingBox},t("LOADING")):I.length<1?f.default.createElement("div",{className:p.default.loadingBox},t("NO_DATA_DESC")):I.map((function(t){return f.default.createElement("li",{key:t.value,className:(0,s.default)(p.default.nsItem,(0,u.default)({},p.default.isActive,v===t.value)),onClick:function(){return(a=t.value)!==v&&e.onChange({namespace:a,workspace:S}),void b(!1);var a}},(0,d.getDomTitle)(t.label))})))))};a.default=m},function(e,t,a){e.exports={selectBox:"_2HZWNNmjenFUgAAucLbTvP",innerBox:"_2W7W_pAH828HoNZ29CUlyv",placeholder:"_89eAxB9DH2UN7qcx12dIk",options:"l1crorAaNjCxL9hdrnMS8",ws:"_1LPbr6qwuZqa4UWJ73i5OL",wsName:"_2cyzMAYZEd4fSRzsGJKkvS",isActive:"_3dQHRBXMOnHdo4MY-xqfxj",ListWrapper:"_3_0Sw2Pq9JisypKNfYCm-V",nsItem:"_31EvXA_mmdBOpZaFB_ICVg",loadingBox:"_32e-dGX3Y1qlexnPJPK1hp",show:"_34BZ8bF4uqtVdZ-P3nbaV8",iconRotate:"_3LfZXCNHbyBVhN9KdOAUjs"}},function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(5),a(11),a(6),a(18),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var l=n(a(30)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51)),f=r(a(0)),d=n(a(829)),p=n(a(189)),m=n(a(2086)),h=n(a(1485));function v(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function g(e){for(var t=1;t0)},e}return(0,o.default)(a,[{key:"render",value:function(){return f.default.createElement("div",{className:h.default.wrapper},f.default.createElement(d.default,{value:this.props.value.map((function(e,t){return g(g({},e),{},{id:t})})),onChange:this.handleSelectChange,checkItemValid:this.checkItemValid},f.default.createElement(m.default,{clusterOptions:this.clusterOptions})))}},{key:"clusterOptions",get:function(){return this.props.allClusters}}]),a}(f.Component);t.default=E},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(11),r(6),r(29),r(18),r(16),r(4),r(22),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(11),r(6),r(29),r(18),r(16),r(4),r(22),r(38),r(7),r(32);var u=n(r(61)),o=n(r(96)),i=r(186),c=n(r(3)),s=n(r(800)),f=n(r(26)),d=n(r(63)),p=n(r(1152)),m=l(r(0)),h=n(r(856)),v=r(52),g=r(72),y=n(r(1485));function E(e,t){var a=(E.canvas||(E.canvas=document.createElement("canvas"))).getContext("2d");return a.font=t,a.measureText(e).width}var b=function(e){var a,r,n,l=e.clusterOptions,b=e.value,_=e.onChange,O=(0,m.useRef)(new h.default),S=(0,m.useState)([]),C=(0,o.default)(S,2),D=C[0],k=C[1],N=(0,m.useState)(null!==(a=null==b?void 0:b.names)&&void 0!==a?a:[]),T=(0,o.default)(N,2),R=T[0],w=T[1],I=(0,m.useRef)(),M=(0,m.useState)([]),P=(0,o.default)(M,2),A=P[0],j=P[1];(0,m.useEffect)((function(){var e=b.cluster,t=void 0===e?"":e;""!==t&&Promise.all([O.current.fetchList({limit:-1,cluster:t})]).then((function(e){var t=(0,o.default)(e,1)[0];k(t)}))}),[b.cluster]),(0,m.useEffect)((function(){if(!(R.length<1)){var e=!1,t=0,a=-1,r=I.current.selectRef.current.children[0].children[0].children,n=r[r.length-1].offsetParent.offsetWidth;R.forEach((function(r,l){t+=E(r,"12px PingFang SC")+36,!e&&t>n&&(a=l,e=!0)}));var l=R.map((function(e,t){return{label:e,value:e,hide:-1!==a&&t>a}}));t>n?(l[a].label="+".concat(R.length-a),j((0,u.default)(l))):j((0,u.default)(l))}}),[R]),(0,m.useEffect)((function(){var e=I.current.selectRef.current.children[0].children[0].children;A.forEach((function(t,a){if(e[a]&&(t.hide||e[a].setAttribute("style","display:inline-block;"),(0,p.default)(t.label,"+"))){var r=y.default.hideIcon;e[a].setAttribute("class","tag tag-default select-multi-value-item ".concat(r))}}))}),[A]);var L=(0,m.useCallback)((0,s.default)((function(e){w([]),_({cluster:e,names:[]})}),1e3)),x=(0,m.useCallback)((function(e){w(e),_({cluster:b.cluster,names:e})})),U=(0,m.useCallback)((function(e){var t=l.filter((function(t){return t.name===e.value}))[0];return e.value?m.default.createElement(m.default.Fragment,null,m.default.createElement(i.Icon,{name:g.CLUSTER_PROVIDER_ICON[t.provider]||"kubernetes",size:20,type:"light"}),m.default.createElement("span",{className:y.default.optionText},e.label)):null}),[l]),z=(0,m.useCallback)((function(e){if(""===e.value)return m.default.createElement("span",null,e.label);var t=l.filter((function(t){return t.name===e.value}))[0];if(!t)return m.default.createElement(m.default.Fragment,null,m.default.createElement(i.Icon,{name:"question",size:20}),m.default.createElement("span",{className:y.default.optionText},e.label));var a=(0,f.default)(t,"provider",!1)?g.CLUSTER_PROVIDER_ICON[t.provider]:"kubernetes";return m.default.createElement(m.default.Fragment,null,m.default.createElement(i.Icon,{name:a,size:20}),m.default.createElement("span",{className:y.default.optionText},e.label))}),[l]);return m.default.createElement("div",{className:y.default.selectItem},m.default.createElement(i.Select,{className:y.default.clusterOpt,value:null!==(r=null===(n=l.filter((function(e){return e.name===b.cluster}))[0])||void 0===n?void 0:n.name)&&void 0!==r?r:b.cluster,options:l.map((function(e){return{label:(0,v.getDomTitle)((0,v.showNameAndAlias)(e.name,"cluster",{},!0,(function(){return(void 0).forceUpdate()}))),value:e.name}})),onChange:L,optionRenderer:U,valueRenderer:z,placeholder:t("CLUSTER")}),m.default.createElement(i.Select,{ref:I,className:(0,c.default)(y.default.nodeOpt),value:(0,d.default)(R)?"":R,options:D.map((function(e){return{label:e.name,value:e.name}})),valueRenderer:function(e){var t=A.filter((function(t){return t.value===e.value}));return t.length>0&&m.default.createElement("span",{className:y.default.nodeLabel},t[0].label)},onChange:x,multi:!0,placeholder:t("NODE")}))};a.default=b},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(18),r(97),r(16),r(27),r(98),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(64),r(136),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(96)),u=n(r(315)),o=n(r(58)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51));r(12),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(97),r(42),r(16),r(27),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(64),r(7);var m=n(r(0)),h=n(r(1)),v=n(r(3)),g=n(r(76)),y=n(r(26)),E=n(r(135)),b=n(r(63)),_=n(r(447)),O=r(186),S=n(r(799)),C=r(923),D=r(993),k=n(r(1028)),N=n(r(2090));function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){var a=e.prefixIcon,r=e.color,n=e.type,l=e.label,u=e.value,o=e.disabled,i={label:t(l,{value:u}),value:u};return a&&(i.label=m.default.createElement("div",{className:(0,v.default)(N.default.optionLabel,N.default[n])},m.default.createElement(O.Icon,{name:a,size:20,color:r}),i.label)),o&&(i.disabled=o),i}))},n.handleMetricTypeChange=function(e){var t=e.split(":")[0],a=e.split(":")[1],r=n.state,l=r.comparator,u=r.severity,o=r.duration;n.setState({metricType:e,nodeResourceType:t,monitorType:a,thresholds:""},(function(){n.props.onChange({names:n.props.value.names,metricThreshold:(0,i.default)({},t,(0,i.default)({},a,"")),comparator:l,severity:u,for:o})}))},n.handleItemChange=function(e,t){return function(a,r){var l=n.props.onChange,u=(0,g.default)(r)||!r?a:r;"thresholds"===e&&(u=""!==(u=String(u).replace(/([a-zA-Z%/])+$/g,""))?(0,_.default)(u,".")?u:t(Number(u)):""),n.setState((0,i.default)({},e,u),(function(){var t=n.state,a=t.nodeResourceType,r=t.monitorType,o=t.comparator,c=t.duration,s=t.severity,f=(0,y.default)(n.props.value,"metricThreshold.".concat(a,".").concat(r));l({names:n.props.value.names,metricThreshold:(0,i.default)({},a,(0,i.default)({},r,"thresholds"===e?u:f)),comparator:"comparator"===e?u:o,for:c,severity:s})}))}},n.handleDurationChange=function(e){var t=n.state,a=t.severity,r=t.nodeResourceType,l=t.monitorType,u=t.comparator,o=(0,y.default)(n.props.value,"metricThreshold.".concat(r,".").concat(l));n.setState({duration:e},(function(){n.props.onChange({names:n.props.value.names,metricThreshold:(0,i.default)({},r,(0,i.default)({},l,o)),for:e,severity:a,comparator:u})}))},n.handleSeverityChange=function(e){var t=n.state,a=t.duration,r=t.nodeResourceType,l=t.monitorType,u=t.comparator,o=(0,y.default)(n.props.value,"metricThreshold.".concat(r,".").concat(l));n.setState({severity:e},(function(){n.props.onChange({names:n.props.value.names,metricThreshold:(0,i.default)({},r,(0,i.default)({},l,o)),for:a,comparator:u,severity:e})}))},n.renderConfigItem=function(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.props.value,l=n.state,i=l.nodeResourceType,c=l.monitorType,s=a.type,f=a.name,d=a.placeholder,p=a.options,h=void 0===p?[]:p,v=a.reverser,g=a.converter,E=(0,o.default)(a,["type","name","placeholder","options","reverser","converter"]);if(v){var b=(0,y.default)(r,"metricThreshold.".concat(i,".").concat(c),"");e=""!==b?(0,_.default)(b,".")?b:v(Number(b)):""}var C={key:f,className:N.default[f],placeholder:t(d),value:"comparator"===f?n.state.comparator:e,onChange:n.handleItemChange(f,g)};switch(s){default:case"select":var D=n.getSelectOptions(h);return m.default.createElement(O.Select,(0,u.default)({options:D},C,E));case"number":return m.default.createElement(S.default,(0,u.default)({showUnit:!0},C,E,{integer:!1}))}},n.state=R(R({metricType:n.getMetricType(e)},n.getStateFromProps(e)),{},{metricOps:n.getSelectOptions(n.metricConfig)}),n}return(0,s.default)(r,[{key:"render",value:function(){var e=this.state,a=e.metricType,r=e.duration,n=e.severity,l=this.ruleConfig;return m.default.createElement("div",{className:N.default.inputs},m.default.createElement("div",{className:N.default.type},m.default.createElement(O.Select,{options:this.state.metricOps,value:a,onChange:this.handleMetricTypeChange})),l.map(this.renderConfigItem),m.default.createElement(O.Select,{value:r,className:N.default.normalSelect,options:I,onChange:this.handleDurationChange,placeholder:t("DURATION")}),m.default.createElement(k.default,{value:n,className:N.default.normalSelect,options:this.alertingTypeOptions,onChange:this.handleSeverityChange,placeholder:t("SEVERITY")}))}},{key:"resourceMetricsConfig",get:function(){return(0,E.default)(C.RESOURCE_METRICS_CONFIG.node)||{}}},{key:"alertingTypeOptions",get:function(){return D.severityOptions.map((function(e){return{label:e.label,value:e.value}}))}},{key:"metricConfig",get:function(){var e=this.resourceMetricsConfig;return Object.entries(e).map((function(e){var t=(0,l.default)(e,2);return R({value:t[0]},t[1])}))}},{key:"selectMetricConfig",get:function(){var e=this.state.metricType;return this.metricConfig.find((function(t){return t.value===e}))}},{key:"ruleConfig",get:function(){return(0,y.default)(this.selectMetricConfig,"ruleConfig")||[]}}]),r}(m.default.Component);M.propTypes={metricConfig:h.default.array,value:h.default.object,onChange:h.default.func},M.defaultProps={metricConfig:[],value:{},onChange:function(){}};var P=M;a.default=P},function(e,t,a){e.exports={withUnit:"_2d32hkfOO3cYnvAM-MUswq",unit:"_29q45C0afPynal54hwpQfk",buttonWrapper:"Xtv_UB0AENviuvA8Y0gqH",iconUp:"_3YXrySn0XAnhuGzYYrXWeS",iconDown:"_3MtBoqy8WlB29Jb0N9EU1X"}},function(e,t,a){e.exports={critical:"_28huuzFgXrJ6A5awxlLmo3",error:"_2bY9jX-FcyeLAsVRSTadc4",warning:"_38IIdf4HUwM0dVDJZueSYQ",info:"_28OI9ApLFda1TO7f4ri8Bu"}},function(e,t,a){e.exports={inputs:"_1yVUajtAef8AhyQtZ2UGfF",type:"rVNaKjX5dXQGjZ6T7OuFi",comparator:"_1yPrzflD49gPjizoYXpqaa",thresholds:"_28w2cWTwatHJT2puBGeAGe",normalSelect:"_2xhhjqI0Rhdg-vrU4jjwWs",optionLabel:"_1XLcPFr1dFfIXq9BiAT512",slider:"_3FGbsXervaDG5M0e7nQhO7",condition_type:"_25t0zn0luRkHFmHakj0RD_"}},function(e,t,a){e.exports={label:"OTDgTwIj2gmBcD0BMGmC6",contentGroup:"_3nfVSV6R6UI-KMSyFNGODe",inline:"_3iClSviv5wuM7iCH0ta61O",tabs:"_32qgHgW_mbXFffugytUxdz"}},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(11),r(31),r(6),r(18),r(97),r(16),r(98),r(9),r(13),r(10),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(11),r(31),r(6),r(18),r(28),r(97),r(16),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(7);var u=l(r(30)),o=l(r(96)),i=n(r(0)),c=r(186),s=l(r(26)),f=l(r(63)),d=l(r(247)),p=l(r(855)),m=l(r(135)),h=l(r(74)),v=l(r(447)),g=l(r(158)),y=l(r(2093)),E=l(r(1482)),b=l(r(2094)),_=l(r(1481)),O=l(r(995));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t"),for:A("for","1m"),severity:A("severity","critical")}},disable:A("disable",!1),labels:(0,s.default)(r,"labels")}})),L=(0,o.default)(j,2),x=L[0],U=L[1],z=(0,i.useRef)();(0,i.useImperativeHandle)(a,(function(){return{target:z.current}}));return i.default.createElement("div",null,i.default.createElement(c.Form,{data:x,ref:z,key:"workload"},i.default.createElement("div",{className:_.default.label},t("RULE_SETTINGS")),i.default.createElement("div",{className:_.default.contentGroup},i.default.createElement(c.Form.Item,{label:t("RULE_NAME"),desc:t("CUSTOM_RULE_NAME_DESC"),rules:[{required:!0,message:t("RULE_NAME_REQUIRED")}]},i.default.createElement(c.Input,{name:"alert",maxLength:63})),i.default.createElement("div",{className:_.default.tabs},i.default.createElement(c.Tabs,{type:"button",activeName:u,onChange:function(e){return n(e)}},i.default.createElement(D,{label:t("NODE"),name:"node"}),i.default.createElement(D,{label:t("WORKLOAD"),name:"workload"}))),i.default.createElement(c.Form.Item,{label:t("RESOURCE_TYPE")},i.default.createElement(c.Select,{className:_.default.workloadType,name:"exprBuilder.workload.kind",options:[{label:t("DEPLOYMENT"),value:"Deployment"},{label:t("STATEFULSET"),value:"StatefulSet"},{label:t("DAEMONSET"),value:"DaemonSet"}],onChange:function(e){R(e);var t=(0,m.default)(x);(0,h.default)(t,"exprBuilder.workload.names",[{cluster:"",namespace:"",names:[]}]),U(t)}})),i.default.createElement(c.Form.Item,{label:t("MONITORING_TARGETS"),rules:[{required:!0,message:t("MONITOR_TARGET_EMPTY")},{validator:function(a,r,n){var l=(0,p.default)(r.filter((function(e){return""!==e&&""!==e.namespace})),(function(e){return e.cluster}));return Object.entries(l).some((function(e){var t=(0,o.default)(e,2)[1].map((function(e){return e.namespace}));return(0,d.default)(t).length!==t.length}))?n({message:t("NAME_SPACE_REPEAT")}):(r.filter((function(e){return""!==e})).forEach((function(a){return""===a.cluster?n({message:t("CLUSTER_FIELD_EMPTY")}):e.allClusters.find((function(e){return e.name===a.cluster}))?""===a.namespace?n({message:t("SET_NAMESPACE_BELONGS_TO")}):(0,f.default)(a.names)?n({message:t("MONITOR_TARGET_EMPTY")}):void 0:n({message:t("MONITOR_TARGET_CLUSTER_DELETED_DESC")})})),n())}}]},i.default.createElement(E.default,{monitorLevel:"workload",workloadType:T,name:"exprBuilder.workload.names",clusterTargets:I,allClusters:e.allClusters,allWorkspace:P,handleChangeNs:function(e){var t=e.filter((function(e){return""!==e&&""!==e.namespace})).map((function(e){return e.namespace}));U(C(C({},x),{},{namespaceSelector:{inValues:(0,d.default)(t)}}))}})),i.default.createElement(c.Form.Item,{label:t("TRIGGER_CONDITION"),rules:[{required:!0,message:t("SET_ACTIVATION_CONDITION_DESC")},{validator:function(e,a,r){if(!a)return r();if((0,f.default)(a.comparator))return r({message:t("OPERATOR_REQUIRED"),field:e.field});if((0,f.default)(a.metricThreshold))return r({message:t("THRESHOLD_REQUIRED"),field:e.field});var n=Object.keys(a.metricThreshold)[0],l=Object.keys(a.metricThreshold[n])[0],u=a.metricThreshold[n][l];return""===u||!u||(0,g.default)(u)?r({message:t("THRESHOLD_REQUIRED"),field:e.field}):(0,v.default)(u,".")?r({message:t("THRESHOLD_INVALID"),field:e.field}):void r()}}]},i.default.createElement(b.default,{name:"exprBuilder.workload"}))),i.default.createElement(O.default,null),i.default.createElement("div",{className:_.default.label},t("MESSAGE_SETTINGS")),i.default.createElement("div",{className:_.default.contentGroup},i.default.createElement(c.Form.Item,{className:_.default.message,label:t("MESSAGE_SUMMARY"),desc:t("MESSAGE_SUMMARY_DESC"),rules:[{required:!0,message:t("MESSAGE_REQUIRED")}]},i.default.createElement(c.Input,{name:"annotations.summary",maxLength:63})),i.default.createElement(c.Form.Item,{className:_.default.message,label:t("MESSAGE_DETAILS"),desc:t("MESSAGE_DETAILS_DESC")},i.default.createElement(c.TextArea,{name:"annotations.message",maxLength:256})))))},T=(0,i.forwardRef)(N);a.default=T},function(e,t,a){"use strict";a(15);var r=a(20);a(29),a(18),a(16),a(4),a(22),a(38),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(29),a(18),a(16),a(4),a(22),a(38),a(32);var n=r(a(96)),l=a(0),u=r(a(445)),o=function(){var e=(0,l.useRef)(new u.default),t=(0,l.useState)([]),a=(0,n.default)(t,2),r=a[0],o=a[1];return(0,l.useEffect)((function(){Promise.all([e.current.fetchList({limit:-1})]).then((function(e){var t=(0,n.default)(e,1)[0].map((function(e){return{name:e.name,clusters:e.clusters}}));o(t)}))}),[]),[r]};t.default=o},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(18),r(97),r(16),r(27),r(98),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(64),r(136),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(96)),u=n(r(315)),o=n(r(58)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51));r(12),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(97),r(42),r(16),r(27),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(64),r(7);var m=n(r(0)),h=n(r(1)),v=n(r(3)),g=n(r(76)),y=n(r(26)),E=n(r(135)),b=n(r(63)),_=n(r(447)),O=r(186),S=n(r(799)),C=r(923),D=n(r(1028)),k=r(993),N=n(r(2095));function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){var a=e.prefixIcon,r=e.color,n=e.type,l=e.label,u=e.value,o=e.disabled,i={label:t(l,{value:u}),value:u};return a&&(i.label=m.default.createElement("div",{className:(0,v.default)(N.default.optionLabel,N.default[n])},m.default.createElement(O.Icon,{name:a,size:20,color:r}),i.label)),o&&(i.disabled=o),i}))},n.handleMetricTypeChange=function(e){var t=e.split(":")[0],a=e.split(":")[1],r=n.state,l=r.comparator,u=r.severity,o=r.duration;n.setState({metricType:e,nodeResourceType:t,monitorType:a,thresholds:""},(function(){n.props.onChange({names:n.props.value.names,metricThreshold:(0,i.default)({},t,(0,i.default)({},a,"")),kind:n.props.value.kind,comparator:l,severity:u,for:o})}))},n.handleItemChange=function(e,t){return function(a,r){var l=n.props.onChange,u=(0,g.default)(r)||!r?a:r;"thresholds"===e&&(u=""!==(u=String(u).replace(/([a-zA-Z%/])+$/g,""))?(0,_.default)(u,".")?u:t(Number(u)):""),n.setState((0,i.default)({},e,u),(function(){var t=n.state,a=t.nodeResourceType,r=t.monitorType,o=t.comparator,c=t.duration,s=t.severity,f=(0,y.default)(n.props.value,"metricThreshold.".concat(a,".").concat(r));l({names:n.props.value.names,metricThreshold:(0,i.default)({},a,(0,i.default)({},r,"comparator"===e?f:u)),comparator:"comparator"===e?u:o,for:c,kind:n.props.value.kind,severity:s})}))}},n.handleDurationChange=function(e){var t=n.state,a=t.severity,r=t.nodeResourceType,l=t.monitorType,u=t.comparator,o=(0,y.default)(n.props.value,"metricThreshold.".concat(r,".").concat(l));n.setState({duration:e},(function(){n.props.onChange({names:n.props.value.names,metricThreshold:(0,i.default)({},r,(0,i.default)({},l,o)),kind:n.props.value.kind,for:e,severity:a,comparator:u})}))},n.handleSeverityChange=function(e){var t=n.state,a=t.duration,r=t.nodeResourceType,l=t.monitorType,u=t.comparator,o=(0,y.default)(n.props.value,"metricThreshold.".concat(r,".").concat(l));n.setState({severity:e},(function(){n.props.onChange({names:n.props.value.names,metricThreshold:(0,i.default)({},r,(0,i.default)({},l,o)),kind:n.props.value.kind,for:a,comparator:u,severity:e})}))},n.renderConfigItem=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=n.props.value,r=n.state,l=r.nodeResourceType,i=r.monitorType,c=t.type,s=t.name,f=(t.placeholder,t.options),d=void 0===f?[]:f,p=t.reverser,h=t.converter,v=(0,o.default)(t,["type","name","placeholder","options","reverser","converter"]);if(p){var g=(0,y.default)(a,"metricThreshold.".concat(l,".").concat(i),"");e=""!==g?(0,_.default)(g,".")?g:p(Number(g)):""}var E={key:s,className:N.default[s],value:"comparator"===s?n.state.comparator:e,onChange:n.handleItemChange(s,h)};switch(c){default:case"select":var b=n.getSelectOptions(d);return m.default.createElement(O.Select,(0,u.default)({options:b},E,v));case"number":return m.default.createElement(S.default,(0,u.default)({showUnit:!0},E,v,{integer:!1}))}},n.state=R(R({metricType:n.getMetricType(e)},n.getStateFromProps(e)),{},{metricOps:n.getSelectOptions(n.metricConfig)}),n}return(0,s.default)(r,[{key:"render",value:function(){var e=this.state,a=e.metricType,r=e.duration,n=e.severity,l=this.ruleConfig;return m.default.createElement("div",{className:N.default.inputs},m.default.createElement("div",{className:N.default.type},m.default.createElement(O.Select,{options:this.state.metricOps,value:a,onChange:this.handleMetricTypeChange})),l.map(this.renderConfigItem),m.default.createElement(O.Select,{className:N.default.normalSelect,value:r,options:I,onChange:this.handleDurationChange,placeholder:t("DURATION")}),m.default.createElement(D.default,{className:N.default.normalSelect,value:n,options:M,onChange:this.handleSeverityChange,placeholder:t("SEVERITY")}))}},{key:"resourceMetricsConfig",get:function(){return(0,E.default)(C.RESOURCE_METRICS_CONFIG.workload)||{}}},{key:"metricConfig",get:function(){var e=this.resourceMetricsConfig;return Object.entries(e).map((function(e){var t=(0,l.default)(e,2);return R({value:t[0]},t[1])}))}},{key:"selectMetricConfig",get:function(){var e=this.state.metricType;return this.metricConfig.find((function(t){return t.value===e}))}},{key:"ruleConfig",get:function(){return(0,y.default)(this.selectMetricConfig,"ruleConfig")||[]}}]),r}(m.default.Component);P.propTypes={metricConfig:h.default.array,value:h.default.object,onChange:h.default.func},P.defaultProps={metricConfig:[],value:{},onChange:function(){}};var A=P;a.default=A},function(e,t,a){e.exports={inputs:"_22dSEjReyNtRAovrRqwepd",type:"_1qKnJhTbQ9P1K8b5C7isFh",comparator:"_2934urzRpfiaiE2H1aYeKn",thresholds:"_3KU0ZSAcGoucHIrPp4tB74",normalSelect:"_3_DRDDTACzLkLCwuHgq14h",optionLabel:"khN9msWTcWOcL2-iNjmnk",slider:"_8373eD5TRR5yoHsXbknSr",condition_type:"_2XU1Q-On54b6cNM-_2iKc4"}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=n(a(315)),u=r(a(0)),o=n(a(2097)),i=function(e,t){var a=(0,u.useRef)();return(0,u.useImperativeHandle)(t,(function(){return{target:a.current.target}})),u.default.createElement(o.default,(0,l.default)({ref:a},e))},c=(0,u.forwardRef)(i);t.default=c},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(48),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(48),r(24),r(193);var u=l(r(96)),o=n(r(0)),i=r(186),c=l(r(26)),s=l(r(3)),f=r(52),d=l(r(1081)),p=l(r(2099)),m=l(r(2109)),h=l(r(2121)),v=r(993),g=l(r(995)),y=l(r(1028)),E=function(e,a){var r=e.editRule,n=(0,o.useRef)();(0,o.useImperativeHandle)(a,(function(){return{target:n.current}}));var l=(0,o.useState)((function(){return{alert:(0,c.default)(r,"alert",""),annotations:{summary:(0,c.default)(r,"annotations.summary",""),message:(0,c.default)(r,"annotations.message","")},clusterSelector:{inValues:(0,c.default)(r,"clusterSelector.inValues",[])},for:(0,c.default)(r,"for",""),expr:(0,c.default)(r,"expr",""),severity:(0,c.default)(r,"severity","critical"),disable:(0,c.default)(r,"disable",!1),labels:(0,c.default)(r,"labels")}})),E=(0,u.default)(l,1)[0],b=(0,o.useCallback)((function(e,a,r){var n=a.slice(0,-1);if(!/^[0-9]*$/.test(n))return r({message:t("INVALID_TIME_DESC")});r()}),[]),_=(0,o.useCallback)((function(e,a,r){if(!a)return r({message:t("CLUSTER_SETTINGS_LIMIT_DESC")});r()}),[]);return o.default.createElement(i.Form,{data:E,ref:n},o.default.createElement("div",{className:h.default.label},t("CLUSTER_SETTINGS")),o.default.createElement("div",{className:h.default.contentGroup},o.default.createElement("div",null,o.default.createElement(i.Form.Item,{rules:[{validator:_}]},o.default.createElement(m.default,{name:"clusterSelector.inValues",allClusters:e.allClusters,fetchClusterList:e.fetchClusterList})))),o.default.createElement("div",{className:h.default.label},t("RULE_SETTINGS")),o.default.createElement("div",{className:h.default.contentGroup},o.default.createElement(i.Columns,{className:h.default.inline},o.default.createElement(i.Column,null,o.default.createElement(i.Form.Item,{label:t("RULE_NAME"),desc:t("CUSTOM_RULE_NAME_DESC"),rules:[{required:!0,message:t("RULE_NAME_REQUIRED")}]},o.default.createElement(i.Input,{name:"alert",maxLength:63})))),o.default.createElement(i.Columns,{className:h.default.inline},o.default.createElement(i.Column,null,o.default.createElement(i.Form.Item,{label:t("DURATION"),desc:t("ALERT_DURATION"),rules:[{validator:b}]},o.default.createElement(d.default,{name:"for",inputClassName:h.default.duration,unitOptions:v.durationUnitOptions,defaultValue:v.durationUnitOptions[1].value}))),o.default.createElement(i.Column,null,o.default.createElement(i.Form.Item,{label:t("SEVERITY"),rules:[{required:!0,message:t("SEVERITY_REQUIRED")}]},o.default.createElement(y.default,{name:"severity",defaultValue:"critical"})))),o.default.createElement(i.Form.Item,{label:t("RULE_EXPRESSION"),desc:(0,f.learnMoreTip)(t.html("ALERT_RULE_EXPRESSION_DESC")),rules:[{required:!0,message:t("ALERT_RULE_REQUIRED")}]},o.default.createElement(p.default,{name:"expr",store:e.store,cluster:e.cluster}))),o.default.createElement(g.default,null),o.default.createElement("div",{className:h.default.label},t("MESSAGE_SETTINGS")),o.default.createElement("div",{className:(0,s.default)(h.default.contentGroup,h.default.lineContent)},o.default.createElement(i.Form.Item,{label:t("MESSAGE_SUMMARY"),desc:t("MESSAGE_SUMMARY_DESC"),rules:[{required:!0,message:t("MESSAGE_REQUIRED")}]},o.default.createElement(i.Input,{name:"annotations.summary",maxLength:63})),o.default.createElement(i.Form.Item,{label:t("MESSAGE_DETAILS"),desc:t("MESSAGE_DETAILS_DESC")},o.default.createElement(i.TextArea,{name:"annotations.message",maxLength:256}))))},b=(0,o.forwardRef)(E);a.default=b},function(e,t,a){e.exports={box:"_2cba8IQmk8PkrIeuCYMHpS",value:"_8HQz1aKq2aTQNQgiSBLkX",unit:"_1NbuZuw18npuIgdF-lDVT5"}},function(e,t,a){"use strict";a(15);var r=a(20),n=a(157);a(18),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(18),a(42),a(9),a(4),a(23),a(57),a(17);var l,u,o=r(a(315)),i=r(a(36)),c=r(a(37)),s=r(a(55)),f=r(a(56)),d=r(a(51)),p=r(a(49)),m=n(a(0)),h=a(239),v=a(14),g=r(a(1270));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var E=(0,h.observer)((u=function(e){(0,s.default)(a,e);var t=y(a);function a(){return(0,i.default)(this,a),t.apply(this,arguments)}return(0,c.default)(a,[{key:"componentDidMount",value:function(){var e=this.props,t=e.cluster,a=e.namespace;this.hasMonitoring&&this.props.store.fetchMetadata({cluster:t,namespace:a})}},{key:"render",value:function(){return m.default.createElement(g.default,(0,o.default)({},this.props,{supportMetrics:this.supportMetrics}))}},{key:"hasMonitoring",get:function(){var e=this.props.cluster;return globals.app.hasClusterModule(e,"whizard-monitoring")}},{key:"supportMetrics",get:function(){return this.hasMonitoring?this.props.store.targetsMetadata.map((function(e){return{value:e.metric,desc:e.help,type:e.type}})):[]}}]),a}(m.Component),(0,p.default)(u.prototype,"supportMetrics",[v.computed],Object.getOwnPropertyDescriptor(u.prototype,"supportMetrics"),u.prototype),l=u))||l;t.default=E},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var l=n(a(30)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51)),f=r(a(0)),d=n(a(3)),p=a(186),m=n(a(1487)),h=n(a(1271));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=function(e){(0,i.default)(a,e);var t=v(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;ln.height/2?e.top=r.top-4-32*(a-1):e.top=r.top-4,e.left=r.left+r.width,window.innerHeight-e.top<252&&(e.maxHeight=window.innerHeight-e.top-8)}}return e}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.level,r=e.isOpen,n=e.onSelect;return t.children?f.default.createElement("div",{ref:this.ref},f.default.createElement("div",{className:(0,d.default)(h.default.item,h.default.hasChildren,(0,l.default)({},h.default.isOpen,r)),onClick:this.handleClick},t.label,f.default.createElement(p.Icon,{name:"chevron-right",type:"light"})),r&&f.default.createElement(m.default,{level:a+1,options:t.children,onSelect:n,style:this.getOptionsStyle()})):f.default.createElement("div",{className:h.default.item,onClick:this.handleSelect},t.label)}}]),a}(f.Component);t.default=g},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(11),r(86),r(18),r(10),r(4),r(23),r(24),r(17),r(188),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var u=l(r(61)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51));r(45),r(5),r(11),r(86),r(18),r(42),r(10),r(4),r(23),r(57),r(24),r(17),r(188);var d=l(r(63)),p=n(r(0)),m=l(r(3)),h=l(r(837)),v=l(r(2102)),g=r(1489),y=l(r(2103)),E=l(r(1490));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var _=function(e){(0,c.default)(r,e);var a=b(r);function r(){var e;(0,o.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l=a.length+r.length+n.length+l.length-1?0:t+1}}),e.scrollToFocus)},e.handleArrowUp=function(){e.setState((function(e){var t=e.focusIndex,a=e.labels,r=e.functions,n=e.metrics,l=e.rateRanges,u=a.length+r.length+n.length+l.length;return{focusIndex:t<=0?u-1:t-1}}),e.scrollToFocus)},e.handleEnter=function(){var t=e.props.onSelect,a=e.state,r=a.focusIndex,n=a.functions,l=a.metrics,o=a.rateRanges,i=a.labels,c=[].concat((0,u.default)(i),(0,u.default)(n),(0,u.default)(l),(0,u.default)(o))[r];c&&t(c.value||c.label)},e.handleKeyDown=function(t){e.keydownHandler[t.keyCode]&&(t.stopPropagation(),t.preventDefault(),e.keydownHandler[t.keyCode](t))},e.scrollToFocus=function(){if(e.wrapper&&e.wrapper.current){var t=e.wrapper.current,a=t.querySelector(".is-focus");if(!a)return;var r=t.scrollTop,n=r+t.offsetHeight,l=a.offsetTop,u=l+a.offsetHeight;(r>l||n-1?o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,r=Object.keys(e);if("{"===t||","===t)return r.map((function(e){return{value:e}}));if(a.label){var n=e[a.label]||[];return"="===t?n.map((function(e){return{value:'"'.concat(e,'"')}})):'""'===t||"''"===t?n.map((function(e){return{value:e}})):n.map((function(e){return'"'.concat(e,'"')})).filter((function(e){return e.indexOf(t)>=0})).map((function(e){return{value:e}}))}return r.filter((function(e){return e.indexOf(t)>=0})).map((function(e){return{value:e}}))}(a,t,r):(n=function(e){return g.FUNCTIONS.filter((function(t){return t.label.indexOf(e)>=0}))}(t),l=this.searchMetrics(t),u=function(e){return"["===e?g.RATE_RANGES:[]}(t)),this.setState({functions:n,metrics:l,rateRanges:u,labels:o})}},{key:"renderList",value:function(e,t){var a=this.props,r=a.value,n=a.onSelect,l=this.state.focusIndex;return(0,d.default)(e)?null:p.default.createElement("div",{className:E.default.group},p.default.createElement("div",{className:E.default.groupTitle},t),p.default.createElement("div",{className:E.default.options},e.map((function(e,t){return p.default.createElement(y.default,{key:e.value||e.label,data:e.value||e.label,inputValue:r,isFocused:l===t,onSelect:n})}))))}},{key:"render",value:function(){var e=this.props.className,a=this.state,r=a.functions,n=a.metrics,l=a.rateRanges,u=a.labels;return(0,d.default)(r)&&(0,d.default)(n)&&(0,d.default)(l)&&(0,d.default)(u)?null:p.default.createElement("div",{className:(0,m.default)(E.default.wrapper,e),ref:this.wrapper},this.renderList(u,t("ALERT_LABELS")),this.renderList(r,t("ALERT_FUNCTIONS")),this.renderList(l,t("ALERT_RATE_RANGES")),this.renderList(n,t("ALERT_METRICS")))}},{key:"keydownHandler",get:function(){return{38:this.handleArrowUp,40:this.handleArrowDown,13:this.handleEnter,14:this.handleEnter}}}]),r}(p.Component);a.default=_},,function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(48),a(4),a(23),a(24),a(17),a(136),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(48),a(42),a(4),a(23),a(57),a(24),a(17),a(136);var l=n(a(36)),u=n(a(37)),o=n(a(55)),i=n(a(56)),c=n(a(51)),s=r(a(0)),f=n(a(3)),d=n(a(1490));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=function(e){(0,o.default)(a,e);var t=p(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;un.length&&s.default.createElement(s.default.Fragment,null,s.default.createElement("span",{className:"highlight"},a),s.default.createElement("span",null,t.slice(n.length+a.length))))}}]),a}(s.Component);t.default=m},,function(e,t,a){},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(28);var n=r(a(36)),l=r(a(37)),u=function(){function e(t){(0,n.default)(this,e),this.data=[],this.maxLength=50,this.cursor=0,isNaN(t)||(this.maxLength=t)}return(0,l.default)(e,[{key:"push",value:function(e){this.data.length>=this.maxLength&&this.data.shift(),this.data.push(e),this.cursor=0}},{key:"undo",value:function(){return this.cursor0&&(this.cursor-=1),this.data[this.data.length-1-this.cursor]}}]),e}();t.default=u},function(e,t,a){e.exports={wrapper:"_2Djs149fKvXq0cuQnoPLWv",input:"_3r2beirvrZ6qtbzzlFsRsd",suggestions:"Q7oMYSMcW984KaLwUtxe0"}},function(e,t,a){e.exports={wrapper:"_1w-rN95sN7ztXIW47qpxDr",trigger:"_3RKOgK42gRQ35DXoTa7VUE",input:"_1_1MeGWNh944JJ0DAi3osN",debug:"_3Ftx4Zx_7HgfhQ47jLEOEi"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(11),r(31),r(6),r(200),r(86),r(29),r(18),r(16),r(326),r(4),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(11),r(31),r(6),r(200),r(86),r(29),r(18),r(16),r(326),r(4),r(38),r(7),r(32);var u=l(r(96)),o=n(r(0)),i=r(186),c=l(r(63)),s=l(r(814)),f=l(r(790)),d=r(924),p=l(r(3)),m=l(r(2119)),h=l(r(2120)),v=function(e){var a=(0,o.useState)(""),r=(0,u.default)(a,2),n=r[0],l=r[1],v=(0,o.useState)([]),g=(0,u.default)(v,2),y=g[0],E=g[1],b=(0,m.default)(),_=(0,u.default)(b,1)[0],O=(0,o.useState)(new Map),S=(0,u.default)(O,2),C=S[0],D=S[1],k=(0,o.useState)(!1),N=(0,u.default)(k,2),T=N[0],R=N[1];(0,o.useEffect)((function(){var t=new Map,a=e.value;e.allClusters.forEach((function(e){(-1!==a.indexOf(e.name)||(0,c.default)(a))&&t.set(e.name,e)})),D(t),R(t.size===e.allClusters.length),E(e.allClusters)}),[]),(0,o.useEffect)((function(){e.fetchClusterList({name:n,limit:-1})}),[n]);var w=function(t,a){var r=Array.from(t.values()).map((function(e){return e.name})),n=e.onChange;n(a?[]:(0,c.default)(r)?void 0:r)},I=function(e){return o.default.createElement("ul",{className:(0,p.default)(h.default.clusterList,h.default.longList)},e.map((function(e){return o.default.createElement("li",{className:h.default.cluster,key:e.uid},o.default.createElement(i.Columns,{className:h.default.inline},o.default.createElement(i.Column,{className:(0,p.default)("is-6",h.default.left)},o.default.createElement(i.Checkbox,{className:h.default.checkBox,checked:C.has(e.name),onChange:function(){return function(e){if(C.has(e.name))C.delete(e.name),D(new Map(C)),R(!1),w(C,!1);else{var t=new Map(C.set(e.name,e)),a=t.size===y.length;D(t),R(a),w(t,a)}}(e)}}),o.default.createElement(s.default,{className:"flex",cluster:e})),o.default.createElement(i.Column,{className:"is-6"},o.default.createElement(f.default,{title:o.default.createElement(d.ClusterTagGroup,{data:e.tags.map((function(e){return(_||[]).find((function(t){return e.name===t.name}))})).filter(Boolean),empty:"-"}),description:t("CLUSTER_TAG")}))))})))},M=function(e){l(e)},P=function(e){var t=new Map;e?(y.forEach((function(e){t.set(e.name,e)})),D(t)):D(t),R(!T),w(t,!T)};return o.default.createElement("div",{className:h.default.clusterListBox},o.default.createElement("div",{className:(0,p.default)(h.default.clusterContainer)},o.default.createElement("div",{className:h.default.clusterSearch},o.default.createElement(i.Checkbox,{checked:T,onChange:P,className:h.default.checkBox,indeterminate:!(y.length===C.size||0===C.size)},t("SELECT_ALL")),o.default.createElement(i.InputSearch,{className:h.default.input,placeholder:t("SEARCH"),value:n,onSearch:M})),I(e.allClusters)))};a.default=v},function(e,t,a){e.exports={reason:"_3JDYKrJKhc0_3ccKRTWjbm",condition:"_3QACUKLP4siIkBKdrDW-kH",title:"mzPe8sBOFqw47SGIKPrZW",warning:"ZLc6bv2hKoXfyrevZ2_Ny",error:"HaXzDca7Adqyw5TSX98wt"}},function(e,t,a){e.exports={icon:"xKWloJZ3Pd_PqEaOhl-hT",draft:"_1FxWEU9OOeyTB0kLav72OJ","pending-review":"_2Kgn9QUrQjnMa1DT569nzn","to-be-reviewed":"_3VPGTkZ0kt7VAgF_zap1kx",registering:"_7FkF93kEWAJRkvTtbK4B5",creating:"pAHvZ_RG-pNI_6jkgCeVQ",success:"c57Xl7U2RVqCR7373K4Mb",succeeded:"_1uovlfp6-KF3gEuBuD0MtN",successful:"_14_7RfNWDb4dY6DUEHBcWK",ready:"_2pGjni5nxEU2vEXd5c8x0U",running:"Uef3KaucYEHmxp8kPnl0B",jobrunning:"_38McoUrLPjp-IxlLnUBiEc",active:"_3XNjuuBbvzt53nhrQm-HXj",normal:"_2ra4URWQKS0vxDB4xFYkP-",bound:"NH3CoWdb2O7APR1Sr1c4R",available:"_3dQlBzY-nYntydG9AX_n8V",healthy:"_1o0ijVE-hpfungNxCaztkt",ok:"_1ohxQxwBnkzQG-fZ-j0AJK",working:"_3vbpc3X5L0xtx4UKf_c81L",passed:"_2QJx0oRr3eDpXINTTxA3h7",published:"_26qlXB1G0tFvhUEXtW6VXQ",flicker:"_39HvsLhXibByaMtJ27WhHs",updating:"_3FVXsrClHBDhThI2PxJQYN",upgrading:"kBsjZOQ5i-t3E8e8f_YQc",syncing:"_3RR_2LauQUw9iB0u7_CR9K",building:"_2S5WEGfe2WUT5bji7Nor0B",notrunning:"_1KIbMexH4zSZn9G0zxeGeq",warning:"_6DP37Rv8RsDF7M97fNBOe",waiting:"_34DVpCiM7-LcMXfWSqZR4m",terminating:"_1Ot7k0fjOVvC3D2tNAa93i",released:"_2WmS-sodO7CDopJqPb7sjM",unfinished:"_2Dzk48MF3g0R_BPCEzKcGO",firing:"_2ikw1FbRijNp-VAqeBfZRK",major:"_1kFY7fBc18HVILwtcQmc_i",deleting:"_1L69rMVhNP91YKutMw-AVP",unkown:"sGWVKOHL75adFCSXXdUoH","in-review":"_1HugNUnbiDYQC0VzKzaTcU",deleted:"_3nDdouuEwZUxX2UB90wfmS",error:"_2lZZhetVUZXtG33CrDhb_l",lost:"_3ZCL2CITd4Xxi3Q8iFPQBQ",unschedulable:"OEaAUOBaw8aPhRh-AOvLf",registerfail:"_3jsWOK7bD-HE07g7Oq9Kbf",failed:"_3okAXA7dSs8qB0I83qrEwE",critical:"_1FlFRJJbuB_m4fm1lZbEGJ",rejected:"_1UjeFbT-g4hmr_4MOZUIQt",stopped:"bPGnPwhyY8-Jo2cZZZOdz",disabled:"_1bvTVaQo96kB6ZN5th8QxM",pending:"_2AunMDgw00EAwgZqzui_f_",unknown:"BZvybize4dddT7i4yAkK2",draining:"_2NLYGsCnxwt_PK6UK301R7",unready:"_2r1cncqVBdGqR7Dzrs8k0m",terminated:"_2H0QXOJ6mC1KDfv1nAP6k6",completed:"_21L69zF1m7TdkP-yQNhb6V",minor:"YrT7AztFXvf8WmH3vtwu8",unmanaged:"_1USSsIy-vFUMgFDQXWYeCy",dead:"i8ghS5D_07_EmXcDbaIfB",paused:"_35GVxD7s5Me3ssTcHpu1XA",inactive:"_1Vxh_5eb2cf7P32zp73e7p",suspended:"_3W95J2HteD5RPT_yAIHj1m"}},function(e,t,a){e.exports={wrapper:"_1zRhmhoqa7hKxIDHXtcQBl",icon:"_3zzcn1sJsd8OE2-UlVh5Dt",indicator:"_3_FKNd25UQ1SrtjwfzQsQa",title:"_2EJdDmBbkeOhXJGYqE2ODn",name:"iC7sVV_ohn78d_o-bnIsG",description:"_121vxZTmC4ekgLxeINz_qj",ellipsis:"_2D4Gh4G0EV2qp97eGpO8pA",isExpired:"cAV_fM4HAoL_7N476HQ-8",light:"aSm0o7OnDBr1lwEbEO6Qv",large:"_2oqSS3OkMT7aMTmyO3QDYQ",small:"ThqV9yofYHAOd-P_wF-3F"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(18),r(48),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(48),r(42),r(16),r(4),r(23),r(57),r(17);var u=l(r(96)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=n(r(0)),p=l(r(1)),m=r(186),h=l(r(3)),v=l(r(1492)),g=l(r(2115));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=function(e){(0,c.default)(r,e);var a=y(r);function r(e){var n;return(0,o.default)(this,r),(n=a.call(this,e)).renderBadge=function(e){return 0===e.length?null:d.createElement(m.Tooltip,{placement:"top",appendToBody:!0,content:d.createElement("div",null,d.createElement("div",null,t("TAG_PL")),d.createElement("div",{className:g.default.clusterTags},e.map((function(e){return d.createElement(v.default,{label:e.label,value:e.value,key:e.name,name:e.name,isTooltipContent:!0})}))))},d.createElement("div",{className:g.default.clusterTagBadge},e.length))},n.state={},n}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,t=e.data,a=void 0===t?[]:t,r=e.empty,n=void 0===r?null:r,l=e.className;if(!a.length)return n;var o=(0,u.default)(a,2),i=o[0],c=o[1];return d.createElement("div",{className:(0,h.default)(g.default.clusterTagGroup,l)},d.createElement(v.default,{label:i.label,value:i.value,name:i.name}),c&&d.createElement(v.default,{label:c.label,value:c.value,name:c.name}),this.renderBadge(a.slice(2)))}}]),r}(d.Component);a.default=E,E.propTypes={data:p.default.array.isRequired,empty:p.default.string||p.default.node}},function(e,t,a){e.exports={clusterTagItem:"_1Q7rwPOhBP9jpE1scnut6x",widthAuto:"_1iwFaLEvI9T6zsLlm3NWlG",label:"_87mgRCx8MOXgJ8rULXPjp",value:"u6uS4fhlcySlTOFIPdqCk"}},function(e,t,a){e.exports={clusterTags:"CcPncW5maLpzZvqskDkjT",clusterTagGroup:"_3xp0pO3VIF5DziKwwF9VQl",clusterTagBadge:"_2fanZ0SjwMsi2lF0bCsr3y"}},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(5),r(11),r(31),r(6),r(29),r(18),r(48),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(324),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(29),r(18),r(28),r(48),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(324),r(38),r(460),r(461),r(462),r(463),r(464),r(465),r(466),r(7),r(32);var u=l(r(30)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=l(r(61)),p=l(r(1272)),m=n(r(0)),h=l(r(1)),v=r(186),g=l(r(2117)),y=l(r(26)),E=l(r(806)),b=l(r(861)),_=r(924),O=l(r(2118));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:[],r=a.map((function(e){return function(a){var r,n,l;return(null!==(r=e.tags)&&void 0!==r?r:[]).length>=5||new Set((null!==(n=e.tags)&&void 0!==n?n:[]).concat(a.value).map((function(e){return e.name}))).size>5?{Ok:!1,message:t.html("CLUSTER_MAX_TAGS_DESC",{cluster:e.name})}:(0,g.default)(a.value,null!==(l=e.tags)&&void 0!==l?l:[],(function(e,t){return e.name===t.name})).length?a:{Ok:!1,message:t.html("HAS_SAME_TAG")}}}));return N.apply(void 0,[{Ok:!0,value:e},k].concat((0,d.default)(r)))}([].concat((0,d.default)(c),[C(C({},f),{},{value:null===(e=u[f.label])||void 0===e||null===(r=e.find((function(e){return e.id===f.name})))||void 0===r?void 0:r.value})]),l);o.Ok||(0,E.default)(s,o.message)||n.setState({message:o.message}),o.Ok&&(o=o.value,n.setState({value:o,message:""}),a&&a(o))}))},n.handleLabelChange=function(e){n.setState({k:e,v:""})};var l=e.value||[];return n.formRef=m.createRef(),n.state={value:l,k:void 0,v:void 0},n}return(0,i.default)(r,[{key:"componentDidUpdate",value:function(e,t){t.message===this.state.message&&this.state.message&&this.setState({message:""})}},{key:"render",value:function(){var e=this,a=this.state,r=a.value,n=void 0===r?[]:r,l=a.k,u=a.v,o=a.message,i=this.props,c=i.onAddTags,s=i.defaultValue,f=i.tagsGroup,d=f[l]||[],p=Object.keys(f);return m.createElement("div",{className:O.default.wrapper},m.createElement(v.Form,{ref:this.formRef},m.createElement("div",{className:O.default.addContainer},m.createElement(v.Form.Item,{rules:[{required:!0,message:t("EMPTY_TAG_LABEL_DESC")}]},m.createElement(v.Select,{defaultValue:l,name:"label",placeholder:t("KEY"),options:p.map((function(e){return{label:e,value:e}})),onChange:this.handleLabelChange})),m.createElement(v.Form.Item,{rules:[{required:!0,message:t("EMPTY_TAG_VALUE_DESC")}]},m.createElement(v.Select,{defaultValue:u,name:"name",onChange:function(t){e.setState({v:t})},placeholder:t("VALUE"),options:d.map((function(e){return{label:e.value,value:e.id}}))})),(null!=n?n:[]).length>=5?m.createElement(v.Tooltip,{content:t("CLUSTER_MAX_TAGS_DESC")},m.createElement("div",null,m.createElement(v.Button,{disabled:!0},t("ADD")))):m.createElement(v.Button,{onClick:this.handleClick},t("ADD"))),o&&m.createElement("span",{className:"form-item-error margin-t8 inline-block"},o)),m.createElement("div",{className:O.default.title},t("HAS_ADD_TAGS")),m.createElement("div",{className:O.default.tags},n.map((function(t){return m.createElement(_.ClusterTagItem,{label:t.label,value:t.value,name:t.name,key:t.name,onDelete:s.find((function(e){return e.name===t.name}))?void 0:e.handleDelete})}))),"platform-admin"===(0,y.default)(window,"globals.user.globalrole","")&&m.createElement("div",{className:O.default.footer},m.createElement("span",null,t("CLUSTER_TAG_ADD_HELP"))," ",m.createElement("span",{onClick:c,className:O.default.action},t("CREATE_TAGS"))))}}]),r}(m.Component);a.default=T,T.propTypes={value:h.default.array,defaultValue:h.default.array,onChange:h.default.func,tagsGroup:h.default.object.isRequired,onAddTags:h.default.func,tags:h.default.array}},,function(e,t,a){e.exports={wrapper:"_1nxmlNUOXDLQhexMk3xnhN",addContainer:"_183GQn1S0N9yB4yWFUBaqx",title:"_24gI1L4pZoVwd6MV72rRRM",tags:"_1QjI7AUfMY3w_Ull_93-SC",footer:"zFqrx4HhkwBbkvyYfrbi1",action:"Vaa_9_FeE4sVQqojNsuGH"}},function(e,t,a){"use strict";a(15);var r=a(20);a(29),a(4),a(22),a(38),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(29),a(4),a(22),a(38),a(32);var n=r(a(96)),l=a(0),u=r(a(945)),o=function(){var e=(0,l.useRef)(new u.default),t=(0,l.useState)([]),a=(0,n.default)(t,2),r=a[0],o=a[1];return(0,l.useEffect)((function(){Promise.all([e.current.fetchGroupList({limit:-1})]).then((function(){o(e.current.tags)}))}),[]),[r,o]};t.default=o},function(e,t,a){e.exports={clusterListBox:"_3E7nfg18gc4YMpsXgkwewv",addBox:"_1bSE9f95Y6l3IUXRFqHiFq",clusterContainer:"iy_9AILE49q6oYEKPACE0",clusterSearch:"dY5lk9YVyLd2SKquC2Ipp",checkBox:"_3vsqcs9oAi9KmEj--p0mwz",input:"_1WOOb0mOWoitW54WM_TKhb",clusterList:"_1mEvnbfJL19vM01-pNmIzr",cluster:"HClXzP_agDUOBsD0DJB6U",inline:"_1jaGfWoiirbQyPg-EuCumT",left:"AwqUeOTDH3PUXkcCg2vXk",opt:"_3f745MPKWGUCPKuoEPpZNN",confirm:"FXS6GkOHCxUqj1785Bm_-",closeBt:"_2WxNJ61Iksv2sR--6616Xa",longList:"_2zueFWuIjAUgYy6xVBFRMq"}},function(e,t,a){e.exports={label:"_3lNFoNYnAqovuExjDshs8H",contentGroup:"FtMWAlt2Tg-L4j3LNBR9C",inline:"_11BH9gaIIj9QroYWoqVvz1",tabs:"_1DlseBgXppe_l3oWxUut-q",lineContent:"Y-jejgDishnXFaxP6vPRR",duration:"_3kmRCD04N-liwEB5XNldbW"}},function(e,t,a){"use strict";a(15);var r=a(20);a(29),a(4),a(22),a(38),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(29),a(4),a(22),a(38),a(32);var n=r(a(43));a(41);var l=r(a(44)),u=r(a(96)),o=a(0),i=r(a(438)),c=function(){var e=(0,o.useRef)(new i.default),t=(0,o.useState)([]),a=(0,u.default)(t,2),r=a[0],c=a[1],s=function(){var t=(0,l.default)(n.default.mark((function t(a){var r;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.current.fetchList(a);case 2:r=t.sent,c(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return(0,o.useEffect)((function(){Promise.all([e.current.fetchList({limit:-1})]).then((function(e){var t=(0,u.default)(e,1)[0];c(t)}))}),[]),[r,s]};t.default=c},,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(18),r(10),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(18),r(42),r(10),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(449)),m=n(r(3)),h=r(72),v=n(r(900)),g=n(r(869)),y=n(r(870)),E=n(r(947)),b=n(r(871)),_=n(r(862)),O=n(r(2167));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var C=function(e){(0,i.default)(r,e);var a=S(r);function r(){return(0,u.default)(this,r),a.apply(this,arguments)}return(0,o.default)(r,[{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.renderTitle;return r?r():f.default.createElement("div",{className:O.default.title},"".concat(t(a)," ").concat(this.lastValue))}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors,r=e.renderArea;return r?r():this.series.map((function(e,r){var n=h.COLORS_MAP[a[r]];return f.default.createElement(v.default,{key:e,dataKey:e,stroke:n,fillOpacity:"0.1",fill:n,unit:t})}))}},{key:"render",value:function(){var e=this.props,t=e.width,a=e.height,r=e.bgColor,n=e.xKey,u=e.data,o=e.darkMode;return f.default.createElement("div",{className:(0,m.default)(O.default.chart,(0,l.default)({},O.default.dark,o)),style:{width:t,height:a,background:r}},this.renderTitle(),f.default.createElement(b.default,{width:"100%",height:"100%",debounce:1},f.default.createElement(E.default,{data:u,margin:{top:30,left:0,right:0,bottom:0}},f.default.createElement(y.default,{dataKey:n,hide:!0}),f.default.createElement(g.default,{wrapperStyle:{zIndex:1e3},cursor:{stroke:h.COLORS_MAP.dark,strokeDasharray:"3,2",strokeWidth:2},content:f.default.createElement(_.default,null)}),this.renderArea())))}},{key:"series",get:function(){var e=this.props,t=e.xKey,a=e.data;return Object.keys(a[0]||{}).filter((function(e){return e!==t}))}},{key:"lastValue",get:function(){var e=this.props,t=e.unit,a=e.data,r=this.series;return 1===r.length?"".concat((0,p.default)(a)[r[0]]," ").concat(t):""}}]),r}(f.default.Component);a.default=C,C.propTypes={width:d.default.oneOfType([d.default.string,d.default.number]),height:d.default.oneOfType([d.default.string,d.default.number]),title:d.default.string,xKey:d.default.string,unit:d.default.string,data:d.default.array,bgColor:d.default.string,areaColors:d.default.array,renderTitle:d.default.func,renderArea:d.default.func,darkMode:d.default.bool},C.defaultProps={width:180,height:56,title:"Title",xKey:"time",unit:"",bgColor:h.COLORS_MAP.lightest,areaColors:["green","blue","yellow","red"],data:[],darkMode:!1}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={tooltip:"_2o-FPsZWo_tejfulidLyXN",label:"_14UOFErBhWS51I2ueymzb1",item:"_1ZRF-l-daK6mBpxVp4rWVy"}},function(e,t,a){e.exports={chart:"_1sjDK5GdPxFAEmfUxCI1LV",title:"_2xqrjvSLAex97qiOzpHRqy",dark:"jzlxuWnFI3sN_bACtVOG0"}},function(e,a,r){"use strict";r(15);var n=r(20);r(11),r(18),r(10),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(11),r(18),r(42),r(10),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(26)),p=n(r(449)),m=n(r(63)),h=r(72),v=n(r(900)),g=n(r(869)),y=n(r(870)),E=n(r(947)),b=n(r(871)),_=n(r(862)),O=r(52),S=r(186),C=n(r(2169));function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var k=function(e){(0,o.default)(r,e);var a=D(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"renderFilters",value:function(){var e=this.props.filters;return e?s.default.createElement("div",{className:C.default.filters,onClick:function(e){e.stopPropagation()}},s.default.createElement(S.Select,e)):null}},{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.unit,n=e.renderTitle;if(!e.noTitle){if(n)return n();var l=(0,O.coreUnitTS)(this.lastValue,r);return s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:C.default.title},s.default.createElement("span",null,s.default.createElement("strong",null,this.lastValue)," ",t(l)),1===this.lastValue||r?t(a):t("".concat(a,"_PL"))),this.renderFilters())}}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors,r=e.renderArea;return r?r():this.series.map((function(e,r){var n=h.COLORS_MAP[a[r]];return s.default.createElement(v.default,{key:e,dataKey:e,stroke:n,fillOpacity:"0.1",fill:n,unit:t})}))}},{key:"render",value:function(){var e=this.props,a=e.width,r=e.height,n=e.xKey,l=e.data,u=e.top;return s.default.createElement("div",{className:C.default.chart,style:{width:a,height:r}},this.renderTitle(),(0,m.default)(l)?s.default.createElement("p",{className:C.default.noData},t("NO_DATA")):s.default.createElement(b.default,{width:"100%",height:"100%",debounce:1},s.default.createElement(E.default,{data:l,margin:{top:u,left:4,right:4,bottom:4}},s.default.createElement(y.default,{dataKey:n,hide:!0}),s.default.createElement(g.default,{wrapperStyle:{zIndex:1e3},cursor:{stroke:h.COLORS_MAP.dark,strokeDasharray:"3,2",strokeWidth:2},content:s.default.createElement(_.default,null)}),this.renderArea())))}},{key:"series",get:function(){var e=this.props,t=e.xKey,a=e.data;return Object.keys(a[0]||{}).filter((function(e){return e!==t}))}},{key:"lastValue",get:function(){var e,t,a=this.props.data,r=(0,d.default)(this.series,[0],"");return null!==(e=null===(t=(0,p.default)(a))||void 0===t?void 0:t[r])&&void 0!==e?e:0}}]),r}(s.default.Component);a.default=k,k.propTypes={width:f.default.oneOfType([f.default.string,f.default.number]),height:f.default.oneOfType([f.default.string,f.default.number]),title:f.default.string,xKey:f.default.string,unit:f.default.string,data:f.default.array,areaColors:f.default.array,renderTitle:f.default.func,renderArea:f.default.func,top:f.default.number},k.defaultProps={width:280,height:100,title:"Title",xKey:"time",unit:"",areaColors:["green","blue","yellow","red","orange"],data:[],top:45}},function(e,t,a){e.exports={chart:"_2JJzTXT7f7IRE6NiIfNZwA",noData:"_3G18zHWAx-cv-EtIKep5u5",filters:"_1SpSoOfPZcy-3qfjpvHrTK",title:"_3hk5WanipERYCfYDNf8FS9"}},function(e,a,r){"use strict";r(15);var n=r(20);r(84),r(18),r(4),r(23),r(139),r(24),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(84),r(18),r(28),r(42),r(4),r(23),r(57),r(139),r(251),r(24),r(252),r(193),r(17),r(85);var l=n(r(315)),u=n(r(61)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=n(r(806)),v=n(r(63)),g=n(r(928)),y=r(72),E=n(r(1511)),b=n(r(946)),_=n(r(900)),O=n(r(869)),S=n(r(912)),C=n(r(870)),D=n(r(927)),k=n(r(929)),N=n(r(947)),T=n(r(871)),R=n(r(1086)),w=n(r(862)),I=r(1087),M=n(r(2173));function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var A=function(e){(0,c.default)(r,e);var a=P(r);function r(e){var n;(0,o.default)(this,r),(n=a.call(this,e)).handleLegendClick=function(e,t){var a=(0,u.default)(n.state.activeSeries);a.includes(t)?(0,g.default)(a,(function(e){return e===t})):a.push(t),n.setState({activeSeries:a})},n.tickFormatter=function(e){return e<=0?"":e>1e5?"".concat(Math.round(e/1e3),"k"):e},n.getAlertLabel=function(){var e=n.props,a=e.unit,r=e.alert;return"core"===a?t("VALUE_CORES",{value:r.value}):t("VALUE_UNIT",{value:r.value,unit:a})};var l=(0,I.getActiveSeries)(e);return n.state={series:l,activeSeries:l},n}return(0,i.default)(r,[{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.unit,n=e.renderTitle,l=n?n():(0,v.default)(r)?t(a):t("TITLE_UNIT",{title:t(a),unit:r});return d.default.createElement("div",{className:M.default.title},l)}},{key:"renderCustomTooltip",value:function(){var e=this.props,t=e.renderTooltip,a=e.isTranslate,r=e.alert;return t?t():d.default.createElement(w.default,{alert:r,isTranslate:a})}},{key:"renderLegend",value:function(){return d.default.createElement(D.default,{wrapperStyle:{top:0,left:"auto",right:0,width:"80%",zIndex:100},content:d.default.createElement(R.default,{isTranslate:this.props.isTranslate,showAll:this.props.showAll,extraLegend:this.props.extraLegend,activeSeries:this.state.activeSeries,onClick:this.handleLegendClick})})}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors,r=e.yAxisId,n=this.state,u=n.series,o=n.activeSeries;return u.map((function(e,n){var u=a[n],i=y.COLORS_MAP[u]||u,c={fill:i,fillOpacity:.1};return new RegExp("^".concat(r)).test(e)&&(c.yAxisId=r),d.default.createElement(_.default,(0,l.default)({key:e,dataKey:e,stroke:i,activeDot:d.default.createElement(b.default,{r:4,stroke:"#fff",strokeWidth:1,fill:i,fillOpacity:1}),unit:t,hide:!o.includes(e),connectNulls:!0},c))}))}},{key:"render",value:function(){var e=this.props,a=e.theme,r=e.width,n=e.height,u=e.xKey,o=e.data,i=e.alert,c=e.xAxis,s=e.yAxis,f=e.yAxisId,p=e.showReferenceLabel,h=e.referenceLineColor,g=(0,m.default)(M.default.chart,"chart","chart-".concat(a));return d.default.createElement("div",{className:g,style:{width:r,height:n}},this.renderTitle(),(0,v.default)(o)?d.default.createElement("p",{className:M.default.noData},t("NO_DATA")):d.default.createElement(T.default,{width:r,height:n,debounce:1},d.default.createElement(N.default,{data:o,margin:{top:42,bottom:-20,left:13,right:13}},d.default.createElement(k.default,{stroke:"#d8dee5",strokeDasharray:"2 2",vertical:!1}),d.default.createElement(C.default,(0,l.default)({height:40,dataKey:u,axisLine:!1,tickLine:!1,interval:"preserveStartEnd",minTickGap:60,tickMargin:12},c)),d.default.createElement(S.default,(0,l.default)({width:45,axisLine:!1,tickLine:!1,tickFormatter:this.tickFormatter},s)),f&&d.default.createElement(S.default,(0,l.default)({width:45,axisLine:!1,tickLine:!1,yAxisId:f,orientation:"right",tickFormatter:this.tickFormatter},s)),d.default.createElement(O.default,{wrapperStyle:{zIndex:9999},content:this.renderCustomTooltip()}),this.renderLegend(),this.renderArea(),!(0,v.default)(i)&&d.default.createElement(E.default,{y:i.value,label:p?this.getAlertLabel():void 0,stroke:y.COLORS_MAP[h],strokeDasharray:"3,2",isFront:!0}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var a=(0,I.getActiveSeries)(e);return(0,h.default)(a,t.series)?null:{series:a,activeSeries:a}}}]),r}(d.default.Component);a.default=A,A.propTypes={theme:p.default.oneOf(["light","dark"]),width:p.default.oneOfType([p.default.string,p.default.number]),height:p.default.oneOfType([p.default.string,p.default.number]),title:p.default.string,xKey:p.default.string,unit:p.default.string,data:p.default.array,bgColor:p.default.string,areaColors:p.default.array,renderTitle:p.default.func,renderTooltip:p.default.func,showReferenceLabel:p.default.bool,referenceLineColor:p.default.string},A.defaultProps={theme:"light",width:"100%",height:200,title:"Title",xKey:"time",unit:"",showAll:!1,bgColor:y.COLORS_MAP.lightest,areaColors:["green","blue","yellow","red","darkestGreen","darkestBlue","darkestYellow","darkestRed","lightestGreen","lightestBlue","lightestYellow","lightestRed"],data:[],showReferenceLabel:!0,referenceLineColor:"red"}},,function(e,t,a){e.exports={legend:"_1XlEXrqD889UqrbxHe-xEK",hide:"_23CvRZz1mMETc8Jy-6Img-",item:"_2baEObAQ1E-zKBmLZq7s1k",inactive:"_25hh9t3akE-oo7U9r1Ixur"}},function(e,t,a){e.exports={chart:"_2HFgq9kor6lheR0Vhq4sCI",noData:"_2qhnE0KRQA256rWeRH5z2W",title:"_2ArqqbIO8eulO-vuy6Ulu2"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(84),r(18),r(48),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(84),r(18),r(28),r(48),r(42),r(4),r(23),r(57),r(17),r(85);var l=n(r(61)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=n(r(63)),h=n(r(928)),v=r(72),g=n(r(946)),y=n(r(900)),E=n(r(869)),b=n(r(912)),_=n(r(870)),O=n(r(927)),S=n(r(929)),C=n(r(947)),D=n(r(871)),k=n(r(1086)),N=n(r(862)),T=r(1087),R=r(794),w=n(r(2175));function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var M=function(e){(0,i.default)(r,e);var a=I(r);function r(e){var t;(0,u.default)(this,r),(t=a.call(this,e)).handleLegendClick=function(e,a){var r=(0,l.default)(t.state.activeSeries);r.includes(a)?(0,h.default)(r,(function(e){return e===a})):r.push(a),t.setState({activeSeries:r})};var n=(0,T.getActiveSeries)(e);return t.state={series:n.slice(0,e.maxSeries),activeSeries:n.slice(0,e.maxActiveSeries)},t}return(0,o.default)(r,[{key:"componentDidUpdate",value:function(e){if(e.data.length!==this.props.data.length||e.id!==this.props.id){var t=(0,T.getActiveSeries)(this.props);this.setState({series:t.slice(0,this.props.maxSeries),activeSeries:t.slice(0,this.props.maxActiveSeries)})}}},{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.unit,n=e.renderTitle,l=n?n():(0,m.default)(r)?t(a):"".concat(t(a)," (").concat(t(r),")");return f.default.createElement("div",{className:w.default.title},l)}},{key:"renderCustomTooltip",value:function(){var e=this.props,t=e.renderTooltip,a=e.tailText;return t?t():f.default.createElement(N.default,{tailText:a})}},{key:"renderLegend",value:function(){return f.default.createElement(O.default,{wrapperStyle:{zIndex:100,left:24},content:f.default.createElement(k.default,{className:w.default.legend,activeSeries:this.state.activeSeries,showAll:!0,onClick:this.handleLegendClick})})}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors,r=e.renderArea,n=this.state,l=n.series,u=n.activeSeries;return r?r():l.map((function(e,r){var n=a[r],l=v.COLORS_MAP[n]||n;return f.default.createElement(y.default,{key:e,dataKey:e,stroke:l,fill:"url(#".concat(n,"-area)"),activeDot:f.default.createElement(g.default,{r:4,stroke:"#fff",strokeWidth:1,fill:l,fillOpacity:1}),unit:t,hide:!u.includes(e)})}))}},{key:"render",value:function(){var e=this.props,t=e.theme,a=e.width,r=e.height,n=e.xKey,l=e.data,u=(0,p.default)(w.default.chart,"chart","chart-".concat(t));return f.default.createElement("div",{className:u,style:{width:a,height:r}},this.renderTitle(),f.default.createElement(D.default,{debounce:1},f.default.createElement(C.default,{data:l,margin:{top:50,bottom:0,left:0,right:25}},f.default.createElement(S.default,{stroke:"#d8dee5",strokeDasharray:"2 3",vertical:!1}),f.default.createElement(_.default,{dataKey:n,axisLine:!1,tickLine:!1}),f.default.createElement(b.default,{width:60,axisLine:!1,tickLine:!1,tickFormatter:function(e){return e<=0?"":(0,R.getSuitableValue)(e,"number")}}),f.default.createElement(E.default,{wrapperStyle:{zIndex:101,pointerEvents:"auto"},cursor:{stroke:v.COLORS_MAP["dark"===t?"lightest":"dark"],strokeDasharray:"3,2",strokeWidth:2},content:this.renderCustomTooltip()}),this.renderLegend(),this.renderArea())))}}]),r}(f.default.Component);a.default=M,M.propTypes={theme:d.default.oneOf(["light","dark"]),width:d.default.oneOfType([d.default.string,d.default.number]),height:d.default.oneOfType([d.default.string,d.default.number]),title:d.default.string,xKey:d.default.string,unit:d.default.string,data:d.default.array,maxSeries:d.default.number,maxActiveSeries:d.default.number,areaColors:d.default.array,renderTitle:d.default.func,renderTooltip:d.default.func,renderArea:d.default.func,id:d.default.string},M.defaultProps={theme:"light",width:"100%",height:220,title:"Title",xKey:"time",maxSeries:50,maxActiveSeries:6,unit:"",areaColors:["green","blue","yellow","red","darkestGreen","darkestBlue","darkestYellow","darkestRed","lightestGreen","lightestBlue","lightestYellow","lightestRed"],data:[],id:""}},function(e,t,a){e.exports={chart:"DMLRKPRlM-592oxpl01Ux",title:"_2ndg87suV5PGHdzT74mCy1",legend:"KRlAbphv7IhurquDMCYe6"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(84),r(18),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(84),r(18),r(28),r(42),r(4),r(23),r(57),r(17),r(85);var l=n(r(315)),u=n(r(61)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=n(r(63)),v=n(r(806)),g=n(r(928)),y=r(72),E=n(r(946)),b=n(r(900)),_=n(r(869)),O=n(r(912)),S=n(r(870)),C=n(r(927)),D=n(r(929)),k=n(r(947)),N=n(r(871)),T=n(r(1086)),R=n(r(862)),w=r(1087),I=n(r(2177));function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var P=function(e){(0,c.default)(r,e);var a=M(r);function r(e){var t;(0,o.default)(this,r),(t=a.call(this,e)).handleLegendClick=function(e,a){var r=(0,u.default)(t.state.activeSeries);r.includes(a)?(0,g.default)(r,(function(e){return e===a})):r.push(a),t.setState({activeSeries:r})};var n=(0,w.getActiveSeries)(e);return t.state={series:n,activeSeries:n},t}return(0,i.default)(r,[{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.unit,n=e.renderTitle,l=n?n():(0,h.default)(r)?t(a):"".concat(t(a)," (").concat(t(r),")");return d.default.createElement("div",{className:I.default.title},l)}},{key:"renderLegend",value:function(){return d.default.createElement(C.default,{wrapperStyle:{top:0,left:"auto",right:0,width:"70%",zIndex:1001},content:d.default.createElement(T.default,{activeSeries:this.state.activeSeries,onClick:this.handleLegendClick})})}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors,r=e.renderArea,n=this.state,u=n.series,o=n.activeSeries;return r?r():u.map((function(e,r){var n=a[r],i=y.COLORS_MAP[n]||n,c=!o.includes(e),s={key:e,dataKey:e,stroke:i,activeDot:d.default.createElement(E.default,{r:4,stroke:"#fff",strokeWidth:1,fill:i,fillOpacity:1}),unit:t,hide:c};return r===u.length-1?d.default.createElement(b.default,(0,l.default)({},s,{strokeDasharray:"3, 2",fillOpacity:0})):d.default.createElement(b.default,(0,l.default)({},s,{strokeWidth:0,fill:i,fillOpacity:.7}))}))}},{key:"render",value:function(){var e=this.props,t=e.theme,a=e.width,r=e.height,n=e.xKey,l=e.data,u=(0,m.default)(I.default.chart,"chart","chart-".concat(t));return d.default.createElement("div",{className:u,style:{width:a,height:r}},this.renderTitle(),d.default.createElement(N.default,{width:"100%",height:"100%",debounce:1},d.default.createElement(k.default,{data:l,margin:{top:50,bottom:-20,left:0,right:20}},d.default.createElement(D.default,{stroke:"#d8dee5",strokeDasharray:"2 3",vertical:!1}),d.default.createElement(S.default,{dataKey:n,axisLine:!1,tickLine:!1}),d.default.createElement(O.default,{width:45,axisLine:!1,tickLine:!1,tickFormatter:function(e){return e>0?e:""}}),d.default.createElement(_.default,{wrapperStyle:{zIndex:1e3},cursor:{stroke:y.COLORS_MAP["dark"===t?"lightest":"dark"],strokeDasharray:"3,2",strokeWidth:2},content:d.default.createElement(R.default,null)}),this.renderLegend(),this.renderArea())))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var a=(0,w.getActiveSeries)(e);return(0,v.default)(a,t.series)?null:{series:a,activeSeries:a}}}]),r}(d.default.Component);a.default=P,P.propTypes={theme:p.default.oneOf(["light","dark"]),width:p.default.oneOfType([p.default.string,p.default.number]),height:p.default.oneOfType([p.default.string,p.default.number]),title:p.default.string,xKey:p.default.string,unit:p.default.string,data:p.default.array,areaColors:p.default.array,renderTitle:p.default.func,renderArea:p.default.func},P.defaultProps={theme:"light",width:"100%",height:200,title:"Title",xKey:"time",unit:"",areaColors:["lighterRed","lightestYellow","blue","dark"],data:[]}},function(e,t,a){e.exports={chart:"_3h-t0hKcP-Ao4nr8At-NOt",title:"m7sH_qo102jJOrFsmprfd"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(84),r(18),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(84),r(18),r(28),r(42),r(4),r(23),r(57),r(17),r(85);var l=n(r(61)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=n(r(63)),h=n(r(806)),v=n(r(928)),g=r(72),y=n(r(1033)),E=n(r(869)),b=n(r(912)),_=n(r(870)),O=n(r(927)),S=n(r(929)),C=n(r(1277)),D=n(r(871)),k=n(r(1086)),N=n(r(862)),T=r(1087),R=n(r(2179));function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var I=function(e){(0,i.default)(r,e);var a=w(r);function r(e){var t;(0,u.default)(this,r),(t=a.call(this,e)).handleLegendClick=function(e,a){var r=(0,l.default)(t.state.activeSeries);r.includes(a)?(0,v.default)(r,(function(e){return e===a})):r.push(a),t.setState({activeSeries:r})};var n=(0,T.getActiveSeries)(e);return t.state={series:n,activeSeries:n},t}return(0,o.default)(r,[{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.unit,n=e.renderTitle,l=n?n():(0,m.default)(r)?t(a):"".concat(t(a)," (").concat(r,")");return f.default.createElement("div",{className:R.default.title},l)}},{key:"renderLegend",value:function(){return f.default.createElement(O.default,{wrapperStyle:{top:0,left:"auto",right:0,width:"70%",zIndex:1001},content:f.default.createElement(k.default,{activeSeries:this.state.activeSeries,onClick:this.handleLegendClick})})}},{key:"renderBar",value:function(){var e=this,t=this.props,a=t.unit,r=t.areaColors,n=t.renderBar;return n?n():this.series.map((function(t,n){var l=r[n],u=g.COLORS_MAP[l]||l;return f.default.createElement(y.default,{key:t,dataKey:t,stroke:u,fill:"url(#".concat(l,"-area)"),unit:a,hide:!e.state.activeSeries.includes(t)})}))}},{key:"render",value:function(){var e=this.props,t=e.theme,a=e.width,r=e.height,n=e.xKey,l=e.data,u=(0,p.default)(R.default.chart,"chart","chart-".concat(t));return f.default.createElement("div",{className:u,style:{width:a,height:r}},this.renderTitle(),f.default.createElement(D.default,{width:"100%",height:"100%",debounce:1},f.default.createElement(C.default,{data:l,margin:{top:50,bottom:-20,left:0,right:20}},f.default.createElement(S.default,{stroke:"#d8dee5",strokeDasharray:"2 3",vertical:!1}),f.default.createElement(_.default,{dataKey:n,axisLine:!1,tickLine:!1}),f.default.createElement(b.default,{width:45,axisLine:!1,tickLine:!1,tickFormatter:function(e){return e>0?e:""}}),f.default.createElement(E.default,{wrapperStyle:{zIndex:1e3},cursor:"dark"===t?{fill:g.COLORS_MAP.lightest,fillOpacity:.2}:{fill:g.COLORS_MAP.grey},content:f.default.createElement(N.default,null)}),this.renderLegend(),this.renderBar())))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var a=(0,T.getActiveSeries)(e);return(0,h.default)(a,t.series)?null:{series:a,activeSeries:a}}}]),r}(f.default.Component);a.default=I,I.propTypes={theme:d.default.oneOf(["light","dark"]),width:d.default.oneOfType([d.default.string,d.default.number]),height:d.default.oneOfType([d.default.string,d.default.number]),title:d.default.string,xKey:d.default.string,unit:d.default.string,data:d.default.array,areaColors:d.default.array,renderTitle:d.default.func,renderBar:d.default.func},I.defaultProps={theme:"light",width:"100%",height:200,title:"Title",xKey:"time",unit:"",areaColors:["green","blue","yellow"],data:[]}},function(e,t,a){e.exports={chart:"_12oj79UOFmAu5q6GiNUsq2",title:"_1cs-znnZFCTeUErbjSD6Ed"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(84),r(18),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(84),r(18),r(28),r(42),r(4),r(23),r(57),r(17),r(85);var l=n(r(61)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=n(r(63)),h=n(r(806)),v=n(r(928)),g=r(72);r(1278);var y=n(r(1033)),E=n(r(869)),b=n(r(912)),_=n(r(870)),O=n(r(927)),S=n(r(929)),C=n(r(1277)),D=n(r(871)),k=n(r(1086)),N=n(r(862)),T=r(1087),R=n(r(2231));function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var I=function(e){(0,i.default)(r,e);var a=w(r);function r(e){var t;(0,u.default)(this,r),(t=a.call(this,e)).getBarSize=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.length<=20?20:8},t.handleLegendClick=function(e,a){var r=(0,l.default)(t.state.activeSeries);r.includes(a)?(0,v.default)(r,(function(e){return e===a})):r.push(a),t.setState({activeSeries:r})};var n=(0,T.getActiveSeries)(e);return t.state={series:n,activeSeries:n},t}return(0,o.default)(r,[{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.unit,n=e.renderTitle,l=n?n():(0,m.default)(r)?t(a):"".concat(t(a)," (").concat(r,")");return f.default.createElement("div",{className:R.default.title},l)}},{key:"renderLegend",value:function(){return f.default.createElement(O.default,{wrapperStyle:{top:0,left:"auto",right:0,width:"70%",zIndex:1001},content:f.default.createElement(k.default,{activeSeries:this.state.activeSeries,onClick:this.handleLegendClick})})}},{key:"renderBar",value:function(){var e=this,t=this.props,a=t.unit,r=t.areaColors,n=t.renderBar,l=this.state,u=l.series,o=l.activeSeries;return n?n():u.map((function(t,n){var l=r[n],u=g.COLORS_MAP[l]||l,i=e.getBarSize(e.series),c=0===n?[0,0,2,2]:n===e.series.length-1?[2,2,0,0]:null;return f.default.createElement(y.default,{key:t,dataKey:t,stackId:"series",barSize:i,stroke:u,strokeWidth:0,fill:u,radius:c,unit:a,hide:!o.includes(t)})}))}},{key:"render",value:function(){var e=this.props,t=e.theme,a=e.width,r=e.height,n=e.xKey,l=e.data,u=(0,p.default)(R.default.chart,"chart","chart-".concat(t));return f.default.createElement("div",{className:u,style:{width:a,height:r}},this.renderTitle(),f.default.createElement(D.default,{width:"100%",height:"100%",debounce:1},f.default.createElement(C.default,{data:l,margin:{top:50,bottom:-20,left:0,right:20}},f.default.createElement(S.default,{stroke:"#d8dee5",strokeDasharray:"2 3",vertical:!1}),f.default.createElement(_.default,{dataKey:n,axisLine:!1,tickLine:!1}),f.default.createElement(b.default,{width:45,axisLine:!1,tickLine:!1,tickFormatter:function(e){return e>0?e:""}}),f.default.createElement(E.default,{wrapperStyle:{zIndex:1e3},cursor:"dark"===t?{fill:g.COLORS_MAP.lightest,fillOpacity:.2}:{fill:g.COLORS_MAP.grey},content:f.default.createElement(N.default,null)}),this.renderLegend(),this.renderBar())))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var a=(0,T.getActiveSeries)(e);return(0,h.default)(a,t.series)?null:{series:a,activeSeries:a}}}]),r}(f.default.Component);a.default=I,I.propTypes={theme:d.default.oneOf(["light","dark"]),width:d.default.oneOfType([d.default.string,d.default.number]),height:d.default.oneOfType([d.default.string,d.default.number]),title:d.default.string,xKey:d.default.string,unit:d.default.string,data:d.default.array,areaColors:d.default.array,renderTitle:d.default.func,renderBar:d.default.func},I.defaultProps={theme:"light",width:"100%",height:200,title:"Title",xKey:"time",unit:"",areaColors:["green","blue","yellow"],data:[]}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={chart:"_23-9y13KSLTiB9ATkXvt6C",title:"_2tAARTBPZ1UnWw3S1J1rbq"}},function(e,a,r){"use strict";var n=r(20);r(12),r(827),r(11),r(6),r(18),r(190),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(827),r(11),r(6),r(18),r(28),r(42),r(190),r(34),r(15),r(9),r(13),r(10),r(4),r(436),r(23),r(57),r(17),r(7);var l=n(r(61)),u=n(r(30)),o=n(r(315)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(1)),h=n(r(3)),v=n(r(26)),g=n(r(63)),y=r(794),E=n(r(927)),b=n(r(869)),_=n(r(1159)),O=n(r(1036)),S=n(r(1089)),C=n(r(871)),D=n(r(2233));function k(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function N(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:1;return n.total?(n.value/n.total*100).toFixed(e):0},n.getPrimaryColor=function(e){var t=e||{},a=t.areaColors,r=t.active,l=t.showRate,u=t.fixedColor,o=t.rateNum,i=n.getRate(o),c=(0,v.default)(a,[0],"#fff");return l&&!u&&(r&&(c="white"),i>=80&&(c="yellow"),i>=90&&(c="red")),c},n.getFills=function(e){var t=e||{},a=t.areaColors,r=t.active,l={fill:(0,y.getColorByName)(n.getPrimaryColor(e))},u=a[1]||l.fill;return{activeFill:l,totalFill:r?{fill:"#fff",fillOpacity:.4}:{fill:(0,y.getColorByName)(u),fillOpacity:a[1]?1:.2}}},n.getData=function(){return[{name:n.props.legend[0],value:n.value},{name:"Remaining",value:n.remain}]},n.renderActiveShape=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cx,a=e.cy,r=e.innerRadius,l=e.outerRadius,u=e.startAngle,i=e.endAngle;return p.default.createElement("g",null,p.default.createElement(_.default,(0,o.default)({cx:t,cy:a,innerRadius:r,outerRadius:l,startAngle:u,endAngle:i},n.state.activeFill)))},n.renderTooltip=function(e){if(!e.active)return null;var a=n.props,r=a.title,l=a.legend,u=a.unit,o=a.value,i=a.total,c=a.showRate,s=a.rateNum,f=a.isShowTotalTooltip,d="%"===u?"%":" ".concat(u),m=c&&" (".concat(n.getRate(s),"%)");return p.default.createElement("div",{className:D.default.tooltip},p.default.createElement("div",{className:D.default.label},t(r)),p.default.createElement("div",{className:D.default.list},p.default.createElement("div",{className:D.default.item},p.default.createElement("i",{style:{background:n.state.activeFill.fill}}),p.default.createElement("label",null,t(l[0]),":"),p.default.createElement("p",null,o,d,m)),f&&p.default.createElement("div",{className:D.default.item},p.default.createElement("i",{style:{background:"#fff"}}),p.default.createElement("label",null,t(l[1]),":"),p.default.createElement("p",null,i,d))))},n.state=N({},n.getFills(e)),n}return(0,c.default)(r,[{key:"componentDidUpdate",value:function(e){e.active!==this.props.active&&this.setState(N({},this.getFills(this.props)))}},{key:"renderCenter",value:function(){var e,t=this.props,a=t.theme,r=t.value,n=t.total,l=t.showRate,o=t.showRatio,i=t.renderCustomCenter,c=t.showName,s=t.rateNum,f=this.getPrimaryColor(this.props),d=l?(0,u.default)({},D.default.standard,!0):o?(e={},(0,u.default)(e,D.default.mid,r>99||n>99),(0,u.default)(e,D.default.mini,r>999||n>999),e):{},m=l?"".concat(this.getRate(s),"%"):o?p.default.createElement("p",null,p.default.createElement("strong",null,r),p.default.createElement("span",null,"/"),n):null;return p.default.createElement("div",{className:(0,h.default)(D.default.center,D.default[f],d,(0,u.default)({},D.default.white,"dark"===a))},c&&p.default.createElement("p",{className:D.default["show-name"]},this.props.legend[0]),i?i({value:r,total:n}):m)}},{key:"renderLegend",value:function(){var e=this.props,a=e.legend,r=e.areaColors;return p.default.createElement(E.default,{wrapperStyle:{bottom:0,zIndex:100},content:function(e){var n=e.payload,u=(0,l.default)(n);return(0,g.default)(u)||(u[u.length-1].value=a[a.length-1],u[u.length-1].color=r[u.length-1]||"#fff"),p.default.createElement("div",{className:D.default.legend},u.map((function(e){var a=(0,v.default)(e,"payload.fill");return p.default.createElement("div",{key:e.dataKey,"data-key":e.dataKey,className:D.default.item},p.default.createElement("i",{style:{backgroundColor:a}}),t(e.value))})))}})}},{key:"render",value:function(){var e=this.props,t=e.width,a=e.height,r=e.showCenter,n=e.innerRadius,l=void 0===n?"70%":n,u=this.getData();return p.default.createElement("div",{className:D.default.chart,style:{width:t,height:a}},r&&this.renderCenter(),p.default.createElement(C.default,{width:"100%",height:"100%",debounce:1},p.default.createElement(S.default,null,p.default.createElement(O.default,(0,o.default)({data:u,dataKey:"value",activeIndex:0,activeShape:this.renderActiveShape,innerRadius:l,outerRadius:"100%",stroke:"transparent"},this.state.totalFill)),p.default.createElement(b.default,{wrapperStyle:{zIndex:100},content:this.renderTooltip}))))}},{key:"value",get:function(){var e=parseFloat(this.props.value||0);return e>0?e:0}},{key:"total",get:function(){return parseFloat(this.props.total||0)}},{key:"remain",get:function(){var e=this.total-this.value;return 0===this.total?1:e}}]),r}(p.default.Component);a.default=R,R.propTypes={theme:m.default.oneOf(["light","dark"]),width:m.default.oneOfType([m.default.string,m.default.number]),height:m.default.oneOfType([m.default.string,m.default.number]),title:m.default.string,legend:m.default.array,value:m.default.oneOfType([m.default.number,m.default.string]),total:m.default.oneOfType([m.default.number,m.default.string]),unit:m.default.string,areaColors:m.default.array,showCenter:m.default.bool,showRate:m.default.bool,showRatio:m.default.bool,active:m.default.bool,rateNum:m.default.number,isShowTotalTooltip:m.default.bool},R.defaultProps={theme:"light",width:100,height:100,title:"",legend:["USED","TOTAL"],value:0,total:0,unit:"",isShowTotalTooltip:!0,areaColors:["green"],showCenter:!0,showRate:!1,showRatio:!0,active:!1,rateNum:0}},function(e,t,a){e.exports={chart:"_3xORGioagELncq_b0QqUXh",center:"_1Fpm4EsVyd6rEqOU-TLFy4",fadeIn:"l534UI3MtCEqz4eGGY2TT","show-name":"_3xCxaH91PcORamjP2M6dwG",standard:"_2NHy2ySjaBP3iE_V33_T5s",mid:"_2_sR4rrGvd5Nbsd1lzOhmK",mini:"_2x1qX36v29kVnJ-mDXpniw",white:"_1HaIvuK2oSITwqGtPezmdk",yellow:"_bd_3V5QJCH9JEWCPD3q5",red:"_3zV4Hy8k1ujHADMao04tU1",tooltip:"_3j83qVypNfpK_iV4Spm6bt",label:"_1oAbCyvxESz8SMJcvczmya",item:"NrpjP1sw1yw9v33VrS1Qn",legend:"_2RMVikNBMbfj9iyRPZcc2V"}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(11),a(31),a(1037),a(18),a(1038),a(16),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.dataList,a=e.legendClassName,r=e.wrapperStyle,n=void 0===r?{width:"50%",left:"120px"}:r,E=e.disabledFilter,b=void 0!==E&&E,_=e.total,O=e.noTooltip,S=(0,u.useState)([]),C=(0,l.default)(S,2),D=C[0],k=C[1],N=(0,u.useState)(!0),T=(0,l.default)(N,2),R=T[0],w=T[1];(0,u.useEffect)((function(){var e=(0,p.default)(t);if(t.length>1){var a=e.map((function(e){return e.data})).flat(),r=a.pop(),n=a.filter((function(e){return e.name!==r.name})).concat(r);k(n)}else{var l=e.map((function(e){return e.data})).flat();k(l),w(!1)}}),[t]);if(Array.isArray(t)&&t.length<0)return;return u.default.createElement(d.default,{width:"100%",height:"100%",debounce:1},u.default.createElement(f.default,null,t.map((function(e,t){var a=e.data,r=e.dataKey,n=e.innerRadius,l=e.outerRadius,o=e.colors,i=e.cx,f=void 0===i?75:i,d=e.cy,p=void 0===d?55:d;return u.default.createElement(s.default,{data:a,dataKey:r,cx:f,cy:p,minAngle:0,innerRadius:n,outerRadius:l,startAngle:90,endAngle:-360,key:"pie-".concat(t),animationDuration:1e3},a.map((function(e,t){var a=!(0,h.default)(D.find((function(t){return t.name===e.name})));return u.default.createElement(c.default,{key:"cell-".concat(t),fill:a?o[t%o.length]:o[o.length-1]})})))})),!O&&u.default.createElement(o.default,{wrapperStyle:{zIndex:1e3},cursor:{stroke:v.COLORS_MAP.dark,strokeDasharray:"3,2",strokeWidth:2},content:u.default.createElement(g.default,null)}),u.default.createElement(i.default,{layout:"vertical",align:"right",verticalAlign:"middle",iconType:"circle",wrapperStyle:n,content:u.default.createElement(y.default,{activeSeries:D,onClick:b?null:function(e){var t=(0,p.default)(D);t.find((function(t){return t.name===e.name}))?(0,m.default)(t,(function(t){return t.name===e.name})):t.push(e),k(t)},isMult:R,className:a,totalValue:_})})))},a(5),a(11),a(31),a(1037),a(160),a(18),a(28),a(1038),a(16),a(4);var l=n(a(96)),u=r(a(0)),o=n(a(869)),i=n(a(927)),c=n(a(998)),s=n(a(1036)),f=n(a(1089)),d=n(a(871)),p=n(a(135)),m=n(a(928)),h=n(a(158)),v=a(72),g=n(a(2235)),y=n(a(2237))},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(86),r(18),r(16),r(27),r(9),r(13),r(10),r(24),r(64),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(30));r(12),r(5),r(11),r(31),r(6),r(86),r(18),r(28),r(16),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(24),r(64),r(7);var u=n(r(0)),o=n(r(26)),i=n(r(63)),c=n(r(925)),s=r(52),f=r(72),d=r(1513),p=n(r(2236));function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function h(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};if(!e.active)return null;var a=e.renderLabel,r=e.payload,n=e.usageData,l=e.totalData,m=e.tailText,v=e.alert,g=e.isTranslate,y=void 0===g||g,E=r||[],b=e.label,_=(0,o.default)(E,"[0].payload.unit")||"",O="default"===_?"":"%"===_?"%":"".concat(t(_)),S=a?a(e):b,C=function(e){var a=e.indexOf("gpu")>-1?"gpu":e,r="gpu"===a?"".concat(a,".limit"):a;return f.ICON_TYPES[a]?t(r.replace(/[. ]/g,"_").toUpperCase()):r};return u.default.createElement("div",{className:p.default.tooltip},v&&u.default.createElement("div",{className:p.default.item},u.default.createElement(d.ReactComponent,null),"".concat(t(C(v.name||"")),":").concat("core"===v.unit?t("VALUE_CORES",{value:v.value}):t("VALUE_UNIT",h({},v)))),u.default.createElement("div",{className:p.default.label,style:{marginTop:"".concat(v?"8px":"0px")}},u.default.createElement("span",null,S),m&&u.default.createElement("span",null,m)),u.default.createElement("div",{className:p.default.list},E.map((function(e){var a=e.dataKey,r=e.name,f=e.value,d=void 0===f?0:f;if((0,c.default)(Number(d)))return null;var m=(0,o.default)(e,"payload.fill"),h=(0,o.default)(e,"payload.label")||r,v="";if(!(0,i.default)(n)&&!(0,i.default)(l)){var g=(0,o.default)(n.find((function(e){return e.time===b})),r)||0,E=(0,o.default)(l.find((function(e){return e.time===b})),r)||0;v=" (".concat(g,"/").concat(E,")")}var _=(0,s.coreUnitTS)(d,O);return u.default.createElement("div",{key:a,className:p.default.item},u.default.createElement("i",{style:{background:m}}),y?t(h):h,": ",d," ".concat(t(_)),v)}))))};a.default=v},function(e,t,a){e.exports={tooltip:"_18KqCyvNCGxzhlSz2Z2-9Y",label:"YYJ1OVwvKVdRA2JE3OPIX",item:"_22WPsKANfFjmXw4JkrTCTT"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(11),r(31),r(18),r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(5),r(11),r(31),r(18),r(16),r(4);var u=l(r(30)),o=l(r(96)),i=n(r(0)),c=l(r(3)),s=l(r(135)),f=l(r(26)),d=l(r(74)),p=l(r(2238)),m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=e.className,r=e.payload,n=e.activeSeries,l=void 0===n?[]:n,m=e.isMult,h=e.totalValue,v=(0,i.useState)([]),g=(0,o.default)(v,2),y=g[0],E=g[1];(0,i.useEffect)((function(){if(r.length>0){var e=(0,s.default)(r);if(m){var t=e.pop();void 0!==h&&(0,d.default)(t,"payload.value",h);var a=e.filter((function(e){return e.value!==t.value})).concat(t);E(a)}else E(e)}}),[r,h]);var b=function(t,a){t.cancelBubble=!0,t.stopPropagation();var r=e.onClick;r&&r(a)};return i.default.createElement("div",{className:(0,c.default)(a,p.default.legend)},y.map((function(e,a){var r,n=!l.find((function(t){return t.name===e.value})),o=(0,f.default)(e,"color"),s=!!m&&a===y.length-1;return i.default.createElement("div",{key:a,className:(0,c.default)(p.default.item,(r={},(0,u.default)(r,p.default.inactive,n),(0,u.default)(r,p.default.disabled,s),r)),onClick:s?null:function(t){return b(t,{name:e.value,value:e.payload.value})}},i.default.createElement("span",{className:p.default.label},i.default.createElement("i",{style:{backgroundColor:o}}),i.default.createElement("span",null,t(e.value))),i.default.createElement("b",{className:p.default.value},e.payload.unit?"core"===e.payload.unit?t("VALUE_CORES",{value:e.payload.value}):t("VALUE_UNIT",{value:e.payload.value,unit:t(e.payload.unit)}):e.payload.value))})))};a.default=m},function(e,t,a){e.exports={legend:"_1RC52HxQjVmMw4L8iQz2w_",hide:"_3b4znXld-yrkvvSjP8xkTG",item:"DkIMSpjNvU3Z-NUrcuIk9",label:"PD8OHwScr2aOwFWjkEAME",value:"_1nZ2x0Ee6aieU7C7M21FTp",inactive:"_3cAYRwJBR322I0l6tMMEUK",disabled:"_1DSn1UPehNfQ40117uCm4x"}},function(e,t,a){e.exports={selector:"_3jdnDfk2o9GZ977aTA-xpY",active:"_1VVAknMMhYtwjCCzJ26w8D",arrow:"_3fVUYCC4XLdULuzPPLryH6",dropdown:"_4VJDQbixxjDltdv9t2c1h",button:"B4m3CNQgLzi7Xqxf0JBO_",mask:"_2LZHnUZdP2-tzMlT4rOCY9",content:"_8RPB91ZzJIARHcetuuCun"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.redisCluster=t.redisSentinal=void 0;t.redisSentinal={resource:{apiVersion:"redis.radondb.com/v1beta1",kind:"RedisSentinel",metadata:{name:"redis-sentinel",namespace:"redis-sentinel"},spec:{clusterSize:3,kubernetesConfig:{redisVersion:"6.2.5",image:"radondb/redis:v6.2.5",imagePullPolicy:"Always",resources:{requests:{cpu:"101m",memory:"128Mi"},limits:{cpu:"101m",memory:"128Mi"}}},redisExporter:{enabled:!0,image:"radondb/redis-exporter:v1.44.0",imagePullPolicy:"Always",resources:{requests:{cpu:"100m",memory:"128Mi"},limits:{cpu:"100m",memory:"128Mi"}}},redisReplica:{replicas:3,redisConfig:{additionalRedisConfig:"redis-sentinel-external-config"},affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{podAffinityTerm:{labelSelector:{matchExpressions:[{key:"redis.radondb.com/name",operator:"In",values:[111]}]},topologyKey:"kubernetes.io/hostname"},weight:1}]}}},aclConfig:{aclFile:"redis-sentinel-acl-config"},redisSentinel:{replicas:3,sentinelConfig:{quorum:2,parallelSyncs:3},resources:{requests:{cpu:"100m",memory:"128Mi"},limits:{cpu:"100m",memory:"128Mi"}},affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{podAffinityTerm:{labelSelector:{matchExpressions:[{key:"redis.radondb.com/name",operator:"In",values:[111]}]},topologyKey:"kubernetes.io/hostname"},weight:1}]}}},storage:{volumeClaimTemplate:{spec:{storageClassName:"standard",accessModes:["ReadWriteOnce"],resources:{requests:{storage:"1Gi"}}}}}}},externalConfig:{apiVersion:"v1",kind:"ConfigMap",metadata:{namespace:"redis-sentinel",name:"redis-sentinel-external-config"},data:{"redis-external.conf":"aclfile /etc/redis/acl.conf.d/aclfile.conf\ntcp-keepalive 400\nslowlog-max-len 158\nstream-node-max-bytes 2048\nio-threads 1\nio-threads-do-reads no\nmaxmemory 0"}},secret:{apiVersion:"v1",kind:"Secret",metadata:{name:"redis-secret-password-secret",namespace:"redis-sentinel"},type:"Opaque",data:{password:"bWd3MjE2ODAwMA=="}},aclConfig:{apiVersion:"v1",kind:"ConfigMap",metadata:{namespace:"redis-sentinel",name:"redis-sentinel-acl-config"},data:{"aclfile.conf":"user radondb on >radondb123@ ~* &* +@all"}}};t.redisCluster={resource:{apiVersion:"redis.radondb.com/v1beta1",kind:"RedisCluster",metadata:{name:"redis-cluster",namespace:"redis-cluster"},spec:{clusterSize:3,kubernetesConfig:{redisVersion:"6.2.5",image:"radondb/redis:v6.2.5",imagePullPolicy:"IfNotPresent",resources:{requests:{cpu:"101m",memory:"128Mi"},limits:{cpu:"101m",memory:"128Mi"}}},redisExporter:{enabled:!0,image:"radondb/redis-exporter:v1.44.0",imagePullPolicy:"IfNotPresent",resources:{requests:{cpu:"100m",memory:"128Mi"},limits:{cpu:"100m",memory:"128Mi"}}},redisLeader:{replicas:3,redisConfig:{additionalRedisConfig:"redis-cluster-external-config"},affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{podAffinityTerm:{labelSelector:{matchExpressions:[{key:"redis.radondb.com/name",operator:"In",values:[111]}]},topologyKey:"kubernetes.io/hostname"},weight:1}]}}},redisFollower:{replicas:3,redisConfig:{additionalRedisConfig:"redis-cluster-external-config"},affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{podAffinityTerm:{labelSelector:{matchExpressions:[{key:"redis.radondb.com/name",operator:"In",values:[111]}]},topologyKey:"kubernetes.io/hostname"},weight:1}]}}},aclConfig:{aclFile:"redis-cluster-acl-config"},storage:{volumeClaimTemplate:{spec:{storageClassName:"csi-standard",accessModes:["ReadWriteOnce"],resources:{requests:{storage:"200Mi"}}}}},predixyExporter:{enabled:!0,image:"radondb/predixy-exporter:v1.0.0",imagePullPolicy:"IfNotPresent",resources:{requests:{cpu:"100m",memory:"128Mi"},limits:{cpu:"100m",memory:"128Mi"}}},redisProxy:{enabled:!1,replicas:3,image:"radondb/predixy:v1.0.5",imagePullPolicy:"IfNotPresent",resources:{requests:{cpu:"101m",memory:"128Mi"},limits:{cpu:"101m",memory:"128Mi"}},affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{podAffinityTerm:{labelSelector:{matchExpressions:[{key:"redis.radondb.com/name",operator:"In",values:[111]}]},topologyKey:"kubernetes.io/hostname"},weight:1}]}},predixyConfigParams:{clusterName:"redis-cluster",workerThreads:2,clientTimeout:0,bufSize:1048576,masterReadPriority:100,slaveReadPriority:0,refreshInterval:1,serverTimeout:3,serverFailureLimit:10,serverRetryTimeout:5,keepAlive:120}}}},externalConfig:{apiVersion:"v1",kind:"ConfigMap",metadata:{namespace:"redis-cluster",name:"redis-cluster-external-config"},data:{"redis-external.conf":'maxmemory 128mb\nmaxmemory-policy volatile-lru\nactiverehashing yes\nappendonly yes\nappendfsync everysec\ntcp-keepalive 400\ncluster-node-timeout 15000\nslowlog-max-len 128\nstream-node-max-bytes 2048\nmaxclients 102400\nlatency-monitor-threshold 0\nmaxmemory-samples 3\nmin-slaves-max-lag 10\nmin-slaves-to-write 0\nno-appendfsync-on-rewrite no\nnotify-keyspace-events ""\nrepl-backlog-size 1mb\nrepl-backlog-ttl 3600\nrepl-timeout 60\nset-max-intset-entries 512\nslowlog-log-slower-than -1\nslowlog-max-len 128\nhash-max-ziplist-entries 512\nhash-max-ziplist-value 64\nzset-max-ziplist-entries 512\nzset-max-ziplist-value 64\nlua-time-limit 5000\nio-threads 1\nio-threads-do-reads no\nlogfile logfile\n'}},secret:{apiVersion:"v1",kind:"Secret",metadata:{name:"redis-secret-password-secret",namespace:"redis-cluster"},type:"Opaque",data:{password:"bWd3MjE2ODAwMA=="}},aclConfig:{apiVersion:"v1",kind:"ConfigMap",metadata:{namespace:"redis-cluster",name:"redis-cluster-acl-config"},data:{"aclfile.conf":"user radondb on >radondb123@ ~* &* +@all"}}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.mongoYaml=void 0;t.mongoYaml={resources:{apiVersion:"mongodbcommunity.mongodb.com/v1",kind:"MongoDBCommunity",metadata:{name:"mongodb"},spec:{members:1,type:"ReplicaSet",version:"4.2.19",prometheus:{username:"Prometheus",passwordSecretRef:{name:"mongodb-metrics-password"}},security:{authentication:{modes:["SCRAM"]}},users:[{name:"operator",db:"admin",passwordSecretRef:{name:"mongodb-operator-password"},roles:[{name:"root",db:"admin"}],scramCredentialsSecretName:"mongodb-operator-password"},{name:"root",db:"admin",passwordSecretRef:{name:"mongodb-root-password"},roles:[{name:"root",db:"admin"}],scramCredentialsSecretName:"mongodb-root-password"}],additionalMongodConfig:{net:{port:27017,maxIncomingConnections:1e4},storage:{wiredTiger:{engineConfig:{journalCompressor:"zlib"}}},replication:{oplogSizeMB:10240,enableMajorityReadConcern:!0},operationProfiling:{mode:"off",slowOpThresholdMs:100},systemLog:{destination:"file",path:"/data/mongod.log",logAppend:!0,logRotate:"reopen",component:{command:{verbosity:0},index:{verbosity:0},query:{verbosity:0},network:{verbosity:0},write:{verbosity:0}}},setParameter:{cursorTimeoutMillis:7e5}},statefulSet:{spec:{template:{spec:{initContainers:[{name:"mongod-posthook",imagePullPolicy:"IfNotPresent",resources:{limits:{cpu:"0.2",memory:"250M"},requests:{cpu:"0.2",memory:"250M"}}},{name:"mongodb-agent-readinessprobe",imagePullPolicy:"IfNotPresent",resources:{limits:{cpu:"0.2",memory:"250M"},requests:{cpu:"0.2",memory:"250M"}}}],containers:[{name:"mongod",imagePullPolicy:"IfNotPresent",resources:{limits:{cpu:"8",memory:"16G"},requests:{cpu:2,memory:"4G"}}},{name:"mongodb-agent",imagePullPolicy:"IfNotPresent",resources:{limits:{cpu:"0.2",memory:"250M"},requests:{cpu:"0.2",memory:"250M"}}}],affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{podAffinityTerm:{labelSelector:{matchExpressions:[{key:"app.kubernetes.io/instance",operator:"In",values:[111]}]},topologyKey:"kubernetes.io/hostname"},weight:1}]}}}},volumeClaimTemplates:[{metadata:{name:"data-volume"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"100G"}},storageClassName:"csi-high-capacity"}}]}}}},masterSecret:{apiVersion:"v1",kind:"Secret",metadata:{name:"mongodb-operator-password"},type:"Opaque",stringData:{password:"operator_pwd"}},rootSecret:{apiVersion:"v1",kind:"Secret",metadata:{name:"mongodb-root-password"},type:"Opaque",stringData:{password:"root_pwd"}}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.ckYaml=void 0;t.ckYaml={resources:{apiVersion:"clickhouse.radondb.com/v1",kind:"ClickHouseInstallation",metadata:{name:"ck-cluster-11",namespace:"default"},spec:{metricsExporter:"on",configuration:{zookeeper:{install:!0,replica:3,port:2181},users:{"readonly/profile":"readonly","clickhouse/password":"c1ickh0use0perator","clickhouse/networks/ip":["127.0.0.1","::/0"],"clickhouse/profile":"default","clickhouse/quotas":"default"},profiles:{"readonly/readonly":"1","default/max_memory_usage":2e8},quotas:{"default/interval/duration":"3600"},settings:{"compression/case/method":"zstd",disable_internal_dns_cache:1,max_server_memory_usage:18e8,"logger/log":"/var/lib/clickhouse/log/clickhouse-server.log","logger/errorlog":"/var/lib/clickhouse/log/clickhouse-server.err.log","logger/count":10,"logger/size":"100M",timezone:"Asia/Shanghai"},clusters:[{name:"all-nodes",layout:{shardsCount:1,replicasCount:2}}]},defaults:{templates:{podTemplate:"pod-template-with-volume",dataVolumeClaimTemplate:"data",logVolumeClaimTemplate:"data",serviceTemplate:"chi-svc-template"}},templates:{serviceTemplates:[{name:"chi-svc-template",spec:{ports:[{name:"http",port:8123},{name:"tcp",port:9e3}],type:"NodePort"}}],podTemplates:[{name:"pod-template-with-volume",metadata:{annotations:{"backup.velero.io/backup-volumes":"data"}},spec:{affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{weight:1,podAffinityTerm:{labelSelector:{matchExpressions:[{key:"clickhouse.radondb.com/chi",operator:"In",values:["clickhouse"]}]},topologyKey:"kubernetes.io/hostname"}}]}},containers:[{name:"clickhouse",image:"radondb/clickhouse-server:v21.1.3.32-stable",imagePullPolicy:"IfNotPresent",readinessProbe:{exec:{command:["/usr/bin/clickhouse-client","-q","SELECT 1"]}},initialDelaySeconds:10,periodSeconds:30,successThreshold:1,failureThreshold:4,timeoutSeconds:10,livenessProbe:{exec:{command:["/usr/bin/clickhouse-client","-q","SELECT 1"]},initialDelaySeconds:60,periodSeconds:30,successThreshold:1,failureThreshold:4,timeoutSeconds:10},volumeMounts:[{name:"data",mountPath:"/var/lib/clickhouse"}],resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}}}]}}],volumeClaimTemplates:[{name:"data",reclaimPolicy:"Retain",spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"10Gi"}},storageClassName:"csi-qingcloud"}}]}}}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.pgYaml=void 0;t.pgYaml={resources:{apiVersion:"postgres.radondb.io/v1",kind:"PostgreSQL",metadata:{name:"lzzhang"},spec:{action:"start",deletepvc:!0,volume_type:"local",antiaffinity:{policy:"preferred",podAntiAffinityTerm:"autofailover-readwrite",topologyKey:"kubernetes.io/hostname"},backupCluster:{backupToS3:{policy:{retention:"REDUNDANCY 10"}}},services:[{selector:"autofailover",metadata:{name:"autofailover"},spec:{type:"ClusterIP",ports:[{name:"exporter",port:9187}]}},{selector:"primary",metadata:{name:"readwrite"},spec:{type:"ClusterIP",ports:[{name:"prime",port:5432},{name:"exporter",port:9187}]}},{selector:"standby-readonly",metadata:{name:"standby-readonly"},spec:{type:"ClusterIP",ports:[{name:"prime",port:5432},{name:"exporter",port:9187}]}}],autofailover:{hbas:["host all all all md5"],configs:["enable_seqscan=on"],podspec:{terminationGracePeriodSeconds:60,containers:[{image:"radondb/radondb-postgresql:12.12-v1.1.0",imagePullPolicy:"IfNotPresent",name:"postgresql",volumeMounts:[{name:"data",mountPath:"/var/lib/postgresql/data"}],resources:{limits:{memory:"500Mi",cpu:"0.5"}}},{image:"radondb/radondb-postgres-exporter:v1.1.0",imagePullPolicy:"IfNotPresent",name:"exporter",volumeMounts:[{name:"data",mountPath:"/var/lib/postgresql/data"}],resources:{limits:{memory:"100Mi",cpu:"0.1"}}}]},volumeClaimTemplates:[{metadata:{name:"data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"1Gi"}}}}]},postgresql:{users:{admin:[],normal:[]},hbas:["host all all all md5"],configs:["enable_seqscan=on","autovacuum=true","autovacuum_analyze_scale_factor=0.05","autovacuum_vacuum_cost_delay=0","autovacuum_vacuum_cost_limit=10000","autovacuum_vacuum_scale_factor=0.02","bgwriter_delay=10","bgwriter_flush_after=512kB","bgwriter_lru_maxpages=1000","checkpoint_timeout=300","commit_delay=0","commit_siblings=5","cpu_index_tuple_cost=0.005","cpu_tuple_cost=0.01","fsync=true","full_page_writes=true","idle_in_transaction_session_timeout=86400000","jit=false","log_min_duration_statement=10000","log_min_messages=WARNING","log_statement=none","maintenance_work_mem=64MB","max_connections=100","max_replication_slots=15","max_wal_senders=15","max_worker_processes=20","port=5432","random_page_cost=1.1","seq_page_cost=1","shared_buffers=128MB","statement_timeout=0","synchronous_commit=on","temp_buffers=1MB","vacuum_defer_cleanup_age=10000","wal_compression=false","wal_level=replica","wal_writer_delay=10","wal_writer_flush_after=1MB","work_mem=4MB"],readwriteinstance:{replicas:2,podspec:{terminationGracePeriodSeconds:60,containers:[{image:"radondb/radondb-postgresql:12.12-v1.1.0",imagePullPolicy:"IfNotPresent",name:"postgresql",volumeMounts:[{name:"data",mountPath:"/var/lib/postgresql/data"}],resources:{limits:{memory:"200Mi",cpu:"0.2"}}},{image:"radondb/radondb-postgres-exporter:v1.1.0",imagePullPolicy:"IfNotPresent",name:"exporter",volumeMounts:[{name:"data",mountPath:"/var/lib/postgresql/data"}],resources:{limits:{memory:"100Mi",cpu:"0.1"}}}]},volumeClaimTemplates:[{metadata:{name:"data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"1Gi"}}}}]},readonlyinstance:{streaming:"async",replicas:0,podspec:{terminationGracePeriodSeconds:60,containers:[{image:"radondb/radondb-postgresql:12.12-v1.1.0",imagePullPolicy:"IfNotPresent",name:"postgresql",volumeMounts:[{name:"data",mountPath:"/var/lib/postgresql/data"}],resources:{limits:{memory:"200Mi",cpu:"0.2"}}},{image:"radondb/radondb-postgres-exporter:v1.1.0",imagePullPolicy:"IfNotPresent",name:"exporter",volumeMounts:[{name:"data",mountPath:"/var/lib/postgresql/data"}],resources:{limits:{memory:"100Mi",cpu:"0.1"}}}]},volumeClaimTemplates:[{metadata:{name:"data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"1Gi"}}}}]}}}}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.mysqlYaml=void 0;t.mysqlYaml={resources:{apiVersion:"mysql.radondb.com/v1alpha1",kind:"MysqlCluster",metadata:{name:"sample",namespace:"default"},spec:{replicas:3,mysqlVersion:"5.7",backupSecretName:"$DMP-MANAGED-S3-SECRET$",mysqlOpts:{rootPassword:"",image:"percona/percona-server:5.7.39",rootHost:"localhost",user:"radondb_usr",password:"RadonDB@123",database:"radondb",initTokuDB:!0,mysqlConf:{},resources:{requests:{cpu:"100m",memory:"256Mi"},limits:{cpu:"500m",memory:"1Gi"}}},xenonOpts:{image:"radondb/xenon:v2.3.0",admitDefeatHearbeatCount:5,electionTimeout:1e4,resources:{requests:{cpu:"50m",memory:"128Mi"},limits:{cpu:"100m",memory:"256Mi"}}},metricsOpts:{enabled:!0,image:"prom/mysqld-exporter:v0.12.1",resources:{requests:{cpu:"10m",memory:"32Mi"},limits:{cpu:"100m",memory:"128Mi"}}},podPolicy:{imagePullPolicy:"IfNotPresent",sidecarImage:"radondb/mysql-sidecar:v2.3.0",busyboxImage:"busybox:1.32",slowLogTail:!1,auditLogTail:!1,labels:{},annotations:{},affinity:{podAntiAffinity:{requiredDuringSchedulingIgnoredDuringExecution:[{labelSelector:{matchExpressions:[{key:"mysql.radondb.com/cluster",operator:"In",values:["mysql"]}]},topologyKey:"kubernetes.io/hostname"}]}},priorityClassName:"",schedulerName:"",extraResources:{requests:{cpu:"100m",memory:"500Mi"}}},persistence:{enabled:!0,accessModes:["ReadWriteOnce"],size:"10Gi"}}}}},,,,,,,,,function(e,t,a){"use strict";var r=a(20),n=a(157);a(12),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(28),a(42),a(448),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var l,u,o,i=r(a(315)),c=r(a(30)),s=r(a(58)),f=r(a(36)),d=r(a(37)),p=r(a(88)),m=r(a(55)),h=r(a(56)),v=r(a(51)),g=n(a(0)),y=r(a(1)),E=r(a(26)),b=r(a(189)),_=r(a(241)),O=r(a(787)),S=r(a(481)),C=r(a(482)),D=a(791),k=r(a(1296)),N=r(a(435)),T=r(a(1541)),R=r(a(2290));function w(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function I(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},u=l.containerDetail,o=l.selectedVersion,i=(0,s.default)(l,["containerDetail","selectedVersion"]),c=(null===(e=(0,p.default)(r))||void 0===e?void 0:e.props)||(0,p.default)(r),f=null===(t=(0,p.default)(r))||void 0===t?void 0:t.props,d=f.trigger,m=void 0===d?r.trigger:d,h=f.success,v=(void 0===h&&r.success,N.default.edgeappsets((0,_.default)(c,"namespace"))),g=(0,E.default)(u,"metadata.name"),y=(0,E.default)(u,"spec"),O=(0,E.default)(o,"_originData.spec.versionName"),S=(0,b.default)(y,"version");v&&(v.spec=I(I({},null==v?void 0:v.spec),{},{appTemplateName:g,version:O,deploymentTemplate:{spec:I(I({},S),{},{template:{spec:{deploymentTemplate:{spec:S}}}})}})),r.trigger("app.template.deploy.v2",I(I(I(I(I(I({trigger:m},(0,p.default)(r)),c),i),u),{},{app:(null===(a=r.props)||void 0===a?void 0:a.app)||(null===(n=(0,p.default)(r))||void 0===n?void 0:n.app),isEdgeTable:!0},(0,_.default)(c,["cluster","workspace","namespace"])),{},{formTemplate:v,onOK:null==c?void 0:c.onOK}))},r.store=new C.default,r}return(0,d.default)(a,[{key:"componentDidMount",value:function(){var e;(null===(e=this.rootStore.actions)||void 0===e?void 0:e["app.template.deploy.v2"])||this.rootStore.registerActions(k.default)}},{key:"render",value:function(){var e=this.props,t=e.visible,a=(e.onOk,e.onDeploy,(0,s.default)(e,["visible","onOk","onDeploy"]));return g.default.createElement(O.default,(0,i.default)({className:T.default.modal,bodyClassName:T.default.body,visible:t,hideHeader:!0,rightScreen:!0,hideFooter:!0},a),g.default.createElement(R.default,(0,i.default)({},a,{onDeploy:this.handleDeploy.bind(this)})))}}]),a}(g.Component),u.propTypes={app:y.default.object,visible:y.default.bool,onOK:y.default.func,onCancel:y.default.func,appName:y.default.string,cluster:y.default.string,workspace:y.default.string,namespace:y.default.string,trigger:y.default.func},u.defaultProps={visible:!1,onCancel:function(){}},l=o))||l;t.default=P},function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(109),r(11),r(31),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(31),r(6),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(7);var u=n(r(43)),o=n(r(30));r(41);var i,c,s,f=n(r(44)),d=n(r(36)),p=n(r(37)),m=n(r(88)),h=n(r(55)),v=n(r(56)),g=n(r(51)),y=l(r(0)),E=n(r(243)),b=n(r(63)),_=n(r(199)),O=n(r(1)),S=r(239),C=r(186),D=n(r(435)),k=r(248),N=n(r(816)),T=n(r(932)),R=n(r(482)),w=n(r(1100)),I=n(r(2356)),M=n(r(2358));function P(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){for(var t=1;t0&&void 0!==r[0]?r[0]:{},e.next=3,t.versionStore.fetchList(A(A({},a),{},{app_id:t.appId,noLimit:!0}));case 3:case"end":return e.stop()}}),e)}))),t.handleTabChange=function(e){t.setState({tab:e})},t.handleClickBack=function(){var e=t.props.app;t.props.setType("appList",e.repo_id)},t.showDeploy=function(){var e=t.props.app,a=e.name,r=e.description,n=t.containerFormRef.current;n&&n.validate((function(){(t.props.onDeploy||t.onDeploy)(A(A({},t.props||(0,m.default)(t)),{},{title:a,selectedVersion:t.selectedVersion,description:r||"-",containerDetail:n.getData(),store:t.store}))}))},t.handleChangeAppVersion=function(e){t.setState({selectedVersionKey:e})},t.state={tab:"versionInfo",selectedVersionKey:"",showDeploy:!1},t.store=new R.default,t.appTemplateStore=new w.default,t.containerFormRef=y.default.createRef(),t}return(0,p.default)(n,[{key:"componentDidMount",value:(a=(0,f.default)(u.default.mark((function e(){var t;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.props.app.latestVersion.name,this.setState({selectedVersionKey:t});case 2:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.props.setType()}},{key:"renderContainerGroupInfo",value:function(){var e=this.props,a=e.cluster,r=e.namespace;return y.default.createElement("div",{className:M.default.content},y.default.createElement("div",{className:M.default.title},t("VERSION")),y.default.createElement(N.default,{className:"margin-b12",value:this.state.selectedVersionKey,options:this.versionOptions,onChange:this.handleChangeAppVersion}),this.selectedVersion&&y.default.createElement(T.default,{formRef:this.containerFormRef,store:this.appTemplateStore,cluster:a,namespace:r,formTemplate:this.containerFormTemplate,onlyDockerHub:!0,isReadOnlyContainers:!0,isShowAddContainer:!1}))}},{key:"render",value:function(){var e=this.props.app,a=e.name,r=e.description;return y.default.createElement(y.default.Fragment,null,y.default.createElement(I.default,{onClickBack:this.handleClickBack,title:a,desc:r||"-"}),y.default.createElement("div",{className:M.default.bar},y.default.createElement("span",{className:"h6"},t("CONTAINER_GROUP_INFO")),y.default.createElement(C.Button,{type:"control",onClick:this.showDeploy,disabled:(0,b.default)(this.versionOptions)},t("DEPLOYMENT"))),this.renderContainerGroupInfo())}},{key:"appId",get:function(){return this.props.app.name}},{key:"tabs",get:function(){return[{label:t("APP_INFORMATION"),value:"versionInfo"},{label:t("CHART_FILES"),value:"chartFiles"}]}},{key:"versionOptions",get:function(){var e=this.props.app,a=e.versions,r=e.latestVersion;return a.map((function(e){var a=e.name,n=e.createTime;return{value:a,label:y.default.createElement(y.default.Fragment,null,a,a===r.name&&y.default.createElement(C.Tag,{type:"warning",className:M.default.latestTag},t("LATEST_VERSION_SCAP"))),description:(0,E.default)(n).format("YYYY-MM-DD")}}))}},{key:"selectedVersion",get:function(){var e=this.state.selectedVersionKey;return this.props.app.versions.find((function(t){return t.name===e}))}},{key:"containerFormTemplate",get:function(){var e=this.props.namespace,t=D.default.apptemplateversions({name:this.appId});return this.selectedVersion&&(t=(0,k.getVersionFormattedData)(this.selectedVersion)),t=(0,_.default)({metadata:{namespace:e}},t)}}]),n}(y.Component),c.propTypes={app:O.default.object,setType:O.default.func,cluster:O.default.string,workspace:O.default.string,namespace:O.default.string,onDeploy:O.default.func},c.defaultProps={app:{}},i=s))||i;a.default=L},function(e,t,a){e.exports={wrapper:"_3-Z2rH4dJXrmQSWl9e4ycU",disabled:"_1Dw41QGGd50RzhWJFhfH49",options:"_2Xu541Z-0bUtJcujaZkRHR",option:"_2EXRjaIiDTR4g0Dfk94wJz",control:"_1hz7Wgmx8Rghk274Q2pzcH",withIcon:"_2Vq4QaRwsRLaDLjC6rbHLK",leftIcon:"ooc_mcBxBm5WR1VuTXQgW",text:"_2zG-KdWrFpEGXbWTU-Uk_u",rightIcon:"UPnGOt9oqYtT-P8SuLo1R",selected:"_1swH00sr6Ka5DNZNLzmPRP",search:"BXevkwDBApCohP4-5hFly"}},,,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(6),r(16),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(6),r(42),r(16),r(4),r(23),r(57),r(17),r(7);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(63)),f=n(r(135)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=r(881),v=r(186),g=n(r(1097)),y=n(r(1297)),E=n(r(1299)),b=n(r(1301)),_=n(r(1302)),O=n(r(1303)),S=n(r(2324)),C=n(r(2333)),D=n(r(2335)),k=n(r(2337));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var T=function(e){(0,o.default)(r,e);var a=N(r);function r(e){var t;return(0,l.default)(this,r),(t=a.call(this,e)).registerForm=function(){var e=t.context.registerSubRoute,a=t.props.onCancel;e&&e(t.handleSubmit,a)},t.handleGoBack=function(){var e=t.context.resetSubRoute;e&&e(),t.props.onCancel()},t.handleSubmit=function(e){var a=t.props,r=a.onSave,n=a.withService,l=t.formRef.current;l&&l.validate((function(){var a=l.getData();a.args&&(a.args=a.args.filter((function(e){return!(0,s.default)(e)}))),a.command&&(a.command=a.command.filter((function(e){return!(0,s.default)(e)}))),a.env&&(a.env=a.env.filter((function(e){var t=e.name;return!(0,s.default)(t)}))),a.ports&&(a.ports=a.ports.filter((function(e){return e.name&&e.containerPort}))),(0,s.default)(a.lifecycle)&&delete a.lifecycle,(0,s.default)(a.livenessProbe)&&delete a.livenessProbe,(0,s.default)(a.startupProbe)&&delete a.startupProbe,(0,s.default)(a.readinessProbe)&&delete a.readinessProbe,!n&&a.ports&&a.ports.forEach((function(e){void 0!==e.servicePort&&delete e.servicePort})),a.image=t.state.imageDetail.image,r(a),e&&e()}))},t.handleContainerTypeChange=function(e){t.setState({containerType:e})},t.formRef=d.default.createRef(),t.state={containerType:e.data.type||"worker",formData:(0,f.default)(e.data),imageDetail:{}},t}return(0,u.default)(r,[{key:"getChildContext",value:function(){var e=this;return{forceUpdate:function(){e.forceUpdate()},imageDetail:this.state.imageDetail,setImageDetail:function(t){e.setState({imageDetail:t})}}}}]),(0,u.default)(r,[{key:"componentDidMount",value:function(){this.registerForm()}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.isFederated,r=e.cluster,n=e.limitRange,l=e.imageRegistries,u=e.namespace,o=e.withService,i=e.supportGpuSelect,c=e.projectDetail,s=e.containers,f=e.type,p=e.isEdgeWize,N=e.onlyDockerHub,T=this.state,R=T.containerType,w=T.formData;return d.default.createElement("div",{className:(0,m.default)(k.default.wrapper,t)},d.default.createElement("div",{className:"h5"},d.default.createElement("a",{className:"custom-icon",onClick:this.handleGoBack},d.default.createElement(h.ReactComponent,null)),this.title),d.default.createElement(v.Form,{ref:this.formRef,data:w},d.default.createElement(O.default,{data:w,cluster:r,namespace:u,limitRange:n,imageRegistries:N?[]:l,defaultContainerType:R,onContainerTypeChange:this.handleContainerTypeChange,workspaceQuota:this.props.workspaceQuota,supportGpuSelect:i,isEdgeWize:p,containers:s,type:f}),d.default.createElement(g.default,{withService:"init"!==R&&o,data:w}),d.default.createElement(b.default,null),"init"!==R&&d.default.createElement(_.default,null),d.default.createElement(D.default,null),d.default.createElement(y.default,null),d.default.createElement(E.default,{namespace:u,isFederated:a,cluster:r,isEdgeWize:p,projectDetail:c}),d.default.createElement(S.default,null),d.default.createElement(C.default,{data:w})))}},{key:"title",get:function(){var e=this.props,a=e.type,r=e.titlePrefix,n=t("".concat(a.toUpperCase(),"_CONTAINER"));return"".concat(r).concat(n)}}]),r}(d.default.Component);a.default=T,T.propTypes={onlyDockerHub:p.default.bool,isEdgeWize:p.default.bool,className:p.default.string,type:p.default.string,titlePrefix:p.default.string,namespace:p.default.string,module:p.default.string,data:p.default.object,onSave:p.default.func,onCancel:p.default.func,configMaps:p.default.array,secrets:p.default.array,containers:p.default.array},T.defaultProps={className:"",type:"Add",titlePrefix:"",onlyDockerHub:!1,isEdgeWize:!1,namespace:"",module:"",data:{},onSave:function(){},onCancel:function(){},configMaps:[],secrets:[],containers:[]},T.childContextTypes={forceUpdate:p.default.func,imageDetail:p.default.object,setImageDetail:p.default.func},T.contextTypes={registerSubRoute:p.default.func,resetSubRoute:p.default.func}},function(e,t,a){e.exports={wrapper:"_7te1l8EfVM6tZhqTao6Sf",text:"_3nzWDPF5TiOskojQKzJuIk"}},function(e,t,a){e.exports={wrapper:"_1nzmymJQjcRsMrjYGneDt5",tip:"_2NjdkVatk0DK13ijU1TUaM"}},function(e,t,a){e.exports={wrapper:"_2jnaJ_tJNRHuS4hoQljy_3"}},function(e,t,a){e.exports={defaultButton:"_7MnHu7AlZ8cMwEuzfGyTc"}},function(e,t,a){e.exports={input:"_9VIeOg56YL5EUVGKERJsI"}},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(5),r(11),r(31),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var u=l(r(30)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=n(r(0)),p=r(186),m=l(r(135)),h=l(r(3)),v=l(r(2301));function g(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function y(e){for(var t=1;t0&&d.default.createElement("span",{className:v.default.allChoose,onClick:this.handleAllChoose},l?t("DESELECT_ALL"):t("SELECT_ALL"))),d.default.createElement("div",{className:v.default.table},d.default.createElement("div",{className:(0,h.default)(v.default.innerBox,(0,u.default)({},v.default.scroll,i.length>4))},i.map((function(t,a){return d.default.createElement(p.Checkbox,{className:(0,h.default)(v.default.tableItem,(0,u.default)({},v.default.checked,t.checked)),checked:t.checked,onChange:function(){return e.handleKeyChecked(a)}},t.label)}))))),d.default.createElement("div",{className:v.default.options},d.default.createElement(p.Button,{onClick:this.handleCancel},t("CANCEL")),d.default.createElement(p.Button,{type:"control",onClick:this.handleOk},t("OK"))))}},{key:"tabs",get:function(){return[{label:t("CONFIGMAP_PL"),value:"configMaps"},{label:t("SECRET_PL"),value:"secrets"}]}},{key:"options",get:function(){var e=this.props,t=e.configMaps,a=e.secrets;return"configMaps"===this.state.tab?t.map((function(e){return{label:e.name,value:e.name}})):a.map((function(e){return{label:e.name,value:e.name}}))}},{key:"style",get:function(){var e=this.props,t=e.showModal,a=(0,e.getParentPosition)();return t?{top:a.y,left:"calc(".concat(a.x,"px - 12px)")}:{}}}]),r}(d.Component);a.default=b},function(e,t,a){e.exports={contentBox:"_3fu0cXTS6-8QAQs_DJTlw3",content:"_16xE4DVV_sWZ9H7S_Es45D",title:"_1aEnOXwYPEjPFMpZIZCIH4",tip:"_2zo3TJ4xDa-xQGLmdmJAZX",tabs:"_1uI7sdLkFlHd6bb1y0rgyj",subTitle:"DiD89TxExP31ZkyD20Jnm",allChoose:"Fg_gHEB2_RjJA7n2xThUV",select:"_1ibpdeUpiDUA7lh3JDj7SU",table:"_17sbwrk45iiciLmuuauJNz",innerBox:"_2Jw8cKyp5nGmQps7akPnIC",tableItem:"_2UF616YDFSnZNrttSww9aW",checked:"_1ktEr8__1sxlaBM9jyC2zQ",options:"_1Wjti9og2mC72XU2APvskI",scroll:"DHVShHP-NwtOgMhDs3KIG"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(84),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(85),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(84),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(193),r(17),r(85),r(7);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(26)),d=n(r(198)),p=n(r(63)),m=n(r(74)),h=n(r(800)),v=n(r(0)),g=n(r(1)),y=r(52),E=r(72),b=n(r(3)),_=r(186),O=n(r(1547)),S=n(r(867));function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t0){var u=n.includes("".concat(l));u&&e.setState({keyError:u},(function(){var a=t("DUPLICATE_KEYS");e.handleError({message:a})}))}},e.handleCfOrScChange=function(t){var a={name:e.props.value.name||"",valueFrom:(0,l.default)({},e.envType,{name:t||"",key:""})};e.validEnvKey(a.name,a),e.props.onChange(a)},e.handleError=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",a=e.props,r=a.handleKeyError,n=a.handleInputError;r(t),n(t)},e.checkNameRepeat=function(t){var a=e.props,r=a.arrayValue,n=a.index;return r.length>1&&r.filter((function(e,a){return e.name===t&&a!==n})).length>0},e.validEnvKey=(0,h.default)((function(a){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!E.PATTERN_ENV_NAME.test(a),l=e.checkNameRepeat(a),u=(0,d.default)(r,"valueFrom")?(0,p.default)(r.valueFrom):""===r.value;if(""===a&&u)e.handleError(),e.setState({keyError:!1});else{if(l){var o=t("DUPLICATE_KEYS");e.handleError({message:o})}else if(n){var i=""!==a?t("ENVIRONMENT_INVALID_TIP"):t("ENVIRONMENT_CANNOT_BE_EMPTY");e.handleError({message:i})}else e.handleError();e.setState({keyError:n||l})}}),300),e.handleValueChange=(0,h.default)((function(t){var a=t.name,r=t.value;""===a&&""===r?(e.props.handleKeyError(),e.props.handleInputError(),e.setState({keyError:!1})):e.validEnvKey(a,{value:r})}),300),e.handleTypeChange=function(t){var a=e.props,r=a.value,n=a.onChange;e.setState({envType:t,keyError:""},(function(){n("customization"!==t?{name:r.name||"",valueFrom:(0,l.default)({},t,{name:"",key:""})}:{name:r.name||"",value:""}),""===r.name&&e.handleError()}))},e.renderConfigOrSecret=function(){var a=e.props.value,r=void 0===a?{}:a,n=e.state.keyError,u=e.parseValue(r.valueFrom),o=u.resourceType,i=u.resourceName,c=u.resourceKey,s={name:r.name,resource:i,resourceKey:c};return v.default.createElement(S.default,{value:s,onChange:e.handleChange},v.default.createElement("div",{className:O.default.typeBox},v.default.createElement(_.Select,{options:e.resourceOptions,onChange:e.handleTypeChange,value:e.envType})),v.default.createElement(_.Input,{name:"name",placeholder:t("KEY"),className:(0,b.default)((0,l.default)({},O.default.formError,n)),onChange:function(t){return e.validEnvKey(t,r)}}),v.default.createElement(_.Select,{name:"resource",placeholder:t("RESOURCE"),prefixIcon:v.default.createElement(_.Icon,{name:"configMapKeyRef"===e.envType?"hammer":"key"}),options:e.getConfigOrSecretOptions,onChange:e.handleCfOrScChange}),v.default.createElement(_.Select,{name:"resourceKey",placeholder:t("KEY_IN_RESOURCE"),options:e.getKeysOptions({resourceType:o,resourceName:i}),onChange:e.handleKeyData}))},e}return(0,o.default)(r,[{key:"componentDidMount",value:function(){this.updateCheckStatus()}},{key:"parseValue",value:function(e){var t=(0,d.default)(e,"configMapKeyRef")?"configMapKeyRef":"secretKeyRef";return{resourceType:t,resourceName:(0,f.default)(e,"".concat(t,".name"),""),resourceKey:(0,f.default)(e,"".concat(t,".key"),"")}}},{key:"getKeysOptions",value:function(e){var t,a=e.resourceType,r=e.resourceName,n=this.props,l=n.configMaps,u=n.secrets;return"configMapKeyRef"===a?t=l.find((function(e){return e.name===r})):"secretKeyRef"===a&&(t=u.find((function(e){return e.name===r}))),t?Object.keys(t.data||{}).map((function(e){return{label:e,value:e}})):[]}},{key:"render",value:function(){var e=this,a=this.props,r=a.value,n=void 0===r?{}:r,u=a.onChange,o=this.state.keyError;return n.valueFrom?this.renderConfigOrSecret():v.default.createElement(S.default,{value:n,onChange:u},v.default.createElement("div",{className:O.default.typeBox},v.default.createElement(_.Select,{options:this.resourceOptions,onChange:this.handleTypeChange,value:this.envType})),v.default.createElement(_.Input,{name:"name",placeholder:t("KEY"),className:(0,b.default)((0,l.default)({},O.default.formError,o)),onChange:function(t){return e.validEnvKey(t,n)}}),v.default.createElement(_.Input,{name:"value",placeholder:t("VALUE"),onChange:function(){return e.handleValueChange(n)}}))}},{key:"envType",get:function(){var e=this.state.envType,t=this.props.value,a=t.valueFrom&&Object.keys(t.valueFrom)[0];return a||e}},{key:"resourceOptions",get:function(){return[{label:t("CUSTOM"),value:"customization"},{label:t("FROM_CONFIGMAP"),value:"configMapKeyRef"},{label:t("FROM_SECRET"),value:"secretKeyRef"}]}},{key:"getConfigOrSecretOptions",get:function(){var e=this.props,t=e.configMaps,a=e.secrets;return"configMapKeyRef"===this.envType?t.map((function(e){return{label:(0,y.getDisplayName)(e),value:e.name}})):a.map((function(e){return{label:(0,y.getDisplayName)(e),value:e.name}}))}}]),r}(v.default.Component);a.default=N,N.propTypes={value:g.default.object,onChange:g.default.func,configMaps:g.default.array,secrets:g.default.array},N.defaultProps={name:"",value:{},onChange:function(){},configMaps:[],secrets:[]}},function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(11),a(6),a(28),a(34),a(15),a(9),a(13),a(10),a(4),a(7);var l=n(a(30)),u=n(a(58)),o=n(a(96)),i=r(a(0)),c=a(186),s=n(a(3)),f=n(a(2304));function d(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}var p=function(e){var t=e.children,a=e.className,r=e.text,n=e.dataTest,p=e.onOK,m=e.modalHeight,h=(0,i.useRef)(),v=(0,i.useState)(!1),g=(0,o.default)(v,2),y=g[0],E=g[1],b=(0,i.useState)({x:"100%",y:"100%",y1:0,height:32}),_=(0,o.default)(b,2),O=_[0],S=_[1],C=function(){E(!y)},D=t.props,k=D.className,N=(0,u.default)(D,["className"]),T=i.default.cloneElement(t,function(e){for(var t=1;t0?l-u:l-12,y1:a+7,height:r})),E(!y)},"data-test":n},r),i.default.createElement("div",{className:(0,s.default)(f.default.triangle,(0,l.default)({},f.default.showModal,y)),style:{top:O.y1,left:O.x}}))};t.default=p},function(e,t,a){e.exports={buttonModalBox:"_2_csTIElkvsBzjHdoPar-Y",modal:"_20nMOVrlzEe8lRAHGp8Ka7",triangle:"_2_7O7g-y-zVcwFvGHPcxyz",showModal:"_18GWZH_n37uqfC9dcmi96j"}},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(18),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(18),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(7);var l,u,o,i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(239),v=n(r(1)),g=n(r(3)),y=n(r(135)),E=r(186),b=n(r(828)),_=n(r(2306)),O=n(r(1549)),S=n(r(2307));function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var k=[{value:"http",desc:"HTTP_REQUEST"},{value:"command",desc:"COMMAND"},{value:"tcp",desc:"TCP_PORT"}],N=(0,h.observer)((o=u=function(e){(0,f.default)(r,e);var a=D(r);function r(e){var t;return(0,c.default)(this,r),(t=a.call(this,e)).filterData=function(e){var a=t.state.checkerType,r=function(e){for(var t=1;t0||(n.ImageDetail={image:i,secret:n.secret,logo:r,short_description:u},n.getImageDetail(n.ImageDetail))}}),800,{leading:!0,trailing:!1}),n.getImageDetailNoCert=function(){n.getImageDetail(L(L({},n.ImageDetail),{},{insecure:!0}))},n.getImage=function(){var e=(0,c.default)(i.default.mark((function e(t){var a,r,l,u,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.image,r=t.insecure,l=t.tag,u=n.getImageParam(),n.setState({selectedLoading:!0}),e.next=5,n.store.getImageDetail(L({image:"".concat(a,":").concat(l||"lastest"),secret:n.secret,insecure:r},u));case 5:return o=e.sent,n.setState({selectedLoading:!1}),e.abrupt("return",o);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.getImageList=function(){var e=(0,c.default)(i.default.mark((function e(t){var a,r,l,u,c,s,f;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.imageName,r=t.insecure,l=t.page,u=(0,o.default)(t,["imageName","insecure","page"]),c=n.getImageParam(),s=a||n.image,e.next=5,n.store.getImageTagList(L(L({repository:s,insecure:r,page:l,secret:n.secret},u),c));case 5:return f=e.sent,u.more&&n.setState({imageTagList:f}),e.abrupt("return",f);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.getImageDetail=(0,b.default)(function(){var e=(0,c.default)(i.default.mark((function e(t){var a,r,l,u,o,c,s,f;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.image,r=t.insecure,l=t.secret,a&&!n.isUnMounted){e.next=3;break}return e.abrupt("return");case 3:if(n.image=a,n.setState({isLoading:!0}),u=n.getImageParam(),o=n.getTag(a),c=o.imageName,!(s=o.tag)||"latest"===s){e.next=15;break}return e.next=10,n.store.getImageDetail(L(L({image:"".concat(c,":").concat(s),insecure:r},u),{},{secret:l}));case 10:f=e.sent,n.store.updateTagList({data:[s],total:1,limit:Number(u.limit)||10,page:Number(u.page)||1,isLoading:!1}),n.setState({isLoading:!1,selectedImageTag:s,selectedImage:L(L({},f),{},{image:"".concat(c,":").concat(s)})},(function(){(0,C.default)(n.props.formTemplate,"image",n.state.selectedImage.image),n.context.setImageDetail&&n.context.setImageDetail(n.state.selectedImage)})),e.next=18;break;case 15:return e.next=17,n.getImageList(L({imageName:c,page:1},u));case 17:n.setState({selectedImage:void 0,selectedImageTag:"",isLoading:!1});case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),800,{leading:!0,trailing:!1}),n.renderWaringText=function(){return v.default.createElement("p",null,t("IGNORE_CERT_WARN_DESC"))},n.onSelectImageTag=(0,S.default)(function(){var e=(0,c.default)(i.default.mark((function e(t){var a,r,l,u,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.setState({selectedImageTag:t}),a=n.image,r=n.getTag(a),l=r.imageName,u="".concat(l,":").concat(t),e.next=6,n.getImage({image:l,tag:t});case 6:o=e.sent,(0,C.default)(n.props.formTemplate,"image",u),n.setState({selectedImage:L(L({},o),{},{image:u})},(function(){n.context.setImageDetail&&n.context.setImageDetail(n.state.selectedImage)}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),300,{leading:!1,trailing:!0}),n.renderWaringText=function(){return v.default.createElement("p",null,t("IGNORE_CERT_WARN_DESC"))},n.renderSelectedContent=function(){if(n.state.isLoading)return v.default.createElement(N.Loading,null,v.default.createElement("div",{className:A.default.selectedContent}));var e=n.state,a=e.selectedImage,r=e.selectedImageTag,l=e.selectedLoading,u=(0,y.toJS)(n.store.tagList);if((0,O.default)(a)){var o=a.message;if("failed"===a.status)return o&&o.includes("x509")?v.default.createElement("div",{className:(0,k.default)(A.default.selectedContent,A.default.emptyContent)},v.default.createElement(N.Icon,{name:"docker",className:A.default.icon}),v.default.createElement("p",{className:A.default.desc},t("CERT_ERROR"),v.default.createElement(N.Tooltip,{content:n.renderWaringText},v.default.createElement("span",{className:A.default.textConfirm,onClick:n.getImageDetailNoCert},t("IGNORE_AND_RETRY"))))):v.default.createElement("div",{className:(0,k.default)(A.default.selectedContent,A.default.emptyContent)},v.default.createElement("div",null,v.default.createElement(N.Icon,{name:"docker",className:A.default.icon}),v.default.createElement("p",{className:A.default.desc},t("NO_IMAGE_FOUND"))));var i=a.image,c=a.createTime,s=a.exposedPorts,f=void 0===s?[]:s,d=a.logo,p=a.short_description,m=i.indexOf("/")>-1?i.split("/")[0]:"docker.io",h=f.join("; "),g=o||p;return v.default.createElement(v.default.Fragment,null,v.default.createElement("div",{className:A.default.selectedContent},v.default.createElement(N.Loading,{spinning:l},v.default.createElement("div",{className:A.default.selectedImageInfo},v.default.createElement("div",{className:A.default.selectedInfo},v.default.createElement("img",{className:A.default.logo,src:d||"/assets/no_img.svg",alt:i}),v.default.createElement("div",{className:A.default.imageInfo},v.default.createElement("p",null,i),v.default.createElement("p",null,t("IMAGE_TIME_SIZE_LAYER",{time:(0,D.default)(c).fromNow()})))),v.default.createElement("div",{className:A.default.selectedInfo},v.default.createElement(N.Icon,{name:"port",className:A.default.icon}),v.default.createElement("div",{className:A.default.imageInfo},v.default.createElement("p",null,h||t("NO_DEFAULT_PORT")),v.default.createElement("p",null,t("PORT")))),v.default.createElement("div",{className:A.default.selectedInfo},v.default.createElement(N.Icon,{name:"docker",className:A.default.icon}),v.default.createElement("div",{className:A.default.imageInfo},v.default.createElement("p",null,m),v.default.createElement("p",null,t("REGISTRY")))))),g?v.default.createElement("div",{className:A.default.message},g):null,v.default.createElement(P.default,{onSelectImageTag:n.onSelectImageTag,selectedImageTag:r,tagList:u,getImageList:n.getImageList})))}return u.data.length>0?v.default.createElement(P.default,{onSelectImageTag:n.onSelectImageTag,selectedImageTag:r,tagList:(0,y.toJS)(n.store.tagList),getImageList:n.getImageList}):v.default.createElement("div",{className:(0,k.default)(A.default.selectedContent,A.default.emptyContent)},v.default.createElement("div",null,v.default.createElement(N.Icon,{name:"docker",className:A.default.icon}),v.default.createElement("p",{className:A.default.desc},t("SET_IMAGE_DESC"))))},n.imageRequiredValidator=function(e,a,r){if((0,_.default)(a))return r({message:t("IMAGE_EMPTY")});r()},n.store=e.isEdgeWize?new I.default:new w.default,n.getImageDetail=(0,S.default)(n.getImageDetail,1e3),n.state={isLoading:!1,selectedImage:void 0,selectedImageTag:void 0,selectedLoading:!1},n}return(0,d.default)(r,[{key:"componentDidMount",value:function(){var e,t,a=this,r=this.props,n=r.formTemplate,l=r.imageRegistries,u=(0,E.default)(n,"image",""),o=(null!==(e=null===(t=l.find((function(e){return e.value===a.secret})))||void 0===t?void 0:t.url)&&void 0!==e?e:"").replace(/^(http(s)?:\/\/)?(.*)$/,"$3");u&&u!==o&&this.getImageDetail({image:u,secret:this.secret})}},{key:"componentWillUnmount",value:function(){this.isUnMounted=!0}},{key:"render",value:function(){var e=t.html("IMAGE_DESC",{link:(0,T.getDocsUrl)("imageregistry")});return v.default.createElement(v.default.Fragment,null,v.default.createElement(N.Form.Item,{label:t("IMAGE"),desc:(0,T.learnMoreTip)(e),rules:[{pattern:R.PATTERN_IMAGE,message:t("INVALID_IMAGE")},{validator:this.imageRequiredValidator}]},v.default.createElement(M.default,(0,u.default)({},this.props,{store:this.store,onEnter:this.handleEnter,name:"image",onLoading:this.handleLoadingChange}))),globals.config.enableImageSearch&&this.renderSelectedContent())}},{key:"secret",get:function(){var e=this.props,t=e.imageRegistries,a=e.formTemplate,r=t.find((function(e){return e.isDefault}));return(0,E.default)(a,"pullSecret",(null==r?void 0:r.value)||"")}}]),r}(v.Component);a.default=U,U.defaultProps={className:"",type:"add"},U.contextTypes={forceUpdate:g.default.func,setImageDetail:g.default.func}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(31),r(86),r(18),r(320),r(16),r(27),r(4),r(22),r(196),r(23),r(139),r(24),r(17),r(64),r(188),r(136),r(75),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(31),r(86),r(18),r(320),r(42),r(16),r(27),r(4),r(22),r(196),r(23),r(57),r(139),r(251),r(24),r(252),r(17),r(64),r(188),r(75);var l=n(r(61)),u=n(r(30)),o=n(r(43));r(41);var i=n(r(44)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=n(r(1)),v=n(r(26)),g=n(r(74)),y=n(r(63)),E=n(r(3)),b=r(186),_=n(r(2315)),O=n(r(2317)),S=n(r(1550));function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var D=function(e){(0,f.default)(r,e);var a=C(r);function r(e){var n;(0,c.default)(this,r),(n=a.call(this,e)).handleDOMClick=function(e){n.dropContentRef&&n.dropContentRef.current&&!n.dropContentRef.current.contains(e.target)&&n.hideContent()},n.showContent=function(e){e.stopPropagation(),n.setState({visible:!0},(function(){document.addEventListener("click",n.handleDOMClick),"dockerHub"!==n.hubType&&n.fetchHarborList("",n.state.harborData)}))},n.hideContent=function(){"dockerHub"!==n.hubType&&n.setState({harborList:[]}),n.setState({visible:!1},(function(){document.removeEventListener("click",n.handleDOMClick)}))},n.handleDetailRedirect=function(e){var t=e.currentTarget.dataset.image;window.open("https://hub.docker.com/_/".concat(t))},n.handleSecretChange=function(e){if(e){var t=n.props.imageRegistries.filter((function(t){return t.value===e}))[0];n.setState({harborData:t})}var a=n.props.formTemplate;(0,g.default)(a,"pullSecret",e),n.props.onChange(n.registryUrl)},n.handleInputChange=function(e,t){var a=t;n.registryUrl&&(a="".concat(n.registryUrl,"/").concat(t).replace(/\/+/g,"/")),a=a.replace(/\s+/g,""),n.props.onChange(a),n.context.setImageDetail&&n.context.setImageDetail({image:a})},n.handleKeyUp=function(e){13===e.keyCode&&n.handleConfirm()},n.handleConfirm=function(){n.imageName&&n.props.onEnter()},n.handleDockerImageSelected=function(){var e=(0,i.default)(o.default.mark((function e(t){var a,r,l,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=t.currentTarget.dataset,r=a.image,l=a.logo,u=a.short_description,n.props.onChange(r),n.hideContent(),n.props.onEnter({logo:l,short_description:u});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.handleHarborImageSelected=function(){var e=(0,i.default)(o.default.mark((function e(t){var a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a="".concat(t.repository_name),"","",n.props.onChange("".concat(n.registryUrl,"/").concat(a)),n.hideContent(),n.props.onEnter({logo:"",short_description:""});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.handleSearchDockerHub=function(e){n.fetchDockerList(e)},n.handleSearchHarbor=function(e){n.fetchHarborList(e,n.state.harborData)},n.fetchDockerList=function(){var e=(0,i.default)(o.default.mark((function e(t){var a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.setState({isLoading:!0}),e.next=3,n.store.getDockerImagesLists({q:t||"",image_filter:t?void 0:"official",page_size:50,type:"image"}).finally((function(){!n.isUnMounted&&n.setState({isLoading:!1})}));case 3:a=e.sent,!n.isUnMounted&&n.setState({dockerList:(0,v.default)(a,"summaries",[])});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.fetchHarborList=function(){var e=(0,i.default)(o.default.mark((function e(t,a){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,v.default)(a,"url")&&!(0,y.default)(a)){e.next=3;break}return e.abrupt("return");case 3:return n.setState({isLoading:!0}),e.next=6,n.store.getHarborImagesLists({harborData:a,params:{q:t||""}}).finally((function(){!n.isUnMounted&&n.setState({isLoading:!1})}));case 6:r=e.sent,!n.isUnMounted&&n.setState({harborList:(0,v.default)(r,"repository",[])});case 8:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}(),n.renderContent=function(){return n.state.visible?m.default.createElement("div",{className:(0,E.default)(S.default.dropContent,(0,u.default)({},S.default.dropContent_hide,!n.state.visible)),ref:n.dropContentRef},m.default.createElement("div",{className:S.default.header},m.default.createElement(b.InputSearch,{className:S.default.search,onSearch:"dockerHub"===n.hubType?n.handleSearchDockerHub:n.handleSearchHarbor,placeholder:t("SEARCH")}),n.state.isLoading&&m.default.createElement(b.Loading,{className:"float-left",size:28})),"dockerHub"===n.hubType?n.renderDockerList():n.renderHarborList()):null};var l=n.props.imageRegistries,s="harbor"===n.hubType?l.find((function(e){return e.value===n.secretValue})):{};return n.state={dockerList:[],harborList:[],harborData:s,visible:!1,isLoading:!1},n.store=e.store,n.dropContentRef=m.default.createRef(),n.isUnMounted=!1,n}return(0,s.default)(r,[{key:"componentDidMount",value:function(){"Edit"!==this.props.type&&""!==this.secretValue&&this.handleSecretChange(this.secretValue),"dockerHub"===this.hubType&&this.fetchDockerList(),"harbor"===this.hubType&&this.fetchHarborList("",this.state.harborData)}},{key:"componentWillUnmount",value:function(){this.isUnMounted=!0,document.removeEventListener("click",this.handleDOMClick)}},{key:"renderDockerList",value:function(){var e=this;return(0,y.default)(this.state.dockerList)?m.default.createElement("ul",{className:S.default.listContent},m.default.createElement("div",{className:(0,E.default)(S.default.selectedContent,S.default.emptyContent)},m.default.createElement("div",null,m.default.createElement(b.Icon,{name:"docker",className:S.default.icon}),m.default.createElement("p",{className:S.default.desc},t("NO_IMAGE_FOUND"))))):m.default.createElement("ul",{className:S.default.listContent},this.state.dockerList.map((function(t){return m.default.createElement("li",{className:S.default.ImageItem,key:t.name},m.default.createElement("img",{src:(0,v.default)(t,"logo_url.large")||"/assets/no_img.svg",alt:t.name}),m.default.createElement("div",{className:S.default.info},m.default.createElement("p",{onClick:e.handleDockerImageSelected,className:S.default.clickable,"data-image":t.slug,"data-logo":(0,v.default)(t,"logo_url.large",""),"data-short_description":t.short_description},t.name),m.default.createElement("p",null,t.short_description)),m.default.createElement("div",{className:S.default.starContainer},m.default.createElement(b.Icon,{className:S.default.star,name:"star"}),t.star_count),m.default.createElement("div",{className:S.default.actions},m.default.createElement("span",{className:S.default.clickable,onClick:e.handleDetailRedirect,"data-image":t.slug},m.default.createElement(b.Icon,{name:"paper",size:16,changeable:!0})),m.default.createElement("span",{className:S.default.clickable,onClick:e.handleDockerImageSelected,"data-image":t.slug,"data-logo":(0,v.default)(t,"logo_url.large",""),"data-short_description":t.short_description},m.default.createElement(b.Icon,{name:"check",size:16,changeable:!0}))))})))}},{key:"renderHarborList",value:function(){var e=this;return(0,y.default)(this.state.harborList)?m.default.createElement("ul",{className:S.default.listContent},m.default.createElement("div",{className:(0,E.default)(S.default.selectedContent,S.default.emptyContent)},m.default.createElement("div",null,m.default.createElement(b.Icon,{name:"docker",className:S.default.icon}),m.default.createElement("p",{className:S.default.desc},t("NO_IMAGE_FOUND"))))):m.default.createElement("ul",{className:S.default.listContent},this.state.harborList.map((function(t){return m.default.createElement("li",{className:S.default.ImageItem,key:t.repository_name},m.default.createElement("img",{src:"/assets/no_img.svg",alt:t.repository_name}),m.default.createElement("div",{className:S.default.info},m.default.createElement("p",{onClick:function(a){return e.handleHarborImageSelected(t,a)},className:S.default.clickable},t.repository_name)),m.default.createElement("div",{className:S.default.actions},m.default.createElement("span",{className:S.default.clickable,onClick:function(a){return e.handleHarborImageSelected(t,a)}},m.default.createElement(b.Icon,{name:"check",size:16,changeable:!0}))))})))}},{key:"render",value:function(){var e=this;return m.default.createElement(m.default.Fragment,null,m.default.createElement(O.default,{className:S.default.imageInput,onChange:this.handleInputChange,value:this.imageName,autoComplete:"off",placeholder:this.secretValue?"nginx:latest":t("IMAGE_PLACEHOLDER"),onBlur:this.handleConfirm,onKeyUp:this.handleKeyUp},m.default.createElement(_.default,{value:this.secretValue,className:S.default.secretSelect,options:this.secretsOptions,onChange:this.handleSecretChange,disabled:this.secretsOptions.length<=1})),"others"===this.hubType||globals.config.enableImageSearch?m.default.createElement(b.Icon,{name:"templet",changeable:!0,className:S.default.dropDownIcon,onClick:function(t){return e.showContent(t)}}):null,this.renderContent())}},{key:"defaultImage",get:function(){return this.props.imageRegistries.find((function(e){return e.isDefault}))}},{key:"secretValue",get:function(){var e,t=this.props,a=t.formTemplate;return"Edit"===t.type?(0,v.default)(a,"pullSecret",""):(0,v.default)(a,"pullSecret",(null===(e=this.defaultImage)||void 0===e?void 0:e.value)||"")}},{key:"hubType",get:function(){return this.registryUrl.indexOf("docker.io")>=0||""===this.secretValue?"dockerHub":this.secretValue&&this.registryUrl.indexOf("docker.io")<0?"harbor":"others"}},{key:"registryUrl",get:function(){var e=this,t=this.props.imageRegistries;if(!(0,y.default)(t)&&this.secretValue){var a=t.find((function(t){return t.value===e.secretValue})),r=(0,v.default)(a,"url","");if(r)return r=(r=r.replace(/^(http(s)?:\/\/)?(.*)$/,"$3")).split("/")[0]}return""}},{key:"imageName",get:function(){var e=this.props.value;if(e.startsWith(this.registryUrl)){var t=new RegExp("".concat(this.registryUrl,"(/)?"));return e.replace(t,"")}return e}},{key:"secretsOptions",get:function(){var e=this.props.imageRegistries.map((function(e){return{label:e.label,value:e.value,url:e.url,isDefault:e.isDefault}}));return[{label:"Docker Hub",value:"",url:"",isDefault:!this.defaultImage}].concat((0,l.default)(e)).sort((function(e,t){return Number(!!t.isDefault)-Number(!!e.isDefault)}))}}]),r}(m.default.Component);a.default=D,D.contextTypes={setImageDetail:h.default.func},D.defaultProps={imageRegistries:[],className:"",value:"",onChange:function(){}}},function(e,a,r){"use strict";r(15);var n=r(20);r(11),r(31),r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(11),r(31),r(18),r(42),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(800)),m=n(r(63)),h=n(r(158)),v=n(r(837)),g=n(r(3)),y=r(186),E=n(r(2316));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var _=function(e){(0,i.default)(r,e);var a=b(r);function r(e){var t;return(0,u.default)(this,r),(t=a.call(this,e)).triggerChange=(0,p.default)((function(){(0,t.props.onChange)(t.state.value)})),t.handleClick=function(e){t.setState({value:e,showOptions:!1},(function(){t.triggerChange()}))},t.toggleShowOptions=function(){t.setState({showOptions:!t.state.showOptions})},t.handleShowOptions=function(){t.setState({showOptions:!0})},t.handleHideOptions=function(){t.setState({showOptions:!1})},t.state={value:(0,h.default)(e.value)?e.defaultValue:e.value,showOptions:!1},t.optionsRef=f.default.createRef(),t}return(0,o.default)(r,[{key:"renderOption",value:function(e,a){var r=this;return f.default.createElement("div",{key:e.uid||e.value,onClick:function(){return r.handleClick(e.value)},className:(0,g.default)(E.default.option,(0,l.default)({},E.default.selected,a))},f.default.createElement("div",{className:E.default.optionCol},f.default.createElement("span",{className:E.default.optionLabel},e.label),e.isDefault&&f.default.createElement("span",{className:E.default.defaultTag},t("DEFAULT"))),f.default.createElement("p",null,e.url))}},{key:"renderOptions",value:function(){var e=this,t=this.props,a=t.options,r=t.disabled,n=this.state.value;if(r||(0,m.default)(a))return null;var l=a.find((function(e){return(0,v.default)(e.value,n)}));return f.default.createElement("div",{className:E.default.options},l&&this.renderOption(l,!0),a.filter((function(e){return!(0,v.default)(e.value,n)})).map((function(t){return e.renderOption(t)})))}},{key:"renderControl",value:function(){var e=this.props,t=e.value,a=e.defaultValue,r=e.placeholder,n=e.options,u=e.disabled,o=t||a,i=n.find((function(e){return(0,v.default)(e.value,o)}))||r||{};return f.default.createElement("div",{className:E.default.control},f.default.createElement("span",{className:E.default.label},i.label),!u&&f.default.createElement(y.Icon,{className:(0,g.default)(E.default.rightIcon,(0,l.default)({},E.default.rightIcon_toggle,this.state.showOptions)),name:"chevron-down",size:20}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.disabled;return f.default.createElement("div",{className:(0,g.default)(E.default.wrapper,(0,l.default)({},E.default.disabled,a),t),onClick:this.toggleShowOptions},f.default.createElement(y.Dropdown,{closeAfterClick:!1,visible:this.state.showOptions,onOpen:this.handleShowOptions,onClose:this.handleHideOptions,content:this.renderOptions()},this.renderControl()))}}]),r}(f.default.Component);a.default=_,_.propTypes={className:d.default.string,value:d.default.any,defaultValue:d.default.any,options:d.default.array.isRequired,onChange:d.default.func},_.defaultProps={className:"",defaultValue:"",options:[],onChange:function(){}}},function(e,t,a){e.exports={wrapper:"S_heeB_hWWpcU9iQV27vw",disabled:"_1aEV1eGRRlcxgiiUgzDi4t",control:"_3VHbJcAvcKO3wpbr1S6Nax",options:"_3xbjYC08sAusjBLLYYmR10",label:"_1O8-tjKxx-KQjGqUDhfVTm",rightIcon:"_2KGD9mmPPR7LoALKbTXcqH",rightIcon_toggle:"_300TNQVWjbgMrbsLWW7bIU",selected:"_1pwHXZgl5FXdbBPslY8RjQ",option:"_13sntOU00zu8UIQHzr2jVu",optionCol:"Fk2RtFUjO7CJPWmtz7pYR",optionLabel:"FoyZHugIgAhtpqKQ65mpA",defaultTag:"_1j6G6ToUdFdTGLih7mSwsc"}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var l=n(a(315)),u=n(a(30)),o=n(a(58)),i=n(a(36)),c=n(a(37)),s=n(a(55)),f=n(a(56)),d=n(a(51)),p=r(a(0)),m=n(a(1)),h=n(a(3)),v=n(a(194)),g=n(a(189)),y=n(a(455)),E=n(a(2318));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var _=function(e){(0,s.default)(a,e);var t=b(a);function a(e){var r;return(0,i.default)(this,a),(r=t.call(this,e)).focus=function(){r.node.focus()},r.blur=function(){r.node.blur()},r.handleChange=function(e){var t=e.target.value,a=r.props,n=a.value,l=a.onChange,u=n||t;r.setState({value:u}),l!==y.default&&l(e,t)},r.handleKeyDown=function(e){var t=r.props,a=t.onPressEnter,n=t.onKeyDown;13===e.keyCode&&a&&a(e),n&&n(e)},r.state={value:String(e.value||e.defaultValue),isFocus:!1},r}return(0,c.default)(a,[{key:"render",value:function(){var e=this,t=this.props,a=t.className,r=t.size,n=t.disabled,i=t.children,c=(0,o.default)(t,["className","size","disabled","children"]),s=this.state.value;return p.default.createElement("span",{className:(0,h.default)(E.default.input,a,(0,u.default)({},"is-".concat(r),r))},i,p.default.createElement("input",(0,l.default)({},(0,g.default)(c,"schemas","onKeyDown","onPressEnter","onChange","value","defaultValue","validateStatus","validateHelp","validateIcon","validateOnChange","validateOnBlur"),{disabled:(0,v.default)(n)?n():n,onKeyDown:this.handleKeyDown,onChange:this.handleChange,value:s,ref:function(t){e.node=t},"data-test":"imageSearch"})),p.default.createElement("span",{className:(0,h.default)(E.default.border,"input")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return"value"in e&&e.value!==t.value?{value:e.value}:null}}]),a}(p.PureComponent);_.propTypes={name:m.default.string,type:m.default.string,className:m.default.string,size:m.default.oneOf(["small","default","large"]),value:m.default.oneOfType([m.default.string,m.default.number]),defaultValue:m.default.oneOfType([m.default.string,m.default.number]),disabled:m.default.oneOfType([m.default.bool,m.default.func]),onChange:m.default.func,onPressEnter:m.default.func,onKeyDown:m.default.func},_.defaultProps={type:"text",size:"default",disabled:!1,onChange:y.default,onPressEnter:y.default,onKeyDown:y.default,defaultValue:""};var O=_;t.default=O},function(e,t,a){e.exports={input:"_3vEQEMHbKh8LmE9d-auvSs",border:"_1UKB-z9KeXbZ9cQ3YQrnb2","is-small":"TnU7NSMR7wf7uCvk9WTBN",icon:"-ImUGeX33ECFh2FmuR9Z4","is-default":"_1o8YS1PIPm0_aFGs2NPwvr","is-large":"_3R2fJgdHmL4vLxJtTakF_B"}},function(e,t,a){"use strict";a(15);var r=a(20),n=a(157);a(18),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(18);var l=n(a(0)),u=a(186),o=r(a(863)),i=a(14),c=r(a(2322)),s=r(a(1551)),f=function(e){var t=e.selectedImageTag,a=e.onSelectImageTag,r=e.getImageList,n=e.tagList,f=(0,l.useCallback)((function(e){a(e)}),[]),d=n||{},p=d.data,m=d.page,h=d.total,v=d.isLoading;return l.default.createElement("div",{className:s.default.content},l.default.createElement(u.RadioGroup,{wrapClassName:1===h?s.default.radioOnlyOneListContent:s.default.radioListContent,onChange:f,value:t},l.default.createElement(o.default,{className:s.default.radioList,data:(0,i.toJS)(p),page:m,total:h,loading:v,noMount:!0,onFetch:r},p.map((function(e){return l.default.createElement(u.Radio,{value:e,key:e},l.default.createElement(c.default,{tag:e,selectedImageTag:t}))})))))};t.default=f},function(e,t,a){e.exports={wrapper:"Fxc1J8GJ2h6_Qd-n9BxZg",content:"_3DotkGf2uSTDa1JBsYdIsb"}},function(e,t,a){e.exports={wrapper:"_1HH_wApq9OB2Afiw8FUQG5",main:"_3Z6raG0G-fxugjFdD2je6J",content:"_2yXgC1SbTsHsrlUb6aUTxo",loadMore:"_33OcD9PenJa0VjGHcOD-aD",empty:"_2sZpot3ZfCOM9QHB7RXOkx"}},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(30)),l=r(a(0)),u=a(186),o=r(a(3)),i=r(a(1551)),c=function(e){var t=e.tag,a=e.selectedImageTag;return l.default.createElement("div",{className:(0,o.default)(i.default.imageTagDetailItem,(0,n.default)({},i.default.checked,t===a))},l.default.createElement(u.Icon,{name:"tag",className:i.default.icon,size:20,type:t===a?"light":"dark"}),l.default.createElement("p",{className:i.default.tagName},t))};t.default=c},function(e,t,a){e.exports={message:"_3obsx3JGHNcPFHM89AsInE",imageSearch:"_1OhvKXsP4kv0J873sFRM-g",columns:"aQZPHiJZpM_2WxHh0UHol",type:"_2LIGHzmFbBVhNOoFy_Ed-j"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(2325)),p=n(r(1552)),m=n(r(1553)),h=n(r(2330));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var g=function(e){(0,o.default)(r,e);var a=v(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement(f.Form.Group,{label:t("CONTAINER_SECURITY_CONTEXT"),desc:t("CONTAINER_SECURITY_CONTEXT_DESC"),checkable:!0},s.default.createElement(d.default,null),s.default.createElement(p.default,null),s.default.createElement(m.default,null),s.default.createElement(h.default,null))}}]),r}(s.default.PureComponent);a.default=g},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(1099)),p=n(r(2327));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var h=function(e){(0,o.default)(r,e);var a=m(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement("div",{className:"margin-b12"},s.default.createElement("div",{className:p.default.title},t("ACCESS_CONTROL")),s.default.createElement("div",{className:p.default.content},s.default.createElement(f.Form.Item,null,s.default.createElement(d.default,{name:"".concat(this.prefix,".privileged"),title:t("PRIVILEGED_MODE"),description:t("PRIVILEGED_MODE_DESC")})),s.default.createElement(f.Form.Item,null,s.default.createElement(d.default,{name:"".concat(this.prefix,".allowPrivilegeEscalation"),title:t("ALLOW_PRIVILEGE_ESCALATION"),description:t("ALLOW_PRIVILEGE_ESCALATION_DESC")})),s.default.createElement(f.Form.Item,null,s.default.createElement(d.default,{name:"".concat(this.prefix,".readOnlyRootFilesystem"),title:t("ROOT_DIRECTORY_READONLY"),description:t("ROOT_DIRECTORY_READONLY_DESC")}))))}},{key:"prefix",get:function(){return this.props.prefix||"securityContext"}}]),r}(s.default.Component);a.default=h},function(e,t,a){e.exports={wrapper:"_15WzUlcoLloZykJlZj0Apo",text:"_1FbvXHTu2eI1KD5ONd5HH0"}},function(e,t,a){e.exports={title:"xiiGbS5phbPetinkKktv5",content:"_3MKZeMiqNiY37e6ZT3uCbc"}},function(e,t,a){e.exports={title:"_93bRvqjERHRqTzbtsZ3hA",content:"ALf6y5a4svCrpH2U0yUs8"}},function(e,t,a){e.exports={title:"_3mzDzs1cbhNCB3Q4DZTkCL",content:"_2BaVtn2VyGgZ9YmDM_znzH"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(829)),p=n(r(2331)),m=n(r(2332));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(r,e);var a=h(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement("div",{className:"margin-b12"},s.default.createElement("div",{className:m.default.title},t("CAPABILITIES")),s.default.createElement("div",{className:m.default.content},s.default.createElement(f.Form.Item,{label:t("ADD")},s.default.createElement(d.default,{name:"".concat(this.prefix,".capabilities.add")},s.default.createElement(p.default,null))),s.default.createElement(f.Form.Item,{label:t("DROP")},s.default.createElement(d.default,{name:"".concat(this.prefix,".capabilities.drop")},s.default.createElement(p.default,null)))))}},{key:"prefix",get:function(){return this.props.prefix||"securityContext"}}]),r}(s.default.Component);a.default=v},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(58)),l=r(a(0)),u=a(186),o=function(e){e.arrayValue,e.handleKeyError;var t=(0,n.default)(e,["arrayValue","handleKeyError"]);return l.default.createElement(u.Input,t)};t.default=o},function(e,t,a){e.exports={title:"K8wgjzWlByq5WsuMlI7Tf",content:"_3X53teLvKWLW3f9mdpe3jg"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(97),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(97),r(42),r(4),r(23),r(57),r(17);var l=n(r(61)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(26)),p=n(r(74)),m=r(186),h=n(r(2334));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=function(e){(0,i.default)(r,e);var a=v(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),o=0;o0?0:1}}),(function(){e.triggerChange()}))},e.stopPropagation=function(e){return e.stopPropagation()},e}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props.cluster,a=this.state.replicas,r=!!a;return d.default.createElement("div",{className:(0,p.default)(v.default.wrapper,(0,u.default)({},v.default.checked,r)),onClick:this.handleWrapperClick},d.default.createElement(h.Checkbox,{checked:r,onClick:this.handleWrapperClick},d.default.createElement("span",{title:e},e)),d.default.createElement("div",{className:v.default.replicas,onClick:this.stopPropagation},d.default.createElement(h.Icon,{name:"substract",type:"light",size:20,clickable:!0,disabled:!r,onClick:this.handleSubStract}),d.default.createElement("span",{className:v.default.value},a,d.default.createElement("span",null," ",1===a?t("REPLICA_LOW_SI"):t("REPLICA_LOW_PL"))),d.default.createElement(h.Icon,{name:"add",type:"light",size:20,clickable:!0,disabled:!r,onClick:this.handleAdd})))}}]),r}(d.Component);a.default=y},function(e,t,a){e.exports={wrapper:"_1mKVwkCL_1ppeUigF3KAKg",checked:"_3b5rXyVfHzVbq7BXgqnsUg",replicas:"_1q8JcEqV4JG13oRb9C3HI_",value:"_1GwFMwt-s5K68TjO9mYodk"}},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(5),r(18),r(16),r(27),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(16),r(27),r(4),r(23),r(57),r(24),r(193),r(17);var u,o,i,c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=l(r(0)),h=n(r(26)),v=n(r(74)),g=r(14),y=r(239),E=r(186),b=n(r(1)),_=n(r(2343)),O=n(r(2345));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var C=(0,y.observer)((i=o=function(e){(0,f.default)(r,e);var a=S(r);function r(){var e;(0,c.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u0&&void 0!==arguments[0]?arguments[0]:"";e.metaError=t},e.metaDataValidator=function(t,a,r){""===e.metaError&&r()},e}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement(s.default.Fragment,null,s.default.createElement(f.Form.Item,{label:t("ANNOTATION_PL"),rules:[{validator:this.metaDataValidator}]},s.default.createElement(d.default,{name:"spec.template.metadata.annotations",addText:t("ADD"),hiddenKeys:globals.config.preservedAnnotations,onError:this.handleMetaError})))}}]),r}(s.default.Component);a.default=m},function(e,t,a){e.exports={formTip:"_19f0EVWj1un4oHSHVFkfCG",tipLabel:"_1QFTfCmmiYYArD4XUdtrk3",tipBox:"_2TmZJA7LIvFo8yQBSA3Ay3",tipTitle:"_2mM1im5fQ7ZlOrtF10n8QH"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var u=l(r(36)),o=l(r(37)),i=l(r(55)),c=l(r(56)),s=l(r(51)),f=n(r(0)),d=l(r(1)),p=r(186),m=l(r(2357));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var v=function(e){(0,i.default)(r,e);var a=h(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&(i[0].volume=(0,g.default)(i[0].volume,r)),{newVolume:u,newMounts:[].concat((0,l.default)(o),(0,l.default)(i))}},t.handleTypeChange=function(e){t.setState({type:e})},t.formRef=p.default.createRef(),t.state={type:t.checkVolumeType(e.volume)||"exist",editVolume:{}},t}return(0,c.default)(r,[{key:"componentDidMount",value:function(){var e=this.props.onCancel,t=this.context.registerSubRoute;t&&t(this.handleSubmit,e),this.saveEditVolume()}},{key:"saveEditVolume",value:function(){var e=this.props.volume;if(!(0,v.default)(e)){var t=this.volumeTypeMap(Object.keys((0,g.default)(e,["name","volumeMounts"])));"exist"!==t?this.setState({editVolume:{name:e.name,type:t}}):this.setState({editVolume:{name:(0,y.default)(e,"specVolume.name",""),type:t}})}}},{key:"checkVolumeType",value:function(e){var t="exist";return(0,v.default)(e)||(e.emptyDir?t="temp":e.hostPath&&(t="host")),t}},{key:"renderContent",value:function(){var e,t=this.props,a=t.volume,r=t.volumes,n=t.containers,l=t.checkVolumeNameExist,u=t.collectSavedLog,o=a.name,i=(0,y.default)(a,"volumeMounts",[]);if("exist"===this.state.type){var c=(0,y.default)(a,"specVolume.name",!1);c&&(a.name=c)}else{var s=(0,y.default)(a,"name",!1);s&&(a.name=s,(0,E.default)(a,"specVolume.name",s))}switch(i.length>0&&a.volumeMounts.forEach((function(e){return(0,E.default)(e,"name",a.name)})),this.state.type){case"temp":e=p.default.createElement(C.default,{formRef:this.formRef,formData:a,currentName:o,containers:n,checkVolumeNameExist:l,collectSavedLog:u});break;case"host":e=p.default.createElement(D.default,{formRef:this.formRef,formData:a,currentName:o,containers:n,checkVolumeNameExist:l});break;default:case"exist":e=p.default.createElement(S.default,{formRef:this.formRef,formData:a,currentName:o,volumes:r,containers:n,collectSavedLog:u})}return e}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.contentClassName;return p.default.createElement("div",{className:(0,h.default)(k.default.wrapper,a)},p.default.createElement("div",{className:"h6"},p.default.createElement("a",{className:"custom-icon",onClick:this.handleGoBack},p.default.createElement(_.ReactComponent,null)),t("VOLUME_PL")),p.default.createElement("div",{className:(0,h.default)(k.default.contentWrapper,r)},p.default.createElement("div",{className:k.default.title},t("MOUNT_VOLUME")),p.default.createElement(b.RadioGroup,{mode:"button",value:this.state.type,onChange:this.handleTypeChange,size:"small"},p.default.createElement(b.RadioButton,{value:"exist"},t("PERSISTENT_VOLUME")),p.default.createElement(b.RadioButton,{value:"temp"},t("TEMPORARY_VOLUME")),p.default.createElement(b.RadioButton,{value:"host"},t("HOSTPATH_VOLUME"))),this.renderContent()))}}]),r}(p.default.Component);a.default=w,w.propTypes={className:m.default.string,containers:m.default.array,volume:m.default.object,onSave:m.default.func,onCancel:m.default.func},w.defaultProps={className:"",volume:{},containers:[],onSave:function(){},onCancel:function(){}},w.contextTypes={registerSubRoute:m.default.func,resetSubRoute:m.default.func}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(6),r(84),r(18),r(16),r(4),r(23),r(17),r(85),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(6),r(84),r(18),r(42),r(16),r(4),r(23),r(57),r(17),r(85),r(7);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(321)),f=n(r(63)),d=n(r(0)),p=n(r(3)),m=n(r(1)),h=r(186),v=n(r(816)),g=n(r(1042)),y=r(52),E=n(r(2365));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var _=function(e){(0,o.default)(r,e);var a=b(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,u=new Array(n),o=0;o0&&r.push(f.default.createElement("span",{key:"split-".concat(l),className:v.default.split},"/")),r.push(f.default.createElement("span",{key:l,className:v.default.current},t(n.title)))}return f.default.createElement("div",{className:v.default.breadcrumb},r)}}]),r}(f.default.Component);a.default=y,y.propTypes={breadcrumbs:d.default.array,routes:d.default.array,params:d.default.object,pathname:d.default.string},y.defaultProps={breadcrumbs:[],routes:[],params:{},pathname:""}},function(e,t,a){e.exports={breadcrumb:"xKPrLMpPGvKrIzz7bxSWY",back:"_2ohviffIByrflMsW5nHYlw",split:"OW3leDjR4Z22vqaxRuyOp"}},function(e,t,a){e.exports={card:"_1fvaJvMVa-46vr6bRwfiN",default:"_11ZbWGuLKUUwxoCi0UE_ta",selector:"_3wwNftf5lh3zwe6VvRlXHx",loading:"_3mlYHmzoC11FwkXtCcN1P",title:"C-xBi2-VU40KNZUYrr3TD",operations:"_3HvzxjlUHTsgNXS2U7nD52",empty:"_19AVBGyFYrhX1z6mTr5sg0"}},function(e,t,a){e.exports={label:"_2Ci7cqZ4O7DRBCRuzvUd-F",name:"_3c-epdF2Xgo9q-18cg54xx"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=r(186),v=n(r(1566)),g=n(r(1567));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=function(e){(0,c.default)(r,e);var a=y(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.formRef,r=e.data,n=e.children,o=e.hideFooter,i=e.onCancel,c=e.onOk,s=e.cancelText,f=e.okText,p=e.isSubmitting,y=e.bodyClassName,E=e.formClassName,b=e.disableOk,_=(0,u.default)(e,["formRef","data","children","hideFooter","onCancel","onOk","cancelText","okText","isSubmitting","bodyClassName","formClassName","disableOk"]);return d.default.createElement(v.default,(0,l.default)({},_,{bodyClassName:(0,m.default)(g.default.formBody,y),onCancel:i,hideFooter:!0}),d.default.createElement(h.Form,{ref:a,data:r,onSubmit:c},d.default.createElement("div",{className:(0,m.default)(g.default.formWrapper,E)},n),!o&&d.default.createElement("div",{className:g.default.formFooter},d.default.createElement(h.Button,{type:"default",onClick:i,"data-test":"modal-cancel"},s||t("CANCEL")),c&&d.default.createElement(h.Button,{type:"control",htmlType:"submit",loading:p,disabled:b||p,"data-test":"modal-ok"},f||t("OK")))))}}]),r}(d.default.Component);a.default=E,E.propTypes={data:p.default.object,isSubmitting:p.default.bool}},function(e,t,a){e.exports={status:"_1RJNTAi2gZll1lMoWME40i",indicator:"_2MMr1KtzTZnVoLtaDgs1lx"}},,,function(e){e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(11),a(6),a(16),a(137),a(10),a(4),a(22),a(23),a(17),a(7),a(110),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=n(a(315)),u=n(a(61)),o=n(a(36)),i=n(a(37)),c=n(a(55)),s=n(a(56)),f=n(a(51));a(45),a(5),a(11),a(6),a(42),a(16),a(137),a(10),a(4),a(22),a(23),a(57),a(17),a(7),a(110);var d=r(a(0)),p=n(a(1)),m=n(a(3)),h=n(a(455)),v=n(a(2447)),g=n(a(2448)),y=n(a(2449));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var b=+new Date,_=0;function O(){return _+=1,"upload-".concat(b,"-").concat(_)}var S=function(e){(0,c.default)(a,e);var t=E(a);function a(){var e;(0,o.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var a=new FormData;e.action=(0,r.getClusterUrl)(e.action),e.data&&Object.keys(e.data).forEach((function(t){a.append(t,e.data[t])}));a.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var a="cannot post ".concat(e.action," ").concat(t.status,"'"),r=new Error(a);return r.status=t.status,r.method=e.method||"post",r.url=e.action,r}(e,t),n(t)):e.onSuccess(n(t),t)},t.open(e.method||"post",e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var l=e.headers||{};null!==l["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest");return Object.keys(l).forEach((function(e){t.setRequestHeader(e,l[e])})),t.send(a),{abort:function(){t.abort()}}},a(250),a(45),a(5),a(6),a(10),a(4),a(7);var r=a(52);function n(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}},function(e,t,a){"use strict";a(15),a(86),a(97),a(16),a(24),a(64),a(136),a(818),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(86),a(160),a(97),a(16),a(4),a(24),a(193),a(64),a(818);t.default=function(e,t){if(e&&t){var a=Array.isArray(t)?t:t.split(","),r=e.name||"",n=e.type||"",l=n.replace(/\/.*$/,"");return a.some((function(e){var t,a,u=e.trim();return"."===u.charAt(0)?(t=r.toLowerCase(),a=u.toLowerCase(),-1!==t.indexOf(a,t.length-a.length)):/\/\*$/.test(u)?l===u.replace(/\/.*$/,""):n===u}))}return!0}},function(e,t,a){"use strict";a(15),a(5),a(6),a(16),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(5),a(6),a(16),a(4),a(7);var r=function(e,t,a){e.forEach((function(e){!function e(r,n){var l=n||"";if(r.isFile)r.file((function(e){a(e)&&t([e])}));else if(r.isDirectory){r.createReader().readEntries((function(t){t.forEach((function(t){e(t,"".concat(l).concat(r.name,"/"))}))}))}}(e.webkitGetAsEntry())}))};t.default=r},function(e,t,a){e.exports={container:"_28BAmUGayFPM7JPE5ubfRp",main_content:"_1nTOsD4LTy3JlMGPNyiH0J",controls:"_2iPsaoM6EKU-FKuFY19BPD",control:"_1Xce9RPORg_gvSJP9dstQ7","slider-wrapper":"VqFyTMdMnsEe-jAXhPkUB",normalSize:"_5KdmZqhOGtr0WGcmPF5R6",autoSize:"_2jsPFnKjZk2yDubgG_LTD2"}},function(e,t,a){e.exports={wrapper:"_2RXdRDDKaZIoVt_M4ZZKDH",card:"JoB_eaeo3gO3tgu15IdFJ",in:"_30Fhe_GMY_jqljFuBk6iPM",browseIn:"_27cK2SUAg9oL3KeZuQlc8I",out:"_3W6MlUSLX72EkOU9mwhqK9",browseOut:"_3_bxeu1laeJFbz1qe6hjOv",cardMain:"jApufF3_7WJgOAwNKdKLl",cardFoot:"_2MjC_tFWfTzr148xdbNYYP",title:"_3DuG8hhj8DMeFyPQ359a4Z",content:"_37wH-4L-J3wTYb3a17S4IK"}},function(e,t,a){e.exports={wrapper:"yZFq2sW492FUplIaCVLcA",title:"_2RF_2vkCUj5FRXMCT--OiK",panel:"_3GG4TSSEVPDykkKpRx-DTz",empty:"_2ipQUz0640DVJYOmATRKMA",loading:"_1P2YNSL2qJQiEtaDIFDfBf"}},function(e,t,a){e.exports={emptyTip:"_2n5LD-OS_oKZbSEFvtJWzL",emptyText:"_1TAFKSo4u8kgFnD_NDQWpq"}},function(e,t,a){e.exports={progress_label:"_5PSTAWJiSPA_LLFnStRk7",progress:"_1DA7GoI-GY3JPMYhUcAzd4",line_box:"_1Iiva64_Q4jDWrS8sN7HOy",line_split_items:"_2oZqVy1sIf-VGh8wW54aAH",line_block_items:"_2uhi-M5L9MD4cRySFNtXIB",line_block_mask_items:"_3kq8yg8B2d2ngP2g134sDG"}},function(e,t,a){e.exports={wrapper:"_302HbhNWl9mS-MU3L7oAQ0",disabled:"_1kINxzjNsn7aaOpqnibb0A",options:"_2w6Wx0Cn2s6hS24mPAoGsQ",option:"_2tyTnkSPzDAy8te4J5CaC9",control:"_1tMlQKHnZLlquKiSwFjDYV",withIcon:"QvU3_GAQkwcWv0oSs1iyi",leftIcon:"_3LTCGCX8_ciBanyKKA22gn",text:"_3HuhDrid86ZAmU9VGNM6Mz",rightIcon:"_3Uxm1hQLkKIpTk1QqTk3AM",selected:"_2FTW0KhkRJG4DvBe8MTypz",open:"HePRK-voaONco1Z9AdqPs"}},function(e,t,a){e.exports={option:"MwEyynZNsExX6uC1xcFAi",empty:"_1z-Oh8RaC_rY7Ef7mjU6Up",isOutdated:"_21PySuLKqWWEkaP8AJI3LB"}},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(11),r(6),r(86),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(6),r(86),r(18),r(28),r(191),r(42),r(16),r(159),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l,u=n(r(315)),o=n(r(30)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=r(186),m=n(r(788)),h=n(r(790)),v=r(791),g=n(r(873)),y=n(r(26)),E=n(r(74)),b=n(r(928)),_=n(r(63)),O=n(r(0)),S=r(239),C=n(r(1316)),D=r(52),k=r(72),N=r(434),T=r(14),R=n(r(2478));function w(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function I(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};e.keyword&&(e.name=e.keyword,delete e.keyword),n.store.fetchList(I({limit:-1,cluster:n.props.cluster,namespace:n.props.namespace,status:"enabled"},e))},n.getColumns=function(){return[{title:t("NAME"),dataIndex:"name",search:!0,key:"name",render:function(e,t){return O.default.createElement(m.default,{icon:k.ICON_TYPES.ippools,iconSize:40,title:(0,D.getDisplayName)(t),desc:t.description||"-"})}},{title:t("NETWORK_SEGMENT"),isHideable:!0,dataIndex:"cidr"},{title:n.isCalico?t("USED_IP_ADDRESSES"):O.default.createElement("span",{className:"flexbox items-center"},O.default.createElement("span",{className:"margin-r4"},t("USED_IP_ADDRESSES")),O.default.createElement(p.Tooltip,{content:t("IPPOOL_USED_TIP")},O.default.createElement(p.Icon,{name:"question",size:16}))),dataIndex:"status1",isHideable:!0,render:function(e,a){var r=a.status,n=(0,y.default)(r,"capacity",0),l=(0,y.default)(r,"unallocated",0);return O.default.createElement(h.default,{title:n-l,description:t("TOTAL_VALUE",{value:n})})}},{title:t("IPPOOL_BLOCK_SIZE"),dataIndex:"blockSize",isHideable:!0,render:function(e){return null!=e?e:"-"}},n.props.isOutdated?null:{title:t("IPPOOL_OVERLAY_MODE"),dataIndex:"overlay",isHideable:!0,render:function(e,t){var a=t.ipipMode,r=t.vxlanMode,n=(0,N.getOverlayStatus)({ipipMode:a,vxlanMode:r});return O.default.createElement("div",null,O.default.createElement("span",{className:"font-bold"},n.type),n.value&&O.default.createElement("span",{style:{marginLeft:"4px"}},"(",n.value,")"))}}]},n.changeIPPools=function(e){var t,a,r=n.props,l=r.name,u=r.formTemplate,o=r.data;null===(t=n.props)||void 0===t||null===(a=t.formProps)||void 0===a||a.onChange(l,JSON.stringify(e)),o&&(0,E.default)(n.props.data,l,JSON.stringify(e)),u&&(0,E.default)(n.props.formTemplate,l,JSON.stringify(e))},n.showCreate=function(){var e,t,a,r=n.props.cluster;return n.trigger("network.ippool.add",{module:"ippools",cluster:r,trigger:n.trigger,isOutdated:n.props.isOutdated,hideWorkspace:n.columnConfig.hideWorkspace,isCalico:n.isCalico,allList:(0,T.toJS)(null!==(e=null===(t=n.store)||void 0===t||null===(a=t.list)||void 0===a?void 0:a.data)&&void 0!==e?e:[]),success:n.getIPPools})},n.onSelectRowKeys=function(e){n.setState({selectedRowKeys:e},(function(){n.changeIPPools(e)}))},n.showEmpty=function(){var e=n.store.list,t=e.isLoading,a=e.filters,r=e.total;return!t&&(0,_.default)(a)&&0===r},n.deleteItem=function(e){var t=n.state.selectedRowKeys;(0,b.default)(t,(function(t){return t===e})),n.setState({selectedRowKeys:t},(function(){n.changeIPPools(t)}))},n.renderItems=function(e){return e.map((function(e){return O.default.createElement("span",{className:R.default.item},e,O.default.createElement(p.Icon,{name:"close",size:14,clickable:!0,onClick:function(){n.deleteItem(e)}}))}))},n.rootStore=e.rootStore,n.ippoolStore=new C.default,n.store=new(n.ippoolStore.getStoreByCluster(e.cluster));var l=(0,y.default)(e.data,e.name,"");return n.state={selectedRowKeys:l&&JSON.parse(l)||[]},n}return(0,c.default)(r,[{key:"componentDidMount",value:function(){this.store.fetchList({limit:-1,cluster:this.props.cluster,namespace:this.props.namespace,status:"enabled"})}},{key:"render",value:function(){var e=this.props,a=e.tableProps,r=e.name,n=this.state.selectedRowKeys,l=this.store.list.filters;return O.default.createElement("div",{className:R.default.ippools,name:r},n.length>0?O.default.createElement("div",{className:R.default.showSelects},O.default.createElement("p",null,t("SELECTED_IPPOOLS",{number:n.length})),O.default.createElement("div",{className:R.default.selectWrapper},this.renderItems(n))):"",O.default.createElement(g.default,(0,u.default)({},a,{module:"ippools",name:"POD_IP_POOL",columns:this.getColumns(),cluster:this.props.cluster,onFetch:this.getIPPools,onRefresh:this.getIPPools,onSelectRowKeys:this.onSelectRowKeys,selectedRowKeys:this.state.selectedRowKeys,disabledSelectActions:!0,data:(0,T.toJS)(this.store.list.data),hideFooter:!0,hideCustom:!0,searchType:"name",filters:l,showEmpty:this.showEmpty(),emptyProps:{desc:t("CLUSTER_IPPOOL_EMPTY_DES")}})),O.default.createElement("p",{className:R.default.empty},this.canCreate?O.default.createElement(O.default.Fragment,null,t("ADD_IPPOOL_EMPTY_DES_ADMIN"),O.default.createElement("a",{onClick:this.showCreate},t("CREATE_POD_IP_POOL"))):t("ADD_IPPOOL_EMPTY_DES")))}},{key:"isOutdated",get:function(){var e=this.props.cluster;return this.ippoolStore.isOutdated(e)}},{key:"isCalico",get:function(){var e=this.props.cluster;return this.ippoolStore.isCalico(e)}},{key:"columnConfig",get:function(){var e=this.isCalico;return{hideWorkspace:e,hideSerch:e,hideFilter:e}}},{key:"isNetworkManager",get:function(){var e=this.props.cluster;return-1!==(0,y.default)(globals,"user.clusterRules.".concat(e,".network"),[]).indexOf("manage")}},{key:"canCreate",get:function(){return"platform-admin"===globals.user.globalrole||this.isNetworkManager}}]),r}(O.default.Component))||l)||l;a.default=P},,,,,,,,,,,,,function(e,t,a){e.exports={wrapper:"_1ySvVWPft88PiZ2MO7sDtU"}},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var n=r(a(30)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=r(a(1)),d=r(a(3)),p=r(a(1165)),m=r(a(1166)),h=r(a(2472));function v(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=function(e){(0,o.default)(a,e);var t=g(a);function a(e){var r;(0,l.default)(this,a),(r=t.call(this,e)).handleToggle=function(){r.setState({visible:!r.state.visible},(function(){r.props.onToggle(r.state.visible)}))},r.hideSelector=function(){r.setState({visible:!1},(function(){r.props.onToggle(!1)}))},r.handleTimeChange=function(e){r.setState(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getNetworkUrl).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getNetDetailUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getNetWorkUrl(t),"/").concat(t.name)},e.store=new v.default({module:"ippools",kind:"IPPool",apiVersion:"apis/crd.projectcalico.org/v1"}),e}return(0,f.default)(u,[{key:"fetchList",value:(a=(0,c.default)(n.default.mark((function e(){var t,a,r,u,i,c,s,f,d,p=this,m=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},a=t.cluster,r=t.workspace,u=t.namespace,i=t.more,c=t.devops,s=(0,o.default)(t,["cluster","workspace","namespace","more","devops"]),this.list.isLoading=!0,s.sortBy||void 0!==s.ascending||(s.sortBy=b.LIST_DEFAULT_ORDER[this.module]||"createTime"),s.limit!==1/0&&-1!==s.limit||(s.limit=-1,s.page=1),s.limit=s.limit||10,e.next=7,request.get(this.getNetWorkUrl({cluster:a,workspace:r,namespace:u,devops:c}),this.getFilterParams(s));case 7:return f=e.sent,d=((0,y.default)(f,"items")||((0,E.default)(f)?f:[])).map((function(e){return O({cluster:a,namespace:u},p.mapper(e))})),this.list.update(O(O({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(d)):d,total:f.totalItems||f.totalCount||f.total_count||d.length||0},s),{},{limit:Number(s.limit)||10,page:Number(s.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",d);case 11:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchDetail",value:(t=(0,c.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get(this.getNetDetailUrl(t));case 3:return a=e.sent,r=O(O({},t),this.mapper(a)),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"apis/crd.projectcalico.org/v1"}}]),u}(r(a(1104)).default),(0,h.default)(i.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,h.default)(i.prototype,"fetchDetail",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),i);t.default=C},function(e,t,a){e.exports={ippools:"_2kGSbKseUL2YRcov_9muVv",empty:"_24O3McxSSDwKwbFNUTDDCO",showSelects:"_2sv6WMgMdW8V1HSJxSoBYG",selectWrapper:"_1wN86v2HXHvjdxLHBN1OfO",item:"_1OeK_sDkEV3zvvBSay1L4P"}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l,u=r(a(44)),o=r(a(36)),i=r(a(37)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(49)),p=r(a(26)),m=a(14);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var v=(l=function(e){(0,c.default)(l,e);var t,a,r=h(l);function l(){var e;(0,o.default)(this,l);for(var t=arguments.length,a=new Array(t),n=0;n=.9&&d.default.createElement(m.Icon,{name:"exclamation"})),description:t("CPU")})},e.renderMemory=function(a){var r=e.getRecordMetrics(a,[{type:"memory_used",unit:"Gi"},{type:"memory_total",unit:"Gi"},{type:"memory_utilisation"}]);return d.default.createElement(_.default,{title:d.default.createElement("div",{className:S.default.resource},d.default.createElement("span",null,"".concat(Math.round(100*r.memory_utilisation),"%")),r.memory_utilisation>=.9&&d.default.createElement(m.Icon,{name:"exclamation"})),description:t("MEMORY")})},e}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.detail,r=e.selected,n=e.hasMonitoring;return d.default.createElement("div",{className:(0,p.default)(S.default.item,(0,u.default)({},S.default.selected,r)),onClick:this.handleClick},d.default.createElement(m.Icon,{name:h.ICON_TYPES.nodes,size:20}),d.default.createElement("div",{className:S.default.ring}),d.default.createElement("div",{className:S.default.name},d.default.createElement(E.default,{icon:null,to:null,title:a.name,desc:a.ip})),this.renderStatus(a),d.default.createElement("div",null,d.default.createElement(_.default,{title:d.default.createElement(d.default.Fragment,null,a.role.join(",")),description:t("ROLE")})),n&&d.default.createElement(d.default.Fragment,null,d.default.createElement("div",null,this.renderCPU(a)),d.default.createElement("div",null,this.renderMemory(a))))}},{key:"metricTypesMap",get:function(){if(!this.props.isEdgeWize)return D;var e={};return Object.entries(D).forEach((function(t){var a=(0,l.default)(t,2),r=a[0],n=a[1];e["".concat(r)]="edge_".concat(n)})),e}}]),r}(d.default.Component);a.default=k},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(5),r(11),r(6),r(18),r(16),r(27),r(9),r(13),r(10),r(4),r(316),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(18),r(28),r(42),r(16),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(17),r(7);var l=n(r(61)),u=n(r(30)),o=n(r(43));r(41);var i,c=n(r(44)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(0)),v=r(14),g=r(239),y=n(r(26)),E=n(r(63)),b=r(186),_=n(r(863)),O=n(r(852)),S=n(r(954)),C=n(r(856)),D=n(r(2493)),k=n(r(1583));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){for(var t=1;t=.9&&d.default.createElement(m.Icon,{name:"exclamation"})),description:t("CPU")})},e.renderMemory=function(a){var r=e.getRecordMetrics(a,[{type:"memory_used",unit:"Gi"},{type:"memory_total",unit:"Gi"},{type:"memory_utilisation"}]);return d.default.createElement(b.default,{title:d.default.createElement("div",{className:O.default.resource},d.default.createElement("span",null,"".concat(Math.round(100*r.memory_utilisation),"%")),r.memory_utilisation>=.9&&d.default.createElement(m.Icon,{name:"exclamation"})),description:t("MEMORY")})},e.renderPodNum=function(a){var r=e.getRecordMetrics(a,[{type:"pod_used"},{type:"pod_total"}]),n=r.pod_total?parseFloat(r.pod_used/r.pod_total):0;return d.default.createElement(b.default,{title:"".concat(Math.round(100*n),"%"),description:t("PODS")})},e}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,t=e.detail,a=e.selected;return d.default.createElement("div",{className:(0,p.default)(O.default.item,(0,u.default)({},O.default.selected,a)),onClick:this.handleClick},d.default.createElement(m.Icon,{name:"edge-node",size:20}),d.default.createElement("div",{className:O.default.ring}),d.default.createElement("div",{className:O.default.name},d.default.createElement(y.default,{icon:null,to:null,title:t.name,desc:t.ip})),this.renderStatus(t),d.default.createElement("div",null,this.renderCPU(t)),d.default.createElement("div",null,this.renderMemory(t)),d.default.createElement("div",null,this.renderPodNum(t)))}},{key:"metricTypesMap",get:function(){var e={};return Object.entries(C).forEach((function(t){var a=(0,l.default)(t,2),r=a[0],n=a[1];e["".concat(r)]="edge_".concat(n)})),e}}]),r}(d.default.Component);a.default=D},function(e,t,a){e.exports={wrapper:"_4qArBgVOZGVzW4_C1mQa_",alert:"_2J-ZH7uleo6FGwk_vn2a-P",node:"_2_K8zkzSwO3NKwIB5qbvFK",body:"_2erzUoyxi1dmIp0QGaU92y"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(4),r(23),r(57),r(17);var u=l(r(30)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=n(r(0)),p=l(r(3)),m=l(r(2496));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var v=function(e){(0,c.default)(r,e);var a=h(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.steps,r=e.current;return d.default.createElement("div",{className:m.default.wrapper},a.map((function(e,a){var n;return d.default.createElement("div",{key:e.title},d.default.createElement("span",{className:(0,p.default)(m.default.indicator,(n={},(0,u.default)(n,m.default.fullfill,r>a),(0,u.default)(n,m.default.current,r===a),(0,u.default)(n,m.default.pending,r1&&void 0!==arguments[1]?arguments[1]:[];return null==t||t.forEach((function(t){var r,n;(a.push(t.metadata.name),null===(r=t.spec)||void 0===r?void 0:r.children)&&e(null===(n=t.spec)||void 0===n?void 0:n.children,a)})),a}(n);R(e)}else R([])}),[C]),o.default.createElement("div",{className:d.default["node-tree-bg"]},o.default.createElement(s.InputSearch,{className:d.default.search,name:"search",value:b,placeholder:t("SEARCH_BY_NAME"),onChange:function(e){_(e)},autoComplete:"off"}),o.default.createElement("div",{className:m.default["select-nodes"]},o.default.createElement(s.Icon,{className:m.default["select-nodes-icon"],name:"listview",size:20,type:"coloured"}),t("已选择节点")),o.default.createElement("div",{className:m.default.trees},o.default.createElement("div",{className:(0,i.default)(d.default["node-group__tree-item"],d.default["node-group__tree-item-margin"])},o.default.createElement("img",{className:d.default.icon,width:20,src:"/assets/disk_group.svg",alt:""}),o.default.createElement("span",{className:d.default["node-group__tree-item-title"],onClick:a},"全部节点组"),o.default.createElement(s.Tooltip,{content:t(C?"全部关闭":"全部展开")},o.default.createElement("img",{className:d.default["node-group__tree-item-icon-hover"],name:C?"sort-ascending":"sort-descending",width:20,src:"/assets/".concat(C?"close_all":"expand_all",".svg"),onClick:function(){return D(!C)},alt:""}))),o.default.createElement(p.default,{treeData:n,expandedKeys:T,onSelect:g,autoExpandParent:C,renderMenu:function(e){var a=l.find((function(t){var a;return t.nodeGroup===(null==e||null===(a=e.metadata)||void 0===a?void 0:a.name)}))||{};if(void 0===a.nodeName)return null;var r=a.nodeName?"手动指定":"自动分配",n=a.nodeName?"step_1":"refresh_fill";return o.default.createElement(s.Tooltip,{content:t(r)},o.default.createElement("img",{width:16,src:"/assets/".concat(n,".svg"),alt:""}))},renderIcon:function(e){var t=h(n).filter((function(e){return null==v?void 0:v.includes(e.metadata.name)})),a=(0,c.default)(null==t?void 0:t.map((function(e){return e.parentKey})));return o.default.createElement(o.default.Fragment,null,o.default.createElement(f.default,{type:(null==a?void 0:a.includes(e.metadata.name))?"Running":"paused"}),o.default.createElement("img",{width:16,src:"/assets/disk_group.svg",alt:""}))},filterName:b.searchValue,showNumber:!0})))};var u=l(r(96));r(5),r(11),r(31),r(6),r(84),r(18),r(28),r(87),r(16),r(4),r(24),r(85),r(188),r(7);var o=n(r(0)),i=l(r(3)),c=l(r(450)),s=r(186),f=l(r(795)),d=l(r(1320)),p=l(r(1318)),m=l(r(1321));function h(e){return e.reduce((function(e,t){return e.concat([t],h(t.spec.children||[]))}),[])}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(31),r(18),r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.NodeGroup=function(e){var a=e.detail,r=e.cluster,n=e.formData,l=e.onSelect,g=(0,i.createRef)(),y=(0,i.useState)(!1),E=(0,o.default)(y,2),b=E[0],_=E[1],O=(0,i.useState)(!1),S=(0,o.default)(O,2),C=S[0],D=S[1],k=null==n?void 0:n.map((function(e){return e.nodeName}));return(0,i.useEffect)((function(){if(a){var e=n.find((function(e){return e.nodeGroup===a.metadata.name}));_(!!e&&!(null==e?void 0:e.nodeName))}}),[a]),i.default.createElement(i.default.Fragment,null,a?i.default.createElement("div",null,i.default.createElement(m.default,{cluster:r,detail:a,renderBtn:C&&i.default.createElement(f.default,{className:v.default.switch,text:t("IPPOOL_AUTO_ASSIGN"),checked:b,onChange:function(e){_(e),l(a,"")}})}),i.default.createElement(h.EdgewizeNodeTable,(0,u.default)({ref:g},e,{node:a,enabled:b,cluster:r,selectKeys:k,onSelect:function(e){var t;l(a,null===(t=e.metadata)||void 0===t?void 0:t.name)},setEdgeNodeStatus:D}))):i.default.createElement("div",null,i.default.createElement("div",{className:(0,c.default)(v.default["select-nodes"],v.default["select-nodes-normal"])},i.default.createElement(s.Icon,{className:v.default["select-nodes-icon"],name:"listview",size:20}),t("已选择节点")),i.default.createElement("div",{className:p.default.container},null==n?void 0:n.map((function(e){return i.default.createElement("div",{className:(0,c.default)(p.default.listItem,p.default.card)},i.default.createElement(d.default,{title:e.nodeGroup,icon:function(){return i.default.createElement("img",{width:40,src:"/assets/disk_group.svg",alt:""})},description:t("NODE_GROUP")}),i.default.createElement(d.default,{title:e.nodeName,icon:"nodes",description:t("EDGE_NODE_PL")}))})))))},r(31),r(18),r(16),r(4);var u=l(r(315)),o=l(r(96)),i=n(r(0)),c=l(r(3)),s=r(186),f=l(r(850)),d=l(r(790)),p=l(r(1322)),m=l(r(1584)),h=r(2503),v=l(r(1321))},,function(e,t,a){e.exports={"top-bar":"_2i1Q4R5tL-7QYBBbfNq3ip","top-bar-left":"sbdO2-XmopsQeo1skluC_",icon:"_2rLzHSHMjymGW9H85aW1eq","top-bar-title":"_2OM1eMcCE8Pvf4TpvXGz3E","top-bar-title-label":"_1DZcCR369hJBpQPUW-OYST","top-bar-des":"_3FqYBu8t0scwg42D44OIH9","top-bar-des-group":"lDV8LihpWxI9IRS9m2yGB","top-bar-bind":"_1-Fog9pCIzA3128ZSNDSd-","top-bar-ip":"_3Z6JLYi2ALlxOLrJj5Yp6q","top-bar-ip-tooltip":"B8tjvzuiPnVTWcWfqnv_J","top-bar-ip-tooltip-item":"_2tgYygRlwin9PWC0Ly840l","top-bar-ip-tooltip-item-ip":"vIeKUTxkq8djVvsN-EVp5"}},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(5),r(11),r(6),r(84),r(18),r(16),r(9),r(13),r(10),r(24),r(85),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.EdgewizeNodeTable=void 0,r(12),r(5),r(11),r(6),r(84),r(18),r(28),r(859),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(24),r(85),r(62),r(7);var u=l(r(43)),o=l(r(30));r(41);var i=l(r(315)),c=l(r(44)),s=l(r(96)),f=n(r(0)),d=l(r(63)),p=r(186),m=l(r(796)),h=l(r(788)),v=l(r(795)),g=r(444),y=r(72),E=l(r(953)),b=l(r(1585));function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;t0?h.default.createElement("label",{className:C.default.deleteAll,onClick:function(){e.deleteScreenshot(-1,r)}},t("DELETE_ALL")):h.default.createElement("label",{className:(0,y.default)(C.default.deleteAll,C.default.disabled)},t("DELETE_ALL")))))}}]),r}(h.default.Component),o.propTypes={detail:g.default.object,store:g.default.object,fileStore:g.default.object},o.defaultProps={detail:{},store:{},fileStore:function(){}},u=i))||u;a.default=k},function(e,t,a){e.exports={title:"_2uPiYzFDOXR72WfG9uGqfU",screenshot:"_2YKRw87avTolrxMvvqKdUw",pictures:"_2mut4J5F7tqeF_yGoONfAl",upload:"_3Y5SOweqK4JOLgJYTWXwWB",add:"svj73vqzmkHDs00vaMNKa",delete:"_2CvCSpyGVDD7j2kE2aPl6g",icon:"_19kdNNakltP3B4lu8OnnPQ",error:"gtPg-cI0R-ryIQiNIwS3N",words:"_2w8iv_6c2wn1jOzU9DFnYk",disabled:"LwrGabyBVUqWJUr4TYWl",deleteAll:"_2nkH5dSh2jhtOpVwtll5Dp"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l,u,o,i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=r(239),h=n(r(1)),v=n(r(2513)),g=n(r(2514));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var E={h1:!0,h2:!0,h3:!0,h4:!0,img:!1,link:!0,code:!0,preview:!0,expand:!0,undo:!0,redo:!0,save:!1,subfield:!0},b=(0,m.observer)((o=u=function(e){(0,s.default)(r,e);var a=y(r);function r(e){var t;return(0,i.default)(this,r),(t=a.call(this,e)).handleChange=function(e){t.setState({readme:e}),t.props.handleChange(e,"abstraction")},t.state={readme:e.detail.abstraction},t}return(0,c.default)(r,[{key:"render",value:function(){var e=this.state.readme;return p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{className:g.default.header},t("APP_INTRODUCTION")),p.default.createElement("div",{className:g.default.readmeEdit},p.default.createElement(v.default,{value:e,onChange:this.handleChange,placeholder:t("START_EDITING"),toolbar:E})))}}]),r}(p.default.Component),u.propTypes={detail:h.default.object,store:h.default.object,handleChange:h.default.func},u.defaultProps={detail:{},store:{},handleChange:function(){}},l=o))||l;a.default=b},,function(e,t,a){e.exports={header:"ovSS-AWa-ZyP2A-ngZTMO",readmeEdit:"Y_xQq9aBBqoFkxZrwNVBS"}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(22),a(23),a(57),a(17);var n=r(a(43)),l=r(a(58));a(41);var u,o,i,c=r(a(44)),s=r(a(65)),f=r(a(36)),d=r(a(88)),p=r(a(55)),m=r(a(56)),h=r(a(51)),v=r(a(49)),g=(r(a(66)),a(14));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,h.default)(e);if(t){var n=(0,h.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,m.default)(this,a)}}var E=(u=function(e){(0,p.default)(a,e);var t=y(a);function a(){var e;(0,f.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&void 0!==arguments[0]?arguments[0]:{},a=t.category_id;return a?"".concat(e.baseUrl,"/").concat(e.resourceName,"/").concat(a):"".concat(e.baseUrl,"/").concat(e.resourceName)},(0,s.default)(e,"update",o,(0,d.default)(e)),(0,s.default)(e,"delete",i,(0,d.default)(e)),e}return a}(r(a(458)).default),o=(0,v.default)(u.prototype,"update",[g.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return(0,c.default)(n.default.mark((function t(){var a,r,u,o=arguments;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=o.length>0&&void 0!==o[0]?o[0]:{},r=a.category_id,u=(0,l.default)(a,["category_id"]),t.next=3,e.submitting(request.patch(e.getUrl({category_id:r}),u));case 3:case"end":return t.stop()}}),t)})))}}),i=(0,v.default)(u.prototype,"delete",[g.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.category_id;return e.submitting(request.delete(e.getUrl({category_id:a}),{}))}}}),u);t.default=E},function(e,t,a){e.exports={modal:"BdK5ZaX-xYe3UCP_Y1MKV",body:"_2yuMHphDy5tXJVP5ZG_oka"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var l,u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(26)),p=r(239),m=r(186),h=r(72),v=n(r(1325));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var y=(0,p.observer)(l=function(e){(0,i.default)(r,e);var a=g(r);function r(){var e;(0,u.default)(this,r);for(var n=arguments.length,l=new Array(n),o=0;o0){var i=d.default.Children.map(u,(function(t){return d.default.cloneElement(t,y(y({},t.props),{},{name:r,checked:o.includes(t.props.value),onChange:e.handleOptionChange}))}));return d.default.createElement("div",{"data-direction":n,className:(0,m.default)("checkbox-group",a)},i)}return d.default.createElement("div",{"data-direction":n,className:(0,m.default)("checkbox-group",a)},l.map((function(t){return d.default.createElement(h.Checkbox,{key:t.value,name:r,value:t.value,checked:o.includes(t.value),onChange:e.handleOptionChange},t.label)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return(0,v.default)(e.value,t.values)?null:{values:e.value}}}]),a}(d.Component);t.default=b,b.propTypes={options:p.default.arrayOf(p.default.oneOfType([p.default.string,p.default.shape({value:p.default.any,label:p.default.string,disabled:p.default.bool})])),value:p.default.array,onChange:p.default.func,direction:p.default.oneOf(["row","column"]),className:p.default.string,disabled:p.default.bool,children:p.default.node},b.defaultProps={direction:"row",options:[],value:[],onChange:function(){}}},function(e,t,a){e.exports={group:"_1apuDq7M0zdRfWCPastdWU"}},,,,function(e,t,a){e.exports={dropdown:"_2AA0siR3svLxPwUAGPyHck"}},,,function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(4),r(23),r(57),r(17);var u=l(r(36)),o=l(r(37)),i=l(r(55)),c=l(r(56)),s=l(r(51)),f=n(r(0)),d=r(186),p=l(r(2615));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var h=function(e){(0,i.default)(r,e);var a=m(r);function r(){return(0,u.default)(this,r),a.apply(this,arguments)}return(0,o.default)(r,[{key:"render",value:function(){var e=this.props,a=e.steps,r=e.current;return f.default.createElement("div",{className:p.default.wrapper},a.map((function(e,a){return f.default.createElement("div",{key:e.title},r>=a?f.default.createElement(d.Icon,{name:"success",type:"coloured",size:14}):f.default.createElement(d.Icon,{name:"dot",type:"light",size:14}),f.default.createElement("span",null,t(e.title)))})))}}]),r}(f.Component);a.default=h},function(e,t,a){e.exports={wrapper:"_3iSN2t3fxpa-6qCq-vAc0D"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(26)),f=n(r(74)),d=n(r(800)),p=n(r(0)),m=r(1),h=r(186),v=r(72),g=r(52),y=n(r(2617));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var b=function(e){(0,o.default)(r,e);var a=E(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,u=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t={};return Object.values(e).forEach((function(e){var a=e.kind.replace("Federated","");t[a]=e})),t},e.updateComponentKind=function(){var t=e.props.formData.application;(0,d.default)(t,"".concat(e.fedPrefix,"spec.componentKinds"),[{group:"",kind:"Service"},{group:"apps",kind:"Deployment"},{group:"apps",kind:"StatefulSet"},{group:"networking.k8s.io",kind:"Ingress"},{group:"servicemesh.kubesphere.io",kind:"Strategy"},{group:"servicemesh.kubesphere.io",kind:"ServicePolicy"}])},e.handleAdd=function(t){t.workload=t.Deployment||t.StatefulSet,t.service=t.Service,e.updateAppLabels(t),e.updateGovernance(t);var a=(0,f.default)(t,"service.metadata.name"),r=(0,f.default)(e.state.editData,"Service.metadata.name");e.setState((function(e){var n=e.components;return r&&n[r]&&delete n[r],{components:_(_({},n),{},(0,l.default)({},a,t)),editData:{}}}),(function(){r&&delete e.props.formData[r],e.props.formData[a]=t,e.updateComponentKind(),e.hideAdd()}))},e.handleDelete=function(t){e.setState((function(e){var a=e.components;return delete a[t],{components:_({},a)}}),(function(){delete e.props.formData[t],e.updateComponentKind()}))},e}return(0,o.default)(r,[{key:"componentDidUpdate",value:function(e){var t=this.props.formData;t!==e.formData&&this.setState({components:(0,p.default)(t,["application","ingress"])||{}})}},{key:"validate",value:function(e){e&&e()}},{key:"updateAppLabels",value:function(e){var t=(0,f.default)(this.props.formData,"application.".concat(this.fedPrefix,"spec.selector.matchLabels"),[]);(0,h.mergeLabels)(e.workload,t),(0,h.mergeLabels)(e.service,t)}},{key:"updateGovernance",value:function(e){var t=this.props,a=t.isGovernance,r=t.isFederated;(0,d.default)(e.workload,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',String(a)),(0,d.default)(e.service,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',String(a)),(0,d.default)(e.workload,"spec.template.".concat(this.fedPrefix,'metadata.annotations["sidecar.istio.io/inject"]'),String(a)),r&&((0,h.updateFederatedAnnotations)(e.workload),(0,h.updateFederatedAnnotations)(e.service))}},{key:"render",value:function(){var e=this.props,a=e.cluster,r=e.namespace,n=e.isFederated,l=e.projectDetail,u=this.state,o=u.components,i=u.showAdd,c=u.editData;return m.default.createElement("div",{className:E.default.wrapper},m.default.createElement("div",{className:E.default.step},m.default.createElement("div",null,t("SERVICE_PL")),m.default.createElement("p",null,t("APPLICATION_SERVICE_DESC"))),m.default.createElement("div",{className:E.default.components},m.default.createElement(y.default,{data:o,clusters:l.clusters,onAdd:this.showAdd,onDelete:this.handleDelete})),m.default.createElement(g.default,{cluster:a,namespace:r,components:o,detail:c,store:this.serviceStore,module:"services",visible:i,onCancel:this.hideAdd,onOk:this.handleAdd,isFederated:n,projectDetail:l}))}},{key:"fedPrefix",get:function(){return this.props.isFederated?"spec.template.":""}}]),r}(m.default.Component);a.default=S},function(e,t,a){e.exports={cluster:"WepWXI1aSdsP2mN7tQD4h",title:"-FR9pSqY9v4vM0_IHSUJb",selected:"_10Jl3vuRvh7yJv5FXgkQV3"}},function(e,t,a){e.exports={wrapper:"_1MKeNDQmYI8pkIxXHU03ir",selected:"_3OBd22JrAfh3uBO-tVAK5U"}},function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(5),r(11),r(6),r(29),r(9),r(13),r(10),r(4),r(22),r(23),r(17),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(29),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(38),r(7),r(32);var u,o=n(r(315)),i=n(r(30)),c=n(r(96)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=l(r(0)),v=n(r(26)),g=n(r(189)),y=n(r(1094)),E=n(r(158)),b=r(14),_=r(239),O=n(r(913)),S=r(52),C=r(248),D=n(r(851)),k=n(r(885)),N=n(r(1096)),T=n(r(1051)),R=n(r(1303));function w(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function I(e){for(var t=1;t=e}},N=(0,y.observer)(u=function(e){(0,s.default)(r,e);var a=C(r);function r(){var e;(0,i.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l=.9&&f.default.createElement(p.Icon,{name:"exclamation"})),description:t("CPU")})},e.renderMemory=function(a){var r=e.getRecordMetrics(a,[{type:"memory_used",unit:"Gi"},{type:"memory_total",unit:"Gi"},{type:"memory_utilisation"}]);return f.default.createElement(b.default,{title:f.default.createElement("div",{className:O.default.resource},f.default.createElement("span",null,"".concat(Math.round(100*r.memory_utilisation),"%")),r.memory_utilisation>=.9&&f.default.createElement(p.Icon,{name:"exclamation"})),description:t("MEMORY")})},e}return(0,o.default)(r,[{key:"render",value:function(){var e=this.props,a=e.detail,r=e.selected,n=e.hasMonitoring;return f.default.createElement("div",{className:(0,d.default)(O.default.item,(0,l.default)({},O.default.selected,r)),onClick:this.handleClick},f.default.createElement(p.Icon,{name:m.ICON_TYPES.nodes,size:20}),f.default.createElement("div",{className:O.default.ring}),f.default.createElement("div",{className:O.default.name},f.default.createElement(y.default,{icon:null,to:null,title:a.name,desc:a.ip})),this.renderStatus(a),f.default.createElement("div",null,f.default.createElement(b.default,{title:f.default.createElement(f.default.Fragment,null,a.role.join(",")),description:t("ROLE")})),n&&f.default.createElement(f.default.Fragment,null,f.default.createElement("div",null,this.renderCPU(a)),f.default.createElement("div",null,this.renderMemory(a))))}}]),r}(f.default.Component);a.default=D},function(e,t,a){e.exports={wrapper:"e5Jf5_q8FscHgID58CD7H",alert:"_2AIc5Vz5VWAUWlhxAD9FCG",node:"_1NNyPvCXso2s-hSebtqNpd",popper:"_3lit3qZEFq4FaHoohTz1rG"}},function(e,t,a){e.exports={wrapper:"_3AXbBgab3cgu3MkpHMsT2n"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(18),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(18),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l,u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(14),m=r(239),h=n(r(26)),v=r(186),g=n(r(863)),y=r(52),E=n(r(318)),b=n(r(858)),_=n(r(2638)),O=n(r(1619));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=t.props,r=a.cluster,n=a.namespace;t.store.fetchList(C({cluster:r,namespace:n},e))},t.handleSelect=function(e){t.setState({selectItem:e})},t.handleCancel=function(){t.setState({selectItem:{}},(function(){t.props.onCancel()}))},t.handleOK=function(){var e=t.props.onSelect,a=t.state.selectItem;e((0,h.default)(a,"_originData.spec.template.metadata.labels",{}))},t.state={type:"deployments",selectItem:{}},t.store=(0,y.isEdgeWizePage)()?new b.default(t.state.type):new E.default(t.state.type),t}return(0,i.default)(r,[{key:"render",value:function(){var e=this,a=this.state,r=a.type,n=a.selectItem,l=(0,p.toJS)(this.store.list),u=l.data,o=l.total,i=l.page,c=l.isLoading;return d.default.createElement("div",null,d.default.createElement("div",{className:O.default.body},d.default.createElement(v.Alert,{className:"margin-b8",message:t("SELECT_WORKLOAD_DESC"),hideIcon:!0}),d.default.createElement(v.RadioGroup,{mode:"button",buttonWidth:120,value:r,onChange:this.handleTypeChange,size:"small"},d.default.createElement(v.RadioButton,{value:"deployments"},t("DEPLOYMENT_PL")),d.default.createElement(v.RadioButton,{value:"statefulsets"},t("STATEFULSET_PL")),d.default.createElement(v.RadioButton,{value:"daemonsets"},t("DAEMONSET_PL"))),d.default.createElement("div",{className:O.default.workloads},d.default.createElement(g.default,{data:u,total:o,page:i,loading:c,onFetch:this.fetchData},u.map((function(t,a){return d.default.createElement(_.default,{key:"".concat(t.uid).concat(a),module:r,detail:t,onClick:e.handleSelect,selected:n.uid===t.uid})}))))),d.default.createElement("div",{className:O.default.footer},d.default.createElement(v.Button,{onClick:this.handleCancel},t("CANCEL")),d.default.createElement(v.Button,{type:"control",onClick:this.handleOK},t("OK"))))}}]),r}(d.default.Component))||l;a.default=k},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(16),a(4),a(23),a(57),a(17);var n=r(a(30)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=r(a(3)),d=a(186),p=a(72),m=r(a(1619));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(a,e);var t=h(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getWatchListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion,"/watch").concat(e.getPath(t),"/").concat(e.module)},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath(t),"/").concat(e.module)},(0,f.default)(e,"getLog",c,(0,m.default)(e)),e}return(0,p.default)(g,[{key:"fetchJobDetail",value:(i=(0,s.default)(o.default.mark((function e(t){var a,r,n,l,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.cluster,n=t.namespace,this.isLoading=!0,e.next=4,request.get("/apis/batch/v1".concat(this.getPath({namespace:n,cluster:r}),"/jobs/").concat(a));case 4:l=e.sent,u=S.default.jobs(l),this.jobDetail=u,this.isLoading=!1;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"fetchRunDetail",value:(l=(0,s.default)(o.default.mark((function e(t){var a,r,n,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.cluster,r=t.namespace,n=t.runName){e.next=3;break}return e.abrupt("return");case 3:return this.getRunDetailLoading=!0,e.next=6,request.get("/apis/devops.kubesphere.io/v1alpha1".concat(this.getPath({namespace:r,cluster:a}),"/").concat(this.module,"/").concat(n));case 6:return l=e.sent,this.runDetail=S.default.s2iruns(l),this.getRunDetailLoading=!1,e.abrupt("return",this.runDetail);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"deleteRun",value:(r=(0,s.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.cluster,r=t.namespace,n=t.runName){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,request.delete("/apis/devops.kubesphere.io/v1alpha1".concat(this.getPath({namespace:r,cluster:a}),"/").concat(this.module,"/").concat(n));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"fetchS2IRunRecords",value:(a=(0,s.default)(o.default.mark((function e(){var t,a,r,l,i,c,s,f,d,p,m,h,v,g,y,E=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=E.length>0&&void 0!==E[0]?E[0]:{},a=t.limit,r=void 0===a?10:a,l=t.name,i=t.page,c=void 0===i?1:i,s=t.order,f=t.reverse,t.workspace,d=t.cluster,p=t.namespace,m=t.more,h=(0,u.default)(t,["limit","name","page","order","reverse","workspace","cluster","namespace","more"]),this.list.data.length||(this.list.isLoading=!0),(v={}).conditions=(0,C.getFilterString)(k(k({},h),{},{"labels.devops.kubesphere.io/builder-name":l})),s||void 0!==f||(s="createTime",f=!0),r!==1/0&&(v.paging="limit=".concat(r,",page=").concat(c)),s&&(v.orderBy=s),v.reverse=!0,e.next=10,request.get("/kapis/resources.kubesphere.io/v1alpha2".concat(this.getPath({namespace:p,cluster:d}),"/").concat(this.module),v);case 10:return g=e.sent,(y=g.items.map(this.mapper)).forEach((function(e,t){e.count=g.total_count-t-10*(c-1),e.cluster=d})),this.list={data:m?[].concat((0,n.default)(this.list.data),(0,n.default)(y)):y,total:g.total_count||0,limit:Number(r)||10,page:Number(c)||1,order:s,reverse:f,filters:h,isLoading:!1,selectedRowKeys:[]},e.abrupt("return",this.list);case 15:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchPodsLogs",value:(t=(0,s.default)(o.default.mark((function e(t,a){var r,n,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,_.default)(this.logData,"logURL","")!==t&&(this.logData={isLoading:!1,log:"",start:0,hasMore:!1}),this.logData.isLoading=!0,r=(0,_.default)(t.match(/namespaces\/([\w-/.]*)*\?/),"1"),this.containerName){e.next=11;break}return e.next=6,request.get("api/v1".concat(this.getPath({namespace:r,cluster:a})));case 6:if(n=e.sent,(0,_.default)(n,"status.containerStatuses[0]containerID")){e.next=10;break}return e.abrupt("return",O.default.error("container not ready"));case 10:this.containerName=(0,_.default)(n,"spec.containers[0].name","");case 11:return e.next=13,request.get("/api/v1".concat(this.getPath({namespace:r,cluster:a}),"/log"),{container:this.containerName,timestamps:!0,tailLines:1e3});case 13:l=e.sent,this.logData={logURL:t,isLoading:!1,log:l,start:0,hasMore:!1};case 15:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"/apis/devops.kubesphere.io/v1alpha1"}}]),g}(r(a(472)).default),(0,y.default)(i.prototype,"fetchJobDetail",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchJobDetail"),i.prototype),(0,y.default)(i.prototype,"fetchRunDetail",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchRunDetail"),i.prototype),(0,y.default)(i.prototype,"deleteRun",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"deleteRun"),i.prototype),(0,y.default)(i.prototype,"fetchS2IRunRecords",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchS2IRunRecords"),i.prototype),c=(0,y.default)(i.prototype,"getLog",[E.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,s.default)(o.default.mark((function t(a,r){var n,l,u,i,c,s,f,d;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.logData.logURL!==a&&(e.logData={isLoading:!0,log:"",start:0,hasMore:!0}),n=(0,C.parseUrl)(a).pathname.slice(1),l=(0,_.default)(n.match(/\/namespaces\/(.*)\/pods\//),"1"),u=(0,_.default)(n.match(/\/pods\/(.*)/),"1"),n="/kapis/tenant.kubesphere.io/v1beta1".concat(e.getPath({cluster:r}),"logs"),t.next=7,request.get(n,{namespaces:l,pods:u,container:e.containerName,timestamps:!0,tailLines:1e3,size:300,from:e.logData.start,sort:"asc"});case 7:i=t.sent,c=(0,_.default)(i,"query.records",[]),s=(0,_.default)(i,"query.total",[]),f=e.logData.log,(0,b.default)(c)&&(d=c.reduce((function(e,t){return e+t.log}),f),e.logData={logURL:a,log:d,start:e.logData.start+c.length,hasMore:s>e.logData.start+c.length,isLoading:!1});case 12:case"end":return t.stop()}}),t)})));return function(e,a){return t.apply(this,arguments)}}()}}),(0,y.default)(i.prototype,"fetchPodsLogs",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchPodsLogs"),i.prototype),i);t.default=T},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(84),r(975),r(18),r(48),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(24),r(17),r(85),r(64),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(84),r(975),r(18),r(28),r(48),r(191),r(42),r(16),r(159),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(85),r(64),r(7);var l=n(r(315)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(186),v=n(r(240)),g=n(r(952)),y=n(r(459)),E=n(r(26)),b=n(r(74)),_=n(r(3)),O=r(52),S=r(72),C=n(r(456)),D=n(r(2647));function k(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function N(e){for(var t=1;t=0?o[l]=e:o.push(e),(0,p.default)(u,"spec.rules",o),t.updateTLS(u),t.updateAnnotations(),a&&t.updateOverrides(),t.closeModal()},t.handleDelete=function(e){var a=t.props.isFederated,r=t.state.ingress,n=a?(0,d.default)(r,"spec.template"):r,l=(0,d.default)(n,"spec.rules",[]);l.splice(e,1),(0,p.default)(n,"spec.rules",l),t.updateTLS(n),t.updateAnnotations(),a&&t.updateOverrides(),t.closeModal()},t.changeIngressClassName=function(e){var a=t.state.ingress;t.props.isFederated?(0,p.default)(a,"spec.template.spec.ingressClassName",e):(0,p.default)(a,"spec.ingressClassName",e)},t.mapper=e.isFederated?k.default.federated(k.default.services):k.default.services,t.secretStore=new O.default,t.gatewayStore=new C.default,e.isFederated&&(t.secretStore=new S.default({module:t.secretStore.module}));var a=(0,d.default)(t.props.formData,"ingress",{});return t.state={ingress:a,old:(0,g.default)(a),services:Object.values((0,m.default)(t.props.formData,["application","ingress"])||{}).map((function(e){return t.mapper(e.service)})),showAdd:!1,selectRuleIndex:-1,operation:"",ingressNameOption:[]},t}return(0,i.default)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.cluster,a=e.namespace;this.secretStore.fetchList({namespace:a,cluster:t,limit:-1}),this.updateName(),this.getIngressNameOptions()}},{key:"getIngressNameOptions",value:(a=(0,u.default)(l.default.mark((function e(){var t,a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,a=t.cluster,r=t.namespace,e.next=3,this.gatewayStore.getNewGatewayByProject({cluster:a,namespace:r});case 3:n=e.sent,u=(0,y.default)(n,(function(e){return{label:"".concat(e.ingressClass,"(").concat(e.name,")"),value:e.ingressClass}})),this.setState({ingressNameOption:u});case 6:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"componentDidUpdate",value:function(e){var t=this,a=this.props.formData;(0,v.default)(a,e.formData)||(this.setState({ingress:(0,d.default)(a,"ingress",{}),services:Object.values((0,m.default)(this.props.formData,["application","ingress"])||{}).map((function(e){return t.mapper(e.service)}))}),this.updateName())}},{key:"updateTLS",value:function(e){var t=(0,d.default)(e,"spec.rules",[]).filter((function(e){return"https"===e.protocol&&e.secretName})).reduce((function(e,t){var a=t.secretName,r=t.host,n=t.clusters,l=e.find((function(e){return e.secretName===a}));return l?(l.hosts=l.hosts||[],-1===l.hosts.indexOf(r)&&l.hosts.push(r)):e.push({hosts:[r],secretName:a,clusters:n}),e}),[]);(0,p.default)(e,"spec.tls",t)}},{key:"updateOverrides",value:function(){var e=[],t=this.props,a=t.isFederated,r=t.projectDetail,n=this.state.ingress,l=a?(0,d.default)(n,"spec.template"):n,u=(0,d.default)(l,"metadata.annotations",[]),o=(0,d.default)(l,"spec.rules",[]),i=(0,d.default)(l,"spec.tls",[]);(0,d.default)(r,"clusters",[]).forEach((function(t){var a=function(e){return e.filter((function(e){return e.clusters.includes(t.name)})).map((function(e){return(0,m.default)(e,"clusters")}))},r=[{path:"/spec/rules",value:a(o)},{path:"/spec/tls",value:a(i)}];(0,h.default)(u)||r.unshift({path:"/metadata/annotations",value:u}),e.push({clusterName:t.name,clusterOverrides:r})})),(0,p.default)(n,"spec.overrides",e)}},{key:"render",value:function(){var e=this.props,a=e.cluster,r=e.namespace,n=e.gateway,l=e.isFederated,u=e.projectDetail,o=e.formData,i=this.state,c=i.showAdd,s=i.ingress,f=i.services,p=i.selectRuleIndex,m=i.ingressNameOption,v=l?(0,d.default)(s,"spec.template"):s,y=(0,d.default)(v,"spec.rules[".concat(p,"]"),{}),O=(0,_.toJS)(this.secretStore.list.data);return b.default.createElement("div",{className:R.default.wrapper},b.default.createElement("div",{className:R.default.step},b.default.createElement("div",null,t("ROUTE_SETTINGS")),b.default.createElement("p",null,t("ROUTE_SETTINGS_DESC"))),!(0,h.default)(m)&&b.default.createElement(b.default.Fragment,null,b.default.createElement("div",{className:R.default.title},t("SELECT_INGRESSCLASSNAME")),b.default.createElement("div",{className:R.default.ingressClassName},b.default.createElement(E.Select,{name:"spec.ingressClassName",options:m,onChange:this.changeIngressClassName}))),b.default.createElement("div",{className:R.default.title},t("ROUTING_RULES")),b.default.createElement("div",{className:R.default.rules},b.default.createElement(N.default,{data:v,gateway:n,isFederated:l,projectDetail:u,onEdit:this.showEdit,onAdd:this.showAdd,onDelete:this.handleDelete})),b.default.createElement(T.default,{visible:c,data:y,cluster:a,namespace:r,isFederated:l,projectDetail:u,onOk:this.handleAdd,onCancel:this.closeEditModal,gateway:n,services:f,secrets:O,validData:(0,g.default)((null==o?void 0:o.ingress)||(null==o?void 0:o.Ingress))}))}}]),n}(b.default.Component);a.default=I},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(18),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(26)),p=n(r(790)),m=n(r(1607)),h=n(r(2670));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var g=function(e){(0,o.default)(r,e);var a=v(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"renderContent",value:function(){var e=this.props,a=e.data,r=e.onEdit,n=e.onDelete,l=e.onAdd,u=e.projectDetail,o=(0,d.default)(a,"spec.rules",[]),i=(0,d.default)(a,"spec.tls",[]);return s.default.createElement("ul",null,o.filter((function(e){return e.host})).map((function(e,t){return s.default.createElement(m.default,{key:"".concat(e.host,"-").concat(t),rule:e,tls:i,index:t,onEdit:r,onDelete:n,projectDetail:u})})),s.default.createElement("div",{className:h.default.add,onClick:l},s.default.createElement(p.default,{title:t("ADD_ROUTING_RULE"),description:t("ADD_ROUTING_RULE_DESC")})))}},{key:"render",value:function(){var e=this.props.error;return s.default.createElement("div",{className:h.default.wrapper},this.renderContent(),e&&s.default.createElement("p",{className:h.default.error},e))}}]),r}(s.default.Component);a.default=g,g.propTypes={data:f.default.object,onAdd:f.default.func,onDelete:f.default.func},g.defaultProps={data:{},onAdd:function(){},onDelete:function(){}}},function(e,t,a){e.exports={item:"_1kmSC__ph67BXHwPHIgdEt",icon:"WG4jVOyftN1J-3Qx0HfRQ",texts:"_2oTQpDYJHbQK9cSrwXrn5D",text:"_1kD3DJ4-DvWshSbWqKFvAW",title:"_3RZYExlr-Pjh7uww6Y6ZEb",description:"_9GO6DcfvOoroeH4GfG06N",clusters:"_367T3thgG7QtDZw5kAaWNy",add:"_2okV3MjC6xqfPB6AWhGQ3",paths:"_3dHV84JUfbE34Iu4EQYkNU",path:"f5_6svLoP460Z6PT3paLt",error:"_7YcL-GLR8AmCzM2qQJESE"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(29),r(18),r(48),r(97),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(17),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(29),r(18),r(28),r(48),r(97),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(38),r(7),r(32);var l=n(r(315)),u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(26)),p=n(r(63)),m=n(r(74)),h=n(r(0)),v=n(r(1)),g=r(186),y=n(r(787)),E=n(r(829)),b=n(r(1330)),_=n(r(917)),O=r(72),S=r(52),C=n(r(1331));function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t1){a=!0;break}n++}})),a},n.handleProtocolChange=function(e){n.setState({protocol:e})},n.handleModeChange=function(e){n.setState({type:e})},n.handleSubmit=function(e){var t=n.props.onOk;if("auto"===n.state.type){var a=n.props,r=a.gateway,l=a.projectDetail,u=a.namespace,o=(0,d.default)(e,"http.paths[0].backend.service.name"),i=(0,d.default)(l,'_originData.metadata.labels["kubesphere.io/namespace"]')||u;t(k(k({},e),{},{protocol:"http",host:r.isHostName?r.defaultIngress:"".concat((0,S.withDot)(o)).concat((0,S.withDot)(i)).concat((0,S.withDot)(r.defaultIngress),"nip.io")}))}else t(e)},n.domainValidator=function(e,a,r){var l=n.props,u=l.isFederated,o=l.data,i=l.validData;if(!a)return r();var c=n.props.cluster||n.defaultClusters,s=(0,d.default)(i,"metadata.namespace","");u&&((0,m.default)(i,"apiVersion","networking.k8s.io/v1"),(0,m.default)(i,"kind","Ingress"),(0,m.default)(i,"spec",{})),(0,m.default)(i,"spec.rules",[{host:a}]),u?Promise.all(o.clusters.map((function(e){return n.ingressStore.checkValidDomain({cluster:e,namespace:s},i).then((function(e){return e.exist}))}))).then((function(a){if(a.some((function(e){return e})))return r({message:t("EXIT_DOMAIN_DESC"),field:e.field});r()})):(c=u?"":c,n.ingressStore.checkValidDomain({cluster:c,namespace:s},i).then((function(a){if(a.exist)return r({message:t("EXIT_DOMAIN_DESC"),field:e.field});r()})))},n.state={type:"specify",service:"",protocol:(0,d.default)(e,"data.protocol","http")},n.formRef=h.default.createRef(),n.ingressStore=new _.default,n}return(0,i.default)(r,[{key:"getType",value:function(e){var t=(0,d.default)(e,"host");if(!t)return"auto";var a=this.props.gateway,r=(0,d.default)(e,"http.paths[0].backend.service.name"),n=a.defaultIngress,l=a.namespace;return t==="".concat(r,".").concat(l,".").concat(n,".nip.io")?"auto":"specify"}},{key:"renderForm",value:function(){var e,a,r=this.state,n=r.type,l=r.protocol,u=this.props.services;return h.default.createElement(h.default.Fragment,null,"specify"===n&&h.default.createElement(h.default.Fragment,null,h.default.createElement(g.Form.Item,{label:t("DOMAIN_NAME_TCAP"),key:null===(e=this.props.data)||void 0===e||null===(a=e.clusters)||void 0===a?void 0:a.length,rules:[{required:!0,message:t("DOMAIN_NAME_EMPTY_DESC")},{pattern:O.PATTERN_HOST,message:t("INVALID_DOMAIN_DESC")},{validator:this.domainValidator}]},h.default.createElement(g.Input,{name:"host",autoFocus:!0})),h.default.createElement(g.Form.Item,{label:t("PROTOCOL")},h.default.createElement(g.Select,{name:"protocol",defaultValue:"http",onChange:this.handleProtocolChange,options:this.protocols})),"https"===l&&h.default.createElement(g.Form.Item,{label:t("SECRET")},h.default.createElement(g.Select,{name:"secretName",options:this.secrets,placeholder:" "}))),h.default.createElement(g.Form.Item,{label:t("PATH_PL"),rules:[{required:!0,message:t("PATH_EMPTY_DESC")},{validator:this.pathValidator,checkOnSubmit:!0}]},h.default.createElement(E.default,{name:"http.paths",itemType:"object",addText:t("ADD"),checkItemValid:this.checkItemValid},h.default.createElement(b.default,{services:u}))))}},{key:"render",value:function(){var e=this,a=this.props,r=a.data,n=a.isFederated;return h.default.createElement(y.default.Form,(0,l.default)({title:(0,p.default)(r)?t("ADD_ROUTING_RULE"):t("EDIT_ROUTING_RULES"),width:920},this.props,{onOk:this.handleSubmit}),n&&h.default.createElement(g.Form.Group,{label:t("CLUSTER")},h.default.createElement(g.Form.Item,null,h.default.createElement(C.default,{name:"clusters",options:this.clusters,defaultValue:this.defaultClusters,onChange:function(){(0,m.default)(r,"host",""),e.forceUpdate()}}))),h.default.createElement(g.Form.Group,null,this.renderForm()))}},{key:"protocols",get:function(){return[{label:"HTTP",value:"http"},{label:"HTTPS",value:"https"}]}},{key:"secrets",get:function(){return this.props.secrets.map((function(e){return{label:e.name,value:e.name}}))}},{key:"clusters",get:function(){return(0,d.default)(this.props,"projectDetail.clusters",[]).slice()}},{key:"clusterNames",get:function(){var e;return null==this||null===(e=this.clusters)||void 0===e?void 0:e.map((function(e){return e.name}))}},{key:"defaultClusters",get:function(){return(0,d.default)(this.props,"projectDetail.clusters",[]).map((function(e){return e.name}))}}]),r}(h.default.Component);a.default=T,T.propTypes={data:v.default.object,secrets:v.default.array,services:v.default.array,gateway:v.default.object},T.defaultProps={data:{},secrets:[],services:[],gateway:{}}},function(e,t,a){e.exports={wrapper:"_2hbsokbzN5hp5LxUC8iC_g",step:"aaRAmJaOKA075Il_FYhK2",title:"_24SLKDqrt12UAU6QIqBAa6",ingressClassName:"_2dwjt-_eLMxBcellsKHTca",rules:"_2vD7NSXS51pA2tah6hdoeM"}},function(e,a,r){"use strict";r(15);var n=r(20);r(6),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(6),r(28),r(42),r(10),r(4),r(23),r(57),r(17),r(7);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(58)),f=n(r(0)),d=n(r(1)),p=r(186),m=n(r(884)),h=n(r(2674));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var g=function(e){(0,o.default)(r,e);var a=v(r);function r(e){var t,n,u,o,i,c;return(0,l.default)(this,r),(t=a.call(this,e)).data=(n=e.formTemplate,u=n.application,o=n.ingress,i=(0,s.default)(n,["application","ingress"]),c=[u,o],Object.keys(i).forEach((function(e){i[e].workload&&c.push(i[e].workload),i[e].service&&c.push(i[e].service)})),c),t.editor=f.default.createRef(),t}return(0,u.default)(r,[{key:"getData",value:function(){return this.editor.current.getData()}},{key:"render",value:function(){return f.default.createElement("div",{className:h.default.wrapper},f.default.createElement("div",{className:h.default.step},f.default.createElement("div",null,t("EDIT_YAML")),f.default.createElement("p",null,t("CREATE_BY_YAML_DESC"))),f.default.createElement("div",{className:h.default.codeWrapper},f.default.createElement("div",{className:h.default.pane},f.default.createElement("div",{className:h.default.title},f.default.createElement(p.Icon,{name:"coding",size:20}),f.default.createElement("span",null,t("YAML_FILE"))),f.default.createElement(m.default,{ref:this.editor,className:h.default.editor,value:this.data}))))}}]),r}(f.default.Component);a.default=g,g.propTypes={formTemplate:d.default.object,onOk:d.default.func,isSubmitting:d.default.bool},g.defaultProps={onOk:function(){},isSubmitting:!1}},function(e,t,a){e.exports={wrapper:"_2DbNJPdfgI4dgBJisOntmF",step:"_2R0Y1Bov3UM9xHfuQx18YU",codeWrapper:"A3dbNbkmfuxiqBXaeGMFW",pane:"_3pEJUsXvQi9so5hxtsl2EC",editor:"_2dd7dYos5S09v8It9Eak_Z",title:"_3H0QVPSbai5_e60lcson19"}},function(e,t,a){e.exports={modal:"p8a6H-jXk5OnSxqkTWQn7",body:"QLzi6PtdDSAbo1ZjB_ejT",wrapper:"_1FueZNETQGMwoOrD2sbcQW",steps:"_2u31JZwaeV3OsrEiBfQM1h",header:"_1O2uhbM6HbwUYsq6yl2mBa",headerBottom:"_1b15o9UoGNxLLpM-BKvPOU",title:"_2Q1EYtOJAJrVd0Pila76Zv",content:"_2EnfwBZjZ9ExnG507HuLf0",footer:"_1Y38fHH45ZkbYyovxA_mJj"}},,,function(e,t,a){e.exports={wrapper:"_7-12p6hcf7X0VthZc5rST"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={wrapper:"_3vD3gkqPGNxpeg-IpdujoY"}},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(16),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(11),a(42),a(16),a(9),a(4),a(23),a(57),a(17);var n,l=r(a(61)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(49)),d=a(14);function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var m=(n=function(e){(0,i.default)(a,e);var t=p(a);function a(){return(0,u.default)(this,a),t.apply(this,arguments)}return(0,o.default)(a,[{key:"addItem",value:function(e){this.data=[].concat((0,l.default)(this.data),[e])}},{key:"deleteItem",value:function(e){this.data=this.data.filter((function(t){return t.name!==e.name}))}}]),a}(r(a(120)).default),(0,f.default)(n.prototype,"addItem",[d.action],Object.getOwnPropertyDescriptor(n.prototype,"addItem"),n.prototype),(0,f.default)(n.prototype,"deleteItem",[d.action],Object.getOwnPropertyDescriptor(n.prototype,"deleteItem"),n.prototype),n);t.default=m},,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={"tags-duotone":'\n\n\n\n',"chain-off-duotone":'\n\n\n\n\n',event:'\n\n\n',"switch-button-duotone":'\n ',"volume-off-duotone":'',"bell-off-duotone":'',"earth-fill":'',"clock-duotone":''}},,,,,,function(e,t,a){e.exports={desc:"_2tdVqiHSAO-_hh2j8kmDdY",narrowItem:"_2dCR56ukrNg2YglIMXZMEw"}},,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={wrapper:"_2KCv1PnULxt1qFyQJeysBX",header:"_1F-0HDMWN3VFriGu-tr3Yx",title:"_13MPI-7qlosXGEs9LAnahA",select:"_3NcEBNmpoac-j5yvlYEfRp"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={accessModeWrapper:"t3ac6iAwz0VNleKctOM3q",accessMode:"_2ntH9Ni8zzlXvi9v2KCUYd"}},function(e,t,a){e.exports={wrapper:"_3RvD5UEuKHt_T1xybRhGfS",select:"_1aQ7ChfUm20NELU7IiXMSM"}},function(e,t,a){e.exports={wrapper:"btc8Ihe1GfSKeBPW4ocRC",value:"_1xboWqu4MnvlYbNanj_e",text:"_2_YxJhzeMUvmjUAngLClSH",buttons:"_28QqiVnCn-59TULfI9fWSA"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(3)),p=r(186),m=n(r(240)),h=n(r(952)),v=n(r(2921));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=function(e){(0,o.default)(r,e);var a=g(r);function r(e){var n;return(0,l.default)(this,r),(n=a.call(this,e)).uploaderProps={name:"file",action:"/images/upload",accept:"image/*",beforeUpload:function(e){return!(e.size>2097152)||(m.default.error(t("FILE_OVERSIZED_TIP")),!1)},onSuccess:function(t){t&&e.onChange(t.path)}},n}return(0,u.default)(r,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.value,r=e.placeholder,n=e.defaultLogo;return s.default.createElement(p.Columns,{className:(0,d.default)("is-variable is-2",t)},s.default.createElement(p.Column,{className:"is-narrow"},s.default.createElement("img",{className:(0,d.default)(v.default.image,"upload-preview"),src:a||n})),s.default.createElement(p.Column,null,s.default.createElement(h.default,this.uploaderProps,s.default.createElement("div",{className:v.default.upload},s.default.createElement(p.Icon,{size:32,name:"upload"}),s.default.createElement("p",null,r)))))}}]),r}(s.default.Component);a.default=y,y.propTypes={className:f.default.string,defaultLogo:f.default.string,placeholder:f.default.string,value:f.default.string,onChange:f.default.func},y.defaultProps={className:"",value:"",onChange:function(){}}},function(e,t,a){e.exports={image:"_167OKUS_EKBqwDQxcIx-4e",upload:"_2t1CYrv42g1fxOKAN8Cxrv"}},function(e,t,a){e.exports={wrapper:"_4ZwD-XBeeb89uHJUpnc9X",trigger:"_39IOrUHzeoispGPqyhIGmq",content:"_1ddoFZzzUSM-yo3jVhK8Dv",rules:"_3J0m5Rox1YBbKgpQhXuhAt",barWrapper:"_3cTk_xH00ce2_lz197ulvB",bar:"pMEaabr1XWMm3r_fW2afr",tip:"yLbagG9qc0xvXpKUX3Ltx",icon:"_1CXCvE_9U9AkVY2j9zINU2",selected:"_2_Gwnizz4eeI_iF5yIUwav"}},function(e,t,a){e.exports={wrapper:"_3SwZze98375W9bhfjiqN-o",slider:"_28M70O8IpxNUXf81fNeAAx",floatContent:"XqxDCyE_PSNWzijpRx5vU"}},function(e,t,a){},function(e,t,a){e.exports={container:"_2VDZ-7eQWd8zMV87f6SbU-",select:"_1njJEaKU6jyyl9YDFHgWWW"}},function(e,t,a){e.exports={option:"_1Iz4ohvzuXgnhL83dbwRxn"}},function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(5),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var l=n(a(30)),u=n(a(58)),o=n(a(36)),i=n(a(37)),c=n(a(55)),s=n(a(56)),f=n(a(51)),d=r(a(0)),p=n(a(158)),m=n(a(470));function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function v(e){for(var t=1;t63)return void h.default.error({content:t("PATTERN_TAG_VALUE_INVALID_TIP")});e.setState({value:""},(function(){n(u)}))}}else"Backspace"===a.key&&l()},e}return(0,o.default)(r,[{key:"render",value:function(){var e=this,t=this.state.value,a=this.props,r=a.style,n=a.placeholder;return f.default.createElement("div",{style:r,className:g.default.autosuggest,ref:function(t){e.autosuggest=t}},f.default.createElement(m.default,{className:g.default.autosuggestInput,type:"text",onKeyDown:this.handlePressEnter,onChange:this.handleChange,placeholder:n,ref:function(t){e.inputBox=t},value:t}))}}]),r}(f.Component);E.propTypes={onChange:d.default.func,onDelete:d.default.func,prefixCls:d.default.string,className:d.default.string,style:d.default.string,placeholder:d.default.string},E.defaultProps={prefixCls:"autosuggest",onAdd:p.default,onDelete:p.default,onChange:p.default};var b=E;a.default=b},,function(e,t,a){e.exports={extraBox:"_1XMQaAa8OBSWxpBisNQs07",IconBox:"_2IfBBHb39w_3FGYztJhAaA","input-padding-right-30":"_1Qlf_8Cc_90DXEXYz5Vg_y"}},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"UnitInput",{enumerable:!0,get:function(){return u.default}}),t.TimeUnitInput=void 0;var n=a(52),l=a(467),u=r(a(2933)),o=(0,n.withProps)(u.default,{units:l.timeUnit});t.TimeUnitInput=o},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(11),r(31),r(6),r(84),r(18),r(27),r(9),r(13),r(10),r(85),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(11),r(31),r(6),r(84),r(18),r(28),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(85),r(7);var u=l(r(315)),o=l(r(96)),i=l(r(30)),c=l(r(58)),s=r(186),f=l(r(799)),d=l(r(1)),p=n(r(0)),m=r(52),h=l(r(2934));function v(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function g(e){for(var t=1;t0&&void 0!==o[0]?o[0]:{},r=e.props.cluster,n=e.state.groupNamespace,t.next=5,e.projectStore.fetchList(T({cluster:r},a));case 5:l=t.sent,u=l.map((function(e){return T(T({},e),{},{nodegroup:n.some((function(t){return t.name===e.name&&t.nodegroup}))})})),e.setState({projectData:[].concat((0,i.default)(e.state.projectData),(0,i.default)(u))});case 8:case"end":return t.stop()}}),t)}))),e.fetchNodeGroupStore=(0,d.default)(s.default.mark((function t(){var a,r;return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.props.cluster,t.next=3,e.nodeGroupStore.fetchAllNamespaces({cluster:a,limit:"-1",page:1});case 3:r=t.sent,e.setState({groupNamespace:r.map((function(e){return{name:e.name,nodegroup:""===(0,_.default)(e,'labels["apps.edgewize.io/nodegroup"]')}}))});case 5:case"end":return t.stop()}}),t)}))),e.optionRenderer=function(a){return y.default.createElement("div",{className:k.default.tipBox},y.default.createElement("div",{className:k.default.option},a.isFedManaged?y.default.createElement("img",{className:k.default.indicator,src:"/assets/cluster.svg"}):y.default.createElement(O.Icon,{name:"project"}),a.label),(a.isFedManaged||!a.nodegroup)&&y.default.createElement(O.Tooltip,{content:e.props.tipMessage||(a.isFedManaged?t("FEDPROJECT_RESOURCE_TIP"):!a.nodegroup&&"nodegrup")},y.default.createElement(O.Icon,{className:k.default.tip,name:"question"})))},e}return(0,m.default)(r,[{key:"componentDidMount",value:function(){this.fetchData()}},{key:"getProjects",value:function(){var e=this.props.defaultValue,t=this.state.projectData,a=t.filter((function(e){return"Terminating"!==e.status})).map((function(e){return{label:e.name,value:e.name,disabled:e.isFedManaged||!e.nodegroup,isFedManaged:e.isFedManaged,nodegroup:e.nodegroup}}));return e&&!t.find((function(t){return t.name===e}))&&a.unshift({label:e,value:e}),a}},{key:"render",value:function(){var e=this.props,t=(e.cluster,(0,o.default)(e,["cluster"]));return!t.value&&t.defaultValue&&(t.value=t.defaultValue),y.default.createElement(O.Select,(0,u.default)({options:this.getProjects(),pagination:(0,b.default)(this.projectStore.list,["page","limit","total"]),isLoading:this.projectStore.list.isLoading,valueRenderer:this.optionRenderer,optionRenderer:this.optionRenderer,onFetch:this.fetchProjects,searchable:!0,clearable:!0,placeholder:" "},t))}}]),r}(y.Component))||f;a.default=w},function(e,t,a){e.exports={option:"_3Ct5TvyryxAmQgGcuMAOjM",tip:"_1Y5Wsb92G4yhdT_HetNO3G",tipBox:"_167pjDZ6cyN37GR-Q-Pp9f"}},,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={reason:"_2dAqW00YgMOSGORjuFVBGs",condition:"_3AeobLZKN_rHf4jlnsiMQk",title:"_3TkAdRLw937iktrSAezDu7",warning:"ALCcOSqNlYNtz2BKsiq8d",error:"_28enlxYAYUjvqkyLqd5qPC",reasonDesc:"dlkjsSoal876oQiTVfCr7"}},function(e,a,r){"use strict";r(15);var n=r(157);r(84),r(10),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=e.data,r=(0,l.useMemo)((function(){var e;return null==a||null===(e=a.annotations)||void 0===e?void 0:e["kubesphere.io/relatedHPA"]}),[a]),n=(0,l.useMemo)((function(){return Object.keys(a.labels).includes("autoscaling.kubeshpere.io/name")}),[a]),o=(0,l.useMemo)((function(){return n?t("WORKLOAD_SCALING_TOOL_TIP"):t("HPA_SET_TIP")})),i=(0,l.useMemo)((function(){return n?"stretch":"timed-task"}));if(!r&&!n)return null;return l.default.createElement(u.Tooltip,{content:o},l.default.createElement(u.Icon,{name:i,size:18}))},r(84),r(10),r(85);var l=n(r(0)),u=r(186)},function(e,t,a){e.exports={status:"_11_Dlx6pO5mTVNNIwnnhEU"}},,,,,,,,,,,,,,,,,function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(31),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(31),r(6),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l=n(r(315)),u=n(r(58)),o=n(r(30)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(1)),h=n(r(3)),v=n(r(63)),g=n(r(26)),y=r(186),E=n(r(828)),b=n(r(2974)),_=n(r(1690));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=t.map((function(e){var t=e.host,a=void 0===t?"":t,r=e.port,n=void 0===r?"":r;return"".concat(a.replace(/,/g,""),":").concat(n)})).join(",");e.props.onChange(a)},e}return(0,o.default)(r,[{key:"render",value:function(){var e=(0,d.default)(this.props,"value","").split(",").map((function(e){var t=e.match(/(.*):(.*)$/)||[],a=(0,l.default)(t,3),r=a[1],n=void 0===r?"":r,u=a[2];return{port:void 0===u?"":u,host:n}}));return f.default.createElement(m.default,{addText:t("ADD_SERVICE_ADDRESS"),itemType:"object",value:e,onChange:this.onChange},f.default.createElement(p.default,{className:g.default.address},f.default.createElement(v.Input,{name:"host",className:g.default.host,placeholder:t("EXAMPLE_VALUE",{value:"192.168.1.10"})}),f.default.createElement(h.default,{className:g.default.port,name:"port",min:0,max:65535,placeholder:t("EXAMPLE_VALUE",{value:9200}),integer:!0})))}}]),r}(f.default.Component);a.default=E},function(e,t,a){e.exports={address:"_2Y-pkqthIJRIsP4ExOInjH",host:"h1zpisJbm-ZoDbaSXptJj",port:"_2UTT5V7_N5_xNrvXpJIG5b"}},function(e,t,a){e.exports={path:"_1MJQsfqeDDP96NX-4TVyLe",columns:"_2dymll3HxLR4qGfdodyzRb",desc:"_1q83WoQ9jB2uwX0GBmVgmT"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(12),a(109),a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(109),a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(30)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=r(a(1)),d=a(186),p=r(a(3)),m=r(a(1196));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(a,e);var t=h(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;un-1)E.default.error({content:t.html("MAX_EAMIL_COUNT",{count:n}),duration:1e3});else if(r.some((function(e){return e===a})))E.default.error({content:t("EMAIL_EXISTS"),duration:1e3});else{if(b.PATTERN_EMAIL.test(a))return!0;E.default.error({content:t("INVALID_EMAIL"),duration:1e3})}else E.default.error({content:t("EMAIL_EMPTY_DESC"),duration:1e3})},e.handleAdd=function(t){var a=e.props,r=a.value;(0,a.onChange)([].concat((0,l.default)(r),[t]))},e.handleDelete=function(t){var a=e.props,r=a.value;(0,a.onChange)(r.filter((function(e){return e!==t})))},e.renderListItem=function(a){return f.default.createElement("div",null,a," ",a===e.userEmail&&f.default.createElement(v.Tag,null,t("CURRENT_USER")))},e}return(0,o.default)(r,[{key:"render",value:function(){var e=this,t=this.props,a=t.value,r=t.className;return f.default.createElement("div",{className:(0,p.default)(O.default.wrapper,r)},f.default.createElement(y.default,{placeholder:"user@example.com",validate:this.validateMail,onAdd:this.handleAdd,showIcon:!0}),!(0,m.default)(a)&&f.default.createElement("div",{className:O.default.listWrapper},f.default.createElement(g.default,null,a.map((function(t){return f.default.createElement(g.default.Item,{key:t,className:O.default.listItem,title:e.renderListItem(t),onDelete:function(){return e.handleDelete(t)}})})))))}},{key:"userEmail",get:function(){return(0,h.default)(globals,"user.email")}}]),r}(f.default.Component);a.default=C,C.propTypes={value:d.default.array,onChange:d.default.func},C.defaultProps={value:[],onChange:function(){}}},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(11),a(18),a(42),a(4),a(23),a(57),a(17);var n=r(a(61)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=r(a(1)),d=r(a(3)),p=r(a(63)),m=r(a(812)),h=r(a(1060)),v=r(a(1378));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=function(e){(0,o.default)(a,e);var t=g(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,u=new Array(r),o=0;o 85',for:"1m",labels:{rule_id:"e56cf89c-c323-4754-a6c4-2f4ff4e91458"},severity:"warning"},{alert:"AvailableDiskLessThan15Percent",annotations:{message:"",summary:"磁盘可用百分比小于15%。"},expr:'round(sum(kubelet_volume_stats_available_bytes{namespace="namespaceName",persistentvolumeclaim=~"data-0-clusterId-kafka.*"})/sum(kubelet_volume_stats_capacity_bytes{namespace="namespaceName",persistentvolumeclaim=~"data-0-clusterId-kafka.*"})*100,0.1) < 15',for:"1m",labels:{rule_id:"9c52bb99-4146-4ab6-8002-2bebac7f9bb2"},severity:"warning"},{alert:"ExistOfflinePartitions",annotations:{message:"",summary:"存在不可用的partitions。"},expr:'sum(kafka_controller_kafkacontroller_offlinepartitionscount{namespace="namespaceName",strimzi_io_cluster="clusterId"}) > 0',for:"1m",labels:{rule_id:"4bce37ac-fe22-42b9-854a-097a578bb52a"},severity:"error"}]}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.redisAlertYaml=void 0;t.redisAlertYaml={apiVersion:"alerting.kubesphere.io/v2beta1",kind:"RuleGroup",metadata:{annotations:{dmp_managed_field:'[{"metricType":"Memory Usage","comparator":">=","thresholds":"70"}]',"kubesphere.io/creator":"admin"},creationTimestamp:"2023-10-07T08:11:25Z",generation:1,labels:{"alerting.kubesphere.io/enable":"true",app_instance:"clusterId",openpitrix_app_id:"app-redis-sentinel"},name:"clusterId-default",namespace:"namespaceName",uid:"94e4f243-9027-4cea-a663-7b4989d2c4cc"},spec:{rules:[{alert:"MemoryUsage",annotations:{message:"RadonDB Redis: clusterId,当前内存使用率超过 %。 当前值:{{ $value }}",summary:"RadonDB Redis 【clusterId】 当前内存使用率超过 %"},expr:'redis_memory_used_bytes{namespace="namespaceName",service=~".*clusterId.*"}/redis_memory_max_bytes{namespace="namespaceName",service=~".*clusterId.*"}*100 >= 70',for:"1m",labels:{rule_id:"794e0a39-4d7c-42fc-91ae-c8c45d8110b3"},severity:"warning"}]}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.openSearchAlertYaml=void 0;t.openSearchAlertYaml={apiVersion:"alerting.kubesphere.io/v2beta1",kind:"RuleGroup",metadata:{annotations:{dmp_managed_field:'[{"metricType":"OpenSearchAvailableDiskLessThan15%","comparator":"-","thresholds":""},{"metricType":"OpenSearchAvailableDiskLessThan10%","comparator":"-","thresholds":""},{"metricType":"OpenSearchHeapMemTooHigh90%","comparator":"-","thresholds":""}]',"kubesphere.io/creator":"admin"},creationTimestamp:"2023-10-07T07:53:28Z",generation:3,labels:{"alerting.kubesphere.io/enable":"true",app_instance:"clusterId",openpitrix_app_id:"app-opensearch"},name:"clusterId-default",namespace:"namespaceName",uid:"defeed56-e6b0-4b33-a677-ef232b5c8329"},spec:{rules:[{alert:"AvailableDiskLessThan15Percent",annotations:{message:"RadonDB OpenSearch: clusterId,磁盘可用百分比小于15%。 当前值:{{ $value }}",summary:"RadonDB OpenSearch 【clusterId】 磁盘可用百分比小于15%"},expr:'min(round(opensearch_fs_total_available_bytes{service="clusterId",namespace="namespaceName"}/opensearch_fs_total_total_bytes{service="clusterId",namespace="namespaceName"}*100,0.1))<15',for:"1m",labels:{rule_id:"0d159444-bd60-4777-a327-075487d62549"},severity:"warning"},{alert:"AvailableDiskLessThan10Percent",annotations:{message:"RadonDB OpenSearch: clusterId,磁盘可用百分比小于10%。 当前值:{{ $value }}",summary:"RadonDB OpenSearch 【clusterId】 磁盘可用百分比小于10%"},expr:'min(round(opensearch_fs_total_available_bytes{service="clusterId",namespace="namespaceName"}/opensearch_fs_total_total_bytes{service="clusterId",namespace="namespaceName"}*100,0.1))<10',for:"1m",labels:{rule_id:"37ac67a4-3fca-41d6-a54d-0813d5a7ee21"},severity:"error"}]}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.pgAlertYaml=void 0;t.pgAlertYaml={apiVersion:"alerting.kubesphere.io/v2beta1",kind:"RuleGroup",metadata:{annotations:{dmp_managed_field:'[{"metricType":"PGDisk","comparator":">=","thresholds":85}]',"kubesphere.io/creator":"admin"},creationTimestamp:"2023-10-08T04:59:40Z",generation:1,labels:{"alerting.kubesphere.io/enable":"true",app_instance:"clusterId",openpitrix_app_id:"app-postgresql"},name:"clusterId-default",namespace:"namespaceName",uid:"2c3c72f8-5239-45b8-af87-9721cea217fd"},spec:{rules:[{alert:"PGDisk",annotations:{message:"RadonDB PostgreSQL: clusterId,磁盘使用率超过 %。 当前值:{{ $value }}",summary:"RadonDB PostgreSQL 【clusterId】 磁盘使用率超过 %。"},expr:'kubelet_volume_stats_used_bytes{persistentvolumeclaim=~".*clusterId-readwriteinstance.*|.*clusterId-readonlyinstance.*"} / kubelet_volume_stats_capacity_bytes{persistentvolumeclaim=~".*clusterId-readwriteinstance.*|.*clusterId-readonlyinstance.*"} * 100 >= 85',for:"1m",labels:{rule_id:"e7a5e07a-979f-4503-8fda-1c992e920d80"},severity:"warning"}]}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.MySQLAlertYaml=void 0;t.MySQLAlertYaml={apiVersion:"alerting.kubesphere.io/v2beta1",kind:"RuleGroup",metadata:{annotations:{dmp_managed_field:'[{"metricType":"MySQLDisk","comparator":">=","thresholds":85}]',"kubesphere.io/creator":"admin"},creationTimestamp:"2023-10-09T03:17:04Z",generation:1,labels:{"alerting.kubesphere.io/enable":"true",app_instance:"clusterId",openpitrix_app_id:"app-mysql"},name:"clusterId-default",namespace:"namespaceName",uid:"0361ef38-ed49-477f-a473-0da2d5a90b45"},spec:{rules:[{alert:"MySQLDisk",annotations:{message:"RadonDB MySQL: clusterId,磁盘使用率超过 %。 当前值:{{ $value }}",summary:"RadonDB MySQL 【clusterId】 磁盘使用率超过 %"},expr:'(kubelet_volume_stats_used_bytes{persistentvolumeclaim=~".*clusterId.*"} / kubelet_volume_stats_capacity_bytes{persistentvolumeclaim=~".*clusterId.*"} * 100) >= 85',for:"1m",labels:{rule_id:"c0b9010a-d74c-4bf9-8b5a-b7a6105f6f93"},severity:"warning"}]}}},,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(4),r(319),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=r(186),h=n(r(836)),v=n(r(3235));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var y=function(e){(0,i.default)(r,e);var a=g(r);function r(e){var t;return(0,u.default)(this,r),(t=a.call(this,e)).handleClickImage=function(e){var a=e.currentTarget.dataset.idx;t.stopAnimation(),t.setState({showOverlay:!0,currentIdx:parseInt(a,10)||0})},t.closeOverlay=function(){t.setState({showOverlay:!1})},t.getPrevNextIdx=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"next",a=t.state.currentIdx,r=t.props.images.length;return"next"===e?a+1>=r?0:a+1:a-1<0?r-1:a-1},t.showNextPic=function(){t.setState({currentIdx:t.getPrevNextIdx()})},t.handleClickPrev=function(){t.goToIdx(t.getPrevNextIdx("prev"))},t.handleClickNext=function(){t.goToIdx(t.getPrevNextIdx())},t.handleClickIndicator=function(e){t.goToIdx(e)},t.goToIdx=function(e){t.stopAnimation(),t.setState({currentIdx:e})},t.state={showOverlay:!1,currentIdx:e.defaultIdx||0},t}return(0,o.default)(r,[{key:"componentDidUpdate",value:function(e,t){var a=this.state.currentIdx;a!==t.currentIdx&&this.props.onChangeImage(this.props.images[a])}},{key:"componentWillUnmount",value:function(){this.stopAnimation()}},{key:"stopAnimation",value:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}},{key:"renderOverlay",value:function(){var e=this.state,t=e.showOverlay,a=e.currentIdx,r=this.props.images[a];return t?f.default.createElement("div",{className:v.default.overlay},f.default.createElement("div",{className:v.default.closeOverlay,onClick:this.closeOverlay},f.default.createElement(m.Icon,{name:"close",size:24,type:"dark"})),f.default.createElement("div",{className:v.default.viewCont},f.default.createElement("label",{className:v.default.pre,onClick:this.handleClickPrev},f.default.createElement(m.Icon,{name:"chevron-left",size:24,type:"dark"})),f.default.createElement("label",{className:v.default.next,onClick:this.handleClickNext},f.default.createElement(m.Icon,{name:"chevron-right",size:24,type:"dark"})),f.default.createElement("div",{className:v.default.overlayPic},f.default.createElement(h.default,{src:r})))):null}},{key:"render",value:function(){var e=this,a=this.props,r=a.images,n=a.className,u=this.state.currentIdx,o=210*r.length,i=210*u;return r.length?f.default.createElement("div",{className:(0,p.default)(v.default.slider,n)},f.default.createElement("label",{className:v.default.pre,onClick:this.handleClickPrev},f.default.createElement(m.Icon,{name:"chevron-left",size:24,type:"dark"})),f.default.createElement("label",{className:v.default.next,onClick:this.handleClickNext},f.default.createElement(m.Icon,{name:"chevron-right",size:24,type:"dark"})),r.length>2&&f.default.createElement("div",{className:v.default.dotList},r.map((function(t,a){return f.default.createElement("label",{key:"".concat(t,"-").concat(a),className:v.default.dot,onClick:function(){return e.handleClickIndicator(a)}},f.default.createElement("span",{className:(0,p.default)((0,l.default)({},v.default.active,u===a))}))}))),f.default.createElement("div",{className:v.default.listOuter},f.default.createElement("ul",{className:v.default.pictureList,style:{width:"".concat(o,"px"),left:"-".concat(i,"px")}},r.map((function(t,a){return f.default.createElement("li",{className:v.default.pictureOuter,key:a},f.default.createElement("div",{className:v.default.picture,"data-idx":a,onClick:e.handleClickImage},f.default.createElement(h.default,{src:t})))})))),this.renderOverlay()):f.default.createElement("div",{className:v.default.slider},t("NONE"))}}]),r}(f.default.PureComponent);a.default=y,y.propTypes={images:d.default.array.isRequired,onChangeImage:d.default.func,defaultIdx:d.default.number},y.defaultProps={images:[],onChangeImage:function(){},defaultIdx:0}},function(e,t,a){e.exports={slider:"m_31JSg6nUGhFZ5iAQUjU",pre:"P-w7KNnKvWDxXSrhHQxtZ",next:"vOIr4lPa5nsQ56p4JEDGu",disabled:"_2_nv3-wXNbTm1BHHlvUTy4",dotList:"_1TLzD0vpvRi3GaoYbX8pdk",dot:"_1Rem-XXjxrvGjbZZyM7Dqh",active:"_37ns6MNNforGPal8rdECz7",listOuter:"csullZjO0y8IcXlc9LirY",pictureList:"LSi2b_Lkrdk8wVRxlhwhQ",pictureOuter:"_2oFhbjePYqBFsvRHbpFwgG",picture:"_1m-TiVY9Dxxxc1YDUiDhF1",overlay:"_7a8Ix3gbvxd6JTh4tz75n",viewCont:"Hj97dEjPT3P_BYypqENEP",overlayPic:"_3ssVJsi-xownM8NUxZXV5e",fadeIn:"_2uybTeXUle2_galUE-2PT8",closeOverlay:"_3BFnq_4zFEzfnOD7IqbdJN"}},function(e,t,a){e.exports={appInfo:"_3AilH8qFkHx_4avHhZDK_4",title:"_12ML492fWTSMsK4vhUQt4U",versions:"_16JKvu0z7Y-Y4tB-Qsj0Ym",name:"_1mGDyZCPCDchoHaPc_BfFV",date:"_1j85iHLJPDExOlvmRKaqYF",desc:"_1BNX8-yI6Ox7Laya_AeDlG"}},,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={desc:"_3eh_E2EhQNcWLy8V-DL0TU"}},,,,,,,,function(e,t,a){e.exports={option:"_3mIiIau0E55cqSsXvtolhg",select:"_34FEBq7gI9Px86nIWbr_Pt","multi-repo":"_2nIdZAqBbg0vOZn6U8y_f-"}},,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(18),a(48),a(16),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(48),a(42),a(16),a(9),a(4),a(23),a(57),a(17);var n,l,u,o,i,c,s,f=r(a(61)),d=r(a(65)),p=r(a(36)),m=r(a(37)),h=r(a(88)),v=r(a(55)),g=r(a(56)),y=r(a(51)),E=r(a(49)),b=(r(a(66)),r(a(0))),_=a(14),O=a(239),S=r(a(3270)),C=r(a(1734));function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,y.default)(e);if(t){var n=(0,y.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,g.default)(this,a)}}var k=(0,O.observer)((s=c=function(e){(0,v.default)(a,e);var t=D(a);function a(){var e;(0,p.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l=0&&t.sort>=0?e.sort-t.sort:t.sort-e.sort}))})).then(t.callback)},t.handleOk=function(){t.props.onAddStep({name:"input",arguments:[{key:"message",value:{isLiteral:!0,value:t.state.value}},{key:"submitter",value:{isLiteral:!0,value:t.state.submitter.join(", ")}}]})},t.memberStore=new R.default;var n=t.getDefaultData(),l=n.value,u=n.submitter;return t.state={loading:!1,value:l,submitter:u},t}return(0,d.default)(r,[{key:"render",value:function(){var e=this.props,a=e.visible,r=e.onCancel;return y.default.createElement(T.default,{width:680,bodyClassName:w.default.body,onCancel:r,onOk:this.handleOk,visible:a,closable:!1,title:t("input")},y.default.createElement(N.Alert,{type:"info",icon:"information",className:w.default.info,message:t("INPUT_DESC")}),y.default.createElement(N.Form,{data:this.formData,ref:this.formRef},y.default.createElement(N.Form.Item,{label:t("MESSAGE"),desc:t("INPUT_MESSAGE_DESC"),rules:[{required:!0,message:t("PARAM_REQUIRED")}]},y.default.createElement(k.MentionsInput,{className:"mention-input",value:this.state.value,onChange:this.handleMessageChange,onBlur:this.handleMessageSubmitter,placeholder:t("@somebody to help review")},y.default.createElement(k.Mention,{data:this.fetchUsers,loading:this.state.loading,type:"user",appendSpaceOnAdd:!0,displayTransform:function(e){return"@".concat(e)},markup:"@__id__ "})))))}}]),r}(y.default.Component),i.propTypes={name:E.default.string},i.defaultProps={visible:!1,onOk:function(){},onCancel:function(){}},u=c,o=(0,g.default)(u.prototype,"fetchUsers",[C.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t,a){t&&(e.debounced||(e.debounced=(0,b.default)(e.getUsers,300)),e.query=t,e.callback=a,e.debounced())}}}),l=u))||l;a.default=M},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(31),r(18),r(87),r(16),r(98),r(10),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(61)),u=n(r(65)),o=n(r(36)),i=n(r(37)),c=n(r(88)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(49));n(r(66));r(45),r(5),r(31),r(18),r(87),r(42),r(16),r(98),r(10),r(4),r(23),r(57),r(24),r(17),r(62);var m,h,v,g,y,E=n(r(0)),b=n(r(1)),_=n(r(26)),O=n(r(241)),S=r(14),C=r(239),D=r(186),k=n(r(787)),N=r(982),T=n(r(853));function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var w=function(e,t){var a=Object.keys(e).reduce((function(t,a){return"".concat(t).concat(a," : '").concat(e[a],"' ,")}),"");return"${[".concat(t,"(").concat(a,")]}")},I={secret_text:"string",username_password:"usernamePassword",ssh:"sshUserPrivateKey",kubeconfig:"kubeconfigContent",kubeconfigFile:"kubeconfigFile"},M=(0,C.observer)((y=g=function(e){(0,s.default)(r,e);var a=R(r);function r(e){var n;return(0,o.default)(this,r),(n=a.call(this,e)).initEditor=function(){var e=n.props.edittingData;if("withCredentials"===e.type){var t=(0,_.default)(e,"data.value","");if(t){var a=(0,N.groovyToJS)(t),r=function(e){var t=/\$\{\[([\w-]*)\(/,a=e.match(t)&&e.match(t)[1];if(a){var r=Object.entries(I).find((function(e){return e[1]===a}));return r?r[0]:null}return null}(t);n.setState({formData:a,credentialType:r})}}},(0,u.default)(n,"handleCredentialChange",v,(0,c.default)(n)),n.handleOk=function(){var e=n.formRef.current.getData();n.formRef.current.validate((function(){n.props.onAddStep({name:"withCredentials",arguments:{isLiteral:!1,value:w(e,I[n.state.credentialType])},children:[]})}))},n.renderParams=function(){switch(n.state.credentialType){case"username_password":return E.default.createElement(E.default.Fragment,null,E.default.createElement(D.Form.Item,{label:t("Password Variable")},E.default.createElement(D.Input,{name:"passwordVariable"})),E.default.createElement(D.Form.Item,{label:t("Username Variable")},E.default.createElement(D.Input,{name:"usernameVariable"})));case"secret_text":return E.default.createElement(E.default.Fragment,null,E.default.createElement(D.Form.Item,{label:t("Text Variable")},E.default.createElement(D.Input,{name:"variable"})));case"ssh":return E.default.createElement(E.default.Fragment,null,E.default.createElement(D.Form.Item,{label:t("key File Variable")},E.default.createElement(D.Input,{name:"keyFileVariable"})),E.default.createElement(D.Form.Item,{label:t("passphrase Variable")},E.default.createElement(D.Input,{name:"passphraseVariable"})),E.default.createElement(D.Form.Item,{label:t("Username Variable")},E.default.createElement(D.Input,{name:"usernameVariable"})));case"kubeconfig":return E.default.createElement(D.Form.Item,{label:t("Kubeconfig Variable")},E.default.createElement(D.Input,{name:"variable"}));case"kubeconfigFile":return E.default.createElement(D.Form.Item,{label:t("KubeconfigFile Variable")},E.default.createElement(D.Input,{name:"variable"}));default:return null}},n.getCredentialsListData=function(e){return n.props.store.getCredentials(e)},n.getCredentialsList=function(){return(0,l.default)(n.props.store.credentialsList.data.map((function(e){return{label:e.name,value:e.name,type:e.type,disabled:!1}})))},n.optionRender=function(e){var a=e.label,r=e.type,n=e.disabled;return E.default.createElement("span",{style:{display:"flex",alignItem:"center"}},a,"  ",E.default.createElement(D.Tag,{type:n?"":"warning"},"ssh"===r?"SSH":t(r)))},n.formRef=E.default.createRef(),n.state={formData:{},credentialType:"username_password"},n}return(0,i.default)(r,[{key:"componentDidMount",value:function(){this.props.store.getCredentials(),this.initEditor()}},{key:"render",value:function(){var e=this.props,a=e.visible,r=e.onCancel,n=this.props.store.credentialsList;return E.default.createElement(k.default,{width:680,bodyClassName:T.default.body,onCancel:r,onOk:this.handleOk,visible:a,closable:!1,title:t("withCredentials")},E.default.createElement(D.Form,{data:this.state.formData,ref:this.formRef},E.default.createElement(D.Form.Item,{label:t("CREDENTIAL_NAME"),rules:[{required:!0,message:t("PARAM_REQUIRED")}],desc:E.default.createElement("p",null,t("SELECT_CREDENTIAL_DESC"),E.default.createElement("span",{className:T.default.clickable,onClick:this.props.showCredential},t("CREATE_CREDENTIAL")))},E.default.createElement(D.Select,{name:"credentialsId",options:this.getCredentialsList(),pagination:(0,O.default)(n,["page","limit","total"]),isLoading:n.isLoading,onFetch:this.getCredentialsListData,onChange:this.handleCredentialChange,optionRenderer:this.optionRender,valueRenderer:this.optionRender,searchable:!0,clearable:!0})),this.renderParams()))}}]),r}(E.default.Component),g.propTypes={name:b.default.string},g.defaultProps={visible:!1,onOk:function(){},onCancel:function(){}},h=y,v=(0,p.default)(h.prototype,"handleCredentialChange",[S.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=e.getCredentialsList().find((function(e){return e.value===t})),r=(0,_.default)(a,"type","username_password");e.setState({credentialType:r,formData:{credentialsId:t}})}}}),m=h))||m;a.default=M},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(73),r(18),r(87),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(64),r(136),r(818),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(30)),u=n(r(61)),o=n(r(96)),i=n(r(65)),c=n(r(36)),s=n(r(37)),f=n(r(88)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(49)),v=(n(r(66)),n(r(246)));r(12),r(45),r(5),r(11),r(31),r(6),r(73),r(18),r(28),r(87),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(64),r(818),r(7);var g,y,E,b,_,O,S,C,D,k=n(r(0)),N=n(r(1)),T=n(r(63)),R=n(r(241)),w=n(r(26)),I=n(r(74)),M=n(r(158)),P=r(14),A=r(239),j=r(186),L=n(r(787)),x=n(r(853));function U(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function z(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.value,l=e.onChange;return m.default.createElement(g.Select,{name:r.name,options:a.getCDList(),pagination:(0,h.default)(n,["page","limit","total"]),isLoading:n.isLoading,onFetch:a.getCDListData,value:null==t?void 0:t.name,onChange:function(e){var t,r,n=e?null===(t=a.props.store.cdList)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.find((function(t){return t.name===e})):null;l(n?{name:n.name,namespace:n.devops}:null)},searchable:!0,clearable:!0})}}))}}]),r}(m.Component))||u;a.default=b},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(5),r(18),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(16),r(4),r(22),r(23),r(57),r(17);var u=n(r(43));r(41);var o,i=n(r(44)),c=n(r(61)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=l(r(0)),v=n(r(241)),g=n(r(26)),y=r(186),E=r(239),b=n(r(1733));function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var O=(0,E.observer)(o=function(e){(0,d.default)(n,e);var a,r=_(n);function n(){var e;(0,s.default)(this,n);for(var a=arguments.length,l=new Array(a),u=0;u1&&void 0!==arguments[1]?arguments[1]:{};(0,l.default)(this,e),this.state={},this.values={},this.config=[],this.context={},this.init=function(e,t){var r=e.map((function(e){return p(p({},e),{},{reactions:e.reactions?JSON.parse(e.reactions):[]})}));a.config=r;var n=0,l=[],u={},o=[];r.forEach((function(e){var r;void 0!==(0,s.default)(t,e.name)&&(0,c.default)(u,e.name,t[e.name]),l[e.name]={order:n++,display:"block",value:(0,s.default)(t,e.name),reactions:null!==(r=e.reactions)&&void 0!==r?r:[],"x-props":e},o.push((function(){a.handleValueChange({key:e.name,value:(0,s.default)(t,e.name)},!0)}))})),a.state=l,a.values=u,o.forEach((function(e){return e()}))},this.setValues=function(e,t){void 0!==t?(0,c.default)(a.values,e,t):a.values=(0,f.default)(a.values,e)},this.handleValueChange=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=a.state;a.setValues(e.key,e.value),a.state[e.key].value=e.value;var n=r[e.key].reactions;null==n||n.forEach((function(n){a.getStateByReaction(n,r[e.key],t)}))},this.getStateByReaction=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=e.target,u=e.fulfill,o=[];Object.entries(u.state).forEach((function(e){var u=(0,n.default)(e,2),i=u[0],c=u[1];if(!r||"value"!==i){var s=a.reactions[i],f=h(c,{$self:t,$context:a.context});a.state[l]&&(a.state[l][i]=f,s&&o.push((function(){return s(l,f)})))}})),o.forEach((function(e){return e()}))},this.handleFieldValueChange=function(e,t){var r;a.state[e]&&(a.handleValueChange({key:e,value:t}),null===(r=a.update)||void 0===r||r.call(a))},this.handleChangeValue=function(e,t){a.handleValueChange({key:e,value:t})},this.handleDisplayChange=function(e,t){"none"!==t?a.handleValueChange({key:e,value:a.state[e].value}):a.handleValueChange({key:e,value:void 0})},this.getValues=function(){return a.values},this.getFields=function(){return(0,i.default)(Object.values(a.state),"order").reduce((function(e,t){return"block"===t.display&&e.push(t["x-props"]),e}),[])},this.update=t,this.context=r,this.reactions={display:this.handleDisplayChange.bind(this),value:this.handleChangeValue.bind(this)}}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var u=l(r(315)),o=l(r(96)),i=l(r(58)),c=n(r(0)),s=l(r(1200)),f=r(186),d=l(r(787)),p=r(14);a.default=function(e){e.value;var a=e.onChange,r=e.devops,n=(0,i.default)(e,["value","onChange","devops"]),l=c.useState(!1),m=(0,o.default)(l,2),h=m[0],v=m[1],g=c.useState(),y=(0,o.default)(g,2),E=y[0],b=y[1];return c.createElement("div",null,c.createElement(f.Button,{style:{height:24},size:"small",onClick:function(){return v(!0)}},t("IMPORT_FROM_CODE_REPO")),c.createElement(d.default,{title:t("IMPORT_FROM_CODE_REPO"),visible:h,onCancel:function(){return v(!1)},onOk:function(){a((0,p.toJS)(E)),v(!1)}},c.createElement("div",{style:{minHeight:270}},c.createElement(s.default,(0,u.default)({},n,{isCreatePipeline:!1,devops:r,onChange:b,value:E})))))}},function(e,t,a){e.exports={taskList:"_2loGhzv-O4GHTu099n1Cyv",task:"_3H5tvVgBDXf5LETASGtiQX",taskIcon:"asNYafbtn7uKGjr5sY-W7",taskInfo:"T1TGQgJXmgkWz6kfGHnpl",taskName:"HhpjXE4lv1c6-E-Njs0GB",desc:"_1Dc2Z_g9XfSxnUhp4sdhcW",back:"cvvjfvqaVKSa83bk1OARZ",tabs:"_2L811SJ-R9sRJovtFY5HnN",tab:"_3Maur7P1LAsNs0yts_dt3h",tab_active:"_3Xttzou4W6mEktK8OWPKbx",loading:"LtyrCDUgHMI9Qxb85FWVO"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(160),r(191),r(42),r(16),r(159),r(4),r(23),r(57),r(17);var l=n(r(61)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(3)),p=r(186),m=n(r(1)),h=r(14),v=n(r(135)),g=n(r(806)),y=r(1384),E=n(r(1016)),b=n(r(1062)),_=n(r(1736));function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var S={not:!0,allOf:!0,anyOf:!0},C=function(e){(0,i.default)(r,e);var a=O(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==u[0]?u[0]:{},a=t.cluster,r="".concat(this.getDevopsUrlV3({cluster:a}),"ci/nodelabels"),this.labelDataList=[],e.next=5,request.get(r,{},{},(function(){return null}));case 5:(n=e.sent)&&"success"===n.status&&(0,j.default)(n.data)&&(this.labelDataList=n.data.map((function(e){return{label:e,value:e}})));case 7:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"fetchPipelineStepTemplates",value:(n=(0,u.default)(l.default.mark((function e(){var t,a,r,n,u=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u.length>0&&void 0!==u[0]?u[0]:{},e.next=3,request.get("".concat(this.getBaseUrl(t),"clustersteptemplates?limit=100"));case 3:return a=e.sent,r=a.items,n=(void 0===r?[]:r).map($),this.pipelineSteps=n,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"fetchStepTemplate",value:(r=(0,u.default)(l.default.mark((function e(t){var a,r,n=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,request.get("".concat(this.getBaseUrl(a),"clustersteptemplates/").concat(t));case 3:return r=e.sent,e.abrupt("return",$(r));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getPipelineStepTempleJenkins",value:(a=(0,u.default)(l.default.mark((function e(t,a,r){var n,u,o,i=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>3&&void 0!==i[3]?i[3]:{},e.next=3,request.post("".concat(this.getBaseUrl(t),"clustersteptemplates/").concat(a,"/render?").concat(G.default.stringify(n)),r);case 3:return u=e.sent,o=(0,A.default)(u,"data",""),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return a.apply(this,arguments)})},{key:"newStage",get:function(){return{branches:[{id:String(Math.random()),name:"",steps:[]}],agent:{type:"none"},name:"stage-".concat((0,q.generateId)(5))}}},{key:"stages",get:function(){return(0,A.default)(this.jsonData,"json.pipeline.stages",[])}},{key:"activeStage",get:function(){return""===this.activeLineIndex?"":this.stages[this.activeLineIndex]?this.stages[this.activeLineIndex].parallel?this.stages[this.activeLineIndex].parallel[this.activeColumnIndex]:this.stages[this.activeLineIndex]:""}}]),z}(B.default),(0,m.default)(v.prototype,"stages",[F.computed],Object.getOwnPropertyDescriptor(v.prototype,"stages"),v.prototype),(0,m.default)(v.prototype,"activeStage",[F.computed],Object.getOwnPropertyDescriptor(v.prototype,"activeStage"),v.prototype),g=(0,m.default)(v.prototype,"jsonData",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),y=(0,m.default)(v.prototype,"activeLineIndex",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),E=(0,m.default)(v.prototype,"activeColumnIndex",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),b=(0,m.default)(v.prototype,"isAddingStep",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_=(0,m.default)(v.prototype,"edittingData",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),O=(0,m.default)(v.prototype,"params",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),S=(0,m.default)(v.prototype,"labelDataList",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),C=(0,m.default)(v.prototype,"credentialsList",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[]}}}),D=(0,m.default)(v.prototype,"cdList",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[]}}}),k=(0,m.default)(v.prototype,"pipelineList",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[]}}}),N=(0,m.default)(v.prototype,"pipelineSteps",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,m.default)(v.prototype,"setData",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"setData"),v.prototype),(0,m.default)(v.prototype,"insertColumn",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"insertColumn"),v.prototype),(0,m.default)(v.prototype,"setFocus",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"setFocus"),v.prototype),(0,m.default)(v.prototype,"setActive",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"setActive"),v.prototype),(0,m.default)(v.prototype,"setEdittingData",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"setEdittingData"),v.prototype),(0,m.default)(v.prototype,"clearFocus",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"clearFocus"),v.prototype),(0,m.default)(v.prototype,"deleteStage",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"deleteStage"),v.prototype),(0,m.default)(v.prototype,"setValue",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"setValue"),v.prototype),(0,m.default)(v.prototype,"convertJsonToJenkinsFile",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"convertJsonToJenkinsFile"),v.prototype),(0,m.default)(v.prototype,"saveJenkinsFile",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"saveJenkinsFile"),v.prototype),T=(0,m.default)(v.prototype,"getCredentials",[F.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,u.default)(l.default.mark((function t(a){return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.credentialStore.fetchList(Z({devops:e.params.devops,cluster:e.params.cluster},a));case 2:e.credentialsList=e.credentialStore.list;case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),R=(0,m.default)(v.prototype,"getPipelines",[F.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,u.default)(l.default.mark((function t(a){return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.pipelineStore.fetchList(Z({devops:e.params.devops,cluster:e.params.cluster,filter:"no-folders"},a));case 2:e.pipelineList=e.pipelineStore.list;case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),w=(0,m.default)(v.prototype,"getCDListData",[F.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,u.default)(l.default.mark((function t(a){return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.cdStore.fetchList(Z({devops:e.params.devops,cluster:e.params.cluster},a));case 2:e.cdList=e.cdStore.list;case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),I=(0,m.default)(v.prototype,"createCredential",[F.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,u.default)(l.default.mark((function t(a,r){return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.credentialStore.handleCreate(a,r);case 2:case"end":return t.stop()}}),t)})));return function(e,a){return t.apply(this,arguments)}}()}}),(0,m.default)(v.prototype,"handleConfirm",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"handleConfirm"),v.prototype),(0,m.default)(v.prototype,"handleConfirmOld",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"handleConfirmOld"),v.prototype),(0,m.default)(v.prototype,"fetchPipelineStepTemplates",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"fetchPipelineStepTemplates"),v.prototype),(0,m.default)(v.prototype,"fetchStepTemplate",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"fetchStepTemplate"),v.prototype),v);a.default=ee},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Home",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Search",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"Detail",{enumerable:!0,get:function(){return u.default}});var n=r(a(3447)),l=r(a(3452)),u=r(a(3524))},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(65)),u=n(r(36)),o=n(r(37)),i=n(r(88)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(49));n(r(66));r(45),r(5),r(18),r(442),r(42),r(4),r(23),r(57),r(24),r(17),r(62);var p,m,h,v=n(r(96)),g=n(r(0)),y=r(14),E=r(239),b=n(r(243)),_=n(r(3)),O=r(186),S=n(r(1065)),C=n(r(3449)),D=n(r(1757)),k=n(r(985)),N=n(r(3451));function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var R=(0,E.observer)((m=function(e){(0,c.default)(r,e);var a=T(r);function r(){var e;(0,u.default)(this,r);for(var n=arguments.length,o=new Array(n),c=0;c0&&void 0!==c[0]?c[0]:{},a=c.length>1?c[1]:void 0,r=new Date((new Date).setHours(0,0,0,0)).getTime(),l=(new Date).getTime(),u={operation:"statistics",start_time:r,end_time:l},o=(0,E.default)(u,t),e.next=9,this.request(o,"get",a);case 9:i=e.sent,this.containersCount=(0,b.default)(i,"statistics.containers",0),this.logsCount=(0,b.default)(i,"statistics.logs",0),this.startTime=r,this.namespaces=(0,b.default)(i,"statistics.namespaces",[])||[];case 14:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"handleResult",value:function(e){return e}}]),r}(r(a(1391)).default),u=(0,g.default)(l.prototype,"logsCount",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),o=(0,g.default)(l.prototype,"startTime",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),i=(0,g.default)(l.prototype,"namespaces",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,g.default)(l.prototype,"fetch",[y.action],Object.getOwnPropertyDescriptor(l.prototype,"fetch"),l.prototype),l);t.default=O},function(e,t,a){e.exports={container:"_9S1O5r-gMFTAyyTvA9sMv",customRange:"_2BqYBrIOMJkPL86SU4ibiS",currentParam:"_3i9QkdJ1v3Z_RhND9_jhxB",input:"_3knlp77eQpb5h3x9_brJrc",dropdown:"_32W2hcNHwcqLHylSRb_-1d",dropdownItem:"_1zYu7D7XMgnPQj_cviMH7j",icon:"_18iZ6-QD8yhu2WuwGN6v_R",param:"_3tDB0wRE_DlH-PpkLdtKqh",removeParam:"_2XvI9g_dJmtEwGNcgmHBUn",durationDropdown:"_1DPb6P0nYZPe_y5qrx0OSD"}},function(e,t,a){e.exports={tips:"_1GT_qdXcQqMwqs4fdmzGR3",rule:"cRqPZ_AGuSTA4AXOY08lP",searchBar:"_2YhYKa3lwuBurnOP3Cjh0U",pane:"cOD4mfyo7pc1RctxOlLvj",card:"p9FBwWjFgQ1xMXHax1X3s",count:"_37LGouPZA8H7IdsZHwN2j5",banner:"_3Z5wUKjeTOL8V6zsED-TSu",illustration:"_2Vn-O2H0xzvZ1d-cX3OeAG",statistics:"_2hC4Kwsw_VHnZ2DGcDMAv5",category:"_2pdXo055DfDsFjef58FrhO",icon:"_3zX3KvzK9hvXil7z9WwH0M",desc:"_1ZgIwmJnkzKt2QVxat6c6D",recent:"_3H27V0Txnl5HUAeAEpNIdA",recentSummary:"_27IlxPyLQZxq8UFPRqaK0i",chart:"_14dkUVVhwB9DUaaWX787Fy",searchBarContainer:"fSF-k2IyFBXVBSF4fZccp",clusterSelector:"_26VjJfMUGT6XkqSnSUkqn7"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(197),r(6),r(18),r(87),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(64),r(7),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(61)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(30)),c=n(r(65)),s=n(r(36)),f=n(r(37)),d=n(r(88)),p=n(r(55)),m=n(r(56)),h=n(r(51)),v=n(r(49));n(r(66));r(12),r(45),r(5),r(11),r(197),r(6),r(18),r(28),r(87),r(245),r(442),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(62),r(64),r(7),r(110);var g,y,E,b,_,O,S,C,D,k,N=n(r(96)),T=n(r(0)),R=r(239),w=r(14),I=n(r(243)),M=n(r(967)),P=n(r(195)),A=n(r(249)),j=n(r(1392)),L=n(r(1124)),x=n(r(1768)),U=n(r(1757)),z=r(186),F=n(r(1127)),G=r(1397),V=n(r(1065)),B=n(r(985)),Y=n(r(3523));function W(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function q(e){for(var t=1;t').concat(e.hightLighted,"")}))}})}}},{key:"startPolling",value:function(e){this.poll(),this.pollingInterval&&clearInterval(this.pollingInterval),this.pollingInterval=setInterval(this.poll,e||this.state.pollingFrequency)}},{key:"stopPolling",value:function(){this.setState({polling:!1}),clearInterval(this.pollingInterval)}},{key:"addPollingQuery",value:(a=(0,o.default)(u.default.mark((function e(){var t,a,r,n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.getQueryParams(),r={from:0,start_time:Date.now()-this.state.pollingFrequency,end_time:Date.now()},e.next=4,this.fetchQuery(q(q({},a),r));case 4:n=e.sent,(t=this.logs).push.apply(t,(0,l.default)(n.reverse())),this.scrollTo(this.logs.length);case 7:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"scrollTo",value:function(e){this.tableRef.current.scrollToRow(e)}},{key:"render",value:function(){var e=this.state.showHistogram;return T.default.createElement("div",{className:Y.default.container},T.default.createElement(z.Loading,{spinning:this.loading},this.renderSearchBar()),T.default.createElement("div",{className:Y.default.searchResult},T.default.createElement(z.Loading,{spinning:this.loading},T.default.createElement(T.default.Fragment,null,this.renderToolBar(),e&&this.renderTimeChart())),this.renderTable()))}},{key:"renderSearchBar",value:function(){return T.default.createElement("div",{className:Y.default.searchBar},globals.app.isMultiCluster&&T.default.createElement(z.Select,{value:this.props.searchInputState.cluster,onChange:this.changeClusterChange,className:Y.default.select,valueRenderer:this.clusterRenderer,options:this.props.clustersOpts}),T.default.createElement(B.default,{className:Y.default.searchInput,onChange:this.onSearchParamsChange,params:this.props.searchInputState,dropDownItems:{log_query:{icon:"magnifier",text:t("KEYWORD")},namespace_query:{icon:"project",text:t("PROJECT")},workload_query:{icon:"backup",text:t("WORKLOAD")},pod_query:{icon:"pod",text:t("POD")},container_query:{icon:"docker",text:t("CONTAINER")}}}),T.default.createElement(z.Select,{className:Y.default.select,value:this.props.searchInputState.queryMode,onChange:this.changeQueryMode,options:this.queryModeOptions}))}},{key:"renderToolBar",value:function(){var e=this.state,a=e.showHistogram,r=e.polling,n=e.pollingFrequency;return T.default.createElement("div",{className:Y.default.toolbar},T.default.createElement("div",null,t("TIME_TOPOLOGY"),T.default.createElement("span",{className:Y.default.showHistogramBtn,onClick:this.toggleHistogram},a?t("DISPLAY"):t("HIDE"),T.default.createElement(z.Icon,{name:"caret-down",type:"light"}))),T.default.createElement("div",{className:Y.default.operation},T.default.createElement("span",{className:Y.default.pollingBtn,onClick:this.togglePolling},T.default.createElement(z.Tooltip,{content:r?t("STOP_REAL_TIME_CONTAINER_LOG"):t("START_REAL_TIME_CONTAINER_LOG")},T.default.createElement(z.Icon,{name:r?"stop":"start",type:"light",size:16}))),T.default.createElement("span",{className:Y.default.exportButton},T.default.createElement(z.Dropdown,{content:this.renderMoreMenu,trigger:"click",placement:"bottomRight"},T.default.createElement("div",{className:Y.default.exportText},T.default.createElement("span",{className:Y.default.text},t("LOG_EXPORT")),T.default.createElement(z.Icon,{name:"more",type:"light"})))),T.default.createElement("span",{className:Y.default.frequencyOpts},T.default.createElement("span",null," ",t("REFRESH_RATE_COLON")),T.default.createElement(z.Select,{value:n,onChange:this.changeFrequency,className:Y.default.frequencyOptions,options:this.frequencyOptions}))))}},{key:"renderTimeChart",value:function(){return T.default.createElement("div",{className:Y.default.chartContainer},T.default.createElement("div",{className:Y.default.recentSummary},T.default.createElement("h2",{className:Y.default.count},this.histogramStore.logsCount),T.default.createElement("p",null,t("SEARCH_RESULTS"))),T.default.createElement("div",{className:Y.default.chart},T.default.createElement(V.default,{xKey:"time",data:(0,w.toJS)(this.histogramStore.histograms),legend:[["count",t("CONTAINER_LOG_COUNT")]],interval:this.histogramStore.interval,onBarClick:this.selectedDurationParameter})))}},{key:"renderTable",value:function(){return T.default.createElement("div",{className:Y.default.table},T.default.createElement(F.default,{onScroll:this.onTableScrollTop,onTrClick:this.selectLog,cols:this.tableCols,data:this.logs,tableRef:this.tableRef}))}},{key:"defaultDuration",get:function(){return{start_time:0,end_time:Date.now(),interval:"1d"}}},{key:"duration",get:function(){var e=(this.props||{}).searchInputState,t=Date.now(),a=e.start,r=e.end,n=e.step;return a?{start_time:(0,M.default)([1e3*a,t]),end_time:(0,M.default)([1e3*r,t]),interval:n}:this.defaultDuration}}]),h}(T.default.Component),E=(0,v.default)(y.prototype,"tableCols",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[{thead:t("TIME"),key:"time",content:function(e){return"[".concat((0,I.default)(e.time).format("YYYY-MM-DD HH:mm:ss"),"]")},hidden:!1},{thead:t("PROJECT"),key:"project",content:this.renderHightLightMatchTd({resKey:"namespace",searchKey:["namespace_query"]}),hidden:!1},{thead:t("POD"),key:"pod",hidden:!1,content:this.renderHightLightMatchTd({resKey:"pod",searchKey:["pod_query","workload_query"]})},{thead:t("CONTAINER"),key:"container",hidden:!0,content:this.renderHightLightMatchTd({resKey:"container",searchKey:["container_query"]})},{thead:t("LOG"),key:"log",className:Y.default.logItem,content:this.renderHightLightMatchLogTd({resKey:"log",searchKey:["log_query"],handler:G.esMark}),mustShow:!0}]}}),b=(0,v.default)(y.prototype,"logs",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),_=(0,v.default)(y.prototype,"loading",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),(0,v.default)(y.prototype,"refreshQuery",[w.action],Object.getOwnPropertyDescriptor(y.prototype,"refreshQuery"),y.prototype),(0,v.default)(y.prototype,"fetchQuery",[w.action],Object.getOwnPropertyDescriptor(y.prototype,"fetchQuery"),y.prototype),(0,v.default)(y.prototype,"fetchHistogram",[w.action],Object.getOwnPropertyDescriptor(y.prototype,"fetchHistogram"),y.prototype),O=(0,v.default)(y.prototype,"selectedDurationParameter",[w.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a,r,n,l,u,o=t.time,i=void 0===o?0:o,c=e.histogramStore.interval,s=e.props.searchInputState;s.durationAlias="",s.end=Math.ceil(i/1e3)+(a=c.match(/(\d+)(\w+)/),r=(0,N.default)(a,3),n=r[1],l=void 0===n?0:n,u=r[2],l*{s:1,m:60,h:3600,d:86400}[void 0===u?"s":u]),s.start=Math.ceil(i/1e3),s.step=e.getNextStepLevel(c),e.fetchHistogram(),e.refreshQuery()}}}),S=(0,v.default)(y.prototype,"onTableScrollTop",[w.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.scrollTop,r=e.queryStore,n=r.from,l=r.size,u=r.total;0===a&&u>n+l&&e.loadMoreLogs()}}}),(0,v.default)(y.prototype,"loadMoreLogs",[w.action],Object.getOwnPropertyDescriptor(y.prototype,"loadMoreLogs"),y.prototype),C=(0,v.default)(y.prototype,"toggleHistogram",[w.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.setState((function(e){return{showHistogram:!e.showHistogram}}))}}}),D=(0,v.default)(y.prototype,"togglePolling",[w.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=e.state.polling;t?e.stopPolling():e.startPolling(),e.setState({polling:!t})}}}),(0,v.default)(y.prototype,"addPollingQuery",[w.action],Object.getOwnPropertyDescriptor(y.prototype,"addPollingQuery"),y.prototype),k=(0,v.default)(y.prototype,"changeFrequency",[w.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.setState({pollingFrequency:t}),e.state.polling&&(e.stopPolling(),e.startPolling(t))}}}),g=y))||g;a.default=X},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={table:"_31DHxUvHF9cvrtMF8hZ1NJ",body:"_1o0OrXH49u7IWnn__jySDi",header:"_3d3ile0MQ76mzy4gKMKVGa",headerItems:"cBGvp-qF5E0-Zn-DV66BU",visibleBtn:"_1QLOXkaGohLi2bLbAWcJjT",dropdown:"_16GV2vWPgU-_LY-TSI-nEL",visibleItem:"_10IfOBGBtVJ2cWMKKLCURw",tr:"_3wpavJr72BCdw4FWfpnkOc",bodyItems:"_1Jb5Hf9bhyeHQD05-MYz5N"}},function(e,t,a){e.exports={searchBar:"_JTlDkrfohSwIxPpX97wp",searchInput:"_25v4Uq6VdGeubmXGfPRsa6",select:"_3t4uAxkZ2BFOTl4foQ1DRo",searchResult:"_3li-Ch_QP-SfD5vjzDIXgd",toolbar:"_1wFZR-2jbDGJY79Klx4L11",operation:"_23II8bjJaDDga7SzCWyMm7",exportButton:"_3eZWtrM_1V15_kaHWj-DpL",exportText:"_8g5V39tYUe7rdh7ZPduAB",text:"_1DLrO1c0pV2m8b_28dUerc",menuLinkContent:"LsDuLg9SzYCwxyLiKzBsS",frequencyOpts:"_3gotqRkYjzqimbLSXvXXoe",frequencyOptions:"_2FKKxtgN7QWnOcFKcoW-yl",chartContainer:"_1TbzGgX6Ll6A-GDc4T4Ad",recentSummary:"_32mzAeyZriH5v29CxUBHw0",chart:"_39jXgnORNLHHwWrfolFLAT",table:"_1LzMkW6YYbyYTptsNE4-Xa",logItem:"_1y2_hopFflOw1UUWDuImRk",count:"_3t6_PUErus14gjlZ0dSd0d",showHistogramBtn:"_9d9RtZ1b011VOdyFhrNMY",pollingBtn:"_1LWeyfeCE0ECAs__57lhjh",container:"_36atrKU0dMxQaHnt0CMWwj",hightLightMatch:"_2jhV5b7tn8RPILbYxuQt7g",hightLog:"_9VNSgJg53gFYpEK1pk5Co"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(86),r(18),r(48),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(818),r(7),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(86),r(18),r(28),r(245),r(48),r(859),r(442),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(818),r(7),r(110);var l=n(r(61)),u=n(r(43));r(41);var o,i,c,s,f,d,p=n(r(44)),m=n(r(30)),h=n(r(65)),v=n(r(36)),g=n(r(37)),y=n(r(88)),E=n(r(55)),b=n(r(56)),_=n(r(51)),O=n(r(49)),S=(n(r(66)),n(r(0))),C=n(r(243)),D=n(r(3)),k=r(239),N=r(14),T=n(r(1124)),R=n(r(26)),w=r(186),I=n(r(452)),M=n(r(439)),P=n(r(1768)),A=r(881),j=n(r(3525)),L=n(r(3527));function x(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function U(e){for(var t=1;t=r){var n=a.logStore,l=n.from,u=n.size;n.total>l+u&&a.loadMoreLogs()}},a.pre=function(){a.props.formStepState.pre()},a.clearQuery=function(){a.setState({query:""},(function(){a.refreshLogs()}))},a.renderMoreMenu=function(){var e=a.logStore,r=e.pods,n=e.containers,l=e.log_query,u=e.startTime,o=e.endTime,i=e.namespaces,c={cluster:a.props.searchInputState.cluster,namespaces:i,pods:r,containers:n,log_query:l,start_time:u,end_time:o},s=[S.default.createElement(w.Menu.MenuItem,{key:"asc"},S.default.createElement("span",{className:L.default.menuLinkContent},S.default.createElement("a",{href:a.logStore.exportLinkFactory(U(U({},c),{},{sort:"asc"})),download:!0},t("ASC_EXPORT")))),S.default.createElement(w.Menu.MenuItem,{key:"desc"},S.default.createElement("span",{className:L.default.menuLinkContent},S.default.createElement("a",{href:a.logStore.exportLinkFactory(U(U({},c),{},{sort:"desc"})),download:!0},t("DESC_EXPORT"))))];return S.default.createElement(w.Menu,null,s)};var r=a.props.detailState,n=r.pod,l=r.container,u=r.namespace,o=r.log,i=r.time,p=new Date(i).getTime();return a.logStore=new P.default({sort:"desc",pods:n,namespaces:u,containers:l,size:100,startTime:p-1e3,endTime:p+1e3}),a.podStore=new I.default,a.projectStore=new M.default,a.state={pollingFrequency:5e3,polling:!1,query:o},a}return(0,g.default)(_,[{key:"startPolling",value:(m=(0,p.default)(u.default.mark((function e(){var t,a=this;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Date.now(),e.next=3,this.fetchLogs({end_time:t,start_time:t-6e4,from:0});case 3:this.logs=e.sent,this.interval=setInterval((function(){a.addPollingLogs()}),this.state.pollingFrequency);case 5:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"addPollingLogs",value:(i=(0,p.default)(u.default.mark((function e(){var t,a,r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Date.now(),e.next=3,this.fetchLogs({end_time:a,start_time:a-this.state.pollingFrequency,from:0});case 3:r=e.sent,(t=this.logs).unshift.apply(t,(0,l.default)(r)),this.scrollToBottom();case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"scrollToBottom",value:function(){var e=this.logWindow.current;e.scrollTop=e.scrollHeight}},{key:"loadMoreLogs",value:(o=(0,p.default)(u.default.mark((function e(){var t,a,r,n,o;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.logStore,r=a.from,n=a.size,this.logStore.from=r+n,e.next=4,this.fetchLogs();case 4:o=e.sent,(t=this.logs).push.apply(t,(0,l.default)(o));case 6:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getPodContainers",value:function(e){var t=this.podStore.list.data.find((function(t){return t.name===e}))||{};return(0,R.default)(t,"containers",[])}},{key:"componentDidMount",value:function(){this.fetchPods(),this.fetchProject(),this.initialFetch()}},{key:"componentWillUnmount",value:function(){this.stopPolling()}},{key:"initialFetch",value:(n=(0,p.default)(u.default.mark((function e(){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetchLogs();case 2:this.logs=e.sent;case 3:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"refreshLogs",value:(r=(0,p.default)(u.default.mark((function e(){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logStore.from=0,this.logStore.log_query=this.state.query,this.setState({polling:!1}),this.stopPolling(),e.next=6,this.fetchLogs();case 6:this.logs=e.sent;case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"fetchLogs",value:(a=(0,p.default)(u.default.mark((function e(){var t,a,r=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},a=this.props.searchInputState.cluster,e.next=4,this.logStore.fetch(U(U({},t),{},{cluster:a}));case 4:return e.abrupt("return",this.logStore.records);case 5:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchProject",value:function(){var e=this.props.detailState.namespace,t=this.props.searchInputState.cluster;this.projectStore.fetchDetail({name:e,namespace:e,cluster:t},(function(){}))}},{key:"fetchPods",value:function(){var e=this.props.detailState.namespace,t=this.props.searchInputState.cluster;this.podStore.fetchList({cluster:t,namespace:e,limit:-1})}},{key:"render",value:function(){return S.default.createElement("div",{className:L.default.container},S.default.createElement("div",{className:L.default.article},this.renderSummary(),this.renderLog()))}},{key:"renderLog",value:function(){var e=this.state.polling;return S.default.createElement("div",{className:L.default.log},S.default.createElement("div",{className:(0,D.default)(L.default.toolbar,this.state.polling?L.default.pollingMode:"")},this.state.polling||this.renderDurationSelect(),this.renderSearchInput(),this.renderPollingBtn(),this.renderPollingOpts(),this.renderExportBtn()),S.default.createElement("div",{className:L.default.terminal,onScroll:e?null:this.onLogScroll,ref:this.logWindow},this.renderTerminal()))}},{key:"renderPollingOpts",value:function(){return S.default.createElement("div",{className:L.default.frequencyOpts},S.default.createElement(w.Select,{options:this.pollingFrequencyOpts,value:this.state.pollingFrequency,onChange:this.onFrequencySelect}))}},{key:"renderPollingBtn",value:function(){return S.default.createElement("div",{className:L.default.pollingBtn,onClick:this.togglePolling},S.default.createElement(w.Tooltip,{content:this.state.polling?t("STOP"):t("START")},S.default.createElement(w.Icon,{type:"light",name:this.state.polling?"stop":"start"})))}},{key:"renderExportBtn",value:function(){return S.default.createElement("div",{className:L.default.operation},S.default.createElement(w.Dropdown,{content:this.renderMoreMenu,trigger:"click",placement:"bottomRight"},S.default.createElement("div",{className:L.default.exportText},S.default.createElement("span",{className:L.default.text},t("LOG_EXPORT")),S.default.createElement(w.Icon,{name:"more",type:"light"}))))}},{key:"renderDurationSelect",value:function(){return S.default.createElement("div",{className:L.default.duration},S.default.createElement(j.default,{duration:this.logStore,onChange:this.onDurationChange}))}},{key:"renderSearchInput",value:function(){return S.default.createElement("div",{className:L.default.input},S.default.createElement(w.Icon,{name:"magnifier",type:"light"}),S.default.createElement("input",{type:"text",onKeyUp:this.queryLog,value:this.state.query,onChange:this.changeSearchLog}),this.state.query&&S.default.createElement(w.Icon,{className:L.default.clearQuery,name:"close",type:"light",onClick:this.clearQuery}))}},{key:"renderTerminal",value:function(){var e=this;return S.default.createElement("div",{className:L.default.logWindow},this.logs.reverse().map((function(t){var a=t.time,r=t.log;return S.default.createElement("p",{key:"".concat(a).concat(r)},S.default.createElement("span",{className:L.default.logTime},(0,C.default)(a).format("YYYY-MM-DD HH:mm:ss"),":"," ",e.renderHighLightLog(null!=r?r:"")))})))}},{key:"renderHighLightLog",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.state.query,a=t.trim(),r=e.toUpperCase().indexOf(a.toUpperCase());return a&&-1!==r?S.default.createElement("span",{className:L.default.queryLog},S.default.createElement("span",{dangerouslySetInnerHTML:{__html:F.ansi_to_html(e.slice(0,r))}}),S.default.createElement("span",{className:L.default.hightLight,dangerouslySetInnerHTML:{__html:F.ansi_to_html(e.slice(r,r+a.length))}}),S.default.createElement("span",{dangerouslySetInnerHTML:{__html:F.ansi_to_html(e.slice(r+a.length))}})):S.default.createElement("span",{className:L.default.queryLog,dangerouslySetInnerHTML:{__html:F.ansi_to_html(e)}})}},{key:"renderLink",value:function(e,a){return e?S.default.createElement(w.Tooltip,{content:t("VIEW_DETAILS")},S.default.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer"},a)):a}},{key:"renderSummary",value:function(){var e=this.props.detailState;return S.default.createElement("div",{className:L.default.summery},S.default.createElement("div",{className:L.default.header},S.default.createElement("div",{className:L.default.pre,onClick:this.pre},S.default.createElement(A.ReactComponent,{width:16,height:22}),S.default.createElement("span",null,t("BACK")))),S.default.createElement("h3",null,t("CONTAINER_LOG_SOURCE")),S.default.createElement("div",{className:L.default.dataList},S.default.createElement("div",null,S.default.createElement("h4",null,t("PROJECT")),S.default.createElement("p",null,S.default.createElement("span",null,S.default.createElement(w.Icon,{name:"project"})," ",e.namespace))),S.default.createElement("div",null,S.default.createElement("h4",null,t("POD")),S.default.createElement("div",{className:L.default.selectContainer},S.default.createElement(w.Select,{prefixIcon:S.default.createElement(w.Icon,{name:"pod"}),value:this.logStore.pods,onChange:this.changePod,options:this.PodOpts}),S.default.createElement("div",{className:L.default.resourceIcon},this.renderLink(this.podLink,S.default.createElement(w.Icon,{name:"cogwheel",size:16}))))),S.default.createElement("div",null,S.default.createElement("h4",null,t("CONTAINER")),S.default.createElement("div",{className:L.default.selectContainer},S.default.createElement(w.Select,{prefixIcon:S.default.createElement(w.Icon,{name:"docker"}),value:this.logStore.containers,options:this.ContainersOpts,onChange:this.changeContainer}),S.default.createElement("div",{className:L.default.resourceIcon},this.renderLink(this.containerLink,S.default.createElement(w.Icon,{name:"cogwheel",size:16})))))))}},{key:"podLink",get:function(){var e=this.props.detailState.namespace,t=this.props.searchInputState.cluster,a=this.logStore.pods,r=this.projectStore.detail.workspace;return r?"/".concat(r,"/clusters/").concat(t,"/projects/").concat(e,"/pods/").concat(a):""}},{key:"containerLink",get:function(){var e=this.props.detailState.namespace,t=this.props.searchInputState.cluster,a=this.logStore,r=a.pods,n=a.containers,l=this.projectStore.detail.workspace;return l?"/".concat(l,"/clusters/").concat(t,"/projects/").concat(e,"/pods/").concat(r,"/containers/").concat(n):""}},{key:"PodOpts",get:function(){return this.podStore.list.data.map((function(e){return{label:e.name||t("ALL"),value:e.name||""}}))}},{key:"ContainersOpts",get:function(){var e=this.logStore.pods;return this.getPodContainers(e).map((function(e){return{label:e.name,value:e.name}}))}}]),_}(S.default.Component),c=(0,O.default)(i.prototype,"logs",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,O.default)(i.prototype,"podLink",[N.computed],Object.getOwnPropertyDescriptor(i.prototype,"podLink"),i.prototype),(0,O.default)(i.prototype,"containerLink",[N.computed],Object.getOwnPropertyDescriptor(i.prototype,"containerLink"),i.prototype),(0,O.default)(i.prototype,"PodOpts",[N.computed],Object.getOwnPropertyDescriptor(i.prototype,"PodOpts"),i.prototype),(0,O.default)(i.prototype,"ContainersOpts",[N.computed],Object.getOwnPropertyDescriptor(i.prototype,"ContainersOpts"),i.prototype),s=(0,O.default)(i.prototype,"changePod",[N.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.logStore.pods=t||"";var a=(0,R.default)(e.getPodContainers(t),"[0].name","");e.changeContainer(a)}}}),f=(0,O.default)(i.prototype,"changeContainer",[N.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.logStore.containers=t,e.logStore.log_query="",e.refreshLogs()}}}),(0,O.default)(i.prototype,"startPolling",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"startPolling"),i.prototype),(0,O.default)(i.prototype,"addPollingLogs",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"addPollingLogs"),i.prototype),d=(0,O.default)(i.prototype,"onFrequencySelect",[N.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.setState({pollingFrequency:t})}}}),(0,O.default)(i.prototype,"loadMoreLogs",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"loadMoreLogs"),i.prototype),(0,O.default)(i.prototype,"initialFetch",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"initialFetch"),i.prototype),(0,O.default)(i.prototype,"refreshLogs",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"refreshLogs"),i.prototype),o=i))||o;a.default=G},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(9),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(442),r(42),r(9),r(4),r(23),r(57),r(24),r(17),r(62);var l,u,o,i,c,s,f,d,p,m=n(r(96)),h=n(r(65)),v=n(r(36)),g=n(r(37)),y=n(r(88)),E=n(r(55)),b=n(r(56)),_=n(r(51)),O=n(r(49)),S=(n(r(66)),n(r(0))),C=r(239),D=r(14),k=n(r(3)),N=n(r(243)),T=r(186),R=n(r(1166)),w=n(r(1165)),I=r(950),M=n(r(3526));function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,_.default)(e);if(t){var n=(0,_.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,b.default)(this,a)}}var A=(0,C.observer)((u=function(e){(0,E.default)(r,e);var a=P(r);function r(){var e;(0,v.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l=r){var l=e.store,u=l.from,o=l.size;l.total>u+o&&e.loadMoreLogs()}}}}),(0,N.default)(f.prototype,"loadMoreLogs",[A.action],Object.getOwnPropertyDescriptor(f.prototype,"loadMoreLogs"),f.prototype),(0,N.default)(f.prototype,"fetchQuery",[A.action],Object.getOwnPropertyDescriptor(f.prototype,"fetchQuery"),f.prototype),(0,N.default)(f.prototype,"fetchHistogram",[A.action],Object.getOwnPropertyDescriptor(f.prototype,"fetchHistogram"),f.prototype),v=(0,N.default)(f.prototype,"toggleHistogram",[A.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.setState((function(e){return{showHistogram:!e.showHistogram}}))}}}),g=(0,N.default)(f.prototype,"togglePolling",[A.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=e.state.polling;t?e.stopPolling():e.startPolling(),e.setState({polling:!t})}}}),(0,N.default)(f.prototype,"addPollingQuery",[A.action],Object.getOwnPropertyDescriptor(f.prototype,"addPollingQuery"),f.prototype),y=(0,N.default)(f.prototype,"changeFrequency",[A.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.setState({pollingFrequency:t}),e.state.polling&&(e.stopPolling(),e.startPolling(t))}}}),s=f))||s;a.default=Q},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(16),r(10),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(16),r(10),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(3)),d=r(186),p=r(52),m=n(r(3533)),h=n(r(3535));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var g=d.Tabs.TabPanel,y=function(e){(0,o.default)(r,e);var a=v(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,u=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:[];return t.map((function(t){var a=Object.keys(t)[0];return s.default.createElement(m.default,{key:a,data:t,renderMetadata:e.renderMetadata})}))}},{key:"render",value:function(){return s.default.createElement(d.Tabs,{direction:"vertical",className:h.default.tabs},s.default.createElement(g,{label:s.default.createElement(d.Icon,{name:"resource",size:16}),name:"resource"},s.default.createElement("div",{className:h.default.content},this.renderHeader("METADATA"),this.renderEventMetadata())),s.default.createElement(g,{label:s.default.createElement(d.Icon,{name:"cloud",size:16}),name:"cloud"},s.default.createElement("div",{className:h.default.content},this.renderHeader("DETAILS"),this.renderDetail(),this.renderFooter())))}}]),r}(s.default.Component);a.default=y},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(28),a(42),a(448),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var n=r(a(246)),l=r(a(30)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=a(186),p=r(a(3534));function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function h(e){for(var t=1;t=r){var l=e.store,u=l.from,o=l.size;l.total>u+o&&e.loadMoreLogs()}}}}),(0,T.default)(f.prototype,"loadMoreLogs",[L.action],Object.getOwnPropertyDescriptor(f.prototype,"loadMoreLogs"),f.prototype),(0,T.default)(f.prototype,"fetchQuery",[L.action],Object.getOwnPropertyDescriptor(f.prototype,"fetchQuery"),f.prototype),(0,T.default)(f.prototype,"fetchHistogram",[L.action],Object.getOwnPropertyDescriptor(f.prototype,"fetchHistogram"),f.prototype),g=(0,T.default)(f.prototype,"toggleHistogram",[L.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.setState((function(e){return{showHistogram:!e.showHistogram}}))}}}),y=(0,T.default)(f.prototype,"togglePolling",[L.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=e.state.polling;t?e.stopPolling():e.startPolling(),e.setState({polling:!t})}}}),E=(0,T.default)(f.prototype,"changeFrequency",[L.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.setState({pollingFrequency:t}),e.state.polling&&(e.stopPolling(),e.startPolling())}}}),s=f))||s;a.default=J},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(10),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(10),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(3543)),p=n(r(3545));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var h=f.Tabs.TabPanel,v=function(e){(0,o.default)(r,e);var a=m(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,u=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:[];return t.map((function(t){var a=Object.keys(t)[0];return s.default.createElement(d.default,{key:a,data:t,renderMetadata:e.renderMetadata})}))}},{key:"render",value:function(){return s.default.createElement(f.Tabs,{direction:"vertical",className:p.default.tabs},s.default.createElement(h,{label:s.default.createElement(f.Icon,{name:"resource",size:16}),name:"resource"},s.default.createElement("div",{className:p.default.content},this.renderHeader("METADATA"),this.renderEventMetadata())))}}]),r}(s.default.Component);a.default=v},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(28),a(42),a(448),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var n=r(a(246)),l=r(a(30)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=a(186),p=r(a(3544));function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function h(e){for(var t=1;t2&&a.shift(),a.forEach((function(e){t[e.type]=e.name})),t},(0,V.default)(e,"getCurrentMeterData",M,(0,W.default)(e)),(0,V.default)(e,"setMeterData",P,(0,W.default)(e)),e.fetchMeterData=function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,i,c;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.module,n=a.meters,l=a.resources,i=(0,u.default)(a,["module","meters","resources"]),t.next=3,e.store.fetchMeter(Ie({module:r,meters:n,resources:l},i));case 3:return c=t.sent,t.abrupt("return",c);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),(0,V.default)(e,"setTimeRange",A,(0,W.default)(e)),(0,V.default)(e,"getChildrenData",j,(0,W.default)(e)),e.getChildrenList=function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,i,c;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=a.labelSelector,n=a.currentType,l=a.childParam,u=e.getChildrenTypeByLevel(n),(i=Ie(Ie({},e.getChildrenParamsByCrumb()),l)).cluster||(i.cluster=e.cluster),r&&(i.labelSelector=(0,ce.toJS)(r)),c=[],!["namespaces","services","openpitrixs"].includes(n)){t.next=14;break}if("namespaces"!==n||e.clusterMeterStore.levelMeterData[i.namespaces]){t.next=10;break}return t.next=10,e.clusterMeterStore.fetchLevelMeter(Ie({},i));case 10:return t.next=12,e.getTypesListData(n,i);case 12:return c=t.sent,t.abrupt("return",c);case 14:if(!u.children){t.next=19;break}return t.next=17,e.clusterMeterStore.fetchList(Ie({type:u.children[0]},i));case 17:return c=t.sent,t.abrupt("return",c);case 19:return t.abrupt("return",c);case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.getClusterMeterChartData=function(){var t=(0,G.default)(o.default.mark((function t(a,r){var n,l,u,i,c,s,f,d,p,m,h;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.getMeterParamsByCrumb(),l=[],u=e.childrenResourceList.map((function(e){return{name:e.name,type:e.type,labelSelector:(0,ee.default)(e,"labelSelector")}})),Ee.RESOURCES_TYPE.forEach((function(e){var t=[];u.forEach((function(a){a.type===e&&t.push(a)})),(0,ae.default)(t)||l.push(t)})),i=[],c=!0,s=!1,t.prev=7,d=o.default.mark((function t(){var l,u,c,s,f,d,p;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=(l=h)[0].type,c=[],s=l.map((function(e){return e.name})),f=(0,ne.default)(n),r||(f[u]=l[0].name),t.next=8,e.setMeterData({module:u,meters:[a],resources:s,params:f});case 8:d=t.sent,(0,ae.default)(d)||l.forEach((function(e){var t=d.find((function(t){return(0,ee.default)(t,"metric.".concat(t.module))===e.name}));if(t){var a=(0,ee.default)(t,"sum_value"),r=(0,ee.default)(t,"metric.".concat(t.module)),n=(0,ee.default)(t,"unit.label");c.push({name:r,value:a||0,unit:n,type:u})}})),p=(0,ie.default)(c,(function(e){return e.value})).reverse(),i.push(p);case 12:case"end":return t.stop()}}),t)})),p=(0,J.default)(l);case 10:return t.next=12,p.next();case 12:return m=t.sent,c=m.done,t.next=16,m.value;case 16:if(h=t.sent,c){t.next=22;break}return t.delegateYield(d(),"t0",19);case 19:c=!0,t.next=10;break;case 22:t.next=28;break;case 24:t.prev=24,t.t1=t.catch(7),s=!0,f=t.t1;case 28:if(t.prev=28,t.prev=29,c||null==p.return){t.next=33;break}return t.next=33,p.return();case 33:if(t.prev=33,!s){t.next=36;break}throw f;case 36:return t.finish(33);case 37:return t.finish(28);case 38:e.pieChartData=(0,ue.default)(i);case 39:case"end":return t.stop()}}),t,null,[[7,24,28,38],[29,,33,37]])})));return function(e,a){return t.apply(this,arguments)}}(),e.getWorkspacesMeterChartData=function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,c,s,f,d,p,m,h,v,g,y,E,b,_,O;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("workspaces"!==(r=e.active.type)){t.next=6;break}return t.next=4,e.getClusterMeterChartData(a,!0);case 4:t.next=51;break;case 6:n=e.getMeterParamsByCrumb(),l=[],u=[],c=e.childrenResourceList.map((function(e){return{name:e.name,type:e.type,labelSelector:(0,ee.default)(e,"labelSelector")}})),Ee.RESOURCES_TYPE.forEach((function(e){var t=[];c.forEach((function(a){a.type===e&&t.push(a)})),(0,ae.default)(t)||u.push(t)})),s=Ie(Ie({},n),{},(0,i.default)({cluster:e.cluster},r,e.active.name)),f=e.clusterMeterStore.levelMeterData,d=e.getChildrenTypeByLevel(r),p=d.children,m=!0,h=!1,t.prev=17,g=(0,J.default)(p);case 19:return t.next=21,g.next();case 21:return y=t.sent,m=y.done,t.next=25,y.value;case 25:if(E=t.sent,m){t.next=34;break}b=E,_=(0,me.handleWSChartData)({levelMeterData:(0,ce.toJS)(f),meters:a,type:b,params:s}),O=(0,ie.default)(_,(function(e){return e.value})).reverse(),l.push(O);case 31:m=!0,t.next=19;break;case 34:t.next=40;break;case 36:t.prev=36,t.t0=t.catch(17),h=!0,v=t.t0;case 40:if(t.prev=40,t.prev=41,m||null==g.return){t.next=45;break}return t.next=45,g.return();case 45:if(t.prev=45,!h){t.next=48;break}throw v;case 48:return t.finish(45);case 49:return t.finish(40);case 50:e.pieChartData=(0,ue.default)(l);case 51:case"end":return t.stop()}}),t,null,[[17,36,40,50],[41,,45,49]])})));return function(e){return t.apply(this,arguments)}}(),(0,V.default)(e,"getResourceMeterData",L,(0,W.default)(e)),e.getChildrenParamsByCrumb=function(){var t={};return(0,ne.default)((0,ce.toJS)(e.crumbData)).forEach((function(e){t[e.type]=e.name})),t},e.getTypesListData=function(){var t=(0,G.default)(o.default.mark((function t(a,r){var n,l,u,i;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.getChildrenTypeByLevel(a),l=[],n.children.forEach((function(t){l.push(e.clusterMeterStore.fetchList(Ie({type:t},r)))})),t.next=5,Promise.all(l);case 5:return u=t.sent,i=(0,ue.default)(u),t.abrupt("return",i);case 8:case"end":return t.stop()}}),t)})));return function(e,a){return t.apply(this,arguments)}}(),e.getChildrenTypeByLevel=function(t){return e.props.level.find((function(e){return(0,te.default)(e.type)?e.type.indexOf(t)>-1:e.type===t}))},e.setLineChartColor=function(e){return(0,ae.default)(e)?[]:(e.map((function(e,t){return e.key=e.type,e.color=ve.COLORS_MAP[Ee.AREA_COLORS[t]]||Ee.AREA_COLORS[t],e})),e)},e.renderParentMeterCard=function(){if(!e.active.type||"cluster"===e.active.type||"workspaces"===e.active.type||(0,ae.default)((0,ce.toJS)(e.priceConfig)))return null;var a=e.crumbData.length,r=e.crumbData[a-2],n="namespaces"===e.active.type&&2===a&&e.cluster?"".concat(r.name," (").concat(e.cluster,")"):r.name;return Z.default.createElement("div",{className:Re.default.usageCard},Z.default.createElement(Se.default,(0,l.default)({className:Re.default.meterCard,isParent:!0,priceConfig:e.priceConfig,title:Z.default.createElement(Z.default.Fragment,null,Z.default.createElement("span",null,t(Ee.RESOURCE_TITLE[(0,ee.default)(r,"type","-")])),Z.default.createElement("strong",null,n))},e.parentMeterData)))},(0,V.default)(e,"handleChartData",x,(0,W.default)(e)),(0,V.default)(e,"getTimeRange",U,(0,W.default)(e)),(0,V.default)(e,"getCurrentTimeMeterData",z,(0,W.default)(e)),(0,V.default)(e,"handleCrumbOperation",F,(0,W.default)(e)),e.renderSubResource=function(){var a=(0,ce.toJS)(e.pieChartData);return"pods"===e.active.type||"openpitrix"===e.props.meterType||(0,oe.default)(e.currentMeterData.sumData)||(0,ae.default)(a)?null:Z.default.createElement(Z.default.Fragment,null,Z.default.createElement("div",{className:Re.default.subTitle},t("CURRENT_RESOURCE_CONSUMPTION"),Z.default.createElement(se.Tooltip,{content:t("METER_RESOURCE_DESC"),placement:"top"},Z.default.createElement(se.Icon,{name:"question",size:20}))),Z.default.createElement("div",{className:Re.default.childrenResourceContainer},Z.default.createElement(se.Loading,{spinning:e.resourceLoading},Z.default.createElement("div",{className:Re.default.childrenlistContainer},Z.default.createElement(Ne.default,{selectOptions:(0,ce.toJS)(e.currentMeterData.sumData),getResourceMeterData:e.getResourceMeterData,activeName:e.active.name})),Z.default.createElement("div",{className:Re.default.constomChartContainer},Z.default.createElement(Te.default,{data:a})))))},e.renderEmpty=function(){return Z.default.createElement("div",{className:Re.default.empty},Z.default.createElement(pe.default,{className:Re.default.emptyCard,icon:ve.ICON_TYPES[e.active.type],title:t("NO_DATA_DESC"),desc:t("NO_METER_DATA")}))},e}return(0,Y.default)(r,[{key:"componentDidMount",value:function(){this.initData()}},{key:"render",value:function(){var e=this.active,a=e.type,r=e.name,n=e.createTime,u=(0,ye.getWebsiteUrl)().url,o=Object.values((0,ce.toJS)(this.currentMeterData)).every((function(e){return(0,ae.default)(e)}));return(0,ae.default)(this.list)?Z.default.createElement("div",{className:Re.default.empty},Z.default.createElement(se.Loading,{spinning:this.sideLoading||this.loading},Z.default.createElement(pe.default,{className:Re.default.emptyCard,icon:"cluster",title:t("NO_CLUSTER_AVAILABLE"),desc:(0,ye.learnMoreTip)(t.html("METERING_NOT_ENABLED_DESC",{docUrl:u})),actions:Z.default.createElement(ge.default,{onClick:this.props.handleBack},"返回")}))):Z.default.createElement("div",{className:Re.default.billDetail},Z.default.createElement("div",{className:(0,$.default)(Re.default.leftContent,(0,i.default)({},Re.default.paddingBottom0,this.crumbData.length<2||(0,ae.default)((0,ce.toJS)(this.priceConfig))))},Z.default.createElement(be.default,{crumbData:(0,ce.toJS)(this.crumbData),handleCrumbOperation:this.handleCrumbOperation,loading:this.loading||this.sideLoading,cluster:this.cluster}),Z.default.createElement(Oe.default,{list:this.list,active:(0,ce.toJS)(this.active),handleSelectResource:this.handleSelectResource,getChildrenData:this.getChildrenData,loading:this.sideLoading||this.loading,fetchMeterData:this.fetchMeterData,crumbData:this.crumbData,timeRange:(0,ce.toJS)(this.timeRange),getMeterParamsByCrumb:this.getMeterParamsByCrumb,priceConfig:this.priceConfig,cluster:this.cluster,clusterList:this.clusterList,priceConfigList:this.priceConfigList}),this.renderParentMeterCard()),Z.default.createElement("div",{className:Re.default.rightContent},Z.default.createElement(se.Loading,{spinning:this.loading},Z.default.createElement(Z.default.Fragment,null,Z.default.createElement(_e.default,{type:a,cluster:this.cluster,clusters:this.clusters,setCluster:this.setCluster}),o?this.renderEmpty():Z.default.createElement("div",{className:Re.default.content},Z.default.createElement(Se.default,(0,l.default)({className:Re.default.toothbg,title:Z.default.createElement(Z.default.Fragment,null,Z.default.createElement("span",null,t(Ee.RESOURCE_TITLE[a].toUpperCase().replace(/\s+/g,"_"))),Z.default.createElement("strong",null,r)),priceConfig:this.priceConfig},this.currentMeterData)),Z.default.createElement("div",{className:Re.default.subTitle},t("CONSUMPTION_HISTORY")),Z.default.createElement("div",{className:Re.default.info},(0,ae.default)((0,ce.toJS)(this.timeRange))?null:Z.default.createElement(Ce.default,{createTime:n,getTime:this.getTimeRange,timeRange:this.timeRange})),Z.default.createElement(De.default,{chartData:(0,ce.toJS)(this.chartData),priceConfig:this.priceConfig}),Z.default.createElement(ke.default,{data:(0,ce.toJS)(this.tableData),priceConfig:this.priceConfig}),this.renderSubResource())))))}}]),r}(Z.default.Component),f=(0,K.default)(s.prototype,"crumbData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),d=(0,K.default)(s.prototype,"cacheCrumbData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),p=(0,K.default)(s.prototype,"tableData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),m=(0,K.default)(s.prototype,"active",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),h=(0,K.default)(s.prototype,"list",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),v=(0,K.default)(s.prototype,"timeRange",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),g=(0,K.default)(s.prototype,"currentMeterData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),y=(0,K.default)(s.prototype,"parentMeterData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),E=(0,K.default)(s.prototype,"sideLoading",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),b=(0,K.default)(s.prototype,"loading",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_=(0,K.default)(s.prototype,"chartData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),O=(0,K.default)(s.prototype,"priceConfig",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),S=(0,K.default)(s.prototype,"priceConfigList",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),C=(0,K.default)(s.prototype,"pieChartData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),D=(0,K.default)(s.prototype,"resourceLoading",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),k=(0,K.default)(s.prototype,"getPriceConfigListByCluster",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=[],a.forEach((function(t){t.disabled||r.push(e.store.fetchPrice({cluster:t.name}))})),globals.app.isMultiCluster&&r.push(e.store.fetchPrice({cluster:""})),t.next=5,Promise.all(r);case 5:n=t.sent,e.priceConfigList=n;case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),N=(0,K.default)(s.prototype,"getClustersList",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=e.crumbData[0].list.find((function(e){return e.name===t})),r="system-workspace"===t?e.clusterList:(0,ee.default)(a,"_origin.clusters",[]);if((0,ae.default)(r))return[];var n=r.map((function(t){var a=e.clusterList.find((function(e){return e.name===t.name}));return(0,ae.default)(a)?null:{label:a.name,value:a.name,type:a._origin.isHost?"host":"member",disabled:a.disabled,sortValue:Number(a.disabled)}})).filter((function(e){return!(0,ae.default)(e)}));return n.every((function(e){return e.disabled}))?[]:(0,ie.default)(n,(function(e){return e.sortValue}))}}}),T=(0,K.default)(s.prototype,"setPriceConfig",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t||(0,ee.default)(ve.DEFAULT_CLUSTER,"metadata.name"),r=e.priceConfigList.find((function(e){return e.cluster&&e.cluster===a})),n=(0,ne.default)(r);delete n.cluster,e.priceConfig=(0,ae.default)(n)?{}:r,e.setStartTime()}}}),R=(0,K.default)(s.prototype,"setStartTime",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.startTime=(0,me.getRetentionDay)((0,ee.default)(e.priceConfig,"retention_day","7d"))}}}),w=(0,K.default)(s.prototype,"setCluster",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.cluster=a,e.loading=!0,r=e.active,n=r.name,l=r.type,u=e.list.find((function(e){return e.name===n})),e.setPriceConfig(a),t.next=7,e.getCurrentMeterData({name:n,type:l,isCopy:!0,isTime:!0,start:e.startTime,labelSelector:(0,ee.default)(u,"labelSelector","")});case 7:e.loading=!1;case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),I=(0,K.default)(s.prototype,"setActiveCrumb",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.name,r=t.type,n=t.isCopy,l=t.start,u=(0,re.default)(e.crumbData);u.type=r,u.name=a,u.start=l,n&&(e.cacheCrumbData=(0,ne.default)((0,ce.toJS)(e.crumbData)))}}}),M=(0,K.default)(s.prototype,"getCurrentMeterData",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,i,c,s,f,d;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.name,n=a.type,l=a.isCopy,u=a.labelSelector,i=a.isTime,c=a.start,e.active={name:r,type:n,start:c},e.tableData=[],e.pieChartData=[],e.timeRange={},e.setActiveCrumb({name:r,type:n,isCopy:!!l,start:c}),s=e.getMeterParamsByCrumb(),e.loading=!0,t.next=10,e.setMeterData({module:n,meters:"all",resources:[r],start:c,isTime:i,params:s});case 10:return f=t.sent,t.next=13,e.getCurrentTimeMeterData({valueKey:"currentMeterData",module:n,resources:[r],start:c,params:s});case 13:if(e.tableData=e.setLineChartColor(f),e.setTimeRange({isTime:i,start:c}),e.chartData=f,"pods"===n){t.next=35;break}if(!["workspaces","cluster","nodes"].includes(n)){t.next=24;break}return t.next=20,e.getChildrenList({labelSelector:u,currentType:n});case 20:d=t.sent,e.childrenResourceList=d,t.next=31;break;case 24:if(e.clusterMeterStore.levelMeterData[s.namespaces]){t.next=30;break}return s.cluster||(s.cluster=e.cluster),t.next=28,e.clusterMeterStore.fetchLevelMeter(Ie({},s));case 28:t.next=31;break;case 30:e.childrenResourceList=[];case 31:return t.next=33,e.getResourceMeterData((0,ee.default)(e.tableData,"[0].type","cpu"));case 33:t.next=36;break;case 35:e.childrenResourceList=[];case 36:e.loading=!1;case 37:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),P=(0,K.default)(s.prototype,"setMeterData",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,i,c,s,f,d,p;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.params,n=a.module,l=a.meters,u=a.resources,i=a.list,c=a.start,s=a.end,f=a.isTime,r.cluster&&"cluster"===e.props.meterType&&(e.cluster=r.cluster),r.cluster=e.cluster,"applications"!==n||(0,ae.default)(u)||(d=i||e.list,u=u.map((function(e){var t=d.find((function(t){return t.name===e})),a=(0,ee.default)(t,"_origin.version.name","")||(0,ee.default)(t,"_origin.version","");return"".concat(e).concat(a?":".concat(a):"")}))),"openpitrixs"===n&&globals.app.isMultiCluster&&"host"!==(0,ee.default)(e.clusters.find((function(e){return e.value===r.cluster})),"type")&&delete r.cluster,t.next=7,e.fetchMeterData(Ie({module:n,meters:l,resources:u,isTime:f,start:c,end:s},r));case 7:return p=t.sent,t.abrupt("return",p);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),A=(0,K.default)(s.prototype,"setTimeRange",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.isTime,r=(0,u.default)(t,["isTime"]),n=(0,me.getTimeParams)(Ie({isTime:a},r)),l=n.step,o=n.start,i=n.end;e.timeRange=o>=i?{}:{step:(0,he.getTimeStr)(l),start:1e3*o,end:1e3*i}}}}),j=(0,K.default)(s.prototype,"getChildrenData",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,i,c,s,f;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.name,n=a.type,l=a.labelSelector,u=(0,re.default)(e.crumbData),e.loading=!0,e.sideLoading=!0,"workspaces"===n&&r!==u.name&&(e.clusters=e.getClustersList(r),e.cluster=(0,ee.default)(e.clusters,"[0].value",""),e.setPriceConfig(e.cluster)),"cluster"===n&&r!==u.name&&e.setPriceConfig(r),e.setActiveCrumb({name:r,type:n,isCopy:!0,start:e.startTime}),t.next=9,e.getChildrenList({labelSelector:l,currentType:n});case 9:if(i=t.sent,(0,ae.default)(i)||!(0,te.default)(i)){t.next=20;break}return c=i[0].type,s=(0,re.default)(e.crumbData),f=e.getMeterParamsByCrumb(),t.next=16,e.getCurrentTimeMeterData({valueKey:"parentMeterData",params:f,module:s.type,start:s.start,resources:[s.name]});case 16:return e.crumbData.push({type:c,name:i[0].name,list:i,start:e.startTime}),t.next=19,e.getCurrentMeterData({name:i[0].name,type:c,isCopy:!0,isTime:!0,start:e.startTime,labelSelector:(0,ee.default)(i,"[0].labelSelector")});case 19:e.list=i;case 20:e.loading=!1,e.sideLoading=!1;case 22:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),L=(0,K.default)(s.prototype,"getResourceMeterData",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.props.level,e.resourceLoading=!0,"workspaces"!==r[0].type){t.next=7;break}return t.next=5,e.getWorkspacesMeterChartData(a);case 5:t.next=9;break;case 7:return t.next=9,e.getClusterMeterChartData(a);case 9:e.resourceLoading=!1;case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),x=(0,K.default)(s.prototype,"handleChartData",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,i;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.meters,n=(0,u.default)(a,["meters"]),l=e.active.name,e.tableData=[],t.next=5,e.setMeterData({module:e.active.type,resources:[l],meters:r,isTime:!0,params:n});case 5:i=t.sent,e.tableData=e.setLineChartColor(i),e.chartData=i;case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),U=(0,K.default)(s.prototype,"getTimeRange",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.type,r=t.value;if("close"===t.methord){var n=e.getMeterParamsByCrumb();(0,le.default)(e.timeRange,"".concat(a),r),e.handleChartData(Ie(Ie({meters:"all"},n),(0,ce.toJS)(e.timeRange)))}(0,le.default)(e.timeRange,"".concat(a),r)}}}),z=(0,K.default)(s.prototype,"getCurrentTimeMeterData",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,i,c,s,f,d;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.valueKey,n=a.params,l=a.module,u=a.start,i=a.resources,t.next=3,e.setMeterData({params:n,meters:"all",module:l,start:u,end:new Date,resources:i,valueKey:"parentMeterData",isTime:!0});case 3:c=t.sent,s=e.getSumMeterData(c),f=s.sumData,d=s.feeData,e[r]={sumData:f,feeData:d};case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),F=(0,K.default)(s.prototype,"handleCrumbOperation",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,i,c,s;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.crumbData.length-1,e.sideLoading=!0,"back"!==a){t.next=11;break}if(!(r<=0)){t.next=7;break}return e.props.handleBack(),e.sideLoading=!1,t.abrupt("return");case 7:e.crumbData.pop(),r-=1,t.next=18;break;case 11:if(!((n=e.cacheCrumbData.length-1)<=0||n===r)){t.next=15;break}return e.sideLoading=!1,t.abrupt("return");case 15:l=e.cacheCrumbData[r+1],e.crumbData.push(l),r+=1;case 18:if(u=(0,re.default)(e.crumbData),!(r>0)){t.next=25;break}return i=e.crumbData[r-1],c=e.getMeterParamsByCrumb(),"workspaces"===i.type?(c.workspaces=i.name,e.clusters=e.getClustersList(i.name),Object.keys(c).forEach((function(e){"workspaces"!==e&&(c[e]=void 0)}))):c[u.type]=void 0,t.next=25,e.getCurrentTimeMeterData({params:c,valueKey:"parentMeterData",module:i.type,start:i.start,resources:[i.name]});case 25:return s=u.list.find((function(e){return e.name===u.name})),t.next=28,e.getCurrentMeterData({name:u.name,type:u.type,start:e.startTime,labelSelector:(0,ee.default)(s,"labelSelector",""),isTime:!0});case 28:e.list=u.list,e.sideLoading=!1;case 30:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),c=s))||c;a.default=Pe},,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(29),a(16),a(9),a(13),a(10),a(4),a(22),a(23),a(17),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(29),a(28),a(42),a(16),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(38),a(7),a(32);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o,i,c,s,f,d,p,m,h,v,g=r(a(44)),y=r(a(65)),E=r(a(36)),b=r(a(37)),_=r(a(88)),O=r(a(55)),S=r(a(56)),C=r(a(51)),D=r(a(49)),k=(r(a(66)),a(14)),N=r(a(60)),T=r(a(63)),R=r(a(158)),w=r(a(438)),I=r(a(856)),M=r(a(445)),P=r(a(439)),A=r(a(961)),j=r(a(1206)),L=r(a(443)),x=r(a(318)),U=r(a(452)),z=a(72),F=a(1205);function G(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function V(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespaces,r=e.workspaces,n=e.deployments,l=e.statefulsets,u=e.daemonsets,o=e.services,i=e.pods,c="";return t&&(c+="/klusters/".concat(t)),a&&(c+="/namespaces/".concat(a)),r&&(c+="/workspaces/".concat(r)),o&&(c+="/services/".concat(o)),n&&(c+="/deployments/".concat(n)),l&&(c+="/statefulsets/".concat(l)),u&&(c+="/daemonsets/".concat(u)),i&&(c+="/pods/".concat(i)),c}},{key:"isMultiCluster",get:function(){return!globals.app.isMultiCluster}}]),a}(r(a(1781)).default),i=(0,D.default)(o.prototype,"list",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),c=(0,D.default)(o.prototype,"clustersConfig",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),s=(0,D.default)(o.prototype,"cacheList",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),f=(0,D.default)(o.prototype,"levelMeterData",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),d=(0,D.default)(o.prototype,"cacheLevelData",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),p=(0,D.default)(o.prototype,"isLoading",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),m=(0,D.default)(o.prototype,"fetchList",[k.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,g.default)(n.default.mark((function t(a){var r,l,o,i,c,s,f,d,p;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.type,l=(0,u.default)(a,["type"]),o=e.getStore(r),i=(0,F.getFetchParams)(V({isMultiCluster:e.isMultiCluster,type:r},l)),c=(0,F.getListConfig)({isMultiCluster:e.isMultiCluster,type:r}),s=[],i.forEach((function(e){"[object Array]"===Object.prototype.toString.call(o)?o.forEach((function(t){s.push(t.fetchList(V({},e)))})):s.push(o.fetchList(V({},e)))})),t.next=8,Promise.all(s).catch((function(){return[]}));case 8:if(f=t.sent,d=[],!(0,T.default)(f)&&(0,N.default)(f)&&f.forEach((function(t,a){t.forEach((function(t){if(!(0,F.hasNameSpacesType)(r)||(0,F.hasNameSpacesType)(r)&&(0,F.filterListByType)(V({type:r},l))(t)){var n=c[a],u=n.status,o=n.desc,i=e.handleStatusByWorkload(u,r,t),s=e.handleNameByType(r,t),f=e.handleIconByType(r,t.provider);d.push({icon:f,name:s,status:i,desc:o,labelSelector:t.selector,type:r,_origin:V({},t)})}}))})),"pods"===r&&(d=d.filter((function(e){return"Completed"!==e.status&&"Error"!==e.status}))),!l.node){t.next=15;break}return e.list=d,t.abrupt("return",d);case 15:return t.next=17,(0,F.filterResourceLevel)(V({levelMeterData:e.levelMeterData,type:r,data:d},l));case 17:return p=t.sent,e.list=p,t.abrupt("return",p);case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),h=(0,D.default)(o.prototype,"fetchLevelMeter",[k.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,g.default)(n.default.mark((function t(a){var r,u,o,i,c,s;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,u=a.namespaces,o=a.workspaces,r&&(e.cluster=r),i="".concat(e.tenantUrl({cluster:r}),"/namespaces/").concat(u,"/metering/hierarchy").concat(o?"?workspace=".concat(o):""),t.next=5,request.get(i,{},{},(function(){return{}}));case 5:return c=t.sent,s=(0,R.default)(c)||(0,T.default)(c)?{}:(0,l.default)({},u,c),e.levelMeterData=s,t.abrupt("return",s);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),v=(0,D.default)(o.prototype,"setLevelMeterData",[k.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.levelMeterData=t}}}),o);t.default=Y},,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(6),a(16),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(6),a(28),a(42),a(16),a(4),a(23),a(57),a(17),a(7);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=a(186),d=a(72),p=r(a(3565)),m=r(a(1398));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var v=function(e){(0,u.default)(a,e);var t=h(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u0?l.default.createElement(u.Select,{className:o.default.clusterSelect,options:n,optionRenderer:function(e){var t=e.label,a=e.disabled;return l.default.createElement("span",{style:{display:"flex",alignItem:"center"}},t,l.default.createElement("span",{style:{marginLeft:"10px"}},a?l.default.createElement(u.Icon,{name:"update",color:{primary:"#ffc781",secondary:"#f5a623"}}):null))},value:r,onChange:function(e){i(e)},showTip:!0}):null)};a.default=i},function(e,t,a){e.exports={title:"_2aGXmcx7mFZbhToSS1A-OM",clusterSelect:"_5ayuJN6svE2FJ4y0dsmAQ"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(29),r(18),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(17),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(29),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(38),r(7),r(32);var l=n(r(43)),u=n(r(30));r(41);var o,i,c,s,f,d,p=n(r(44)),m=n(r(65)),h=n(r(36)),v=n(r(37)),g=n(r(88)),y=n(r(55)),E=n(r(56)),b=n(r(51)),_=n(r(49)),O=(n(r(66)),n(r(0))),S=r(239),C=r(14),D=r(186),k=r(909),N=n(r(1375)),T=n(r(63)),R=n(r(158)),w=n(r(449)),I=n(r(26)),M=r(1205),P=n(r(3570)),A=n(r(3572));function j(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function L(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=e.className,r=e.title,n=e.isParent,p=e.priceConfig,m=(0,l.default)(e,["className","title","isParent","priceConfig"]),h=p.currency?p.currency:" ",v=function(){var e=m.feeData,t=0;return(0,s.default)(e)||(0,c.default)(e)||(t=Object.keys(e).map((function(t){return 100*parseFloat((0,i.default)(e[t],"value",0))})).reduce((function(e,t){return e+t}))/100),t.toFixed(2)},g=function(e){var t=y(e);return"-"!==t?t.toFixed(3):t},y=function(e){return(0,s.default)(e)?"-":e<0?0:e},E=function(e,a){return(0,c.default)(e)?null:"price"===a&&(0,c.default)(p)?u.default.createElement("ul",{className:f.default.noPriceTip},u.default.createElement("li",null,t("PRICE_CONFIG_DESC"))):u.default.createElement("ul",null,Object.keys(e).map((function(r){var n=(0,i.default)(e[r],"value"),l="meter"===a?g(n):y(n);return e[r]?u.default.createElement("li",{key:r},u.default.createElement("div",null,l),u.default.createElement("p",null,u.default.createElement("span",null,t(d.METER_RESOURCE_TITLE[r].toUpperCase().replace(/\s+/g,"_"))),u.default.createElement("span",null,"(",(0,i.default)(e[r],"unit.label","-"),")"))):null})))},b=function(e){var a=v();return u.default.createElement("div",null,u.default.createElement("h3",null,e," ",t("CONSUMPTION_SINCE_CREATION")),(0,c.default)(p)?null:u.default.createElement("div",{className:f.default.totalPrice},u.default.createElement("h4",null,a),u.default.createElement("p",null,t("TOTAL_COST",{unit:h}))))},_=function(e){var a=v();return u.default.createElement("div",{className:f.default.parentCostContainer},u.default.createElement("div",null,u.default.createElement("h3",null,e),u.default.createElement("span",null," ",t("CONSUMPTION_SINCE_CREATION"))),u.default.createElement("p",null,u.default.createElement("span",null,h),a))},O=m.sumData,S=void 0===O?{}:O,C=m.feeData,D=void 0===C?{}:C;return n?u.default.createElement("div",{className:(0,o.default)(f.default.billTotal,a)},_(r)):u.default.createElement("div",{className:(0,o.default)(f.default.billTotal,a)},b(r),u.default.createElement("div",{className:f.default.consumContainer},(0,c.default)(S)&&(0,c.default)(D)?null:u.default.createElement(u.default.Fragment,null,E(S,"meter"),u.default.createElement("div",{className:f.default.line}),E(D,"price"))))};a.default=p},function(e,t,a){e.exports={billTotal:"_2yAhIbTXhLB8AgqHVlMiY",parentCostContainer:"_2Q8zNmDqt_oiHw6Gea24im",totalPrice:"_1UrXZ5SCxDX8Afu2MVimjJ",consumContainer:"_1TAVSr4ki5JW2eC-92JCkR",noPriceTip:"_17jZhcUtJrSh3-xDgz5rNX",line:"rQmHupJi6faIkggp0AD-m"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(240)),p=r(950),m=n(r(201)),h=n(r(243)),v=n(r(3576));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=["1h","2h","4h","8h","1d"],E="zh"===(0,m.default)("lang")?"Y年Md日 H:i":"M d, Y H:i",b=function(e){(0,o.default)(r,e);var a=g(r);function r(e){var n;(0,l.default)(this,r),(n=a.call(this,e)).getTimeRange=function(e){var t=e.type,a=e.methord;return function(e){var r=n.props,l=r.getTime,u=r.timeRange,o=u.end,i=u.start,c=new Date(e[0]).getTime();"start"===t&&c>=o||"end"===t&&c<=i||l({type:t,value:c,methord:a})}},n.handleStepChange=function(e){var a=e.type,r=e.methord;return function(e){var l=e,u=n.props,o=u.getTime,i=u.timeRange,c=i.end,s=i.start;Math.floor((c-s)/3600/24/1e3)>=30&&"1d"!==l?d.default.error({content:t("TIMERANGE_MORE_30DAY_MSG")}):o({type:a,value:l,methord:r})}},n.handleTimeRangeChange=function(e){return function(a){var r=n.props,l=r.getTime,u=r.timeRange,o=u.end,i=u.start,c=u.step,s=new Date(a[0]).getTime();if("start"===e&&s>=o||"end"===e&&s<=i)d.default.error({content:t("TIMERANGE_SELECTOR_MSG")});else{if("start"===e)Math.floor((o-s)/3600/24/1e3)>=30&&"1d"!==c&&l({type:"step",value:"1d",methord:"change"});if("end"===e)Math.floor((s-i)/3600/24/1e3)>=30&&"1d"!==c&&l({type:"step",value:"1d",methord:"change"});l({type:e,value:s,methord:"change"})}}};var u=n.props.timeRange,o=u.end||new Date;return n.endMaxDate=new Date(o),n.maxDate=new Date((0,h.default)(o).subtract(1,"minutes")),n.minDate=new Date(u.start),n}return(0,u.default)(r,[{key:"render",value:function(){var e=this.props.timeRange,a=e.step,r=e.start,n=e.end;return s.default.createElement("div",{className:v.default.datepicker},s.default.createElement("div",{className:v.default.datepickerLeft},s.default.createElement("div",null,t("BILLING_CYCLE"))),s.default.createElement("div",{className:v.default.datepickerRight},s.default.createElement("div",null,s.default.createElement(f.DatePicker,{defaultValue:r,value:r,showClearBtn:!1,dateFormat:E,minDate:this.minDate,maxDate:this.maxDate,onClose:this.getTimeRange({type:"start",methord:"close"}),onChange:this.handleTimeRangeChange("start")}),s.default.createElement("p",null,t("START_TIME"))),s.default.createElement("div",null,s.default.createElement(f.DatePicker,{defaultValue:n,value:n,showClearBtn:!1,dateFormat:E,minDate:this.minDate,maxDate:this.endMaxDate,onClose:this.getTimeRange({type:"end",methord:"close"}),onChange:this.handleTimeRangeChange("end")}),s.default.createElement("p",null,t("END_TIME"))),s.default.createElement("div",null,s.default.createElement("div",null,s.default.createElement(f.Select,{value:a,options:(0,p.getTimeOptions)(y),onChange:this.handleStepChange({type:"step",methord:"close"})})),s.default.createElement("p",null,t("SAMPLING_INTERVAL")))))}}]),r}(s.default.Component);a.default=b},function(e,t,a){e.exports={datepicker:"_27tdhObpPbURPjQ15hD9_p",datepickerLeft:"_1keZq2egvTiK6G1mB4EamV",datepickerRight:"_2JDSh06KoL1Fb1gCk0R4Qr"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(29),r(18),r(4),r(23),r(24),r(17),r(64),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(6),r(29),r(18),r(42),r(4),r(23),r(57),r(24),r(17),r(64),r(7),r(32);var l=n(r(315)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(26)),p=n(r(74)),m=n(r(63)),h=n(r(806)),v=n(r(60)),g=r(186),y=r(798),E=r(794),b=n(r(833)),_=n(r(3578)),O=r(943),S=n(r(3580));function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var D=function(e){(0,i.default)(r,e);var a=C(r);function r(){var e;(0,u.default)(this,r);for(var n=arguments.length,l=new Array(n),o=0;o=0?1:-1),O=b,S=v>=0?"start":"end";return o.default.createElement("g",null,o.default.createElement("text",{x:a,y:r,dy:8,textAnchor:"middle",fill:f,className:"chart__center__text"},d.name),o.default.createElement(i.default,{cx:a,cy:r,innerRadius:l,outerRadius:u,startAngle:c,endAngle:s,fill:f}),o.default.createElement(i.default,{cx:a,cy:r,startAngle:c,endAngle:s,innerRadius:u+6,outerRadius:u+10,fill:f}),o.default.createElement("path",{d:"M".concat(g,",").concat(y,"L").concat(E,",").concat(b,"L").concat(_,",").concat(O),stroke:f,fill:"none"}),o.default.createElement("circle",{cx:_,cy:O,r:2,fill:f,stroke:"none"}),o.default.createElement("text",{x:_+12*(v>=0?1:-1),y:O,textAnchor:S,fill:"#333"},"".concat(m," ").concat(d.unit)),o.default.createElement("text",{x:_+12*(v>=0?1:-1),y:O,dy:18,textAnchor:S,fill:"#999"},"(".concat((100*p).toFixed(2),"%)")))},_=function(e){var a=e.data,r=e.dataKey,n=void 0===r?"value":r,l=(0,o.useState)(0),i=(0,u.default)(l,2),_=i[0],O=i[1];return(0,m.default)(a)?null:o.default.createElement(c.default,{width:"100%",height:"100%"},o.default.createElement(p.default,{width:250,height:250},o.default.createElement(s.default,{vertical:!0,content:function(e){var a=e.payload;return o.default.createElement("div",{className:g.default.resourceList},o.default.createElement("ul",null,a.map((function(e,a){var r=e.payload,n=r.name,l=r.value,u=r.type,i=r.unit;return o.default.createElement("li",{key:"item-".concat(a)},o.default.createElement("i",{style:{background:e.color}}),o.default.createElement(E.default,{icon:v.ICON_TYPES[u],type:u,name:n}),o.default.createElement(h.default,{className:g.default.info,title:"".concat(n),description:t(y.RESOURCE_TITLE[u])}),o.default.createElement("span",null," ".concat(l," ").concat(i)))}))))},verticalAlign:"top"}),o.default.createElement(d.default,{cx:"70%",data:a,dataKey:n,innerRadius:"60%",outerRadius:"75%",activeShape:b,activeIndex:_,onMouseEnter:function(e,t){O(t)}},a.map((function(e,t){return o.default.createElement(f.default,{key:"cell-".concat(e.name),fill:y.PIE_COLORS[t%y.PIE_COLORS.length],strokeWidth:1})})))))};a.default=_},function(e,t,a){e.exports={resourceList:"_31MsHfl5iWHdowDFRcP_c_",info:"_1x0CTr7Gdd16AxoTqHsNYT"}},function(e,t,a){e.exports={empty:"_17Mqxb1Mgn-uRdDZOJ1Qry",emptyCard:"_3Je_SSJ5BVw3PS1lYiaF4a",billDetail:"_34UPSURIT6CqbdKJPw0R7F",paddingBottom0:"Pwj-ykGPltZo5v5_plDlH",leftContent:"_3s_-nS9c5xnUUgNEPJ8KBe",usageCard:"_21O2m-U6tWGv0Y9s4Y4Ajh",meterCard:"_2gAbgzqWqzvuq_xZzCJQ1f",rightContent:"_3Aa1yND_BGYLN9nw7XneCp",content:"_3g0_NpYdRmw2VOPc2T6ywW",toothbg:"_1Rh1CvWKS3lQeuSjvWt3Y0",subTitle:"_3jfzvzWfyayS9TsDXqD6lC",info:"_2oNPFCeABRFS8ryVIKhich",childrenResourceContainer:"_1OGurl1hQb7F7WnATfB1QY",childrenlistContainer:"_2pzMlSUqyzZuZDlITePlsG",constomChartContainer:"_1yVmPte_v552Dq8WqeShqg"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={wrapper:"_1FhVvljOspycHsfzDrmHds",item:"_3uwdOWJxem3W_jqv6BAFu0",disabled:"sjn_zdlBrahI74WoV5omc",cluster:"_2s530jxSq442V0tK0dIkX-",action:"_30jbBaVzPyFFq_kLZenMJb",loading:"_2AViFhQ9LVdDjo1TbCma_n",clusterGroupTag:"_2tthhYeEaldV9GRAYCBRGE",production:"_3yIRf79JJMwAIiDuiJ-pCJ",development:"_3tNJGwW0JIy457E7wJg2vi",testing:"ITsFiOT5f8SuWqLf3dqin",demo:"rCDJ6PUxymw3W-b5WZ8KP",radios:"_3s7U5MUfODfm6UTxJ8Gkak"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(832),n={"node:pod_abnormal:ratio{$1}":{label:"UNAVAILABLE_POD_RATIO",prefixIcon:"pod",ruleConfig:r.PERCENT_RULE_CONFIG},"node:pod_utilisation:ratio{$1}":{label:"POD_QUOTA_UTILIZATION_SCAP",prefixIcon:"pod",ruleConfig:r.PERCENT_RULE_CONFIG},"node:node_cpu_utilisation:avg1m{$1}":{label:"CPU_UTILIZATION_SCAP",prefixIcon:"cpu",ruleConfig:r.PERCENT_RULE_CONFIG},"node:load1:ratio{$1}":{label:"CPU_LOAD_1",prefixIcon:"cpu",ruleConfig:r.BASE_RULE_CONFIG},"node:load5:ratio{$1}":{label:"CPU_LOAD_5",prefixIcon:"cpu",ruleConfig:r.BASE_RULE_CONFIG},"node:load15:ratio{$1}":{label:"CPU_LOAD_15",prefixIcon:"cpu",ruleConfig:r.BASE_RULE_CONFIG},"node:node_memory_bytes_available:sum{$1}":{label:"MEMORY_AVAILABLE",prefixIcon:"memory",ruleConfig:r.DISK_RULE_CONFIG},"node:node_memory_utilisation:{$1}":{label:"MEMORY_UTILIZATION_SCAP",prefixIcon:"memory",ruleConfig:r.PERCENT_RULE_CONFIG},"node:disk_space_available:{$1}":{label:"DISK_SPACE_AVAILABLE",prefixIcon:"storage",ruleConfig:r.DISK_RULE_CONFIG},"node:disk_space_utilization:ratio{$1}":{label:"DISK_SPACE_UTILIZATION",prefixIcon:"storage",ruleConfig:r.PERCENT_RULE_CONFIG},"node:disk_inode_utilization:ratio{$1}":{label:"INODE_UTILIZATION",prefixIcon:"storage",ruleConfig:r.PERCENT_RULE_CONFIG},"node:data_volume_iops_reads:sum{$1}":{label:"DISK_READ_IOPS",prefixIcon:"storage",ruleConfig:r.BASE_RULE_CONFIG},"node:data_volume_iops_writes:sum{$1}":{label:"DISK_WRITE_IOPS",prefixIcon:"storage",ruleConfig:r.BASE_RULE_CONFIG},"node:data_volume_throughput_bytes_read:sum{$1}":{label:"DISK_READ_THROUGHPUT",prefixIcon:"storage",ruleConfig:r.THROUGHPUT_RULE_CONFIG},"node:data_volume_throughput_bytes_written:sum{$1}":{label:"DISK_WRITE_THROUGHPUT",prefixIcon:"storage",ruleConfig:r.THROUGHPUT_RULE_CONFIG},"node:node_net_bytes_transmitted:sum_irate{$1}":{label:"DATA_SEND_RATE",prefixIcon:"network",ruleConfig:r.BANDWIDTH_RULE_CONFIG},"node:node_net_bytes_received:sum_irate{$1}":{label:"DATA_RECEIVE_RATE",prefixIcon:"network",ruleConfig:r.BANDWIDTH_RULE_CONFIG}};t.default=n},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(832),n=(0,r.getBaseRuleConfig)({thresholds:{unit:"Kbps"}}),l={"namespace:workload_cpu_usage:sum{$1}":{label:"CPU_USAGE_SCAP",prefixIcon:"cpu",ruleConfig:r.CPU_RULE_CONFIG},"namespace:workload_memory_usage:sum{$1}":{label:"MEMORY_USAGE_SCAP",prefixIcon:"memory",ruleConfig:r.MEMORY_RULE_CONFIG},"namespace:workload_memory_usage_wo_cache:sum{$1}":{label:"MEMORY_USAGE_WO_CACHE_SCAP",prefixIcon:"memory",ruleConfig:r.MEMORY_RULE_CONFIG},"namespace:workload_net_bytes_transmitted:sum_irate{$1}":{label:"DATA_SEND_RATE",prefixIcon:"network",ruleConfig:n},"namespace:workload_net_bytes_received:sum_irate{$1}":{label:"DATA_RECEIVE_RATE",prefixIcon:"network",ruleConfig:n},"namespace:$2_unavailable_replicas:ratio{$1}":{label:"UNAVAILABLE_WORKLOAD_REPLICA_RATIO",prefixIcon:"backup",ruleConfig:r.PERCENT_RULE_CONFIG}};t.default=l},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(832),n=(0,r.getBaseRuleConfig)({thresholds:{unit:"Kbps"}}),l={pod_cpu_usage:{label:"CPU_USAGE_SCAP",prefixIcon:"cpu",ruleConfig:r.CPU_RULE_CONFIG},pod_cpu_utilisation:{label:"CPU_UTILIZATION_SCAP",prefixIcon:"cpu",ruleConfig:r.PERCENT_RULE_CONFIG},pod_memory_usage:{label:"MEMORY_USAGE_SCAP",prefixIcon:"memory",ruleConfig:r.MEMORY_RULE_CONFIG},pod_memory_usage_wo_cache:{label:"MEMORY_USAGE_WO_CACHE_SCAP",prefixIcon:"memory",ruleConfig:r.MEMORY_RULE_CONFIG},pod_memory_utilisation:{label:"MEMORY_UTILIZATION_SCAP",prefixIcon:"memory",ruleConfig:r.PERCENT_RULE_CONFIG},pod_net_bytes_transmitted:{label:"DATA_SEND_RATE",prefixIcon:"network",ruleConfig:n},pod_net_bytes_received:{label:"DATA_RECEIVE_RATE",prefixIcon:"network",ruleConfig:n}};t.default=l},function(e,t,a){e.exports={tab_button:"_1GjZQuKzwgC-xJHgrDeRWF"}},function(e,t,a){e.exports={statusBox:"_3-nUUNPdHf6nbcNilZpYRu",tipContent:"_3hWwCJ2aJ_CoClIJxwLD92","li-inactive":"qR0ICXRI_XTjTQpSmpQ30","li-pending":"mSNAp1UtzsfpxCLTnhS7r","li-firing":"_3-ibjgejpBZzHSyM9CLeFN","li-disabled":"_28ksGom3cFiMbDfJ69J2Sj",pending:"i0nzirrByxHGMEKshU2B8",inactive:"TSFq6Mn2U7nNIetXHhvbq",firing:"_3ZvlqZkrbQaAbCXIzga0Gz",disabled:"_2x-hssz0bLHxhscbkXhHRp",iconDisabled:"_1BJXzHjXw3Nt_eSzIZepU4"}},function(e,t,a){e.exports={wrapper:"_3CpXh5MQSB8n7L6OXc7ywb",header:"_2hifQ3b2l1YUmAwfc_edPZ",banner:"_1tHeasrKfQAP5PPnH3kiAU",toolbar:"_1Tny-SYL1rocrF2kq-buRw",keyword:"_3ZFaXRGjHJxsMgsf7RM7xw",loading:"_2K9VjkD9XMBf2NvcEMJnVX",bottomLine:"_3nxTNKx3AtqUA6JhYLjjH7","table-icon":"_1qE9Pp0LPqxfcpulbP71V-",status_icon:"_3ob3SnNsE5wyYrjjB2PTMm",tab_button:"r-sE4t_ogqB-qnJe4kpcu"}},,,,function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(97),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(97),r(4);var u=l(r(96)),o=n(r(0)),i=r(3713),c=l(r(3)),s=r(3716),f=r(3717),d=r(186),p=l(r(3719));var m=function(e){var a=e.item,r=e.user,n=(0,s.useDashboardHistory)(r),l=(0,u.default)(n,2),m=l[0],h=l[1],v=m.some((function(e){return e.id===a.id})),g=(0,f.useEventEmitter)();return(0,o.useEffect)((function(){g.$emit("FavoriteHistory-".concat(a.id),m)}),[m]),(0,o.useEffect)((function(){var e=function(e){m!==e&&h(e)};return g.$on("FavoriteHistory-".concat(a.id),e),function(){g.$off("FavoriteHistory-".concat(a.id),e)}}),[]),o.default.createElement("div",{className:(0,c.default)(p.default.favorite,"favorite-icon")},o.default.createElement(d.Tooltip,{content:v?t("CANCEL_QUICK_ACCESS"):t("ADD_TO_QUICK_ACCESS")},o.default.createElement("div",{onClick:function(e){e.stopPropagation(),e.preventDefault(),h(v?(0,s.removeDashboardHistory)(r,a.id,!1):(0,s.addDashboardHistory)(r,a,!1))}},v?o.default.createElement(i.StarDuotone,{className:"star",color:"#F5A623",size:16}):o.default.createElement(i.StarHalfDuotone,{className:"starHalf",size:16,color:"#36435C"}))))};a.default=m},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"StarDuotone",{enumerable:!0,get:function(){return r.StarDuotone}}),Object.defineProperty(t,"StarHalfDuotone",{enumerable:!0,get:function(){return n.StarHalfDuotone}});var r=a(3714),n=a(3715)},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.StarDuotone=function(e){var t=(0,l.mapProps)(e,16);return n.default.createElement("svg",t,n.default.createElement("path",{d:"M7.70083 0.943204C7.82285 0.694551 8.17731 0.69455 8.29932 0.943204L10.2145 4.84615C10.3113 5.04344 10.4992 5.18034 10.7166 5.21212L15.0015 5.83833C15.2743 5.8782 15.3836 6.21317 15.1867 6.40619L12.0825 9.44937C11.9265 9.60235 11.8553 9.82209 11.8921 10.0375L12.6246 14.3331C12.6711 14.6056 12.3846 14.813 12.1402 14.6838L8.3117 12.6595C8.11674 12.5564 7.88341 12.5564 7.68846 12.6595L3.85996 14.6838C3.61553 14.813 3.32908 14.6056 3.37556 14.3331L4.1081 10.0375C4.14483 9.82209 4.07367 9.60235 3.91762 9.44937L0.813478 6.40619C0.616597 6.21317 0.725816 5.8782 0.998629 5.83833L5.28353 5.21212C5.50098 5.18034 5.68881 5.04344 5.78562 4.84615L7.70083 0.943204Z",fill:"currentColor"}))};var n=r(a(0)),l=a(1800)},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.StarHalfDuotone=function(e){var t=(0,l.mapProps)(e,16);return n.default.createElement("svg",t,n.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.2145 4.84615C10.3113 5.04344 10.4992 5.18034 10.7166 5.21212L15.0015 5.83833C15.0186 5.84082 15.035 5.84447 15.0507 5.84916C15.2868 5.91952 15.3713 6.22524 15.1867 6.40619L12.0825 9.44937C11.9265 9.60235 11.8553 9.82209 11.8921 10.0375L12.6246 14.3331C12.6275 14.3501 12.6291 14.3669 12.6295 14.3833C12.6354 14.6302 12.3693 14.8049 12.1402 14.6838L8.3117 12.6595C8.11674 12.5564 7.88341 12.5564 7.68845 12.6595L3.85996 14.6838C3.61553 14.813 3.32908 14.6056 3.37556 14.3331L4.1081 10.0375C4.14483 9.82209 4.07367 9.60235 3.91762 9.44937L0.813478 6.40619C0.616597 6.21317 0.725816 5.8782 0.998629 5.83833L5.28353 5.21212C5.29712 5.21013 5.3106 5.20774 5.32394 5.20494C5.52411 5.16299 5.69486 5.03111 5.78562 4.84615L7.70083 0.943204C7.82285 0.69455 8.17731 0.694551 8.29932 0.943204L10.2145 4.84615ZM7.06521 11.4807C7.35765 11.3261 7.67886 11.2488 8.00007 11.2488V3.36006L6.9826 5.43352C6.69217 6.02539 6.1287 6.4361 5.47634 6.53144L3.1871 6.866L4.85104 8.49726C5.31916 8.95619 5.53266 9.61541 5.42245 10.2616L5.03114 12.5563L7.06521 11.4807ZM8.93494 11.4807C8.6425 11.3261 8.32129 11.2488 8.00008 11.2488V3.36006L9.01755 5.43352C9.30799 6.02539 9.87145 6.4361 10.5238 6.53144L12.8131 6.866L11.1491 8.49726C10.681 8.95619 10.4675 9.61541 10.5777 10.2616L10.969 12.5563L8.93494 11.4807Z",fill:"currentColor"}))};var n=r(a(0)),l=a(1800)},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(84),a(9),a(13),a(10),a(85),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.removeDashboardHistory=t.addDashboardHistory=t.useDashboardHistory=void 0;var n=r(a(30)),l=r(a(96));a(12),a(11),a(6),a(84),a(160),a(28),a(191),a(159),a(34),a(15),a(9),a(13),a(10),a(4),a(85),a(7);var u=r(a(806)),o=a(0);function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function c(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"history-cache-v4",r=(0,o.useState)(null!==(t=s(a)[e])&&void 0!==t?t:[]),i=(0,l.default)(r,2),f=i[0],d=i[1];return(0,o.useEffect)((function(){var t,r=null!==(t=s(a)[e])&&void 0!==t?t:[];(0,u.default)(r,f)||d(r)}),[e,a]),(0,o.useEffect)((function(){localStorage.setItem(a,JSON.stringify(c(c({},s(a)),{},(0,n.default)({},e,f))))}),[f]),[f,d]};t.addDashboardHistory=function(e,t){var a,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"history-cache-v4",u=null!==(a=s(l)[e])&&void 0!==a?a:[],o=u.filter((function(e){return e.id!==t.id}));return o.push(t),r&&localStorage.setItem(l,JSON.stringify(c(c({},s(l)),{},(0,n.default)({},e,o)))),o};t.removeDashboardHistory=function(e,t){var a,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"history-cache-v4",u=null!==(a=s(l)[e])&&void 0!==a?a:[],o=u.filter((function(e){return Array.isArray(t)?!t.includes(e.id):e.id!==t}));return o.length===u.length||r&&localStorage.setItem(l,JSON.stringify(c(c({},s(l)),{},(0,n.default)({},e,o)))),o}},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.useEventEmitter=void 0;var n=(0,r(a(3718)).default)(),l=n.on,u=n.off,o=n.emit,i=n.all;t.useEventEmitter=function(){return{$on:l,$off:u,$emit:o,all:i}}},,function(e,t,a){e.exports={favorite:"_3JaIb46ozjKz2jKBsCjIAv"}},function(e,t,a){e.exports={wrapper:"_3qaPLN3flFkd7vdbb-a06X",icon:"_2nvnLCPMiMLWLpzmB_ss4Y",indicator:"_1korY3RT8tulRRgwANoA8l",group:"_2FFcxBZefuDpc8WshcrThZ",options:"_15s8_iioN5RvbWBdWUbE7i"}},,,,,,function(e,t,a){e.exports={table:"_1i60_Zk2GuZ0BSBW7unRbV",table_rank:"_2Mr7mDygEQ35XwS2BpvdbG",table_no_border:"_35xeFOcthetSVxVd7jbhy8",rankCol:"K5KlP-RunT4IdakA3VSci",table_transparent:"_1kEZxv3qugETuqEDftrkMQ"}},function(e,t,a){e.exports={wrapper:"kE3KwCjpxjL06m1JyXYqh",pane:"_2uVDNuCFQlEdzxeJFsgade",pane__toolbar:"_3pwemZYlldk8BVRzKSjR0M",title:"_2QLeiq4lO4-E0UWkTwZ2pU",toolbar:"B2iEbHtsi7TSbVQDFZAAM",toolbar_buttons:"_20ATWKNncgatSI7TsIFmSk",toolbar_filter:"_3DIJstY5eiupA7Z3Sx7ugA",sortTypeSelect:"_3xIBxesObSvBweKWDzU4ik",sort_button:"bIIGx7S36rL-ZE_ySMccm",table:"_3zcLFyY9c0qr-O4IcoD-xM",table_rank:"UQZcsZfu2_Uy2ZbJXbAhV",table_no_border:"_2CLtp-r29kgr89OqLBTEzk",rankList_row:"_3MTKghTP6FCVM_Oc0poYe2",rankCol:"WFE7sesMVKXIVySSq_c7Q",listContainer:"_36b1LYqEBKXqJV0PTKLfTL",pane__pagination:"toSE7w2UfWCbYgAaXuYw7",avatar:"_3D6xMvf2yi0ds1rEmmP39K"}},,,,,,,,,,,,function(e,t,a){e.exports={resourceRatio:"_1fUEZ2TB-t0fMQV4l3ACo4",subTitle:"_1vbcsgfDS-GM0SJqrqvnYL",title:"_1Ikw3GCgFAv_lfARz3bQA-",radio:"_1wUm6engBLe0T9ZdhKcK_c",radioWrapper:"v5ipbsb_HvTj8l-aUcg75",middleStyle:"_3ruV0WGGqizDKwONs0sDru"}},,,,function(e,t,a){e.exports={background:"_1OASQA4PfdJS_KhH_yCm-S",percent:"_1t1MfmrTC862QBXYV5D0xT",tooltip:"_1OIWC_rqd8Odp6dvqoZtet"}},,,,,,,,,,,,,,,,function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(18),r(16);var l=n(r(61)),u=n(r(0)),o=r(239),i=n(r(241)),c=r(186),s=r(52),f=n(r(3760)),d=function(e){return u.default.createElement("span",{className:f.default.option,key:e.value},e.isFedManaged?u.default.createElement("img",{className:f.default.indicator,src:"/assets/cluster.svg"}):u.default.createElement(c.Icon,{name:"project"}),e.label)},p=(0,o.observer)((function(e){var a=e.namespace,r=e.list,n=e.onChange,o=e.onFetch,p=(0,i.default)(r,["page","total","limit"]),m=(0,l.default)(r.data.map((function(e){return{label:(0,s.showNameAndAlias)(e),value:e.name,isFedManaged:e.isFedManaged}})));return u.default.createElement(c.Select,{className:f.default.select,value:a,onChange:n,options:m,placeholder:t("ALL_PROJECTS"),pagination:p,isLoading:r.isLoading,valueRenderer:d,optionRenderer:d,onFetch:function(e){o(e)},searchable:!0,clearable:!0})}));a.default=p},function(e,t,a){e.exports={select:"_2YBMsPA_6y4KarYxsOs4xv",option:"zNLKUmmAgrOglv5eJIpKA"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(18),r(28),r(442),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(88)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=r(186),p=n(r(3)),m=n(r(801)),h=n(r(450)),v=n(r(26)),g=n(r(60)),y=n(r(63)),E=n(r(1)),b=n(r(0)),_=r(52),O=r(794),S=n(r(3799)),C=n(r(949));function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=e||{},r=a.times,n=a.step,l=a.createTime,u={times:r,step:n};if(l){var o=new Date(l).valueOf()/1e3,i=Date.now()/1e3,c=i-o;switch(!0){case c<=1800:u.times=30,u.step="1m";break;case c<=3600:u.times=60,u.step="1m";break;case c<=18e3:u.times=60,u.step="5m"}}t.params=u},t.fetchData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.state.cluster,r=k(k({},t.params),e);a&&(r.cluster=a),t.props.onFetch(r)},t.handleChange=function(e){t.params=e;var a=!e.start&&!e.end&&t.props.enableAutoRefresh;t.setState({enableAutoRefresh:a,autoRefresh:!1},(function(){(0,O.stopAutoRefresh)((0,i.default)(t)),t.fetchData()}))},t.handleClusterChange=function(e){t.setState({cluster:e},(function(){t.fetchData()}))},t.handleRefresh=function(){t.fetchData()},t.handleAutoRefresh=function(){t.setState({autoRefresh:!t.state.autoRefresh},(function(){t.state.autoRefresh?(0,O.startAutoRefresh)((0,i.default)(t)):(0,O.stopAutoRefresh)((0,i.default)(t))}))},t.handleToggle=function(e){t.setState({active:e})},t.state={active:!1,enableAutoRefresh:e.enableAutoRefresh,autoRefresh:!1,cluster:(0,v.default)(e,"clusters[0].name","")},t.init(),t}return(0,o.default)(r,[{key:"componentDidUpdate",value:function(e){e.step===this.props.step&&e.times===this.props.times&&e.createTime===this.props.createTime||(this.initParams(this.props),this.fetchData())}},{key:"componentWillUnmount",value:function(){(0,O.stopAutoRefresh)(this)}},{key:"init",value:function(){this.initParams(this.props),this.fetchData()}},{key:"renderAutoRefresh",value:function(){var e=this.state,t=e.enableAutoRefresh,a=e.autoRefresh;return t?b.default.createElement(d.Button,{className:S.default.button,type:"control",icon:a?"pause":"start",iconType:"light",onClick:this.handleAutoRefresh}):null}},{key:"renderCustomActions",value:function(){return this.props.customAction||null}},{key:"renderOperations",value:function(){var e=this.state.active,t=this.params,a=t.step,r=t.times,n=this.props.closeBtn;return b.default.createElement("div",{className:(0,p.default)(S.default.operations,(0,l.default)({},S.default.active,e))},this.props.isFederated&&b.default.createElement(d.Select,{key:this.state.cluster,prefixIcon:b.default.createElement(d.Icon,{name:"cluster"}),className:S.default.clusters,value:this.state.cluster,options:this.clusters,onChange:this.handleClusterChange,showTip:!0}),b.default.createElement(C.default,{step:a,times:r,onChange:this.handleChange,onToggle:this.handleToggle}),this.renderAutoRefresh(),b.default.createElement(d.Button,{className:S.default.button,type:"control",icon:"refresh",iconType:"light",onClick:this.handleRefresh}),this.renderCustomActions(),n)}},{key:"renderTitle",value:function(){var e=this.props.title||t("MONITORING");return b.default.createElement("div",{className:S.default.title},b.default.createElement("span",null,e),this.renderOperations())}},{key:"renderContent",value:function(){var e=this.props.children;return(0,y.default)(e)||(0,g.default)(e)&&(0,y.default)((0,h.default)(e).filter((function(e){return e})))?null:e}},{key:"render",value:function(){var e=this.props.loading,a=this.state.active;return b.default.createElement(d.Loading,{spinning:e},b.default.createElement(m.default,{className:(0,p.default)(S.default.card,(0,l.default)({},S.default.showDropDown,a)),title:this.renderTitle(),empty:t("NO_MONITORING_DATA"),isEmpty:this.props.isEmpty},b.default.createElement("div",{className:S.default.content},this.renderContent())))}},{key:"clusters",get:function(){return this.props.clusters.map((function(e){return{label:(0,_.showNameAndAlias)(e.name||e,"cluster"),value:e.name||e}}))}}]),r}(b.default.Component);a.default=T,T.propTypes={title:E.default.string,step:E.default.string,times:E.default.number,createTime:E.default.string,onFetch:E.default.func,loading:E.default.bool,refreshing:E.default.bool,isEmpty:E.default.bool,enableAutoRefresh:E.default.bool,customAction:E.default.oneOfType([E.default.node,E.default.element])},T.defaultProps={step:"10m",times:50,createTime:"",onFetch:function(){},loading:!1,refreshing:!1,isEmpty:!1,enableAutoRefresh:!0,customAction:""}},function(e,t,a){e.exports={card:"HkMSwByVKb_DH9GlZNpYS",title:"_1oinAKfdPYwC75teupWmDr",operations:"D3Ewo-uPBdaiIlaz7nbG1",button:"_2lV2YHNnzVWYZbgRLPezn6",content:"_39DKIQh7O8MogkRM7IB5wu",showDropDown:"_3wdK0lJ1xKmVaSH1oQH9iA",clusters:"_2NdSlr3w6Oy3jYXDPydnMT"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(16),r(4),r(436),r(319),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=n(r(26)),h=r(798),v=n(r(3801));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var y=function(e){(0,i.default)(r,e);var a=g(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{};r.props.onFetch(e)},r.handleTabClick=function(e){return(0,v.cacheFunc)("_tab_".concat(e),(function(){r.setState({activeIndex:Number(e)})}),(0,o.default)(r))},r.state={activeIndex:0},r.fetchData(),r}return(0,u.default)(a,[{key:"componentDidMount",value:function(){(0,g.startAutoRefresh)(this,{interval:1e4,leading:!1})}},{key:"componentWillUnmount",value:function(){(0,g.stopAutoRefresh)(this)}},{key:"renderTabList",value:function(){var e=this,t=this.props.tabOptions,a=this.state.activeIndex;return(0,m.default)(t)?null:f.default.createElement("div",{className:_.default.tabList},t.map((function(t,r){var l=r===a,u=t.component,o=t.render,i=S(S({},t.props),{},{active:l});return f.default.createElement("div",{key:r,className:(0,p.default)(_.default.tab,(0,n.default)({},_.default.active,l)),onClick:e.handleTabClick(r)},f.default.createElement("i",{className:_.default.img}),f.default.createElement("div",{className:_.default.inner},(0,h.default)(o)?o(i):f.default.createElement(u,i)))})))}},{key:"renderTabContent",value:function(){var e=this.props.contentOptions,t=e[this.state.activeIndex]||{},a=t.component,r=t.render,n=S({},t.props);return f.default.createElement("div",{className:_.default.tabContent},f.default.createElement("div",{className:_.default.inner},(0,m.default)(e)?f.default.createElement(b.default,null):(0,h.default)(r)?r(n):f.default.createElement(a,n)))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.title,r=e.loading;return f.default.createElement(E.default,{className:(0,p.default)(_.default.card,t),title:a},f.default.createElement(y.Loading,{spinning:r},f.default.createElement("div",{className:_.default.content},this.renderTabList(),this.renderTabContent())))}}]),a}(f.default.Component);t.default=D,D.propTypes={title:d.default.string,tabOptions:d.default.array,contentOptions:d.default.array,loading:d.default.bool,refreshing:d.default.bool,onFetch:d.default.func},D.defaultProps={title:"",tabOptions:[],contentOptions:[],loading:!0,refreshing:!1,onFetch:function(){}}},function(e,t,a){e.exports={content:"_2Xa5otudrXKkSBP4ZXj_25",tabList:"aUXLJpvLU0FB8AeOm_82I",tab:"_3ZiPd90tJiVMCa-tFKc6nM",active:"_1tGP7Q2XasoaNQb4W3sxtn",img:"_1C8h77HY1Vvimz27VInPzs",inner:"DjQwqZQmUhjM9VR9YmkZ",tabContent:"_2yiUNLbPZ7wkxc_wDsSjcI"}},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(18),r(9),r(13),r(10),r(4),r(316),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(18),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(23),r(57),r(17),r(7);var l,u=n(r(315)),o=n(r(30)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=r(239),h=n(r(26)),v=r(794),g=n(r(890)),y=r(52),E=r(798),b=r(822),_=n(r(3805));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};t.monitorStore.fetchMetrics(S({metrics:Object.values((0,y.hideGPUByLicense)(D,t.props.cluster)),step:"5m",times:100},e))},t.getValue=function(e){return(0,h.default)(e,"value[1]",0)},t.getTabOptions=function(){var e=(0,v.getLastMonitoringData)(t.metrics),a=[{name:"CPU",unitType:"cpu",used:t.getValue(e[D.cpu_usage]),total:t.getValue(e[D.cpu_total])},{name:"MEMORY",unitType:"memory",used:t.getValue(e[D.memory_usage]),total:t.getValue(e[D.memory_total])},{name:"GPU",used:t.getValue(e[D.gpu_usage]),total:t.getValue(e[D.gpu_total])},{name:"GPU_MEMORY",unitType:"memory",used:t.getValue(e[D.gpu_memory_usage]),total:t.getValue(e[D.gpu_memory_total])},{name:"DISK",unitType:"disk",used:t.getValue(e[D.disk_size_usage]),total:t.getValue(e[D.disk_size_capacity])},{name:"PODS",unit:"",used:t.getValue(e[D.pod_count]),total:t.getValue(e[D.pod_capacity])}];return(0,y.hideGPUByLicense)(a,t.props.cluster).map((function(e){return{props:e,component:_.default}}))},t.getContentOptions=function(){var e=[{type:"utilisation",title:"CPU_USAGE",unit:"%",legend:["USAGE"],data:(0,h.default)(t.metrics,"".concat(D.cpu_utilisation,".data.result"))},{type:"utilisation",title:"MEMORY_USAGE",unit:"%",legend:["USAGE"],data:(0,h.default)(t.metrics,"".concat(D.memory_utilisation,".data.result"))},{type:"utilisation",title:"GPU_USAGE",unit:"%",legend:["USAGE"],data:(0,h.default)(t.metrics,"".concat(D.gpu_utilization,".data.result"))},{title:"GPU_MEMORY_USAGE",type:"utilisation",unit:"%",legend:["USAGE"],data:(0,h.default)(t.metrics,"".concat(D.gpu_memory_utilization,".data.result"))},{type:"utilisation",title:"DISK_USAGE",unit:"%",legend:["USAGE"],data:(0,h.default)(t.metrics,"".concat(D.disk_utilisation,".data.result"))},{title:"POD_COUNT",unit:"",legend:["COUNT"],data:(0,h.default)(t.metrics,"".concat(D.pod_count,".data.result"))}];return(0,y.hideGPUByLicense)(e,t.props.cluster).map((function(e){return{props:e,render:t.renderChart}}))},t.monitorStore=new g.default({cluster:e.cluster}),t}return(0,c.default)(r,[{key:"renderChart",value:function(e){var t={key:e.title,width:"100%",height:"100%"};switch(e.type){default:case"area":var a=(0,v.getAreaChartOps)(e);return p.default.createElement(E.SimpleArea,(0,u.default)({},t,a))}}},{key:"render",value:function(){var e=this.monitorStore,a=e.isLoading,r=e.isRefreshing;return p.default.createElement(b.StatusTabs,{title:t("CLUSTER_RESOURCE_USAGE"),tabOptions:this.getTabOptions(),contentOptions:this.getContentOptions(),loading:a,refreshing:r,onFetch:this.fetchData})}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"metrics",get:function(){return this.monitorStore.data}}]),r}(p.default.Component))||l)||l;a.default=k},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(30));r(5),r(16),r(436);var u=n(r(0)),o=n(r(3)),i=r(794),c=r(798),s=n(r(3806)),f=function(e){var a=e.active,r=e.name,n=e.used,f=e.total,d=e.unit,p=e.unitType,m=t(r),h=(0,i.getSuitableUnit)(f||n,p)||d,v=(0,i.getValueByUnit)(n,h),g=(0,i.getValueByUnit)(f,h),y="core"===h?"CORE_PL":h;return u.default.createElement("div",{className:(0,o.default)(s.default.tab,(0,l.default)({},s.default.active,a))},u.default.createElement(c.SimpleCircle,{width:40,height:40,title:m,value:parseFloat(v),total:parseFloat(g),unit:h,showCenter:!1,showRate:!0,active:a}),u.default.createElement("div",{className:s.default.info},u.default.createElement("div",{className:s.default.title},m," ",t(y)),u.default.createElement("p",{title:"".concat(v,"/").concat(g)},v,u.default.createElement("span",null,"/",g))))};a.default=f},function(e,t,a){e.exports={tab:"_31-JVKem4VcI-TtgNWqY6Z",active:"_2tHL5e_1AJNteMDLEE_YbE",info:"hs8j62Zb-8wabHzFg3UiM",title:"_3WVO0kjKDahAj7KuGMbO57"}},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(31),r(6),r(18),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(31),r(6),r(18),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(7);var l=n(r(315)),u=n(r(43)),o=n(r(30));r(41);var i,c=n(r(44)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(0)),v=r(239),g=n(r(63)),y=n(r(26)),E=r(72),b=r(794),_=n(r(988)),O=r(798),S=r(822),C=n(r(3808));function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t0&&void 0!==r[0]?r[0]:{},a=k({step:"5m",times:100},t),e.next=4,n.apiStore.fetchMetrics(k({metrics:[T.request_latencies_total,T.request_latencies_apis,T.request_rate]},a));case 4:return e.next=6,n.schedulerStore.fetchMetrics(k({metrics:[T.schedule_attempts_count,T.schedule_attempt_rate]},a));case 6:case"end":return e.stop()}}),e)}))),n.getSpecificData=function(e,t,a){return((0,y.default)(n.metrics,"".concat(T[e],".data.result"))||[]).find((function(e){return(0,y.default)(e,"metric.".concat(t))===a}))||{}},n.getVerbData=function(e){return n.getSpecificData("request_latencies_apis","verb",e)},n.getTabOptions=function(){return[{icon:E.ICON_TYPES.apiserver,name:"API_SERVER",title:"REQUEST_LATENCY_TCAP"},{icon:E.ICON_TYPES.apiserver,name:"API_SERVER",title:"REQUEST_RATE"},{icon:E.ICON_TYPES.scheduler,name:"SCHEDULER",title:"SCHEDULE_ATTEMPTS_TCAP"},{icon:E.ICON_TYPES.scheduler,name:"SCHEDULER",title:"SCHEDULING_RATE_TCAP"}].map((function(e){return{props:e,component:C.default}}))},n.getContentOptions=function(){var e=n.metrics;return[{type:"area",title:"REQUEST_LATENCY",unit:"ms",legend:["REST_GET","REST_POST","REST_PATCH","REST_DELETE","REST_PUT","TOTAL_AVERAGE"],data:[n.getVerbData("GET"),n.getVerbData("POST"),n.getVerbData("PATCH"),n.getVerbData("DELETE"),n.getVerbData("PUT"),(0,y.default)(e,"".concat(T.request_latencies_total,".data.result[0]"))]},{type:"area",title:"REQUEST_PER_SECOND",unit:t("TIMES_PER_SECOND"),legend:["REQUEST"],data:(0,y.default)(e,"".concat(T.request_rate,".data.result"))},{type:"area",title:"SCHEDULE_ATTEMPTS",unit:"",legend:["SUCCESS","ERROR","FAILURE"],data:[n.getSpecificData("schedule_attempts_count","result","scheduled"),n.getSpecificData("schedule_attempts_count","result","error"),n.getSpecificData("schedule_attempts_count","result","unschedulable")],areaColors:["blue","red","yellow"]},{type:"area",title:"SCHEDULING_RATE",unit:t("TIMES_PER_SECOND"),legend:["SUCCESS","ERROR","FAILURE"],data:[n.getSpecificData("schedule_attempt_rate","result","scheduled"),n.getSpecificData("schedule_attempt_rate","result","error"),n.getSpecificData("schedule_attempt_rate","result","unschedulable")],areaColors:["blue","red","yellow"]}].map((function(e){return{props:e,render:n.renderChart}}))},n.apiStore=new _.default({module:"apiserver",cluster:e.cluster}),n.schedulerStore=new _.default({module:"scheduler",cluster:e.cluster}),n}return(0,f.default)(r,[{key:"renderChart",value:function(e){var t={key:e.title,width:"100%",height:"100%"},a=(0,b.getAreaChartOps)(e);return(0,g.default)(a.data)?null:(e.type,h.default.createElement(O.SimpleArea,(0,l.default)({},t,a)))}},{key:"render",value:function(){var e=this.schedulerStore,a=e.isLoading,r=e.isRefreshing;return h.default.createElement(S.StatusTabs,{title:t("SERVICE_COMPONENT_MONITORING"),tabOptions:this.getTabOptions(),contentOptions:this.getContentOptions(),loading:a,refreshing:r,onFetch:this.fetchData})}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"metrics",get:function(){var e=this.apiStore.data,t=this.schedulerStore.data;return k(k({},e),t)}}]),r}(h.default.Component))||i)||i;a.default=R},function(e,a,r){"use strict";r(15);var n=r(20);r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(315)),u=n(r(30));r(16);var o=n(r(0)),i=n(r(3)),c=r(186),s=n(r(3809)),f=function(e){var a=e.active,r=e.icon,n=e.name,f=e.title;return o.default.createElement("div",{className:(0,i.default)(s.default.tab,(0,u.default)({},s.default.active,a))},o.default.createElement(c.Icon,(0,l.default)({name:r,size:40},a?{color:{primary:"#fff",secondary:"#fff"}}:null)),o.default.createElement("div",{className:s.default.info},o.default.createElement("div",{className:s.default.title},t(n)),o.default.createElement("p",{dangerouslySetInnerHTML:{__html:t(f)}})))};a.default=f},function(e,t,a){e.exports={tab:"_34GN7J206xlTqjhJCfdruX",active:"_3qtjymCMRzmNFfc7Wy9IMr",info:"_2XEdgRJbCd_3cr8VVZfKQo",title:"_3PNsSTeAIrmYtf2UkG8H_4"}},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(31),r(6),r(18),r(9),r(13),r(10),r(4),r(316),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(31),r(6),r(18),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(23),r(57),r(17),r(7);var l,u=n(r(315)),o=n(r(30)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=r(239),h=n(r(63)),v=n(r(26)),g=r(72),y=r(794),E=n(r(988)),b=r(798),_=r(822),O=r(1132),S=n(r(3811));function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};n.monitorStore.fetchMetrics(D({metrics:Object.values(N),step:"5m",times:100},e))},n.getSpecificData=function(e,t,a){return((0,v.default)(n.metrics,"".concat(N[e],".data.result"))||[]).find((function(e){return(0,v.default)(e,"metric.".concat(t))===a}))||{}},n.getVerbData=function(e){return n.getSpecificData("request_latencies_apis","verb",e)},n.getTabOptions=function(){return[{icon:g.ICON_TYPES.etcd,name:"etcd",title:"ETCD_STATUS"},{icon:g.ICON_TYPES.etcd,name:"etcd",title:"ETCD_PROPOSAL"},{icon:g.ICON_TYPES.etcd,name:"etcd",title:"ETCD_DB_SIZE"},{icon:g.ICON_TYPES.etcd,name:"etcd",title:"ETCD_CLIENT_TRAFFIC"}].map((function(e){return{props:e,component:S.default}}))},n.getContentOptions=function(){var e=n.metrics;return[{props:{cluster:n.props.cluster},component:O.ETCDNodes},{props:{type:"area",title:"RAFT_PROPOSAL",unit:t("TIMES_PER_SECOND"),legend:["PROPOSAL_COMMITTED","PROPOSAL_APPLIED","PROPOSAL_FAILED","PROPOSAL_PENDING"],data:[(0,v.default)(e,"".concat(N.proposals_committed_rate,".data.result[0]")),(0,v.default)(e,"".concat(N.proposals_applied_rate,".data.result[0]")),(0,v.default)(e,"".concat(N.proposals_failed_rate,".data.result[0]")),(0,v.default)(e,"".concat(N.proposals_pending_count,".data.result[0]"))],areaColors:["blue","green","red","yellow"]},render:n.renderChart},{props:{type:"area",title:"DB_SIZE",unitType:"memory",legend:["DB_SIZE"],data:(0,v.default)(e,"".concat(N.db_size,".data.result"))},render:n.renderChart},{props:{type:"area",title:"CLIENT_TRAFFIC",unitType:"traffic",legend:["RECEIVED","SENT"],data:[(0,v.default)(e,"".concat(N.client_received_bytes,".data.result[0]")),(0,v.default)(e,"".concat(N.client_sent_bytes,".data.result[0]"))]},render:n.renderChart}]},n.monitorStore=new E.default({module:"etcd",cluster:e.cluster}),n}return(0,c.default)(r,[{key:"renderChart",value:function(e){var t={key:e.title,width:"100%",height:"100%"},a=(0,y.getAreaChartOps)(e);return(0,h.default)(a.data)?null:(e.type,p.default.createElement(b.SimpleArea,(0,u.default)({},t,a)))}},{key:"render",value:function(){var e=this.monitorStore,a=e.isLoading,r=e.isRefreshing;return p.default.createElement(_.StatusTabs,{title:t("ETCD_MONITORING"),tabOptions:this.getTabOptions(),contentOptions:this.getContentOptions(),loading:a,refreshing:r,onFetch:this.fetchData})}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"metrics",get:function(){return this.monitorStore.data}}]),r}(p.default.Component))||l)||l;a.default=T},function(e,a,r){"use strict";r(15);var n=r(20);r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(315)),u=n(r(30));r(16);var o=n(r(0)),i=n(r(3)),c=r(186),s=n(r(3812)),f=function(e){var a=e.active,r=e.icon,n=e.name,f=e.title;return o.default.createElement("div",{className:(0,i.default)(s.default.tab,(0,u.default)({},s.default.active,a))},o.default.createElement(c.Icon,(0,l.default)({name:r,size:40},a?{color:{primary:"#fff",secondary:"#fff"}}:null)),o.default.createElement("div",{className:s.default.info},o.default.createElement("div",{className:s.default.title},t(n)),o.default.createElement("p",{dangerouslySetInnerHTML:{__html:t(f)}})))};a.default=f},function(e,t,a){e.exports={tab:"_15NMG2yXO_Lun04XhV1Lae",active:"_3mR_zhBbwIvUT97S3UqHnU",info:"_3kMKZotOFJMQzgswYhBdW5",title:"_32I8HGLqDgqBJ2KQ_xitGY",nodes:"_3kzjrp7n3suOj46Y7ty3tY",item:"_3PsSoBgegEfVBTreynBugR",icon:"_3h-fE6NmNSMobCbCpYskqB",circle:"_2R8YGxK8I4oAmDRZu9Ay9r",offline:"_2svSg92VRM_kYrOaBMJMqF"}},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(31),r(6),r(18),r(9),r(13),r(10),r(4),r(316),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(31),r(6),r(18),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(23),r(57),r(17),r(7);var l,u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(239),m=n(r(3)),h=n(r(63)),v=n(r(26)),g=n(r(988)),y=r(186),E=n(r(846)),b=n(r(3814)),_=n(r(1808));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){for(var t=1;t1&&p.default.createElement(_.Tooltip,{content:this.renderPodIPContent(this.networkIPs)},p.default.createElement("div",{className:k.default.podip},this.networkIPs.length))),p.default.createElement("p",null,t("POD_IP_ADDRESS_SCAP"))),this.renderMonitorings(),p.default.createElement("div",{className:k.default.arrow},p.default.createElement(_.Icon,{name:"chevron-down",type:u?"light":"",size:20})))}},{key:"renderExtraContent",value:function(){var e=this,a=this.props,r=a.prefix,n=a.isEdgeWize,l=this.props.detail,u=l.cluster,o=l.containers,i=void 0===o?[]:o,c=l.initContainers,s=void 0===c?[]:c,f=l.name;return(0,g.default)(i)?null:p.default.createElement("div",{className:k.default.itemExtra},p.default.createElement("div",{className:"margin-b8"},p.default.createElement("strong",null,t("CONTAINER_PL"))),p.default.createElement("div",{className:k.default.containers},i.map((function(t){return p.default.createElement(C.default,{isEdgeWize:n,key:t.name,prefix:r&&e.getLink(),podName:f,detail:t,cluster:u,onContainerClick:e.handleLinkClick,isCreating:e.isCreating})})),s.map((function(t){return p.default.createElement(C.default,{key:t.name,isEdgeWize:n,prefix:r&&e.getLink(),podName:f,detail:t,cluster:u,onContainerClick:e.handleLinkClick,isCreating:e.isCreating,isInit:!0})}))))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.isExpand;return p.default.createElement("div",{className:(0,v.default)(k.default.item,t,(0,u.default)({},k.default.expanded,a))},p.default.createElement("div",{className:k.default.itemMain,onClick:this.handleExpandExtra},p.default.createElement("div",{className:k.default.icon},p.default.createElement(_.Icon,{name:"pod",size:40,type:a?"light":"dark"}),this.renderStatusTip()),this.renderContent()),this.renderExtraContent())}},{key:"status",get:function(){var e=this.props.detail.podStatus,t=e.status;return{type:e.type.toLowerCase(),name:t}}},{key:"isCreating",get:function(){return"warning"===this.status.type&&"ContainerCreating"===this.status.name}},{key:"isRunning",get:function(){return"running"===this.status.type||"completed"===this.status.type}},{key:"networkIPs",get:function(){return this.props.detail.networksStatus.reduce((function(e,t){return t.ips?[].concat((0,l.default)(e),(0,l.default)(t.ips)):(0,l.default)(e)}),[])}}]),r}(p.default.PureComponent);a.default=T,T.propTypes={isEdgeWize:h.default.bool,className:h.default.string,prefix:h.default.string,detail:h.default.object,metrics:h.default.object,loading:h.default.bool,isExpand:h.default.bool,onExpand:h.default.func,onShowEvents:h.default.func,showMonitoring:h.default.bool},T.defaultProps={prefix:"",detail:{},isEdgeWize:!1,isExpand:!1,onExpand:function(){},showMonitoring:!0}},function(e,a,r){"use strict";r(15);var n=r(20);r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(16),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(26)),d=n(r(787)),p=n(r(801)),m=n(r(846)),h=n(r(1373)),v=r(1),g=n(r(3884));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var E=function(e){(0,o.default)(r,e);var a=y(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"renderContent",value:function(){var e=this.props.container,t=e.namespace,a=e.name,r=this.props,n=r.podName,l=r.isEdgeWize,u=this.context,o=u.gatewayName,i=u.gatewayNs,c=u.cluster||this.props.cluster;return(0,f.default)(this.props,"container.containerID")?s.default.createElement(h.default,{isEdgeWize:l,className:g.default.containerLog,contentClassName:g.default.containerLogContent,namespace:t,podName:n,cluster:c,containerName:a,gatewayName:o,gatewayNamespace:i}):s.default.createElement(p.default,null,s.default.createElement(m.default,{desc:"CONTAINER_LOGS_NOT_SUPPORTED"}))}},{key:"render",value:function(){var e=this.props,a=e.visible,r=e.onCancel;return s.default.createElement(d.default,{bodyClassName:g.default.body,title:t("CONTAINER_LOGS"),visible:a,onCancel:r,fullScreen:!0,hideFooter:!0},this.renderContent())}}]),r}(s.default.Component);a.default=E,E.contextTypes={isEdgeWize:v.PropTypes.bool,gatewayName:v.PropTypes.string,gatewayNs:v.PropTypes.string,cluster:v.PropTypes.string}},function(e,t,a){e.exports={body:"_2xIpWv0eUy2KqNf-tYtdAs",containerLog:"-vLGgh65xBp9j5muKQxTD",containerLogContent:"dnH0_IiFyYfpYfmg1hgpq"}},function(e,t,a){e.exports={content:"_39OJSr_1I0ySWE5IDXTgPS",table:"_2siFIGV4OlLNAn6cC6ip6o"}},function(e,t,a){e.exports={wrapper:"_3JO8ALufHH6Th6RsLTg6EB",box:"fJxyscdhUqQ5IqvqrNnv8",card:"_2VT5I0TDMsCwcJ_SuhMM6s",name:"_2QZjb0CkVrOEBHJUBPFnwI",value:"_1d4Yqo0p0_Y6uq8-vShyXl"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(16),r(4),r(23),r(57),r(17);var l,u,o,i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(3)),m=n(r(788)),h=n(r(801)),v=r(239),g=n(r(1)),y=n(r(0)),E=r(52),b=r(467),_=n(r(3888));function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var S=(0,v.observer)((o=u=function(e){(0,s.default)(r,e);var a=O(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u1&&void 0!==arguments[1]?arguments[1]:{},l=(0,v.createPatch)("yaml",a,r,"","",{context:-1}),o=(0,g.parse)(l);return(0,g.html)(o,b({drawFileList:!1},n))}},{key:"componentDidUpdate",value:function(e){(0,m.default)(e.datas,this.props.datas)||this.setState({diffHtml:this.getDiffHtml(this.props.datas,{outputFormat:this.state.mode})})}},{key:"render",value:function(){var e=this.props,t=e.title,a=e.description;return d.default.createElement("div",null,d.default.createElement("div",{className:y.default.header},d.default.createElement(h.Icon,{name:"terminal",size:20}),d.default.createElement("span",null,t),d.default.createElement(h.Icon,{name:"chevron-down",clickable:!0,size:20,onClick:this.handleModeChange("line-by-line")}),d.default.createElement(h.Icon,{name:"chevron-right",clickable:!0,size:20,onClick:this.handleModeChange("side-by-side")}),d.default.createElement("span",{className:"float-right"},a)),d.default.createElement("div",{dangerouslySetInnerHTML:{__html:this.state.diffHtml}}))}}]),a}(d.Component);t.default=O,O.propTypes={title:p.default.string,datas:p.default.arrayOf(p.default.string)},O.defaultProps={datas:["",""]}},,,function(e,t,a){},function(e,t,a){e.exports={header:"_21by05Ap1WqFl6ETG7MnQY"}},function(e,t,a){e.exports={header:"_1O9lrtOWxJdpIuBxJLt2lX",diffWrapper:"rJcIkfzIkKyVB8RM7xFBo"}},function(e,a,r){"use strict";r(15);var n=r(20);r(11),r(84),r(18),r(16),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(11),r(84),r(18),r(28),r(42),r(16),r(4),r(23),r(57),r(17),r(85);var l=n(r(30)),u=n(r(61)),o=n(r(36)),i=n(r(37)),c=n(r(88)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(1)),h=n(r(3)),v=n(r(63)),g=n(r(26)),y=n(r(928)),E=n(r(854)),b=r(52),_=r(72),O=r(794),S=r(186),C=n(r(240)),D=n(r(846)),k=n(r(1410));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var T=function(e){(0,s.default)(r,e);var a=N(r);function r(e){var n;return(0,o.default)(this,r),(n=a.call(this,e)).getItemName=function(e){return(0,g.default)(e,"metric.pod","-")},n.getCurrentValue=function(e){var t=n.props.config,a=t.type,r=t.unitType;return(0,O.getSuitableValue)((0,g.default)(e,"value[1]"),r||a)},n.handleScroll=function(e){var t=e.target,a=t.clientHeight,r=t.scrollHeight,l=a+t.scrollTop===r,u=n.props,o=u.data,i=u.page,c=u.total,s=u.onFetch;!n.scrolling&&c!==o.length&&l&&(n.scrolling=!0,s({more:!0,page:i+1}).then((function(){n.scrolling=!1})))},n.toggleChecked=function(e){n.setState({showChecked:e})},n.handleCheck=function(e){var a=n.getItemName(e);return(0,b.cacheFunc)("_resource_".concat(a),(function(){var e=n.props.maxChecked,r=(0,u.default)(n.props.checked);r.includes(a)?(0,y.default)(r,(function(e){return e===a})):r.length>=e?C.default.info({content:t("MONITORING_SELECT_LIMIT_MSG")}):r.push(a),n.props.onChange(r)}),(0,c.default)(n))},n.renderResourceItem=function(e){var a=n.props.checked,r=n.getItemName(e),l=n.getCurrentValue(e);return p.default.createElement("div",{key:r,className:k.default.item,onClick:n.handleCheck(e)},p.default.createElement(S.Checkbox,{className:k.default.itemCheck,checked:a.includes(r)}),p.default.createElement(S.Icon,{name:n.icon,size:16}),p.default.createElement("div",{className:k.default.itemInfo},p.default.createElement("strong",{title:r},r),p.default.createElement("p",null,t("CURRENT_VALUE",{value:l}))))},n.renderResourceList=function(e){return(0,v.default)(e)?p.default.createElement(D.default,null):e.map(n.renderResourceItem)},n.state={showChecked:!1},n.listRef=p.default.createRef(),n.throttleScroll=(0,E.default)(n.handleScroll,100),n}return(0,i.default)(r,[{key:"componentDidMount",value:function(){this.listNode=this.listRef.current,this.listNode&&this.listNode.addEventListener("scroll",this.throttleScroll)}},{key:"componentWillUnmount",value:function(){this.listNode&&this.listNode.removeEventListener("scroll",this.throttleScroll)}},{key:"render",value:function(){var e=this.props,a=e.loading,r=e.name,n=this.state.showChecked,u=n?this.checkedData:this.props.data;return p.default.createElement("div",{className:k.default.resources},p.default.createElement("div",{className:k.default.title},p.default.createElement("strong",null,t(r.toUpperCase())),p.default.createElement(S.Checkbox,{checked:n,onChange:this.toggleChecked},t("SHOW_SELECTED_ONLY"))),p.default.createElement("div",{className:k.default.content},p.default.createElement(S.Loading,{spinning:a},p.default.createElement("div",{className:k.default.list},p.default.createElement("div",{className:(0,h.default)((0,l.default)({},k.default.hide,!n))},this.renderResourceList(u)),p.default.createElement("div",{className:(0,h.default)((0,l.default)({},k.default.hide,n)),ref:this.listRef},this.renderResourceList(u))))))}},{key:"icon",get:function(){return _.ICON_TYPES[this.props.name.toLowerCase()]||"appcenter"}},{key:"checkedData",get:function(){var e=this,t=this.props,a=t.checked;return t.data.filter((function(t){return a.includes(e.getItemName(t))}))}}]),r}(p.default.Component);a.default=T,T.propTypes={loading:m.default.bool,config:m.default.object,name:m.default.string,maxChecked:m.default.number,page:m.default.number,total:m.default.number,checked:m.default.array,data:m.default.array,onFetch:m.default.func,onChange:m.default.func},T.defaultProps={loading:!1,config:{},name:"Resources",maxChecked:10,page:1,total:0,checked:[],data:[],onFetch:function(){},onChange:function(){}}},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var n=r(a(315)),l=r(a(30)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=r(a(1)),p=r(a(26)),m=r(a(63)),h=a(794),v=a(186),g=r(a(846)),y=a(798),E=r(a(1410));function b(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function _(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return d.default.createElement("div",{className:E.default.tlsWrapper},d.default.createElement("div",{className:E.default.tlsItem},d.default.createElement("div",{className:"h6"},t("CREDENTIAL_SI")),d.default.createElement("pre",null,this.convert(e["tls.crt"],"tls.crt"))),d.default.createElement("div",{className:E.default.tlsItem},d.default.createElement("div",{className:"h6"},t("PRIVATE_KEY_TCAP")),d.default.createElement("pre",null,this.convert(e["tls.key"],"tls.key"))))}},{key:"renderImageRepositorySecret",value:function(e){var a=this,r=e[".dockerconfigjson"];return r&&r.auths?d.default.createElement("div",{className:E.default.imageWrapper},d.default.createElement("ul",null,Object.entries(r.auths).map((function(e){var n=(0,u.default)(e,1)[0];return d.default.createElement("li",{key:n},d.default.createElement("div",{className:"h6"},d.default.createElement(h.Icon,{name:"earth"}),n),d.default.createElement("ul",null,d.default.createElement("li",null,d.default.createElement("span",null,t(".dockerconfigjson"),":"),d.default.createElement("span",null,a.convert(JSON.stringify(r),".dockerconfigjson")))))})))):null}},{key:"renderDefault",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.default.createElement("div",{className:E.default.defaultWrapper},d.default.createElement("ul",null,Object.entries(t).map((function(t){var a=(0,u.default)(t,2),r=a[0],n=a[1];return d.default.createElement("li",{key:r},d.default.createElement("span",null,r,":"),d.default.createElement("span",null,d.default.createElement("pre",null,e.convert(n,r))))}))))}},{key:"renderBasicAuth",value:function(){var e=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.default.createElement("div",{className:E.default.defaultWrapper},d.default.createElement("ul",null,Object.entries(a).map((function(a){var r=(0,u.default)(a,2),n=r[0],l=r[1];return d.default.createElement("li",{key:n},d.default.createElement("span",null,t(n.toUpperCase()),":"),d.default.createElement("span",null,d.default.createElement("pre",null,e.convert(l,n))))}))))}},{key:"renderContent",value:function(e){if(!e.type)return null;var t=null;switch(e.type){case"kubernetes.io/tls":t=this.renderTLS(e.data);break;case"kubernetes.io/dockerconfigjson":t=this.renderImageRepositorySecret(e.data);break;case"kubernetes.io/basic-auth":t=this.renderBasicAuth(e.data);break;default:t=this.renderDefault(e.data)}return t}},{key:"renderOperations",value:function(){var e=this.state.showSecret;return d.default.createElement(h.Button,{type:"flat",icon:e?"eye":"eye-closed",onClick:this.changeSecretState})}},{key:"renderPlacement",value:function(){var e=this.props.match.params,t=e.name,a=e.namespace;return this.store.detail.isFedManaged?d.default.createElement(g.default,{module:this.store.module,name:t,namespace:a,isEdgeWize:(0,y.isEdgeWizePage)()}):null}},{key:"render",value:function(){var e=this.store.detail;return d.default.createElement("div",null,this.renderPlacement(),d.default.createElement(v.default,{title:t("DATA"),operations:this.renderOperations()},this.renderContent(e)))}},{key:"originData",get:function(){var e,t;return null!==(e=null===(t=this.store.detail._originData)||void 0===t?void 0:t.data)&&void 0!==e?e:{}}}]),r}(d.default.Component))||l)||l;a.default=_},function(e,t,a){e.exports={defaultWrapper:"_2peh6PErdPDCJ6M9zNnRHF",tlsWrapper:"_2tLwXnfNxiZk4X_bSM9kmR",tlsItem:"_2r-rapgWLiquMqgE3_cZwf",imageWrapper:"_2zQdawm6yFVe8N0JA-zICj"}},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(317),l=r(a(3934));t.default=function(e){return[{path:"".concat(e,"/detail"),title:"DATA",component:l.default,exact:!0},(0,n.getIndexRoute)({path:e,to:"".concat(e,"/detail"),exact:!0})]}},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(16),r(98),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(16),r(98),r(4),r(23),r(57),r(24),r(17),r(62);var l,u=n(r(96)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(239),m=n(r(801)),h=r(52),v=n(r(944)),g=n(r(3935));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=(0,p.inject)("detailStore")(l=(0,p.observer)(l=function(e){(0,c.default)(r,e);var a=y(r);function r(e){var t;return(0,o.default)(this,r),(t=a.call(this,e)).store=e.detailStore,t.module=e.module,t}return(0,i.default)(r,[{key:"renderContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.default.createElement("div",{className:g.default.wrapper},d.default.createElement("ul",null,Object.entries(e).map((function(e){var t=(0,u.default)(e,2),a=t[0],r=t[1];return d.default.createElement("li",{key:a},d.default.createElement("div",{className:"h6"},a),d.default.createElement("pre",{className:g.default.value},r))}))))}},{key:"renderPlacement",value:function(){var e=this.props.match.params,t=e.name,a=e.namespace;return this.store.detail.isFedManaged?d.default.createElement(v.default,{module:this.store.module,name:t,namespace:a,isEdgeWize:(0,h.isEdgeWizePage)()}):null}},{key:"render",value:function(){var e=this.store,a=e.detail,r=e.isLoading;return d.default.createElement("div",null,this.renderPlacement(),d.default.createElement(m.default,{title:t("DATA"),loading:r},this.renderContent(a.data)))}}]),r}(d.default.Component))||l)||l;a.default=E},function(e,t,a){e.exports={wrapper:"objLg3fuCuqy66XEKBptC",value:"SkXJa0qm0W5rZn0Q51xi5"}},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1214)).default);t.default=c},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(317),l=r(a(3938));t.default=function(e){return[{path:"".concat(e,"/detail"),title:"DATA",component:l.default,exact:!0},(0,n.getIndexRoute)({path:e,to:"".concat(e,"/detail"),exact:!0})]}},function(e,t,a){"use strict";a(15);var r=a(20);a(18),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(18),a(42),a(16),a(4),a(23),a(57),a(17);var n,l=r(a(315)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=a(239),p=r(a(26)),m=r(a(3939)),h=r(a(1836));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=(0,d.inject)("detailStore")(n=(0,d.observer)(n=function(e){(0,i.default)(a,e);var t=v(a);function a(e){var r;return(0,u.default)(this,a),(r=t.call(this,e)).store=e.detailStore,r.module=e.module,r}return(0,o.default)(a,[{key:"render",value:function(){var e=this,t=this.store.detail,a=(0,p.default)(t,"secrets"),r=(0,p.default)(t,"name");return f.default.createElement("div",null,f.default.createElement("div",{className:h.default.secretWrapper},a.map((function(t){var a=t.name;return f.default.createElement(m.default,(0,l.default)({secret:a,serviceAccountName:r,key:a},e.props))}))))}}]),a}(f.default.Component))||n)||n;t.default=g},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(18),r(98),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(136),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(18),r(28),r(42),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(136),r(7);var l,u,o=n(r(96)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(49)),h=n(r(0)),v=r(239),g=r(14),y=r(186),E=n(r(240)),b=r(909),_=n(r(789)),O=n(r(841)),S=r(52),C=r(899),D=r(453),k=r(440),N=n(r(851)),T=n(r(1836));function R(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"namespacenetworkpolicies";return(0,n.default)(this,a),(e=t.call(this,r)).getListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getWatchListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion,"/watch").concat(e.getPath(t),"/").concat(e.module)},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath(t),"/").concat(e.module)},e}return(0,l.default)(a,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.namespace,a="";return t&&(a+="/namespaces/".concat(t)),a}}]),a}(r(a(68)).default);t.default=s},function(e,a,r){"use strict";r(15);var n=r(20);Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=r(317),u=n(r(3955));a.default=function(e){return[{path:"".concat(e,"/egress"),title:t("EGRESS_RULES"),component:u.default,exact:!0},{path:"".concat(e,"/ingress"),title:t("INGRESS_RULES"),component:u.default,exact:!0},(0,l.getIndexRoute)({path:e,to:"".concat(e,"/egress"),exact:!0})]}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(73),r(18),r(87),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(73),r(18),r(28),r(87),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(7);var l,u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=r(186),p=n(r(789)),m=n(r(26)),h=n(r(63)),v=n(r(3956)),g=r(14),y=r(239),E=n(r(0)),b=r(52),_=n(r(3960));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var C=(0,y.inject)("detailStore")(l=(0,y.observer)(l=function(e){(0,c.default)(r,e);var a=S(r);function r(e){var t;return(0,o.default)(this,r),(t=a.call(this,e)).renderLabels=function(e){return e?(0,v.default)((0,m.default)(e,"matchLabels",[])).map((function(e){return E.default.createElement("div",null,E.default.createElement("label",{className:_.default.label},E.default.createElement("span",null,e[0]),e[1]))})):""},t.renderDetailLabels=function(e,t){var a=(0,m.default)(e,t);return(0,v.default)((0,m.default)(a,"matchLabels",[])).map((function(e){return E.default.createElement("label",{className:_.default.label},E.default.createElement("span",null,e[0]),e[1])})).reduce((function(e,t){return null===e?t:E.default.createElement(E.default.Fragment,null,e," and ",t)}),null)},t.renderIpBlock=function(e){return e?E.default.createElement("label",null,(0,v.default)(e).map((function(e){return"cidr"===e[0]?"".concat(e[1]):e.join(": ")})).reduce((function(e,t){return null===e?t:E.default.createElement(E.default.Fragment,null,e," ",t)}),null)):""},t.renderPolicyDetail=function(e){var a=(0,m.default)(e,"namespace",""),r=(0,m.default)(e,"ipBlock"),n=(0,m.default)(r,"except"),l=e.direction,u=t.renderIpBlock(r),o=t.renderDetailLabels(e,"specPodSelector"),i=t.renderDetailLabels(e,"namespaceSelector"),c=t.renderDetailLabels(e,"podSelector"),s=(0,m.default)(e,"ports",[]).map((function(e){return"".concat(e.protocol,": ").concat(e.port)})).reduce((function(e,t){return null===e?t:E.default.createElement(E.default.Fragment,null,e," and ",t)}),null);return E.default.createElement("div",null,E.default.createElement("span",null,"This rule allows pods in the namespace '",a,"' "),!(0,h.default)(o)&&E.default.createElement("span",null," with the label ",o," "),E.default.createElement("span",null,"egress"===l?"to connect to ":"to receive traffic from "),(0,h.default)(r)?(0,h.default)(c)&&(0,h.default)(i)?"all pods in the same namespace ":E.default.createElement("label",null,!(0,h.default)(c)&&E.default.createElement("span",null,(0,h.default)(i)?"pods in the same namespace ":"pods "," ","with labels ",c," "),!(0,h.default)(i)&&E.default.createElement("span",null,(0,h.default)(c)?"all pods in the namespace ":"in namespaces ","with the labels ",i," ")):E.default.createElement("label",null,n&&"all IPs in "," subnet '",u,"'"," "),(0,h.default)(s)?"on all ports":E.default.createElement("span",null,"on port",s.length>1?"s":""," ",s))},t.store=e.detailStore,t}return(0,i.default)(r,[{key:"render",value:function(){var e=this,a=this.tableData;return E.default.createElement(p.default,{title:"egress"===this.direction?t("EGRESS_RULES"):t("INGRESS_RULES")},E.default.createElement(d.Table,{dataSource:a,className:_.default.table,columns:this.columns,expandedRowRender:function(t){return E.default.createElement("div",{className:_.default.detail},e.renderPolicyDetail(t))}}))}},{key:"direction",get:function(){var e=this.props.match.path.match(/:name\/([a-z]*)/);return e?e[1]:"egress"}},{key:"columns",get:function(){var e=this;return[{title:t("TARGET"),children:[{title:t("PROJECT"),dataIndex:"namespace",render:function(e){return(0,b.showNameAndAlias)(e,"project")}},{title:t("LABEL"),dataIndex:"specPodSelector",render:function(t){return e.renderLabels(t)}}]},{title:t("DESTINATION"),children:[{title:t("PROJECT"),dataIndex:"namespaceSelector",render:function(t,a){if((0,h.default)((0,m.default)(a,"ipBlock")))return(0,m.default)(t,"matchLabels")?e.renderLabels(t):(0,m.default)(a,"namespace")}},{title:t("LABEL"),dataIndex:"podSelector",render:function(t,a){if((0,h.default)((0,m.default)(a,"ipBlock")))return(0,m.default)(t,"matchLabels")?e.renderLabels(t):"Any"}},{title:"CIDR",dataIndex:"ipBlock",className:_.default.cidr,render:function(t){return e.renderIpBlock(t)}},{title:t("PORT"),dataIndex:"ports",render:function(e){return(0,h.default)(e)?"Any":e.map((function(e){return E.default.createElement("div",null,e.protocol,": ",e.port,e.endPort?"-".concat(e.endPort):"")}))}}]}]}},{key:"tableData",get:function(){var e=this,t=this.store.detail,a=(0,g.toJS)((0,m.default)(t,"_originData")),r=(0,m.default)(a,"metadata.namespace"),n=(0,m.default)(a,"spec.podSelector"),l=(0,m.default)(a,"spec.".concat(this.direction),[]),o="ingress"===this.direction?"from":"to",i=[];return l.forEach((function(t){var a=(0,m.default)(t,"ports",[]);(0,m.default)(t,"".concat(o),[]).forEach((function(t){i.push(function(e){for(var t=1;t0?"builtin":""}},{key:"rules",get:function(){return(0,d.toJS)((0,m.default)(this.store,"detail._originDataWithStatus.spec.rules",[]))}}]),a}(f.default.Component))||n)||n;t.default=E},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(18),r(48),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(18),r(28),r(48),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(188),r(7);var l,u=n(r(30)),o=n(r(315)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(789)),h=r(239),v=r(186),g=r(14),y=n(r(135)),E=n(r(26)),b=n(r(249)),_=r(72),O=n(r(3)),S=n(r(3973)),C=n(r(1847));function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r=this.props.match.params,n=r.cluster,l=r.namespace,u=r.workspace;return t=t||n,a=a||l,"".concat(u?"/".concat(u):"","/clusters/").concat(t).concat(a?"/projects/".concat(a):"")}},{key:"render",value:function(){var e=this.store.list,a=e.data,r=e.isLoading,n=e.filters;return p.default.createElement(C.default,{title:t("ALERTING_MESSAGE_PL"),loading:r},(0,g.default)(a)?p.default.createElement("div",null,t("NO_DATA_DESC")):p.default.createElement(p.default.Fragment,null,p.default.createElement(N.default,{className:R.default.table,filters:n,data:a,name:"Alerting Message",rowKey:"value",columns:this.getColumns(),selectedRowKeys:[],selectActions:[],hideHeader:!0,hideFooter:!0}),this.renderFooter()))}},{key:"type",get:function(){return this.props.match.url.indexOf("alert-rules/builtin")>0?"builtin":""}},{key:"pagination",get:function(){var e=this.state;return{page:e.page,limit:e.limit,total:this.store.list.total}}}]),r}(p.default.Component))||l;a.default=P},function(e,t,a){e.exports={table:"_1S6EGnQYhf4I_C9HYIeYHi",footer:"Kq4qO0-0y6WDXdgomQGx9",pageSizeBox:"_3L3d-EWgQL2dC6pjhEaaAw",pagesize:"_3bL0tigLuMghvx1kjbA11b",text:"_3EpDCZ8M24qb56fEsOL6zB",gap:"_23CFCJ6p6IBdfCDRazyfIm",pageSizeMenu:"QH34yZzzVVJKzl6Uy9lIr",pageSizeMenuitem:"_3TGMFzQBOsivXbopcaPhW"}},function(e,t,a){e.exports={icon:"_3uoefixeZIAoGPZ37DEVLm"}},,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(317),l=r(a(813)),u=r(a(821)),o=r(a(3986));t.default=function(e){return[{path:"".concat(e,"/resource-status"),title:"RESOURCE_STATUS",exact:!0,component:o.default},{path:"".concat(e,"/metadata"),title:"METADATA",component:u.default,exact:!0},{path:"".concat(e,"/events"),title:"EVENT_PL",exact:!0,component:l.default},(0,n.getIndexRoute)({path:e,to:"".concat(e,"/resource-status"),exact:!0})]}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(73),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(73),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l,u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(239),m=r(186),h=n(r(789)),v=n(r(831)),g=r(52),y=r(14),E=n(r(63)),b=n(r(3987)),_=n(r(3989));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var C=d.default.createElement("div",null,d.default.createElement("div",null,t("RWO_DESC")),d.default.createElement("div",null,t("ROX_DESC")),d.default.createElement("div",null,t("RWX_DESC"))),D=(0,p.inject)("detailStore")(l=(0,p.observer)(l=function(e){(0,c.default)(r,e);var a=S(r);function r(){var e;(0,o.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u0&&f.createElement(f.Fragment,null,f.createElement("div",{className:d.default.title},f.createElement("div",null,t("SECRET_INFO"))),r.map((function(e){return f.createElement("div",{key:e.name,className:d.default.objectContainer},f.createElement("div",{className:d.default.v},t(e.label)),f.createElement("div",null,f.createElement("span",{className:d.default.k},t("NAME"),":"),f.createElement("span",{className:d.default.v},e.name)),f.createElement("div",null,f.createElement("span",{className:d.default.k},t("PROJECT"),":"),f.createElement("span",{className:d.default.v},e.namespace)))}))));default:return null}}())})));a.default=v},function(e,t,a){e.exports={wrapper:"_2qRBJsVUbx2DCXhx-PjMOI",title:"DelqatdDDYD0WB80zjyye",attrs:"_3fLkwri_NoztGHHZnQ0Tvk",attr:"_2k08ybc8MfthAHUcjHCwur",k:"_19wHxkkHh7sTteCNmaVgfP",attrTitle:"_2LJajeyjpTUCghMOKSX0lj",attrValue:"Q12wxwvQ_-E9SSJ5IPDHw",objectContainer:"_1wRaHGoiEWQ4U0Y5L81-oi",kvContainer:"_39n5tBsQPDfpckCQt5CuKH",v:"_38RkRqcmTNqMQFeXrZeCLM"}},function(e,t,a){e.exports={ItemBox:"_2mELQmeBTiwa56m4FRuCho",leftBox:"W7Qki2xI0vvqvcb2Q1F2M",rightBox:"_3RqsKWBD7eq3vXQvgCfOsD",title:"_3KYfcJ0CU8B4xFsFQda5Te",toolTip:"_37f2XY7RCBfmVNY1BOdNx8",des:"_2L3vvzzxhB-Zrg5WrqyiuM",titleBox:"_2gmisrquKxEER676oJ7GxM",IconLine:"_1IDNa6yWd9AhFr_21sUGZO",cardBox:"NqsBGhYtt3JFydHzSmjZq",text:"_17aFPuXEkGgpOO2vxoLjb-"}},,,,,function(e,t,a){e.exports={wrapper:"_1RTOu4WuOVY0Fca7CPEdB9",tabHeader:"Qd42i__2a3FJ2DzYpVXqd",tabHeaderItem:"_2ICL_nLZjLbTcDxms5nROn",active:"_2NpglgYkusPNf1fA7U4yCm",tabContent:"UsMeMpWi8k2TLXu-TzcHv",chartWrapper:"_1WcDqnOpkmr5xePLz3bOpj"}},,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1420)).default);t.default=c},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(28),r(42),r(16),r(4),r(23),r(57),r(17);var l,u,o,i=n(r(315)),c=n(r(30)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(0)),v=r(239),g=n(r(1)),y=n(r(3)),E=n(r(194)),b=r(186),_=r(794),O=n(r(4019)),S=n(r(4020));function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var D=(0,v.inject)("rootStore")(l=(0,v.observer)((o=u=function(e){(0,d.default)(r,e);var a=C(r);function r(){var e;(0,s.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l99?h.default.createElement("div",{className:S.default.skip},"..."):a;return a>0?h.default.createElement("div",{className:S.default.warn},h.default.createElement(b.Tooltip,{className:S.default.tips,content:t("RESOURCE_WARNING_TIPS",{warnNum:a,tipName:t("".concat(r,"_PL"))})},h.default.createElement("div",{onClick:this.handleWarnClick},n))):null}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.icon,n=e.iconSize,l=e.name,u=e.routeName,o=e.num,s=e.metrics,f=e.onClick,d=e.cluster,p=(0,_.getAreaChartOps)({title:"",unit:"",legend:["COUNT"],data:s});return h.default.createElement("div",{"data-name":l,className:(0,y.default)(S.default.card,a)},h.default.createElement("div",{className:S.default.icon},h.default.createElement(b.Icon,{name:r,size:n}),this.renderWarn()),h.default.createElement("div",{className:(0,y.default)(S.default.info,(0,c.default)({},S.default.cursor,u||f)),onClick:this.handleClick},h.default.createElement("strong",null,o),h.default.createElement("span",null,"1"===o?t(l):t("".concat(l,"_PL")))),globals.app.hasClusterModule(d,"whizard-monitoring")&&h.default.createElement(O.default,(0,i.default)({width:330,height:44,bgColor:"transparent"},p)))}},{key:"routing",get:function(){return this.props.rootStore.routing}}]),r}(h.default.Component),u.propTypes={isEdgeWize:g.default.bool,className:g.default.string,icon:g.default.string,iconSize:g.default.number,name:g.default.string,namespace:g.default.string,routeName:g.default.string,num:g.default.oneOfType([g.default.number,g.default.string]),warnNum:g.default.number,onClick:g.default.func},u.defaultProps={isEdgeWize:!1,icon:"appcenter",iconSize:40,name:"deployment",namespace:"default",routeName:"",num:0,warnNum:0},l=o))||l)||l;a.default=D},function(e,t,a){"use strict";a(15);var r=a(20);a(827),a(11),a(18),a(10),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(827),a(11),a(18),a(42),a(10),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=a(72),d=r(a(900)),p=r(a(869)),m=r(a(870)),h=r(a(947)),v=r(a(929)),g=r(a(871)),y=r(a(862));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var b=function(e){(0,u.default)(a,e);var t=E(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"getVeticalPoints",value:function(){var e=this.props.width,t=(e-10)/10;return Array(10).fill("").map((function(e,a){return 5+t*a}))}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors,r={stroke:"#55bc8a",strokeWidth:1,fill:"#fff",fillOpacity:1};return this.series.map((function(e,n){var l=f.COLORS_MAP[a[n]];return c.default.createElement(d.default,{key:e,dataKey:e,stroke:l,fillOpacity:"0.1",fill:l,unit:t,dot:r})}))}},{key:"render",value:function(){var e=this.props,t=e.width,a=e.height,r=e.xKey,n=e.data;return c.default.createElement(g.default,{width:t,height:a,debounce:1},c.default.createElement(h.default,{data:n},c.default.createElement(m.default,{dataKey:r,hide:!0}),c.default.createElement(p.default,{wrapperStyle:{zIndex:1e3},content:c.default.createElement(y.default,null)}),c.default.createElement(v.default,{strokeDasharray:"3 6",horizontal:!1,verticalPoints:this.getVeticalPoints()}),this.renderArea()))}},{key:"series",get:function(){var e=this.props,t=e.xKey,a=e.data;return Object.keys(a[0]||{}).filter((function(e){return e!==t}))}}]),a}(c.default.Component);t.default=b,b.propTypes={width:s.default.oneOfType([s.default.string,s.default.number]),height:s.default.oneOfType([s.default.string,s.default.number]),xKey:s.default.string,unit:s.default.string,data:s.default.array,bgColor:s.default.string,areaColors:s.default.array},b.defaultProps={width:180,height:56,xKey:"time",unit:"",bgColor:f.COLORS_MAP.lightest,areaColors:["green","blue","yellow","red"],data:[]}},function(e,t,a){e.exports={card:"_2EqCYVjXVpgt08cuRczGSh",icon:"_36HfcePtCXEzvj8yzTS4vF",warn:"_1ntTH3ZrzLLbchIomuwlhQ",tips:"-w63JOV5KksV8TOcQl-U3",skip:"_2kxI8l5XqQlDPtMvynz3RZ",info:"_1u4G7Fwu2z6_yIx2xKMV71",cursor:"_1gP2nTFiH8FENSNxmyr2hr"}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(827),a(11),a(18),a(10),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(827),a(11),a(18),a(42),a(10),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=a(72),d=r(a(900)),p=r(a(869)),m=r(a(912)),h=r(a(870)),v=r(a(947)),g=r(a(929)),y=r(a(871)),E=r(a(862));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var _=function(e){(0,u.default)(a,e);var t=b(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"render",value:function(){var e=this.props,t=e.x,a=e.y,r=e.payload;return c.default.createElement("g",{transform:"translate(".concat(t,",").concat(a,")")},c.default.createElement("text",{x:0,y:0,dy:12,fill:"#79879c",textAnchor:"middle"},r.value))}}]),a}(c.default.PureComponent),O=function(e){(0,u.default)(a,e);var t=b(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"getHorizontalPoints",value:function(){var e=this.props.height,t=(e-30-6)/4;return Array(4).fill("").map((function(e,a){return 30+t*a}))}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors;return this.series.map((function(e,r){var n=f.COLORS_MAP[a[r]];return c.default.createElement(d.default,{key:e,dataKey:e,stroke:n,fillOpacity:"1",fill:"url(#colorPv)",unit:t})}))}},{key:"render",value:function(){var e=this.props,t=e.width,a=e.height,r=e.xKey,n=e.data;return c.default.createElement(y.default,{width:t,height:a,debounce:1},c.default.createElement(v.default,{data:n,margin:{top:32,left:16,right:16,bottom:0}},c.default.createElement("defs",null,c.default.createElement("linearGradient",{id:"colorPv",x1:"0",y1:"0",x2:"0",y2:"1"},c.default.createElement("stop",{offset:"5%",stopColor:"#55bc8a",stopOpacity:.2}),c.default.createElement("stop",{offset:"95%",stopColor:"#55bc8a",stopOpacity:0}))),c.default.createElement(g.default,{vertical:!1,stroke:"#36435c",strokeDasharray:"2 2",horizontalPoints:this.getHorizontalPoints()}),c.default.createElement(h.default,{dataKey:r,axisLine:!1,tickLine:!1,height:30,interval:"preserveStart",tick:c.default.createElement(_,null),minTickGap:20}),c.default.createElement(m.default,{hide:!0,type:"number",domain:[function(e){return 0-Math.abs(e)},function(e){return 1.6*e}]}),c.default.createElement(p.default,{wrapperStyle:{zIndex:1e3},content:c.default.createElement(E.default,null)}),this.renderArea()))}},{key:"series",get:function(){var e=this.props,t=e.xKey,a=e.data;return Object.keys(a[0]||{}).filter((function(e){return e!==t}))}}]),a}(c.default.Component);t.default=O,O.propTypes={width:s.default.oneOfType([s.default.string,s.default.number]),height:s.default.oneOfType([s.default.string,s.default.number]),xKey:s.default.string,unit:s.default.string,data:s.default.array,bgColor:s.default.string,areaColors:s.default.array},O.defaultProps={width:180,height:56,xKey:"time",unit:"",bgColor:f.COLORS_MAP.lightest,areaColors:["green","blue","yellow","red"],data:[]}},function(e,t,a){e.exports={wrapper:"_235Ydzrxtn47mC5KVnUqMN",chartWrapper:"_1Ih0Px-Zxe5AwW8uJkqt8N",chart:"_3awmU2UAJvmujW7qMl0RAz",title:"_2jhkSzEfNoOh15_4kzbLaw"}},function(e,t,a){e.exports={wrapper:"_29aBx9QNbrjLovrOIFCqJl",header:"_3S-YBwfAwlBHzJQi5UvabR",timeSelect:"_3zET3ukjC_TJNnZ6Dw5ePh"}},,,,,,function(e,t,a){e.exports={item:"_3AKgHrYF7Fu8kENV1qw1Xg",content:"_7hMYwDpNDo4VWwNVsinXF",contentItem:"_8Zz1AYqtLjXcwA84SIji2"}},function(e,t,a){e.exports={card:"_2UbaCzyTEGsejSpXNrF6dW",Head:"pkiC1T3lJghgtls15h59r",item:"_29oHjjQCCBQ_HO52Qhu14a",title:"_34EuAy0Td-ux7hF71uGkGI",default:"_1k0Fd-vBuAggthS2MUTYbg",desc:"Mbk9BMGODO4puVhQfoED2",icon:"_1dVn11WYgSYrEHXe9FM6AK",open:"_3fvnh8ID_KJuzAwff1Rjj",List:"_1QnLnHp8eD8OFWcXcm6UUI",inline:"_18Mhfb5La8Pz1dnD8xW0t0",barItem:"_2OZot2XVNFPRHhkODRz2ag",bar:"_3PjP81XZ-f-DuKNK9b9qOS"}},function(e,t,a){e.exports={quota:"j_jIuTBmQIJCHq9iJUPCU",item:"_19YZe4YP-4n3v2b_sZUbmz",bar:"_2a14fJwRKjewBNftJGp2R-"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(86),r(16),r(27),r(190),r(10),r(24),r(62),r(64),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(96));r(5),r(6),r(86),r(16),r(27),r(190),r(10),r(4),r(436),r(24),r(62),r(64),r(7);var u=n(r(0)),o=n(r(26)),i=n(r(158)),c=r(186),s=n(r(1044)),f=r(52),d=r(72),p=n(r(4033)),m=["limits.cpu","limits.memory","pods"],h={Ti:Math.pow(1024,4),Gi:Math.pow(1024,3),Mi:Math.pow(1024,2),Ki:1024,TB:Math.pow(1e3,4),GB:Math.pow(1e3,3),MB:Math.pow(1e3,2),KB:1e3,T:Math.pow(1e3,4),G:Math.pow(1e3,3),M:Math.pow(1e3,2),K:1e3,Bytes:1,B:1},v=function(e){var a=e.name,r=e.total,n=e.used;if(!r&&!Number(n)&&-1===m.indexOf(a))return null;var v=0,g="",y="",E=function(e){return function(e,t){return e?[e,parseFloat(t)*(d.ICON_TYPES[a]||!h[e]?1:h[e])]:["",parseFloat(t)]}(function(e){var t=Object.keys(h),a=(0,o.default)(e.match(/[0-9]+([a-zA-Z]+)/),"1","");return t.forEach((function(e){if(a.indexOf(e)>-1)return a=e,!1})),a}(e),e)};if("limits.cpu"===a||"requests.cpu"===a)r&&(v=Number((0,f.cpuFormat)(n))/Number((0,f.cpuFormat)(r)),n="".concat((0,f.cpuFormat)(n)," Core"),r="".concat((0,f.cpuFormat)(r)," Core"));else if("limits.memory"===a||"requests.memory"===a)r&&(v=Number((0,f.memoryFormat)(n))/Number((0,f.memoryFormat)(r)),n="".concat((0,f.memoryFormat)(n,"Gi")," Gi"),r="".concat((0,f.memoryFormat)(r,"Gi")," Gi"));else if(r){var b=E(n),_=(0,l.default)(b,2),O=_[0],S=_[1],C=E(r),D=(0,l.default)(C,2),k=D[0],N=D[1];g=O,y=k,v=S/N}v=Math.min(Math.max(v,0),1);var T=a.indexOf("gpu")>-1?"gpu":a,R="gpu"===T?"".concat(T,".limit"):T;return u.default.createElement("div",{className:p.default.quota},u.default.createElement(c.Icon,{name:d.ICON_TYPES[T]||"resource",size:40}),u.default.createElement("div",{className:p.default.item},u.default.createElement("div",null,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return d.ICON_TYPES[T]?t(e.replace(/[. ]/g,"_").toUpperCase()):e}(R)),u.default.createElement("p",null,t("RESOURCE_TYPE_SCAP"))),u.default.createElement("div",{className:p.default.item},u.default.createElement("div",null,function(e){if(y&&!g){var t=d.ICON_TYPES[a]||!h[y]?1:h[y];return"".concat(e/t).concat(e>0?y:"")}return e}(n)),u.default.createElement("p",null,t("USED"))),u.default.createElement("div",{className:p.default.item},u.default.createElement("div",null,(0,i.default)(r)?t("NO_LIMIT_TCAP"):r),u.default.createElement("p",null,t("QUOTA"))),u.default.createElement("div",{className:p.default.item,style:{flex:3}},u.default.createElement("div",null,t("USAGE")),u.default.createElement(s.default,{value:Math.min(v,1),className:p.default.bar,rightText:r?"":t("NO_LIMIT"),text:t("USED_PERCENT",{percent:Number((100*v).toFixed(2))})})))};a.default=v},function(e,t,a){e.exports={quota:"_3_ChjGbxbGEOsl-bn45v6",item:"_39hSvb0gytLzXkJepmuZYY",bar:"_3C2DyYLkZ1uZmTpxOaCjMD"}},function(e,t,a){e.exports={wrapper:"_2SomAa9Qr3FAZCUu_vfPVg",header:"_3IWXKjfTi9VrsxbWViUQan",item:"tXNdZn2Wks84tQIm0_DB",content:"_1slhrCDV-prgABOLHi36ms",contentItem:"nMyfCUkpNIE-XvgWGaFJd"}},,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(18),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(18),a(42),a(16),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=a(52),f=r(a(26)),d=r(a(201)),p=r(a(4049));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var h=function(e){(0,u.default)(a,e);var t=m(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"render",value:function(){var e=this.props,t=e.templates,a=e.roleCategory,r=void 0===a?[]:a,n=(0,d.default)("lang")||(0,s.getBrowserLang)();return c.default.createElement("ul",{className:p.default.wrapper,"data-test":"rule-list"},r.map((function(e){var a,r,l=t[e.name]||[],u=(null==e||null===(a=e.displayName)||void 0===a?void 0:a[n])||(null==e||null===(r=e.displayName)||void 0===r?void 0:r.en);return l.length<1?null:c.default.createElement("li",{key:e.name},c.default.createElement("div",{className:p.default.name},u),c.default.createElement("div",null,l.map((function(e){return(0,f.default)(e,"_originData.spec.displayName[".concat(n,"]"))||(0,f.default)(e,"_originData.spec.displayName.en")})).join("  |  ")))})))}}]),a}(c.default.Component);t.default=h},function(e,t,a){e.exports={wrapper:"z2WyR5A5wRu0YtfOojEJ8",name:"_2Qe_QRdB_yNsSo5jz4l2m"}},function(e,t,a){e.exports={table:"_2rTR6NVDPyorYXDf3Og1lV"}},,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(317),l=r(a(4072)),u=r(a(4073)),o=r(a(4080)),i=r(a(4084)),c=r(a(4085));t.default=function(e){return[{path:"".concat(e,"/gateway-configs"),title:"CONFIGURATION_OPTIONS",component:i.default,exact:!0},{path:"".concat(e,"/monitors"),title:"MONITORING",component:u.default,exact:!0,clusterModule:"whizard-monitoring"},{path:"".concat(e,"/logs"),title:"GATEWAY_LOGS",component:c.default,exact:!0},{path:"".concat(e,"/resource-status"),title:"RESOURCE_STATUS",component:o.default,exact:!0},{path:"".concat(e,"/metadata"),title:"METADATA",component:l.default,exact:!0},(0,n.getIndexRoute)({path:e,to:"".concat(e,"/gateway-configs"),exact:!0})]}},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(18),r(98),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(98),r(4),r(23),r(57),r(17);var u,o=n(r(96)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=l(r(0)),m=n(r(789)),h=n(r(63)),v=r(239),g=n(r(1852));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var E=(0,v.inject)("detailStore")(u=(0,v.observer)(u=function(e){(0,s.default)(r,e);var a=y(r);function r(){return(0,i.default)(this,r),a.apply(this,arguments)}return(0,c.default)(r,[{key:"render",value:function(){var e=this.detail.annotations;return p.default.createElement(m.default,{title:t("ANNOTATION_PL")},p.default.createElement("div",{className:g.default.container},p.default.createElement("ul",null,(0,h.default)(e)?p.default.createElement("li",null,t("NO_DATA")):Object.entries(e).map((function(e){var t=(0,o.default)(e,2),a=t[0],r=t[1];return p.default.createElement("li",{key:a},p.default.createElement("span",{className:g.default.key},a),p.default.createElement("span",null,r))})))))}},{key:"store",get:function(){return this.props.detailStore}},{key:"detail",get:function(){return this.store.gateway.data||{}}}]),r}(p.Component))||u)||u;a.default=E},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(86),r(18),r(16),r(9),r(13),r(10),r(4),r(316),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(86),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(24),r(17),r(62),r(7);var l=n(r(315)),u=n(r(43)),o=n(r(30));r(41);var i,c=n(r(44)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(0)),v=r(239),g=n(r(26)),y=n(r(63)),E=r(794),b=n(r(1075)),_=r(186),O=r(822),S=r(798),C=n(r(4074));function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t-1||t.indexOf("/workspaces/")>-1?localStorage.getItem("federated-cluster"):e}},{key:"namespace",get:function(){return this.props.match.params.namespace}},{key:"workspace",get:function(){return this.props.match.params.workspace}},{key:"metrics",get:function(){return this.monitorStore.data}}]),r}(h.default.Component))||i)||i;a.default=R},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(84),r(86),r(73),r(18),r(16),r(27),r(190),r(9),r(13),r(10),r(4),r(316),r(23),r(24),r(17),r(85),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(84),r(86),r(73),r(18),r(28),r(42),r(16),r(27),r(190),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(24),r(17),r(85),r(62),r(7);var l=n(r(30)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(36)),c=n(r(37)),s=n(r(88)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(186),v=r(798),g=n(r(3)),y=r(1853),E=n(r(1075)),b=n(r(439)),_=n(r(63)),O=n(r(26)),S=n(r(189)),C=r(794),D=n(r(4075)),k=n(r(4079));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){for(var t=1;t-1?Number(a).toFixed(4):isNaN(Number(a))?0:a;t[e.metric_name]=r})),t}},e.handleAutoRefresh=function(){e.setState({autoRefresh:!e.state.autoRefresh},(function(){e.state.autoRefresh?(0,C.startAutoRefresh)((0,s.default)(e)):(0,C.stopAutoRefresh)((0,s.default)(e))}))},e.handleRefresh=function(){e.fetchData()},e.renderAutoRefresh=function(){var t=e.state,a=t.enableAutoRefresh,r=t.autoRefresh;return a?m.default.createElement(h.Button,{className:k.default.button,type:"control",icon:r?"pause":"start",iconType:"light",onClick:e.handleAutoRefresh}):null},e.getMetricsData=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,O.default)(e.state.metrics,"".concat(t),a)},e.renderCustomLegend=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=(e.className,e.payload),r=e.activeSeries,n=void 0===r?[]:r,u=e.showAll,o=void 0!==u&&u,i=a||[];if(i.length<2&&!o)return m.default.createElement("div",{className:k.default.legend});var c=function(t){var a=e.onClick;a&&a(t,(0,O.default)(t.target,"dataset.key"))};return m.default.createElement("div",{className:k.default.legend,onClick:c},i.map((function(e){var a=!n.includes(e.value),r=(0,O.default)(e,"payload.stroke");return m.default.createElement("div",{key:e.dataKey,"data-key":e.dataKey,className:(0,g.default)(k.default.item,(0,l.default)({},k.default.inactive,a))},m.default.createElement("i",{style:{backgroundColor:r}}),t(e.value))})))},e}return(0,c.default)(r,[{key:"componentDidMount",value:function(){this.fetchData()}},{key:"render",value:function(){var e=this.state,a=e.duration,r=e.errorType;return m.default.createElement("div",{className:k.default.overview},m.default.createElement("div",{className:k.default.header},m.default.createElement("p",{className:k.default.title},t("OVERVIEW")),m.default.createElement("div",{className:k.default.operations},m.default.createElement(D.default,{duration:a,onChange:this.handleChange}),this.renderAutoRefresh(),m.default.createElement(h.Button,{className:k.default.button,type:"control",icon:"refresh",iconType:"light",onClick:this.handleRefresh}))),m.default.createElement("div",{className:k.default.body},m.default.createElement("div",{className:k.default.left},m.default.createElement("div",{className:k.default.item},m.default.createElement(h.Icon,{name:"gateway",size:56}),m.default.createElement("div",null,m.default.createElement("p",null,t("TOTAL_REQUESTS")),m.default.createElement("span",null,this.getMetricsData("ingress_request_count")))),m.default.createElement("div",{className:k.default.item},m.default.createElement(h.Icon,{name:"error",size:56}),m.default.createElement("div",null,m.default.createElement(h.Select,{width:30,value:r,options:[{label:t("FOUR_XX_REQUEST_COUNT"),value:"ingress_request_4xx_count"},{label:t("FIVE_XX_REQUEST_COUNT"),value:"ingress_request_5xx_count"}],onChange:this.handleRequestError}),m.default.createElement("span",null,this.getMetricsData(r))))),m.default.createElement("div",{className:k.default.middle},m.default.createElement(v.SimpleCircle,{theme:"light",width:200,height:200,title:"",value:"".concat((100*this.getMetricsData("ingress_success_rate")).toFixed(2)),total:100,unit:"%",innerRadius:"80%",legend:["SUCCESSFUL_REQUESTS","TOTAL"],showCenter:!0,showRate:!1,areaColors:["#55BC8A","#E3E9EF"],renderCustomCenter:function(e){var a=e.value;return m.default.createElement("div",{className:k.default.simpleContent},m.default.createElement("p",null,t("SUCCESSFUL_REQUESTS")),m.default.createElement("span",null,a,"%"))}})),m.default.createElement("div",{className:k.default.right},m.default.createElement("div",{className:k.default.item},m.default.createElement("span",{className:k.default.customIcon},m.default.createElement(y.ReactComponent,null)),m.default.createElement("div",null,m.default.createElement("p",null,t("AVERAGE_LATENCY")),m.default.createElement("span",null,"".concat(this.getMetricsData("ingress_request_duration_average")," s")))),m.default.createElement("div",{className:k.default.itemSmall},m.default.createElement("span",null,t("P_FIFTY_LATENCY")),m.default.createElement("span",null,"".concat(this.getMetricsData("ingress_request_duration_50percentage")," s"))),m.default.createElement("div",{className:k.default.itemSmall},m.default.createElement("span",null,t("P_NINETY_FIVE_LATENCY")),m.default.createElement("span",null,"".concat(this.getMetricsData("ingress_request_duration_95percentage")," s"))),m.default.createElement("div",{className:k.default.itemSmall},m.default.createElement("span",null,t("P_NINETY_NINE_LATENCY")),m.default.createElement("span",null,"".concat(this.getMetricsData("ingress_request_duration_99percentage")," s"))))))}},{key:"detail",get:function(){return this.props.detailStore.gateway.data}},{key:"isWorkspaceGateway",get:function(){var e=this.props.match.params,t=e.workspace,a=e.namespace;return t&&!a}},{key:"cluster",get:function(){var e=this.props.match.params.cluster;return this.props.location.pathname.indexOf("federatedprojects")>-1||this.isWorkspaceGateway?localStorage.getItem("federated-cluster"):e}}]),r}(m.default.Component);a.default=I},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=r(186),h=n(r(4076)),v=r(1854),g=n(r(4078));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var E=function(e){(0,i.default)(r,e);var a=y(r);function r(e){var t;(0,u.default)(this,r),(t=a.call(this,e)).handleToggle=function(){t.setState({visible:!t.state.visible},(function(){t.props.onToggle(t.state.visible)}))},t.hideSelector=function(){t.setState({visible:!1},(function(){t.props.onToggle(!1)}))},t.handleTimeChange=function(e){var a=e.duration;t.setState({visible:!1,duration:a},(function(){t.props.onChange(a)}))};var n=e.duration;return t.state={visible:!1,preDuration:"",duration:n||"10m"},t}return(0,o.default)(r,[{key:"renderButtonText",value:function(){var e=this.state.duration,a=(0,v.getTimeLabel)(e);return"".concat(t("LAST")," ").concat(a)}},{key:"renderContent",value:function(){var e=this.state.duration;return f.default.createElement("div",{className:g.default.content},f.default.createElement(h.default,{duration:e,onChange:this.handleTimeChange}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.dark,r=e.arrowIcon;return f.default.createElement("div",{className:(0,p.default)(g.default.selector,t,(0,l.default)({},g.default.active,this.state.visible))},f.default.createElement("div",{className:(0,p.default)(g.default.mask,(0,l.default)({},g.default.active,this.state.visible)),onClick:this.hideSelector}),f.default.createElement(m.Button,{className:g.default.button,onClick:this.handleToggle},f.default.createElement(m.Icon,{type:a?"dark":"light",name:"timed-task",size:20}),f.default.createElement("p",null,this.renderButtonText()),f.default.createElement(m.Icon,{className:g.default.arrow,type:a?"dark":"light",name:r||"caret-down"})),f.default.createElement("div",{className:g.default.dropdown},this.renderContent()))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.duration!==t.preDuration){var a=e.duration;return{prevPropStep:a,duration:a}}return null}}]),r}(f.default.PureComponent);a.default=E,E.propTypes={duration:d.default.string,onChange:d.default.func,onToggle:d.default.func},E.defaultProps={duration:"10m",onChange:function(){},onToggle:function(){}}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=r(1854),h=n(r(4077));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=["1m","5m","10m","30m","1h","3h","6h","12h"],y=function(e){(0,i.default)(r,e);var a=v(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l-1||this.isWorkspaceGateway?localStorage.getItem("federated-cluster"):e}},{key:"prefix",get:function(){return"/clusters/".concat(this.cluster)}},{key:"type",get:function(){var e=this.props.match.params,t=e.namespace,a=e.workspace;return this.cluster&&a&&!t?"workspace":a&&t?"project":"cluster"}},{key:"namespace",get:function(){var e=this.props.match.params.namespace;return"cluster"===this.type?"":e}},{key:"actionModule",get:function(){var e=this.props.match.params,t=e.namespace,a=e.workspace;return t&&a&&this.cluster?"ks-project-gateway":a&&!t?"ks-workspace-gateway":"cluster-settings"}},{key:"enabledActions",get:function(){return globals.app.getActions(T(T({module:this.actionModule},this.props.match.params),{},{project:this.props.match.params.namespace,cluster:this.cluster}))}},{key:"volumesTitle",get:function(){return t("STORAGE_DEVICES")}},{key:"enableScaleReplica",get:function(){return this.enabledActions.includes("edit")&&!this.detail.isFedManaged}}]),r}(p.default.Component);w.childContextTypes={gatewayName:O.default.string,gatewayNs:O.default.string,cluster:O.default.string};var I=(0,h.inject)("detailStore")((0,h.observer)(w));a.default=I;var M=w;a.Component=M},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(86),r(18),r(16),r(98),r(9),r(13),r(10),r(4),r(316),r(23),r(24),r(17),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(86),r(18),r(28),r(42),r(16),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(24),r(17),r(188),r(7);var l=n(r(315)),u=n(r(96)),o=n(r(43)),i=n(r(30)),c=n(r(58));r(41);var s,f,d,p=n(r(44)),m=n(r(36)),h=n(r(37)),v=n(r(55)),g=n(r(56)),y=n(r(51)),E=n(r(0)),b=r(239),_=n(r(1)),O=n(r(3)),S=n(r(63)),C=n(r(26)),D=r(186),k=r(794),N=n(r(1075)),T=n(r(789)),R=n(r(4082)),w=n(r(1855));function I(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function M(e){for(var t=1;t0&&void 0!==i[0]?i[0]:{},a=t.noMetrics,r=t.silent,l=(0,c.default)(t,["noMetrics","silent"]),!(0,S.default)(n.state.params)){e.next=4;break}return n.store.podList.isLoading=!1,e.abrupt("return");case 4:return u=n.props.limit,r&&(n.store.podList.silent=!0),e.next=8,n.store.getGatewayPodsList(M(M({limit:u},n.state.params),l));case 8:n.store.podList.silent=!1,a||n.fetchMetrics();case 10:case"end":return e.stop()}}),e)}))),n.fetchMetrics=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.store.podList,a=t.data,r=t.isLoading;if((0,S.default)(a)||r||(0,S.default)(n.state.params))return!1;var l=n.state.params,u=l.gatewayName,o=l.namespace,i=l.workspace,c=l.cluster;n.monitorStore.fetchMetrics(M(M({step:"1m",times:30,resources:a.map((function(e){return e.name})),metrics:Object.values(A),namespace:o,workspace:o?void 0:i,cluster:c||n.cluster},e),{},{component:"ingress",job:"".concat(u,"-metrics")}))},n.getPagination=function(){var e=n.store.podList;return{page:e.page,limit:e.limit,total:e.total}},n.getPodMetrics=function(){var e=n.monitorStore.data,t={};return Object.entries(A).forEach((function(a){var r=(0,u.default)(a,2),n=r[0],l=r[1],o=(0,C.default)(e,"".concat(l,".data.result"))||[];t[n]=o[0]})),t},n.handleSearch=function(e){n.searchValue=e,n.fetchData({search:e})},n.handleRefresh=function(){var e=n.searchValue?{search:n.searchValue}:{};n.fetchData(e)},n.handlePage=function(e){n.fetchData({page:e}).then((function(){n.props.onPage(e)}))},n.handleExpand=function(e){n.setState((function(t){return{expandItem:t.expandItem===e?"":e}}))},n.getClustersOptions=function(){return n.props.clusters.map((function(e){return{label:e,value:e}}))},n.renderHeader=function(){return E.default.createElement("div",{className:w.default.header},E.default.createElement(D.InputSearch,{className:w.default.search,name:"search",placeholder:t("SEARCH"),onSearch:n.handleSearch}),E.default.createElement("div",{className:w.default.actions},E.default.createElement(D.Button,{type:"flat",icon:"refresh",onClick:n.handleRefresh})))},n.renderFooter=function(){var e=n.getPagination(),a=e.total;return E.default.createElement(D.Level,{className:w.default.footer},E.default.createElement(D.LevelLeft,null,t("TOTAL_ITEMS",{num:a})),E.default.createElement(D.LevelRight,null,E.default.createElement(D.Pagination,(0,l.default)({},e,{onChange:n.handlePage}))))},n.store=e.store,n.monitorStore=new N.default,n.state={expandItem:"",params:e.params},n}return(0,h.default)(r,[{key:"componentDidMount",value:function(){this.fetchData(),(0,k.startAutoRefresh)(this,{method:"fetchMetrics",leading:!1})}},{key:"componentWillUnmount",value:function(){(0,k.stopAutoRefresh)(this),this.disposer&&this.disposer()}},{key:"renderContent",value:function(){var e=this,a=this.props.prefix,r=this.store.podList,n=r.data,l=r.isLoading,u=r.silent,o=E.default.createElement("div",{className:w.default.body},(0,S.default)(n)?E.default.createElement("div",{className:w.default.empty},t("NO_RESOURCE_FOUND")):n.map((function(t){return E.default.createElement(R.default,{key:t.uid,prefix:a,detail:t,metrics:e.getPodMetrics(t),loading:e.monitorStore.isLoading,refreshing:e.monitorStore.isRefreshing,isExpand:e.state.expandItem===t.uid,onExpand:e.handleExpand})})));return u?o:E.default.createElement(D.Loading,{spinning:l},o)}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.title,n=e.hideHeader,l=e.hideFooter,u=e.noWrapper,o=this.store.podList.data;return u?this.renderContent():E.default.createElement(T.default,{className:(0,O.default)(w.default.main,a),title:t(r),empty:t("NO_AVAILABLE_RESOURCE_VALUE",{resource:t("POD")}),isEmpty:(0,S.default)(o)},!n&&this.renderHeader(),this.renderContent(),!l&&this.renderFooter())}},{key:"isWorkspaceGateway",get:function(){var e=this.props.params,t=e.workspace,a=e.namespace;return t&&!a}},{key:"cluster",get:function(){var e,t=this.props.params.cluster;return(null===(e=location)||void 0===e?void 0:e.pathname).indexOf("federatedprojects")>-1||this.isWorkspaceGateway?localStorage.getItem("federated-cluster"):t}}]),r}(E.default.Component),f.propTypes={prefix:_.default.string,title:_.default.string,detail:_.default.object,details:_.default.object,hideHeader:_.default.bool,hideFooter:_.default.bool,onPage:_.default.func,limit:_.default.number},f.defaultProps={title:"PODS",detail:{},details:{},hideHeader:!1,hideFooter:!1,onPage:function(){}},s=d))||s;a.default=j},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(86),r(18),r(87),r(16),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(6),r(86),r(18),r(87),r(42),r(16),r(4),r(23),r(57),r(17),r(7);var l=n(r(61)),u=n(r(30)),o=n(r(315)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=r(433),h=n(r(1)),v=n(r(3)),g=n(r(63)),y=n(r(26)),E=r(52),b=r(794),_=r(186),O=n(r(839)),S=r(798),C=n(r(1220)),D=n(r(804)),k=n(r(1855));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var T=function(e){(0,s.default)(r,e);var a=N(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u1&&p.default.createElement(_.Tooltip,{content:this.renderPodIPContent(this.networkIPs)},p.default.createElement("div",{className:k.default.podip},this.networkIPs.length))),p.default.createElement("p",null,t("POD_IP_ADDRESS_SCAP"))),this.renderMonitorings(),p.default.createElement("div",{className:k.default.arrow},p.default.createElement(_.Icon,{name:"chevron-down",type:l?"light":"",size:20})))}},{key:"renderExtraContent",value:function(){var e=this,a=this.props.prefix,r=this.props.detail,n=r.cluster,l=r.containers,u=void 0===l?[]:l,o=r.initContainers,i=void 0===o?[]:o,c=r.name;if((0,g.default)(u))return null;var s=globals.app.hasPermission({module:"clusters",action:"view"})&&a?this.getLink():"";return p.default.createElement("div",{className:k.default.itemExtra},p.default.createElement("div",{className:"margin-b8"},p.default.createElement("strong",null,t("CONTAINER_PL"))),p.default.createElement("div",{className:k.default.containers},u.map((function(t){return p.default.createElement(C.default,{key:t.name,prefix:s,podName:c,detail:t,cluster:n,onContainerClick:e.handleLinkClick,isCreating:e.isCreating,hideterminal:!0,hideLink:!0})})),i.map((function(t){return p.default.createElement(C.default,{key:t.name,prefix:s,podName:c,detail:t,cluster:n,onContainerClick:e.handleLinkClick,isCreating:e.isCreating,isInit:!0,hideterminal:!0,hideLink:!0})}))))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.isExpand;return p.default.createElement("div",{className:(0,v.default)(k.default.item,t,(0,u.default)({},k.default.expanded,a))},p.default.createElement("div",{className:k.default.itemMain,onClick:this.handleExpandExtra},p.default.createElement("div",{className:k.default.icon},p.default.createElement(_.Icon,{name:"pod",size:40,type:a?"light":"dark"}),this.renderStatusTip()),this.renderContent()),this.renderExtraContent())}},{key:"status",get:function(){var e=this.props.detail.podStatus,t=e.status;return{type:e.type.toLowerCase(),name:t}}},{key:"isCreating",get:function(){return"warning"===this.status.type&&"ContainerCreating"===this.status.name}},{key:"isRunning",get:function(){return"running"===this.status.type||"completed"===this.status.type}},{key:"networkIPs",get:function(){return this.props.detail.networksStatus.reduce((function(e,t){return[].concat((0,l.default)(e),(0,l.default)(t.ips))}),[])}}]),r}(p.default.PureComponent);a.default=T,T.propTypes={className:h.default.string,prefix:h.default.string,detail:h.default.object,metrics:h.default.object,loading:h.default.bool,isExpand:h.default.bool,onExpand:h.default.func},T.defaultProps={prefix:"",detail:{},isExpand:!1,onExpand:function(){}}},function(e,t,a){e.exports={deployment_codeResource:"_2sxIgN7h_UoStkDUN8ngoB"}},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(98),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(98),r(4),r(23),r(57),r(17);var l,u=n(r(96)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(789)),m=r(239),h=n(r(63)),v=n(r(26)),g=n(r(1852));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=(0,m.inject)("detailStore")(l=(0,m.observer)(l=function(e){(0,c.default)(r,e);var a=y(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.detail.config;return d.default.createElement(p.default,{title:t("CONFIGURATION_OPTIONS")},d.default.createElement("div",{className:g.default.container},d.default.createElement("ul",null,(0,h.default)(e)?d.default.createElement("li",null,t("NO_DATA")):Object.entries(this.detail.config).map((function(e){var t=(0,u.default)(e,2),a=t[0],r=t[1];return d.default.createElement("li",{key:a},d.default.createElement("span",{className:g.default.key},a),d.default.createElement("span",null,r))})))))}},{key:"module",get:function(){return this.props.detailStore.module}},{key:"store",get:function(){return this.props.detailStore}},{key:"detail",get:function(){return(0,v.default)(this.store.gateway,"data",{})}}]),r}(d.default.Component))||l)||l;a.default=E},function(e,a,r){"use strict";r(84),r(85);var n=r(20);r(12),r(5),r(11),r(6),r(86),r(73),r(18),r(87),r(97),r(16),r(9),r(13),r(10),r(4),r(316),r(23),r(24),r(17),r(62),r(188),r(7),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(86),r(73),r(18),r(28),r(87),r(245),r(97),r(442),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(24),r(17),r(62),r(188),r(7),r(110);var l=n(r(61)),u=n(r(43)),o=n(r(30));r(41);var i,c,s,f,d,p,m,h,v,g=n(r(44)),y=n(r(96)),E=n(r(65)),b=n(r(36)),_=n(r(37)),O=n(r(88)),S=n(r(55)),C=n(r(56)),D=n(r(51)),k=n(r(49)),N=(n(r(66)),n(r(0))),T=r(239),R=n(r(833)),w=n(r(985)),I=r(14),M=r(186),P=n(r(3)),A=r(2014),j=n(r(243)),L=n(r(1127)),x=n(r(1392)),U=r(52),z=r(1397),F=n(r(1124)),G=n(r(4086));function V(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function B(e){for(var t=1;t').concat(e.hightLighted,"")}));return N.default.createElement("span",{dangerouslySetInnerHTML:{__html:o.join("")}})}},e.scrollTo=function(t){try{e.tableRef.current.scrollToRow(t)}catch(e){}},(0,E.default)(e,"onTableScrollTop",m,(0,O.default)(e)),e.initQuery=function(){e.searchInputState={query:[],start:"",end:"",durationAlias:"",nextParamsKey:""}},e.togglePolling=function(){e.state.polling?e.stopPolling():e.startPolling()},(0,E.default)(e,"changeFrequency",h,(0,O.default)(e)),(0,E.default)(e,"pollingFunc",v,(0,O.default)(e)),e.onSearchParamsChange=function(){e.stopPolling(),e.refreshQuery()},e.handleRefresh=function(){e.refreshQuery()},e.clearFilter=function(){e.initQuery(),e.refreshQuery()},e.renderEmpty=function(){return N.default.createElement("div",{className:G.default.emptyText},N.default.createElement("span",{className:G.default.emptyTipIcon},N.default.createElement(M.Icon,{name:"exclamation",size:48})),N.default.createElement("div",null,t("NO_MATCHING_RESULT_FOUND")),N.default.createElement("p",null,t("YOU_CAN_TRY_TO"),N.default.createElement("span",{className:G.default.action,onClick:e.handleRefresh,"data-test":"table-empty-refresh"},t("REFRESH_DATA")),t("OR"),N.default.createElement("span",{className:G.default.action,onClick:e.clearFilter,"data-test":"table-empty-clear-filter"},t("CLEAR_SEARCH_CONDITIONS"))))},e}return(0,_.default)(c,[{key:"componentDidMount",value:function(){this.refreshQuery()}},{key:"componentWillUnmount",value:function(){clearInterval(this.pollingInterval)}},{key:"getQueryParams",value:function(){return this.searchInputState.query.filter((function(e){return e.key})).reduce((function(e,t){var a=t.key,r=t.value,n=a,l=e[n];return e[n]=l?"".concat(l,",").concat(r):r,e}),{})}},{key:"refreshQuery",value:(n=(0,g.default)(u.default.mark((function e(){var t,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getQueryParams(),e.next=3,this.fetchLog(B(B({},t),{},{from:0,size:50},this.duration));case 3:a=e.sent,this.logs=a.reverse(),this.scrollTo(this.logs.length);case 6:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"fetchLog",value:(r=(0,g.default)(u.default.mark((function e(t){var a,r,n,l;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.props.match.params,r=a.namespace,n=a.gatewayName,l=a.workspace,e.next=3,this.store.getGatewayLogs(B({cluster:this.cluster,namespace:r,workspace:l,gatewayName:n},t));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"loadMoreLogs",value:(a=(0,g.default)(u.default.mark((function e(){var t,a,r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.store.logs.from+this.store.logs.size,a=this.getQueryParams(),e.next=4,this.fetchLog(B(B(B({},a),this.duration),{},{from:t,size:50}));case 4:r=e.sent,this.logs=[].concat((0,l.default)(r.reverse()),(0,l.default)(this.logs)),this.scrollTo(r.length);case 7:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"stopPolling",value:function(){clearTimeout(this.pollingInterval),this.setState({polling:!1})}},{key:"startPolling",value:function(){this.setState({polling:!0}),this.pollingFunc(),this.pollingInterval&&clearTimeout(this.pollingInterval),this.pollingInterval=setInterval(this.pollingFunc,this.pollingFrequency)}},{key:"renderOperation",value:function(){var e=this.props.match.params,a=e.namespace,r=e.gatewayName,n=e.workspace,l={cluster:this.cluster,namespace:a,workspace:n,gatewayName:r},u=[5,10,20].map((function(e){return{label:t("REFRESH_INTERVAL_VALUE",{value:e}),value:1e3*e}})),o=B(B(B({},l),this.duration),this.getQueryParams()),i=(0,U.getClusterUrl)(this.store.exportLinkFactory(o));return N.default.createElement("div",{className:G.default.filter},N.default.createElement("div",{className:(0,P.default)(G.default.filterButton,G.default.pollingBtn),onClick:this.togglePolling},N.default.createElement(M.Icon,{name:this.state.polling?"stop":"start",type:"light"})),N.default.createElement(M.Select,{prefixIcon:N.default.createElement(M.Icon,{type:"light",name:"timed-task",size:20}),className:(0,P.default)(G.default.filterButton,G.default.frequencyOpts),defaultValue:5e3,options:u,onChange:this.changeFrequency}),N.default.createElement("a",{href:i,download:!0},N.default.createElement("span",{className:(0,P.default)(G.default.filterButton,G.default.exportBtn)},N.default.createElement(M.Tooltip,{content:t("EXPORT_LOGS")},N.default.createElement(M.Icon,{name:"export",type:"light"})))))}},{key:"render",value:function(){return globals.app.hasKSModule("whizard-logging")?N.default.createElement("div",null,N.default.createElement("div",{className:G.default.title},N.default.createElement("div",{className:(0,P.default)(G.default.search,(0,o.default)({},G.default.focus,this.hasValue))},N.default.createElement(M.Icon,{className:G.default.isLeft,name:"magnifier",size:20}),N.default.createElement(w.default,{className:G.default.searchInput,onChange:this.onSearchParamsChange,params:this.searchInputState,dropdownClass:G.default.dropdownClass,iconThem:"light",enableClear:!0,dropDownItems:this.dropDownContent,showStep:!1}),N.default.createElement(M.Icon,{className:(0,P.default)(G.default.clearIcon,(0,o.default)({},G.default.hideIcon,!this.hasValue)),name:"close",onClick:this.initQuery})),this.renderOperation()),N.default.createElement("div",{className:G.default.body},(0,A.isEmpty)((0,I.toJS)(this.logs))?this.renderEmpty():N.default.createElement(L.default,{onScroll:this.onTableScrollTop,cols:this.tableCols,data:(0,I.toJS)(this.logs),tableRef:this.tableRef,trCLassName:G.default.trCLassName,body:G.default.bodyClassName,header:G.default.headerClassName}))):N.default.createElement(R.default,{className:"no-shadow",icon:"cluster",title:t("LOGGING_DISABLED")})}},{key:"hasValue",get:function(){return Object.values((0,I.toJS)(this.searchInputState)).some((function(e){return(0,A.isArray)(e)?e.some((function(e){return!(0,A.isEmpty)((0,I.toJS)(e))})):!(0,A.isEmpty)(e)}))}},{key:"defaultDuration",get:function(){return{start_time:0,end_time:Date.now()}}},{key:"isWorkspaceGateway",get:function(){var e=this.props.match.params,t=e.workspace,a=e.namespace;return t&&!a}},{key:"duration",get:function(){var e=Date.now(),t=this.searchInputState,a=t.start,r=t.end;return a?{start_time:(0,A.min)([1e3*a,e]),end_time:(0,A.min)([1e3*r,e])}:this.defaultDuration}},{key:"dropDownContent",get:function(){return{log_query:{icon:"magnifier",text:t("KEYWORD")},pod_query:{icon:"pod",text:t("POD")}}}},{key:"store",get:function(){return this.props.detailStore}},{key:"cluster",get:function(){var e=this.props.match.params.cluster,t=this.props.location.pathname;return t.indexOf("/federatedprojects/")>-1||t.indexOf("/workspaces/")>-1?localStorage.getItem("federated-cluster"):e}}]),c}(N.default.Component),s=(0,k.default)(c.prototype,"searchInputState",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{query:[],start:"",end:"",durationAlias:"",nextParamsKey:""}}}),f=(0,k.default)(c.prototype,"pollingFrequency",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 5e3}}),d=(0,k.default)(c.prototype,"logs",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,k.default)(c.prototype,"hasValue",[I.computed],Object.getOwnPropertyDescriptor(c.prototype,"hasValue"),c.prototype),p=(0,k.default)(c.prototype,"tableCols",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[{thead:t("TIME"),key:"time",dataIndex:"time",mustShow:!0,content:function(e){return"[".concat((0,j.default)(e.time).format("YYYY-MM-DD HH:mm:ss"),"]")}},{thead:t("POD"),key:"pod",dataIndex:"pod",mustShow:!0,content:this.renderHightLightMatchTd({resKey:"pod",searchKey:["pod_query"]})},{thead:t("MESSAGE"),key:"log",dataIndex:"log",className:G.default.logItem,content:this.renderHightLightMatchLogTd({resKey:"log",searchKey:["log_query"],handler:z.esMark}),mustShow:!0}]}}),(0,k.default)(c.prototype,"refreshQuery",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"refreshQuery"),c.prototype),(0,k.default)(c.prototype,"fetchLog",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchLog"),c.prototype),(0,k.default)(c.prototype,"loadMoreLogs",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"loadMoreLogs"),c.prototype),m=(0,k.default)(c.prototype,"onTableScrollTop",[I.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.scrollTop,r=e.store.logs,n=r.from,l=r.size,u=r.total;0===a&&u>n+l&&e.loadMoreLogs()}}}),h=(0,k.default)(c.prototype,"changeFrequency",[I.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.pollingFrequency=t,e.state.polling&&(clearTimeout(e.pollingInterval),e.startPolling())}}}),v=(0,k.default)(c.prototype,"pollingFunc",[I.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=q;e.searchInputState.end=Math.ceil(Date.now()/1e3),e.searchInputState.start=e.searchInputState.end-t,e.searchInputState.durationAlias="".concat(t/60,"m"),e.refreshQuery()}}}),i=c))||i)||i;a.default=H},function(e,t,a){e.exports={title:"h3EGYxJHcXzNAZU64Ys-7",focus:"_1TYZVVQtrXwaAaa2nwD6NE",search:"_2QSFqdrB9aMZjIVh3QK0R2",clearIcon:"_3qDug15F8wtzhqs8WjeLBW",hideIcon:"_2CnN8q86DPsSM48wJnL6Nv",searchInput:"_2432rvdXjewrevIwLoYaSt",filter:"_2fb4uH-e_iaRbWSOMvDMPn",filterButton:"_7ASJ4CE_FCBt8fhgHM3Nz",exportBtn:"_2JJ6SH_-_MTCF7OPFW7kys",pollingBtn:"rOD92XzSZBE4irFyl6UkB",frequencyOpts:"_39g5yqbm9RZmh3S9viq599",searchBar:"_2PXN-WMqrT8hDBu-4PGTte",icon:"_1Mf8725MJ88eggNRQj49ku",input:"_2ApsehJ2Zoyl1l3Er5b7Ki",dropdownClass:"e7mNbUyHuqgvvXQ3KQ-ip",body:"_2zscwenqDTZYN32pr5Ds5-",logItem:"_3OcRCVG8GQmCwWPLwTW978",bodyClassName:"_2RyfnALWpJKi2fQDgJ-5qc",headerClassName:"_1ClFBNqMO40nDrGs0NH27N",trCLassName:"_1JuCS0O3IJiNnkzG1zCHzs",emptyText:"_2p2Dbxritd_IaivnVdRvZ1",emptyTipIcon:"_1dM3MOctITqHWlne46RoCc",action:"_3ihxA24eqCRlJprACXfqZc",hightLightMatch:"_3f66pKDSXrWjGp0u0360VP"}},,,,,,,,,,function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l,u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(14),m=r(239),h=r(186),v=n(r(915)),g=n(r(787)),y=n(r(863)),E=n(r(438)),b=n(r(955)),_=n(r(4097)),O=n(r(4099));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var D=(0,m.observer)(l=function(e){(0,c.default)(r,e);var a=C(r);function r(e){var t;return(0,o.default)(this,r),(t=a.call(this,e)).fetchData=function(e){(e=e||{}).limit=-1,e.labelSelector=e.labelSelector?"".concat(e.labelSelector,",!cluster-role.kubesphere.io/edge"):"!cluster-role.kubesphere.io/edge",t.store.fetchList(function(e){for(var t=1;t0?t("".concat(e.isAdmin?"ADMIN_":"","UPDATE_LICENSE_DESC"),{day:e.dueDate,type:t("subscription"===e.type?"SUBSCRIPTION":"WARRANTY")}):t("".concat(e.isAdmin?"ADMIN_":"","MA_EXPIRED_LICENSE_DESC")):""},e.renderTipOperation=function(){var a=e.isInfoTip?{primary:"#326e93",secondary:"#326e93"}:{primary:"#8d663e",secondary:"#8d663e"},r=e.isUnAuthorized||e.isExpired?"ACTIVATE":"UPDATE_LICENSE";return"ACTIVATE"!==r?null:m.default.createElement("div",{onClick:function(){var t;e.trigger("license.update",{store:e.licenseStore,title:r,success:(t=(0,i.default)(u.default.mark((function t(){return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getData();case 2:e.currentUrl.indexOf("notification-history")>-1&&e.props.rootStore.routing.push("/settings/base-info");case 3:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})}},m.default.createElement("span",{style:{color:a}},t(r)),m.default.createElement(v.Icon,{name:"next",size:16,color:a}))},e}return(0,s.default)(n,[{key:"componentDidMount",value:(a=(0,i.default)(u.default.mark((function e(){var t=this;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!globals.user){e.next=4;break}return e.next=3,this.getData();case 3:window.triggerEvent.add("licenseViolation",(function(e){t.handleGetDataDebounce(e)}));case 4:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"render",value:function(){var e=-1!==this.currentUrl.indexOf("/license-info"),t=this.isExpired;return m.default.createElement("div",{className:(0,h.default)(O.default.licenseTip,(0,l.default)({},O.default.tipInfo,this.isInfoTip)),style:{display:this.visible?"block":"none"}},m.default.createElement("span",null,this.renderIcon(),this.renderTipText()),m.default.createElement("div",{className:O.default.operation},!e&&this.isAdmin&&this.renderTipOperation(),(!e||e&&!t)&&this.isInfoTip&&m.default.createElement(v.Icon,{name:"close",color:{primary:"#326e93",secondary:"#326e93"},size:16,onClick:this.handleCloseTip})))}},{key:"visible",get:function(){var e=this.props.rootStore.showLicenseTip;return this.isUnAuthorized||this.isExpired?(localStorage.removeItem("hideLicenseTip"),e):("true"===localStorage.getItem("hideLicenseTip")&&(e=!1,this.props.rootStore.hideLicenseTip()),e)}},{key:"licenseInfo",get:function(){return{}}},{key:"isAdmin",get:function(){return globals.app.isPlatformAdmin}},{key:"type",get:function(){return(0,g.default)(this.licenseInfo,"licenseType","subscription")}},{key:"isOverLimit",get:function(){return this.licenseInfo.isOverLimit||!1}},{key:"isUnAuthorized",get:function(){return this.licenseInfo.isUnAuthorized||!1}},{key:"isExpired",get:function(){return this.licenseInfo.isExpired||!1}},{key:"unExpired",get:function(){return this.licenseInfo.unExpired||!1}},{key:"isInfoTip",get:function(){return this.unExpired}},{key:"dueDate",get:function(){return this.licenseInfo.dueDate||-1}},{key:"currentUrl",get:function(){return this.props.rootStore.routing.location.pathname}}]),n}(m.default.Component))||o)||o)||o;a.default=C},function(e,t,a){e.exports={licenseTip:"_3wB25-Yoe6He1M4G1RSEzn",tipInfo:"_2mlSckPv_eZDS6o7GYbUSg",operation:"scU0LZ4kAkeyqIX9uyAab"}},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(28),r(42),r(16),r(4),r(23),r(57),r(17);var u,o,i,c=n(r(30)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=l(r(0)),v=n(r(1)),g=r(239),y=n(r(3)),E=r(186),b=n(r(4107)),_=r(791),O=n(r(322)),S=n(r(4113));function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var D=(0,g.inject)("rootStore")(u=(0,g.observer)(u=(0,_.trigger)((i=o=function(e){(0,d.default)(r,e);var a=C(r);function r(e){var t;return(0,s.default)(this,r),(t=a.call(this,e)).handleMoreClick=function(e,a){var r=t.props.rootStore.routing;switch(a){case"setting":t.trigger("user.setting",{});break;case"notification":t.trigger("notification.user.setting",{});break;case"about":t.setState({showAbout:!0});break;case"logout":t.props.rootStore.logout();break;case"support":r.push("/support")}},t.hideAboutModal=function(){t.setState({showAbout:!1})},t.store=new O.default,t.state={showAbout:!1},t}return(0,f.default)(r,[{key:"renderDropDown",value:function(){return h.default.createElement(E.Menu,{onClick:this.handleMoreClick},h.default.createElement(E.Menu.MenuItem,{key:"setting"},h.default.createElement(E.Icon,{name:"wrench"})," ",t("USER_SETTINGS")),h.default.createElement(E.Menu.MenuItem,{key:"notification"},h.default.createElement(E.Icon,{name:"loudspeaker"})," ",t("NOTIFICATION_SETTINGS")),h.default.createElement(E.Menu.MenuItem,{key:"logout"},h.default.createElement(E.Icon,{name:"logout"})," ",t("LOG_OUT")),h.default.createElement(E.Menu.MenuItem,{key:"about"},h.default.createElement(E.Icon,{name:"information"})," ",t("ABOUT")))}},{key:"renderModals",value:function(){return h.default.createElement("div",null,h.default.createElement(b.default,{visible:this.state.showAbout,onCancel:this.hideAboutModal}))}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.isAppsPage;return globals.user?h.default.createElement("div",{className:(0,y.default)(S.default.logined,a)},h.default.createElement(E.Dropdown,{content:this.renderDropDown(),placement:"bottomRight"},h.default.createElement("div",{className:(0,y.default)(S.default.name,(0,c.default)({},S.default.isAppsPage,r))},h.default.createElement(E.Icon,{name:"human"}),globals.user.username,h.default.createElement(E.Icon,{name:"caret-down",type:r?"white":"dark"}))),this.renderModals()):h.default.createElement("div",{className:(0,y.default)(S.default.notLoggedIn,a)},h.default.createElement("div",{className:S.default.name},h.default.createElement(E.Icon,{name:"human",color:{primary:"#f5a623",secondary:"#8d663e"}}),h.default.createElement("a",{className:S.default.loginLabel,href:"/login?referer=".concat(location.pathname)},t("LOG_IN"))))}}]),r}(h.Component),o.propTypes={isAppsPage:v.default.bool},u=i))||u)||u)||u;a.default=D},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(12),r(109),r(5),r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(18),r(42),r(4),r(23),r(57),r(17);var u=l(r(315)),o=l(r(30)),i=l(r(36)),c=l(r(37)),s=l(r(55)),f=l(r(56)),d=l(r(51)),p=n(r(0)),m=l(r(1)),h=l(r(787)),v=l(r(3)),g=l(r(4108)),y=l(r(4109)),E=l(r(1792)),b=l(r(1793)),_=l(r(1794)),O=l(r(201)),S=l(r(4110)),C=r(52),D=l(r(4112));function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var N=[{icon:E.default,title:"KSE_FEATURE_1"},{icon:b.default,title:"KSE_FEATURE_2"},{icon:_.default,title:"KSE_FEATURE_3"}],T=[{title:"KSC_FEATURE_BACKUP",desc:["KSC_FEATURE_BACKUP_APP_DESC","KSC_FEATURE_BACKUP_DATA_DESC","KSC_FEATURE_BACKUP_CLOUD_DESC"],img:"/assets/support-backup.svg"},{title:"KSC_FEATURE_INSPECTION",desc:["KSC_FEATURE_INSPECTION_VULN_DESC","KSC_FEATURE_INSPECTION_SECURITY_DESC","KSC_FEATURE_INSPECTION_BEST_DESC"],img:"/assets/support-cluster-inspection.svg"},{title:"KSC_FEATURE_LIGHTWEIGHT",desc:["KSC_FEATURE_LIGHTWEIGHT_START_DESC","KSC_FEATURE_LIGHTWEIGHT_KS_DESC","KSC_FEATURE_LIGHTWEIGHT_TEST_DESC"],img:"/assets/support-light-cluster.svg"}],R=function(e){(0,s.default)(r,e);var a=k(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u0&&void 0!==arguments[0]?arguments[0]:{},a=e.props.current;return t.children?t.children.some((function(t){return e.checkSelect(t)})):t.tabs?t.tabs.some((function(t){return e.checkSelect(t)})):0===a.indexOf(t.name)},e.handleOpen=function(){var t=e.props;(0,t.onOpen)(t.item.name)},e}return(0,o.default)(r,[{key:"renderDisabledTip",value:function(e){return"CLUSTER_UPGRADE_REQUIRED"===e.reason?f.default.createElement(m.Tooltip,{content:t(e.reason,{version:e.requiredClusterVersion}),placement:"topRight"},f.default.createElement(m.Icon,{name:"update",className:v.default.extraIcon,color:{primary:"#ffc781",secondary:"#f5a623"}})):"UNAUTHORIZED"===e.reason?f.default.createElement(m.Tooltip,{content:f.default.createElement("div",null,f.default.createElement("p",{className:"font-bold"},t("UNAUTHORIZED_FEATURE")),f.default.createElement("p",null,t("UNAUTHORIZED_FEATURE_DESC"))),placement:"topRight"},f.default.createElement(m.Icon,{name:"lock",className:v.default.extraIcon})):null}},{key:"render",value:function(){var e,a,r=this,n=this.props,u=n.item,o=n.prefix,i=n.disabled,c=n.onClick,s=n.isOpen,d=(i||u.disabled)&&!u.showInDisable;return u.children?f.default.createElement("li",{className:(0,p.default)((a={},(0,l.default)(a,v.default.childSelect,this.checkSelect(u)),(0,l.default)(a,v.default.open,u.open||s),(0,l.default)(a,v.default.disabled,d),a))},f.default.createElement("div",{className:v.default.title,onClick:this.handleOpen},f.default.createElement(m.Icon,{name:u.icon}),f.default.createElement("span",{className:"nav-title"},t(u.title)),!d&&!u.open&&f.default.createElement(m.Icon,{name:"chevron-down",className:(0,p.default)(v.default.rightIcon,"nav_fold_icon")}),d&&this.renderDisabledTip(u)),f.default.createElement("ul",{className:(0,p.default)(v.default.innerNav,"children_nav")},u.children.map((function(e){var a,n=(i||e.disabled)&&!e.showInDisable;return f.default.createElement("li",{key:e.name,className:(0,p.default)((a={},(0,l.default)(a,v.default.select,r.checkSelect(e)),(0,l.default)(a,v.default.disabled,n),a))},f.default.createElement(h.default,{to:"".concat(o,"/").concat(e.name),disabled:n},t(e.title),n&&r.renderDisabledTip(e)))})))):f.default.createElement("li",{key:u.name,className:(0,p.default)((e={},(0,l.default)(e,v.default.select,this.checkSelect(u)),(0,l.default)(e,v.default.disabled,d),e))},f.default.createElement(h.default,{to:"".concat(o,"/").concat(u.name),onClick:c,disabled:d},f.default.createElement(m.Icon,{name:u.icon}),f.default.createElement("span",{className:"nav-title"},t(u.title)),d&&this.renderDisabledTip(u)))}}]),r}(f.default.Component);a.default=y,y.propTypes={item:d.default.object,current:d.default.string,prefix:d.default.string,onClick:d.default.func,onOpen:d.default.func,disabled:d.default.bool}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(18),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(42),a(16),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=r(a(26)),d=a(186),p=r(a(787)),m=r(a(4118)),h=r(a(1859));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var g=function(e){(0,u.default)(a,e);var t=v(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u=r.threshold-2&&r.props.onScrollBottom()},r.handleMenuClick=function(e,t){r.props.onSelect(t)},r.contentRef=s.default.createRef(),r}return(0,u.default)(a,[{key:"componentDidMount",value:function(){this.contentRef.current&&(this.$dropdownContent=this.contentRef.current.querySelector(".dropdown-content"),this.$dropdownContent.addEventListener("scroll",this.handleScroll))}},{key:"componentWillUnmount",value:function(){this.$dropdownContent&&this.$dropdownContent.removeEventListener("scroll",this.handleScroll)}},{key:"componentDidUpdate",value:function(){if(this.contentRef.current){var e=this.contentRef.current.querySelector(".dropdown-content > .menu-wrapper");e&&this.$dropdownContent&&(this.threshold=e.offsetHeight-this.$dropdownContent.offsetHeight)}}},{key:"renderList",value:function(){var e=this.props,t=e.defaultIcon,a=e.options,r=e.loading;return this.isMulti?s.default.createElement("div",{className:"menu-wrapper"},s.default.createElement(p.Menu,{width:220,onClick:this.handleMenuClick},a.map((function(e){return s.default.createElement(p.Menu.MenuItem,{key:e.value},s.default.createElement("img",{src:t,alt:""}),e.label)}))),s.default.createElement("div",{className:m.default.bottom},r&&s.default.createElement(p.Loading,{size:"small"}))):null}},{key:"render",value:function(){var e=this.props,t=e.icon,a=e.defaultIcon,r=e.value,l=e.type,u=e.options.find((function(e){return e.value===r}))||{};return s.default.createElement("div",{ref:this.contentRef},s.default.createElement(p.Dropdown,{theme:"dark",content:this.renderList()},s.default.createElement("div",{className:(0,d.default)(m.default.titleWrapper,(0,n.default)({},m.default.multi,this.isMulti))},s.default.createElement("div",{className:m.default.icon},s.default.createElement("img",{src:t||a,alt:""})),s.default.createElement("div",{className:m.default.text},s.default.createElement("p",null,l),s.default.createElement("div",{className:"h6"},u.label||r)),this.isMulti&&s.default.createElement("div",{className:m.default.arrow},s.default.createElement(p.Icon,{name:"caret-down",type:"light"})))))}},{key:"isMulti",get:function(){return this.props.options.length>1}}]),a}(s.default.Component);t.default=v,v.propTypes={icon:f.default.string,defaultIcon:f.default.string,value:f.default.string,type:f.default.string,loading:f.default.bool,options:f.default.array,onSelect:f.default.func,onScrollBottom:f.default.func},v.defaultProps={icon:"",defaultIcon:"",value:"",type:"",loading:!1,options:[],onSelect:function(){},onScrollBottom:function(){}}},function(e,t,a){e.exports={titleWrapper:"hSrp7rCyCg7SchEgVy_6y",icon:"_2GbxzJxwkGJD0qR41rMvpH",text:"t6iKjSPDFDOpWCtkS9Doa",arrow:"_3CTcTkgyEHMTpuCoayziCN",multi:"_1K5LDanfLvQQx8llb9YYT",bottom:"F7S4b1XHdXUSGAHB8uNAY"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={wrapper:"_3ZtD5eAqH6AUKiDsz0pcAL",image:"Z7KWsw8fF2407V0aEX6SL",title:"_1KAJCl-kZirxlIa0q1yvdz",icon:"nGJu81QzoLuEo79G9vRpL",desc:"_1cgFUO3Bn5CsfWNgdOnzXf",canClick:"_34eEiZ0jC_waLj3cMn-bvD",isIcon:"_1yS8-xmglVH3M6Rb93PRbY",avatarIcon:"-giQOuJDvs9ioohUF1exA",letter:"_1X9WSgZJV4No7YWrHu0-6F"}},,,function(e,t,a){e.exports={cluster:"_2-ftWaI1a83L_0QqFrKD99",empty:"_3fjV7wo2CrhJ-5dXt_w3sp",desc:"_2sUA2vSFa_k4PbErr_vSfy",descTitle:"_2Rf6kTh0pgiyXfTNdjDb3A",container:"_1fc3jibbrO6vS2Nv3ZJMan",title:"_249VJGOOlE7eJT31tEzv36"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(31),a(6),a(84),a(86),a(18),a(16),a(27),a(190),a(9),a(13),a(10),a(316),a(85),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.processEdges=t.processData=void 0;var n=r(a(30));a(12),a(11),a(31),a(6),a(84),a(86),a(18),a(28),a(16),a(27),a(190),a(34),a(15),a(9),a(13),a(10),a(4),a(316),a(85),a(7);var l=r(a(26)),u=r(a(74)),o=r(a(63)),i=r(a(855)),c=r(a(321)),s=r(a(1891));function f(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function d(e){for(var t=1;t0&&t.setNode(a.name,{name:a.name,width:226,height:l,workloadNum:n.length,isGateway:u}),a.workloads=n,a.edges.out.forEach((function(n){var l=e.find((function(e){return e.ids.includes(n.data.target)}));l&&l.name&&(t.setEdge(a.name,l.name,{id:n.data.id,out:a.edges.out,name:a.name,targetName:l.name}),r[n.data.id]=n)}))})),s.default.layout(t);var n=[],l=[];return t.nodes().forEach((function(e){var r=t.node(e);r.workloadNum>1&&(r.y-=110*(r.workloadNum-1)),n.push(d(d({},a[e]),{},{position:r}))})),t.edges().forEach((function(e){var n=t.edge(e),u=t.node(n.name),o=t.node(n.targetName),i=r[n.id],c=n.out.filter((function(e){return e.data.target===i.data.target})),s=n.points.length;if(s>0)if(3===s&&(n.points=[n.points[0],n.points[s-1]],s=n.points.length),u.isGateway)l.push(d(d({},i),{},{position:{points:[{x:u.x+u.width+-20,y:u.y+u.height/2+36},{x:o.x,y:o.y+o.height/2+36}]}}));else{var f=a[n.name].workloads.map((function(e){return e.data.id}));c.forEach((function(e){var t=f.indexOf(e.data.source),a={points:[{x:u.x+u.width,y:u.y+220*(t+.5)+36},{x:o.x,y:o.y+o.height/2+30*(t+1)}]};l.push(d(d({},e),{},{position:a}))}))}})),{nodes:n,edges:l}}(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.nodes,a=void 0===t?[]:t,r=e.edges,n=void 0===r?[]:r,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,o.default)(a))return[];for(var u=[],c={},s=0;s0)return"tcpActive";var a=0,n=0;return t.rates.http>0?(a=Number(t.rates.http),n=t.rates.httpPercentErr>0?Number(t.rates.httpPercentErr):0):t.rates.grpc>0&&(a=Number(t.rates.grpc),n=t.rates.grpcPercentErr>0?Number(t.rates.grpcPercentErr):0),0===a?"nodata":n>20?"error":n>.1?"degrade":"active"},r.getPath=function(){var e,t=r.props.data;if(t.position.points.length<=2){var a=(0,l.default)(t.position.points,2),n=a[0],u=a[1],o=(n.x+u.x)/2,i=(u.y-n.y)/4;e="M".concat(n.x,",").concat(n.y," C").concat(o,",").concat(n.y+i," ").concat(o,",").concat(u.y-i," ").concat(u.x,",").concat(u.y)}else e=t.position.points.reduce((function(e,t){return""===e?"M".concat(t.x,",").concat(t.y):-1!==e.indexOf("C")?"".concat(e,", ").concat(t.x," ").concat(t.y):"".concat(e," C").concat(t.x," ").concat(t.y)}),"");return e},r.hoverRef=f.default.createRef(),r}return(0,o.default)(a,[{key:"componentDidMount",value:function(){this.hoverRef.current&&(this.hoverRef.current.addEventListener("mouseover",this.handleMouseover),this.hoverRef.current.addEventListener("mouseout",this.handleMouseout))}},{key:"componentWillUnmount",value:function(){this.hoverRef.current&&(this.hoverRef.current.removeEventListener("mouseover",this.handleMouseover),this.hoverRef.current.removeEventListener("mouseout",this.handleMouseout))}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.selected,r=this.getPath(),l=this.getStatus(),u=(0,d.default)(h.default.path,h.default[l],(0,n.default)({},h.default.selected,a)),o=(0,d.default)(h.default.marker,h.default[l]);return f.default.createElement("g",null,f.default.createElement("defs",null,f.default.createElement("marker",{id:"triangle-".concat(l),viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse"},f.default.createElement("path",{d:"M 0 0 L 10 5 L 0 10 z",className:o})),f.default.createElement("marker",{id:"dot-".concat(l),viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"5",markerHeight:"5"},f.default.createElement("circle",{cx:"5",cy:"5",r:"5",className:o}))),f.default.createElement("path",{className:u,id:t.data.id,d:r,markerStart:"url(#dot-".concat(l,")"),markerEnd:"url(#triangle-".concat(l,")")}),f.default.createElement("path",{ref:this.hoverRef,d:r,fill:"none",stroke:"transparent",strokeWidth:"30"}),["active","tcpActive"].includes(l)&&f.default.createElement("circle",{r:"6",className:o},f.default.createElement("animateMotion",{dur:"6s",repeatCount:"indefinite"},f.default.createElement("mpath",{xlinkHref:"#".concat(t.data.id)}))),f.default.createElement("text",{width:"500",className:o,transform:"translate(0 -20)"},f.default.createElement("textPath",{xlinkHref:"#".concat(t.data.id),startOffset:"50%",textAnchor:"middle"},this.traffic)))}},{key:"traffic",get:function(){var e=this.props.data,t=(0,p.default)(e,"data.traffic"),a=(0,p.default)(t,"rates.tcp");if(!(0,m.default)(a))return"".concat(a," B/s");var r=(0,p.default)(t,"rates.http",0);return"".concat(r," RPS")}}]),a}(f.default.Component);t.default=g},function(e,t,a){e.exports={path:"f-qkOuFPRte0_-Z7QO_at",error:"C5K1TNQ2EeQCuscsvuVBr",active:"q8TR7qYUjNW5At4k1uzji",tcpActive:"_3s88I6Eoh7DqzdiCvZUuG9",selected:"_3Y5xaV3Vvhnr7rlXGL7l8q",marker:"_3q-X0_f1j8nrDn4cbDKE9b"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(87),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(87),r(42),r(16),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(26)),m=n(r(321)),h=n(r(855)),v=n(r(3)),g=n(r(4745)),y=n(r(4747));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var b=function(e){(0,i.default)(r,e);var a=E(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0,d=(0,p.default)(r,"health.workloadStatuses",[]).reduce((function(e,t){return e+(t.replicas||t.availableReplicas||0)}),0),E=(0,p.default)(r,"health.workloads",{}),b=(0,m.default)((0,p.default)(r,"edges.inner",[]),"data.target");return f.default.createElement("div",{className:"ks-app-component",onClick:s?this.handleClick:null,"data-component":r.name,style:{position:"absolute",top:r.position.y,left:r.position.x,zIndex:2}},s&&f.default.createElement("p",{className:y.default.title},r.name),f.default.createElement("div",{className:(0,v.default)((e={},(0,l.default)(e,y.default.group,s),(0,l.default)(e,y.default.selected,"app"===i&&o.name===r.name),(0,l.default)(e,y.default.error,(0,p.default)(r,"health.requests.errorRatio")>0||(0,p.default)(r,"health.service.requests.errorRatio")>0),e))},s&&f.default.createElement("p",{className:y.default.pods},f.default.createElement("img",{src:"/assets/health.svg",alt:""}),t("PODS"),": ",d),c.service&&c.service.map((function(e){return f.default.createElement("div",{key:e.data.id,"data-service":e.data.service,"data-service-id":e.data.id})})),c.app&&c.app.map((function(e){return f.default.createElement(g.default,{className:y.default.app,key:e.data.id,data:e.data,edge:b[e.data.id],health:E[e.data.workload],inGroup:s,store:n})}))))}}]),r}(f.default.Component);a.default=b,b.propTypes={data:d.default.object},b.contextTypes={selectedData:d.default.object,selectedType:d.default.string,onSelectApp:d.default.func}},function(e,a,r){"use strict";r(15);var n=r(20);r(86),r(190),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(86),r(42),r(190),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(26)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=r(186),v=n(r(4746));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var y=function(e){(0,i.default)(r,e);var a=g(r);function r(){return(0,u.default)(this,r),a.apply(this,arguments)}return(0,o.default)(r,[{key:"renderHTTPMetrics",value:function(){var e=this.props,a=e.health,r=e.edge,n=(0,f.default)(a,"requests.errorRatio"),l=(0,f.default)(r,"data.traffic.rates.http",0),u=-1===n?NaN:(100-n).toFixed(2),o=(0,f.default)(r,"data.responseTime",NaN);return d.default.createElement("div",{className:v.default.detail},d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"changing-over",size:16})," ","".concat(l," RPS")),d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"check",size:16})," ",isNaN(u)?t("NO_DATA_SCAP"):"".concat(u,"%")),d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"timed-task",size:16})," ",isNaN(o)||"0"===o?t("NO_DATA_SCAP"):"".concat(o," ms")),d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"pod",size:16})," ",(0,f.default)(a,"workloadStatus.available")||(0,f.default)(a,"workloadStatus.availableReplicas")," ","/"," ",(0,f.default)(a,"workloadStatus.replicas")||(0,f.default)(a,"workloadStatus.desiredReplicas")))}},{key:"renderTCPMetrics",value:function(){var e=this.props,a=e.data,r=e.health,n=(0,f.default)(a,"traffic[0].rates.tcpIn"),l=(0,f.default)(a,"traffic[0].rates.tcpOut");return d.default.createElement("div",{className:v.default.detail},d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"next",size:16})," ",isNaN(n)?t("NO_DATA_SCAP"):"".concat(n," B/s")),d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"previous",size:16})," ",isNaN(l)?t("NO_DATA_SCAP"):"".concat(l," B/s")),d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"pod",size:16})," ",(0,f.default)(r,"workloadStatus.availableReplicas")," /"," ",(0,f.default)(r,"workloadStatus.desiredReplicas")))}},{key:"renderDetail",value:function(){var e=this.props.edge;return"http"===((0,f.default)(e,"data.traffic.protocol")||"http")?this.renderHTTPMetrics():this.renderTCPMetrics()}},{key:"render",value:function(){var e=this.props,a=e.data,r=e.health,n=e.className,u=e.inGroup;if(-1!==a.app.indexOf("kubesphere")||"unknown"===a.app)return d.default.createElement("div",{className:(0,m.default)(v.default.card,n),"data-workload":a.workload,"data-workload-id":a.id,"data-group":u},d.default.createElement("div",{className:v.default.type},t("TRAFFIC_ENTRY")),d.default.createElement("div",{className:v.default.wrapper},d.default.createElement("div",{className:v.default.gatewayName},d.default.createElement(h.Icon,{name:"project",size:16}),a.targetNamespace)));var o=(0,f.default)(r,"requests.errorRatio");return d.default.createElement("div",{className:(0,m.default)(v.default.card,n,(0,l.default)({},v.default.error,o>0)),"data-workload":a.workload,"data-workload-id":a.id,"data-group":u},d.default.createElement("div",{className:v.default.type},a.hasCB&&d.default.createElement(h.Icon,{name:"thunder",type:"light"}),t("DEPLOYMENT")),d.default.createElement("div",{className:v.default.wrapper},this.renderDetail(),d.default.createElement("div",{className:v.default.workload},d.default.createElement("span",null,t("DEPLOYMENT")),d.default.createElement("span",null,a.workload))))}}]),r}(d.default.PureComponent);a.default=y,y.propTypes={data:p.default.object,health:p.default.object,edge:p.default.object},y.defaultProps={data:{},health:{},edge:{}}},function(e,t,a){e.exports={card:"_3UtyX1TwsMA4J5_I9azhk4",error:"_1f5z3cAVlVjSxozltEiLWa",type:"_3ig_hBH8qoAHkvUzs_7XPE",wrapper:"_2-NCjQfg1O19iTRk90LKv",detail:"_3Rb35sVDvzSTfvK_EvU8E6",gatewayName:"-s8vbKJS6TAxA3e75lQyx",workload:"_3hKVcpsaMemXWCdKAFDatc"}},function(e,t,a){e.exports={title:"vt11zKMrFCOLash0CtDuq",app:"_2VIFmapZqEet3i4h8IcfoT",group:"GBv7IxeMCUzEwP37i9ruG",selected:"_3hAJJY6cz3ePuX_85HtNfJ",error:"_3cHhj9ZjDA2V1eTNhECHpo",pods:"_2g9MF0hWsSUsXH7jreOBwD"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(31),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(31),r(42),r(16),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(26)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=r(186),v=n(r(4749)),g=n(r(4754)),y=n(r(4758)),E=n(r(4760));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var _=h.Collapse.CollapseItem,O=function(e){(0,i.default)(r,e);var a=b(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0?100*(t-a)/t:NaN,n=(0,v.getMetricData)((0,f.default)(e,"request_duration_millis[0].datapoints",[]),NaN);return[{title:"TRAFFIC",data:t.toFixed(2),unit:"RPS",icon:"changing-over"},{title:"SUCCESS_RATE",data:r.toFixed(2),icon:"check",unit:"%"},{title:"DURATION",data:n.toFixed(2),icon:"timed-task",unit:"ms"}]}}]),r}(d.default.Component);a.default=_,_.propTypes={detail:p.default.object,store:p.default.object}},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(190),r(4),r(23),r(17),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(190),r(4),r(22),r(23),r(57),r(17),r(110);var l=n(r(315)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(26)),m=n(r(0)),h=n(r(1)),v=n(r(837)),g=r(794),y=r(474),E=r(798),b=n(r(1913)),_=n(r(4752)),O=n(r(1450));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var C=function(e){(0,s.default)(n,e);var a,r=S(n);function n(e){var t;return(0,i.default)(this,n),(t=r.call(this,e)).handleWorkloadChange=function(e){t.setState({workload:e},(function(){return t.getData()}))},t.state={workload:(0,p.default)(e.detail,"workloads[0].data.workload"),metrics:{},outMetrics:{}},t.getData(),t}return(0,c.default)(n,[{key:"componentDidUpdate",value:function(e){var t=this;(0,v.default)(e.detail,this.props.detail)||this.setState({workload:(0,p.default)(this.props.detail,"workloads[0].data.workload")},(function(){t.getData()}))}},{key:"componentDidMount",value:function(){var e=this;this.interval=setInterval((function(){e.getData()}),1e4)}},{key:"componentWillUnmount",value:function(){this.interval&&clearInterval(this.interval)}},{key:"getData",value:(a=(0,o.default)(u.default.mark((function e(){var t,a,r=this;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.state.workload,a=this.props.store,t&&(this.store.fetchWorkloadMetrics({name:t,namespace:a.detail.namespace,cluster:a.detail.cluster},{duration:1800}).then((function(e){r.setState({metrics:e})})),this.store.fetchWorkloadMetrics({name:t,namespace:a.detail.namespace,cluster:a.detail.cluster},{duration:1800,direction:"outbound",reporter:"destination"}).then((function(e){r.setState({outMetrics:e})})));case 3:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"renderWorkloadSelect",value:function(){return m.default.createElement(_.default,{className:O.default.workloads,value:this.state.workload,options:this.workloads,onChange:this.handleWorkloadChange})}},{key:"render",value:function(){return"tcp"===this.props.protocol?m.default.createElement(m.default.Fragment,null,m.default.createElement("div",{className:O.default.title},t("TCP_INBOUND_TRAFFIC")," ",this.renderWorkloadSelect()),m.default.createElement(E.SimpleArea,(0,l.default)({},this.tcpInMetrics,{height:150})),m.default.createElement("div",{className:O.default.title},t("TCP_OUTBOUND_TRAFFIC")," ",this.renderWorkloadSelect()),m.default.createElement(E.SimpleArea,(0,l.default)({},this.tcpOutMetrics,{height:150}))):m.default.createElement(m.default.Fragment,null,m.default.createElement("div",{className:O.default.title},t("HTTP_INBOUND_TRAFFIC")," ",this.renderWorkloadSelect()),m.default.createElement(b.default,{metrics:this.trafficInMetrics}),m.default.createElement("div",{className:"margin-b8"}),m.default.createElement(E.SimpleArea,(0,l.default)({},this.requestInMetrics,{height:150})),m.default.createElement("div",{className:O.default.title},t("HTTP_OUTBOUND_TRAFFIC")," ",this.renderWorkloadSelect()),m.default.createElement(b.default,{metrics:this.trafficOutMetrics}),m.default.createElement("div",{className:"margin-b8"}),m.default.createElement(E.SimpleArea,(0,l.default)({},this.requestOutMetrics,{height:150})))}},{key:"store",get:function(){return this.props.store}},{key:"workloads",get:function(){return(0,p.default)(this.props.detail,"workloads",[]).map((function(e){return{label:(0,p.default)(e,"data.workload",""),value:(0,p.default)(e,"data.workload","")}}))}},{key:"requestInMetrics",get:function(){if(!this.props.detail)return[];var e=this.state.metrics,t=(0,p.default)(e,"request_count[0].datapoints",[]),a=(0,p.default)(e,"request_error_count[0].datapoints",[]),r=t.map((function(e,t){return(0,y.getSuccessCount)(e,a[t])}));return(0,g.getAreaChartOps)({title:"TRAFFIC",legend:["SUCCESSFUL","ALL"],areaColors:["#329dce","#d8dee5"],data:[{values:r},{values:t}],unit:"RPS"})}},{key:"requestOutMetrics",get:function(){if(!this.props.detail)return[];var e=this.state.outMetrics,t=(0,p.default)(e,"request_count[0].datapoints",[]),a=(0,p.default)(e,"request_error_count[0].datapoints",[]),r=t.map((function(e,t){return(0,y.getSuccessCount)(e,a[t])}));return(0,g.getAreaChartOps)({title:"TRAFFIC",legend:["SUCCESSFUL","ALL"],areaColors:["#329dce","#d8dee5"],data:[{values:r},{values:t}],unit:"RPS"})}},{key:"tcpInMetrics",get:function(){if(!this.props.detail)return[];var e=this.state.metrics,t=(0,p.default)(e,"tcp_received[0].datapoints",[]),a=(0,p.default)(e,"tcp_sent[0].datapoints",[]);return 0===t.length&&0===a.length?{}:(0,g.getAreaChartOps)({title:"BANDWIDTH",legend:["SENT","RECEIVED"],data:[{values:a},{values:t}],unit:"B/s"})}},{key:"tcpOutMetrics",get:function(){if(!this.props.detail)return{};var e=this.state.outMetrics,t=(0,p.default)(e,"metrics.tcp_received.matrix[0].values",[]),a=(0,p.default)(e,"tcp_sent[0].datapoints",[]);return 0===t.length&&0===a.length?{}:(0,g.getAreaChartOps)({title:"BANDWIDTH",legend:["SENT","RECEIVED"],data:[{values:a},{values:t}],unit:"B/s"})}},{key:"trafficInMetrics",get:function(){if(!this.props.detail)return[];var e=this.state.metrics,t=(0,y.getMetricData)((0,p.default)(e,"request_count[0].datapoints",[]),NaN),a=(0,y.getMetricData)((0,p.default)(e,"request_error_count[0].datapoints",[]),0),r=t>0?100*(t-a)/t:NaN,n=(0,y.getMetricData)((0,p.default)(e,"request_duration_millis[0].datapoints",[]),NaN);return[{title:"TRAFFIC",data:t.toFixed(2),unit:"RPS",icon:"changing-over"},{title:"SUCCESS_RATE",desc:"SUCCESS_RATE_SCAP",data:r.toFixed(2),icon:"check",unit:"%"},{title:"DURATION",data:n.toFixed(2),icon:"timed-task",unit:"ms"}]}},{key:"trafficOutMetrics",get:function(){if(!this.props.detail)return[];var e=this.state.outMetrics,t=(0,y.getMetricData)((0,p.default)(e,"request_count[0].datapoints",[]),NaN),a=(0,y.getMetricData)((0,p.default)(e,"request_error_count[0].datapoints",[]),0),r=t>0?100*(t-a)/t:NaN,n=(0,y.getMetricData)((0,p.default)(e,"request_duration_millis[0].datapoints",[]),NaN);return[{title:"TRAFFIC",data:t.toFixed(2),unit:"RPS",icon:"changing-over"},{title:"SUCCESS_RATE",desc:"SUCCESS_RATE_SCAP",data:r.toFixed(2),icon:"check",unit:"%"},{title:"DURATION",data:n.toFixed(2),icon:"timed-task",unit:"ms"}]}}]),n}(m.default.Component);a.default=C,C.propTypes={detail:h.default.object,store:h.default.object}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(42),a(4),a(23),a(57),a(17);var l=n(a(36)),u=n(a(37)),o=n(a(55)),i=n(a(56)),c=n(a(51)),s=r(a(0)),f=n(a(3)),d=a(186),p=n(a(4753));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var h=function(e){(0,o.default)(a,e);var t=m(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u1?r[l[0]]=l[1]:t=!1}return{result:r,status:t}}(a),n=r.result;r.status&&t.triggerChange((0,u.default)({},e,n))}else t.triggerChange((0,u.default)({},e,a))}))};var n=t.getOptions(),i=Object.keys(e.value)[0]||n[0].value,c=e.value[i];return"httpCookie"===i&&c&&(c=Object.entries(c).map((function(e){var t=(0,l.default)(e,2),a=t[0],r=t[1];return"".concat(a,"=").concat(r)})).join("; ")),t.state={type:i,value:c,propsValue:e.value},t}return(0,i.default)(r,[{key:"getOptions",value:function(){var e=this.props.protocol,a=[{label:t("HASH_BASED_ON_SOURCE_IP_ADDRESS"),value:"useSourceIp"},{label:t("HASH_BASED_ON_RINGHASH"),value:"ringHash"},{label:t("HASH_BASED_ON_MAGLEV"),value:"maglev"}];if("http"===e)return[{label:t("HASH_BASED_ON_HTTP_HEADER"),value:"httpHeaderName"},{label:t("HASH_BASED_ON_HTTP_COOKIE"),value:"httpCookie"},{label:t("HASH_BASED_ON_HTTP_QUERY_PARAMETE_NAME"),value:"httpQueryParameterName"}].concat(a)}},{key:"render",value:function(){var e=this.state,a=e.type,r=e.value;return p.default.createElement("div",null,p.default.createElement(h.Select,{value:a,options:this.getOptions(),onChange:this.handleTypeChange}),"httpHeaderName"===a&&p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{className:"margin-t12"},t("HTTP_HEADER")),p.default.createElement(h.Input,{value:r,onChange:this.handleValueChange})),"httpCookie"===a&&p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{className:"margin-t12"},t("HTTP_COOKIE")),p.default.createElement(h.Input,{value:r,onChange:this.handleValueChange,placeholder:"key1=value1; key2=value2"})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.value!==t.propsValue){var a=Object.keys(e.value)[0],r=e.value[a];return"httpCookie"===a&&r&&(r=Object.entries(r).map((function(e){var t=(0,l.default)(e,2),a=t[0],r=t[1];return"".concat(a,"=").concat(r)})).join("; ")),{type:a,value:r,propsValue:e.value}}return null}}]),r}(p.default.Component);a.default=g,g.propTypes={value:m.default.object,onChange:m.default.func},g.defaultProps={value:{},onChange:function(){}}},function(e,t,a){e.exports={alert:"_1vmq3lFL4s_LHc4G92GrAd",title:"UJTgRS_diNzcvnFtP8moj",tip:"IYAZYjWhc7hDQqpGq-eJy"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(29),r(73),r(18),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(24),r(17),r(38),r(62),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(29),r(73),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(38),r(62),r(7),r(32);var l=n(r(43)),u=n(r(30));r(41);var o,i=n(r(44)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(47),v=r(433),g=n(r(26)),y=r(14),E=r(186),b=n(r(837)),_=r(52),O=n(r(452)),S=n(r(318)),C=n(r(4759)),D=n(r(1914));function k(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function N(e){for(var t=1;t0&&f.default.createElement("div",{className:g.default.errorSpans},1===S?t("NUM_ERROR_SI",{num:S}):t("NUM_ERROR_PL",{num:S}))),f.default.createElement("ul",{className:g.default.services},(0,s.default)(u,"name").map((function(e){return f.default.createElement("li",{key:e.name},f.default.createElement("span",{className:g.default.tag,style:{backgroundColor:d[e.name]}}),"".concat(e.name," (").concat(e.numberOfSpans,")"))}))),f.default.createElement("div",{className:g.default.startTime},f.default.createElement("p",null,(0,h.formatRelativeDate)(o/1e3),"  |  ",f.default.createElement("strong",null,b)),f.default.createElement("p",null,_))))}}]),r}(f.default.Component);a.default=b,b.propTypes={className:d.default.string,onClick:d.default.func,detail:d.default.object,durationPercent:d.default.number},b.defaultProps={onClick:function(){},durationPercent:0,detail:{}}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(16),a(190),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(30)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51));a(45),a(5),a(42),a(16),a(190),a(4),a(23),a(57),a(17);var s=r(a(0)),f=r(a(3)),d=a(186),p=a(1021),m=r(a(4768));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}function v(e){return"".concat((100*e).toFixed(1),"%")}var g=function(e){(0,o.default)(a,e);var t=h(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u1-c.end?"Left":"Right",s.default.createElement("li",{className:(0,f.default)(m.default.wrapper,(0,n.default)({},m.default.selected,u)),onClick:this.handleClick},s.default.createElement(d.Columns,{className:"is-gapless"},s.default.createElement(d.Column,{className:"is-3"},s.default.createElement("div",{className:m.default.nameWrapper},s.default.createElement("span",{className:m.default.padder,style:{paddingLeft:12*(a.depth+1)}}),s.default.createElement("a",{className:m.default.name,style:{borderColor:r}},s.default.createElement("span",{className:m.default.svc},o&&s.default.createElement(d.Icon,{name:"error",color:{primary:"#fff",secondary:"#ea4641"}}),a.process.serviceName," "),s.default.createElement("span",{className:m.default.endpoint},a.operationName)))),s.default.createElement(d.Column,{className:"margin-l12 margin-r12"},s.default.createElement("div",{className:m.default.barWrapper},s.default.createElement("div",{className:m.default.bar,style:{backgroundColor:r,left:v(c.start),width:v(c.end-c.start)}},s.default.createElement("div",{className:(0,f.default)(m.default.barLabel,m.default["barLabel".concat(e)])},i))))))}}]),a}(s.default.Component);t.default=g},function(e,t,a){e.exports={wrapper:"_3FpC5ye7GyQiA_9XNgx040",selected:"_11AetUGUuNRQbhOiVaaPrQ",nameWrapper:"cWTG60H4pfEzvUaUIBzkJ",name:"vjWzJJl5QXyvJrZh0yxG1",svc:"_1-OgJnOWAnoA9-4y_V7v6",endpoint:"_6EPxZpgSu0q2JNsNKM8dH",padder:"XpivfNFuNAu6Z00f5sn1b",barWrapper:"_2jIAbOYlOMtqtmQQ44uZ1a",bar:"_1kkSL2CR5ItZrLhBYy8cx4",barLabel:"_2jh31S8ET1p5RAOzk3mU13",barLabelLeft:"_32_b1BUKqADygs-iprfczz",barLabelRight:"_3V0eVtgfe3fOMxrkhggaoC"}},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(16),r(4),r(23),r(24),r(17),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51));r(45),r(18),r(191),r(42),r(16),r(159),r(4),r(23),r(57),r(17);var s=n(r(63)),f=n(r(0)),d=r(186),p=n(r(1045)),m=r(1021),h=n(r(4770));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var g=function(e,t){switch(e){case"bool":return String(t);case"string":case"number":return t;default:return JSON.stringify(t)}},y=function(e){var t=e.data;return f.default.createElement("ul",{className:h.default.properties},t.map((function(e){return f.default.createElement("li",{key:e.key},f.default.createElement("span",null,e.key,": "),f.default.createElement("span",null,g(e.type,e.value)))})))},E=function(e){var t=e.data,a=e.startTime;return f.default.createElement("div",null,t.map((function(e){var t=(0,m.formatDuration)(e.timestamp-a);return f.default.createElement("div",{key:e.timestamp,classNames:h.default.log},f.default.createElement("span",null,t),e.fields.map((function(e){return f.default.createElement("span",{className:"margin-l12",key:e.key},f.default.createElement("span",null,e.key,"= "),f.default.createElement("span",null,f.default.createElement("strong",null," ",g(e.type,e.value))))})))})))},b=function(e){(0,o.default)(r,e);var a=v(r);function r(e){var t;return(0,l.default)(this,r),(t=a.call(this,e)).handleTypeChange=function(e){t.setState({type:e})},t.renderContentBody=function(){var e=t.props.span;switch(t.state.type){case"tags":return f.default.createElement(y,{data:e.tags});case"process":return f.default.createElement(y,{data:e.process.tags});case"logs":return f.default.createElement(E,{data:e.logs,startTime:e.startTime-e.relativeStartTime})}return null},t.state={type:"tags"},t}return(0,u.default)(r,[{key:"componentDidUpdate",value:function(e){this.props.span!==e.span&&this.setState({type:"tags"})}},{key:"render",value:function(){var e=this.props,a=e.span,r=e.onClose,n=this.state.type,l=(0,m.formatDuration)(a.relativeStartTime),u=(0,m.formatDuration)(a.duration),o=a.process.serviceName.split(".")[0];return f.default.createElement("div",{className:h.default.wrapper},f.default.createElement("div",{className:h.default.header},f.default.createElement(d.Icon,{name:"target",size:40}),f.default.createElement("div",{className:h.default.text},f.default.createElement("div",{className:h.default.name},a.process.serviceName,f.default.createElement(p.default,{name:t("SERVICE"),value:o}),f.default.createElement(p.default,{name:t("START_TIME"),value:l}),f.default.createElement(p.default,{name:t("DURATION"),value:u})),f.default.createElement("p",null,a.operationName)),f.default.createElement("div",{className:h.default.close,onClick:r},f.default.createElement(d.Icon,{name:"minimize",size:20}))),f.default.createElement("div",{className:h.default.content},f.default.createElement("div",{className:h.default.contentHeader},f.default.createElement(d.RadioGroup,{mode:"button",buttonWidth:155,value:n,onChange:this.handleTypeChange,size:"small"},f.default.createElement(d.RadioButton,{value:"tags"},t("TAG")),f.default.createElement(d.RadioButton,{value:"process"},t("PROCESS")),!(0,s.default)(a.logs)&&f.default.createElement(d.RadioButton,{value:"logs"},t("LOG")))),f.default.createElement("div",{className:h.default.contentBody},this.renderContentBody())))}}]),r}(f.default.Component);a.default=b},function(e,t,a){e.exports={wrapper:"_2SrTH5oLaYBNtgxSsaIe1_",header:"_14VaoFxYI4xrb8vE4XX7q_",text:"_1iF8T6gN1lf2KdP5iGWCtN",name:"afCuDDLbVrc6EwA9B7J42",content:"iQqWGMwUNDUNhZckjqUKb",contentHeader:"I7j76faUqwX3zA4eEVJQG",contentBody:"_3soUTBQ4emfUy3qasSxMm1",properties:"_33lp7a1-5ZP0KxxrDJPaa-",close:"PLv31nTie7tGWOvDkQJv1",log:"Wzdc9MCTDUaK_p6l27wct"}},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(63)),f=r(a(4772)),d=r(a(4773)),p=r(a(1918));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var h=function(e){(0,u.default)(a,e);var t=m(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"render",value:function(){var e=this.props,t=e.data,a=e.viewRange,r=e.onRangeChange;return(0,s.default)(t)?null:c.default.createElement("div",{className:p.default.graph},c.default.createElement(f.default,{data:t}),c.default.createElement(d.default,{data:t,viewRange:a,onRangeChange:r}))}}]),a}(c.default.Component);t.default=h},function(e,t,a){"use strict";a(15);var r=a(20);a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(18),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=a(1021);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var d=function(e){(0,u.default)(a,e);var t=f(a);function a(e){var r;return(0,n.default)(this,a),(r=t.call(this,e)).getColor=function(e){return r.props.data.serviceColorMap[e]},r.canvas=c.default.createRef(),r}return(0,l.default)(a,[{key:"componentDidMount",value:function(){this.drawCanvas()}},{key:"drawCanvas",value:function(){if(this.canvas&&this.canvas.current){var e=this.props.data,t=e.spans.map((function(e){return{valueOffset:e.relativeStartTime,valueWidth:e.duration,serviceName:e.process.serviceName}}));(0,s.renderIntoCanvas)(this.canvas.current,t,e.duration,this.getColor)}}},{key:"render",value:function(){return c.default.createElement("canvas",{ref:this.canvas})}}]),a}(c.default.Component);t.default=d},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(190),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(28),r(42),r(190),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(1021),d=n(r(1918));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=function(e){(0,o.default)(r,e);var a=p(r);function r(e){var t;return(0,l.default)(this,r),(t=a.call(this,e)).handleMouseDown=function(e){t.originX=e.x,t.hideCursorGuide();var a=t.svgBound,r=a.left,n=a.width,l=Math.max(e.x-r,0)/n;t.setState({viewStart:l,viewEnd:l})},t.handleMouseUp=function(){t.originX=-1;var e=t.state,a=e.viewStart,r=e.viewEnd;Math.abs(a-r)>.01&&t.props.onRangeChange({viewStart:a,viewEnd:r})},t.handleMouseLeave=function(){t.hideCursorGuide()},t.handleMouseMove=function(e){if(t.originX>-1){var a=t.svgBound,r=a.left,n=a.width,l=Math.max(e.x-r,0)/n;l>t.state.viewStart?t.setState({viewEnd:l}):t.setState({viewStart:l})}else t.showCursorGuide(e)},t.handleClear=function(){t.props.onRangeChange({viewStart:0,viewEnd:1})},t.showCursorGuide=function(e){if(t.cursorGuide)for(var a=t.svgBound,r=a.left,n=a.width,l=Math.max(e.x-r,0)/n,u="".concat(100*l,"%"),o=0;o0&&r<1,l="".concat(100*a,"%"),u="".concat(100*r,"%"),o=this.getCoords();return s.default.createElement("div",{className:d.default.range},s.default.createElement("svg",{height:"100%",width:"100%",ref:this.svg},s.default.createElement("g",{className:d.default.coord},o.map((function(e,t){return s.default.createElement("g",{key:e.value,className:d.default.coordLine},s.default.createElement("line",{y1:"0%",y2:"100%",x1:e.percent,x2:e.percent}),s.default.createElement("text",{x:e.percent,y:12,transform:t===f.COORD_COUNT?"translate(-2,0)":"translate(2,0)",textAnchor:t===f.COORD_COUNT?"end":"start"},(0,f.formatDuration)(e.value)))}))),s.default.createElement("g",{className:d.default.cursorGuide,name:"cursor-guide"},s.default.createElement("line",{y1:0,y2:58,strokeWidth:"1",stroke:"#212b36",strokeOpacity:"0",strokeDasharray:"2,2"}),s.default.createElement("line",{y1:19,y2:41,stroke:"#242e42",strokeWidth:"4",strokeOpacity:"0",strokeLinecap:"round"}),s.default.createElement("line",{y1:0,y2:58,strokeWidth:"20",stroke:"transparent"})),n&&s.default.createElement("g",{className:d.default.scrubber},s.default.createElement("line",{className:d.default.scrubberLine,y1:"0%",y2:"100%",x1:l,x2:l}),s.default.createElement("line",{className:d.default.scrubberLine,y1:"0%",y2:"100%",x1:u,x2:u}))),n&&s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:d.default.hoverBlock,style:{left:0,width:l}}),s.default.createElement("div",{className:d.default.hoverBlock,style:{left:u,width:"".concat(100*(1-r),"%")}}),s.default.createElement("div",{className:d.default.clearBlock,onClick:this.handleClear},t("CLEAR"))))}}]),r}(s.default.Component);a.default=m},function(e,t,a){e.exports={body:"_1pPFSIIbH7oLnLwkgHOLB5",header:"_2DMYdLCQ-OBk0rFii_9W5O",title:"_1Erbw_1JjBawD0kM-G52ln",name:"_3ugl6RaS7fK6PUFj7hPqwZ",close:"_2i5KJmq9o9HmC3fp0B5rPv",content:"_1lhG8ZLZp0syy6MTsAqY-_",wrapper:"_3n2YybElrtxWe2nOf7ZQUa",timelineTitle:"_3kkKn_rpepfTAFlapQ4YVK",leftPane:"pfziZWcqAxnmD-tb1Ip10",rightPane:"_36cdSAMcGZ9FJ-_068PDV_",timelineSelect:"_2mJV8zFMq6n5D4t-maCCmh",listPane:"GgsvlcpZCQVcsOdH3tQ6J",detailPane:"_4xyXvcotLTz6jMyjqWGbV",coords:"_20avL2qiM0J57r-UIzor8v"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(11),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(11),a(28),a(4);var n=a(317),l=r(a(5249)),u=r(a(5251)),o=r(a(5258)),i="/clusters/:cluster/ippools/:name";t.default=function(e){var t=[{path:"".concat(i,"/workspaces"),title:"WORKSPACE_PL",component:l.default,exact:!0},{path:"".concat(i,"/namespaces"),title:"NAMESPACE_PL",component:u.default,exact:!0},{path:"".concat(i,"/pods"),title:"POD_PL",component:o.default,exact:!0}];return e?(t=t.filter((function(e){return"WORKSPACE_PL"!==e.title}))).push((0,n.getIndexRoute)({path:i,to:"".concat(i,"/namespaces"),exact:!0})):(t=t.filter((function(e){return"NAMESPACE_PL"!==e.title}))).push((0,n.getIndexRoute)({path:i,to:"".concat(i,"/workspaces"),exact:!0})),t}},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(5),r(11),r(6),r(73),r(18),r(87),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(73),r(18),r(28),r(87),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l,u,o=n(r(30)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(49)),m=n(r(789)),h=n(r(790)),v=n(r(26)),g=n(r(63)),y=r(14),E=r(239),b=n(r(0)),_=n(r(445)),O=r(52),S=n(r(5250));function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=e.props.cluster;return t.name&&(t.nameAndAlias=t.name,delete t.name),e.projectStore.fetchList(S(S({cluster:a},t),{},{limit:-1}))},e.handleOk=function(){var t=e.props.onOk,a=e.state.namespace,r=e.projectStore.list.data.find((function(e){return e.name===a}));t&&(null==t||t(r))},e.projectStore=new g.default,e.state={namespace:""},e}return(0,s.default)(r,[{key:"componentDidMount",value:function(){this.fetchProjects()}},{key:"getProjects",value:function(){var e=this.props.defaultValue,t=this.projectStore.list.data,a=t.filter((function(e){return"Terminating"!==e.status})).map((function(e){return{label:(0,E.showNameAndAlias)(e),value:e.name,disabled:e.isFedManaged,isFedManaged:e.isFedManaged}}));return e&&!t.find((function(t){return t.name===e}))&&a.unshift({label:e,value:e}),a}},{key:"render",value:function(){var e=this.props.onCancel,a=this.state.namespace;return m.default.createElement("div",{className:(0,h.default)(_.default.item)},m.default.createElement(v.Select,{options:this.getProjects(),isLoading:this.projectStore.list.isLoading,onChange:this.handleChange,defaultValue:a}),m.default.createElement("div",{className:_.default.operate},m.default.createElement(v.Button,{type:"control",onClick:this.handleOk},t("OK")),m.default.createElement(v.Button,{onClick:e},t("CANCEL"))))}}]),r}(m.default.Component),u.propTypes={onOk:y.default.func,onCancel:y.default.func},l=o))||l;a.default=D},function(e,t,a){e.exports={item:"_2VZojJMCcr5LCPjcy6xuXj",operate:"_2BjQJV11IdoAn6d-n9zWbC"}},function(e,t,a){e.exports={panel:"myyMir8aQeW7zvNdoD_ye",titleWrapper:"_12YJqhh4laJo2pSemgH7Bo",title:"_1LHpDb3CKBk2875n2BK-NW"}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(24),a(17),a(62),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(24),a(17),a(62);var n,l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=a(239),d=r(a(849));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=(0,f.inject)("detailStore")(n=(0,f.observer)(n=function(e){(0,o.default)(a,e);var t=p(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u1&&void 0!==arguments[1]?arguments[1]:{},a=(0,l.default)(this,"props.rootStore")||this.rootStore;a&&a.triggerAction(e,o({store:this.store},t))},e}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(12),a(109),a(5),a(11),a(84),a(73),a(18),a(4),a(23),a(24),a(17),a(85),a(136),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(109),a(45),a(5),a(11),a(84),a(73),a(18),a(42),a(4),a(23),a(57),a(17),a(85);var l=n(a(315)),u=n(a(61)),o=n(a(36)),i=n(a(37)),c=n(a(55)),s=n(a(56)),f=n(a(51)),d=n(a(0)),p=r(a(1)),m=n(a(63)),h=n(a(194)),v=a(186),g=n(a(3)),y=a(72),E=n(a(3064)),b=n(a(3065)),_=n(a(3066)),O=n(a(1196));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var C=function(e){(0,c.default)(a,e);var t=S(a);function a(){var e;(0,o.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&void 0!==i[0]?i[0]:{},r=t.silent,n=(0,c.default)(t,["silent"]),a.query=n,l={},a.props.clusterStore&&(l.namespace=a.props.clusterStore.project),r&&(a.list.silent=!0),u=N(N(N({},l),a.props.match.params),n),a.searchByApp&&(u.searchByApp=a.searchByApp),e.next=9,a.store.fetchList(u);case 9:a.list.silent=!1;case 10:case"end":return e.stop()}}),e)}))),a.getSortOrder=function(e){return a.list.order===e&&(a.list.reverse?"descend":"ascend")},a.getFilteredValue=function(e){return a.list.filters[e]},a.store=e.store||t.store||{},a.list=a.store.list||{},a.module=e.module||"",a.authKey=e.authKey||e.module,a.name=e.name||"",a.title="".concat(e.name,"_PL"),a.rowKey=e.rowKey||"name",a.query={},a.skipAuth=e.skipAuth,a}return(0,d.default)(l,[{key:"getTableProps",value:function(){var e=this.list,t=e.data,a=e.filters,r=void 0===a?{}:a,n=e.keyword,l=e.selectedRowKeys,u=e.isLoading,o=e.total,i=e.page,c=e.limit,s=e.silent,f={total:o,page:i,limit:c},d=!1===u&&0===o&&Object.keys(r).length<=0&&(0,b.default)(n);return{data:t,filters:r,keyword:n,pagination:f,isLoading:u,selectedRowKeys:(0,g.toJS)(l),silentLoading:s,isEmptyList:d,rowKey:this.rowKey,module:this.module,name:this.name,enabledActions:this.enabledActions,itemActions:this.defaultItemActions,tableActions:this.defaultTableActions,tableId:this.props.match.path}}},{key:"getBannerProps",value:function(){return{className:"margin-b12",title:t(this.title),description:t("".concat(this.name.replace(/\s+/g,"_").toUpperCase(),"_DESC")),module:this.module}}},{key:"render",value:function(){return v.default.createElement(r,(0,u.default)({name:this.name,module:this.module,store:this.store,prefix:this.prefix,routing:this.routing,query:this.query,bannerProps:this.getBannerProps(),tableProps:this.getTableProps(),getSortOrder:this.getSortOrder,getFilteredValue:this.getFilteredValue,enabledActions:this.enabledActions,trigger:this.trigger.bind(this),getData:this.getData},this.props))}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"prefix",get:function(){return this.props.match.url}},{key:"defaultItemActions",get:function(){var e=this;return[{key:"edit",icon:"pen",text:t("EDIT_INFORMATION"),action:"edit",onClick:function(t){return e.trigger("resource.baseinfo.edit",{detail:t,success:e.routing.query})}},{key:"delete",icon:"trash",text:t("DELETE"),action:"delete",onClick:function(t){return e.trigger("resource.delete",{type:e.name,resource:t.name,detail:t,success:e.routing.query})}}]}},{key:"enabledActions",get:function(){var e=this.props.match.url;return globals.app.getActions(N(N({module:this.authKey,skipAuth:this.skipAuth},this.props.match.params),{},{project:this.props.match.params.namespace,fedproject:e.indexOf("federatedprojects")>-1,devops:this.props.match.params.devops,nodegroup:this.props.match.params.group}))}},{key:"defaultTableActions",get:function(){var e=this;return{onFetch:this.routing.query,onSelectRowKeys:this.list.setSelectRowKeys,selectActions:[{key:"delete",type:"danger",text:t("DELETE"),action:"delete",onClick:function(){return e.trigger("resource.batch.delete",{type:e.name,rowKey:e.rowKey,success:e.routing.query,k8sVersion:e.props.k8sVersion})}}]}}},{key:"searchByApp",get:function(){var t;return null!==(t=e.searchByApp)&&void 0!==t&&t}}]),l}(v.default.Component),i=e.injectStores||["rootStore"];return y.inject.apply(void 0,(0,l.default)(i))((0,y.observer)((0,C.trigger)(n)))}}var w=function(e){(0,p.default)(a,e);var t=T(a);function a(){return(0,f.default)(this,a),t.apply(this,arguments)}return(0,d.default)(a,[{key:"componentDidMount",value:function(){var e=this;this.props.noWatch||this.initWebsocket(),this.unsubscribe=this.routing.history.subscribe((function(t){if(t.pathname===e.props.match.url){var a=(0,_.parse)(t.search.slice(1));e.query=a||{},e.props.getData(a)}}))}},{key:"componentDidUpdate",value:function(e){(0,O.default)(e.match.params,this.props.match.params)||(this.props.getData(),this.props.noWatch||this.initWebsocket())}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe(),this.disposer&&this.disposer()}},{key:"initWebsocket",value:function(){var e=this,t=this.props.isFederated;if("getWatchListUrl"in this.store){var a=this.store.getWatchListUrl(this.props.match.params);this.websocket.watch(a);var r=(0,E.default)((function(t){if(!e.store.list.isLoading){var a=(0,_.parse)(location.search.slice(1));return e.props.getData(N(N(N({},a),t),{},{silent:!0}))}}),1e3),n=S.MODULE_KIND_MAP[this.props.module];t&&(n="Federated".concat(n));var l=t?D.default.federated(this.store.mapper):this.store.mapper;this.disposer=(0,g.reaction)((function(){return e.websocket.message}),this.props.onMessage||function(t){if(t.object.kind===n)if("MODIFIED"===t.type){var a=N(N({},e.props.match.params),l((0,g.toJS)(t.object)));e.store.list.updateItem(a)}else"DELETED"!==t.type&&"ADDED"!==t.type||r()})}}},{key:"render",value:function(){return this.props.children}},{key:"store",get:function(){return this.props.store}},{key:"websocket",get:function(){return this.props.rootStore.websocket}},{key:"routing",get:function(){return this.props.rootStore.routing}}]),a}(v.default.Component);a.ListPage=w},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(84),r(29),r(18),r(87),r(97),r(320),r(27),r(190),r(98),r(9),r(13),r(10),r(4),r(316),r(24),r(62),r(64),r(7),r(32),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.CreateUidFactory=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={IDList:e,maxID:e.length?Math.max.apply(null,e):0};return{generateUID:function(){var e=++t.maxID;return t.IDList.push(e),e},clear:function(){t.IDList=[],t.maxID=0}}},a.avgs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.length,a=e.reduce((function(e,t){return e+t}),0);return a/t},a.unitTransformGroupFactory=P,a.unitTransformFactory=A,a.unitTransformMap=a.fillEmptyMetrics=a.timestampify=a.timeAliasReg=a.isSameDay=a.stopAutoRefresh=a.startAutoRefresh=a.getColorByName=a.getZeroValues=a.getTimesData=a.getLastMonitoringData=a.getXAxisTickFormatter=a.getAreaChartOps=a.getChartData=a.getFormatTime=a.getValueByUnit=a.getSuitableValue=a.getSuitableUnit=void 0;var l=n(r(61)),u=n(r(58)),o=n(r(30)),i=n(r(96));r(12),r(5),r(11),r(6),r(84),r(29),r(18),r(28),r(87),r(97),r(320),r(442),r(42),r(27),r(190),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(316),r(436),r(319),r(24),r(62),r(64),r(7),r(32),r(110);var c=n(r(63)),s=n(r(60)),f=n(r(925)),d=n(r(158)),p=n(r(459)),m=n(r(195)),h=n(r(26)),v=n(r(74)),g=n(r(449)),y=n(r(450)),E=n(r(967)),b=n(r(1155)),_=r(52),O=r(72),S=n(r(243));function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t=e}));return l&&(n=a.units[t]),l})),n};a.getSuitableUnit=N;a.getSuitableValue=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(0,p.default)(e)&&!(0,m.default)(e)||(0,f.default)(Number(e)))return r;var n=N(e,a),l=T(e,n||a),u=(0,_.coreUnitTS)(l,n);return"".concat(l," ").concat(t(u))};var T=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3?arguments[3]:void 0,n="NAN"===e?0:parseFloat(e);if(r!==t)switch(t){default:break;case"":case"default":return n;case"iops":return Math.round(n);case"%":n*=100;break;case"m":if((n*=1e3)<1)return 0;break;case"Ki":n/=1024;break;case"Mi":n/=Math.pow(1024,2);break;case"Gi":n/=Math.pow(1024,3);break;case"Ti":n/=Math.pow(1024,4);break;case"Bytes":case"B":case"B/s":break;case"K":case"KB":case"KB/s":n/=1e3;break;case"M":case"MB":case"MB/s":n/=Math.pow(1e3,2);break;case"G":case"GB":case"GB/s":n/=Math.pow(1e3,3);break;case"T":case"TB":case"TB/s":n/=Math.pow(1e3,4);break;case"bps":n*=8;break;case"Kbps":n=8*n/1024;break;case"Mbps":n=8*n/1024/1024;break;case"ms":n*=1e3}return 0===Number(n)?0:Number(n.toFixed(a))};a.getValueByUnit=T;var R=function(e,t){return(0,_.getLocalTime)(Number(e)).format(t?"MM-DD HH:mm":"HH:mm:ss").replace(/(\d+:\d+)(:00)$/g,"$1")};a.getFormatTime=R;var w=function(e){var t=e.type,a=e.unit,r=e.xKey,n=void 0===r?"time":r,l=e.legend,u=void 0===l?[]:l,c=e.valuesData,s=void 0===c?[]:c,f=e.dot,p=void 0===f?2:f,m=e.originalUnit,v=e.workload_kind,g=0,y=0,E={};s.forEach((function(e,r){e.forEach((function(e){var n=parseInt((0,h.default)(e,[0],0),10),l=(0,h.default)(e,[1]),o=(0,h.default)(u,[r]);if(n&&!E[n]&&(E[n]=u.reduce((function(e,t){return e[t]||(e[t]=null),e}),{})),null!=o&&E[n]){var i="-1"===l?null:T(l,(0,d.default)(a)?t:a,p,m);"statefulset"===v&&E[n][o]&&!i||(E[n][o]=i)}(!g||g>n)&&(g=n),(!y||y86400;return Object.entries(E).map((function(e){var t=(0,i.default)(e,2),a=t[0],r=t[1];return D((0,o.default)({},n,function(e){return"time"===n?R(1e3*e,b):e}(a)),r)}))};a.getChartData=w;a.getAreaChartOps=function(e){var t=e.type,a=e.title,r=e.unitType,n=e.xKey,l=void 0===n?"time":n,o=e.legend,i=void 0===o?[]:o,f=e.data,d=void 0===f?[]:f,p=e.alert,m=e.workload_kind,v=(0,u.default)(e,["type","title","unitType","xKey","legend","data","alert","workload_kind"]),g=((0,s.default)(d)?d:[]).map((function(e){return(0,h.default)(e,"values")||[]})),E=r?N((0,y.default)(g),r):v.unit;!(0,c.default)(p)&&"value"in p&&(p=D(D({},p),{},{value:T(p.value,E),unit:E}));var b=w({type:t,unit:E,xKey:l,legend:i,valuesData:g,dot:v.dot,originalUnit:v.originalUnit,workload_kind:m});return D(D({},v),{},{title:a,unit:E,alert:p,data:b})};a.getXAxisTickFormatter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){var t=e.time;return+new Date(t)})),a=(0,E.default)(t),r=(0,b.default)(t);return r-a>864e4?function(e){return(0,S.default)(e).format("MM-DD HH:mm")}:function(e){return(0,S.default)(e).format("HH:mm:ss")}};a.getLastMonitoringData=function(e){var t={};return Object.entries(e).forEach((function(e){var a=(0,i.default)(e,2),r=a[0],n=a[1],l=(0,h.default)(n,"data.result[0].values",[])||[],u=(0,c.default)(l)?(0,h.default)(n,"data.result[0].value",[])||[]:(0,g.default)(l);(0,v.default)(t,"[".concat(r,"].value"),u)})),t};a.getTimesData=function(e){var t=[];return e.forEach((function(e){((0,h.default)(e,"values")||[]).forEach((function(e){var a=(0,h.default)(e,"[0]",0);t.includes(a)||t.push(a)}))})),t.sort()};a.getZeroValues=function(){for(var e=[],t=parseInt(Date.now()/1e3,10)-6e3,a=0;a<10;a++)e[a]=[t,0],t+=600;return e};a.getColorByName=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#fff";return O.COLORS_MAP[e]||e};a.startAutoRefresh=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=D({method:"fetchData",interval:5e3,leading:!0},t);if(e&&e[a.method]){var r=e[a.method];a.leading&&r({silentLoading:!0}),e.timer=setInterval((function(){r({silentLoading:!0})}),a.interval)}};a.stopAutoRefresh=function(e){e&&e.timer&&(clearInterval(e.timer),e.timer=null)};a.isSameDay=function(e,t){return Math.floor(e/864e5)===Math.floor(t/864e5)};var I=/(\d+)(\w+)/;a.timeAliasReg=I;a.timestampify=function(e){var t=e.match(I)||[],a=(0,i.default)(t,3),r=a[1],n=void 0===r?0:r,l=a[2];return Number(n)*(O.MILLISECOND_IN_TIME_UNIT[l]||0)};a.fillEmptyMetrics=function(e,t){if(!e.times||!e.start||!e.end)return t;var a=function(e){return String(e).replace(/\..*$/,"")},r=Math.floor((e.end-e.start)/e.times),n=e.times+1;return Object.values(t).forEach((function(t){var l=(0,h.default)(t,"data.result");(0,c.default)(l)||l.forEach((function(t){var l=t.values||[],u=l.reduce((function(e,t){return D(D({},e),{},(0,o.default)({},a(t[0]),t[1]))}),{});if(l.length1&&void 0!==arguments[1]?arguments[1]:0,r=t<0,n=Math.abs(t),l=0,u=0;u=c))break;l=u}var s=(0,i.default)(e[l],2),f=s[0],d=s[1],p=0===d?n:n/d,m=p.toFixed(a);return 0===Number(m)?"0":"".concat(r?"-":"").concat(m," ").concat(f)}}a.unitTransformMap=M},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(16),a(4),a(23),a(57),a(17);var l=n(a(36)),u=n(a(37)),o=n(a(55)),i=n(a(56)),c=n(a(51)),s=n(a(158)),f=r(a(0)),d=n(a(1)),p=n(a(3)),m=n(a(839)),h=n(a(2389));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var g=function(e){(0,o.default)(a,e);var t=v(a);function a(){return(0,l.default)(this,a),t.apply(this,arguments)}return(0,u.default)(a,[{key:"render",value:function(){var e=this.props,t=e.style,a=e.className,r=e.name,n=e.type,l=e.total,u=e.ready,o=e.flicker;return f.default.createElement("span",{className:(0,p.default)(h.default.status,a),style:t},f.default.createElement(m.default,{className:h.default.indicator,type:n,flicker:o}),f.default.createElement("span",{className:"font-bold"},r),!(0,s.default)(l)&&!(0,s.default)(u)&&f.default.createElement("span",null," (",u,"/",l,")"))}}]),a}(f.PureComponent);t.default=g,g.propTypes={style:d.default.string,className:d.default.string,name:d.default.string,total:d.default.number,ready:d.default.number,type:d.default.string,flicker:d.default.bool},g.defaultProps={type:"Running",flicker:!1}},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(873)),l=(0,r(a(1324)).default)(n.default);t.default=l},,function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TinyArea",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"MediumArea",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"SimpleArea",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"MultiArea",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"PercentArea",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"SimpleBar",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"StackedBar",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"SimpleCircle",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"PieChart",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"MultiPie",{enumerable:!0,get:function(){return p.default}});var n=r(a(2124)),l=r(a(2168)),u=r(a(2170)),o=r(a(2174)),i=r(a(2176)),c=r(a(2178)),s=r(a(2180)),f=r(a(2232)),d=r(a(1530)),p=r(a(2234))},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(27),r(9),r(13),r(10),r(4),r(23),r(17),r(111),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(28),r(42),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(193),r(17),r(111),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(58)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(158)),m=n(r(63)),h=n(r(470)),v=n(r(0)),g=n(r(1)),y=n(r(3)),E=r(186),b=n(r(2088));function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;tn&&(i=n),l||!u.endsWith(".")&&!u.endsWith("0")||i!==Number(u)||"".concat(i)===u||(i=u),o&&o(i))}}else o(u)},t.handleAdd=function(){var e=t.props,a=e.value,r=e.max,n=e.onChange;((0,p.default)(r)||ar)&&n(Number(a)-1)},t.handleBlur=function(){var e=t.props,a=e.onChange,r=e.unit,n=t.state.inputValue;""===n||"-"===n||(0,m.default)(n)||(n=Number(n)),!(0,p.default)(n)&&r&&(n="".concat(n).concat(r)),a&&a(n)};var n=e.value,l=e.defaultValue,u=e.unit,o=null!=n?n:l;return u&&(o=(0,h.default)(o,u)),t.state={inputValue:o},t}return(0,c.default)(r,[{key:"componentDidUpdate",value:function(e){if(e.value!==this.props.value){var t=this.props.value,a=this.props.unit;a&&(t=(0,h.default)(t,a)),this.state.inputValue!==t&&this.setState({inputValue:t})}}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.unit,n=e.showUnit,u=(e.value,e.defaultValue,e.onChange,e.integer),i=e.controls,c=(0,o.default)(e,["className","unit","showUnit","value","defaultValue","onChange","integer","controls"]),s=u?/[-0-9]/:/[-.0-9]/,f=this.state.inputValue,d=O(O({type:"text"},c),{},{onKeyPress:function(e){s.test(e.key)||e.preventDefault()},value:f,onChange:this.handleChange,onBlur:this.handleBlur});return r&&n?v.default.createElement("div",{className:(0,y.default)(a,b.default.withUnit)},v.default.createElement(E.Input,d),v.default.createElement("span",{className:b.default.unit},"core"===r?t("CORE_PL"):r)):i?v.default.createElement("div",{className:(0,y.default)(a,b.default.withUnit)},v.default.createElement(E.Input,d),v.default.createElement("div",{className:b.default.buttonWrapper},v.default.createElement(E.Icon,{className:b.default.iconUp,name:"chevron-up",clickable:!0,onClick:this.handleAdd}),v.default.createElement(E.Icon,{className:b.default.iconDown,name:"chevron-down",clickable:!0,onClick:this.handleSubtract}))):v.default.createElement(E.Input,(0,l.default)({className:a},d))}}]),r}(v.default.Component);C.propTypes={unit:g.default.string,showUnit:g.default.bool,value:g.default.oneOfType([g.default.string,g.default.number]),defaultValue:g.default.oneOfType([g.default.string,g.default.number]),min:g.default.number,max:g.default.number,integer:g.default.bool,controls:g.default.bool,onChange:g.default.func},C.defaultProps={unit:"",showUnit:!1,integer:!1,controls:!1,onChange:function(){}};var D=C;a.default=D},,function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var l=n(a(315)),u=n(a(58)),o=n(a(36)),i=n(a(37)),c=n(a(55)),s=n(a(56)),f=n(a(51)),d=r(a(0)),p=n(a(1)),m=n(a(3)),h=n(a(195)),v=a(186),g=n(a(2386));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=function(e){(0,c.default)(a,e);var t=y(a);function a(){return(0,o.default)(this,a),t.apply(this,arguments)}return(0,i.default)(a,[{key:"renderTitle",value:function(){var e=this.props,t=e.header,a=e.title,r=e.operations;return t||(a||r?d.default.createElement("div",{className:g.default.title},r&&d.default.createElement("div",{className:g.default.operations},r),a):null)}},{key:"renderContent",value:function(){var e=this.props,t=e.empty,a=e.children;return e.isEmpty||!a?(0,h.default)(t)?d.default.createElement("div",{className:g.default.empty},t):t:a}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.type,r=e.loading,n=(e.refreshing,e.title,e.operations,e.empty,e.children,e.isEmpty,(0,u.default)(e,["className","type","loading","refreshing","title","operations","empty","children","isEmpty"]));return d.default.createElement("div",(0,l.default)({className:(0,m.default)(g.default.card,t,g.default[a])},n),this.renderTitle(),r?d.default.createElement(v.Loading,{className:g.default.loading}):this.renderContent())}}]),a}(d.PureComponent);t.default=E,E.propTypes={className:p.default.string,type:p.default.string,loading:p.default.bool,refreshing:p.default.bool,title:p.default.oneOfType([p.default.string,p.default.element,p.default.node]),operations:p.default.oneOfType([p.default.string,p.default.element,p.default.node]),header:p.default.node,empty:p.default.oneOfType([p.default.string,p.default.element,p.default.node]),isEmpty:p.default.bool},E.defaultProps={title:"",type:"default",isEmpty:!1}},,,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=e.data,r=e.status,n=e.reason,c=e.type,s=void 0===c?"workload":c,f=e.onShowEvents,d=o.default.createElement("div",null,o.default.createElement("div",{className:"tooltip-title"},t("STATUS_INFORMATION")),o.default.createElement("div",null,(0,u.default)(a,"status.conditions",[]).map((function(e){return o.default.createElement("div",{key:e.type,className:i.default.condition},o.default.createElement("div",{className:i.default.title},function(e,t){var a=t.type,r=t.status;if("volume"===e)return"True"===r;return"ReplicaFailure"===a?"False"===r:"True"===r}(s,e)?o.default.createElement(l.Icon,{name:"success",type:"coloured"}):o.default.createElement(l.Icon,{name:"error",color:{primary:"#ffffff",secondary:"#ea4641"}}),o.default.createElement("span",null,t("".concat(s.toUpperCase(),"_CONDITION_").concat(e.type.toUpperCase()),{defaultValue:e.type}))),e.status&&o.default.createElement("p",null,t("STATUS_VALUE",{value:"True"===e.status?"True":"False"})),e.reason&&o.default.createElement("p",null,t("REASON_VALUE",{value:t("".concat(s.toUpperCase(),"_REASON_").concat(e.reason.toUpperCase()),{defaultValue:e.reason})})),e.message&&o.default.createElement("p",null,t("MESSAGE_VALUE",{value:e.message})))}))),f&&o.default.createElement(l.Button,{type:"primary",onClick:f,className:"margin-t8 width-full"},t("VIEW_EVENTS")));return o.default.createElement("span",{className:i.default.reason},o.default.createElement(l.Tooltip,{placement:"right",content:d,positionFixed:!0},o.default.createElement("span",{className:i.default.reasonDesc},o.default.createElement(l.Icon,{name:"information",color:{primary:"#ffffff",secondary:"error"===r?"#ab2f29":"#f5a623"}}),n&&o.default.createElement("span",{className:"error"===r?i.default.error:i.default.warning},t(n)))))},r(5),r(18);var l=r(186),u=n(r(26)),o=n(r(0)),i=n(r(2954))},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(86),a(137),a(9),a(13),a(10),a(4),a(23),a(24),a(17),a(62),a(75),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(86),a(28),a(42),a(137),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(24),a(17),a(62),a(75),a(7);var n,l,u=r(a(30)),o=r(a(36)),i=r(a(37)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(26)),p=a(898),m=a(14),h=a(239),v=a(433),g=a(72);function y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function E(e){for(var t=1;t-1},this.inCluster?{cluster:a}:{cluster:a,workspace:t,project:r}))}}]),a}(p.Component))||l)||l)||l);t.default=_},,,,,function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(11),a(6),a(48),a(9),a(13),a(10),a(24),a(188),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=n(a(315)),u=n(a(30));a(12),a(11),a(6),a(28),a(48),a(34),a(15),a(9),a(13),a(10),a(4),a(24),a(188),a(7);var o=n(a(1324)),i=n(a(873)),c=n(a(63)),s=n(a(189)),f=a(239),d=a(244),p=r(a(0)),m=n(a(3759));function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return t.fetchProjects(v(v({cluster:u},(0,s.default)(t.projects.filters,"nameAndAlias","name")),e))},onChange:function(e){t.setProject(e),f({},!0)}}),showEmpty:h},e))}))));t.default=g},,function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(2348)),l=r(a(2349)),u=r(a(2350));n.default.Item=l.default,n.default.Add=u.default;var o=n.default;t.default=o},function(e,t,a){"use strict";a(15);var r=a(20);a(16),a(4),a(23),a(24),a(17),a(62),Object.defineProperty(t,"__esModule",{value:!0}),t.Component=t.default=void 0,a(45),a(42),a(16),a(4),a(23),a(57),a(24),a(17),a(62);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=a(14),f=a(239),d=a(72),p=a(52),m=r(a(1110)),h=r(a(1635)),v=r(a(1405));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var y=function(e){(0,u.default)(a,e);var t=g(a);function a(e){var r;return(0,n.default)(this,a),(r=t.call(this,e)).eventStore=(0,p.isEdgeWizePage)()?new h.default:new m.default,r}return(0,l.default)(a,[{key:"componentDidMount",value:function(){this.fetchData()}},{key:"fetchData",value:function(){var e=this.store.detail,t=e.uid,a=e.name,r=e.namespace,n=e._originData,l={"involvedObject.name":a,"involvedObject.namespace":r,"involvedObject.kind":(void 0===n?{}:n).kind||this.kind,"involvedObject.uid":t};this.eventStore.fetchList({namespace:r,cluster:this.cluster,fieldSelector:(0,p.joinSelector)(l)})}},{key:"render",value:function(){var e=(0,s.toJS)(this.eventStore.list),t=e.data,a=e.isLoading;return c.default.createElement(v.default,{data:t,loading:a})}},{key:"store",get:function(){return this.props.detailStore}},{key:"cluster",get:function(){return this.props.match.params.cluster}},{key:"module",get:function(){return this.store.module}},{key:"kind",get:function(){return d.MODULE_KIND_MAP[this.module]}}]),a}(c.default.Component),E=(0,f.inject)("detailStore")((0,f.observer)(y));t.default=E;var b=y;t.Component=b},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(109),r(5),r(11),r(6),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var u=l(r(30)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=r(186),p=l(r(3)),m=l(r(996)),h=l(r(839)),v=l(r(26)),g=l(r(189)),y=r(1),E=n(r(0)),b=r(52),_=r(72),O=l(r(2112));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t0),(0,h.default)(E,"spec.redisProxy.replicas",d),(0,h.default)(E,"spec.redisProxy.predixyConfigParams.clusterName",t);var b=K(m);return(0,h.default)(E,"spec.redisProxy.resources.requests",b),(0,h.default)(E,"spec.redisProxy.resources.limits",b),JSON.stringify(E)},a.getRedisClusterRelatedResources=function(e){return Z(g.redisCluster,e)},a.mergeRedisSentinelInstallationData=function(e){var t=e.name,a=e.namespace,r=e.valuesJson,n=(0,f.default)({},q[T.MySQL],(0,p.default)(r,H)),l=n.version,u=n.volume,o=n.volumeType,i=n.nodes,c=n.password,s=K(n.specifications),d=N({},g.redisSentinal.resource);return J(d,{name:t,namespace:a,volume:u,volumeType:o,password:c,cm:s,version:l}),(0,h.default)(d,"spec.clusterSize",i),(0,h.default)(d,"spec.redisReplica.replicas",i),(0,h.default)(d,"spec.kubernetesConfig.image","radondb/redis:v".concat(l)),(0,h.default)(d,"spec.redisReplica.redisConfig.additionalRedisConfig","".concat(t,"-external-config")),(0,h.default)(d,"spec.redisSentinel.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[0].values",[t]),(0,h.default)(d,"spec.redisReplica.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[0].values",[t]),JSON.stringify(d)},a.getRedisSentinelRelatedResources=function(e){return Z(g.redisSentinal,e)},a.mergeMongoDBInstallationData=function(e){var t=e.name,a=e.namespace,r=e.valuesJson,n=(0,f.default)({},q[T.MySQL],(0,p.default)(r,H)),l=n.specifications,u=n.nodes,o=n.volume,i=n.volumeType,c=n.version,s=K(l),d=N({},y.mongoYaml.resources);return(0,h.default)(d,"metadata.name",t),(0,h.default)(d,"metadata.namespace",a),(0,h.default)(d,"spec.members",u),(0,h.default)(d,"spec.version",c),(0,h.default)(d,"spec.statefulSet.spec.template.spec.containers[0].resources.requests",s),(0,h.default)(d,"spec.statefulSet.spec.template.spec.containers[0].resources.limits",s),(0,h.default)(d,"spec.prometheus.passwordSecretRef.name","".concat(t,"-metrics-password")),(0,h.default)(d,"spec.statefulSet.spec.volumeClaimTemplates[0].spec.storageClassName",i),(0,h.default)(d,"spec.statefulSet.spec.volumeClaimTemplates[0].spec.resources.requests.storage",o),(0,h.default)(d,"spec.users[0].passwordSecretRef.name","".concat(t,"-operator-password")),(0,h.default)(d,"spec.users[0].scramCredentialsSecretName","".concat(t,"-operator-password")),(0,h.default)(d,"spec.users[1].passwordSecretRef.name","".concat(t,"-root-password")),(0,h.default)(d,"spec.users[1].scramCredentialsSecretName","".concat(t,"-root-password")),(0,h.default)(d,"spec.statefulSet.spec.template.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[0].values",[t]),JSON.stringify(d)},a.getMongoDBRelatedResources=function(e){var t=e.name,a=e.namespace,r=[],n=y.mongoYaml.masterSecret;(0,h.default)(n,"metadata.name","".concat(t,"-operator-password")),(0,h.default)(n,"metadata.namespace",a),r.push({name:"masterSecret",data:JSON.stringify(n)});var l=y.mongoYaml.rootSecret;return(0,h.default)(l,"metadata.name","".concat(t,"-root-password")),(0,h.default)(l,"metadata.namespace",a),r.push({name:"rootSecret",data:JSON.stringify(l)}),r},a.getSecretCrd=function(e){var t=e.name,a=e.namespace,r={apiVersion:"v1",kind:"Secret",type:"Opaque",metadata:{name:"".concat(t,"-userpassword-secret"),namespace:a}};return JSON.stringify(r)},a.mergePGInstallationData=function(e){var t=e.name,a=e.valuesJson,r=e.namespace,n=e.restoreParams,l=(0,f.default)({},q[T.PostgreSQL],(0,p.default)(a,H)),u=l.specifications,o=l.nodes,i=l.volume,c=l.volumeType,s=l.version,d=K(u),m=JSON.parse(JSON.stringify(b.pgYaml.resources));if((0,h.default)(m,"metadata.name",t),(0,h.default)(m,"metadata.namespace",r),(0,h.default)(m,"spec.postgresql.readwriteinstance.podspec.containers[0].resources",{requests:d,limits:d}),(0,h.default)(m,"spec.autofailover.volumeClaimTemplates[0].spec.storageClassName",c),(0,h.default)(m,"spec.postgresql.readwriteinstance.volumeClaimTemplates[0].spec.storageClassName",c),(0,h.default)(m,"spec.postgresql.readwriteinstance.volumeClaimTemplates[0].spec.resources.requests.storage",i),(0,h.default)(m,"spec.postgresql.readwriteinstance.replicas",o),(0,h.default)(m,"spec.autofailover.podspec.containers[0].image","".concat(A[s],"-v1.2.0")),(0,h.default)(m,"spec.postgresql.readwriteinstance.podspec.containers[0].image","".concat(A[s],"-v1.2.0")),(0,h.default)(m,"spec.postgresql.readonlyinstance.podspec.containers[0].image","".concat(A[s],"-v1.2.0")),(0,h.default)(m,"spec.deletes3",!0),n){var v=n.backupId,g=n.S3,y=n.backupToS3Name;(0,h.default)(m,"spec.restore.froms3.recovery",v),(0,h.default)(m,"spec.restore.froms3.name",y),(0,h.default)(m,"spec.S3",g)}return JSON.stringify(m)},a.mergeECKInstallationData=function(e){var t=e.name,a=e.valuesJson,r=e.namespace,n=(0,f.default)({},q[T.Elasticsearch],(0,p.default)(a,H)),l=JSON.parse(JSON.stringify(O.eckYaml.resources));(0,h.default)(l,"metadata.name",t),(0,h.default)(l,"metadata.namespace",r);var u=(0,m.default)(l,"spec.nodeSets"),i=Object.entries(n).map((function(e){var t=(0,o.default)(e,2),a=t[0],r=t[1],n=r.nodes,l=r.specifications,i=r.volume,c=r.volumeType,s=u.find((function(e){return e.name===a}));if(s){var f=K(l),d=(0,m.default)(s,"name");(0,h.default)(s,"name","".concat(d,"-").concat(i.toLowerCase())),(0,h.default)(s,"count",n),(0,h.default)(s,"podTemplate.spec.containers[0].resources",{limits:f,requests:f}),(0,h.default)(s,"podTemplate.spec.containers[0].env[0].value","-Xms".concat(parseInt(f.memory,10)/2,"g -Xmx").concat(parseInt(f.memory,10)/2,"g")),(0,h.default)(s,"volumeClaimTemplates[0].spec.resources.requests.storage",i),(0,h.default)(s,"volumeClaimTemplates[0].spec.storageClassName",c)}return s})).filter((function(e){return e&&e.count>0}));return(0,h.default)(l,"spec.nodeSets",i),JSON.stringify(l)},a.getECKRelatedResources=function(e){var t=e.name,a=e.kibanaValues,r=e.namespace,n=a.nodes,l=a.specifications,u=JSON.parse(JSON.stringify(O.eckYaml.kibana)),o=K(l);return(0,h.default)(u,"metadata.name",t),(0,h.default)(u,"metadata.namespace",r),(0,h.default)(u,"spec.count",n),(0,h.default)(u,"spec.elasticsearchRef.name",t),(0,h.default)(u,"spec.elasticsearchRef.namespace",r),(0,h.default)(u,"spec.podTemplate.spec.containers[0].resources.requests",o),(0,h.default)(u,"spec.podTemplate.spec.containers[0].resources.limits",o),[{name:"kibana",data:JSON.stringify(u)}]},a.mergeKafkaInstallationData=function(e){var t=e.name,a=e.valuesJson,r=e.namespace,n=(0,f.default)({},q[T.Kafka],(0,p.default)(a,H)),l=JSON.parse(JSON.stringify(S.kafkaYaml.resources));(0,h.default)(l,"metadata.name",t),(0,h.default)(l,"metadata.namespace",r);var u=n.kafka,o=n.zookeeper,i=K(u.specifications);(0,h.default)(l,"spec.kafka.version",u.version),(0,h.default)(l,"spec.kafka.replicas",u.nodes),(0,h.default)(l,"spec.kafka.resources.requests",i),(0,h.default)(l,"spec.kafka.resources.limits",i),(0,h.default)(l,"spec.kafka.storage.volumes[0]",{id:0,type:"persistent-claim",class:u.volumeType,size:u.volume,deleteClaim:!0}),(0,h.default)(l,"spec.kafka.metricsConfig.valueFrom.configMapKeyRef.name","".concat(t,"-kafka-metrics"));var c=K(o.specifications);return(0,h.default)(l,"spec.zookeeper.replicas",o.nodes),(0,h.default)(l,"spec.zookeeper.resources.requests",c),(0,h.default)(l,"spec.zookeeper.resources.limits",c),(0,h.default)(l,"spec.zookeeper.storage",{type:"persistent-claim",class:o.volumeType,size:o.volume,deleteClaim:!0}),(0,h.default)(l,"spec.zookeeper.metricsConfig.valueFrom.configMapKeyRef.name","".concat(t,"-kafka-metrics")),JSON.stringify(l)},a.getKafkaRelatedResources=function(e){var t=e.namespace,a=e.name,r=JSON.parse(JSON.stringify(S.kafkaYaml.configMap));(0,h.default)(r,"metadata.name","".concat(a,"-kafka-metrics")),(0,h.default)(r,"metadata.namespace",t);var n=JSON.parse(JSON.stringify(S.kafkaYaml.podMonitor));return(0,h.default)(n,"metadata.name","".concat(a,"-kafka-resources-metrics")),(0,h.default)(n,"metadata.namespace",t),(0,h.default)(n,"spec.namespaceSelector.matchNames",[t]),[{name:"configMap",data:JSON.stringify(r)},{name:"podMonitor",data:JSON.stringify(n)}]},a.mergeOpenSearchInstallationData=function(e){var t=e.name,a=e.valuesJson,r=e.namespace,n=(0,f.default)({},q[T.OpenSearch],(0,p.default)(a,H)),u=n.version,i=(n.password,n.username,n.logstash,n.dashboard),c=(0,l.default)(n,["version","password","username","logstash","dashboard"]),s=JSON.parse(JSON.stringify(C.opensearchYaml.resources));(0,h.default)(s,"metadata.name",t),(0,h.default)(s,"metadata.namespace",r),(0,h.default)(s,"spec.general.serviceName",t),(0,h.default)(s,"spec.general.version",u),(0,h.default)(s,"spec.dashboards.version",u),"2.8.0"===u&&(0,h.default)(s,'spec.general.additionalConfig["prometheus.indices"]',"false");(0,h.default)(s,"spec.dashboards.enable",i.nodes>0),(0,h.default)(s,"spec.dashboards.replicas",i.nodes),(0,h.default)(s,"spec.security.config.securityConfigSecret.name","".concat(t,"-securityconfig-secret")),(0,h.default)(s,"spec.security.config.adminCredentialsSecret.name","".concat(t,"-admin-secret"));var d=K(i.specifications);(0,h.default)(s,"spec.dashboards.resources",{limits:d,requests:d});var v=(0,m.default)(s,"spec.nodePools"),g=Object.entries(c).map((function(e){var t=(0,o.default)(e,2),a=t[0],r=t[1],n=r.nodes,l=r.specifications,u=r.volume,i=r.volumeType,c=v.find((function(e){return(0,m.default)(e,'additionalConfig["node.attr.datatier"]')===a}));c||(c=JSON.parse(JSON.stringify(C.opensearchYaml.node)),(0,h.default)(c,'additionalConfig["node.attr.datatier"]',a),(0,h.default)(c,"component","data-node-".concat(a)));var s=K(l);return(0,h.default)(c,"replicas",n),(0,h.default)(c,"resources",{limits:s,requests:s}),(0,h.default)(c,"diskSize",u),(0,h.default)(c,"persistence.pvc.storageClass",i),c})).filter((function(e){return e&&e.replicas>0}));return(0,h.default)(s,"spec.nodePools",g),JSON.stringify(s)},a.getOpenSearchRelatedResources=function(e){var t=e.name,a=e.logstashValues,r=e.namespace,n=e.username,l=e.password,u=a.nodes,o=a.specifications,i=JSON.parse(JSON.stringify(C.opensearchYaml.logstash)),c=K(o);(0,h.default)(i,"metadata.name",t),(0,h.default)(i,"metadata.namespace",r),(0,h.default)(i,"spec.replicas",u);var s=parseInt(c.memory,10)/2;(0,h.default)(i,"spec.config.jvm","-Xms".concat(s,"g -Xmx").concat(s,"g")),(0,h.default)(i,"spec.config.openSearchInfo.openSearchCluster.name",t),(0,h.default)(i,"spec.config.openSearchInfo.openSearchCluster.namespace",r),(0,h.default)(i,"spec.config.openSearchInfo.openSearchService.name",t),(0,h.default)(i,"spec.podTemplate.spec.containers[0].resources.requests",c),(0,h.default)(i,"spec.podTemplate.spec.containers[0].resources.limits",c);var f=JSON.parse(JSON.stringify(C.opensearchYaml.logstashSecret));(0,h.default)(f,"metadata.name","".concat(t,"-logstash-password")),(0,h.default)(f,"metadata.namespace",r);var d=JSON.parse(JSON.stringify(C.opensearchYaml.adminSecret));(0,h.default)(d,"metadata.name","".concat(t,"-admin-secret")),(0,h.default)(d,"metadata.namespace",r),(0,h.default)(d,"data.username",(0,v.safeBtoa)(n||"admin")),(0,h.default)(d,"data.password",(0,v.safeBtoa)(l||"RadonDB@123"));var p=JSON.parse(JSON.stringify(C.opensearchYaml.securityConfigSecret));return(0,h.default)(p,"metadata.name","".concat(t,"-securityconfig-secret")),(0,h.default)(p,"metadata.namespace",r),[{name:"logstash",data:JSON.stringify(i)},{name:"logstashSecret",data:JSON.stringify(f)},{name:"adminSecret",data:JSON.stringify(d)},{name:"securityConfigSecret",data:JSON.stringify(p)}]},a.ValuesJSON=a.ValuesSchema=a.SpecificationOptionsObject=a.getNodeRoleOptions=a.SpecificationsOptions=a.PGImage=a.RedisImage=a.MySQLOptsImage=a.MySQLSidecarImage=a.RadonDBAppIds=a.RadonDBAppId=void 0;var l=n(r(58)),u=n(r(30)),o=n(r(96));r(12),r(109),r(5),r(11),r(31),r(6),r(18),r(28),r(48),r(191),r(16),r(159),r(27),r(1537),r(931),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(316),r(436),r(319),r(24),r(193),r(64),r(7);var i,c,s,f=n(r(902)),d=n(r(63)),p=n(r(334)),m=n(r(26)),h=n(r(74)),v=r(440),g=r(2276),y=r(2277),E=r(2278),b=r(2279),_=r(2280),O=r(1539),S=r(1093),C=r(1540),D=r(1295);function k(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function N(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=a.app_id,n=a.max,l=a.nodeRole,u=a.oldStorage,o=parseFloat(e);if(!Number.isInteger(o))return{error:!0,message:t("VALUE_MUST_BE_INTEGER")};if(n&&o>n)return{error:!0,message:t("VALUE_CANNOT_BE_GREATER_THAN_VALUE",{max:n})};switch(r){case T.Elasticsearch:if(Number.isNaN(o)||o<20)return{error:!0,message:t("VALUE_CANNOT_BE_LESS_THAN_20")};break;case T.Kafka:if(u&&o",value:">"},{label:">=",value:">="},{label:"<",value:"<"},{label:"<=",value:"<="}];t.SEVERITY_LEVEL=[{type:"critical",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#ca2621"},label:"CRITICAL_ALERT",value:"critical"},{type:"error",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#f5a623"},label:"ERROR_ALERT",value:"error"},{className:"tag-ffd939",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#FFD939"},label:"WARNING_ALERT",value:"warning"},{type:"secondary",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#79879c"},label:"INFO_ALERT",value:"info"}];var i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.condition,a=void 0===t?{}:t,r=e.thresholds,n=void 0===r?{}:r;return[u({name:"condition_type",options:o},a),u({type:"number",name:"thresholds",placeholder:"THRESHOLD"},n)]};t.getBaseRuleConfig=i;var c=i({thresholds:{min:0}});t.BASE_RULE_CONFIG=c;var s=i({thresholds:{min:0,max:100,unit:"%",converter:function(e){return e/100}}});t.PERCENT_RULE_CONFIG=s;var f=i({thresholds:{unit:"core",min:0}});t.CPU_RULE_CONFIG=f;var d=i({thresholds:{unit:"Mi",min:0,converter:function(e){return e*Math.pow(1024,2)}}});t.MEMORY_RULE_CONFIG=d;var p=i({thresholds:{unit:"GB",min:0,converter:function(e){return e*Math.pow(1e3,3)}}});t.DISK_RULE_CONFIG=p;var m=i({thresholds:{unit:"KB/s",min:0,converter:function(e){return 1e3*e}}});t.THROUGHPUT_RULE_CONFIG=m;var h=i({thresholds:{unit:"Mbps",min:0,converter:function(e){return e*(Math.pow(1024,2)/8)}}});t.BANDWIDTH_RULE_CONFIG=h},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=r(a(3)),d=a(186),p=r(a(2506));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var h=function(e){(0,u.default)(a,e);var t=m(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"render",value:function(){var e=this.props,t=e.image,a=e.icon,r=e.title,n=e.desc,l=e.actions,u=e.className;return c.default.createElement("div",{className:(0,f.default)(p.default.wrapper,u)},c.default.createElement("div",{className:p.default.image},t?c.default.createElement("img",{src:t,alt:""}):c.default.createElement(d.Icon,{name:a,size:48})),c.default.createElement("div",{className:p.default.title},r),c.default.createElement("p",{className:p.default.desc},n),l&&c.default.createElement("div",{className:p.default.actions},l))}}]),a}(c.default.PureComponent);t.default=h,h.propTypes={icon:s.default.string,title:s.default.string,desc:s.default.oneOfType([s.default.string,s.default.element]),actions:s.default.oneOfType([s.default.node,s.default.element])},h.defaultProps={icon:"appcenter"}},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(24),a(17),a(188),a(136),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(24),a(17),a(188),a(7);var n=r(a(61)),l=r(a(30)),u=r(a(58)),o=r(a(43));a(41);var i,c,s,f,d=r(a(44)),p=r(a(65)),m=r(a(36)),h=r(a(37)),v=r(a(88)),g=r(a(55)),y=r(a(56)),E=r(a(51)),b=r(a(49)),_=(r(a(66)),r(a(26))),O=r(a(63)),S=r(a(189)),C=r(a(74)),D=r(a(894)),k=r(a(454)),N=a(14),T=a(72),R=r(a(105)),w=a(244),I=r(a(68)),M=r(a(120));function P(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r=e.workspace,n="";return t&&(n+="/klusters/".concat(t)),r&&!a&&(n+="/workspaces/".concat(r)),a&&(n+="/namespaces/".concat(a)),n}},{key:"isNotClusterGateway",value:function(e){return e&&"kubesphere-controls-system"!==e}},{key:"getGatewayAppVersions",value:(z=(0,d.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r="".concat(a?"/clusters/".concat(a):"","/").concat(this.apiVersion,"/appversions"),e.next=4,this.submitting(request.get(r));case 4:return n=e.sent,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return z.apply(this,arguments)})},{key:"getHelmChart",value:(U=(0,d.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.appversion,n="".concat(a?"/clusters/".concat(a):"","/").concat(this.apiVersion,"/appversions/").concat(r,"/values"),e.abrupt("return",this.submitting(request.get(n)));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return U.apply(this,arguments)})},{key:"getGateway",value:(x=(0,d.default)(o.default.mark((function e(t){var a,r,n,l,i,c,s,f,d,p,m;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,n=t.workspace,l=t.type,i=(0,u.default)(t,["cluster","namespace","workspace","type"]),this.gateway.isLoading=!0,c=this.getListUrl({cluster:a,workspace:n,namespace:r}),s=A({labelSelector:"kubesphere.io/gateway-type=".concat(l)},i),e.next=6,request.get(c,s);case 6:return f=e.sent,d=(0,_.default)(f,"items[0]",null),p={},(0,O.default)(d)||(p=R.default.gateway(d),!0===(null===(m=p)||void 0===m?void 0:m.isDeleteLoading)&&(p={})),this.detail=p,this.gateway.data=p,this.gateway.isLoading=!1,e.abrupt("return",p);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return x.apply(this,arguments)})},{key:"getGatewayReplica",value:(L=(0,d.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="".concat(this.gatewayPodsUrl(t),"/pods"),e.next=3,this.submitting(request.get(a));case 3:return r=e.sent,n=[],r&&r.totalItems>0&&(n=r.items.map((function(e){return R.default.pods(e)}))),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"getGatewayByProject",value:(P=(0,d.default)(o.default.mark((function e(t){var a,r,n,l,i,c,s,f,d,p;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cluster,n=t.workspace,l=t.namespace,i=(0,u.default)(t,["cluster","workspace","namespace"]),this.gateway.isLoading=!0,c=this.getListUrl({cluster:r,workspace:n,namespace:l}),e.next=5,request.get(c,i);case 5:return s=e.sent,f=(0,_.default)(s,"items",[]),d=null===(a=(0,D.default)(f,(function(e){return R.default.gateway(e)})))||void 0===a?void 0:a.filter((function(e){return!e.isDeleteLoading})),p=(0,k.default)(d,(function(e){return"project"===e.gatewayType})),this.detail=p,this.gateway.data=p,this.gateway.isLoading=!1,e.abrupt("return",d);case 13:case"end":return e.stop()}}),e,this)}))),function(e){return P.apply(this,arguments)})},{key:"getNewGatewayByProject",value:(M=(0,d.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.gateway.isLoading=!0,a=this.gatIngressUrl(t),e.next=4,request.get(a,null,null,(function(){}));case 4:return r=e.sent,n=(0,D.default)(r,(function(e){return R.default.ingressClassScopes(e)})),this.gateway.isLoading=!1,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:"getGatewayByWorkspace",value:(I=(0,d.default)(o.default.mark((function e(t){var a,r,n,l,u,i,c,s,f,d;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cluster,n=t.workspace,l=t.type,this.gateway.isLoading=!0,u=this.getListUrl({cluster:r,workspace:n}),i={labelSelector:"kubesphere.io/gateway-type=".concat(l),includeUpper:!0},e.next=6,request.get(u,i);case 6:return c=e.sent,s=(0,_.default)(c,"items",[]),f=null===(a=(0,D.default)(s,(function(e){return R.default.gateway(e)})))||void 0===a?void 0:a.filter((function(e){return!e.isDeleteLoading})),d=(0,k.default)(f,(function(e){return"workspace"===e.gatewayType})),this.detail=d,this.gateway.data=d,this.gateway.isLoading=!1,e.abrupt("return",f);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"addGateway",value:(b=(0,d.default)(o.default.mark((function e(t,a){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.submitting(request.post(this.getListUrl(t),a)));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"editGateway",value:(E=(0,d.default)(o.default.mark((function e(t,a){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.submitting(request.put(this.getDetailUrl(t),a)));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"deleteGateway",value:(y=(0,d.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.cluster,r=t.namespace,n=t.workspace,!t.isOld){e.next=3;break}return e.abrupt("return",this.submitting(request.delete(this.getOldGatewayUrl({cluster:a,namespace:r}))));case 3:return e.abrupt("return",this.submitting(request.delete(this.gatewayeditUrl({cluster:a,namespace:r,workspace:n}))));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"updateGateway",value:(i=(0,d.default)(o.default.mark((function e(t,a){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat(this.gatewayeditUrl(t),"/upgrade"),e.abrupt("return",this.submitting(request.post(r,a)));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getGatewayLogs",value:(l=(0,d.default)(o.default.mark((function e(t){var a,r,n,l,i,c,s;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,n=t.gatewayName,t.component,l=t.workspace,i=(0,u.default)(t,["cluster","namespace","gatewayName","component","workspace"]),this.logs.isLoading=!0,e.next=4,request.get("".concat(this.gatewayPodsUrl({cluster:a,namespace:r,gatewayName:n,workspace:l}),"/logs"),A(A({},i),{},{start_time:i.start_time?Math.floor(i.start_time/1e3):void 0,end_time:i.end_time?Math.floor(i.end_time/1e3):void 0,container_query:"controller",cluster:a}),{},(function(){return[]}));case 4:return c=e.sent,s=(0,_.default)(c,"query.records")||[],this.logs=A(A({data:s,total:(0,_.default)(c,"query.total")||s.length||0},i),{},{size:Number(i.size)||10,from:Number(i.from)||0,isLoading:!1}),e.abrupt("return",s);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"exportLinkFactory",value:function(e){var t=e.cluster,a=e.namespace,r=e.gatewayName,n=e.workspace,l=e.start_time,o=e.end_time,i=(0,u.default)(e,["cluster","namespace","gatewayName","workspace","start_time","end_time"]),c="".concat(this.gatewayPodsUrl({cluster:t,namespace:a,gatewayName:r,workspace:n}),"/logs");return"/".concat(c,"?").concat((0,w.stringify)(A(A({sort:"asc"},i),{},{start_time:Math.floor(l/1e3),end_time:Math.floor(o/1e3),operation:"export",cluster:t})))}},{key:"getGatewayPods",value:(r=(0,d.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="".concat(this.gatewayPodsUrl(t),"/pods"),e.next=3,this.submitting(request.get(a,{limit:10,sortBy:"createTime"}));case 3:return r=e.sent,n=[],r&&r.totalItems>0&&(n=r.items.map((function(e){return R.default.pods(e)}))),this.gateway.data.pods=n,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getGatewayPodsList",value:(a=(0,d.default)(o.default.mark((function e(t){var a,r,l,i,c,s,f,d,p;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,t.name,r=t.gatewayName,l=t.namespace,i=t.workspace,c=t.more,t.component,s=t.search,f=(0,u.default)(t,["cluster","name","gatewayName","namespace","workspace","more","component","search"]),this.podList.isLoading=!0,f.sortBy||void 0!==f.ascending||(f.sortBy=T.LIST_DEFAULT_ORDER[this.module]||"createTime"),f.limit!==1/0&&-1!==f.limit||(f.limit=-1,f.page=1),f.limit=f.limit||10,e.next=7,request.get("".concat(this.gatewayPodsUrl({cluster:a,namespace:l,gatewayName:r,workspace:i}),"/pods"),A(A({},f),{},{name:s}),{},(function(){return[]}));case 7:return d=e.sent,p=((0,_.default)(d,"items")||[]).map((function(e){return A({cluster:a,namespace:e.metadata.name.split("kubesphere-router-")[1]},R.default.pods(e))})),this.podList.update(A(A({data:c?[].concat((0,n.default)(this.podList.data),(0,n.default)(p)):p,total:d.totalItems||d.total_count||p.length||0},f),{},{limit:Number(f.limit)||10,page:Number(f.page)||1,isLoading:!1},this.podList.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",[]);case 11:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"scale",value:function(e,t){var a=(0,N.toJS)(this.gateway.data._originData);return(0,C.default)(a,"spec.values.controller.replicaCount",t),(0,C.default)(a,"metadata.resourceVersion",this.gateway.data.resourceVersion),this.editGateway(e,a)}},{key:"fetchList",value:(t=(0,d.default)(o.default.mark((function e(t){var a,r,l,i,c,s,f,d,p,m;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cluster,l=t.namespace,i=t.workspace,c=t.more,t.component,s=t.type,f=(0,u.default)(t,["cluster","namespace","workspace","more","component","type"]),this.list.isLoading=!0,f.sortBy||void 0!==f.ascending||(f.sortBy=T.LIST_DEFAULT_ORDER[this.module]||"createTime"),f.limit!==1/0&&-1!==f.limit||(f.limit=-1,f.page=1),f.limit=f.limit||10,e.next=7,request.get("".concat(this.apiVersion).concat(this.getPath({cluster:r,workspace:i,namespace:l}),"/").concat("workspace"===s?"projectgateways":"gateways"),A({},f),{},(function(){return[]}));case 7:return d=e.sent,p=null===(a=((0,_.default)(d,"items")||[]).map((function(e){return A({cluster:r,namespace:e.metadata.name.split("kubesphere-router-")[1]},R.default.gateway(e))})))||void 0===a?void 0:a.filter((function(e){return!e.isDeleteLoading})),m=(0,S.default)(f,"labelSelector"),this.list.update(A(A({data:c?[].concat((0,n.default)(this.list.data),(0,n.default)(p)):p,total:d.totalItems||d.total_count||p.length||0},m),{},{limit:Number(f.limit)||10,page:Number(f.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",[]);case 12:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),G}(I.default),c=(0,b.default)(i.prototype,"gateway",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:{},isLoading:!0}}}),s=(0,b.default)(i.prototype,"podList",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new M.default}}),f=(0,b.default)(i.prototype,"logs",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new M.default}}),(0,b.default)(i.prototype,"getGatewayAppVersions",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayAppVersions"),i.prototype),(0,b.default)(i.prototype,"getHelmChart",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getHelmChart"),i.prototype),(0,b.default)(i.prototype,"getGateway",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGateway"),i.prototype),(0,b.default)(i.prototype,"getGatewayReplica",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayReplica"),i.prototype),(0,b.default)(i.prototype,"getGatewayByProject",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayByProject"),i.prototype),(0,b.default)(i.prototype,"getNewGatewayByProject",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getNewGatewayByProject"),i.prototype),(0,b.default)(i.prototype,"getGatewayByWorkspace",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayByWorkspace"),i.prototype),(0,b.default)(i.prototype,"addGateway",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"addGateway"),i.prototype),(0,b.default)(i.prototype,"editGateway",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"editGateway"),i.prototype),(0,b.default)(i.prototype,"deleteGateway",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"deleteGateway"),i.prototype),(0,b.default)(i.prototype,"updateGateway",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"updateGateway"),i.prototype),(0,b.default)(i.prototype,"getGatewayLogs",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayLogs"),i.prototype),(0,b.default)(i.prototype,"getGatewayPods",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayPods"),i.prototype),(0,b.default)(i.prototype,"getGatewayPodsList",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"getGatewayPodsList"),i.prototype),(0,b.default)(i.prototype,"scale",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"scale"),i.prototype),(0,b.default)(i.prototype,"fetchList",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),i);t.default=L},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(84),a(4),a(23),a(17),a(85),a(75),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(84),a(42),a(4),a(23),a(57),a(17),a(85),a(75),a(1079);var n=r(a(315)),l=r(a(58)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=r(a(1)),p=r(a(3)),m=r(a(2040));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var v=function(e){(0,i.default)(a,e);var t=h(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l12?g:12,"px"),f.default.createElement("span",(0,n.default)({className:(0,p.default)(m.default.letter,u),style:h},c),v)}return null}return f.default.createElement("img",(0,n.default)({src:d,"data-origin-url":d,className:(0,p.default)(m.default.img,u),ref:function(t){e.img=t}},c))}}]),a}(f.default.Component);t.default=v,v.propTypes={className:d.default.string,iconLetter:d.default.string,iconSize:d.default.number,isBase64Str:d.default.bool,src:d.default.string},v.defaultProps={iconSize:32,src:"",iconLetter:"",isBase64Str:!1}},,,function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var l=n(a(30)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51)),f=r(a(0)),d=n(a(1)),p=n(a(3)),m=n(a(2111));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var v=function(e){(0,i.default)(a,e);var t=h(a);function a(){return(0,u.default)(this,a),t.apply(this,arguments)}return(0,o.default)(a,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.type,r=e.flicker;return f.default.createElement("i",{className:(0,p.default)(m.default.icon,m.default[a.toLowerCase()],(0,l.default)({},m.default.flicker,r),t)})}}]),a}(f.PureComponent);t.default=v,v.propTypes={className:d.default.string,type:d.default.string,flicker:d.default.bool},v.defaultProps={type:"Running",flicker:!1}},,function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(4),a(22),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=n(a(315)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51));a(45),a(29),a(42),a(4),a(22),a(23),a(57),a(17),a(38),a(32);var f=r(a(0)),d=n(a(1)),p=n(a(3)),m=a(186),h=n(a(2053));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=(0,f.lazy)((function(){return Promise.all([a.e(0),a.e(13)]).then(a.t.bind(null,5287,7))})),y=function(e){(0,i.default)(a,e);var t=v(a);function a(){return(0,u.default)(this,a),t.apply(this,arguments)}return(0,o.default)(a,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.mode,r=e.options,n=e.value,u=e.onChange;return f.default.createElement(f.Suspense,{fallback:f.default.createElement(m.Loading,{className:"ks-page-loading"})},f.default.createElement(g,(0,l.default)({},r,{className:(0,p.default)(h.default.editor,t),value:n,mode:a,onChange:u})))}}]),a}(f.PureComponent);y.propTypes={value:d.default.oneOfType([d.default.string,d.default.object,d.default.arrayOf(d.default.string),d.default.arrayOf(d.default.object)]),mode:d.default.string,options:d.default.object,onChange:d.default.func},y.defaultProps={value:"",mode:"yaml",options:{},onChange:function(){}};var E=y;t.default=E},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(187),r(11),r(6),r(18),r(87),r(97),r(9),r(13),r(10),r(4),r(23),r(139),r(24),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(187),r(11),r(6),r(18),r(28),r(87),r(97),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(139),r(251),r(24),r(252),r(193),r(17),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(61)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=r(186),m=n(r(3)),h=n(r(198)),v=n(r(63)),g=n(r(1)),y=n(r(0)),E=n(r(1479)),b=n(r(2061));function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;t=u?null:y.default.createElement("div",{className:"text-right"},y.default.createElement(p.Button,{className:E.default.add,onClick:this.handleAdd,disabled:!this.isAddEnable()},r)))}}],[{key:"getValues",value:function(e){var t=e.value||{},a=[],r=[],n=[];return Object.keys(t).forEach((function(l){e.hiddenKeys.some((function(e){return new RegExp(e).test(l)}))?a.push({key:l,value:t[l]}):e.readOnlyKeys.some((function(e){return new RegExp(e).test(l)}))?r.push({key:l,value:t[l]}):n.push({key:l,value:t[l]})})),(0,v.default)(n)&&(0,v.default)(r)&&n.push({key:""}),{hiddenValues:a,readOnlyValues:r,arrayValues:n}}}]),r}(y.default.Component);a.default=C,C.propTypes={name:g.default.string,value:g.default.object,hiddenKeys:g.default.arrayOf(g.default.string),readOnlyKeys:g.default.arrayOf(g.default.string),controlled:g.default.bool,onChange:g.default.func,onError:g.default.func,maxLen:g.default.number},C.defaultProps={name:"",value:{},hiddenKeys:[],readOnlyKeys:[],controlled:!1,onChange:function(){}}},,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(31),a(6),a(29),a(73),a(48),a(137),a(9),a(13),a(10),a(4),a(316),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.getTimeRange=t.getMinuteValue=void 0;var n=r(a(43));a(41);var l=r(a(44)),u=r(a(61)),o=r(a(30)),i=r(a(58)),c=r(a(65)),s=r(a(36)),f=r(a(37)),d=r(a(49));r(a(66));a(12),a(5),a(11),a(31),a(6),a(29),a(73),a(28),a(48),a(442),a(137),a(34),a(15),a(9),a(13),a(10),a(4),a(316),a(436),a(22),a(7),a(32);var p,m,h,v,g,y=a(14),E=r(a(63)),b=r(a(60)),_=r(a(26)),O=r(a(74)),S=a(52),C=a(794);function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"60s",t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=e.slice(-1),r=parseFloat(e);switch(a){default:case"s":break;case"m":r*=60;break;case"h":r*=3600;break;case"d":r=24*r*60*60}return t?"".concat(r,"s"):r};t.getMinuteValue=N;var T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.step,a=void 0===t?"600s":t,r=e.times,n=void 0===r?20:r,l=parseFloat(a)*n,u=Math.floor(Date.now()/1e3),o=Math.floor(u-l);return{start:o,end:u}};t.getTimeRange=T;var R=(p=function(){function e(){var t=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.default)(this,e),(0,c.default)(this,"isLoading",m,this),(0,c.default)(this,"isRefreshing",h,this),(0,c.default)(this,"etcdChecking",v,this),(0,c.default)(this,"supportETCD",g,this),this.isConfirmSupportETCD=!1,this.data={},this.resourceName="resource_name",this.getApi=function(e){var a=e.namespace,r=e.workspace,n=e.component,l=e.module,u=e.container,o=e.nodeName,i=e.persistentvolumeclaim,c=e.pvc,s=e.pod,f=e.workload;return n||l?"".concat(t.apiVersion,"/component_metrics"):s?"".concat(t.apiVersion,"/pod_metrics"):u?"".concat(t.apiVersion,"/container_metrics"):o?"".concat(t.apiVersion,"/node_metrics"):i||c?"".concat(t.apiVersion,"/persistentvolumeclaim_metrics"):f?"".concat(t.apiVersion,"/workload_metrics"):a?"".concat(t.apiVersion,"/namespace_metrics"):r?"".concat(t.apiVersion,"/workspace_metrics"):globals.app.isMultiCluster&&t.cluster?"".concat(t.apiVersion,"/cluster_metrics"):t.apiVersion},this.getParams=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=e.start,r=e.end,n=e.step,l=void 0===n?"600s":n,u=e.times,o=void 0===u?20:u,c=e.resources,s=void 0===c?[]:c,f=e.metrics,d=void 0===f?[]:f,p=e.cluster_resources_filter,m=void 0===p?t.cluster_resources_filter:p,h=e.last,v=void 0!==h&&h,g=e.pvcName,y=e.nodeName,b=e.module,_=(0,i.default)(e,["start","end","step","times","resources","metrics","cluster_resources_filter","last","pvcName","nodeName","module"]),O=k({},_);if((b||t.module)&&(O.component=b||t.module,delete O.module),g&&(O.pvc=g),y&&(O.node=y),t.cluster&&(O.cluster=t.cluster),!v&&(Object.assign(O,{start:a,end:r,step:N(l),times:o}),!a||!r)){var S=T(O);O.start=S.start,O.end=S.end}return O.start&&(O.start=Math.floor(O.start)),O.end&&(O.end=Math.floor(O.end)),(0,E.default)(s)||(O.resources_filter="".concat(s.join("|"))),(0,E.default)(m)||(O.cluster_resources_filter="".concat(m.join("|"))),(0,E.default)(d)||(O.metrics_filter="".concat(d.join("|"))),t.handleParams(O)},this.handleParams=function(e){return e},this.getResult=function(e){var t={},a=(0,b.default)(e)?e:(0,_.default)(e,"results",[])||[];if((0,E.default)(a)){var r=(0,_.default)(e,"metric_name");r&&(t[r]=e)}else a.forEach((function(e,a){t[e.metric_name||a+1]=e,e.metric_name=e.metric_name||a+1}));return t},this.getNewValues=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=(0,E.default)(e)?[]:(0,u.default)(e),r=t||[];return(0,E.default)(r)||(a.length>10&&a.shift(),a.push(r)),a},this.getNewRefreshedResult=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=(0,u.default)(a);return e.forEach((function(e,a){var n=(0,_.default)(e,"metric.".concat(t.resourceName)),l=null;if(n){var u=r.find((function(e){return(0,_.default)(e,"metric.".concat(t.resourceName))===n}));(0,E.default)(u)?r.push(e):l=u}else l=r[a];if(!(0,E.default)(l)){var o=t.getNewValues(l.values,e.value);(0,O.default)(l,"values",o)}})),r},this.getRefreshResult=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,y.toJS)(a);return(0,E.default)(r)?e:(Object.values(e).forEach((function(e){var a=(0,_.default)(e,"metric_name"),n=r[a];if(n){var l=(0,_.default)(e,"data.result")||[],u=(0,_.default)(n,"data.result",(0,_.default)(n,"data.results"))||[];(0,O.default)(n,"data.result",t.getNewRefreshedResult(l,u))}})),r)},this.getMoreResult=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=(0,y.toJS)(t);return(0,E.default)(a)?e:(Object.values(e).forEach((function(e){var t=(0,_.default)(e,"metric_name"),r=a[t];if(r){var n=(0,_.default)(r,"data.result",(0,_.default)(r,"data.results"))||[],l=(0,_.default)(e,"data.result")||[],o=[].concat((0,u.default)(n),(0,u.default)(l));(0,O.default)(r,"data.result",o)}})),a)},this.checkEtcd=function(){t.etcdChecking=!0,t.supportETCD=globals.app.hasMonitoringExtensionExtraModule("enable-etcd-monitoring"),t.etcdChecking=!1},this.getStatisticUrl=function(e){var t=e.cluster,a=e.namespace,r=e.workspace,n=t?"/klusters/".concat(t):"",l=a?"/namespaces/".concat(a):"",u=r?"/workspaces/".concat(r):"",o="/resources.kubesphere.io/v1alpha3";return t||(o="/tenant.kubesphere.io/v1beta1"),"/kapis".concat(o).concat(n).concat(l).concat(u,"/metrics")},Object.keys(a).forEach((function(e){return(0,O.default)(t,e,a[e])}))}var t,a;return(0,f.default)(e,[{key:"fetchMetrics",value:(a=(0,l.default)(n.default.mark((function e(t){var a,r,l,u,o,c,s,f,d,p,m;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.autoRefresh,r=void 0!==a&&a,l=t.more,u=void 0!==l&&l,o=t.fillZero,c=void 0===o||o,s=(0,i.default)(t,["autoRefresh","more","fillZero"]),r?(s.last=!0,this.isRefreshing=!0):this.isLoading=!0,s.cluster&&(this.cluster=s.cluster),this.cluster&&(s.cluster=this.cluster),f=this.getParams(s),d=this.getApi(s),e.next=8,(0,S.to)(request.get(d,f));case 8:return p=e.sent,m=this.getResult(p),r&&(m=this.getRefreshResult(m,this.data)),u&&(m=this.getMoreResult(m,this.data)),this.data=c?(0,C.fillEmptyMetrics)(f,m):m,this.isLoading=!1,this.isRefreshing=!1,e.abrupt("return",m);case 16:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchStatisticsQuery",value:(t=(0,l.default)(n.default.mark((function e(t){var a,r,l,u,o,i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,l=t.workspace,u=this.getStatisticUrl({cluster:a,namespace:r,workspace:l}),e.next=4,(0,S.to)(request.get(u));case 4:return o=e.sent,i=this.getResult(o),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"kapis/monitoring.kubesphere.io/v1beta1"}}]),e}(),m=(0,d.default)(p.prototype,"isLoading",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),h=(0,d.default)(p.prototype,"isRefreshing",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),v=(0,d.default)(p.prototype,"etcdChecking",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),g=(0,d.default)(p.prototype,"supportETCD",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),(0,d.default)(p.prototype,"fetchMetrics",[y.action],Object.getOwnPropertyDescriptor(p.prototype,"fetchMetrics"),p.prototype),(0,d.default)(p.prototype,"fetchStatisticsQuery",[y.action],Object.getOwnPropertyDescriptor(p.prototype,"fetchStatisticsQuery"),p.prototype),p);t.default=R},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(3)),p=n(r(2320));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var h=function(e){(0,o.default)(r,e);var a=m(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){var e=this.props,a=e.className,r=e.img,n=e.desc;return s.default.createElement("div",{className:(0,d.default)(p.default.wrapper,a)},s.default.createElement("img",{src:r,alt:"No data"}),s.default.createElement("div",{className:p.default.content},t(n)))}}]),r}(s.default.PureComponent);a.default=h,h.propTypes={className:f.default.string,img:f.default.string,desc:f.default.string},h.defaultProps={img:"/assets/empty-card.svg",desc:"NO_DATA"}},,,function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(86),r(18),r(16),r(98),r(9),r(13),r(10),r(4),r(316),r(23),r(24),r(17),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(86),r(18),r(28),r(42),r(16),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(24),r(17),r(188),r(7);var l=n(r(315)),u=n(r(96)),o=n(r(43)),i=n(r(30)),c=n(r(58));r(41);var s,f,d,p=n(r(44)),m=n(r(36)),h=n(r(37)),v=n(r(55)),g=n(r(56)),y=n(r(51)),E=n(r(0)),b=r(14),_=r(239),O=n(r(1)),S=n(r(806)),C=n(r(63)),D=n(r(198)),k=n(r(26)),N=n(r(854)),T=r(186),R=n(r(3)),w=n(r(789)),I=r(791),M=n(r(105)),P=r(72),A=r(794),j=n(r(452)),L=n(r(325)),x=n(r(1374)),U=n(r(989)),z=n(r(1408)),F=n(r(1409)),G=r(52),V=n(r(3882)),B=n(r(1823));function Y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function W(e){for(var t=1;t0&&void 0!==i[0]?i[0]:{},a=t.noMetrics,r=t.silent,l=(0,c.default)(t,["noMetrics","silent"]),!(0,C.default)(n.state.params)){e.next=4;break}return n.store.list.isLoading=!1,e.abrupt("return");case 4:return u=n.props.limit,r&&(n.store.list.silent=!0),e.next=8,n.store.fetchList(W(W({limit:u},n.state.params),l));case 8:n.store.list.silent=!1,a||n.fetchMetrics();case 10:case"end":return e.stop()}}),e)}))),n.fetchMetrics=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.state.selectCluster,a=n.store.list,r=a.data,l=a.isLoading;return!((0,C.default)(r)||l||(0,C.default)(n.state.params))&&(!!globals.app.hasClusterModule(t,"whizard-monitoring")&&void n.monitorStore.fetchMetrics(W(W({step:"1m",times:30,resources:r.map((function(e){return e.name})),metrics:Object.values((0,G.hideGPUByLicense)(H,t))},n.state.params),e)))},n.getPagination=function(){var e=n.store.list;return{page:e.page,limit:e.limit,total:e.total}},n.getPodMetrics=function(e){var t=n.monitorStore.data,a={},r=n.state.cluster;return Object.entries((0,G.hideGPUByLicense)(H,r)).forEach((function(r){var n=(0,u.default)(r,2),l=n[0],o=n[1],i=(0,k.default)(t,"".concat(o,".data.result"))||[];a[l]=i.find((function(t){return(0,k.default)(t,"metric.pod")===e.name}))})),a},n.handleSearch=function(e){n.searchValue=e,n.fetchData({name:e}).then((function(){n.props.onSearch(e)}))},n.handleRefresh=function(){var e=n.searchValue?{name:n.searchValue}:{};n.fetchData(e).then((function(){var t=n.props,a=t.onSearch,r=t.onRefresh;(0,C.default)(e)?r():a(n.searchValue)}))},n.handlePage=function(e){n.fetchData({page:e}).then((function(){n.props.onPage(e)}))},n.handleExpand=function(e){n.setState((function(t){return{expandItem:t.expandItem===e?"":e}}))},n.getClustersOptions=function(){return n.props.clusters.map((function(e){return{label:E.default.createElement("span",null,(0,G.showNameAndAlias)(e,"cluster")),value:e}}))},n.handleClusterChange=function(e){n.setState({selectCluster:e,params:n.getParams(e)},(function(){n.fetchData(),n.initWebsocket()}))},n.renderHeader=function(){var e=n.props.isFederated,a=n.state.selectCluster;return E.default.createElement("div",{className:B.default.header},e&&E.default.createElement(T.Select,{key:a,name:"cluster",prefixIcon:E.default.createElement(T.Icon,{name:"cluster"}),className:B.default.cluster,value:a,options:n.getClustersOptions(),onChange:n.handleClusterChange}),E.default.createElement(T.InputSearch,{className:B.default.search,name:"search",placeholder:t("SEARCH_BY_NAME"),onSearch:n.handleSearch}),E.default.createElement("div",{className:B.default.actions},E.default.createElement(T.Button,{type:"flat",icon:"refresh",onClick:n.handleRefresh})))},n.handleShowEvents=function(e){n.trigger("pod.events",{detail:e,title:E.default.createElement("span",null,E.default.createElement(T.Icon,{name:"event"}),t("VIEW_EVENTS")),isEdgeWize:n.props.isEdgeWize,cluster:e.cluster})},n.renderFooter=function(){var e=n.getPagination(),a=e.total;return E.default.createElement(T.Level,{className:B.default.footer},E.default.createElement(T.LevelLeft,null,t("TOTAL_ITEMS",{num:a})),E.default.createElement(T.LevelRight,null,E.default.createElement(T.Pagination,(0,l.default)({},e,{onChange:n.handlePage}))))};var i=(0,k.default)(n.props.rootStore,"routing.location.pathname","").indexOf("observability")>-1;n.store=e.isEdgeWize?new x.default:new j.default,n.monitorStore=i?new F.default:e.isEdgeWize?new z.default:new U.default;var s=e.isFederated?(0,k.default)(e,"clusters[0]"):e.detail.cluster;return n.state={expandItem:"",selectCluster:s||"",params:n.getParams(s)},n.websocket=new L.default,n.initWebsocket(),n}return(0,h.default)(r,[{key:"initWebsocket",value:function(){var e=this,t=this.props.getReplica,a=this.state,r=a.selectCluster,n=a.params,l=void 0===n?{}:n,u=l.namespace,o=l.labelSelector,i="".concat(this.props.isEdgeWize?P.API_VERSIONS.edgewize:"").concat(r?"/".concat(r):"","/api/v1/watch/namespaces/").concat(u,"/pods?labelSelector=").concat(o);i&&u&&o&&(this.websocket.watch(i),this.fetchData=(0,N.default)(this.fetchData,2e3),this.disposer=(0,b.reaction)((function(){return e.websocket.message}),(function(a){if("Pod"===a.object.kind)if("MODIFIED"===a.type){var n=W({cluster:r},M.default.pods((0,b.toJS)(a.object)));e.store.list.updateItem(n),t&&t()}else"DELETED"!==a.type&&"ADDED"!==a.type||(e.fetchData({silent:!0}),t&&t())})))}},{key:"componentDidUpdate",value:function(e){var t=this,a=this.props,r=a.detail,n=a.details,l=a.isFederated,u=l&&!(0,S.default)(n,e.details);if(r!==e.detail||u){var o=l?(0,k.default)(this.props,"clusters[0]"):r.cluster;this.setState({expandItem:"",selectCluster:o||"",params:this.getParams(o)},(function(){t.fetchData(),t.initWebsocket()}))}}},{key:"componentDidMount",value:function(){this.fetchData(),(0,A.startAutoRefresh)(this,{method:"fetchMetrics",leading:!1})}},{key:"componentWillUnmount",value:function(){(0,A.stopAutoRefresh)(this),this.disposer&&this.disposer()}},{key:"renderContent",value:function(){var e=this,a=this.props,r=a.prefix,n=a.isFederated,l=a.isEdgeWize,u=a.showMonitoring,o=this.store.list,i=o.data,c=o.isLoading,s=o.silent,f=this.state.selectCluster,d=E.default.createElement("div",{className:B.default.body},(0,C.default)(i)?E.default.createElement("div",{className:B.default.empty},t("NO_RESOURCE_FOUND")):i.map((function(t){return E.default.createElement(V.default,{isEdgeWize:l,key:t.uid,prefix:n?"".concat(r,"/clusters/").concat(f):r,detail:t,showMonitoring:u,metrics:e.getPodMetrics(t),loading:e.monitorStore.isLoading,refreshing:e.monitorStore.isRefreshing,isExpand:e.state.expandItem===t.uid,onExpand:e.handleExpand,onShowEvents:e.handleShowEvents})})));return s?d:E.default.createElement(T.Loading,{spinning:c},d)}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.title,n=e.hideHeader,l=e.hideFooter,u=e.noWrapper,o=this.store.list.data;return u?this.renderContent():E.default.createElement(w.default,{className:(0,R.default)(B.default.main,a),title:t(r),empty:t("EMPTY_WRAPPER",{resource:t("POD")}),isEmpty:(0,C.default)(o)},!n&&this.renderHeader(),this.renderContent(),!l&&this.renderFooter())}}]),r}(E.default.Component),f.propTypes={prefix:O.default.string,isEdgeWize:O.default.bool,title:O.default.string,detail:O.default.object,details:O.default.object,hideHeader:O.default.bool,hideFooter:O.default.bool,isFederated:O.default.bool,onSearch:O.default.func,onRefresh:O.default.func,onPage:O.default.func,limit:O.default.number,showMonitoring:O.default.bool},f.defaultProps={title:"PODS",detail:{},details:{},isEdgeWize:!1,hideHeader:!1,hideFooter:!1,isFederated:!1,showMonitoring:!0,onSearch:function(){},onRefresh:function(){},onPage:function(){}},s=d))||s)||s)||s;a.default=Q},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var l=n(a(30)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51)),f=n(a(63)),d=r(a(0)),p=n(a(1)),m=n(a(3)),h=a(186),v=n(a(2044));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var y=function(e){(0,i.default)(a,e);var t=g(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&void 0!==d[0]?d[0]:{},a=t.cluster,r=t.namespace,n=t.module,l=(0,u.default)(t,["cluster","namespace","module"]),this.list.isLoading=!0,n&&(this.module=n),i=l,e.next=6,request.get(this.getListUrl({cluster:a,namespace:r,module:n}),i,{},(function(){return{items:[]}}));case 6:return c=e.sent,s=Array.isArray(c.items)?c.items.map((function(e){return O({cluster:a,module:n||f.module,config:(0,E.getValueObj)((0,y.safeAtob)((0,v.default)(e,'data["sink.yaml"]',"")))},f.mapper(e))})):[],this.list.update({data:s,total:c.items.length||0,isLoading:!1}),e.abrupt("return",s);case 10:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"fetchDetail",value:(a=(0,c.default)(o.default.mark((function e(t){var a,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get(this.getDetailUrl(t));case 3:return a=e.sent,(r=O(O({},t),this.mapper(a))).config=(0,E.getValueObj)((0,y.safeAtob)((0,v.default)(r._originData,'data["sink.yaml"]',""))),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"apiVersion",get:function(){return b.API_VERSIONS[this.module]}}]),p}(n(r(68)).default),(0,h.default)(i.prototype,"validateImageRegistrySecret",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"validateImageRegistrySecret"),i.prototype),(0,h.default)(i.prototype,"setDefault",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"setDefault"),i.prototype),(0,h.default)(i.prototype,"fetchListByK8s",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchListByK8s"),i.prototype),(0,h.default)(i.prototype,"fetchDetail",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),i);a.default=C},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(61)),u=r(a(58));a(41);var o,i=r(a(44)),c=r(a(30)),s=r(a(36)),f=r(a(37)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=a(14),g=r(a(26)),y=r(a(189)),E=a(72),b=r(a(105));function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module)},e}return(0,f.default)(C,[{key:"fetchChildResource",value:(v=(0,i.default)(n.default.mark((function e(){var t,a,r,o,i,c,s,f,d=this,p=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},a=t.kind,r=t.cluster,o=t.more,i=t.group,c=(0,u.default)(t,["kind","cluster","more","group"]),this.list.isLoading=!0,c.sortBy||void 0!==c.ascending||(c.sortBy=E.LIST_DEFAULT_ORDER[this.module]||"createTime"),c.limit!==1/0&&-1!==c.limit||(c.limit=-1,c.page=1),c.limit=c.limit||10,e.next=7,request.get("".concat(this.getDetailUrl({cluster:r,name:i}),"/").concat(a),this.getFilterParams(c));case 7:return s=e.sent,f=((0,g.default)(s,"items")||[]).map((function(e){return O({cluster:r},d.edgeNodeMapper(e))})),this.list.update(O(O({data:o?[].concat((0,l.default)(this.list.data),(0,l.default)(f)):f,total:s.totalItems||s.totalCount||s.total_count||f.length||0},c),{},{limit:Number(c.limit)||10,page:Number(c.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",{data:f,total:s.totalItems});case 11:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"fetchResourceList",value:(h=(0,i.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,l="/kapis/resources.kubesphere.io/v1alpha3".concat(this.getPath({cluster:a}),"/").concat(this.module).concat(r?"?labelSelector=apps.edgewize.io/namespace-".concat(r):""),e.next=4,request.get(l);case 4:return u=e.sent,o=(0,g.default)(u,"items"),e.abrupt("return",o);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"boundNamespace",value:(m=(0,i.default)(n.default.mark((function e(t){var a,r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.group,l=t.namespace,e.abrupt("return",this.submitting(request.post("".concat(this.getDetailUrl({cluster:a,name:r}),"/namespaces/").concat(l))));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return m.apply(this,arguments)})},{key:"unboundNamespace",value:(p=(0,i.default)(n.default.mark((function e(t){var a,r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.group,l=t.namespace,e.abrupt("return",this.submitting(request.delete("".concat(this.getDetailUrl({cluster:a,name:r}),"/namespaces/").concat(l))));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:"batchBoundNamespaces",value:(c=(0,i.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.group,l=t.namespaces,u="".concat(this.getDetailUrl({cluster:a,name:r}),"/namespaces"),o=l.map((function(e){return{op:"add",path:"/metadata/labels/apps.edgewize.io~1namespace-".concat(e),value:""}})),e.abrupt("return",this.submitting(request.patch(u,o)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"batchUnboundNamespaces",value:(o=(0,i.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.group,l=t.namespaces,u="".concat(this.getDetailUrl({cluster:a,name:r}),"/namespaces"),o=l.map((function(e){return{op:"remove",path:"/metadata/labels/apps.edgewize.io~1namespace-".concat(e),value:""}})),e.abrupt("return",this.submitting(request.patch(u,o)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"addGroupNode",value:(r=(0,i.default)(n.default.mark((function e(t){var a,r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.group,l=t.node,e.abrupt("return",this.submitting(request.post("".concat(this.getDetailUrl({cluster:a,name:r}),"/nodes/").concat(l))));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"fetchAllNamespaces",value:(a=(0,i.default)(n.default.mark((function e(){var t,a,r,l,o,i=this,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),e.next=3,request.get("".concat(this.getResourceUrl({cluster:a}),"/namespaces"),r);case 3:return l=e.sent,o=((0,g.default)(l,"items")||[]).map((function(e){return O({cluster:a},i.edgeNodeMapper(e))})),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchListProjectGroups",value:(t=(0,i.default)(n.default.mark((function e(){var t,a,r,o,i,c,s,f,d,p=this,m=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},a=t.cluster,r=t.workspace,o=t.namespace,i=t.more,c=t.devops,s=(0,u.default)(t,["cluster","workspace","namespace","more","devops"]),this.list.isLoading=!0,s.sortBy||void 0!==s.ascending||(s.sortBy=E.LIST_DEFAULT_ORDER[this.module]||"createTime"),s.limit!==1/0&&-1!==s.limit||(s.limit=-1,s.page=1),s.limit=s.limit||10,e.next=7,request.get(this.getResourceUrl({cluster:a,workspace:r,namespace:o,devops:c}),this.getFilterParams(s));case 7:return f=e.sent,d=((0,g.default)(f,"items")||[]).map((function(e){return O({cluster:a,namespace:o,workspace:r},p.mapper(e))})),this.list.update(O(O({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(d)):d,total:f.totalItems||f.totalCount||f.total_count||d.length||0},(0,y.default)(s,"labelSelector")),{},{limit:Number(s.limit)||10,page:Number(s.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",d);case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"edgeNodeMapper",get:function(){return b.default.edgenodes}}]),C}(r(a(68)).default),(0,h.default)(o.prototype,"fetchChildResource",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchChildResource"),o.prototype),(0,h.default)(o.prototype,"fetchResourceList",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchResourceList"),o.prototype),(0,h.default)(o.prototype,"boundNamespace",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"boundNamespace"),o.prototype),(0,h.default)(o.prototype,"unboundNamespace",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"unboundNamespace"),o.prototype),(0,h.default)(o.prototype,"batchBoundNamespaces",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"batchBoundNamespaces"),o.prototype),(0,h.default)(o.prototype,"batchUnboundNamespaces",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"batchUnboundNamespaces"),o.prototype),(0,h.default)(o.prototype,"addGroupNode",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"addGroupNode"),o.prototype),(0,h.default)(o.prototype,"fetchListProjectGroups",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchListProjectGroups"),o.prototype),o);t.default=C},function(e,t,a){e.exports={CodeEditor:"fWKJIVIp0j8BpxLeQvB84",clickable:"_1MWvcZ4Nk-gUkGBi2mTlT5",dockerCredentialsContent:"_1Ft3A_KxSha1ekW7Kj7PhV",dockerCredentialsContent__title:"cvH0AdmzBm64wtNfOw-r6",dockerCredentialsContent__content:"_6e1Y_TkD0j9LQti3mZtTI",dockerCredentialsContent__trashicon:"_2OKbHoYbk9D8ava2syyAkO",desc:"_3dhQzgRA0CKwra7jXP8LIj",info:"_1tc604kXLhTZ5HZc1wTviA",columns:"_2BKaEhU1omIebd5PVjl-mC"}},,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(84),a(29),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(22),a(23),a(17),a(85),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(84),a(29),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(85),a(38),a(7),a(32);var n=r(a(43)),l=r(a(61)),u=r(a(58));a(41);var o,i,c,s,f,d,p=r(a(44)),m=r(a(30)),h=r(a(65)),v=r(a(36)),g=r(a(37)),y=r(a(88)),E=r(a(55)),b=r(a(56)),_=r(a(51)),O=r(a(49)),S=(r(a(66)),a(14)),C=a(444),D=r(a(26)),k=r(a(189)),N=a(72);function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t0&&void 0!==v[0]?v[0]:{},a=t.cluster,r=t.workspace,o=t.namespace,i=t.more,c=t.devops,s=t.type,f=void 0===s?"node":s,d=(0,u.default)(t,["cluster","workspace","namespace","more","devops","type"]),this.list.isLoading=!0,d.sortBy||void 0!==d.ascending||(d.sortBy=N.LIST_DEFAULT_ORDER[this.module]||"createTime"),d.limit!==1/0&&-1!==d.limit||(d.limit=-1,d.page=1),d.limit=d.limit||10,e.next=7,request.get(this.getResourceUrl({cluster:a,workspace:r,devops:c}),this.withTypeSelectParams(d,f));case 7:return p=e.sent,m=((0,D.default)(p,"items")||[]).map((function(e){return R(R({cluster:a,namespace:o},e),h.mapper(e))})),this.list.update(R(R({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(m)):m,total:p.totalItems||p.total_count||m.length||0},(0,k.default)(d,"labelSelector")),{},{limit:Number(d.limit)||10,page:Number(d.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",m);case 11:case"end":return e.stop()}}),e,this)}))),function(){return _.apply(this,arguments)})},{key:"fetchDetail",value:(b=(0,p.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get("".concat(this.getResourceUrl(t),"/").concat(t.name));case 3:return a=e.sent,r=R(R(R({},t),this.mapper(a)),{},{kind:"Node"}),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return b.apply(this,arguments)})},{key:"fetchCount",value:(m=(0,p.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get(this.getResourceUrl(t),{labelSelector:"node-role.kubernetes.io/master"});case 2:a=e.sent,r=a.items.filter((function(e){return(0,C.getNodeRoles)(e.metadata.labels).includes("worker")})).length,this.masterNum=a.items.filter((function(e){var t=(0,C.getNodeRoles)(e.metadata.labels);return t.includes("master")||t.includes("control-plane")})).length,this.masterCount=a.totalItems,this.masterWorkerCount=r;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return m.apply(this,arguments)})},{key:"batchPatchTaints",value:(o=(0,p.default)(n.default.mark((function e(t){var a=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.submitting(Promise.all(t.map((function(e){var t=e.taints;return request.patch(a.getDetailUrl(e),{spec:{taints:t}})}))));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"cordon",value:(r=(0,p.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.name,l={spec:{unschedulable:!0}},e.next=4,request.patch(this.getDetailUrl({cluster:a,name:r}),l);case 4:u=e.sent,this.detail=this.mapper(u),this.originDetail=u;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"uncordon",value:(a=(0,p.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.name,l={spec:{unschedulable:null}},e.next=4,request.patch(this.getDetailUrl({cluster:a,name:r}),l);case 4:u=e.sent,this.detail=this.mapper(u),this.originDetail=u;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"deleteSelected",value:(t=(0,p.default)(n.default.mark((function e(t){var a=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){var t=a.list.data[e];return"master"===t.role?null:request.delete(a.getDetailUrl(t),{orphanDependents:!1})})));case 2:this.list.selectedRowKeys=[];case 3:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),S}(r(a(68)).default),i=(0,O.default)(o.prototype,"nodesMetrics",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),c=(0,O.default)(o.prototype,"nodeMetrics",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),s=(0,O.default)(o.prototype,"masterNum",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),f=(0,O.default)(o.prototype,"masterCount",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),d=(0,O.default)(o.prototype,"masterWorkerCount",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),(0,O.default)(o.prototype,"fetchList",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchList"),o.prototype),(0,O.default)(o.prototype,"fetchDetail",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchDetail"),o.prototype),(0,O.default)(o.prototype,"fetchCount",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchCount"),o.prototype),(0,O.default)(o.prototype,"batchPatchTaints",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"batchPatchTaints"),o.prototype),(0,O.default)(o.prototype,"cordon",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"cordon"),o.prototype),(0,O.default)(o.prototype,"uncordon",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"uncordon"),o.prototype),(0,O.default)(o.prototype,"deleteSelected",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"deleteSelected"),o.prototype),o);t.default=I},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(16),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(16),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l,u=r(a(44)),o=r(a(36)),i=r(a(37)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(49)),p=r(a(26)),m=a(14),h=a(72),v=r(a(1090)),g=r(a(1091));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=(l=function(e){(0,c.default)(r,e);var t,a=y(r);function r(e){var t;return(0,o.default)(this,r),(t=a.call(this,e)).getWatchListUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/".concat("cronjobs"===t.module?"apis/batch/v1":h.API_VERSIONS[t.module],"/watch").concat(t.getPath(e),"/").concat(t.module)},t.getWatchUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(t.getWatchListUrl(e),"/").concat(e.name)},t.getListUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/".concat("cronjobs"===t.module?"apis/batch/v1":h.API_VERSIONS[t.module]).concat(t.getPath(e),"/").concat(t.module).concat(e.dryRun?"?dryRun=All":"")},t.getResourceUrl=function(e){var a=e.cluster,r=e.namespace;return"/kapis/resources.kubesphere.io/v1alpha3".concat(t.getPath({namespace:r,cluster:a}),"/").concat(t.module)},t.getServiceRequest=function(e,t){var a=new g.default;return t.namespace=t.namespace||(0,p.default)(e,"metadata.namespace"),{url:a.getListUrl(t),data:e}},t.hpaStore=new v.default,t}return(0,i.default)(r,[{key:"rerun",value:(t=(0,u.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.cluster,l=t.namespace,e.next=3,request.get(this.getDetailUrl({name:a,cluster:r,namespace:l}));case 3:return u=e.sent,o=(0,p.default)(u,"metadata.resourceVersion"),e.abrupt("return",this.submitting(request.post("/kapis/operations.kubesphere.io/v1alpha3".concat(this.getPath({namespace:l,cluster:r}),"/jobs/").concat(a,"?action=rerun&resourceVersion=").concat(o))));case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),r}(r(a(318)).default),(0,d.default)(l.prototype,"rerun",[m.action],Object.getOwnPropertyDescriptor(l.prototype,"rerun"),l.prototype),l);t.default=E},,,,function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(86),r(18),r(16),r(27),r(9),r(13),r(10),r(24),r(64),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(30));r(12),r(5),r(11),r(31),r(6),r(86),r(18),r(28),r(16),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(24),r(64),r(7);var u=n(r(0)),o=n(r(26)),i=n(r(63)),c=n(r(925)),s=r(52),f=r(72),d=r(1513),p=n(r(2166));function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function h(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};if(!e.active)return null;var a=e.renderLabel,r=e.payload,n=e.usageData,l=e.totalData,m=e.tailText,v=e.alert,g=e.isTranslate,y=void 0===g||g,E=r||[],b=e.label,_=(0,o.default)(E,"[0].unit")||"",O="default"===_?"":"%"===_?"%":"".concat(t(_)),S=a?a(e):b,C=function(e){var a=e.indexOf("gpu")>-1?"gpu":e,r="gpu"===a?"".concat(a,".limit"):a;return f.ICON_TYPES[a]?t(r.replace(/[. ]/g,"_").toUpperCase()):r};return u.default.createElement("div",{className:p.default.tooltip},v&&u.default.createElement("div",{className:p.default.item},u.default.createElement(d.ReactComponent,null),"".concat(t(C(v.name||"")),":").concat("core"===v.unit?t("VALUE_CORES",{value:v.value}):t("VALUE_UNIT",h({},v)))),u.default.createElement("div",{className:p.default.label,style:{marginTop:"".concat(v?"8px":"0px")}},u.default.createElement("span",null,S),m&&u.default.createElement("span",null,m)),u.default.createElement("div",{className:p.default.list},E.map((function(e){var a=e.dataKey,r=e.name,f=e.value,d=void 0===f?0:f;if((0,c.default)(Number(d)))return null;var m=(0,o.default)(e,"stroke"),h="";if(!(0,i.default)(n)&&!(0,i.default)(l)){var v=(0,o.default)(n.find((function(e){return e.time===b})),r)||0,g=(0,o.default)(l.find((function(e){return e.time===b})),r)||0;h=" (".concat(v,"/").concat(g,")")}var E=(0,s.coreUnitTS)(d,O);return u.default.createElement("div",{key:a,className:p.default.item},u.default.createElement("i",{style:{background:m}}),y?t(r):r,": ",d," ".concat(t(E)),h)}))))};a.default=v},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(22),r(23),r(57),r(17);var l=n(r(43));r(41);var u=n(r(44)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=n(r(63)),v=n(r(26)),g=n(r(854)),y=n(r(158)),E=r(186),b=n(r(846)),_=n(r(2321));function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var S=function(e){var t=e.data,a=e.total,r=e.isEnd;return(0,y.default)(r)?!(0,h.default)(t)&&t.length0&&e<1?e.toFixed(2):e>1&&e!==1/0?e.toFixed(1):e},n.memoryFormatter=function(e){return(e=Math.round(e))>0&&e<1e3?e-e%10:e>1e3&&e<2e3?e-e%50:e>2e3&&e!==1/0?e-e%100:e},n.checkError=function(e){var t="",a="",r=e.requests,n=e.limits;return n.cpu&&!String(n.cpu).endsWith(".")&&Number(r.cpu)>Number(n.cpu)&&(t="RequestExceed"),n.memory&&!String(n.memory).endsWith(".")&&Number(r.memory)>Number(n.memory)&&(a="RequestExceed"),{cpuError:t,memoryError:a}},n.checkAndTrigger=function(){var e=n.state,t=e.requests,a=e.limits,r=e.gpu,l=e.workspaceLimits,u=e.workspaceRequests;n.setState({workspaceLimitCheck:{requestCpuError:n.checkNumOutLimit(t.cpu,u.cpu),requestMemoryError:n.checkNumOutLimit(t.memory,u.memory),limitCpuError:n.checkNumOutLimit(a.cpu,l.cpu),limitMemoryError:n.checkNumOutLimit(a.memory,l.memory),gpuLimitError:n.checkGpuOutOfLimit(r)}},n.triggerChange)},n.checkGpuOutOfLimit=function(e){var t=e.type,a=(0,h.default)(n.props,"workspaceLimitProps.gpuLimit",[]).filter((function(e){return Object.keys(e)[0].endsWith(t)})),r=a.length>0?Object.values(a[0])[0]:"Not Limited";return n.checkNumOutLimit(e.value,r)},n.checkNumOutLimit=function(e,t){var a=n.props.omitQuotaCheck;return void 0!==a&&a?"":"Not Limited"!==t&&(0,y.default)(Number(e))&&Number(e)>t?"workspaceRequestExceed":""},n.triggerChange=function(){var e=n.props,t=e.onChange,a=e.onError,r=n.state,l=r.requests,o=r.limits,i=r.cpuError,c=r.memoryError,s=r.workspaceLimitCheck,f=r.gpu,d=n.memoryUnit,p="Core"===n.cpuUnit?"":n.cpuUnit,m=n.getWorkspaceCheckError();m.length>0?a(i||c||s[m[0]]):a(i||c);var h={};""!==l.cpu&&l.cpu>=0&&l.cpu<1/0&&(0,v.default)(h,"requests.cpu","".concat(l.cpu).concat(p)),""!==l.memory&&l.memory>=0&&l.memory<1/0&&(0,v.default)(h,"requests.memory","".concat(l.memory).concat(d)),""!==o.cpu&&o.cpu>=0&&o.cpu<1/0&&(0,v.default)(h,"limits.cpu","".concat(o.cpu).concat(p)),""!==o.memory&&o.memory>=0&&o.memory<1/0&&(0,v.default)(h,"limits.memory","".concat(o.memory).concat(d)),f.type&&f.value&&((0,v.default)(h,"limits",N(N({},h.limits),{},(0,u.default)({},"".concat(f.type),f.value))),(0,v.default)(h,"requests",N(N({},h.requests),{},(0,u.default)({},"".concat(f.type),f.value)))),t(h)},n.getWorkspaceCheckError=function(){return Object.keys(n.state.workspaceLimitCheck).filter((function(e){return""!==n.state.workspaceLimitCheck[e]}))},n.handleCPUChange=function(e){n.setState((function(t){var a=t.requests,r=t.limits;return{requests:N(N({},a),{},{cpu:0===e[0]?"":e[0]}),limits:N(N({},r),{},{cpu:0===e[1]?"":e[1]})}}),n.checkAndTrigger)},n.handleMemoryChange=function(e){n.setState((function(t){var a=t.requests,r=t.limits;return{requests:N(N({},a),{},{memory:0===e[0]?"":e[0]}),limits:N(N({},r),{},{memory:0===e[1]?"":e[1]})}}),n.checkAndTrigger)},n.handleInputChange=function(e){return function(t){var a;a=""===t||void 0===t?"":t,n.setState((function(t){return(0,v.default)(t,e,(0,b.default)(a)?"":a),N(N({},t),n.checkError(t))}),n.checkAndTrigger)}},n.handleGpuInputChange=function(e,t){var a;if(""===t)a="";else{var r=/^(0|[1-9][0-9]*)$/.exec(t);a=null==r?(0,h.default)(n.state,"gpu.value",""):r[0]}n.setState({gpu:{type:n.state.gpu.type,value:a}},n.checkAndTrigger)},n.gpuSelectChange=function(e){n.setState({gpu:{type:e,value:n.state.gpu.value}},n.checkAndTrigger)},n.renderLimitTip=function(e,a){return"Not Limited"!==e?"".concat(e," ").concat(a):t("NO_LIMIT")},n.renderGpuTip=function(){var e=n.props.workspaceLimitProps,a=n.state.gpu,r=null==e?void 0:e.gpuLimit.filter((function(e){return(0,E.default)(e)?e:Object.keys(e)[0].endsWith(a.type)}))[0];return d.default.createElement("div",{className:D.default.message},!(0,_.default)(r)&&d.default.createElement(d.default.Fragment,null,d.default.createElement("span",null,t("GPU_TYPE"),":"),d.default.createElement("span",null,a.type),d.default.createElement("br",null)),d.default.createElement("span",null,t("GPU_LIMIT"),":"),d.default.createElement("span",null,(0,_.default)(r)?t("NO_LIMIT"):Object.values(r)[0]))},n.renderGpuSelect=function(){return d.default.createElement(O.Column,null,d.default.createElement("div",{className:D.default.inputGroup},d.default.createElement("img",{src:"/assets/GPU.svg",size:48}),d.default.createElement("div",{className:(0,m.default)(D.default.input)},d.default.createElement("div",{className:D.default.label},d.default.createElement("span",null,t("GPU_TYPE"))),d.default.createElement("div",{className:D.default.inputBox},d.default.createElement(O.Select,{options:n.gpuOption,value:n.state.gpu.type,onChange:n.gpuSelectChange,placeholder:" "}))),d.default.createElement("div",{className:(0,m.default)(D.default.input)},d.default.createElement("div",{className:D.default.label},d.default.createElement("span",null,t("GPU_LIMIT"))),d.default.createElement("div",{className:D.default.inputBox},d.default.createElement(C.default,{name:"gpu.value",value:n.state.gpu.value,onChange:n.handleGpuInputChange,placeholder:t("NO_LIMIT")})))))},n.state=N(N({},r.getValue(e)),{},{defaultValue:e.defaultValue,cpuError:"",memoryError:"",workspaceLimitCheck:{}}),n}return(0,i.default)(r,[{key:"componentDidUpdate",value:function(e,t){e.isEdit&&!this.props.isEdit&&(0,g.default)(e.defaultValue,t.defaultValue)&&this.setState(N(N({},r.getValue(this.props)),{},{defaultValue:this.props.defaultProps}))}},{key:"getLimit",value:function(e){return(0,y.default)(Number(e))?e:""}},{key:"getRequest",value:function(e){return null==e?"":e}},{key:"renderQuotasTip",value:function(){var e=this,a=this.props,r=a.workspaceLimitProps,n=a.supportGpuSelect,l=this.state,u=l.workspaceLimits,o=l.workspaceRequests,i=this.memoryUnit,c=this.cpuUnit,s=t("AVAILABLE_QUOTAS");return d.default.createElement(O.Alert,{title:s,type:"info",className:"margin-t12",message:d.default.createElement(d.default.Fragment,null,d.default.createElement("div",null,d.default.createElement("div",{className:D.default.message},d.default.createElement("span",null,t("RESOURCE_REQUESTS"),":"),d.default.createElement("span",null,"CPU ",e.renderLimitTip(o.cpu,c),", ",t("MEMORY")," ",e.renderLimitTip(o.memory,i))),d.default.createElement("div",{className:D.default.message},d.default.createElement("span",null,t("RESOURCE_LIMITS"),":"),d.default.createElement("span",null,"CPU ",e.renderLimitTip(u.cpu,c),", ",t("MEMORY")," ",e.renderLimitTip(u.memory,i))),n&&r.gpuLimit&&e.renderGpuTip()))})}},{key:"render",value:function(){var e=this.state,a=e.cpuError,r=e.memoryError,n=e.workspaceLimitCheck,l=this.props.supportGpuSelect,o=this.getWorkspaceCheckError();return d.default.createElement("div",{className:D.default.wrapper},d.default.createElement("div",{className:D.default.inputWrapper},d.default.createElement(O.Columns,{className:"is-gapless"},d.default.createElement(O.Column,null,d.default.createElement("div",{className:D.default.inputGroup},d.default.createElement(O.Icon,{name:"cpu",size:48}),d.default.createElement("div",{className:(0,m.default)(D.default.input,(0,u.default)({},D.default.error,a||n.requestCpuError))},d.default.createElement("span",{className:D.default.label},t("CPU_REQUEST")),d.default.createElement("div",{className:D.default.inputBox},d.default.createElement(C.default,{name:"requests.cpu",value:this.getRequest(this.state.requests.cpu),onChange:this.handleInputChange("requests.cpu"),placeholder:t("NO_REQUEST")}),d.default.createElement("span",{className:D.default.unit},this.cpuUnit))),d.default.createElement("div",{className:(0,m.default)(D.default.input,(0,u.default)({},D.default.error,a||n.limitCpuError))},d.default.createElement("span",{className:D.default.label},t("CPU_LIMIT")),d.default.createElement("div",{className:D.default.inputBox},d.default.createElement(C.default,{name:"limits.cpu",value:this.getLimit(this.state.limits.cpu),onChange:this.handleInputChange("limits.cpu"),placeholder:t("NO_LIMIT")}),d.default.createElement("span",{className:D.default.unit},this.cpuUnit))))),d.default.createElement(O.Column,null,d.default.createElement("div",{className:D.default.inputGroup},d.default.createElement(O.Icon,{name:"memory",size:48}),d.default.createElement("div",{className:(0,m.default)(D.default.input,(0,u.default)({},D.default.error,r||n.requestMemoryError))},d.default.createElement("span",{className:D.default.label},t("MEMORY_REQUEST")),d.default.createElement("div",{className:D.default.inputBox},d.default.createElement(C.default,{name:"requests.memory",value:this.getRequest(this.state.requests.memory),onChange:this.handleInputChange("requests.memory"),placeholder:t("NO_REQUEST")}),d.default.createElement("span",{className:D.default.unit},this.memoryUnit))),d.default.createElement("div",{className:(0,m.default)(D.default.input,(0,u.default)({},D.default.error,r||n.limitMemoryError))},d.default.createElement("span",{className:D.default.label},t("MEMORY_LIMIT")),d.default.createElement("div",{className:D.default.inputBox},d.default.createElement(C.default,{name:"limits.memory",value:this.getLimit(this.state.limits.memory),onChange:this.handleInputChange("limits.memory"),placeholder:t("NO_LIMIT")}),d.default.createElement("span",{className:D.default.unit},this.memoryUnit))))),l&&this.renderGpuSelect())),this.ifRenderTip&&this.renderQuotasTip(),(a||r)&&d.default.createElement(O.Alert,{type:"error",className:"margin-t12",message:t("REQUEST_EXCEED_LIMIT")}),o.length>0&&d.default.createElement(O.Alert,{type:"error",className:"margin-t12",message:t("REQUEST_EXCEED_AVAILABLE_QUOTA")}))}},{key:"cpuUnit",get:function(){return this.props.cpuProps.unit||"Core"}},{key:"memoryUnit",get:function(){return this.props.memoryProps.unit||"Mi"}},{key:"gpuOption",get:function(){return globals.config.supportGpuType.reduce((function(e,a){return[].concat((0,l.default)(e),[{value:a,label:t(a.replace(/[-/.]/g,"_").toUpperCase())}])}),[])}},{key:"gpuType",get:function(){return this.state.gpu.type}},{key:"ifRenderTip",get:function(){var e=this.props.workspaceLimitProps;return!(0,E.default)(e)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return(0,g.default)(e.defaultValue,t.defaultValue)&&(0,g.default)(e.workspaceLimitProps,t.workspaceLimitProps)?null:N(N({},r.getValue(e)),{},{defaultValue:e.defaultValue,workspaceLimitProps:e.workspaceLimitProps})}},{key:"allowInputDot",value:function(e,t,a){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e===1/0)return e;var n=e&&r?e.slice(0,-2):e;if(n&&String(n).endsWith(".")){var l=a(e,t);return"".concat(l,".")}if(n&&String(n).endsWith(".0")){var u=a(e,t);return"".concat(u,".0")}return a(e,t)}},{key:"getValue",value:function(e){var t=(0,h.default)(e,"cpuProps.unit","Core"),a=(0,h.default)(e,"memoryProps.unit","Mi"),n=r.getDefaultRequestValue(e,"cpu"),l=r.getDefaultRequestValue(e,"memory"),u=r.getDefaultLimitValue(e,"cpu"),o=r.getDefaultLimitValue(e,"memory"),i=r.allowInputDot(n,t,S.cpuFormat),c=r.allowInputDot(l,a,S.memoryFormat,!0),s=r.allowInputDot(u,t,S.cpuFormat),f=r.allowInputDot(o,a,S.memoryFormat,!0),d=(0,S.memoryFormat)("".concat(r.getWorkspaceRequestLimit(e,"memory"),"Mi"),a),p=(0,S.memoryFormat)("".concat(r.getWorkspaceLimitValue(e,"memory"),"Mi"),a),m=(0,S.cpuFormat)(r.getWorkspaceRequestLimit(e,"cpu"),t),v=(0,S.cpuFormat)(r.getWorkspaceLimitValue(e,"cpu"),t);return{requests:{cpu:i,memory:c},limits:{cpu:s,memory:f},workspaceRequests:{cpu:(0,b.default)(m)?"Not Limited":m,memory:(0,b.default)(d)?"Not Limited":d},workspaceLimits:{cpu:(0,b.default)(v)?"Not Limited":v,memory:(0,b.default)(p)?"Not Limited":p},gpu:r.gpuSetting(e)}}},{key:"getGpuFromProps",value:function(e){var t=globals.config.supportGpuType;if(!e)return{type:t[0],value:""};var a=Object.keys((0,h.default)(e,"requests",{})).filter((function(e){return t.some((function(t){return e.endsWith(t)}))})),r=(0,E.default)(a)?t[0]:a[0];return{type:r,value:(0,E.default)(a)?"":e.requests["".concat(r)]}}},{key:"gpuSetting",value:function(e){var t=(0,h.default)(e,"value",{}),a=(0,h.default)(e,"defaultValue",{});return(0,E.default)(t)?(0,E.default)(a)?r.getGpuFromProps():r.getGpuFromProps(a):r.getGpuFromProps(t)}},{key:"getDefaultRequestValue",value:function(e,t){var a;return(0,h.default)(e,"value.requests.".concat(t),null!==(a=(0,h.default)(e,"defaultValue.requests.".concat(t)))&&void 0!==a?a:"")}},{key:"getDefaultLimitValue",value:function(e,t){var a;return(0,h.default)(e,"value.limits.".concat(t),null!==(a=(0,h.default)(e,"defaultValue.limits.".concat(t)))&&void 0!==a?a:1/0)}},{key:"getWorkspaceRequestLimit",value:function(e,t){return(0,h.default)(e,"workspaceLimitProps.requests.".concat(t),"Not Limited")}},{key:"getWorkspaceLimitValue",value:function(e,t){return(0,h.default)(e,"workspaceLimitProps.limits.".concat(t),"Not Limited")}}]),r}(d.default.Component);a.default=R,R.propTypes={value:p.default.object,defaultValue:p.default.object,onChange:p.default.func,onError:p.default.func,supportGpuSelect:p.default.bool},R.defaultProps={value:{},onChange:function(){},onError:function(){},cpuProps:{},memoryProps:{},supportGpuSelect:!1}},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(84),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(85),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(84),r(18),r(28),r(191),r(42),r(16),r(159),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(85),r(188),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=n(r(837)),v=r(14),g=n(r(26)),y=n(r(63)),E=r(186),b=r(52),_=n(r(2458)),O=n(r(1047)),S=n(r(915)),C=n(r(874)),D=n(r(886)),k=n(r(2476));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var R={ascend:!1,descend:!0},w=function(e){(0,c.default)(r,e);var a=T(r);function r(e){var n;(0,o.default)(this,r),(n=a.call(this,e)).handleChange=function(e,t){n.props.onFetch(function(e){for(var t=1;t0&&!n.props.disabledSelectActions?n.renderSelectedTitle():n.renderNormalTitle()},n.renderTableFooter=function(){if(!n.props.pagination)return null;var e=n.props.pagination,t=e.total,a=e.page,r=e.limit;return d.default.createElement(D.default,{page:a,total:t,limit:r,onChange:n.handlePagination})};var l=(0,g.default)((0,b.safeParseJSON)(localStorage.getItem("hide-columns"),{}),e.tableId,[]);return n.state={hideColumns:l},n}return(0,i.default)(r,[{key:"shouldComponentUpdate",value:function(e,t){return!!this.props.alwaysUpdate||(e.data!==this.props.data||e.columns.length!==this.props.columns.length||e.selectedRowKeys.length!==this.props.selectedRowKeys.length||!(0,h.default)(e.filters,this.props.filters)||e.isLoading!==this.props.isLoading||!(0,h.default)(e.pagination,this.props.pagination)||t.hideColumns.length!==this.state.hideColumns.length)}},{key:"renderSelectActions",value:function(){var e=this.props,a=e.onDelete,r=e.selectActions;return r?d.default.createElement("div",null,r.map((function(e){return d.default.createElement(E.Button,{key:e.key,type:e.type,disabled:e.disabled,className:k.default.button,onClick:e.onClick,"data-test":"table-".concat(e.key)},e.text)}))):d.default.createElement("div",null,a&&d.default.createElement(E.Button,{type:"danger",className:k.default.button,onClick:a,"data-test":"table-delete"},t("DELETE")))}},{key:"renderSearch",value:function(){var e=this.props,a=e.hideSearch,r=e.searchType,n=e.filters,l=e.columns,u=e.columnSearch,o=e.showTimeSelector,i=e.onTimeSelectorChange,c=e.onTimeSelectorDelete,s=e.showKeywords;if(a)return null;if(r){var f=this.props.placeholder||t("SEARCH_BY_NAME");return d.default.createElement(E.InputSearch,{className:k.default.search,value:n[r],onSearch:this.handleSearch,placeholder:f})}return d.default.createElement(S.default,{className:k.default.search,columns:u||l,filters:n,showTimeSelector:o,showKeywords:s,onTimeSelectorChange:i,onTimeSelectorDelete:c,onChange:this.handleFilterInput})}},{key:"renderActions",value:function(){var e=this.props,a=e.onCreate,r=e.createText,n=e.actions;return n?n.map((function(e){return e.customDom?e.customDom:e.tooltip?d.default.createElement(_.default,{key:"".concat(e.key,"_tooltip"),content:e.tooltip.message,placement:e.tooltip.placement},d.default.createElement("div",{className:k.default.tooltipBox},d.default.createElement(E.Button,{key:e.key,type:e.type,className:k.default.create,onClick:e.onClick,"data-test":"table-".concat(e.key),disabled:e.forbidden||!1},e.text))):d.default.createElement(E.Button,{key:e.key,type:e.type,className:k.default.create,onClick:e.onClick,"data-test":"table-".concat(e.key),disabled:e.forbidden||!1},e.text)})):a?d.default.createElement(E.Button,{type:"control",className:k.default.create,onClick:a,"data-test":"table-create"},t(r||"CREATE")):null}},{key:"renderNormalTitle",value:function(){var e=this.props,a=e.hideCustom,r=e.customFilter,n=e.columns,l=this.state.hideColumns;return d.default.createElement(E.Level,null,r&&d.default.createElement(E.LevelLeft,null,r),d.default.createElement(E.LevelItem,null,this.renderSearch()),d.default.createElement(E.LevelRight,null,d.default.createElement("div",null,d.default.createElement(E.Button,{type:"flat",icon:"refresh",onClick:this.handleRefresh,"data-test":"table-refresh"}),!a&&d.default.createElement(O.default,{className:k.default.columnMenu,title:t("CUSTOM_COLUMNS"),columns:n,value:l,onChange:this.handleColumnsHide}),this.renderActions())))}},{key:"renderEmptyText",value:function(){return this.props.emptyText||d.default.createElement("div",{className:k.default.emptyText},d.default.createElement("span",{className:k.default.emptyTipIcon},d.default.createElement(E.Icon,{name:"exclamation",size:48})),d.default.createElement("div",null,t("NO_MATCHING_RESULT_FOUND")),d.default.createElement("p",null,t("YOU_CAN_TRY_TO"),d.default.createElement("span",{className:k.default.action,onClick:this.handleRefresh,"data-test":"table-empty-refresh"},t("REFRESH_DATA")),t("OR"),d.default.createElement("span",{className:k.default.action,onClick:this.clearFilter,"data-test":"table-empty-clear-filter"},t("CLEAR_SEARCH_CONDITIONS"))))}},{key:"renderEmpty",value:function(){var e=this.props,t=e.module,a=e.name,r=e.emptyProps,n=void 0===r?{}:r;return d.default.createElement(C.default,(0,l.default)({action:this.renderActions(),name:a,module:t},n))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.data,r=e.isLoading,n=e.silentLoading,u=e.rowKey,o=e.selectedRowKeys,i=e.onSelectRowKeys,c=e.hideHeader,s=e.hideFooter,f=e.extraProps,p=e.getCheckboxProps,h=e.expandedRowRender,g=e.rowExpandable;if(this.showEmpty)return this.renderEmpty();var y={};return c||(y.title=this.renderTableTitle()),s||(y.footer=this.renderTableFooter()),i&&(y.rowSelection={selectedRowKeys:o,getCheckboxProps:p,onSelect:function(e,t,a){i(a)},onSelectAll:function(e,t){i(t)}}),d.default.createElement(E.Table,(0,l.default)({className:(0,m.default)(k.default.table,"ks-table",t,k.default.filterMenu),rowKey:u,columns:this.filteredColumns,dataSource:(0,v.toJS)(a),loading:!n&&r,onChange:this.handleChange,emptyText:this.renderEmptyText(),expandedRowRender:h,rowExpandable:g},y,f))}},{key:"showEmpty",get:function(){var e=this.props,t=e.filters,a=e.pagination,r=e.isLoading;return"showEmpty"in this.props?this.props.showEmpty:!r&&(0,y.default)(t)&&0===a.total}},{key:"filteredColumns",get:function(){var e=this.state.hideColumns,t=void 0===e?[]:e;return this.props.columns.filter((function(e){return e&&!t.includes(e.key||e.dataIndex)}))}}]),r}(d.default.Component);a.default=w,w.propTypes={data:p.default.oneOfType([p.default.array,p.default.object]).isRequired,columns:p.default.array.isRequired,selectedRowKeys:p.default.array,isLoading:p.default.bool,pagination:p.default.object,filters:p.default.object,rowKey:p.default.any,onFetch:p.default.func,onRefresh:p.default.func,onSelectRowKeys:p.default.func,getCheckboxProps:p.default.func,onDelete:p.default.func,onCreate:p.default.func,hideHeader:p.default.bool,hideFooter:p.default.bool,hideSearch:p.default.bool,hideCustom:p.default.bool,actions:p.default.array,selectActions:p.default.array,extraProps:p.default.object,alwaysUpdate:p.default.bool,emptyText:p.default.any},w.defaultProps={rowKey:"name",selectedRowKeys:[],onFetch:function(){},hideHeader:!1,hideFooter:!1,hideSearch:!1,hideCustom:!1,extraProps:{},pagination:{},filters:{}}},function(e,a,r){"use strict";r(15);var n=r(20);r(16),r(4),r(23),r(24),r(17),r(64),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(16),r(4),r(23),r(57),r(24),r(17),r(64);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(3)),p=n(r(158)),m=n(r(194)),h=r(186),v=r(72),g=n(r(2474));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var E=function(e){(0,o.default)(r,e);var a=y(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){var e=this.props,a=e.module,r=e.icon,n=e.title,l=e.name,u=e.desc,o=e.action,i=e.className,c=(0,p.default)(u)?t.html("".concat(l.replace(/[-\s]/g,"_").toUpperCase(),"_EMPTY_DESC")):u,f=s.default.createElement(h.Icon,{name:r||v.ICON_TYPES[a]||"appcenter",size:48});return(0,m.default)(r)&&(f=r()),s.default.createElement("div",{className:(0,d.default)(g.default.wrapper,i)},s.default.createElement("div",{className:g.default.image},f),s.default.createElement("div",{className:g.default.title},n||t("EMPTY_WRAPPER",{resource:t(l.replace(/[- ]/g,"_").toUpperCase())})),s.default.createElement("p",{className:g.default.desc},c),o&&s.default.createElement("div",{className:g.default.actions},o))}}]),r}(s.default.PureComponent);a.default=E,E.propTypes={module:f.default.string,name:f.default.string,title:f.default.string,desc:f.default.string,className:f.default.string,action:f.default.node},E.defaultProps={name:"",module:""}},,,,function(e,t,a){"use strict";a(15),a(5),a(31),a(73),a(18),a(16),a(24),a(64),a(75),Object.defineProperty(t,"__esModule",{value:!0}),t.ALERTING_STATUS=t.getAlertingResource=t.getQuery=void 0,a(5),a(31),a(73),a(18),a(16),a(4),a(24),a(64),a(75);var r=a(1797);t.getQuery=function(e){var t=e.kind,a=e.rule,n=e.resources,l="",u=a._metricType,o=a.thresholds,i=a.condition_type;switch(t){case"Node":l=u.replace("$1","node=".concat(n.length>1?"~":"",'"').concat(n.join("|"),'"'));break;case"Deployment":case"StatefulSet":case"DaemonSet":l=u.replace("$1","workload=".concat(n.length>1?"~":"",'"').concat(n.map((function(e){return"".concat(t,":").concat(e)})).join("|"),'"')).replace("$2",t.toLowerCase())}var c=o,s=r.ALL_METRICS_CONFIG[u].ruleConfig.find((function(e){return"thresholds"===e.name}));return s&&s.converter&&(c=s.converter(o)),l+=" ".concat(i," ").concat(c)};var n={Deployment:"deployments",StatefulSet:"statefulsets",DaemonSet:"daemonsets",Pod:"pods"};t.getAlertingResource=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=function(e,t){var a=e.pod;return a&&a.startsWith(e[t])?{module:"pods",name:e.pod,namespace:e.namespace}:{module:"job_name"===t?"jobs":"".concat(t,"s"),name:e[t],namespace:e.namespace}};if(e.node)return{module:"nodes",name:e.node};if(e.namespace){if(e.workload)return{module:n[e.owner_kind],name:e.workload.replace("".concat(e.owner_kind,":"),""),namespace:e.namespace};if(e.job_name)return t(e,"job_name");if(e.cronjob)return t(e,"cronjob");if(e.hpa)return{module:"hpas",name:e.hpa,namespace:e.namespace};if(e.deployment)return t(e,"deployment");if(e.statefulset)return t(e,"statefulset");if(e.daemonset)return t(e,"daemonset");if(e.pod)return{module:"pods",name:e.pod,namespace:e.namespace};if(e.service)return{module:"services",name:e.service,namespace:e.namespace}}return{}};t.ALERTING_STATUS=["disabled","inactive","pending","firing"]},,function(e,a,r){"use strict";r(15);var n=r(20);r(31),Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=e.data;if(a){var r=u.severityOptions.find((function(e){return e.value===a}));if(r)return l.default.createElement("span",{style:{backgroundColor:r.bgColor,color:r.color,fontWeight:600,padding:"0px 4px",whiteSpace:"nowrap"}},t(r.label))}return"-"},r(31),r(4);var l=n(r(0)),u=r(993)},function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return c}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("path",{d:"M17.613 10.43c1.07.653 2.38 2.418 2.926 4.543.546 2.124.455 4.027.455 4.027s-.706-1.172-.992-1.582c-.287-.411-1.494-1.941-3.367-2.828-1.874-.887-5.005-.73-5.005-.73l.37 3.705-9-6.288 9-6.266-.37 3.716s2.073.16 3.157.39c1.825.389 2.826 1.312 2.826 1.312z"}),i=u.a.createElement("path",{fill:"currentColor",d:"M12 17.564l-9-6.287 9-6.267z"}),c=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 24 24",width:"1em",height:"1em"},e),o,i)};t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxnPgogICAgICAgIDxwYXRoIGQ9Ik0xNy42MTMgMTAuNDNjMS4wNy42NTMgMi4zOCAyLjQxOCAyLjkyNiA0LjU0My41NDYgMi4xMjQuNDU1IDQuMDI3LjQ1NSA0LjAyN3MtLjcwNi0xLjE3Mi0uOTkyLTEuNTgyYy0uMjg3LS40MTEtMS40OTQtMS45NDEtMy4zNjctMi44MjgtMS44NzQtLjg4Ny01LjAwNS0uNzMtNS4wMDUtLjczbC4zNyAzLjcwNS05LTYuMjg4IDktNi4yNjYtLjM3IDMuNzE2czIuMDczLjE2IDMuMTU3LjM5YzEuODI1LjM4OSAyLjgyNiAxLjMxMiAyLjgyNiAxLjMxMnoiLz4KICAgICAgICA8cGF0aCBmaWxsPSJjdXJyZW50Q29sb3IiIGQ9Ik0xMiAxNy41NjRsLTktNi4yODcgOS02LjI2N3oiLz4KICAgIDwvZz4KPC9zdmc+Cg=="},,function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(29),a(73),a(18),a(16),a(137),a(98),a(9),a(13),a(10),a(4),a(316),a(22),a(23),a(17),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(160),a(29),a(73),a(18),a(28),a(42),a(16),a(137),a(34),a(15),a(98),a(9),a(13),a(10),a(4),a(316),a(22),a(23),a(57),a(17),a(38),a(7),a(32);var n=r(a(58)),l=r(a(30)),u=r(a(96)),o=r(a(43));a(41);var i,c,s,f,d,p,m,h=r(a(44)),v=r(a(65)),g=r(a(36)),y=r(a(37)),E=r(a(88)),b=r(a(55)),_=r(a(56)),O=r(a(51)),S=r(a(49)),C=(r(a(66)),a(14)),D=a(52),k=a(794),N=r(a(74)),T=r(a(845));function R(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return(0,g.default)(this,O),e=_.call(this,t),(0,v.default)(e,"baseResourcesSummary",c,(0,E.default)(e)),(0,v.default)(e,"monitorData",s,(0,E.default)(e)),(0,v.default)(e,"roleAndMember",f,(0,E.default)(e)),(0,v.default)(e,"alertData",d,(0,E.default)(e)),(0,v.default)(e,"PodData",p,(0,E.default)(e)),(0,v.default)(e,"clusters",m,(0,E.default)(e)),e.getApi=function(t){var a=t.namespace,r=t.workspace,n=t.component,l=t.container,u=t.nodeName,o=t.persistentvolumeclaim,i=t.pvc,c=t.pod,s=t.workload;return n?"".concat(e.apiVersion,"/component_metrics"):c?"".concat(e.apiVersion,"/pod_metrics"):l?"".concat(e.apiVersion,"/container_metrics"):u?"".concat(e.apiVersion,"/node_metrics"):o||i?"".concat(e.apiVersion,"/persistentvolumeclaim_metrics"):s?"".concat(e.apiVersion,"/workload_metrics"):a?"".concat(e.apiVersion,"/namespace_metrics"):r?"".concat(e.apiVersion,"/workspace_metrics"):globals.app.isMultiCluster&&e.clusters?"".concat(e.apiVersion,"/cluster_metrics"):e.apiVersion},Object.keys(t).forEach((function(a){(0,N.default)((0,E.default)(e),a,t[a])})),e}return(0,y.default)(O,[{key:"setClusters",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.clusters=Array.isArray(e)?e:[]}},{key:"getBaseResourcesSummary",value:(i=(0,h.default)(o.default.mark((function e(){var t,a,r,n,l,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.clusters.map((function(e){return e.name})).join("|"),a=M.join("|"),r=this.getApi({}),this.baseResourcesSummary.isLoading=!0,e.next=6,(0,D.to)(request.get(r,{resources_filter:t,metrics_filter:a}));case 6:return n=e.sent,l=this.getResult(n),u=(0,k.getLastMonitoringData)(l),this.baseResourcesSummary.isLoading=!1,this.baseResourcesSummary.data=u,e.abrupt("return",u);case 12:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"fetchAllMetricsData",value:(l=(0,h.default)(o.default.mark((function e(){var t,a,r,n=this;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],A.forEach((function(e){var a,r=null===(a=n.clusters.map((function(e){return e.name})))||void 0===a?void 0:a.join("|"),l=Object.values(e)[0].join("|"),u=n.getApi({});t.push((0,D.to)(request.get(u,{resources_filter:r,metrics_filter:l})))})),this.monitorData.isLoading=!0,e.next=5,Promise.all(t);case 5:return a=e.sent,r=a.map((function(e,t){var a=(0,k.getLastMonitoringData)(n.getResult(e)),r=A.map((function(e){return Object.keys(e)[0]})),l={};return Object.entries(a).forEach((function(e){var t,a,r=(0,u.default)(e,2),n=r[0],o=r[1];l[n]=null!==(t=null==o||null===(a=o.value)||void 0===a?void 0:a[1])&&void 0!==t?t:0})),{resource:r[t],data:l}})),this.monitorData={isLoading:!1,data:r},e.abrupt("return",r);case 9:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"fetchAlertData",value:(r=(0,h.default)(o.default.mark((function e(t){var a,r,n,l,u,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Object.assign({},t),r=this.clusters.map((function(e){return e.name})),this.alertData.isLoading=!0,n=this.getParams(w({metrics:P,resources:r},a)),l=this.getApi({}),e.next=7,(0,D.to)(request.get(l,n));case 7:u=e.sent,i=this.getResult(u),this.alertData={isLoading:!1,data:i};case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"fetchPodData",value:(a=(0,h.default)(o.default.mark((function e(t){var a,r,l,u,i,c;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.fillZero,r=(0,n.default)(t,["fillZero"]),l=this.getParams(r),u=this.getApi({}),this.PodData.isLoading=!0,e.next=6,(0,D.to)(request.get(u,l));case 6:i=e.sent,c=this.getResult(i),this.PodData={isLoading:!1,data:a?(0,k.fillEmptyMetrics)(l,c):c};case 9:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchRoleAndMember",value:(t=(0,h.default)(o.default.mark((function e(){var t,a,r,n,l,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.clusters.map((function(e){return e.name})).join("|"),a=j.join("|"),r=this.getApi({}),this.roleAndMember.isLoading=!1,e.next=6,(0,D.to)(request.get(r,{resources_filter:t,metrics_filter:a}));case 6:n=e.sent,l=this.getResult(n),u=(0,k.getLastMonitoringData)(l),this.roleAndMember.isLoading=!1,this.roleAndMember.data=u;case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"kapis/monitoring.kubesphere.io/v1beta1"}}]),O}(T.default),c=(0,S.default)(i.prototype,"baseResourcesSummary",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{isLoading:!0,data:{}}}}),s=(0,S.default)(i.prototype,"monitorData",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{isLoading:!1,data:[]}}}),f=(0,S.default)(i.prototype,"roleAndMember",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],isLoading:!0}}}),d=(0,S.default)(i.prototype,"alertData",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{isLoading:!1,data:[]}}}),p=(0,S.default)(i.prototype,"PodData",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{isLoading:!1,data:[]}}}),m=(0,S.default)(i.prototype,"clusters",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,S.default)(i.prototype,"setClusters",[C.action],Object.getOwnPropertyDescriptor(i.prototype,"setClusters"),i.prototype),(0,S.default)(i.prototype,"getBaseResourcesSummary",[C.action],Object.getOwnPropertyDescriptor(i.prototype,"getBaseResourcesSummary"),i.prototype),(0,S.default)(i.prototype,"fetchAllMetricsData",[C.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchAllMetricsData"),i.prototype),(0,S.default)(i.prototype,"fetchAlertData",[C.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchAlertData"),i.prototype),(0,S.default)(i.prototype,"fetchPodData",[C.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchPodData"),i.prototype),(0,S.default)(i.prototype,"fetchRoleAndMember",[C.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchRoleAndMember"),i.prototype),i);t.default=L},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(84),a(73),a(18),a(4),a(316),a(23),a(24),a(17),a(136),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51));a(45),a(5),a(11),a(84),a(73),a(18),a(42),a(4),a(316),a(23),a(57),a(24),a(17),a(85),a(136);var c=r(a(0)),s=r(a(1)),f=r(a(3)),d=a(909),p=r(a(26)),m=r(a(63)),h=r(a(195)),v=r(a(2051)),g=a(186),y=r(a(841)),E=a(899),b=r(a(2054));function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var O=function(e,t){var a=(0,E.getAllYAMLValue)(e);return t&&1===a.length?a[0]:a},S=function(e){(0,u.default)(a,e);var t=_(a);function a(e){var r,l;return(0,n.default)(this,a),(r=t.call(this,e)).handleUpload=function(e){var t=new FileReader;t.onload=function(e){(0,m.default)(e.target.result)||(r.value=e.target.result,r.forceUpdate(),r.props.onChange&&r.props.onChange(r.value))},t.readAsText(e[0])},r.handleDownload=function(){var e,t=r.props,a=t.value,n=t.mode;if(a.metadata)e=a;else{var l=Object.values(a);l&&l[0]&&l[0].metadata&&(e=l[0])}var u=[(0,p.default)(e,"metadata.name","default"),(0,p.default)(e,"metadata.namespace",""),(0,p.default)(e,"kind","").toLowerCase()].filter((function(e){return e})).join(".");r.saveAsFile(r.value,"".concat(u,".").concat(n))},r.saveAsFile=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default.txt",a=new Blob([e],{type:"text/plain;charset=utf-8"});(0,d.saveAs)(a,t)},r.handleChange=function(e){r.value=e,"obj"===r.props.returnType?r.props.onChange&&r.props.onChange(O(r.value,!0)):r.props.onChange&&r.props.onChange(e)},r.getData=function(){return O(r.value,!!r.props.value.metadata)},r.value=(l=e.value,[void 0,null].includes(l)?"":(null==l?void 0:l.metadata)?(0,E.getValue)(l):(0,h.default)(l)?l:Object.values(l).map((function(e){return(0,E.getValue)(e||{})})).join("---\n")),r}return(0,l.default)(a,[{key:"options",get:function(){return{readOnly:this.props.readOnly,width:"100%",height:"100%"}}}]),(0,l.default)(a,[{key:"render",value:function(){var e=this.props,t=e.mode,a=e.className,r=e.editorClassName,n=e.readOnly;return c.default.createElement("div",{className:(0,f.default)(b.default.mode,a)},c.default.createElement("div",{className:(0,f.default)(b.default.edit,r)},c.default.createElement(y.default,{className:b.default.editor,mode:t,value:this.value,options:this.options,onChange:this.handleChange}),c.default.createElement("div",{className:b.default.ops,onClick:this.handleModeChange},!n&&c.default.createElement(c.default.Fragment,null,c.default.createElement(v.default,{fileTypes:[".yaml"],handleFiles:this.handleUpload},c.default.createElement(g.Icon,{name:"upload",size:20,color:{primary:"#fff",secondary:"#fff"},clickable:!0,changeable:!0})),c.default.createElement("span",{className:b.default.split},"|")),c.default.createElement(g.Icon,{name:"download",size:20,color:{primary:"#fff",secondary:"#fff"},onClick:this.handleDownload,clickable:!0,changeable:!0}))))}}]),a}(c.default.Component);t.default=S,S.propTypes={className:s.default.string,mode:s.default.string,value:s.default.oneOfType([s.default.object,s.default.arrayOf(s.default.object),s.default.string]),readOnly:s.default.bool},S.defaultProps={mode:"yaml",readOnly:!1}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l,u,o=r(a(44)),i=r(a(65)),c=r(a(36)),s=r(a(37)),f=r(a(88)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=(r(a(66)),a(14));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var y=(l=function(e){(0,d.default)(r,e);var t,a=g(r);function r(){var e;(0,c.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0){var a=Array.from({length:e.totalPage},(function(e,t){var a=++t;return{id:a,value:a}}));return a.length<=10?m.default.createElement(d.Menu,{className:(0,p.default)(g.default.menu)},m.default.createElement(m.default.Fragment,null,a.map((function(a){return m.default.createElement(d.Menu.MenuItem,{className:(0,p.default)(g.default.menuitem,(0,u.default)({},g.default.menuActive,t===a.value)),key:a.id,onClick:function(){return e.handlePageMenuClick(a.value)}},a.value)})))):m.default.createElement(d.Menu,{className:(0,p.default)(g.default.menu)},m.default.createElement(v.default,{data:a,key:"page-dropdown",itemKey:"id",height:160,itemHeight:32},(function(a){return m.default.createElement(d.Menu.MenuItem,{className:(0,p.default)(g.default.menuitem,(0,u.default)({},g.default.menuActive,t===a.value)),key:a.id,onClick:function(){return e.handlePageMenuClick(a.value)}},a.value)})))}return null},e.handlePageMenuClick=function(t){var a=e.props,r=a.onChange,n=a.limit;r&&r({page:Math.min(t,e.totalPage),limit:n})},e}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props.page;return m.default.createElement(d.Level,{className:g.default.wrapper},m.default.createElement(d.LevelLeft,null,this.renderPagesize()),m.default.createElement(d.LevelRight,null,m.default.createElement(d.LevelItem,{className:g.default.pagination},m.default.createElement(d.Button,{className:g.default.button,type:"flat",icon:"previous",iconSize:16,disabled:e<=1,onClick:this.handlePrev}),m.default.createElement(d.Dropdown,{placement:"bottom",trigger:"hover",content:this.renderPageDropDown()},m.default.createElement("div",{className:g.default.pages},m.default.createElement("span",null,e," / ",this.totalPage))),m.default.createElement(d.Button,{className:g.default.button,type:"flat",icon:"next",iconSize:16,disabled:e>=this.totalPage,onClick:this.handleNext}))))}},{key:"totalPage",get:function(){var e=this.props,t=e.total,a=e.limit,r=t%a;return 0===r?Math.max(t/a,1):(t-r)/a+1}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.limit!==t.pagesize?{pagesize:e.limit}:null}}]),r}(m.Component);a.default=E},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u-1}))}}]),r}(v.default.Component),R=(0,y.inject)("rootStore")((0,g.withRouter)(T));a.default=R;var w=T;a.Component=w},function(e,t,a){"use strict";a(15);var r=a(20);a(84),a(73),a(18),a(316),Object.defineProperty(t,"__esModule",{value:!0}),t.objectToYaml=t.getAllYAMLValue=t.getValueObj=t.getValue=void 0,a(84),a(73),a(18),a(28),a(191),a(159),a(10),a(316),a(85);var n=r(a(76)),l=r(a(195)),u=r(a(1268)),o=function(e){if((0,n.default)(e))try{return u.default.safeDump(JSON.parse(JSON.stringify(e)),{noRefs:!0})}catch(t){return console.error(t),JSON.stringify(e,null,2)}return String(e)};t.getValue=o;t.getValueObj=function(e){if(!(0,n.default)(e))try{return u.default.safeLoad(e)}catch(e){}return e};t.getAllYAMLValue=function(e){var t=[];try{u.default.safeLoadAll(e,(function(e){t.push(e)}),{noRefs:!0})}catch(e){}return t};t.objectToYaml=function(e){return[void 0,null].includes(e)?"":(null==e?void 0:e.metadata)?o(e):(0,l.default)(e)?e:Object.values(e).map((function(e){return o(e||{})})).join("---\n")}},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(30));a(5);var l=r(a(26)),u={},o={get:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.pathname;return(0,l.default)(u,"".concat(e,".").concat(t))},set:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:location.pathname;u[e]=(0,n.default)({},a,t)},delete:function(e){delete u[e]}};t.default=o},,function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Avatar",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Banner",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"Nav",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Bar",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"Breadcrumb",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Card",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"CodeEditor",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"Empty",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"Indicator",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"Label",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"List",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"Modal",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"Drawer",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"TypeSelect",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"Status",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"Steps",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(t,"Switch",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"Markdown",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"Upload",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"CheckableText",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(t,"Dragger",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(t,"ScrollLoad",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(t,"RadioGroup",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(t,"NotifyConfirm",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(t,"Panel",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"ToggleField",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"DataEmptyTip",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(t,"Progress",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"RecordSelect",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"SeverityTag",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(t,"Notify",{enumerable:!0,get:function(){return L.default}});var n=r(a(788)),l=r(a(2379)),u=r(a(2381)),o=r(a(1044)),i=r(a(2384)),c=r(a(801)),s=r(a(841)),f=r(a(846)),d=r(a(839)),p=r(a(1045)),m=r(a(812)),h=r(a(787)),v=r(a(1170)),g=r(a(816)),y=r(a(795)),E=r(a(1266)),b=r(a(850)),_=r(a(1001)),O=r(a(952)),S=r(a(1099)),C=r(a(1171)),D=r(a(863)),k=r(a(1314)),N=r(a(1102)),T=r(a(789)),R=r(a(790)),w=r(a(836)),I=r(a(1576)),M=r(a(1103)),P=r(a(1315)),A=r(a(1562)),j=r(a(880)),L=r(a(240))},,,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(16),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(28),a(42),a(16),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(30));a(41);var u,o=r(a(44)),i=r(a(36)),c=r(a(37)),s=r(a(55)),f=r(a(56)),d=r(a(51)),p=r(a(49)),m=r(a(26)),h=r(a(74)),v=a(14);function g(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function y(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getResourceUrl(t),"/").concat(t.name)},e.getKs8Url=function(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"api/v1".concat(e.getPath(a),"/").concat(e.module,"/").concat(null!==(t=a.name)&&void 0!==t?t:"")},e}return(0,c.default)(u,[{key:"fetchDetail",value:(r=(0,o.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get(this.getKs8Url(t));case 3:return a=e.sent,r=y(y({},t),this.mapper(a)),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"create",value:(a=(0,o.default)(n.default.mark((function e(t,a){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.submitting(request.post(this.getKs8Url(t),a)));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"update",value:(t=(0,o.default)(n.default.mark((function e(t,a){var r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get(this.getResourceUrl(t));case 2:return r=e.sent,(l=(0,m.default)(r,"metadata.resourceVersion"))&&(0,h.default)(a,"metadata.resourceVersion",l),e.abrupt("return",this.submitting(request.put(this.getKs8Url(t),a)));case 6:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})},{key:"patch",value:function(e,t){return this.submitting(request.patch(this.getKs8Url(e),t))}},{key:"delete",value:function(e){return this.submitting(request.delete(this.getKs8Url(e)))}}]),u}(r(a(68)).default),(0,p.default)(u.prototype,"fetchDetail",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchDetail"),u.prototype),(0,p.default)(u.prototype,"create",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"create"),u.prototype),(0,p.default)(u.prototype,"update",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"update"),u.prototype),(0,p.default)(u.prototype,"patch",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"patch"),u.prototype),(0,p.default)(u.prototype,"delete",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"delete"),u.prototype),u);t.default=b},,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(29),a(18),a(9),a(13),a(10),a(4),a(22),a(23),a(17),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(29),a(18),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(38),a(7),a(32);var n=r(a(43));a(41);var l,u=r(a(44)),o=r(a(30)),i=r(a(36)),c=r(a(37)),s=r(a(332)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=r(a(49)),h=a(14);function v(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function g(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.workspace,r="";return t&&(r+="/klusters/".concat(t)),a&&(r+="/workspaces/".concat(a)),r}},{key:"fetchDetail",value:(t=(0,o.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get(this.getDetailUrl(t),{},{},(function(){}));case 3:return a=e.sent,r=y(y({},t),this.mapper(a)),this.detail=r,this.isLoading=!1,e.abrupt("return",(0,v.default)(a,"status.total"));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"kapis/tenant.kubesphere.io/v1beta1"}}]),r}(m.default),(0,p.default)(u.prototype,"fetchDetail",[h.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchDetail"),u.prototype),u);t.default=b},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(73),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(73),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(61)),l=r(a(30)),u=r(a(58)),o=r(a(43));a(41);var i,c=r(a(44)),s=r(a(36)),f=r(a(37)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=r(a(26)),g=a(14),y=a(72);function E(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function b(e){for(var t=1;t0&&void 0!==h[0]?h[0]:{},a=t.cluster,r=t.workspace,l=t.namespace,i=t.more,c=t.devops,s=(0,u.default)(t,["cluster","workspace","namespace","more","devops"]),this.list.isLoading=!0,f=[],s.sortBy||void 0!==s.ascending||(s.sortBy=y.LIST_DEFAULT_ORDER[this.module]||"createTime"),s.limit!==1/0&&-1!==s.limit||(s.limit=-1,s.page=1),s.readyToUse&&f.push("status.readyToUse=".concat(s.readyToUse)),s.volumeSnapshotClassName&&(f.push("spec.volumeSnapshotClassName=".concat(s.volumeSnapshotClassName)),delete s.volumeSnapshotClassName),s.persistentVolumeClaimName&&(f.push("spec.source.persistentVolumeClaimName=".concat(s.persistentVolumeClaimName)),delete s.persistentVolumeClaimName),f=f.join(",")||void 0,s.fieldSelector=f,s.limit=s.limit||10,e.next=13,request.get(this.getResourceUrl({cluster:a,workspace:r,namespace:l,devops:c}),this.getFilterParams(s));case 13:return d=e.sent,p=((0,v.default)(d,"items")||[]).map((function(e){return b({cluster:a,namespace:l,workspace:r},m.mapper(e))})),this.list.update(b(b({data:i?[].concat((0,n.default)(this.list.data),(0,n.default)(p)):p,total:d.totalItems||d.totalCount||d.total_count||p.length||0},s),{},{limit:Number(s.limit)||10,page:Number(s.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",p);case 17:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"resourceKind",get:function(){return"VolumeSnapshot"}},{key:"apiVersion",get:function(){return"apis/snapshot.storage.k8s.io/v1"}}]),l}(r(a(68)).default),(0,h.default)(i.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),i);t.default=O},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(5),r(11),r(6),r(84),r(18),r(97),r(98),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(85),r(64),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(84),r(160),r(18),r(28),r(97),r(42),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(85),r(64),r(188),r(7);var u=l(r(61)),o=l(r(30)),i=l(r(36)),c=l(r(37)),s=l(r(55)),f=l(r(56)),d=l(r(51)),p=l(r(96)),m=l(r(246)),h=n(r(0)),v=l(r(3)),g=l(r(837)),y=l(r(454)),E=l(r(63)),b=l(r(972)),_=l(r(189)),O=l(r(1504)),S=l(r(26)),C=r(186),D=r(453),k=l(r(2471)),N=l(r(2473));function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t0?d:f,m=s.map((function(e){return R(R({},e),{},{value:e.key})})),g="tags"===i&&p.length>=5;return 0===m.length?h.default.createElement("div",{className:N.default.multi},h.default.createElement("div",{className:N.default.empty},t("NO_DATA_DESC"))):h.default.createElement("div",{className:N.default.multi},h.default.createElement(C.CheckboxGroup,{value:p,onChange:function(e){n.multiValues=(0,o.default)({},i,e),n.forceUpdate()}},m.map((function(e,t){var a=p.includes(e.key);return h.default.createElement(C.Checkbox,{className:(0,v.default)(N.default.option,(0,o.default)({},N.default.checked,a)),value:e.value,disabled:g&&!a,key:"".concat(e.value,"-").concat(t)},c?c(e):e.label)}))))},n.merageMultiTags=function(e){for(var t=[],a=0;a1&&(a=r+a-1),t.push(R(R({},n),{},{total:r}))}return t};var l=n.getSuggestions(e.columns),u=I(l,e.filters);return n.state={suggestions:l,activeSuggestion:null,optionVisible:!1,tags:u,activeTimeselector:!1,index:0},n.input=h.default.createRef(),n.filterInput=h.default.createRef(),n}return(0,c.default)(r,[{key:"componentDidUpdate",value:function(e){var t=this.state.suggestions;this.props.columns!==e.columns&&(t=this.getSuggestions(this.props.columns),this.setState({suggestions:t})),(0,g.default)(this.props.filters,e.filters)||this.setState({value:"",activeSuggestion:null,optionVisible:!1,tags:I(t,this.props.filters)})}},{key:"getSuggestions",value:function(e){var t=this.props,a=t.showTimeSelector,r=t.showKeywords,n=e.filter((function(e){return e.search&&e.dataIndex})).map((function(e){return{label:e.title,key:e.searchKey||e.dataIndex,options:e.filters&&e.filters.map((function(e){return{label:e.text,key:e.value}})),multi:e.multi,render:e.renderSearch}}));return a?[].concat((0,u.default)(n),[M]):r?[P].concat((0,u.default)(n)):n}},{key:"renderMenu",value:function(){var e=this.state,t=e.suggestions,a=e.tags,r=document.getElementsByClassName("table-body"),n=(0,S.default)(r,"[0].clientHeight","none"),l=t.filter((function(e){return e.multi||!a.some((function(t){return t.filter===e.key}))}));return l.length<1?null:h.default.createElement(C.Menu,{onClick:this.handleMenuClick,style:{maxHeight:n,overflowY:"auto"}},l.map((function(e){return h.default.createElement(C.Menu.MenuItem,{key:e.key,value:e},e.label)})))}},{key:"renderTags",value:function(){var e=this,t=this.state.tags;return this.merageMultiTags(t).map((function(t){return h.default.createElement(C.Tag,{key:"".concat(t.filter,"-").concat(t.value)},h.default.createElement("span",null,t.filterLabel,":",t.valueLabel),t.total>1&&h.default.createElement("span",{style:{marginLeft:"6px"}},"(+",t.total-1,")"),h.default.createElement(C.Icon,{name:"close",type:"light",clickable:!0,onClick:function(){return e.handleTagDelete(t)}}))}))}},{key:"renderInput",value:function(){var e,a=this.state,r=a.activeSuggestion,n=a.optionVisible,l=a.value,u=h.default.createElement(C.Input,{type:"text",innerRef:this.input,placeholder:t("SEARCH"),onChange:this.handleChange,onKeyUp:this.handleKeyUp,value:l||"",onFocus:this.handleFocus,onBlur:this.handleBlur});return r?r.options&&!r.multi?e=this.renderSuggestionOptions():r.options&&r.multi&&(e=this.renderMultiSuggestionOptions()):e=this.renderMenu(),e?h.default.createElement(C.Dropdown,{onClose:this.handleOnClose,theme:"dark",content:e,visible:n,closeAfterClick:!1},u):u}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.contentClassName,r=e.showTimeSelector,n=this.state,l=n.value,u=n.tags,i=n.activeTimeselector,c=!(0,E.default)(l)||!(0,E.default)(u);return h.default.createElement("div",{className:(0,v.default)(N.default.wrapper,(0,o.default)({},N.default.hasValue,c),t),ref:this.filterInput},h.default.createElement(C.Icon,{className:"is-left",name:"magnifier"}),h.default.createElement("div",{className:(0,v.default)(N.default.content,a)},this.renderTags(),this.renderInput()),c&&h.default.createElement(C.Icon,{className:"is-right",name:"close",clickable:!0,onClick:this.handleClear}),r&&h.default.createElement(k.default,{visible:i,onChange:this.handleTimeSelectorChange,onToggle:this.handleTimeSelectorToggle}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var a,r=(null===(a=e.filters)||void 0===a?void 0:a.__index)||0;return r!==t.index?{index:r,value:"",activeSuggestion:null,optionVisible:!1,tags:I(t.suggestions,e.filters)}:null}}]),r}(h.Component);a.default=A},function(e,a,r){"use strict";r(15);var n=r(20);r(73),r(18),r(16),r(24),r(64),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.checkRepoInvalidReason=a.compareVersion=a.downloadFileFromBase64=a.getAppCategoryNames=a.getVersionTypesName=a.transferReviewStatus=a.transferVersionStatus=a.transferAppStatus=void 0;var l=n(r(246));r(73),r(18),r(16),r(319),r(24),r(64);var u=n(r(451)),o=r(1049);a.transferAppStatus=function(e){return o.STATUS_TRANSFER_MAP[e]?t("APP_STATUS_".concat(o.STATUS_TRANSFER_MAP[e].toUpperCase().replace(/[^A-Z]+/g,"_"))):e};a.transferVersionStatus=function(e){return o.STATUS_TRANSFER_MAP[e]?"draft"===e?t("APP_STATUS_NOT_SUBMITTED"):t("APP_STATUS_".concat(o.STATUS_TRANSFER_MAP[e].toUpperCase().replace(/[^A-Z]+/g,"_"))):e};a.transferReviewStatus=function(e){var t;switch(e){case"submitted":t="to-be-reviewed";break;case"passed":case"suspended":case"rejected":case"active":t=e;break;default:t="in-review"}return t};a.getVersionTypesName=function(e){return e?e.split(",").map((function(e){return(0,u.default)(e)})).join(" "):"-"};a.getAppCategoryNames=function(e){var a,r,n,l,u=null==e||null===(a=e.metadata)||void 0===a||null===(r=a.annotations)||void 0===r?void 0:r["kubesphere.io/alias-name"];if(u)return u;var o=null==e||null===(n=e.metadata)||void 0===n?void 0:n.name;return"kubesphere-app-uncategorized"===o?t("APP_CATE_UNCATEGORIZED"):t("APP_CATE_".concat(null==o?void 0:o.toUpperCase().replace(/[^A-Z]+/g,"_")),{defaultValue:o||(null==e||null===(l=e.metadata)||void 0===l?void 0:l.name)})};a.downloadFileFromBase64=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,a=document.createElement("a");a.href="data:application/tar+gzip;base64,".concat(e),a.download="".concat(t,".tgz"),a.click()};a.compareVersion=function(e,t){if((0,l.default)(e)+(0,l.default)(t)!=="stringstring")return!1;for(var a=e.split("."),r=t.split("."),n=Math.max(a.length,r.length),u=0;u0||parseInt(a[u],10)>parseInt(r[u],10))return 1;if(r[u]&&!a[u]&&parseInt(r[u],10)>0||parseInt(a[u],10)0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat("put"===a?"/".concat(t.name):"","?dryRun=All")},e.checkValidDomain=function(t,a){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"post";return request[r](e.getValiddomainUrl(t,r),a,{headers:{"x-ignore-error-notify":!0}}).then((function(e){return 403===e.status?{exist:!0}:200===e.status?{exist:!1}:e}))},e}return a}(r(a(68)).default);t.default=c},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;uNumber(Object.values(t)[0])?ne(ne({},e),t):ne({},e):ne(ne({},e),t)}),{})},l.fetchQuota=(0,i.default)(o.default.mark((function e(){var t,a,r,n,u,i,c,s,f,d;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=l.namespace,r=l.props,n=r.cluster,u=r.projectDetail,i=r.isFederated,!(t=u?u.workspace:l.props.workspace)||!a){e.next=15;break}if(i){e.next=14;break}return e.next=7,l.singleClusterQuota(t,a,n);case 7:c=e.sent,s=c.workspaceQuota,f=c.namespaceQuota,d={workspace:s,namespace:f},l.setState({leftQuota:d,availableQuota:d}),e.next=15;break;case 14:l.multiClusterQuota(t,a);case 15:case"end":return e.stop()}}),e)}))),l.handleReplicaChange=function(e){l.setState({replicas:e})},l.handleClusterUpdate=function(){l.updateService()},l.showContainer=function(e){l.setState({showContainer:!0,selectContainer:e||{}})},l.hideContainer=function(){l.setState({showContainer:!1,selectContainer:{}})},l.updateTimeZone=function(e){var t=(0,b.default)(l.fedFormTemplate,"".concat(l.prefix,"spec.volumes"),[]);e.some((function(e){return(e.volumeMounts||[]).some((function(e){return"/etc/localtime"===e.mountPath}))}))?t.every((function(e){return"host-time"!==e.name}))&&t.push({hostPath:{path:"/etc/localtime",type:""},name:"host-time"}):t=t.filter((function(e){var t;return!("host-time"===e.name&&"/etc/localtime"===(null==e||null===(t=e.hostPath)||void 0===t?void 0:t.path))})),(0,w.default)(l.fedFormTemplate,"".concat(l.prefix,"spec.volumes"),t)},l.updatePullSecrets=function(){var e={},t="".concat(l.prefix,"spec.imagePullSecrets"),a="".concat(l.prefix,'metadata.annotations["kubesphere.io/imagepullsecrets"]'),r=(0,b.default)(l.fedFormTemplate,"".concat(l.prefix,"spec.containers"),[]),n=(0,b.default)(l.fedFormTemplate,"".concat(l.prefix,"spec.initContainers"),[]);(0,y.default)(r,n).forEach((function(t){t.pullSecret&&(e[t.name]=t.pullSecret),t.annotationOfImagePullSecrets&&delete t.annotationOfImagePullSecrets}));var u=(0,b.default)(l.fedFormTemplate,t,[]),o=(0,b.default)(l.fedFormTemplate,a,null);if(!(0,O.default)(e)){var i=Object.values(e).map((function(e){return{name:e}}));u=u.concat(i).reduce((function(e,t){return e.find((function(e){return e.name===t.name}))||e.push(t),e}),[])}var c=JSON.stringify(e);if(null!==o){var s=ne(ne({},JSON.parse(o)),e);c=JSON.stringify(s)}(0,w.default)(l.fedFormTemplate,t,u),(0,w.default)(l.fedFormTemplate,a,c)},l.updateService=function(){var e=l.props,t=e.formTemplate;if(e.withService){var a=(0,b.default)(l.fedFormTemplate,"".concat(l.prefix,"spec.containers"),[]),r=[];a.forEach((function(e){e.ports&&e.ports.forEach((function(e){e.servicePort&&r.push({name:e.name,protocol:e.protocol,port:e.servicePort,targetPort:e.containerPort})}))}));var n=t.Service,u=l.props.isFederated?"spec.template.":"";(0,w.default)(n,"".concat(u,"spec.ports"),r);var o=(0,b.default)(l.formTemplate,"metadata.labels",{}),i=(0,b.default)(l.fedFormTemplate,"".concat(l.prefix,"metadata.labels"),{});(0,w.default)(n,"metadata.labels",o),(0,w.default)(n,"".concat(u,"spec.selector"),(0,k.default)(i,"version"));var c=(0,b.default)(l.formTemplate,"spec.placement");c?(0,w.default)(n,"spec.placement",c):(0,I.default)(n,"spec.placement"),"statefulsets"===l.module?(0,w.default)(n,"".concat(u,"spec.clusterIP"),"None"):(0,I.default)(n,"".concat(u,"spec.clusterIP"))}},l.handleDelete=function(){l.updatePullSecrets(),l.updateService()},l.containersValidator=function(e,a,r){if((0,O.default)(a))return r({message:t("CONTAINER_EMPTY_DESC")});r()},l.state={showContainer:!1,selectContainer:{},limitRange:{},imageRegistries:[],replicas:l.getReplicas(),leftQuota:{}},l.module=["apptemplates","apptemplateversions"].includes(e.module)?"deployments":null!==(n=e.module)&&void 0!==n?n:"deployments";var u=(0,A.isEdgeWizePage)();return l.limitRangeStore=u?new V.default:new W.default,l.imageRegistryStore=u?new z.default:new L.default,l.quotaStore=u?new U.default:new q.default,l.workspaceQuotaStore=u?new B.default:new x.default,l.projectStore=u?new F.default:new H.default,e.isFederated&&(l.limitRangeStore=u?new G.default({module:l.limitRangeStore.module}):new Y.default({module:l.limitRangeStore.module}),l.imageRegistryStore=u?new G.default({module:l.imageRegistryStore.module}):new Y.default({module:l.imageRegistryStore.module})),l.handleContainer=l.handleContainer.bind((0,d.default)(l)),l.containerRef=v.default.createRef(),l}return(0,f.default)(r,[{key:"componentDidMount",value:function(){var e=this.props.store;this.fetchData(),this.fetchQuota(),this.props.withService&&this.initService(this.formTemplate),e.renderScheduleTab&&this.props.store.setMetadata(this.formTemplate.metadata)}},{key:"componentDidUpdate",value:function(){var e=this.containerRef.current,t=(0,b.default)(e,"state.error",null),a=(0,b.default)(this.props.formTemplate,"".concat(this.prefix,"spec.containers"),[]);t&&a.length>0&&e.setState({error:null})}},{key:"initService",value:function(){var e=(0,b.default)(this.formTemplate,"metadata.name"),t=(0,b.default)(this.props.formTemplate,"Service.metadata.name");e&&!t&&(t="".concat(e.slice(0,57),"-").concat((0,A.generateId)(4)),/^[a-z]/.test(t)||(t="s".concat(t)),(0,w.default)(this.props.formTemplate,"Service.metadata.name",t),(0,w.default)(this.props.formTemplate,'Service.metadata.annotations["kubesphere.io/alias-name"]',e),(0,w.default)(this.props.formTemplate,'Service.metadata.annotations["kubesphere.io/serviceType"]',"statefulservice"),(0,w.default)(this.fedFormTemplate,"spec.serviceName",t))}},{key:"fetchData",value:function(){var e=this,t=this.props,a=t.cluster,r=t.isFederated,n={cluster:a,namespace:(0,b.default)(this.formTemplate,"metadata.namespace")};Promise.all([this.limitRangeStore.fetchListByK8s(n),r?this.imageRegistryStore.fetchList(ne(ne({},n),{},{limit:-1,type:"kubernetes.io/dockerconfigjson"})):this.imageRegistryStore.fetchListByK8s(ne(ne({},n),{},{fieldSelector:"type=kubernetes.io/dockerconfigjson"}))]).then((function(t){var a=(0,u.default)(t,2),r=a[0],n=a[1];e.setState({limitRange:(0,b.default)(r,"[0].limit"),imageRegistries:n})}))}},{key:"handleContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,_.default)(e,"resources.limits")&&(e.resources.limits=(0,N.default)(e.resources.limits,O.default)),e.type=e.type||"worker";var t=(0,b.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.containers"),[]).map((function(e){return ne(ne({},e),{},{type:"worker"})})),a=(0,b.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.initContainers"),[]).map((function(e){return ne(ne({},e),{},{type:"init"})})),r=(0,y.default)(t,a),n=this.state.selectContainer,l=r.findIndex((function(e){return e.name===n.name}));l>-1?r[l]=e:r.push(e);var u=[],o=[];r.forEach((function(e){"worker"===e.type?(delete e.type,u.push(e)):(delete e.type,o.push(e))})),o.forEach((function(e){(0,A.cancelContainerDot)(e)})),u.forEach((function(e){(0,A.cancelContainerDot)(e)})),(0,w.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.containers"),u),(0,w.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.initContainers"),o),this.updateTimeZone(r),this.updatePullSecrets(),this.updateService(),this.hideContainer()}},{key:"renderContainerForm",value:function(e){var t=this.props,a=t.onlyDockerHub,r=t.withService,n=t.isFederated,u=t.cluster,o=t.supportGpuSelect,i=t.projectDetail,c=this.state,s=c.limitRange,f=c.imageRegistries,d=e.image?"Edit":"Add",p={limitRange:s,onlyDockerHub:a,imageRegistries:f};return v.default.createElement(Q.default,(0,l.default)({type:d,module:this.module,namespace:this.namespace,data:e,projectDetail:i,onSave:this.handleContainer,onCancel:this.hideContainer,withService:r,isFederated:n,workspaceQuota:this.workspaceQuota,cluster:u,supportGpuSelect:o,containers:this.containers,isEdit:this.props.isEdit,isEdgeWize:(0,A.isEdgeWizePage)()},p))}},{key:"renderDeployPlacementTip",value:function(){return v.default.createElement("div",{className:ae.default.tipBox},v.default.createElement("div",{className:ae.default.tipTitle},t("SPECIFY_REPLICAS")),v.default.createElement("p",null,t("SPECIFY_REPLICAS_DESC")),v.default.createElement("br",null),v.default.createElement("div",{className:ae.default.tipTitle},t("SPECIFY_WEIGHTS")),v.default.createElement("p",null,t("SPECIFY_WEIGHTS_DESC")))}},{key:"renderDeployPlace",value:function(){var e=this.props.projectDetail;return v.default.createElement(g.Form.Item,{className:"margin-b12",label:t("POD_REPLICAS"),tip:this.renderDeployPlacementTip()},v.default.createElement(K.default,{module:this.module,template:this.formTemplate,clusters:e.clusters,onClusterUpdate:this.handleClusterUpdate,omitAlias:12}))}},{key:"renderDeployMode",value:function(){var e=this.props.projectDetail;return v.default.createElement("div",{className:"margin-b12"},v.default.createElement("div",{className:ae.default.formTip},v.default.createElement("span",{className:ae.default.tipLabel},t("REPLICA_SCHEDULING_MODE")),v.default.createElement(g.Tooltip,{placement:"right",content:this.renderDeployPlacementTip()},v.default.createElement(g.Icon,{name:"question",size:"20"}))),v.default.createElement(g.Form.Item,null,v.default.createElement(K.default,{module:this.module,template:this.formTemplate,clusters:e.clusters,onClusterUpdate:this.handleClusterUpdate,store:this.props.store,omitAlias:12})))}},{key:"renderReplicasControl",value:function(){if("daemonsets"===this.module)return null;var e=this.props,t=e.isFederated,a=e.store,r=e.replicasExtraControl,n=e.isEdit;return t?a.renderScheduleTab?this.renderDeployMode():this.renderDeployPlace():v.default.createElement("div",{className:"margin-b12"},v.default.createElement(X.default,{module:this.module,replicas:this.state.replicas,template:this.formTemplate,replicasExtraControl:null==r?void 0:r({isEdit:n}),onChange:this.handleReplicaChange}))}},{key:"renderContainerList",value:function(){var e=this.props,a=e.isReadOnlyContainers,r=e.isShowAddContainer,n=(0,b.default)(this.fedFormTemplate,"".concat(this.prefix,"spec"));return v.default.createElement(g.Form.Item,{label:t("CONTAINERS"),rules:[{validator:this.containersValidator}],ref:this.containerRef},v.default.createElement($.default,{name:"".concat(this.prefix,"spec.containers"),onShow:this.showContainer,onDelete:this.handleDelete,specTemplate:n,leftQuota:this.state.leftQuota,projectDetail:this.props.projectDetail,replicas:this.state.replicas,isEdit:this.props.isEdit,isReadOnlyContainers:a,isShowAddContainer:r}))}},{key:"renderUpdateStrategy",value:function(){return v.default.createElement("div",{className:"margin-t12"},v.default.createElement(ee.default,{module:this.module,data:this.fedFormTemplate}))}},{key:"renderPodSecurityContext",value:function(){return v.default.createElement("div",{className:"margin-t12"},v.default.createElement(Z.default,{prefix:"".concat(this.prefix,"spec.securityContext")}))}},{key:"renderPodAffinity",value:function(){var e=this.props,t=e.cluster,a=e.namespace;return v.default.createElement("div",{className:"margin-b12"},v.default.createElement(j.default,{initial:!0,data:this.fedFormTemplate,module:this.module,cluster:t,namespace:a,checkable:!0}))}},{key:"renderTerminationSeconds",value:function(){return v.default.createElement("div",{className:"margin-b12"},v.default.createElement(g.Form.Group,{label:t("POD_GRACE_PERIOD"),desc:t("POD_GRACE_PERIOD_DESC"),keepDataWhenUnCheck:!0,checkable:!0},v.default.createElement(J.default,{prefix:this.prefix})))}},{key:"renderMetadata",value:function(){return v.default.createElement("div",{className:"margin-b12"},v.default.createElement(g.Form.Group,{label:t("ADD_METADATA"),desc:t("POD_ADD_METADATA_DESC"),keepDataWhenUnCheck:!0,checkable:!0},v.default.createElement(te.default,null)))}},{key:"render",value:function(){var e=this.props,t=e.formRef,a=e.className,r=this.state,n=r.showContainer,l=r.selectContainer,u=JSON.parse((0,b.default)(this.fedFormTemplate,'metadata.annotations["kubesphere.io/imagepullsecrets"]',"{}"));return n?this.renderContainerForm(ne(ne({},l),{},{annotationOfImagePullSecrets:u})):v.default.createElement(g.Form,{data:this.fedFormTemplate,ref:t,className:a},this.renderReplicasControl(),this.renderContainerList(),this.renderUpdateStrategy(),this.renderPodSecurityContext(),this.renderPodAffinity(),this.renderTerminationSeconds(),this.renderMetadata())}},{key:"prefix",get:function(){return this.props.prefix||"spec.template."}},{key:"namespace",get:function(){return(0,b.default)(this.formTemplate,"metadata.namespace")}},{key:"formTemplate",get:function(){var e=this.props.formTemplate,t=(0,b.default)(e,P.MODULE_KIND_MAP[this.module],e);return t.totalReplicas="",t}},{key:"fedFormTemplate",get:function(){return this.props.isFederated?(0,b.default)(this.formTemplate,"spec.template"):this.formTemplate}},{key:"workspaceQuota",get:function(){var e=(0,b.default)(this.state.availableQuota,"namespace",{}),t=(0,b.default)(this.state.availableQuota,"workspace",{});return(0,C.default)(e,t,(function(e,t){if(e||t)return(0,S.default)(e)?t:e0&&void 0!==f[0]?f[0]:{},a=t.cluster,t.namespace,r=t.module,l=(0,u.default)(t,["cluster","namespace","module"]),this.list.isLoading=!0,r&&(this.module=r),o="".concat(this.apiVersion,"/").concat(this.module).concat(l.dryRun?"?dryRun=All":""),e.next=6,request.get(o,l,{},(function(){return{items:[]}}));case 6:return i=e.sent,c=Array.isArray(i.items)?i.items.map((function(e){return g({cluster:a,module:r||s.module},s.mapper(e))})):[],this.list.update({data:c,total:i.items.length||0,isLoading:!1}),e.abrupt("return",c);case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(r(a(851)).default),(0,m.default)(o.prototype,"fetchListByK8s",[h.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchListByK8s"),o.prototype),o);t.default=E},,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(86),a(16),a(137),a(9),a(13),a(10),a(4),a(22),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(86),a(28),a(42),a(16),a(137),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(24),a(193),a(17),a(7);var n=r(a(30)),l=r(a(43)),u=r(a(58));a(41);var o,i,c,s,f,d,p,m,h,v=r(a(44)),g=r(a(65)),y=r(a(36)),E=r(a(37)),b=r(a(88)),_=r(a(55)),O=r(a(56)),S=r(a(51)),C=r(a(49)),D=(r(a(66)),a(14)),k=r(a(122)),N=a(440),T=a(916),R=a(327);function w(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function I(e){for(var t=1;t0&&void 0!==c[0]?c[0]:{},a=t.app_id,r=t.version_id,n=(0,u.default)(t,["app_id","version_id"]),this.isLoading=!0,this.filters=Object.assign(this.filters,n),e.next=5,request.get(this.getUrl({app_id:a,version_id:r}),this.filters,null,this.reject);case 5:(o=e.sent)&&(i=o.files||{},Object.keys(i).forEach((function(e){i[e]=(0,N.safeAtob)(i[e])})),this.files=i,this.isLoading=!1);case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(r(a(458)).default),i=(0,C.default)(o.prototype,"files",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),c=(0,C.default)(o.prototype,"isLoading",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),(0,C.default)(o.prototype,"fetch",[D.action],Object.getOwnPropertyDescriptor(o.prototype,"fetch"),o.prototype),s=(0,C.default)(o.prototype,"checkFile",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(e,t){var a=R.UPLOAD_CHECK_RULES[t];return a.format.test(e.name.toLocaleLowerCase())?e.size>a.size?"FILE_MAX_".concat(t.toLocaleUpperCase()):"":"FILE_FORMAT_".concat(t.toLocaleUpperCase())}}}),f=(0,C.default)(o.prototype,"handleFileByBase64Str",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(){var e=(0,v.default)(l.default.mark((function e(t,a){var r;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r=new FileReader).readAsDataURL(t,"UTF-8"),r.addEventListener("load",(0,v.default)(l.default.mark((function e(){var t,n;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.result,n=t.substring(t.indexOf(",")+1,t.length),e.next=4,a(n);case 4:case"end":return e.stop()}}),e)}))));case 3:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()}}),d=(0,C.default)(o.prototype,"validateImageSize",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(){var e=(0,v.default)(l.default.mark((function e(t){var a;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(a=new Image).src=t,e.abrupt("return",new Promise((function(e){a.addEventListener("load",(0,v.default)(l.default.mark((function t(){var r;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=!0,(a.width>96||a.height>96)&&(r=!1),e(r);case 3:case"end":return t.stop()}}),t)}))))})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}),p=(0,C.default)(o.prototype,"validatePackage",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,v.default)(l.default.mark((function t(a,r){var n,u,o;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.isSubmitting=!0,n={},r?(n.type="helm",n.package=a):(n.version_type="helm",n.version_package=a),u=r?"versions":"apps",t.next=6,request.post("".concat(e.getUrl({app_id:r,name:u}),"?validate=true"),n,{},e.reject);case 6:return o=t.sent,e.isSubmitting=!1,o&&o.name&&(o.base64Str=a),o&&o.error_details&&(o.missFile=(0,k.default)(o.error_details),o.error="MISS_FILE_NOTE"),t.abrupt("return",o);case 11:case"end":return t.stop()}}),t)})));return function(e,a){return t.apply(this,arguments)}}()}}),m=(0,C.default)(o.prototype,"uploadPackage",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(){var e=(0,v.default)(l.default.mark((function e(t){var a,r,n,u=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=u.length>1&&void 0!==u[1]?u[1]:{},r=u.length>2?u[2]:void 0,n=I({},a),"CREATE_APP"===t?n.version_package=a.base64Str:n.package=a.base64Str,delete n.base64Str,e.next=7,r(n);case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}),h=(0,C.default)(o.prototype,"downloadPackage",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return(0,v.default)(l.default.mark((function t(){var a,r,n,u,o,i,c=arguments;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>0&&void 0!==c[0]?c[0]:{},r=a.app_id,n=a.version_id,u=a.packageName,o=e.getUrl({app_id:r,version_id:n,name:"package"}),t.next=4,e.submitting(request.get(o));case 4:i=t.sent,(0,T.downloadFileFromBase64)(i.package,u);case 6:case"end":return t.stop()}}),t)})))}}),o);t.default=P},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(73),a(18),a(48),a(4),a(23),a(24),a(17),a(64),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var a="id-".concat(Math.random().toString(32).slice(2));return function(r){(0,u.default)(m,r);var f,d,p=(f=m,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,i.default)(f);if(d){var a=(0,i.default)(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return(0,o.default)(this,e)});function m(){return(0,n.default)(this,m),p.apply(this,arguments)}return(0,l.default)(m,[{key:"componentDidMount",value:function(){!function(e,t){!function(e,t){if(document.querySelector("#".concat(t)))return;var a=document.createElement("div");a.innerHTML='').concat(e,"");var r=a.getElementsByTagName("svg")[0];r&&r.innerHTML&&(r.setAttribute("aria-hidden","true"),r.style.position="absolute",r.style.width=0,r.style.height=0,r.style.overflow="hidden",n=r,(l=document.body).firstChild?l.insertBefore(n,l.firstChild):l.appendChild(n));var n,l}(e.map((function(e){var t=s.default[e];return t&&!document.querySelector("#icon-".concat(e.replace("_","-")))?t:""})).join("\n"),t)}(e,a)}},{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){return c.default.createElement(t,this.props)}}]),m}(c.default.Component)}};var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51));a(45),a(5),a(73),a(18),a(48),a(42),a(4),a(23),a(57),a(24),a(17),a(64);var c=r(a(0)),s=r(a(2771))},,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(22),a(23),a(57),a(17);var n=r(a(43)),l=r(a(58));a(41);var u,o,i=r(a(44)),c=r(a(65)),s=r(a(36)),f=r(a(88)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=(r(a(66)),a(14)),g=a(1049);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var E=(u=function(e){(0,d.default)(a,e);var t=y(a);function a(){var e;(0,s.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&void 0!==s[0]?s[0]:{},r=a.app_id,u=a.version_id,o=a.workspace,i=(0,l.default)(a,["app_id","version_id","workspace"]),c=e.getUrl({app_id:r,version_id:u,workspace:o,name:"action"}),t.next=4,e.submitting(request.post(c,i));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))}}),u);t.default=E},function(e,t,a){"use strict";a(15),a(10),Object.defineProperty(t,"__esModule",{value:!0}),t.UNIT_CONFIG=t.PIE_COLORS=t.AREA_COLORS=t.METER_RESOURCE_USAGE=t.FEE_CONFIG=t.LEVEL_CONFIG=t.MERTER_TYPE=t.METER_RESOURCE_USAGE_TITLE=t.METER_RESOURCE_TITLE=t.RESOURCE_TITLE=t.RESOURCES_TYPE=t.RESOURCES_METER_TYPE=t.CARD_CONFIG=void 0,a(10);t.CARD_CONFIG=[{icon:"cluster",subTitle:"CLUSTER_CONSUMPTION",type:"cluster",desc:"CLUSTER_CONSUMPTION_DESC",infos:["CLUSTER_RESOURCE_CONSUMPTION_DESC","CLUSTER_NODE_CONSUMPTION_DESC","CLUSTER_POD_CONSUMPTION_DESC"]},{icon:"enterprise",subTitle:"WORKSPACE_CONSUMPTION",type:"workspaces",desc:"WORKSPACE_CONSUMPTION_DESC",infos:["WORKSPACE_RESOURCE_CONSUMPTION_DESC","WORKSPACE_PROJECT_CONSUMPTION_DESC","PROJECT_CONSUMPTION_DESC"]}];t.RESOURCES_METER_TYPE={deployments:"workload",statefulsets:"workload",daemonsets:"workload",nodes:"node",workspaces:"workspace",namespaces:"namespace",applications:"application",openpitrixs:"application",services:"service",pods:"pod",cluster:"cluster"};t.RESOURCES_TYPE=["namespaces","applications","services","deployments","statefulsets","daemonsets","openpitrixs","nodes","pods"];t.RESOURCE_TITLE={nodes:"Cluster Node",pods:"Pod",openpitrixs:"App Template",applications:"Composing App",deployments:"Deployment",statefulsets:"StatefulSet",daemonsets:"DaemonSet",workspaces:"Workspace",cluster:"Cluster",namespaces:"Project",services:"Service"};t.METER_RESOURCE_TITLE={cpu:"CPU",memory:"Memory",disk:"Volumes",net_received:"Net Received",net_transmitted:"Net Transmitted"};var r={cpu:"Meter CPU Usage",memory:"Meter Memory Usage",disk:"Meter Volume Usage",net_received:"Meter Net Received Usage",net_transmitted:"Meter Net Transmitted Usage"};t.METER_RESOURCE_USAGE_TITLE=r;var n=Object.keys(r);t.MERTER_TYPE=n;t.LEVEL_CONFIG={openpitrix:[{type:"openpitrix",children:["service"]}],workspaces:[{type:"workspaces",children:["namespaces"]},{type:"namespaces",children:["applications","deployments","statefulsets","openpitrixs","daemonsets"],parent:["workspaces"]},{type:"applications",children:["deployments","statefulsets","daemonsets"],parent:["namespaces"]},{type:"openpitrixs",children:["deployments","statefulsets","daemonsets"],parent:["namespaces"]},{type:"services",children:["pods"],parent:["applications","namespaces","openpitrixs","daemonsets"]},{type:["deployments","statefulsets","daemonsets"],children:["pods"],parent:["applications","namespaces","openpitrixs"]},{type:"pods",parent:["deployments","statefulsets","namespaces","services","daemonsets"]}],cluster:[{type:"cluster",children:["nodes"]},{type:"nodes",children:["pods"],parent:["cluster"]},{type:"pods",parent:["nodes"]}]};t.FEE_CONFIG={cpu_per_core_per_hour:"cpu",egress_network_traffic_per_megabytes_per_hour:"net_transmitted",ingress_network_traffic_per_megabytes_per_hour:"net_received",mem_per_gigabytes_per_hour:"memory",pvc_per_gigabytes_per_hour:"disk",currency:"currency"};t.METER_RESOURCE_USAGE={cpu:"cpu_usage",memory:"memory_usage_wo_cache",net_received:"net_bytes_received",net_transmitted:"net_bytes_transmitted",disk:"pvc_bytes_total"};t.AREA_COLORS=["green","blue","yellow","red","darkestGreen","darkestBlue","darkestYellow","darkestRed","lightestGreen","lightestBlue","lightestYellow","lightestRed"];t.PIE_COLORS=["#3b747a","#479e88","#55bc8a","#a2d8bb","#326e93","#3385b0","#329dce","#7eb8dc","#c7deef","#8c3231","#ab2f29","#ca2621","#ea8573","#fae7e5","#8d663e","#e0992c","#f5a623","#ffc781","#ffe1be"];t.UNIT_CONFIG={cpu:{label:"Core",value:"core"},memory:{label:"Gi",value:"Gi"},number:{label:"M",value:"Mi"},disk:{label:"GB",value:"Gi"},net_received:{label:"M",value:"Mi"},net_transmitted:{label:"M",value:"Mi"}}},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(5),r(18),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(16),r(4),r(23),r(57),r(17);var u,o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=l(r(0)),p=r(239),m=r(433),h=n(r(321)),v=r(186),g=n(r(789)),y=n(r(814)),E=n(r(438)),b=n(r(437)),_=n(r(955)),O=n(r(999)),S=n(r(3896));function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var D=(0,p.observer)(u=function(e){(0,c.default)(r,e);var a=C(r);function r(){var e;(0,o.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/nodes").concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=function(t){var a=t.cluster;return"/kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath({cluster:a}),"/nodes")},e.createEdgeNode=function(){var t=(0,o.default)(u.default.mark((function t(a){var r,n,l,o,i,c,s,f,d,p;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,n=a.name,l=a.ip,o=a.defaultTaint,i=a.runtime,c=a.imageRepository,s=a.nodegroup,f="/kapis/infra.edgewize.io/v1alpha1".concat(e.getPath({cluster:r}),"/nodes/join"),d={node_name:n,node_ip:l,add_default_taint:o,runtime:i,"image-repository":c},s&&(d.node_group=s),t.next=6,request.get(f,d,{},(function(e){return e}));case 6:return p=t.sent,t.abrupt("return",p);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.getTreeNode=function(){var t=(0,o.default)(u.default.mark((function t(a){var r,n,o,i,c,s;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,n=a.nodetree,o=a.namespace,i=(0,l.default)(a,["cluster","nodetree","namespace"]),c="/clusters/".concat(r).concat(e.apiVersion,"/nodegroups/").concat(n,"/nodes"),t.next=4,request.get(c,i);case 4:return(s=t.sent).items=((0,m.default)(s,"items")||[]).map((function(e){return v(v({cluster:r,namespace:o},e),{},{name:e.metadata.name})})),t.abrupt("return",s);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.checkNodeGroupEdgeNode=function(){var t=(0,o.default)(u.default.mark((function t(a){var r,n,l,o;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,n=a.nodegroup,l=a.name,o="/clusters/".concat(r).concat(e.apiVersion,"/nodegroups/").concat(n,"/nodes/").concat(l),t.next=4,request.get(o);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.removeNodeGroupEdgeNode=function(){var t=(0,o.default)(u.default.mark((function t(a){var r,n,l,o;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,n=a.nodegroup,l=a.name,o="/clusters/".concat(r).concat(e.apiVersion,"/nodegroups/").concat(n,"/nodes/").concat(l),t.next=4,request.delete(o);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return(0,c.default)(a,[{key:"apiVersion",get:function(){return p.API_VERSIONS.nodegroups||""}}]),a}(r(a(856)).default);t.default=y},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(973)).default);t.default=c},function(e,a,r){"use strict";(function(e){var n=r(20);r(12),r(5),r(11),r(31),r(6),r(29),r(18),r(16),r(27),r(9),r(13),r(10),r(4),r(22),r(23),r(24),r(17),r(38),r(64),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(29),r(18),r(28),r(42),r(16),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(38),r(64),r(7),r(32);var l=n(r(43)),u=n(r(61)),o=n(r(30)),i=n(r(58));r(41);var c,s,f,d,p,m,h,v,g,y,E=n(r(44)),b=n(r(65)),_=n(r(36)),O=n(r(37)),S=n(r(88)),C=n(r(55)),D=n(r(56)),k=n(r(51)),N=n(r(49)),T=(n(r(66)),n(r(26))),R=n(r(135)),w=n(r(74)),I=r(14),M=r(72),P=n(r(68)),A=n(r(120)),j=n(r(2749));function L(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"kapis/tenant.kubesphere.io/v1beta1".concat(e.getPath(t),"/").concat(e.module)},e.getResourceUrl=function(){return"/kapis/infra.edgewize.io/v1alpha1/edgeclusters"},e.getListResourceUrl=function(){return"/kapis/tenant.kubesphere.io/v1beta1/clusters"},e.getDetailUrl=function(e){var t=e.name;return"/apis/cluster.kubesphere.io/v1alpha1/clusters/".concat(t)},e.getEdgeDetailUrl=function(e){var t=e.name;return"/apis/infra.edgewize.io/v1alpha1/clusters/".concat(t)},e.getListUrl=function(e){var t=e.name;return"/kapis/infra.edgewize.io/v1alpha1/edgeclusters/".concat(t)},(0,b.default)(e,"createWithKubeConfig",g,(0,S.default)(e)),(0,b.default)(e,"delete",y,(0,S.default)(e)),e}return(0,O.default)(P,[{key:"setProject",value:function(e){this.project=e}},{key:"fetchList",value:(N=(0,E.default)(l.default.mark((function e(){var t,a,r,n,o,c=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=c.length>0&&void 0!==c[0]?c[0]:{}).from,a=t.more,r=(0,i.default)(t,["from","more"]),this.list.isLoading=!0,r.sortBy||void 0!==r.ascending||(r.sortBy=M.LIST_DEFAULT_ORDER[this.module]||"createTime"),r.limit!==1/0&&-1!==r.limit||(r.limit=-1,r.page=1),r.limit=r.limit||10,e.next=7,request.get(this.getListResourceUrl({}),x(x({},r),{},{labelSelector:"cluster-role.kubesphere.io/edge"}));case 7:return n=e.sent,o=(0,T.default)(n,"items",[]).map(this.mapper),this.list.update(x(x({data:a?[].concat((0,u.default)(this.list.data),(0,u.default)(o)):o,total:n.totalItems||n.total_count||o.length||0},r),{},{limit:Number(r.limit)||10,page:Number(r.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)}))),function(){return N.apply(this,arguments)})},{key:"fetchDetail",value:(k=(0,E.default)(l.default.mark((function t(a){var r,n;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.isLoading=!0,globals.app.isMultiCluster){t.next=5;break}r=this.mapper((0,R.default)(M.DEFAULT_CLUSTER)),t.next=9;break;case 5:return t.next=7,request.get(this.getDetailUrl(a),null,null,(function(t,a){"Not Found"===a.reason&&e.navigateTo("/404")}));case 7:n=t.sent,r=x(x({},a),this.mapper(n));case 9:return this.detail=r,this.isLoading=!1,t.abrupt("return",r);case 12:case"end":return t.stop()}}),t,this)}))),function(e){return k.apply(this,arguments)})},{key:"fetchProjects",value:(D=(0,E.default)(l.default.mark((function e(){var t,a,r,n,o,c,s,f=this,d=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},a=t.cluster,r=t.namespace,n=t.more,o=(0,i.default)(t,["cluster","namespace","more"]),this.projects.isLoading=!0,o.sortBy||void 0!==o.ascending||(o.sortBy=M.LIST_DEFAULT_ORDER[this.module]||"createTime"),o.limit!==1/0&&-1!==o.limit||(o.limit=-1,o.page=1),o.limit=o.limit||10,e.next=7,request.get("/kapis/resources.kubesphere.io/v1alpha3".concat(this.getPath({cluster:a,namespace:r}),"/namespaces"),x({labelSelector:"!kubesphere.io/devopsproject"},o));case 7:c=e.sent,s=(0,T.default)(c,"items",[]).map((function(e){return x({cluster:a},f.mapper(e))})),this.projects.update(x(x({data:n?[].concat((0,u.default)(this.projects.data),(0,u.default)(s)):s,total:c.totalItems||c.total_count||s.length||0},o),{},{limit:Number(o.limit)||10,page:Number(o.page)||1,isLoading:!1},this.projects.silent?{}:{selectedRowKeys:[]}));case 10:case"end":return e.stop()}}),e,this)}))),function(){return D.apply(this,arguments)})},{key:"fetchClusterConfigz",value:(c=(0,E.default)(l.default.mark((function e(t){var a;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,e.next=3,this.fetchDetail({name:a});case 3:return(0,w.default)(globals,"edgeClusterConfig.".concat(a),this.detail.configz),e.abrupt("return",""!==(0,T.default)(this.detail.configz,"ksVersion",""));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"fetchKubeEdgeIp",value:(o=(0,E.default)(l.default.mark((function e(){var t,a;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get("/kapis/infra.edgewize.io/v1alpha1/config");case 2:return t=e.sent,a=(0,T.default)(t,"data.advertiseAddress",[]),e.abrupt("return",a);case 5:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)})},{key:"validate",value:(n=(0,E.default)(l.default.mark((function e(a){var r=this;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isValidating=!0,e.next=3,request.post("".concat(this.getResourceUrl(),"/validation"),a,{},(function(e,a){if(430!==e.status)return r.isValidating=!1,window.onunhandledrejection({status:400,reason:t("VALIDATION_FAILED"),message:a.message}),Promise.reject()}));case 3:this.isValidating=!1;case 4:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"batchDelete",value:function(e){var t=this;return this.submitting(Promise.all(e.map((function(e){var a=t.list.data.find((function(t){return t.name===e}));return request.delete(t.getListUrl(a))}))))}},{key:"checkName",value:function(e,t){var a=this.getDetailUrl(e);return request.get(a,x({},t),{headers:{"x-check-exist":!0}})}},{key:"fetchVersion",value:(r=(0,E.default)(l.default.mark((function e(t){var a,r;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,e.next=3,request.get("kapis/clusters/".concat(a,"/version").replace("/clusters/default",""));case 3:r=e.sent,this.version=(0,T.default)(r,"kubernetes.gitVersion");case 5:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})}]),P}(P.default),s=(0,N.default)(c.prototype,"initializing",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),f=(0,N.default)(c.prototype,"isAgentLoading",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),d=(0,N.default)(c.prototype,"agent",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),p=(0,N.default)(c.prototype,"isValidating",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),m=(0,N.default)(c.prototype,"isSubmitting",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),h=(0,N.default)(c.prototype,"version",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),v=(0,N.default)(c.prototype,"project",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),(0,N.default)(c.prototype,"setProject",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"setProject"),c.prototype),(0,N.default)(c.prototype,"fetchList",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchList"),c.prototype),(0,N.default)(c.prototype,"fetchDetail",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchDetail"),c.prototype),(0,N.default)(c.prototype,"fetchProjects",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchProjects"),c.prototype),(0,N.default)(c.prototype,"fetchClusterConfigz",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchClusterConfigz"),c.prototype),(0,N.default)(c.prototype,"fetchKubeEdgeIp",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchKubeEdgeIp"),c.prototype),(0,N.default)(c.prototype,"validate",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"validate"),c.prototype),g=(0,N.default)(c.prototype,"createWithKubeConfig",[I.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t,a){var r=a.name;return request.post("".concat(e.getResourceUrl(),"/").concat(r),t)}}}),y=(0,N.default)(c.prototype,"delete",[I.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){return e.submitting(request.delete("".concat(e.getResourceUrl(),"/").concat(t.name)))}}}),(0,N.default)(c.prototype,"batchDelete",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"batchDelete"),c.prototype),(0,N.default)(c.prototype,"checkName",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"checkName"),c.prototype),(0,N.default)(c.prototype,"fetchVersion",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchVersion"),c.prototype),c);a.default=z}).call(this,r(69))},,,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(30)),l=r(a(43));a(41);var u,o,i,c=r(a(44)),s=r(a(65)),f=r(a(36)),d=r(a(37)),p=r(a(88)),m=r(a(55)),h=r(a(56)),v=r(a(51)),g=r(a(49)),y=(r(a(66)),a(14)),E=a(52),b=a(794),_=r(a(845));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){for(var t=1;t0&&void 0!==a[0]?a[0]:{},this.alertData.isLoading=!0,e.next=4,this.fetchMetrics(S({metrics:D},t));case 4:this.alertData={isLoading:!1,data:this.data};case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),n}(_.default),o=(0,g.default)(u.prototype,"baseResourcesSummary",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{isLoading:!0,data:{}}}}),i=(0,g.default)(u.prototype,"alertData",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{isLoading:!1,data:{}}}}),(0,g.default)(u.prototype,"getBaseResourcesSummary",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"getBaseResourcesSummary"),u.prototype),(0,g.default)(u.prototype,"fetchAlertData",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchAlertData"),u.prototype),u);t.default=k},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(86),r(18),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(24),r(17),r(64),r(7),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(86),r(160),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(319),r(22),r(23),r(57),r(24),r(17),r(64),r(7),r(110);var l=n(r(43)),u=n(r(30)),o=n(r(58));r(41);var i,c,s,f,d,p,m,h,v,g,y,E,b,_,O,S,C,D,k,N,T=n(r(44)),R=n(r(65)),w=n(r(36)),I=n(r(37)),M=n(r(88)),P=n(r(55)),A=n(r(56)),j=n(r(51)),L=n(r(49)),x=(n(r(66)),r(909)),U=n(r(135)),z=n(r(26)),F=n(r(60)),G=n(r(63)),V=n(r(189)),B=n(r(74)),Y=r(14),W=r(52),q=n(r(201)),H=n(r(323));function Q(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function K(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default.txt",a=new Blob([e],{type:"text/plain;charset=utf-8"});(0,x.saveAs)(a,t)},e}return(0,I.default)(de,[{key:"getPipelineUrl",value:function(e){var t=e.cluster,a=e.devops,r=e.name;return"".concat(this.getDevopsUrlV2({cluster:t,devops:a||this.devops}),"pipelines/").concat(decodeURIComponent(r),"/")}},{key:"fetchList",value:(se=(0,T.default)(l.default.mark((function e(){var t,a,r,n,u,i,c,s,f,d,p,m,h,v,g,y,E,b=this,_=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=_.length>0&&void 0!==_[0]?_[0]:{},r=a.devops,a.workspace,n=a.devopsName,u=a.silent,i=a.cluster,c=(0,o.default)(a,["devops","workspace","devopsName","silent","cluster"]),u||(this.list.isLoading=!0),s=c.page,f=c.limit,d=c.name,p=c.filter,m=c.type,h=c.ascending,v=d?"".concat(encodeURIComponent(d)):void 0,g="".concat(this.getBaseUrl({cluster:i,devops:r}),"pipelines"),e.next=7,request.get(g,{page:s||1,limit:f||10,name:v,filter:p||void 0,type:m||void 0,ascending:h},{params:K({},c)});case 7:y=e.sent,E=(null!==(t=y.items)&&void 0!==t?t:[]).filter((function(e){return!e.metadata.deletionTimestamp})).map((function(e){return K({},b.mapper(e))})),this.setDevops(r),this.devopsName=n,this.list={data:E||[],total:y.totalItems||0,limit:parseInt(f,10)||10,page:parseInt(s,10)||1,filters:(0,V.default)(c,"devops","ascending"),selectedRowKeys:[],isLoading:!1};case 12:case"end":return e.stop()}}),e,this)}))),function(){return se.apply(this,arguments)})},{key:"fetchDetail",value:(ce=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,o,i;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.name,n=t.isSilent,u=t.devops,n||(this.isLoading=!0),e.next=4,request.get("".concat(this.getBaseUrl({devops:u,cluster:a})).concat(this.module,"/").concat(r));case 4:return o=e.sent,i=this.mapper(o),this.setPipelineConfig(o),this.detail=i,this.isLoading=!1,e.abrupt("return",i);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return ce.apply(this,arguments)})},{key:"fetchDetailUntilEditModeNull",value:(ie=(0,T.default)(l.default.mark((function e(a){var r,n,u,o=this;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.cluster,n=a.name,u=a.devops,e.abrupt("return",new Promise((function(e,a){var i=setTimeout((function(){clearTimeout(o.timer),clearTimeout(i),a(t("CONNECTION_TIMEOUT"))}),6e4),c=function(){var t=(0,T.default)(l.default.mark((function t(){var a,s;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,request.get("".concat(o.getBaseUrl({devops:u,cluster:r})).concat(o.module,"/").concat(n));case 2:a=t.sent,s=o.mapper(a),clearTimeout(o.timer),(0,z.default)(s,"annotations['pipeline.devops.kubesphere.io/jenkinsfile.edit.mode']")?o.timer=setTimeout(c,1e3):(clearTimeout(i),e(s));case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();c()})));case 2:case"end":return e.stop()}}),e)}))),function(e){return ie.apply(this,arguments)})},{key:"checkPipelineName",value:(oe=(0,T.default)(l.default.mark((function e(t){var a,r,n,u=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.name,r=t.cluster,n=t.devops,u.length>1&&void 0!==u[1]&&!u[1]){e.next=6;break}return e.next=5,request.get(this.getPipelineUrl({cluster:r,name:a,devops:n}),{},{headers:{"x-check-exist":!0}});case 5:return e.abrupt("return",e.sent);case 6:return e.next=8,request.get("/kapis/devops.kubesphere.io/v1alpha2".concat(this.getPath({cluster:r,devops:n}),"/pipelines/").concat(a),{check:!0});case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return oe.apply(this,arguments)})},{key:"getJenkinsFile",value:(ue=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,o,i=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.cluster,r=t.name,n=t.devops,u=i.length>1&&void 0!==i[1]&&i[1],this.pipelineJsonData.isLoading=!0,e.t0=u,!e.t0){e.next=7;break}return e.next=7,this.fetchDetail({cluster:a,name:r,devops:n});case 7:this.jenkinsFile=(0,z.default)(this.pipelineConfig,"spec.pipeline.jenkinsfile",""),o=(0,z.default)(this.pipelineConfig,"metadata.annotations['pipeline.devops.kubesphere.io/jenkinsfile']"),this.pipelineJsonData={pipelineJson:o?{json:JSON.parse(o)}:void 0,isLoading:!1};case 10:case"end":return e.stop()}}),e,this)}))),function(e){return ue.apply(this,arguments)})},{key:"setPipelineJsonData",value:function(e){this.pipelineJsonData={pipelineJson:e?{json:JSON.parse(e)}:void 0,isLoading:!1}}},{key:"convertJenkinsFileToJson",value:(le=(0,T.default)(l.default.mark((function e(t,a,r,n,u){var o,i,c,s;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u&&(this.isSubmitting=!0),o=a&&"default"!==a?"/klusters/".concat(a):"",e.next=4,request.put("/kapis/devops.kubesphere.io/v1alpha3".concat(o,"/namespaces/").concat(r,"/pipelines/").concat(n,"/jenkinsfile?mode=raw"),{data:t},{headers:{"content-type":"application/json"}});case 4:return i="raw",e.prev=5,e.next=8,this.fetchDetailUntilEditModeNull({cluster:a,devops:r,name:n});case 8:s=e.sent,c=(0,z.default)(s,'annotations["pipeline.devops.kubesphere.io/jenkinsfile"]'),i="",e.next=17;break;case 13:e.prev=13,e.t0=e.catch(5),i="raw",c=void 0;case 17:return e.prev=17,u&&(this.isSubmitting=!1),e.finish(17);case 20:return e.abrupt("return",{mode:i,jsonData:c});case 21:case"end":return e.stop()}}),e,this,[[5,13,17,20]])}))),function(e,t,a,r,n){return le.apply(this,arguments)})},{key:"getPullRequest",value:(ne=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,i,c,s,f,d;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.name,r=t.devops,t.workspace,n=t.cluster,u=(0,o.default)(t,["name","devops","workspace","cluster"]),i=decodeURIComponent(a),c=u.page,s=u.limit,f=void 0===s?10:s,!(0,G.default)(this.detail)){e.next=6;break}return e.next=6,this.fetchDetail({name:i,devops:r});case 6:return e.next=8,request.get("".concat(this.getBaseUrl({cluster:n,namespace:r}),"pipelines/").concat(decodeURIComponent(a),"/branches"),{filter:"pull-requests",page:c||1,limit:f});case 8:d=e.sent,Array.isArray(d.items)&&d.items.forEach((function(e){e.id=e.latestRun.endTime})),this.pullRequestList={data:d.items||[],total:d.totalItems||0,limit:f,page:parseInt(c,10)||1,filters:(0,V.default)(u,"devops"),isLoading:!1,selectedRowKeys:[]};case 11:case"end":return e.stop()}}),e,this)}))),function(e){return ne.apply(this,arguments)})},{key:"getBranches",value:(re=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,i,c,s,f,d,p;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.cluster,r=t.devops,n=t.name,u=t.branch,i=(0,o.default)(t,["cluster","devops","name","branch"]),c=decodeURIComponent(n),s=i.page,f=i.limit,d=void 0===f?10:f,!(0,G.default)(this.detail)){e.next=6;break}return e.next=6,this.fetchDetail({cluster:a,name:c,devops:r});case 6:return e.next=8,request.get("".concat(this.getBaseUrl({cluster:a,namespace:r}),"pipelines/").concat(decodeURIComponent(n),"/branches"),{filter:"origin",page:s||1,limit:d,branch:encodeURIComponent(u)});case 8:p=e.sent,this.branchList={data:p.items||[],limit:d,total:p.totalItems||0,page:parseInt(s,10)||1,filters:(0,V.default)(i,"devops"),isLoading:!1,selectedRowKeys:[]};case 10:case"end":return e.stop()}}),e,this)}))),function(e){return re.apply(this,arguments)})},{key:"getActivities",value:(ae=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,i,c,s,f,d,p,m,h;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.name,r=t.branch,n=t.devops,u=t.cluster,i=t.backward,c=void 0!==i&&i,s=(0,o.default)(t,["name","branch","devops","cluster","backward"]),a=decodeURIComponent(a),f=s.page,d=s.limit,p=void 0===d?10:d,!(0,G.default)(this.detail)){e.next=6;break}return e.next=6,this.fetchDetail({cluster:u,name:a,devops:n});case 6:return m={page:f||1,limit:p,branch:r,backward:c},f<0&&(delete m.page,delete m.limit),e.next=10,request.get("".concat(this.getBaseUrl({cluster:u,namespace:n}),"pipelines/").concat(a,"/pipelineruns"),K({},m));case 10:return h=e.sent,(0,F.default)(h)&&(h=h.filter((function(e){return e._links}))),!1===c&&!(0,G.default)(h)&&(0,F.default)(h.items)&&(h.items=h.items.map((function(e){var t,a=(0,W.safeParseJSON)((0,z.default)(e,"metadata.annotations.['devops.kubesphere.io/jenkins-pipelinerun-status']"),{});return K(K({},a),{},{id:null!==(t=a.id)&&void 0!==t?t:(0,z.default)(e,'metadata.annotations["devops.kubesphere.io/jenkins-pipelinerun-id"]'),uid:e.metadata.uid,_originData:e})}))),this.activityList={limit:p,data:h.items||[],total:h.totalItems||0,page:parseInt(f,10)||1,filters:(0,V.default)(s,"devops"),isLoading:!1,selectedRowKeys:[]},e.abrupt("return",h.items);case 15:case"end":return e.stop()}}),e,this)}))),function(e){return ae.apply(this,arguments)})},{key:"getBranchDetail",value:(te=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,o;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.devops,r=t.cluster,n=t.name,u=t.branch,e.prev=1,e.next=4,request.get("".concat(this.getBaseUrl({cluster:r,namespace:a}),"pipelines/").concat(decodeURIComponent(n),"/branches/").concat(encodeURIComponent(u)));case 4:return(o=e.sent).name&&(this.branchDetail=o),e.abrupt("return",o);case 9:return e.prev=9,e.t0=e.catch(1),e.abrupt("return",[]);case 12:case"end":return e.stop()}}),e,this,[[1,9]])}))),function(e){return te.apply(this,arguments)})},{key:"handleActivityReplay",value:(ee=(0,T.default)(l.default.mark((function e(t,a){var r,n,u,o;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.url,n=t.devops,u=t.name,o=t.cluster,e.next=3,request.post("".concat(this.getPipelineUrl({cluster:o,devops:n,name:u})).concat(r,"/replay/"),void 0,void 0,a);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return ee.apply(this,arguments)})},{key:"handleActivityStop",value:($=(0,T.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.url,r=t.devops,n=t.name,u=t.cluster,e.next=3,request.post("".concat(this.getPipelineUrl({cluster:u,devops:r,name:n})).concat(a,"/stop/?blocking=true&timeOutInSecs=10"));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return $.apply(this,arguments)})},{key:"runBranch",value:(X=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,o,i,c,s=this;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.devops,n=t.name,u=t.branch,o=t.parameters,i="".concat(this.getBaseUrl({cluster:a,namespace:r}),"pipelines/").concat(n,"/pipelineruns").concat(u?"?branch=".concat(encodeURIComponent(u)):""),c=(0,G.default)(o)?{parameters:[]}:{parameters:o},e.next=5,request.post(i,c).then((function(){setTimeout((function(){s.fetchDetail({cluster:a,devops:r,name:n,isSilent:!0})}),1e3)}));case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return X.apply(this,arguments)})},{key:"getPipeLineConfig",value:function(){var e=(0,U.default)((0,Y.toJS)(this.pipelineConfig));return delete(e=K(K({},(0,Y.toJS)(e.spec)),(0,Y.toJS)(e))).spec,delete e.kind,delete e.apiVersion,e}},{key:"setDevops",value:function(e){this.devops=e}},{key:"createPipeline",value:(Q=(0,T.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.data,r=t.devops,n=t.cluster,a.kind="Pipeline",a.apiVersion="devops.kubesphere.io/v1alpha3",u="".concat(this.getBaseUrl({devops:r,cluster:n}),"pipelines"),e.next=6,request.post(u,a);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return Q.apply(this,arguments)})},{key:"updatePipeline",value:(H=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,o;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.data,n=t.devops,r.kind="Pipeline",r.apiVersion="devops.kubesphere.io/v1alpha3",u="".concat(this.getBaseUrl({devops:n,cluster:a}),"pipelines/").concat(r.metadata.name),e.next=6,request.put(u,r);case 6:return o=e.sent,this.setPipelineConfig(o),e.abrupt("return",o);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return H.apply(this,arguments)})},{key:"updateJenkinsFile",value:function(e){var t=(0,U.default)((0,Y.toJS)(this.pipelineConfig));(0,B.default)(t,"spec.pipeline.jenkinsfile",e),this.setPipelineConfig(t)}},{key:"delete",value:(L=(0,T.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.devops,n=t.cluster,u="".concat(this.getBaseUrl({devops:r,cluster:n}),"pipelines/").concat(a),e.next=4,request.delete(u);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"scanRepository",value:(j=(0,T.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.devops,r=t.name,n=t.cluster,u={},e.next=4,request.defaults({method:"POST",url:"".concat(this.getPipelineUrl({cluster:n,devops:a||this.devops,name:r||this.detail.name}),"scan"),options:u,handler:function(e){return e.text().then((function(){if(e.redirected)return"Scan success"}))}});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return j.apply(this,arguments)})},{key:"getRepoScanLogs",value:(A=(0,T.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.devops,r=t.name,n=t.cluster,e.next=3,request.get("".concat(this.getPipelineUrl({cluster:n,name:r,devops:a}),"consolelog"));case 3:u=e.sent,this.repositoryLog=u;case 5:case"end":return e.stop()}}),e,this)}))),function(e){return A.apply(this,arguments)})},{key:"checkCron",value:(i=(0,T.default)(l.default.mark((function e(t){return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get("".concat(this.getDevopsUrlV2(),"check/cron?value=").concat(t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"checkScriptCompile",value:(u=(0,T.default)(l.default.mark((function e(t,a){var r,n,u,o;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.devops,n=t.pipeline,u=t.value,o=t.cluster,e.abrupt("return",request.post("".concat(this.getPipelineUrl({cluster:o,name:n,devops:r}),"checkScriptCompile"),{value:u},Z,a));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getBranchLists",value:(n=(0,T.default)(l.default.mark((function e(t){var a,r,n,u,i,c,s;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.devops,r=t.name,t.workspace,n=t.cluster,u=(0,o.default)(t,["devops","name","workspace","cluster"]),i=u.page,c=u.limit,s=void 0===c?10:c,e.next=4,request.get("".concat(this.getPipelineUrl({cluster:n,name:r,devops:a}),"branches/"),{filter:"origin",start:(i-1)*s||0,limit:s});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getPipelineTemplateList",value:(r=(0,T.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="zh"===(0,q.default)("lang")?"ZH":"EN",e.next=3,request.get("".concat(this.getBaseUrl(t),"clustertemplates?limit=100"));case 3:return r=e.sent,n=r.items,u=(void 0===n?[]:n).map((function(e){var t={},r=(0,z.default)(e,"metadata.annotations",{}),n=r["devops.kubesphere.io/icon"];return t.type=e.metadata.name,t.desc=r["devops.kubesphere.io/description".concat(a)]||r["devops.kubesphere.io/descriptionEN"],t.title=r["devops.kubesphere.io/displayName".concat(a)]||r["devops.kubesphere.io/displayNameEN"]||r.displayNameEN,t.image=n&&n.indexOf("http")>-1?n:"/assets/pipeline/".concat(n),t.parameters=(0,z.default)(e,"spec.parameters",[]),t})),e.abrupt("return",u);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getTempleJenkins",value:(a=(0,T.default)(l.default.mark((function e(t,a,r){var n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.post("".concat(this.getBaseUrl(r),"clustertemplates/").concat(t,"/render"),a);case 2:return n=e.sent,u=(0,z.default)(n,'metadata.annotations["devops.kubesphere.io/render-result"]',""),e.abrupt("return",u);case 5:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return a.apply(this,arguments)})}]),de}(H.default),c=(0,L.default)(i.prototype,"pipelineConfig",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),s=(0,L.default)(i.prototype,"originalList",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),f=(0,L.default)(i.prototype,"list",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",reverse:!1,filters:{},isLoading:!0}}}),d=(0,L.default)(i.prototype,"branchList",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",reverse:!1,filters:{},isLoading:!0}}}),p=(0,L.default)(i.prototype,"activityList",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",reverse:!1,filters:{},isLoading:!0}}}),m=(0,L.default)(i.prototype,"pullRequestList",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",reverse:!1,filters:{},isLoading:!0,selectedRowKeys:[]}}}),h=(0,L.default)(i.prototype,"credentialsList",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],total:0,isLoading:!0}}}),v=(0,L.default)(i.prototype,"detail",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),g=(0,L.default)(i.prototype,"isLoading",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),y=(0,L.default)(i.prototype,"notFound",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),E=(0,L.default)(i.prototype,"repositoryLog",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),b=(0,L.default)(i.prototype,"isSubmitting",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_=(0,L.default)(i.prototype,"pipelineJsonData",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{pipelineJson:{},isLoading:!0}}}),O=(0,L.default)(i.prototype,"branchDetail",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),S=(0,L.default)(i.prototype,"jenkinsFile",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),C=(0,L.default)(i.prototype,"devops",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),D=(0,L.default)(i.prototype,"devopsName",[Y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),(0,L.default)(i.prototype,"fetchList",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,L.default)(i.prototype,"fetchDetail",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),k=(0,L.default)(i.prototype,"setPipelineConfig",[Y.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.pipelineConfig=t}}}),N=(0,L.default)(i.prototype,"setSelectRowKeys",[Y.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.list.selectedRowKeys.replace(t)}}}),(0,L.default)(i.prototype,"checkPipelineName",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"checkPipelineName"),i.prototype),(0,L.default)(i.prototype,"getJenkinsFile",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"getJenkinsFile"),i.prototype),(0,L.default)(i.prototype,"setPipelineJsonData",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"setPipelineJsonData"),i.prototype),(0,L.default)(i.prototype,"convertJenkinsFileToJson",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"convertJenkinsFileToJson"),i.prototype),(0,L.default)(i.prototype,"getPullRequest",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"getPullRequest"),i.prototype),(0,L.default)(i.prototype,"getBranches",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"getBranches"),i.prototype),(0,L.default)(i.prototype,"getActivities",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"getActivities"),i.prototype),(0,L.default)(i.prototype,"getBranchDetail",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"getBranchDetail"),i.prototype),(0,L.default)(i.prototype,"getPipeLineConfig",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"getPipeLineConfig"),i.prototype),(0,L.default)(i.prototype,"setDevops",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"setDevops"),i.prototype),(0,L.default)(i.prototype,"createPipeline",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"createPipeline"),i.prototype),(0,L.default)(i.prototype,"updatePipeline",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"updatePipeline"),i.prototype),(0,L.default)(i.prototype,"updateJenkinsFile",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"updateJenkinsFile"),i.prototype),(0,L.default)(i.prototype,"delete",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"delete"),i.prototype),(0,L.default)(i.prototype,"scanRepository",[Y.action],Object.getOwnPropertyDescriptor(i.prototype,"scanRepository"),i.prototype),i);a.default=X},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(84),a(29),a(87),a(16),a(27),a(9),a(13),a(10),a(4),a(316),a(22),a(23),a(24),a(17),a(85),a(38),a(64),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(58)),l=r(a(43)),u=r(a(30)),o=r(a(96));a(41);var i=r(a(44)),c=r(a(65)),s=r(a(36)),f=r(a(37)),d=r(a(88)),p=r(a(55)),m=r(a(56)),h=r(a(51)),v=r(a(49));r(a(66));a(12),a(45),a(5),a(11),a(6),a(84),a(29),a(28),a(87),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(316),a(22),a(23),a(57),a(24),a(17),a(85),a(38),a(64),a(7),a(32);var g,y,E,b=r(a(26)),_=r(a(74)),O=r(a(198)),S=r(a(480)),C=a(14),D=a(52),k=a(72),N=a(1021),T=r(a(68));function R(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t=400&&(a+=n)})),(0,_.default)(e,"requests.errorRatio",Math.max(100*a/t,0)),e},P=(g=function(e){(0,p.default)(m,e);var t,a,r=I(m);function m(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"applications";return(0,s.default)(this,m),e=r.call(this,t),(0,c.default)(e,"isTracingLoading",y,(0,d.default)(e)),e.tracing={data:[],total:0},e.graph={data:{},health:{}},(0,c.default)(e,"env",E,(0,d.default)(e)),e.getListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module)},e.getGraphUrl=function(t){var a=t.cluster,r=t.namespace,n=t.duration;return"kapis/servicemesh.kubesphere.io/v1alpha2".concat(e.getPath({cluster:a,namespace:r}),"/graph?duration=").concat(n,"s&graphType=versionedApp&injectServiceNodes=true&groupBy=app&appenders=deadNode,sidecarsCheck,serviceEntry,istio,responseTime")},e.getHealthUrl=function(t){var a=t.cluster,r=t.namespace,n=t.type,l=t.duration;return"kapis/servicemesh.kubesphere.io/v1alpha2".concat(e.getPath({cluster:a,namespace:r}),"/health?rateInterval=").concat(l,"s&type=").concat(n)},e}return(0,f.default)(m,[{key:"fetchGraph",value:(a=(0,i.default)(l.default.mark((function e(){var t,a,r,n,i,c,s,f,d,p,m,h,v,g,y,E=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=E.length>0&&void 0!==E[0]?E[0]:{},a=t.cluster,r=t.namespace,n=t.app,i=t.duration,e.next=3,Promise.all([request.get(this.getGraphUrl({cluster:a,namespace:r,app:n,duration:i})),request.get(this.getHealthUrl({cluster:a,namespace:r,type:"app",duration:i})),request.get(this.getHealthUrl({cluster:a,namespace:r,type:"service",duration:i})),request.get(this.getHealthUrl({cluster:a,namespace:r,type:"workload",duration:i}))]);case 3:c=e.sent,s=(0,o.default)(c,4),f=s[0],d=s[1],p=s[2],m=s[3],h=this.detail.services||[],v=this.detail.workloads||[],g={},d&&p&&m&&(this.graph.health=h.reduce((function(e,t){if(!d[t])return e;var a=d[t],r=a.requests,n=a.workloadStatuses,l=n.reduce((function(e,t){return w(w({},e),{},(0,u.default)({},t.name,M(m[t.name])))}),{});return Object.keys(l).forEach((function(e){g[e]=t})),w(w({},e),{},(0,u.default)({},t,{requests:r,workloadStatuses:n,workloads:l,service:M(p[t])}))}),{})),f&&f.elements&&(y=[],f.elements.nodes.forEach((function(e){"service"===e.data.nodeType&&h.includes(e.data.service)?y.push(e):"app"===e.data.nodeType&&e.data.workload&&v.includes(e.data.workload)&&(e.data.app=g[e.data.workload],y.push(e)),e.data.isRoot&&e.data.namespace!==r&&(e.data.targetNamespace=r,y.push(e))})),this.graph.data={nodes:y,edges:f.elements.edges});case 14:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchAppMetrics",value:function(e){var t=e.name,a=e.cluster,r=e.namespace,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=Math.floor((new Date).getTime()/1e3),u=w({queryTime:l,duration:60,step:20,rateInterval:"20s","filters[]":["request_count","request_duration","request_error_count","tcp_sent","tcp_received"],direction:"inbound",reporter:"destination"},n);return request.get("kapis/servicemesh.kubesphere.io/v1alpha2".concat(this.getPath({cluster:a,namespace:r}),"/apps/").concat(t,"/metrics"),u)}},{key:"fetchServiceMetrics",value:function(e){var t=e.name,a=e.cluster,r=e.namespace,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=Math.floor((new Date).getTime()/1e3),u=w({queryTime:l,duration:60,step:20,rateInterval:"20s",direction:"inbound",reporter:"source"},n);return request.get("kapis/servicemesh.kubesphere.io/v1alpha2".concat(this.getPath({cluster:a,namespace:r}),"/services/").concat(t,"/metrics"),u)}},{key:"fetchWorkloadMetrics",value:function(e){var t=e.name,a=e.cluster,r=e.namespace,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=w({duration:60,step:20,rateInterval:"20s",direction:"inbound",reporter:"source"},n);return request.get("kapis/servicemesh.kubesphere.io/v1alpha2".concat(this.getPath({cluster:a,namespace:r}),"/workloads/").concat(t,"/metrics"),l)}},{key:"fetchTracing",value:(t=(0,i.default)(l.default.mark((function e(t){var a,r,u,o,i,c,s;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.service,r=t.cluster,u=t.namespace,o=(0,n.default)(t,["service","cluster","namespace"]),this.isTracingLoading=!0,i=w({limit:5},o),c=(new Date).getTime(),i.start="".concat(i.start||"".concat(c-k.TIME_MICROSECOND_MAP[i.lookback]),"000"),i.end="".concat(i.end||"".concat(c),"000"),e.prev=6,e.next=9,request.get("kapis/servicemesh.kubesphere.io/v1alpha2".concat(this.getPath({cluster:r,namespace:u}),"/services/").concat(a,"/traces"),i);case 9:(s=e.sent)&&s.data&&(this.tracing.data=(0,N.transformTraces)(s.data)),e.next=15;break;case 13:e.prev=13,e.t0=e.catch(6);case 15:this.isTracingLoading=!1;case 16:case"end":return e.stop()}}),e,this,[[6,13]])}))),function(e){return t.apply(this,arguments)})},{key:"setSelectRowKeys",value:function(e){this.list.selectedRowKeys.replace(e)}},{key:"create",value:function(e,t){var a=this,r=e.application,l=e.ingress,u=(0,n.default)(e,["application","ingress"]),o="true"===(0,b.default)(r,'metadata.annotations["servicemesh.kubesphere.io/enabled"]'),i=[{url:this.getListUrl(t),data:r}];if((0,b.default)(l,"spec.rules",[]).length>0){var c=(0,b.default)(r,"metadata.name");if((0,b.default)(l,"metadata.name")||(0,_.default)(l,"metadata.name","".concat(c,"-ingress-").concat((0,D.generateId)())),o){var s=(0,b.default)(l,"spec.rules[0].http.paths[0].backend.service.name");s&&(0,_.default)(l,'metadata.annotations["nginx.ingress.kubernetes.io/upstream-vhost"]',"".concat(s,".").concat(t.namespace,".svc.cluster.local"))}i.push({url:"apis/networking.k8s.io/v1".concat(this.getPath(t),"/ingresses"),data:l})}return Object.values(u).forEach((function(e){if(e.workload&&e.service){var r=(0,S.default)(k.MODULE_KIND_MAP,(function(t){return t===e.workload.kind}))||"deployments";i.push({url:"apis/apps/v1".concat(a.getPath(t),"/").concat(r),data:e.workload},{url:"api/v1".concat(a.getPath(t),"/services"),data:e.service})}})),this.submitting((0,D.withDryRun)(i))}},{key:"addComponent",value:function(e,t){var a=[];if(t.namespace){if(e.workload&&e.service){var r=(0,S.default)(k.MODULE_KIND_MAP,(function(t){return t===e.workload.kind}))||"deployments";a.push({url:"apis/apps/v1".concat(this.getPath(t),"/").concat(r),data:e.workload},{url:"api/v1".concat(this.getPath(t),"/services"),data:e.service})}return this.submitting((0,D.withDryRun)(a))}}},{key:"patch",value:function(e,t){var a=e.namespace,r=e.cluster,n=e.name;return this.submitting(request.patch(this.getDetailUrl({name:n,cluster:r,namespace:a}),t))}},{key:"delete",value:function(e){var t=e.name,a=e.cluster,r=e.namespace;return this.submitting(request.delete(this.getDetailUrl({name:t,cluster:a,namespace:r})))}},{key:"checkName",value:function(e){var t=e.name,a=e.cluster,r=e.namespace;return request.get(this.getDetailUrl({name:t,cluster:a,namespace:r}),{},{headers:{"x-check-exist":!0}})}},{key:"fetchSampleData",value:function(e){return request.get("sample/".concat(e))}}]),m}(T.default),y=(0,v.default)(g.prototype,"isTracingLoading",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),E=(0,v.default)(g.prototype,"env",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:{},isLoading:!1}}}),(0,v.default)(g.prototype,"fetchGraph",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"fetchGraph"),g.prototype),(0,v.default)(g.prototype,"fetchAppMetrics",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"fetchAppMetrics"),g.prototype),(0,v.default)(g.prototype,"fetchServiceMetrics",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"fetchServiceMetrics"),g.prototype),(0,v.default)(g.prototype,"fetchWorkloadMetrics",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"fetchWorkloadMetrics"),g.prototype),(0,v.default)(g.prototype,"fetchTracing",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"fetchTracing"),g.prototype),(0,v.default)(g.prototype,"setSelectRowKeys",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"setSelectRowKeys"),g.prototype),(0,v.default)(g.prototype,"create",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"create"),g.prototype),(0,v.default)(g.prototype,"addComponent",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"addComponent"),g.prototype),(0,v.default)(g.prototype,"patch",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"patch"),g.prototype),(0,v.default)(g.prototype,"delete",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"delete"),g.prototype),(0,v.default)(g.prototype,"checkName",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"checkName"),g.prototype),(0,v.default)(g.prototype,"fetchSampleData",[C.action],Object.getOwnPropertyDescriptor(g.prototype,"fetchSampleData"),g.prototype),g);t.default=P},function(e,t,a){"use strict";a(15);var r=a(20);a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.Component=t.default=void 0,a(45),a(18),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=a(14),f=a(239),d=r(a(63)),p=r(a(26)),m=r(a(1406)),h=r(a(1407));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var g=function(e){(0,u.default)(a,e);var t=v(a);function a(e){var r;return(0,n.default)(this,a),(r=t.call(this,e)).fetchData=function(){r.envStore.fetchList({namespace:r.namespace,cluster:r.cluster,containers:r.containers,initContainers:r.initContainers})},r.envStore=new m.default,r.fetchData(),r}return(0,l.default)(a,[{key:"render",value:function(){var e=(0,s.toJS)(this.envStore.list),t=e.data,a=e.isLoading;return c.default.createElement("div",null,t.map((function(e,t){return c.default.createElement(h.default,{key:t,detail:e,expand:0===t,loading:a})})))}},{key:"module",get:function(){return this.store.module}},{key:"store",get:function(){return this.props.detailStore}},{key:"namespace",get:function(){return this.store.detail.namespace}},{key:"cluster",get:function(){return this.store.detail.cluster}},{key:"containers",get:function(){var e=(0,s.toJS)(this.store.detail),t=e.spec,a=e.containers,r=void 0===a?[]:a;return"containers"===this.module?[e]:(0,d.default)(r)?(0,d.default)(t)?[]:(0,p.default)(t,"template.spec.containers",[]):r}},{key:"initContainers",get:function(){var e=(0,s.toJS)(this.store.detail),t=e.spec,a=e.initContainers,r=void 0===a?[]:a;return"containers"===this.module?[e]:(0,d.default)(r)?(0,d.default)(t)?[]:(0,p.default)(t,"template.spec.initContainers",[]):r}}]),a}(c.default.Component),y=(0,f.inject)("rootStore","detailStore")((0,f.observer)(g));t.default=y;var E=g;t.Component=E},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=r(a(3)),d=r(a(3928));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var m=function(e){(0,u.default)(a,e);var t=p(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.desc;return c.default.createElement("div",{className:(0,f.default)(d.default.wrapper,t)},c.default.createElement("div",null,c.default.createElement("img",{src:"/assets/empty-card.svg",alt:""})),c.default.createElement("div",null,c.default.createElement("p",{className:d.default.desc,dangerouslySetInnerHTML:{__html:a}}),this.props.children))}}]),a}(c.default.Component);t.default=m,m.propTypes={className:s.default.string,title:s.default.string,desc:s.default.string,onCreate:s.default.func}},,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(86),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(86),a(42),a(4),a(23),a(57),a(17);var n=r(a(315)),l=r(a(58)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=a(186);function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var m=function(e){(0,i.default)(a,e);var t=p(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return(0,N.isNotPersistentVolume)(t)?t:{name:e.name||"volume-".concat((0,k.generateId)()),persistentVolumeClaim:{claimName:t.name}}},t.updateVolumes=function(e){var a=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.volumes"),[]),r=[],n=(0,b.default)(t.selectVolume)?void 0:(0,v.default)(t.selectVolume,"specVolume",t.selectVolume),l=t.formatSpecVolume(n,e);r=n?a.map((function(e){return e.name===n.name?l:e})):[].concat((0,i.default)(a),[l]),(0,g.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.volumes"),r),t.checkMaxUnavalable(a)},t.updateVolumeMounts=function(e,a){var r=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.containers"),[]).map((function(e){return G(G({},e),{},{type:"worker"})})),n=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.initContainers"),[]).map((function(e){return G(G({},e),{},{type:"init"})})),l=(0,h.default)(r,n),o=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.volumes"),[]);e.forEach((function(e){var t=e.containerName,r=e.volume,n=(0,u.default)(e,["containerName","volume"]),i=l.find((function(e){return e.name===t})),c=(0,N.findVolume)(o,r);if(c&&i){i.volumeMounts=i.volumeMounts||[];var s=G({name:c.name},n);i.volumeMounts.find((function(e){return e.name===c.name}))?i.volumeMounts=i.volumeMounts.map((function(e){return e.name===c.name?s:e})):i.volumeMounts.push(s),a&&a.name!==c.name&&(i.volumeMounts=i.volumeMounts.filter((function(e){return e.name!==a.name}))),i.volumeMounts=i.volumeMounts.filter((function(e){return"null"!==e.readOnly})).map((function(e){e.logPath;var t=(0,u.default)(e,["logPath"]);return G(G({},t),{},{readOnly:"true"===String(t.readOnly)})}))}}));var i=[],c=[];l.forEach((function(e){"worker"===e.type?(delete e.type,i.push(e)):(delete e.type,c.push(e))})),(0,g.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.containers"),i),(0,g.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.initContainers"),c)},t.checkMaxUnavalable=function(e){if(["deployments","daemonsets"].includes(t.props.module)&&"RollingUpdate"===(0,v.default)(t.fedFormTemplate,"spec.strategy.type")){var a=e.some((function(e){return!(0,b.default)(e.persistentVolumeClaim)})),r=(0,v.default)(t.fedFormTemplate,"spec.strategy.rollingUpdate.maxUnavailable",null);a&&!r&&(0,g.default)(t.fedFormTemplate,"spec.strategy.rollingUpdate.maxUnavailable",1)}},t.updateLogConfigs=function(e){var a=(0,k.safeParseJSON)((0,v.default)(t.fedFormTemplate,t.logPathPrefix,""),{}),r=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.volumes"),[]);e.forEach((function(e){var t=(0,N.findVolume)(r,e.volume);if(t){var n="containerLogConfigs.".concat(e.containerName,".").concat(e.name||t.name);e.logPath?(0,g.default)(a,n,e.logPath.split(",")):(0,y.default)(a,n)}})),(0,g.default)(t.fedFormTemplate,t.logPathPrefix,JSON.stringify(a))},t.updateVolumeTemplate=function(e){var a=(0,v.default)(t.formTemplate,"metadata.namespace"),r=(0,v.default)(t.fedFormTemplate,"spec.volumeClaimTemplates",[]);(0,g.default)(e,"metadata.namespace",a);var n=[];n=r.find((function(t){return t.metadata.name===e.metadata.name}))?r.map((function(t){return t.metadata.name===e.metadata.name?e:t})):[].concat((0,i.default)(r),[e]),(0,g.default)(t.fedFormTemplate,"spec.volumeClaimTemplates",n)},t.updateVolumeTemplateMounts=function(e){var a=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.containers"),[]).map((function(e){return G(G({},e),{},{type:"worker"})})),r=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.initContainers"),[]).map((function(e){return G(G({},e),{},{type:"init"})})),n=(0,h.default)(a,r);e.forEach((function(e){var t=e.containerName,a=(0,u.default)(e,["containerName"]),r=n.find((function(e){return e.name===t}));if(r){r.volumeMounts=r.volumeMounts||[];var l=a;r.volumeMounts.find((function(e){return e.name===l.name}))?r.volumeMounts=r.volumeMounts.map((function(e){return e.name===l.name?l:e})):r.volumeMounts.push(l),r.volumeMounts=r.volumeMounts.filter((function(e){return"null"!==e.readOnly})).map((function(e){return G(G({},e),{},{readOnly:"true"===e.readOnly})}))}}));var l=[],o=[];n.forEach((function(e){"worker"===e.type?(delete e.type,l.push(e)):(delete e.type,o.push(e))})),(0,g.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.containers"),l),(0,g.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.initContainers"),o)},t.checkVolumeNameExist=function(e){var a=(0,v.default)(t.fedFormTemplate,"".concat(t.prefix,"spec.volumes"),[]),r=(0,v.default)(t.fedFormTemplate,"spec.volumeClaimTemplates",[]);return a.some((function(t){return t.name===e}))||r.some((function(t){return t.name===e}))},t.state={state:"",selectVolume:{},collectSavedLog:(0,v.default)(t.fedFormTemplate,t.collectSavedLogPath)};var n=(0,k.isEdgeWizePage)();return t.store=n?new I.default:new T.default,t.projectStore=n?new P.default:new w.default,e.isFederated&&(t.projectStore=n?new M.default({module:t.projectStore.module}):new R.default({module:t.projectStore.module}),t.store=n?new M.default({module:t.store.module}):new R.default({module:t.store.module})),t.store.fetchList({namespace:t.namespace,cluster:t.cluster,limit:-1}),t.handleVolume=t.handleVolume.bind((0,f.default)(t)),t.handleVolumeTemplate=t.handleVolumeTemplate.bind((0,f.default)(t)),t.handleLogToggle=t.handleLogToggle.bind((0,f.default)(t)),t}return(0,s.default)(r,[{key:"componentDidMount",value:function(){this.namespace&&this.projectStore.fetchDetail({name:this.namespace,namespace:this.namespace,cluster:this.cluster})}},{key:"handleVolume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0;e.uid||t.forEach((function(t){t.name=e.name})),this.updateVolumes(e),this.updateVolumeMounts(t,a),this.updateLogConfigs(t),this.resetState()}},{key:"handleVolumeTemplate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.forEach((function(t){t.name=e.name||(0,v.default)(e,"metadata.name")})),this.updateVolumeTemplate(e),this.updateVolumeTemplateMounts(t),this.updateLogConfigs(t),this.resetState()}},{key:"renderVolume",value:function(){var e=this.state.collectSavedLog,t=(0,O.toJS)(this.store.list.data),a=this.store.list.isLoading,r=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.containers"),[]),n=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.initContainers"),[]),l=(0,h.default)(r,n);return _.default.createElement(j.default,{volumes:t,volume:this.selectVolume,namespace:this.namespace,module:this.props.module,containers:l,onSave:this.handleVolume,onCancel:this.resetState,isLoading:a,checkVolumeNameExist:this.checkVolumeNameExist,collectSavedLog:e})}},{key:"renderConfig",value:function(){var e=this.props,t=e.isFederated,a=e.projectDetail,r=e.isEdgeWize,n=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.containers"),[]),l=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.initContainers"),[]),u=(0,h.default)(n,l);return _.default.createElement(L.default,{isEdgeWize:r,volume:this.selectVolume,containers:u,cluster:this.cluster,namespace:this.namespace,onSave:this.handleVolume,onCancel:this.resetState,isFederated:t,projectDetail:a,checkVolumeNameExist:this.checkVolumeNameExist})}},{key:"renderVolumeTemplate",value:function(){var e=this.props,t=e.cluster,a=e.isEdgeWize,r=this.state.collectSavedLog,n=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.containers"),[]),l=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.initContainers"),[]),u=(0,h.default)(n,l),o=(0,v.default)(this.formTemplate,"metadata.namespace","");return _.default.createElement(U.default,{isEdgeWize:a,volume:this.selectVolume,containers:u,cluster:t,namespace:o,onSave:this.handleVolumeTemplate,onCancel:this.resetState,checkVolumeNameExist:this.checkVolumeNameExist,collectSavedLog:r})}},{key:"handleLogToggle",value:function(){var e=this;this.setState((function(e){return{collectSavedLog:"true"===e.collectSavedLog?"false":"true"}}),(function(){(0,g.default)(e.fedFormTemplate,e.collectSavedLogPath,e.state.collectSavedLog),"false"===e.state.collectSavedLog&&(0,y.default)(e.fedFormTemplate,e.logPathPrefix)}))}},{key:"renderToolTipContent",value:function(){return _.default.createElement("div",null,_.default.createElement("p",null,t("COLLECT_LOGS_ON_VOLUMES_DESC")))}},{key:"renderToggle",value:function(e){var t=this.state.collectSavedLog;return _.default.createElement("span",null,_.default.createElement(C.Toggle,{disabled:e,checked:"true"===t,onChange:this.handleLogToggle}))}},{key:"renderTitle",value:function(){return _.default.createElement("div",{className:"font-bold margin-b8 relative"},_.default.createElement("span",null,t("STORAGE_SETTINGS")),globals.app.hasClusterExtensionModule(this.cluster,"whizard-logging")&&_.default.createElement("div",{className:z.default.toggle},this.projectEnableCollectingFileLog?this.renderToggle():_.default.createElement(C.Tooltip,{content:t.html("PROJECT_COLLECT_SAVED_DISABLED_DESC")},this.renderToggle(!0)),_.default.createElement("span",{className:"text-secondary align-middle"}," ",t("COLLECT_LOGS_ON_VOLUMES")," "),_.default.createElement(C.Tooltip,{content:this.renderToolTipContent()},_.default.createElement(C.Icon,{name:"question"}))))}},{key:"renderList",value:function(){var e=this.props,a=e.formRef,r=e.formProps,n=void 0===r?{}:r,u=e.module,o=e.hideVolumeSetting,i=void 0!==o&&o,c=this.state.collectSavedLog,s=(0,O.toJS)(this.store.list.data),f=this.store.list.isLoading,d=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.containers"),[]),p=(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.initContainers"),[]),m=(0,h.default)(d,p),g=0===(0,v.default)(this.fedFormTemplate,"".concat(this.prefix,"spec.volumes"),[]).length&&0===(0,v.default)(this.fedFormTemplate,"spec.volumeClaimTemplates",[]).length,y=(0,k.safeParseJSON)((0,v.default)(this.fedFormTemplate,this.logPathPrefix,[])),E="statefulsets"===u;return _.default.createElement(C.Form,(0,l.default)({data:this.fedFormTemplate,ref:a},n),this.renderTitle(),"true"===c&&g&&_.default.createElement(C.Alert,{className:"margin-b12",icon:"information",type:"warning",message:t(E?"PVC_OR_TEMPLATE_EMPTY":"PVC_EMPTY")}),_.default.createElement("div",{className:z.default.volumes},E&&_.default.createElement(C.Form.Item,null,_.default.createElement(x.default,{prefix:this.prefix,name:"spec.volumeClaimTemplates",containers:m,onShowAddVolume:this.showVolumeTemplate,onShowEdit:this.showEditVolumeTemplate,collectSavedLog:c,logPath:y,hideVolumeSetting:i})),_.default.createElement(C.Form.Item,null,_.default.createElement(A.default,{prefix:this.prefix,name:"".concat(this.prefix,"spec.volumes"),volumes:s,containers:m,loading:f,onShowVolume:this.showVolume,onShowConfig:this.showConfig,onShowEdit:this.showEditVolume,collectSavedLog:c,logPath:y}))))}},{key:"render",value:function(){var e=null;switch(this.state.state){case"ShowVolume":e=this.renderVolume();break;case"ShowConfig":e=this.renderConfig();break;case"ShowVolumeTemplate":e=this.renderVolumeTemplate();break;default:e=this.renderList()}return e}},{key:"prefix",get:function(){return this.props.prefix||"spec.template."}},{key:"cluster",get:function(){return this.props.cluster}},{key:"namespace",get:function(){return this.props.namespace||(0,v.default)(this.formTemplate,"metadata.namespace","")}},{key:"collectSavedLogPath",get:function(){return"".concat(this.prefix,'metadata.annotations["kubesphere.io/collectSavedLog"]')}},{key:"logPathPrefix",get:function(){return"".concat(this.prefix,'metadata.annotations["logging.kubesphere.io/logsidecar-config"]')}},{key:"projectEnableCollectingFileLog",get:function(){return"enabled"===(0,v.default)(this.projectStore.detail,'labels["logging.kubesphere.io/logsidecar-injection"]')}},{key:"formTemplate",get:function(){var e=this.props,t=e.formTemplate,a=e.module;return(0,v.default)(t,D.MODULE_KIND_MAP[a],t)}},{key:"fedFormTemplate",get:function(){return this.props.isFederated?(0,v.default)(this.formTemplate,"spec.template"):this.formTemplate}},{key:"selectVolume",get:function(){return G({},this.state.selectVolume)}}]),r}(_.default.Component),Y=B;a.Component=Y;var W=(0,S.observer)(B);a.default=W},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u1&&void 0!==arguments[1]&&arguments[1],a=e.multi_branch_pipeline,r=e.pipeline,n=(e.type,(0,i.default)(e,["multi_branch_pipeline","pipeline","type"]));t&&!n.description&&(n.description="");var l=(0,s.default)(n);if(l.metadata&&delete l.metadata,a&&(t?Object.assign(e.multi_branch_pipeline,l):n&&Object.assign(e.multi_branch_pipeline,n),e.type="multi-branch-pipeline",v(e.multi_branch_pipeline)),r&&(t?Object.assign(e.pipeline,l):Object.assign(e.pipeline,n),e.type="pipeline",v(e.pipeline)),!t)for(var u in n)"devopsName"!==u&&delete e[u]};a.resetPipelineMultiBranch=function(e){e.multi_branch_pipeline&&e.__multi_branch_pipeline&&(e.multi_branch_pipeline=(0,d.default)(e.__multi_branch_pipeline,e.multi_branch_pipeline)),delete e.__multi_branch_pipeline};a.updatePipelineParamsInSpec=function(e,t){e.multi_branch_pipeline&&(delete(e=(0,p.default)(e,"metadata.name",e.multi_branch_pipeline.name)).multi_branch_pipeline.metadata,e.spec={multi_branch_pipeline:h({},e.multi_branch_pipeline),type:e.type},delete e.multi_branch_pipeline),e.pipeline&&(delete(e=(0,p.default)(e,"metadata.name",e.pipeline.name)).pipeline.metadata,e.spec={pipeline:h({},e.pipeline),type:e.type},delete e.pipeline),delete e.type,delete e.description,e=(0,p.default)(e,"metadata.namespace",t)};a.groovyToJS=function(e){for(var t,a=/([\w-]*) ?: '?([\w-:/_.]*)'?/g,r={};null!==(t=a.exec(e));)t[1]&&(r[t[1]]=t[2]);return r};a.getLanguageIcon=function(e,t){return["java","gradle","javascript","php","python","golang","nodejs","jar","war","binary"].includes(e)?e:t};a.getRepoUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.provider,a=e.owner,r=e.repo,n=e.server,l=e.url,u=e.api_uri;if(l)return l;switch(t){case"github":return"https://github.com/".concat(a,"/").concat(r);case"gitlab":return"".concat(n,"/").concat(a,"/").concat(r);case"bitbucket_server":var o=u,i="/"===o.substr(o.length-1)?o:"".concat(o,"/");return/https:\/\/bitbucket.org\/?/gm.test(i)||(i+="scm/"),"".concat(i).concat(a,"/").concat(r);default:return""}};a.getCommonSource=function(e){var t=e.provider,a=e.owner,r=e.repo,n=e.url,l=e.secret,u=e.server;return"git"===t?{url:n,discover_branches:!0,credential_id:null==l?void 0:l.name}:{owner:a,repo:r,server_name:u,url:n,credential_id:null==l?void 0:l.name,discover_branches:1,discover_pr_from_forks:{strategy:2,trust:2},discover_pr_from_origin:2,discover_tags:!0}};a.checkRepoSource=function(e){var a=e.source_type,r=(0,i.default)(e,["source_type"]),n=(0,f.default)(r,"".concat(a,"_source"),{}),l=n.owner,u=n.repo,o=n.server_name,s=n.url,d=n.remote,p=l&&u;switch(a){case"svn":case"single_svn":p=!!d;break;case"git":p=!!s;break;case"gitlab":p=p&&o}if(!p)throw c.default.error(t("NOT_VALID_REPO")),Error(t("NOT_VALID_REPO"))};a.isSvnRepo=function(e){return["svn","single_svn"].includes(e)};var g=function(e){var t=e.match(/(.+)(>|>=|==|!=)(.+)/),a=(0,u.default)(t,4),r=a[1],n=a[2],l=a[3];return{key:r.replace(".param.",""),operator:n,value:l}},y=function(e,t){var a=(0,f.default)(t,e.key);switch(e.operator){case"==":return a===e.value;case">=":return a>=e.value;case"<=":return a<=e.value;case"!=":return a!==e.value;default:return!1}},E="argocd"===globals.config.gitopsEngine;a.isArgo=E;a.parseCondition=function(e,t){try{var a=e.match(/(.+?)(&&|\|\|)/g);if(!a)return y(g(e),t);var r=[].concat((0,l.default)(a.map((function(e){return e.slice(0,-2)}))),[e.slice(a.reduce((function(e,t){return e+t.length}),0))]).map(g);return a.map((function(e){return e.slice(-2)})).reduce((function(e,a,n){var l=0===n?y(r[0],t):e,u=y(r[n+1],t);switch(a){case"&&":return l&&u;case"||":return l||u;default:return!1}}),!1)}catch(e){return!1}}},function(e,t,a){"use strict";a(15),a(12),a(109),a(5),a(11),a(84),a(16),Object.defineProperty(t,"__esModule",{value:!0}),t.getRegisterFormTemplate=t.getEdgeSofts=t.getContainerEngineSofts=t.getNodeSpecification=t.getAccessNodeDisplayName=t.getSoftStatus=t.getSoftIconName=void 0,a(12),a(109),a(5),a(11),a(84),a(16),a(4);var r=["docker","containerd","nvidia-docker2"];t.getSoftIconName=function(e){switch(e){case"edgecore":return"iot-duotone";case"nvidia-docker2":return"docker";case"containerd":return"container";default:return e}};t.getSoftStatus=function(e){switch(e){case"installed":return{name:"success",color:{primary:"#ffffff",secondary:"#55bc8a"}};default:return{name:"information",color:{primary:"#ffffff"}}}};t.getAccessNodeDisplayName=function(e){var t=e.name,a=e.alias;return a?"".concat(a," (").concat(t,")"):t};t.getNodeSpecification=function(e){var t=e.cpu,a=e.mem,r=e.disk;return"".concat(t,"核 CPU | ").concat(a,"M 内存 | ").concat(r,"GB 磁盘")};t.getContainerEngineSofts=function(e){return e.filter((function(e){var t=e.name;return r.includes(t)}))};t.getEdgeSofts=function(e){return e.filter((function(e){var t=e.name;return!r.includes(t)}))};t.getRegisterFormTemplate=function(e,t){if(!t)return{clusterName:e,edgeNodeName:"",edgeNodeAlias:"",edgeIpList:[],arch:"",userName:"",password:"",description:""};var a=t.name,r=t.alias,n=t.description;return{clusterName:e,edgeNodeName:a,edgeNodeAlias:r,edgeIpList:[t.nodeIP],arch:t.arch,userName:"",password:"",description:n}}},,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(31),r(18),r(98),r(9),r(10),r(4),r(23),r(24),r(17),r(62),r(818),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(65)),u=n(r(36)),o=n(r(37)),i=n(r(88)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(49));n(r(66));r(45),r(5),r(31),r(18),r(28),r(442),r(42),r(98),r(9),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(818);var p,m,h,v,g,y,E,b,_,O,S,C,D,k,N=n(r(96)),T=n(r(0)),R=n(r(1)),w=n(r(3)),I=r(14),M=r(239),P=n(r(26)),A=r(186),j=n(r(1165)),L=n(r(1166)),x=r(950),U=n(r(3450));function z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var F=function(e){var t=e.match(/(\d+)(\w+)/),a=(0,N.default)(t,3),r=a[1],n=void 0===r?0:r,l=a[2];return n*{s:1,m:60,h:3600,d:86400}[void 0===l?"s":l]},G=(0,M.observer)((k=D=function(e){(0,c.default)(r,e);var a=z(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),o=0;o0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=(0,f.default)(a);return t.forEach((function(t,a){var n=(0,O.default)(t,"metric.__name__"),l=null;if(n){var u=(0,O.default)(t,"metric.quantile"),o=(0,O.default)(t,"metric.verb"),i=(0,O.default)(t,"metric.result"),c=r.find((function(e){return u?(0,O.default)(e,"metric.quantile")===u:o?(0,O.default)(e,"metric.verb")===o:i?(0,O.default)(e,"metric.result")===i:(0,O.default)(e,"metric.__name__")===n}));(0,_.default)(c)?r.push(t):l=c}else l=r[a];if(!(0,_.default)(l)){var s=e.getNewValues(l.values,t.value);(0,S.default)(l,"values",s)}})),r},e}return(0,m.default)(n,[{key:"fetchHealthMetrics",value:(a=(0,s.default)(u.default.mark((function e(){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.health.isLoading=!0,e.next=3,this.requestHealthMetrics();case 3:this.health.isLoading=!1;case 4:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"requestHealthMetrics",value:(t=(0,s.default)(u.default.mark((function e(){var t,a,r,n,o,i,c,s,f;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.cluster&&globals.app.isMultiCluster?"kapis/clusters/".concat(this.cluster,"/resources.kubesphere.io/v1alpha2/componenthealth"):"kapis/resources.kubesphere.io/v1alpha2/componenthealth",e.next=3,(0,D.to)(request.get(t));case 3:a=e.sent,r=a.kubesphereStatus||[],n=(0,C.default)(r,"namespace"),o=r.some((function(e){return"kube-scheduler"===(0,O.default)(e,"label.component")&&(0,O.default)(e,"healthyBackends",0)})),i=r.some((function(e){return"kube-controller-manager"===(0,O.default)(e,"label.component")&&(0,O.default)(e,"healthyBackends",0)})),c={kubernetes:(0,O.default)(a,"kubernetesStatus",[]),node:(0,O.default)(a,"nodeStatus",{}),kubesphere:(0,O.default)(n,"kubesphere-system",[]),openpitrix:(0,O.default)(n,"openpitrix-system",[]),istio:(0,O.default)(n,"istio-system",[]),monitoring:(0,O.default)(n,"kubesphere-monitoring-system",[]),logging:(0,O.default)(n,"kubesphere-logging-system",[]),devops:(0,O.default)(n,"kubesphere-devops-system",[]),kubeSystem:(0,O.default)(n,"kube-system",[])},s={},f={},Object.entries(c).forEach((function(e){var t=(0,l.default)(e,2),a=t[0],r=t[1],n={total:0,health:0},u={total:0,health:0};"node"===a?(n.total=(0,O.default)(r,"totalNodes",0),n.health=(0,O.default)(r,"healthyNodes",0)):"kubernetes"===a?(n.total=r.length,n.health=r.filter((function(e){return"Healthy"===(0,k.getComponentStatus)(e)})).length):r.forEach((function(e){n.total+=e.totalBackends,n.health+=e.healthyBackends;var t=(0,k.getComponentStatus)(e);u.health+="Healthy"===t?1:0,u.total+="Stopped"===t?0:1})),s[a]=n,f[a]=u})),this.health=T(T({},this.health||{}),{data:c,counts:s,componentCounts:f,supportKsScheduler:o,supportControllerManager:i});case 13:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),n}(r(a(845)).default),i=(0,E.default)(o.prototype,"health",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:{},counts:{},supportKsScheduler:!1,supportControllerManager:!1,isLoading:!1}}}),c=(0,E.default)(o.prototype,"etcd",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),(0,E.default)(o.prototype,"fetchHealthMetrics",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchHealthMetrics"),o.prototype),(0,E.default)(o.prototype,"requestHealthMetrics",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"requestHealthMetrics"),o.prototype),o);t.default=w},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(73),a(320),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(73),a(28),a(320),a(42),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o,i,c=r(a(44)),s=r(a(65)),f=r(a(36)),d=r(a(37)),p=r(a(88)),m=r(a(55)),h=r(a(56)),v=r(a(51)),g=r(a(49)),y=(r(a(66)),a(14)),E=r(a(63)),b=a(52);function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;t0&&Array.prototype.forEach.call(this.iframeMedias,(function(t){t.removeEventListener("load",e.updateIFrame),t.addEventListener("load",e.updateIFrame)}))}},{key:"removeMediaListeners",value:function(){var e=this;this.iframeMedias&&this.iframeMedias.length>0&&Array.prototype.forEach.call(this.iframeMedias,(function(t){t.removeEventListener("load",e.updateIFrame)}))}},{key:"updateMarkdown",value:function(){var e=this.iframe.contentDocument;this.iframeLoaded&&(e.body.innerHTML=this.md.render(this.props.source),this.iframe.style.height="".concat(e.body.scrollHeight+16,"px")),this.removeMediaListeners(),this.addMediaListeners()}},{key:"render",value:function(){var e=this.props.className;return s.default.createElement("div",null,this.state.loading&&s.default.createElement(m.Loading,{className:"loading"}),s.default.createElement("iframe",{className:(0,d.default)(h.default.markdown,e),ref:this.handleIFrameRef,src:"/blank_md",name:"frame_markdown",width:"100%",frameBorder:"0",scrolling:"no"}))}}]),a}(s.default.Component);y.propTypes={source:f.default.string,options:f.default.object},y.defaultProps={source:"",options:{}};var E=y;t.default=E},,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(16),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l=r(a(44)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=a(72);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var p=function(e){(0,i.default)(a,e);var t=d(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/nodes").concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=function(t){var a=t.cluster;return"/kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath({cluster:a}),"/nodes")},e.createEdgeNode=function(){var t=(0,l.default)(n.default.mark((function t(a){var r,l,u,o,i,c,s,f,d,p;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,l=a.name,u=a.ip,o=a.defaultTaint,i=a.runtime,c=a.imageRepository,s=a.nodegroup,f="/kapis/infra.edgewize.io/v1alpha1".concat(e.getPath({cluster:r}),"/nodes/join"),d={node_name:l,node_ip:u,add_default_taint:o,runtime:i,"image-repository":c},s&&(d.node_group=s),t.next=6,request.get(f,d,{},(function(e){return e}));case 6:return p=t.sent,t.abrupt("return",p);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return(0,o.default)(a,[{key:"apiVersion",get:function(){return f.API_VERSIONS.nodes||""}}]),a}(r(a(856)).default);t.default=p},,,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(61)),u=r(a(30)),o=r(a(58));a(41);var i,c,s=r(a(44)),f=r(a(65)),d=r(a(36)),p=r(a(37)),m=r(a(88)),h=r(a(55)),v=r(a(56)),g=r(a(51)),y=r(a(49)),E=(r(a(66)),r(a(26))),b=r(a(74)),_=a(14),O=a(72);function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getDetailUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getListUrl(t),"/").concat(t.name)},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module)},e}return(0,p.default)(i,[{key:"getPath",value:function(e){var t=e.user,a="";return t&&(a+="/users/".concat(t)),a}},{key:"fetchList",value:(r=(0,s.default)(n.default.mark((function e(){var t,a,r,u,i,c,s=this,f=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=f.length>0&&void 0!==f[0]?f[0]:{},a=t.more,r=t.user,u=(0,o.default)(t,["more","user"]),this.list.isLoading=!0,u.sortBy||void 0!==u.ascending||(u.sortBy=O.LIST_DEFAULT_ORDER[this.module]||"createTime"),u.limit!==1/0&&-1!==u.limit||(u.limit=-1,u.page=1),u.limit=u.limit||10,e.next=7,request.get(this.getResourceUrl({user:r}),this.getFilterParams(u),null,(function(){return{}}));case 7:return i=e.sent,c=((0,E.default)(i,"items")||[]).map((function(e){return C({},s.mapper(e))})),this.list.update(C(C({data:a?[].concat((0,l.default)(this.list.data),(0,l.default)(c)):c,total:i.totalItems||i.total_count||i.total||c.length||0},u),{},{limit:Number(u.limit)||10,page:Number(u.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",c);case 11:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getResource",value:(a=(0,s.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get(this.getDetailUrl(t),{},null,(function(){return{}}));case 2:return a=e.sent,r=(0,E.default)(a,"metadata.resourceVersion"),this.resourceVersion=r||"",e.abrupt("return",void 0!==r);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"update",value:(t=(0,s.default)(n.default.mark((function e(t,a){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getResource(t);case 2:return(0,b.default)(a,"metadata.resourceVersion",this.resourceVersion),e.abrupt("return",this.submitting(request.put(this.getDetailUrl(t),a)));case 4:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"kapis/notification.kubesphere.io/v2beta2"}}]),i}(r(a(68)).default),c=(0,y.default)(i.prototype,"resourceVersion",[_.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),(0,y.default)(i.prototype,"fetchList",[_.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,y.default)(i.prototype,"getResource",[_.action],Object.getOwnPropertyDescriptor(i.prototype,"getResource"),i.prototype),(0,y.default)(i.prototype,"update",[_.action],Object.getOwnPropertyDescriptor(i.prototype,"update"),i.prototype),i);t.default=k},,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(31),a(6),a(29),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(22),a(23),a(17),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(31),a(6),a(29),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(38),a(7),a(32);var n=r(a(61)),l=r(a(58)),u=r(a(43));a(41);var o,i,c,s,f=r(a(44)),d=r(a(30)),p=r(a(65)),m=r(a(36)),h=r(a(37)),v=r(a(88)),g=r(a(55)),y=r(a(56)),E=r(a(51)),b=r(a(49)),_=(r(a(66)),r(a(26))),O=r(a(74)),S=a(14);function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.getRulePath(t)).concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=e.getListUrl,(0,p.default)(e,"ruleCount",i,(0,v.default)(e)),(0,p.default)(e,"builtinRuleCount",c,(0,v.default)(e)),(0,p.default)(e,"targetsMetadata",s,(0,v.default)(e)),e.getParamsType=function(e){var t={};return e.namespace||e.cluster&&("builtin"===e.type?t.builtin=!0:t.builtin=!1),t},e.getFilterParams=function(e){var t=D({},e);return t.enable&&(t.labelSelector="alerting.kubesphere.io/enable=".concat(t.enable),delete t.enable),t},e.fetchMetric=function(){var e=(0,f.default)(u.default.mark((function e(t){var a,r,n,l,o,i,c;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.expr,r=t.step,n=t.start,l=t.end,o=t.cluster,i=t.namespace,a){e.next=3;break}return e.abrupt("return",[]);case 3:return e.next=5,request.get("kapis/monitoring.kubesphere.io/v1beta1/targets/query",{cluster:o,namespace:i,expr:a,step:r,start:n,end:l},null,(function(){}));case 5:return c=e.sent,e.abrupt("return",(0,_.default)(c,"data.result",[]));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}return(0,h.default)(y,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r="";return t&&(r+="/clusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"fetchList",value:(o=(0,f.default)(u.default.mark((function e(){var t,a,r,o,i,c,s,f,d,p=this,m=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},a=t.cluster,t.workspace,r=t.namespace,o=t.more,i=t.type,c=(0,l.default)(t,["cluster","workspace","namespace","more","type"]),this.list.isLoading=!0,c.sortBy||void 0!==c.ascending||(c.sortBy="createTime"),c.limit!==1/0&&-1!==c.limit||(c.limit=-1,c.page=1),c.limit=c.limit||10,"builtin"===i&&(c.builtin=!0),e.next=8,request.get(this.getResourceUrl({cluster:a,namespace:r,type:i}),D(D({},this.getFilterParams(c)),this.getParamsType({namespace:r,cluster:a,type:i})));case 8:return s=e.sent,f=((0,_.default)(s,"items")||[]).map((function(e){return D({cluster:a,namespace:r},p.mapper(e))})),d=s.totalItems,this.list.update(D(D({data:o?[].concat((0,n.default)(this.list.data),(0,n.default)(f)):f,total:d},c),{},{limit:Number(c.limit)||10,page:Number(c.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",f);case 13:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"fetchCount",value:(r=(0,f.default)(u.default.mark((function e(t){var a,r,n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,e.next=3,Promise.all([request.get(this.getResourceUrl({cluster:a,namespace:r}),{page:1,limit:1,builtin:!1}),request.get(this.getResourceUrl({cluster:a,namespace:r,type:"builtin"}),{page:1,limit:1,builtin:!0})]);case 3:n=e.sent,this.ruleCount=(0,_.default)(n,"0.totalItems",0),this.builtinRuleCount=(0,_.default)(n,"1.totalItems",0);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"fetchMetadata",value:(a=(0,f.default)(u.default.mark((function e(t){var a,r,n,l;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,e.next=3,request.get("kapis/monitoring.kubesphere.io/v1beta1/targets/metadata",{cluster:a,namespace:r});case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={data:[]};case 6:n=e.t0,l=n.data,this.targetsMetadata=l||[];case 9:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"create",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.submitting(request.post(this.getListUrl(D(D({},t),{},{k8sOpt:!0})),e))}},{key:"update",value:(t=(0,f.default)(u.default.mark((function e(t,a){var r,n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get(this.getDetailUrl(D(D({},t),{},{k8sOpt:!0})));case 2:return r=e.sent,(n=(0,_.default)(r,"metadata.resourceVersion"))&&(0,O.default)(a,"metadata.resourceVersion",n),e.abrupt("return",this.submitting(request.put(this.getDetailUrl(D(D({},t),{},{k8sOpt:!0})),a)));case 6:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})},{key:"patch",value:function(e,t){return this.submitting(request.patch(this.getDetailUrl(D(D({},e),{},{k8sOpt:!0})),t))}},{key:"batchPatch",value:function(e,t,a){var r=this;return this.submitting(Promise.all(e.map((function(e){return request.patch(r.getDetailUrl(D(D({},t),{},{name:e,k8sOpt:!0})),a)}))))}},{key:"delete",value:function(e){return this.submitting(request.delete(this.getDetailUrl(D(D({},e),{},{k8sOpt:!0}))))}},{key:"batchDelete",value:function(e){var t=this;return this.submitting(Promise.all(e.map((function(e){var a=t.list.data.find((function(t){return t.name===e}));return request.delete(t.getDetailUrl(D(D({},a),{},{k8sOpt:!0})))}))))}},{key:"checkName",value:function(e,t){return request.get(this.getDetailUrl(D(D({},e),{},{k8sOpt:!0})),D({},t),{headers:{"x-check-exist":!0}})}},{key:"yamlApiVersion",get:function(){return"alerting.kubesphere.io/v2beta1"}},{key:"apiVersion",get:function(){return"proxy-api/proxy/alerting.kubesphere.io/v2beta1/"}}]),y}(r(a(68)).default),i=(0,b.default)(o.prototype,"ruleCount",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),c=(0,b.default)(o.prototype,"builtinRuleCount",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),s=(0,b.default)(o.prototype,"targetsMetadata",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,b.default)(o.prototype,"fetchList",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchList"),o.prototype),(0,b.default)(o.prototype,"fetchCount",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchCount"),o.prototype),(0,b.default)(o.prototype,"fetchMetadata",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchMetadata"),o.prototype),(0,b.default)(o.prototype,"create",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"create"),o.prototype),(0,b.default)(o.prototype,"update",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"update"),o.prototype),(0,b.default)(o.prototype,"patch",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"patch"),o.prototype),(0,b.default)(o.prototype,"batchPatch",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"batchPatch"),o.prototype),(0,b.default)(o.prototype,"delete",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"delete"),o.prototype),(0,b.default)(o.prototype,"batchDelete",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"batchDelete"),o.prototype),(0,b.default)(o.prototype,"checkName",[S.action],Object.getOwnPropertyDescriptor(o.prototype,"checkName"),o.prototype),o);t.default=N},function(e,t,a){"use strict";a(15);var r=a(20);a(5),Object.defineProperty(t,"__esModule",{value:!0}),t.getManifestApi=function(e){var t=e.workspace,a=e.namespace,r=e.cluster,n=e.cluster_id,l="/kapis/application.kubesphere.io/v2";t&&(l+="/workspaces/".concat(t));globals.app.isMultiCluster&&r&&(l+="/clusters/".concat(r));a&&(l+="/namespaces/".concat(a));l+="/manifests",n&&(l+="/".concat(n));return l},t.getDmpSecrets=function(e){var t=e.namespace,a=e.cluster_id,r="/api/v1";t&&(r+="/namespaces/".concat(t));r+="/secrets",a&&(r+="/".concat(a));return r},t.getStatusFromYaml=function(e){var t=(0,n.default)(e,"status.conditions[0]");if(t)return"".concat(t.status,"-").concat(t.type);return""},a(5);var n=r(a(26))},function(e,t,a){e.exports={sider:"_3y7-mTgYjs2dHEX56ZcZlC",sheet:"_1VTQEGDBWPuUTtcgiyEAOC",title:"vlfMOA3JURdw5nk7WeIqH",delete:"_1kpyCW22GDVJh1I5gLyodh",edit:"_17i-NSdS-P7GUZCw1-YPnt",describtion:"_1ZLAf7WvHoqwp-0F-8tdTc",form:"_1LP-CIeypBa9wbadIjZn8d",name_input:"_1JAZWUE9yJWoVQUSCQPHM7",form_lable:"_5Q1qFPpM3eL-rJAdDuEs-",footer:"_3bSiW6kTLb3kTBF6VFFXXK",clickable:"_23bCX01Ss7OCfh3hJlUDtX",pipelineCard__item__drag:"_2c5vlHp7UGoWb30NL5EO4d",conditionList:"_3v2nj92lVAeDDd8IDTPLPt"}},,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(31),a(6),a(29),a(18),a(87),a(97),a(320),a(16),a(326),a(27),a(1782),a(190),a(10),a(4),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.COORD_COUNT=t.renderIntoCanvas=t.createViewedBoundsFunc=t.formatDuration=t.formatRelativeDate=t.isErrorSpan=t.isServerSpan=t.isClientSpan=t.spanHasTag=t.transformTraces=t.transformTraceItem=void 0,a(250),a(45),a(5),a(11),a(31),a(6),a(160),a(29),a(18),a(28),a(87),a(245),a(97),a(320),a(42),a(448),a(16),a(326),a(1782),a(190),a(10),a(4),a(38),a(7),a(32);var n=r(a(36)),l=r(a(37)),u=r(a(446)),o=r(a(243)),i=a(72),c=function(){function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,n.default)(this,e),this.value=t,this.children=a}return(0,l.default)(e,null,[{key:"iterFunction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(a){return e(a.value,a,t)}}},{key:"searchFunction",value:function(t){return"function"==typeof t?t:function(a,r){return t instanceof e?r===t:a===t}}}]),(0,l.default)(e,[{key:"addChild",value:function(t){return this.children.push(t instanceof e?t:new e(t)),this}},{key:"find",value:function(t){if(e.iterFunction(e.searchFunction(t))(this))return this;for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:0,a=[],r=t;for(a.push({node:this,depth:r});a.length;){var n=a.pop(),l=n.node,u=n.depth;e(l.value,l,u),r=u+1;for(var o=l.children.length-1;o>=0;)a.push({node:l.children[o],depth:r}),o--}}},{key:"depth",get:function(){return this.children.reduce((function(e,t){return Math.max(t.depth+1,e)}),1)}},{key:"size",get:function(){var e=0;return this.walk((function(){return e++})),e}}]),e}(),s=function(e){var t=e.traceID;if(!t)return null;t=t.toLowerCase();var a=0,r=Number.MAX_SAFE_INTEGER,n=new Map,l=new Map;e.spans=e.spans.filter((function(e){return Boolean(e.startTime)}));for(var u=e.spans.length,o=0;oa&&(a=s+f);var m=n.get(p);null!=m?(n.set(p,m+1),p="".concat(p,"_").concat(m),i.spanID=p):n.set(p,1),i.process=e.processes[d],l.set(p,i)}var h=function(e){var t=new Map(e.spans.map((function(e){return[e.spanID,new c(e.spanID)]}))),a=new Map(e.spans.map((function(e){return[e.spanID,e]}))),r=new c("__root__");e.spans.forEach((function(e){var a=t.get(e.spanID);if(Array.isArray(e.references)&&e.references.length){var n=e.references[0],l=n.refType,u=n.spanID;if("CHILD_OF"!==l&&"FOLLOWS_FROM"!==l)throw new Error("Unrecognized ref type: ".concat(l));(t.get(u)||r).children.push(a)}else r.children.push(a)}));var n=function(e,t){var r=a.get(e.value),n=a.get(t.value);return+(r.startTime>n.startTime)||+(r.startTime===n.startTime)-1};return e.spans.forEach((function(e){var a=t.get(e.spanID);a.children.length>1&&a.children.sort(n)})),r.children.sort(n),r}(e),v=[],g={},y="";return h.walk((function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if("__root__"!==e){var n=l.get(e);if(n){var u=n.process.serviceName;g[u]=(g[u]||0)+1,n.references&&n.references.length||(y="".concat(u,": ").concat(n.operationName)),n.relativeStartTime=n.startTime-r,n.depth=a-1,n.hasChildren=t.children.length>0,n.references.forEach((function(e){var t=l.get(e.spanID);t&&(e.span=t)})),v.push(n)}}})),{services:Object.keys(g).map((function(e){return{name:e,numberOfSpans:g[e]}})),spans:v,traceID:t,traceName:y,processes:e.processes,duration:a-r,startTime:r,endTime:a}};t.transformTraceItem=s;t.transformTraces=function(e){var t=e.map(s),a=0,r=0,n={};return t.forEach((function(e){e.duration&&(a=Math.max(a,e.duration)),e.services.forEach((function(e){n[e.name]||(n[e.name]=i.TRACING_COLORS_HEX[r++])}))})),t.forEach((function(e){a&&(e.durationPercent=100*e.duration/a),e.serviceColorMap=n})),(0,u.default)(t,"startTime").reverse()};var f=function(e,t,a){return!(!Array.isArray(a.tags)||!a.tags.length)&&a.tags.some((function(a){return a.key===e&&a.value===t}))};t.spanHasTag=f;var d=f.bind(null,"span.kind","client");t.isClientSpan=d;var p=f.bind(null,"span.kind","server");t.isServerSpan=p;var m=f.bind(null,"error",!0),h=f.bind(null,"error","true");t.isErrorSpan=function(e){return m(e)||h(e)};t.formatRelativeDate=function(e,t){var a=o.default.isMoment(e)?e:(0,o.default)(e),r=t?"MMMM":"MMM",n=new Date;if(n.getFullYear()!==a.year())return a.format("".concat(r," D, YYYY"));var l=a.month(),u=a.date(),i=n.getDate();return l===n.getMonth()&&u===i?"Today":(n.setDate(i-1),l===n.getMonth()&&u===n.getDate()?"Yesterday":a.format("".concat(r," D")))};t.formatDuration=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"microseconds",a=e;"microseconds"===t&&(a=e/1e3);var r="ms";return a>=1e3&&(r="s",a/=1e3),a.toFixed(2)+r};t.createViewedBoundsFunc=function(e){var t=e.min,a=e.max,r=e.viewStart,n=e.viewEnd,l=a-t,u=t+r*l,o=a-(1-n)*l-u;return function(e,t){return{start:(e-u)/o,end:(t-u)/o}}};t.renderIntoCanvas=function(e,t,a,r){var n=new Map,l=(t.length<60?60:Math.min(t.length,200))-1,u=2*window.innerWidth;e.width=u,e.height=l;var o=Math.min(Math.max(2,(l-(1*t.length-1))/t.length),4),i=l/t.length,c=e.getContext("2d",{alpha:!1});c.fillStyle="#fff",c.fillRect(0,0,u,l);for(var s=0;s=.8&&(u="warning"),t>=.95&&(u="danger");var o={left:"".concat(t>.35?t/2*100:100*(t+.01),"%"),transform:t>.35?"translateX(-50%)":"",color:t>.35?"#fff":"#79879c"};return c.default.createElement("div",{className:(0,f.default)(d.default.wrapper,a)},c.default.createElement("div",{className:(0,f.default)(d.default.bar,d.default[u]),style:l}),r&&!!t&&c.default.createElement("span",{className:d.default.text,style:o},r),n&&c.default.createElement("span",{className:d.default.rightText},n))}}]),a}(c.default.Component);t.default=m,m.propTypes={value:s.default.number.isRequired,className:s.default.string},m.defaultProps={value:0}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(16),a(4),a(23),a(57),a(17);var l=n(a(315)),u=n(a(58)),o=n(a(36)),i=n(a(37)),c=n(a(55)),s=n(a(56)),f=n(a(51)),d=r(a(0)),p=n(a(1)),m=n(a(3)),h=n(a(2387));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var g=function(e){(0,c.default)(a,e);var t=v(a);function a(){return(0,o.default)(this,a),t.apply(this,arguments)}return(0,i.default)(a,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.name,r=e.value,n=(0,u.default)(e,["className","name","value"]);return d.default.createElement("div",(0,l.default)({className:(0,m.default)(h.default.label,t)},n),d.default.createElement("span",{className:h.default.name},a),r)}}]),a}(d.PureComponent);t.default=g,g.propTypes={className:p.default.string,name:p.default.string,value:p.default.string},g.defaultProps={name:"",value:""}},,function(e,t,a){"use strict";a(15);var r=a(20),n=a(157);a(5),a(11),a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(11),a(18),a(28),a(42),a(4),a(23),a(57),a(17);var l,u,o,i=r(a(61)),c=r(a(36)),s=r(a(37)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=n(a(0)),h=r(a(3)),v=r(a(1)),g=a(186),y=r(a(249)),E=r(a(928)),b=r(a(26)),_=r(a(158)),O=r(a(63)),S=a(239),C=r(a(2470));function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var k=(0,S.observer)((o=u=function(e){(0,f.default)(a,e);var t=D(a);function a(){var e;(0,c.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/scaledobjects")},e.getListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/scaledobjects").concat(t.dryRun?"?dryRun=All":"")},e}return(0,f.default)(p,[{key:"fetchList",value:(u=(0,c.default)(n.default.mark((function e(){var t,a,r,u,i,c,s,f=this,d=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},a=t.cluster,t.workspace,r=t.namespace,u=t.more,t.type,i=(0,o.default)(t,["cluster","workspace","namespace","more","type"]),this.list.isLoading=!0,i.sortBy||void 0!==i.ascending||(i.sortBy=E.LIST_DEFAULT_ORDER[this.module]||"createTime"),i.limit!==1/0&&-1!==i.limit||(i.limit=-1,i.page=1),i.limit=i.limit||10,e.next=7,request.get(this.getResourceUrl({cluster:a,namespace:r}),i).catch((function(){}));case 7:if(e.t0=e.sent,e.t0){e.next=10;break}e.t0={};case 10:return c=e.t0,s=(0,v.default)(c,"items",[]).map((function(e){return _({cluster:a},f.mapper(e))})),this.list.update(_(_({data:u?[].concat((0,l.default)(this.list.data),(0,l.default)(s)):s,total:c.totalItems||c.total_count||s.length||0},(0,g.default)(i,"labelSelector")),{},{limit:Number(i.limit)||10,page:Number(i.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",s);case 14:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"fetchDetail",value:(r=(0,c.default)(n.default.mark((function t(a,r){var l,u,o,i,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=a.cluster,u=a.namespace,o=a.name,this.isLoading=!0,t.next=4,request.get(this.getDetailUrl({cluster:l,namespace:u,name:o}),null,null,r||function(t){"NotFound"!==t.reason&&"Forbidden"!==t.reason||e.navigateTo("/404")});case 4:return i=t.sent,c=_({cluster:l},this.mapper(i)),this.detail=c,this.isLoading=!1,t.abrupt("return",c);case 9:case"end":return t.stop()}}),t,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"create",value:(a=(0,c.default)(n.default.mark((function e(t){var a,r=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.length>1&&void 0!==r[1]?r[1]:{},e.abrupt("return",this.submitting(request.post(this.getListUrl(a),t)));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"patch",value:function(e,t){return this.submitting(request.put(this.getDetailUrl(e),t))}}]),p}(r(a(68)).default),(0,h.default)(i.prototype,"fetchList",[y.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,h.default)(i.prototype,"fetchDetail",[y.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),(0,h.default)(i.prototype,"create",[y.action],Object.getOwnPropertyDescriptor(i.prototype,"create"),i.prototype),(0,h.default)(i.prototype,"patch",[y.action],Object.getOwnPropertyDescriptor(i.prototype,"patch"),i.prototype),i);t.default=S}).call(this,a(69))},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.REVIEW_PASS_ACTIONS=t.ACTION_TO_NAME=t.HANDLE_TYPE_TO_SHOW=t.ACTION_TO_STATUS=t.STATUS_TO_ACTION_ADMIN=t.STATUS_TO_ACTION=t.APP_STORE_ACTIONS=t.CAN_DELETE_STATUS=t.CAN_EDIT_STATUS=t.STATUS_TO_ICON=t.STATUS_TRANSFER_MAP=t.DEFAULT_QUERY_STATUS=void 0;t.DEFAULT_QUERY_STATUS="draft|submitted|rejected|in-review|passed|active|suspended";t.STATUS_TRANSFER_MAP={active:"active",suspended:"suspended",suspend:"suspending",submitted:"submitted",passed:"passed",draft:"draft",rejected:"rejected"};t.STATUS_TO_ICON={submitted:"review","in-review":"review",rejected:"suspended",active:"passed"};t.CAN_EDIT_STATUS=["draft","rejected"];t.CAN_DELETE_STATUS=["draft","rejected","passed","suspended"];t.APP_STORE_ACTIONS=["suspend","recover"];t.STATUS_TO_ACTION={draft:"submit",submitted:"cancel",rejected:"submit",passed:"release",active:"view"};t.STATUS_TO_ACTION_ADMIN={active:"suspend",suspended:"recover"};t.ACTION_TO_STATUS={suspend:"active",recover:"suspended"};t.HANDLE_TYPE_TO_SHOW={recover:"activate"};t.ACTION_TO_NAME={submit:"SUBMIT_FOR_REVIEW",cancel:"CANCEL_SUBMISSION",release:"RELEASE",view:"VIEW_IN_STORE",suspend:"SUSPEND",recover:"RELEASE"};t.REVIEW_PASS_ACTIONS=[{role:"isv",action:"review"},{role:"isv",action:"pass"},{role:"business",action:"review"},{role:"business",action:"pass"},{role:"technical",action:"review"},{role:"technical",action:"pass"}]},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(315)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=a(186),d=r(a(842)),p=a(72),m=r(a(2611));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(a,e);var t=h(a);function a(){return(0,l.default)(this,a),t.apply(this,arguments)}return(0,u.default)(a,[{key:"render",value:function(){var e={keyProps:{component:f.AutoComplete,className:m.default.dropdown,options:this.props.options||p.INGRESS_ANNOTATIONS}};return s.default.createElement(d.default,(0,n.default)({},this.props,{itemProps:e}))}}]),a}(s.default.Component);t.default=v},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var u=l(r(36)),o=l(r(37)),i=l(r(55)),c=l(r(56)),s=l(r(51)),f=n(r(0)),d=r(186),p=l(r(828)),m=l(r(2622));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var v=function(e){(0,i.default)(r,e);var a=h(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module)},e}return(0,l.default)(a,[{key:"apiVersion",get:function(){return"apis/springcloud.kubesphere.io/v1alpha1"}}]),a}(r(a(68)).default);t.default=s},,,,,,function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(3)),d=r(186),p=n(r(799)),m=n(r(2924));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(r,e);var a=h(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){var e=this.props,a=e.className,r=e.readOnly,n=e.renderHostInput,l=e.exampleValue;return s.default.createElement(d.Columns,{className:(0,f.default)(m.default.columns,a)},s.default.createElement(d.Column,{className:"is-7"},s.default.createElement(d.Form.Item,{rules:this.props.hostRules},n||s.default.createElement(d.Input,{name:this.props.hostName,placeholder:t("EXAMPLE_VALUE",{value:l||"192.168.1.10"}),readOnly:r}))),s.default.createElement(d.Column,null,s.default.createElement(d.Form.Item,{rules:this.props.portRules},s.default.createElement(p.default,{min:0,max:65535,name:this.props.portName,onChange:this.onPortChange,defaultValue:this.props.defaultPort,placeholder:t("EXAMPLE_VALUE",{value:9200}),readOnly:r,integer:!0}))))}}]),r}(s.default.Component);a.default=v,v.defaultProps={hostName:"Host",portName:"Port",defaultPort:9200,hostRules:[{required:!0,message:t("ENTER_SERVICE_ADDRESS")}],portRules:[{required:!0,message:t("PORT_NUMBER_EMPTY")}]}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=n(r(63)),v=n(r(972)),g=r(186),y=r(1193),E=n(r(2928));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var _=function(e){(0,c.default)(r,e);var a=b(r);function r(){var e;(0,o.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0),"Match"===e.operator&&(t=t&&e.regexValue),t},e.itemValidator=function(a,r,n){return r?r.some((function(t){return!e.checkItemValid(t)}))?n({message:t("INVALID_NOTIFICATION_CONDITION")}):void n():n()},e.handleSwitch=function(t){e.setState({enabled:t})},e.handleVerify=function(){var a=e.props,r=a.user,n=a.getVerifyFormTemplate,l=a.onVerify,u=e.formRef.current;u&&u.validate((function(){var a=u.getData(),o=C.default.notificationVerify({user:r}),i=(0,v.default)(n(a)),c=i.config,s=i.receiver;l&&!l(a)||((0,p.default)(o,"config.spec",(0,d.default)(c,"spec",{})),(0,p.default)(o,"receiver.spec",(0,d.default)(s,"spec",{})),(0,h.default)(c)&&(0,m.default)(o,"config"),e.setState({isVerifying:!0}),e.verifyStore.checkInfo(o,{user:r}).then((function(a){e.setState({isVerifying:!1}),200===a.Status?y.default.success({content:t("SEND_TEST_MESSAGE_SUCCESS_DESC")}):y.default.error({content:a.Message})})))}))},e.handleSubmit=function(){var t=e.formRef.current;t&&t.validate((function(){e.props.onSubmit(t.getData())}))},e}return(0,o.default)(r,[{key:"renderEnableService",value:function(){var e=this.props,a=e.user,r=e.name,n=e.module,l=e.icon,u=e.noConfig,o=void 0===u||u,i=this.state.enabled;return a&&!o?f.default.createElement("div",{className:k.default.contentWrapper},f.default.createElement(g.Form.Item,{className:k.default.isHorizon,label:t(i?t("NOTIFICATION_ENABLED"):t("NOTIFICATION_DISABLED"))},f.default.createElement(_.default,{name:"receiver.spec.".concat(r,".enabled"),value:i,onChange:this.handleSwitch}))):f.default.createElement("div",{className:k.default.header},f.default.createElement(E.default,{className:k.default.title,icon:l,title:t("".concat(n.toUpperCase(),"_TITLE")),description:t("".concat(n.toUpperCase(),"_DESC"))}),!o&&f.default.createElement("div",{className:k.default.action},f.default.createElement(g.Form.Item,null,f.default.createElement(b.default,{name:"receiver.spec.".concat(r,".enabled"),text:t(i?t("ENABLED"):t("DISABLED")),checked:i,onChange:this.handleSwitch}))))}},{key:"renderControlAnnotation",value:function(){return f.default.createElement("div",{className:k.default.annotation},f.default.createElement(g.Icon,{name:"question"}),f.default.createElement("p",{className:k.default.desc},t.html("NOTIFICATION_CONDITION_SETTING_TIP")))}},{key:"renderControlSetting",value:function(){var e=this.props,a=e.name,r=e.user;return f.default.createElement(g.Form.Group,{label:t("FILTER_CONDITIONS"),desc:t("NOTIFICATION_CONDITION_SETTINGS_DESC"),checkable:!0,keepDataWhenUnCheck:Boolean(r)},f.default.createElement(g.Form.Item,{rules:[{validator:this.itemValidator,checkOnSubmit:!0}]},f.default.createElement(O.default,{name:"receiver.spec.".concat(a,".alertSelector.matchExpressions"),itemType:"object",addText:t("ADD"),checkItemValid:this.checkItemValid,desc:this.renderControlAnnotation()},f.default.createElement(D.default,null))))}},{key:"renderVerifyAction",value:function(){var e=this.state.isVerifying;return f.default.createElement("div",{className:k.default.contentWrapper},f.default.createElement("p",null,t("SEND_TEST_MESSAGE_DESC")),f.default.createElement(g.Button,{className:k.default.action,onClick:this.handleVerify,loading:e},t("SEND_TEST_MESSAGE")))}},{key:"renderFooterBtns",value:function(){var e=this.props,a=e.onCancel,r=e.isSubmitting;return f.default.createElement("div",{className:k.default.footer},f.default.createElement(g.Button,{onClick:a},t("CANCEL")),f.default.createElement(g.Button,{type:"control",loading:r,onClick:this.handleSubmit},t("OK")))}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.onChange,r=e.hideFooter,n=e.children,l=e.module,u=e.user;return f.default.createElement(g.Form,{ref:this.formRef,data:t,onChange:a},f.default.createElement("div",{className:k.default.formBody},this.renderEnableService(),f.default.createElement("div",{className:k.default.contentWrapper},n,("mail"!==l||"mail"===l&&u)&&this.renderControlSetting()),("mail"!==l||"mail"===l&&u)&&this.renderVerifyAction()),!r&&this.renderFooterBtns())}}]),r}(f.Component);a.default=T},function(e,t,a){e.exports={pipelineCard:"uLmxymVsGkkYEf4yNccS6",pipelineCard__title:"_374bDv2bi1dgj-3Ep0nJtt","pipelineCard__title-error":"_2f_2SEsh5G2oZIyeNZAaOj",pipelineCard__content:"_1yZ2ddWm3YllTHSa1mSMac",pipelineCard__item:"_1j55rjwffi54nOaArMvQB2","pipelineCard-error":"rUnBDmlIjlvSq8C8rupWI",errorTip:"_1xCvRnuQl_HK5ABGqg_4Gt","pipelineCard-active":"_2RjzuvDfXn-yRmy6gVBXQ",content__title:"_1LbrO1eYXEftlLojLl8elX",content__title__error:"dL6e5rCCy45AlcnTNKd8c",content__title__noDetail:"dN_jyqpuK7-wjUCtyBwgQ",content__title__text:"_2i2A2H340NtX7tTERjbDnT",content__text:"_2TlASMvryC2WAexUpv5Pt5",content__detail:"_1EDW6C4SqJ_GXk04u0vtVo",pipeline_column:"_2Vr4U7R21ewKodQbQ3yxvA",addSteps:"_1XL2Tx9WZXsq6XUPqcr2-n",addBranchCard:"_1TrqGHHYXzKjWoHt9nGppf",conditions:"_1Clw9YoUbLC8bkdFwJyCp4",nestStage_content:"_8fLMHq9hBtobMpLMRVB6p",indentBorder:"pgY1DAUVAYW-QogDMobqg",nestsStage_detail:"_3vTIWGQ45B-Lpw4vdbSQIO"}},,,function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(18),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(4),r(319),r(23),r(57),r(24),r(17),r(62);var u=l(r(96)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=n(r(0)),p=l(r(243)),m=l(r(1)),h=l(r(3)),v=l(r(1033)),g=l(r(869)),y=l(r(870)),E=l(r(1277)),b=l(r(871)),_=r(794),O=l(r(3448));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var C=function(e){(0,c.default)(r,e);var a=S(r);function r(){var e;(0,o.default)(this,r);for(var n=arguments.length,l=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=t.state.pods;(0,g.default)(a)?t.resourceStore.fetchSortedMetrics(I(I({},t.resourceParams),{},{metrics:[P.cpu_usage],limit:5})).then((function(a){var r=((0,y.default)(a[P.cpu_usage],"data.result")||[]).map((function(e){return(0,y.default)(e,"metric.pod")}));t.setState({pods:r},(function(){t.fetchMetrics(I({resources:r},e))}))})):t.fetchMetrics(I({resources:a},e))},t.fetchMetrics=function(e){var a=t.store.detail.cluster;t.monitorStore.fetchMetrics(I(I({resources:[],metrics:Object.values((0,C.hideGPUByLicense)(P,a))},t.resourceParams),e))},t.getMonitoringCfgs=function(){return[{type:"cpu",title:"CPU_USAGE",unitType:"cpu",metricType:P.cpu_usage},{type:"memory",title:"MEMORY_USAGE",unitType:"memory",metricType:P.memory_usage},{type:"gpu",title:"GPU_USAGE",unitType:"gpu",metricType:P.gpu_usage},{type:"gpu_memory",title:"GPU_MEMORY_USAGE",unitType:"memory",metricType:P.gpu_memory_usage},{type:"bandwidth",title:"OUTBOUND_TRAFFIC",unitType:"bandwidth",metricType:P.net_transmitted},{type:"bandwidth",title:"INBOUND_TRAFFIC",unitType:"bandwidth",metricType:P.net_received}]},t.showMultipleModal=function(e){return(0,C.cacheFunc)("_showMultipleModal_".concat(e.title),(function(){t.setState({showMultipleModal:!0,selectItem:I(I({},e),{},{legend:["USAGE"]})})}),(0,f.default)(t))},t.hideMultipleModal=function(){t.setState({showMultipleModal:!1,selectItem:{}})},t.state={showMultipleModal:!1,selectItem:{},pods:[]};var n=(0,y.default)(t.props.rootStore,"routing.location.pathname","").indexOf("observability")>-1,l=(0,C.isEdgeWizePage)();return t.monitorStore=n?new N.default:l?new k.default:new D.default,t.resourceStore=n?new N.default:l?new k.default:new D.default,t}return(0,s.default)(r,[{key:"renderCard",value:function(){var e=this,a=this.store.detail,r=a.createTime,n=a.cluster,l=this.monitorStore,u=l.isLoading,i=l.isRefreshing,c=(0,C.hideGPUByLicense)(this.getMonitoringCfgs(),n),s=this.isMore;return h.default.createElement(O.Controller,{createTime:r,onFetch:this.fetchData,loading:u,refreshing:i,isEmpty:(0,g.default)(this.metrics)},s&&h.default.createElement(b.Alert,{message:t.html("MONITORING_ALERT_DESC"),type:"info"}),c.map((function(a){a.data=(0,y.default)(e.metrics,"".concat(a.metricType,".data.result"))||[{values:(0,S.getZeroValues)()}],a.legend=a.data.map((function(e,t){return(0,y.default)(e,"metric.pod","pod".concat(t))})),a.workload_kind=e.monitoringModule;var r=(0,S.getAreaChartOps)(a);return h.default.createElement("div",{key:a.title,className:(0,v.default)(R.default.item)},s&&h.default.createElement("div",{className:R.default.more,onClick:e.showMultipleModal(a)},t("VIEW_ALL_REPLICAS")),h.default.createElement(_.MultiArea,(0,o.default)({width:"100%"},r)))})))}},{key:"renderModal",value:function(){var e=this.state,t=e.showMultipleModal,a=e.selectItem,r=this.store.detail,n=r.name,l=r.cluster,u=r.namespace;return h.default.createElement("div",null,h.default.createElement(T.default,{visible:t,module:this.monitoringModule,name:n,cluster:l,namespace:u,config:a,onCancel:this.hideMultipleModal}))}},{key:"render",value:function(){return h.default.createElement("div",null,this.renderCard(),this.renderModal())}},{key:"store",get:function(){return this.props.detailStore}},{key:"monitoringModule",get:function(){return A[this.store.module]}},{key:"metrics",get:function(){var e={};return Object.entries(this.monitorStore.data).forEach((function(t){var a=(0,u.default)(t,2),r=a[0],n=a[1];(0,y.default)(n,"data.result")&&(e["".concat(r)]=n)})),e}},{key:"resourceParams",get:function(){var e=this.store.detail,t=e.cluster,a=e.namespace,r=e.name;return{cluster:t,namespace:a,workload_kind:this.monitoringModule,workload_name:r}}},{key:"isMore",get:function(){var e=this.store.detail,t=e.podNums,a=e.status;return(t||a.numberAvailable)>5}}]),r}(h.default.Component))||l)||l;a.default=j},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(7);var l,u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(14),m=r(239),h=r(52),v=r(72),g=n(r(789)),y=n(r(795)),E=n(r(873)),b=n(r(322)),_=n(r(4050));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},r=e.props.match.params,n=r.name,l=r.namespace,o=r.workspace,i=r.cluster,c=e.props.detailStore.module;e.store.fetchList(S((t={},(0,u.default)(t,v.ROLE_QUERY_KEY[c],n),(0,u.default)(t,"namespace",l),(0,u.default)(t,"workspace",o),(0,u.default)(t,"cluster",i),t),a))},e.getColumns=function(){return[{title:t("USERNAME"),dataIndex:"username",width:"33%"},{title:t("STATUS"),dataIndex:"status",width:"33%",render:function(e){return d.default.createElement(y.default,{type:e,name:t("USER_".concat(e.toUpperCase()))})}},{title:t("LAST_LOGIN"),dataIndex:"lastLoginTime",width:"33%",render:function(e){return d.default.createElement("p",null,e?(0,h.getLocalTime)(e).format("YYYY-MM-DD HH:mm:ss"):t("NOT_LOGIN_YET"))}}]},e}return(0,i.default)(r,[{key:"componentDidMount",value:function(){this.fetchData()}},{key:"render",value:function(){var e=(0,p.toJS)(this.store.list),a=e.data,r=e.total,n=e.page,l=e.limit,u=e.isLoading,o={total:r,page:n,limit:l};return d.default.createElement(g.default,{title:t("AUTHORIZED_USER_PL")},d.default.createElement(E.default,{className:_.default.table,data:a,columns:this.getColumns(),pagination:o,isLoading:u,onFetch:this.fetchData,emptyProps:this.emptyProps,hideCustom:!0,hideHeader:!0}))}},{key:"emptyProps",get:function(){return{icon:"human",name:"USER",desc:t("NO_AUTHORIZED_USER_DESC"),className:_.default.table}}}]),r}(d.default.Component))||l)||l;a.default=D},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(73),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(73),a(28),a(442),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43));a(41);var l=r(a(44)),u=r(a(30)),o=r(a(58)),i=r(a(36)),c=r(a(37)),s=r(a(55)),f=r(a(56)),d=r(a(51)),p=r(a(63)),m=a(794),h=a(52);function v(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function g(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.resources,a=void 0===t?[]:t,r=e.metrics,n=void 0===r?[]:r,l=(0,o.default)(e,["resources","metrics"]),u=g({},l);return(0,p.default)(a)||(u.resources_filter="".concat(a.join("|"),"$")),(0,p.default)(n)||(u.metrics_filter="".concat(n.join("|"),"$")),u.time=Math.floor(Date.now()/1e3),u},e}return(0,c.default)(r,[{key:"fetchGatewayMetrics",value:(t=(0,l.default)(n.default.mark((function e(t){var a,r,l,u,i,c,s,f,d,p,v;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.autoRefresh,r=void 0!==a&&a,l=t.more,u=void 0!==l&&l,i=t.fillZero,c=void 0===i||i,s=(0,o.default)(t,["autoRefresh","more","fillZero"]),r?(s.last=!0,this.isRefreshing=!0):this.isLoading=!0,s.cluster&&(this.cluster=s.cluster),f=this.getGatewayParams(s),d=this.getApi(s),e.next=7,(0,h.to)(request.get(d,f));case 7:return p=e.sent,v=this.getResult(p),r&&(v=this.getRefreshResult(v,this.data)),u&&(v=this.getMoreResult(v,this.data)),this.data=c?(0,m.fillEmptyMetrics)(f,v):v,this.isLoading=!1,this.isRefreshing=!1,e.abrupt("return",v);case 15:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),r}(r(a(845)).default);t.default=E},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Header",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Nav",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"GlobalNav",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Selector",{enumerable:!0,get:function(){return o.default}});var n=r(a(4103)),l=r(a(4115)),u=r(a(4117)),o=r(a(4119))},,,,,function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(6),a(16),a(4),a(23),a(17),a(111),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(6),a(42),a(16),a(4),a(23),a(57),a(17),a(111),a(7);var l=n(a(36)),u=n(a(37)),o=n(a(55)),i=n(a(56)),c=n(a(51)),s=r(a(0)),f=a(186),d=n(a(63)),p=n(a(158)),m=n(a(470)),h=n(a(3)),v=n(a(2098));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=function(e){(0,o.default)(a,e);var t=g(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u0&&void 0!==arguments[0]?arguments[0]:{},a=e.className,r=e.payload,n=e.activeSeries,s=void 0===n?[]:n,f=e.showAll,d=void 0!==f&&f,p=e.isTranslate,m=void 0===p||p,h=e.extraLegend,v=r||[];if(v.length<2&&!d)return u.default.createElement("div",{className:c.default.legend});var g=function(t){var a=e.onClick;if(a){var r=(0,i.default)(t.target,"dataset.key");r&&a(t,r)}};return u.default.createElement("div",{className:(0,o.default)(a,c.default.legend),onClick:g},h&&u.default.createElement("div",{className:c.default.item},h),v.map((function(e){var a=!s.includes(e.value),r=(0,i.default)(e,"payload.stroke");return u.default.createElement("div",{key:e.dataKey,"data-key":e.dataKey,className:(0,o.default)(c.default.item,(0,l.default)({},c.default.inactive,a))},u.default.createElement("i",{style:{backgroundColor:r}}),m?t(e.value):e.value)})))};a.default=s},function(e,t,a){"use strict";a(15),a(11),a(10),Object.defineProperty(t,"__esModule",{value:!0}),t.getActiveSeries=void 0,a(11),a(10),a(4);t.getActiveSeries=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.xKey,a=e.data;return Object.keys(a[0]||{}).filter((function(e){return e!==t}))}},,,function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(468)).default);t.default=c},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(443)).default);t.default=c},,function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.kafkaYaml=void 0;t.kafkaYaml={resources:{apiVersion:"kafka.strimzi.io/v1beta2",kind:"Kafka",metadata:{name:"my-cluster"},spec:{clusterCa:{renewalDays:30,validityDays:3650},clientsCa:{renewalDays:30,validityDays:3650},kafka:{version:"3.2.0",replicas:1,resources:{requests:{memory:"64Gi",cpu:"8"},limits:{memory:"64Gi",cpu:"12"}},listeners:[{name:"external",port:9092,type:"nodeport",tls:!0,authentication:{type:"tls"}}],metricsConfig:{type:"jmxPrometheusExporter",valueFrom:{configMapKeyRef:{key:"kafka-metrics-config.yml",name:"kafka-metrics"}}},authorization:{superUsers:["saas"],type:"simple"},storage:{type:"jbod",volumes:[{id:0,type:"persistent-claim",size:"100Gi",deleteClaim:!0}]},config:{"default.replication.factor":3,"min.insync.replicas":2,"auto.create.topics.enable":!1,"num.partitions":3}},zookeeper:{replicas:1,metricsConfig:{type:"jmxPrometheusExporter",valueFrom:{configMapKeyRef:{key:"zookeeper-metrics-config.yml",name:"kafka-metrics"}}},resources:{requests:{memory:"8Gi",cpu:"2"},limits:{memory:"8Gi",cpu:"2"}},storage:{type:"persistent-claim",size:"100Gi",deleteClaim:!0}},entityOperator:{topicOperator:{},userOperator:{}},cruiseControl:{},kafkaExporter:{groupRegex:".*",topicRegex:".*"}}},user:{apiVersion:"kafka.strimzi.io/v1beta2",kind:"KafkaUser",metadata:{name:"saas",labels:{"strimzi.io/cluster":"my-cluster"}},spec:{authentication:{type:"scram-sha-512"},authorization:{type:"simple",acls:[{type:"allow",operation:"Read",resource:{type:"topic",patternType:"literal",name:""}}]}}},topic:{apiVersion:"kafka.strimzi.io/v1beta2",kind:"KafkaTopic",metadata:{name:"my-topic2",labels:{"strimzi.io/cluster":"my-cluster"}},spec:{partitions:3,replicas:1,config:{"retention.ms":6048e5}}},configMap:{kind:"ConfigMap",apiVersion:"v1",metadata:{name:"kafka-metrics",namespace:"test",labels:{app:"strimzi",component:"configmap"}},data:{"kafka-metrics-config.yml":'# See https://github.com/prometheus/jmx_exporter for more info about JMX Prometheus Exporter metrics\nlowercaseOutputName: true\nrules:\n- pattern: kafka.(\\w+)<>MeanRate\n name: kafka_$1_$2_$3_percent\n type: GAUGE\n- pattern: kafka.(\\w+)<>Value\n name: kafka_$1_$2_$3_percent\n type: GAUGE\n- pattern: kafka.(\\w+)<>Value\n name: kafka_$1_$2_$3_percent\n type: GAUGE\n labels:\n "$4": "$5"\n- pattern: kafka.(\\w+)<>Count\n name: kafka_$1_$2_$3_total\n type: COUNTER\n labels:\n "$4": "$5"\n "$6": "$7"\n- pattern: kafka.(\\w+)<>Count\n name: kafka_$1_$2_$3_total\n type: COUNTER\n labels:\n "$4": "$5"\n- pattern: kafka.(\\w+)<>Count\n name: kafka_$1_$2_$3_total\n type: COUNTER\n- pattern: kafka.cluster<>Value\n name: kafka_cluster_$1_underminisr\n type: GAUGE\n labels:\n "$2": "$3"\n "$4": "$5"\n- pattern: kafka.cluster<>Value\n name: kafka_cluster_$1_underminisr\n type: GAUGE\n labels:\n "$2": "$3"\n- pattern: kafka.cluster<>Value\n name: kafka_cluster_$1_underminisr\n type: GAUGE\n- pattern: kafka.controller<>Value\n name: kafka_controller_$1_$2\n type: GAUGE\n labels:\n "$3": "$4"\n "$5": "$6"\n- pattern: kafka.controller<>Value\n name: kafka_controller_$1_$2\n type: GAUGE\n labels:\n "$3": "$4"\n- pattern: kafka.controller<>Value\n name: kafka_controller_$1_$2\n type: GAUGE\n- pattern: kafka.server<>Value\n name: kafka_server_$1_$2\n type: GAUGE\n labels:\n "$3": "$4"\n "$5": "$6"\n- pattern: kafka.server<>Value\n name: kafka_server_$1_$2\n type: GAUGE\n labels:\n "$3": "$4"\n- pattern: kafka.server<>Value\n name: kafka_server_$1_$2\n type: GAUGE',"zookeeper-metrics-config.yml":'# See https://github.com/prometheus/jmx_exporter for more info about JMX Prometheus Exporter metrics\nlowercaseOutputName: true\nrules:\n# replicated Zookeeper\n- pattern: "org.apache.ZooKeeperService<>(\\\\w+)"\n name: "zookeeper_$2"\n type: GAUGE\n- pattern: "org.apache.ZooKeeperService<>(\\\\w+)"\n name: "zookeeper_$3"\n type: GAUGE\n labels:\n replicaId: "$2"\n- pattern: "org.apache.ZooKeeperService<>(Packets\\\\w+)"\n name: "zookeeper_$4"\n type: COUNTER\n labels:\n replicaId: "$2"\n memberType: "$3"\n- pattern: "org.apache.ZooKeeperService<>(\\\\w+)"\n name: "zookeeper_$4"\n type: GAUGE\n labels:\n replicaId: "$2"\n memberType: "$3"\n- pattern: "org.apache.ZooKeeperService<>(\\\\w+)"\n name: "zookeeper_$4_$5"\n type: GAUGE\n labels:\n replicaId: "$2"\n memberType: "$3"'}},podMonitor:{apiVersion:"monitoring.coreos.com/v1",kind:"PodMonitor",metadata:{name:"kafka-resources-metrics",namespace:"test",labels:{app:"strimzi",component:"podmonitor"}},spec:{selector:{matchExpressions:[{key:"strimzi.io/kind",operator:"In",values:["Kafka","KafkaConnect","KafkaMirrorMaker","KafkaMirrorMaker2"]},{key:"strimzi.io/component-type",operator:"NotIn",values:["kafka-exporter"]}]},namespaceSelector:{matchNames:["namespace"]},podMetricsEndpoints:[{path:"/metrics",port:"tcp-prometheus",relabelings:[{separator:";",regex:"__meta_kubernetes_pod_label_(strimzi_io_.+)",replacement:"$1",action:"labelmap"},{sourceLabels:["__meta_kubernetes_namespace"],separator:";",regex:"(.*)",targetLabel:"namespace",replacement:"$1",action:"replace"},{sourceLabels:["__meta_kubernetes_pod_name"],separator:";",regex:"(.*)",targetLabel:"kubernetes_pod_name",replacement:"$1",action:"replace"},{sourceLabels:["__meta_kubernetes_pod_node_name"],separator:";",regex:"(.*)",targetLabel:"node_name",replacement:"$1",action:"replace"},{sourceLabels:["__meta_kubernetes_pod_host_ip"],separator:";",regex:"(.*)",targetLabel:"node_ip",replacement:"$1",action:"replace"}]}]}},rebalance:{apiVersion:"kafka.strimzi.io/v1beta2",kind:"KafkaRebalance",metadata:{name:"my-rebalance2",labels:{"strimzi.io/cluster":"my-cluster"},annotations:{"strimzi.io/rebalance":"approve"}},spec:{mode:"full"}}}},,function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(885)).default);t.default=c},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o,i=r(a(44)),c=r(a(36)),s=r(a(37)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=r(a(49)),h=r(a(68)),v=a(14),g=a(52);function y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function E(e){for(var t=1;t0&&void 0!==d[0]?d[0]:{},a=t.cluster,r=t.namespace,l=t.module,o=(0,u.default)(t,["cluster","namespace","module"]),this.list.isLoading=!0,l&&(this.module=l),i=o,e.next=6,request.get(this.getListUrl({cluster:a,namespace:r,module:l}),i);case 6:return c=e.sent,s=c.items.map((function(e){return E({cluster:a,module:l||f.module},f.mapper(e))})),(0,g.LimitsEqualRequests)(s),this.list.update({data:s,total:c.items.length,isLoading:!1}),e.abrupt("return",s);case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(h.default),(0,m.default)(o.prototype,"fetchListByK8s",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchListByK8s"),o.prototype),o);t.default=_},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(84),r(18),r(16),r(27),r(4),r(23),r(24),r(17),r(136),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(6),r(84),r(18),r(28),r(42),r(16),r(27),r(4),r(23),r(57),r(24),r(193),r(17),r(7);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=r(72),p=r(186),m=n(r(63)),h=n(r(74)),v=n(r(1545)),g=n(r(1546)),y=n(r(829)),E=n(r(2298));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var _=function(e){(0,o.default)(r,e);var a=b(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,u=new Array(n),o=0;o0){var l=[];r.forEach((function(a){return!a.name||!a.containerPort||e.props.withService&&!a.servicePort?n({message:t("INVALID_PORT")}):l.includes(a.name)?n({message:t("PORT_INPUT_DESC")}):a.name&&(a.name.length>15||!d.PATTERN_PORT_NAME.test(a.name))?n({message:t("WORKLOAD_PORT_NAME_DESC")}):void l.push(a.name)}))}n()},e.checkContainerPortValid=function(t){return e.props.withService?t&&t.name&&t.containerPort&&t.servicePort:t&&t.name&&t.containerPort},e.handleFillPorts=function(){var t,a=e.context.imageDetail.exposedPorts,r=(void 0===a?[]:a).map((function(e){var t=e.split("/")[1],a=Number(e.split("/")[0]);return{name:"".concat(t,"-").concat(a),protocol:t.toUpperCase(),containerPort:a,servicePort:a}}));(0,m.default)(r)||((0,h.default)(e.props.data,"ports",r),null===(t=e.context)||void 0===t||t.forceUpdate())},e}return(0,u.default)(r,[{key:"render",value:function(){var e,a,r,n=this.props,l=n.withService,u=n.className;return s.default.createElement(p.Form.Group,{className:u,label:t("PORT_SETTINGS"),desc:t("PORT_SETTINGS_DESC")},s.default.createElement(p.Form.Item,{rules:[{required:l,message:t("PORT_EMPTY")},{validator:this.portsValidator,checkOnSubmit:!0}]},s.default.createElement(y.default,{name:"".concat(this.prefix,"ports"),itemType:"object",addText:t("ADD_PORT"),checkItemValid:this.checkContainerPortValid,extraAdd:!(0,m.default)(null!==(e=null===(a=this.context)||void 0===a||null===(r=a.imageDetail)||void 0===r?void 0:r.exposedPorts)&&void 0!==e?e:[])&&s.default.createElement(p.Button,{className:E.default.defaultButton,onClick:this.handleFillPorts},t("USE_IMAGE_DEFAULT_PORTS"))},l?s.default.createElement(g.default,null):s.default.createElement(v.default,null))))}},{key:"prefix",get:function(){var e=this.props.prefix;return e?"".concat(e,"."):""}}]),r}(s.default.Component);a.default=_,_.defaultProps={prefix:""},_.contextTypes={imageDetail:f.default.object,forceUpdate:f.default.func}},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var n=r(a(30)),l=r(a(58)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=r(a(1)),p=r(a(3)),m=r(a(2295));function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=t.cluster,r=void 0===a?"":a,n=t.workspace,l=void 0===n?"":n;return"/kapis".concat(r&&"/clusters/".concat(r),"/apps.edgewize.io/v1alpha1").concat(l&&"/workspaces/".concat(l),"/").concat(e.module)},e}return(0,f.default)(r,[{key:"fetchDetail",value:(t=(0,i.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get("".concat(this.getResourceUrl(t),"/").concat(t.name));case 3:return a=e.sent,r=b(b({},t),this.mapper(a)),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"create",value:function(e,t){var a=e.cluster,r=(0,g.default)(t,"metadata.name"),n=this.getUrl({cluster:a,name:r});return this.submitting(request.post(n,t))}},{key:"delete",value:function(e){var t=e.cluster,a=e.name,r=this.getUrl({cluster:t,name:a});return this.submitting(request.delete(r))}}]),r}(r(a(68)).default),o=(0,v.default)(u.prototype,"allTemplates",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,v.default)(u.prototype,"fetchDetail",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchDetail"),u.prototype),(0,v.default)(u.prototype,"create",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"create"),u.prototype),(0,v.default)(u.prototype,"delete",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"delete"),u.prototype),u);t.default=O},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(31),r(6),r(18),r(48),r(16),r(27),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(31),r(6),r(18),r(28),r(48),r(42),r(16),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(319),r(23),r(57),r(17),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(26)),p=n(r(925)),m=n(r(242)),h=n(r(241)),v=n(r(158)),g=n(r(63)),y=n(r(0)),E=r(14),b=r(1),_=r(52),O=r(72),S=r(186),C=n(r(966)),D=n(r(866)),k=n(r(1560));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};n.setState({isLoading:!0});var t=n.context.formData,a=(0,d.default)(t,"spec.storageClassName");return n.store.fetchList(T(T({},e),{},{cluster:n.props.cluster})).then((function(){var e=(0,E.toJS)(n.store.list.data);n.setState({storageClasses:(0,E.toJS)(n.store.list.data),storageClass:e.find((function(e){return a===e.name}))||e.find((function(e){return e.default}))||{},isLoading:!1})}))},n.getStorageClasses=function(){return n.state.storageClasses.map((function(e){return{label:e.name,value:e.name}}))},n.getSupportedAccessModes=function(){var e=n.state.storageClass,t=null;return e&&(t=(0,_.safeParseJSON)((0,d.default)(e,'annotations["storageclass.kubesphere.io/supported-access-modes"]',""))),(0,v.default)(t)?[]:t},n.handleStorageClassChange=function(e){var t=n.state.storageClasses.find((function(t){return t.name===e}))||{};(0,m.default)(n.context.formData,"spec.accessModes"),n.setState({storageClass:t})},n.sizeValidator=function(e,a,r){return parseInt(a,10)<=0?r({message:t("VOLUME_SIZE_TIP"),field:e.field}):r()},n.store=e.isEdgeWize?new k.default:new D.default,n.state={storageClasses:[],storageClass:{},isLoading:!1},n}return(0,i.default)(r,[{key:"componentDidMount",value:function(){this.updateStorageClass()}},{key:"getSliderProps",value:function(e){var t={min:0,max:2048,defaultValue:"10Gi",step:1,unit:"Gi"},a=Number((0,d.default)(e,"parameters.minSize")),r=Number((0,d.default)(e,"parameters.maxSize")),n=Number((0,d.default)(e,"parameters.stepSize"));(0,p.default)(a)||(t.min=a),(0,p.default)(r)||(t.max=r),(0,p.default)(n)||(t.step=n);for(var l=(t.max/t.step-t.min/t.step)/4,u={},o=0;o<4;o++){var i=Math.floor(l*o)*t.step+t.min;u[i]=0===i?"0":"".concat(i,"Gi")}return u[t.max]="".concat(t.max,"Gi"),t.marks=u,t}},{key:"render",value:function(){var e=this.state,a=e.storageClass,r=e.isLoading,n=this.props,u=n.editModalTitle,o=n.tabTitle,i=n.isFederated,c=n.isEdit,s=this.getStorageClasses(),f=this.store.list||{},d=this.getSupportedAccessModes(),p=(0,g.default)(d)?Object.keys(O.ACCESS_MODES):d,m=p.map((function(e){return{value:e,label:e}})),v="ReadWriteOnce"in p?["ReadWriteOnce"]:p.slice(0,1);return y.default.createElement(y.default.Fragment,null,!i&&!c&&y.default.createElement(S.Form.Item,{label:t("STORAGE_CLASS"),desc:t("VOLUME_STORAGE_CLASS_DESC"),rules:[{required:!0,message:t("PARAM_REQUIRED")}]},y.default.createElement(S.Select,{name:"spec.storageClassName",defaultValue:a.name,pagination:(0,h.default)(f,["page","limit","total"]),isLoading:f.isLoading,onChange:this.handleStorageClassChange,options:s,onFetch:this.updateStorageClass,searchable:!0,clearable:!0})),"EDIT_SETTINGS"!==u&&"CLUSTER_DIFF"!==o?y.default.createElement(S.Form.Item,{label:t("ACCESS_MODE"),rules:[{required:!0,message:t("PARAM_REQUIRED")}],desc:t("ACCESS_MODES_DESC")},y.default.createElement(S.Select,{name:"spec.accessModes",options:m,loading:r,defaultValue:v,multi:!0})):"",y.default.createElement(S.Form.Item,{label:t("VOLUME_CAPACITY"),rules:[{validator:this.sizeValidator}]},y.default.createElement(C.default,(0,l.default)({name:"spec.resources.requests.storage"},this.getSliderProps(a),{withInput:!0}))))}}]),r}(y.default.Component);a.default=w,w.contextTypes={formData:b.PropTypes.object}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17),r(110);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=r(186),h=n(r(2451));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=function(e){(0,i.default)(r,e);var a=v(r);function r(e){var t;return(0,u.default)(this,r),(t=a.call(this,e)).getIconColr=function(){var e={primary:"#fff"};switch(t.props.type){default:case"info":e.secondary="#329dce"}return e},t.handleCancel=function(){t.setState({show:!1},(function(){var e=setTimeout((function(){t.props.onCancel(),clearTimeout(e)}),1e3)}))},t.state={show:e.visible},t}return(0,o.default)(r,[{key:"renderBtns",value:function(){var e=this.props,a=e.btns,r=e.confirmText,n=e.cancelText,l=e.onConfirm,u=e.isSubmitting;return a||f.default.createElement("div",null,f.default.createElement(m.Button,{onClick:this.handleCancel},t(n)),f.default.createElement(m.Button,{type:"control",onClick:l,loading:u},t(r)))}},{key:"renderCard",value:function(){var e,t=this.props,a=t.visible,r=t.width,n=t.title,u=t.content;if(!a)return null;var o=this.state.show,i={width:r};return f.default.createElement("div",{className:(0,p.default)(h.default.card,(e={},(0,l.default)(e,h.default.in,o),(0,l.default)(e,h.default.out,!o),e)),style:i},f.default.createElement("div",{className:h.default.cardMain},f.default.createElement("div",{className:h.default.title},f.default.createElement(m.Icon,{name:"information",size:20,color:this.getIconColr()}),f.default.createElement("strong",null,n)),f.default.createElement("div",{className:h.default.content},u)),f.default.createElement("div",{className:h.default.cardFoot},this.renderBtns()))}},{key:"render",value:function(){return f.default.createElement("div",{className:h.default.wrapper},this.renderCard())}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.visible!==t.show?{show:e.visible}:null}}]),r}(f.default.PureComponent);a.default=g,g.propTypes={visible:d.default.bool,width:d.default.number,type:d.default.string,title:d.default.string,content:d.default.oneOfType([d.default.node,d.default.element]),btns:d.default.oneOfType([d.default.node,d.default.element]),confirmText:d.default.string,cancelText:d.default.string,onConfirm:d.default.func,onCancel:d.default.func,isSubmitting:d.default.bool},g.defaultProps={visible:!1,isSubmitting:!1,width:"auto",type:"info",title:"title",content:"content",confirmText:"OK",cancelText:"CANCEL",onConfirm:function(){},onCancel:function(){}}},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(0)),l=r(a(3)),u=r(a(2453));var o=function(e){var t=e.className,a=e.text,r=e.icon;return n.default.createElement("div",{className:(0,l.default)(u.default.emptyTip,t)},r||n.default.createElement("img",{width:32,height:32,src:"/assets/data_empty.svg"}),a||n.default.createElement("p",{className:u.default.emptyText},"暂无相关数据"))};t.default=o},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(16),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o=r(a(44)),i=r(a(36)),c=r(a(37)),s=r(a(55)),f=r(a(56)),d=r(a(51)),p=r(a(68)),m=r(a(26));function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=t.cluster,r=t.name;return"".concat(e.getNetworkUrl).concat(e.getPath({cluster:a}),"/").concat(e.module,"/").concat(r,"/migrate")},e}return(0,c.default)(l,[{key:"fetchMigrateIpPool",value:(a=(0,o.default)(n.default.mark((function e(){var t,a,r,l,o,i,c,s=this,f=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=f.length>0&&void 0!==f[0]?f[0]:{},a=t.cluster,r=t.namespace,l=t.name,o=(0,u.default)(t,["cluster","namespace","name"]),e.next=3,request.get(this.getNetworkResourceUrl({name:l,cluster:a}),this.getFilterParams(o));case 3:return i=e.sent,c=((0,m.default)(i,"items")||[]).map((function(e){return v({cluster:a,namespace:r},s.mapper(e))})),e.abrupt("return",c);case 6:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchNamespacesIpPools",value:(t=(0,o.default)(n.default.mark((function e(){var t,a,r,l,o,i=this,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:{},a=t.namespace,r=t.cluster,l=(0,u.default)(t,["namespace","cluster"]),e.next=3,request.get("".concat(this.getNetworkUrl).concat(this.getPath({namespace:a,cluster:r}),"/").concat(this.module),this.getFilterParams(l));case 3:return o=e.sent,e.abrupt("return",o.map((function(e){return v({cluster:r,namespace:a},i.mapper(e))})));case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),l}(p.default);t.default=E},,,function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(5),r(11),r(31),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(859),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var u,o=n(r(315)),i=n(r(58)),c=n(r(30)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=l(r(0)),v=r(239),g=n(r(241)),y=r(186),E=n(r(439)),b=r(52),_=n(r(2600));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=e.props.cluster;return t.name&&(t.nameAndAlias=t.name,delete t.name),e.projectStore.fetchList(S({cluster:a},t))},e.optionRenderer=function(a){return h.default.createElement("div",{className:_.default.option,key:a.value},a.isFedManaged?h.default.createElement("img",{className:_.default.indicator,src:"/assets/cluster.svg"}):h.default.createElement(y.Icon,{name:"project"}),a.label,a.isFedManaged&&h.default.createElement(y.Tooltip,{content:e.props.tipMessage||t("FEDPROJECT_RESOURCE_TIP")},h.default.createElement(y.Icon,{className:_.default.tip,name:"question"})))},e}return(0,f.default)(r,[{key:"componentDidMount",value:function(){var e=this.props.labelSelector;this.fetchProjects(e?{labelSelector:e}:void 0)}},{key:"getProjects",value:function(){var e=this.props.defaultValue,t=this.projectStore.list.data,a=t.filter((function(e){return"Terminating"!==e.status})).map((function(e){return{label:(0,b.showNameAndAlias)(e),value:e.name,disabled:e.isFedManaged,isFedManaged:e.isFedManaged}}));return e&&!t.find((function(t){return t.name===e}))&&a.unshift({label:e,value:e}),a}},{key:"render",value:function(){var e=this.props,t=(e.cluster,(0,i.default)(e,["cluster"]));return!t.value&&t.defaultValue&&(t.value=t.defaultValue),h.default.createElement(y.Select,(0,o.default)({options:this.getProjects(),pagination:(0,g.default)(this.projectStore.list,["page","limit","total"]),isLoading:this.projectStore.list.isLoading,valueRenderer:this.optionRenderer,optionRenderer:this.optionRenderer,onFetch:this.fetchProjects,searchable:!0,clearable:!0,disableRemoteSearch:!0,placeholder:" "},t))}}]),r}(h.Component))||u;a.default=D},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(11),a(18),a(48),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(11),a(18),a(48),a(42),a(16),a(4),a(23),a(57),a(17);var l=n(a(315)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51)),f=a(186),d=n(a(321)),p=r(a(0)),m=a(52),h=a(72),v=n(a(2602));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var y=function(e){(0,i.default)(a,e);var t=g(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,n=new Array(r),o=0;o2&&void 0!==arguments[2]&&arguments[2],n=(0,d.default)(e.props.clustersDetail,"name"),u=e.props.children,o=n[t.name]||t;return p.default.createElement("span",{className:r?v.default.tagItem:"",title:(0,m.getDisplayNameNew)(o,!1),key:"".concat(o.name,"-").concat(a)},p.default.createElement(f.Tag,{key:o.name,type:r?"info":h.CLUSTER_GROUP_TAG_TYPE[o.group]},p.default.createElement(f.Icon,(0,l.default)({name:h.CLUSTER_PROVIDER_ICON[o.provider]||"kubernetes",size:16},"default"!==h.CLUSTER_GROUP_TAG_TYPE[o.group]||r?{}:{type:"light"})),u?u(o):(0,m.getDisplayNameNew)(o)))},e.renderItem1=function(t,a){return e.renderItem(t,a,!1)},e.renderTooltip=function(t,a){return e.renderItem(t,a,!0)},e}return(0,o.default)(a,[{key:"render",value:function(){var e=this.props.clusters,t=void 0===e?[]:e,a=(0,d.default)(this.props.clustersDetail,"name"),r=t.filter((function(e){return a[e.name]})),n=r.slice(2),l=r.slice(0,2);return p.default.createElement("div",{className:v.default.wrapper},p.default.createElement("div",{className:v.default.tags},l.map(this.renderItem1),n.length?p.default.createElement(f.Tooltip,{content:p.default.createElement("div",{className:"flexbox items-center ".concat(v.default.tooltipContent)},n.map(this.renderTooltip))},p.default.createElement(f.Tag,{type:"primary"},r.length)):null,0===r.length&&"-"))}}]),a}(p.Component);t.default=y},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(160),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(61)),u=r(a(30)),o=r(a(58));a(41);var i,c,s,f,d=r(a(44)),p=r(a(65)),m=r(a(36)),h=r(a(37)),v=r(a(88)),g=r(a(55)),y=r(a(56)),E=r(a(51)),b=r(a(49)),_=(r(a(66)),r(a(189))),O=a(14);function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/gitrepositories").concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/gitrepositories")},e.getDetailUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getListUrl(t),"/").concat(t.name)},(0,p.default)(e,"setSelectRowKeys",f,(0,v.default)(e)),e}return(0,h.default)(E,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.namespace,a=e.cluster,r="";return a&&(r+="/klusters/".concat(a)),t&&(r+="/namespaces/".concat(t)),r}},{key:"fetchList",value:(i=(0,d.default)(n.default.mark((function e(){var t,a,r,u,i,c,s,f,d=this,p=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},a=t.devops,t.workspace,r=t.cluster,u=t.more,i=(0,o.default)(t,["devops","workspace","cluster","more"]),this.list.isLoading=!0,i.limit!==1/0&&-1!==i.limit||(i.limit=-1,i.page=1),i.limit=i.limit||10,c="".concat(this.getResourceUrl({namespace:a,cluster:r})),e.next=7,request.get(c,C({},i),{},(function(){return[]}));case 7:return s=e.sent,f=Array.isArray(s.items)?s.items.map((function(e){return C({},d.mapper(C(C({},e),{},{devops:a})))})):[],this.list.update(C(C({data:u?[].concat((0,l.default)(this.list.data),(0,l.default)(f)):f,total:s.totalItems||s.total_count||f.length||0},i),{},{limit:Number(i.limit)||10,page:Number(i.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",f);case 11:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"create",value:(u=(0,d.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.data,r=t.devops,l=t.cluster,u="".concat(this.getResourceUrl({namespace:r,cluster:l})),e.next=4,request.post(u,a);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"edit",value:(r=(0,d.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.data,r=t.devops,l=t.name,u=t.cluster,o="".concat(this.getResourceUrl({namespace:r,cluster:u}),"/").concat(l),e.abrupt("return",this.submitting(request.put(o,a)));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"update",value:(a=(0,d.default)(n.default.mark((function e(t,a){var r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat(this.getResourceUrl({namespace:t.devops,cluster:t.cluster}),"/").concat(a.metadata.name),e.abrupt("return",this.submitting(request.put(r,a)));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"delete",value:function(e){var t=(0,_.default)(C(C({},e),{},{namespace:e.devops}),"devops");return this.submitting(request.delete(this.getDetailUrl(t)))}},{key:"fetchDetail",value:(t=(0,d.default)(n.default.mark((function e(t){var a,r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="".concat(this.getResourceUrl({namespace:t.devops,cluster:t.cluster}),"/").concat(t.name),e.next=3,this.submitting(request.get(a),null,null,(function(){return{}}));case 3:return r=e.sent,l=this.mapper(r),this.detail=l,e.abrupt("return",l);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),E}(r(a(68)).default),c=(0,b.default)(i.prototype,"list",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",filters:{},isLoading:!1,selectedRowKeys:[]}}}),s=(0,b.default)(i.prototype,"detail",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),f=(0,b.default)(i.prototype,"setSelectRowKeys",[O.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.list.selectedRowKeys=t}}}),(0,b.default)(i.prototype,"fetchList",[O.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,b.default)(i.prototype,"create",[O.action],Object.getOwnPropertyDescriptor(i.prototype,"create"),i.prototype),(0,b.default)(i.prototype,"edit",[O.action],Object.getOwnPropertyDescriptor(i.prototype,"edit"),i.prototype),(0,b.default)(i.prototype,"update",[O.action],Object.getOwnPropertyDescriptor(i.prototype,"update"),i.prototype),(0,b.default)(i.prototype,"delete",[O.action],Object.getOwnPropertyDescriptor(i.prototype,"delete"),i.prototype),(0,b.default)(i.prototype,"fetchDetail",[O.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),i);t.default=k},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(18),a(16),a(9),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(5),a(18),a(16),a(9),a(4),a(22);var n=r(a(43)),l=r(a(58));a(41);var u,o,i=r(a(44)),c=r(a(65)),s=r(a(36)),f=r(a(37)),d=r(a(49)),p=(r(a(66)),r(a(1344))),m=a(14),h=r(a(105)),v=(u=function(){function e(){(0,s.default)(this,e),(0,c.default)(this,"list",o,this)}var t;return(0,f.default)(e,[{key:"fetchList",value:(t=(0,i.default)(n.default.mark((function e(t){var a,r,u,o,i,c;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.name,a=t.cluster,r=t.namespace,u=(0,l.default)(t,["name","cluster","namespace"]),this.list.isLoading=!0,o=a?"/klusters/".concat(a):"",i=r?"/namespaces/".concat(r):"",e.next=6,request.get("api/v1".concat(o).concat(i,"/events"),u);case 6:c=e.sent,this.list={data:(0,p.default)(c.items.map(h.default.events),"lastTimestamp"),total:c.items.length,isLoading:!1};case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),o=(0,d.default)(u.prototype,"list",[m.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,isLoading:!0}}}),(0,d.default)(u.prototype,"fetchList",[m.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchList"),u.prototype),u);t.default=v},function(e,t,a){"use strict";var r=a(20);a(12),a(109),a(5),a(11),a(6),a(84),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(24),a(17),a(85),a(136),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(109),a(45),a(5),a(11),a(6),a(84),a(160),a(18),a(28),a(191),a(42),a(16),a(159),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(85),a(7);var n=r(a(246)),l=r(a(43)),u=r(a(61)),o=r(a(30)),i=r(a(58));a(41);var c,s,f,d,p=r(a(44)),m=r(a(65)),h=r(a(36)),v=r(a(37)),g=r(a(88)),y=r(a(55)),E=r(a(56)),b=r(a(51)),_=r(a(49)),O=(r(a(66)),r(a(74))),S=r(a(26)),C=r(a(63)),D=r(a(76)),k=r(a(242)),N=r(a(158)),T=a(14),R=a(440),w=a(72),I=r(a(435)),M=r(a(323));function P(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a="".concat(e.getBaseUrl(t),"credentials");return t.name?"".concat(a,"/").concat(t.name):a},e}return(0,v.default)(b,[{key:"setParams",value:function(e){this.params=e}},{key:"fetchList",value:(c=(0,p.default)(l.default.mark((function e(){var t,a,r,n,o,c,s,f=this,d=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},a=t.devops,r=t.cluster,n=(0,i.default)(t,["devops","cluster"]),this.list.isLoading=!0,n.limit===1/0||-1===n.limit?(n.limit=-1,n.page=1):n.limit=n.limit||10,o=n.more||!1,(0,k.default)(n,"more"),n.sortBy=n.sortBy||"createTime",e.next=8,request.get(this.getResourceUrl({devops:a,cluster:r}),A({},n));case 8:return c=e.sent,s=Array.isArray(c.items)?c.items.filter((function(e){return w.CREDENTIAL_TYPE_LIST.includes(e.type)})).map((function(e){return(e=f.mapper(e)).type=w.CREDENTIAL_DISPLAY_KEY[e.type.split("/")[1]],e})):[],this.list.update({data:o?[].concat((0,u.default)(this.list.data),(0,u.default)(s)):s,total:c.totalItems||s.length||0,filters:n,limit:Number(n.limit)||10,page:Number(n.page)||1,isLoading:!1}),e.abrupt("return",s);case 12:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"handleCreate",value:(o=(0,p.default)(l.default.mark((function e(t,a){var r,n,u,o,i;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.devops,n=a.cluster,u=I.default[this.module]({namespace:r}),o=(0,S.default)(t,t.type,{}),i=o.id||t.id,(0,O.default)(u,"metadata.labels.app",i),(0,O.default)(u,'metadata.annotations["kubesphere.io/description"]',t.description),(0,O.default)(u,"metadata.name",i),delete t.description,o.id&&delete o.id,!(0,C.default)(o)&&(0,D.default)(o)&&Object.keys(o).forEach((function(e){o[e]&&(o[e]=(0,R.safeBtoa)(o[e]))})),delete t[t.type],u.data=A({},o),u.type="credential.devops.kubesphere.io/".concat(w.CREDENTIAL_KEY[t.type]),e.next=15,request.post(this.getResourceUrl({devops:r,cluster:n}),u,null,null);case 15:return e.abrupt("return",e.sent);case 16:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"fetchDetail",value:(r=(0,p.default)(l.default.mark((function e(t){var a,r,n,u,o,i;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,N.default)(t)||(0,C.default)(t)||(this.params=t),a=this.params,r=a.devops,n=a.credential_id,u=a.cluster,e.next=4,request.get("".concat(this.getResourceUrl({devops:r,name:n,cluster:u}),"?content=1"));case 4:o=e.sent,(i=this.mapper(o)).display_name=i.name,i.id=i.name,i.type=w.CREDENTIAL_DISPLAY_KEY[i.type.split("/")[1]],this.detail=i,this.isLoading=!1;case 11:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"updateCredential",value:(a=(0,p.default)(l.default.mark((function e(t,a){var r,u,o,i,c;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.devops,u=a.cluster,o=t[t.type],i=t.description,c=t._originData,"{}"!==JSON.stringify(o)&&"object"===(0,n.default)(o)&&Object.keys(o).forEach((function(e){o[e]=(0,R.safeBtoa)(o[e])})),(0,O.default)(c,"data",o),(0,O.default)(c,'metadata.annotations["kubesphere.io/description"]',i),e.next=9,request.put("".concat(this.getResourceUrl({devops:r,name:t.name,cluster:u}),"?content=1"),c);case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"delete",value:(t=(0,p.default)(l.default.mark((function e(t){var a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.id,r=this.params,n=r.devops,u=r.cluster,e.next=4,request.delete("".concat(this.getResourceUrl({devops:n,name:a,cluster:u})));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"checkName",value:function(e){return request.get(this.getResourceUrl(e),{},{headers:{"x-check-exist":!0}})}},{key:"apiVersion",get:function(){return w.API_VERSIONS.devops}}]),b}(M.default),s=(0,_.default)(c.prototype,"list",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",reverse:!1,filters:{},isLoading:!0}}}),f=(0,_.default)(c.prototype,"detail",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),d=(0,_.default)(c.prototype,"params",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),(0,_.default)(c.prototype,"setParams",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"setParams"),c.prototype),(0,_.default)(c.prototype,"fetchList",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchList"),c.prototype),(0,_.default)(c.prototype,"handleCreate",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"handleCreate"),c.prototype),(0,_.default)(c.prototype,"fetchDetail",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchDetail"),c.prototype),(0,_.default)(c.prototype,"updateCredential",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"updateCredential"),c.prototype),(0,_.default)(c.prototype,"delete",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"delete"),c.prototype),(0,_.default)(c.prototype,"checkName",[T.action],Object.getOwnPropertyDescriptor(c.prototype,"checkName"),c.prototype),c);t.default=L},,,,,,,,,,,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(315)),u=n(r(58)),o=n(r(30)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51));r(45),r(5),r(42),r(4),r(23),r(57),r(24),r(193),r(17);var p=n(r(0)),m=n(r(63)),h=r(186),v=n(r(3)),g=r(72),y=n(r(2922));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var b=/(?=.*?[A-Z])(?=.*?[a-z])/,_=/(?=.*?[~!@#$%^&*()\-_=+\\|\[\{\}\];:'",<.>/? ])/,O=/(?=.*?[0-9])/,S=function(e){if((0,m.default)(e))return-1;var t=0;return b.test(e)&&(t+=4),O.test(e)&&(t+=2),_.test(e)&&(t+=2),e.length>=6&&e<12?t+=2:e.length>=12&&(t+=4),g.PATTERN_PASSWORD.test(e)?t:0},C=function(e){(0,s.default)(r,e);var a=E(r);function r(){var e;(0,i.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l-1})}},e.handleDropdownClose=function(t){t&&t.target&&e.ref&&e.ref.current&&e.ref.current.contains(t.target)?e.setState({showTip:!0}):e.setState({showTip:!1})},e.handleInputClick=function(){var t=e.state.strength;e.setState({showTip:t>-1})},e.handleInputBlur=function(){e.setState({showTip:!1})},e.getColor=function(){var t=e.state.strength;return-1===t?{width:0,backgroundColor:"#fff"}:t>=0&&t<6?{width:"33%",backgroundColor:"#ca2621"}:t>=6&&t<8?{width:"66%",backgroundColor:"#f5a623"}:t>=8?{width:"100%",backgroundColor:"#55bc8a"}:void 0},e}return(0,c.default)(r,[{key:"renderStrengthContent",value:function(){var e=this.props.value,a=void 0===e?"":e;return p.default.createElement("div",{className:y.default.content},p.default.createElement("p",null,t("PASSWORD_MUST")),p.default.createElement("ul",{className:y.default.rules},p.default.createElement("li",null,p.default.createElement(h.Icon,{className:(0,v.default)(y.default.icon,(0,o.default)({},y.default.selected,b.test(a))),name:"check",size:12,type:"light"}),t("PASSWORD_LETTER")),p.default.createElement("li",null,p.default.createElement(h.Icon,{className:(0,v.default)(y.default.icon,(0,o.default)({},y.default.selected,O.test(a))),name:"check",size:12,type:"light"}),t("PASSWORD_NUMBER")),p.default.createElement("li",null,p.default.createElement(h.Icon,{className:(0,v.default)(y.default.icon,(0,o.default)({},y.default.selected,_.test(a))),name:"check",size:12,type:"light"}),t("PASSWORD_CHARACTERS")),p.default.createElement("li",null,p.default.createElement(h.Icon,{className:(0,v.default)(y.default.icon,(0,o.default)({},y.default.selected,a.length>=8)),name:"check",size:12,type:"light"}),t("PASSWORD_LENGTH"))),p.default.createElement("p",null,t("PASSWORD_STRENGTH"),":"),p.default.createElement("div",{className:y.default.barWrapper},p.default.createElement("div",{className:y.default.bar,style:this.getColor()})),p.default.createElement("p",{className:y.default.tip},t("PASSWORD_STRENGTH_DESC")))}},{key:"render",value:function(){var e=this.props,t=e.withStrength,a=e.tipClassName,r=(0,u.default)(e,["withStrength","tipClassName"]),n=this.state,o=n.showTip,i=n.strength;return t?p.default.createElement("div",{className:y.default.wrapper,ref:this.ref},p.default.createElement(h.Dropdown,{className:a,visible:o&&i>-1,content:this.renderStrengthContent(),placement:"bottomRight",closeAfterClick:!1,onClose:this.handleDropdownClose},p.default.createElement("div",{className:y.default.trigger})),p.default.createElement(h.InputPassword,(0,l.default)({},r,{onChange:this.handleChange,onBlur:this.handleInputBlur,onClick:this.handleInputClick}))):p.default.createElement(h.InputPassword,r)}}]),r}(p.default.Component);a.default=C},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(63)),h=n(r(787)),v=n(r(2973)),g=n(r(2975));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=function(e){(0,c.default)(r,e);var a=y(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.visible,r=e.title,n=e.module,o=e.store,i=e.forms,c=e.onOk,s=e.onCancel,f=e.cluster,p=e.namespace,m=(0,u.default)(e,["visible","title","module","store","forms","onOk","onCancel","cluster","namespace"]);return d.default.createElement(h.default,(0,l.default)({width:1162,bodyClassName:g.default.body,title:t(r),visible:a,onCancel:s,hideFooter:!0},m),d.default.createElement(v.default,(0,l.default)({},m,{module:n,store:o,forms:i,cluster:f,namespace:p,data:this.formData,onSubmit:c,onCancel:s})))}},{key:"formData",get:function(){var e=this.props,t=e.detail,a=e.formData;return(0,m.default)(a)?t:a}}]),r}(d.default.Component);a.default=E,E.propTypes={visible:p.default.bool,title:p.default.string,module:p.default.string,store:p.default.object,forms:p.default.array,formData:p.default.object,detail:p.default.object,onOk:p.default.func,onCancel:p.default.func},E.defaultProps={visible:!1,title:"EDIT",store:{},forms:[],formData:{},detail:{},onCancel:function(){}}},,function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l,u,o,i,c,s,f,d=n(r(30)),p=n(r(65)),m=n(r(36)),h=n(r(37)),v=n(r(88)),g=n(r(55)),y=n(r(56)),E=n(r(51)),b=n(r(49)),_=(n(r(66)),n(r(3))),O=n(r(1171)),S=n(r(1102)),C=n(r(26)),D=n(r(63)),k=r(14),N=r(239),T=n(r(0)),R=n(r(1733)),w=n(r(3269)),I=n(r(3273)),M=n(r(3320));function P(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,E.default)(e);if(t){var n=(0,E.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,y.default)(this,a)}}var j={json:{pipeline:{stages:[],agent:{type:"any"}}}},L=(0,N.observer)((f=s=function(e){(0,g.default)(r,e);var a=A(r);function r(e){var t;if((0,m.default)(this,r),t=a.call(this,e),(0,p.default)(t,"clearFocus",o,(0,v.default)(t)),(0,p.default)(t,"handleContinue",i,(0,v.default)(t)),(0,p.default)(t,"handleDiscard",c,(0,v.default)(t)),t.state={},e.isEditMode){t.store=new M.default,t.store.params=e.params;var n=e.params,l=n.devops,u=n.name,s=n.cluster;t.prevData=JSON.parse(localStorage.getItem("".concat(globals.user.username,"-").concat(l,"-").concat(u))),t.store.fetchLabel({cluster:s}),(0,D.default)(e.jsonData)?t.store.setData(t.prevData||j):(t.store.jsonData=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.getAlertPath(t)).concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=e.getListUrl,e.getFilterParams=function(e){var t=C({},e),a=[];return t["labels.severity"]&&(a.push("severity=".concat(t["labels.severity"])),delete t["labels.severity"]),t["labels.alertname"]&&(a.push("alertname~".concat(t["labels.alertname"])),delete t["labels.alertname"]),a.length>0&&(t.label_filters=a.join(",")),t},e.getParamsType=function(e){var t={};return e.cluster&&("builtin"===e.type?t.builtin=!0:t.builtin=!1),t},e}return(0,m.default)(o,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r="";return t&&(r+="/clusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"fetchList",value:(a=(0,s.default)(n.default.mark((function e(){var t,a,r,o,i,c,s,f,d,p,m,h=this,v=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=v.length>0&&void 0!==v[0]?v[0]:{},a=t.cluster,r=t.workspace,o=t.namespace,i=t.more,c=t.ruleName,s=t.type,f=(0,u.default)(t,["cluster","workspace","namespace","more","ruleName","type"]),this.list.isLoading=!0,f.sortBy||void 0!==f.ascending||(f.sortBy=O.LIST_DEFAULT_ORDER[this.module]||"createTime"),f.limit!==1/0&&-1!==f.limit||(f.limit=-1,f.page=1),f.limit=f.limit||10,"builtin"===s&&(f.builtin=!0),e.next=8,request.get(this.getResourceUrl({cluster:a,workspace:r,namespace:o,ruleName:c,type:s}),C(C({},this.getFilterParams(f)),this.getParamsType({cluster:a,type:s})));case 8:return d=e.sent,p=((0,b.default)(d,"items")||[]).map((function(e,t){return C({cluster:a,namespace:o,id:t},h.mapper(e))})),m=d.totalItems,this.list.update(C(C({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(p)):p,total:m},f),{},{limit:Number(f.limit)||10,page:Number(f.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",p);case 13:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchCount",value:(t=(0,s.default)(n.default.mark((function e(t){var a,r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,e.next=3,Promise.all([request.get(this.getResourceUrl({cluster:a,namespace:r}),{page:1,limit:1,builtin:!1}),request.get(this.getResourceUrl({cluster:a,namespace:r,type:"builtin"}),{page:1,limit:1,builtin:!0})]);case 3:l=e.sent,this.ruleCount=(0,b.default)(l,"0.totalItems",0),this.builtinRuleCount=(0,b.default)(l,"1.totalItems",0);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"proxy-api/proxy/alerting.kubesphere.io/v2beta1/"}}]),o}(r(a(68)).default),i=(0,E.default)(o.prototype,"ruleCount",[_.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),c=(0,E.default)(o.prototype,"builtinRuleCount",[_.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),(0,E.default)(o.prototype,"fetchList",[_.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchList"),o.prototype),(0,E.default)(o.prototype,"fetchCount",[_.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchCount"),o.prototype),o);t.default=k},function(e,t,a){"use strict";a(15);var r=a(20);a(6),a(87),a(137),a(9),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(6),a(87),a(191),a(159),a(137),a(9),a(10),a(4),a(22),a(7);var n=r(a(43));a(41);var l,u,o,i,c,s,f,d,p,m,h,v,g=r(a(44)),y=r(a(65)),E=r(a(36)),b=r(a(37)),_=r(a(49)),O=(r(a(66)),a(14)),S=r(a(63)),C=r(a(26)),D=r(a(902)),k=r(a(74)),N=a(52),T=a(909),R=(l=function(){function e(){var t=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,E.default)(this,e),(0,y.default)(this,"page",u,this),(0,y.default)(this,"data",o,this),(0,y.default)(this,"total_page",i,this),(0,y.default)(this,"total",c,this),(0,y.default)(this,"isLoading",s,this),(0,y.default)(this,"limit",f,this),(0,y.default)(this,"sort_metric",d,this),(0,y.default)(this,"sort_type",p,this),(0,y.default)(this,"changeSortType",m,this),(0,y.default)(this,"changeSortMetric",h,this),(0,y.default)(this,"changePagination",v,this),this.download=function(e){var a=JSON.stringify(t.data,null,2),r=new Blob([a],{type:"text/plain;charset=utf-8"});(0,T.saveAs)(r,e)},this.handleResult=function(e){var t=(0,C.default)(e,"results",[]);return(0,S.default)(t)?[]:t.reduce((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.metric_name,r=(0,C.default)(t,"data.result")||[];return r.forEach((function(t,r){var n=e[r]||{},l=(0,C.default)(t,"value",[]),u=(0,C.default)(t,"metric",{});n[a]=l[1],Object.assign(n,u),e[r]=n})),e}),[])},Object.keys(a).forEach((function(e){return(0,k.default)(t,e,a[e])}))}var t;return(0,b.default)(e,[{key:"fetchAll",value:(t=(0,g.default)(n.default.mark((function e(){var t,a,r,l,u=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u.length>0&&void 0!==u[0]?u[0]:{},this.isLoading=!0,a={type:this.rankRequestTag,metrics_filter:this.metrics_filter,page:this.page,limit:this.limit,sort_type:this.sort_type,sort_metric:this.sort_metric||(0,C.default)(this,"sort_metric_options.[0]")},this.cluster&&(a.cluster=this.cluster),this.namespaces&&(a.namespace=this.namespaces),this.kind&&(a.workload_kind=this.kind),this.workspace&&(a.workspace=this.workspace),e.next=9,(0,N.to)(request.get(this.fetchUrl,(0,D.default)(a,t)));case 9:return r=e.sent,l=this.handleResult(r),this.total_page=r.total_page,this.total=r.total_item,this.data=l,this.isLoading=!1,e.abrupt("return",l);case 16:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"kapis/monitoring.kubesphere.io/v1beta1"}},{key:"fetchUrl",get:function(){return"nodes"===this.resource?"".concat(this.apiVersion,"/node_metrics"):"pods"===this.resource?"".concat(this.apiVersion,"/pod_metrics"):"workspaces"===this.resource?"".concat(this.apiVersion,"/workspace_metrics"):"namespaces"===this.resource?"".concat(this.apiVersion,"/namespace_metrics"):"clusters"===this.resource?"".concat(this.apiVersion,"/cluster_metrics"):"".concat(this.apiVersion)}},{key:"rankRequestTag",get:function(){return"rank"}},{key:"defaultParams",get:function(){return{type:this.rankRequestTag}}}]),e}(),u=(0,_.default)(l.prototype,"page",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),o=(0,_.default)(l.prototype,"data",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),i=(0,_.default)(l.prototype,"total_page",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),c=(0,_.default)(l.prototype,"total",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),s=(0,_.default)(l.prototype,"isLoading",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),f=(0,_.default)(l.prototype,"limit",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 10}}),d=(0,_.default)(l.prototype,"sort_metric",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),p=(0,_.default)(l.prototype,"sort_type",[O.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"desc"}}),m=(0,_.default)(l.prototype,"changeSortType",[O.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a="desc"===e.sort_type?"asc":"desc";e.sort_type=a,e.fetchAll(t)}}}),h=(0,_.default)(l.prototype,"changeSortMetric",[O.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t,a){e.sort_metric=t,e.fetchAll(a)}}}),v=(0,_.default)(l.prototype,"changePagination",[O.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t,a){var r=t.page,n=t.limit;e.page=r,e.limit=n,e.fetchAll(a)}}}),(0,_.default)(l.prototype,"fetchAll",[O.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchAll"),l.prototype),l);t.default=R},function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(42),a(4),a(23),a(57),a(17);var n,l,u,o=r(a(65)),i=r(a(36)),c=r(a(37)),s=r(a(88)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=r(a(49)),h=(r(a(66)),a(14)),v=a(52),g=r(a(1129));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var E=["namespace_cpu_usage","namespace_memory_usage_wo_cache","namespace_cpu_used_requests_utilisation","namespace_cpu_used_limits_utilisation","namespace_memory_used_requests_utilisation","namespace_memory_used_limits_utilisation","namespace_pvc_bytes_used","namespace_gpu_usage","namespace_gpu_memory_usage","namespace_pod_count","namespace_net_bytes_received","namespace_net_bytes_transmitted"],b=["namespace_memory_usage_wo_cache","namespace_memory_limit_hard","namespace_cpu_usage","namespace_cpu_limit_hard","namespace_gpu_limit_hard","namespace_gpu_usage","namespace_gpu_memory_usage","namespace_pod_count","namespace_pods_hard","namespace_net_bytes_received","namespace_net_bytes_transmitted","namespace_cpu_used_requests_utilisation","namespace_cpu_used_limits_utilisation","namespace_memory_used_requests_utilisation","namespace_memory_used_limits_utilisation","namespace_pvc_bytes_used","namespace_pvc_count"],_=(n=function(e){(0,f.default)(a,e);var t=y(a);function a(e){var r;return(0,i.default)(this,a),r=t.call(this,e),(0,o.default)(r,"sort_metric",l,(0,s.default)(r)),(0,o.default)(r,"changeWorkSpace",u,(0,s.default)(r)),r.sort_metric_options=(0,v.hideGPUByLicense)(e.sort_metric_options||E,r.cluster),r.metrics_filter=(0,v.hideGPUByLicense)(b,r.cluster).join("|"),r}return(0,c.default)(a,[{key:"fetchUrl",get:function(){return"".concat(this.apiVersion,"/namespace_metrics")}}]),a}(g.default),l=(0,m.default)(n.prototype,"sort_metric",[h.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return E[0]}}),u=(0,m.default)(n.prototype,"changeWorkSpace",[h.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.workspace=t,e.fetchAll()}}}),n);t.default=_},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var u=l(r(43));r(41);var o=l(r(44)),i=l(r(96));r(16),r(4),r(22);var c=n(r(0)),s=l(r(452)),f=function(e){var a=e.name,r=e.namespace,n=e.cluster,l=(0,c.useState)(!0),f=(0,i.default)(l,2),d=f[0],p=f[1],m=(0,c.useState)(!1),h=(0,i.default)(m,2),v=h[0],g=h[1],y=function(){var e=(0,o.default)(u.default.mark((function e(){var t,l;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new s.default,p(!0),e.next=4,t.fetchList({cluster:n,namespace:r,pvcName:a});case 4:l=e.sent,g(l.length>0),p(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,c.useEffect)((function(){y()}),[]);var E=v?t("MOUNTED"):t("NOT_MOUNTED");return d?"":c.default.createElement("span",null,E)};a.default=f},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ClusterResourceStatus",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"ServiceComponentStatus",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"ETCDStatus",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"ETCDNodes",{enumerable:!0,get:function(){return o.default}});var n=r(a(3804)),l=r(a(3807)),u=r(a(3810)),o=r(a(3813))},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(9),a(4),a(316),a(23),a(24),a(17),a(64),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(9),a(4),a(316),a(22),a(23),a(57),a(24),a(17),a(64);var n=r(a(58)),l=r(a(43));a(41);var u,o,i,c=r(a(44)),s=r(a(65)),f=r(a(36)),d=r(a(37)),p=r(a(88)),m=r(a(55)),h=r(a(56)),v=r(a(51)),g=r(a(49)),y=(r(a(66)),a(14)),E=r(a(26)),b=a(52),_=r(a(845)),O=r(a(323));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,v.default)(e);if(t){var n=(0,v.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,h.default)(this,a)}}var C=(u=function(e){(0,m.default)(h,e);var t,a,r,u=S(h);function h(){var e;(0,f.default)(this,h);for(var t=arguments.length,a=new Array(t),r=0;r1&&void 0!==c[1]?c[1]:{},r=a.cluster,this.statistics.isLoading=!0,n={type:"statistics"},u=this.getApi({workspace:t,cluster:r}),e.next=6,(0,b.to)(request.get(u,n));case 6:return o=e.sent,i=this.getResult(o),this.statistics={data:i,isLoading:!1},e.abrupt("return",i);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getDevopsCount",value:(a=(0,c.default)(l.default.mark((function e(t){var a,r,n;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new O.default,e.next=3,request.get(a.getBaseUrl({workspace:t}),{paging:"limit=Infinity"});case 3:return r=e.sent,n=r&&r.items.length>0?r.items.length:0,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"fetchApplicationResourceMetrics",value:(t=(0,c.default)(l.default.mark((function e(t){var a,r,u,o,i,c,s,f,d,p;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.workspace,r=t.namespace,u=t.autoRefresh,o=void 0!==u&&u,i=(0,n.default)(t,["workspace","namespace","autoRefresh"]),o?i.last=!0:this.resourceMetrics.isLoading=!0,i.cluster&&(this.cluster=i.cluster),c=this.getParams(i),s=/^[a-zA-Z]+_/g,f=(0,E.default)(i.metrics,"[0]","").replace(s,"workspace_"),r&&"all"!==r&&(c.metrics_filter="".concat(f.replace(s,"namespace_"),"$")),e.next=9,(0,b.to)(request.get("".concat(this.getApi({cluster:this.cluster,workspace:a,namespace:r})),c));case 9:return d=e.sent,p=this.getResult(d),o&&(p=this.getRefreshResult(p,this.resourceMetrics.originData)),this.resourceMetrics={originData:p,data:(0,E.default)(Object.values(p),"[0].data.result",{}),isLoading:!1},e.abrupt("return",p);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),h}(_.default),o=(0,g.default)(u.prototype,"statistics",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:{},isLoading:!1}}}),i=(0,g.default)(u.prototype,"resourceMetrics",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{originData:{},data:{},isLoading:!1}}}),(0,g.default)(u.prototype,"fetchStatistics",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchStatistics"),u.prototype),(0,g.default)(u.prototype,"getDevopsCount",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"getDevopsCount"),u.prototype),(0,g.default)(u.prototype,"fetchApplicationResourceMetrics",[y.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchApplicationResourceMetrics"),u.prototype),u);t.default=C},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(31),r(84),r(73),r(18),r(192),r(16),r(98),r(4),r(23),r(24),r(17),r(85),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(31),r(84),r(73),r(18),r(28),r(192),r(42),r(16),r(98),r(4),r(23),r(57),r(24),r(17),r(85),r(62);var l,u,o,i=n(r(61)),c=n(r(96)),s=n(r(30)),f=n(r(36)),d=n(r(37)),p=n(r(55)),m=n(r(56)),h=n(r(51)),v=n(r(0)),g=r(14),y=r(239),E=r(1818),b=r(186),_=n(r(789)),O=r(52),S=n(r(3)),C=n(r(63)),D=n(r(60)),k=n(r(26)),N=r(791),T=r(72),R=n(r(240)),w=n(r(3862)),I=n(r(3864));function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,h.default)(e);if(t){var n=(0,h.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,m.default)(this,a)}}var P=(0,y.inject)("rootStore")(l=(0,y.observer)(l=(0,N.trigger)((o=u=function(e){(0,p.default)(r,e);var a=M(r);function r(){var e;(0,f.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u0){var c={step:a,times:Math.floor(i/(60*(0,v.getMinutes)(a)))||1,start:u,end:o,lastTime:""};n.props.onSubmit(c)}else h.default.error({content:t("TIMERANGE_SELECTOR_MSG")})}else h.default.error({content:t("TIMERANGE_SELECTOR_ERROR_MSG")})};var l=new Date,o=new Date(l.valueOf()-36e5);return n.formData={step:e.step,start:e.start?[e.start]:[o],end:e.end?[e.end]:[l]},n}return(0,o.default)(r,[{key:"handlerDateClose",value:function(e){var t=this;return function(a){t.formData[e]=a,t.forceUpdate()}}},{key:"render",value:function(){var e=this.props,a=e.onCancel,r=e.className,n=this.formData,u=n.start,o=n.end;return f.default.createElement("div",{className:(0,p.default)(g.default.custom,r)},f.default.createElement("div",{className:g.default.title},t("CUSTOM_TIME_RANGE")),f.default.createElement(m.Form,{data:this.formData},f.default.createElement(m.Form.Item,{label:t("START_TIME")},f.default.createElement(m.DatePicker,{name:"start",defaultDate:u[0],maxDate:o[0],enableTime:!0,enableSeconds:!0,dateFormat:"Y-m-d H:i:S",onClose:this.handlerStartDateClose})),f.default.createElement(m.Form.Item,{label:t("END_TIME")},f.default.createElement(m.DatePicker,{name:"end",defaultDate:o[0],maxDate:o[0],enableTime:!0,enableSeconds:!0,dateFormat:"Y-m-d H:i:S",onClose:this.handlerEndDateClose})),this.props.showStep&&f.default.createElement(m.Form.Item,{label:t("SAMPLING_INTERVAL")},f.default.createElement(m.Select,{className:g.default.selectBox,defaultValue:"1m",name:"step",options:(0,v.getTimeOptions)(E)})),f.default.createElement("div",{className:(0,p.default)(g.default.actions,(0,l.default)({},g.default.bottom10,!this.props.showStep))},f.default.createElement(m.Button,{onClick:a},t("CANCEL")),f.default.createElement(m.Button,{type:"control",onClick:this.handleOk},t("OK")))))}}]),r}(f.default.Component);a.default=b,b.propTypes={showStep:d.default.bool,step:d.default.string,times:d.default.number,onSubmit:d.default.func,onCancel:d.default.func},b.defaultProps={showStep:!0,step:"10m",times:30,onSubmit:function(){},onCancel:function(){}}},,,function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1e3)).default);t.default=c},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(1566)),l=r(a(2388));n.default.Form=l.default;var u=n.default;t.default=u},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(9),a(4),a(23),a(57),a(17);var n,l,u,o,i,c,s,f,d,p,m,h,v,g,y,E,b,_,O,S,C,D,k=r(a(65)),N=r(a(36)),T=r(a(88)),R=r(a(37)),w=r(a(55)),I=r(a(56)),M=r(a(51)),P=(r(a(66)),r(a(49))),A=r(a(0)),j=a(1),L=r(a(3)),x=r(a(74)),U=a(239),z=a(14),F=a(186),G=a(453),V=r(a(2450));function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,M.default)(e);if(t){var n=(0,M.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,I.default)(this,a)}}var Y=(0,U.observer)((D=C=function(e){(0,w.default)(a,e);var t=B(a);function a(e){var r;return(0,N.default)(this,a),(r=t.call(this,e)).handleContainerClick=function(e){Math.abs(r.deltaX)>10||Math.abs(r.deltaY)>10?e.stopPropagation():r.props.onClick(e)},r.fullScreenFlagChange=function(){r.isFullscreen=!r.isFullscreen},(0,k.default)(r,"scale",u,(0,T.default)(r)),(0,k.default)(r,"translateX",o,(0,T.default)(r)),(0,k.default)(r,"translateY",i,(0,T.default)(r)),(0,k.default)(r,"isFullscreen",c,(0,T.default)(r)),(0,k.default)(r,"initialComponent",s,(0,T.default)(r)),(0,k.default)(r,"initialPosition",f,(0,T.default)(r)),(0,k.default)(r,"initialScale",d,(0,T.default)(r)),(0,k.default)(r,"handleWheel",p,(0,T.default)(r)),r.stopPropagation=function(e){e.stopPropagation()},(0,k.default)(r,"handleZoomOut",m,(0,T.default)(r)),(0,k.default)(r,"handleZoomIn",h,(0,T.default)(r)),(0,k.default)(r,"handleNormalSize",v,(0,T.default)(r)),(0,k.default)(r,"handleAutoSize",g,(0,T.default)(r)),(0,k.default)(r,"handleContentMove",y,(0,T.default)(r)),(0,k.default)(r,"handleMouseLeave",E,(0,T.default)(r)),(0,k.default)(r,"handleMouseDown",b,(0,T.default)(r)),(0,k.default)(r,"handleMouseUp",_,(0,T.default)(r)),(0,k.default)(r,"handleChangeScale",O,(0,T.default)(r)),(0,k.default)(r,"toggleFullscreen",S,(0,T.default)(r)),r.initPosition={x:0,y:0},r.lastPosition={x:0,y:0},r.isMoved=!1,r}return(0,R.default)(a,[{key:"getChildContext",value:function(){return{scale:this.scale}}}]),(0,R.default)(a,[{key:"componentDidMount",value:function(){var e=this;if(this.initialComponent(),(0,G.addFullScreenChangeEvents)(this.fullScreenFlagChange),this.container&&this.container.addEventListener("wheel",this.handleWheel),this.content){var t=this.content.getBoundingClientRect(),a=t.left,r=t.top;this.domOffsetX=a,this.domOffsetY=r}this.content&&(this.setStyleReaction=(0,z.reaction)((function(){return e.styles}),(function(){(0,x.default)(e.content,"style.transform",(0,z.toJS)(e.styles).transform)}),{fireImmediately:!0}))}},{key:"componentWillUnmount",value:function(){(0,G.removeFullScreenChangeEvents)(this.fullScreenFlagChange),this.container&&this.container.removeEventListener("wheel",this.handleWheel,!1),this.setStyleReaction&&this.setStyleReaction()}},{key:"render",value:function(){var e=this,t=this.props,a=t.children,r=t.className,n=t.contentClassName,l=t.controlStyle,u=t.enableToggleFullScreen,o=t.onRefresh;return A.default.createElement("div",{className:(0,L.default)(V.default.container,r),onClickCapture:this.handleContainerClick,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleContentMove,onMouseUp:this.handleMouseUp,onMouseDown:this.handleMouseDown,"data-container":"pipeline",ref:function(t){e.container=t}},A.default.createElement("div",{className:V.default.controls,style:l,onMouseLeave:this.stopPropagation,onMouseMove:this.stopPropagation},u?A.default.createElement("div",{className:V.default.control,onClick:this.toggleFullscreen},A.default.createElement(F.Icon,{name:this.isFullscreen?"minimize":"maximize",clickable:!0})):null,A.default.createElement("div",{className:V.default.control,onClick:this.handleZoomOut},A.default.createElement(F.Icon,{name:"add",clickable:!0})),A.default.createElement("div",{className:V.default.control,onClick:this.handleZoomIn},A.default.createElement(F.Icon,{name:"substract",clickable:!0})),o&&A.default.createElement("div",{className:V.default.control,onClick:o},A.default.createElement(F.Icon,{name:"refresh",clickable:!0}))),A.default.createElement("div",{className:(0,L.default)(V.default.main_content,n),ref:function(t){e.content=t}},a))}},{key:"styles",get:function(){return{transform:"translate3d(".concat(this.translateX,"px, ").concat(this.translateY,"px, 0)\n scale(").concat(this.scale,")")}}}]),a}(A.default.Component),C.defaultProps={onClick:function(){},enableToggleFullScreen:!0,XOffset:0,YOffset:0},C.childContextTypes={scale:j.PropTypes.number},l=D,(0,P.default)(l.prototype,"styles",[z.computed],Object.getOwnPropertyDescriptor(l.prototype,"styles"),l.prototype),u=(0,P.default)(l.prototype,"scale",[z.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),o=(0,P.default)(l.prototype,"translateX",[z.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),i=(0,P.default)(l.prototype,"translateY",[z.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 60}}),c=(0,P.default)(l.prototype,"isFullscreen",[z.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),s=(0,P.default)(l.prototype,"initialComponent",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.props.initialScale?e.scale=e.props.initialScale:e.initialScale(),e.initialPosition()}}}),f=(0,P.default)(l.prototype,"initialPosition",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=e.props,a=t.XOffset,r=t.YOffset;e.translateX=a,e.translateY=r,e.lastPosition={x:e.translateX,y:e.translateY}}}}),d=(0,P.default)(l.prototype,"initialScale",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=e.container.clientWidth/e.content.clientWidth,a=e.container.clientHeight/e.content.clientHeight,r=Math.min(t,a);e.scale=r>1?1:Math.max(r,.6)}}}),p=(0,P.default)(l.prototype,"handleWheel",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){t.preventDefault(),t.stopPropagation();var a=t.deltaY>0?1:-1,r=t.clientY-e.domOffsetY,n=t.clientX-e.domOffsetX,l=-.01*(Math.abs(t.deltaY)>5?5*a:t.deltaY),u=e.scale+l;if(u<1&&u>.2){var o=e.content.clientWidth*e.scale,i=e.content.clientHeight*e.scale;n>e.translateX+o?e.translateX=-l*e.content.clientWidth+e.translateX:n>=e.translateX&&(e.translateX=-l*(n-e.translateX)/e.scale+e.translateX),r>e.translateY+i?e.translateY=-l*e.content.clientHeight+e.translateY:r>=e.translateY&&(e.translateY=-l*(r-e.translateY)/e.scale+e.translateY),e.scale=u,e.lastPosition={x:e.translateX,y:e.translateY},e.isMoved=!0}}}}),m=(0,P.default)(l.prototype,"handleZoomOut",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.scale<1&&(e.scale+=.2,e.isMoved=!0)}}}),h=(0,P.default)(l.prototype,"handleZoomIn",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.scale>.4&&(e.scale-=.2,e.isMoved=!0)}}}),v=(0,P.default)(l.prototype,"handleNormalSize",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.scale=1,e.translateX=30,e.translateY=60,e.lastPosition={x:e.translateX,y:e.translateY}}}}),g=(0,P.default)(l.prototype,"handleAutoSize",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.initialScale(),e.initialPosition()}}}),y=(0,P.default)(l.prototype,"handleContentMove",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.DragContent&&(e.translateX=t.clientX-e.initPosition.x+e.lastPosition.x,e.translateY=t.clientY-e.initPosition.y+e.lastPosition.y,e.isMoved=!0)}}}),E=(0,P.default)(l.prototype,"handleMouseLeave",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){"pipeline"===t.currentTarget.dataset.container&&(e.lastPosition={x:e.translateX,y:e.translateY},e.DragContent=!1)}}}),b=(0,P.default)(l.prototype,"handleMouseDown",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){t.preventDefault(),0===t.button&&(e.initPosition={x:t.clientX,y:t.clientY},e.DragContent=!0)}}}),_=(0,P.default)(l.prototype,"handleMouseUp",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.DragContent&&(e.deltaX=t.clientX-e.initPosition.x,e.deltaY=t.clientY-e.initPosition.y,e.translateX=e.deltaX+e.lastPosition.x,e.translateY=e.deltaY+e.lastPosition.y,e.lastPosition={x:e.translateX,y:e.translateY},e.DragContent=!1)}}}),O=(0,P.default)(l.prototype,"handleChangeScale",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.scale=t/100}}}),S=(0,P.default)(l.prototype,"toggleFullscreen",[z.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=e.props.onFullScreen;if(t)return e.fullScreenFlagChange(),t();e.isFullscreen?(0,G.exitFullScreen)(e.container):(0,G.enterFullScreen)(e.container)}}}),n=l))||n;t.default=Y},,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(22),a(196),a(7),a(110),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(5),a(11),a(6),a(18),a(28),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(196),a(7),a(110);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o,i,c,s=r(a(44)),f=r(a(65)),d=r(a(36)),p=r(a(37)),m=r(a(49)),h=(r(a(66)),r(a(26))),v=r(a(74)),g=a(14),y=r(a(105));function E(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function b(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(a.apiVersion).concat(a.getPath(e),"/").concat(a.module)},this.getDetailUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(a.getListUrl(e),"/").concat(e.name)},(0,f.default)(this,"submitting",c,this),this.module=r,this.kind=n,this.apiVersion=l}var t,a;return(0,p.default)(e,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r="";return t&&(r+="/klusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"fetchList",value:(a=(0,s.default)(n.default.mark((function e(){var t,a,r,l,o,i,c,s,f,d,p=this,m=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},a=t.cluster,r=t.namespace,l=t.page,o=void 0===l?this.list.page:l,i=t.name,c=(0,u.default)(t,["cluster","namespace","page","name"]),this.list.isLoading=!0,(s=c).limit?this.list.limit=s.limit:s.limit=this.list.limit,this.list.continues[o]&&(s.continue=this.list.continues[o]),i&&(s.fieldSelector="metadata.name=".concat(i)),e.next=8,request.get(this.getListUrl({cluster:a,namespace:r}),s);case 8:return f=e.sent,d=f.items.map((function(e){return b({cluster:a,namespace:r},p.mapper(e))})),this.list.continues[Number(o)+1]=f.metadata.continue,1===o&&(this.list.total=d.length+(f.metadata.remainingItemCount||0)),(0,g.extendObservable)(this.list,{data:d,page:Number(o),name:i}),this.list.isLoading=!1,e.abrupt("return",this.list);case 15:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"update",value:(t=(0,s.default)(n.default.mark((function e(t,a){var r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get(this.getDetailUrl(t));case 2:return r=e.sent,(l=(0,h.default)(r,"metadata.resourceVersion"))&&(0,v.default)(a,"metadata.resourceVersion",l),e.abrupt("return",this.submitting(request.put(this.getDetailUrl(t),a)));case 6:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})},{key:"patch",value:function(e,t){return this.submitting(request.patch(this.getDetailUrl(e),t))}},{key:"delete",value:function(e){return this.submitting(request.delete(this.getDetailUrl(e)))}},{key:"mapper",get:function(){return y.default.customresourcedefinitions}}]),e}(),i=(0,m.default)(o.prototype,"list",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,continues:{1:""},isLoading:!0}}}),c=(0,m.default)(o.prototype,"submitting",[g.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){return e.isSubmitting=!0,setTimeout((function(){t.catch((function(){})).finally((function(){e.isSubmitting=!1}))}),500),t}}}),(0,m.default)(o.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchList"),o.prototype),(0,m.default)(o.prototype,"update",[g.action],Object.getOwnPropertyDescriptor(o.prototype,"update"),o.prototype),(0,m.default)(o.prototype,"patch",[g.action],Object.getOwnPropertyDescriptor(o.prototype,"patch"),o.prototype),(0,m.default)(o.prototype,"delete",[g.action],Object.getOwnPropertyDescriptor(o.prototype,"delete"),o.prototype),o);t.default=_},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(16),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l=r(a(44)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=a(72);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var p=function(e){(0,i.default)(a,e);var t=d(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/nodes").concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath(t),"/nodes")},e.createEdgeNode=function(){var t=(0,l.default)(n.default.mark((function t(a){var r,l,u,o,i,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,l=a.name,u=a.ip,o=a.defaultTaint,i="kapis/kubeedge.kubesphere.io/v1beta1/".concat(e.getPath({cluster:r}),"/nodes/join"),t.next=4,request.get(i,{node_name:l,node_ip:u,add_default_taint:o},{},(function(e){return e}));case 4:return c=t.sent,t.abrupt("return",c);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return(0,o.default)(a,[{key:"apiVersion",get:function(){return f.API_VERSIONS.nodes||""}}]),a}(r(a(856)).default);t.default=p},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(61)),u=r(a(30)),o=r(a(58));a(41);var i,c=r(a(44)),s=r(a(36)),f=r(a(37)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=r(a(1173)),g=a(14),y=r(a(26)),E=a(72);function b(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function _(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"clusters/".concat(t.cluster,"/").concat(e.getNetworkUrl).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getNetDetailUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getNetWorkUrl(t),"/").concat(t.name)},e.store=new v.default({module:"ippools",kind:"IPPool",apiVersion:"kapis/crd.projectcalico.org/v1"}),e}return(0,f.default)(p,[{key:"fetchList",value:(u=(0,c.default)(n.default.mark((function e(){var t,a,r,u,i,c,s,f,d,p,m=this,h=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.length>0&&void 0!==h[0]?h[0]:{},a=t.cluster,r=t.workspace,u=t.namespace,i=t.more,c=t.devops,s=(0,o.default)(t,["cluster","workspace","namespace","more","devops"]),this.list.isLoading=!0,s.sortBy||void 0!==s.ascending||(s.sortBy=E.LIST_DEFAULT_ORDER[this.module]||"createTime"),s.limit!==1/0&&-1!==s.limit||(s.page=1),s.limit=s.limit||10,s.page=s.page||1,e.next=8,request.get(this.getNetWorkUrl({cluster:a,workspace:r,namespace:u,devops:c}),this.getFilterParams(s));case 8:return f=e.sent,d=((0,y.default)(f,"items")||[]).map((function(e){return _(_({cluster:a,namespace:u},e),m.mapper(e))})),p=1===s.page?d.length+(f.metadata.remainingItemCount||0):this.list.total,this.list.update(_(_({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(d)):d,total:p},s),{},{limit:Number(s.limit)||10,page:Number(s.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",d);case 13:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"fetchDetail",value:(r=(0,c.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get(this.getNetDetailUrl(t));case 3:return a=e.sent,r=_(_({},t),this.mapper(a)),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"bindIpPoolToNodeGroup",value:(a=(0,c.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.nodetree,l=t.params,u="/clusters/".concat(a,"/kapis/infra.kubesphere.io/v1alpha1/nodetrees/").concat(r),e.abrupt("return",request.patch(u,l));case 3:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"delIpPoolToNodeGroup",value:(t=(0,c.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.nodetree,l=t.params,u="/clusters/".concat(a,"/kapis/infra.kubesphere.io/v1alpha1/nodetrees/").concat(r),e.abrupt("return",request.patch(u,l));case 3:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"kapis/crd.projectcalico.org/v1"}}]),p}(r(a(1323)).default),(0,h.default)(i.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,h.default)(i.prototype,"fetchDetail",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),(0,h.default)(i.prototype,"bindIpPoolToNodeGroup",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"bindIpPoolToNodeGroup"),i.prototype),(0,h.default)(i.prototype,"delIpPoolToNodeGroup",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"delIpPoolToNodeGroup"),i.prototype),i);t.default=S},,function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(18),r(16),r(10),r(4),r(22),r(196),r(23),r(24),r(17),r(62),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(18),r(42),r(16),r(10),r(4),r(22),r(196),r(23),r(57),r(24),r(17),r(62);var l=n(r(30)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(26)),h=n(r(74)),v=n(r(3)),g=r(186),y=r(52),E=r(72),b=n(r(851)),_=n(r(456)),O=n(r(933)),S=n(r(1341)),C=n(r(951)),D=n(r(1620)),k=n(r(1622)),N=n(r(2649));function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var R=function(e){(0,s.default)(r,e);var a=T(r);function r(e){var n;return(0,i.default)(this,r),(n=a.call(this,e)).fetchData=(0,o.default)(u.default.mark((function e(){var t,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.secretStore.fetchListByK8s({namespace:n.namespace,cluster:n.props.cluster,fieldSelector:"type=kubernetes.io/basic-auth"});case 2:t=e.sent,a=t.map((function(e){return{label:(0,y.getDisplayName)(e),value:e.name,type:"basic-auth"}})),n.setState({basicSecretOptions:a});case 5:case"end":return e.stop()}}),e)}))),n.fetchImageSecrets=(0,o.default)(u.default.mark((function e(){var t,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.secretStore.fetchListByK8s({namespace:n.namespace,cluster:n.props.cluster,fieldSelector:"type=kubernetes.io/dockerconfigjson"});case 2:t=e.sent,a=t.map((function(e){var t=(0,m.default)(e,'data[".dockerconfigjson"].auths',{}),a=Object.keys(t)[0]||"";return{label:(0,y.getDisplayName)(e),value:e.name,repoUrl:a,type:"dockerconfigjson"}})),n.setState({imageSecretOptions:a});case 5:case"end":return e.stop()}}),e)}))),n.getTemplateList=(0,o.default)(u.default.mark((function e(){var t;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.setState({isGetTemplateListLoading:!0}),e.next=3,n.builderStore.getBuilderTemplate({cluster:n.props.cluster});case 3:t=e.sent,n.setState({builderTemplateLists:(0,m.default)(t,"items",[]),isGetTemplateListLoading:!1});case 5:case"end":return e.stop()}}),e)}))),n.handleImageTemplateChange=function(e){var t=e.environment,a=e.docUrl,r=(0,m.default)(globals,"user.lang","zh"),l=(t||[]).map((function(e){var t=(e.description||"").split(". "),a="zh"===r?(0,m.default)(t,"1",e.description):(0,m.default)(t,"0",e.description);return e.label="".concat(e.key," (").concat(a,")"),e.value=e.key,e}));n.setState({environment:l,docUrl:a})},n.handleSecretChange=function(){n.handleRepoReadableCheck()},n.handleImageSecretChange=function(e,t){var a=n.props.formTemplate,r=(0,m.default)(t,"[0]repoUrl","");(0,h.default)(a,"".concat(n.prefix,'metadata.annotations["kubesphere.io/repoUrl"]'),r)},n.handleRepoReadableCheck=(0,o.default)(u.default.mark((function e(){var a,r,l,o,i,c,s;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.props,r=a.formTemplate,l=a.isEdgeWize,o=(0,m.default)(r,"".concat(n.prefix,"spec.config.sourceUrl"),"")){e.next=4;break}return e.abrupt("return");case 4:return n.setState({readRepoLoading:!0}),i=(0,m.default)(r,"".concat(n.prefix,"spec.config.gitSecretRef.name"),""),e.next=8,n.builderStore.verifyRepoReadable(o,i,n.namespace,l?n.cluster:void 0).finally((function(){n.setState({readRepoLoading:!1})}));case 8:if(c=e.sent,"success"!==(s=(0,m.default)(c,"message",""))){e.next=14;break}return n.setState({repoReadError:null}),i||n.setState({repoNeedSecret:!1}),e.abrupt("return");case 14:n.setState({repoReadError:{message:t(s)},repoNeedSecret:!0});case 15:case"end":return e.stop()}}),e)}))),n.isEdgeWize=(0,y.isEdgeWizePage)(),n.secretStore=n.isEdgeWize?new O.default:new b.default,n.builderStore=n.isEdgeWize?new S.default:new _.default,n.state={isGetTemplateListLoading:!0,environment:[],basicSecretOptions:[],imageSecretOptions:[],repoReadError:null,repoNeedSecret:!0,readRepoLoading:!1,docUrl:""},n}return(0,c.default)(r,[{key:"componentDidMount",value:function(){this.fetchData(),this.fetchImageSecrets(),this.getTemplateList(),this.handleRepoReadableCheck()}},{key:"renderAdvancedSetting",value:function(){var e=t.html("S2I_ENVIRONMENT_DESC",{link:this.state.docUrl||(0,y.getDocsUrl)("s2i_template")});return p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{className:N.default.margin_b_10},p.default.createElement(g.Form.Item,{label:t("TRIGGER_TOKEN"),desc:t("TRIGGER_TOKEN_DESC"),rules:[{pattern:/^[a-zA-Z0-9]+$/,message:"".concat(t("INVALID_TRIGGER_TOKEN_DESC"))}]},p.default.createElement(g.Input,{name:"".concat(this.prefix,"spec.config.secretCode"),defaultValue:""}))),p.default.createElement("div",{className:N.default.margin_b_10},p.default.createElement(g.Form.Item,{label:t("CODE_RELATIVE_PATH"),desc:t("CODE_RELATIVE_PATH_DESC")},p.default.createElement(g.Input,{name:"".concat(this.prefix,"spec.config.contextDir"),defaultValue:"/"}))),p.default.createElement(g.Alert,{className:N.default.margin_b_10,message:(0,y.learnMoreTip)(e),type:"info"}),p.default.createElement(g.Form.Item,null,p.default.createElement(D.default,{name:"".concat(this.prefix,"spec.config.environment"),options:this.state.environment})))}},{key:"render",value:function(){var e=this.props,a=e.formTemplate,r=e.formRef,n=e.mode,u=e.prefix,o=t.html("S2I_TARGET_IMAGE_REPOSITORY_DESC",{link:(0,y.getDocsUrl)("secrets")});return p.default.createElement(g.Form,{ref:r,data:a},p.default.createElement(k.default,{loading:this.state.isGetTemplateListLoading,formTemplate:u?a[u]:a,builderTemplate:this.state.builderTemplateLists,onEnvironmentChange:this.handleImageTemplateChange}),p.default.createElement("div",{className:(0,v.default)(N.default.columns,(0,l.default)({},N.default.columsEdit,"edit"===n))},p.default.createElement("div",{className:N.default.column},p.default.createElement(g.Loading,{spinning:this.state.readRepoLoading,size:18},p.default.createElement(g.Form.Item,{label:t("CODE_REPOSITORY_URL"),desc:t("CODE_REPOSITORY_URL_DESC"),error:this.state.repoReadError,rules:[{required:!0,message:t("PARAM_REQUIRED")}]},p.default.createElement(g.Input,{name:"".concat(this.prefix,"spec.config.sourceUrl"),onBlur:this.handleRepoReadableCheck})))),p.default.createElement("div",{className:"is-2"},p.default.createElement(g.Form.Item,{label:t("CODE_REPOSITORY_BRANCH"),rules:[{required:!0,message:t("PARAM_REQUIRED")}]},p.default.createElement(g.Input,{name:"".concat(this.prefix,"spec.config.revisionId"),defaultValue:"master"}))),p.default.createElement("div",{className:"is-half"},p.default.createElement(g.Loading,{spinning:this.state.readRepoLoading,size:18},p.default.createElement(g.Form.Item,{className:this.state.repoNeedSecret?"":N.default.disabled,label:t("CODE_REPOSITORY_KEY"),desc:this.state.repoNeedSecret?t("CODE_REPOSITORY_KEY_DESC"):t("CODE_REPOSITORY_KEY_NOT_REQUIRED")},p.default.createElement(g.Select,{onChange:this.handleSecretChange,options:this.state.basicSecretOptions,name:"".concat(this.prefix,"spec.config.gitSecretRef.name"),placeholder:" "}))))),p.default.createElement("div",{className:(0,v.default)(N.default.columns,(0,l.default)({},N.default.columsEdit,"edit"===n))},p.default.createElement("div",{className:N.default.column},p.default.createElement(g.Form.Item,{label:t("IMAGE_NAME"),desc:t("S2I_IMAGE_NAME_DESC"),rules:[{required:!0,message:t("PARAM_REQUIRED")},{pattern:E.PATTERN_IMAGE_NAME,message:t("INVALID_NAME_DESC",{message:t("S2I_IMAGE_NAME_DESC")})}]},p.default.createElement(g.Input,{name:"".concat(this.prefix,"spec.config.imageName")}))),p.default.createElement("div",{className:"is-2"},p.default.createElement(g.Form.Item,{label:t("IMAGE_TAG"),rules:[{required:!0,message:t("PARAM_REQUIRED")}]},p.default.createElement(g.Input,{name:"".concat(this.prefix,"spec.config.tag"),defaultValue:"latest"}))),p.default.createElement("div",{className:"is-half"},p.default.createElement(g.Form.Item,{label:t("TARGET_IMAGE_REPOSITORY"),desc:(0,y.learnMoreTip)(o),rules:[{required:!0,message:t("PARAM_REQUIRED")}]},p.default.createElement(g.Select,{name:"".concat(this.prefix,"spec.config.pushAuthentication.secretRef.name"),options:this.state.imageSecretOptions,onChange:this.handleImageSecretChange,placeholder:" "})))),p.default.createElement(C.default,null,this.renderAdvancedSetting()))}},{key:"prefix",get:function(){var e=this.props.prefix;return e?"".concat(e,"."):""}},{key:"namespace",get:function(){return this.props.namespace}},{key:"cluster",get:function(){return this.props.match.cluster}}]),r}(p.default.Component);a.default=R,R.defaultProps={mode:"create",prefix:""}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51));function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var s=function(e){(0,u.default)(a,e);var t=c(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/applications").concat(t.dryRun?"?dryRun=All":"")},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/applications")},e.getDetailUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getListUrl(t),"/").concat(t.name)},(0,v.default)(e,"setSelectRowKeys",m,(0,E.default)(e)),e}return(0,y.default)(T,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r=e.workspace,n=e.devops,l="";return t&&(l+="/klusters/".concat(t)),r&&(l+="/workspaces/".concat(r)),a&&(l+="/namespaces/".concat(a)),n&&(l+="/namespaces/".concat(n)),l}},{key:"fetchList",value:(O=(0,h.default)(n.default.mark((function e(){var t,a,r,u,i,c,s,f,d=this,p=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},a=t.devops,t.workspace,r=t.cluster,u=t.more,i=(0,o.default)(t,["devops","workspace","cluster","more"]),this.list.isLoading=!0,i.limit!==1/0&&-1!==i.limit||(i.limit=-1,i.page=1),i.limit=i.limit||10,c="".concat(this.getResourceUrl({namespace:a,cluster:r})),e.next=7,request.get(c,M({},i),{},(function(){return[]}));case 7:return s=e.sent,f=Array.isArray(s.items)?s.items.map((function(e){return M({},d.mapper(M(M({},e),{},{devops:a})))})):[],this.list.update(M(M({data:u?[].concat((0,l.default)(this.list.data),(0,l.default)(f)):f,total:s.totalItems||s.total_count||f.length||0},i),{},{limit:Number(i.limit)||10,page:Number(i.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",f);case 11:case"end":return e.stop()}}),e,this)}))),function(){return O.apply(this,arguments)})},{key:"create",value:(_=(0,h.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.data,r=t.devops,l=t.cluster,u="".concat(this.getResourceUrl({namespace:r,cluster:l})),e.next=4,request.post(u,a);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return _.apply(this,arguments)})},{key:"updateSync",value:(i=(0,h.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.data,r=t.application,l=t.devops,u=t.cluster,o="".concat(this.getResourceUrl({namespace:l,cluster:u}),"/").concat(r,"/sync"),e.abrupt("return",this.submitting(request.post(o,a)));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"update",value:(u=(0,h.default)(n.default.mark((function e(t,a){var r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat(this.getResourceUrl({namespace:t.devops,cluster:t.cluster}),"/").concat(a.metadata.name),e.abrupt("return",this.submitting(request.put(r,a)));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"patch",value:function(e,t){var a="".concat(this.getResourceUrl({namespace:e.devops,cluster:e.cluster}),"/").concat(t.metadata.name);return this.submitting(request.put(a,t))}},{key:"delete",value:function(e){var t=(0,C.default)(M(M({},e),{},{namespace:e.devops}),"devops");return this.submitting(request.delete("".concat(this.getDetailUrl(t)).concat(t.isRelated?"?cascade=true":"")))}},{key:"fetchDetail",value:(r=(0,h.default)(n.default.mark((function e(t){var a,r,l,u,o,i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.isSilent,l=t.devops,u=t.cluster,r||(this.isLoading=!0),e.next=4,request.get("".concat(this.getResourceUrl({namespace:l,cluster:u}),"/").concat(a));case 4:return o=e.sent,i=this.mapper(M(M({},o),{},{devops:l})),this.detail=i,this.isLoading=!1,e.abrupt("return",i);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getClustersList",value:(a=(0,h.default)(n.default.mark((function e(t){var a,r,l,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="".concat(this.apiVersion,"/clusters"),e.next=3,request.get(a,null,null,(function(){return[]}));case 3:if(r=e.sent,l="default",!globals.app.isMultiCluster){e.next=11;break}return e.next=8,request.get("kapis/tenant.kubesphere.io/v1beta1/clusters");case 8:u=e.sent,o=u.items.find((function(e){return(0,k.default)(e,'metadata.labels["cluster-role.kubesphere.io/host"]')})),l=(0,N.default)(o,"metadata.name",t||(0,w.getHostClusterName)());case 11:(0,D.default)(r)?this.clustersList=[{server:"https://kubernetes.default.svc",name:"in-cluster",label:l}]:this.clustersList=r.map((function(e){return M(M({},e),{},{label:"in-cluster"===e.name?l:e.name})})),globals.hostClusterName=l;case 13:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchStatusSummary",value:(t=(0,h.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.devops,r=t.cluster,l="".concat(this.apiVersion).concat(this.getPath({namespace:a,cluster:r}),"/application-summary"),e.next=4,request.get(l);case 4:u=e.sent,this.summary=u||{};case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),T}(R.default),c=(0,S.default)(i.prototype,"list",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,order:"",filters:{},isLoading:!1,selectedRowKeys:[]}}}),s=(0,S.default)(i.prototype,"clustersList",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),f=(0,S.default)(i.prototype,"detail",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),d=(0,S.default)(i.prototype,"syncResult",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,total:0,filters:{},isLoading:!1}}}),p=(0,S.default)(i.prototype,"summary",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),m=(0,S.default)(i.prototype,"setSelectRowKeys",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.list.selectedRowKeys=t}}}),(0,S.default)(i.prototype,"fetchList",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,S.default)(i.prototype,"create",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"create"),i.prototype),(0,S.default)(i.prototype,"updateSync",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"updateSync"),i.prototype),(0,S.default)(i.prototype,"update",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"update"),i.prototype),(0,S.default)(i.prototype,"patch",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"patch"),i.prototype),(0,S.default)(i.prototype,"delete",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"delete"),i.prototype),(0,S.default)(i.prototype,"fetchDetail",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),(0,S.default)(i.prototype,"getClustersList",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"getClustersList"),i.prototype),(0,S.default)(i.prototype,"fetchStatusSummary",[T.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchStatusSummary"),i.prototype),i);t.default=A},function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(109),r(5),r(11),r(31),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(316),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.MetricTypes=void 0,r(12),r(109),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(24),r(17),r(62),r(7);var u=n(r(315)),o=n(r(43)),i=n(r(58));r(41);var c,s=n(r(44)),f=n(r(30)),d=n(r(36)),p=n(r(37)),m=n(r(55)),h=n(r(56)),v=n(r(51)),g=n(r(0)),y=n(r(26)),E=n(r(189)),b=n(r(788)),_=n(r(795)),O=n(r(792)),S=l(r(793)),C=n(r(796)),D=r(52),k=n(r(439)),N=r(794),T=n(r(959));function R(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t0&&void 0!==u[0]?u[0]:{},r=a.silent,n=(0,i.default)(a,["silent"]),e.query=n,n.type=n.type||"user",e.type=n.type,l=e.props.store,r&&(l.list.silent=!0),t.next=8,l.fetchList(w(w({},e.props.match.params),n));case 8:return t.next=10,e.monitoringStore.fetchMetrics(w(w({},e.props.match.params),{},{resources:l.list.data.map((function(e){return e.name})),metrics:Object.values((0,D.hideGPUByLicense)(M,e.cluster)),last:!0}));case 10:l.list.silent=!1;case 11:case"end":return t.stop()}}),t)}))),e.getLastValue=function(t,a){var r=e.monitoringStore.data,n=((0,y.default)(r,"".concat(a,".data.result"))||[]).find((function(e){return(0,y.default)(e,"metric.namespace")===t.name}));return(0,y.default)(n,"value[1]",0)},e.getColumns=function(){var a=e.props,r=a.getSortOrder,n=a.prefix,l=[{title:t("NAME"),dataIndex:"name",sorter:!0,sortOrder:r("name"),search:!0,render:function(e,t){return g.default.createElement(b.default,{to:"Terminating"===t.status?null:"".concat(n,"/").concat(e),icon:"project",iconSize:40,isMultiCluster:t.isFedHostNamespace,desc:t.description||"-",title:(0,D.getDisplayNameNew)(t)})}},{title:t("STATUS"),dataIndex:"status",isHideable:!0,search:!0,render:function(e){return g.default.createElement(_.default,{type:e,name:t(e.toUpperCase()),flicker:!0})}},{title:t("WORKSPACE"),dataIndex:"workspace",isHideable:!0,search:!0,render:function(e){return(0,D.showNameAndAlias)(e,"workspace")}}];return globals.app.hasClusterModule(e.cluster,"whizard-monitoring")&&l.push({title:t("CPU_USAGE"),key:"namespace_cpu_usage",isHideable:!0,render:function(t){return(0,N.getSuitableValue)(e.getLastValue(t,M.cpu),"cpu","-")}},{title:t("MEMORY_USAGE"),key:"namespace_memory_usage_wo_cache",isHideable:!0,render:function(t){return(0,N.getSuitableValue)(e.getLastValue(t,M.memory),"memory","-")}},{title:t("GPU_USAGE"),key:"namespace_gpu_usage",isHideable:!0,render:function(t){return(0,N.getSuitableValue)(e.getLastValue(t,M.gpu),"gpu","-")}},{title:t("GPU_MEMORY_USAGE"),key:"namespace_gpu_memory_usage",isHideable:!0,render:function(t){return(0,N.getSuitableValue)(e.getLastValue(t,M.gpu_memory),"memory","-")}},{title:t("POD_PL"),key:"namespace_pod_count",isHideable:!0,render:function(t){return e.getLastValue(t,M.pod)}}),l},e.showCreate=function(){return e.props.trigger("project.create",w(w({},e.props.match.params),{},{success:function(){return e.getData()}}))},e}return(0,p.default)(r,[{key:"render",value:function(){var e=this.props,t=e.bannerProps,a=e.tableProps,r=this.monitoringStore.isLoading,n=(0,D.hideGPUByLicense)(this.getColumns(),this.cluster);return g.default.createElement(S.ListPage,(0,u.default)({},this.props,{getData:this.getData,module:"namespaces"}),g.default.createElement(O.default,(0,u.default)({},t,{tabs:this.tabs})),g.default.createElement(C.default,(0,u.default)({},a,{className:"table-2-6 table-4-3",itemActions:this.itemActions,tableActions:this.tableActions,columns:n,columnSearch:this.columnSearch,onCreate:"system"===this.type?null:this.showCreate,isLoading:a.isLoading||r})))}},{key:"itemActions",get:function(){var e=this,a=this.props,r=a.trigger,n=a.routing,l=a.name;return[{key:"edit",icon:"pen",text:t("EDIT_INFORMATION"),action:"edit",show:this.showAction,onClick:function(e){return r("resource.baseinfo.edit",{detail:(0,E.default)(e,"workspace"),success:n.query})}},{key:"edit-annotations",icon:"pen",text:t("EDIT_ANNOTATIONS"),action:"manage",show:function(t){return t.workspace!==globals.config.systemWorkspace&&e.showAction(t)},onClick:function(e){return r("resource.annotations.edit",{detail:e})}},{key:"modify",icon:"restart",text:t("ASSIGN_WORKSPACE"),action:"manage",show:function(t){return!t.workspace&&e.showAction(t)},onClick:function(e){return r("project.assignworkspace",{detail:e,success:n.query})}},{key:"delete",icon:"trash",text:t("DELETE"),action:"delete",show:function(t){return t.workspace!==globals.config.systemWorkspace&&e.showAction(t)},onClick:function(e){return r("resource.delete",{type:l,resource:e.name,detail:(0,E.default)(e,"workspace"),success:n.query})}}]}},{key:"tabs",get:function(){return{value:this.type||"user",onChange:this.handleTabChange,options:[{value:"user",label:t("USER_PROJECTS")},{value:"system",label:t("SYSTEM_PROJECTS")}]}}},{key:"tableActions",get:function(){return w(w({},this.props.tableProps.tableActions),{},{onFetch:this.handleFetch})}},{key:"cluster",get:function(){return this.props.match.params.cluster}},{key:"columnSearch",get:function(){var e=(0,D.compareVersion)((0,D.getClusterVersion)(this.cluster),"3.4.0")>=0;return[{dataIndex:"name",title:t("NAME"),search:!0},{dataIndex:"alias",title:t("ALIAS"),search:e}]}}]),r}(g.default.Component))||c;a.default=P},function(e,t,a){e.exports={wrapper:"k0vk_c1ZyPCRUMMpipwCh",titleWrapper:"_2uqWBIFfRH4KunvhbfjI7B",icon:"_1ItfxPdCoCJbI5IBYM8qFz",title:"ThEs3yhp382IH4lTVQgX5",more:"_1b6Sz4BPMxD6xHHK-kt11i",tip:"_2L9SGDIY7BXd_hPf_5P6Rh",tipIcon:"_3SM5xM4niT8oxCDuqIJ7II",operations:"oN75oPJD3rroOyRPHKbui",tipContent:"_1bQzGX9rIXqPoeFOyVVDT8",tabsWrapper:"_2_45-StQhVb_5fgk6w8OF9",banLink:"_1B81eItlzKbA79NDBS3LGZ"}},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(959)).default);t.default=c},,,function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(18),r(97),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(250),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(97),r(191),r(42),r(16),r(159),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(7);var l=n(r(61)),u=n(r(43)),o=n(r(30));r(41);var i=n(r(44)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=r(186),h=n(r(240)),v=n(r(3)),g=n(r(0)),y=n(r(1109)),E=r(1183),b=r(14),_=r(982),O=r(903),S=n(r(3266));function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t=0){var n=t[r];t[r]=t[a],t[a]=n}})),t=t.filter((function(e){return!!e})))};t.handleLevelParams=function(e){var t=e.module,a=v.RESOURCES_METER_TYPE[t];return{level:"Level".concat((0,m.default)(a))}};t.getRetentionDay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"7d";return(0,O.default)().endOf("day").add(1,"second").subtract(1,"day").subtract(e.slice(0,-1),"day")};var N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.step,a=void 0===t?"600s":t,r=e.times,n=void 0===r?20:r,l=parseFloat(a)*n,u=Math.floor((0,O.default)().endOf("day").add(1,"second").subtract(1,"day")/1e3),o=Math.floor(u-l);return{start:o,end:u}};t.getTimeRange=N;t.getTimeParams=function(e){var t=e.isTime,a=e.start,r=e.end,n=e.step,l=void 0===n?"1h":n,u={};if(t){var o=l;if(!r||!a){var i=N({step:(0,_.getMinuteValue)(l)});u.start=i.start,u.end=i.end}a&&(u.start=Math.floor(a/1e3)),r&&(u.end=Math.floor(r/1e3)),Math.floor((u.end-u.start)/3600/24)>=30&&(o="1d"),u.step=(0,_.getMinuteValue)(o)}return u};t.getMetricsFilters=function(e){var t=e.meters,a=e.module,r=[];if((0,f.default)(t)||(0,h.default)(D(a)(t),(function(e){r.push(e)})),!(0,f.default)(r))return{metrics_filter:r.join("|")}};t.getResourceFilters=function(e){var t=e.resources,a=e.module;if(!(0,f.default)(t)){var r=t.join("|"),n={};switch(a){case"applications":n={applications:r};break;case"openpitrixs":n={openpitrixs_ids:r};break;case"services":n={services:r};break;default:n={resources_filter:t.join("|")}}return n}};t.fillEmptyMeterValue=function(e,t){if(!e.step||!e.start||!e.end)return t;var a,r=e.step,n=Math.floor((e.end-e.start)/r)+1;if(((0,p.default)(t)||!(0,s.default)(t)?0:t.length)-1&&(a[e]=(0,b.getValueByUnit)(a[e],n.value,3),a.unit=n)})),a};t.handleWorkloadToKind=function(e){var t=e.deployments,a=e.statefulsets,r=e.daemonsets,n={};return t&&(n.kind="deployments"),a&&(n.kind="statefulsets"),r&&(n.kind="daemonsets"),n};t.handleNodeParams=function(e){var t=e.nodes,a=e.pods,r=e.resources;if(t&&a&&r.length>1)return{resources_filter:void 0}};var T=function(e){var t="";return!e||(0,f.default)(e)?t:(Object.keys(e).forEach((function(a){t+="".concat(a,"=").concat(e[a],",")})),t=t.slice(0,-1))};t.handleLabelSelector=T;t.hasNameSpacesType=function(e){return["services","deployments","statefulsets","daemonsets","pods"].indexOf(e)>-1};t.filterListByType=function(e){var t=e.type,a=(0,u.default)(e,["type"]);return(a.services||a.deployments||a.statefulsets||a.daemonsets)&&"pods"===t&&(0,f.default)(a.labelSelector)?function(){return!1}:function(){return!0}};var R=function(){var e=(0,l.default)(n.default.mark((function e(t){var a,r,l,o,i,s,m,h,v,g,y,E,b;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.levelMeterData,r=t.type,l=t.data,o=t.levelKey,i=(0,u.default)(t,["levelMeterData","type","data","levelKey"]),s=o||i.namespaces,m=(0,c.default)(a,s),h=[],v=[],g="applications"===r?"apps":r,!["services","deployments","statefulsets","daemonsets"].includes(r)){e.next=23;break}if(!i.applications&&!i.openpitrixs){e.next=19;break}return y=(0,d.default)(i),E=i.applications||i.openpitrixs,b=i.applications?"apps":"openpitrixs",s="".concat(s,".").concat(b,".").concat(E),delete y.openpitrixs,delete y.applications,e.next=16,R(C({levelMeterData:a,type:r,data:l,levelKey:s},y));case 16:v=e.sent,e.next=21;break;case 19:h=m&&m[g]?Object.keys(m[g]):[],v=l.map((function(e){var t=h.find((function(t){return t===e.name}));return(0,p.default)(t)||(0,f.default)(t)?void 0:e}));case 21:e.next=29;break;case 23:if("applications"!==r&&"openpitrixs"!==r){e.next=28;break}h=m[g]?Object.keys(m[g]):[],v=l.map((function(e){var t=h.find((function(t){return t===e.name||t===e.cluster_id}));return(0,p.default)(t)||(0,f.default)(t)?void 0:e})),e.next=29;break;case 28:return e.abrupt("return",l);case 29:return v=v.filter((function(e){return!(0,p.default)(e)})),e.abrupt("return",v);case 31:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.filterResourceLevel=R;t.handleWSChartData=function(e){var t,a=e.levelMeterData,r=e.meters,n=e.type,l=e.params;switch(n){case"applications":case"openpitrixs":t=function(e,t,a,r){var n=[],l="applications"===r?"apps":"openpitrixs",u=e[t.namespaces]["".concat(l)];return!(0,f.default)(u)&&Object.keys(u).forEach((function(e){if(u[e]){var t=u[e][v.METER_RESOURCE_USAGE[a]]||0,l=v.UNIT_CONFIG[a];n.push({name:e,value:(0,b.getValueByUnit)(t,l.value,3),unit:l.label,type:r})}})),n}(a,l,r,n);break;case"services":case"deployments":case"statefulsets":case"daemonsets":t=function(e,t,a,r){var n=[],l="";if(a.applications||a.openpitrixs){var u=a.applications?"apps":"openpitrixs";l=e[a.namespaces][u];var o=a.applications||a.openpitrixs,i=Object.keys(l).find((function(e){return e.indexOf(o)>-1}));l=l[i][t]}else l=e[a.namespaces][t];return!(0,f.default)(l)&&Object.keys(l).forEach((function(e){var a=(0,c.default)(l,"".concat(e,".").concat(v.METER_RESOURCE_USAGE[r]),0),u=v.UNIT_CONFIG[r];n.push({name:e,value:(0,b.getValueByUnit)(a,u.value,3),unit:u.label,type:t})})),n}(a,n,l,r);break;default:t=function(e,t,a,r){var n=[],l="";if(a.applications||a.openpitrixs){var u=a.applications?"apps":"openpitrixs";l=e[a.namespaces][u];var o=a.applications||a.openpitrixs,i=Object.keys(l).find((function(e){return e.indexOf(o)>-1}));l=l[i]}else l=e[a.namespaces];return a.deployments&&(l=l.deployments[a.deployments][t]),a.services&&(l=l.services[a.services][t]),a.statefulsets&&(l=l.statefulsets[a.statefulsets][t]),a.daemonsets&&(l=l.daemonsets[a.daemonsets][t]),!(0,f.default)(l)&&Object.keys(l).forEach((function(e){var a=(0,c.default)(l,"".concat(e,".").concat(v.METER_RESOURCE_USAGE[r]),0),u=v.UNIT_CONFIG[r];n.push({name:e,value:(0,b.getValueByUnit)(a,u.value,3),unit:u.label,type:t})})),n}(a,n,l,r)}return t};t.getFetchParams=function(e){var t=e.isMultiCluster,a=e.type,r=e.cluster,n=e.namespaces,l=e.workspaces,o=e.applications,i=e.openpitrixs,c=(0,u.default)(e,["isMultiCluster","type","cluster","namespaces","workspaces","applications","openpitrixs"]),s=globals.app.hasPermission({module:"clusters",action:"view"});return{cluster:t||!s?[{page:1,limit:-1}]:[{page:1,limit:-1,labelSelector:"cluster-role.kubesphere.io/host"},{page:1,limit:-1,labelSelector:"!cluster-role.kubesphere.io/host"}],nodes:[{limit:-1,page:1,cluster:r}],workspaces:[{limit:-1,page:1,namespace:n,workspace:l}],namespaces:[{page:1,limit:-1,cluster:r,namespace:n,workspace:l,labelSelector:"!kubesphere.io/devopsproject"}],openpitrixs:[{page:1,limit:-1,workspace:l,cluster:r,namespace:n,openpitrix:i}],applications:[{page:1,limit:-1,workspace:l,cluster:r,namespace:n,application:o}],services:[{page:1,limit:-1,cluster:r,namespace:n,labelSelector:T(c.labelSelector)}],deployments:[{page:1,limit:-1,cluster:r,namespace:n,labelSelector:T(c.labelSelector)}],statefulsets:[{page:1,limit:-1,cluster:r,namespace:n,labelSelector:T(c.labelSelector)}],daemonsets:[{page:1,limit:-1,cluster:r,namespace:n,labelSelector:T(c.labelSelector)}],pods:[{page:1,limit:-1,cluster:r,namespace:n,labelSelector:T(c.labelSelector),nodeName:c.nodes,ownerKind:c.statefulsets?"StatefulSet":c.deployments?"ReplicaSet":void 0}]}[a]};t.getListConfig=function(e){var t=e.type;return{cluster:e.isMultiCluster?[{status:function(e){return e.isReady?"ready":"stop"},desc:""}]:[{status:function(e){return e.isReady?"ready":"stop"},desc:"HOST_CLUSTER"},{status:function(e){return e.isReady?"ready":"stop"},desc:"MEMBER_CLUSTER"}],nodes:[{status:function(e){return(0,g.getNodeStatus)(e)},desc:v.RESOURCE_TITLE[t]}],workspaces:[{desc:v.RESOURCE_TITLE[t]}],namespaces:[{status:function(e){return e.status},desc:v.RESOURCE_TITLE[t]}],applications:[{status:function(e){return e.status||""},desc:v.RESOURCE_TITLE[t]}],openpitrixs:[{status:function(e){return e.status||""},desc:v.RESOURCE_TITLE[t]}],services:[{desc:v.RESOURCE_TITLE[t]}],daemonsets:[{status:function(e){var a=(0,y.getWorkloadStatus)(e,t).status;return a},desc:v.RESOURCE_TITLE[t]}],deployments:[{status:function(e){var a=(0,y.getWorkloadStatus)(e,t).status;return a},desc:v.RESOURCE_TITLE[t]}],statefulsets:[{status:function(e){var a=(0,y.getWorkloadStatus)(e,t).status;return a},desc:v.RESOURCE_TITLE[t]}],pods:[{status:function(e){return(0,c.default)(e,"podStatus.status","")},desc:v.RESOURCE_TITLE[t]}]}[t]};t.handleStrTimeToX=function(e){return 1e3*(0,O.default)(e).format("X")}},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(29),a(18),a(16),a(27),a(137),a(9),a(13),a(10),a(4),a(22),a(23),a(17),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(61)),l=r(a(58)),u=r(a(43));a(41);var o=r(a(44)),i=r(a(65)),c=r(a(36)),s=r(a(37)),f=r(a(88)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49));r(a(66));a(12),a(45),a(5),a(11),a(6),a(29),a(18),a(28),a(245),a(42),a(16),a(27),a(137),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(38),a(7),a(32);var v,g,y,E,b,_,O,S,C,D=r(a(30)),k=r(a(26)),N=r(a(63)),T=a(14),R=a(52),w=a(327),I=r(a(443)),M=r(a(452)),P=r(a(458));function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}function j(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function L(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace;return"apis/application.kubesphere.io/v1alpha1/watch/helmreleases?labelSelector=".concat((0,R.joinSelector)({"kubesphere.io/cluster":globals.app.isMultiCluster?t:null,"kubesphere.io/namespace":a}))},e.getUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.workspace,r=t.namespace,n=t.cluster,l=t.cluster_id,u="".concat(e.baseUrl).concat(e.getPath({workspace:a,namespace:r,cluster:n}),"/applications");return l?"".concat(u,"/").concat(l):u},(0,i.default)(e,"env",y,(0,f.default)(e)),(0,i.default)(e,"fetchList",E,(0,f.default)(e)),(0,i.default)(e,"fetchDetail",b,(0,f.default)(e)),(0,i.default)(e,"update",_,(0,f.default)(e)),(0,i.default)(e,"patch",O,(0,f.default)(e)),(0,i.default)(e,"delete",S,(0,f.default)(e)),(0,i.default)(e,"batchDelete",C,(0,f.default)(e)),e}return(0,s.default)(r,[{key:"upgrade",value:(t=(0,o.default)(u.default.mark((function e(t,a){var r,n,l,o;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.workspace,n=a.namespace,l=a.cluster,o=a.cluster_id,e.abrupt("return",this.submitting(request.post(this.getUrl({workspace:r,namespace:n,cluster:l,cluster_id:o}),t)));case 2:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})}]),r}(P.default),g=(0,h.default)(v.prototype,"components",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],total:0,isLoading:!0}}}),y=(0,h.default)(v.prototype,"env",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:{},isLoading:!1}}}),E=(0,h.default)(v.prototype,"fetchList",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return(0,o.default)(u.default.mark((function t(){var a,r,o,i,c,s,f,d,p,m,h,v,g,y,E,b=arguments;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=b.length>0&&void 0!==b[0]?b[0]:{},r=a.limit,o=a.page,i=a.cluster,c=a.namespace,s=a.workspace,f=a.more,d=a.status,p=a.sortBy,m=a.reverse,h=(0,l.default)(a,["limit","page","cluster","namespace","workspace","more","status","sortBy","reverse"]),e.list.isLoading=!0,v={conditions:(0,R.getFilterString)({status:d||e.defaultStatus})},p||void 0!==m||(p="status_time"),(0,N.default)(h)||(g=(0,R.getFilterString)(h))&&(v.conditions+=",".concat(g)),r!==1/0&&(v.paging="limit=".concat(r||10,",page=").concat(o||1)),p&&(v.orderBy=p),m&&(v.reverse=!0),t.next=10,request.get(e.getUrl({workspace:s,namespace:c,cluster:i}),v);case 10:return y=t.sent,E=(y.items||[]).map((function(e){return L(L({},U(e)),{},{workspace:s,cluster:i})})),Object.assign(e.list,{data:f?[].concat((0,n.default)(e.list.data),(0,n.default)(E)):E,total:y.total_count||0,limit:Number(r)||10,page:Number(o)||1,order:p,reverse:m,filters:h,selectedRowKeys:[]}),e.list.isLoading=!1,t.abrupt("return",E);case 15:case"end":return t.stop()}}),t)})))}}),b=(0,h.default)(v.prototype,"fetchDetail",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,o.default)(u.default.mark((function t(a){var r,n,l,o,i;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.workspace,n=a.namespace,l=a.cluster,o=a.id,e.isLoading=!0,t.next=4,request.get(e.getUrl({workspace:r,namespace:n,cluster:l,cluster_id:o}));case 4:i=t.sent,e.detail=L(L({},U(i)),{},{workspace:r,namespace:n,cluster:l}),e.isLoading=!1;case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),(0,h.default)(v.prototype,"upgrade",[T.action],Object.getOwnPropertyDescriptor(v.prototype,"upgrade"),v.prototype),_=(0,h.default)(v.prototype,"update",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.cluster_id,r=t.cluster,n=t.workspace,u=t.zone,o=(0,l.default)(t,["cluster_id","cluster","workspace","zone"]);return e.submitting(request.patch(e.getUrl({namespace:u,cluster_id:a,cluster:r,workspace:n}),o))}}}),O=(0,h.default)(v.prototype,"patch",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t,a){var r=t.cluster_id,n=t.cluster,l=t.workspace,u=t.zone;return e.submitting(request.patch(e.getUrl({namespace:u,cluster_id:r,cluster:n,workspace:l}),a))}}}),S=(0,h.default)(v.prototype,"delete",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.cluster_id,r=t.cluster,n=t.workspace,l=t.zone;return e.submitting(request.delete(e.getUrl({namespace:l,cluster_id:a,cluster:r,workspace:n})))}}}),C=(0,h.default)(v.prototype,"batchDelete",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t,a){var r=a.namespace,n=a.cluster,l=a.workspace;return e.submitting(Promise.all(t.map((function(t){return request.delete(e.getUrl({namespace:r,cluster:n,workspace:l,cluster_id:t}))}))))}}}),v);t.default=z},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(18),a(16),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(11),a(18),a(42),a(16),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l,u,o,i=r(a(44)),c=r(a(65)),s=r(a(36)),f=r(a(37)),d=r(a(88)),p=r(a(55)),m=r(a(56)),h=r(a(51)),v=r(a(49)),g=(r(a(66)),a(14)),y=a(52),E=a(248),b=r(a(105)),_=a(72);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,h.default)(e);if(t){var n=(0,h.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,m.default)(this,a)}}var S=(l=function(e){(0,p.default)(h,e);var t,a,r,l,m=O(h);function h(e){var t;return(0,s.default)(this,h),t=m.call(this),(0,c.default)(t,"workloadDetail",u,(0,d.default)(t)),(0,c.default)(t,"currentRevision",o,(0,d.default)(t)),t.getDetailUrl=function(e){var a=e.name,r=e.cluster,n=e.namespace,l=e.revision;return"kapis/resources.kubesphere.io/v1alpha2".concat(t.getPath({cluster:r,namespace:n}),"/").concat(t.module,"/").concat(a,"/revisions/").concat(l)},t.module=e,t}return(0,f.default)(h,[{key:"fetchList",value:(l=(0,i.default)(n.default.mark((function e(t){var a,r,l,u,o,i,c,s,f=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,l=t.name,u=t.selector,this.list.isLoading=!0,o=(0,y.joinSelector)(u),i="deployments"===this.module?"apis/apps/v1".concat(this.getPath({cluster:a,namespace:r}),"/replicasets"):"apis/apps/v1".concat(this.getPath({cluster:a,namespace:r}),"/controllerrevisions"),e.next=6,request.get("".concat(i,"?labelSelector=").concat(o));case 6:c=e.sent,s=c.items.map(b.default.revisions).filter((function(e){return e.ownerName===l&&e.ownerKind===_.MODULE_KIND_MAP[f.module]})),this.list.update({data:s,isLoading:!1});case 9:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"fetchDetail",value:(r=(0,i.default)(n.default.mark((function e(t){var a,r,l,u,o,i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.cluster,l=t.namespace,u=t.revision,this.isLoading=!0,e.next=4,request.get(this.getDetailUrl({name:a,cluster:r,namespace:l,revision:u}));case 4:o=e.sent,i=b.default.revisions(o),this.detail=i,this.isLoading=!1;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"fetchWorkloadDetail",value:(a=(0,i.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.cluster,l=t.namespace,e.next=3,request.get("apis/apps/v1".concat(this.getPath({cluster:r,namespace:l}),"/").concat(this.module,"/").concat(a));case 3:u=e.sent,this.workloadDetail=b.default[this.module](u);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchCurrentRevision",value:(t=(0,i.default)(n.default.mark((function e(){var t,a=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.fetchList(t);case 3:this.currentRevision=(0,E.getCurrentRevision)((0,g.toJS)(t),(0,g.toJS)(this.list.data),this.module);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),h}(r(a(68)).default),u=(0,v.default)(l.prototype,"workloadDetail",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),o=(0,v.default)(l.prototype,"currentRevision",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),(0,v.default)(l.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchList"),l.prototype),(0,v.default)(l.prototype,"fetchDetail",[g.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchDetail"),l.prototype),(0,v.default)(l.prototype,"fetchWorkloadDetail",[g.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchWorkloadDetail"),l.prototype),(0,v.default)(l.prototype,"fetchCurrentRevision",[g.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchCurrentRevision"),l.prototype),l);t.default=S},function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(42),a(4),a(23),a(57),a(17);var n,l,u=r(a(65)),o=r(a(36)),i=r(a(88)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(49)),p=(r(a(66)),a(14)),m=a(52),h=r(a(1129));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var g=["node_cpu_usage","node_cpu_utilisation","node_load1","node_load5","node_load15","node_memory_utilisation","node_memory_usage_wo_cache","node_gpu_usage","node_gpu_memory_usage","node_disk_size_utilisation","node_disk_inode_utilisation","node_pod_utilisation"],y=["node_cpu_utilisation","node_cpu_usage","node_cpu_total","node_memory_utilisation","node_memory_usage_wo_cache","node_memory_total","node_gpu_utilization","node_gpu_usage","node_gpu_total","node_gpu_memory_utilization","node_gpu_memory_usage","node_gpu_memory_total","node_disk_size_utilisation","node_disk_size_usage","node_disk_size_capacity","node_pod_utilisation","node_pod_running_count","node_pod_quota","node_disk_inode_utilisation","node_disk_inode_total","node_disk_inode_usage","node_load1","node_load5","node_load15"],E=(n=function(e){(0,c.default)(a,e);var t=v(a);function a(e){var r;return(0,o.default)(this,a),r=t.call(this,e),(0,u.default)(r,"sort_metric",l,(0,i.default)(r)),r.resource="nodes",r.sort_metric_options=(0,m.hideGPUByLicense)(e.sort_metric_options||g,r.cluster),r.metrics_filter=(0,m.hideGPUByLicense)(y,r.cluster).join("|"),r}return a}(h.default),l=(0,d.default)(n.prototype,"sort_metric",[p.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return g[0]}}),n);t.default=E},function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(42),a(4),a(23),a(57),a(17);var n,l,u=r(a(65)),o=r(a(36)),i=r(a(88)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(49)),p=(r(a(66)),a(14)),m=a(52),h=r(a(1210));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var g=["node_cpu_usage","node_cpu_utilisation","node_load1","node_load5","node_load15","node_memory_usage_wo_cache","node_memory_utilisation","node_gpu_usage","node_gpu_memory_usage","node_disk_size_utilisation","node_pod_count","node_pod_utilisation","node_disk_inode_utilisation"],y=["node_cpu_utilisation","node_cpu_usage","node_cpu_total","node_memory_utilisation","node_memory_usage_wo_cache","node_memory_total","node_gpu_utilization","node_gpu_usage","node_gpu_total","node_gpu_memory_utilization","node_gpu_memory_usage","node_gpu_memory_total","node_disk_size_utilisation","node_disk_size_usage","node_disk_size_capacity","node_pod_utilisation","node_pod_running_count","node_pod_quota","node_disk_inode_utilisation","node_disk_inode_total","node_disk_inode_usage","node_pod_count","node_load1","node_load5","node_load15"],E=(n=function(e){(0,c.default)(a,e);var t=v(a);function a(e){var r;return(0,o.default)(this,a),r=t.call(this,e),(0,u.default)(r,"sort_metric",l,(0,i.default)(r)),r.resource="nodes",r.sort_metric_options=(0,m.hideGPUByLicense)(g,r.cluster),r.metrics_filter=(0,m.hideGPUByLicense)(y,r.cluster).join("|"),r}return a}(h.default),l=(0,d.default)(n.prototype,"sort_metric",[p.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return g[0]}}),n);t.default=E},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51));function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var s=function(e){(0,u.default)(a,e);var t=c(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"apiVersion",get:function(){return"kapis/monitoring.kubesphere.io/v1beta1"}}]),a}(r(a(1129)).default);t.default=s},function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(42),a(4),a(23),a(57),a(17);var n,l,u,o=r(a(65)),i=r(a(36)),c=r(a(37)),s=r(a(88)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=r(a(49)),h=(r(a(66)),a(14)),v=a(52),g=r(a(1210));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var E=["namespace_cpu_usage","namespace_cpu_used_requests_utilisation","namespace_cpu_used_limits_utilisation","namespace_memory_usage_wo_cache","namespace_memory_used_requests_utilisation","namespace_memory_used_limits_utilisation","namespace_pvc_bytes_used","namespace_gpu_usage","namespace_gpu_memory_usage","namespace_pod_count","namespace_net_bytes_received","namespace_net_bytes_transmitted"],b=["namespace_memory_usage_wo_cache","namespace_memory_limit_hard","namespace_cpu_usage","namespace_cpu_limit_hard","namespace_gpu_limit_hard","namespace_gpu_usage","namespace_gpu_memory_usage","namespace_pod_count","namespace_pods_hard","namespace_net_bytes_received","namespace_net_bytes_transmitted","namespace_cpu_used_requests_utilisation","namespace_cpu_used_limits_utilisation","namespace_memory_used_requests_utilisation","namespace_memory_used_limits_utilisation","namespace_pvc_bytes_used","namespace_pvc_count"],_=(n=function(e){(0,f.default)(a,e);var t=y(a);function a(e){var r;return(0,i.default)(this,a),r=t.call(this,e),(0,o.default)(r,"sort_metric",l,(0,s.default)(r)),(0,o.default)(r,"changeWorkSpace",u,(0,s.default)(r)),r.resource="namespaces",r.sort_metric_options=(0,v.hideGPUByLicense)(E,r.cluster),r.metrics_filter=(0,v.hideGPUByLicense)(b,r.cluster).join("|"),r}return(0,c.default)(a,[{key:"fetchUrl",get:function(){return this.workspace?"".concat(this.apiVersion,"/workspace_metrics"):"".concat(this.apiVersion,"/namespace_metrics")}}]),a}(g.default),l=(0,m.default)(n.prototype,"sort_metric",[h.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return E[0]}}),u=(0,m.default)(n.prototype,"changeWorkSpace",[h.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.workspace=t,e.fetchAll()}}}),n);t.default=_},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l,u=r(a(44)),o=r(a(36)),i=r(a(37)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(49)),p=a(14);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var h=(l=function(e){(0,c.default)(r,e);var t,a=m(r);function r(){var e;(0,o.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a="";return t&&(a+="/klusters/".concat(t)),a}},{key:"fetchDetail",value:(a=(0,c.default)(u.default.mark((function e(t){var a,r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get(this.getDetailUrl(t));case 3:return a=e.sent,r=b(b({},t),this.mapper(a)),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchList",value:(t=(0,c.default)(u.default.mark((function e(){var t,a,r,o,i,c,s,f,d,p,m=this,h=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.length>0&&void 0!==h[0]?h[0]:{},a=t.cluster,r=t.workspace,o=t.namespace,i=t.more,c=t.devops,s=(0,l.default)(t,["cluster","workspace","namespace","more","devops"]),this.list.isLoading=!0,f=[],s.sortBy||void 0!==s.ascending||(s.sortBy=y.LIST_DEFAULT_ORDER[this.module]||"createTime"),s.limit!==1/0&&-1!==s.limit||(s.limit=-1,s.page=1),s.readyToUse&&f.push("status.readyToUse=".concat(s.readyToUse)),f=f.join(",")||void 0,s.fieldSelector=f,s.limit=s.limit||10,e.next=11,request.get(this.getResourceUrl({cluster:a,workspace:r,namespace:o,devops:c}),this.getFilterParams(s));case 11:return d=e.sent,p=((0,v.default)(d,"items")||[]).map((function(e){return b({cluster:a,namespace:o,workspace:r},m.mapper(e))})),this.list.update(b(b({data:i?[].concat((0,n.default)(this.list.data),(0,n.default)(p)):p,total:d.totalItems||d.totalCount||d.total_count||p.length||0},s),{},{limit:Number(s.limit)||10,page:Number(s.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",p);case 15:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"resourceKind",get:function(){return"VolumeSnapshotContent"}},{key:"apiVersion",get:function(){return"apis/snapshot.storage.k8s.io/v1"}}]),o}(r(a(68)).default),(0,h.default)(i.prototype,"fetchDetail",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),(0,h.default)(i.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),i);t.default=O},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u0&&void 0!==arguments[0]?arguments[0]:{},a=t.state.cluster;e.name&&(e.nameAndAlias=e.name,delete e.name),a&&t.projectStore.fetchList(M({cluster:a,workspace:t.props.workspace},e))},t.fetchData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.monitorStore.fetchApplicationResourceMetrics(M(M({metrics:[t.metricType],workspace:t.props.workspace,cluster:t.state.cluster},t.state),e))},t.handleClusterChange=function(e){t.workspaceStore&&t.workspaceStore.selectCluster(e),t.setState({cluster:e},t.fetchNamespaces)},t.handleNamespaceChange=function(e){t.setState({namespace:e})},t.handleSubmit=function(){var e=t.state,a=e.times,r=e.step,n=t.formRef.current&&t.formRef.current.getData();t.setState(n,(function(){t.fetchData(M(M({},n),{},{times:a,step:r}))}))},t.onCancel=function(){t.setState(M(M({},A),{},{namespace:"all",metrics_filter:void 0}),(function(){t.props.onCancel()}))},t.updateMonitorOptions=function(e){var a=e.times,r=e.step;t.setState({times:a,step:r})},t.projectOptionRenderer=function(e){return g.default.createElement("span",{className:w.default.option},e.isFedManaged?g.default.createElement("img",{className:w.default.indicator,src:"/assets/cluster.svg"}):g.default.createElement(N.Icon,{name:"project"}),e.label)},t.clusterOptionRenderer=function(e){return g.default.createElement("span",{className:w.default.option},g.default.createElement(N.Icon,{name:"cluster",type:"light"}),e.label)},t.clusterValueRenderer=function(e){return g.default.createElement("span",{className:w.default.option},g.default.createElement(N.Icon,{name:"cluster"}),e.label)},t.workspaceStore=e.workspaceStore,t.state=M(M({cluster:t.workspaceStore?t.workspaceStore.cluster:(0,O.default)(e,"cluster",""),namespace:(0,O.default)(e.detail,"namespace","all")},A),{},{metrics_filter:void 0}),t.projectStore=new D.default,t.monitorStore=new k.default,t.formRef=g.default.createRef(),t}return(0,p.default)(n,[{key:"componentDidUpdate",value:(a=(0,s.default)(u.default.mark((function e(t){var a,r,n=this;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(a=this.props.visible)&&a!==t.visible&&(r=this.props.workspaceStore,this.setState({cluster:r?r.cluster:(0,O.default)(this.props,"cluster","")},(0,s.default)(u.default.mark((function e(){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.fetchNamespaces();case 2:return e.next=4,n.fetchData();case 4:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"renderFilterForm",value:function(){var e=this,a=this.state,r=a.cluster,n=a.namespace,l=M({},this.state),u=this.projectStore.list,o={total:u.total,page:u.page,limit:u.limit};return g.default.createElement(N.Form,{className:w.default.form,ref:this.formRef,data:l},this.props.workspace&&g.default.createElement(N.Form.Item,{label:t("CLUSTER")},g.default.createElement(N.Select,{name:"cluster",placeholder:" ",defaultValue:r,options:this.clusters,onChange:this.handleClusterChange,valueRenderer:this.clusterValueRenderer,optionRenderer:this.clusterOptionRenderer,showTip:!0})),g.default.createElement(N.Form.Item,{label:t("PROJECT")},g.default.createElement(N.Select,{name:"namespace",placeholder:" ",defaultValue:n,options:this.namespaces,onFetch:this.fetchNamespaces,onChange:this.handleNamespaceChange,valueRenderer:this.projectOptionRenderer,optionRenderer:this.projectOptionRenderer,isLoading:this.projectStore.list.isLoading,pagination:o,searchable:!0,clearable:!0})),this.isPvc&&this.props.detail.filters&&g.default.createElement(N.Form.Item,{label:t("storageclasses")},g.default.createElement(N.Select,{name:"metrics_filter",defaultValue:"workspace_pvc_bytes_used",onChange:function(t){e.setState({metrics_filter:t})},options:this.props.detail.filters.options.map((function(t){return{label:t.label,value:e.props.detail.filters.getMetricsFilter(t.value)}}))})),g.default.createElement(N.Form.Item,null,g.default.createElement(N.Button,{type:"control",onClick:this.handleSubmit},t("OK"))))}},{key:"renderChart",value:function(){var e=M(M({},this.props.detail),{},{data:this.monitoringData}),t=(0,C.getAreaChartOps)(e);return g.default.createElement("div",{className:w.default.chart},(0,_.default)(t.data)?g.default.createElement("div",{className:w.default.empty},g.default.createElement("img",{src:"/assets/empty-card.svg"})):g.default.createElement(T.SimpleArea,(0,l.default)({width:"100%",height:"100%"},t)))}},{key:"renderTable",value:function(){var e=this.props.detail.title,a=M({},this.props.detail),r=a.unitType,n=a.unit,l=((0,O.default)(this.monitoringData,"[0].values")||[]).reverse().map((function(e){return{time:1e3*(0,O.default)(e,"[0]",0),value:(0,C.getSuitableValue)((0,O.default)(e,"[1]",0),r||n)}})),u=[{key:"time",title:t("TIME"),dataIndex:"time",width:"30%",render:function(e){return(0,S.getLocalTime)(e).format("YYYY-MM-DD HH:mm:ss")}},{key:"usage",title:t("USAGE"),dataIndex:"value"}];return g.default.createElement("div",{className:w.default.table},g.default.createElement("div",{className:w.default.box},g.default.createElement("div",{className:w.default.title},t(e)||t("RESOURCE_USAGE")),g.default.createElement(N.Table,{columns:u,dataSource:l,scroll:{y:200},expandIconAsCell:!1,rowKey:"time"})))}},{key:"render",value:function(){var e=this.state,t=e.times,a=e.step,r=this.props.visible,n=this.monitorStore.resourceMetrics,l=n.isLoading,u=n.isRefreshing;return r?g.default.createElement(R.default,{visible:r,onFetch:this.fetchData,onCancel:this.onCancel,loading:l,refreshing:u,times:t,step:a,updateMonitorOptions:this.updateMonitorOptions},g.default.createElement("div",{className:w.default.content},this.renderFilterForm(),this.renderChart(),this.renderTable())):null}},{key:"metrics",get:function(){return(0,y.toJS)(this.monitorStore.resourceMetrics.data)}},{key:"metricType",get:function(){var e;return this.isPvc&&null!==(e=this.state.metrics_filter)&&void 0!==e?e:this.props.detail.metricType}},{key:"clusters",get:function(){return this.workspaceStore.clusters.data.map((function(e){return{label:(0,S.showNameAndAlias)(e),value:e.name,cluster:e,disabled:!e.isReady}}))}},{key:"namespaces",get:function(){var e=(0,y.toJS)(this.projectStore.list.data).map((function(e){return{label:(0,S.getDisplayName)(e),value:e.name,isFedManaged:e.isFedManaged}}));return e.unshift({label:t("ALL"),value:"all"}),e}},{key:"monitoringData",get:function(){return(0,y.toJS)(this.monitorStore.resourceMetrics.data)}},{key:"isPvc",get:function(){return"pvc"===this.props.detail.type}}]),n}(g.default.Component),i.propTypes={visible:b.default.bool,detail:b.default.object,onCancel:b.default.func},i.defaultProps={visible:!1,detail:{},onCancel:function(){}},o=c))||o;a.default=j},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=e.className,r=void 0===a?"":a,n=e.content,l=(0,o.useState)(!0),f=(0,u.default)(l,2),d=f[0],p=f[1];return o.default.createElement("div",{className:(0,c.default)(s.default.manage,r)},o.default.createElement(i.Dropdown,{theme:"dark",content:n,trigger:"click",placement:"bottomRight",onClick:function(){return p(!d)}},o.default.createElement("div",{className:s.default.button},o.default.createElement("span",null,t("MANAGE")),o.default.createElement(i.Icon,{name:d?"caret-down":"caret-up",type:"dark"}))))};var u=l(r(96)),o=n(r(0)),i=r(186),c=l(r(3)),s=l(r(3844))},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(5),r(11),r(6),r(84),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(85),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.Component=a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(84),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(85),r(62),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(43));r(41);var i=n(r(44)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(14),v=r(239),g=n(r(63)),y=r(186),E=r(52),b=r(791),_=n(r(318)),O=n(r(468)),S=n(r(1048)),C=n(r(858)),D=n(r(1090)),k=n(r(805)),N=n(r(3878));function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t=0&&e.props.onScale(t)},e}return(0,l.default)(a,[{key:"render",value:function(){var e=this.props.className;return c.default.createElement(p.default,{className:(0,f.default)(h.default.replica,e)},c.default.createElement("div",{className:h.default.replicaCount},c.default.createElement(m.default,this.replicaStatus)))}},{key:"replicaStatus",get:function(){var e=this.props,t=e.module,a=e.detail,r=e.enableScale,n={};switch(t){default:case"deployments":n={current:a.availablePodNums||0,desire:a.podNums||0};break;case"statefulsets":n={current:(0,d.default)(a,"status.currentReplicas",a.readyPodNums),desire:a.podNums||0};break;case"daemonsets":n={current:(0,d.default)(a,"status.numberReady",0),desire:(0,d.default)(a,"status.desiredNumberScheduled",0)};break;case"gateways":n={current:Array.isArray(a.pods)?a.pods.length:1,desire:(0,d.default)(a,"replicas",0)}}return n.onScale=r?this.handleReplicaChange:null,n}}]),a}(c.default.Component);t.default=g,g.propTypes={module:s.default.string,detail:s.default.object,enableScale:s.default.bool,onScale:s.default.func},g.defaultProps={module:"deployments",enableScale:!0,onScale:function(){}}},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(5),r(11),r(6),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.Component=a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(14),m=r(239),h=n(r(63)),v=r(186),g=r(52),y=r(791),E=n(r(318)),b=n(r(858)),_=n(r(805)),O=n(r(3908));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r="";return t&&(r+="/klusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"checkService",value:(a=(0,c.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.name,r=t.cluster,l=t.namespace,a&&l){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,request.get(this.getServiceUrl({name:a,cluster:r,namespace:l}),{},{headers:{"x-check-exist":!0}});case 5:u=e.sent,this.isExistService=u.exist;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchService",value:(t=(0,c.default)(n.default.mark((function e(t){var a,r,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.cluster,l=t.namespace,this.isLoading=!0,e.next=4,(0,h.to)(request.get(this.getServiceUrl({name:a,cluster:r,namespace:l})));case 4:u=e.sent,this.service=v.default.services(u),this.isLoading=!1;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),u=(0,p.default)(l.prototype,"isExistService",[m.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),o=(0,p.default)(l.prototype,"service",[m.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),i=(0,p.default)(l.prototype,"isLoading",[m.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),(0,p.default)(l.prototype,"checkService",[m.action],Object.getOwnPropertyDescriptor(l.prototype,"checkService"),l.prototype),(0,p.default)(l.prototype,"fetchService",[m.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchService"),l.prototype),l);t.default=g},function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(16),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.Component=a.default=void 0,r(12),r(109),r(45),r(5),r(28),r(42),r(16),r(4),r(22),r(23),r(57),r(24),r(17),r(62);var l=n(r(315)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=r(14),h=r(239),v=n(r(26)),g=n(r(63)),y=r(186),E=r(52),b=r(434),_=r(791),O=n(r(318)),S=n(r(858)),C=n(r(805)),D=n(r(3915));function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var N=function(e){(0,s.default)(f,e);var a,r,n=k(f);function f(){var e;(0,i.default)(this,f);for(var a=arguments.length,r=new Array(a),l=0;l-1||t.indexOf("/workspaces/")>-1?localStorage.getItem("federated-cluster"):e}},{key:"namespace",get:function(){return this.props.match.params.namespace}},{key:"workspace",get:function(){return this.props.match.params.workspace}},{key:"type",get:function(){return this.cluster&&!this.workspace?"cluster":this.workspace&&!this.cluster?"workspace":"project"}},{key:"listUrl",get:function(){var e=this.props.match.params.workspace,t=this.props.match.url.split("gateways")[0];return"".concat(t,e?"gateways":"gateways/cluster")}}]),r}(d.default.Component))||l)||l)||l;a.default=C},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=r(186),p=n(r(790)),m=n(r(2046));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v={current:"CURRENT",finished:"FINISHED",notfinish:"NOT_SET"},g=function(e){var a=e.step,r=e.state;return s.default.createElement("li",{className:m.default[r]},s.default.createElement("div",{className:m.default.icon},s.default.createElement(d.Icon,{name:a.icon||"appcenter",size:40})),s.default.createElement(p.default,{className:m.default.text,title:t(a.title),description:t(v[r])}))},y=function(e){(0,o.default)(a,e);var t=h(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u",value:">"},{label:">=",value:">="},{label:"<",value:"<"},{label:"<=",value:"<="}];t.SEVERITY_LEVEL=[{type:"critical",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#ca2621"},label:"CRITICAL_ALERT",value:"critical"},{type:"warning",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#f5a623"},label:"ERROR_ALERT",value:"error"},{className:"tag-ffd939",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#FFD939"},label:"WARNING_ALERT",value:"warning"},{type:"secondary",prefixIcon:"information",color:{primary:"#fae7e5",secondary:"#79879c"},label:"INFO_ALERT",value:"info"}];var c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.comparator,a=void 0===t?{}:t,r=e.thresholds,n=void 0===r?{}:r;return[o({name:"comparator",placeholder:"CONDITION_OPERATOR",options:i},a),o({type:"number",name:"thresholds",placeholder:"THRESHOLD"},n)]};t.getBaseRuleConfig=c;var s=c({thresholds:{min:0,converter:function(e){return Number(e)},reverser:function(e){return Number(e)}}});t.BASE_RULE_CONFIG=s;var f=c({thresholds:{min:0,max:100,unit:"%",converter:function(e){var t=new l.default(e);return Number(t.div(100).toString())},reverser:function(e){var t=new l.default(e);return Number(t.times(100).toString())}}});t.PERCENT_RULE_CONFIG=f;var d=c({thresholds:{unit:"core",min:0,converter:function(e){return Number(e)},reverser:function(e){return Number(e)}}});t.CORE_RULE_CONFIG=d;var p=c({thresholds:{unit:"GiB",min:0,converter:function(e){var t=new l.default(e),a=new l.default(1024).pow(3);return Number(t.times(a).toString())},reverser:function(e){var t=new l.default(e),a=new l.default(1024).pow(3);return Number(t.div(a).toString())}}});t.GIB_RULE_CONFIG=p;var m=c({thresholds:{unit:"MiB",min:0,converter:function(e){var t=new l.default(e),a=new l.default(1024).pow(2);return Number(t.times(a).toString())},reverser:function(e){var t=new l.default(e),a=new l.default(1024).pow(2);return Number(t.div(a).toString())}}});t.MIB_RULE_CONFIG=m;var h=c({thresholds:{unit:"GB",min:0,converter:function(e){var t=new l.default(e),a=new l.default(1e3).pow(3);return Number(t.times(a).toString())},reverser:function(e){var t=new l.default(e),a=new l.default(1e3).pow(3);return Number(t.div(a).toString())}}});t.GB_RULE_CONFIG=h;var v=c({thresholds:{unit:"KB/s",min:0,converter:function(e){var t=new l.default(e),a=new l.default(1e3);return Number(t.times(a).toString())},reverser:function(e){var t=new l.default(e),a=new l.default(1e3);return Number(t.div(a).toString())}}});t.KBS_RULE_CONFIG=v;var g=c({thresholds:{unit:"Mbps",min:0,converter:function(e){var t=new l.default(e),a=new l.default(1e3).pow(2);return Number(t.times(a).toString())},reverser:function(e){var t=new l.default(e),a=new l.default(1e3).pow(2);return Number(t.div(a).toString())}}});t.MBPS_RULE_CONFIG=g},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(5),r(11),r(18),r(16),r(9),r(4),r(23),r(24),r(17),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(18),r(42),r(16),r(9),r(4),r(23),r(57),r(24),r(193),r(17);var u,o,i=n(r(61)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(49)),h=l(r(0)),v=n(r(894)),g=n(r(855)),y=n(r(446)),E=r(14),b=r(239),_=n(r(3)),O=r(186),S=n(r(1486)),C=n(r(1488)),D=n(r(2108));function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var N=(0,b.observer)((o=function(e){(0,f.default)(r,e);var a=k(r);function r(){var e;(0,c.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l/? ]).)*$/;a.PATTERN_EXCLUDE_CHARACTERS=v;var g=/(?=.*?[0-9])/;a.PATTERN_NUMBER=g;var y={name:"name",label:"USERNAME",type:"text",description:"DATABASE_USERNAME_DESC",rules:[{pattern:c,message:t("INVALID_DATABASE_USERNAME_DESC")},{pattern:s,message:t("USERNAME_FORBIDDEN_STRINGS")},{required:!0,message:t("USERNAME_EMPTY_DESC")}],range:{max:26}};a.UserName=y;var E={name:"password",label:"PASSWORD",type:"password",description:t("DATABASE_PASSWORD_DESC"),rules:[{pattern:m,message:t("PASSWORD_LETTER")},{pattern:h,message:t("DATABASE_PASSWORD_CHARACTERS")},{pattern:v,message:t("DATABASE_PASSWORD_CHARACTERS_EXCLUDE")},{pattern:g,message:t("PASSWORD_NUMBER")},{required:!0,message:t("ENTER_PASSWORD_TIP")},{pattern:d,message:t("INVALID_DATABASE_PASSWORD_DESC")}],range:{max:32}};a.Password=E;var b={name:"database",label:"AUTHORIZED_DATABASES",type:"text",description:"AUTHORIZED_DATABASES_DESC",rules:[]};a.Database=b;var _=[i(i({},y),{},{rules:[].concat((0,l.default)(y.rules),[{pattern:/^(?!(clickhouse_operator)$)/,message:t("USERNAME_CANNOT_BE_CLICKHOUSE")}])}),E,{name:"description",label:"DESCRIPTION",type:"textarea",description:"DESCRIPTION_DESC",rules:[]}];a.CKAccount=_;a.getPGAccount=function(e){return[{name:"name",label:"USERNAME",type:"text",description:"PG_USERNAME_DESC",rules:[{pattern:f,message:t("INVALID_PG_USERNAME_DESC")},{pattern:/^(?!(postgres|pgautofailover_monitor|pgautofailover_replicator)$)/,message:t("USERNAME_CANNOT_BE_PROGRES")},{pattern:s,message:t("USERNAME_FORBIDDEN_STRINGS")},{required:!0,message:t("USERNAME_EMPTY_DESC")}],range:{max:26},disabled:e},E,{name:"permission",label:"PERMISSIONS",type:"select",disabled:e,options:[{label:t("GENERAL_PERMISSIONS"),value:"General"},{label:t("ADVANCED_PERMISSIONS"),value:"Advanced"}]}]};var O=[y,E,b,{name:"permission",label:"PERMISSIONS",type:"select",options:[{label:t("GENERAL_PERMISSIONS"),value:"General"},{label:t("ADVANCED_PERMISSIONS"),value:"Advanced"}]},{name:"host",label:"AUTHORIZED_HOSTS",type:"text",description:"AUTHORIZED_HOSTS_DESC"}];a.MySQLAccount=O;var S=[{name:"name",label:"USERNAME",type:"text",description:"KAFKA_USERNAME_DESC",rules:[{pattern:p,message:t("KAFKA_USERNAME_DESC")},{required:!0,message:t("USERNAME_EMPTY_DESC")}],range:{max:64}},{name:"authentication",label:"AUTHENTICATION_MODE",type:"select",options:[{label:"TLS",value:"tls"},{label:"SCRAM-SHA-512",value:"scram-sha-512"}]},{name:"authorization",label:"AUTHORIZATION_MODE",type:"select",disabled:!0,description:"AUTHORIZATION_MODE_DESC",options:[{label:t("SIMPLE_AUTHORIZATION"),value:"simple"}]}];a.KafkaAccount=S;a.DefaultPermissionRuleString='{"type":"allow","operation":"Read","resource":{"type":"topic","patternType":"literal","name":""}}'},function(e,a,r){"use strict";(function(e){var n=r(20);r(12),r(11),r(31),r(6),r(84),r(73),r(18),r(16),r(9),r(13),r(10),r(316),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(96)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(30)),c=n(r(58));r(12),r(11),r(31),r(6),r(84),r(73),r(18),r(28),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(85),r(7);var s=n(r(26)),f=n(r(195)),d=n(r(240)),p=r(440),m=n(r(435)),h=n(r(787)),v=n(r(825)),g=n(r(2289)),y=n(r(1557)),E=n(r(1586)),b=n(r(1587)),_=n(r(105)),O=r(1588),S=r(899);function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";e.envError=t},e.envValidator=function(t,a,r){""===e.envError&&r()},e}return(0,u.default)(r,[{key:"componentDidMount",value:function(){var e=this;h().then((function(t){return e.rootStore.registerActions(t.default)}))}},{key:"render",value:function(){var e=this.props,a=e.checkable,r=e.namespace,n=e.isFederated,l=e.isEdgeWize,u=e.cluster,o=e.projectDetail;return s.default.createElement(f.Form.Group,{label:t("ENVIRONMENT_VARIABLE_PL"),desc:t("CONTAINER_ENVIRONMENT_DESC"),checkable:a},s.default.createElement(f.Form.Item,{rules:[{validator:this.envValidator}]},s.default.createElement(d.default,{isEdgeWize:l,rootStore:this.rootStore,name:"".concat(this.prefix,"env"),namespace:r,isFederated:n,cluster:u,projectDetail:o,handleInputError:this.handleErrorStatus})))}},{key:"prefix",get:function(){var e=this.props.prefix;return e?"".concat(e,"."):""}}]),r}(s.default.Component);a.default=v,v.defaultProps={prefix:"",checkable:!0}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(29),r(87),r(16),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(17),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(160),r(29),r(28),r(87),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(17),r(38),r(7),r(32);var l=n(r(315)),u=n(r(58)),o=n(r(43));r(41);var i,c,s,f=n(r(44)),d=n(r(30)),p=n(r(61)),m=n(r(96)),h=n(r(36)),v=n(r(37)),g=n(r(55)),y=n(r(56)),E=n(r(51)),b=n(r(0)),_=n(r(1)),O=n(r(1e3)),S=n(r(851)),C=n(r(437)),D=n(r(1169)),k=n(r(933)),N=n(r(999)),T=n(r(135)),R=n(r(26)),w=n(r(63)),I=r(791),M=n(r(2300)),P=n(r(2302)),A=n(r(829)),j=n(r(1547)),L=n(r(2303));function x(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function U(e){for(var t=1;t1){var a={};return t.forEach((function(e,t){var r,n=null!==(r=null==e?void 0:e.name)&&void 0!==r?r:"";""!==e.name&&(a[n]?a[n].push("".concat(t)):a[n]=[])})),Object.values(a).reduce((function(e,t){return[].concat((0,p.default)(e),(0,p.default)(t))}),[])}return[]}}]),r}(b.default.Component),c.propTypes={name:_.default.string,value:_.default.array,onChange:_.default.func,handleInputError:_.default.func},c.defaultProps={name:"",onChange:function(){},handleInputError:function(){}},i=s))||i;a.default=F},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(816));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=function(e){(0,o.default)(r,e);var a=p(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"getImagePullPolicyOptions",value:function(){return[{icon:"timed-task",label:t("IMAGE_PULL_POLICY_ALWAYS"),value:"Always",description:t("IMAGE_PULL_POLICY_ALWAYS_DESC")},{icon:"timed-task",label:t("IMAGE_PULL_POLICY_IFNOTPRESENT"),value:"IfNotPresent",description:t("IMAGE_PULL_POLICY_IFNOTPRESENT_DESC")},{icon:"timed-task",label:t("IMAGE_PULL_POLICY_NEVER"),value:"Never",description:t("IMAGE_PULL_POLICY_NEVER_DESC")}]}},{key:"render",value:function(){return s.default.createElement(f.Form.Item,null,s.default.createElement(d.default,{name:"".concat(this.prefix,"imagePullPolicy"),defaultValue:"IfNotPresent",options:this.getImagePullPolicyOptions()}))}},{key:"prefix",get:function(){var e=this.props.prefix;return e?"".concat(e,"."):""}}]),r}(s.default.Component);a.default=m,m.defaultProps={prefix:""}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(1548)),p=n(r(2309));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var h=function(e){(0,o.default)(r,e);var a=m(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement(f.Form.Group,{label:t("HEALTH_CHECK"),desc:t("HEALTH_CHECKER_DESC"),checkable:!0},s.default.createElement(f.Form.Item,{className:p.default.item,label:t("LIVENESS_CHECK"),desc:t("LIVENESS_CHECK_DESC")},s.default.createElement(d.default,{name:"".concat(this.prefix,"livenessProbe"),probType:"livenessProbe"})),s.default.createElement(f.Form.Item,{className:p.default.item,label:t("READINESS_CHECK"),desc:t("READINESS_CHECK_DESC")},s.default.createElement(d.default,{name:"".concat(this.prefix,"readinessProbe"),probType:"readinessProbe"})),s.default.createElement(f.Form.Item,{className:p.default.item,label:t("STARTUP_CHECK"),tip:t("STARTUP_CHECK_TIP"),desc:t("STARTUP_CHECK_DESC")},s.default.createElement(d.default,{name:"".concat(this.prefix,"startupProbe"),probType:"startupProbe"})))}},{key:"prefix",get:function(){var e=this.props.prefix;return e?"".concat(e,"."):""}}]),r}(s.default.Component);a.default=h,h.defaultProps={prefix:""}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(84),r(18),r(16),r(10),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(84),r(18),r(42),r(16),r(10),r(4),r(23),r(57),r(17),r(85);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(26)),d=n(r(63)),p=r(52),m=r(72),h=r(186),v=n(r(872)),g=n(r(951)),y=n(r(2313)),E=n(r(2323));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var _=function(e){(0,o.default)(r,e);var a=b(r);function r(e){var n;return(0,l.default)(this,r),(n=a.call(this,e)).limitError="",n.valueRenderer=function(e){return s.default.createElement(h.Tag,{className:E.default.type,type:"init"===e.value?"warning":"default"},e.label)},n.renderImageForm=function(){var e=n.props,t=e.data,a=e.namespace,r=e.cluster,l=e.type,u=e.isEdit,o=e.isEdgeWize,i=n.imageRegistries,c=n.getFormTemplate(t,i);return s.default.createElement(y.default,{className:E.default.imageSearch,name:"image",namespace:a,formTemplate:c,imageRegistries:i,isEdgeWize:o,cluster:r,type:u?"Edit":l})},n.handleError=function(e){n.limitError=e},n.limitValidator=function(e,t,a){""!==n.limitError&&a({message:""}),a()},n.duplicatedNameValidator=function(e,a,r){n.props.containers.map((function(e){return e.name})).filter((function(e){return e!==n.state.originName})).includes(a)&&r({message:t("NAME_EXIST_DESC")}),r()},n.state={originName:e.data.name},n}return(0,u.default)(r,[{key:"getGpuLimit",value:function(){return(0,p.gpuLimitsArr)(this.props.workspaceQuota)}},{key:"getFormTemplate",value:function(e){if(e&&e.image&&!e.pullSecret){var t=e.annotationOfImagePullSecrets;!(0,d.default)(e.annotationOfImagePullSecrets)&&t[e.name]&&(e.pullSecret=t[e.name])}return e}},{key:"renderAdvancedSettings",value:function(){var e=this.props,a=e.defaultContainerType,r=e.onContainerTypeChange,n=e.supportGpuSelect,l=this.defaultResourceLimit;return s.default.createElement(g.default,{defaultShow:(0,d.default)(l)},s.default.createElement(s.default.Fragment,null,s.default.createElement(h.Columns,{className:E.default.columns},s.default.createElement(h.Column,null,s.default.createElement(h.Form.Item,{label:t("CONTAINER_NAME"),desc:t("NAME_DESC"),rules:[{required:!0,message:t("NAME_EMPTY_DESC")},{pattern:m.PATTERN_NAME,message:t("INVALID_NAME_DESC",{message:t("NAME_DESC")})},{validator:this.duplicatedNameValidator}]},s.default.createElement(h.Input,{name:"name",defaultValue:"container-".concat((0,p.generateId)()),maxLength:63}))),s.default.createElement(h.Column,null,s.default.createElement(h.Form.Item,{label:t("CONTAINER_TYPE")},s.default.createElement(h.Select,{name:"type",defaultValue:a,options:this.containerTypes,onChange:r,valueRenderer:this.valueRenderer})))),s.default.createElement(h.Alert,{className:"margin-b12",type:"info",message:t("CONTAINER_RESOURCE_LIMIT_TIP")}),s.default.createElement(h.Form.Item,{rules:[{validator:this.limitValidator,checkOnSubmit:!0}]},s.default.createElement(v.default,{name:"resources",defaultValue:l,onError:this.handleError,workspaceLimitProps:this.workspaceLimitProps,supportGpuSelect:n}))))}},{key:"render",value:function(){var e=this.props.className;return s.default.createElement(h.Form.Group,{className:e,label:t("CONTAINER_SETTINGS"),desc:t("CONTAINER_SETTINGS_DESC"),noWrapper:!0},this.renderImageForm(),this.renderAdvancedSettings())}},{key:"defaultResourceLimit",get:function(){var e=this.props.limitRange,t=void 0===e?{}:e;if(t.defaultRequest||t.default)return{requests:t.defaultRequest||{},limits:t.default||{}}}},{key:"containerTypes",get:function(){return[{label:t("WORKER_CONTAINER"),value:"worker"},{label:t("INIT_CONTAINER"),value:"init"}]}},{key:"imageRegistries",get:function(){var e=this.props.imageRegistries;return(void 0===e?[]:e).map((function(e){var t=(0,f.default)(e,'data[".dockerconfigjson"].auths',{}),a=Object.keys(t)[0]||"",r=(0,f.default)(t[a],"username"),n=e.isFedManaged?(0,f.default)(e,"clusters[0].name"):e.cluster,l=Boolean((0,f.default)(e,'annotations["secret.kubesphere.io/force-insecure"]',!1)),u=Boolean((0,f.default)(e,"isDefault",!1)),o=(0,f.default)(t[a],"auth");return{url:a,username:r,label:e.aliasName?"".concat(e.aliasName,"(").concat(e.name,")"):e.name,value:e.name,cluster:n,isSkipTLS:l,isDefault:u,auth:o}}))}},{key:"workspaceLimitProps",get:function(){var e=this.props.workspaceQuota;return(0,d.default)(e)?{}:{limits:{cpu:(0,f.default)(e,"limits.cpu"),memory:(0,f.default)(e,"limits.memory")},requests:{cpu:(0,f.default)(e,"requests.cpu"),memory:(0,f.default)(e,"requests.memory")},gpuLimit:this.getGpuLimit()}}}]),r}(s.default.Component);a.default=_},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(84),a(27),a(931),a(85),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(84),a(27),a(931),a(436),a(319),a(24),a(193),a(85);var l=n(a(315)),u=n(a(30)),o=n(a(96)),i=n(a(58)),c=a(186),s=n(a(1040)),f=n(a(3)),d=r(a(0)),p=n(a(2310)),m=function(e){var t=e.unit,a=e.value,r=e.defaultValue,n=e.onChange,m=e.min,h=void 0===m?Number.NEGATIVE_INFINITY:m,v=e.max,g=void 0===v?Number.POSITIVE_INFINITY:v,y=e.integer,E=void 0!==y&&y,b=e.error,_=void 0!==b&&b,O=e.onBlur,S=(0,i.default)(e,["unit","value","defaultValue","onChange","min","max","integer","error","onBlur"]),C=null!=a?a:r,D=d.useState(C===1/0?void 0:C),k=(0,o.default)(D,2),N=k[0],T=k[1],R=d.useState(_),w=(0,o.default)(R,2),I=w[0],M=w[1],P=d.useReducer((function(e){return e+1}),0),A=(0,o.default)(P,2),j=A[0],L=A[1];d.useEffect((function(){a!==N&&T(a===1/0?void 0:a)}),[a]);var x=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a="string"==typeof e?E?parseInt(e,10):parseFloat(e):e;if(void 0===e||""===e||isNaN(a))return T(""),null==n||n(""),void(t&&void 0!==e&&""!==e&&M(!0));a=Math.max(h,Math.min(a,g)),T(a),null==n||n(a),M(!1)},U=E?/[-0-9]/:/[-.0-9]/;return d.createElement(c.Input,(0,l.default)({},S,{className:(0,f.default)(p.default.wrapper,(0,u.default)({},p.default.error,I||_)),key:j,value:N,onChange:function(e){var t=e.target.value,a=t.includes("-"),r=t.includes("."),n=Number(t);(Number.isNaN(n)||(0,s.default)(n))&&(r||a?(M(!1),T(e.target.value)):x(t,!0))},onKeyPress:function(e){"e"!==e.key&&"E"!==e.key||e.preventDefault(),U.test(e.key)||e.preventDefault()},suffix:t,onBlur:function(){x(N,!1),M(!1),L(),null==O||O()}}))};t.default=m},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1041)).default);t.default=c},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(3)),d=n(r(1)),p=n(r(74)),m=n(r(800)),h=r(186),v=n(r(799)),g=n(r(2347));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var E=function(e){(0,o.default)(r,e);var a=y(r);function r(){var e;(0,l.default)(this,r);for(var t=arguments.length,n=new Array(t),u=0;u=70&&a<90&&(t=e.get(70)),a>=90&&(t=e.get(100)),b(t)}),[a,n]),o.default.createElement("div",{className:i.default.progress},o.default.createElement("div",{className:i.default.line_box},o.default.createElement("div",{className:i.default.line_split_items,style:{background:_}}),o.default.createElement("div",{className:i.default.line_block_mask_items,style:{width:"".concat(100-a<0?0:100-a,"%"),background:s}}),o.default.createElement("div",{className:i.default.line_block_items,style:{background:h}})),o.default.createElement("span",{style:{color:E}},O))},a(5),a(6),a(160),a(29),a(73),a(18),a(326),a(190),a(98),a(4),a(319),a(38),a(7),a(32);var l=n(a(246)),u=n(a(96)),o=r(a(0)),i=n(a(2454))},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(36)),l=a(52),u=r(a(26)),o=r(a(1104)),i=r(a(2477));t.default=function e(t){var a=this;(0,n.default)(this,e),this.store=null,this.setStore=function(e){a.store=e},this.isCalico=function(e){var t,a,r,n=null!==(t=null===(a=window.parent)||void 0===a?void 0:a.globals)&&void 0!==t?t:window.globals,o=(null==n||null===(r=n.app)||void 0===r?void 0:r.isMultiCluster)?(0,u.default)(n,"clusterConfig.".concat(e,".ksVersion")):(0,u.default)(n,"ksConfig.ksVersion");return(0,l.compareVersion)(o,"3.4.1")>=0},this.isOutdated=function(e){var t,a,r,n=null!==(t=null===(a=window.parent)||void 0===a?void 0:a.globals)&&void 0!==t?t:window.globals;if(!(null==n||null===(r=n.app)||void 0===r?void 0:r.isMultiCluster))return!1;var o=(0,u.default)(n,"clusterConfig.".concat(e,".ksVersion"));return(0,l.compareVersion)(o,"3.4.0")<0},this.getStoreByCluster=function(e){return a.isCalico(e)?i.default:o.default},this.setStoreByCluster=function(e){var t=a.getStoreByCluster(e);a.setStore(new t)},t&&(this.store=t)}},function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(11),a(6),a(16),a(9),a(13),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.NodeTreeSelect=g,t.default=void 0,a(12),a(11),a(6),a(28),a(16),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(7);var l=n(a(43));a(41);var u=n(a(30)),o=n(a(44)),i=n(a(96)),c=r(a(0)),s=a(186),f=n(a(953)),d=n(a(1318)),p=n(a(2484));function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function h(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[];return null==t||t.map((function(t){if(a.push(t.parentKey),t.children)return e(t.children,a)})),a}(S)}),[S]);function U(e){var t,a,n,l=e.metadata,u=l.name,o=l.annotations["kubesphere.io/alias-name"],s=((null==b||null===(t=b.current)||void 0===t?void 0:t.offsetWidth)||290)-(null===(a=e.parentKey)||void 0===a?void 0:a.length)/2*22-80,f=E?" (".concat((null===(n=e.spec.nodes)||void 0===n?void 0:n.length)||0,")"):"";return i.default.createElement(i.default.Fragment,null,i.default.createElement("span",{className:m.default["tree-node-title"],title:(o||u)+f,style:{minWidth:s,maxWidth:s}},i.default.createElement("span",{className:m.default["tree-node-title-text"]},o||u),u&&o&&i.default.createElement("span",{className:m.default["tree-node-des"]},"(",u,")"),f),i.default.createElement("span",{className:(0,c.default)("rc-tree-node-right",j===e.key&&"rc-tree-node-select")},null==r?void 0:r(e)))}return(0,i.useEffect)((function(){T(a)}),[a]),(0,i.useEffect)((function(){if(n){var e=null==x?void 0:x.filter((function(e){return e.find((function(e){return null==e?void 0:e.includes(n)}))}));M((0,s.default)((0,f.default)(e)))}else l&&M(l)}),[n,l]),(0,i.useEffect)((function(){C(function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t=t.map((function(t){var r;t.key=t.metadata.name;var n=[t.key,null===(r=t.metadata.annotations)||void 0===r?void 0:r["kubesphere.io/alias-name"]];return t.aliasName=n[1]?"".concat(n[1],"(").concat(n[0],")"):n[0],t.parentKey=[].concat((0,u.default)(a),n),t.title=U(t),t.spec.children&&(t.children=e(t.spec.children,t.parentKey)),t}))}(t))}),[t,a,j]),i.default.createElement("div",{ref:b},i.default.createElement(d.default,{treeData:S,icon:function(e){return(null==h?void 0:h(e))||i.default.createElement("img",{width:16,src:"/assets/disk_group.svg",alt:""})},switcherIcon:g,itemHeight:36,autoExpandParent:N,expandedKeys:I,onExpand:function(e){M(e),T(!1)},onClick:function(e,t){if(j.includes(t.key)||L(t.key),!t.selected&&p){var a,r=!(null===(a=t.spec.children)||void 0===a?void 0:a.length);null==p||p(v(v({},t),{},{selected:!t.selected}),r)}},filterTreeNode:n&&function(e){var t,a,r;return!!n&&(e.key.includes(n)||(null===(t=e.metadata)||void 0===t||null===(a=t.annotations)||void 0===a||null===(r=a["kubesphere.io/alias-name"])||void 0===r?void 0:r.includes(n)))}}))}var E=y;t.default=E},,function(e,t,a){e.exports={status:"_1dL0EeNSXN669XzDa7U4qr","node-tree":"_1SgVDKBokdg6tuQpWCF-c","node-tree-left":"vmuMPLSpP2B_7LmOZJDLB","node-tree-right":"_6xV5xu34ztjX6K4aYg5_",title:"_3C4btdBl2rx-5OjQHqIWJb","node-group__tree-item":"_2kQA2n6B5FG12JjJZTCpwH","node-group__tree-item-margin":"_3sUzjEfV2GUFiQ5KxGgxrO","node-group__tree-item-title":"_2cxoKgG4S6Z0qODlPgrT7O","node-group__tree-item-icon-hover":"_2zJyN7BKJvEHVizJbpVT-c","node-group__tree-item-add":"_412g1f0bUVJPkxVUpMx6a","node-tooltip-item":"AArIX4vLMptXXa3UW80e1","node-tooltip-active":"_1t4Rx4z68MRfpYggELWTv3"}},function(e,t,a){e.exports={nodeSelectorsWrapper:"_3Ntw-JKc4povnOp_c2BVl",nodeSelectors:"_1_7JWPBL0Vh2u4OtOnKKm",add:"tpwxGXK_uiC1ZlYfss91c",confirm:"V1tSzvZVaXXeUDnHfLcaZ","edge-table-selector-box":"_3ZkpGzChQs7JJ1TkvWSlOJ",columns:"_3Duos79G-2Eubl4CnnlyHQ",column:"_2WynhuPhAS_PYjxZy6lEmC","select-nodes":"_3VGVKprUvfs8AeufyvgfM2","select-nodes-normal":"_3NO1k8Sa2jw9c2uiH9g5b","select-nodes-icon":"_30A_R4LX4qncbURGVN1kDf",trees:"_1CZYo9RhgLGtYsjUW7khGO",switch:"_2nGfUqPrwCtStabrmKQkm_"}},function(e,t,a){e.exports={editContainer:"_2TTFcQ4vnnv51E8aVOlqFz",title:"_3PgCFKRywYHFJwJrJKxF3m",container:"_2fym1soTGH0nCcnJNCZACw",card:"_25qqt5BRSnexUkWmCPRQcM",listItem:"_1h6ZZgEGOGKQWEfx1sDpzn",action:"f7esabqGfBkJU8t1jqErp",workspace:"Mp4BNazHY5E22a2HDXjTP",edit:"_2CYvqg-lEuCoI3kTR9LSG_",info:"_29cU7cbTcEu9SKI99wmXj0",editRow:"_2MaigTYE6ndKSETELA5RYY",confirm:"_3DMLykQMW4cpIWefbESdUs",editForm:"osoVqI1mtNOROFTJFuHTq",switch:"_2cBLDmbg9s7yq1QtcE2ZnP",codeWrapper:"_2kpTK_dneC0klEnq214ET9",tabPanel:"fiprQmqMIUoOnRlM_XLHP",option:"_3A-tSaOoHgsRn0jXj7EHqh",label:"_2PaxwDrSSXY0bv-vsZ3gR-",description:"i8TRLE1iF7-TfKCpvwaFM",desc:"rVLbCCPYagcj54caTsfVJ"}},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(16),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o=r(a(44)),i=r(a(36)),c=r(a(37)),s=r(a(55)),f=r(a(56)),d=r(a(51)),p=r(a(68)),m=r(a(26));function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getNetworkUrl,"/").concat(e.getPath(t),"/").concat(e.module)},e.migrate=function(t,a,r){var n="".concat(e.getNetworkUrl,"/").concat(e.getPath({cluster:t}),"/ippoolmigrations");return e.submitting(request.post(n,{oldippool:a,newippool:r},y))},e.getNetworkResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getNetworkUrl,"/").concat(e.module,"/").concat(t.name,"/migrate")},e}return(0,c.default)(l,[{key:"fetchMigrateIpPool",value:(a=(0,o.default)(n.default.mark((function e(){var t,a,r,l,o,i,c,s=this,f=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=f.length>0&&void 0!==f[0]?f[0]:{},a=t.cluster,r=t.namespace,l=t.name,o=(0,u.default)(t,["cluster","namespace","name"]),e.next=3,request.get(this.getNetworkResourceUrl({name:l}),this.getFilterParams(o));case 3:return i=e.sent,c=((0,m.default)(i,"items")||[]).map((function(e){return v({cluster:a,namespace:r},s.mapper(e))})),e.abrupt("return",c);case 6:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchNamespacesIpPools",value:(t=(0,o.default)(n.default.mark((function e(){var t,a,r,l,o,i=this,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:{},a=t.namespace,r=t.cluster,l=(0,u.default)(t,["namespace","cluster"]),e.next=3,request.get("".concat(this.getNetworkUrl).concat(this.getPath({namespace:a,cluster:r}),"/").concat(this.module),this.getFilterParams(l));case 3:return o=e.sent,e.abrupt("return",o.map((function(e){return v({cluster:r,namespace:a},i.mapper(e))})));case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return this.getNetworkUrl}}]),l}(p.default);t.default=E},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(187),a(11),a(31),a(84),a(18),a(137),a(4),a(23),a(17),a(85),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(187),a(11),a(31),a(84),a(18),a(42),a(137),a(4),a(23),a(57),a(17),a(85);var n=r(a(315)),l=r(a(58)),u=r(a(61)),o=r(a(36)),i=r(a(37)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(0)),p=a(239),m=r(a(63)),h=r(a(194)),v=r(a(26)),g=a(186);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=function(e){var t=function(t){(0,c.default)(r,t);var a=y(r);function r(){var e;(0,o.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r="";return t&&(r+="/clusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"apiVersion",get:function(){return"/kapis/resources.kubesphere.io/v1alpha3/customresourcedefinitions"}}]),a}(r(a(68)).default);t.default=d},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(26)),f=n(r(74)),d=n(r(0)),p=r(186),m=r(72);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(r,e);var a=h(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"componentDidMount",value:function(){"ExternalName"!==(0,s.default)(this.formTemplate,"spec.type")&&(0,f.default)(this.formTemplate,"spec",{type:"ExternalName"})}},{key:"render",value:function(){var e=this.props.formRef;return d.default.createElement(p.Form,{data:this.formTemplate,ref:e},d.default.createElement(p.Form.Item,{label:t("EXTERNAL_SERVICE_ADDRESS"),desc:t("EXTERNAL_SERVICE_ADDRESS_DESC"),rules:[{required:!0,message:t("EXTERNAL_SERVICE_ADDRESS_EMPTY_DESC")}]},d.default.createElement(p.Input,{name:"spec.externalName",placeholder:"foo.bar.example.com"})))}},{key:"formTemplate",get:function(){var e=this.props,t=e.formTemplate,a=e.module;return(0,s.default)(t,m.MODULE_KIND_MAP[a],t)}}]),r}(d.default.Component);a.default=v},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(84),r(16),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(6),r(84),r(28),r(42),r(16),r(4),r(23),r(57),r(24),r(193),r(17),r(7);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(26)),f=n(r(74)),d=n(r(242)),p=n(r(63)),m=n(r(0)),h=r(186),v=n(r(816)),g=n(r(829)),y=n(r(1339)),E=r(52),b=r(72),_=n(r(1618)),O=n(r(2640));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var C=function(e){(0,o.default)(r,e);var a=S(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,u=new Array(n),o=0;o0){var n=[];a.forEach((function(e){return e.name&&e.port?n.includes(e.name)?r({message:t("PORT_INPUT_DESC")}):e.name&&(e.name.length>63||!b.PATTERN_PORT_NAME.test(e.name))?r({message:t("PORT_NAME_DESC")}):void n.push(e.name):r({message:t("INVALID_PORT")})}))}r()},e.labelsValidator=function(e,a,r){return a?(0,p.default)(a)?r({message:t("ENTER_SELECTOR_TIP")}):(0,E.isValidLabel)(a)?r():r({message:t("LABEL_FORMAT_DESC")}):r()},e}return(0,u.default)(r,[{key:"renderTypeSelect",value:function(){return m.default.createElement(h.Form.Item,{label:t("INTERNAL_ACCESS_MODE")},m.default.createElement(v.default,{className:"margin-b12",value:this.state.serviceType,onChange:this.handleTypeChange,options:this.types}))}},{key:"renderLabelSelector",value:function(){return m.default.createElement(h.Form.Item,{label:t("WORKLOAD_SELECTOR"),rules:[{required:!0,message:t("ENTER_SELECTOR_TIP")},{validator:this.labelsValidator}]},m.default.createElement(_.default,{name:"spec.selector",cluster:this.props.cluster,namespace:this.namespace,addText:t("ADD")}))}},{key:"renderPorts",value:function(){return m.default.createElement(h.Form.Group,{label:t("PORT_PL"),desc:t("SERVICE_PORTS_DESC")},m.default.createElement(h.Form.Item,{rules:[{required:!0,message:t("PORT_EMPTY")},{validator:this.portsValidator,checkOnSubmit:!0}]},m.default.createElement(g.default,{name:"spec.ports",itemType:"object",addText:t("ADD")},m.default.createElement(y.default,null))))}},{key:"render",value:function(){var e=this.props.formRef;return m.default.createElement("div",{className:O.default.wrapper},m.default.createElement(h.Form,{data:this.formTemplate,ref:e},this.renderTypeSelect(),this.renderLabelSelector(),this.renderPorts()))}},{key:"formTemplate",get:function(){var e=this.props,t=e.formTemplate,a=e.module;return(0,s.default)(t,b.MODULE_KIND_MAP[a],t)}},{key:"namespace",get:function(){return(0,s.default)(this.formTemplate,"metadata.namespace")}},{key:"types",get:function(){return[{icon:"cluster",label:t("VIRTUAL_IP_TITLE"),description:t("VIRTUAL_IP_DESC"),value:"virtualIP"},{icon:"blockchain",label:t("INTERNAL_DOMAIN_NAME"),description:t("INTERNAL_DOMAIN_NAME_DESC"),value:"headlessSelector"}]}}]),r}(m.default.Component);a.default=C},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(97),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(64),r(75),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51));r(12),r(45),r(5),r(11),r(6),r(28),r(97),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(64),r(75),r(7);var f=n(r(800)),d=n(r(158)),p=n(r(0)),m=r(186),h=n(r(799)),v=n(r(1098)),g=r(72),y=n(r(2636));function E(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function b(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"/".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getWatchListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/".concat(e.apiVersion,"/watch").concat(e.getPath(t),"/").concat(e.module)},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath(t),"/").concat(e.module)},e.getBuilderTemplate=function(){var t=(0,i.default)(l.default.mark((function t(a){return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,request.get("/apis/devops.kubesphere.io/v1alpha1".concat(e.getPath(a),"/s2ibuildertemplates"));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),(0,n.default)(e,"fetchDetail",o,(0,f.default)(e)),e}return(0,s.default)(r,[{key:"creatBinary",value:function(e,t,a){var r=y.default.b2iBuilders({name:e,namespace:t});return request.post("/apis/devops.kubesphere.io/v1alpha1".concat(this.getPath({namespace:t,cluster:a}),"/s2ibinaries/").concat(e),r)}},{key:"verifyRepoReadable",value:(t=(0,i.default)(l.default.mark((function e(t,a,r,n){var u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return u=a?{remoteUrl:t,secretRef:{name:a,namespace:r}}:{remoteUrl:t},e.next=5,request.post("/kapis/resources.kubesphere.io/v1alpha2".concat(this.getPath({cluster:n}),"git/verify"),u,{},(function(e){var t=(0,v.default)(e,"message","");return t?Promise.resolve({message:t}):Promise.reject(e)}));case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)}))),function(e,a,r,n){return t.apply(this,arguments)})}]),r}(E.default),o=(0,h.default)(u.prototype,"fetchDetail",[g.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,i.default)(l.default.mark((function t(a){var r,n,u,o;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,n=a.namespace,u=a.name,e.isLoading=!0,t.next=4,request.get("/apis/devops.kubesphere.io/v1alpha1".concat(e.getPath({namespace:n}),"/s2ibuilders/").concat(u),void 0,void 0,(function(e){if("NotFound"===e.reason)return e;Promise.reject(e)}));case 4:return o=t.sent,e.detail=e.mapper(o),e.detail.cluster=r,e.isLoading=!1,t.abrupt("return",e.detail);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),u);t.default=O},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(16),a(27),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(16),a(27),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(61)),u=r(a(30)),o=r(a(58));a(41);var i,c=r(a(44)),s=r(a(36)),f=r(a(37)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=r(a(26)),g=a(14);function y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function E(e){for(var t=1;t0&&void 0!==p[0]?p[0]:{},a=t.cluster,r=t.workspace,u=t.namespace,i=t.more,t.devops,c=(0,o.default)(t,["cluster","workspace","namespace","more","devops"]),this.list.isLoading=!0,c.limit=c.limit||10,c.sortBy="createTime",e.next=6,request.get(this.getUrl({cluster:a,workspace:r}),c);case 6:return s=e.sent,f=(0,v.default)(s,"items",[]).map((function(e){return E({cluster:a,namespace:u,workspace:r},d.mapper(e))})),this.list.update(E(E({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(f)):f,total:s.totalItems||s.totalCount||s.total_count||f.length||0},c),{},{limit:Number(c.limit)||10,page:Number(c.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",f);case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"create",value:function(e,t){var a=e.cluster,r=(0,v.default)(t,"metadata.name"),n=this.getUrl({cluster:a,name:r});return this.submitting(request.post(n,t))}},{key:"patch",value:function(e,t){var a=e.cluster,r=(0,v.default)(t,"metadata.name"),n=this.getUrl({cluster:a,name:r});return request.patch(n,t)}},{key:"delete",value:function(e){var t=e.cluster,a=e.name,r=this.getUrl({cluster:t,name:a});return this.submitting(request.delete(r))}}]),r}(r(a(68)).default),(0,h.default)(i.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,h.default)(i.prototype,"create",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"create"),i.prototype),(0,h.default)(i.prototype,"patch",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"patch"),i.prototype),(0,h.default)(i.prototype,"delete",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"delete"),i.prototype),i);t.default=_},,,function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(800)),p=r(186),m=n(r(790)),h=n(r(841)),v=n(r(2798));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=function(e){(0,o.default)(r,e);var a=g(r);function r(e){var t;(0,l.default)(this,r),(t=a.call(this,e)).triggerChange=(0,d.default)((function(){var e=t.state,a=e.mode,r=e.config;t.props.onChange({mode:a,config:r})}),300),t.handleModeChange=function(e){t.setState({mode:e},(function(){t.triggerChange()}))},t.handleConfigChange=function(e){t.setState({config:e},(function(){t.triggerChange()}))};var n=e.data,u=n.mode,o=n.config;return t.state={mode:u,config:o},t}return(0,u.default)(r,[{key:"render",value:function(){var e=this.props,a=e.title,r=e.showSelect,n=e.selectDisabled,l=e.editorClassName,u=e.readOnly,o=this.state,i=o.mode,c=o.config;return s.default.createElement("div",{className:v.default.wrapper},s.default.createElement("div",{className:v.default.header},s.default.createElement("div",{className:v.default.title},s.default.createElement(p.Icon,{name:"coding",size:20}),s.default.createElement(m.default,{title:t(a)})),r&&s.default.createElement("div",{className:v.default.select},s.default.createElement(p.Select,{disabled:n,options:this.options,value:i,onChange:this.handleModeChange}))),s.default.createElement(h.default,{className:l,options:{readOnly:u},mode:i,value:c,onChange:this.handleConfigChange}))}},{key:"options",get:function(){return[{label:"YAML",value:"yaml"},{label:"Properties",value:"properties"},{label:"JSON",value:"json"},{label:"Text",value:"text"}]}}]),r}(s.default.Component);a.default=y,y.propTypes={data:f.default.object,showSelect:f.default.bool,onChange:f.default.func},y.defaultProps={data:{mode:"yaml",config:""},showSelect:!0,onChange:function(){}}},,,,,,,,,,,,,,,,,,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(84),r(18),r(16),r(10),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(315));r(5),r(11),r(84),r(18),r(16),r(10),r(4),r(85);var u=n(r(60)),o=n(r(0)),i=r(186),c=r(72),s=n(r(2917)),f=function(e){var a=e.name,r=e.value;return o.default.createElement("div",{className:s.default.accessMode},o.default.createElement("p",{className:"name"},"".concat(a,"(").concat(r,")")),o.default.createElement("p",{className:"desc"},t("ACCESS_MODE_".concat(r))))},d=function(e){if(e.loading)return null;var t=Object.keys(c.ACCESS_MODES).map((function(e){return{label:o.default.createElement(f,{name:e,value:c.ACCESS_MODES[e]}),value:e}}));return(0,u.default)(e.supportedAccessModes)&&(t=t.filter((function(t){return e.supportedAccessModes.includes(t.value)}))),o.default.createElement("div",{className:s.default.accessModeWrapper},o.default.createElement(i.RadioGroup,(0,l.default)({options:t},e)))};a.default=d},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(158)),p=n(r(0)),m=r(186),h=n(r(2923));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var g={className:h.default.slider,railStyle:{height:30,backgroundColor:"#7eb8dc",borderRadius:2},handleStyle:{width:14,height:30,marginTop:0,backgroundColor:"#fff",borderRadius:0,border:"none"},trackStyle:{height:30,borderRadius:2,backgroundColor:"#329dce"}},y=function(e){(0,c.default)(r,e);var a=v(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.leftContent,r=e.rightContent,n=e.defaultValue,o=(0,u.default)(e,["leftContent","rightContent","defaultValue"]),i=(0,d.default)(o.value)?n:o.value;return p.default.createElement("div",{className:h.default.wrapper},p.default.createElement(m.Slider,(0,l.default)({min:0,max:100,defaultValue:i},o,g)),p.default.createElement("span",{className:h.default.floatContent,style:{left:"".concat(Math.floor(i/2),"%"),maxWidth:"".concat(i,"%")}},t("VERSION_TRAFFIC_PERCENT",{version:a,percent:i})),p.default.createElement("span",{className:h.default.floatContent,style:{left:"".concat(Math.floor(i/2)+50,"%"),maxWidth:"".concat(100-i,"%")}},t("VERSION_TRAFFIC_PERCENT",{version:r,percent:100-i})))}}]),r}(p.default.PureComponent);a.default=y,y.defaultProps={defaultValue:50}},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(5),r(18),r(16),r(137),r(9),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(16),r(137),r(9),r(4),r(23),r(57),r(17);var u,o,i=n(r(315)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(49)),h=l(r(0)),v=r(14),g=r(239),y=n(r(26)),E=r(186),b=n(r(441)),_=n(r(2926));function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var S=(0,g.observer)((o=function(e){(0,f.default)(r,e);var a=O(r);function r(){var e;(0,c.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{},a=t.workspace,r=t.repo_id,n=t.name,l=e.baseUrl;return a&&(l+="/workspaces/".concat(a)),r?"".concat(l,"/repos/").concat(r,"/").concat(n||""):"".concat(l,"/repos")},e.getWatchListUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.workspace;return"apis/application.kubesphere.io/v1alpha1/watch/helmrepos?labelSelector=kubesphere.io/workspace=".concat(t)},(0,d.default)(e,"fetchDetail",o,(0,h.default)(e)),(0,d.default)(e,"update",i,(0,h.default)(e)),(0,d.default)(e,"delete",c,(0,h.default)(e)),e}return(0,m.default)(r,[{key:"validate",value:function(e){var t=e.workspace,a=(0,f.default)(e,["workspace"]);return request.post("".concat(this.getUrl({workspace:t}),"?validate=true"),a)}},{key:"index",value:function(e){var t=e.workspace,a=e.repo_id;if(a)return request.post(this.getUrl({workspace:t,repo_id:a,name:"action"}),{action:"index"})}},{key:"fetchEvents",value:(t=(0,s.default)(n.default.mark((function e(t){var a,r,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.workspace,r=t.repo_id,this.events.isLoading=!0,e.next=4,request.get(this.getUrl({workspace:a,repo_id:r,name:"events"}),{});case 4:l=e.sent,this.events.update({data:(0,_.default)(l,"items",[]),total:(0,_.default)(l,"total_count",0)}),this.events.isLoading=!1;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"setSelectRowKeys",value:function(e){this.list.selectedRowKeys=e}}]),r}(O.default),u=(0,E.default)(l.prototype,"events",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new S.default}}),o=(0,E.default)(l.prototype,"fetchDetail",[b.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return(0,s.default)(n.default.mark((function t(){var a,r,l,u,o=arguments;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=o.length>0&&void 0!==o[0]?o[0]:{},r=a.workspace,l=a.repo_id,e.isLoading=!0,t.next=4,request.get(e.getUrl({workspace:r,repo_id:l}));case 4:u=t.sent,e.detail=u||{},e.detail.workspace=r,e.isLoading=!1;case 8:case"end":return t.stop()}}),t)})))}}),(0,E.default)(l.prototype,"validate",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"validate"),l.prototype),(0,E.default)(l.prototype,"index",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"index"),l.prototype),(0,E.default)(l.prototype,"fetchEvents",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchEvents"),l.prototype),i=(0,E.default)(l.prototype,"update",[b.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return(0,s.default)(n.default.mark((function t(){var a,r,l,u,o=arguments;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=o.length>0&&void 0!==o[0]?o[0]:{},r=a.workspace,l=a.repo_id,u=(0,f.default)(a,["workspace","repo_id"]),t.next=3,e.submitting(request.patch(e.getUrl({workspace:r,repo_id:l}),u));case 3:case"end":return t.stop()}}),t)})))}}),c=(0,E.default)(l.prototype,"delete",[b.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.workspace,r=t.repo_id;return e.submitting(request.delete(e.getUrl({workspace:a,repo_id:r}),{}))}}}),(0,E.default)(l.prototype,"setSelectRowKeys",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"setSelectRowKeys"),l.prototype),l);t.default=D},,function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(109),r(11),r(6),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(6),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(7);var u=l(r(30)),o=l(r(43));r(41);var i=l(r(44)),c=l(r(36)),s=l(r(37)),f=l(r(55)),d=l(r(56)),p=l(r(51)),m=n(r(0)),h=l(r(1)),v=l(r(3)),g=r(186),y=l(r(240)),E=l(r(952)),b=r(327),_=r(52),O=l(r(3182));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};(0,m.default)(this,t),(0,p.default)(this,"isLoading",i,this),(0,p.default)(this,"pathParams",c,this),(0,p.default)(this,"data",s,this),(0,p.default)(this,"headers",f,this),Object.getOwnPropertyNames(r).forEach((function(e){a[e]=r[e]})),this.headers={"X-Remote-User":e.globals.user.username}}return(0,h.default)(t,[{key:"getApiPath",value:function(){return"kapis/logging.kubesphere.io/v1alpha2/logs"}},{key:"request",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((0,d.default)(n.default.mark((function e(){var t,a,r,l,o,i,c,s=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=s.length>1&&void 0!==s[1]?s[1]:"get",this.isLoading=!0,r=t.start_time,l=t.end_time,o=t.cluster,i=(0,u.default)(t,["start_time","end_time","cluster"]),e.next=6,request[a](this.getApiPath(),E(E({},i),{},{start_time:r?Math.floor(r/1e3):void 0,end_time:l?Math.floor(l/1e3):void 0,cluster:o}),{headers:this.headers});case 6:return c=e.sent,this.isLoading=!1,e.abrupt("return",c);case 9:case"end":return e.stop()}}),e,this)}))))},{key:"apiVersion",get:function(){return"kapis/logging.kubesphere.io/v1alpha2"}}]),t}(),i=(0,v.default)(o.prototype,"isLoading",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),c=(0,v.default)(o.prototype,"pathParams",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),s=(0,v.default)(o.prototype,"data",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),f=(0,v.default)(o.prototype,"headers",[g.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),(0,v.default)(o.prototype,"request",[g.action],Object.getOwnPropertyDescriptor(o.prototype,"request"),o.prototype),o);t.default=b}).call(this,a(69))},,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(87),a(48),a(139),a(24),a(17),a(62),a(64),Object.defineProperty(t,"__esModule",{value:!0}),t.mark=o,t.markAll=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o;if(!t.length)return[e];return t.reduce((function(e,t){return e.reduce((function(e,r){return e.concat(a(r,t))}),[])}),[e])},t.esMark=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hightLighted";if(!(0,l.default)(e))return e;var r=t.match(/\w+|[\u4e00-\u9fa5]/g)||[],n=r.reduce((function(e,t){var a=e.slice(-1),r=i.test(t),n=i.test(a);return"".concat(e,"[^\\w\\u4e00-\\u9fa5]{").concat(r||n?0:1,",}").concat(t)}),"");if(!n)return[e];var u=new RegExp(n,"ig");return c(e,u,a)},t.markStrAsArray=c;var n=r(a(30));a(5),a(28),a(87),a(48),a(4),a(139),a(251),a(24),a(252),a(193),a(17),a(62),a(64);var l=r(a(195)),u=/[|\\{}()[\]^$+*?.]/g;function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hightLighted";if(!(0,l.default)(e))return e;if(!t)return[e];var r=t.replace(u,"\\$&"),n=new RegExp(r,"ig");return c(e,n,a)}var i=/[\u4e00-\u9fa5]/;function c(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hightLighted",r=[e],l=0;return e.replace(t,(function(e,t){var u=r.length-1,o=r[u],i=t-l,c=o.slice(0,i),s=o.slice(i+e.length);r[u]=c,r.push((0,n.default)({},a,e),s),l+=t+e.length})),r}},function(e,t,a){"use strict";a(15);var r=a(20);a(16),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(16);var n=r(a(0)),l=a(186),u=r(a(836)),o=r(a(3566)),i=function(e){var t=e.type,a=e.name,r=e.isActive,i=void 0!==r&&r,c=e.icon,s=e.crumb,f=void 0!==s&&s?18:"openpitrixs"===t?35:40;return n.default.createElement(n.default.Fragment,null,"openpitrixs"===t?n.default.createElement("div",{className:o.default.img},n.default.createElement(u.default,{src:null,iconLetter:a,iconSize:f})):n.default.createElement(l.Icon,{name:c,size:f,type:i?"light":"dark"}))};t.default=i},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1207)).default);t.default=c},function(e,a,r){"use strict";r(15);var n=r(20);r(187),r(11),r(31),r(84),r(18),r(87),r(16),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=function(t){var a=e.itemActions.map((function(e){return l.default.createElement(u.Menu.MenuItem,{key:e.key},l.default.createElement(u.Icon,{name:e.icon})," ",l.default.createElement("span",{"data-test":"table-item-".concat(e.key)},e.text))}));return a.every((function(e){return null===e}))?null:l.default.createElement(u.Menu,{onClick:r(t)},a)},r=function(t){return function(a,r){var n=e.itemActions.find((function(e){return e.key===r}));n&&n.onClick&&n.onClick(t)}},n=e.data,v=e.tagList,g=e.checked,y=e.showCheckbox,E=e.isEdgeWize,b=e.hideColumns,_=void 0===b?[]:b,O=n.expiredDay,S=O&&O<0,C=O&&O<=10&&O>=0,D=_.reduce((function(e,t){return m[t]+e}),0);return l.default.createElement("li",{className:p.default.wrapper,"data-test":"cluster-item"},l.default.createElement(u.Columns,null,l.default.createElement(u.Column,{className:"is-4 flexbox items-center",style:{width:"".concat(h(4,D),"%")}},!!y&&l.default.createElement(u.Checkbox,{className:"margin-r8",onChange:function(t){var a=e.onChangeChecked,r=e.data;a&&a(r.name,t)},checked:n.tags.length<5&&g,disabled:n.tags.length>=5}),l.default.createElement(s.default,{className:"flex",cluster:n,onClick:function(){var t=e.data,a=e.onEnter;a&&a(t.name,t.provider)},isEdgeWize:E,isExpired:S})),!_.includes("nodeCount")&&l.default.createElement(u.Column,{className:"is-1",style:{width:"".concat(h(E?2:1,D),"%")}},l.default.createElement(i.default,{title:n.nodeCount,description:t("NODE_COUNT")})),!_.includes("version")&&l.default.createElement(u.Column,{className:"is-1",style:{width:"".concat(h(E?2:1,D),"%")}},l.default.createElement(i.default,{title:n.kubernetesVersion,description:t("KUBERNETES_VERSION")})),!_.includes(E?"hostCluster":"provider")&&l.default.createElement(u.Column,{className:"is-1",style:{width:"".concat(h(1,D),"%")}},l.default.createElement(i.default,{title:(0,f.getDomTitle)((E?n.hostCluster:n.provider)||"-"),description:E?t("HOSTED_IN"):t("PROVIDER")})),!E&&!_.includes("tags")&&l.default.createElement(u.Column,{className:"is-2",style:{width:"".concat(h(2,D),"%")}},l.default.createElement(i.default,{title:l.default.createElement(c.ClusterTagGroup,{data:n.tags.map((function(e){return(v||[]).find((function(t){return e.name===t.name}))})).filter(Boolean),empty:"-"}),description:t("TAG_PL")})),!_.includes("createTime")&&l.default.createElement(u.Column,{className:"is-2",style:{width:"".concat(h(2,D),"%")}},C?l.default.createElement(i.default,{title:l.default.createElement("span",null,t.html("LAST_KUBE_CONFIG_EXPIRED",{count:parseInt(O,10)})),description:t("EXPIRE_DATE")}):l.default.createElement(i.default,{title:(0,f.getLocalTime)(n.createTime).format("YYYY-MM-DD HH:mm:ss"),description:t("CREATION_TIME")})),l.default.createElement(u.Column,null,l.default.createElement(d.default,{item:{id:n.uid,name:n.name,url:"/clusters/".concat(n.name,"/overview"),type:"Cluster",isHost:n.isHost},user:globals.user.username})),l.default.createElement(u.Column,{className:(0,o.default)("is-1",p.default.options)},function(t){if(!e.isOperation)return null;var r=a(t);return l.default.createElement(u.Dropdown,{content:r,trigger:"click",placement:"bottomRight"},l.default.createElement(u.Button,{icon:"more",type:"flat"}))}(n))))},r(187),r(11),r(31),r(84),r(18),r(87),r(16),r(4),r(319),r(85);var l=n(r(0)),u=r(186),o=n(r(3)),i=n(r(790)),c=r(924),s=n(r(814)),f=r(52),d=n(r(3712)),p=n(r(3720)),m={nodeCount:1,version:1,provider:2,tags:2,createTime:2},h=function(e,t){return e/(11-t)*11/12*100}},function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(42),a(4),a(23),a(57),a(17);var n,l,u=r(a(65)),o=r(a(36)),i=r(a(88)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(49)),p=(r(a(66)),a(14)),m=a(52),h=r(a(1210));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var g=["pod_cpu_usage","pod_cpu_used_requests_utilisation","pod_cpu_used_limits_utilisation","pod_memory_usage_wo_cache","pod_memory_used_requests_utilisation","pod_memory_used_limits_utilisation","pod_gpu_usage","pod_gpu_memory_usage","pod_pvc_bytes_usage","pod_pvc_bytes_utilisation","pod_net_bytes_transmitted","pod_net_bytes_received"],y=["pod_cpu_usage","pod_cpu_used_requests_utilisation","pod_cpu_used_limits_utilisation","pod_memory_usage_wo_cache","pod_memory_used_requests_utilisation","pod_memory_used_limits_utilisation","pod_gpu_usage","pod_gpu_memory_usage","pod_net_bytes_transmitted","pod_net_bytes_received","pod_pvc_bytes_usage","pod_pvc_bytes_utilisation"],E=(n=function(e){(0,c.default)(a,e);var t=v(a);function a(e){var r;return(0,o.default)(this,a),r=t.call(this,e),(0,u.default)(r,"sort_metric",l,(0,i.default)(r)),r.resource="pods",r.sort_metric_options=(0,m.hideGPUByLicense)(g,r.cluster),r.metrics_filter=(0,m.hideGPUByLicense)(y,r.cluster).join("|"),r}return a}(h.default),l=(0,d.default)(n.prototype,"sort_metric",[p.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return g[0]}}),n);t.default=E},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=n(a(96)),u=r(a(0)),o=n(a(3)),i=n(a(3743)),c=function(e){var t=e.content,a=e.className,r=e.percent,n=(0,u.useRef)(),c=(0,u.useState)(!1),s=(0,l.default)(c,2),f=s[0],d=s[1],p=(0,u.useState)({x:0,y:0}),m=(0,l.default)(p,2),h=m[0],v=m[1];return u.default.createElement("div",{ref:n,className:(0,o.default)(i.default.background,a),onMouseMove:function(e){if(f){var t=n.current.getBoundingClientRect(),a=e.clientX-t.x,r=e.clientY-t.y;v({x:a+20,y:r})}},onMouseEnter:function(){return d(!0)},onMouseLeave:function(){return d(!1)}},u.default.createElement("div",{className:i.default.percent,style:{width:"".concat(r,"%")}}),f&&u.default.createElement("div",{style:{left:h.x,top:h.y},className:i.default.tooltip},t))};t.default=c},,function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var u=l(r(36)),o=l(r(37)),i=l(r(55)),c=l(r(56)),s=l(r(51)),f=n(r(0)),d=r(186),p=l(r(996)),m=r(52),h=l(r(3865));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=function(e){(0,i.default)(r,e);var a=v(r);function r(){var e;(0,u.default)(this,r);for(var n=arguments.length,l=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r="";return t&&(r+="/klusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"fetchList",value:(a=(0,s.default)(n.default.mark((function e(t){var a,r,l,o,i,c,s,f,d=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.cluster,r=t.namespace,l=t.containers,o=void 0===l?[]:l,i=t.initContainers,c=void 0===i?[]:i,this.list.isLoading=!0,o=(0,g.default)(o)?[]:o,c=(0,g.default)(c)?[]:c,s=[].concat((0,u.default)(c.map((function(e){return b(b({},e),{},{type:"init"})}))),(0,u.default)(o.map((function(e){return b(b({},e),{},{type:"work"})})))),e.next=7,Promise.all(s.map((function(e){return e.cluster=a,e.namespace=r,d.fetchVariables(e)})));case 7:f=e.sent,this.list={data:f,isLoading:!1};case 9:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchVariables",value:(t=(0,s.default)(n.default.mark((function e(t){var a,r,l,u,o,i,c,s=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.variables.isLoading=!0,a=t.cluster,r=t.namespace,l=t.env,u=[],o=[],(void 0===l?[]:l).forEach((function(e){if("valueFrom"in e){var t=e.valueFrom,n=t.secretKeyRef,l=t.configMapKeyRef;n&&(o.push({name:e.name,key:n.key}),u.push(request.get("api/v1".concat(s.getPath({cluster:a,namespace:r}),"/secrets/").concat(n.name)))),l&&(o.push({name:e.name,key:l.key}),u.push(request.get("api/v1".concat(s.getPath({cluster:a,namespace:r}),"/configmaps/").concat(l.name))))}else o.push(e),u.push(e.value||"")})),e.next=7,Promise.all(u);case 7:return i=e.sent,c=o.map((function(e,t){var a=i[t];return"Secret"===a.kind&&e.key?{name:e.name,value:(0,y.safeAtob)((0,v.default)(a.data,e.key,""))}:"ConfigMap"===a.kind&&e.key?{name:e.name,value:(0,v.default)(a.data,e.key,"")}:b({value:""},e)})),this.variables={data:c,isLoading:!1},t.variables=c,e.abrupt("return",t);case 12:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),i=(0,m.default)(o.prototype,"list",[h.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],isLoading:!0}}}),c=(0,m.default)(o.prototype,"variables",[h.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],isLoading:!0}}}),(0,m.default)(o.prototype,"fetchList",[h.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchList"),o.prototype),(0,m.default)(o.prototype,"fetchVariables",[h.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchVariables"),o.prototype),o);t.default=_},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(84),r(18),r(16),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(6),r(84),r(18),r(42),r(16),r(4),r(23),r(57),r(17),r(85);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=n(r(63)),h=r(186),v=n(r(801)),g=n(r(3880));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var E=["password","secret"],b=function(e){(0,i.default)(r,e);var a=y(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:"namespacenetworkpolicies";return(0,f.default)(this,r),e=a.call(this,t),(0,s.default)(e,"list",i,(0,p.default)(e)),e.getResourceUrl=function(t){return"/kapis/network.kubesphere.io/v1alpha1".concat(e.getPath(t),"/").concat(e.module)},e}return(0,d.default)(r,[{key:"fetchListOut",value:(t=(0,c.default)(n.default.mark((function e(){var t,a,r,l,o,i,c,s,f,d,p,m,h=this,v=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=v.length>0&&void 0!==v[0]?v[0]:{},l=r.cluster,o=r.namespace,i=r.page,c=void 0===i?this.list.page:i,s=r.name,f=(0,u.default)(r,["cluster","namespace","page","name"]),this.list.isLoading=!0,(d=f).limit?this.list.limit=d.limit:d.limit=this.list.limit,(null===(t=this.list)||void 0===t||null===(a=t.continues)||void 0===a?void 0:a[c])?d.continue=this.list.continues[c]:this.list.continues={1:""},d.page=c,e.next=8,request.get(this.getResourceUrl({cluster:l,namespace:o}),d);case 8:return p=e.sent,m=p.items.map((function(e){return _({cluster:l,namespace:o},h.mapper(e))})),this.list.continues[Number(c)+1]=p.metadata.continue,1===Number(c)&&(this.list.total=m.length+(p.metadata.remainingItemCount||0)),(0,E.extendObservable)(this.list,{data:m,page:Number(c),name:s}),this.list.isLoading=!1,e.abrupt("return",this.list);case 15:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(y.default),i=(0,g.default)(o.prototype,"list",[E.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[],page:1,limit:10,total:0,continues:{1:""},isLoading:!0}}}),(0,g.default)(o.prototype,"fetchListOut",[E.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchListOut"),o.prototype),o);t.default=S},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(62),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(43));r(41);var i,c=n(r(44)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(0)),v=n(r(63)),g=n(r(26)),y=r(239),E=r(186),b=n(r(831)),_=n(r(795)),O=r(52),S=r(791),C=r(14),D=n(r(914)),k=n(r(910)),N=n(r(805)),T=n(r(907)),R=n(r(3967));function w(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function I(e){for(var t=1;t=172800}),p.default.createElement(R.default,{type:"memory",title:t("MEMORY_USAGE_TIME",{time:u.label}),metrics:(0,v.default)(r,"namespace_memory_usage_wo_cache.data.result"),isLoading:n||l,showDay:u.value>=172800}),this.showLicenseTip&&p.default.createElement(p.default.Fragment,null,p.default.createElement(R.default,{type:"cpu",title:t("GPU_USAGE_TIME",{time:u.label}),metrics:(0,v.default)(r,"namespace_gpu_usage.data.result"),isLoading:n||l,showDay:u.value>=172800}),p.default.createElement(R.default,{type:"memory",title:t("GPU_MEMORY_USAGE_TIME",{time:u.label}),metrics:(0,v.default)(r,"namespace_gpu_memory_usage.data.result"),isLoading:n||l,showDay:u.value>=172800})))}},{key:"renderHeader",value:function(){return globals.app.hasClusterModule(this.cluster,"whizard-monitoring")?p.default.createElement("div",{className:w.default.header},p.default.createElement(k.RadioGroup,{mode:"button",value:this.state.resourceType,onChange:this.handleResouceTypeChange,size:"small"},p.default.createElement(k.RadioButton,{value:"application"},t("APPLICATION_RESOURCE_PL")),p.default.createElement(k.RadioButton,{value:"physical"},t("PHYSICAL_RESOURCE_PL"))),p.default.createElement(k.Select,{className:w.default.timeSelect,defaultValue:this.state.range,options:this.timeOptions,onChange:this.handleRangeChange})):null}},{key:"render",value:function(){var e=this.state.resourceType;return p.default.createElement(N.default,{className:w.default.wrapper,title:t("RESOURCE_STATUS")},this.renderHeader(),"application"===e?this.renderApplicationResource():this.renderPhysicalResource())}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"namespace",get:function(){return(0,v.default)(this.props.match,"params.namespace")}},{key:"cluster",get:function(){return(0,v.default)(this.props.match,"params.cluster")}},{key:"timeOptions",get:function(){return[{label:t("LAST_TIME_H",{num:1}),value:3600},{label:t("LAST_TIME_H",{num:2}),value:7200},{label:t("LAST_TIME_H",{num:5}),value:18e3},{label:t("LAST_TIME_H",{num:12}),value:43200},{label:t("LAST_TIME_D",{num:1}),value:86400},{label:t("LAST_TIME_D",{num:2}),value:172800},{label:t("LAST_TIME_D",{num:3}),value:259200},{label:t("LAST_TIME_D",{num:7}),value:604800}]}},{key:"showLicenseTip",get:function(){var e;return!(null===(e=globals.licenseInfo)||void 0===e?void 0:e.showLicenseTip)&&(0,v.default)(globals,'ksConfig["gpu.monitoring"]',!1)}}]),r}(p.default.Component))||l)||l;a.default=L},function(e,t,a){"use strict";a(15);var r=a(20);a(29),a(9),a(4),a(22),a(38),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(29),a(9),a(4),a(22),a(38),a(32);var n=r(a(43)),l=r(a(96));a(41);var u,o,i=r(a(44)),c=r(a(65)),s=r(a(36)),f=r(a(37)),d=r(a(49)),p=(r(a(66)),a(14)),m=a(52),h=(u=function(){function e(){(0,s.default)(this,e),(0,c.default)(this,"resource",o,this)}var t;return(0,f.default)(e,[{key:"getPath",value:function(e){var t=e.cluster,a=e.namespace,r="";return t&&(r+="/klusters/".concat(t)),a&&(r+="/namespaces/".concat(a)),r}},{key:"fetchResourceStatus",value:(t=(0,i.default)(n.default.mark((function e(t){var a,r,u,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.resource.isLoading=!0,e.next=3,Promise.all([(0,m.to)(request.get("kapis/resources.kubesphere.io/v1alpha2".concat(this.getPath(t),"/quotas"))),(0,m.to)(request.get("kapis/resources.kubesphere.io/v1alpha2".concat(this.getPath(t),"/abnormalworkloads")))]);case 3:a=e.sent,r=(0,l.default)(a,2),u=r[0],o=r[1],this.resource={quota:u.data,status:o.data,isLoading:!1};case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),o=(0,d.default)(u.prototype,"resource",[p.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{quota:{},status:{},isLoading:!0}}}),(0,d.default)(u.prototype,"fetchResourceStatus",[p.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchResourceStatus"),u.prototype),u);t.default=h},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(86),r(18),r(97),r(16),r(27),r(190),r(24),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(86),r(18),r(97),r(16),r(27),r(190),r(4);var u=l(r(30)),o=l(r(96)),i=n(r(0)),c=r(186),s=l(r(3)),f=l(r(1044)),d=r(52),p=l(r(4030)),m=function(e){var a=(0,i.useState)(!1),r=(0,o.default)(a,2),n=r[0],l=r[1];return i.default.createElement("div",{className:p.default.card,onClick:function(){return l(!n)}},i.default.createElement("div",{className:p.default.Head},i.default.createElement(c.Icon,{name:"database",size:40}),i.default.createElement("div",{className:p.default.item},i.default.createElement("p",{className:p.default.title},"storageclass.storage.k8s.io/requests.storage"===e.name?t("STORAGE_RELATED_RESOURCE_LIMIT"):t("STORAGE_RELATED_RESOURCE")),i.default.createElement("p",{className:p.default.desc},t("RESOURCE_TYPE"))),i.default.createElement("div",{className:p.default.item},i.default.createElement("p",{className:p.default.title},e.allStorageClass.length),i.default.createElement("p",{className:p.default.desc},t("TOTAL_STORAGE_CLASS"))),i.default.createElement("div",{className:p.default.item},i.default.createElement("p",{className:p.default.title},e.data.length),i.default.createElement("p",{className:p.default.desc},t("LIMITED_STORAGE_CLASS"))),i.default.createElement("div",{className:(0,s.default)(p.default.icon,(0,u.default)({},p.default.open,n))},e.data.length>0&&i.default.createElement(c.Icon,{name:"chevron-down",size:20}))),n&&e.data.length>0&&i.default.createElement("ul",{className:p.default.List},e.data.map((function(a){var r=-1!==e.name.indexOf("requests.storage"),n=a.name.split(".")[0],l=0;l=r?Number((0,d.memoryFormat)(a.used,"Gi"))/Number((0,d.memoryFormat)(a.total,"Gi")):Number(a.used,"Gi")/Number(a.total,"Gi"),l=Math.min(Math.max(l,0),1);var u=e.allStorageClass.some((function(e){return e.name===n&&e.default})),o=(0,d.memoryFormat)(a.used,"Gi");return o=isNaN(o)?0:o,i.default.createElement("div",{className:p.default.inline,key:n},i.default.createElement(c.Icon,{name:"database",size:40}),i.default.createElement("div",{className:p.default.item},i.default.createElement("p",{className:p.default.title},n,u&&i.default.createElement("span",{className:p.default.default},t("DEFAULT"))),i.default.createElement("p",{className:p.default.desc},t("NAME"))),i.default.createElement("div",{className:p.default.item},i.default.createElement("p",{className:p.default.title},r?"".concat(o," Gi"):a.used),i.default.createElement("p",{className:p.default.desc},t("USED"))),i.default.createElement("div",{className:p.default.item},i.default.createElement("p",{className:p.default.title},r?"".concat((0,d.memoryFormat)(a.total,"Gi")," Gi"):a.total),i.default.createElement("p",{className:p.default.desc},t("RELATED_RESOURCE_QUOTA"))),i.default.createElement("div",{className:p.default.barItem},i.default.createElement("div",{className:p.default.title},t("USAGE")),i.default.createElement(f.default,{value:Math.min(l,1),className:p.default.bar,rightText:a.total?"":t("NO_LIMIT"),text:t("USED_PERCENT",{percent:Number((100*l).toFixed(2))})})))}))))};a.default=m},function(e,a,r){"use strict";r(15);var n=r(20);r(86),r(16),r(27),r(190),r(24),r(64),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(86),r(16),r(27),r(190),r(24),r(64);var l=n(r(0)),u=n(r(158)),o=r(186),i=n(r(1044)),c=r(52),s=r(72),f=n(r(4031)),d=function(e){var a=e.name,r=e.total,n=e.used,d=-1!==a.indexOf("requests.storage"),p=0;"limits.cpu"===a||"requests.cpu"===a?r&&(p=Number((0,c.cpuFormat)(n))/Number((0,c.cpuFormat)(r)),n="".concat((0,c.cpuFormat)(n)," Core"),r="".concat((0,c.cpuFormat)(r)," Core")):"limits.memory"===a||"requests.memory"===a?r&&(p=Number((0,c.memoryFormat)(n))/Number((0,c.memoryFormat)(r)),n="".concat((0,c.memoryFormat)(n,"Gi")," Gi"),r="".concat((0,c.memoryFormat)(r,"Gi")," Gi")):r&&(p=Number(n)/Number(r)),p=Math.min(Math.max(p,0),1);var m=a.indexOf("gpu")>-1?"gpu":a,h="gpu"===m?"".concat(m,".limit"):m;return l.default.createElement("div",{className:f.default.quota},l.default.createElement(o.Icon,{name:s.ICON_TYPES[m]||"resource",size:40}),l.default.createElement("div",{className:f.default.item},l.default.createElement("div",null,t(h.replace(/[. ]/g,"_").toUpperCase())),l.default.createElement("p",null,t("RESOURCE_TYPE_SCAP"))),l.default.createElement("div",{className:f.default.item},l.default.createElement("div",null,n," ",d&&"Gi"),l.default.createElement("p",null,t("USED"))),l.default.createElement("div",{className:f.default.item},l.default.createElement("div",null,(0,u.default)(r)?t("NO_LIMIT"):d?"".concat(r," Gi"):r),l.default.createElement("p",null,t("RESOURCE_LIMIT"))),l.default.createElement("div",{className:f.default.item,style:{flex:3}},l.default.createElement("div",null,t("USAGE")),l.default.createElement(i.default,{value:Math.min(p,1),className:f.default.bar,rightText:r?"":t("NO_LIMIT"),text:t("USED_PERCENT",{percent:Number((100*p).toFixed(2))})})))};a.default=d},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(e.disabled)return n.default.createElement("a",e);return n.default.createElement(l.Link,e)};var n=r(a(0)),l=a(433)},,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(42),a(4),a(23),a(57),a(17);var n,l,u,o,i=r(a(65)),c=r(a(36)),s=r(a(37)),f=r(a(88)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=(r(a(66)),a(14)),g=a(52),y=r(a(1129));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var b=["workload_cpu_usage","workload_memory_usage_wo_cache","workload_gpu_usage","workload_gpu_memory_usage","workload_net_bytes_transmitted","workload_net_bytes_received"],_=["workload_cpu_usage","workload_memory_usage_wo_cache","workload_gpu_usage","workload_gpu_memory_usage","workload_net_bytes_transmitted","workload_net_bytes_received"],O=(n=function(e){(0,d.default)(a,e);var t=E(a);function a(e){var r;return(0,c.default)(this,a),r=t.call(this,e),(0,i.default)(r,"namespaces",l,(0,f.default)(r)),(0,i.default)(r,"sort_metric",u,(0,f.default)(r)),(0,i.default)(r,"changeNamespace",o,(0,f.default)(r)),r.sort_metric_options=(0,g.hideGPUByLicense)(e.sort_metric_options||b,r.cluster),r.metrics_filter=(0,g.hideGPUByLicense)(_,r.cluster).join("|"),r}return(0,s.default)(a,[{key:"fetchUrl",get:function(){return"".concat(this.apiVersion,"/workload_metrics")}}]),a}(y.default),l=(0,h.default)(n.prototype,"namespaces",[v.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),u=(0,h.default)(n.prototype,"sort_metric",[v.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return b[0]}}),o=(0,h.default)(n.prototype,"changeNamespace",[v.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.namespaces=t,e.fetchAll()}}}),n);t.default=O},,,,,,,,,,,,,,,,function(e,t,a){e.exports={title:"_23ICmTFZPZciTzxk6GwlL7",workloads:"_2pydmsXzGwPczsCCJ75una",trafficCard:"_1IK6lET9gevbaUDSF49pYC"}},,,,,,,,,,,,,,,,,,,,,,,function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(11),r(6),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(6),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(30)),p=n(r(26)),m=n(r(189)),h=n(r(158)),v=n(r(194)),g=n(r(0)),y=n(r(106)),E=n(r(1264)),b=r(239),_=n(r(1)),O=n(r(3)),S=r(186),C=n(r(836)),D=n(r(790)),k=n(r(1477));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t=8?8:e.length,a={};if(this.ref&&this.ref.current){var r=this.ref.current.getBoundingClientRect();window.innerHeight-r.top>31.5*t+8+r.height?a.top=r.top+r.height+8:a.top=r.top-8-31.5*t,a.left=r.left}return a}},{key:"render",value:function(){var e=this.props,t=e.children,a=e.options,r=this.state.isOpen;return s.default.createElement("div",{className:d.default.wrapper,ref:this.ref},s.default.createElement("div",{className:d.default.trigger,onClick:this.triggerOpen},t),r&&s.default.createElement(f.default,{style:this.getOptionsStyle(a),options:a,level:0,onSelect:this.handleSelect}))}}]),a}(s.Component);t.default=m,m.defaultProps={options:[],children:"",onSelect:function(){}}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(42),a(4),a(23),a(57),a(17);var l=n(a(36)),u=n(a(37)),o=n(a(55)),i=n(a(56)),c=n(a(51)),s=r(a(0)),f=n(a(2100)),d=n(a(1271));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=function(e){(0,o.default)(a,e);var t=p(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u=0;i--)if(d.OPERATORS.includes(r[i])||""===r[i]){u=i+1;break}var c=r.substring(0,u)+t+r.substring(u+o),s=u+t.length;e.setState({visible:!1,value:c,focusValue:t,position:s},(function(){if(e.triggerChange(c),"{"===r[s]&&e.handleLabelSearch(),e.editor.current){var t=e.editor.current;t.innerHTML=(0,d.highlightPromql)(c),(0,d.setCaretPosition)(t,s)}}))},e.handleDOMClick=function(t){e.wrapper&&e.wrapper.current&&!e.wrapper.current.contains(t.target)&&e.setState({visible:!1}),e.editor&&e.editor.current&&e.editor.current.contains(t.target)&&e.handleCursorChange()},e}return(0,u.default)(a,[{key:"componentDidMount",value:function(){if(this.editor.current){var e=this.state.value;this.editor.current.addEventListener("input",this.handleInput),this.editor.current.addEventListener("keydown",this.handleKeyDown),this.editor.current.addEventListener("keyup",this.handleKeyUp),this.handleValueUpdateFromProps(e)}document.addEventListener("click",this.handleDOMClick)}},{key:"componentDidUpdate",value:function(e,t){var a=this,r=this.props.value;t.value!==r&&this.setState({value:r},(function(){a.handleValueUpdateFromProps(r)}))}},{key:"componentWillUnmount",value:function(){this.editor.current&&(this.editor.current.removeEventListener("input",this.handleInput),this.editor.current.removeEventListener("keydown",this.handleKeyDown),this.editor.current.removeEventListener("keyup",this.handleKeyUp)),document.removeEventListener("click",this.handleDOMClick)}},{key:"render",value:function(){var e=this.state,t=e.visible,a=e.focusValue,r=e.tokenContext,n=this.props,l=n.metrics,u=n.labelsets;return s.default.createElement("div",{className:m.default.wrapper,ref:this.wrapper},s.default.createElement("pre",null,s.default.createElement("code",{className:m.default.input,ref:this.editor,spellCheck:"false",contentEditable:!0})),t&&a&&s.default.createElement(f.default,{className:m.default.suggestions,value:a,metrics:l,tokenContext:r,labelsets:u,onSelect:this.handleSuggestionSelect}))}},{key:"keydownHandler",get:function(){return{219:this.handleLabelSearch}}},{key:"keyupHandler",get:function(){return{37:this.handleCursorChange,39:this.handleCursorChange}}}]),a}(s.Component);t.default=v,v.defaultProps={value:""}},function(e,t,a){"use strict";a(15),a(5),a(73),a(18),a(139),a(24),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FUNCTIONS=t.OPERATORS=t.RATE_RANGES=void 0,a(5),a(73),a(18),a(139),a(251),a(24),a(252),a(17);t.RATE_RANGES=[{label:"$__interval",sortText:"$__interval"},{label:"$__rate_interval",sortText:"$__rate_interval"},{label:"1m",sortText:"00:01:00"},{label:"5m",sortText:"00:05:00"},{label:"10m",sortText:"00:10:00"},{label:"30m",sortText:"00:30:00"},{label:"1h",sortText:"01:00:00"},{label:"1d",sortText:"24:00:00"}];var r=["by","group_left","group_right","ignoring","on","offset","without"];t.OPERATORS=r;var n=[].concat([{label:"sum",insertText:"sum",documentation:"Calculate sum over dimensions"},{label:"min",insertText:"min",documentation:"Select minimum over dimensions"},{label:"max",insertText:"max",documentation:"Select maximum over dimensions"},{label:"avg",insertText:"avg",documentation:"Calculate the average over dimensions"},{label:"stddev",insertText:"stddev",documentation:"Calculate population standard deviation over dimensions"},{label:"stdvar",insertText:"stdvar",documentation:"Calculate population standard variance over dimensions"},{label:"count",insertText:"count",documentation:"Count number of elements in the vector"},{label:"count_values",insertText:"count_values",documentation:"Count number of elements with the same value"},{label:"bottomk",insertText:"bottomk",documentation:"Smallest k elements by sample value"},{label:"topk",insertText:"topk",documentation:"Largest k elements by sample value"},{label:"quantile",insertText:"quantile",documentation:"Calculate φ-quantile (0 ≤ φ ≤ 1) over dimensions"}],[{insertText:"abs",label:"abs",detail:"abs(v instant-vector)",documentation:"Returns the input vector with all sample values converted to their absolute value."},{insertText:"absent",label:"absent",detail:"absent(v instant-vector)",documentation:"Returns an empty vector if the vector passed to it has any elements and a 1-element vector with the value 1 if the vector passed to it has no elements. This is useful for alerting on when no time series exist for a given metric name and label combination."},{insertText:"ceil",label:"ceil",detail:"ceil(v instant-vector)",documentation:"Rounds the sample values of all elements in `v` up to the nearest integer."},{insertText:"changes",label:"changes",detail:"changes(v range-vector)",documentation:"For each input time series, `changes(v range-vector)` returns the number of times its value has changed within the provided time range as an instant vector."},{insertText:"clamp_max",label:"clamp_max",detail:"clamp_max(v instant-vector, max scalar)",documentation:"Clamps the sample values of all elements in `v` to have an upper limit of `max`."},{insertText:"clamp_min",label:"clamp_min",detail:"clamp_min(v instant-vector, min scalar)",documentation:"Clamps the sample values of all elements in `v` to have a lower limit of `min`."},{insertText:"count_scalar",label:"count_scalar",detail:"count_scalar(v instant-vector)",documentation:"Returns the number of elements in a time series vector as a scalar. This is in contrast to the `count()` aggregation operator, which always returns a vector (an empty one if the input vector is empty) and allows grouping by labels via a `by` clause."},{insertText:"day_of_month",label:"day_of_month",detail:"day_of_month(v=vector(time()) instant-vector)",documentation:"Returns the day of the month for each of the given times in UTC. Returned values are from 1 to 31."},{insertText:"day_of_week",label:"day_of_week",detail:"day_of_week(v=vector(time()) instant-vector)",documentation:"Returns the day of the week for each of the given times in UTC. Returned values are from 0 to 6, where 0 means Sunday etc."},{insertText:"days_in_month",label:"days_in_month",detail:"days_in_month(v=vector(time()) instant-vector)",documentation:"Returns number of days in the month for each of the given times in UTC. Returned values are from 28 to 31."},{insertText:"delta",label:"delta",detail:"delta(v range-vector)",documentation:"Calculates the difference between the first and last value of each time series element in a range vector `v`, returning an instant vector with the given deltas and equivalent labels. The delta is extrapolated to cover the full time range as specified in the range vector selector, so that it is possible to get a non-integer result even if the sample values are all integers."},{insertText:"deriv",label:"deriv",detail:"deriv(v range-vector)",documentation:"Calculates the per-second derivative of the time series in a range vector `v`, using simple linear regression."},{insertText:"drop_common_labels",label:"drop_common_labels",detail:"drop_common_labels(instant-vector)",documentation:"Drops all labels that have the same name and value across all series in the input vector."},{insertText:"exp",label:"exp",detail:"exp(v instant-vector)",documentation:"Calculates the exponential function for all elements in `v`.\nSpecial cases are:\n* `Exp(+Inf) = +Inf` \n* `Exp(NaN) = NaN`"},{insertText:"floor",label:"floor",detail:"floor(v instant-vector)",documentation:"Rounds the sample values of all elements in `v` down to the nearest integer."},{insertText:"histogram_quantile",label:"histogram_quantile",detail:"histogram_quantile(φ float, b instant-vector)",documentation:"Calculates the φ-quantile (0 ≤ φ ≤ 1) from the buckets `b` of a histogram. The samples in `b` are the counts of observations in each bucket. Each sample must have a label `le` where the label value denotes the inclusive upper bound of the bucket. (Samples without such a label are silently ignored.) The histogram metric type automatically provides time series with the `_bucket` suffix and the appropriate labels."},{insertText:"holt_winters",label:"holt_winters",detail:"holt_winters(v range-vector, sf scalar, tf scalar)",documentation:"Produces a smoothed value for time series based on the range in `v`. The lower the smoothing factor `sf`, the more importance is given to old data. The higher the trend factor `tf`, the more trends in the data is considered. Both `sf` and `tf` must be between 0 and 1."},{insertText:"hour",label:"hour",detail:"hour(v=vector(time()) instant-vector)",documentation:"Returns the hour of the day for each of the given times in UTC. Returned values are from 0 to 23."},{insertText:"idelta",label:"idelta",detail:"idelta(v range-vector)",documentation:"Calculates the difference between the last two samples in the range vector `v`, returning an instant vector with the given deltas and equivalent labels."},{insertText:"increase",label:"increase",detail:"increase(v range-vector)",documentation:"Calculates the increase in the time series in the range vector. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for. The increase is extrapolated to cover the full time range as specified in the range vector selector, so that it is possible to get a non-integer result even if a counter increases only by integer increments."},{insertText:"irate",label:"irate",detail:"irate(v range-vector)",documentation:"Calculates the per-second instant rate of increase of the time series in the range vector. This is based on the last two data points. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for."},{insertText:"label_replace",label:"label_replace",detail:"label_replace(v instant-vector, dst_label string, replacement string, src_label string, regex string)",documentation:"For each timeseries in `v`, `label_replace(v instant-vector, dst_label string, replacement string, src_label string, regex string)` matches the regular expression `regex` against the label `src_label`. If it matches, then the timeseries is returned with the label `dst_label` replaced by the expansion of `replacement`. `$1` is replaced with the first matching subgroup, `$2` with the second etc. If the regular expression doesn't match then the timeseries is returned unchanged."},{insertText:"ln",label:"ln",detail:"ln(v instant-vector)",documentation:"calculates the natural logarithm for all elements in `v`.\nSpecial cases are:\n * `ln(+Inf) = +Inf`\n * `ln(0) = -Inf`\n * `ln(x < 0) = NaN`\n * `ln(NaN) = NaN`"},{insertText:"log2",label:"log2",detail:"log2(v instant-vector)",documentation:"Calculates the binary logarithm for all elements in `v`. The special cases are equivalent to those in `ln`."},{insertText:"log10",label:"log10",detail:"log10(v instant-vector)",documentation:"Calculates the decimal logarithm for all elements in `v`. The special cases are equivalent to those in `ln`."},{insertText:"minute",label:"minute",detail:"minute(v=vector(time()) instant-vector)",documentation:"Returns the minute of the hour for each of the given times in UTC. Returned values are from 0 to 59."},{insertText:"month",label:"month",detail:"month(v=vector(time()) instant-vector)",documentation:"Returns the month of the year for each of the given times in UTC. Returned values are from 1 to 12, where 1 means January etc."},{insertText:"predict_linear",label:"predict_linear",detail:"predict_linear(v range-vector, t scalar)",documentation:"Predicts the value of time series `t` seconds from now, based on the range vector `v`, using simple linear regression."},{insertText:"rate",label:"rate",detail:"rate(v range-vector)",documentation:"Calculates the per-second average rate of increase of the time series in the range vector. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for. Also, the calculation extrapolates to the ends of the time range, allowing for missed scrapes or imperfect alignment of scrape cycles with the range's time period."},{insertText:"resets",label:"resets",detail:"resets(v range-vector)",documentation:"For each input time series, `resets(v range-vector)` returns the number of counter resets within the provided time range as an instant vector. Any decrease in the value between two consecutive samples is interpreted as a counter reset."},{insertText:"round",label:"round",detail:"round(v instant-vector, to_nearest=1 scalar)",documentation:"Rounds the sample values of all elements in `v` to the nearest integer. Ties are resolved by rounding up. The optional `to_nearest` argument allows specifying the nearest multiple to which the sample values should be rounded. This multiple may also be a fraction."},{insertText:"scalar",label:"scalar",detail:"scalar(v instant-vector)",documentation:"Given a single-element input vector, `scalar(v instant-vector)` returns the sample value of that single element as a scalar. If the input vector does not have exactly one element, `scalar` will return `NaN`."},{insertText:"sort",label:"sort",detail:"sort(v instant-vector)",documentation:"Returns vector elements sorted by their sample values, in ascending order."},{insertText:"sort_desc",label:"sort_desc",detail:"sort_desc(v instant-vector)",documentation:"Returns vector elements sorted by their sample values, in descending order."},{insertText:"sqrt",label:"sqrt",detail:"sqrt(v instant-vector)",documentation:"Calculates the square root of all elements in `v`."},{insertText:"time",label:"time",detail:"time()",documentation:"Returns the number of seconds since January 1, 1970 UTC. Note that this does not actually return the current time, but the time at which the expression is to be evaluated."},{insertText:"vector",label:"vector",detail:"vector(s scalar)",documentation:"Returns the scalar `s` as a vector with no labels."},{insertText:"year",label:"year",detail:"year(v=vector(time()) instant-vector)",documentation:"Returns the year for each of the given times in UTC."},{insertText:"avg_over_time",label:"avg_over_time",detail:"avg_over_time(range-vector)",documentation:"The average value of all points in the specified interval."},{insertText:"min_over_time",label:"min_over_time",detail:"min_over_time(range-vector)",documentation:"The minimum value of all points in the specified interval."},{insertText:"max_over_time",label:"max_over_time",detail:"max_over_time(range-vector)",documentation:"The maximum value of all points in the specified interval."},{insertText:"sum_over_time",label:"sum_over_time",detail:"sum_over_time(range-vector)",documentation:"The sum of all values in the specified interval."},{insertText:"count_over_time",label:"count_over_time",detail:"count_over_time(range-vector)",documentation:"The count of all values in the specified interval."},{insertText:"quantile_over_time",label:"quantile_over_time",detail:"quantile_over_time(scalar, range-vector)",documentation:"The φ-quantile (0 ≤ φ ≤ 1) of the values in the specified interval."},{insertText:"stddev_over_time",label:"stddev_over_time",detail:"stddev_over_time(range-vector)",documentation:"The population standard deviation of the values in the specified interval."},{insertText:"stdvar_over_time",label:"stdvar_over_time",detail:"stdvar_over_time(range-vector)",documentation:"The population standard variance of the values in the specified interval."}]);t.FUNCTIONS=n;var l={comment:{pattern:/#.*/},"context-aggregation":{pattern:/((by|without)\s*)\([^)]*\)/,lookbehind:!0,inside:{"label-key":{pattern:/[^(),\s][^,)]*[^),\s]*/,alias:"attr-name"},punctuation:/[()]/}},"context-labels":{pattern:/\{[^}]*(?=})/,greedy:!0,inside:{comment:{pattern:/#.*/},"label-key":{pattern:/[a-z_]\w*(?=\s*(=|!=|=~|!~))/,alias:"attr-name",greedy:!0},"label-value":{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0,alias:"attr-value"},punctuation:/[{]/}},function:new RegExp("\\b(?:".concat(n.map((function(e){return e.label})).join("|"),")(?=\\s*\\()"),"i"),"context-range":[{pattern:/\[[^\]]*(?=])/,inside:{"range-duration":{pattern:/\b\d+[smhdwy]\b/i,alias:"number"}}},{pattern:/(offset\s+)\w+/,lookbehind:!0,inside:{"range-duration":{pattern:/\b\d+[smhdwy]\b/i,alias:"number"}}}],number:/\b-?\d+((\.\d*)?([eE][+-]?\d+)?)?\b/,operator:new RegExp("/[-+*/=%^~]|&&?|\\|?\\||!=?|<(?:=>?|<|>)?|>[>=]?|\\b(?:".concat(r.join("|"),")\\b"),"i"),punctuation:/[{};()`,.]/};t.default=l},function(e,t,a){e.exports={wrapper:"_14f5Z8AW-sO-D5eOUy8VOK",group:"_3IFETh-yDAtvA1RpJm_nuS",groupTitle:"_1EI8CS41YrdnEKUGY2JhS4",item:"_1L9wOQP2fgWpJRSXX_gfSy"}},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(86),a(73),a(18),a(9),a(13),a(10),a(4),a(24),a(17),a(64),a(136),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.getTokenContext=t.highlightPromql=t.OPERATORS=t.PUNCTUATION_MAP=t.setCaretPosition=t.getCaretCharacterOffsetWithin=void 0;var n=r(a(30));a(12),a(45),a(11),a(6),a(86),a(73),a(18),a(28),a(245),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(24),a(17),a(64),a(7);var l=r(a(26)),u=r(a(2104)),o=r(a(1489));function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}a(2105),u.default.languages.promql=o.default;t.getCaretCharacterOffsetWithin=function(e){var t=0,a=e.ownerDocument||e.document,r=a.defaultView||a.parentWindow;if(void 0!==r.getSelection){if(r.getSelection().rangeCount>0){var n=r.getSelection().getRangeAt(0),l=n.cloneRange();l.selectNodeContents(e),l.setEnd(n.endContainer,n.endOffset),t=l.toString().length}}else if("Control"!==a.selection.type){var u=a.selection.createRange(),o=a.body.createTextRange();o.moveToElementText(e),o.setEndPoint("EndToEnd",u),t=o.text.length}return t};t.setCaretPosition=function(e,t){var a=document.createRange(),r=window.getSelection(),n=[];!function e(t,a){t&&3===t.nodeType&&a.push(t);for(var r=t.childNodes,n=0;n0;)u-=(0,l.default)(n,"[".concat(o,"].length"),0),o++;var i=n[o-1];null!=i&&(a.setStart(i,u+i.length),a.collapse(!0),r.removeAllRanges(),r.addRange(a))};t.PUNCTUATION_MAP={"(":")","[":"]","{":"}",'"':'"',"'":"'"};t.OPERATORS=["(","[","{",'"',"'",'""',"''","=",","];t.highlightPromql=function(e){return u.default.highlight(e,u.default.languages.promql,"promql")};t.getTokenContext=function(e,t){for(var a=[],r=t;r.parentNode&&e!==r.parentNode;)a.push(r.parentNode),r=r.parentNode;var u=a.reverse().map((function(e){return e.className&&e.className.split(" ")[1]||""})).join("."),o={},c=t.parentNode.className;return c.indexOf("label-key")>-1?o.label="":c.indexOf("label-value")>-1?(o.label=(0,l.default)(t,"parentNode.previousSibling.previousSibling.textContent",""),o.value=""):c.indexOf("context-labels")>-1&&(t.previousSibling?t.previousSibling.className.indexOf("label-key")>-1?(o.label=t.previousSibling.textContent.replace(/{,/g,""),o.value=""):t.previousSibling.className.indexOf("label-value")>-1&&(o.label=t.textContent.replace(/{,/g,"")):o.label=""),function(e){for(var t=1;t8||a.length>8)&&!r?s.createElement(p.Tooltip,{placement:"top",appendToBody:!0,content:this.renderClusterItem(!0)},this.renderClusterItem()):this.renderClusterItem())}}]),a}(s.Component);t.default=g,g.propTypes={label:d.default.string,value:d.default.string,onDelete:d.default.func,name:d.default.string.isRequired}},,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return c}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.898 2l6.666 11.547H2.231L8.898 2zm.666 10a.667.667 0 11-1.333 0 .667.667 0 011.333 0zm0-6H8.231l.133 4.667h1.067L9.564 6z",fill:"#F5A623"}),i=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.564 6H8.231l.133 4.667h1.067L9.564 6zm-.666 6.667a.667.667 0 100-1.333.667.667 0 000 1.333z",fill:"#fff"}),c=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 17 16",fill:"none",width:"1em",height:"1em"},e),o,i)};t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNyAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04Ljg5NzYyIDJMMTUuNTY0MyAxMy41NDY3SDIuMjMwOTZMOC44OTc2MiAyWk05LjU2NDI5IDEyLjAwMDdDOS41NjQyOSAxMi4zNjg5IDkuMjY1ODEgMTIuNjY3NCA4Ljg5NzYyIDEyLjY2NzRDOC41Mjk0MyAxMi42Njc0IDguMjMwOTYgMTIuMzY4OSA4LjIzMDk2IDEyLjAwMDdDOC4yMzA5NiAxMS42MzI1IDguNTI5NDMgMTEuMzM0IDguODk3NjIgMTEuMzM0QzkuMjY1ODEgMTEuMzM0IDkuNTY0MjkgMTEuNjMyNSA5LjU2NDI5IDEyLjAwMDdaTTkuNTY0MjkgNkg4LjIzMDk2TDguMzY0MjkgMTAuNjY2N0g5LjQzMDk2TDkuNTY0MjkgNloiIGZpbGw9IiNGNUE2MjMiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05LjU2NDI5IDZIOC4yMzA5Nkw4LjM2NDI5IDEwLjY2NjdIOS40MzA5Nkw5LjU2NDI5IDZaTTguODk3NjIgMTIuNjY3NEM5LjI2NTgxIDEyLjY2NzQgOS41NjQyOSAxMi4zNjg5IDkuNTY0MjkgMTIuMDAwN0M5LjU2NDI5IDExLjYzMjUgOS4yNjU4MSAxMS4zMzQgOC44OTc2MiAxMS4zMzRDOC41Mjk0MyAxMS4zMzQgOC4yMzA5NiAxMS42MzI1IDguMjMwOTYgMTIuMDAwN0M4LjIzMDk2IDEyLjM2ODkgOC41Mjk0MyAxMi42Njc0IDguODk3NjIgMTIuNjY3NFoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo="},,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(18),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(18),a(42),a(16),a(4),a(23),a(57),a(17);var n=r(a(315)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=r(a(1));a(1278);var d=r(a(998)),p=r(a(1036)),m=r(a(1089));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(a,e);var t=h(a);function a(){return(0,l.default)(this,a),t.apply(this,arguments)}return(0,u.default)(a,[{key:"render",value:function(){var e=this.props,t=e.width,a=e.height,r=e.data,l=e.dataKey,u=e.innerRadius,o=void 0===u?"60%":u,i=e.outerRadius,c=void 0===i?"100%":i;return s.default.createElement(m.default,{width:t,height:a},s.default.createElement(p.default,{data:r,dataKey:l,innerRadius:o,outerRadius:c,animationDuration:1e3},r.map((function(e){return s.default.createElement(d.default,(0,n.default)({key:"cell-".concat(e.name)},e.itemStyle,{strokeWidth:0}))}))))}}]),a}(s.default.Component);t.default=v,v.propTypes={width:f.default.oneOfType([f.default.string,f.default.number]),height:f.default.oneOfType([f.default.string,f.default.number])},v.defaultProps={width:100,height:100,dataKey:"value"}},function(e,t,a){e.exports={title:"_3R9eLWdkRd9o_flAlWvHLx",default:"_2G2DnMhtpeqDEv91UyFh3A",cur:"_1c1g45SkasImY0_alODa4h",custom:"_1zLUgkVtJ5Jr-NdoWiK6aj",selectBox:"_3DT0sgCFRXpA-LxQ7eKvqn",bottom10:"QH6NAxOiq9B6Q6ihrskOG",actions:"_3zCFT6vGh-Uu2uYIZEtuUx"}},,,,,,,,function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.eckYaml=void 0;t.eckYaml={resources:{apiVersion:"elasticsearch.k8s.elastic.co/v1",kind:"Elasticsearch",metadata:{name:"quickstart"},spec:{version:"7.17.5",nodeSets:[{name:"master",count:3,config:{"node.roles":["master"]},podTemplate:{spec:{initContainers:[{name:"sysctl",securityContext:{privileged:!0,runAsUser:0},command:["sh","-c","sysctl -w vm.max_map_count=262144"]}],containers:[{name:"elasticsearch",resources:{limits:{memory:"8Gi",cpu:2},requests:{memory:"8Gi",cpu:2}},env:[{name:"ES_JAVA_OPTS",value:"-Xms4g -Xmx4g"}]}]}},volumeClaimTemplates:[{metadata:{name:"elasticsearch-data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"20Gi"}},storageClassName:"csi-high-capacity"}}]},{name:"hot",count:2,config:{"node.roles":["data_hot","data_content"]},podTemplate:{spec:{initContainers:[{name:"sysctl",securityContext:{privileged:!0,runAsUser:0},command:["sh","-c","sysctl -w vm.max_map_count=262144"]}],containers:[{name:"elasticsearch",resources:{limits:{memory:"8Gi",cpu:2},requests:{memory:"8Gi",cpu:2}},env:[{name:"ES_JAVA_OPTS",value:"-Xms4g -Xmx4g"}]}]}},volumeClaimTemplates:[{metadata:{name:"elasticsearch-data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"40Gi"}},storageClassName:"csi-high-capacity"}}]},{name:"warm",count:0,config:{"node.roles":["data_warm"]},podTemplate:{spec:{initContainers:[{name:"sysctl",securityContext:{privileged:!0,runAsUser:0},command:["sh","-c","sysctl -w vm.max_map_count=262144"]}],containers:[{name:"elasticsearch",resources:{limits:{memory:"8Gi",cpu:2},requests:{memory:"8Gi",cpu:2}},env:[{name:"ES_JAVA_OPTS",value:"-Xms4g -Xmx4g"}]}]}},volumeClaimTemplates:[{metadata:{name:"elasticsearch-data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"40Gi"}},storageClassName:"csi-high-capacity"}}]},{name:"cold",count:0,config:{"node.roles":["data_cold"]},podTemplate:{spec:{initContainers:[{name:"sysctl",securityContext:{privileged:!0,runAsUser:0},command:["sh","-c","sysctl -w vm.max_map_count=262144"]}],containers:[{name:"elasticsearch",resources:{limits:{memory:"8Gi",cpu:2},requests:{memory:"8Gi",cpu:2}},env:[{name:"ES_JAVA_OPTS",value:"-Xms4g -Xmx4g"}]}]}},volumeClaimTemplates:[{metadata:{name:"elasticsearch-data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"40Gi"}},storageClassName:"csi-high-capacity"}}]}]}},kibana:{apiVersion:"kibana.k8s.elastic.co/v1",kind:"Kibana",metadata:{name:"quickstart"},spec:{version:"7.17.5",count:1,elasticsearchRef:{name:"quickstart",namespace:"default"},podTemplate:{spec:{containers:[{name:"kibana",resources:{requests:{cpu:"1000m",memory:"2Gi"},limits:{cpu:"2000m",memory:"4Gi"}}}]}}}}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.opensearchYaml=void 0;t.opensearchYaml={resources:{apiVersion:"opensearch.opster.io/v1",kind:"OpenSearchCluster",metadata:{name:"cluster"},spec:{general:{version:"2.3.0",httpPort:9200,vendor:"opensearch",serviceName:"cluster"},dashboards:{version:"2.3.0",enable:!0,replicas:1,resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}}},confMgmt:{smartScaler:!0},security:{config:{securityConfigSecret:{name:"securityconfig-secret"},adminCredentialsSecret:{name:"admin-credentials-secret"}},tls:{transport:{generate:!0},http:{generate:!0}},keyStoreConfig:[]},nodePools:[{component:"masters",replicas:2,diskSize:"50Gi",persistence:{pvc:{storageClass:"csi-qingcloud",accessModes:["ReadWriteOnce"]}},additionalConfig:{"node.attr.datatier":"master"},resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}},roles:["cluster_manager"]},{component:"data-node-hot",replicas:2,diskSize:"30Gi",persistence:{pvc:{storageClass:"csi-qingcloud",accessModes:["ReadWriteOnce"]}},additionalConfig:{"node.attr.datatier":"hot"},resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}},roles:["data"]},{component:"data-node-warm",replicas:2,diskSize:"30Gi",persistence:{pvc:{storageClass:"csi-qingcloud",accessModes:["ReadWriteOnce"]}},additionalConfig:{"node.attr.datatier":"warm"},resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}},roles:["data"]}]}},node:{component:"data-node-hot",replicas:2,diskSize:"30Gi",persistence:{pvc:{storageClass:"csi-qingcloud",accessModes:["ReadWriteOnce"]}},additionalConfig:{"node.attr.datatier":"hot"},resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}},roles:["data"]},logstash:{apiVersion:"opensearch.opster.io/v1",kind:"Logstash",metadata:{name:"logstash-sample"},spec:{replicas:1,config:{jvm:"-Xms512m -Xmx512m",openSearchInfo:{openSearchCluster:{name:"my-cluster",namespace:"default"},openSearchService:{name:"my-cluster"}},logstashConfig:[],ports:[8080],pipelineConfig:{inputs:'http {\n host => "0.0.0.0"\n port => 8080\n}',filters:'mutate {\n add_field => { "LogstashHost" => "${HOSTNAME}" }\n}',outputs:null,openSearchIndex:'index => "logstash-%{+YYYY.MM.dd}"'}},podTemplate:{spec:{containers:[{name:"logstash",resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}}},{name:"exporter",resources:{requests:{memory:"400Mi",cpu:"200m"},limits:{memory:"400Mi",cpu:"200m"}}}]}}}},logstashSecret:{apiVersion:"v1",kind:"Secret",metadata:{name:"logstash-credential"},type:"Opaque",data:{username:"bG9nc3Rhc2g=",password:"bG9nc3Rhc2g="}},adminSecret:{apiVersion:"v1",kind:"Secret",metadata:{name:"admin-credentials-secret"},type:"Opaque",data:{username:"UmFkb25EQkAxMjM=",password:"UmFkb25EQkAxMjM="}},securityConfigSecret:{apiVersion:"v1",kind:"Secret",metadata:{name:"securityconfig-secret"},type:"Opaque",stringData:{"action_groups.yml":'_meta:\n type: "actiongroups"\n config_version: 2',"internal_users.yml":'_meta:\n type: "internalusers"\n config_version: 2\nroot:\n hash: "$2y$12$JwL3peIal4VShAgkyZlMG.t1zwcCnPSAJ2E6GHCDoGhZJLkRX11b2"\n reserved: true\n hidden: true\n backend_roles:\n - "admin"\n description: "Internal root user for cluster"\nadmin:\n hash: "$2a$10$ihutvIcl7kp9PF2RFMZeXuZb2RdUpBFR5t4W0KV5LFZylPheworfW"\n reserved: false\n backend_roles:\n - "admin"\n description: "custom admin user"\ndashboarduser:\n hash: "$2y$12$o8Uxs2c6T8wzTfOpf1Pxvulqxs6BigWaJhSldWUtRdbDa555GM7F6"\n reserved: false\n description: "OpenSearch internal dashboards user"\nlogstash:\n hash: "$2y$12$sjAmhIfYAJsPJXNm2WI29e/rLX5V.OxV1l8L1An7wO2pz6WX5NIpy"\n reserved: false\n description: "OpenSearch internal logstash user"\nprometheus:\n hash: "$2y$12$wml4GdNlHOos1FgNWk1zSu9sWV2JE0.CkWsLP0YHFPxojW/v2EGeq"\n reserved: true\n hidden: true\n backend_roles:\n - "admin"\n description: "OpenSearch internal prometheus user"',"nodes_dn.yml":'_meta:\n type: "nodesdn"\n config_version: 2',"whitelist.yml":'_meta:\n type: "whitelist"\n config_version: 2',"tenants.yml":'_meta:\n type: "tenants"\n config_version: 2',"roles_mapping.yml":'_meta:\n type: "rolesmapping"\n config_version: 2\nall_access:\n reserved: false\n backend_roles:\n - "admin"\n description: "Maps admin to all_access"\nown_index:\n reserved: false\n users:\n - "*"\n description: "Allow full access to an index named like the username"\nreadall:\n reserved: false\n backend_roles:\n - "readall"\nmanage_snapshots:\n reserved: false\n backend_roles:\n - "snapshotrestore"\ndashboard_server:\n reserved: true\n users:\n - "dashboarduser"',"roles.yml":"_meta:\n type: \"roles\"\n config_version: 2\ndashboard_read_only:\n reserved: true\nsecurity_rest_api_access:\n reserved: true\n# Allows users to view monitors, destinations and alerts\nalerting_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/alerting/alerts/get'\n - 'cluster:admin/opendistro/alerting/destination/get'\n - 'cluster:admin/opendistro/alerting/monitor/get'\n - 'cluster:admin/opendistro/alerting/monitor/search'\n# Allows users to view and acknowledge alerts\nalerting_ack_alerts:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/alerting/alerts/*'\n# Allows users to use all alerting functionality\nalerting_full_access:\n reserved: true\n cluster_permissions:\n - 'cluster_monitor'\n - 'cluster:admin/opendistro/alerting/*'\n index_permissions:\n - index_patterns:\n - '*'\n allowed_actions:\n - 'indices_monitor'\n - 'indices:admin/aliases/get'\n - 'indices:admin/mappings/get'\n# Allow users to read Anomaly Detection detectors and results\nanomaly_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/ad/detector/info'\n - 'cluster:admin/opendistro/ad/detector/search'\n - 'cluster:admin/opendistro/ad/detectors/get'\n - 'cluster:admin/opendistro/ad/result/search'\n - 'cluster:admin/opendistro/ad/tasks/search'\n - 'cluster:admin/opendistro/ad/detector/validate'\n - 'cluster:admin/opendistro/ad/result/topAnomalies'\n# Allows users to use all Anomaly Detection functionality\nanomaly_full_access:\n reserved: true\n cluster_permissions:\n - 'cluster_monitor'\n - 'cluster:admin/opendistro/ad/*'\n index_permissions:\n - index_patterns:\n - '*'\n allowed_actions:\n - 'indices_monitor'\n - 'indices:admin/aliases/get'\n - 'indices:admin/mappings/get'\n# Allows users to read Notebooks\nnotebooks_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/notebooks/list'\n - 'cluster:admin/opendistro/notebooks/get'\n# Allows users to all Notebooks functionality\nnotebooks_full_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/notebooks/create'\n - 'cluster:admin/opendistro/notebooks/update'\n - 'cluster:admin/opendistro/notebooks/delete'\n - 'cluster:admin/opendistro/notebooks/get'\n - 'cluster:admin/opendistro/notebooks/list'\n# Allows users to read observability objects\nobservability_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opensearch/observability/get'\n# Allows users to all Observability functionality\nobservability_full_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opensearch/observability/create'\n - 'cluster:admin/opensearch/observability/update'\n - 'cluster:admin/opensearch/observability/delete'\n - 'cluster:admin/opensearch/observability/get'\n# Allows users to read and download Reports\nreports_instances_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/reports/instance/list'\n - 'cluster:admin/opendistro/reports/instance/get'\n - 'cluster:admin/opendistro/reports/menu/download'\n# Allows users to read and download Reports and Report-definitions\nreports_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/reports/definition/get'\n - 'cluster:admin/opendistro/reports/definition/list'\n - 'cluster:admin/opendistro/reports/instance/list'\n - 'cluster:admin/opendistro/reports/instance/get'\n - 'cluster:admin/opendistro/reports/menu/download'\n# Allows users to all Reports functionality\nreports_full_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/reports/definition/create'\n - 'cluster:admin/opendistro/reports/definition/update'\n - 'cluster:admin/opendistro/reports/definition/on_demand'\n - 'cluster:admin/opendistro/reports/definition/delete'\n - 'cluster:admin/opendistro/reports/definition/get'\n - 'cluster:admin/opendistro/reports/definition/list'\n - 'cluster:admin/opendistro/reports/instance/list'\n - 'cluster:admin/opendistro/reports/instance/get'\n - 'cluster:admin/opendistro/reports/menu/download'\n# Allows users to use all asynchronous-search functionality\nasynchronous_search_full_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/asynchronous_search/*'\n index_permissions:\n - index_patterns:\n - '*'\n allowed_actions:\n - 'indices:data/read/search*'\n# Allows users to read stored asynchronous-search results\nasynchronous_search_read_access:\n reserved: true\n cluster_permissions:\n - 'cluster:admin/opendistro/asynchronous_search/get'\n# Allows user to use all index_management actions - ism policies, rollups, transforms\nindex_management_full_access:\n reserved: true\n cluster_permissions:\n - \"cluster:admin/opendistro/ism/*\"\n - \"cluster:admin/opendistro/rollup/*\"\n - \"cluster:admin/opendistro/transform/*\"\n index_permissions:\n - index_patterns:\n - '*'\n allowed_actions:\n - 'indices:admin/opensearch/ism/*'\n# Allows users to use all cross cluster replication functionality at leader cluster\ncross_cluster_replication_leader_full_access:\n reserved: true\n index_permissions:\n - index_patterns:\n - '*'\n allowed_actions:\n - \"indices:admin/plugins/replication/index/setup/validate\"\n - \"indices:data/read/plugins/replication/changes\"\n - \"indices:data/read/plugins/replication/file_chunk\"\n# Allows users to use all cross cluster replication functionality at follower cluster\ncross_cluster_replication_follower_full_access:\n reserved: true\n cluster_permissions:\n - \"cluster:admin/plugins/replication/autofollow/update\"\n index_permissions:\n - index_patterns:\n - '*'\n allowed_actions:\n - \"indices:admin/plugins/replication/index/setup/validate\"\n - \"indices:data/write/plugins/replication/changes\"\n - \"indices:admin/plugins/replication/index/start\"\n - \"indices:admin/plugins/replication/index/pause\"\n - \"indices:admin/plugins/replication/index/resume\"\n - \"indices:admin/plugins/replication/index/stop\"\n - \"indices:admin/plugins/replication/index/update\"\n - \"indices:admin/plugins/replication/index/status_check\"","config.yml":'_meta:\n type: "config"\n config_version: "2"\nconfig:\n dynamic:\n http:\n anonymous_auth_enabled: false\n authc:\n basic_internal_auth_domain:\n http_enabled: true\n transport_enabled: true\n order: "4"\n http_authenticator:\n type: basic\n challenge: true\n authentication_backend:\n type: intern'}}}},function(e,t,a){e.exports={modal:"_1wTsZBkkGMAzL2u8JX3Dlu",body:"_3HlZ33d_2YBiDbpExsvcbT",close:"_1QA0P_s0N5ObNWIz-PIN5W"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(31),r(6),r(18),r(97),r(16),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(31),r(6),r(18),r(97),r(42),r(16),r(10),r(4),r(23),r(57),r(17),r(7);var l,u,o,i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(1)),h=r(239),v=r(186),g=n(r(26)),y=n(r(74)),E=n(r(63)),b=n(r(806)),_=r(52),O=n(r(816)),S=n(r(829)),C=n(r(867)),D=n(r(318)),k=n(r(858));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var T=(0,h.observer)((o=u=function(e){(0,s.default)(r,e);var a=N(r);function r(e){var n;return(0,i.default)(this,r),(n=a.call(this,e)).handleAffinityChange=function(e){var t=n.replicasPolicyOptions.find((function(t){return t.value===e}));(0,y.default)(n.props.data,"spec.template.spec.affinity",t.affinity),"custom"===e?(0,y.default)(n.props.data,"spec.template.spec.customMode",[{}]):delete n.props.data.spec.template.spec.customMode,n.setState({mode:e},(function(){n.props.formProps&&n.props.formProps.onChange()}))},n.handleChange=function(e){var t={};e.forEach((function(e){"preferredDuringSchedulingIgnoredDuringExecution"===e.type?t[e.policy]={preferredDuringSchedulingIgnoredDuringExecution:[{weight:100,podAffinityTerm:{labelSelector:{matchExpressions:[{key:"app",operator:"In",values:[e.target]}]},topologyKey:"kubernetes.io/hostname"}}]}:"requiredDuringSchedulingIgnoredDuringExecution"===e.type&&(t[e.policy]={requiredDuringSchedulingIgnoredDuringExecution:[{labelSelector:{matchExpressions:[{key:"app",operator:"In",values:[e.target]}]},topologyKey:"kubernetes.io/hostname"}]})})),(0,y.default)(n.props.data,"spec.template.spec.affinity",t)},n.checkItemValid=function(e){return e.policy&&e.type&&e.target},n.modeValidator=function(e,a,r){return a?a.some((function(e){return!n.checkItemValid(e)}))?(r({message:t("RULE_NOT_COMPLETE"),field:e.field}),void n.forceUpdate()):void r():r()},n.state={mode:"default"},n.store=(0,_.isEdgeWizePage)()?new k.default(e.module):new D.default(e.module),n}return(0,c.default)(r,[{key:"replicasPolicyOptions",get:function(){var e={preferredDuringSchedulingIgnoredDuringExecution:[{weight:100,podAffinityTerm:{labelSelector:{matchLabels:(0,g.default)(this.props.data,"spec.template.metadata.labels",{})},topologyKey:"kubernetes.io/hostname"}}]};return[{value:"default",label:t("DEFAULT_RULES"),affinity:{},description:t("DEFAULT_RULES_DESC")},{value:"decentralized",label:t("DECENTRALIZED_SCHEDULING"),affinity:{podAntiAffinity:e},description:t("DECENTRALIZED_SCHEDULING_DESC")},{value:"aggregation",label:t("CENTRALIZED_SCHEDULING"),affinity:{podAffinity:e},description:t("CENTRALIZED_SCHEDULING_DESC")},{value:"custom",label:t("CUSTOM_RULES"),affinity:{},description:t("CUSTOM_RULES_DESC")}]}},{key:"policys",get:function(){return[{label:t("SCHEDULE_WITH_TARGET"),value:"podAffinity"},{label:t("SCHEDULE_AWAY_FROM_TARGET"),value:"podAntiAffinity"}]}},{key:"types",get:function(){return[{label:t("MATCH_IF_POSSIBLE"),value:"preferredDuringSchedulingIgnoredDuringExecution"},{label:t("MUST_MATCH"),value:"requiredDuringSchedulingIgnoredDuringExecution"}]}}]),(0,c.default)(r,[{key:"componentDidMount",value:function(){var e=this,t=(0,g.default)(this.props.data,"spec.template.spec.affinity",{});if((0,E.default)(t))this.setState({mode:"default"});else{var a=this.replicasPolicyOptions.find((function(e){return(0,b.default)(e.affinity,t)}));a?(this.setState({mode:a.value}),delete this.props.data.spec.template.spec.customMode):this.setState({mode:"custom"},(function(){var a=Object.keys(t).map((function(e){var a=Object.keys(t[e])[0];return{policy:e,type:a,target:(0,g.default)(t,"requiredDuringSchedulingIgnoredDuringExecution"===a?"[".concat(e,"][").concat(a,'][0]["labelSelector"]["matchExpressions"][0]["values"][0]'):"[".concat(e,"][").concat(a,'][0]["podAffinityTerm"]["labelSelector"]["matchExpressions"][0]["values"][0]'),"")}}));(0,y.default)(e.props.data,"spec.template.spec.customMode",a)}))}var r=this.props,n=r.cluster,l=r.namespace;this.store.fetchList({cluster:n,namespace:l,limit:1/0})}},{key:"renderAffinityParams",value:function(){var e=this.state.mode,a=this.replicasPolicyOptions,r=(0,g.default)(this.store,"list.data",[]).map((function(e){return{label:e.name,value:e.name}}));return p.default.createElement(p.default.Fragment,null,p.default.createElement(v.Form.Item,null,p.default.createElement(O.default,{value:e,options:a,onChange:this.handleAffinityChange,defaultValue:a[0].value})),"custom"===e&&p.default.createElement(v.Form.Item,{label:t("CUSTOM_RULES"),rules:[{validator:this.modeValidator,checkOnSubmit:!0}]},p.default.createElement(S.default,{name:"spec.template.spec.customMode",itemType:"object",addText:t("ADD"),checkItemValid:this.checkItemValid,onChange:this.handleChange},p.default.createElement(C.default,null,p.default.createElement(v.Select,{name:"policy",placeholder:t("TYPE"),options:this.policys}),p.default.createElement(v.Select,{name:"type",placeholder:t("STRATEGY"),options:this.types}),p.default.createElement(v.Select,{name:"target",placeholder:t("TARGET"),options:r,style:{marginLeft:20}})))))}},{key:"render",value:function(){var e=this.props.checkable;return p.default.createElement(v.Form.Group,{label:t("POD_SCHEDULING_RULES"),desc:t("POD_SCHEDULING_RULES_DESC"),keepDataWhenUnCheck:!0,checkable:e},this.renderAffinityParams())}}]),r}(p.default.Component),u.propTypes={data:m.default.object,checkable:m.default.bool,initial:m.default.bool},u.defaultProps={data:{},checkable:!1,initial:!1},l=o))||l;a.default=T},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o,i=r(a(44)),c=r(a(36)),s=r(a(37)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=r(a(49)),h=r(a(68)),v=a(14),g=a(52);function y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function E(e){for(var t=1;t0&&void 0!==d[0]?d[0]:{},a=t.cluster,t.namespace,r=t.module,l=(0,u.default)(t,["cluster","namespace","module"]),this.list.isLoading=!0,r&&(this.module=r),o=l,i="".concat(this.apiVersion,"/").concat(this.module).concat(o.dryRun?"?dryRun=All":""),e.next=7,request.get(i,o);case 7:return c=e.sent,s=c.items.map((function(e){return E({cluster:a,module:r||f.module},f.mapper(e))})),(0,g.LimitsEqualRequests)(s),this.list.update({data:s,total:c.items.length,isLoading:!1}),e.abrupt("return",s);case 12:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(h.default),(0,m.default)(o.prototype,"fetchListByK8s",[v.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchListByK8s"),o.prototype),o);t.default=_},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(913)).default);t.default=c},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(97),r(16),r(4),r(23),r(24),r(17),r(62),r(64),r(75),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51));r(45),r(5),r(97),r(42),r(16),r(4),r(23),r(57),r(24),r(17),r(62),r(64),r(75);var s=n(r(800)),f=n(r(158)),d=n(r(0)),p=r(186),m=n(r(799)),h=n(r(1098)),v=r(72),g=n(r(2296));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var E=function(e){var t="HTTP",a=e.value,r=a.name,n=a.containerPort,l=e.index;if(!(0,f.default)(r)){var u=r.match(/^(\w+)-(.*)/);u&&(t=(u[1]||"HTTP").toUpperCase())}return{name:(0,f.default)(r)?"".concat(t.toLowerCase(),"-").concat(l):r,protocol:v.PROTOCOLS.some((function(e){return e.value===t}))?t:e.value.protocol,containerPort:n,propsValue:e.value}},b=function(e){(0,o.default)(r,e);var a=y(r);function r(e){var t;return(0,l.default)(this,r),(t=a.call(this,e)).triggerChange=(0,s.default)((function(){var e=t.state,a=e.name,r=e.protocol,n=e.containerPort;t.props.onChange({name:a,protocol:"UDP"===r?"UDP":"TCP",containerPort:n})}),300),t.handleNameChange=function(e,a){t.setState({name:a},(function(){return t.triggerChange()}))},t.handleProtocolChange=function(e){var a,r=t.state.name,n="".concat(t.state.protocol.toLowerCase(),"-"),l=t.props.index;a=r.startsWith(n)?"".concat(e.toLowerCase(),"-").concat(r.replace(n,"")):"".concat(e.toLowerCase(),"-").concat(l),t.setState({name:a,protocol:e},(function(){return t.triggerChange()}))},t.handleContainerPortChange=function(e){t.setState({containerPort:e},(function(){return t.triggerChange()}))},t.state=E(e),t}return(0,u.default)(r,[{key:"componentDidMount",value:function(){this.triggerChange()}},{key:"render",value:function(){var e=this.state,a=e.name,r=e.protocol,n=e.containerPort;return d.default.createElement("div",{className:g.default.wrapper},d.default.createElement(h.default,{prefix:d.default.createElement("div",{className:g.default.tip},d.default.createElement("span",null,t("PROTOCOL")),d.default.createElement(p.Tooltip,{content:t("ISTIO_PROTOCOL_TIP")},d.default.createElement(p.Icon,{name:"question"})))},d.default.createElement(p.Select,{name:"protocol",value:r,options:v.PROTOCOLS,defaultValue:"HTTP",onChange:this.handleProtocolChange})),d.default.createElement(h.default,{prefix:t("NAME")},d.default.createElement(p.Input,{name:"name",value:a,placeholder:t("REQUIRED"),onChange:this.handleNameChange})),d.default.createElement(h.default,{prefix:t("CONTAINER_PORT")},d.default.createElement(m.default,{name:"containerPort",min:1,max:65535,value:n,integer:!0,onChange:this.handleContainerPortChange})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.value!==t.propsValue?E(e):null}}]),r}(d.default.Component);a.default=b,b.defaultProps={value:{},onChange:function(){}}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(97),r(16),r(4),r(23),r(24),r(17),r(62),r(64),r(75),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51));r(45),r(5),r(97),r(42),r(16),r(4),r(23),r(57),r(24),r(17),r(62),r(64),r(75);var s=n(r(800)),f=n(r(158)),d=n(r(0)),p=r(186),m=n(r(799)),h=n(r(1098)),v=r(72),g=n(r(2297));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var E=function(e){var t="HTTP",a=e.value,r=a.name,n=a.containerPort,l=a.servicePort,u=e.index;if(!(0,f.default)(r)){var o=r.match(/^(\w+)-(.*)/);o&&(t=(o[1]||"HTTP").toUpperCase())}return{name:(0,f.default)(r)?"".concat(t.toLowerCase(),"-").concat(u):r,protocol:v.PROTOCOLS.some((function(e){return e.value===t}))?t:e.value.protocol,containerPort:n,servicePort:l,propsValue:e.value}},b=function(e){(0,o.default)(r,e);var a=y(r);function r(e){var t;return(0,l.default)(this,r),(t=a.call(this,e)).triggerChange=(0,s.default)((function(){var e=t.state,a=e.name,r=e.protocol,n=e.containerPort,l=e.servicePort;t.props.onChange({name:a,protocol:"UDP"===r?"UDP":"TCP",containerPort:n,servicePort:l})}),300),t.handleNameChange=function(e,a){t.setState({name:a},(function(){return t.triggerChange()}))},t.handleProtocolChange=function(e){var a,r=t.state.name,n="".concat(t.state.protocol.toLowerCase(),"-"),l=t.props.index;a=r.startsWith(n)?"".concat(e.toLowerCase(),"-").concat(r.replace(n,"")):"".concat(e.toLowerCase(),"-").concat(l),t.setState({name:a,protocol:e},(function(){return t.triggerChange()}))},t.handleContainerPortChange=function(e){t.setState({containerPort:e},(function(){return t.triggerChange()}))},t.handleServicePortChange=function(e){t.setState({servicePort:e},(function(){return t.triggerChange()}))},t.state=E(e),t}return(0,u.default)(r,[{key:"render",value:function(){var e=this.state,a=e.name,r=e.protocol,n=e.containerPort,l=e.servicePort;return d.default.createElement("div",{className:g.default.wrapper},d.default.createElement(h.default,{prefix:d.default.createElement("div",{className:g.default.tip},d.default.createElement("span",null,t("PROTOCOL")),d.default.createElement(p.Tooltip,{content:t("ISTIO_PROTOCOL_TIP")},d.default.createElement(p.Icon,{name:"question"})))},d.default.createElement(p.Select,{name:"protocol",value:r,options:v.PROTOCOLS,defaultValue:"HTTP",onChange:this.handleProtocolChange})),d.default.createElement(h.default,{prefix:t("NAME")},d.default.createElement(p.Input,{name:"name",value:a,placeholder:t("REQUIRED"),onChange:this.handleNameChange})),d.default.createElement(h.default,{prefix:t("CONTAINER_PORT")},d.default.createElement(m.default,{name:"containerPort",min:1,max:65535,value:n,integer:!0,placeholder:t("REQUIRED"),onChange:this.handleContainerPortChange})),d.default.createElement(h.default,{prefix:t("SERVICE_PORT")},d.default.createElement(m.default,{name:"servicePort",min:1,max:65535,value:l,integer:!0,placeholder:t("REQUIRED"),onChange:this.handleServicePortChange})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.value!==t.propsValue?E(e):null}}]),r}(d.default.Component);a.default=b,b.defaultProps={value:{},onChange:function(){}}},function(e,t,a){e.exports={wrapper:"_-4cD0WdpjLQRRfr3eATB5",desc:"_2trN64nTOrpOtASKkHhxbZ",extraBtn:"_3NUIXlnSX0odfiMD6xuinj",formError:"_1xwVkCYNchrNAw08m7njse",nameTip:"_3_TvkG3h8EIIY2xImC5li9",typeBox:"_1ct3Xc_GatVlbSJhR46WFq",textContent:"_3tiLSem7va-QAMUpYlyOLJ"}},function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(4),r(23),r(24),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(42),r(4),r(23),r(57),r(24),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(3)),p=n(r(63)),m=n(r(26)),h=r(186),v=n(r(2305)),g=n(r(2308));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var E=function(e){(0,o.default)(r,e);var a=y(r);function r(){var e;(0,l.default)(this,r);for(var t=arguments.length,n=new Array(t),u=0;u1&&" ..."),s.default.createElement("p",null,t("COMMANDS")))}return null}},{key:"renderProbeForm",value:function(){var e=this.props,t=e.probType,a=e.value,r=e.componentType;return s.default.createElement(v.default,{className:g.default.form,data:a,probType:t,onSave:this.handleForm,onCancel:this.hideForm,componentType:r})}},{key:"render",value:function(){var e=this.props,a=e.description,r=e.value,n=e.componentType,l=e.label;return this.state.showForm?s.default.createElement("div",{className:g.default.probe},this.renderProbeForm()):(0,p.default)(r)?s.default.createElement("div",{className:(0,d.default)(g.default.empty),onClick:this.showForm},s.default.createElement("div",null,l||t("ADD_PROBE")),s.default.createElement("p",{className:"text-secondary"},a)):s.default.createElement("div",{className:g.default.probe},s.default.createElement("div",{className:g.default.content},s.default.createElement(h.Icon,{name:"monitor",size:40}),s.default.createElement("div",null,s.default.createElement("strong",null,t(this.getProbeTypeText(r))),"heal"===n&&s.default.createElement("p",null,s.default.createElement("span",null,t("INITIAL_DELAY_TIMEOUT_VALUE",{delay:r.initialDelaySeconds||0,timeout:r.timeoutSeconds||0})))),this.renderProbeInfo()),s.default.createElement("div",{className:"buttons"},s.default.createElement(h.Button,{type:"flat",icon:"trash",onClick:this.handleDelete}),s.default.createElement(h.Button,{type:"flat",icon:"pen",onClick:this.showForm})))}}]),r}(s.default.Component);a.default=E,E.propTypes={name:f.default.string,label:f.default.string,value:f.default.object,onChange:f.default.func,onShowForm:f.default.func,deleteNoObject:f.default.bool},E.defaultProps={name:"",label:"",value:{},onChange:function(){},onShowForm:function(){},componentType:"heal",deleteNoObject:!1}},function(e,t,a){e.exports={wrapper:"_2qA0DfrVhnER8QvH0wQNVs",radioGroup:"lTdgbwVyGMyso1J2-ZyQQ",confirm:"_3750no6wmEKmoHmvmyPMsm",object:"_2y_cKPnzZxbXLF_dVafN1k"}},function(e,t,a){e.exports={dropContent:"_1dgWc_FlxZ0I2I8eO_mtsY",header:"_1eg7T1EUzEx9lO_Vk2smqx",listContent:"_1R7XJrTUSk0K11NbeSsvLQ",starContainer:"_4tmFCc6PQiPbAgn206MC8",actions:"_3F90TmEUEEPlTASxdMgZNV",info:"_2R3U9MOi9qgl_FL21JznCz",tabs:"_28RQBc6TkhuRe7tAIJCGmp",tab:"_2hTxWsg41px5hCSv1Wm99F",selected:"_2VkYzhd5Ow_BEjxkhOq3eX",search:"_1XQXLeI-z0GOUpjlyPkOfe",message:"KvW_BUlNf1lu0E8HSDczo",selectedContent:"_3KFGJfmozlVYx4gEvbu6dA",selectedImageInfo:"_3v0zkUOyV-JibpFOGMj7Xt",selectedInfo:"_25UPs6oZb2m0_CwkRBpmWK",icon:"_10xemcZ1Xi6n-LscTe8-8U",logo:"_2C8Gd9hCy9D14behvqpKSG",imageInfo:"_2-qLBNFfWh3DKt1NKsQZBH",emptyContent:"_1NipMFmAIiG0us8zcmeW3p",desc:"_2qpXEBvwkvD9MmvpqIxKu9",textConfirm:"_1EMGC0hNKltp9Gqej1THm9",registryFooter:"_1ohyELTkhVtaqqWwThH647",dropContent_hide:"_1trQN1nAMesw9gU4dm2GmW",dropDownIcon:"_2Ispz9PQoN4qvKuwb3ZVWB",clickable:"_3dHyyekpvmPUPtbo3xQG0Z",star:"_1SkfiEdBayGXiRRaBkwk7H",imageInput:"DhITaL97AQEJeR5vr14Je"}},function(e,t,a){e.exports={content:"_3wriWVsghyEeMHLsxqYuhC",radioListContent:"_6OcLzfJRUG_EEwKee4cRi",radioOnlyOneListContent:"_1vdnayTJXtlQIl5FjEbAXn",radioList:"_1U2J5xETOAh5sL0WjecCxJ",imageTagDetailItem:"_1yRt9fX0qMa0ara4u5hKhu",icon:"_2oschSYAXruRPq7qHwTSTX",tagName:"_3Q77ElyimDbKWMAq6wz-Qb"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(1099)),p=n(r(799)),m=n(r(2328));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(r,e);var a=h(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement("div",{className:"margin-b12"},s.default.createElement("div",{className:m.default.title},t("USER_AND_USER_GROUP")),s.default.createElement("div",{className:m.default.content},s.default.createElement(f.Form.Item,null,s.default.createElement(d.default,{name:"".concat(this.prefix,".runAsNonRoot"),title:t("RUN_AS_NON_ROOT"),description:t("RUN_AS_NON_ROOT_DESC")})),s.default.createElement("div",{className:"padding-12"},s.default.createElement(f.Columns,null,s.default.createElement(f.Column,null,s.default.createElement(f.Form.Item,{label:t("USER"),desc:t("RUN_AS_USER_DESC")},s.default.createElement(p.default,{name:"".concat(this.prefix,".runAsUser"),integer:!0}))),s.default.createElement(f.Column,null,s.default.createElement(f.Form.Item,{label:t("USER_GROUP"),desc:t("RUN_AS_USER_GROUP_DESC")},s.default.createElement(p.default,{name:"".concat(this.prefix,".runAsGroup"),integer:!0})))))))}},{key:"prefix",get:function(){return this.props.prefix||"securityContext"}}]),r}(s.default.Component);a.default=v},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(2329));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=function(e){(0,o.default)(r,e);var a=p(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement("div",{className:"margin-b12"},s.default.createElement("div",{className:d.default.title},t("SELINUX_CONTEXT")),s.default.createElement("div",{className:d.default.content},s.default.createElement(f.Columns,null,s.default.createElement(f.Column,null,s.default.createElement(f.Form.Item,{label:t("LEVEL")},s.default.createElement(f.Input,{name:"".concat(this.prefix,".seLinuxOptions.level")}))),s.default.createElement(f.Column,null,s.default.createElement(f.Form.Item,{label:t("ROLE")},s.default.createElement(f.Input,{name:"".concat(this.prefix,".seLinuxOptions.role")})))),s.default.createElement(f.Columns,null,s.default.createElement(f.Column,null,s.default.createElement(f.Form.Item,{label:t("TYPE")},s.default.createElement(f.Input,{name:"".concat(this.prefix,".seLinuxOptions.type")}))),s.default.createElement(f.Column,null,s.default.createElement(f.Form.Item,{label:t("USER")},s.default.createElement(f.Input,{name:"".concat(this.prefix,".seLinuxOptions.user")}))))))}},{key:"prefix",get:function(){return this.props.prefix||"securityContext"}}]),r}(s.default.Component);a.default=m},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(799));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=function(e){(0,o.default)(r,e);var a=p(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement(s.default.Fragment,null,s.default.createElement(f.Form.Item,{label:t("TERMINATION_GRACEPERIOD_SECONDS")},s.default.createElement(d.default,{name:"".concat(this.prefix,"spec.terminationGracePeriodSeconds"),integer:!0,min:0,autoFocus:!0,defaultValue:30,style:{maxWidth:"100%"}})))}},{key:"prefix",get:function(){var e=this.props,t=e.isFederated;return e.prefix||(t?"spec.template.spec.template.":"spec.template.")}}]),r}(s.default.Component);a.default=m},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(84),r(18),r(16),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(84),r(18),r(42),r(16),r(4),r(23),r(57),r(17),r(85);var l=n(r(61)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(3)),p=n(r(1)),m=n(r(812)),h=n(r(2351)),v=n(r(2352)),g=n(r(1307));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var E=function(e){(0,i.default)(r,e);var a=y(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),o=0;o0;return!o&&l&&_.default.error(t("NODE_SELECTORS_EMPTY_DESC")),o},n.handlePrev=function(){n.setState((function(e){var t=e.currentStep;return{currentStep:Math.max(0,t-1)}}))},n.handleNext=function(){var e=n.formRef.current,t=n.state.formTemplate,a=n.checkNodeSelectors({formTemplate:t});e&&e.validate((function(){a&&n.setState((function(e){var t=e.currentStep;return{currentStep:Math.min(n.steps.length-1,t+1)}}))}))},n.handleOk=function(){var e=n.props.onOk,t=n.state,a=t.isCodeMode,r=t.formTemplate;if(a){var l,u=null===(l=n.editor.current)||void 0===l?void 0:l.getData();n.checkNodeSelectors({formTemplate:u})&&e(u)}else{var o,i=n.checkNodeSelectors({formTemplate:r});null===(o=n.formRef.current)||void 0===o||o.validate((function(){var t,a,n,l,u,o=null==r||null===(t=r.spec)||void 0===t||null===(a=t.deploymentTemplate)||void 0===a||null===(n=a.spec)||void 0===n||null===(l=n.template)||void 0===l||null===(u=l.spec)||void 0===u?void 0:u.deploymentTemplate;o&&(0,g.default)(r,{spec:{deploymentTemplate:o}}),i&&e(r)}))}},n.handleSubFormSave=function(){var e=n.state.subRoute;e&&e.onSave&&e.onSave((function(){n.setState({subRoute:{}})}))},n.handleSubFormCancel=function(){var e=n.state.subRoute;e&&e.onCancel&&(e.onCancel(),n.setState({subRoute:{}}))},n.renderSaveBar=function(){var e=n.state.subRoute;return(0,v.default)(e)?null:h.default.createElement(D.default,{className:w.default.confirm,onOk:n.handleSubFormSave,onCancel:n.handleSubFormCancel})},n.state={codeMode:!1,currentStep:0,subRoute:{},formTemplate:e.formTemplate,intializing:!1},n.formRef=h.default.createRef(),n.editor=h.default.createRef(),n}return(0,f.default)(r,[{key:"getChildContext",value:function(){return{registerSubRoute:this.registerSubRoute,resetSubRoute:this.resetSubRoute}}},{key:"renderSteps",value:function(){var e=this.state,a=e.currentStep,r=e.isCodeMode;return h.default.createElement("div",{className:w.default.stepsWrapper},!r&&h.default.createElement(T.default,{steps:this.steps,current:a}),h.default.createElement(C.default,{className:w.default.codeMode,text:t("EDIT_YAML"),onChange:this.handleModeChange,checked:r}))}},{key:"renderForm",value:function(){var e=this.state,t=e.formTemplate,a=e.currentStep,r=this.props,n=r.cluster,l=r.workspace,u=r.namespace,o=r.store,i=r.isEdgeTable,c=this.steps[a],s=c.component,f=c.onlyMetaData,d={formRef:this.formRef,formTemplate:t,cluster:n,workspace:l,isEdgeTable:i,namespace:u,module:"edgeappsets",onlyMetaData:f,prefix:"spec.deploymentTemplate.spec.template.",store:o};return h.default.createElement(s,d)}},{key:"renderBody",value:function(){var e=this.state,t=e.intializing,a=e.isCodeMode;return t?h.default.createElement(b.Loading,{className:w.default.loading}):h.default.createElement("div",{className:w.default.form},a?h.default.createElement(O.default,{ref:this.editor,value:this.state.formTemplate}):this.renderForm(),this.renderSaveBar())}},{key:"renderFooter",value:function(){var e=this.props.onCancel,a=this.props.store.isSubmitting,r=this.state,n=r.isCodeMode,l=r.currentStep;if(n)return h.default.createElement("div",{className:w.default.footer},h.default.createElement(b.Button,{onClick:e},t("CANCEL")),h.default.createElement(b.Button,{type:"control",onClick:this.handleOk,loading:a,disabled:a},t("INSTALL")));var u=this.steps.length-1;return h.default.createElement("div",{className:w.default.footer},l>0&&h.default.createElement(b.Button,{type:"control",onClick:this.handlePrev},t("PREVIOUS")),l=e}},O=function(e){var a=e.cluster,r=e.namespace,n=e.replicas,l=void 0===n?0:n,u=e.isEdgeWize,y=d.useMemo((function(){return function(e){return[b,_(l)].every((function(t){return t(e)}))}}),[l]),O=d.useMemo((function(){if(!globals.app.isMultiCluster)return!1;var e=(0,s.default)(globals,"clusterConfig.".concat(a,".ksVersion"));return(0,h.compareVersion)(e,"3.4.0")<0}),[a]),S=e.prefix||"spec.template.",C=d.useRef(u?new m.default:new p.default("ippools")),D=d.useState([]),k=(0,o.default)(D,2),N=k[0],T=k[1],R=(0,f.default)(e.data);return d.useEffect((function(){C.current.fetchNamespacesIpPools({cluster:a,namespace:r,limit:-1}).then((function(e){T(e.filter(y).map((function(e){return E(E({},e),{},{label:e.name,value:e.name})})))}))}),[]),d.createElement(i.Form.Group,{label:R?t("ADD_EDGE_IPPOOL"):"",desc:R?t("ADD_EDGE_IPPOOL_DES"):"",checkable:R,keepDataWhenUnCheck:!0},u?d.createElement(c.default,{isOutdated:O,type:"array",name:"".concat(S,'metadata.annotations["cni.projectcalico.org/ipv4pools"]'),list:N,icon:v.ICON_TYPES[C.current.module],hideColumns:["workspace"]}):d.createElement(g.default,{isOutdated:O,type:"array",cluster:a,namespace:r,name:"".concat(S,'metadata.annotations["cni.projectcalico.org/ipv4pools"]'),icon:v.ICON_TYPES[C.current.module],hideColumns:["workspace"],rootStore:e.rootStore,formTemplate:e.formTemplate,data:e.data,formProps:e.formProps}))};a.default=O},function(e,t,a){"use strict";a(15);var r=a(20);a(12),a(109),a(11),a(31),a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(109),a(45),a(11),a(31),a(18),a(42),a(4),a(23),a(57),a(17);var n=r(a(30)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=a(186),f=r(a(3)),d=a(903),p=r(a(800)),m=r(a(63)),h=r(a(195)),v=r(a(158)),g=r(a(1)),y=r(a(0)),E=r(a(837)),b=r(a(2455));function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var O=function(e){(0,o.default)(a,e);var t=_(a);function a(e){var r;return(0,l.default)(this,a),(r=t.call(this,e)).handleDOMClick=function(e){r.optionsRef&&r.optionsRef.current&&!r.optionsRef.current.contains(e.target)&&r.controlRef&&r.controlRef.current&&!r.controlRef.current.contains(e.target)&&r.setState({showOptions:!1})},r.triggerChange=(0,p.default)((function(){(0,r.props.onChange)(r.state.value)})),r.handleClick=function(e){r.setState({value:e,showOptions:!1},(function(){r.triggerChange()}))},r.toggleOptions=function(){r.setState((function(e){return{showOptions:!e.showOptions}}),(function(){document.removeEventListener("click",r.handleDOMClick),r.state.showOptions&&document.addEventListener("click",r.handleDOMClick)}))},r.state={value:(0,v.default)(e.value)?e.defaultValue:e.value,showOptions:!1},r.optionsRef=y.default.createRef(),r.controlRef=y.default.createRef(),r}return(0,u.default)(a,[{key:"componentDidUpdate",value:function(e,t){this.props.value!==t.value&&this.setState({value:this.props.value})}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleDOMClick)}},{key:"renderDetail",value:function(e){return e.map((function(e,t){return y.default.createElement("div",{key:t,className:b.default.text},y.default.createElement("div",null,e.label),e.description&&y.default.createElement("p",null,e.description))}))}},{key:"renderOption",value:function(e,t){var a=this,r=this.props.renderOption;return y.default.createElement("div",{key:e.uid||e.value,onClick:function(){return a.handleClick(e.value)},className:(0,f.default)(b.default.option,(0,n.default)({},b.default.selected,t),(0,n.default)({},b.default.withIcon,e.icon))},r?r(e):y.default.createElement(y.default.Fragment,null,this.renderIcon(e),y.default.createElement("div",{className:b.default.text},y.default.createElement("div",null,e.label),e.description&&y.default.createElement("p",null,e.description)),e.details&&this.renderDetail(e.details)))}},{key:"renderIcon",value:function(e){return e.icon?(0,h.default)(e.icon)?y.default.createElement(s.Icon,{className:b.default.leftIcon,name:e.icon,size:40,type:"dark"}):e.icon:null}},{key:"renderOptions",value:function(){var e=this,t=this.props,a=t.options,r=t.disabled,n=this.state,l=n.value,u=n.showOptions;if(r||!u)return null;if((0,m.default)(a))return y.default.createElement("div",{className:b.default.options,ref:this.optionsRef},y.default.createElement(d.Empty,null));var o=a.find((function(e){return(0,E.default)(e.value,l)}));return y.default.createElement("div",{className:b.default.options,ref:this.optionsRef},o&&this.renderOption(o,!0),a.filter((function(e){return!(0,E.default)(e.value,l)})).map((function(t){return e.renderOption(t)})))}},{key:"renderControl",value:function(){var e,t=this.props,a=t.placeholder,r=t.options,l=t.disabled,u=t.renderOption,o=this.state,i=o.value,c=o.showOptions,d=r.find((function(e){return(0,E.default)(e.value,i)}))||a||{__empty:!0};return y.default.createElement("div",{className:(0,f.default)(b.default.control,(e={},(0,n.default)(e,b.default.withIcon,d.icon),(0,n.default)(e,b.default.open,c),e)),ref:this.controlRef,onClick:this.toggleOptions},u?u(d):y.default.createElement(y.default.Fragment,null,this.renderIcon(d),y.default.createElement("div",{className:b.default.text},y.default.createElement("div",null,d.label),d.description&&y.default.createElement("p",null,d.description)),d.details&&this.renderDetail(d.details)),!l&&y.default.createElement(s.Icon,{className:b.default.rightIcon,name:"chevron-down",size:"small",clickable:!0}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.disabled;return y.default.createElement("div",{className:(0,f.default)(b.default.wrapper,(0,n.default)({},b.default.disabled,a),t)},this.renderControl(),this.renderOptions())}}]),a}(y.default.Component);t.default=O,O.propTypes={className:g.default.string,value:g.default.any,defaultValue:g.default.any,options:g.default.array.isRequired,onChange:g.default.func,renderOption:g.default.func},O.defaultProps={className:"",options:[],onChange:function(){}}},,,,function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(11),r(6),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(6),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(30)),p=n(r(26)),m=n(r(189)),h=n(r(158)),v=n(r(194)),g=n(r(0)),y=n(r(106)),E=n(r(1264)),b=r(239),_=n(r(1)),O=n(r(3)),S=r(186),C=n(r(836)),D=n(r(790)),k=n(r(1567));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getWatchListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion,"/watch").concat(e.getPath(t),"/").concat(e.module)},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath(t),"/").concat(e.module)},e}return(0,l.default)(a,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.namespace,a="";return t&&(a+="/namespaces/".concat(t)),a}}]),a}(r(a(68)).default);t.default=s},,,function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(18),r(192),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(192),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(7);var l=n(r(58)),u=n(r(43));r(41);var o,i=n(r(44)),c=n(r(30)),s=n(r(61)),f=n(r(36)),d=n(r(37)),p=n(r(55)),m=n(r(56)),h=n(r(51)),v=n(r(0)),g=n(r(3)),y=n(r(26)),E=r(239),b=r(186),_=n(r(790)),O=n(r(2479)),S=n(r(2480)),C=n(r(2486));function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;tthis.state.formData.length&&v.default.createElement(_.default,{className:C.default.add,onClick:this.handleAdd,title:t("ADD_EDGE_NODE"),description:t("ADD_EDGE_NODE_DESC")})))}}]),n}(v.default.Component))||o;a.default=T},,function(e,t,a){e.exports={body:"_3rLLKpT8IgpcqWhzTXPWzb",footer:"_1FN6kDx_4OYTrAeMzmz6lJ",nodes:"_2K0nFAD8XjT_-g3jP0gfYz",item:"_2szAjgdbfftm9dnv4On9sC",selected:"_4IuUl9x4GeLgtthhM3Cby",ring:"_2mjDKl7noCA52Dkwojasqj",name:"sgFMlcJBkaU6RLJu0NSHo",taints:"_3VFxaVUiKAEp4AZAT4_tG5"}},function(e,t,a){e.exports={body:"cx9CuoGasIzKuoPV-SX2x",footer:"_3PO41zve62tsAkM30z0T3b",nodes:"_1TqujrdBgpQqMUZwVQnvUo",item:"_1UmxvIzRiQQrZ5iwHfbeuy",selected:"LuUQg8XP2-9uUx7goKJdp",ring:"_24FDmv6VPjHWOPFRy5UJJO",name:"_50ZNy-lVF8cVuxAandCZS",taints:"_3d-N5il7f1CkzJzvPDo8tR"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(31),r(84),r(73),r(18),r(16),r(10),r(24),r(85),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var u=l(r(43));r(41);var o=l(r(44)),i=l(r(96));r(5),r(31),r(84),r(73),r(18),r(16),r(10),r(4),r(22),r(85);var c=n(r(0)),s=l(r(2501)),f=r(186),d=l(r(1176)),p=l(r(2502)),m=new d.default;var h=function(e){var a,r,n,l,d=e.detail,h=e.cluster,v=e.handleBindIp,g=e.renderBtn,y=d||{},E=y.metadata,b=y.parentKey,_=(0,s.default)(b||[],2).map((function(e){return e[1]||e[0]})),O=(null==E?void 0:E.annotations)||{},S=Object.keys(O).find((function(e){return e.includes("infra.kubesphere.io/ippool")})),C=(0,c.useState)([]),D=(0,i.default)(C,2),k=D[0],N=D[1];function T(){return(T=(0,o.default)(u.default.mark((function e(){var t,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={limit:-1,page:1,hasStatus:!this.isCalico&&void 0,cluster:h},(null==E?void 0:E.name)&&(t.labelSelector="nodegroup.infra.kubesphere.io/".concat(null==E?void 0:E.name)),e.next=4,m.fetchList(t);case 4:(a=e.sent)&&N(a);case 6:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}(0,c.useEffect)((function(){S?function(){T.apply(this,arguments)}():N([])}),[S,d]);var R=c.default.createElement("div",null,k.map((function(e){return c.default.createElement("div",{key:e.name},c.default.createElement("div",{className:p.default["top-bar-ip-tooltip-item"]},e.name),c.default.createElement("div",{className:p.default["top-bar-ip-tooltip-item-ip"]},t("NETWORK_SEGMENT")," :",e.cidr))}))),w="".concat(t("全部节点组")," / ").concat(_.join(" / "));return c.default.createElement("div",{className:p.default["top-bar"]},c.default.createElement("div",{className:p.default["top-bar-left"]},c.default.createElement("div",null,c.default.createElement("img",{className:p.default.icon,width:20,src:"/assets/disk_group.svg",alt:""}),c.default.createElement("span",{className:p.default["top-bar-title"]},null==d||null===(a=d.aliasName)||void 0===a||null===(r=a.split("("))||void 0===r?void 0:r[0]),c.default.createElement("span",{className:p.default["top-bar-title-label"]},"(",null==d||null===(n=d.aliasName)||void 0===n||null===(l=n.split("("))||void 0===l?void 0:l[1])),c.default.createElement("div",{className:p.default["top-bar-des"]},c.default.createElement("span",{className:p.default["top-bar-des-group"],title:w},t("FROM_NODE_GROUP"),":",w),c.default.createElement("span",{className:p.default["top-bar-bind"]},t("IP 池"),":",c.default.createElement("span",{className:p.default["top-bar-ip"]},S?c.default.createElement(f.Tooltip,{className:p.default["top-bar-ip-tooltip"],content:R},c.default.createElement("span",null,O[S])):v?c.default.createElement("span",{onClick:v},"点击添加"):"-")),k.length>1&&c.default.createElement(f.Tag,{type:"primary"},"+",k.length))),g)};a.default=h},function(e,t,a){e.exports={taints:"_1ULrfSas_sAVfa3od9d8ax",overview:"_1e24H-JEunBA2J5HWPxFaT",resource:"_3zvW-M_VBK7leGvGXjwR3w"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(6),r(84),r(29),r(73),r(18),r(16),r(4),r(22),r(23),r(17),r(85),r(38),r(7),r(32),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(6),r(84),r(29),r(73),r(18),r(28),r(42),r(16),r(4),r(22),r(23),r(57),r(17),r(85),r(38),r(7),r(32),r(110);var l=n(r(315)),u=n(r(58)),o=n(r(30)),i=n(r(61)),c=n(r(43));r(41);var s=n(r(44)),f=n(r(36)),d=n(r(37)),p=n(r(55)),m=n(r(56)),h=n(r(51)),v=r(186),g=n(r(3)),y=n(r(787)),E=n(r(833)),b=n(r(450)),_=n(r(26)),O=n(r(60)),S=n(r(63)),C=n(r(241)),D=n(r(861)),k=n(r(1)),N=n(r(0)),T=n(r(1048)),R=n(r(437)),w=n(r(443)),I=n(r(831)),M=r(52),P=r(72),A=n(r(2507));function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,h.default)(e);if(t){var n=(0,h.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,m.default)(this,a)}}var L=function(e){(0,p.default)(n,e);var a,r=j(n);function n(e){var a;return(0,f.default)(this,n),(a=r.call(this,e)).stopPropagation=function(e){return e.stopPropagation()},a.handleOk=(0,s.default)(c.default.mark((function e(){var t,r,n,l,u,o,i,s,f,d,p,m,h,v,g;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.props,r=t.onOk,n=t.resource,l=t.k8sVersion,u=t.store,o=a.state,i=o.selectedRelatedResourceIds,s=o.relatedResources,f=o.scheduledProjectList,d=o.customScaling,p=[],s.forEach((function(e){i.includes(e.uid)&&("services"===e.module?p.push(a.serviceStore.delete(e)):"persistentvolumeclaims"===e.module&&p.push(a.volumeStore.delete(e)))})),m=[],d.forEach((function(e){m.push(a.hpaStore.delete((0,C.default)(e,"cluster","namespace","name"),l))})),e.next=8,Promise.all(m);case 8:return e.next=10,Promise.all(p);case 10:if(!(0,O.default)(n)){e.next=21;break}return h=n[0].namespace,v=n.map((function(e){return e.name})),g=v.filter((function(e){return f.includes(e)})),e.next=16,Promise.all(n.map((function(e){return u.delete(e,l)})));case 16:return e.next=18,Promise.all(g.map((function(e){return u.deleteSchedule({name:e,namespace:h})})));case 18:u.list.setSelectRowKeys([]),e.next=27;break;case 21:return e.next=23,u.delete(n,l);case 23:if(e.t0=f.includes(n.name),!e.t0){e.next=27;break}return e.next=27,u.deleteSchedule({name:n.name,namespace:n.namespace});case 27:r();case 28:case"end":return e.stop()}}),e)}))),a.handleItemClick=function(e){var t=e.currentTarget.dataset.uid;a.setState((function(e){var a=e.selectedRelatedResourceIds;return{selectedRelatedResourceIds:a.includes(t)?a.filter((function(e){return e!==t})):[].concat((0,i.default)(a),[t])}}))},a.handleSelectAll=function(){var e=a.state,t=e.relatedResources,r=e.selectedRelatedResourceIds;(0,S.default)(r)&&a.setState({selectedRelatedResourceIds:t.map((function(e){return e.uid}))})},a.renderContentItem=function(e){var r=a.state.selectedRelatedResourceIds;return N.default.createElement("div",{key:e.uid,"data-uid":e.uid,className:(0,g.default)(A.default.resource,(0,o.default)({},A.default.selected,r.includes(e.uid))),onClick:a.handleItemClick},N.default.createElement(v.Checkbox,{checked:r.includes(e.uid),onClick:a.stopPropagation}),N.default.createElement(v.Icon,{name:P.ICON_TYPES[e.module],size:20,type:r.includes(e.uid)?"light":"dark"}),N.default.createElement("span",{className:A.default.resourceName},e.name),N.default.createElement("span",{className:A.default.resourceType},t(P.MODULE_KIND_MAP[e.module])))},a.renderCustomScalingIterm=function(e){return N.default.createElement("div",{key:e.uid,"data-uid":e.uid,className:(0,g.default)(A.default.resource,A.default.selected,A.default.disabled,A.default.customScalingItem)},N.default.createElement("div",{className:A.default.disabled},N.default.createElement(v.Checkbox,{checked:!0}),N.default.createElement(v.Icon,{name:P.ICON_TYPES[e.module],size:20,type:"light"}),N.default.createElement("span",{className:A.default.resourceName},e.name),N.default.createElement("span",{className:A.default.resourceType},t(P.MODULE_KIND_MAP[e.module]))),N.default.createElement(v.Tooltip,{content:t("DELETE_CUSTOM_SCALING_WITH_WORKLOAD")},N.default.createElement(v.Icon,{name:"question",size:20,type:"light"})))},a.serviceStore=new w.default,a.volumeStore=new I.default,a.hpaStore=new T.default,e.isFederated&&(a.serviceStore=new R.default({module:a.serviceStore.module}),a.volumeStore=new R.default({module:a.volumeStore.module})),a.state={relatedResources:[],selectedRelatedResourceIds:[],enableConfirm:!1,timer:3,scheduledProjectList:[],customScaling:[]},a}return(0,d.default)(n,[{key:"componentDidMount",value:function(){this.props.visible&&(this.fetchRelatedResources(this.props.resource),this.startTimer())}},{key:"componentWillUnmount",value:function(){this.timer&&clearInterval(this.timer)}},{key:"startTimer",value:function(){var e=this;this.timer&&clearInterval(this.timer),this.timer=setInterval((function(){e.setState((function(e){var t=e.timer;return{timer:Math.max(t-1,0),enableConfirm:t<=1}}),(function(){e.state.enableConfirm&&e.timer&&clearInterval(e.timer)}))}),1e3)}},{key:"fetchRelatedResources",value:(a=(0,s.default)(c.default.mark((function e(t){var a,r,n,l,u,o,i,s,f,d,p,m=this;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.props.store,this.setState({isLoading:!0}),r=[],u=[],(0,O.default)(t)?(n=t[0].namespace,l=t[0].cluster,r=t.map((function(e){return e.selector||(0,_.default)(e,"resource.selector")}))):(n=t.namespace,l=t.cluster,r.push(t.selector||(0,_.default)(t,"resource.selector"))),o=[].concat(t).map((function(e){return(0,_.default)(e,'labels["autoscaling.kubeshpere.io/name"]')})).filter(Boolean).map((function(e){return{cluster:l,namespace:n,module:m.hpaStore.module,uid:e,name:e}})),i=[],r.forEach((function(e){if(!(0,S.default)(e)){var t=(0,M.joinSelector)(e);i.push(m.volumeStore.fetchListByK8s({cluster:l,namespace:n,labelSelector:t}),m.serviceStore.fetchListByK8s({cluster:l,namespace:n,labelSelector:t}))}})),e.next=10,Promise.all(i);case 10:if(s=e.sent,"deployments"!==a.module){e.next=25;break}return e.next=14,null===(d=a.getAllScheduleProject)||void 0===d?void 0:d.call(a,{namespace:n});case 14:if(e.t1=f=e.sent,e.t0=null!==e.t1,!e.t0){e.next=18;break}e.t0=void 0!==f;case 18:if(!e.t0){e.next=22;break}e.t2=f,e.next=23;break;case 22:e.t2=[];case 23:p=e.t2,(0,S.default)(p)||(u=p.items.map((function(e){return e.metadata.name})));case 25:this.setState({relatedResources:(0,D.default)((0,b.default)(s),"uid"),isLoading:!1,scheduledProjectList:u,customScaling:o});case 26:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"renderContent",value:function(){var e=this.state,a=e.isLoading,r=e.relatedResources,n=e.selectedRelatedResourceIds,l=e.customScaling;return!1===a&&(0,S.default)(r)&&(0,S.default)(l)?N.default.createElement(E.default,{icon:"appcenter",className:A.default.empty,title:t("NO_RELATED_RESOURCE_FOUND"),desc:t("NO_WORKLOAD_RELATED_RESOURCE_DESC")}):N.default.createElement("div",{className:A.default.resources},!(0,S.default)(r)&&N.default.createElement("div",{className:A.default.resource},N.default.createElement(v.Checkbox,{checked:!(0,S.default)(n),onClick:this.handleSelectAll,indeterminate:!((0,S.default)(n)||r.length===n.length)}),N.default.createElement("span",{className:A.default.resourceName},t("SELECT_ALL"))),r.map(this.renderContentItem),l.map(this.renderCustomScalingIterm))}},{key:"render",value:function(){var e=this.state,a=e.enableConfirm,r=e.timer,n=this.props,o=n.resource,i=(n.onOk,n.onCancel),c=n.isSubmitting,s=(0,u.default)(n,["resource","onOk","onCancel","isSubmitting"]),f=(0,O.default)(o)&&1!==o.length?t("DELETE_MULTIPLE_WORKLOADS"):t("DELETE_WORKLOAD"),d=(0,O.default)(o)&&1!==o.length?t.html("DELETE_WORKLOAD_DESC_PL",{resource:o.map((function(e){return e.name})).join(", ")}):(0,O.default)(o)?t.html("DELETE_WORKLOAD_DESC_SI",{resource:o.map((function(e){return e.name})).join(", ")}):t.html("DELETE_WORKLOAD_DESC_SI",{resource:o.name});return N.default.createElement(y.default,(0,l.default)({width:520,icon:"question",title:f,description:d,closable:!1,headerClassName:A.default.modalHeader,bodyClassName:A.default.modalBody,hideFooter:!0},s),N.default.createElement("div",{className:A.default.body},this.renderContent()),N.default.createElement("div",{className:A.default.footer},N.default.createElement(v.Button,{onClick:i,"data-test":"modal-cancel"},t("CANCEL")),N.default.createElement(v.Button,{type:"danger",loading:c,disabled:!a||c,onClick:this.handleOk,"data-test":"modal-ok"},t("OK"),!a&&"(".concat(r,"s)"))))}}]),n}(N.default.Component);a.default=L,L.propTypes={resource:k.default.any,visible:k.default.bool,onOk:k.default.func,onCancel:k.default.func,isSubmitting:k.default.bool},L.defaultProps={visible:!1,isSubmitting:!1,onOk:function(){},onCancel:function(){}}},function(e,t,a){"use strict";a(15);var r=a(20),n=a(157);a(11),a(84),a(18),a(4),a(23),a(17),a(85),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(11),a(84),a(18),a(42),a(4),a(22),a(23),a(57),a(17),a(85);var l=r(a(315)),u=r(a(58)),o=r(a(43));a(41);var i,c,s,f=r(a(44)),d=r(a(36)),p=r(a(37)),m=r(a(55)),h=r(a(56)),v=r(a(51)),g=n(a(0)),y=r(a(1)),E=a(14),b=a(239),_=r(a(26)),O=r(a(74)),S=r(a(241)),C=r(a(800)),D=r(a(135)),k=r(a(122)),N=a(186),T=r(a(787)),R=r(a(2508)),w=r(a(2510)),I=r(a(2512)),M=r(a(2515)),P=r(a(935)),A=r(a(2516));function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,v.default)(e);if(t){var n=(0,v.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,h.default)(this,a)}}var L=(0,b.observer)((s=c=function(e){(0,m.default)(a,e);var t=j(a);function a(e){var r;return(0,d.default)(this,a),(r=t.call(this,e)).handleAppChange=(0,C.default)((function(e,t){var a=r.state.detail,n=(0,D.default)(a);(0,O.default)(n,t,e),r.setState({detail:n})}),200),r.handleOk=(0,f.default)(o.default.mark((function e(){var t,a,n,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=(0,S.default)(r.state.detail,["name","aliasName","abstraction","description","appHome","categoryName","readme","icon"]),(null===(t=r.state.detail)||void 0===t?void 0:t.attachments)&&(a.attachments=((null===(n=r.state.detail)||void 0===n?void 0:n.attachments)||[]).map((function(e){return(0,k.default)(e)[0]}))),(l=r.formRef.current)&&l.validate((function(){var e,t=null===(e=r.props.detail.attachments)||void 0===e?void 0:e.filter((function(e){var t;return!(null===(t=a.attachments)||void 0===t?void 0:t.includes(e))}));(null==t?void 0:t.length)&&t.map((function(e){var t;return r.store.deleteImage({id:e,workspace:null===(t=r.state.detail)||void 0===t?void 0:t.workspace})})),r.props.onOk(a)}));case 4:case"end":return e.stop()}}),e)}))),r.onCancel=function(){var e=r.state.oldScreenshots;r.handleAppChange(e,"attachments"),r.props.onCancel()},r.store=r.props.store,r.categoryStore=new M.default,r.fileStore=new P.default,r.formRef=g.default.createRef(),r.state={detail:(0,D.default)((0,E.toJS)(r.props.detail)),oldScreenshots:(0,_.default)(r.props.detail,"attachments")},r}return(0,p.default)(a,[{key:"componentDidMount",value:function(){this.categoryStore.fetchList({noLimit:!0})}},{key:"render",value:function(){var e=this.props,t=e.visible,a=e.isSubmitting,r=(e.onCancel,(0,u.default)(e,["visible","isSubmitting","onCancel"])),n=(0,E.toJS)((0,_.default)(this.categoryStore,"list.data",[])),o=this.state.detail;return g.default.createElement(T.default,(0,l.default)({},r,{className:A.default.modal,bodyClassName:A.default.body,onOk:this.handleOk,onCancel:this.onCancel,visible:t,isSubmitting:a,fullScreen:!0}),g.default.createElement(N.Columns,{className:"height-full is-gapless"},g.default.createElement(N.Column,{className:"is-narrow"},g.default.createElement(R.default,{store:this.store,formData:o,categories:n,fileStore:this.fileStore,formRef:this.formRef,handleChange:this.handleAppChange})),g.default.createElement(N.Column,null,g.default.createElement(w.default,{handleChange:this.handleAppChange,store:this.store,detail:o,fileStore:this.fileStore}),g.default.createElement(I.default,{handleChange:this.handleAppChange,store:this.store,detail:o}))))}}]),a}(g.Component),c.propTypes={store:y.default.object,detail:y.default.object,visible:y.default.bool,onOk:y.default.func,onCancel:y.default.func},c.defaultProps={store:{},detail:{},visible:!1,onOk:function(){},onCancel:function(){}},i=s))||i;t.default=L},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.APP_TEMPLATE_VERSION_FORM=t.APP_TEMPLATES_FORM=void 0;var n=r(a(2517)),l=r(a(932)),u=[{title:"BASIC_INFORMATION",icon:"cdn",component:n.default,required:!0},{title:"POD_SETTINGS",icon:"docker",component:l.default,required:!0}];t.APP_TEMPLATES_FORM=u;var o=[{title:"BASIC_INFORMATION",icon:"cdn",component:l.default,required:!0}];t.APP_TEMPLATE_VERSION_FORM=o},,,,,,,,,,,,,,,,,,,function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(31),r(84),r(18),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(5),r(31),r(84),r(18),r(4),r(85);var l=n(r(26)),u=n(r(60)),o=n(r(0)),i=n(r(1)),c=r(186),s=n(r(790)),f=n(r(1108)),d=n(r(1608)),p=function(e){var a=e.index,r=e.rule,n=e.tls,i=void 0===n?[]:n,p=e.projectDetail,m=e.onDelete,h=e.onEdit,v=i.find((function(e){return e.hosts&&e.hosts.includes(r.host)})),g=v?"https":"http",y=(0,u.default)(r.clusters)&&r.clusters.map((function(e){return{name:e}}));return o.default.createElement("div",{className:d.default.item},o.default.createElement("div",{className:d.default.texts},o.default.createElement(s.default,{icon:"earth",title:r.host,description:o.default.createElement("div",{className:d.default.description},o.default.createElement("span",null,t("PROTOCOL_VALUE",{value:g.toUpperCase()})),"https"===g&&o.default.createElement("span",null,t("CERTIFICATE_VALUE",{value:v.secretName})))}),(0,u.default)(y)&&o.default.createElement(s.default,{title:o.default.createElement(f.default,{clusters:y,clustersDetail:p.clusters}),description:t("CLUSTER")})),o.default.createElement("div",{className:d.default.paths},r.http.paths.map((function(e,a){return o.default.createElement("div",{key:"".concat(e.path,"-").concat(a),className:d.default.path},o.default.createElement(c.Columns,null,o.default.createElement(c.Column,null,o.default.createElement("span",null,t("PATH_VALUE",{value:e.path}))),o.default.createElement(c.Column,null,o.default.createElement("span",null,t("SERVICE_VALUE",{value:(0,l.default)(e,"backend.service.name")}))),o.default.createElement(c.Column,null,o.default.createElement("span",null,t("PORT_VALUE",{value:(0,l.default)(e,"backend.service.port.number")})))))}))),o.default.createElement("div",{className:"buttons"},o.default.createElement(c.Button,{type:"flat",icon:"trash",onClick:function(){return m(a)}}),o.default.createElement(c.Button,{type:"flat",icon:"pen",onClick:function(){return h(a)}})))};p.propTypes={rule:i.default.object};var m=p;a.default=m},function(e,t,a){e.exports={wrapper:"_284aGjeDc3Uk3LO7g2rowk",item:"my6nlJHVChE52IZiKWdVb",texts:"_1yy5gvLzkXqOotnVq-jQ6u",description:"_1tlfloLSiJeUMQ-FyCn8CE",clusters:"_1syXUJ7F5BYlpz5yEGJFbc",text:"rs7zBfbhTmwlfIFuDt9am",title:"_1gOz0zu0HbDowoy4JxPNfJ",add:"_2rqJgLlKvmtvwGzZG3jKXD",paths:"_3IlHyvAlhdaotlptF5rQ4w",path:"_3yf0E7_uPDFXwIFcT8Q_aV",error:"_2XVUGBf34mWkPMEhwt3zCO"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(84),r(86),r(18),r(192),r(16),r(10),r(4),r(316),r(23),r(17),r(85),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(6),r(84),r(86),r(18),r(192),r(42),r(16),r(10),r(4),r(316),r(22),r(23),r(57),r(17),r(85),r(7);var l=n(r(43));r(41);var u=n(r(44)),o=n(r(58)),i=n(r(36)),c=n(r(37)),s=n(r(88)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(26)),h=n(r(74)),v=n(r(894)),g=n(r(194)),y=n(r(63)),E=n(r(0)),b=n(r(1)),_=r(186),O=n(r(240)),S=n(r(787)),C=n(r(850)),D=r(52),k=n(r(435)),N=n(r(834)),T=n(r(2614)),R=n(r(2616)),w=n(r(2618)),I=n(r(2668)),M=n(r(2673)),P=n(r(2675));function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var j=function(e){(0,f.default)(n,e);var a,r=A(n);function n(e){var a;return(0,i.default)(this,n),(a=r.call(this,e)).handleOk=function(){var e,t=a.props.isFederated;if(e=a.state.isCodeMode&&(0,g.default)((0,m.default)((0,s.default)(a),"codeRef.current.getData"))?a.getFormDataFromCode(a.codeRef.current.getData()):a.state.formData,t){var r={},n=e,l=n.application,u=n.ingress,i=(0,o.default)(n,["application","ingress"]);r.Application=l,r.Ingress=u;var c=[];Object.keys(i).forEach((function(e){var t=i[e];t.Deployment&&(c=(0,m.default)(t.Deployment,"spec.overrides").map((function(e){return e.clusterName}))),r["".concat(e,"-workload")]=t.workload,r["".concat(e,"-service")]=t.service})),e=r,(0,v.default)(e,(function(e){var t=(0,m.default)(e,"spec.overrides",[]);!(0,y.default)(c)&&t.forEach((function(e,a){c.includes(e.clusterName)||t.splice(a,1)}));var a=(0,m.default)(e,"spec.placement.clusters",[]);return!(0,y.default)(c)&&a.forEach((function(e,t){c.includes(e.name)||a.splice(t,1)})),e}))}0===(0,m.default)(e,"Ingress.spec.template.spec.rules.length",0)&&delete e.Ingress,a.props.onOk(e)},a.handlePrev=function(){a.setState((function(e){var t=e.currentStep;return{currentStep:Math.max(0,t-1)}}))},a.handleNext=function(){var e=a.formRef.current;e&&e.validate((function(){a.setState((function(e){var t=e.currentStep;return{currentStep:Math.min(a.steps.length-1,t+1)}}))}))},a.handleModeChange=function(){a.setState((function(e){var r=e.isCodeMode,n=e.formData;return!r&&(0,g.default)((0,m.default)((0,s.default)(a),"resourcesFormRef.current.hasSubRoute"))&&a.resourcesFormRef.current.hasSubRoute()?O.default.warning(t("SAVE_FORM_TIP")):(r&&(0,g.default)((0,m.default)((0,s.default)(a),"codeRef.current.getData"))&&(n=a.getFormDataFromCode(a.codeRef.current.getData())),{isCodeMode:!r,formData:n})}))},a.handleAppLabelsChange=function(e){var t=a.state.formData,r=(t.application,t.ingress),n=(0,o.default)(t,["application","ingress"]);(0,D.mergeLabels)(r,e),Object.values(n).forEach((function(t){(0,D.mergeLabels)(t.service,e),(0,D.mergeLabels)(t.workload,e)}))},a.handleGovernanceChange=function(e){var t=a.props.isFederated,r=a.state.formData,n=(r.application,r.ingress,(0,o.default)(r,["application","ingress"]));a.setState({isGovernance:"true"===e}),Object.values(n).forEach((function(a){(0,h.default)(a.workload,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',e),(0,h.default)(a.service,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',e),(0,h.default)(a.workload,'spec.template.metadata.annotations["sidecar.istio.io/inject"]',e),t&&((0,D.updateFederatedAnnotations)(a.workload),(0,D.updateFederatedAnnotations)(a.service))}))},a.state={currentStep:0,formData:a.federatedWrapper({application:k.default.applications({namespace:e.namespace}),ingress:k.default.ingresses({namespace:e.namespace})}),isCodeMode:!1,isGovernance:!1},a.formRef=E.default.createRef(),a.codeRef=E.default.createRef(),a.gatewayStore=new N.default,a}return(0,c.default)(n,[{key:"componentDidMount",value:function(){var e=this;this.props.isFederated?((0,h.default)(this.state.formData.application,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',"false"),this.setState({isGovernance:!1})):this.fetchData().then((function(){var t=e.props.sampleApp;t&&e.fetchSampleData(t)}))}},{key:"federatedWrapper",value:function(e){var t=this.props,a=t.isFederated,r=t.projectDetail;if(a){Object.keys(e).forEach((function(t){e[t]=k.default.federated({data:e[t],clusters:r.clusters.map((function(e){return e.name})),kind:e[t].kind})}));var n=(0,m.default)(e.application,"spec.template.metadata.labels",{});(0,h.default)(e.application,"metadata.labels",n)}return e}},{key:"setServicemeshValue",value:function(e){var t=this.props.isFederated,a=this.state.isGovernance,r=e.application,n=(e.ingress,(0,o.default)(e,["application","ingress"])),l=String(a);(0,h.default)(r,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',l),Object.values(n).forEach((function(e){(0,h.default)(e.workload,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',l),(0,h.default)(e.service,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',l),(0,h.default)(e.workload,'spec.template.metadata.annotations["sidecar.istio.io/inject"]',l),t&&((0,D.updateFederatedAnnotations)(e.workload),(0,D.updateFederatedAnnotations)(e.service))}))}},{key:"fetchSampleData",value:function(e){var t=this,a=this.props,r=a.namespace,n=a.store,l=this.state.gateway;n.fetchSampleData(e).then((function(e){var a=t.getFormDataFromCode(e);(0,h.default)(a.ingress,'metadata.annotations["nginx.ingress.kubernetes.io/upstream-vhost"]',"productpage.".concat((0,D.withDot)(r),"svc.cluster.local")),(0,y.default)(l)?(0,h.default)(a.ingress,"spec.rules",[]):(0,h.default)(a.ingress,"spec.rules[0].host","productpage.".concat((0,D.withDot)(r)).concat((0,D.withDot)(l.ingressIp),"nip.io")),t.setServicemeshValue(a),t.setState({formData:a})}))}},{key:"getFormDataFromCode",value:function(e){var t=this.props.namespace,a={};return e.forEach((function(e){if((0,h.default)(e,"metadata.namespace",t),-1!==e.kind.indexOf("Application"))a.application=e;else if(-1!==e.kind.indexOf("Service")){var r=(0,m.default)(e,"metadata.labels.app");(0,h.default)(a,"".concat(r,".service"),e)}else if(-1!==e.kind.indexOf("Ingress"))a.ingress=e;else{var n=(0,m.default)(e,"metadata.labels.app");(0,h.default)(a,"".concat(n,".workload"),e)}})),a}},{key:"fetchData",value:(a=(0,u.default)(l.default.mark((function e(){var t,a,r,n,u,o,i=this;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,a=t.cluster,r=t.namespace,n=function(){return i.gatewayStore.getNewGatewayByProject({namespace:r,cluster:a})},e.next=4,n();case 4:u=e.sent,o=!!this.serviceMeshEnable,(0,h.default)(this.state.formData.application,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',String(o)),this.setState({gateway:(0,m.default)(u,"[0]"),isGovernance:o});case 8:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"renderHeader",value:function(){var e=this.props.onCancel,a=this.state,r=a.currentStep,n=a.isCodeMode;return E.default.createElement("div",{className:P.default.header},E.default.createElement("div",{className:P.default.title},E.default.createElement(_.Icon,{name:"close",size:20,clickable:!0,onClick:e}),E.default.createElement("span",null),E.default.createElement(_.Icon,{name:"appcenter",size:20}),E.default.createElement("span",null,t("CREATE_COMPOSED_APP"))),!n&&E.default.createElement("div",{className:P.default.steps},E.default.createElement("div",null),E.default.createElement(T.default,{steps:this.steps,current:r})),E.default.createElement(C.default,{className:P.default.switch,text:t("EDIT_YAML"),onChange:this.handleModeChange,checked:n}),E.default.createElement("div",{className:P.default.headerBottom}))}},{key:"renderForm",value:function(){var e=this.props,t=e.cluster,a=e.namespace,r=e.store,n=e.isFederated,l=e.projectDetail,u=this.state,o=u.formData,i=u.gateway,c=u.currentStep,s=u.isGovernance,f=this.steps[c],d=f.component,p={store:r,cluster:t,namespace:a,formData:o,gateway:i,isGovernance:s,isFederated:n,projectDetail:l,serviceMeshEnable:this.serviceMeshEnable,onLabelsChange:this.handleAppLabelsChange,onGovernanceChange:this.handleGovernanceChange};return f.isForm?p.formRef=this.formRef:p.ref=this.formRef,E.default.createElement("div",{className:P.default.wrapper},E.default.createElement("div",{className:P.default.form},E.default.createElement(d,p)))}},{key:"renderCode",value:function(){var e=this.state.formData;return E.default.createElement(M.default,{ref:this.codeRef,formTemplate:e})}},{key:"renderFooter",value:function(){var e=this.props,a=e.onCancel,r=e.store,n=this.state,l=n.currentStep;if(n.isCodeMode)return E.default.createElement("div",{className:P.default.footer},E.default.createElement("div",{className:P.default.wrapper},E.default.createElement("div",{className:"text-right"},E.default.createElement(_.Button,{onClick:a},t("CANCEL")),E.default.createElement(_.Button,{type:"control",onClick:this.handleOk,loading:r.isSubmitting},t("CREATE")))));var u=this.steps.length-1;return E.default.createElement("div",{className:P.default.footer},E.default.createElement("div",{className:P.default.wrapper},E.default.createElement("div",{className:"text-right"},E.default.createElement(_.Button,{onClick:a},t("CANCEL")),l>0&&E.default.createElement(_.Button,{type:"control",onClick:this.handlePrev},t("PREVIOUS")),l0)return r({message:o.join("; "),field:e.field});r()},n.state={formTemplate:n.props.formTemplate},n}return(0,o.default)(r,[{key:"render",value:function(){var e,a,r,n,l=this,u=this.props,o=u.formRef,i=u.formTemplate,c=u.isEdit,s=u.className;c||(0,m.default)(i,"metadata.labels['infra.edgewize.io/hosted']",null!==(e=null===(a=this.options[0])||void 0===a?void 0:a.value)&&void 0!==e?e:null===(r=this.options[0])||void 0===r||null===(n=r.options[0])||void 0===n?void 0:n.value);return f.default.createElement(v.Form,{ref:o,data:i,className:(0,d.default)(y.default.wrapper,s),onChange:function(e,t){"metadata.name"===e&&l.setState((function(e){var a=e.formTemplate;return a.spec.name=t,a.spec.namespace=t,{formTemplate:a}}))}},f.default.createElement(v.Form.Item,{label:t("CLUSTER_NAME"),desc:t("NAME_DESC"),rules:[{required:!0,message:t("CLUSTER_NAME_EMPTY")},{pattern:g.PATTERN_NAME,message:t("INVALID_NAME_DESC")},{validator:this.nameValidator}]},f.default.createElement(v.Input,{name:"metadata.name",maxLength:63,disabled:c})),f.default.createElement(v.Form.Item,{label:t("ALIAS"),desc:t("ALIAS_DESC")},f.default.createElement(v.Input,{name:["metadata","annotations","kubesphere.io/alias-name"],maxLength:63})),c&&f.default.createElement(f.default.Fragment,null,f.default.createElement(v.Form.Item,{label:t("HOSTED_IN"),desc:t("HOSTED_IN_DESC"),rules:[{required:!0,message:t("HOSTED_IN_EMPTY")}]},f.default.createElement(v.Select,{searchable:!0,placeholder:" ",name:["metadata","labels","infra.edgewize.io/hosted"],options:this.options,disabled:!0})),f.default.createElement(v.Form.Item,{label:t("ADVERTISE_ADDRESS"),desc:t("ADVERTISE_ADDRESS_DESC"),rules:[{required:!0,message:t("HOSTED_IN_EMPTY")},{pattern:g.PATTERN_IP,message:t("INVALID_IP_DESC")}]},f.default.createElement(v.Input,{name:["metadata","labels","infra.edgewize.io/advertise-address"],disabled:!0}))),f.default.createElement(v.Form.Item,{label:t("DESCRIPTION"),desc:t("DESCRIPTION_DESC")},f.default.createElement(v.TextArea,{name:["metadata","annotations","kubesphere.io/description"],maxLength:256})))}},{key:"options",get:function(){var e=this.props.hostedInOptions,t=void 0===e?[]:e,a=(0,p.default)(this.state.formTemplate,"metadata.name");return!globals.app.isMultiCluster&&a?[{label:a,value:a}]:t}}]),r}(f.default.Component))||l;a.default=b},,function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1110)).default);t.default=c},,,,,,,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(320),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(320),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(43)),l=r(a(61)),u=r(a(30)),o=r(a(58));a(41);var i,c=r(a(44)),s=r(a(36)),f=r(a(37)),d=r(a(55)),p=r(a(56)),m=r(a(51)),h=r(a(49)),v=a(14),g=r(a(26));function y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function E(e){for(var t=1;t0&&void 0!==h[0]?h[0]:{},a=t.cluster,r=t.workspace,u=t.namespace,i=t.more,c=t.devops,s=t.searchByApp,f=(0,o.default)(t,["cluster","workspace","namespace","more","devops","searchByApp"]),this.list.isLoading=!0,e.next=4,request.get(this.getResourceUrl({cluster:a,workspace:r,namespace:u,devops:c}),this.getFilterParams(E({searchByApp:s},f)));case 4:return d=e.sent,p=((0,g.default)(d,"items")||[]).map((function(e){return E({cluster:a,namespace:u},m.mapper(e))})).sort((function(e,t){return new Date(t.createTime).getTime()-new Date(e.createTime).getTime()})),this.list.update(E(E({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(p)):p},f),{},{isLoading:!1})),e.abrupt("return",p);case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(r(a(1053)).default),(0,h.default)(i.prototype,"fetchList",[v.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),i);t.default=_},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(84),a(18),a(4),a(23),a(17),a(85),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(11),a(84),a(18),a(42),a(4),a(23),a(57),a(17),a(85);var n=r(a(30)),l=r(a(61)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=r(a(1)),p=r(a(3)),m=a(186),h=r(a(2918));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=function(e){(0,i.default)(a,e);var t=v(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,n=new Array(r),o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return request.post("".concat(this.apiVersion).concat(this.getPath(t),"/").concat(this.module),e)}},{key:"apiVersion",get:function(){return"kapis/notification.kubesphere.io/v2beta2"}}]),a}(r(a(1012)).default),(0,s.default)(n.prototype,"checkInfo",[f.action],Object.getOwnPropertyDescriptor(n.prototype,"checkInfo"),n.prototype),n);t.default=p},function(e,t,a){e.exports={title:"Bq_DxvwoIbzNgUSGKKu74",urlInput:"_2iZy25kg8Y2xv_sPplOguB",row:"hJoducYzaKZSPuoAyXEF2",item:"_3Ut4KGvHM3y-EKah95yER_",wrapper:"_1y_QA9-eVFRkSPgVLTD4wj",listWrapper:"_2nnbmvgr5xxxdGUFDz24co",listItem:"_3QzQe3Rj1Hb6gV7rN2TR6t",annotation:"_1T2F7a_9lb3gfvILxQLV-b",desc:"_1oKV-aygbwGohZMHFzZVge"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(84),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(84),r(42),r(4),r(23),r(57),r(17),r(85);var u=l(r(315)),o=l(r(58)),i=l(r(36)),c=l(r(37)),s=l(r(55)),f=l(r(56)),d=l(r(51)),p=n(r(0)),m=l(r(26)),h=r(186),v=l(r(240)),g=l(r(1061)),y=l(r(3128)),E=l(r(1379)),b=l(r(1378));function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var O=h.Tabs.TabPanel,S=function(e){(0,s.default)(r,e);var a=_(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;un-1)v.default.error({content:t.html("MAX_CID_COUNT",{count:n}),durantion:1e3});else{if(!r.includes(a))return!0;v.default.error({content:t("CHAT_ID_EXISTS"),duration:1e3})}else v.default.error({content:t("ENTER_CHAT_ID_DESC"),durantion:1e3})},e.validateKeywords=function(a){var r=(0,m.default)(e.props.data,"receiver.spec.dingtalk.chatbot.keywords",[]),n=globals.config.notification.dingtalk.max_number_of_keyword;if(a)if(r.length>n-1)v.default.error({content:t.html("MAX_KEYWORD_COUNT",{count:n}),durantion:1e3});else{if(!r.includes(a))return!0;v.default.error({content:t("KEYWORD_EXISTS"),duration:1e3})}else v.default.error({content:t("ENTER_KEYWORD_DESC"),durantion:1e3})},e}return(0,c.default)(r,[{key:"renderLabel",value:function(){return p.default.createElement("div",{className:b.default.labelWrapper},p.default.createElement("span",null,"Chat ID"),this.props.user&&p.default.createElement(h.Tooltip,{content:t("CHAT_ID_TIP")},p.default.createElement(h.Icon,{className:b.default.tip,name:"question"})))}},{key:"renderServiceSetting",value:function(){return p.default.createElement("div",{className:b.default.row},p.default.createElement("div",{className:b.default.title},t("APP_SETTINGS")),p.default.createElement("div",{className:b.default.item},p.default.createElement(h.Form.Item,{label:"App Key"},p.default.createElement(h.Input,{name:"secret.data.appkey"})),p.default.createElement(h.Form.Item,{label:"App Secret"},p.default.createElement(h.Input,{name:"secret.data.appsecret"}))))}},{key:"renderReceiverSetting",value:function(){var e=this.props.wrapperClassName;return p.default.createElement("div",{className:b.default.row},p.default.createElement("div",{className:b.default.title},p.default.createElement("span",null,t("RECIPIENT_SETTINGS"))),p.default.createElement("div",{className:b.default.item},p.default.createElement(h.Form.Item,{label:this.renderLabel()},p.default.createElement(y.default,{className:e,name:"receiver.spec.dingtalk.conversation.chatids",title:"Chat ID",placeholder:" ",validate:this.validateCid}))))}},{key:"renderChatSetting",value:function(){var e=this.props.wrapperClassName;return p.default.createElement("div",{className:b.default.row},p.default.createElement("div",{className:b.default.title},p.default.createElement("span",null,t("CHATBOT_SETTINGS"))),p.default.createElement("div",{className:b.default.item},p.default.createElement(h.Form.Item,{label:"Webhook URL"},p.default.createElement(h.Input,{name:"secret.data.webhook"})),p.default.createElement(h.Form.Item,{label:"Secret"},p.default.createElement(h.Input,{name:"secret.data.chatbotsecret"})),p.default.createElement(h.Form.Item,null,p.default.createElement(E.default,{className:e,name:"receiver.spec.dingtalk.chatbot.keywords",validate:this.validateKeywords}))))}},{key:"render",value:function(){var e=this.props,a=e.user,r=e.data,n=e.onChange,l=e.hideFooter,i=(0,o.default)(e,["user","data","onChange","hideFooter"]);return p.default.createElement(g.default,(0,u.default)({name:"dingtalk",module:"DingTalk",icon:"dingtalk",data:r,onChange:n,hideFooter:l,user:a},i),p.default.createElement(h.Tabs,{type:"button"},p.default.createElement(O,{label:t("CHAT_SETTINGS"),name:"conversation"},p.default.createElement(p.default.Fragment,null,!a&&this.renderServiceSetting(),this.renderReceiverSetting())),p.default.createElement(O,{label:t("CHATBOT_SETTINGS"),name:"chatbot"},this.renderChatSetting())))}}]),r}(p.Component);a.default=S},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(187),r(84),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(187),r(84),r(42),r(4),r(23),r(57),r(17),r(85);var u=l(r(315)),o=l(r(58)),i=l(r(36)),c=l(r(37)),s=l(r(55)),f=l(r(56)),d=l(r(51)),p=n(r(0)),m=l(r(26)),h=l(r(63)),v=r(186),g=l(r(240)),y=l(r(1314)),E=l(r(1061)),b=l(r(3130)),_=l(r(1717));function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var S=v.Tabs.TabPanel,C=function(e){(0,s.default)(r,e);var a=O(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;ul-1)g.default.error({content:t.html("MAX_".concat(r.toUpperCase(),"_COUNT"),{count:l}),duration:1e3});else{if(!n.includes(a))return!0;g.default.error({content:t("".concat(r.toUpperCase(),"_EXISTS")),duration:1e3})}else g.default.error({content:t("ENTER_".concat(r.toUpperCase(),"_TIP")),duration:1e3})},e.receiverValidator=function(a,r,n){if(["toParty","toUser","toTag"].every((function(t){return(0,h.default)((0,m.default)(e.props.data,"receiver.spec.wechat.".concat(t)))})))return n({message:t("RECIPIENT_SETTINGS_TIP")});n()},e.handleTypeChange=function(t){e.setState({type:t})},e.handleChatTypeChange=function(t){e.setState({chatbotType:t})},e}return(0,c.default)(r,[{key:"renderServiceSetting",value:function(){return p.default.createElement("div",{className:_.default.row},p.default.createElement("div",{className:_.default.title},t("SERVER_SETTINGS")),p.default.createElement("div",{className:_.default.item},p.default.createElement(v.Form.Item,{label:"Corp ID",rules:[{required:!0,message:t("ENTER_WECOM_CORP_ID_DESC")}]},p.default.createElement(v.Input,{name:"config.spec.wechat.wechatApiCorpId"})),p.default.createElement(v.Form.Item,{label:"Agent ID",rules:[{required:!0,message:t("ENTER_WECOM_AGENT_ID_DESC")}]},p.default.createElement(v.Input,{name:"config.spec.wechat.wechatApiAgentId"})),p.default.createElement(v.Form.Item,{label:"Secret",rules:[{required:!0,message:t("ENTER_WECOM_SECRET_DESC")}]},p.default.createElement(v.Input,{name:"secret.data.appsecret"}))))}},{key:"renderReceiverSetting",value:function(){var e=this.state.type,a=this.props.wrapperClassName;return p.default.createElement("div",{className:_.default.row},p.default.createElement("div",{className:_.default.title},t("RECIPIENT_SETTINGS")),p.default.createElement("div",{className:_.default.subTitle},t("RECIPIENT_SETTINGS_TIP")),p.default.createElement("div",{className:_.default.item},p.default.createElement("div",{className:"margin-b12"},p.default.createElement(y.default,{value:e,onChange:this.handleTypeChange,options:this.tabs})),p.default.createElement(v.Form.Item,{rules:[{validator:this.receiverValidator}]},p.default.createElement(b.default,{name:"receiver.spec.wechat.".concat(e),className:a,validate:this.validate,type:e}))))}},{key:"renderChatbotSetting",value:function(){return p.default.createElement("div",{className:_.default.row},p.default.createElement("div",{className:_.default.title},p.default.createElement("span",null,t("CHATBOT_SETTINGS"))),p.default.createElement("div",{className:_.default.item},p.default.createElement(v.Form.Item,{label:"Webhook URL"},p.default.createElement(v.Input,{name:"secret.data.webhook"}))))}},{key:"renderChatbotReceiverSetting",value:function(){var e=this.state.chatbotType,a=this.props.wrapperClassName;return p.default.createElement("div",{className:_.default.row},p.default.createElement("div",{className:_.default.title},t("RECIPIENT_SETTINGS")),p.default.createElement("div",{className:_.default.item},p.default.createElement("div",{className:"margin-b12"},p.default.createElement(y.default,{value:e,onChange:this.handleChatTypeChange,options:this.chatbotTabs})),p.default.createElement(v.Form.Item,null,p.default.createElement(b.default,{name:"receiver.spec.wechat.chatbot.".concat(e),className:a,validate:this.validate,type:e}))))}},{key:"render",value:function(){var e=this.props,a=e.user,r=e.data,n=e.onChange,l=e.hideFooter,i=(0,o.default)(e,["user","data","onChange","hideFooter"]);return p.default.createElement(E.default,(0,u.default)({name:"wechat",module:"WeCom",icon:"wecom",data:r,onChange:n,hideFooter:l,user:a},i),p.default.createElement(v.Tabs,{type:"button"},p.default.createElement(S,{label:t("CHAT_SETTINGS"),name:"conversation"},!a&&this.renderServiceSetting(),this.renderReceiverSetting()),p.default.createElement(S,{label:t("CHATBOT_SETTINGS"),name:"chatbot"},this.renderChatbotSetting(),this.renderChatbotReceiverSetting())))}},{key:"tabs",get:function(){return[{label:"User ID",value:"toUser"},{label:"Department ID",value:"toParty"},{label:"Tag ID",value:"toTag"}]}},{key:"chatbotTabs",get:function(){return[{label:"User ID",value:"atUsers"},{label:t("WHIZARD_NOTIFICATION.PHONE_NUMBER"),value:"atMobiles"}]}}]),r}(p.Component);a.default=C},function(e,t,a){e.exports={title:"IKj2QMOz04C12iP1VFDNL",subTitle:"_3K5t_PpqMH_7kKHPzcLCco",row:"ChmNt1kcK1XD-oKuGaup5",wrapper:"Z0KFimX54l9rVcMJUe3wp",item:"_1s7eK7cotVqGxPePQ3rUw7",boxWrapper:"_3AstjCLI3Fv8pmh3KAOBP8",empty:"_1W7NXKcHzz0De9UuYrjWm",tag:"_1Sx0_dd2bUpcOt6bBuHbQH"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(97),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(97),r(42),r(4),r(23),r(57),r(17);var u=l(r(315)),o=l(r(58)),i=l(r(36)),c=l(r(37)),s=l(r(55)),f=l(r(56)),d=l(r(51)),p=n(r(0)),m=l(r(26)),h=r(186),v=l(r(240)),g=l(r(1061)),y=l(r(1379)),E=l(r(3132));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var _=function(e){(0,s.default)(r,e);var a=b(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;ul-1)v.default.error({content:t.html("MAX_CHANNEL_COUNT",{count:l}),durantion:1e3});else{if(!n.some((function(e){return e===a})))return!0;v.default.error({content:t("CHANNEL_EXISTS"),duration:1e3})}else v.default.error({content:t("ADD_CHANNEL_TIP"),duration:1e3})},e}return(0,c.default)(r,[{key:"renderServiceSetting",value:function(){return p.default.createElement("div",{className:E.default.row},p.default.createElement("div",{className:E.default.title},t("SERVER_SETTINGS")),p.default.createElement("div",{className:E.default.item},p.default.createElement(h.Form.Item,{label:t("SLACK_TOKEN"),rules:[{required:!0,message:t("SLACK_TOKEN_DESC")}]},p.default.createElement(h.Input,{name:"secret.data.token"}))))}},{key:"renderReceiverSetting",value:function(){var e=this.props.wrapperClassName;return p.default.createElement("div",{className:E.default.row},p.default.createElement("div",{className:E.default.title},t("CHANNEL_SETTINGS")),p.default.createElement("div",{className:E.default.item},p.default.createElement(h.Form.Item,{rules:[{required:!0,message:t("ADD_CHANNEL_TIP")}]},p.default.createElement(y.default,{className:e,name:"receiver.spec.slack.channels",validate:this.validateChannel,title:t("SLACK_CHANNEL"),listTitle:t("ADDED_CHANNELS"),emptyDesc:t("EMPTY_CHANNEL_DESC")}))))}},{key:"render",value:function(){var e=this.props,t=e.user,a=e.data,r=e.onChange,n=e.hideFooter,l=(0,o.default)(e,["user","data","onChange","hideFooter"]);return p.default.createElement(g.default,(0,u.default)({name:"slack",module:"slack",icon:"slack",data:a,onChange:r,hideFooter:n,user:t},l),!t&&this.renderServiceSetting(),this.renderReceiverSetting())}}]),r}(p.Component);a.default=_},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var u=l(r(315)),o=l(r(58)),i=l(r(36)),c=l(r(37)),s=l(r(55)),f=l(r(56)),d=l(r(51)),p=n(r(0)),m=l(r(26)),h=r(186),v=l(r(1122)),g=l(r(1061)),y=l(r(3134));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var b=function(e){(0,s.default)(r,e);var a=E(r);function r(){var e;(0,i.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;ln-1)v.default.error({content:t.html("MAX_KEYWORD_COUNT",{count:n}),durantion:1e3});else{if(!r.includes(a))return!0;v.default.error({content:t("KEYWORD_EXISTS"),duration:1e3})}else v.default.error({content:t("ENTER_KEYWORD_DESC"),durantion:1e3})},e}return(0,c.default)(r,[{key:"renderServiceSetting",value:function(){return p.default.createElement("div",{className:E.default.row},p.default.createElement("div",{className:E.default.title},t("CHAT_SETTINGS")),p.default.createElement("div",{className:E.default.item},p.default.createElement(h.Form.Item,{label:"App Key"},p.default.createElement(h.Input,{name:"secret.data.appkey"})),p.default.createElement(h.Form.Item,{label:"App Secret"},p.default.createElement(h.Input,{name:"secret.data.appsecret"}))))}},{key:"renderReceiverSetting",value:function(){var e=this.props.wrapperClassName;return p.default.createElement("div",{className:E.default.row},p.default.createElement("div",{className:E.default.title},p.default.createElement("span",null,t("RECIPIENT_SETTINGS")),p.default.createElement("p",{className:E.default.subtitle},t("FEISHU_RECEIPIENT_SETTINGS_DESC"))),p.default.createElement("div",{className:E.default.item},p.default.createElement(h.Tabs,{type:"button"},p.default.createElement(_,{label:t("USER_ID"),name:"conversation"},p.default.createElement(h.Form.Item,null,p.default.createElement(y.default,{className:e,title:t(""),listTitle:t("TOUSER_LIST"),emptyDesc:t("EMPTY_TOUSER_DESC"),placeholder:" ",name:"receiver.spec.feishu.user",validate:this.validateKeywords}))),p.default.createElement(_,{label:t("DEPARTMENT_ID"),name:"chatbot"},p.default.createElement(h.Form.Item,null,p.default.createElement(y.default,{className:e,title:t(""),listTitle:t("TOPARTY_LIST"),emptyDesc:t("EMPTY_TOPARTY_DESC"),placeholder:" ",name:"receiver.spec.feishu.department",validate:this.validateKeywords}))))))}},{key:"renderChatSetting",value:function(){var e=this.props.wrapperClassName;return p.default.createElement("div",{className:E.default.row},p.default.createElement("div",{className:E.default.title},p.default.createElement("span",null,t("CHATBOT_SETTINGS"))),p.default.createElement("div",{className:E.default.item},p.default.createElement(h.Form.Item,{label:"Webhook URL"},p.default.createElement(h.Input,{name:"secret.data.webhook"})),p.default.createElement(h.Form.Item,{label:t("FEISHU_SECRET")},p.default.createElement(h.Input,{name:"secret.data.chatbotsecret"})),p.default.createElement(h.Form.Item,null,p.default.createElement(y.default,{className:e,name:"receiver.spec.feishu.chatbot.keywords",validate:this.validateKeywords}))))}},{key:"render",value:function(){var e=this.props,a=e.user,r=e.data,n=e.onChange,l=e.hideFooter,i=(0,o.default)(e,["user","data","onChange","hideFooter"]);return p.default.createElement(g.default,(0,u.default)({name:"feishu",module:"Feishu",icon:"feishu",data:r,onChange:n,hideFooter:l,user:a},i),p.default.createElement(h.Tabs,{type:"button"},p.default.createElement(_,{label:t("CHAT_SETTINGS"),name:"conversation"},!a&&this.renderServiceSetting(),p.default.createElement(p.default.Fragment,null,this.renderReceiverSetting())),p.default.createElement(_,{label:t("CHATBOT_SETTINGS"),name:"chatbot"},this.renderChatSetting())))}}]),r}(p.Component);a.default=O},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(10),r(4),r(23),r(24),r(17),r(64),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(191),r(42),r(159),r(10),r(4),r(23),r(57),r(24),r(17),r(64);var l=n(r(315)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=r(186),m=r(909),h=n(r(1268)),v=n(r(841)),g=n(r(3143));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var E=function(e){(0,i.default)(r,e);var a=y(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{};n.setState({checkStatus:e.status,resultInfo:e})},n.changeIcon=function(e){n.setState({icon:e})},n.onCancel=function(){n.props.onCancel(),n.reset()},n.createApp=(0,s.default)(c.default.mark((function e(){var t,a,r,l,u,o,i,s,f;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=n.props,a=t.type,r=t.onOk,(l=n.state.canCreate)?(u=n.state,o=u.icon,i=u.resultInfo,s=o||i.icon,f={version_type:"helm",name:i.name,base64Str:i.base64Str,icon:s},n.fileStore.uploadPackage(a,f,r).then((function(){n.reset()}))):n.setState({canCreate:!l});case 3:case"end":return e.stop()}}),e)}))),n.handleSubmit=function(){var e=n.props,a=e.appId,r=e.workspace,l=e.type,u=e.onOk,o=n.state.resultInfo;if("success"!==n.state.checkStatus)return b.default.error({content:"".concat(t("UPLOAD_PACKAGE_OK_NOTE"))}),!1;if("CREATE_APP"===l)n.createApp();else{var i={type:"helm",app_id:a,workspace:r,base64Str:o.base64Str};n.fileStore.uploadPackage(l,i,u).then((function(){n.setState({checkStatus:"init"})}))}},n.fileStore=new C.default,n.state={checkStatus:"init",canCreate:!1,resultInfo:{},icon:""},n}return(0,d.default)(r,[{key:"renderCheckFiles",value:function(){var e=this.props.errorFiles;return v.default.createElement("div",null,v.default.createElement("div",{className:k.default.checkFiles},v.default.createElement("ul",null,D.default.map((function(a){return v.default.createElement("li",{key:a.name,className:(0,y.default)((0,i.default)({},k.default.error,e.includes(a.name)))},v.default.createElement("span",{className:k.default.name},a.name),v.default.createElement("div",{className:k.default.description},"#  ",a.isOptional&&v.default.createElement("span",null,"[",t("OPTIONAL"),"]  "),t(a.description)))}))),"success"!==this.state.checkStatus&&v.default.createElement("div",{className:k.default.configMask})))}},{key:"render",value:function(){var e=this.props,t=e.appId,a=(0,o.default)(e,["appId"]),r=this.state,n=r.canCreate,l=r.resultInfo;return v.default.createElement(_.default,(0,u.default)({width:960,bodyClassName:k.default.body},a,{onOk:this.handleSubmit,onCancel:this.onCancel,disableSubmit:!l.name}),v.default.createElement("div",{className:k.default.content},v.default.createElement("div",{className:k.default.helmIcon},v.default.createElement(E.Icon,{name:"helm",size:60})),v.default.createElement(O.default,{className:(0,y.default)(k.default.upload,(0,i.default)({},k.default.canCreate,n)),canCreate:n,changeCheckStatus:this.changeCheckStatus,fileStore:this.fileStore,appId:t}),n?v.default.createElement(S.default,{createInfo:l,uploadIcon:this.changeIcon,fileStore:this.fileStore}):this.renderCheckFiles()))}}]),r}(v.Component);a.default=T,T.propTypes={detail:g.default.object,visible:g.default.bool,isSubmitting:g.default.bool,errorFiles:g.default.array,appId:g.default.string,type:g.default.string,onOk:g.default.func,onCancel:g.default.func},T.defaultProps={visible:!1,isSubmitting:!1,errorFiles:[],type:"CREATE_APP",appId:"",onOk:function(){},onCancel:function(){}}},,function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(42),r(16),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=r(186),p=n(r(787)),m=n(r(3198));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(r,e);var a=h(r);function r(){var e;(0,l.default)(this,r);for(var t=arguments.length,n=new Array(t),u=0;u0&&void 0!==E[0]?E[0]:{},a=t.cluster,t.workspace,r=t.namespace,u=t.more,i=t.id,c=(0,o.default)(t,["cluster","workspace","namespace","more","id"]),this.list.isLoading=!0,c.sortBy||void 0!==c.ascending||(c.sortBy="createTime"),c.limit!==1/0&&-1!==c.limit||(c.limit=-1,c.page=1),s=this.getFilterParams(c),f=s.labelSelector,d=(0,o.default)(s,["labelSelector"]),p=f,f?p+=",app_instance=".concat(i):p="app_instance=".concat(i),c.limit=c.limit||10,e.next=10,request.get(this.getResourceUrl({cluster:a,namespace:r}),C(C({},d),{},{labelSelector:p}));case 10:return m=e.sent,h=((0,v.default)(m,"items")||[]).map((function(e){return C({cluster:a,namespace:r},y.mapper(e))})),g=m.totalItems||m.items.length,this.list.update(C(C({data:u?[].concat((0,l.default)(this.list.data),(0,l.default)(h)):h,total:g},c),{},{limit:Number(c.limit)||10,page:Number(c.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",h);case 15:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"create",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,y.default)(e,"metadata.name","".concat(t.cluster_id,"-").concat(e.metadata.name)),this.submitting(request.post(this.getListUrl(C(C({},t),{},{k8sOpt:!0})),e))}},{key:"createDefaultAlert",value:function(e,t){var a=t.name,r=t.namespace,n=t.cluster,l={};function u(e){return e=e.replaceAll("namespaceName",r).replaceAll("clusterId",a),JSON.parse(e)}switch(e){case O.RadonDBAppId.RedisCluster:case O.RadonDBAppId.RedisSentinel:l=u(JSON.stringify(_.redisAlertYaml));break;case O.RadonDBAppId.OpenSearch:l=u(JSON.stringify(_.openSearchAlertYaml));break;case O.RadonDBAppId.Kafka:l=u(JSON.stringify(_.kafkaAlertYaml));break;case O.RadonDBAppId.PostgreSQL:l=u(JSON.stringify(_.pgAlertYaml));break;case O.RadonDBAppId.MySQL:l=u(JSON.stringify(_.MySQLAlertYaml));break;default:l={}}if(!(0,g.default)(l))return this.submitting(request.post(this.getListUrl({cluster:n,namespace:r,name:a,k8sOpt:!0}),l))}}]),r}(b.default),(0,h.default)(i.prototype,"fetchList",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,h.default)(i.prototype,"create",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"create"),i.prototype),(0,h.default)(i.prototype,"createDefaultAlert",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"createDefaultAlert"),i.prototype),i);t.default=k},function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(11),r(18),r(16),r(4),r(23),r(24),r(17),r(136),r(818),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(160),r(18),r(42),r(16),r(4),r(23),r(57),r(17),r(818);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(3)),p=n(r(243)),m=n(r(26)),h=r(52),v=n(r(1001)),g=n(r(3234)),y=n(r(3236));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var b=function(e){(0,o.default)(r,e);var a=E(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"filterImages",value:function(e){return"string"==typeof e?e.split(",").map((function(e){return e.trim()})).filter(Boolean):Array.isArray(e)?e:[]}},{key:"renderVersionTable",value:function(){var e=this.props.versions,a=(0,m.default)(globals.user,"lang")||(0,h.getBrowserLang)();return s.default.createElement("table",{className:y.default.versions},s.default.createElement("thead",null,s.default.createElement("tr",null,s.default.createElement("th",null,t("VERSION_NUMBER")),s.default.createElement("th",null,t("UPDATE_LOG")))),s.default.createElement("tbody",null,e.map((function(e){var t=e.name,r=e.description,n=void 0===r?"-":r,l=e.status_time,u=e.version_id;return s.default.createElement("tr",{key:u},s.default.createElement("td",null,s.default.createElement("p",{className:y.default.name},t),s.default.createElement("p",{className:y.default.date},(0,p.default)(l).format("YYYY-MM-DD"))),s.default.createElement("td",null,s.default.createElement("pre",{className:y.default.desc},(0,m.default)(e,"description_".concat(a),n))))}))))}},{key:"renderAppDeployAgreement",value:function(){var e=this.props,a=e.isCheck,r=e.onChange,n=t.html("APP_DEPLOY_AGREEMENT_2");return s.default.createElement("div",{className:y.default.agree},s.default.createElement("p",null,t("APP_DEPLOY_AGREEMENT_1")),s.default.createElement("p",null,(0,h.htmlLinkControl)(n)),s.default.createElement("div",{className:"margin-t12"},s.default.createElement(Checkbox,{checked:a,onChange:r},t("APP_DEPLOY_AGREEMENT_CHEKC"))))}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.app,n=r.abstraction,l=r.screenshots;return s.default.createElement("div",{className:(0,d.default)(y.default.appInfo,a)},s.default.createElement("div",null,s.default.createElement("h3",{className:y.default.title},t("APP_INTRODUCTION")),s.default.createElement(v.default,{source:n||t("NONE")})),s.default.createElement("div",null,s.default.createElement("h3",{className:y.default.title},t("APP_SCREENSHOTS")),s.default.createElement(g.default,{images:this.filterImages(l)})),s.default.createElement("div",null,s.default.createElement("h3",{className:y.default.title},t("APP_VERSIONS_TITLE")),this.renderVersionTable()))}}]),r}(s.default.PureComponent);a.default=b,b.propTypes={className:f.default.string,app:f.default.object.isRequired,versions:f.default.array},b.defaultProps={app:{},versions:[]}},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(11),r(6),r(84),r(18),r(320),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(85),r(136),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(6),r(84),r(160),r(18),r(28),r(320),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(85),r(7);var l=n(r(30)),u=n(r(58)),o=n(r(43));r(41);var i,c,s,f=n(r(44)),d=n(r(36)),p=n(r(37)),m=n(r(55)),h=n(r(56)),v=n(r(51)),g=n(r(0)),y=n(r(1)),E=r(186),b=r(239),_=n(r(787)),O=n(r(195)),S=n(r(26)),C=n(r(63)),D=n(r(960)),k=n(r(3258));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){for(var t=1;tt.value?1:0}))}}]),r}(g.default.Component),c.propTypes={name:y.default.string,branches:y.default.array},c.defaultProps={branches:[],visible:!1,name:"",onOk:function(){},onCancel:function(){}},i=s))||i;a.default=w},,,,function(e,t,a){e.exports={pipeline_column:"nWZ33DmaBbhEDSesc0DiU",content:"_1-oRV7NPr1NxWnH05jzHGL",clickable:"_3YhfWUE0e_VnI4wVC083Mj"}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(28),a(42),a(4),a(23),a(57),a(17);var n=r(a(61)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=r(a(60)),d=r(a(63)),p=r(a(3272));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var h=function(e){(0,o.default)(a,e);var t=m(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,u=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/groups")},e.getDetailUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getResourceUrl(t),"/").concat(t.name)},e.getWatchListUrl=function(t){var a=t.workspace,r=(0,f.default)(t,["workspace"]);return"apis/iam.kubesphere.io/v1beta1/watch".concat(e.getPath(r),"/groups?labelSelector=kubesphere.io/workspace=").concat(a)},e}return(0,m.default)(y,[{key:"getPath",value:function(e){var t=e.cluster,a=e.workspace,r=e.namespace,n=e.devops,l="";return t&&(l+="/klusters/".concat(t)),r?"".concat(l,"/namespaces/").concat(r):n?"".concat(l,"/namespaces/").concat(n):a?"".concat(l,"/workspaces/").concat(a):l}},{key:"fetchGroup",value:(o=(0,s.default)(l.default.mark((function e(){var t,a,r,n,u,o,i=this,c=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=c.length>0&&void 0!==c[0]?c[0]:{},r=a.workspace,n=(0,f.default)(a,["workspace"]),this.isLoading=!0,n.sortBy="createTime",n.limit=-1,e.next=6,request.get(this.getResourceUrl(N({workspace:r},n)));case 6:u=e.sent,o=null===(t=(0,_.default)(u,"items",[]))||void 0===t?void 0:t.map((function(e){return N({},i.mapper(e))})),this.total=(0,_.default)(u,"totalItems"),this.treeData=[{key:"root",title:r,group_id:"root",group_name:r,path:[r],children:(0,C.formatTreeData)(o,r)}],this.rowTreeData=(0,C.flattenTreeData)(this.treeData),this.isLoading=!1,this.list.update(N(N({data:o,total:u.totalItems||0},n),{},{limit:Number(n.limit)||10,page:Number(n.page)||1,isLoading:!1}));case 13:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"create",value:function(e,t){var a=(0,_.default)(e,'metadata.annotations["kubesphere.io/project-roles"]',[]),r=(0,_.default)(e,'metadata.annotations["kubesphere.io/devops-roles"]',[]);return(0,O.default)(e,'metadata.annotations["kubesphere.io/project-roles"]',JSON.stringify(a)),(0,O.default)(e,'metadata.annotations["kubesphere.io/devops-roles"]',JSON.stringify(r)),this.submitting(request.post(this.getResourceUrl(t),e))}},{key:"createGroup",value:(u=(0,s.default)(l.default.mark((function e(t,a){var r,u,o,i,c,s,d,p=this;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.create((0,S.default)(t),a);case 2:return r=e.sent,u=(0,_.default)(r,"metadata.name"),o=(0,_.default)(t,'metadata.annotations["kubesphere.io/workspace-role"]'),i=(0,_.default)(t,'metadata.annotations["kubesphere.io/project-roles"]',[]),c=(0,_.default)(t,'metadata.annotations["kubesphere.io/devops-roles"]',[]),s=[this.addWorkspaceRoleBinding([{username:u,roleRef:o}],a)],(d=[].concat((0,n.default)(i),(0,n.default)(c))).length>0&&d.forEach((function(e){var t=e.role,a=(0,f.default)(e,["role"]);return t&&s.push(p.addRolebindings([{username:u,roleRef:t}],N({},a)))})),e.abrupt("return",this.submitting(Promise.all(s)));case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"update",value:(r=(0,s.default)(l.default.mark((function e(t,a,r){var u,o,i,c,s,f,d,p,m,h,v,g,y,E;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=(0,_.default)(t,"metadata.name"),o={},i=(0,_.default)(t,'metadata.annotations["kubesphere.io/alias-name"]'),c=(0,_.default)(t,'metadata.annotations["kubesphere.io/workspace-role"]'),s=(0,_.default)(t,'metadata.annotations["kubesphere.io/project-roles"]',[]),f=(0,_.default)(t,'metadata.annotations["kubesphere.io/devops-roles"]',[]),(0,O.default)(o,'metadata.annotations["kubesphere.io/alias-name"]',i),(0,O.default)(o,'metadata.annotations["kubesphere.io/workspace-role"]',c),(0,O.default)(o,'metadata.annotations["kubesphere.io/project-roles"]',JSON.stringify(s)),(0,O.default)(o,'metadata.annotations["kubesphere.io/devops-roles"]',JSON.stringify(f)),d=[request.patch(this.getDetailUrl(N(N({},r),{},{name:u})),o)],p=(0,_.default)(a,'metadata.annotations["kubesphere.io/workspace-role"]'),c===p){e.next=19;break}return e.next=15,this.getWorkspaceRoleBinding(u,r);case 15:return m=e.sent,e.next=18,this.deleteWorkspaceRoleBinding((0,_.default)(m,"items[0].metadata.name"),r);case 18:d.push(this.addWorkspaceRoleBinding([D.default.workspacerolebinding({name:u,role:c})],r));case 19:return h=(0,_.default)(a,'metadata.annotations["kubesphere.io/project-roles"]'),v=(0,_.default)(a,'metadata.annotations["kubesphere.io/devops-roles"]'),g=[].concat((0,n.default)(s),(0,n.default)(f)),y=[].concat((0,n.default)(h),(0,n.default)(v)),(E=this.getUpdateRolebindsRequests(g,y,t)).length>0&&d.push(E),e.abrupt("return",this.submitting(Promise.all(d)));case 26:case"end":return e.stop()}}),e,this)}))),function(e,t,a){return r.apply(this,arguments)})},{key:"getUpdateRolebindsRequests",value:function(e,t,a){var r=this,n=(0,_.default)(a,"metadata.name"),l=[];return e.forEach((function(e){var a=e.role,u=e.namespace,o=e.cluster;t.find((function(e){return e.cluster===o&&e.namespace===u&&e.role===a}))||l.push(r.addRolebindings([D.default.rolebinding({name:n,role:a})],{cluster:o,namespace:u}))})),t.forEach((function(t){var a=t.namespace,n=t.cluster,u=t.role,o=t.name;e.find((function(e){return e.cluster===n&&e.namespace===a&&e.role===u}))||l.push(r.deleteRolebindings(o,{cluster:n,namespace:a}))})),l}},{key:"checkName",value:(a=(0,s.default)(l.default.mark((function e(t){var a,r,n;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=(0,f.default)(t,["name"]),e.next=3,request.get("".concat(this.getResourceUrl(r)),{name:a});case 3:if(!(n=e.sent).items||!n.items.some((function(e){return(0,_.default)(e,"metadata.generateName")===a}))){e.next=6;break}return e.abrupt("return",{exist:!0});case 6:return e.abrupt("return",{exist:!1});case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"addGroupBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.post("".concat(this.apiVersion).concat(this.getPath(t),"/groupbindings"),e)}},{key:"deleteGroupBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.delete("".concat(this.apiVersion).concat(this.getPath(t),"/groupbindings/").concat(e))}},{key:"addWorkspaceRoleBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.post("".concat(this.apiVersion).concat(this.getPath(t),"/workspacemembers"),e)}},{key:"deleteWorkspaceRoleBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.delete("".concat(this.apiVersion).concat(this.getPath(t),"/workspacemembers/").concat(e))}},{key:"addRolebindings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.post("".concat(this.apiVersion).concat(this.getPath(t),"/namespacemembers"),e)}},{key:"deleteRolebindings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.delete("".concat(this.apiVersion).concat(this.getPath(t),"/namespacemembers/").concat(e))}},{key:"getGroupBinding",value:function(e){var t=e.group,a=e.user,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.get("".concat(this.apiVersion).concat(this.getPath(r),"/groupbindings"),{labelSelector:"iam.kubesphere.io/group-ref=".concat(t,",iam.kubesphere.io/user-ref=").concat(a)})}},{key:"getWorkspaceRoleBinding",value:(t=(0,s.default)(l.default.mark((function e(t,a){var r,n,u,o,i;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.cluster,n=a.workspace,u=a.namespace,o=(0,f.default)(a,["cluster","workspace","namespace"]),i=o,t&&(i.labelSelector="iam.kubesphere.io/group-ref=".concat(t)),e.next=5,request.get("".concat(this.apiVersion).concat(this.getPath({cluster:r,workspace:n,namespace:u}),"/workspacemembers"),i);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})},{key:"getRoleBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.get("".concat(this.apiVersion).concat(this.getPath(t),"/namespacemembers"),{labelSelector:"iam.kubesphere.io/group-ref=".concat(e)})}},{key:"fetchRoleBinding",value:function(e,t){var a=this,r=t.clusters,n=(0,f.default)(t,["clusters"]),l=[];return r.length>0?r.forEach((function(t){l.push(a.getRoleBinding(e,N({cluster:t},n)))})):l.push(this.getRoleBinding(e,N({},n))),Promise.all(l)}},{key:"deleteGroup",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return request.delete("".concat(this.apiVersion).concat(this.getPath(t),"/groups/").concat(e))}},{key:"apiVersion",get:function(){return"kapis/iam.kubesphere.io/v1beta1"}}]),y}(r(a(68)).default),i=(0,E.default)(o.prototype,"treeData",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),c=(0,E.default)(o.prototype,"rowTreeData",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),(0,E.default)(o.prototype,"fetchGroup",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchGroup"),o.prototype),(0,E.default)(o.prototype,"create",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"create"),o.prototype),(0,E.default)(o.prototype,"createGroup",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"createGroup"),o.prototype),(0,E.default)(o.prototype,"update",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"update"),o.prototype),(0,E.default)(o.prototype,"checkName",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"checkName"),o.prototype),(0,E.default)(o.prototype,"addGroupBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"addGroupBinding"),o.prototype),(0,E.default)(o.prototype,"deleteGroupBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"deleteGroupBinding"),o.prototype),(0,E.default)(o.prototype,"addWorkspaceRoleBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"addWorkspaceRoleBinding"),o.prototype),(0,E.default)(o.prototype,"deleteWorkspaceRoleBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"deleteWorkspaceRoleBinding"),o.prototype),(0,E.default)(o.prototype,"addRolebindings",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"addRolebindings"),o.prototype),(0,E.default)(o.prototype,"deleteRolebindings",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"deleteRolebindings"),o.prototype),(0,E.default)(o.prototype,"getGroupBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"getGroupBinding"),o.prototype),(0,E.default)(o.prototype,"getWorkspaceRoleBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"getWorkspaceRoleBinding"),o.prototype),(0,E.default)(o.prototype,"getRoleBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"getRoleBinding"),o.prototype),(0,E.default)(o.prototype,"fetchRoleBinding",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchRoleBinding"),o.prototype),(0,E.default)(o.prototype,"deleteGroup",[b.action],Object.getOwnPropertyDescriptor(o.prototype,"deleteGroup"),o.prototype),o);t.default=R},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(6),a(18),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.getBreadCrumbData=t.flattenTreeData=t.formatTreeData=void 0;var n=r(a(61));a(5),a(11),a(6),a(18),a(859),a(4),a(7);t.formatTreeData=function(e,t){return null==e?void 0:e.map((function(a){var r=a;return r.children=[],r.path=[t,r.group_name],r.parent_id=a.parent_id||"root",e.forEach((function(e){r.group_id===e.parent_id&&(e.parent_name=r.group_name,e.path=[].concat((0,n.default)(r.path),[e.group_name]),r.children=[].concat((0,n.default)(r.children),[e]))})),"root"===r.parent_id?(r.parent_name=t,r):null})).filter((function(e){return e}))};t.flattenTreeData=function(e){var t={};return e.map((function e(a){var r;if(a.group_id&&(t[a.group_id]=a),(null==a||null===(r=a.children)||void 0===r?void 0:r.length)>0)return a.children.map((function(t){return e(t)}))})),t};t.getBreadCrumbData=function(e,t){for(var a=[],r=t[e];r;)a.unshift(r),r=t[r.parent_id];return a}},,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(18),a(16),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(42),a(16),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(315)),l=r(a(43));a(41);var u,o,i,c,s=r(a(44)),f=r(a(36)),d=r(a(37)),p=r(a(55)),m=r(a(56)),h=r(a(51)),v=r(a(49)),g=r(a(0)),y=r(a(1)),E=a(239),b=a(14),_=r(a(26)),O=r(a(902)),S=r(a(438)),C=a(3446);function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,h.default)(e);if(t){var n=(0,h.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,m.default)(this,a)}}var k=(0,E.observer)((c=i=function(e){(0,p.default)(r,e);var t,a=D(r);function r(){var e,t;(0,f.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u0&&void 0!==l[0]?l[0]:{},a={operation:"histogram",start_time:this.startTime,end_time:this.endTime,interval:this.interval},e.next=4,this.request((0,_.default)(a,t));case 4:r=e.sent,this.histograms=(0,O.default)(r,"histogram.histograms",[])||[],this.logsCount=(0,O.default)(r,"histogram.total",0);case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"handleResult",value:function(e){return e}}]),r}(r(a(1391)).default),u=(0,E.default)(l.prototype,"startTime",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),o=(0,E.default)(l.prototype,"endTime",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),i=(0,E.default)(l.prototype,"interval",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"15m"}}),c=(0,E.default)(l.prototype,"histograms",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),s=(0,E.default)(l.prototype,"logsCount",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),(0,E.default)(l.prototype,"fetch",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"fetch"),l.prototype),l);t.default=C},,,,,,,,,,,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(320),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(320),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(7);var n=r(a(58)),l=r(a(43)),u=r(a(30));a(41);var o,i,c,s,f,d,p,m,h,v,g,y=r(a(44)),E=r(a(65)),b=r(a(36)),_=r(a(37)),O=r(a(88)),S=r(a(55)),C=r(a(56)),D=r(a(51)),k=r(a(49)),N=(r(a(66)),a(14)),T=r(a(902)),R=r(a(26)),w=a(244),I=r(a(1396)),M=a(52);function P(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){for(var t=1;t0&&void 0!==c[0]?c[0]:{},a=c.length>1&&void 0!==c[1]?c[1]:{},r={operation:"query",start_time:this.startTime,end_time:this.endTime,log_query:this.log_query,pods:this.pods,sort:this.sort,containers:this.containers,from:this.from,size:this.size},n=(0,T.default)(r,t),e.next=6,this.requestLogs(n);case 6:u=e.sent,o=(0,R.default)(u,"query",{}),i=this.stripAnsiRecords(o.records),this.records=a.loadMore?this.records.concat(i):i,this.workspace=u.workspace,this.total=o.total||0,this.from=n.from,this.size=n.size,this.preParams=n;case 15:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"stripAnsiRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){return A(A({},e),{},{logStripANSI:(0,I.default)(e.log)})}))}},{key:"exportLinkFactory",value:function(e){var t=e.cluster,a=e.start_time,r=e.end_time,l=(0,n.default)(e,["cluster","start_time","end_time"]),u=(0,M.getClusterUrl)(this.getApiPath(t));return"/".concat(u,"?").concat((0,w.stringify)(A(A({sort:"asc"},l),{},{start_time:Math.floor(a/1e3),end_time:Math.floor(r/1e3),operation:"export",cluster:t})))}},{key:"haveMore",get:function(){return this.total>this.from+this.size}}]),o}(r(a(1391)).default),i=(0,k.default)(o.prototype,"size",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 10}}),c=(0,k.default)(o.prototype,"from",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),s=(0,k.default)(o.prototype,"total",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),f=(0,k.default)(o.prototype,"records",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),d=(0,k.default)(o.prototype,"log_query",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),p=(0,k.default)(o.prototype,"startTime",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),m=(0,k.default)(o.prototype,"endTime",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),h=(0,k.default)(o.prototype,"workspace",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),v=(0,k.default)(o.prototype,"pods",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),g=(0,k.default)(o.prototype,"containers",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),(0,k.default)(o.prototype,"setQuery",[N.action],Object.getOwnPropertyDescriptor(o.prototype,"setQuery"),o.prototype),(0,k.default)(o.prototype,"haveMore",[N.computed],Object.getOwnPropertyDescriptor(o.prototype,"haveMore"),o.prototype),(0,k.default)(o.prototype,"loadMoreLogs",[N.action],Object.getOwnPropertyDescriptor(o.prototype,"loadMoreLogs"),o.prototype),(0,k.default)(o.prototype,"fetch",[N.action],Object.getOwnPropertyDescriptor(o.prototype,"fetch"),o.prototype),o);t.default=L},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(18),a(16),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(42),a(16),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(315)),l=r(a(43));a(41);var u,o,i=r(a(44)),c=r(a(36)),s=r(a(37)),f=r(a(55)),d=r(a(56)),p=r(a(51)),m=r(a(49)),h=r(a(0)),v=a(239),g=a(14),y=r(a(26)),E=r(a(438)),b=a(3528);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var O=(0,v.observer)((o=function(e){(0,f.default)(r,e);var t,a=_(r);function r(){var e,t;(0,c.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u0&&void 0!==arguments[0]?arguments[0]:{};(0,O.default)(this,t),(0,_.default)(this,"isLoading",i,this),(0,_.default)(this,"histogramTodayData",c,this),(0,_.default)(this,"histogramData",s,this),(0,_.default)(this,"interval",f,this),(0,_.default)(this,"data",d,this),(0,_.default)(this,"from",p,this),(0,_.default)(this,"total",m,this),(0,_.default)(this,"size",h,this),(0,_.default)(this,"namespaces",v,this),(0,_.default)(this,"logsCount",g,this),(0,_.default)(this,"headers",y,this),(0,_.default)(this,"changeTimeRang",E,this),Object.getOwnPropertyNames(r).forEach((function(e){a[e]=r[e]})),this.headers={"X-Remote-User":e.globals.user.username}}var a,r,n;return(0,S.default)(t,[{key:"fetchUrl",value:function(){return"kapis/logging.kubesphere.io/v1alpha2/events"}},{key:"fetchTodayHistogram",value:(n=(0,b.default)(l.default.mark((function e(){var t,a,r,n,o,i,c,s=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),this.isLoading=!0,n={operation:"statistics",start_time:Math.ceil((0,R.default)().startOf("day").valueOf()/1e3),end_time:Math.ceil(Date.now()/1e3),interval:this.interval,cluster:a},e.next=5,(0,T.to)(request.get(this.fetchUrl(),(0,k.default)(n,r),{headers:this.headers}));case 5:o=e.sent,i=o.statistics,c=void 0===i?{}:i,this.isLoading=!1,this.histogramTodayData=c;case 10:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"fetchHistogram",value:(r=(0,b.default)(l.default.mark((function e(){var t,a,r,n,o,i,c,s=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),this.isLoading=!0,n={operation:"histogram",start_time:Math.ceil(Date.now()/1e3)-43200,end_time:Math.ceil(Date.now()/1e3),interval:this.interval,cluster:a},e.next=5,(0,T.to)(request.get(this.fetchUrl(),(0,k.default)(n,r),{headers:this.headers}));case 5:o=e.sent,i=o.histogram,c=void 0===i?{}:i,this.logsCount=c.total||0,this.isLoading=!1,this.histogramData=c;case 11:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"fetchQuery",value:(a=(0,b.default)(l.default.mark((function e(){var t,a,r,n,o,i,c,s,f,d=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),n=d.length>1&&void 0!==d[1]?d[1]:{},this.isLoading=!0,o={operation:"query",from:this.from,size:this.size,cluster:a},i=(0,k.default)(o,r),e.next=7,(0,T.to)(request.get(this.fetchUrl(),i),{headers:this.headers});case 7:c=e.sent,s=(0,N.default)(c,"query",{}),f=this.stripAnsiRecords(s.records||[]),this.data=n.loadMore?this.data.concat(f):f,this.total=s.total||0,this.isLoading=!1,this.from=i.from,this.size=i.size,this.preParams=i;case 16:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"stripAnsiRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){return M(M({},e),{},{logStripANSI:(0,w.default)(e.log)})}))}}]),t}(),i=(0,C.default)(o.prototype,"isLoading",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),c=(0,C.default)(o.prototype,"histogramTodayData",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),s=(0,C.default)(o.prototype,"histogramData",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),f=(0,C.default)(o.prototype,"interval",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"30m"}}),d=(0,C.default)(o.prototype,"data",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),p=(0,C.default)(o.prototype,"from",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),m=(0,C.default)(o.prototype,"total",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),h=(0,C.default)(o.prototype,"size",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 10}}),v=(0,C.default)(o.prototype,"namespaces",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),g=(0,C.default)(o.prototype,"logsCount",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),y=(0,C.default)(o.prototype,"headers",[D.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),E=(0,C.default)(o.prototype,"changeTimeRang",[D.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.time_rang=t,e.fetchQuery()}}}),(0,C.default)(o.prototype,"fetchTodayHistogram",[D.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchTodayHistogram"),o.prototype),(0,C.default)(o.prototype,"fetchHistogram",[D.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchHistogram"),o.prototype),(0,C.default)(o.prototype,"fetchQuery",[D.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchQuery"),o.prototype),o);t.default=P}).call(this,a(69))},function(e,a,r){"use strict";r(15),r(4),r(22);var n=r(20);r(18),r(10),r(24),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.toArray=function e(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[],n=Object.keys(t),l=a+1,i=0,c=n.length;i0&&void 0!==arguments[0]?arguments[0]:{};(0,C.default)(this,t),(0,S.default)(this,"isLoading",i,this),(0,S.default)(this,"isHistogramTodayLoading",c,this),(0,S.default)(this,"isHistogramLoading",s,this),(0,S.default)(this,"histogramTodayData",f,this),(0,S.default)(this,"histogramData",d,this),(0,S.default)(this,"interval",p,this),(0,S.default)(this,"data",m,this),(0,S.default)(this,"from",h,this),(0,S.default)(this,"total",v,this),(0,S.default)(this,"size",g,this),(0,S.default)(this,"namespaces",y,this),(0,S.default)(this,"logsCount",E,this),(0,S.default)(this,"headers",b,this),(0,S.default)(this,"changeTimeRang",_,this),Object.getOwnPropertyNames(r).forEach((function(e){a[e]=r[e]})),this.headers={"X-Remote-User":e.globals.user.username}}var a,r,n;return(0,D.default)(t,[{key:"fetchUrl",value:function(){return"kapis/logging.kubesphere.io/v1alpha2/auditing"}},{key:"fetchTodayHistogram",value:(n=(0,O.default)(l.default.mark((function e(){var t,a,r,n,o,i,c,s=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),this.isLoading=!0,this.isHistogramTodayLoading=!0,n={operation:"statistics",start_time:Math.ceil((0,I.default)().startOf("day").valueOf()/1e3),end_time:Math.ceil(Date.now()/1e3),interval:this.interval,cluster:a},e.next=6,(0,w.to)(request.get(this.fetchUrl(),(0,T.default)(n,r),{headers:this.headers}));case 6:o=e.sent,i=o.statistics,c=void 0===i?{}:i,this.isLoading=!1,this.isHistogramTodayLoading=!1,this.histogramTodayData=c;case 12:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"fetchHistogram",value:(r=(0,O.default)(l.default.mark((function e(){var t,a,r,n,o,i,c,s=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),this.isLoading=!0,this.isHistogramLoading=!0,n={operation:"histogram",start_time:Math.ceil(Date.now()/1e3)-43200,end_time:Math.ceil(Date.now()/1e3),interval:this.interval,cluster:a},e.next=6,(0,w.to)(request.get(this.fetchUrl(),(0,T.default)(n,r),{headers:this.headers}));case 6:o=e.sent,i=o.histogram,c=void 0===i?{}:i,this.logsCount=c.total||0,this.isLoading=!1,this.isHistogramLoading=!1,this.histogramData=c;case 13:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"fetchQuery",value:(a=(0,O.default)(l.default.mark((function e(){var t,a,r,n,o,i,c,s,f,d=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},a=t.cluster,r=(0,u.default)(t,["cluster"]),n=d.length>1&&void 0!==d[1]?d[1]:{},this.isLoading=!0,o={operation:"query",from:this.from,size:this.size,cluster:a},i=(0,T.default)(o,r),e.next=7,(0,w.to)(request.get(this.fetchUrl(),i,{headers:this.headers}));case 7:c=e.sent,s=(0,R.default)(c,"query",{}),f=this.stripAnsiRecords(s.records||[]),this.data=n.loadMore?this.data.concat(f):f,this.total=s.total||0,this.isLoading=!1,this.from=i.from,this.size=i.size,this.preParams=i;case 16:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"stripAnsiRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){return A(A({},e),{},{logStripANSI:(0,M.default)(e.log)})}))}}]),t}(),i=(0,k.default)(o.prototype,"isLoading",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),c=(0,k.default)(o.prototype,"isHistogramTodayLoading",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),s=(0,k.default)(o.prototype,"isHistogramLoading",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),f=(0,k.default)(o.prototype,"histogramTodayData",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),d=(0,k.default)(o.prototype,"histogramData",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),p=(0,k.default)(o.prototype,"interval",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"30m"}}),m=(0,k.default)(o.prototype,"data",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),h=(0,k.default)(o.prototype,"from",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),v=(0,k.default)(o.prototype,"total",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),g=(0,k.default)(o.prototype,"size",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 10}}),y=(0,k.default)(o.prototype,"namespaces",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),E=(0,k.default)(o.prototype,"logsCount",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),b=(0,k.default)(o.prototype,"headers",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),_=(0,k.default)(o.prototype,"changeTimeRang",[N.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.time_rang=t,e.fetchQuery()}}}),(0,k.default)(o.prototype,"fetchTodayHistogram",[N.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchTodayHistogram"),o.prototype),(0,k.default)(o.prototype,"fetchHistogram",[N.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchHistogram"),o.prototype),(0,k.default)(o.prototype,"fetchQuery",[N.action],Object.getOwnPropertyDescriptor(o.prototype,"fetchQuery"),o.prototype),o);t.default=j}).call(this,a(69))},function(e,a,r){"use strict";r(15),r(4),r(22);var n=r(20);r(18),r(10),r(24),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.toArray=function e(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[],n=Object.keys(t),l=a+1,i=0,c=n.length;i1&&void 0!==arguments[1]?arguments[1]:{},a=function(a){(0,i.default)(c,a);var r=h(c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}return(0,o.default)(c,[{key:"pageClose",value:function(){window.opener=null,window.open("","_self",""),window.close()}},{key:"render",value:function(){var a=this.props,r=a.title,u=a.onCancel,o=a.icon,i=a.description,c=(0,l.default)(a,["title","onCancel","icon","description"]);return f.default.createElement(d.default,{visible:!0,fullScreen:!0,hideFooter:!0,title:r,icon:o,description:i,onCancel:u,className:m.default.container,headerClassName:m.default.header,bodyClassName:(0,p.default)(m.default.body,m.default.fullScreen)},f.default.createElement(e,(0,n.default)({onCancel:t.isSinglePage?this.pageClose:u},c)))}}]),c}(f.default.Component);return a},a(12),a(109),a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(315)),l=r(a(58)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=r(a(787)),p=r(a(3)),m=r(a(3549));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(9),a(13),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(5),a(11),a(6),a(28),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(7);var n=r(a(30)),l=r(a(43));a(41);var u,o,i,c,s,f=r(a(44)),d=r(a(65)),p=r(a(36)),m=r(a(37)),h=r(a(49)),v=(r(a(66)),a(14)),g=r(a(26)),y=r(a(902));function E(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function b(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster;return t?"/klusters/".concat(t):""}},{key:"kubeWebsocketUrl",value:(r=(0,f.default)(l.default.mark((function e(){var t,a,r,n,u,o,i,c;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.kubectl,a=t.cluster,r=t.namespace,n=t.nodename,u=t.pod,o=t.container,i=t.shell,c=void 0===i?"sh":i,!n){e.next=3;break}return e.abrupt("return","kapis/terminal.kubesphere.io/v1alpha2".concat(this.getClusterPath({cluster:a}),"/nodes/").concat(n,"/exec"));case 3:return e.next=5,request.get("kapis/terminal.kubesphere.io/v1alpha2".concat(this.getClusterPath({cluster:a}),"/namespaces/").concat(r,"/pods/").concat(u,"/exec?container=").concat(o,"&shell=").concat(c),null,null,(function(e){return 404!==e.status}));case 5:if(e.sent){e.next=8;break}return e.abrupt("return","kapis/terminal.kubesphere.io/v1alpha2".concat(this.getClusterPath({cluster:a}),"/namespaces/").concat(r,"/pods/").concat(u,"?container=").concat(o,"&shell=").concat(c));case 8:return e.abrupt("return","kapis/terminal.kubesphere.io/v1alpha2".concat(this.getClusterPath({cluster:a}),"/namespaces/").concat(r,"/pods/").concat(u,"/exec?container=").concat(o,"&shell=").concat(c));case 9:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"fetchKubeCtl",value:(a=(0,f.default)(l.default.mark((function e(t){var a;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=t.cluster,this.kubectl.isLoading=!0,this.kubectl=b(b({},this.kubectl),{},{cluster:a,isLoading:!1});case 3:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchKubeConfig",value:(t=(0,f.default)(l.default.mark((function e(t){var a;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request.get("kapis/resources.kubesphere.io/v1alpha2".concat(this.getClusterPath(t),"/users/").concat(this.username,"/kubeconfig"));case 2:a=e.sent,this.kubeconfig=a;case 4:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"connect",value:function(){this.connected=!0}},{key:"disconnect",value:function(){this.connected=!1}}]),e}(),o=(0,h.default)(u.prototype,"kubectl",[v.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{cluster:"",namespace:"",pod:"",container:"",nodename:"",shell:"bash",isLoading:!0}}}),i=(0,h.default)(u.prototype,"kubeconfig",[v.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),c=(0,h.default)(u.prototype,"connected",[v.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),(0,h.default)(u.prototype,"fetchKubeCtl",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchKubeCtl"),u.prototype),s=(0,h.default)(u.prototype,"setNodename",[v.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.kubectl.nodename=t}}}),(0,h.default)(u.prototype,"fetchKubeConfig",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"fetchKubeConfig"),u.prototype),(0,h.default)(u.prototype,"connect",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"connect"),u.prototype),(0,h.default)(u.prototype,"disconnect",[v.action],Object.getOwnPropertyDescriptor(u.prototype,"disconnect"),u.prototype),u);t.default=_},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var l,u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=r(239),p=n(r(3)),m=r(909),h=n(r(1777)),v=n(r(1776)),g=r(186),y=n(r(841)),E=n(r(26)),b=r(52),_=n(r(1778)),O=n(r(3551));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var C=(0,h.default)(l=(0,d.observer)(l=function(e){(0,i.default)(r,e);var a=S(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{},a=t.start,r=t.end,n=t.step,l=void 0===n?"1h":n,u=t.resources,o=void 0===u?[]:u,i=t.meters,c=void 0===i?[]:i,s=t.module,d=t.isTime,p=void 0!==d&&d,m=t.deployments,h=t.statefulsets,v=t.daemonsets,g=t.nodes,y=t.pods,E=(0,f.default)(t,["start","end","step","resources","meters","module","isTime","deployments","statefulsets","daemonsets","nodes","pods"]),b=(0,S.default)(w({},E),(0,D.getTimeParams)({start:a,end:r,step:l,isTime:p}),(0,D.getMetricsFilters)({module:s,meters:c}),(0,D.getResourceFilters)({module:s,resources:o}),(0,D.handleWorkloadToKind)({deployments:m,statefulsets:h,daemonsets:v}),(0,D.handleNodeParams)({nodes:g,pods:y,resources:o,module:s}));return e.setParams(b)},e.setParams=function(e){return e},e.getResource=function(e){var t=e.cluster,a=e.workspaces,r=e.namespaces,n=e.applications,l=e.openpitrixs,u=e.services,o=e.deployments,i=e.statefulsets,c=e.daemonsets,s=e.nodes,f=e.pods,d={cluster:t,namespaces:r,workspaces:a};return f?w({pods:f,nodes:s||void 0},d):s?w({nodes:s},d):o||i||c?w({deployments:o,statefulsets:i,daemonsets:c},d):u?w({services:u},d):l?w({openpitrixs:l},d):n?w({applications:n},d):d},e.setOneSourceAllMeterByType=function(e,t){var a=e.data,r=e.metric_name,n=(0,O.default)(a,"result.0",{});return w({type:r,module:k.RESOURCES_METER_TYPE[t]},n)},e.getOneSourceAllMeterData=function(e,t,a){return t.start&&(e.start=1e3*t.start),t.end&&(e.end=1e3*t.end),t.step&&(e.step=(0,T.getTimeStr)(t.step)),e.values=(0,D.fillEmptyMeterValue)({start:t.start,end:t.end,step:t.step.slice(0,-1)},e.values),(0,D.handleValueByUnit)(e,a)},e.handleAllMeterData=function(t,a,r){var n=t.results.map((function(t){if(t.data.result){var n=e.setOneSourceAllMeterByType(t,r);return e.getOneSourceAllMeterData(n,a,r)}return!1}));return(0,D.handleSortBySourceType)(n)},e.handleOneMeterData=function(e,t){var a=e.results[0],r=(0,O.default)(a,"data.result",[]),n=(0,O.default)(a,"metric_name",""),l=[];return(0,_.default)(r)||(l=r.map((function(e){return e=w({type:n,module:k.RESOURCES_METER_TYPE[t]},e),(0,D.handleValueByUnit)(e,t)}))),l},(0,d.default)(e,"fetchPrice",i,(0,h.default)(e)),e}return(0,m.default)(r,[{key:"getPaths",value:function(e){var t=e.cluster,a=e.workspaces,r=e.namespaces,n=e.applications,l=e.services,u=e.deployments,o=e.statefulsets,i=e.openpitrixs,c=e.daemonsets,s=e.pods,f=e.nodes,d=e.module,p="";return t&&(p+="cluster"===d?"/cluster":""),a&&(p+="/workspaces/".concat(a)),(r||"namespaces"===d)&&(p+="namespaces"===d?"/namespaces":"/namespaces/".concat(r)),n&&(p+="/applications"),i&&!l&&(p+="/openpitrixs"),l&&(p+="/services"),!s&&(u||o||c)&&(p+="/workloads"),f&&!s&&(p+="/nodes"),f&&s&&(p+="/nodes/".concat(f)),s&&(p+="/pods"),p}},{key:"fetchMeter",value:(t=(0,c.default)(n.default.mark((function e(){var t,a,r,l,u,o,i,c,s,d,p,m,h,v,g,y,E,O,S,C,k,N=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=N.length>0&&void 0!==N[0]?N[0]:{},a=t.cluster,r=t.workspaces,l=t.namespaces,u=t.openpitrixs,o=t.applications,i=t.services,c=t.deployments,s=t.statefulsets,d=t.daemonsets,p=t.pods,m=t.nodes,h=(0,f.default)(t,["cluster","workspaces","namespaces","openpitrixs","applications","services","deployments","statefulsets","daemonsets","pods","nodes"]),this.isLoading=!0,v="",g={},this.cluster=a,y=this.getResource({cluster:a,workspaces:r,namespaces:l,openpitrixs:u,applications:o,services:i,deployments:c,statefulsets:s,daemonsets:d,pods:p,nodes:m}),g=h.operation?this.getExportParams(w(w({},y),h)):this.getParams(w({deployments:c,statefulsets:s,daemonsets:d,pods:p,nodes:m},h)),"namespaces"===h.module?(v=this.getTenantApi(w({module:h.module},y)),E=y.workspaces&&y.namespaces?{workspaces:y.workspaces}:{},g=w(w(w({},g),E),(0,D.handleLevelParams)({module:h.module}))):v=this.getApi(w({module:h.module},y)),"openpitrixs"===h.module&&(g.cluster=this.cluster),e.next=11,request.get(v,g,{},(function(){return[]}));case 11:if(O=e.sent,this.isLoading=!1,!h.operation){e.next=15;break}return e.abrupt("return",O);case 15:if((0,_.default)(O)||!(0,b.default)(O.results)){e.next=24;break}if(S=h.module,"all"!==h.meters){e.next=21;break}return C=this.handleAllMeterData(O,g,S),this.data=C,e.abrupt("return",C);case 21:return k=this.handleOneMeterData(O,S),this.data=k,e.abrupt("return",k);case 24:return this.data=[],e.abrupt("return",[]);case 26:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return globals.app.isMultiCluster&&this.cluster?"kapis/clusters/".concat(this.cluster,"/metering.kubesphere.io/v1alpha1"):"kapis/metering.kubesphere.io/v1alpha1"}}]),r}(r(a(68)).default),u=(0,E.default)(l.prototype,"isLoading",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),o=(0,E.default)(l.prototype,"data",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,E.default)(l.prototype,"fetchMeter",[C.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchMeter"),l.prototype),i=(0,E.default)(l.prototype,"fetchPrice",[C.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,c.default)(n.default.mark((function t(a){var r,l,u,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,l="".concat(e.tenantUrl({cluster:r}),"/metering/price"),t.next=4,request.get(l,{},{},(function(){}));case 4:if(!(u=t.sent)||(0,_.default)(u)){t.next=13;break}if(!Object.values(u).some((function(e){return"number"==typeof e&&e<0}))&&""!==u.currency){t.next=9;break}return t.abrupt("return",{cluster:r});case 9:return o={},Object.keys(u).forEach((function(e){!["currency","retention_day"].includes(e)&&u[e]>0&&(o[k.FEE_CONFIG[e]]=u[e])})),(0,_.default)(o)||(o.currency=u.currency,o.retention_day=(0,O.default)(u,"retention_day","7d"),o.cluster=r||(0,O.default)(N.DEFAULT_CLUSTER,"metadata.name")),t.abrupt("return",o);case 13:return t.abrupt("return",{cluster:r});case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),l);t.default=M},,,,,,,,function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(5),r(11),r(31),r(6),r(84),r(73),r(18),r(97),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(85),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(84),r(73),r(18),r(28),r(97),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(85),r(7);var u=n(r(43));r(41);var o,i=n(r(44)),c=n(r(61)),s=n(r(30)),f=n(r(36)),d=n(r(37)),p=n(r(55)),m=n(r(56)),h=n(r(51)),v=l(r(0)),g=n(r(3)),y=n(r(63)),E=n(r(189)),b=n(r(1029)),_=r(14),O=r(239),S=r(186),C=n(r(814)),D=n(r(438)),k=n(r(915)),N=n(r(790)),T=r(924),R=n(r(945)),w=n(r(874)),I=n(r(3665));function M(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function P(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,a=e.group,r=e.tags,n=void 0===r?[]:r;return a&&(a="cluster.kubesphere.io/group=".concat(a)),n=n.map((function(e){return"label.cluster.kubesphere.io/".concat(e)})),P(P({},(0,E.default)(e,"group","tags","__index")),{},{labelSelector:[a].concat((0,c.default)(n),[t]).filter(Boolean).join(",")})},e.handleClick=function(t){var a,r=e.props,n=r.value,l=void 0===n?[]:n,u=r.onChange,o=t.currentTarget.dataset.cluster;a=l.some((function(e){return e.name===o}))?l.filter((function(e){return e.name!==o})):[].concat((0,c.default)(l),[{name:o}]),e.setState({showTip:a.some((function(t){return e.state.hostClusters.includes(t.name)}))}),u(a)},e.handleCheckboxClick=function(e){return e.stopPropagation()},e.clearFilter=function(){e.setState({filters:{}}),e.fetchData()},e.handleReset=function(){var t=e.state.filters;e.fetchData(t)},e.sortClusters=function(e){var t=e.filter((function(e){return e&&e.isHost})),a=e.filter((function(e){return e&&!e.isHost}));return[].concat((0,c.default)(t),(0,c.default)(a))},e}return(0,d.default)(n,[{key:"componentDidMount",value:function(){this.fetchData(),this.tagsStore.fetchGroupList()}},{key:"fetchData",value:(a=(0,i.default)(u.default.mark((function e(){var t,a,r=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]?r[0]:{},a="!cluster-role.kubesphere.io/edge",!globals.app.hasPermission({module:"clusters",action:"manage"})){e.next=7;break}return e.next=5,this.clusterStore.fetchList(P({limit:-1},this.getParams(t,a)));case 5:e.next=9;break;case 7:return e.next=9,this.clusterStore.fetchGrantedList(P({limit:-1},this.getParams(t,a)));case 9:this.setState({hostClusters:this.clusterStore.list.data.filter((function(e){return e.isHost})).map((function(e){return e.name}))});case 10:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"render",value:function(){var e=this,a=this.props,r=a.value,n=void 0===r?[]:r,l=a.noTip,u=void 0!==l&&l,o=this.state.filters,i=(0,_.toJS)(this.clusterStore.list),c=i.data,f=i.isLoading;if((0,y.default)(c)&&(0,y.default)(o)&&!f)return v.default.createElement(S.Alert,{type:"warning",message:t("NO_CLUSTER_AVAILABLE_DESC",{type:t("KS_CLUSTER")})});var d=(0,b.default)(this.sortClusters(c),(function(e){return globals.app.hasClusterModule(e.name,"whizard-monitoring")}));return v.default.createElement("div",{className:I.default.wrapper},this.state.showTip&&!u&&v.default.createElement(S.Alert,{className:"margin-b12",type:"warning",message:t("SELECT_HOST_CLUSTER_WARNING")}),v.default.createElement("div",null,v.default.createElement("div",{className:"margin-b12"},v.default.createElement(k.default,{placeholder:t("SEARCH_BY_NAME"),columns:this.columns,onChange:function(t){e.setState({filters:t}),e.fetchData(t)},filters:this.state.filters}))),d.map((function(a){var r;return v.default.createElement("div",{key:a.name,className:(0,g.default)(I.default.item,(0,s.default)({},I.default.disabled,!globals.app.isMultiCluster)),"data-cluster":a.name,onClick:globals.app.isMultiCluster?e.handleClick:null},v.default.createElement(S.Checkbox,{checked:n.some((function(e){return e.name===a.name})),disabled:!globals.app.isMultiCluster,onClick:e.handleCheckboxClick}),v.default.createElement(C.default,{className:I.default.cluster,cluster:a,noTip:!0}),v.default.createElement(N.default,{title:v.default.createElement(T.ClusterTagGroup,{data:(null!==(r=a.tags)&&void 0!==r?r:[]).map((function(t){return(e.tagsStore.tags||[]).find((function(e){return t.name===e.name}))})).filter(Boolean),empty:"-"}),description:t("TAG_PL")}))})),f&&v.default.createElement(S.Loading,{size:"large",className:I.default.loading}),(0,y.default)(c)&&v.default.createElement(w.default,{icon:"exclamation",title:t("NO_MATCHING_RESULT_FOUND"),desc:null,action:v.default.createElement("p",null,t("YOU_CAN_TRY_TO"),v.default.createElement("span",{className:I.default.action,onClick:this.handleReset,"data-test":"table-empty-refresh"},t("REFRESH_DATA")),t("OR"),v.default.createElement("span",{className:I.default.action,onClick:this.clearFilter,"data-test":"table-empty-clear-filter"},t("CLEAR_SEARCH_CONDITIONS")))}))}},{key:"columns",get:function(){var e,a;return[{dataIndex:"name",title:t("NAME"),search:!0},{dataIndex:"alias",title:t("ALIAS"),search:!0},{dataIndex:"group",title:t("TYPE"),search:!0,filters:(null!==(e=this.tagsStore.group)&&void 0!==e?e:[]).map((function(e){return{text:e,value:e}})),renderSearch:function(e){return v.default.createElement("div",{className:"flex"},v.default.createElement("div",{className:(0,g.default)(I.default.clusterGroupTag,(0,s.default)({},I.default[e.key],!0))},t("ENV_".concat(e.label.toUpperCase()))),e.label)}},{dataIndex:"tags",title:t("TAG_PL"),filters:(null!==(a=this.tagsStore.tags)&&void 0!==a?a:[]).map((function(e){return{text:"".concat(e.label,":").concat(e.value),value:e.name}})),search:!0,multi:!0,renderSearch:function(e){return v.default.createElement("div",null,e.label)}}]}}]),n}(v.Component))||o;a.default=j},,,function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return g}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("path",{transform:"matrix(.86603 -.5 0 1 9.11 14.822)",stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8",d:"M0 0h18.294v18.431H0z"}),i=u.a.createElement("path",{d:"M40.797 33.116l-15.843 9.147L8.91 32.999M9.004 14.452l16.142 9.835",stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8"}),c=u.a.createElement("mask",{id:"a",fill:"#fff"},u.a.createElement("rect",{width:10.297,height:10.297,rx:.6})),s=u.a.createElement("rect",{width:10.297,height:10.297,rx:.6,transform:"matrix(-.86603 -.5 0 1 15.146 27.033)",fill:"url(#paint0_linear_14176_514037)",stroke:"#119E8F",strokeWidth:3.6,mask:"url(#a)"}),f=u.a.createElement("path",{d:"M24.853 24.114l-.047 18.54",stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8"}),d=u.a.createElement("mask",{id:"b",fill:"#fff"},u.a.createElement("rect",{width:20.352,height:20.352,rx:.6})),p=u.a.createElement("rect",{width:20.352,height:20.352,rx:.6,transform:"matrix(-.86603 -.5 0 1 41.77 14.376)",fill:"url(#paint1_linear_14176_514037)",stroke:"#119E8F",strokeWidth:3.6,mask:"url(#b)"}),m=u.a.createElement("circle",{cx:9.15,cy:14.702,r:1.537,fill:"url(#paint2_linear_14176_514037)"}),h=u.a.createElement("circle",{cx:24.953,cy:42.263,r:1.537,fill:"url(#paint3_linear_14176_514037)"}),v=u.a.createElement("defs",null,u.a.createElement("linearGradient",{id:"paint0_linear_14176_514037",x1:5.149,y1:10.297,x2:5.149,y2:-.236,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"})),u.a.createElement("linearGradient",{id:"paint1_linear_14176_514037",x1:10.176,y1:20.352,x2:10.176,y2:-.466,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"})),u.a.createElement("linearGradient",{id:"paint2_linear_14176_514037",x1:8.21,y1:14.054,x2:8.21,y2:16.239,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"})),u.a.createElement("linearGradient",{id:"paint3_linear_14176_514037",x1:24.013,y1:41.615,x2:24.013,y2:43.8,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"}))),g=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 48 48",fill:"none",width:"1em",height:"1em"},e),o,i,c,s,f,d,p,m,h,v)};t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxyZWN0IHdpZHRoPSIxOC4yOTQiIGhlaWdodD0iMTguNDMxMiIgdHJhbnNmb3JtPSJtYXRyaXgoMC44NjYwMjUgLTAuNSAyLjIwMzA1ZS0wOCAxIDkuMTEwMDQgMTQuODIxOCkiCiAgICAgICAgICBzdHJva2U9IiNBNUVBRTMiIHN0cm9rZS13aWR0aD0iMC42IiBzdHJva2UtZGFzaGFycmF5PSIxLjggMS44Ii8+CiAgICA8cGF0aCBkPSJNNDAuNzk2OCAzMy4xMTU2TDI0Ljk1MzggNDIuMjYyNkw4LjkwOTY1IDMyLjk5OTUiIHN0cm9rZT0iI0E1RUFFMyIgc3Ryb2tlLXdpZHRoPSIwLjYiCiAgICAgICAgICBzdHJva2UtZGFzaGFycmF5PSIxLjggMS44Ii8+CiAgICA8cGF0aCBkPSJNOS4wMDM3MyAxNC40NTE3TDI1LjE0NTggMjQuMjg3MSIgc3Ryb2tlPSIjQTVFQUUzIiBzdHJva2Utd2lkdGg9IjAuNiIgc3Ryb2tlLWRhc2hhcnJheT0iMS44IDEuOCIvPgogICAgPG1hc2sgaWQ9InBhdGgtNC1pbnNpZGUtMV8xNDE3Nl81MTQwMzciIGZpbGw9IndoaXRlIj4KICAgICAgICA8cmVjdCB3aWR0aD0iMTAuMjk3MiIgaGVpZ2h0PSIxMC4yOTcyIiByeD0iMC42Ii8+CiAgICA8L21hc2s+CiAgICA8cmVjdCB3aWR0aD0iMTAuMjk3MiIgaGVpZ2h0PSIxMC4yOTcyIiByeD0iMC42IiB0cmFuc2Zvcm09Im1hdHJpeCgtMC44NjYwMjUgLTAuNSAtMi4yMDMwNWUtMDggMSAxNS4xNDY1IDI3LjAzMzIpIgogICAgICAgICAgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzE0MTc2XzUxNDAzNykiIHN0cm9rZT0iIzExOUU4RiIgc3Ryb2tlLXdpZHRoPSIzLjYiCiAgICAgICAgICBtYXNrPSJ1cmwoI3BhdGgtNC1pbnNpZGUtMV8xNDE3Nl81MTQwMzcpIi8+CiAgICA8cGF0aCBkPSJNMjQuODUzMyAyNC4xMTM4TDI0LjgwNjUgNDIuNjU0OCIgc3Ryb2tlPSIjQTVFQUUzIiBzdHJva2Utd2lkdGg9IjAuNiIgc3Ryb2tlLWRhc2hhcnJheT0iMS44IDEuOCIvPgogICAgPG1hc2sgaWQ9InBhdGgtNi1pbnNpZGUtMl8xNDE3Nl81MTQwMzciIGZpbGw9IndoaXRlIj4KICAgICAgICA8cmVjdCB3aWR0aD0iMjAuMzUxNyIgaGVpZ2h0PSIyMC4zNTE3IiByeD0iMC42Ii8+CiAgICA8L21hc2s+CiAgICA8cmVjdCB3aWR0aD0iMjAuMzUxNyIgaGVpZ2h0PSIyMC4zNTE3IiByeD0iMC42IiB0cmFuc2Zvcm09Im1hdHJpeCgtMC44NjYwMjUgLTAuNSAtMi4yMDMwNWUtMDggMSA0MS43NzA4IDE0LjM3NTcpIgogICAgICAgICAgZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzE0MTc2XzUxNDAzNykiIHN0cm9rZT0iIzExOUU4RiIgc3Ryb2tlLXdpZHRoPSIzLjYiCiAgICAgICAgICBtYXNrPSJ1cmwoI3BhdGgtNi1pbnNpZGUtMl8xNDE3Nl81MTQwMzcpIi8+CiAgICA8Y2lyY2xlIGN4PSI5LjE1MDE2IiBjeT0iMTQuNzAxOSIgcj0iMS41Mzc0IiBmaWxsPSJ1cmwoI3BhaW50Ml9saW5lYXJfMTQxNzZfNTE0MDM3KSIvPgogICAgPGNpcmNsZSBjeD0iMjQuOTUzNSIgY3k9IjQyLjI2MjciIHI9IjEuNTM3NCIgZmlsbD0idXJsKCNwYWludDNfbGluZWFyXzE0MTc2XzUxNDAzNykiLz4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xNDE3Nl81MTQwMzciIHgxPSI1LjE0ODY0IiB5MT0iMTAuMjk3MiIgeDI9IjUuMTQ4NjQiIHkyPSItMC4yMzU5NTMiCiAgICAgICAgICAgICAgICAgICAgICAgIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzE2RDJCRiIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MV9saW5lYXJfMTQxNzZfNTE0MDM3IiB4MT0iMTAuMTc1OSIgeTE9IjIwLjM1MTYiIHgyPSIxMC4xNzU5IiB5Mj0iLTAuNDY2MzQxIgogICAgICAgICAgICAgICAgICAgICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMxNkQyQkYiLz4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDJfbGluZWFyXzE0MTc2XzUxNDAzNyIgeDE9IjguMjA5NTkiIHkxPSIxNC4wNTQzIiB4Mj0iOC4yMDk1OSIgeTI9IjE2LjIzOTMiCiAgICAgICAgICAgICAgICAgICAgICAgIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzM2RDZDNCIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMxNUJFQUMiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQzX2xpbmVhcl8xNDE3Nl81MTQwMzciIHgxPSIyNC4wMTMiIHkxPSI0MS42MTUxIiB4Mj0iMjQuMDEzIiB5Mj0iNDMuODAwMSIKICAgICAgICAgICAgICAgICAgICAgICAgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjMzZENkM0Ii8+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE1QkVBQyIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8L2RlZnM+Cjwvc3ZnPgo="},function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return h}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("path",{d:"M38.498 18.155L9.618 34.682M9.66 18.155l28.88 16.527M24.1 10.815v30.89",stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8"}),i=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.407 21.99l5.336-3.192-3.348-1.906-5.37 3.134.787.457-.79-.458v5.813l3.385 1.88V21.99z",fill:"url(#paint0_linear_14176_514054)"}),c=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.458 21.675l-5.335-3.192 3.348-1.906 5.37 3.134-.128.074.13-.075v5.813l-3.385 1.88v-5.728z",fill:"url(#paint1_linear_14176_514054)"}),s=u.a.createElement("path",{d:"M9.618 17.935L24 9.853l14.383 8.082v16.073L24 42 9.618 34.008V17.935z",stroke:"#119E8F",strokeWidth:1.8,strokeLinejoin:"round"}),f=u.a.createElement("path",{d:"M6.989 25.504l8.003 4.47-.035 8.856-8.003-4.47.035-8.856z",fill:"url(#paint2_linear_14176_514054)",stroke:"#119E8F",strokeWidth:1.5}),d=u.a.createElement("path",{d:"M41.011 25.504l-8.003 4.47.035 8.856 8.003-4.47-.035-8.856z",fill:"url(#paint3_linear_14176_514054)",stroke:"#119E8F",strokeWidth:1.5}),p=u.a.createElement("path",{d:"M24.055 5.68l8.992 5.021-8.902 5.016-8.992-5.021 8.902-5.016z",fill:"url(#paint4_linear_14176_514054)",stroke:"#119E8F",strokeWidth:1.5}),m=u.a.createElement("defs",null,u.a.createElement("linearGradient",{id:"paint0_linear_14176_514054",x1:14.714,y1:20.025,x2:14.714,y2:27.717,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"})),u.a.createElement("linearGradient",{id:"paint1_linear_14176_514054",x1:35.186,y1:22.251,x2:35.186,y2:27.717,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"})),u.a.createElement("linearGradient",{id:"paint2_linear_14176_514054",x1:10.973,y1:40.105,x2:10.973,y2:23.865,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"})),u.a.createElement("linearGradient",{id:"paint3_linear_14176_514054",x1:37.027,y1:40.105,x2:37.027,y2:23.865,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"})),u.a.createElement("linearGradient",{id:"paint4_linear_14176_514054",x1:24.1,y1:16.577,x2:24.1,y2:4.55,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"}))),h=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 48 48",fill:"none",width:"1em",height:"1em"},e),o,i,c,s,f,d,p,m)};t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0zOC40OTg0IDE4LjE1NUw5LjYxODE2IDM0LjY4MjQiIHN0cm9rZT0iI0E1RUFFMyIgc3Ryb2tlLXdpZHRoPSIwLjYiIHN0cm9rZS1kYXNoYXJyYXk9IjEuOCAxLjgiLz4KICAgIDxwYXRoIGQ9Ik05LjY1OTc2IDE4LjE1NUwzOC41NCAzNC42ODI0IiBzdHJva2U9IiNBNUVBRTMiIHN0cm9rZS13aWR0aD0iMC42IiBzdHJva2UtZGFzaGFycmF5PSIxLjggMS44Ii8+CiAgICA8cGF0aCBkPSJNMjQuMTAwMiAxMC44MTUyVjQxLjcwNTMiIHN0cm9rZT0iI0E1RUFFMyIgc3Ryb2tlLXdpZHRoPSIwLjYiIHN0cm9rZS1kYXNoYXJyYXk9IjEuOCAxLjgiLz4KICAgIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIgogICAgICAgICAgZD0iTTE2LjQwNjkgMjEuOTkwNkwyMS43NDI2IDE4Ljc5OEwxOC4zOTUxIDE2Ljg5MjNMMTMuMDI0OSAyMC4wMjU4TDEzLjgxMTggMjAuNDgzTDEzLjAyMTggMjAuMDI0OVYyNS44Mzc3TDE2LjQwNjUgMjcuNzE3NVYyMS45OTA0TDE2LjQwNjkgMjEuOTkwNloiCiAgICAgICAgICBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfMTQxNzZfNTE0MDU0KSIvPgogICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiCiAgICAgICAgICBkPSJNMzIuNDU3NyAyMS42NzQ3TDI3LjEyMyAxOC40ODI4TDMwLjQ3MDUgMTYuNTc3MUwzNS44NDA4IDE5LjcxMDZMMzUuNzEzNCAxOS43ODQ2TDM1Ljg0MjQgMTkuNzA5OFYyNS41MjI2TDMyLjQ1NzcgMjcuNDAyNFYyMS42NzQ3WiIKICAgICAgICAgIGZpbGw9InVybCgjcGFpbnQxX2xpbmVhcl8xNDE3Nl81MTQwNTQpIi8+CiAgICA8cGF0aCBkPSJNOS42MTgxNiAxNy45MzQ3TDI0LjAwMDUgOS44NTMwM0wzOC4zODI4IDE3LjkzNDdWMzQuMDA4MUwyNC4wMDA1IDQyTDkuNjE4MTYgMzQuMDA4MVYxNy45MzQ3WiIKICAgICAgICAgIHN0cm9rZT0iIzExOUU4RiIgc3Ryb2tlLXdpZHRoPSIxLjgiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KICAgIDxwYXRoIGQ9Ik02Ljk4ODk2IDI1LjUwNDFMMTQuOTkyNCAyOS45NzM4TDE0Ljk1NzQgMzguODMwM0w2Ljk1Mzg5IDM0LjM2MDVMNi45ODg5NiAyNS41MDQxWiIKICAgICAgICAgIGZpbGw9InVybCgjcGFpbnQyX2xpbmVhcl8xNDE3Nl81MTQwNTQpIiBzdHJva2U9IiMxMTlFOEYiIHN0cm9rZS13aWR0aD0iMS41Ii8+CiAgICA8cGF0aCBkPSJNNDEuMDExIDI1LjUwNDFMMzMuMDA3NiAyOS45NzM4TDMzLjA0MjYgMzguODMwM0w0MS4wNDYxIDM0LjM2MDVMNDEuMDExIDI1LjUwNDFaIgogICAgICAgICAgZmlsbD0idXJsKCNwYWludDNfbGluZWFyXzE0MTc2XzUxNDA1NCkiIHN0cm9rZT0iIzExOUU4RiIgc3Ryb2tlLXdpZHRoPSIxLjUiLz4KICAgIDxwYXRoIGQ9Ik0yNC4wNTU0IDUuNjc5NzdMMzMuMDQ3MiAxMC43MDE1TDI0LjE0NDkgMTUuNzE3NEwxNS4xNTMxIDEwLjY5NTdMMjQuMDU1NCA1LjY3OTc3WiIKICAgICAgICAgIGZpbGw9InVybCgjcGFpbnQ0X2xpbmVhcl8xNDE3Nl81MTQwNTQpIiBzdHJva2U9IiMxMTlFOEYiIHN0cm9rZS13aWR0aD0iMS41Ii8+CiAgICA8ZGVmcz4KICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfMTQxNzZfNTE0MDU0IiB4MT0iMTQuNzE0NSIgeTE9IjIwLjAyNDgiIHgyPSIxNC43MTQ1IiB5Mj0iMjcuNzE3NCIKICAgICAgICAgICAgICAgICAgICAgICAgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjMzZENkM0Ii8+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE1QkVBQyIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDFfbGluZWFyXzE0MTc2XzUxNDA1NCIgeDE9IjM1LjE4NTkiIHkxPSIyMi4yNTA5IiB4Mj0iMzUuMTg1OSIgeTI9IjI3LjcxNzQiCiAgICAgICAgICAgICAgICAgICAgICAgIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzM2RDZDNCIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMxNUJFQUMiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQyX2xpbmVhcl8xNDE3Nl81MTQwNTQiIHgxPSIxMC45NzMyIiB5MT0iNDAuMTA1MyIgeDI9IjEwLjk3MzIiIHkyPSIyMy44NjUyIgogICAgICAgICAgICAgICAgICAgICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMxNkQyQkYiLz4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDNfbGluZWFyXzE0MTc2XzUxNDA1NCIgeDE9IjM3LjAyNjgiIHkxPSI0MC4xMDUzIiB4Mj0iMzcuMDI2OCIgeTI9IjIzLjg2NTIiCiAgICAgICAgICAgICAgICAgICAgICAgIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzE2RDJCRiIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50NF9saW5lYXJfMTQxNzZfNTE0MDU0IiB4MT0iMjQuMTAwMiIgeTE9IjE2LjU3NzMiIHgyPSIyNC4xMDAyIiB5Mj0iNC41NTA0MSIKICAgICAgICAgICAgICAgICAgICAgICAgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjMTZEMkJGIi8+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0id2hpdGUiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgo8L3N2Zz4K"},function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return O}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("ellipse",{cx:24,cy:25.753,rx:15.209,ry:8.969,stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8"}),i=u.a.createElement("path",{d:"M24.001 8.084v32.191",stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8"}),c=u.a.createElement("ellipse",{cx:24,cy:33.196,rx:15.209,ry:8.969,stroke:"#A5EAE3",strokeWidth:.6,strokeDasharray:"1.8 1.8"}),s=u.a.createElement("mask",{id:"a",fill:"#fff"},u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.27 31.989c-.168-.522-.898-.425-1.126.073-1.757 3.83-7.423 6.633-14.141 6.633-6.72 0-12.385-2.804-14.141-6.633-.229-.499-.958-.596-1.126-.074a5.361 5.361 0 00-.26 1.644c0 4.953 6.952 8.968 15.527 8.968s15.526-4.015 15.526-8.968c0-.561-.09-1.11-.26-1.643z"})),f=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.27 31.989c-.168-.522-.898-.425-1.126.073-1.757 3.83-7.423 6.633-14.141 6.633-6.72 0-12.385-2.804-14.141-6.633-.229-.499-.958-.596-1.126-.074a5.361 5.361 0 00-.26 1.644c0 4.953 6.952 8.968 15.527 8.968s15.526-4.015 15.526-8.968c0-.561-.09-1.11-.26-1.643z",fill:"url(#paint0_linear_14176_514100)"}),d=u.a.createElement("path",{d:"M38.144 32.062l-1.09-.5 1.09.5zm1.125-.073l-1.143.366 1.143-.366zm-2.216-.427c-.724 1.58-2.32 3.067-4.635 4.169-2.299 1.095-5.216 1.764-8.415 1.764v2.4c3.52 0 6.794-.734 9.447-1.997 2.638-1.257 4.752-3.086 5.784-5.335l-2.18-1.001zm-13.05 5.933c-3.2 0-6.117-.669-8.416-1.764-2.314-1.103-3.91-2.59-4.635-4.17l-2.181 1c1.032 2.251 3.146 4.08 5.784 5.337 2.653 1.263 5.928 1.997 9.448 1.997v-2.4zM9.676 33.632c0-.433.069-.859.203-1.277l-2.286-.733a6.562 6.562 0 00-.317 2.01h2.4zM24.003 41.4c-4.116 0-7.782-.966-10.379-2.466-2.628-1.518-3.948-3.436-3.948-5.302h-2.4c0 3.086 2.156 5.653 5.148 7.38 3.022 1.747 7.119 2.788 11.579 2.788v-2.4zm14.326-7.768c0 1.866-1.32 3.784-3.948 5.302-2.596 1.5-6.263 2.466-10.378 2.466v2.4c4.46 0 8.556-1.041 11.579-2.787 2.99-1.728 5.147-4.295 5.147-7.381h-2.4zm-.203-1.277c.134.419.203.844.203 1.277h2.4c0-.69-.11-1.363-.317-2.01l-2.286.733zm-27.174-.793a1.928 1.928 0 00-1.566-1.115c-.687-.063-1.507.284-1.793 1.175l2.286.733a.716.716 0 01-.713.482.472.472 0 01-.395-.275l2.181-1zm28.282 1a.472.472 0 01-.395.276.717.717 0 01-.713-.483l2.286-.732c-.286-.891-1.105-1.238-1.792-1.175a1.928 1.928 0 00-1.567 1.114l2.181 1z",fill:"#119E8F",mask:"url(#a)"}),p=u.a.createElement("mask",{id:"b",fill:"#fff"},u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.27 24.71c-.168-.522-.897-.425-1.126.073-1.756 3.83-7.422 6.633-14.141 6.633s-12.385-2.803-14.141-6.633c-.229-.498-.958-.595-1.125-.073a5.362 5.362 0 00-.26 1.643c0 4.953 6.951 8.969 15.526 8.969s15.526-4.016 15.526-8.969c0-.561-.089-1.11-.26-1.643z"})),m=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.27 24.71c-.168-.522-.897-.425-1.126.073-1.756 3.83-7.422 6.633-14.141 6.633s-12.385-2.803-14.141-6.633c-.229-.498-.958-.595-1.125-.073a5.362 5.362 0 00-.26 1.643c0 4.953 6.951 8.969 15.526 8.969s15.526-4.016 15.526-8.969c0-.561-.089-1.11-.26-1.643z",fill:"url(#paint1_linear_14176_514100)"}),h=u.a.createElement("path",{d:"M38.144 24.783l-1.09-.5 1.09.5zm1.125-.073l-1.142.366 1.142-.366zm-2.216-.427c-.724 1.58-2.32 3.067-4.635 4.17-2.299 1.095-5.216 1.763-8.415 1.763v2.4c3.52 0 6.795-.733 9.448-1.997 2.637-1.256 4.752-3.085 5.784-5.335l-2.182-1zm-13.05 5.933c-3.2 0-6.116-.669-8.415-1.764-2.315-1.102-3.911-2.59-4.635-4.169l-2.182 1c1.032 2.25 3.147 4.08 5.784 5.336 2.653 1.264 5.928 1.997 9.448 1.997v-2.4zM9.677 26.353c0-.432.068-.858.202-1.277l-2.285-.732a6.561 6.561 0 00-.317 2.009h2.4zm14.326 7.769c-4.115 0-7.782-.966-10.379-2.466-2.628-1.518-3.947-3.436-3.947-5.303h-2.4c0 3.087 2.156 5.653 5.147 7.381 3.023 1.746 7.12 2.788 11.579 2.788v-2.4zm14.326-7.769c0 1.867-1.32 3.785-3.947 5.303-2.597 1.5-6.264 2.466-10.379 2.466v2.4c4.46 0 8.556-1.042 11.579-2.788 2.991-1.728 5.147-4.294 5.147-7.381h-2.4zm-.202-1.277c.134.419.202.845.202 1.277h2.4c0-.69-.11-1.363-.317-2.01l-2.285.733zm-27.174-.793a1.928 1.928 0 00-1.567-1.114c-.687-.063-1.507.284-1.792 1.175l2.285.732a.716.716 0 01-.712.483.472.472 0 01-.396-.275l2.182-1zm28.282 1a.472.472 0 01-.395.276.716.716 0 01-.713-.483l2.285-.732c-.285-.891-1.105-1.238-1.792-1.175a1.928 1.928 0 00-1.567 1.114l2.182 1z",fill:"#119E8F",mask:"url(#b)"}),v=u.a.createElement("path",{d:"M38.626 16.1c0 2.02-1.424 4.019-4.098 5.563-2.65 1.531-6.37 2.507-10.528 2.507s-7.879-.976-10.529-2.507c-2.673-1.544-4.098-3.543-4.098-5.562 0-2.02 1.425-4.018 4.098-5.563 2.65-1.53 6.37-2.506 10.529-2.506 4.158 0 7.878.975 10.528 2.506 2.674 1.544 4.098 3.543 4.098 5.563z",stroke:"#119E8F",strokeWidth:1.8}),g=u.a.createElement("circle",{cx:9.29,cy:16.101,r:2.097,fill:"url(#paint2_linear_14176_514100)"}),y=u.a.createElement("circle",{cx:24.003,cy:24.704,r:2.097,fill:"url(#paint3_linear_14176_514100)"}),E=u.a.createElement("circle",{cx:24.003,cy:7.498,r:2.097,fill:"url(#paint4_linear_14176_514100)"}),b=u.a.createElement("circle",{cx:38.711,cy:16.101,r:2.097,fill:"url(#paint5_linear_14176_514100)"}),_=u.a.createElement("defs",null,u.a.createElement("linearGradient",{id:"paint0_linear_14176_514100",x1:24.003,y1:42.6,x2:24.003,y2:31.763,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"})),u.a.createElement("linearGradient",{id:"paint1_linear_14176_514100",x1:24.003,y1:35.322,x2:24.003,y2:24.484,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#16D2BF"}),u.a.createElement("stop",{offset:1,stopColor:"#fff"})),u.a.createElement("linearGradient",{id:"paint2_linear_14176_514100",x1:8.007,y1:15.217,x2:8.007,y2:18.198,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"})),u.a.createElement("linearGradient",{id:"paint3_linear_14176_514100",x1:22.719,y1:23.82,x2:22.719,y2:26.801,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"})),u.a.createElement("linearGradient",{id:"paint4_linear_14176_514100",x1:22.719,y1:6.614,x2:22.719,y2:9.595,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"})),u.a.createElement("linearGradient",{id:"paint5_linear_14176_514100",x1:37.427,y1:15.217,x2:37.427,y2:18.198,gradientUnits:"userSpaceOnUse"},u.a.createElement("stop",{stopColor:"#36D6C4"}),u.a.createElement("stop",{offset:1,stopColor:"#15BEAC"}))),O=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 48 48",fill:"none",width:"1em",height:"1em"},e),o,i,c,s,f,d,p,m,h,v,g,y,E,b,_)};t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxlbGxpcHNlIGN4PSIyNCIgY3k9IjI1Ljc1MzEiIHJ4PSIxNS4yMDkzIiByeT0iOC45Njg5MSIgc3Ryb2tlPSIjQTVFQUUzIiBzdHJva2Utd2lkdGg9IjAuNiIKICAgICAgICAgICAgIHN0cm9rZS1kYXNoYXJyYXk9IjEuOCAxLjgiLz4KICAgIDxwYXRoIGQ9Ik0yNC4wMDEzIDguMDgzOThMMjQuMDAxNiA0MC4yNzUiIHN0cm9rZT0iI0E1RUFFMyIgc3Ryb2tlLXdpZHRoPSIwLjYiIHN0cm9rZS1kYXNoYXJyYXk9IjEuOCAxLjgiLz4KICAgIDxlbGxpcHNlIGN4PSIyNCIgY3k9IjMzLjE5NTUiIHJ4PSIxNS4yMDkzIiByeT0iOC45Njg5MSIgc3Ryb2tlPSIjQTVFQUUzIiBzdHJva2Utd2lkdGg9IjAuNiIKICAgICAgICAgICAgIHN0cm9rZS1kYXNoYXJyYXk9IjEuOCAxLjgiLz4KICAgIDxtYXNrIGlkPSJwYXRoLTQtaW5zaWRlLTFfMTQxNzZfNTE0MTAwIiBmaWxsPSJ3aGl0ZSI+CiAgICAgICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiCiAgICAgICAgICAgICAgZD0iTTM5LjI2OTEgMzEuOTg5QzM5LjEwMTggMzEuNDY2OSAzOC4zNzI0IDMxLjU2MzkgMzguMTQzOCAzMi4wNjIzQzM2LjM4NzQgMzUuODkxMyAzMC43MjE0IDM4LjY5NDcgMjQuMDAyOCAzOC42OTQ3QzE3LjI4MzkgMzguNjk0NyAxMS42MTc2IDM1Ljg5MSA5Ljg2MTU2IDMyLjA2MTdDOS42MzMwMSAzMS41NjMzIDguOTAzNTYgMzEuNDY2MiA4LjczNjIxIDMxLjk4ODNDOC41NjU0NiAzMi41MjEgOC40NzYyMSAzMy4wNzAyIDguNDc2MjEgMzMuNjMxNUM4LjQ3NjIxIDM4LjU4NDkgMTUuNDI3NiA0Mi42MDA0IDI0LjAwMjUgNDIuNjAwNEMzMi41Nzc1IDQyLjYwMDQgMzkuNTI4OSAzOC41ODQ5IDM5LjUyODkgMzMuNjMxNUMzOS41Mjg5IDMzLjA3MDUgMzkuNDM5NyAzMi41MjE1IDM5LjI2OTEgMzEuOTg5WiIvPgogICAgPC9tYXNrPgogICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiCiAgICAgICAgICBkPSJNMzkuMjY5MSAzMS45ODlDMzkuMTAxOCAzMS40NjY5IDM4LjM3MjQgMzEuNTYzOSAzOC4xNDM4IDMyLjA2MjNDMzYuMzg3NCAzNS44OTEzIDMwLjcyMTQgMzguNjk0NyAyNC4wMDI4IDM4LjY5NDdDMTcuMjgzOSAzOC42OTQ3IDExLjYxNzYgMzUuODkxIDkuODYxNTYgMzIuMDYxN0M5LjYzMzAxIDMxLjU2MzMgOC45MDM1NiAzMS40NjYyIDguNzM2MjEgMzEuOTg4M0M4LjU2NTQ2IDMyLjUyMSA4LjQ3NjIxIDMzLjA3MDIgOC40NzYyMSAzMy42MzE1QzguNDc2MjEgMzguNTg0OSAxNS40Mjc2IDQyLjYwMDQgMjQuMDAyNSA0Mi42MDA0QzMyLjU3NzUgNDIuNjAwNCAzOS41Mjg5IDM4LjU4NDkgMzkuNTI4OSAzMy42MzE1QzM5LjUyODkgMzMuMDcwNSAzOS40Mzk3IDMyLjUyMTUgMzkuMjY5MSAzMS45ODlaIgogICAgICAgICAgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzE0MTc2XzUxNDEwMCkiLz4KICAgIDxwYXRoIGQ9Ik0zOC4xNDM4IDMyLjA2MjNMMzcuMDUzMSAzMS41NjJMMzguMTQzOCAzMi4wNjIzWk0zOS4yNjkxIDMxLjk4OUwzOC4xMjYzIDMyLjM1NTJMMzkuMjY5MSAzMS45ODlaTTM3LjA1MzEgMzEuNTYyQzM2LjMyODcgMzMuMTQxMSAzNC43MzIzIDM0LjYyODUgMzIuNDE4IDM1LjczMUMzMC4xMTkxIDM2LjgyNjIgMjcuMjAxOCAzNy40OTQ3IDI0LjAwMjggMzcuNDk0N1YzOS44OTQ3QzI3LjUyMjQgMzkuODk0NyAzMC43OTc0IDM5LjE2MTUgMzMuNDUwMiAzNy44OTc3QzM2LjA4NzcgMzYuNjQxMyAzOC4yMDI1IDM0LjgxMjUgMzkuMjM0NSAzMi41NjI2TDM3LjA1MzEgMzEuNTYyWk0yNC4wMDI4IDM3LjQ5NDdDMjAuODAzNiAzNy40OTQ3IDE3Ljg4NjIgMzYuODI2MSAxNS41ODcyIDM1LjczMDlDMTMuMjcyOSAzNC42MjgzIDExLjY3NjUgMzMuMTQwNyAxMC45NTIzIDMxLjU2MTVMOC43NzA3OCAzMi41NjE5QzkuODAyNjEgMzQuODEyIDExLjkxNzQgMzYuNjQwOSAxNC41NTUgMzcuODk3NUMxNy4yMDc5IDM5LjE2MTQgMjAuNDgzMSAzOS44OTQ3IDI0LjAwMjggMzkuODk0N1YzNy40OTQ3Wk05LjY3NjIxIDMzLjYzMTVDOS42NzYyMSAzMy4xOTkyIDkuNzQ0NzEgMzIuNzczNCA5Ljg3ODk0IDMyLjM1NDZMNy41OTM0NyAzMS42MjJDNy4zODYyMiAzMi4yNjg2IDcuMjc2MjEgMzIuOTQxMyA3LjI3NjIxIDMzLjYzMTVIOS42NzYyMVpNMjQuMDAyNSA0MS40MDA0QzE5Ljg4NzQgNDEuNDAwNCAxNi4yMjA2IDQwLjQzNDMgMTMuNjI0IDM4LjkzNDRDMTAuOTk1OSAzNy40MTYyIDkuNjc2MjEgMzUuNDk4MyA5LjY3NjIxIDMzLjYzMTVINy4yNzYyMUM3LjI3NjIxIDM2LjcxODEgOS40MzIyNSAzOS4yODQ2IDEyLjQyMzUgNDEuMDEyNkMxNS40NDY0IDQyLjc1ODcgMTkuNTQyOCA0My44MDA0IDI0LjAwMjUgNDMuODAwNFY0MS40MDA0Wk0zOC4zMjg5IDMzLjYzMTVDMzguMzI4OSAzNS40OTgzIDM3LjAwOTIgMzcuNDE2MiAzNC4zODExIDM4LjkzNDRDMzEuNzg0NSA0MC40MzQzIDI4LjExNzcgNDEuNDAwNCAyNC4wMDI1IDQxLjQwMDRWNDMuODAwNEMyOC40NjIzIDQzLjgwMDQgMzIuNTU4NyA0Mi43NTg3IDM1LjU4MTYgNDEuMDEyNkMzOC41NzI4IDM5LjI4NDYgNDAuNzI4OSAzNi43MTgxIDQwLjcyODkgMzMuNjMxNUgzOC4zMjg5Wk0zOC4xMjYzIDMyLjM1NTJDMzguMjYwNCAzMi43NzM4IDM4LjMyODkgMzMuMTk5NCAzOC4zMjg5IDMzLjYzMTVINDAuNzI4OUM0MC43Mjg5IDMyLjk0MTYgNDAuNjE5IDMyLjI2OTIgNDAuNDExOSAzMS42MjI5TDM4LjEyNjMgMzIuMzU1MlpNMTAuOTUyMyAzMS41NjE1QzEwLjY0OSAzMC45IDEwLjAyMDkgMzAuNTA1NyA5LjM4NTc2IDMwLjQ0NzNDOC42OTg5NCAzMC4zODQyIDcuODc5MTMgMzAuNzMwOCA3LjU5MzQ3IDMxLjYyMkw5Ljg3ODk0IDMyLjM1NDZDOS44MzQ5OCAzMi40OTE3IDkuNzI5NjUgMzIuNjQyNyA5LjU2MTgzIDMyLjc0MkM5LjQwNzg3IDMyLjgzMzIgOS4yNjE3MyAzMi44NDYxIDkuMTY2MTIgMzIuODM3M0M4Ljk5NDY5IDMyLjgyMTUgOC44NDU1OSAzMi43MjUgOC43NzA3OCAzMi41NjE5TDEwLjk1MjMgMzEuNTYxNVpNMzkuMjM0NSAzMi41NjI2QzM5LjE1OTcgMzIuNzI1NyAzOS4wMTA2IDMyLjgyMjIgMzguODM5MSAzMi44Mzc5QzM4Ljc0MzUgMzIuODQ2NyAzOC41OTc0IDMyLjgzMzggMzguNDQzNCAzMi43NDI2QzM4LjI3NTYgMzIuNjQzMyAzOC4xNzAzIDMyLjQ5MjMgMzguMTI2MyAzMi4zNTUyTDQwLjQxMTkgMzEuNjIyOUM0MC4xMjY0IDMwLjczMTYgMzkuMzA2NiAzMC4zODQ5IDM4LjYxOTggMzAuNDQ4QzM3Ljk4NDYgMzAuNTA2MyAzNy4zNTY1IDMwLjkwMDUgMzcuMDUzMSAzMS41NjJMMzkuMjM0NSAzMi41NjI2WiIKICAgICAgICAgIGZpbGw9IiMxMTlFOEYiIG1hc2s9InVybCgjcGF0aC00LWluc2lkZS0xXzE0MTc2XzUxNDEwMCkiLz4KICAgIDxtYXNrIGlkPSJwYXRoLTYtaW5zaWRlLTJfMTQxNzZfNTE0MTAwIiBmaWxsPSJ3aGl0ZSI+CiAgICAgICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiCiAgICAgICAgICAgICAgZD0iTTM5LjI2OTQgMjQuNzEwMUMzOS4xMDIxIDI0LjE4OCAzOC4zNzI3IDI0LjI4NTEgMzguMTQ0MSAyNC43ODM0QzM2LjM4NzkgMjguNjEyNiAzMC43MjE3IDMxLjQxNiAyNC4wMDMgMzEuNDE2QzE3LjI4NDMgMzEuNDE2IDExLjYxODEgMjguNjEyNiA5Ljg2MTkgMjQuNzgzM0M5LjYzMzM0IDI0LjI4NDkgOC45MDM5IDI0LjE4NzkgOC43MzY1NiAyNC43MUM4LjU2NTg2IDI1LjI0MjYgOC40NzY2NCAyNS43OTE4IDguNDc2NjQgMjYuMzUzQzguNDc2NjQgMzEuMzA2NCAxNS40MjggMzUuMzIxOSAyNC4wMDMgMzUuMzIxOUMzMi41Nzc5IDM1LjMyMTkgMzkuNTI5MyAzMS4zMDY0IDM5LjUyOTMgMjYuMzUzQzM5LjUyOTMgMjUuNzkxOCAzOS40NDAxIDI1LjI0MjcgMzkuMjY5NCAyNC43MTAxWiIvPgogICAgPC9tYXNrPgogICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiCiAgICAgICAgICBkPSJNMzkuMjY5NCAyNC43MTAxQzM5LjEwMjEgMjQuMTg4IDM4LjM3MjcgMjQuMjg1MSAzOC4xNDQxIDI0Ljc4MzRDMzYuMzg3OSAyOC42MTI2IDMwLjcyMTcgMzEuNDE2IDI0LjAwMyAzMS40MTZDMTcuMjg0MyAzMS40MTYgMTEuNjE4MSAyOC42MTI2IDkuODYxOSAyNC43ODMzQzkuNjMzMzQgMjQuMjg0OSA4LjkwMzkgMjQuMTg3OSA4LjczNjU2IDI0LjcxQzguNTY1ODYgMjUuMjQyNiA4LjQ3NjY0IDI1Ljc5MTggOC40NzY2NCAyNi4zNTNDOC40NzY2NCAzMS4zMDY0IDE1LjQyOCAzNS4zMjE5IDI0LjAwMyAzNS4zMjE5QzMyLjU3NzkgMzUuMzIxOSAzOS41MjkzIDMxLjMwNjQgMzkuNTI5MyAyNi4zNTNDMzkuNTI5MyAyNS43OTE4IDM5LjQ0MDEgMjUuMjQyNyAzOS4yNjk0IDI0LjcxMDFaIgogICAgICAgICAgZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzE0MTc2XzUxNDEwMCkiLz4KICAgIDxwYXRoIGQ9Ik0zOC4xNDQxIDI0Ljc4MzRMMzcuMDUzMyAyNC4yODMyTDM4LjE0NDEgMjQuNzgzNFpNMzkuMjY5NCAyNC43MTAxTDM4LjEyNjcgMjUuMDc2M0wzOS4yNjk0IDI0LjcxMDFaTTM3LjA1MzMgMjQuMjgzMkMzNi4zMjkxIDI1Ljg2MjMgMzQuNzMyNyAyNy4zNDk4IDMyLjQxODQgMjguNDUyM0MzMC4xMTk0IDI5LjU0NzUgMjcuMjAyMSAzMC4yMTYgMjQuMDAzIDMwLjIxNlYzMi42MTZDMjcuNTIyNiAzMi42MTYgMzAuNzk3NyAzMS44ODI4IDMzLjQ1MDYgMzAuNjE5QzM2LjA4ODEgMjkuMzYyNSAzOC4yMDI5IDI3LjUzMzcgMzkuMjM0OCAyNS4yODM3TDM3LjA1MzMgMjQuMjgzMlpNMjQuMDAzIDMwLjIxNkMyMC44MDM5IDMwLjIxNiAxNy44ODY2IDI5LjU0NzUgMTUuNTg3NiAyOC40NTIzQzEzLjI3MzMgMjcuMzQ5OCAxMS42NzY5IDI1Ljg2MjMgMTAuOTUyNyAyNC4yODMxTDguNzcxMTQgMjUuMjgzNkM5LjgwMzA2IDI3LjUzMzYgMTEuOTE3OSAyOS4zNjI1IDE0LjU1NTQgMzAuNjE5QzE3LjIwODMgMzEuODgyOCAyMC40ODM0IDMyLjYxNiAyNC4wMDMgMzIuNjE2VjMwLjIxNlpNOS42NzY2NCAyNi4zNTNDOS42NzY2NCAyNS45MjA3IDkuNzQ1MTEgMjUuNDk1IDkuODc5MzEgMjUuMDc2Mkw3LjU5MzgyIDI0LjM0MzhDNy4zODY2MSAyNC45OTAzIDcuMjc2NjQgMjUuNjYyOSA3LjI3NjY0IDI2LjM1M0g5LjY3NjY0Wk0yNC4wMDMgMzQuMTIxOUMxOS44ODc4IDM0LjEyMTkgMTYuMjIxIDMzLjE1NTggMTMuNjI0NCAzMS42NTU5QzEwLjk5NjMgMzAuMTM3NyA5LjY3NjY0IDI4LjIxOTggOS42NzY2NCAyNi4zNTNINy4yNzY2NEM3LjI3NjY0IDI5LjQzOTYgOS40MzI2OCAzMi4wMDYxIDEyLjQyNCAzMy43MzQxQzE1LjQ0NjggMzUuNDgwMiAxOS41NDMyIDM2LjUyMTkgMjQuMDAzIDM2LjUyMTlWMzQuMTIxOVpNMzguMzI5MyAyNi4zNTNDMzguMzI5MyAyOC4yMTk4IDM3LjAwOTcgMzAuMTM3NyAzNC4zODE1IDMxLjY1NTlDMzEuNzg0OSAzMy4xNTU4IDI4LjExODIgMzQuMTIxOSAyNC4wMDMgMzQuMTIxOVYzNi41MjE5QzI4LjQ2MjggMzYuNTIxOSAzMi41NTkyIDM1LjQ4MDIgMzUuNTgyIDMzLjczNDFDMzguNTczMyAzMi4wMDYxIDQwLjcyOTMgMjkuNDM5NiA0MC43MjkzIDI2LjM1M0gzOC4zMjkzWk0zOC4xMjY3IDI1LjA3NjNDMzguMjYwOCAyNS40OTUgMzguMzI5MyAyNS45MjA4IDM4LjMyOTMgMjYuMzUzSDQwLjcyOTNDNDAuNzI5MyAyNS42NjI5IDQwLjYxOTQgMjQuOTkwNCA0MC40MTIyIDI0LjM0MzlMMzguMTI2NyAyNS4wNzYzWk0xMC45NTI3IDI0LjI4MzFDMTAuNjQ5MyAyMy42MjE2IDEwLjAyMTIgMjMuMjI3NCA5LjM4NjAzIDIzLjE2OUM4LjY5OTIxIDIzLjEwNTkgNy44Nzk0MyAyMy40NTI2IDcuNTkzODIgMjQuMzQzOEw5Ljg3OTMxIDI1LjA3NjJDOS44MzUzNiAyNS4yMTM0IDkuNzMwMDQgMjUuMzY0MyA5LjU2MjIyIDI1LjQ2MzdDOS40MDgyNyAyNS41NTQ4IDkuMjYyMTIgMjUuNTY3NyA5LjE2NjUxIDI1LjU1ODlDOC45OTUwNyAyNS41NDMyIDguODQ1OTYgMjUuNDQ2NyA4Ljc3MTE0IDI1LjI4MzZMMTAuOTUyNyAyNC4yODMxWk0zOS4yMzQ4IDI1LjI4MzdDMzkuMTYgMjUuNDQ2OCAzOS4wMTA5IDI1LjU0MzMgMzguODM5NSAyNS41NTkxQzM4Ljc0MzkgMjUuNTY3OSAzOC41OTc3IDI1LjU1NSAzOC40NDM3IDI1LjQ2MzhDMzguMjc1OSAyNS4zNjQ0IDM4LjE3MDYgMjUuMjEzNSAzOC4xMjY3IDI1LjA3NjNMNDAuNDEyMiAyNC4zNDM5QzQwLjEyNjYgMjMuNDUyNyAzOS4zMDY4IDIzLjEwNjEgMzguNjIgMjMuMTY5MUMzNy45ODQ5IDIzLjIyNzUgMzcuMzU2NyAyMy42MjE3IDM3LjA1MzMgMjQuMjgzMkwzOS4yMzQ4IDI1LjI4MzdaIgogICAgICAgICAgZmlsbD0iIzExOUU4RiIgbWFzaz0idXJsKCNwYXRoLTYtaW5zaWRlLTJfMTQxNzZfNTE0MTAwKSIvPgogICAgPHBhdGggZD0iTTM4LjYyNjIgMTYuMTAwN0MzOC42MjYyIDE4LjEyIDM3LjIwMiAyMC4xMTkgMzQuNTI4NCAyMS42NjM0QzMxLjg3ODUgMjMuMTk0MSAyOC4xNTgxIDI0LjE2OTcgMjMuOTk5OCAyNC4xNjk3QzE5Ljg0MTYgMjQuMTY5NyAxNi4xMjExIDIzLjE5NDEgMTMuNDcxMiAyMS42NjM0QzEwLjc5NzcgMjAuMTE5IDkuMzczNSAxOC4xMiA5LjM3MzUgMTYuMTAwN0M5LjM3MzUgMTQuMDgxNSAxMC43OTc3IDEyLjA4MjUgMTMuNDcxMiAxMC41MzgxQzE2LjEyMTEgOS4wMDczNiAxOS44NDE2IDguMDMxODQgMjMuOTk5OCA4LjAzMTg0QzI4LjE1ODEgOC4wMzE4NCAzMS44Nzg1IDkuMDA3MzYgMzQuNTI4NCAxMC41MzgxQzM3LjIwMiAxMi4wODI1IDM4LjYyNjIgMTQuMDgxNSAzOC42MjYyIDE2LjEwMDdaIgogICAgICAgICAgc3Ryb2tlPSIjMTE5RThGIiBzdHJva2Utd2lkdGg9IjEuOCIvPgogICAgPGNpcmNsZSBjeD0iOS4yODk4IiBjeT0iMTYuMTAwOCIgcj0iMi4wOTc0MiIgZmlsbD0idXJsKCNwYWludDJfbGluZWFyXzE0MTc2XzUxNDEwMCkiLz4KICAgIDxjaXJjbGUgY3g9IjI0LjAwMjUiIGN5PSIyNC43MDM5IiByPSIyLjA5NzQyIiBmaWxsPSJ1cmwoI3BhaW50M19saW5lYXJfMTQxNzZfNTE0MTAwKSIvPgogICAgPGNpcmNsZSBjeD0iMjQuMDAyNSIgY3k9IjcuNDk3NTciIHI9IjIuMDk3NDIiIGZpbGw9InVybCgjcGFpbnQ0X2xpbmVhcl8xNDE3Nl81MTQxMDApIi8+CiAgICA8Y2lyY2xlIGN4PSIzOC43MTA2IiBjeT0iMTYuMTAwOCIgcj0iMi4wOTc0MiIgZmlsbD0idXJsKCNwYWludDVfbGluZWFyXzE0MTc2XzUxNDEwMCkiLz4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xNDE3Nl81MTQxMDAiIHgxPSIyNC4wMDI2IiB5MT0iNDIuNjAwMiIgeDI9IjI0LjAwMjYiIHkyPSIzMS43NjI2IgogICAgICAgICAgICAgICAgICAgICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMxNkQyQkYiLz4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDFfbGluZWFyXzE0MTc2XzUxNDEwMCIgeDE9IjI0LjAwMyIgeTE9IjM1LjMyMTkiIHgyPSIyNC4wMDMiIHkyPSIyNC40ODQzIgogICAgICAgICAgICAgICAgICAgICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMxNkQyQkYiLz4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDJfbGluZWFyXzE0MTc2XzUxNDEwMCIgeDE9IjguMDA2NjIiIHkxPSIxNS4yMTczIiB4Mj0iOC4wMDY2MiIgeTI9IjE4LjE5ODMiCiAgICAgICAgICAgICAgICAgICAgICAgIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzM2RDZDNCIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMxNUJFQUMiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQzX2xpbmVhcl8xNDE3Nl81MTQxMDAiIHgxPSIyMi43MTkzIiB5MT0iMjMuODIwMyIgeDI9IjIyLjcxOTMiIHkyPSIyNi44MDEzIgogICAgICAgICAgICAgICAgICAgICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMzNkQ2QzQiLz4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMTVCRUFDIi8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50NF9saW5lYXJfMTQxNzZfNTE0MTAwIiB4MT0iMjIuNzE5MyIgeTE9IjYuNjE0MDMiIHgyPSIyMi43MTkzIiB5Mj0iOS41OTQ5OSIKICAgICAgICAgICAgICAgICAgICAgICAgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjMzZENkM0Ii8+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE1QkVBQyIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDVfbGluZWFyXzE0MTc2XzUxNDEwMCIgeDE9IjM3LjQyNzQiIHkxPSIxNS4yMTczIiB4Mj0iMzcuNDI3NCIgeTI9IjE4LjE5ODMiCiAgICAgICAgICAgICAgICAgICAgICAgIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzM2RDZDNCIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMxNUJFQUMiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgo8L3N2Zz4K"},,function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(5),r(11),r(6),r(86),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(86),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(188),r(7);var u,o=n(r(315)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=n(r(451)),v=n(r(26)),g=r(433),y=n(r(790)),E=n(r(795)),b=n(r(880)),_=n(r(792)),O=l(r(793)),S=r(52),C=n(r(796)),D=r(72),k=r(878),N=r(832),T=n(r(3)),R=n(r(1128)),w=n(r(3706));function I(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function M(e){for(var t=1;t0?"builtin":"custom"},e.handleTabChange=function(t){e.setState({type:t},(function(){e.props.store.list.reset(),e.getData()}))},e.getData=function(t){e.props.store.fetchList(M(M(M({},e.props.match.params),t),{},{sortBy:"activeAt",type:e.state.type}))},e.getResourceType=function(e){var a=(0,h.default)(e);return t("ALERT_TYPE",{type:t(a)})},e.getColumns=function(){var a=e.props,r=a.getFilteredValue,n=a.getSortOrder;return[{title:t("MESSAGE"),dataIndex:"name",render:function(e,t){return m.default.createElement(y.default,{icon:"loudspeaker",title:(0,v.default)(t,"annotations.summary"),description:(0,v.default)(t,"annotations.message")||(0,v.default)(t,"annotations.description","-")})}},{title:t("STATUS"),dataIndex:"state",filters:e.getStatus(),filteredValue:r("state"),isHideable:!0,search:!0,width:"12%",render:function(e){return m.default.createElement(E.default,{type:e,name:t("ALERT_RULE_".concat(e.toUpperCase()),{defaultValue:e})})}},{title:t("SEVERITY"),dataIndex:"labels.severity",filters:e.getAlertingTypes(),filteredValue:r("labels.severity"),isHideable:!0,search:!0,width:"12%",render:function(e){return m.default.createElement(b.default,{data:e})}},{title:t("ALERTING_RULE_NAME"),dataIndex:"labels.alertname",filteredValue:r("labels.alertname"),isHideable:!0,width:"12%",search:!0},{title:t("ALERTING_POLICY"),dataIndex:"ruleName",isHideable:!0,width:"12%",render:function(t,a){var r=(0,v.default)(a,"labels.rule_group");return m.default.createElement(g.Link,{to:"builtin"===e.state.type?"".concat(e.getPrefix(),"/alert-rules/builtin/").concat(r):"".concat(e.getPrefix(),"/alert-rules/").concat(r)},r)}},{title:t("MONITORING_TARGET"),dataIndex:"labels",isHideable:!0,width:"16%",render:function(a){if("template"!==a.rule_type)return"-";var r=(0,k.getAlertingResource)(a),n=r.module,l=r.name,u=r.namespace;return n?"hpas"===n?m.default.createElement("span",null,t(D.MODULE_KIND_MAP[n]),": ",l):m.default.createElement(g.Link,{to:"".concat(e.getPrefix({namespace:u}),"/").concat(n,"/").concat(l)},t(D.MODULE_KIND_MAP[n]),": ",l):"-"}},{title:t("TRIGGER_TIME"),dataIndex:"activeAt",isHideable:!0,width:200,sorter:!0,sortOrder:n("activeAt"),render:function(e){return(0,S.getLocalTime)(e).format("YYYY-MM-DD HH:mm:ss")}}]},e}return(0,s.default)(r,[{key:"componentDidMount",value:function(){var e=this.props.match.params,t=e.cluster;!e.namespace&&this.props.store.fetchCount({cluster:t})}},{key:"getPrefix",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r=this.props.match.params,n=r.cluster,l=r.namespace,u=r.workspace;return t=t||n,a=a||l,"".concat(u?"/".concat(u):"","/clusters/").concat(t).concat(a?"/projects/".concat(a):"")}},{key:"getTableProps",value:function(){return{tableActions:M(M({},this.props.tableProps.tableActions),{},{selectActions:[]}),emptyProps:{desc:t("ALERTING_MESSAGE_EMPTY_DESC")}}}},{key:"getAlertingTypes",value:function(){return N.SEVERITY_LEVEL.map((function(e){return{text:t(e.label),value:e.value}}))}},{key:"getStatus",value:function(){return["pending","firing"].map((function(e){return{text:t("ALERT_RULE_".concat(e.toUpperCase())),value:e}}))}},{key:"render",value:function(){var e=this.props,a=e.bannerProps,r=e.tableProps;return m.default.createElement(O.ListPage,(0,o.default)({},this.props,{getData:this.getData,noWatch:!0}),m.default.createElement(_.default,(0,o.default)({},a,{tips:this.tips,tabs:this.tabs,icon:"loudspeaker",title:t("ALERTING_MESSAGE_PL"),description:t("ALERT_MESSAGE_DESC"),className:(0,T.default)(w.default.tab_button,a.className)})),m.default.createElement(C.default,(0,o.default)({},r,this.getTableProps(),{rowKey:"id",itemActions:[],columns:this.getColumns(),onCreate:this.showCreate,showKeywords:!0})))}},{key:"tabs",get:function(){var e,a,r=this.props.match.params.namespace,n=globals.app.hasKSModule("whizard"),l="none"!==(null===(e=window.parent.globals.ksConfig)||void 0===e||null===(a=e.multicluster)||void 0===a?void 0:a.clusterRole);if(r)return{};var u={value:this.state.type,onChange:this.handleTabChange,options:[{value:"custom",label:t("ALERTS_FROM_CUSTOM_POLICIES"),count:this.props.store.ruleCount}]},o=(0,S.checkComponentAuthorized)({componentName:"whizard",componentConstraints:(0,v.default)(globals,"licenseInfo.componentConstraints",[])});return l&&n?u.options.push(M({value:"builtin",label:t("ALERTS_FROM_BUILT_IN_POLICIES"),disabled:!0},o&&{tooltip:{content:t("BUILT_IN_POLICIES_TOOLTIP"),placement:"left"}})):u.options.push({value:"builtin",label:t("ALERTS_FROM_BUILT_IN_POLICIES"),count:this.props.store.builtinRuleCount}),u}},{key:"tips",get:function(){return[{title:t("REQUESTS_FOR_TRIGGER_AN_ALARM_Q"),description:t("REQUESTS_FOR_TRIGGER_AN_ALARM_A")}]}}]),r}(m.default.Component))||u;a.default=A},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_METRICS_CONFIG=t.RESOURCE_METRICS_CONFIG=void 0,a(12),a(11),a(6),a(28),a(34),a(15),a(9),a(13),a(10),a(4),a(7);var n=r(a(30)),l=r(a(3703)),u=r(a(3704)),o=r(a(3705));function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function c(e){for(var t=1;t0?"builtin":"custom"},e.fetchCount=function(){var t=e.props.match.params,a=t.cluster;!t.namespace&&e.props.store.fetchCount({cluster:a})},e.handleTabChange=function(t){e.setState({type:t},(function(){e.props.store.list.reset(),e.getData()}))},e.getData=(0,p.default)(i.default.mark((function t(){var a,r,n,l,u=arguments;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=u.length>0&&void 0!==u[0]?u[0]:{},r=a.silent,n=(0,s.default)(a,["silent"]),l=e.props.store,r&&(l.list.silent=!0),t.next=5,l.fetchList(j(j(j({},e.props.match.params),n),{},{limit:n.limit||l.list.limit||10,page:n.page||l.list.page||1,type:e.state.type}));case 5:l.list.silent=!1;case 6:case"end":return t.stop()}}),t)}))),e.getColumns=function(){var a=e.props.getFilteredValue;return[{title:t("NAME"),dataIndex:"name",search:!0,render:function(t,a){return S.default.createElement(E.default,{avatar:"/assets/bell_gear_duotone.svg",title:(0,N.getDisplayName)(a),desc:a.description,className:P.default["table-icon"],to:"builtin"===e.state.type?"".concat(e.props.match.url,"/builtin/").concat(a.name):"".concat(e.props.match.url,"/").concat(t)})}},{title:t("POLICY_STATUS"),dataIndex:"enable",filters:e.getEnableFilter(),filteredValue:a("enable"),isHideable:!0,search:!0,width:"16%",render:function(e,a){return S.default.createElement(b.default,{className:P.default.status_icon,type:a.enabled&&JSON.parse(a.enabled)?"active":"disabled",name:a.enabled&&JSON.parse(a.enabled)?t("ENABLED"):t("DISABLED")})}},{title:t("RULE_STATUS"),dataIndex:"state",search:!0,filters:e.getStatus(),isHideable:!0,width:"16%",render:function(e,t){return S.default.createElement(M.default,{rulesStats:t.rulesStats})}},{title:t("TIME_SPENT"),dataIndex:"evaluationTime",isHideable:!0,width:"12%",render:function(e){return S.default.createElement("span",null,"-"!==e?t("TIME_S",{num:e}):e)}},{title:t("RECENT_DETECT_TIME"),dataIndex:"lastEvaluation",isHideable:!0,width:"15.8%",render:function(e,t){var a=(0,k.default)(t._originDataWithStatus,"status.lastEvaluation");return S.default.createElement("span",null,a?(0,N.getLocalTime)(a).format("YYYY-MM-DD HH:mm:ss"):"-")}}]},e.showCreate=function(){var a=e.props,r=a.match,n=a.routing,l=a.module;return e.props.trigger("alerting.policy.create",{module:l,cluster:r.params.cluster,namespace:r.params.namespace,title:t("CREATE_ALERTING_POLICY"),success:function(){n.query(),e.fetchCount()}})},e}return(0,h.default)(n,[{key:"componentDidMount",value:function(){this.fetchCount(),localStorage.removeItem("alert-policy-detail-referrer")}},{key:"getStatus",value:function(){return T.ALERTING_STATUS.map((function(e){return{text:t("ALERT_RULE_".concat(e.toUpperCase())),value:e}}))}},{key:"getEnableFilter",value:function(){return[{text:t("ENABLED"),value:"true"},{text:t("DISABLED"),value:"false"}]}},{key:"getAlertingTypes",value:function(){return D.SEVERITY_LEVEL.map((function(e){return{text:t(e.label),value:e.value}}))}},{key:"render",value:function(){var e=this.props,t=e.bannerProps,a=e.tableProps,r=this.showCreate,n=this.tableActions;return"builtin"===this.state.type&&(n.selectActions=n.selectActions.filter((function(e){return"delete"!==e.action})).concat(this.resetPolicy),r=null),S.default.createElement(O.ListPage,(0,o.default)({},this.props,{getData:this.getData,noWatch:!0}),S.default.createElement(_.default,(0,o.default)({},t,{icon:function(){return S.default.createElement("img",{src:"/assets/bell_gear_duotone.svg"})},tips:this.tips,tabs:this.tabs,className:(0,R.default)(P.default.tab_button,t.className)})),S.default.createElement(C.default,(0,o.default)({},a,{rowKey:"name",itemActions:this.itemActions,columns:this.getColumns(),tableActions:n,onCreate:r})))}},{key:"tabs",get:function(){var e,a,r=this.props.match.params.namespace,n=globals.app.hasKSModule("whizard"),l="none"!==(null===(e=window.parent.globals.ksConfig)||void 0===e||null===(a=e.multicluster)||void 0===a?void 0:a.clusterRole);if(r)return{};var u={value:this.state.type,onChange:this.handleTabChange,options:[{value:"custom",label:t("CUSTOM_POLICIES"),count:this.props.store.ruleCount}]},o=(0,N.checkComponentAuthorized)({componentName:"whizard",componentConstraints:(0,k.default)(globals,"licenseInfo.componentConstraints",[])});return l&&n?u.options.push(j({value:"builtin",label:t("BUILT_IN_POLICIES"),disabled:!0},o&&{tooltip:{content:t("BUILT_IN_POLICIES_TOOLTIP"),placement:"left"}})):u.options.push({value:"builtin",label:t("BUILT_IN_POLICIES"),count:this.props.store.builtinRuleCount}),u}},{key:"tips",get:function(){return[{title:t("REQUESTS_FOR_PUSH_AN_ALARM_Q"),description:t("REQUESTS_FOR_PUSH_AN_ALARM_A")}]}},{key:"itemActions",get:function(){var a=this,r=this.props,n=r.trigger,l=r.routing,u=r.match,o=r.name,i=this.state.type,c=[{key:"edit",icon:"pen",text:t("EDIT_INFORMATION"),action:"edit",onClick:function(a){n("alerting.baseinfo.edit",{type:i,detail:a,module:e,cluster:u.params.cluster,namespace:u.params.namespace,title:t("EDIT_ALERTING_POLICY"),success:l.query})}},{key:"editYaml",icon:"pen",text:t("EDIT_YAML"),action:"edit",onClick:function(e){return n("alerting.yaml.edit",{type:i,detail:e,cluster:u.params.cluster,namespace:u.params.namespace,title:t("EDIT_ALERTING_POLICY"),success:l.query})}},{key:"editRule",icon:"wrench",text:t("EDIT_ALERT_RULES"),action:"edit",onClick:function(e){n("alerting.rule.edit",{type:i,detail:e,cluster:u.params.cluster,namespace:u.params.namespace,success:l.query})}},{key:"disablePolicy",icon:function(e){return JSON.parse(e.enabled)?"stop":"start"},text:function(e){return JSON.parse(e.enabled)?t("DISABLE"):t("ENABLE")},action:"edit",onClick:function(e){var a=JSON.parse(e.enabled);n(a?"alerting.rule.update":"enable.alerting.rule",{type:i,detail:e,cluster:u.params.cluster,namespace:u.params.namespace,resourceName:o,success:l.query,title:a?t("DISABLE_ALERTING_POLICY"):t("ENABLE_ALERTING_POLICY"),enabled:a})}}];return"builtin"===i?c.push(this.resetPolicy):c.push({key:"delete",icon:"trash",text:t("DELETE"),action:"delete",onClick:function(e){return n("alerting.rule.delete",{type:i,name:o,cluster:u.params.cluster,namespace:u.params.namespace,detail:e,success:function(){l.query(),a.fetchCount()}})}}),c}},{key:"tableActions",get:function(){var e=this.props,a=e.tableProps,r=e.trigger,n=e.name,l=e.store,o=e.match,i=e.routing,c=this.state.type,s=(0,w.toJS)(l.list.data),f=(0,w.toJS)(l.list.selectedRowKeys),d=s.filter((function(e){return f.includes(e.name)})).every((function(e){return!JSON.parse(e.enabled)})),p=s.filter((function(e){return f.includes(e.name)})).every((function(e){return JSON.parse(e.enabled)}));return j(j({},a.tableActions),{},{selectActions:[].concat((0,u.default)(a.tableActions.selectActions),[{key:"enable",text:t("ENABLE"),action:"edit",disabled:p,onClick:function(){r("enable.alerting.rule",{type:c,resourceName:n,cluster:o.params.cluster,namespace:o.params.namespace,title:t("ENABLE_ALERTING_POLICY"),enabled:!1,success:i.query,batchMode:!0})}},{key:"disable",text:t("DISABLE"),action:"edit",disabled:d,onClick:function(){r("alerting.rule.update",{type:c,resourceName:n,cluster:o.params.cluster,namespace:o.params.namespace,enabled:!0,success:i.query,batchMode:!0})}}])})}},{key:"resetPolicy",get:function(){var e=this.props,a=e.match,r=e.trigger,n=e.routing,l=this.state.type;return{key:"reset",icon:"restart",text:t("RESET"),action:"edit",onClick:function(e){return r("alerting.rule.reset",{type:l,cluster:a.params.cluster,detail:e,success:n.query})}}}}]),n}(S.default.Component),U=(0,O.default)({store:new I.default,module:"rules",authKey:"rulegroups",name:"ALERTING_POLICY"})(d=function(e){(0,v.default)(a,e);var t=L(a);function a(){return(0,m.default)(this,a),t.apply(this,arguments)}return a}(x))||d;a.default=U;var z=(0,O.default)({store:new I.default,module:"rules",authKey:"clusterrulegroups",name:"ALERTING_POLICY"})(f=function(e){(0,v.default)(a,e);var t=L(a);function a(){return(0,m.default)(this,a),t.apply(this,arguments)}return a}(x))||f;a.ClusterAlertingPolicies=z}).call(this,r(138)(e))},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(98),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(30)),u=n(r(96));r(18),r(98);var o=n(r(0)),i=r(186),c=n(r(3)),s=n(r(3707)),f=function(e){var a=e.rulesStats,r={pending:t("ALERT_RULE_PENDING"),inactive:t("ALERT_RULE_INACTIVE"),firing:t("ALERT_RULE_FIRING"),disabled:t("DISABLED")},n=Object.entries(a).map((function(e){var t=(0,u.default)(e,2),a=t[0],n=t[1];return{label:r[a],type:a,value:n}}));return o.default.createElement(i.Tooltip,{content:o.default.createElement(o.default.Fragment,null,n.map((function(e,t){return o.default.createElement("div",{key:t,className:(0,c.default)(s.default.tipContent,[s.default[e.type]],(0,l.default)({},s.default.disabled,0===e.value))},o.default.createElement("span",null,e.label),o.default.createElement("span",null,e.value))}))),placement:"right"},o.default.createElement("ul",{className:s.default.statusBox},n.map((function(e,t){return o.default.createElement("li",{key:t,className:(0,c.default)([s.default["li-".concat(e.type)]],(0,l.default)({},s.default.iconDisabled,0===e.value))},e.value)}))))};a.default=f},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(827),a(11),a(6),a(9),a(13),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.getClassNames=c,t.mapProps=void 0;var n=r(a(30)),l=r(a(58));a(12),a(5),a(827),a(11),a(6),a(28),a(34),a(15),a(9),a(13),a(10),a(4),a(7);var u=r(a(3));function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:24,n=c(e),u=n.className,o=n.colorProps,s=e.size,f=e.width,d=e.height,p=(e.primary,e.secondary,e.variant,(0,l.default)(e,["size","width","height","primary","secondary","variant"]));return i(i(i({width:null!==(t=null!=s?s:f)&&void 0!==t?t:r,height:null!==(a=null!=s?s:d)&&void 0!==a?a:r,viewBox:"0 0 ".concat(r," ").concat(r),xmlns:"http://www.w3.org/2000/svg"},p),o),{},{className:u})}},,,function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(84),r(86),r(18),r(48),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(17),r(85),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.Component=a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(84),r(86),r(18),r(28),r(48),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(85),r(7);var l,u,o,i,c,s=n(r(61)),f=n(r(30)),d=n(r(65)),p=n(r(36)),m=n(r(37)),h=n(r(88)),v=n(r(55)),g=n(r(56)),y=n(r(51)),E=n(r(49)),b=(n(r(66)),r(186)),_=n(r(3)),O=n(r(788)),S=n(r(846)),C=n(r(1047)),D=n(r(886)),k=n(r(987)),N=n(r(158)),T=r(14),R=r(239),w=n(r(0)),I=n(r(1209)),M=n(r(1401)),P=n(r(1211)),A=r(52),j=r(72),L=r(794),x=n(r(3727));function U(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function z(e){for(var t=1;t0||a.indexOf("used_requests")>0)&&(r=(0,N.default)(l)||""===l?"N/A":""),!r){var u=j.MONITOR_RANK_UNIT_MAP[a],o=null!=l?l:0;"%"===u?r="".concat((0,L.getValueByUnit)(o,u),"%"):""===u?r=Math.round(100*o)/100:(n=(0,L.getSuitableUnit)(o,u),r=(0,L.getValueByUnit)(o,n))}return"".concat("gpu"===n?"".concat(r," GPU"):"core"===n?t("VALUE_CORES",{value:r}):t("VALUE_UNIT",{value:r,unit:n}))},e.renderQos=function(e){return w.default.createElement(w.default.Fragment,null,e.qos_class&&w.default.createElement(b.Tooltip,{content:j.COLOR_QOS[e.qos_class].label},w.default.createElement("span",{style:{display:"inline-block",marginRight:"4px",width:"16px",height:"16px",lineHeight:"16px",textAlign:"center",borderRadius:"2px",color:j.COLOR_QOS[e.qos_class].color,background:j.COLOR_QOS[e.qos_class].background}},e.qos_class.slice(0,1).toUpperCase())))},e.fetchRankData=function(t){e.store.fetchAll(z(z({},t),{},{cluster_resources_filter:e.clusters}))},(0,d.default)(e,"onChange",i,(0,h.default)(e)),(0,d.default)(e,"handleColumnsHide",c,(0,h.default)(e)),e}return(0,m.default)(r,[{key:"componentDidMount",value:function(){this.fetchRankData()}},{key:"renderToolbar",value:function(){return w.default.createElement("div",{className:(0,_.default)(x.default.toolbar,x.default.pane__toolbar,x.default.pane)},w.default.createElement(b.RadioGroup,{wrapClassName:"radio-group-button",value:this.type,onChange:this.onChange},w.default.createElement(b.RadioButton,{value:"node"},t("NODE_PL")),w.default.createElement(b.RadioButton,{value:"project"},t("PROJECT_PL")),w.default.createElement(b.RadioButton,{value:"pod"},t("POD_PL"))),w.default.createElement("div",{className:x.default.toolbar_filter},w.default.createElement(C.default,{className:x.default.columnMenu,title:t("CUSTOM_COLUMNS"),columns:this.columns,value:(0,T.toJS)(this.hideColumns),onChange:this.handleColumnsHide}),w.default.createElement(b.Select,{value:this.store.sort_metric,onChange:this.store.changeSortMetric,options:this.options}),w.default.createElement(b.Select,{className:x.default.sortTypeSelect,value:this.store.sort_type,onChange:this.store.changeSortType,options:[{value:"desc",label:t("SORT_BY_DESC")},{value:"asc",label:t("SORT_BY_ASC")}]})))}},{key:"renderList",value:function(){var e=this.store.data.toJS();return w.default.createElement("div",{className:x.default.listContainer},w.default.createElement(k.default,{columns:this.filteredColumns,dataSource:e,emptyText:w.default.createElement(S.default,null),loading:this.store.isLoading,store:this.store}),this.renderPagination())}},{key:"renderPagination",value:function(){var e=this.store,t=e.page,a=e.total,r=e.limit;return w.default.createElement("div",{className:(0,_.default)(x.default.pane,x.default.pane__pagination)},w.default.createElement(D.default,{page:t,total:a,limit:r,onChange:this.store.changePagination}))}},{key:"render",value:function(){return w.default.createElement("div",{className:x.default.wrapper},this.renderToolbar(),this.renderList())}},{key:"store",get:function(){return this.sourceMap[this.type].store}},{key:"cluster",get:function(){return this.props.cluster}},{key:"options",get:function(){var e=this,a=this.sourceMap[this.type].name;return this.store.sort_metric_options.filter((function(t){return!(0,T.toJS)(e.hideColumns).includes("".concat(t,"-").concat(a))})).map((function(e){return{value:e,label:t("SORT_BY_".concat(e.toUpperCase()))}}))}},{key:"columns",get:function(){var e,a=this,r=this.sourceMap[this.type],n=r.store,l=r.icon,u=r.name,o=r.url,i=r.desc,c=r.descLabel,f=null===(e=n.sort_metric_options)||void 0===e?void 0:e.map((function(e){return{key:"".concat(e,"-").concat(u),sort_metric:e,title:t("".concat(j.MONITOR_RANK_METERIC_LOCALS[e],"_TCAP")),isHideable:!0,render:function(t){return w.default.createElement("div",null,w.default.createElement("h3",null,a.transData(t,e)))}}})),d=[{title:t("namespace"===u?"PROJECT":u.toUpperCase()),width:"15%",key:u,render:function(e){var r=c?"".concat(t(c),": ").concat(null==e?void 0:e[i]," || '-'"):null==e?void 0:e[i];"WORKSPACES"===c&&(r=w.default.createElement("span",null,"".concat(t(c),": "),(0,A.showNameAndAlias)(null==e?void 0:e[i],"workspace")||"-")),"PROJECTS"===c&&(r=w.default.createElement("span",null,"".concat(t(c),": "),(0,A.showNameAndAlias)(null==e?void 0:e[i],"project")||"-"));var n=a.renderQos(e);return w.default.createElement(O.default,{className:x.default.avatar,icon:l,title:w.default.createElement(w.default.Fragment,null,n,"namespace"===u?(0,A.showNameAndAlias)(null==e?void 0:e[u],"project"):(null==e?void 0:e[u])||"-"),desc:r,iconSize:40,to:o(null==e?void 0:e[u],null==e?void 0:e.namespace)})}}];return(0,A.hideGPUByLicense)([].concat(d,(0,s.default)(f)),this.cluster)}},{key:"filteredColumns",get:function(){var e=this;return this.columns.filter((function(t){return!e.hideColumns.includes(t.key||t.dataIndex)}))}}]),r}(w.default.Component),u=(0,E.default)(l.prototype,"type",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"node"}}),o=(0,E.default)(l.prototype,"hideColumns",[T.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),i=(0,E.default)(l.prototype,"onChange",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.store.sort_metric=e.store.sort_metric_options[0],e.hideColumns=[],new Promise((function(a){e.type=t,a()})).then((function(){e.fetchRankData()}))}}}),c=(0,E.default)(l.prototype,"handleColumnsHide",[T.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.hideColumns=t;var a=e.sourceMap[e.type].name;if(t.includes("".concat(e.store.sort_metric,"-").concat(a))){var r,n=e.store.sort_metric_options.filter((function(e){return!t.includes("".concat(e,"-").concat(a))}));e.store.changeSortMetric(null!==(r=n[0])&&void 0!==r?r:"")}}}}),l),B=(0,R.inject)("rootStore")((0,R.observer)(V));a.default=B;var Y=V;a.Component=Y},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=e.mertic,r=void 0===a?{}:a,n=e.unit,l=e.resourceType,d=(0,o.useState)("requests"),p=(0,u.default)(d,2),m=p[0],h=p[1],v=(0,o.useState)(0),g=(0,u.default)(v,2),y=g[0],E=g[1];(0,o.useEffect)((function(){var e=0;0===r.total||(0,s.default)(r)||(e=("requests"===m?r.requests:r.limits)/r.total*100);E(e)}),[m,r]),(0,o.useEffect)((function(){h("requests")}),[l]);var b=(0,o.useCallback)((function(e){h(e)}),[]);return o.default.createElement("div",{className:f.default.resourceRatio},o.default.createElement("div",{className:f.default.subTitle},o.default.createElement(i.RadioGroup,{mode:"button",value:m,onChange:b},o.default.createElement(i.RadioButton,{value:"requests"},t("QUOTA_REQUEST")),o.default.createElement(i.RadioButton,{value:"limit"},t("QUOTA_LIMIT")))),o.default.createElement("div",{className:f.default.radio},o.default.createElement("div",{className:f.default.radioWrapper},o.default.createElement("p",null,t("QUOTA_ALLOCATED")),o.default.createElement("p",null,"core"===n?t("VALUE_CORES",{value:"requests"===m?r.requests:r.limits}):t("VALUE_UNIT",{value:"requests"===m?r.requests:r.limits,unit:n}))),o.default.createElement("div",{className:f.default.middleStyle},"VS"),o.default.createElement("div",{className:f.default.radioWrapper},o.default.createElement("p",null,t("QUOTA_TOTAL")),o.default.createElement("p",null,"core"===n?t("VALUE_CORES",{value:r.total}):t("VALUE_UNIT",{value:r.total,unit:n})))),o.default.createElement(c.default,{bgColor:"#eff4f9",maskBgColor:"#E3E9EF",percent:y}))};var u=l(r(96)),o=n(r(0)),i=r(186),c=l(r(1315)),s=l(r(63)),f=l(r(3739))},,,,function(e,t,a){e.exports={wrapper:"_7Y1PQK32lHq_nx8invFr0",title:"_5BsEswWpOXBRPzjAZKp1l",list:"_1-TRSuTGmycV9Jbf6f7cpA",item:"_1pTjLQ2gTmTYiDPkGxZqs2",icon:"_2cbC1jSIwrgYRS-VGF7pLk",status:"_2WFWmQJcW69bXrhE9fKVNp",info:"JQMG4HZH7ovOKnUMWyvnA",tag:"_2eqdBFa45ohBJ99HTLfZZX",emtpy:"_1Pwr7wYX9Uxhe5lB9-IvjM"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(84),r(27),r(190),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(84),r(42),r(27),r(190),r(4),r(23),r(57),r(17),r(85);var l,u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=r(239),p=n(r(26)),m=n(r(158)),h=r(52),v=r(794),g=r(186),y=n(r(846)),E=n(r(1810)),b=n(r(987)),_=n(r(3825));function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var S=(0,d.observer)(l=function(e){(0,i.default)(r,e);var a=O(r);function r(){var e;(0,u.default)(this,r);for(var n=arguments.length,l=new Array(n),o=0;o1&&void 0!==arguments[1]?arguments[1]:"";return isNaN(e)?"-":"".concat(e," ").concat(t)}},{key:"render",value:function(){var e=this.props,t=e.theme,a=e.store,r=e.cluster,n=this.props.store.data,l=(0,v.hideGPUByLicense)(this.columns,r);return h.default.createElement(p.default,{rowKey:"namespace",theme:t,columns:l,store:a,dataSource:n.toJS(),emptyText:h.default.createElement(d.default,null)})}},{key:"prefix",get:function(){var e=this.props,t=e.workspace,a=e.cluster;return"".concat(t?"/".concat(t):"","/clusters/").concat(a,"/projects")}}]),r}(h.default.Component))||l)||l;a.default=E},function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return i}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("g",{fill:"none",fillRule:"evenodd"},u.a.createElement("path",{fill:"#FFF",d:"M40 20.95c0-3.376-2.09-6.294-5.192-7.442.131-.714.197-1.438.196-2.164C35.004 5.082 29.943 0 23.706 0c-3.624 0-7.02 1.738-9.143 4.721a5.878 5.878 0 00-3.657-1.246c-3.298 0-6.008 2.689-6.008 6.033 0 .721.13 1.443.36 2.099C2.122 12.689 0 15.705 0 19.049a7.93 7.93 0 005.224 7.476 11.64 11.64 0 00-.195 2.163c0 6.23 5.06 11.312 11.265 11.312 3.657 0 7.02-1.77 9.143-4.721a6.002 6.002 0 003.69 1.278c3.297 0 6.008-2.688 6.008-6.032 0-.722-.131-1.443-.36-2.099 3.07-1.115 5.225-4.13 5.225-7.475z"}),u.a.createElement("path",{fill:"#F4BD19",d:"M15.38 17.726l8.98 4.092 9.08-7.921c.131-.658.198-1.327.196-1.997 0-5.565-4.539-10.082-10.131-10.082-3.356 0-6.48 1.637-8.355 4.386l-1.514 7.791 1.744 3.732z"}),u.a.createElement("path",{fill:"#3CBEB1",d:"M6.56 26.097a10.3 10.3 0 00-.196 2.02c0 5.537 4.557 10.065 10.13 10.065a10.21 10.21 0 008.394-4.398l1.476-7.752-2-3.779-8.984-4.071-8.82 7.915z"}),u.a.createElement("path",{fill:"#E9478C",d:"M5.764 11.246l6.429 1.481 1.443-7.172c-.893-.673-1.96-1.01-3.094-1.01-2.784 0-5.087 2.223-5.087 4.984 0 .572.103 1.178.309 1.717z"}),u.a.createElement("path",{fill:"#2C458F",d:"M5.473 12.727c-2.7.884-4.564 3.534-4.564 6.413 0 2.814 1.703 5.333 4.275 6.315l8.452-7.787-1.542-3.37-6.621-1.57z"}),u.a.createElement("path",{fill:"#95C63D",d:"M25.455 34.41a5.115 5.115 0 003.072 1.045c2.796 0 5.11-2.223 5.11-4.984 0-.606-.104-1.178-.311-1.717l-6.456-1.481-1.415 7.138z"}),u.a.createElement("path",{fill:"#176655",d:"M27.192 25.702l6.505 1.57c2.653-.915 4.485-3.533 4.485-6.412 0-2.814-1.674-5.3-4.2-6.315l-8.527 7.722 1.737 3.435z"})),i=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 40 40",width:"1em",height:"1em"},e),o)};t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggZmlsbD0iI0ZGRiIgZD0iTTQwIDIwLjk1YzAtMy4zNzYtMi4wOS02LjI5NC01LjE5Mi03LjQ0Mi4xMzEtLjcxNC4xOTctMS40MzguMTk2LTIuMTY0QzM1LjAwNCA1LjA4MiAyOS45NDMgMCAyMy43MDYgMGMtMy42MjQgMC03LjAyIDEuNzM4LTkuMTQzIDQuNzIxYTUuODc4IDUuODc4IDAgMCAwLTMuNjU3LTEuMjQ2Yy0zLjI5OCAwLTYuMDA4IDIuNjg5LTYuMDA4IDYuMDMzIDAgLjcyMS4xMyAxLjQ0My4zNiAyLjA5OUMyLjEyMiAxMi42ODkgMCAxNS43MDUgMCAxOS4wNDlhNy45MyA3LjkzIDAgMCAwIDUuMjI0IDcuNDc2Yy0uMTMuNjg4LS4xOTUgMS40MS0uMTk1IDIuMTYzIDAgNi4yMyA1LjA2IDExLjMxMiAxMS4yNjUgMTEuMzEyIDMuNjU3IDAgNy4wMi0xLjc3IDkuMTQzLTQuNzIxYTYuMDAyIDYuMDAyIDAgMCAwIDMuNjkgMS4yNzhjMy4yOTcgMCA2LjAwOC0yLjY4OCA2LjAwOC02LjAzMiAwLS43MjItLjEzMS0xLjQ0My0uMzYtMi4wOTkgMy4wNy0xLjExNSA1LjIyNS00LjEzIDUuMjI1LTcuNDc1eiIvPgogICAgICAgIDxwYXRoIGZpbGw9IiNGNEJEMTkiIGQ9Ik0xNS4zOCAxNy43MjZsOC45OCA0LjA5MiA5LjA4LTcuOTIxYy4xMzEtLjY1OC4xOTgtMS4zMjcuMTk2LTEuOTk3IDAtNS41NjUtNC41MzktMTAuMDgyLTEwLjEzMS0xMC4wODItMy4zNTYgMC02LjQ4IDEuNjM3LTguMzU1IDQuMzg2bC0xLjUxNCA3Ljc5MSAxLjc0NCAzLjczMnoiLz4KICAgICAgICA8cGF0aCBmaWxsPSIjM0NCRUIxIiBkPSJNNi41NiAyNi4wOTdhMTAuMyAxMC4zIDAgMCAwLS4xOTYgMi4wMmMwIDUuNTM3IDQuNTU3IDEwLjA2NSAxMC4xMyAxMC4wNjVhMTAuMjEgMTAuMjEgMCAwIDAgOC4zOTQtNC4zOThsMS40NzYtNy43NTItMi0zLjc3OS04Ljk4NC00LjA3MS04LjgyIDcuOTE1eiIvPgogICAgICAgIDxwYXRoIGZpbGw9IiNFOTQ3OEMiIGQ9Ik01Ljc2NCAxMS4yNDZsNi40MjkgMS40ODEgMS40NDMtNy4xNzJjLS44OTMtLjY3My0xLjk2LTEuMDEtMy4wOTQtMS4wMS0yLjc4NCAwLTUuMDg3IDIuMjIzLTUuMDg3IDQuOTg0IDAgLjU3Mi4xMDMgMS4xNzguMzA5IDEuNzE3eiIvPgogICAgICAgIDxwYXRoIGZpbGw9IiMyQzQ1OEYiIGQ9Ik01LjQ3MyAxMi43MjdjLTIuNy44ODQtNC41NjQgMy41MzQtNC41NjQgNi40MTMgMCAyLjgxNCAxLjcwMyA1LjMzMyA0LjI3NSA2LjMxNWw4LjQ1Mi03Ljc4Ny0xLjU0Mi0zLjM3LTYuNjIxLTEuNTd6Ii8+CiAgICAgICAgPHBhdGggZmlsbD0iIzk1QzYzRCIgZD0iTTI1LjQ1NSAzNC40MWE1LjExNSA1LjExNSAwIDAgMCAzLjA3MiAxLjA0NWMyLjc5NiAwIDUuMTEtMi4yMjMgNS4xMS00Ljk4NCAwLS42MDYtLjEwNC0xLjE3OC0uMzExLTEuNzE3bC02LjQ1Ni0xLjQ4MS0xLjQxNSA3LjEzOHoiLz4KICAgICAgICA8cGF0aCBmaWxsPSIjMTc2NjU1IiBkPSJNMjcuMTkyIDI1LjcwMmw2LjUwNSAxLjU3YzIuNjUzLS45MTUgNC40ODUtMy41MzMgNC40ODUtNi40MTIgMC0yLjgxNC0xLjY3NC01LjMtNC4yLTYuMzE1bC04LjUyNyA3LjcyMiAxLjczNyAzLjQzNXoiLz4KICAgIDwvZz4KPC9zdmc+Cg=="},function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return i}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("path",{fill:"#231F20",d:"M9.057 3.472c-.453-.453-1.057-.68-1.736-.68-.68 0-1.283.302-1.66.68-.453.453-.68 1.056-.68 1.736 0 .679.302 1.283.68 1.735.452.453 1.056.68 1.66.68.679 0 1.283-.302 1.736-.68.452-.452.679-1.056.679-1.735 0-.68-.302-1.283-.68-1.736zM7.32 36.982c.679 0 1.283-.303 1.736-.68.452-.453.679-1.057.679-1.736 0-.68-.302-1.283-.68-1.736-.452-.453-1.056-.68-1.735-.68-.68 0-1.283.303-1.66.68-.453.453-.68 1.057-.68 1.736 0 .68.302 1.283.68 1.736.377.377.98.68 1.66.68zm13.132-7.397a2.152 2.152 0 001.434-1.132l.075-.076c.302-.528.378-1.207.227-1.735-.151-.604-.529-1.133-1.132-1.51-.529-.302-1.208-.377-1.812-.226a2.152 2.152 0 00-1.434 1.132 2.71 2.71 0 00-.226 1.887c.15.603.528 1.132 1.132 1.509.453.226 1.132.302 1.736.15zM9.81 17.358c-.603-.603-1.51-1.056-2.49-1.056-.981 0-1.812.377-2.49 1.056-.605.604-.982 1.51-.982 2.491 0 .981.377 1.887.981 2.49.604.604 1.51 1.057 2.49 1.057.982 0 1.812-.377 2.491-1.056.604-.68.981-1.51.981-2.49 0-.982-.377-1.812-.98-2.492zm-1.434-4.15c1.434.226 2.642.905 3.623 1.886.15.151.302.302.453.529l2.415-1.434c-.302-.981-.302-2.038-.076-3.02C15.17 9.888 16 8.68 17.208 8h.075c1.208-.68 2.642-.83 3.925-.528a5.407 5.407 0 013.17 2.49 5.759 5.759 0 01.528 4c-.378 1.283-1.208 2.49-2.415 3.17l-.302.226c-1.132.529-2.415.68-3.547.302-.982-.226-1.812-.83-2.491-1.585l-2.415 1.434a6.26 6.26 0 01.453 2.416c0 .83-.151 1.66-.453 2.415l2.415 1.434c.68-.755 1.585-1.283 2.49-1.585a4.829 4.829 0 013.925.528h.076c1.207.755 1.962 1.887 2.34 3.17.376 1.283.226 2.717-.53 4l-.075.075c-.754 1.208-1.811 2.038-3.094 2.415a4.829 4.829 0 01-3.925-.528 5.581 5.581 0 01-2.415-3.17c-.226-.98-.226-2.037.076-3.019l-2.566-1.51-.453.454c-.981.98-2.189 1.66-3.623 1.887v2.792a5.41 5.41 0 012.566 1.434c.906.981 1.51 2.264 1.51 3.698 0 1.434-.604 2.793-1.51 3.698-.98.981-2.264 1.51-3.698 1.51-1.434 0-2.717-.604-3.698-1.51-.905-.98-1.51-2.264-1.51-3.698 0-1.434.605-2.792 1.51-3.698a5.41 5.41 0 012.566-1.434v-2.792c-1.434-.227-2.641-.906-3.622-1.887a6.8 6.8 0 01-1.963-4.755c0-1.887.755-3.547 1.963-4.755.98-.98 2.188-1.66 3.622-1.886v-2.793a5.41 5.41 0 01-2.566-1.434C2.642 8 2.037 6.717 2.037 5.283c0-1.434.605-2.792 1.51-3.698C4.453.604 5.811 0 7.245 0c1.434 0 2.717.604 3.698 1.585.906.981 1.51 2.264 1.51 3.698 0 1.434-.604 2.792-1.51 3.698a5.41 5.41 0 01-2.566 1.434v2.793zm13.51-1.887c-.378-.604-.906-.981-1.434-1.132-.604-.151-1.283-.076-1.811.226-.604.302-.982.906-1.133 1.51a2.76 2.76 0 00.227 1.886c.302.604.83.981 1.434 1.132.604.151 1.283.076 1.811-.226.528-.377.906-.906 1.057-1.434.226-.68.15-1.358-.151-1.962z"}),i=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 26 40",width:"1em",height:"1em"},e),o)};t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNiIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDI2IDQwIj4KICAgIDxwYXRoIGZpbGw9IiMyMzFGMjAiIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTkuMDU3IDMuNDcyYy0uNDUzLS40NTMtMS4wNTctLjY4LTEuNzM2LS42OC0uNjggMC0xLjI4My4zMDItMS42Ni42OC0uNDUzLjQ1My0uNjggMS4wNTYtLjY4IDEuNzM2IDAgLjY3OS4zMDIgMS4yODMuNjggMS43MzUuNDUyLjQ1MyAxLjA1Ni42OCAxLjY2LjY4LjY3OSAwIDEuMjgzLS4zMDIgMS43MzYtLjY4LjQ1Mi0uNDUyLjY3OS0xLjA1Ni42NzktMS43MzUgMC0uNjgtLjMwMi0xLjI4My0uNjgtMS43MzZ6TTcuMzIgMzYuOTgyYy42NzkgMCAxLjI4My0uMzAzIDEuNzM2LS42OC40NTItLjQ1My42NzktMS4wNTcuNjc5LTEuNzM2IDAtLjY4LS4zMDItMS4yODMtLjY4LTEuNzM2LS40NTItLjQ1My0xLjA1Ni0uNjgtMS43MzUtLjY4LS42OCAwLTEuMjgzLjMwMy0xLjY2LjY4LS40NTMuNDUzLS42OCAxLjA1Ny0uNjggMS43MzYgMCAuNjguMzAyIDEuMjgzLjY4IDEuNzM2LjM3Ny4zNzcuOTguNjggMS42Ni42OHptMTMuMTMyLTcuMzk3YTIuMTUyIDIuMTUyIDAgMCAwIDEuNDM0LTEuMTMybC4wNzUtLjA3NmMuMzAyLS41MjguMzc4LTEuMjA3LjIyNy0xLjczNS0uMTUxLS42MDQtLjUyOS0xLjEzMy0xLjEzMi0xLjUxLS41MjktLjMwMi0xLjIwOC0uMzc3LTEuODEyLS4yMjZhMi4xNTIgMi4xNTIgMCAwIDAtMS40MzQgMS4xMzIgMi43MSAyLjcxIDAgMCAwLS4yMjYgMS44ODdjLjE1LjYwMy41MjggMS4xMzIgMS4xMzIgMS41MDkuNDUzLjIyNiAxLjEzMi4zMDIgMS43MzYuMTV6TTkuODEgMTcuMzU4Yy0uNjAzLS42MDMtMS41MS0xLjA1Ni0yLjQ5LTEuMDU2LS45ODEgMC0xLjgxMi4zNzctMi40OSAxLjA1Ni0uNjA1LjYwNC0uOTgyIDEuNTEtLjk4MiAyLjQ5MSAwIC45ODEuMzc3IDEuODg3Ljk4MSAyLjQ5LjYwNC42MDQgMS41MSAxLjA1NyAyLjQ5IDEuMDU3Ljk4MiAwIDEuODEyLS4zNzcgMi40OTEtMS4wNTYuNjA0LS42OC45ODEtMS41MS45ODEtMi40OSAwLS45ODItLjM3Ny0xLjgxMi0uOTgtMi40OTJ6bS0xLjQzNC00LjE1YzEuNDM0LjIyNiAyLjY0Mi45MDUgMy42MjMgMS44ODYuMTUuMTUxLjMwMi4zMDIuNDUzLjUyOWwyLjQxNS0xLjQzNGMtLjMwMi0uOTgxLS4zMDItMi4wMzgtLjA3Ni0zLjAyQzE1LjE3IDkuODg4IDE2IDguNjggMTcuMjA4IDhoLjA3NWMxLjIwOC0uNjggMi42NDItLjgzIDMuOTI1LS41MjhhNS40MDcgNS40MDcgMCAwIDEgMy4xNyAyLjQ5Yy42NzkgMS4yODMuODMgMi43MTcuNTI4IDQtLjM3OCAxLjI4My0xLjIwOCAyLjQ5LTIuNDE1IDMuMTdsLS4zMDIuMjI2Yy0xLjEzMi41MjktMi40MTUuNjgtMy41NDcuMzAyLS45ODItLjIyNi0xLjgxMi0uODMtMi40OTEtMS41ODVsLTIuNDE1IDEuNDM0Yy4zMDIuNzU1LjQ1MyAxLjUxLjQ1MyAyLjQxNiAwIC44My0uMTUxIDEuNjYtLjQ1MyAyLjQxNWwyLjQxNSAxLjQzNGMuNjgtLjc1NSAxLjU4NS0xLjI4MyAyLjQ5LTEuNTg1YTQuODI5IDQuODI5IDAgMCAxIDMuOTI1LjUyOGguMDc2YzEuMjA3Ljc1NSAxLjk2MiAxLjg4NyAyLjM0IDMuMTcuMzc2IDEuMjgzLjIyNiAyLjcxNy0uNTMgNGwtLjA3NS4wNzVjLS43NTQgMS4yMDgtMS44MTEgMi4wMzgtMy4wOTQgMi40MTVhNC44MjkgNC44MjkgMCAwIDEtMy45MjUtLjUyOCA1LjU4MSA1LjU4MSAwIDAgMS0yLjQxNS0zLjE3Yy0uMjI2LS45OC0uMjI2LTIuMDM3LjA3Ni0zLjAxOWwtMi41NjYtMS41MS0uNDUzLjQ1NGMtLjk4MS45OC0yLjE4OSAxLjY2LTMuNjIzIDEuODg3djIuNzkyYTUuNDEgNS40MSAwIDAgMSAyLjU2NiAxLjQzNGMuOTA2Ljk4MSAxLjUxIDIuMjY0IDEuNTEgMy42OTggMCAxLjQzNC0uNjA0IDIuNzkzLTEuNTEgMy42OTgtLjk4Ljk4MS0yLjI2NCAxLjUxLTMuNjk4IDEuNTEtMS40MzQgMC0yLjcxNy0uNjA0LTMuNjk4LTEuNTEtLjkwNS0uOTgtMS41MS0yLjI2NC0xLjUxLTMuNjk4IDAtMS40MzQuNjA1LTIuNzkyIDEuNTEtMy42OThhNS40MSA1LjQxIDAgMCAxIDIuNTY2LTEuNDM0di0yLjc5MmMtMS40MzQtLjIyNy0yLjY0MS0uOTA2LTMuNjIyLTEuODg3YTYuOCA2LjggMCAwIDEtMS45NjMtNC43NTVjMC0xLjg4Ny43NTUtMy41NDcgMS45NjMtNC43NTUuOTgtLjk4IDIuMTg4LTEuNjYgMy42MjItMS44ODZ2LTIuNzkzYTUuNDEgNS40MSAwIDAgMS0yLjU2Ni0xLjQzNEMyLjY0MiA4IDIuMDM3IDYuNzE3IDIuMDM3IDUuMjgzYzAtMS40MzQuNjA1LTIuNzkyIDEuNTEtMy42OThDNC40NTMuNjA0IDUuODExIDAgNy4yNDUgMGMxLjQzNCAwIDIuNzE3LjYwNCAzLjY5OCAxLjU4NS45MDYuOTgxIDEuNTEgMi4yNjQgMS41MSAzLjY5OCAwIDEuNDM0LS42MDQgMi43OTItMS41MSAzLjY5OGE1LjQxIDUuNDEgMCAwIDEtMi41NjYgMS40MzR2Mi43OTN6bTEzLjUxLTEuODg3Yy0uMzc4LS42MDQtLjkwNi0uOTgxLTEuNDM0LTEuMTMyLS42MDQtLjE1MS0xLjI4My0uMDc2LTEuODExLjIyNi0uNjA0LjMwMi0uOTgyLjkwNi0xLjEzMyAxLjUxYTIuNzYgMi43NiAwIDAgMCAuMjI3IDEuODg2Yy4zMDIuNjA0LjgzLjk4MSAxLjQzNCAxLjEzMi42MDQuMTUxIDEuMjgzLjA3NiAxLjgxMS0uMjI2LjUyOC0uMzc3LjkwNi0uOTA2IDEuMDU3LTEuNDM0LjIyNi0uNjguMTUtMS4zNTgtLjE1MS0xLjk2MnoiLz4KPC9zdmc+Cg=="},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(9),a(4),a(23),a(57),a(17);var n,l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(49)),f=a(14);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var p=(n=function(e){(0,o.default)(a,e);var t=d(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u0&&void 0!==arguments[0]?arguments[0]:{};return"kapis/monitoring.kubesphere.io/v1alpha1".concat(e.getPath(t),"/").concat(e.module)},e}return(0,u.default)(a,[{key:"createGrafana",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.submitting(request.post("/kapis/monitoring.kubesphere.io/v1alpha1/".concat(this.getPath(t),"/clusterdashboards/").concat(e.grafanaDashboardName,"/template"),e))}}]),a}(r(a(68)).default),(0,s.default)(n.prototype,"createGrafana",[f.action],Object.getOwnPropertyDescriptor(n.prototype,"createGrafana"),n.prototype),n);t.default=p},function(e,t,a){"use strict";a.r(t),a.d(t,"ReactComponent",(function(){return i}));var r=a(315),n=a.n(r),l=a(0),u=a.n(l),o=u.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.4 25L8.733 23.75V0L20.4 25zm-20 0l6.667-1.25V10L.4 25zm0 1.667h20L7.9 30 .4 26.667z",fill:"#36435C"}),i=function(e){return u.a.createElement("svg",n()({viewBox:"0 0 21 30",fill:"none",width:"1em",height:"1em"},e),o)};t.default="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjEgMzAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjAuNCAyNUw4LjczMzM2IDIzLjc1VjBMMjAuNCAyNVpNMC40MDAwMjQgMjVMNy4wNjY2OSAyMy43NVYxMEwwLjQwMDAyNCAyNVpNMC40MDAwMjQgMjYuNjY2N0gyMC40TDcuOTAwMDIgMzBMMC40MDAwMjQgMjYuNjY2N1oiIGZpbGw9IiMzNjQzNUMiLz4KPC9zdmc+Cg=="},function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(5),r(11),r(6),r(73),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(136),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(73),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(62),r(7);var u=n(r(315)),o=n(r(43)),i=n(r(30)),c=n(r(58));r(41);var s,f=n(r(44)),d=n(r(36)),p=n(r(37)),m=n(r(55)),h=n(r(56)),v=n(r(51)),g=n(r(0)),y=n(r(834)),E=l(r(793)),b=n(r(796)),_=n(r(1404)),O=r(186),S=n(r(63)),C=n(r(26)),D=r(52);function k(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function N(e){for(var t=1;t0&&void 0!==i[0]?i[0]:{},a=t.silent,r=(0,c.default)(t,["silent"]),l=n.props.store,a&&(l.list.silent=!0),u=N(N(N({},n.props.match.params),r),{},{cluster:(null==r?void 0:r.cluster)||n.state.cluster,labelSelector:n.labelSelector}),e.next=6,l.fetchList(u);case 6:l.list.silent=!1;case 7:case"end":return e.stop()}}),e)}))),n.getGatewayResource=function(e){var t=e.cluster;return n.isProjectGateway?{cluster:t,namespace:e.name.split("kubesphere-router-")[1],type:"project"}:n.isProjectGateway?void 0:{cluster:t,workspace:e.name.split("kubesphere-router-workspace-")[1],type:"workspace"}},n.handleFetch=function(e,t){n.routing.query(N(N({},e),{},{type:n.type}),t)},n.getColumns=function(){var e=n.props.getSortOrder;return[{title:t("NAME"),dataIndex:"name",sorter:!0,sortOrder:e("name"),render:function(e,t){return g.default.createElement(g.default.Fragment,null,g.default.createElement("span",{style:{fontWeight:700,cursor:"auto",marginRight:"4px"}},e),n.renderDisabledTip(t))}},{title:t("ACCESS_MODE"),dataIndex:"type"},{title:t("IP_ADDRESS"),dataIndex:"defaultIngress"},{title:t("NODE_PORTS"),dataIndex:"ports",render:function(e){return(0,S.default)(e)?"-":e.map((function(e){return"".concat(e.name.toUpperCase(),": ").concat(e.nodePort)})).join("/")}},{title:t("REPLICA_COUNT"),dataIndex:"replicas"},{title:t("TRACING"),dataIndex:"serviceMeshEnable",render:function(e){return e?t("ON"):t("OFF")}}]},n.renderDesc=function(){var e=n.props.type,a=n.props.match.params.cluster,r=globals.app.isMultiCluster?(0,C.default)(globals,"clusterConfig.".concat(a,".ksVersion")):(0,C.default)(globals,"ksConfig.ksVersion");return"workspace"===e&&(0,D.compareVersion)(r,"v3.4.0")<0?t("CLUSTER_NOT_SUPPORT_WORKSPACE_GATEWAY"):t("ENT_".concat(e.toUpperCase(),"_ENABLE_GATEWAY_DESC"))},n.handleClusterChange=function(e){n.setState({cluster:e}),n.getData({cluster:e})};var l=(0,D.getHostClusterName)();return n.state={cluster:(null==e?void 0:e.cluster)||(0,C.default)(e,"workspaceStore.cluster",l)},n}return(0,p.default)(r,[{key:"renderDisabledTip",value:function(e){return e.createTime?null:g.default.createElement(O.Tooltip,{content:t("UPDATE_GATEWAY_DESC"),placement:"top"},g.default.createElement(O.Icon,{size:20,name:"update",color:{primary:"#f5a623 ",secondary:"#ffe1be"}}))}},{key:"renderCustomFilter",value:function(){var e=this.state.cluster;return this.props.showClusterSelect?g.default.createElement(_.default,{cluster:e,clusters:this.clusters,onChange:this.handleClusterChange}):null}},{key:"render",value:function(){var e=this.props,a=e.tableProps,r=e.type,n=e.inCluster;return g.default.createElement(E.ListPage,(0,u.default)({},this.props,{getData:this.getData,noWatch:!0}),g.default.createElement(b.default,(0,u.default)({},a,this.tableOtherProps,{name:"".concat(r.toUpperCase(),"_GATEWAY"),emptyProps:{desc:n?this.renderDesc():t("PROJECT_ENABLE_GATEWAY_DESC_WS")},itemActions:this.itemActions,tableActions:this.tableActions,columns:this.getColumns(),onCreate:null,customFilter:this.renderCustomFilter(),searchType:"name",isLoading:a.isLoading})))}},{key:"labelSelector",get:function(){return"kubesphere.io/gateway-type=".concat(this.props.type)}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"isProjectGateway",get:function(){var e=this.props.type;return!e||"project"===e}},{key:"workspaceStore",get:function(){return this.props.workspaceStore}},{key:"clusters",get:function(){return this.workspaceStore?this.workspaceStore.clusters.data.map((function(e){return{label:e.name,value:e.name,cluster:e}})).filter((function(e){return(0,C.default)(globals,"ksConfig.enabledExtensionModulesStatus.gateway.clusterSchedulingStatuses.".concat(e.value),!1)})):[]}},{key:"cluster",get:function(){return this.workspaceStore?this.workspaceStore.cluster:null}},{key:"itemActions",get:function(){var e=this,a=this.props.trigger;return[{key:"edit",icon:"pen",text:t("EDIT"),action:"edit",show:function(e){return e.createTime},onClick:function(t){a("gateways.edit",N(N({detail:t._originData,type:"",name:t.name},e.getGatewayResource(t)),{},{success:e.routing.query}))}},{key:"update",icon:"update",text:t("UPDATE"),action:"manage",show:function(e){return!e.createTime},onClick:function(t){return a("gateways.update",N(N({detail:t._originData},e.getGatewayResource(t)),{},{success:e.routing.query}))}},{key:"delete",icon:"trash",text:t("DISABLE"),action:"delete",onClick:function(t){return a("gateways.delete",N(N({type:e.props.name,detail:t,name:t.name},e.getGatewayResource(t)),{},{resource:t.name,success:e.routing.query}))}}]}},{key:"tableActions",get:function(){var e=this,a=this.props,r=a.tableProps,n=a.trigger;return N(N({},r.tableActions),{},{selectActions:[{key:"delete",type:"danger",text:t("DISABLE"),action:"delete",onClick:function(){return n("gateways.batch.delete",{type:e.props.name,rowKey:"name",success:e.routing.query})}}],onFetch:this.handleFetch})}},{key:"tableOtherProps",get:function(){return this.props.showClusterSelect?{showEmpty:!1,emptyText:t("PROJECT_ENABLE_GATEWAY_DESC_WS")}:{}}}]),r}(g.default.Component))||s;a.default=R},function(e,t,a){e.exports={attributes:"_1qLfwlSNMUvx_q8t-EGpKu",item:"_2ImD6g_VbE6ZdbovBHYIpG",name:"_3oXgWAWaKT0svZ3eswccyw",value:"_1b7KLypukIC6d3iPAamFVA"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(18),r(98),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(98),r(4),r(23),r(57),r(17);var u=l(r(96)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=n(r(0)),p=l(r(789)),m=l(r(1045)),h=l(r(63));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var g=function(e){(0,c.default)(r,e);var a=v(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.className,r=e.labels;return(0,h.default)(r)?null:d.default.createElement(p.default,{title:t("LABEL_PL"),className:a},d.default.createElement("div",null,Object.entries(r).map((function(e){var t=(0,u.default)(e,2),a=t[0],r=t[1];return d.default.createElement(m.default,{key:a,name:a,value:r})}))))}}]),r}(d.Component);a.default=g},function(e,t,a){e.exports={wrapper:"QpFfgb7JJ7HRNLfqWCXji",item:"_2Ls9YLPpw8lkrD3lNui_GK",icon:"_38CQvuXRNm-XbTdpOmjFCM",indicator:"_3O2Bu_ul1hd0RWHSc0uyYY",text:"_2sD8JpjsJvGHwUybEZWCex",name:"_1Sivzw33_5Gsqakv7IJdNz",probeItem:"_1KcpnN-7kCl_NT5wZuH3zy",probeType:"si5bO7SNMAMGa-Y28HKrr",probeTime:"_2ZEFKQF67O0DnJj3L3PcxT",noLink:"_3TsdKO2ShBqmPwtineCIMt"}},function(e,t,a){e.exports={main:"_1mP4Qf6JdvK0Zws9GzHH_m",header:"_38YMa1McIH2a3XFjNFm0Qv",search:"_2iBh5XNyrUQs_npRhRtu-N",actions:"SOTGp48SZ36hInD3GvDqW",body:"_1E1bcvmD960HViEUNPWIj-",footer:"_2wm_WVdZeY_H8Dthsg7qEZ",item:"DfokFLfXy9QDbluhfn4mC",expanded:"_1Upgy-BC2S8CbTT7SwXJsD",arrow:"_2oh1nTH5L2f2z2s_G_Eu6J",itemMain:"_37pJP5bk2g9FqBysuK4mh5",content:"_1QXeIqcQeKMp8jjbDJUQ9R",text:"_1eubB8Mc7lqOuhCmWiSLto",monitors:"XtUDQAWv16NYrbCMYx11z",itemExtra:"_2qw5HNgGsizb6Yt_fColhG",icon:"_2khy6lzSeTcSnB9QLHOBd3",indicator:"_1nnELAL1b4Y_7-IdgMTmJG",statusTip:"_1IQ9UXag7Oj8C5vl685TuJ",charts:"JZvd7sINr_-hgLfx-_Qm3",podip:"_2yAbsvJ0HwjDLmoJoLfek2",ipTip:"_3FpDrLOumpuGj3VMwTeY9-",containers:"_2Vbw0pvM32OD13r9WIDwjd",loading:"_2_wICcLc7ldhJDkDX3UntK",empty:"_26YNgZC9m7cd39OC8YZlxM",cluster:"_1DOCSy9WSCVCd5lDQ942Uu"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(31),r(18),r(16),r(4),r(23),r(17),r(111),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(31),r(18),r(42),r(16),r(4),r(319),r(23),r(57),r(17),r(111);var l,u,o,i=n(r(315)),c=n(r(58)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(0)),v=r(239),g=n(r(1)),y=n(r(3)),E=n(r(158)),b=n(r(468)),_=r(186),O=n(r(240)),S=n(r(801)),C=r(794),D=r(52),k=n(r(3886));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var T=(0,v.observer)((o=u=function(e){(0,d.default)(r,e);var a=N(r);function r(e){var n;return(0,s.default)(this,r),(n=a.call(this,e)).getValue=function(e,t){var a=(0,C.getSuitableUnit)(e,t),r=(0,C.getValueByUnit)(e,a),n=(0,D.coreUnitTS)(r,a);return"".concat(r," ").concat(n)},n.getHPAData=function(){var e,a,r,l,u,o,i,c,s,f,d,p,m=n.props.detail,h=(null==m||null===(e=m._originData)||void 0===e||null===(a=e.spec)||void 0===a?void 0:a.minReplicas)||0,v=(null==m||null===(r=m._originData)||void 0===r||null===(l=r.spec)||void 0===l?void 0:l.maxReplicas)||0,g=(null===(u=m._originData.spec.metrics)||void 0===u||null===(o=u.find((function(e){return"Resource"===e.type&&"cpu"===e.resource.name})))||void 0===o?void 0:o.resource.target.averageUtilization)||0,y=(null===(i=m._originData.spec.metrics)||void 0===i||null===(c=i.find((function(e){return"Resource"===e.type&&"memory"===e.resource.name})))||void 0===c?void 0:c.resource.target.averageValue)||0,b=(null===(s=m.status.currentMetrics)||void 0===s||null===(f=s.find((function(e){return"Resource"===e.type&&"cpu"===e.resource.name})))||void 0===f?void 0:f.resource.current.averageUtilization)||0,_=(null===(d=m.status.currentMetrics)||void 0===d||null===(p=d.find((function(e){return"Resource"===e.type&&"memory"===e.resource.name})))||void 0===p?void 0:p.resource.current.averageValue)||0;return[{icon:"chevron-down",name:t("MINIMUM_REPLICAS"),value:h},{icon:"chevron-up",name:t("MAXIMUM_REPLICAS"),value:v},{icon:"cpu",name:t("TARGET_CPU_USAGE"),value:(0,E.default)(g)||""===g?t("NONE"):"".concat(g,"%"),current:"".concat(b,"%")},{icon:"memory",name:t("TARGET_MEMORY_USAGE"),value:(0,E.default)(y)||""===y?t("NONE"):y,current:n.getValue(String(_).endsWith("m")?parseInt(_,10)/1e3:_,"memory")}]},n.getOperations=function(){return[{key:"cancel",icon:"close",text:t("CANCEL"),onClick:n.handleCancel}]},n.handleMoreClick=function(e,t){var a=n.getOperations().find((function(e){return e.key===t})).onClick;a&&a()},n.handleCancel=function(){var e=n.props,a=e.detail,r=e.onDeleted,l=e.k8sVersion;n.store.delete(a,l).then((function(){O.default.success({content:"".concat(t("CANCEL_SUCCESSFUL"))}),r()}))},n.renderCard=function(e){var a=e.icon,r=e.name,n=e.value,l=e.current;return h.default.createElement("div",{key:a,className:k.default.box},h.default.createElement("div",{className:k.default.card},h.default.createElement(_.Icon,{name:a,size:40}),h.default.createElement("div",null,h.default.createElement("div",{className:k.default.name,title:r},r),h.default.createElement("p",{className:k.default.value},l?t("TARGET_CURRENT",{target:n,current:l}):n))))},n.store=e.store||new b.default,n}return(0,f.default)(r,[{key:"renderOperations",value:function(){var e=this.getOperations(),t=h.default.createElement(_.Menu,{onClick:this.handleMoreClick},e.map((function(e){var t=e.icon,a=e.text,r=e.show,n=void 0===r||r,l=(0,c.default)(e,["icon","text","show"]);return n?h.default.createElement(_.Menu.MenuItem,(0,i.default)({key:a},l),t&&h.default.createElement(_.Icon,{name:t,type:"light"})," ",a):null})));return h.default.createElement(_.Dropdown,{theme:"dark",content:t},h.default.createElement(_.Button,{type:"ghost",icon:"more"}))}},{key:"renderContent",value:function(){if(!this.props.detail.name)return null;var e=this.getHPAData();return h.default.createElement("div",{className:k.default.wrapper},e.map(this.renderCard))}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.loading,n=e.enableCancelHpa,l=void 0===n||n,u=this.props.title||t("AUTOSCALING");return h.default.createElement(S.default,{className:(0,y.default)(k.default.main,a),title:u,operations:l?this.renderOperations():null,empty:t("NOT_ENABLE",{resource:t("AUTOSCALING")}),loading:r},this.renderContent())}}]),r}(h.default.Component),u.propTypes={className:g.default.string,title:g.default.string,store:g.default.object,detail:g.default.object,loading:g.default.bool,onDeleted:g.default.func},u.defaultProps={detail:{},loading:!0,onDelete:function(){}},l=o))||l;a.default=T},function(e,a,r){"use strict";r(15);var n=r(20);r(16),r(27),r(4),r(23),r(17),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51));r(45),r(42),r(16),r(27),r(4),r(23),r(57),r(17),r(110);var s=n(r(0)),f=n(r(1)),d=n(r(3)),p=n(r(1102)),m=r(798),h=n(r(3889)),v=n(r(1826));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=function(e){return Number(e||0)},E=function(e){(0,o.default)(r,e);var a=g(r);function r(e){var t;(0,l.default)(this,r),(t=a.call(this,e)).showConfirm=function(){t.setState({showConfirm:!0},(function(){t.startTimer()}))},t.hideConfirm=function(){t.setState({showConfirm:!1},(function(){t.stopTimer()}))},t.handleCancel=function(){t.setState({desire:t.props.desire},(function(){t.hideConfirm()}))},t.handleConfirm=function(){t.props.onScale(t.state.desire),t.hideConfirm()},t.handleScale=function(e){e>=0&&t.setState({desire:e,seconds:5},(function(){t.showConfirm()}))},t.updateTime=function(){var e=t.state.seconds;t.timer=setTimeout((function(){e>0?t.setState({seconds:e-1},(function(){t.updateTime()})):(t.handleConfirm(),t.handleCancel())}),1e3)},t.startTimer=function(){t.timer&&t.stopTimer(),t.updateTime()},t.stopTimer=function(){clearTimeout(t.timer),t.timer=null};var n=y(e.desire);return t.state={prevPropDesire:n,desire:n,seconds:5,showConfirm:!1},t}return(0,u.default)(r,[{key:"componentWillUnmount",value:function(){this.stopTimer()}},{key:"renderScaleOperation",value:function(){if(!this.props.onScale)return null;var e=this.state.desire;return s.default.createElement("div",{className:v.default.scale},s.default.createElement(h.default,{value:e,onChange:this.handleScale}))}},{key:"render",value:function(){var e=this.props,a=e.theme,r=e.className,n=e.name,l=e.current,u=this.state,o=u.showConfirm,i=u.seconds,c=u.desire,f=t(n),h=t("REPLICAS_CURRENT"),g=t("REPLICAS_DESIRED");return s.default.createElement("div",{className:(0,d.default)(v.default.card,r,v.default[a])},s.default.createElement("img",{className:v.default.cardImg,src:"/assets/banner-icon-1.svg"}),s.default.createElement("div",{className:v.default.chart},s.default.createElement(m.SimpleCircle,{theme:a,title:f,legend:[h,g],value:l,total:c})),s.default.createElement("div",{className:v.default.status},s.default.createElement("div",{className:v.default.title},f),s.default.createElement("div",{className:v.default.detail},s.default.createElement("p",null,s.default.createElement("label",null,g,":")," ",c),s.default.createElement("p",null,s.default.createElement("label",null,h,":")," ",l))),this.renderScaleOperation(),s.default.createElement(p.default,{visible:o,width:400,title:t("ADJUST_REPLICAS"),content:t.html("REPLICAS_SCALE_NOTIFY_CONTENT",{num:c}),cancelText:t("REPLICAS_SCALE_NOTIFY_CANCEL"),confirmText:t("REPLICAS_SCALE_NOTIFY_CONFIRM",{seconds:i}),onCancel:this.handleCancel,onConfirm:this.handleConfirm}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.desire!==t.prevPropDesire){var a=y(e.desire);return{prevPropDesire:a,desire:a}}return null}}]),r}(s.default.Component);a.default=E,E.propTypes={theme:f.default.string,className:f.default.string,name:f.default.string,current:f.default.number,desire:f.default.number,onScale:f.default.func},E.defaultProps={theme:"dark",name:"REPLICA_PL",current:0,desire:0,onScale:null}},function(e,t,a){e.exports={card:"_1c8ZZJMInbKhNSrY7LtWOz",cardImg:"_2qWxZcMVoJcyTOmp888Qza",dark:"TGr9GCblFo2j_1lfxKdqy",status:"_3XPNv-eRTc_sRrHrDOGDN_",title:"_1Pjqebw9E-Ge5JTqdWweF9",detail:"_1XLvvOKXnflr9NmFv3HM_S",scale:"_1d_O-hnlw9YGlAqNVrW-Sl",control:"nB11JF3vqmggYgl2OHs6s",add:"_2CqxRZ0d1OYdLPjbX03KEK",substract:"_2oexUYxDtB2oVt85gxb8yu"}},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(4),r(23),r(17),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(4),r(22),r(23),r(57),r(17),r(110);var l=n(r(43));r(41);var u=n(r(44)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(26)),m=r(186),h=n(r(789)),v=n(r(456)),g=n(r(472)),y=n(r(105)),E=n(r(3891)),b=n(r(3893)),_=n(r(3895)),O=n(r(1828));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var C=function(e){(0,c.default)(r,e);var a=S(r);function r(e){var n;(0,o.default)(this,r),(n=a.call(this,e)).showRerun=function(){n.setState({showRerun:!0})},n.hideRerun=function(){n.setState({showRerun:!1})},n.handleCurrentBuilderChange=function(e){n.setState({currentBuilderName:e,builderDetail:{},runDetail:{}}),n.fetchData(e)},n.fetchData=function(){var e=(0,u.default)(l.default.mark((function e(t){var a,r;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.getBuilderDetail(t);case 2:a=e.sent,(r=(0,p.default)(a,"status.lastRunName"))&&n.getRunDetail(r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.getBuilderDetail=function(){var e=(0,u.default)(l.default.mark((function e(t){var a,r;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.props.namespace,e.next=3,n.builderStore.fetchDetail({cluster:n.cluster,name:t,namespace:a});case 3:if(r=e.sent,"NotFound"!==(0,p.default)(r,"_originData.reason","")){e.next=7;break}return n.setState({notFound:!0}),e.abrupt("return");case 7:return n.setState({builderDetail:r}),e.abrupt("return",r);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.getRunDetail=function(){var e=(0,u.default)(l.default.mark((function e(t){var a,r,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.props.namespace,n.setState({getRunDetailLoading:!0}),clearTimeout(n.refreshTimer),r=(0,p.default)(n.state.builderDetail,"status.lastRunName"),e.next=6,n.runStore.fetchRunDetail({namespace:a,runName:t||r});case 6:u=e.sent,"running"===(0,p.default)(u,"status","")&&(n.refreshTimer=setTimeout(n.getRunDetail,4e3)),n.setState({runDetail:u,getRunDetailLoading:!1});case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.handleRerun=function(){var e=(0,u.default)(l.default.mark((function e(t){var a,r,u,o,i;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.newTag,r=t.isUpdateWorkload,u=n.props.namespace,o=n.state.currentBuilderName,clearTimeout(n.refreshTimer),e.next=6,n.builderStore.rerun({cluster:n.cluster,newTag:a,name:o,namespace:u,isUpdateWorkload:r});case 6:i=e.sent,n.setState({runDetail:y.default.s2iruns(i),getRunDetailLoading:!1,showRerun:!1}),setTimeout((function(){n.fetchData(o)}),1e3);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.renderBuilderSelect=function(){var e=n.props.builderNames;if(1===e.length)return null;var t=e.map((function(e){return{label:e,value:e}}));return d.default.createElement(m.Select,{className:O.default.builderSelector,onChange:n.handleCurrentBuilderChange,options:t,defaultValue:t[0]})},n.renderLog=function(){var e=n.state.runDetail,a=e.logURL,r=e.status;return!a&&"Running"===r?d.default.createElement("div",{className:O.default.title},d.default.createElement(m.Loading,{size:"16"}),d.default.createElement("p",null,t("TASK"),d.default.createElement("span",{className:O.default.taskName},n.state.currentBuilderName),t("IN_PROGRESS"))):a?d.default.createElement(_.default,{onRerun:n.showRerun,runDetail:n.state.runDetail,builderName:n.state.currentBuilderName}):null};var i=e.builderNames;return n.state={builderDetail:{},runDetail:{},getRunDetailLoading:!0,currentBuilderName:i[0],showRerun:!1,notFound:!1},n.refreshTimer=null,n.builderStore=new v.default,n.runStore=new g.default,n}return(0,i.default)(r,[{key:"componentDidMount",value:function(){var e=this.props.builderNames;this.fetchData(e[0])}},{key:"componentWillUnmount",value:function(){clearTimeout(this.refreshTimer)}},{key:"render",value:function(){var e=this.props.className,a=(0,p.default)(this.state.builderDetail,"spec.config");return this.state.notFound?null:d.default.createElement(h.default,{title:t("IMAGE_BUILDING"),operations:this.renderBuilderSelect()},d.default.createElement(E.default,{config:a,className:e}),this.renderLog(),d.default.createElement(b.default,{detail:this.state.builderDetail,visible:this.state.showRerun,onOk:this.handleRerun,onCancel:this.hideRerun}))}},{key:"cluster",get:function(){return this.props.cluster}}]),r}(d.default.Component);a.default=C,C.defaultProps={builderNames:[]}},function(e,t,a){e.exports={logContainer:"_2bPpJA94l-RyZOyRbjENrM",title:"_1e1_E7xie5w_hppm1LIgSZ",builderSelector:"_2qowcESuT9kmoK7enz5NOI",icon:"_3swHDfiS90QRAWqxRgv4Xw",noneLogDesc:"_2USfiSziwn36bQFEDdxt19",running:"_1QDO-cklO54JfNi3pfh5U8",rotate:"_1Ut0AdFDAAK29Q2sVx4kSM",failed:"_2PhKayJM_cv-avOySIoKM-",unknow:"_1U7K-MS0M-X-097gFQDhAn",successful:"_3Fqsco2IMj-fabpd1-oASz"}},,,function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(31),a(6),a(84),a(18),a(48),a(97),a(16),a(9),a(13),a(10),a(4),a(23),a(17),a(85),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(31),a(6),a(84),a(18),a(28),a(48),a(97),a(42),a(16),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(85),a(7);var n=r(a(315)),l=r(a(43)),u=r(a(30));a(41);var o,i,c,s=r(a(44)),f=r(a(36)),d=r(a(37)),p=r(a(55)),m=r(a(56)),h=r(a(51)),v=r(a(0)),g=a(14),y=a(239),E=r(a(1)),b=r(a(63)),_=r(a(26)),O=r(a(989)),S=r(a(1812)),C=r(a(3904)),D=r(a(3905)),k=r(a(1410));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){for(var t=1;t0&&void 0!==a[0]?a[0]:{},r.params=t,e.next=4,r.fetchResources();case 4:return e.next=6,r.fetchMonitorings(t);case 6:case"end":return e.stop()}}),e)}))),r.handleChangeChecked=function(e){r.setState({checked:e},(function(){var e=r.state.checked,t=r.monitorsData.map(r.getItemName);e.some((function(e){return!t.includes(e)&&(r.fetchMonitorings(T({pods:[e],more:!0},r.params)),!0)}))}))},r.state={checked:[]},r.init(),r}return(0,d.default)(a,[{key:"componentDidMount",value:function(){var e=this;(0,g.when)((function(){return!(0,b.default)(e.resourcesData)&&(0,b.default)(e.state.checked)}),(function(){var t=e.props.defaultChecked,a=e.resourcesData.map((function(t){return e.getItemName(t)})).slice(0,t);e.setState({checked:a})}))}},{key:"init",value:function(){var e=new O.default;this.resourceStore=e,this.monitorStore=e}},{key:"renderCharts",value:function(){var e=this,t=this.props.config,a=this.state.checked,r=[];return a.forEach((function(t){var a=e.monitorsData.find((function(a){return e.getItemName(a)===t}));a&&r.push(a)})),v.default.createElement(D.default,{loading:this.monitorStore.isLoading,config:t,data:r})}},{key:"renderResroucesList",value:function(){var e=this.props.config,t=this.state.checked,a=this.resources,r=a.page,n=a.total,l=a.isLoading;return v.default.createElement(C.default,{loading:l,config:e,name:this.name,page:r,total:n,checked:t,data:this.resourcesData,onFetch:this.fetchResources,onChange:this.handleChangeChecked})}},{key:"render",value:function(){var e=this.monitorStore,t=e.isLoading,a=e.isRefreshing,r=this.props,l=r.visible,u=r.onCancel;return v.default.createElement(S.default,(0,n.default)({visible:l,onFetch:this.fetchData,onCancel:u,loading:t,refreshing:a},this.monitorOptions),v.default.createElement("div",{className:k.default.content},this.renderResroucesList(),this.renderCharts()))}},{key:"monitorOptions",get:function(){return{times:50,step:"5m"}}},{key:"name",get:function(){return"POD_PL"}},{key:"metrics",get:function(){return this.monitorStore.data}},{key:"metricType",get:function(){return this.props.config.metricType}},{key:"resourceParams",get:function(){var e=this.props,t=e.module;return{cluster:e.cluster,namespace:e.namespace,workload_kind:t,workload_name:e.name}}},{key:"resources",get:function(){return(0,g.toJS)((0,_.default)(this.resourceStore,"sort",{}))}},{key:"resourcesData",get:function(){return(0,_.default)(this.resources,"data[".concat(this.metricType,"].data.result"),[])}},{key:"monitorsData",get:function(){return(0,_.default)(this.monitorStore,"data[".concat(this.metricType,"].data.result"),[])}}]),a}(v.default.Component),i.propTypes={visible:E.default.bool,defaultChecked:E.default.number,limit:E.default.number,config:E.default.object,onCancel:E.default.func,module:E.default.string,name:E.default.string,namespace:E.default.string,cluster:E.default.string},i.defaultProps={visible:!1,defaultChecked:5,limit:10,config:{},module:"deployments",name:"",namespace:"",cluster:"",onCancel:function(){}},o=c))||o;t.default=w},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1412)).default);t.default=c},function(e,t,a){e.exports={content:"_2ZwGdPpxAhTzLkxSVThCmZ",item:"_1ObwvAEb1U4k8T2gv7yvsU",empty:"KMh3PEpKo6Jg0Ucbgyq00"}},function(e,t,a){e.exports={content:"_3T2qUTrs27LXHme2DOQQXA",item:"_1E3QOQ7mYtLGZc1fl1NMWq"}},function(e,t,a){e.exports={ports:"z2EiKOPaSXkGmpQpoE-H_",card:"_3Q35ZuHxAjDj669cnT2Khd",content:"_1YLdx1Yt-6gMzruD-S8Bot",title:"_1Smdy_zt_LHm1hSRt0Eef-",path:"xGHTWxqXrFVtpy7Zwr6vD",access:"YE_7nvMY_-UKJNrL4GkGh",tip:"Tjbb2yi464EU4fTNJAmIL"}},function(e,t,a){e.exports={secretWrapper:"_2w2dYzN4wuGp_wajpcdrcB",title:"_2NnR7nZbdx5sVyDkdr_G-f",defaultWrapper:"_2s4vOIBr8xBPyb5h4ilFgc",configWrapper:"_2R-aXaN8GH_Hz7c1wmLJre",codeEditor:"_1LuBGW3lud3xrU-Jon909o",ops:"Iwmqd8wJBrfmpDxheVZbw",split:"rtimVCShoOZggbnsmeQzP"}},function(e,a,r){"use strict";r(15);var n=r(20);r(73),r(48),r(16),r(4),r(23),r(24),r(17),r(62),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(73),r(48),r(42),r(16),r(4),r(23),r(57),r(24),r(17),r(62);var l,u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=r(14),p=n(r(63)),m=r(239),h=r(52),v=n(r(3941)),g=n(r(1838));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var E=(0,m.inject)("detailStore")(l=(0,m.observer)(l=function(e){(0,i.default)(r,e);var a=y(r);function r(){return(0,u.default)(this,r),a.apply(this,arguments)}return(0,o.default)(r,[{key:"renderContainers",value:function(){var e=(0,d.toJS)(this.store.detail),a=e.name,r=e.cluster,n=e.containers,l=e.initContainers;return f.default.createElement(v.default,{prefix:this.prefix,isEdgeWize:(0,h.isEdgeWizePage)(),cluster:r,title:t("CONTAINER_PL"),containers:n,initContainers:l,podName:a})}},{key:"renderVolumes",value:function(){var e=(0,d.toJS)(this.store.detail),t=e.volumes,a=e.containers;return(0,p.default)(t)?null:f.default.createElement(g.default,{isEdgeWize:(0,h.isEdgeWizePage)(),volumes:t,containers:a,loading:this.store.isLoading,match:this.props.match})}},{key:"renderContent",value:function(){return f.default.createElement("div",null,this.renderContainers(),this.renderVolumes())}},{key:"render",value:function(){return f.default.createElement("div",null,this.renderContent())}},{key:"module",get:function(){return this.props.detailStore.module}},{key:"store",get:function(){return this.props.detailStore}},{key:"prefix",get:function(){return this.props.match.url.split("/").slice(0,-1).join("/")}}]),r}(f.default.Component))||l)||l;a.default=E},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(7);var l,u,o,i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=n(r(1)),v=n(r(63)),g=r(239),y=n(r(789)),E=n(r(3942)),b=n(r(1839));function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;t-1;return r.monitorStore=n?new b.default:(0,g.isEdgeWizePage)()?new E.default:new y.default,r}return(0,i.default)(a,[{key:"render",value:function(){var e=this,t=this.store.detail,a=t.createTime,r=t.cluster,n=this.monitorStore,u=n.isLoading,o=n.isRefreshing,i=(0,g.hideGPUByLicense)(this.getMonitoringCfgs(),r);return d.default.createElement(O.Controller,{createTime:a,onFetch:this.fetchData,loading:u,refreshing:o,isEmpty:(0,m.default)(this.metrics)},i.map((function(t){t.data=(0,m.default)(t.data)?[{values:(0,v.getZeroValues)()}]:t.data,t.legend=t.data.map((function(){return t.legend})),t.workload_kind=e.monitoringModule;var a=(0,v.getAreaChartOps)(t);return d.default.createElement(_.SimpleArea,(0,l.default)({key:t.title,width:"100%"},a))})))}},{key:"store",get:function(){return this.props.detailStore}},{key:"monitoringModule",get:function(){var e;return null!==(e=k[this.store.detail.ownerKind])&&void 0!==e?e:this.store.detail.ownerKind}},{key:"metrics",get:function(){var e={};return Object.entries(this.monitorStore.data).forEach((function(t){var a=(0,n.default)(t,2),r=a[0],l=a[1];(0,h.default)(l,"data.result")&&(e["".concat(r)]=l)})),e}}]),a}(d.default.Component),T=(0,p.inject)("rootStore","detailStore")((0,p.observer)(N));t.default=T;var R=N;t.Component=R},function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(16),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(28),r(42),r(16),r(4),r(22),r(23),r(57),r(24),r(17),r(62);var l=n(r(315)),u=n(r(43));r(41);var o,i=n(r(44)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(14),v=n(r(63)),g=r(239),y=r(186),E=r(52),b=r(791),_=n(r(1417)),O=n(r(3953)),S=n(r(805)),C=n(r(3954));function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var k=(0,g.inject)("rootStore")(o=(0,g.observer)(o=(0,b.trigger)(o=function(e){(0,f.default)(r,e);var a=D(r);function r(){var e;(0,c.default)(this,r);for(var n=arguments.length,l=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.default)(this,a),(e=t.call(this,"volumes")).getApi=function(){return"".concat(e.apiVersion,"/persistentvolumeclaim_metrics")},e.handleParams=function(e){return e},e.filters=r,e}return(0,u.default)(a,[{key:"fetchMetrics",value:function(e){(0,o.default)((0,s.default)(a.prototype),"fetchMetrics",this).call(this,d(d({},this.filters),e))}},{key:"monitoringMetrics",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interval:5e3};return this.fetchMetrics(t),setInterval((function(){e.fetchMetrics(d(d({},t),{},{autoRefresh:!0}))}),a.interval)}}]),a}(r(a(845)).default);t.default=m},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=r(a(3)),d=a(794),p=r(a(3964));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var h=function(e){(0,u.default)(a,e);var t=m(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"getWavePath",value:function(){var e=this.props.rate,t=100*(1-e),a=20*(.5-Math.abs(.5-e));return"\n M0 ".concat(t,"\n \n Q ").concat(12.5," ").concat(t+a,", ").concat(25," ").concat(t,"\n T ").concat(50," ").concat(t,"\n\n T ").concat(75," ").concat(t,"\n T ").concat(100," ").concat(t,"\n\n T ").concat(125," ").concat(t,"\n T ").concat(150," ").concat(t,"\n\n T ").concat(175," ").concat(t,"\n T ").concat(200," ").concat(t,"\n\n V 100\n H 0\n\n Z\n ")}},{key:"render",value:function(){var e=this.props.className;return c.default.createElement("div",{className:(0,f.default)(p.default.container,e)},this.renderForeground(),this.renderCapacity())}},{key:"renderForeground",value:function(){var e=this.props.rate,t=(0,d.getSuitableValue)(e,"%");return c.default.createElement("div",{className:p.default.foreground},c.default.createElement("h3",null,t,"%"))}},{key:"renderCapacity",value:function(){var e="0 0 ".concat(100," ").concat(100),t=this.getWavePath();return c.default.createElement("svg",{width:"100%",height:"100%",viewBox:e,preserveAspectRatio:"none"},c.default.createElement("path",{className:p.default.wave,d:t}),c.default.createElement("path",{className:p.default.wave2,d:t}))}}]),a}(c.default.Component);t.default=h,h.propTypes={rate:s.default.number,className:s.default.string},h.defaultProps={rate:0}},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(5),r(11),r(6),r(86),r(48),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.ClusterAlertPolicyDetail=a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(86),r(28),r(48),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(7);var l,u,o=n(r(315)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(14),v=r(239),g=n(r(26)),y=n(r(63)),E=r(186),b=n(r(795)),_=r(52),O=r(791),S=n(r(1014)),C=n(r(823)),D=n(r(3970)),k=n(r(3976));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){for(var t=1;t0?"builtin":""}},{key:"listUrl",get:function(){var e=localStorage.getItem("alert-policy-detail-referrer");if(e)return e;var t=this.props.match.params,a=t.cluster,r=t.namespace,n=t.workspace,l=this.type;return"".concat(n?"/".concat(n):"","/clusters/").concat(a).concat(r?"/projects/".concat(r):"","/alert-rules").concat(l?"?type=".concat(l):"")}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"resetPolicy",get:function(){var e=this,a=this.props.match,r=(0,h.toJS)(this.store.detail);return{key:"reset",icon:"restart",text:t("RESET"),action:"edit",onClick:function(){return e.trigger("alerting.rule.reset",{type:e.type,cluster:a.params.cluster,detail:r,success:e.fetchData})}}}}]),r}(m.default.Component),I=(0,v.inject)("rootStore")(u=(0,v.observer)(u=(0,O.trigger)(u=function(e){(0,f.default)(a,e);var t=R(a);function a(e){var r;return(0,c.default)(this,a),(r=t.call(this,e)).authKey="rulegroups",r}return a}(w))||u)||u)||u;a.default=I;var M=(0,v.inject)("rootStore")(l=(0,v.observer)(l=(0,O.trigger)(l=function(e){(0,f.default)(a,e);var t=R(a);function a(e){var r;return(0,c.default)(this,a),(r=t.call(this,e)).authKey="clusterrulegroups",r}return a}(w))||l)||l)||l;a.ClusterAlertPolicyDetail=M},function(e,t,a){e.exports={header:"kLqf1HbgvncE_HpM34pz4",search:"_2_FuLSz9uWr12KC15lfVgB",actions:"_2_X5wj9y3MiCGon2LqOvXK",item:"_3Zyk52RkFf1sJz6rCX9PdB",content:"nHupxm2Fr2hsA70BXmCKN",head:"_26x7hW6cCUZ-jNjoMlz-56",headIcon:"_2zH27wjttK1MAnhYIEvJWh",headLine:"_I9pYkuXNGV4wRoBIk-9w",severity:"_3ftTZ15mo7eNhRbe8GIvxN",statusLine:"_3-tu95Qm7-kM1YwibFjhWN",target:"w-DTcIKKfNBbC723WxjTS",timeLabel:"_3-SLBePAUSVb9piaAaiJv6",time:"_1xi2aj1lis8IlK4lX9oUC4",time_white:"_2YRlqM_uPS-IuAc6Dm3Lar",title:"_211aVPR605bgjtrOcTWe99",desc:"_2KuzGiTKDnVpB887eRwSRz",expanded:"_2ivanZgb206WfuwTkaGR4U",itemExtra:"_3gRU7EtrPOVED1ctMRYwn5",ms_content:"_2U7VzbHDMRe6mcoNQKsQsv",ruleExpr:"_1Vs-uBGpunsZAje7BcRVkl",label:"MCJ6H_Tsq-M_mowtNX2NH",value:"_14L4I6leaLrDqGAi-BM0DB",itemExtraShow:"o39HqtWv_n8C8zXjQT687",status_disabled:"_1_FWg1Q_7iBuDn_hUtwwoG",status_pending:"_2wh_BTk8chvd5Z9FAA0zHt",status_firing:"_1aJNiGa073rYjGOpa0U5Ua",status_inactive:"_2FzW2eq7FwtTKw1wAn8LZW",info_disabled:"_36OFVtqLZnnzMguM9B3L-k",info_pending:"_8NCXFvYUdsUdu1_TPKbtr",info_firing:"_1G7NJEfDx_c-id8qzfDDKW",info_inactive:"_3NcF9w2Q47PUQ2Tr4wU19z",critical:"_1x23r_vnCw6lc_RAMI0ZK6",error:"fgjhWF7q-KzUaSQ46tj_x",footer:"_3l9tqtCU4hqyc4JWray_jm",pageSizeBox:"_10j4h-LctO_jPpSyi1Zghz",pagesize:"_2yV7RI7ixs2RUbaXgGCg-D",text:"_1Zxl_B6ruwO6hH-8rZBVyV",gap:"_1TdIBwMMx-AgnbaFZSa8Mr",pageSizeMenu:"_3rg_nQe9ZDhv-EWKgtwOCQ",pageSizeMenuitem:"MxEk4SUq6JJUAiQVFlwTF"}},function(e,a,r){"use strict";r(15);var n=r(20);r(12),r(109),r(5),r(86),r(73),r(16),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.Component=a.default=void 0,r(12),r(109),r(45),r(5),r(86),r(73),r(28),r(42),r(16),r(4),r(22),r(23),r(57),r(24),r(17),r(62);var l=n(r(315)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(63)),h=n(r(26)),v=r(239),g=r(186),y=n(r(795)),E=r(52),b=r(791),_=r(14),O=n(r(907)),S=n(r(805)),C=n(r(3985));function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var k=function(e){(0,s.default)(r,e);var a=D(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),c=0;c-1,onClick:function(){return e.trigger("resource.delete",{type:e.name,detail:(0,_.toJS)(e.store.detail),success:e.returnTolist})}}]},e.getAttrs=function(){var a=e.store.detail,r=void 0===a?{}:a,n=r.createTime,l=r.phase,u=r.storageClassName,o=r.volumeHandle,i=r.persistentVolumeReclaimPolicy,c=r.accessModes,s=void 0===c?["-"]:c,f=r.capacity,d=r.volumeMode;return(0,m.default)((0,_.toJS)(r))?null:[{name:t("STATUS"),value:p.default.createElement("div",null,p.default.createElement(y.default,{type:l,name:t("PV_STATUS_".concat(l.toUpperCase()))}))},{name:t("CAPACITY"),value:"".concat((0,E.memoryFormat)(f,"Gi"),"Gi")},{name:t("ACCESS_MODE_TCAP"),value:s.join(",")},{name:t("STORAGE_CLASS"),value:u},{name:t("VOLUME_HANDLE"),value:o},{name:t("RECLAIM_POLICY"),value:i},{name:t("VOLUME_MODE"),value:t("VOLUME_MODE_".concat(d.toUpperCase()))},{name:t("CREATION_TIME_TCAP"),value:(0,E.getLocalTime)(n).format("YYYY-MM-DD HH:mm:ss")}]},e.returnTolist=function(){e.props.rootStore.routing.push(e.listUrl)},e}return(0,c.default)(r,[{key:"componentDidMount",value:function(){this.fetchData()}},{key:"render",value:function(){var e={detailStore:this.store};if(this.store.isLoading&&!this.store.detail.name)return p.default.createElement(g.Loading,{className:"ks-page-loading"});var a={module:this.module,authKey:this.authKey,name:(0,E.getDisplayName)(this.store.detail),desc:this.store.detail.description,attrs:this.getAttrs(),operations:this.isFedManaged?[]:this.getOperations(),icon:"storage",breadcrumbs:[{label:t("PERSISTENT_VOLUME_PL"),url:this.listUrl}]};return p.default.createElement(S.default,(0,l.default)({stores:e},a,{routes:(0,C.default)(this.props.match.path)}))}},{key:"name",get:function(){return"PERSISTENT_VOLUME"}},{key:"module",get:function(){return"persistentvolumes"}},{key:"authKey",get:function(){return"persistentvolumeclaims"}},{key:"listUrl",get:function(){var e=this.props.match.params.cluster;return"/clusters/".concat(e,"/volumes/PV")}},{key:"isFedManaged",get:function(){return this.store.detail.isFedManaged}}]),r}(p.default.Component),N=(0,v.inject)("rootStore")((0,v.observer)((0,b.trigger)(k)));a.default=N;var T=k;a.Component=T},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u=0?(d-f)/86400/1e3:d-f,m=p>=0?p>=0&&p<1?Math.ceil(p):Math.floor(p):d-f;return _.LICENSE_UNAUTHORIZED_STATUS_MAP.includes(u)?a=!0:"Time expired"===u&&"subscription"===o?r=!0:_.LICENSE_OVERLIMIT_STATUS_MAP.includes(u)?t=!0:(m>0&&m<=30||m<=0&&"subscription"!==o)&&(n=!0),C({showLicenseTip:_.STATUS_MAPPER.includes(u),isExpired:r,isUnAuthorized:a,isOverLimit:t,unExpired:n,dueDate:m},l)},e}return(0,f.default)(i,[{key:"getUrl",value:function(e){var t=e.name;return"".concat(this.apiVersion,"/").concat(this.module,"/").concat(t)}},{key:"fetchLicense",value:(r=(0,o.default)(n.default.mark((function e(){var t,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={},e.next=3,request.get(this.getUrl({name:"ks-license"}),{},{},(function(){return{}}));case 3:return a=e.sent,(0,g.default)(a)||(t=C({},this.mapper(a))),this.licenseInfo=this.handleLicenseInfo(t),e.abrupt("return",(0,b.toJS)(this.licenseInfo));case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"updateLicense",value:(a=(0,o.default)(n.default.mark((function e(t){var a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={data:t},e.abrupt("return",this.submitting(request.put(this.getUrl({name:"ks-license"}),a)));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"invalidLicense",value:(t=(0,o.default)(n.default.mark((function e(t){var a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={data:t},e.abrupt("return",this.submitting(request.put("".concat(this.getUrl({name:"ks-license"}),"?validate=true"),a)));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),i}(r(a(68)).default),u=(0,v.default)(l.prototype,"licenseInfo",[b.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),(0,v.default)(l.prototype,"fetchLicense",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"fetchLicense"),l.prototype),(0,v.default)(l.prototype,"updateLicense",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"updateLicense"),l.prototype),(0,v.default)(l.prototype,"invalidLicense",[b.action],Object.getOwnPropertyDescriptor(l.prototype,"invalidLicense"),l.prototype),l);t.default=k},function(e,t,a){e.exports={subNav:"_1pmI9ndWK9rEGV4MJm4HOX",title:"_2noUEB0newe-2ZeJc6_vQM",extraIcon:"_106IDsxUlkAKzEMJPQb_VE",select:"zbwCmzs7IGtLHtKeFTk5q",open:"_1_5lTDnCWRT_bjONGPwjJ-",innerNav:"_1lx3cQgES6ywH7v7ewNDW9",childSelect:"IYCaQMTl6Z32Tj4im7ux3",disabled:"_3NGHEZvhf1DSOaNTdwoIMo",hide:"_2IhCm1aqthcg__sRJCh2Ro",tip:"_3w0p4MCdcQ_5cKyY7YyaCc",back:"_24MRiw49Mh9WeerGEXAX8o",rightIcon:"_15BwbKp8iiYrESLkQE3AtK"}},function(e,t,a){e.exports={modal:"_2Ma6l2-1qGALcBbXeHSfD",body:"e9-9CWzdPlOWpemV7BFST",close:"_2b1a8uCSxC1Ze6-JIVKUbg",navs:"_2vO2KN0ZszlryTe-zGdisF",nav:"_2QN673FlOzj6UzAeVlo0Pt",active:"_3qkHuByT9irpB_OBNODDMe",bottomIcon:"_1Pkkvq4S3sY9dJ6JsDaxLd",icon:"_2SFazppVz_WfLkpJRqznL",title:"xVfoJz14QNXprPQT4yzRz",desc:"_2j8YMUiWW7wv32Owr4hleS",unAuthorized:"_1gj9hTwvscNQSCl0xMt4oU",operators:"_2UTTnW2Wpc9T1bRxtcGQvO",operate:"_3laRx0YKqrTFaENMnE7VLu","left-icon":"R5uTL-NlmklkYHWBRcr2M",enabled:"_1JYwilpJhc73NIHl_zS0u-",disabled:"_2YMjlSJCN-GRNLUtXhqKBg"}},,,,,,,,,,,,,,,,,,,,,function(e,a,r){"use strict";var n=r(20);r(12),r(187),r(11),r(6),r(84),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(85),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(187),r(11),r(6),r(84),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(85),r(62),r(7);var l=n(r(315)),u=n(r(43));r(41);var o,i,c,s,f=n(r(44)),d=n(r(30)),p=n(r(65)),m=n(r(36)),h=n(r(37)),v=n(r(88)),g=n(r(55)),y=n(r(56)),E=n(r(51)),b=n(r(49)),_=(n(r(66)),n(r(63))),O=n(r(26)),S=n(r(74)),C=n(r(0)),D=r(14),k=r(239),N=r(186),T=n(r(789)),R=n(r(790)),w=n(r(1134)),I=n(r(814)),M=n(r(834)),P=n(r(438)),A=r(791),j=r(52),L=n(r(240)),x=n(r(4434));function U(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function z(e){for(var t=1;t=0},this.isOutdated=function(e){if(!globals.app.isMultiCluster)return!1;var t=(0,u.default)(globals,"clusterConfig.".concat(e,".ksVersion"));return(0,l.compareVersion)(t,"3.4.0")<0},this.getStoreByCluster=function(e){return o.default},this.setStoreByCluster=function(e){var t=a.getStoreByCluster(e);a.setStore(new t)},t&&(this.store=t)}},function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(109),r(5),r(11),r(6),r(84),r(48),r(16),r(27),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(85),r(62),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(84),r(28),r(48),r(42),r(16),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(85),r(62),r(188),r(7);var u,o=n(r(315)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=n(r(240)),v=n(r(788)),g=n(r(801)),y=n(r(795)),E=n(r(790)),b=n(r(792)),_=l(r(793)),O=n(r(796)),S=n(r(2001)),C=r(52),D=r(72),k=r(434),N=r(244),T=r(239),R=r(14),w=n(r(5261));function I(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function M(e){for(var t=1;t1&&e.rootStore.routing.query(M(M({},a),{},{page:1}))}),[l]),m.default.createElement(A,(0,o.default)({store:n},e))}));a.default=j},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={letter:"MtAEvDDok76bC5n6BMeYs",img:"_1p0huC_MiGExAG5cffowO-"}},function(e,t,a){e.exports={wrapper:"_1XkdSSXdX86U8l_DnkJPqJ",text:"awHbyBWcJ6ZsY7PX_d-UQ",ellipsis:"_3zTrKZJ2zDD4H30HDygv9k",icon:"_2nWo_V38K9qDtgmudAI-ai",clickable:"_16dsw4IFfxE-j09HQTBZtZ"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=r(186),v=n(r(1473)),g=n(r(1477));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=function(e){(0,c.default)(r,e);var a=y(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.formRef,r=e.data,n=e.children,o=e.hideFooter,i=e.onCancel,c=e.onOk,s=e.cancelText,f=e.okText,p=e.isSubmitting,y=e.bodyClassName,E=e.formClassName,b=e.disableOk,_=(0,u.default)(e,["formRef","data","children","hideFooter","onCancel","onOk","cancelText","okText","isSubmitting","bodyClassName","formClassName","disableOk"]);return d.default.createElement(v.default,(0,l.default)({},_,{bodyClassName:(0,m.default)(g.default.formBody,y),onCancel:i,hideFooter:!0}),d.default.createElement(h.Form,{ref:a,data:r,onSubmit:c},d.default.createElement("div",{className:(0,m.default)(g.default.formWrapper,E)},n),!o&&d.default.createElement("div",{className:g.default.formFooter},d.default.createElement(h.Button,{type:"default",onClick:i,"data-test":"modal-cancel"},s||t("CANCEL")),d.default.createElement(h.Button,{type:"control",htmlType:"submit",loading:p,disabled:b||p,"data-test":"modal-ok"},f||t("OK")))))}}]),r}(d.default.Component);a.default=E,E.propTypes={data:p.default.object,isSubmitting:p.default.bool}},function(e,t,a){e.exports={modalBody:"_2emSCCZW7Any6zY9sbt0dh",body:"_3zk4pcFFwHI55jC3hhKShH",content:"_2AVQmoTGa5M_aaHwB5m25A",closeIcon:"_3ZNMNqX719F5uyujlsIEEX",footer:"Pv1Crv3p0hsWafBqva7XY"}},function(e,t,a){e.exports={wrapper:"_2WgnPoNTBlYxMadUOp6X6F",primary:"_1N_xYp5Mlw_vRt2GBQPG3_",control:"_1GBzD41XmCACAyrxXIpA2g",switch:"obdQdmNh6a9AylYbpxZXo",inner:"_24C6iSzaC5OhGiAjheEbHW",on:"u9GufWWwHgs1SY_uAQQuU",disabled:"_2MD8-ccizgfYBdMPKkj0Zv"}},function(e,a,r){"use strict";var n=r(20);r(12),r(187),r(11),r(6),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(187),r(11),r(6),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l=n(r(315)),u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=r(186),p=n(r(1266)),m=n(r(828)),h=n(r(26)),v=n(r(63)),g=n(r(854)),y=n(r(1)),E=n(r(0)),b=n(r(2048));function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;t=t})),p=n0?r.map((function(t,a){var r=t.cluster;return i.default.createElement("div",{key:"".concat(r,"-").concat(a)},i.default.createElement(p.default,{cluster:r,allClusters:e.allClusters}))})):t("ALL_CLUSTERS"),n.length>0&&function(t){var a=i.default.createElement("div",{className:m.default.tipContentBox,style:{minWidth:"0px"}},t.map((function(t,a){return i.default.createElement("div",{className:(0,d.default)(m.default.tipLineItem,m.default.custom_line),key:"".concat(t.cluster,"-").concat(a)},i.default.createElement(p.default,{cluster:t.cluster,allClusters:e.allClusters}))})));return i.default.createElement(c.Tooltip,{content:a,placement:"top"},i.default.createElement("div",{className:m.default.targetTipRest},t.length))}(n))),i.default.createElement("div",{className:m.default.cus_text},i.default.createElement("span",{className:m.default.pr_title},t("RULE_EXPRESSION"),":"),i.default.createElement("span",{className:m.default.exprText},e.rule.expr))))))};a.default=h},function(e,t,a){e.exports={tags:"_72IXnbKwDL_C2VKhWGqOF"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(11),r(6),r(73),r(18),r(87),r(48),r(16),r(27),r(98),r(10),r(316),r(24),r(64),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var u=l(r(61)),o=l(r(30)),i=l(r(96));r(5),r(11),r(6),r(73),r(18),r(87),r(48),r(16),r(27),r(98),r(10),r(4),r(316),r(24),r(64),r(7);var c=r(186),s=l(r(3)),f=r(923),d=l(r(135)),p=l(r(26)),m=l(r(994)),h=l(r(880)),v=n(r(0)),g=r(52),y=l(r(1480)),E={cpu:"cpu",pod:"pod",memory:"memory",disk:"storage",network:"network"},b=function(e){var a,r,n,l,b,_,O,S,C,D,k,N,T,R,w=e.rule,I=e.handleEdit,M=e.allClusters,P=void 0===M?[]:M,A=Object.keys(w.exprBuilder)[0],j=(0,p.default)(w,"exprBuilder.workload.kind","Deployment"),L=(0,v.useState)((0,p.default)(w,"disable",!1)),x=(0,i.default)(L,2),U=x[0],z=x[1],F=(0,v.useReducer)((function(e){return e+1}),0),G=(0,i.default)(F,2)[1],V=function(e){return(0,g.showNameAndAlias)(e,"cluster",{},!0,(function(){G()}))},B=function(e){return v.default.createElement("div",{className:y.default.tipContentBox,style:{minWidth:"200px"}},e.map((function(e,a){return v.default.createElement("div",{className:y.default.tipLineItem,style:{alignItems:"flex-start"},key:a},v.default.createElement("div",{className:y.default.tipText_title},v.default.createElement("img",{src:"/assets/alarmProject.svg"}),v.default.createElement("span",null,e.namespace)),v.default.createElement("div",{className:y.default.tipText_deploy},v.default.createElement("span",null,t("".concat(j.toUpperCase(),"S_VALUES"),{values:e.names.join(", ")}))))})))},Y=function(){var e=(0,p.default)(w,"exprBuilder.".concat(A,".names"),[]),a={};e.forEach((function(e){a[e.cluster]?a[e.cluster]=[].concat((0,u.default)(a[e.cluster]),[{cluster:e.cluster,namespace:(0,p.default)(e,"namespace",""),names:(0,p.default)(e,"names",[])}]):a[e.cluster]=[{cluster:e.cluster,namespace:(0,p.default)(e,"namespace",""),names:(0,p.default)(e,"names",[])}]}));var r=Object.entries(a).map((function(e){var t=(0,i.default)(e,2);return[t[0],t[1]]})),n=r.slice(0,3),l=r.slice(3).map((function(e){return(0,i.default)(e,2)[1]}));return v.default.createElement(v.default.Fragment,null,n.map((function(e,a){var r="".concat(V(e[0])," | ").concat(e[1].reduce((function(e,t){return e+t.names.length}),0));return v.default.createElement(c.Tooltip,{content:"node"===A?v.default.createElement("div",{className:y.default.tipContentBox_cluster},v.default.createElement("span",null,t("NODES_VALUES",{values:e[1][0].names.join(", ")}))):B(e[1]),key:e},v.default.createElement("div",{key:a},v.default.createElement(m.default,{cluster:e[0],allClusters:P,title:r})))})),l.length>0&&function(e){var a=v.default.createElement("div",{className:y.default.tipContentBox,style:{minWidth:"200px"}},e.map((function(e,a){var r=e.reduce((function(e,t){return e+t.names.length}),0);return v.default.createElement("div",{className:y.default.tipLineItem,style:{alignItems:"flex-start"},key:a},v.default.createElement("div",{style:{marginBottom:"8px"}},v.default.createElement(m.default,{cluster:e.cluster,allClusters:P,title:"".concat(V(e[0].cluster)," | ").concat(r)})),"node"===A?v.default.createElement(v.default.Fragment,null,e.map((function(e,a){return v.default.createElement("div",{className:y.default.tipText_nodes,key:a},t("NODES_VALUES",{values:e.names.join(", ")}))}))):v.default.createElement(v.default.Fragment,null,e.map((function(e,a){return v.default.createElement(v.default.Fragment,null,v.default.createElement("div",{className:y.default.tipText_title,key:"".concat(a,"_0")},v.default.createElement("img",{src:"/assets/alarmProject.svg"}),v.default.createElement("span",null,e.namespace)),v.default.createElement("div",{className:y.default.tipText_deploy,key:"".concat(a,"_1")},v.default.createElement("span",null,t("".concat(j.toUpperCase(),"S_VALUES"),{values:e.names.join(",")}))))}))))})));return v.default.createElement(c.Tooltip,{content:a,placement:"right"},v.default.createElement("div",{className:y.default.targetTipRest},e.length))}(l))},W=(0,d.default)(f.RESOURCE_METRICS_CONFIG[A||"node"])||{};return v.default.createElement("div",{className:y.default.container},v.default.createElement("div",{className:y.default.head},v.default.createElement("div",{className:y.default.title},(R=Object.keys((0,p.default)(w.exprBuilder,"".concat(A,".metricThreshold."),{}))[0]||"pod",v.default.createElement("div",{className:(0,s.default)(y.default.icon,(T={},(0,o.default)(T,y.default.iconDisabled,U),(0,o.default)(T,y.default.iconOn,!U),T))},v.default.createElement(c.Icon,{size:40,name:E[R]}))),v.default.createElement("div",{className:y.default.text},v.default.createElement("p",null,v.default.createElement("span",{className:y.default.ruleName},w.alert),v.default.createElement(h.default,{data:(0,p.default)(w,"severity")})),v.default.createElement("p",null,U?t("DISABLED"):t("ENABLED")))),v.default.createElement("div",{className:y.default.opt},!e.builtInRule&&v.default.createElement("div",{className:y.default.iconBg},v.default.createElement(c.Icon,{name:"trash",size:16,onClick:function(){e.handleDelete()}})),v.default.createElement("div",{className:y.default.iconBg},v.default.createElement(c.Icon,{name:"pen",size:16,onClick:function(){return I()}})),v.default.createElement("div",{className:y.default.sToggle},v.default.createElement("div",{className:y.default.tooltip},v.default.createElement("span",null,U?t("ENABLE_RULE"):t("DISABLE_RULE"))),v.default.createElement("div",{className:y.default.triangle}),v.default.createElement(c.Toggle,{checked:!U,onChange:function(){z(!U),e.handleDisable(!U)}})))),v.default.createElement("div",{className:y.default.desc},(a=(0,p.default)(w,"exprBuilder.".concat(A,".metricThreshold")),r=Object.keys(a)[0],n=Object.keys(a[r])[0],l="".concat(r,":").concat(n),b=W[l],_=b.ruleConfig.filter((function(e){return"thresholds"===e.name}))[0].reverser,O=t("".concat(b.label)).replace(/[((]%[))]/g,""),S=(0,p.default)(w,"exprBuilder.".concat(A,".comparator")),C=_(Number(Object.values(a[r])[0])),D="core"===b.ruleConfig[1].unit?1===C?t("CORE"):t("CORE_PL"):b.ruleConfig[1].unit,k=w.for.slice(0,-1),N=w.for.slice(-1),v.default.createElement(v.default.Fragment,null,v.default.createElement("div",{className:y.default.exprLine},v.default.createElement("span",{className:y.default.title},"".concat(t("MONITORING_TARGET"),":")),v.default.createElement("span",{className:y.default.descTextCL},Y())),v.default.createElement("div",{className:y.default.exprLine},v.default.createElement("span",{className:y.default.pr_title},"".concat(t("ALERTING_RULE"),":")),v.default.createElement("span",{className:y.default.exprText},"%"===D?t({s:"ALERT_RULE_TEXT_PERCENT_SECOND",m:"ALERT_RULE_TEXT_PERCENT_MINUTE",h:"ALERT_RULE_TEXT_PERCENT_HOUR"}[N],{alterTypeText:O,comparator:S,thresholds:C,durationValue:k}):t({s:"ALERT_RULE_TEXT_SECOND",m:"ALERT_RULE_TEXT_MINUTE",h:"ALERT_RULE_TEXT_HOUR"}[N],{alterTypeText:O,comparator:S,thresholds:C,unit:D,durationValue:k})))))))};a.default=b},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NODE_ALERTING_CONFIG=void 0;var r=a(1269),n={"cpu:utilization":{label:"CPU_UTILIZATION_SCAP",tcapLabel:"CPU_UTILIZATION_NO_PERCENT_TCAP",prefixIcon:"cpu",ruleConfig:r.PERCENT_RULE_CONFIG},"cpu:load1m":{label:"CPU_LOAD_1",tcapLabel:"CPU_LOAD_1_TCAP",prefixIcon:"cpu",ruleConfig:r.BASE_RULE_CONFIG},"cpu:load5m":{label:"CPU_LOAD_5",tcapLabel:"CPU_LOAD_5_TCAP",prefixIcon:"cpu",ruleConfig:r.BASE_RULE_CONFIG},"cpu:load15m":{label:"CPU_LOAD_15",tcapLabel:"CPU_LOAD_15_TCAP",prefixIcon:"cpu",ruleConfig:r.BASE_RULE_CONFIG},"memory:utilization":{label:"MEMORY_UTILIZATION_SCAP",tcapLabel:"MEMORY_UTILIZATION_NO_PERCENT_TCAP",prefixIcon:"memory",ruleConfig:r.PERCENT_RULE_CONFIG},"memory:available":{label:"MEMORY_AVAILABLE",tcapLabel:"MEMORY_AVAILABLE_TCAP",prefixIcon:"memory",ruleConfig:r.GIB_RULE_CONFIG},"network:transmittedRate":{label:"DATA_SEND_RATE",tcapLabel:"DATA_SEND_RATE_TCAP",prefixIcon:"network",ruleConfig:r.MBPS_RULE_CONFIG},"network:receivedRate":{label:"DATA_RECEIVE_RATE",tcapLabel:"DATA_RECEIVE_RATE_TCAP",prefixIcon:"network",ruleConfig:r.MBPS_RULE_CONFIG},"disk:spaceUtilization":{label:"DISK_SPACE_UTILIZATION",tcapLabel:"DISK_SPACE_UTILIZATION_NO_PERCENT_TCAP",prefixIcon:"storage",ruleConfig:r.PERCENT_RULE_CONFIG},"disk:spaceAvailable":{label:"DISK_SPACE_AVAILABLE",tcapLabel:"DISK_SPACE_AVAILABLE_TCAP",prefixIcon:"storage",ruleConfig:r.GB_RULE_CONFIG},"disk:inodeUtilization":{label:"INODE_UTILIZATION",tcapLabel:"INODE_UTILIZATION_NO_PERCENT_TCAP",prefixIcon:"storage",ruleConfig:r.PERCENT_RULE_CONFIG},"disk:iopsRead":{label:"DISK_READ_IOPS",tcapLabel:"DISK_READ_IOPS_TCAP",prefixIcon:"storage",ruleConfig:r.BASE_RULE_CONFIG},"disk:iopsWrite":{label:"DISK_WRITE_IOPS",tcapLabel:"DISK_WRITE_IOPS_TCAP",prefixIcon:"storage",ruleConfig:r.BASE_RULE_CONFIG},"disk:throughputRead":{label:"DISK_READ_THROUGHPUT",tcapLabel:"DISK_READ_THROUGHPUT_TCAP",prefixIcon:"storage",ruleConfig:r.KBS_RULE_CONFIG},"disk:throughputWrite":{label:"DISK_WRITE_THROUGHPUT",tcapLabel:"DISK_WRITE_THROUGHPUT_TCAP",prefixIcon:"storage",ruleConfig:r.KBS_RULE_CONFIG},"pod:abnormalRatio":{label:"UNAVAILABLE_POD_RATIO",tcapLabel:"UNAVAILABLE_POD_RATIO_NO_PERCENT_TCAP",prefixIcon:"pod",ruleConfig:r.PERCENT_RULE_CONFIG},"pod:utilization":{label:"POD_QUOTA_UTILIZATION_SCAP",tcapLabel:"POD_QUOTA_UTILIZATION_NO_PERCENT_TCAP",prefixIcon:"pod",ruleConfig:r.PERCENT_RULE_CONFIG}};t.NODE_ALERTING_CONFIG=n;var l=n;t.default=l},,function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(1269),n={"cpu:usage":{label:"CPU_USAGE_SCAP",tcapLabel:"CPU_USAGE_TCAP",prefixIcon:"cpu",ruleConfig:r.CORE_RULE_CONFIG},"memory:usage":{label:"MEMORY_USAGE_SCAP",tcapLabel:"MEMORY_USAGE_TCAP",prefixIcon:"memory",ruleConfig:r.MIB_RULE_CONFIG},"memory:usageWoCache":{label:"MEMORY_USAGE_WO_CACHE_SCAP",tcapLabel:"MEMORY_USAGE_WO_CACHE_TCAP",prefixIcon:"memory",ruleConfig:r.MIB_RULE_CONFIG},"network:transmittedRate":{label:"DATA_SEND_RATE",tcapLabel:"DATA_SEND_RATE_TCAP",prefixIcon:"network",ruleConfig:r.MBPS_RULE_CONFIG},"network:receivedRate":{label:"DATA_RECEIVE_RATE",tcapLabel:"DATA_RECEIVE_RATE_TCAP",prefixIcon:"network",ruleConfig:r.MBPS_RULE_CONFIG},"replica:unavailableRatio":{label:"UNAVAILABLE_WORKLOAD_REPLICA_RATIO",tcapLabel:"UNAVAILABLE_WORKLOAD_REPLICA_RATIO_NO_PERCENT_TCAP",prefixIcon:"backup",ruleConfig:r.PERCENT_RULE_CONFIG}};t.default=n},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(18),r(10),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(18),r(10);var u=l(r(315)),o=l(r(96)),i=n(r(0)),c=l(r(1)),s=r(186),f=l(r(63)),d=l(r(26)),p=l(r(74)),m=l(r(242)),h=l(r(2077)),v=l(r(2078)),g=l(r(2096)),y=[{label:t("RULE_TEMPLATE"),value:"ruleTemplate"},{label:t("CUSTOM_RULE"),value:"customRule"}],E=function(e,a){var r=e.editRule,n=(0,f.default)(r)?y[0].value:(0,f.default)((0,d.default)(r,"exprBuilder",{}))?y[1].value:y[0].value,l=(0,i.useState)(n),c=(0,o.default)(l,2),E=c[0],b=c[1],_=(0,i.useRef)(),O=function(t){var a=e.onSave,r=_.current.target;r&&r.validate((function(){var e=r.getData();if("ruleTemplate"===E){var n=Object.keys((0,d.default)(e,"exprBuilder"))[0],l=(0,d.default)(e,"exprBuilder.".concat(n,".for")),u=(0,d.default)(e,"exprBuilder.".concat(n,".severity"));(0,p.default)(e,"for",l),(0,p.default)(e,"severity",u),(0,m.default)(e,"exprBuilder.".concat(n,".for")),(0,m.default)(e,"exprBuilder.".concat(n,".severity"))}else(0,p.default)(e,"exprBuilder",{});a(e),t&&t()}))};return(0,i.useEffect)((function(){var t=a.registerSubRoute,r=e.onCancel;t&&t(O,r)}),[E]),i.default.createElement("div",{className:h.default.AddRuleContainer},i.default.createElement("div",{className:"h6",style:{display:"flex",alignItems:"center"}},i.default.createElement(s.Icon,{name:"return",size:20,onClick:function(){var t=a.resetSubRoute;t&&t(),e.onCancel()}}),i.default.createElement("span",null,t("ADD_ALERTING_RULE"))),i.default.createElement("div",{className:h.default.AddForm},i.default.createElement(s.RadioGroup,{buttonWidth:132,value:E,wrapClassName:"radio",onChange:function(e){return b(e)}},y.map((function(e){return i.default.createElement(s.RadioButton,{key:e.value,value:e.value},e.label)}))),"ruleTemplate"===E?i.default.createElement(v.default,(0,u.default)({ref:_},e)):i.default.createElement(g.default,(0,u.default)({ref:_},e))))};E.contextTypes={registerSubRoute:c.default.func,resetSubRoute:c.default.func};var b=E;a.default=b},function(e,t,a){e.exports={AddRuleContainer:"WpgwYfFtGYQ9bOabv902A",AddForm:"xiV4clfTcv89q6y8rXZlp"}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(10),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(10);var l=n(a(315)),u=n(a(96)),o=r(a(0)),i=n(a(26)),c=n(a(2079)),s=n(a(2092)),f=function(e,t){var a=e.editRule,r=(0,i.default)(a,"exprBuilder",{node:{}}),n=(0,o.useState)(Object.keys(r)[0]),f=(0,u.default)(n,2),d=f[0],p=f[1],m=(0,o.useRef)(),h=(0,o.useRef)();return(0,o.useImperativeHandle)(t,(function(){return{target:"node"===d?m.current.target:h.current.target}})),"node"===d?o.default.createElement(c.default,(0,l.default)({ref:m,exprBuilderTypeChange:p},e)):o.default.createElement(s.default,(0,l.default)({ref:h,exprBuilderTypeChange:p},e))},d=(0,o.forwardRef)(f);t.default=d},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(11),r(31),r(6),r(97),r(16),r(98),r(10),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(5),r(11),r(31),r(6),r(97),r(16),r(98),r(10),r(4),r(7);var u=l(r(96)),o=n(r(0)),i=r(186),c=l(r(26)),s=l(r(63)),f=l(r(247)),d=l(r(855)),p=l(r(447)),m=l(r(158)),h=l(r(1481)),v=l(r(1482)),g=l(r(2087)),y=l(r(995)),E=i.Tabs.TabPanel,b=function(e,a){var r=e.editRule,n=e.exprBuilderTypeChange,l=(0,o.useState)("node"),b=(0,u.default)(l,1)[0],_=(0,o.useState)((function(){return(0,c.default)(r,"clusterSelector.inValues",[])})),O=(0,u.default)(_,1)[0],S=(0,o.useCallback)((function(e,t){return!!r.exprBuilder?(0,c.default)(r,e,t):t}),[r]),C=(0,o.useState)((function(){var e="node";if(!(0,s.default)(r)&&r.exprBuilder){var t=r.exprBuilder;e=Object.keys(t)[0]}var a="node"!==e;return{alert:S("alert",""),annotations:{summary:S("annotations.summary",""),message:S("annotations.message","")},clusterSelector:{inValues:S("clusterSelector.inValues",[])},exprBuilder:{node:{names:a?[{cluster:"",names:[]}]:S("exprBuilder.node.names",[{cluster:"",names:[]}]),comparator:S("exprBuilder.node.comparator",">"),metricThreshold:a?{}:S("exprBuilder.node.metricThreshold",{}),for:S("for","1m"),severity:S("severity","critical")}},disable:S("disable",!1),labels:(0,c.default)(r,"labels")}})),D=(0,u.default)(C,1)[0],k=(0,o.useRef)();(0,o.useImperativeHandle)(a,(function(){return{target:k.current}}));var N=function(e,a,r){if(!a)return r();if((0,s.default)(a.comparator))return r({message:t("OPERATOR_REQUIRED"),field:e.field});if((0,s.default)(a.metricThreshold))return r({message:t("THRESHOLD_REQUIRED"),field:e.field});var n=Object.keys(a.metricThreshold)[0],l=Object.keys(a.metricThreshold[n])[0],u=a.metricThreshold[n][l];return""===u||!u||(0,m.default)(u)?r({message:t("THRESHOLD_REQUIRED"),field:e.field}):(0,p.default)(u,".")?r({message:t("THRESHOLD_INVALID"),field:e.field}):void r()},T=function(a,r,n){var l=(0,d.default)(r.filter((function(e){return""!==e&&""!==e.cluster})),(function(e){return e.cluster}));return Object.entries(l).some((function(e){var t=(0,u.default)(e,2)[1],a=[];return t.forEach((function(e){a=a.concat(e.names)})),(0,f.default)(a).length!==a.length}))?n({message:t("NODE_TARGET_REPEAT")}):(r.forEach((function(a){return""===a?n({message:t("MONITOR_TARGET_EMPTY")}):""===a.cluster?n({message:t("CLUSTER_FIELD_EMPTY")}):e.allClusters.find((function(e){return e.name===a.cluster}))?(0,s.default)(a.names)?n({message:t("SELECT_A_TARGET_NODE")}):void 0:n({message:t("MONITOR_TARGET_CLUSTER_DELETED_DESC")})})),n())};return o.default.createElement(i.Form,{data:D,ref:k},o.default.createElement("div",{className:h.default.label},t("RULE_SETTINGS")),o.default.createElement("div",{className:h.default.contentGroup},o.default.createElement(i.Form.Item,{label:t("RULE_NAME"),desc:t("CUSTOM_RULE_NAME_DESC"),rules:[{required:!0,message:t("RULE_NAME_REQUIRED")}]},o.default.createElement(i.Input,{name:"alert",maxLength:63})),o.default.createElement("div",{className:h.default.tabs},o.default.createElement(i.Tabs,{type:"button",activeName:b,onChange:function(e){return n(e)}},o.default.createElement(E,{label:t("NODE"),name:"node"}),o.default.createElement(E,{label:t("WORKLOAD"),name:"workload"}))),o.default.createElement(i.Form.Item,{label:t("MONITORING_TARGETS"),rules:[{required:!0,message:t("MONITOR_TARGET_EMPTY")},{validator:T}]},o.default.createElement(v.default,{monitorLevel:"node",resourceType:"node",name:"exprBuilder.node.names",clusterTargets:O,allClusters:e.allClusters})),o.default.createElement(i.Form.Item,{label:t("TRIGGER_CONDITION"),rules:[{required:!0,message:t("SET_ACTIVATION_CONDITION_DESC")},{validator:N}]},o.default.createElement(g.default,{resourceType:"node",name:"exprBuilder.node"}))),o.default.createElement(y.default,null),o.default.createElement("div",{className:h.default.label},t("MESSAGE_SETTINGS")),o.default.createElement("div",{className:h.default.contentGroup},o.default.createElement(i.Form.Item,{className:h.default.message,label:t("MESSAGE_SUMMARY"),desc:t("MESSAGE_SUMMARY_DESC"),rules:[{required:!0,message:t("MESSAGE_REQUIRED")}]},o.default.createElement(i.Input,{name:"annotations.summary",maxLength:63})),o.default.createElement(i.Form.Item,{className:h.default.message,label:t("MESSAGE_DETAILS"),desc:t("MESSAGE_DETAILS_DESC")},o.default.createElement(i.TextArea,{name:"annotations.message",maxLength:256}))))},_=(0,o.forwardRef)(b);a.default=_},function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(5),a(11),a(6),a(18),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var l=n(a(30)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51)),f=r(a(0)),d=n(a(829)),p=n(a(439)),m=n(a(189)),h=n(a(2082)),v=n(a(1484));function g(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function y(e){for(var t=1;t0)},e.fetchNsList=function(t){var a=t.cluster,r=t.workspace;return e.store.fetchList({cluster:a,workspace:r,labelSelector:"kubefed.io/managed!=true, kubesphere.io/kubefed-host-namespace!=true",limit:-1})},e}return(0,o.default)(a,[{key:"render",value:function(){return f.default.createElement("div",{className:v.default.wrapper},f.default.createElement(d.default,{value:this.props.value.map((function(e,t){return y(y({},e),{},{id:t})})),onChange:this.handleSelectChange,checkItemValid:this.checkItemValid,itemType:"object"},f.default.createElement(h.default,{clusterOptions:this.clusterOptions,fetchNsList:this.fetchNsList,allWorkspace:this.props.allWorkspace,workloadType:this.props.workloadType})))}},{key:"clusterOptions",get:function(){return this.props.allClusters}}]),a}(f.Component);t.default=b},function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(11),a(6),a(28),a(34),a(15),a(9),a(13),a(10),a(4),a(7);var l=n(a(30)),u=n(a(96)),o=r(a(0)),i=a(186),c=n(a(1483));function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function f(e){for(var t=1;ti-30&&(n=t,a=!0)}));var c=t.map((function(e,t){return{label:e,value:e,hide:-1!==n&&t>n}}));r>i-30?(c[n].label="+".concat(t.length-n),w((0,u.default)(c))):w((0,u.default)(c));var s=O.current.selectRef.current.children[0].children[0].children;c.forEach((function(e,t){if(s[t]&&(e.hide||s[t].setAttribute("style","display:inline-block;"),(0,f.default)(e.label,"+"))){var a=v.default.hideIcon;s[t]&&s[t].setAttribute("class","tag tag-default select-multi-value-item ".concat(a))}}))}}),[l]),(0,d.useEffect)((function(){var e=l.cluster,t=void 0===e?"":e,a=l.namespace,r=void 0===a?"":a;""!==t&&""!==r&&r!==j.current&&Promise.all([_.current[b].fetchList({cluster:l.cluster,namespace:l.namespace,limit:-1})]).then((function(e){var t=(0,o.default)(e,1)[0];A(t.map((function(e){return e.name})))})),j.current=l.namespace}),[l,b]);var L=(0,d.useCallback)((function(e){e!==l.cluster&&(k(""),E({cluster:e,namespace:"",names:[]}))}),[l]),x=(0,d.useCallback)((function(e){var t=e.namespace,a=e.workspace;k(a),E({cluster:l.cluster,namespace:t,names:[]})}),[l]),U=(0,d.useCallback)((function(e){E({cluster:l.cluster,namespace:l.namespace,names:e})}),[l]),z=(0,d.useCallback)((function(e){var t=n.filter((function(t){return t.name===e.value}))[0];return e.value?d.default.createElement(d.default.Fragment,null,d.default.createElement(i.Icon,{name:h.CLUSTER_PROVIDER_ICON[t.provider]||"kubernetes",size:20,type:"light"}),d.default.createElement("span",{className:v.default.optionText},e.label)):null}),[n]),F=(0,d.useCallback)((function(e){if(""===e.value)return d.default.createElement("span",null,e.label);var t=n.filter((function(t){return t.name===e.value}))[0];if(!t)return d.default.createElement(d.default.Fragment,null,d.default.createElement(i.Icon,{name:"question",size:20}),d.default.createElement("span",{className:v.default.optionText},e.label));var a=(0,c.default)(t,"provider",!1)?h.CLUSTER_PROVIDER_ICON[t.provider]:"kubernetes";return d.default.createElement(d.default.Fragment,null,d.default.createElement(i.Icon,{name:a,size:20}),d.default.createElement("span",{className:v.default.optionText},e.label))}),[n]),G=(0,d.useCallback)((function(e){var t=R.filter((function(t){return t.value===e.value}));return t.length>0&&d.default.createElement("span",{className:v.default.nodeLabel},t[0].label)}),[R]);return d.default.createElement("div",{className:v.default.selectItem},d.default.createElement(i.Select,{className:v.default.clusterOpt,value:null!==(a=null===(r=n.filter((function(e){return e.name===l.cluster}))[0])||void 0===r?void 0:r.name)&&void 0!==a?a:l.cluster,options:n.map((function(e){return{label:(0,m.getDomTitle)((0,m.showNameAndAlias)(e.name,"cluster",{},!0,(function(){return(void 0).forceUpdate()}))),value:e.name}})),onChange:L,optionRenderer:z,valueRenderer:F,placeholder:t("CLUSTER")}),d.default.createElement(g.default,{selectedWs:D,value:l.namespace,allWorkspace:e.allWorkspace,fetchNsList:e.fetchNsList,cluster:l.cluster,onChange:x}),d.default.createElement(i.Select,{ref:O,className:v.default.nodeOpt,value:(0,s.default)(l.names)?"":l.names,options:P.map((function(e){return{label:e,value:e}})),valueRenderer:G,onChange:U,placeholder:t("WORKLOAD"),multi:!0}))};a.default=E},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(11),r(31),r(29),r(18),r(97),r(16),r(4),r(22),r(38),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(11),r(31),r(29),r(18),r(97),r(16),r(4),r(22),r(38),r(32);var u=l(r(30)),o=l(r(61)),i=l(r(96)),c=r(186),s=l(r(3)),f=n(r(0)),d=r(52),p=l(r(2084)),m=function(e){var a,r=e.allWorkspace,n=void 0===r?[]:r,l=e.cluster,m=void 0===l?"":l,h=e.selectedWs,v=e.value,g=(0,f.useState)(!1),y=(0,i.default)(g,2),E=y[0],b=y[1],_=(0,f.useState)(h),O=(0,i.default)(_,2),S=O[0],C=O[1],D=(0,f.useState)([]),k=(0,i.default)(D,2),N=k[0],T=k[1],R=(0,f.useState)([]),w=(0,i.default)(R,2),I=w[0],M=w[1],P=(0,f.useState)(!1),A=(0,i.default)(P,2),j=A[0],L=A[1],x=(0,f.useRef)();(0,f.useEffect)((function(){""!==S&&""!==m&&Promise.all([e.fetchNsList({cluster:m,workspace:S})]).then((function(e){var t=(0,i.default)(e,1)[0];L(!1),t.length>0?M(t.map((function(e){return{label:(0,d.getDisplayNameNew)(e),value:e.name}}))):M([])})),m&&v&&!h&&e.fetchNsList({cluster:m}).then((function(e){if(L(!1),e.length>0){var t=e.find((function(e){return e.name===v}));t&&C(t.workspace)}}))}),[S,m]),(0,f.useEffect)((function(){var e=n.filter((function(e){return e.clusters.some((function(e){return e.name===m}))||"system-workspace"===e.name}));T((0,o.default)(e))}),[m,n]),(0,f.useEffect)((function(){var e=function(e){var t=e.target,a=x.current;a&&!a.contains(t)&&b(!1)};return document.addEventListener("click",e),function(){return document.removeEventListener("click",e)}}),[]);var U=(0,f.useCallback)((function(){b(!E)}),[]);return f.default.createElement("div",{className:p.default.selectBox,ref:x},f.default.createElement("div",{className:(0,s.default)("select-control",p.default.innerBox),onClick:U},f.default.createElement("input",{readOnly:!0,autoComplete:"off",placeholder:t("PROJECT"),value:(null===(a=I.find((function(e){return e.value===v})))||void 0===a?void 0:a.label)||""}),f.default.createElement("div",{className:(0,s.default)((0,u.default)({},p.default.iconRotate,E))},f.default.createElement(c.Icon,{name:"chevron-down",size:16}))),f.default.createElement("div",{className:(0,s.default)(p.default.options,(0,u.default)({},p.default.show,E))},f.default.createElement("ul",null,N.map((function(e){return f.default.createElement("li",{className:(0,s.default)(p.default.ws,(0,u.default)({},p.default.isActive,S===e.name)),key:e.name,onClick:function(){var t;(t=e.name)!==S&&(C(t),L(!0))}},f.default.createElement(c.Icon,{name:"enterprise",color:{primary:"#fff"},size:16}),f.default.createElement("span",{className:p.default.wsName},(0,d.showNameAndAlias)(e.name,"workspace",{},!1,void 0,!0)),f.default.createElement(c.Icon,{name:"chevron-right",color:{primary:"#fff"},size:16}))}))),f.default.createElement("ul",{className:p.default.ListWrapper},""===m?f.default.createElement("div",{className:p.default.loadingBox},t("CLUSTER_FIELD_EMPTY")):j?f.default.createElement("div",{className:p.default.loadingBox},t("LOADING")):I.length<1?f.default.createElement("div",{className:p.default.loadingBox},t("NO_DATA_DESC")):I.map((function(t){return f.default.createElement("li",{key:t.value,className:(0,s.default)(p.default.nsItem,(0,u.default)({},p.default.isActive,v===t.value)),onClick:function(){return(a=t.value)!==v&&e.onChange({namespace:a,workspace:S}),void b(!1);var a}},(0,d.getDomTitle)(t.label))})))))};a.default=m},function(e,t,a){e.exports={selectBox:"_2HZWNNmjenFUgAAucLbTvP",innerBox:"_2W7W_pAH828HoNZ29CUlyv",placeholder:"_89eAxB9DH2UN7qcx12dIk",options:"l1crorAaNjCxL9hdrnMS8",ws:"_1LPbr6qwuZqa4UWJ73i5OL",wsName:"_2cyzMAYZEd4fSRzsGJKkvS",isActive:"_3dQHRBXMOnHdo4MY-xqfxj",ListWrapper:"_3_0Sw2Pq9JisypKNfYCm-V",nsItem:"_31EvXA_mmdBOpZaFB_ICVg",loadingBox:"_32e-dGX3Y1qlexnPJPK1hp",show:"_34BZ8bF4uqtVdZ-P3nbaV8",iconRotate:"_3LfZXCNHbyBVhN9KdOAUjs"}},function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(5),a(11),a(6),a(18),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var l=n(a(30)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51)),f=r(a(0)),d=n(a(829)),p=n(a(189)),m=n(a(2086)),h=n(a(1485));function v(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function g(e){for(var t=1;t0)},e}return(0,o.default)(a,[{key:"render",value:function(){return f.default.createElement("div",{className:h.default.wrapper},f.default.createElement(d.default,{value:this.props.value.map((function(e,t){return g(g({},e),{},{id:t})})),onChange:this.handleSelectChange,checkItemValid:this.checkItemValid},f.default.createElement(m.default,{clusterOptions:this.clusterOptions})))}},{key:"clusterOptions",get:function(){return this.props.allClusters}}]),a}(f.Component);t.default=E},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(11),r(6),r(29),r(18),r(16),r(4),r(22),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(11),r(6),r(29),r(18),r(16),r(4),r(22),r(38),r(7),r(32);var u=n(r(61)),o=n(r(96)),i=r(186),c=n(r(3)),s=n(r(800)),f=n(r(26)),d=n(r(63)),p=n(r(1152)),m=l(r(0)),h=n(r(856)),v=r(52),g=r(72),y=n(r(1485));function E(e,t){var a=(E.canvas||(E.canvas=document.createElement("canvas"))).getContext("2d");return a.font=t,a.measureText(e).width}var b=function(e){var a,r,n,l=e.clusterOptions,b=e.value,_=e.onChange,O=(0,m.useRef)(new h.default),S=(0,m.useState)([]),C=(0,o.default)(S,2),D=C[0],k=C[1],N=(0,m.useState)(null!==(a=null==b?void 0:b.names)&&void 0!==a?a:[]),T=(0,o.default)(N,2),R=T[0],w=T[1],I=(0,m.useRef)(),M=(0,m.useState)([]),P=(0,o.default)(M,2),A=P[0],j=P[1];(0,m.useEffect)((function(){var e=b.cluster,t=void 0===e?"":e;""!==t&&Promise.all([O.current.fetchList({limit:-1,cluster:t})]).then((function(e){var t=(0,o.default)(e,1)[0];k(t)}))}),[b.cluster]),(0,m.useEffect)((function(){if(!(R.length<1)){var e=!1,t=0,a=-1,r=I.current.selectRef.current.children[0].children[0].children,n=r[r.length-1].offsetParent.offsetWidth;R.forEach((function(r,l){t+=E(r,"12px PingFang SC")+36,!e&&t>n&&(a=l,e=!0)}));var l=R.map((function(e,t){return{label:e,value:e,hide:-1!==a&&t>a}}));t>n?(l[a].label="+".concat(R.length-a),j((0,u.default)(l))):j((0,u.default)(l))}}),[R]),(0,m.useEffect)((function(){var e=I.current.selectRef.current.children[0].children[0].children;A.forEach((function(t,a){if(e[a]&&(t.hide||e[a].setAttribute("style","display:inline-block;"),(0,p.default)(t.label,"+"))){var r=y.default.hideIcon;e[a].setAttribute("class","tag tag-default select-multi-value-item ".concat(r))}}))}),[A]);var L=(0,m.useCallback)((0,s.default)((function(e){w([]),_({cluster:e,names:[]})}),1e3)),x=(0,m.useCallback)((function(e){w(e),_({cluster:b.cluster,names:e})})),U=(0,m.useCallback)((function(e){var t=l.filter((function(t){return t.name===e.value}))[0];return e.value?m.default.createElement(m.default.Fragment,null,m.default.createElement(i.Icon,{name:g.CLUSTER_PROVIDER_ICON[t.provider]||"kubernetes",size:20,type:"light"}),m.default.createElement("span",{className:y.default.optionText},e.label)):null}),[l]),z=(0,m.useCallback)((function(e){if(""===e.value)return m.default.createElement("span",null,e.label);var t=l.filter((function(t){return t.name===e.value}))[0];if(!t)return m.default.createElement(m.default.Fragment,null,m.default.createElement(i.Icon,{name:"question",size:20}),m.default.createElement("span",{className:y.default.optionText},e.label));var a=(0,f.default)(t,"provider",!1)?g.CLUSTER_PROVIDER_ICON[t.provider]:"kubernetes";return m.default.createElement(m.default.Fragment,null,m.default.createElement(i.Icon,{name:a,size:20}),m.default.createElement("span",{className:y.default.optionText},e.label))}),[l]);return m.default.createElement("div",{className:y.default.selectItem},m.default.createElement(i.Select,{className:y.default.clusterOpt,value:null!==(r=null===(n=l.filter((function(e){return e.name===b.cluster}))[0])||void 0===n?void 0:n.name)&&void 0!==r?r:b.cluster,options:l.map((function(e){return{label:(0,v.getDomTitle)((0,v.showNameAndAlias)(e.name,"cluster",{},!0,(function(){return(void 0).forceUpdate()}))),value:e.name}})),onChange:L,optionRenderer:U,valueRenderer:z,placeholder:t("CLUSTER")}),m.default.createElement(i.Select,{ref:I,className:(0,c.default)(y.default.nodeOpt),value:(0,d.default)(R)?"":R,options:D.map((function(e){return{label:e.name,value:e.name}})),valueRenderer:function(e){var t=A.filter((function(t){return t.value===e.value}));return t.length>0&&m.default.createElement("span",{className:y.default.nodeLabel},t[0].label)},onChange:x,multi:!0,placeholder:t("NODE")}))};a.default=b},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(18),r(97),r(16),r(27),r(98),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(64),r(136),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(96)),u=n(r(315)),o=n(r(58)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51));r(12),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(97),r(42),r(16),r(27),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(64),r(7);var m=n(r(0)),h=n(r(1)),v=n(r(3)),g=n(r(76)),y=n(r(26)),E=n(r(135)),b=n(r(63)),_=n(r(447)),O=r(186),S=n(r(799)),C=r(923),D=r(993),k=n(r(1028)),N=n(r(2090));function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){var a=e.prefixIcon,r=e.color,n=e.type,l=e.label,u=e.value,o=e.disabled,i={label:t(l,{value:u}),value:u};return a&&(i.label=m.default.createElement("div",{className:(0,v.default)(N.default.optionLabel,N.default[n])},m.default.createElement(O.Icon,{name:a,size:20,color:r}),i.label)),o&&(i.disabled=o),i}))},n.handleMetricTypeChange=function(e){var t=e.split(":")[0],a=e.split(":")[1],r=n.state,l=r.comparator,u=r.severity,o=r.duration;n.setState({metricType:e,nodeResourceType:t,monitorType:a,thresholds:""},(function(){n.props.onChange({names:n.props.value.names,metricThreshold:(0,i.default)({},t,(0,i.default)({},a,"")),comparator:l,severity:u,for:o})}))},n.handleItemChange=function(e,t){return function(a,r){var l=n.props.onChange,u=(0,g.default)(r)||!r?a:r;"thresholds"===e&&(u=""!==(u=String(u).replace(/([a-zA-Z%/])+$/g,""))?(0,_.default)(u,".")?u:t(Number(u)):""),n.setState((0,i.default)({},e,u),(function(){var t=n.state,a=t.nodeResourceType,r=t.monitorType,o=t.comparator,c=t.duration,s=t.severity,f=(0,y.default)(n.props.value,"metricThreshold.".concat(a,".").concat(r));l({names:n.props.value.names,metricThreshold:(0,i.default)({},a,(0,i.default)({},r,"thresholds"===e?u:f)),comparator:"comparator"===e?u:o,for:c,severity:s})}))}},n.handleDurationChange=function(e){var t=n.state,a=t.severity,r=t.nodeResourceType,l=t.monitorType,u=t.comparator,o=(0,y.default)(n.props.value,"metricThreshold.".concat(r,".").concat(l));n.setState({duration:e},(function(){n.props.onChange({names:n.props.value.names,metricThreshold:(0,i.default)({},r,(0,i.default)({},l,o)),for:e,severity:a,comparator:u})}))},n.handleSeverityChange=function(e){var t=n.state,a=t.duration,r=t.nodeResourceType,l=t.monitorType,u=t.comparator,o=(0,y.default)(n.props.value,"metricThreshold.".concat(r,".").concat(l));n.setState({severity:e},(function(){n.props.onChange({names:n.props.value.names,metricThreshold:(0,i.default)({},r,(0,i.default)({},l,o)),for:a,comparator:u,severity:e})}))},n.renderConfigItem=function(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.props.value,l=n.state,i=l.nodeResourceType,c=l.monitorType,s=a.type,f=a.name,d=a.placeholder,p=a.options,h=void 0===p?[]:p,v=a.reverser,g=a.converter,E=(0,o.default)(a,["type","name","placeholder","options","reverser","converter"]);if(v){var b=(0,y.default)(r,"metricThreshold.".concat(i,".").concat(c),"");e=""!==b?(0,_.default)(b,".")?b:v(Number(b)):""}var C={key:f,className:N.default[f],placeholder:t(d),value:"comparator"===f?n.state.comparator:e,onChange:n.handleItemChange(f,g)};switch(s){default:case"select":var D=n.getSelectOptions(h);return m.default.createElement(O.Select,(0,u.default)({options:D},C,E));case"number":return m.default.createElement(S.default,(0,u.default)({showUnit:!0},C,E,{integer:!1}))}},n.state=R(R({metricType:n.getMetricType(e)},n.getStateFromProps(e)),{},{metricOps:n.getSelectOptions(n.metricConfig)}),n}return(0,s.default)(r,[{key:"render",value:function(){var e=this.state,a=e.metricType,r=e.duration,n=e.severity,l=this.ruleConfig;return m.default.createElement("div",{className:N.default.inputs},m.default.createElement("div",{className:N.default.type},m.default.createElement(O.Select,{options:this.state.metricOps,value:a,onChange:this.handleMetricTypeChange})),l.map(this.renderConfigItem),m.default.createElement(O.Select,{value:r,className:N.default.normalSelect,options:I,onChange:this.handleDurationChange,placeholder:t("DURATION")}),m.default.createElement(k.default,{value:n,className:N.default.normalSelect,options:this.alertingTypeOptions,onChange:this.handleSeverityChange,placeholder:t("SEVERITY")}))}},{key:"resourceMetricsConfig",get:function(){return(0,E.default)(C.RESOURCE_METRICS_CONFIG.node)||{}}},{key:"alertingTypeOptions",get:function(){return D.severityOptions.map((function(e){return{label:e.label,value:e.value}}))}},{key:"metricConfig",get:function(){var e=this.resourceMetricsConfig;return Object.entries(e).map((function(e){var t=(0,l.default)(e,2);return R({value:t[0]},t[1])}))}},{key:"selectMetricConfig",get:function(){var e=this.state.metricType;return this.metricConfig.find((function(t){return t.value===e}))}},{key:"ruleConfig",get:function(){return(0,y.default)(this.selectMetricConfig,"ruleConfig")||[]}}]),r}(m.default.Component);M.propTypes={metricConfig:h.default.array,value:h.default.object,onChange:h.default.func},M.defaultProps={metricConfig:[],value:{},onChange:function(){}};var P=M;a.default=P},function(e,t,a){e.exports={withUnit:"_2d32hkfOO3cYnvAM-MUswq",unit:"_29q45C0afPynal54hwpQfk",buttonWrapper:"Xtv_UB0AENviuvA8Y0gqH",iconUp:"_3YXrySn0XAnhuGzYYrXWeS",iconDown:"_3MtBoqy8WlB29Jb0N9EU1X"}},function(e,t,a){e.exports={critical:"_28huuzFgXrJ6A5awxlLmo3",error:"_2bY9jX-FcyeLAsVRSTadc4",warning:"_38IIdf4HUwM0dVDJZueSYQ",info:"_28OI9ApLFda1TO7f4ri8Bu"}},function(e,t,a){e.exports={inputs:"_1yVUajtAef8AhyQtZ2UGfF",type:"rVNaKjX5dXQGjZ6T7OuFi",comparator:"_1yPrzflD49gPjizoYXpqaa",thresholds:"_28w2cWTwatHJT2puBGeAGe",normalSelect:"_2xhhjqI0Rhdg-vrU4jjwWs",optionLabel:"_1XLcPFr1dFfIXq9BiAT512",slider:"_3FGbsXervaDG5M0e7nQhO7",condition_type:"_25t0zn0luRkHFmHakj0RD_"}},function(e,t,a){e.exports={label:"OTDgTwIj2gmBcD0BMGmC6",contentGroup:"_3nfVSV6R6UI-KMSyFNGODe",inline:"_3iClSviv5wuM7iCH0ta61O",tabs:"_32qgHgW_mbXFffugytUxdz"}},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(11),r(31),r(6),r(18),r(97),r(16),r(98),r(9),r(13),r(10),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(11),r(31),r(6),r(18),r(28),r(97),r(16),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(7);var u=l(r(30)),o=l(r(96)),i=n(r(0)),c=r(186),s=l(r(26)),f=l(r(63)),d=l(r(247)),p=l(r(855)),m=l(r(135)),h=l(r(74)),v=l(r(447)),g=l(r(158)),y=l(r(2093)),E=l(r(1482)),b=l(r(2094)),_=l(r(1481)),O=l(r(995));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t"),for:A("for","1m"),severity:A("severity","critical")}},disable:A("disable",!1),labels:(0,s.default)(r,"labels")}})),L=(0,o.default)(j,2),x=L[0],U=L[1],z=(0,i.useRef)();(0,i.useImperativeHandle)(a,(function(){return{target:z.current}}));return i.default.createElement("div",null,i.default.createElement(c.Form,{data:x,ref:z,key:"workload"},i.default.createElement("div",{className:_.default.label},t("RULE_SETTINGS")),i.default.createElement("div",{className:_.default.contentGroup},i.default.createElement(c.Form.Item,{label:t("RULE_NAME"),desc:t("CUSTOM_RULE_NAME_DESC"),rules:[{required:!0,message:t("RULE_NAME_REQUIRED")}]},i.default.createElement(c.Input,{name:"alert",maxLength:63})),i.default.createElement("div",{className:_.default.tabs},i.default.createElement(c.Tabs,{type:"button",activeName:u,onChange:function(e){return n(e)}},i.default.createElement(D,{label:t("NODE"),name:"node"}),i.default.createElement(D,{label:t("WORKLOAD"),name:"workload"}))),i.default.createElement(c.Form.Item,{label:t("RESOURCE_TYPE")},i.default.createElement(c.Select,{className:_.default.workloadType,name:"exprBuilder.workload.kind",options:[{label:t("DEPLOYMENT"),value:"Deployment"},{label:t("STATEFULSET"),value:"StatefulSet"},{label:t("DAEMONSET"),value:"DaemonSet"}],onChange:function(e){R(e);var t=(0,m.default)(x);(0,h.default)(t,"exprBuilder.workload.names",[{cluster:"",namespace:"",names:[]}]),U(t)}})),i.default.createElement(c.Form.Item,{label:t("MONITORING_TARGETS"),rules:[{required:!0,message:t("MONITOR_TARGET_EMPTY")},{validator:function(a,r,n){var l=(0,p.default)(r.filter((function(e){return""!==e&&""!==e.namespace})),(function(e){return e.cluster}));return Object.entries(l).some((function(e){var t=(0,o.default)(e,2)[1].map((function(e){return e.namespace}));return(0,d.default)(t).length!==t.length}))?n({message:t("NAME_SPACE_REPEAT")}):(r.filter((function(e){return""!==e})).forEach((function(a){return""===a.cluster?n({message:t("CLUSTER_FIELD_EMPTY")}):e.allClusters.find((function(e){return e.name===a.cluster}))?""===a.namespace?n({message:t("SET_NAMESPACE_BELONGS_TO")}):(0,f.default)(a.names)?n({message:t("MONITOR_TARGET_EMPTY")}):void 0:n({message:t("MONITOR_TARGET_CLUSTER_DELETED_DESC")})})),n())}}]},i.default.createElement(E.default,{monitorLevel:"workload",workloadType:T,name:"exprBuilder.workload.names",clusterTargets:I,allClusters:e.allClusters,allWorkspace:P,handleChangeNs:function(e){var t=e.filter((function(e){return""!==e&&""!==e.namespace})).map((function(e){return e.namespace}));U(C(C({},x),{},{namespaceSelector:{inValues:(0,d.default)(t)}}))}})),i.default.createElement(c.Form.Item,{label:t("TRIGGER_CONDITION"),rules:[{required:!0,message:t("SET_ACTIVATION_CONDITION_DESC")},{validator:function(e,a,r){if(!a)return r();if((0,f.default)(a.comparator))return r({message:t("OPERATOR_REQUIRED"),field:e.field});if((0,f.default)(a.metricThreshold))return r({message:t("THRESHOLD_REQUIRED"),field:e.field});var n=Object.keys(a.metricThreshold)[0],l=Object.keys(a.metricThreshold[n])[0],u=a.metricThreshold[n][l];return""===u||!u||(0,g.default)(u)?r({message:t("THRESHOLD_REQUIRED"),field:e.field}):(0,v.default)(u,".")?r({message:t("THRESHOLD_INVALID"),field:e.field}):void r()}}]},i.default.createElement(b.default,{name:"exprBuilder.workload"}))),i.default.createElement(O.default,null),i.default.createElement("div",{className:_.default.label},t("MESSAGE_SETTINGS")),i.default.createElement("div",{className:_.default.contentGroup},i.default.createElement(c.Form.Item,{className:_.default.message,label:t("MESSAGE_SUMMARY"),desc:t("MESSAGE_SUMMARY_DESC"),rules:[{required:!0,message:t("MESSAGE_REQUIRED")}]},i.default.createElement(c.Input,{name:"annotations.summary",maxLength:63})),i.default.createElement(c.Form.Item,{className:_.default.message,label:t("MESSAGE_DETAILS"),desc:t("MESSAGE_DETAILS_DESC")},i.default.createElement(c.TextArea,{name:"annotations.message",maxLength:256})))))},T=(0,i.forwardRef)(N);a.default=T},function(e,t,a){"use strict";a(15);var r=a(20);a(29),a(18),a(16),a(4),a(22),a(38),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(29),a(18),a(16),a(4),a(22),a(38),a(32);var n=r(a(96)),l=a(0),u=r(a(445)),o=function(){var e=(0,l.useRef)(new u.default),t=(0,l.useState)([]),a=(0,n.default)(t,2),r=a[0],o=a[1];return(0,l.useEffect)((function(){Promise.all([e.current.fetchList({limit:-1})]).then((function(e){var t=(0,n.default)(e,1)[0].map((function(e){return{name:e.name,clusters:e.clusters}}));o(t)}))}),[]),[r]};t.default=o},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(18),r(97),r(16),r(27),r(98),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(64),r(136),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(96)),u=n(r(315)),o=n(r(58)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51));r(12),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(97),r(42),r(16),r(27),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(64),r(7);var m=n(r(0)),h=n(r(1)),v=n(r(3)),g=n(r(76)),y=n(r(26)),E=n(r(135)),b=n(r(63)),_=n(r(447)),O=r(186),S=n(r(799)),C=r(923),D=n(r(1028)),k=r(993),N=n(r(2095));function T(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){var a=e.prefixIcon,r=e.color,n=e.type,l=e.label,u=e.value,o=e.disabled,i={label:t(l,{value:u}),value:u};return a&&(i.label=m.default.createElement("div",{className:(0,v.default)(N.default.optionLabel,N.default[n])},m.default.createElement(O.Icon,{name:a,size:20,color:r}),i.label)),o&&(i.disabled=o),i}))},n.handleMetricTypeChange=function(e){var t=e.split(":")[0],a=e.split(":")[1],r=n.state,l=r.comparator,u=r.severity,o=r.duration;n.setState({metricType:e,nodeResourceType:t,monitorType:a,thresholds:""},(function(){n.props.onChange({names:n.props.value.names,metricThreshold:(0,i.default)({},t,(0,i.default)({},a,"")),kind:n.props.value.kind,comparator:l,severity:u,for:o})}))},n.handleItemChange=function(e,t){return function(a,r){var l=n.props.onChange,u=(0,g.default)(r)||!r?a:r;"thresholds"===e&&(u=""!==(u=String(u).replace(/([a-zA-Z%/])+$/g,""))?(0,_.default)(u,".")?u:t(Number(u)):""),n.setState((0,i.default)({},e,u),(function(){var t=n.state,a=t.nodeResourceType,r=t.monitorType,o=t.comparator,c=t.duration,s=t.severity,f=(0,y.default)(n.props.value,"metricThreshold.".concat(a,".").concat(r));l({names:n.props.value.names,metricThreshold:(0,i.default)({},a,(0,i.default)({},r,"comparator"===e?f:u)),comparator:"comparator"===e?u:o,for:c,kind:n.props.value.kind,severity:s})}))}},n.handleDurationChange=function(e){var t=n.state,a=t.severity,r=t.nodeResourceType,l=t.monitorType,u=t.comparator,o=(0,y.default)(n.props.value,"metricThreshold.".concat(r,".").concat(l));n.setState({duration:e},(function(){n.props.onChange({names:n.props.value.names,metricThreshold:(0,i.default)({},r,(0,i.default)({},l,o)),kind:n.props.value.kind,for:e,severity:a,comparator:u})}))},n.handleSeverityChange=function(e){var t=n.state,a=t.duration,r=t.nodeResourceType,l=t.monitorType,u=t.comparator,o=(0,y.default)(n.props.value,"metricThreshold.".concat(r,".").concat(l));n.setState({severity:e},(function(){n.props.onChange({names:n.props.value.names,metricThreshold:(0,i.default)({},r,(0,i.default)({},l,o)),kind:n.props.value.kind,for:a,comparator:u,severity:e})}))},n.renderConfigItem=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=n.props.value,r=n.state,l=r.nodeResourceType,i=r.monitorType,c=t.type,s=t.name,f=(t.placeholder,t.options),d=void 0===f?[]:f,p=t.reverser,h=t.converter,v=(0,o.default)(t,["type","name","placeholder","options","reverser","converter"]);if(p){var g=(0,y.default)(a,"metricThreshold.".concat(l,".").concat(i),"");e=""!==g?(0,_.default)(g,".")?g:p(Number(g)):""}var E={key:s,className:N.default[s],value:"comparator"===s?n.state.comparator:e,onChange:n.handleItemChange(s,h)};switch(c){default:case"select":var b=n.getSelectOptions(d);return m.default.createElement(O.Select,(0,u.default)({options:b},E,v));case"number":return m.default.createElement(S.default,(0,u.default)({showUnit:!0},E,v,{integer:!1}))}},n.state=R(R({metricType:n.getMetricType(e)},n.getStateFromProps(e)),{},{metricOps:n.getSelectOptions(n.metricConfig)}),n}return(0,s.default)(r,[{key:"render",value:function(){var e=this.state,a=e.metricType,r=e.duration,n=e.severity,l=this.ruleConfig;return m.default.createElement("div",{className:N.default.inputs},m.default.createElement("div",{className:N.default.type},m.default.createElement(O.Select,{options:this.state.metricOps,value:a,onChange:this.handleMetricTypeChange})),l.map(this.renderConfigItem),m.default.createElement(O.Select,{className:N.default.normalSelect,value:r,options:I,onChange:this.handleDurationChange,placeholder:t("DURATION")}),m.default.createElement(D.default,{className:N.default.normalSelect,value:n,options:M,onChange:this.handleSeverityChange,placeholder:t("SEVERITY")}))}},{key:"resourceMetricsConfig",get:function(){return(0,E.default)(C.RESOURCE_METRICS_CONFIG.workload)||{}}},{key:"metricConfig",get:function(){var e=this.resourceMetricsConfig;return Object.entries(e).map((function(e){var t=(0,l.default)(e,2);return R({value:t[0]},t[1])}))}},{key:"selectMetricConfig",get:function(){var e=this.state.metricType;return this.metricConfig.find((function(t){return t.value===e}))}},{key:"ruleConfig",get:function(){return(0,y.default)(this.selectMetricConfig,"ruleConfig")||[]}}]),r}(m.default.Component);P.propTypes={metricConfig:h.default.array,value:h.default.object,onChange:h.default.func},P.defaultProps={metricConfig:[],value:{},onChange:function(){}};var A=P;a.default=A},function(e,t,a){e.exports={inputs:"_22dSEjReyNtRAovrRqwepd",type:"_1qKnJhTbQ9P1K8b5C7isFh",comparator:"_2934urzRpfiaiE2H1aYeKn",thresholds:"_3KU0ZSAcGoucHIrPp4tB74",normalSelect:"_3_DRDDTACzLkLCwuHgq14h",optionLabel:"khN9msWTcWOcL2-iNjmnk",slider:"_8373eD5TRR5yoHsXbknSr",condition_type:"_2XU1Q-On54b6cNM-_2iKc4"}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=n(a(315)),u=r(a(0)),o=n(a(2097)),i=function(e,t){var a=(0,u.useRef)();return(0,u.useImperativeHandle)(t,(function(){return{target:a.current.target}})),u.default.createElement(o.default,(0,l.default)({ref:a},e))},c=(0,u.forwardRef)(i);t.default=c},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(48),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(48),r(24),r(193);var u=l(r(96)),o=n(r(0)),i=r(186),c=l(r(26)),s=l(r(3)),f=r(52),d=l(r(1081)),p=l(r(2099)),m=l(r(2109)),h=l(r(2121)),v=r(993),g=l(r(995)),y=l(r(1028)),E=function(e,a){var r=e.editRule,n=(0,o.useRef)();(0,o.useImperativeHandle)(a,(function(){return{target:n.current}}));var l=(0,o.useState)((function(){return{alert:(0,c.default)(r,"alert",""),annotations:{summary:(0,c.default)(r,"annotations.summary",""),message:(0,c.default)(r,"annotations.message","")},clusterSelector:{inValues:(0,c.default)(r,"clusterSelector.inValues",[])},for:(0,c.default)(r,"for",""),expr:(0,c.default)(r,"expr",""),severity:(0,c.default)(r,"severity","critical"),disable:(0,c.default)(r,"disable",!1),labels:(0,c.default)(r,"labels")}})),E=(0,u.default)(l,1)[0],b=(0,o.useCallback)((function(e,a,r){var n=a.slice(0,-1);if(!/^[0-9]*$/.test(n))return r({message:t("INVALID_TIME_DESC")});r()}),[]),_=(0,o.useCallback)((function(e,a,r){if(!a)return r({message:t("CLUSTER_SETTINGS_LIMIT_DESC")});r()}),[]);return o.default.createElement(i.Form,{data:E,ref:n},o.default.createElement("div",{className:h.default.label},t("CLUSTER_SETTINGS")),o.default.createElement("div",{className:h.default.contentGroup},o.default.createElement("div",null,o.default.createElement(i.Form.Item,{rules:[{validator:_}]},o.default.createElement(m.default,{name:"clusterSelector.inValues",allClusters:e.allClusters,fetchClusterList:e.fetchClusterList})))),o.default.createElement("div",{className:h.default.label},t("RULE_SETTINGS")),o.default.createElement("div",{className:h.default.contentGroup},o.default.createElement(i.Columns,{className:h.default.inline},o.default.createElement(i.Column,null,o.default.createElement(i.Form.Item,{label:t("RULE_NAME"),desc:t("CUSTOM_RULE_NAME_DESC"),rules:[{required:!0,message:t("RULE_NAME_REQUIRED")}]},o.default.createElement(i.Input,{name:"alert",maxLength:63})))),o.default.createElement(i.Columns,{className:h.default.inline},o.default.createElement(i.Column,null,o.default.createElement(i.Form.Item,{label:t("DURATION"),desc:t("ALERT_DURATION"),rules:[{validator:b}]},o.default.createElement(d.default,{name:"for",inputClassName:h.default.duration,unitOptions:v.durationUnitOptions,defaultValue:v.durationUnitOptions[1].value}))),o.default.createElement(i.Column,null,o.default.createElement(i.Form.Item,{label:t("SEVERITY"),rules:[{required:!0,message:t("SEVERITY_REQUIRED")}]},o.default.createElement(y.default,{name:"severity",defaultValue:"critical"})))),o.default.createElement(i.Form.Item,{label:t("RULE_EXPRESSION"),desc:(0,f.learnMoreTip)(t.html("ALERT_RULE_EXPRESSION_DESC")),rules:[{required:!0,message:t("ALERT_RULE_REQUIRED")}]},o.default.createElement(p.default,{name:"expr",store:e.store,cluster:e.cluster}))),o.default.createElement(g.default,null),o.default.createElement("div",{className:h.default.label},t("MESSAGE_SETTINGS")),o.default.createElement("div",{className:(0,s.default)(h.default.contentGroup,h.default.lineContent)},o.default.createElement(i.Form.Item,{label:t("MESSAGE_SUMMARY"),desc:t("MESSAGE_SUMMARY_DESC"),rules:[{required:!0,message:t("MESSAGE_REQUIRED")}]},o.default.createElement(i.Input,{name:"annotations.summary",maxLength:63})),o.default.createElement(i.Form.Item,{label:t("MESSAGE_DETAILS"),desc:t("MESSAGE_DETAILS_DESC")},o.default.createElement(i.TextArea,{name:"annotations.message",maxLength:256}))))},b=(0,o.forwardRef)(E);a.default=b},function(e,t,a){e.exports={box:"_2cba8IQmk8PkrIeuCYMHpS",value:"_8HQz1aKq2aTQNQgiSBLkX",unit:"_1NbuZuw18npuIgdF-lDVT5"}},function(e,t,a){"use strict";a(15);var r=a(20),n=a(157);a(18),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(18),a(42),a(9),a(4),a(23),a(57),a(17);var l,u,o=r(a(315)),i=r(a(36)),c=r(a(37)),s=r(a(55)),f=r(a(56)),d=r(a(51)),p=r(a(49)),m=n(a(0)),h=a(239),v=a(14),g=r(a(1270));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var E=(0,h.observer)((u=function(e){(0,s.default)(a,e);var t=y(a);function a(){return(0,i.default)(this,a),t.apply(this,arguments)}return(0,c.default)(a,[{key:"componentDidMount",value:function(){var e=this.props,t=e.cluster,a=e.namespace;this.hasMonitoring&&this.props.store.fetchMetadata({cluster:t,namespace:a})}},{key:"render",value:function(){return m.default.createElement(g.default,(0,o.default)({},this.props,{supportMetrics:this.supportMetrics}))}},{key:"hasMonitoring",get:function(){var e=this.props.cluster;return globals.app.hasClusterModule(e,"whizard-monitoring")}},{key:"supportMetrics",get:function(){return this.hasMonitoring?this.props.store.targetsMetadata.map((function(e){return{value:e.metric,desc:e.help,type:e.type}})):[]}}]),a}(m.Component),(0,p.default)(u.prototype,"supportMetrics",[v.computed],Object.getOwnPropertyDescriptor(u.prototype,"supportMetrics"),u.prototype),l=u))||l;t.default=E},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(17);var l=n(a(30)),u=n(a(36)),o=n(a(37)),i=n(a(55)),c=n(a(56)),s=n(a(51)),f=r(a(0)),d=n(a(3)),p=a(186),m=n(a(1487)),h=n(a(1271));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=function(e){(0,i.default)(a,e);var t=v(a);function a(){var e;(0,u.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;ln.height/2?e.top=r.top-4-32*(a-1):e.top=r.top-4,e.left=r.left+r.width,window.innerHeight-e.top<252&&(e.maxHeight=window.innerHeight-e.top-8)}}return e}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.level,r=e.isOpen,n=e.onSelect;return t.children?f.default.createElement("div",{ref:this.ref},f.default.createElement("div",{className:(0,d.default)(h.default.item,h.default.hasChildren,(0,l.default)({},h.default.isOpen,r)),onClick:this.handleClick},t.label,f.default.createElement(p.Icon,{name:"chevron-right",type:"light"})),r&&f.default.createElement(m.default,{level:a+1,options:t.children,onSelect:n,style:this.getOptionsStyle()})):f.default.createElement("div",{className:h.default.item,onClick:this.handleSelect},t.label)}}]),a}(f.Component);t.default=g},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(11),r(86),r(18),r(10),r(4),r(23),r(24),r(17),r(188),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var u=l(r(61)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51));r(45),r(5),r(11),r(86),r(18),r(42),r(10),r(4),r(23),r(57),r(24),r(17),r(188);var d=l(r(63)),p=n(r(0)),m=l(r(3)),h=l(r(837)),v=l(r(2102)),g=r(1489),y=l(r(2103)),E=l(r(1490));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var _=function(e){(0,c.default)(r,e);var a=b(r);function r(){var e;(0,o.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l=a.length+r.length+n.length+l.length-1?0:t+1}}),e.scrollToFocus)},e.handleArrowUp=function(){e.setState((function(e){var t=e.focusIndex,a=e.labels,r=e.functions,n=e.metrics,l=e.rateRanges,u=a.length+r.length+n.length+l.length;return{focusIndex:t<=0?u-1:t-1}}),e.scrollToFocus)},e.handleEnter=function(){var t=e.props.onSelect,a=e.state,r=a.focusIndex,n=a.functions,l=a.metrics,o=a.rateRanges,i=a.labels,c=[].concat((0,u.default)(i),(0,u.default)(n),(0,u.default)(l),(0,u.default)(o))[r];c&&t(c.value||c.label)},e.handleKeyDown=function(t){e.keydownHandler[t.keyCode]&&(t.stopPropagation(),t.preventDefault(),e.keydownHandler[t.keyCode](t))},e.scrollToFocus=function(){if(e.wrapper&&e.wrapper.current){var t=e.wrapper.current,a=t.querySelector(".is-focus");if(!a)return;var r=t.scrollTop,n=r+t.offsetHeight,l=a.offsetTop,u=l+a.offsetHeight;(r>l||n-1?o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,r=Object.keys(e);if("{"===t||","===t)return r.map((function(e){return{value:e}}));if(a.label){var n=e[a.label]||[];return"="===t?n.map((function(e){return{value:'"'.concat(e,'"')}})):'""'===t||"''"===t?n.map((function(e){return{value:e}})):n.map((function(e){return'"'.concat(e,'"')})).filter((function(e){return e.indexOf(t)>=0})).map((function(e){return{value:e}}))}return r.filter((function(e){return e.indexOf(t)>=0})).map((function(e){return{value:e}}))}(a,t,r):(n=function(e){return g.FUNCTIONS.filter((function(t){return t.label.indexOf(e)>=0}))}(t),l=this.searchMetrics(t),u=function(e){return"["===e?g.RATE_RANGES:[]}(t)),this.setState({functions:n,metrics:l,rateRanges:u,labels:o})}},{key:"renderList",value:function(e,t){var a=this.props,r=a.value,n=a.onSelect,l=this.state.focusIndex;return(0,d.default)(e)?null:p.default.createElement("div",{className:E.default.group},p.default.createElement("div",{className:E.default.groupTitle},t),p.default.createElement("div",{className:E.default.options},e.map((function(e,t){return p.default.createElement(y.default,{key:e.value||e.label,data:e.value||e.label,inputValue:r,isFocused:l===t,onSelect:n})}))))}},{key:"render",value:function(){var e=this.props.className,a=this.state,r=a.functions,n=a.metrics,l=a.rateRanges,u=a.labels;return(0,d.default)(r)&&(0,d.default)(n)&&(0,d.default)(l)&&(0,d.default)(u)?null:p.default.createElement("div",{className:(0,m.default)(E.default.wrapper,e),ref:this.wrapper},this.renderList(u,t("ALERT_LABELS")),this.renderList(r,t("ALERT_FUNCTIONS")),this.renderList(l,t("ALERT_RATE_RANGES")),this.renderList(n,t("ALERT_METRICS")))}},{key:"keydownHandler",get:function(){return{38:this.handleArrowUp,40:this.handleArrowDown,13:this.handleEnter,14:this.handleEnter}}}]),r}(p.Component);a.default=_},,function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(48),a(4),a(23),a(24),a(17),a(136),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(48),a(42),a(4),a(23),a(57),a(24),a(17),a(136);var l=n(a(36)),u=n(a(37)),o=n(a(55)),i=n(a(56)),c=n(a(51)),s=r(a(0)),f=n(a(3)),d=n(a(1490));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=function(e){(0,o.default)(a,e);var t=p(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;un.length&&s.default.createElement(s.default.Fragment,null,s.default.createElement("span",{className:"highlight"},a),s.default.createElement("span",null,t.slice(n.length+a.length))))}}]),a}(s.Component);t.default=m},,function(e,t,a){},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(28);var n=r(a(36)),l=r(a(37)),u=function(){function e(t){(0,n.default)(this,e),this.data=[],this.maxLength=50,this.cursor=0,isNaN(t)||(this.maxLength=t)}return(0,l.default)(e,[{key:"push",value:function(e){this.data.length>=this.maxLength&&this.data.shift(),this.data.push(e),this.cursor=0}},{key:"undo",value:function(){return this.cursor0&&(this.cursor-=1),this.data[this.data.length-1-this.cursor]}}]),e}();t.default=u},function(e,t,a){e.exports={wrapper:"_2Djs149fKvXq0cuQnoPLWv",input:"_3r2beirvrZ6qtbzzlFsRsd",suggestions:"Q7oMYSMcW984KaLwUtxe0"}},function(e,t,a){e.exports={wrapper:"_1w-rN95sN7ztXIW47qpxDr",trigger:"_3RKOgK42gRQ35DXoTa7VUE",input:"_1_1MeGWNh944JJ0DAi3osN",debug:"_3Ftx4Zx_7HgfhQ47jLEOEi"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(11),r(31),r(6),r(200),r(86),r(29),r(18),r(16),r(326),r(4),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(11),r(31),r(6),r(200),r(86),r(29),r(18),r(16),r(326),r(4),r(38),r(7),r(32);var u=l(r(96)),o=n(r(0)),i=r(186),c=l(r(63)),s=l(r(814)),f=l(r(790)),d=r(924),p=l(r(3)),m=l(r(2119)),h=l(r(2120)),v=function(e){var a=(0,o.useState)(""),r=(0,u.default)(a,2),n=r[0],l=r[1],v=(0,o.useState)([]),g=(0,u.default)(v,2),y=g[0],E=g[1],b=(0,m.default)(),_=(0,u.default)(b,1)[0],O=(0,o.useState)(new Map),S=(0,u.default)(O,2),C=S[0],D=S[1],k=(0,o.useState)(!1),N=(0,u.default)(k,2),T=N[0],R=N[1];(0,o.useEffect)((function(){var t=new Map,a=e.value;e.allClusters.forEach((function(e){(-1!==a.indexOf(e.name)||(0,c.default)(a))&&t.set(e.name,e)})),D(t),R(t.size===e.allClusters.length),E(e.allClusters)}),[]),(0,o.useEffect)((function(){e.fetchClusterList({name:n,limit:-1})}),[n]);var w=function(t,a){var r=Array.from(t.values()).map((function(e){return e.name})),n=e.onChange;n(a?[]:(0,c.default)(r)?void 0:r)},I=function(e){return o.default.createElement("ul",{className:(0,p.default)(h.default.clusterList,h.default.longList)},e.map((function(e){return o.default.createElement("li",{className:h.default.cluster,key:e.uid},o.default.createElement(i.Columns,{className:h.default.inline},o.default.createElement(i.Column,{className:(0,p.default)("is-6",h.default.left)},o.default.createElement(i.Checkbox,{className:h.default.checkBox,checked:C.has(e.name),onChange:function(){return function(e){if(C.has(e.name))C.delete(e.name),D(new Map(C)),R(!1),w(C,!1);else{var t=new Map(C.set(e.name,e)),a=t.size===y.length;D(t),R(a),w(t,a)}}(e)}}),o.default.createElement(s.default,{className:"flex",cluster:e})),o.default.createElement(i.Column,{className:"is-6"},o.default.createElement(f.default,{title:o.default.createElement(d.ClusterTagGroup,{data:e.tags.map((function(e){return(_||[]).find((function(t){return e.name===t.name}))})).filter(Boolean),empty:"-"}),description:t("CLUSTER_TAG")}))))})))},M=function(e){l(e)},P=function(e){var t=new Map;e?(y.forEach((function(e){t.set(e.name,e)})),D(t)):D(t),R(!T),w(t,!T)};return o.default.createElement("div",{className:h.default.clusterListBox},o.default.createElement("div",{className:(0,p.default)(h.default.clusterContainer)},o.default.createElement("div",{className:h.default.clusterSearch},o.default.createElement(i.Checkbox,{checked:T,onChange:P,className:h.default.checkBox,indeterminate:!(y.length===C.size||0===C.size)},t("SELECT_ALL")),o.default.createElement(i.InputSearch,{className:h.default.input,placeholder:t("SEARCH"),value:n,onSearch:M})),I(e.allClusters)))};a.default=v},function(e,t,a){e.exports={reason:"_3JDYKrJKhc0_3ccKRTWjbm",condition:"_3QACUKLP4siIkBKdrDW-kH",title:"mzPe8sBOFqw47SGIKPrZW",warning:"ZLc6bv2hKoXfyrevZ2_Ny",error:"HaXzDca7Adqyw5TSX98wt"}},function(e,t,a){e.exports={icon:"xKWloJZ3Pd_PqEaOhl-hT",draft:"_1FxWEU9OOeyTB0kLav72OJ","pending-review":"_2Kgn9QUrQjnMa1DT569nzn","to-be-reviewed":"_3VPGTkZ0kt7VAgF_zap1kx",registering:"_7FkF93kEWAJRkvTtbK4B5",creating:"pAHvZ_RG-pNI_6jkgCeVQ",success:"c57Xl7U2RVqCR7373K4Mb",succeeded:"_1uovlfp6-KF3gEuBuD0MtN",successful:"_14_7RfNWDb4dY6DUEHBcWK",ready:"_2pGjni5nxEU2vEXd5c8x0U",running:"Uef3KaucYEHmxp8kPnl0B",jobrunning:"_38McoUrLPjp-IxlLnUBiEc",active:"_3XNjuuBbvzt53nhrQm-HXj",normal:"_2ra4URWQKS0vxDB4xFYkP-",bound:"NH3CoWdb2O7APR1Sr1c4R",available:"_3dQlBzY-nYntydG9AX_n8V",healthy:"_1o0ijVE-hpfungNxCaztkt",ok:"_1ohxQxwBnkzQG-fZ-j0AJK",working:"_3vbpc3X5L0xtx4UKf_c81L",passed:"_2QJx0oRr3eDpXINTTxA3h7",published:"_26qlXB1G0tFvhUEXtW6VXQ",flicker:"_39HvsLhXibByaMtJ27WhHs",updating:"_3FVXsrClHBDhThI2PxJQYN",upgrading:"kBsjZOQ5i-t3E8e8f_YQc",syncing:"_3RR_2LauQUw9iB0u7_CR9K",building:"_2S5WEGfe2WUT5bji7Nor0B",notrunning:"_1KIbMexH4zSZn9G0zxeGeq",warning:"_6DP37Rv8RsDF7M97fNBOe",waiting:"_34DVpCiM7-LcMXfWSqZR4m",terminating:"_1Ot7k0fjOVvC3D2tNAa93i",released:"_2WmS-sodO7CDopJqPb7sjM",unfinished:"_2Dzk48MF3g0R_BPCEzKcGO",firing:"_2ikw1FbRijNp-VAqeBfZRK",major:"_1kFY7fBc18HVILwtcQmc_i",deleting:"_1L69rMVhNP91YKutMw-AVP",unkown:"sGWVKOHL75adFCSXXdUoH","in-review":"_1HugNUnbiDYQC0VzKzaTcU",deleted:"_3nDdouuEwZUxX2UB90wfmS",error:"_2lZZhetVUZXtG33CrDhb_l",lost:"_3ZCL2CITd4Xxi3Q8iFPQBQ",unschedulable:"OEaAUOBaw8aPhRh-AOvLf",registerfail:"_3jsWOK7bD-HE07g7Oq9Kbf",failed:"_3okAXA7dSs8qB0I83qrEwE",critical:"_1FlFRJJbuB_m4fm1lZbEGJ",rejected:"_1UjeFbT-g4hmr_4MOZUIQt",stopped:"bPGnPwhyY8-Jo2cZZZOdz",disabled:"_1bvTVaQo96kB6ZN5th8QxM",pending:"_2AunMDgw00EAwgZqzui_f_",unknown:"BZvybize4dddT7i4yAkK2",draining:"_2NLYGsCnxwt_PK6UK301R7",unready:"_2r1cncqVBdGqR7Dzrs8k0m",terminated:"_2H0QXOJ6mC1KDfv1nAP6k6",completed:"_21L69zF1m7TdkP-yQNhb6V",minor:"YrT7AztFXvf8WmH3vtwu8",unmanaged:"_1USSsIy-vFUMgFDQXWYeCy",dead:"i8ghS5D_07_EmXcDbaIfB",paused:"_35GVxD7s5Me3ssTcHpu1XA",inactive:"_1Vxh_5eb2cf7P32zp73e7p",suspended:"_3W95J2HteD5RPT_yAIHj1m"}},function(e,t,a){e.exports={wrapper:"_1zRhmhoqa7hKxIDHXtcQBl",icon:"_3zzcn1sJsd8OE2-UlVh5Dt",indicator:"_3_FKNd25UQ1SrtjwfzQsQa",title:"_2EJdDmBbkeOhXJGYqE2ODn",name:"iC7sVV_ohn78d_o-bnIsG",description:"_121vxZTmC4ekgLxeINz_qj",ellipsis:"_2D4Gh4G0EV2qp97eGpO8pA",isExpired:"cAV_fM4HAoL_7N476HQ-8",light:"aSm0o7OnDBr1lwEbEO6Qv",large:"_2oqSS3OkMT7aMTmyO3QDYQ",small:"ThqV9yofYHAOd-P_wF-3F"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(18),r(48),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(48),r(42),r(16),r(4),r(23),r(57),r(17);var u=l(r(96)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=n(r(0)),p=l(r(1)),m=r(186),h=l(r(3)),v=l(r(1492)),g=l(r(2115));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=function(e){(0,c.default)(r,e);var a=y(r);function r(e){var n;return(0,o.default)(this,r),(n=a.call(this,e)).renderBadge=function(e){return 0===e.length?null:d.createElement(m.Tooltip,{placement:"top",appendToBody:!0,content:d.createElement("div",null,d.createElement("div",null,t("TAG_PL")),d.createElement("div",{className:g.default.clusterTags},e.map((function(e){return d.createElement(v.default,{label:e.label,value:e.value,key:e.name,name:e.name,isTooltipContent:!0})}))))},d.createElement("div",{className:g.default.clusterTagBadge},e.length))},n.state={},n}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,t=e.data,a=void 0===t?[]:t,r=e.empty,n=void 0===r?null:r,l=e.className;if(!a.length)return n;var o=(0,u.default)(a,2),i=o[0],c=o[1];return d.createElement("div",{className:(0,h.default)(g.default.clusterTagGroup,l)},d.createElement(v.default,{label:i.label,value:i.value,name:i.name}),c&&d.createElement(v.default,{label:c.label,value:c.value,name:c.name}),this.renderBadge(a.slice(2)))}}]),r}(d.Component);a.default=E,E.propTypes={data:p.default.array.isRequired,empty:p.default.string||p.default.node}},function(e,t,a){e.exports={clusterTagItem:"_1Q7rwPOhBP9jpE1scnut6x",widthAuto:"_1iwFaLEvI9T6zsLlm3NWlG",label:"_87mgRCx8MOXgJ8rULXPjp",value:"u6uS4fhlcySlTOFIPdqCk"}},function(e,t,a){e.exports={clusterTags:"CcPncW5maLpzZvqskDkjT",clusterTagGroup:"_3xp0pO3VIF5DziKwwF9VQl",clusterTagBadge:"_2fanZ0SjwMsi2lF0bCsr3y"}},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(5),r(11),r(31),r(6),r(29),r(18),r(48),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(324),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(29),r(18),r(28),r(48),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(324),r(38),r(460),r(461),r(462),r(463),r(464),r(465),r(466),r(7),r(32);var u=l(r(30)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=l(r(61)),p=l(r(1272)),m=n(r(0)),h=l(r(1)),v=r(186),g=l(r(2117)),y=l(r(26)),E=l(r(806)),b=l(r(861)),_=r(924),O=l(r(2118));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:[],r=a.map((function(e){return function(a){var r,n,l;return(null!==(r=e.tags)&&void 0!==r?r:[]).length>=5||new Set((null!==(n=e.tags)&&void 0!==n?n:[]).concat(a.value).map((function(e){return e.name}))).size>5?{Ok:!1,message:t.html("CLUSTER_MAX_TAGS_DESC",{cluster:e.name})}:(0,g.default)(a.value,null!==(l=e.tags)&&void 0!==l?l:[],(function(e,t){return e.name===t.name})).length?a:{Ok:!1,message:t.html("HAS_SAME_TAG")}}}));return N.apply(void 0,[{Ok:!0,value:e},k].concat((0,d.default)(r)))}([].concat((0,d.default)(c),[C(C({},f),{},{value:null===(e=u[f.label])||void 0===e||null===(r=e.find((function(e){return e.id===f.name})))||void 0===r?void 0:r.value})]),l);o.Ok||(0,E.default)(s,o.message)||n.setState({message:o.message}),o.Ok&&(o=o.value,n.setState({value:o,message:""}),a&&a(o))}))},n.handleLabelChange=function(e){n.setState({k:e,v:""})};var l=e.value||[];return n.formRef=m.createRef(),n.state={value:l,k:void 0,v:void 0},n}return(0,i.default)(r,[{key:"componentDidUpdate",value:function(e,t){t.message===this.state.message&&this.state.message&&this.setState({message:""})}},{key:"render",value:function(){var e=this,a=this.state,r=a.value,n=void 0===r?[]:r,l=a.k,u=a.v,o=a.message,i=this.props,c=i.onAddTags,s=i.defaultValue,f=i.tagsGroup,d=f[l]||[],p=Object.keys(f);return m.createElement("div",{className:O.default.wrapper},m.createElement(v.Form,{ref:this.formRef},m.createElement("div",{className:O.default.addContainer},m.createElement(v.Form.Item,{rules:[{required:!0,message:t("EMPTY_TAG_LABEL_DESC")}]},m.createElement(v.Select,{defaultValue:l,name:"label",placeholder:t("KEY"),options:p.map((function(e){return{label:e,value:e}})),onChange:this.handleLabelChange})),m.createElement(v.Form.Item,{rules:[{required:!0,message:t("EMPTY_TAG_VALUE_DESC")}]},m.createElement(v.Select,{defaultValue:u,name:"name",onChange:function(t){e.setState({v:t})},placeholder:t("VALUE"),options:d.map((function(e){return{label:e.value,value:e.id}}))})),(null!=n?n:[]).length>=5?m.createElement(v.Tooltip,{content:t("CLUSTER_MAX_TAGS_DESC")},m.createElement("div",null,m.createElement(v.Button,{disabled:!0},t("ADD")))):m.createElement(v.Button,{onClick:this.handleClick},t("ADD"))),o&&m.createElement("span",{className:"form-item-error margin-t8 inline-block"},o)),m.createElement("div",{className:O.default.title},t("HAS_ADD_TAGS")),m.createElement("div",{className:O.default.tags},n.map((function(t){return m.createElement(_.ClusterTagItem,{label:t.label,value:t.value,name:t.name,key:t.name,onDelete:s.find((function(e){return e.name===t.name}))?void 0:e.handleDelete})}))),"platform-admin"===(0,y.default)(window,"globals.user.globalrole","")&&m.createElement("div",{className:O.default.footer},m.createElement("span",null,t("CLUSTER_TAG_ADD_HELP"))," ",m.createElement("span",{onClick:c,className:O.default.action},t("CREATE_TAGS"))))}}]),r}(m.Component);a.default=T,T.propTypes={value:h.default.array,defaultValue:h.default.array,onChange:h.default.func,tagsGroup:h.default.object.isRequired,onAddTags:h.default.func,tags:h.default.array}},,function(e,t,a){e.exports={wrapper:"_1nxmlNUOXDLQhexMk3xnhN",addContainer:"_183GQn1S0N9yB4yWFUBaqx",title:"_24gI1L4pZoVwd6MV72rRRM",tags:"_1QjI7AUfMY3w_Ull_93-SC",footer:"zFqrx4HhkwBbkvyYfrbi1",action:"Vaa_9_FeE4sVQqojNsuGH"}},function(e,t,a){"use strict";a(15);var r=a(20);a(29),a(4),a(22),a(38),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(29),a(4),a(22),a(38),a(32);var n=r(a(96)),l=a(0),u=r(a(945)),o=function(){var e=(0,l.useRef)(new u.default),t=(0,l.useState)([]),a=(0,n.default)(t,2),r=a[0],o=a[1];return(0,l.useEffect)((function(){Promise.all([e.current.fetchGroupList({limit:-1})]).then((function(){o(e.current.tags)}))}),[]),[r,o]};t.default=o},function(e,t,a){e.exports={clusterListBox:"_3E7nfg18gc4YMpsXgkwewv",addBox:"_1bSE9f95Y6l3IUXRFqHiFq",clusterContainer:"iy_9AILE49q6oYEKPACE0",clusterSearch:"dY5lk9YVyLd2SKquC2Ipp",checkBox:"_3vsqcs9oAi9KmEj--p0mwz",input:"_1WOOb0mOWoitW54WM_TKhb",clusterList:"_1mEvnbfJL19vM01-pNmIzr",cluster:"HClXzP_agDUOBsD0DJB6U",inline:"_1jaGfWoiirbQyPg-EuCumT",left:"AwqUeOTDH3PUXkcCg2vXk",opt:"_3f745MPKWGUCPKuoEPpZNN",confirm:"FXS6GkOHCxUqj1785Bm_-",closeBt:"_2WxNJ61Iksv2sR--6616Xa",longList:"_2zueFWuIjAUgYy6xVBFRMq"}},function(e,t,a){e.exports={label:"_3lNFoNYnAqovuExjDshs8H",contentGroup:"FtMWAlt2Tg-L4j3LNBR9C",inline:"_11BH9gaIIj9QroYWoqVvz1",tabs:"_1DlseBgXppe_l3oWxUut-q",lineContent:"Y-jejgDishnXFaxP6vPRR",duration:"_3kmRCD04N-liwEB5XNldbW"}},function(e,t,a){"use strict";a(15);var r=a(20);a(29),a(4),a(22),a(38),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(29),a(4),a(22),a(38),a(32);var n=r(a(43));a(41);var l=r(a(44)),u=r(a(96)),o=a(0),i=r(a(438)),c=function(){var e=(0,o.useRef)(new i.default),t=(0,o.useState)([]),a=(0,u.default)(t,2),r=a[0],c=a[1],s=function(){var t=(0,l.default)(n.default.mark((function t(a){var r;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.current.fetchList(a);case 2:r=t.sent,c(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return(0,o.useEffect)((function(){Promise.all([e.current.fetchList({limit:-1})]).then((function(e){var t=(0,u.default)(e,1)[0];c(t)}))}),[]),[r,s]};t.default=c},,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(18),r(10),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(18),r(42),r(10),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(449)),m=n(r(3)),h=r(72),v=n(r(900)),g=n(r(869)),y=n(r(870)),E=n(r(947)),b=n(r(871)),_=n(r(862)),O=n(r(2167));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var C=function(e){(0,i.default)(r,e);var a=S(r);function r(){return(0,u.default)(this,r),a.apply(this,arguments)}return(0,o.default)(r,[{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.renderTitle;return r?r():f.default.createElement("div",{className:O.default.title},"".concat(t(a)," ").concat(this.lastValue))}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors,r=e.renderArea;return r?r():this.series.map((function(e,r){var n=h.COLORS_MAP[a[r]];return f.default.createElement(v.default,{key:e,dataKey:e,stroke:n,fillOpacity:"0.1",fill:n,unit:t})}))}},{key:"render",value:function(){var e=this.props,t=e.width,a=e.height,r=e.bgColor,n=e.xKey,u=e.data,o=e.darkMode;return f.default.createElement("div",{className:(0,m.default)(O.default.chart,(0,l.default)({},O.default.dark,o)),style:{width:t,height:a,background:r}},this.renderTitle(),f.default.createElement(b.default,{width:"100%",height:"100%",debounce:1},f.default.createElement(E.default,{data:u,margin:{top:30,left:0,right:0,bottom:0}},f.default.createElement(y.default,{dataKey:n,hide:!0}),f.default.createElement(g.default,{wrapperStyle:{zIndex:1e3},cursor:{stroke:h.COLORS_MAP.dark,strokeDasharray:"3,2",strokeWidth:2},content:f.default.createElement(_.default,null)}),this.renderArea())))}},{key:"series",get:function(){var e=this.props,t=e.xKey,a=e.data;return Object.keys(a[0]||{}).filter((function(e){return e!==t}))}},{key:"lastValue",get:function(){var e=this.props,t=e.unit,a=e.data,r=this.series;return 1===r.length?"".concat((0,p.default)(a)[r[0]]," ").concat(t):""}}]),r}(f.default.Component);a.default=C,C.propTypes={width:d.default.oneOfType([d.default.string,d.default.number]),height:d.default.oneOfType([d.default.string,d.default.number]),title:d.default.string,xKey:d.default.string,unit:d.default.string,data:d.default.array,bgColor:d.default.string,areaColors:d.default.array,renderTitle:d.default.func,renderArea:d.default.func,darkMode:d.default.bool},C.defaultProps={width:180,height:56,title:"Title",xKey:"time",unit:"",bgColor:h.COLORS_MAP.lightest,areaColors:["green","blue","yellow","red"],data:[],darkMode:!1}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={tooltip:"_2o-FPsZWo_tejfulidLyXN",label:"_14UOFErBhWS51I2ueymzb1",item:"_1ZRF-l-daK6mBpxVp4rWVy"}},function(e,t,a){e.exports={chart:"_1sjDK5GdPxFAEmfUxCI1LV",title:"_2xqrjvSLAex97qiOzpHRqy",dark:"jzlxuWnFI3sN_bACtVOG0"}},function(e,a,r){"use strict";r(15);var n=r(20);r(11),r(18),r(10),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(11),r(18),r(42),r(10),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(26)),p=n(r(449)),m=n(r(63)),h=r(72),v=n(r(900)),g=n(r(869)),y=n(r(870)),E=n(r(947)),b=n(r(871)),_=n(r(862)),O=r(52),S=r(186),C=n(r(2169));function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var k=function(e){(0,o.default)(r,e);var a=D(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"renderFilters",value:function(){var e=this.props.filters;return e?s.default.createElement("div",{className:C.default.filters,onClick:function(e){e.stopPropagation()}},s.default.createElement(S.Select,e)):null}},{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.unit,n=e.renderTitle;if(!e.noTitle){if(n)return n();var l=(0,O.coreUnitTS)(this.lastValue,r);return s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:C.default.title},s.default.createElement("span",null,s.default.createElement("strong",null,this.lastValue)," ",t(l)),1===this.lastValue||r?t(a):t("".concat(a,"_PL"))),this.renderFilters())}}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors,r=e.renderArea;return r?r():this.series.map((function(e,r){var n=h.COLORS_MAP[a[r]];return s.default.createElement(v.default,{key:e,dataKey:e,stroke:n,fillOpacity:"0.1",fill:n,unit:t})}))}},{key:"render",value:function(){var e=this.props,a=e.width,r=e.height,n=e.xKey,l=e.data,u=e.top;return s.default.createElement("div",{className:C.default.chart,style:{width:a,height:r}},this.renderTitle(),(0,m.default)(l)?s.default.createElement("p",{className:C.default.noData},t("NO_DATA")):s.default.createElement(b.default,{width:"100%",height:"100%",debounce:1},s.default.createElement(E.default,{data:l,margin:{top:u,left:4,right:4,bottom:4}},s.default.createElement(y.default,{dataKey:n,hide:!0}),s.default.createElement(g.default,{wrapperStyle:{zIndex:1e3},cursor:{stroke:h.COLORS_MAP.dark,strokeDasharray:"3,2",strokeWidth:2},content:s.default.createElement(_.default,null)}),this.renderArea())))}},{key:"series",get:function(){var e=this.props,t=e.xKey,a=e.data;return Object.keys(a[0]||{}).filter((function(e){return e!==t}))}},{key:"lastValue",get:function(){var e,t,a=this.props.data,r=(0,d.default)(this.series,[0],"");return null!==(e=null===(t=(0,p.default)(a))||void 0===t?void 0:t[r])&&void 0!==e?e:0}}]),r}(s.default.Component);a.default=k,k.propTypes={width:f.default.oneOfType([f.default.string,f.default.number]),height:f.default.oneOfType([f.default.string,f.default.number]),title:f.default.string,xKey:f.default.string,unit:f.default.string,data:f.default.array,areaColors:f.default.array,renderTitle:f.default.func,renderArea:f.default.func,top:f.default.number},k.defaultProps={width:280,height:100,title:"Title",xKey:"time",unit:"",areaColors:["green","blue","yellow","red","orange"],data:[],top:45}},function(e,t,a){e.exports={chart:"_2JJzTXT7f7IRE6NiIfNZwA",noData:"_3G18zHWAx-cv-EtIKep5u5",filters:"_1SpSoOfPZcy-3qfjpvHrTK",title:"_3hk5WanipERYCfYDNf8FS9"}},function(e,a,r){"use strict";r(15);var n=r(20);r(84),r(18),r(4),r(23),r(139),r(24),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(84),r(18),r(28),r(42),r(4),r(23),r(57),r(139),r(251),r(24),r(252),r(193),r(17),r(85);var l=n(r(315)),u=n(r(61)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=n(r(806)),v=n(r(63)),g=n(r(928)),y=r(72),E=n(r(1511)),b=n(r(946)),_=n(r(900)),O=n(r(869)),S=n(r(912)),C=n(r(870)),D=n(r(927)),k=n(r(929)),N=n(r(947)),T=n(r(871)),R=n(r(1086)),w=n(r(862)),I=r(1087),M=n(r(2173));function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var A=function(e){(0,c.default)(r,e);var a=P(r);function r(e){var n;(0,o.default)(this,r),(n=a.call(this,e)).handleLegendClick=function(e,t){var a=(0,u.default)(n.state.activeSeries);a.includes(t)?(0,g.default)(a,(function(e){return e===t})):a.push(t),n.setState({activeSeries:a})},n.tickFormatter=function(e){return e<=0?"":e>1e5?"".concat(Math.round(e/1e3),"k"):e},n.getAlertLabel=function(){var e=n.props,a=e.unit,r=e.alert;return"core"===a?t("VALUE_CORES",{value:r.value}):t("VALUE_UNIT",{value:r.value,unit:a})};var l=(0,I.getActiveSeries)(e);return n.state={series:l,activeSeries:l},n}return(0,i.default)(r,[{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.unit,n=e.renderTitle,l=n?n():(0,v.default)(r)?t(a):t("TITLE_UNIT",{title:t(a),unit:r});return d.default.createElement("div",{className:M.default.title},l)}},{key:"renderCustomTooltip",value:function(){var e=this.props,t=e.renderTooltip,a=e.isTranslate,r=e.alert;return t?t():d.default.createElement(w.default,{alert:r,isTranslate:a})}},{key:"renderLegend",value:function(){return d.default.createElement(D.default,{wrapperStyle:{top:0,left:"auto",right:0,width:"80%",zIndex:100},content:d.default.createElement(R.default,{isTranslate:this.props.isTranslate,showAll:this.props.showAll,extraLegend:this.props.extraLegend,activeSeries:this.state.activeSeries,onClick:this.handleLegendClick})})}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors,r=e.yAxisId,n=this.state,u=n.series,o=n.activeSeries;return u.map((function(e,n){var u=a[n],i=y.COLORS_MAP[u]||u,c={fill:i,fillOpacity:.1};return new RegExp("^".concat(r)).test(e)&&(c.yAxisId=r),d.default.createElement(_.default,(0,l.default)({key:e,dataKey:e,stroke:i,activeDot:d.default.createElement(b.default,{r:4,stroke:"#fff",strokeWidth:1,fill:i,fillOpacity:1}),unit:t,hide:!o.includes(e),connectNulls:!0},c))}))}},{key:"render",value:function(){var e=this.props,a=e.theme,r=e.width,n=e.height,u=e.xKey,o=e.data,i=e.alert,c=e.xAxis,s=e.yAxis,f=e.yAxisId,p=e.showReferenceLabel,h=e.referenceLineColor,g=(0,m.default)(M.default.chart,"chart","chart-".concat(a));return d.default.createElement("div",{className:g,style:{width:r,height:n}},this.renderTitle(),(0,v.default)(o)?d.default.createElement("p",{className:M.default.noData},t("NO_DATA")):d.default.createElement(T.default,{width:r,height:n,debounce:1},d.default.createElement(N.default,{data:o,margin:{top:42,bottom:-20,left:13,right:13}},d.default.createElement(k.default,{stroke:"#d8dee5",strokeDasharray:"2 2",vertical:!1}),d.default.createElement(C.default,(0,l.default)({height:40,dataKey:u,axisLine:!1,tickLine:!1,interval:"preserveStartEnd",minTickGap:60,tickMargin:12},c)),d.default.createElement(S.default,(0,l.default)({width:45,axisLine:!1,tickLine:!1,tickFormatter:this.tickFormatter},s)),f&&d.default.createElement(S.default,(0,l.default)({width:45,axisLine:!1,tickLine:!1,yAxisId:f,orientation:"right",tickFormatter:this.tickFormatter},s)),d.default.createElement(O.default,{wrapperStyle:{zIndex:9999},content:this.renderCustomTooltip()}),this.renderLegend(),this.renderArea(),!(0,v.default)(i)&&d.default.createElement(E.default,{y:i.value,label:p?this.getAlertLabel():void 0,stroke:y.COLORS_MAP[h],strokeDasharray:"3,2",isFront:!0}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var a=(0,I.getActiveSeries)(e);return(0,h.default)(a,t.series)?null:{series:a,activeSeries:a}}}]),r}(d.default.Component);a.default=A,A.propTypes={theme:p.default.oneOf(["light","dark"]),width:p.default.oneOfType([p.default.string,p.default.number]),height:p.default.oneOfType([p.default.string,p.default.number]),title:p.default.string,xKey:p.default.string,unit:p.default.string,data:p.default.array,bgColor:p.default.string,areaColors:p.default.array,renderTitle:p.default.func,renderTooltip:p.default.func,showReferenceLabel:p.default.bool,referenceLineColor:p.default.string},A.defaultProps={theme:"light",width:"100%",height:200,title:"Title",xKey:"time",unit:"",showAll:!1,bgColor:y.COLORS_MAP.lightest,areaColors:["green","blue","yellow","red","darkestGreen","darkestBlue","darkestYellow","darkestRed","lightestGreen","lightestBlue","lightestYellow","lightestRed"],data:[],showReferenceLabel:!0,referenceLineColor:"red"}},,function(e,t,a){e.exports={legend:"_1XlEXrqD889UqrbxHe-xEK",hide:"_23CvRZz1mMETc8Jy-6Img-",item:"_2baEObAQ1E-zKBmLZq7s1k",inactive:"_25hh9t3akE-oo7U9r1Ixur"}},function(e,t,a){e.exports={chart:"_2HFgq9kor6lheR0Vhq4sCI",noData:"_2qhnE0KRQA256rWeRH5z2W",title:"_2ArqqbIO8eulO-vuy6Ulu2"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(84),r(18),r(48),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(84),r(18),r(28),r(48),r(42),r(4),r(23),r(57),r(17),r(85);var l=n(r(61)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=n(r(63)),h=n(r(928)),v=r(72),g=n(r(946)),y=n(r(900)),E=n(r(869)),b=n(r(912)),_=n(r(870)),O=n(r(927)),S=n(r(929)),C=n(r(947)),D=n(r(871)),k=n(r(1086)),N=n(r(862)),T=r(1087),R=r(794),w=n(r(2175));function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var M=function(e){(0,i.default)(r,e);var a=I(r);function r(e){var t;(0,u.default)(this,r),(t=a.call(this,e)).handleLegendClick=function(e,a){var r=(0,l.default)(t.state.activeSeries);r.includes(a)?(0,h.default)(r,(function(e){return e===a})):r.push(a),t.setState({activeSeries:r})};var n=(0,T.getActiveSeries)(e);return t.state={series:n.slice(0,e.maxSeries),activeSeries:n.slice(0,e.maxActiveSeries)},t}return(0,o.default)(r,[{key:"componentDidUpdate",value:function(e){if(e.data.length!==this.props.data.length||e.id!==this.props.id){var t=(0,T.getActiveSeries)(this.props);this.setState({series:t.slice(0,this.props.maxSeries),activeSeries:t.slice(0,this.props.maxActiveSeries)})}}},{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.unit,n=e.renderTitle,l=n?n():(0,m.default)(r)?t(a):"".concat(t(a)," (").concat(t(r),")");return f.default.createElement("div",{className:w.default.title},l)}},{key:"renderCustomTooltip",value:function(){var e=this.props,t=e.renderTooltip,a=e.tailText;return t?t():f.default.createElement(N.default,{tailText:a})}},{key:"renderLegend",value:function(){return f.default.createElement(O.default,{wrapperStyle:{zIndex:100,left:24},content:f.default.createElement(k.default,{className:w.default.legend,activeSeries:this.state.activeSeries,showAll:!0,onClick:this.handleLegendClick})})}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors,r=e.renderArea,n=this.state,l=n.series,u=n.activeSeries;return r?r():l.map((function(e,r){var n=a[r],l=v.COLORS_MAP[n]||n;return f.default.createElement(y.default,{key:e,dataKey:e,stroke:l,fill:"url(#".concat(n,"-area)"),activeDot:f.default.createElement(g.default,{r:4,stroke:"#fff",strokeWidth:1,fill:l,fillOpacity:1}),unit:t,hide:!u.includes(e)})}))}},{key:"render",value:function(){var e=this.props,t=e.theme,a=e.width,r=e.height,n=e.xKey,l=e.data,u=(0,p.default)(w.default.chart,"chart","chart-".concat(t));return f.default.createElement("div",{className:u,style:{width:a,height:r}},this.renderTitle(),f.default.createElement(D.default,{debounce:1},f.default.createElement(C.default,{data:l,margin:{top:50,bottom:0,left:0,right:25}},f.default.createElement(S.default,{stroke:"#d8dee5",strokeDasharray:"2 3",vertical:!1}),f.default.createElement(_.default,{dataKey:n,axisLine:!1,tickLine:!1}),f.default.createElement(b.default,{width:60,axisLine:!1,tickLine:!1,tickFormatter:function(e){return e<=0?"":(0,R.getSuitableValue)(e,"number")}}),f.default.createElement(E.default,{wrapperStyle:{zIndex:101,pointerEvents:"auto"},cursor:{stroke:v.COLORS_MAP["dark"===t?"lightest":"dark"],strokeDasharray:"3,2",strokeWidth:2},content:this.renderCustomTooltip()}),this.renderLegend(),this.renderArea())))}}]),r}(f.default.Component);a.default=M,M.propTypes={theme:d.default.oneOf(["light","dark"]),width:d.default.oneOfType([d.default.string,d.default.number]),height:d.default.oneOfType([d.default.string,d.default.number]),title:d.default.string,xKey:d.default.string,unit:d.default.string,data:d.default.array,maxSeries:d.default.number,maxActiveSeries:d.default.number,areaColors:d.default.array,renderTitle:d.default.func,renderTooltip:d.default.func,renderArea:d.default.func,id:d.default.string},M.defaultProps={theme:"light",width:"100%",height:220,title:"Title",xKey:"time",maxSeries:50,maxActiveSeries:6,unit:"",areaColors:["green","blue","yellow","red","darkestGreen","darkestBlue","darkestYellow","darkestRed","lightestGreen","lightestBlue","lightestYellow","lightestRed"],data:[],id:""}},function(e,t,a){e.exports={chart:"DMLRKPRlM-592oxpl01Ux",title:"_2ndg87suV5PGHdzT74mCy1",legend:"KRlAbphv7IhurquDMCYe6"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(84),r(18),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(84),r(18),r(28),r(42),r(4),r(23),r(57),r(17),r(85);var l=n(r(315)),u=n(r(61)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=n(r(63)),v=n(r(806)),g=n(r(928)),y=r(72),E=n(r(946)),b=n(r(900)),_=n(r(869)),O=n(r(912)),S=n(r(870)),C=n(r(927)),D=n(r(929)),k=n(r(947)),N=n(r(871)),T=n(r(1086)),R=n(r(862)),w=r(1087),I=n(r(2177));function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var P=function(e){(0,c.default)(r,e);var a=M(r);function r(e){var t;(0,o.default)(this,r),(t=a.call(this,e)).handleLegendClick=function(e,a){var r=(0,u.default)(t.state.activeSeries);r.includes(a)?(0,g.default)(r,(function(e){return e===a})):r.push(a),t.setState({activeSeries:r})};var n=(0,w.getActiveSeries)(e);return t.state={series:n,activeSeries:n},t}return(0,i.default)(r,[{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.unit,n=e.renderTitle,l=n?n():(0,h.default)(r)?t(a):"".concat(t(a)," (").concat(t(r),")");return d.default.createElement("div",{className:I.default.title},l)}},{key:"renderLegend",value:function(){return d.default.createElement(C.default,{wrapperStyle:{top:0,left:"auto",right:0,width:"70%",zIndex:1001},content:d.default.createElement(T.default,{activeSeries:this.state.activeSeries,onClick:this.handleLegendClick})})}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors,r=e.renderArea,n=this.state,u=n.series,o=n.activeSeries;return r?r():u.map((function(e,r){var n=a[r],i=y.COLORS_MAP[n]||n,c=!o.includes(e),s={key:e,dataKey:e,stroke:i,activeDot:d.default.createElement(E.default,{r:4,stroke:"#fff",strokeWidth:1,fill:i,fillOpacity:1}),unit:t,hide:c};return r===u.length-1?d.default.createElement(b.default,(0,l.default)({},s,{strokeDasharray:"3, 2",fillOpacity:0})):d.default.createElement(b.default,(0,l.default)({},s,{strokeWidth:0,fill:i,fillOpacity:.7}))}))}},{key:"render",value:function(){var e=this.props,t=e.theme,a=e.width,r=e.height,n=e.xKey,l=e.data,u=(0,m.default)(I.default.chart,"chart","chart-".concat(t));return d.default.createElement("div",{className:u,style:{width:a,height:r}},this.renderTitle(),d.default.createElement(N.default,{width:"100%",height:"100%",debounce:1},d.default.createElement(k.default,{data:l,margin:{top:50,bottom:-20,left:0,right:20}},d.default.createElement(D.default,{stroke:"#d8dee5",strokeDasharray:"2 3",vertical:!1}),d.default.createElement(S.default,{dataKey:n,axisLine:!1,tickLine:!1}),d.default.createElement(O.default,{width:45,axisLine:!1,tickLine:!1,tickFormatter:function(e){return e>0?e:""}}),d.default.createElement(_.default,{wrapperStyle:{zIndex:1e3},cursor:{stroke:y.COLORS_MAP["dark"===t?"lightest":"dark"],strokeDasharray:"3,2",strokeWidth:2},content:d.default.createElement(R.default,null)}),this.renderLegend(),this.renderArea())))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var a=(0,w.getActiveSeries)(e);return(0,v.default)(a,t.series)?null:{series:a,activeSeries:a}}}]),r}(d.default.Component);a.default=P,P.propTypes={theme:p.default.oneOf(["light","dark"]),width:p.default.oneOfType([p.default.string,p.default.number]),height:p.default.oneOfType([p.default.string,p.default.number]),title:p.default.string,xKey:p.default.string,unit:p.default.string,data:p.default.array,areaColors:p.default.array,renderTitle:p.default.func,renderArea:p.default.func},P.defaultProps={theme:"light",width:"100%",height:200,title:"Title",xKey:"time",unit:"",areaColors:["lighterRed","lightestYellow","blue","dark"],data:[]}},function(e,t,a){e.exports={chart:"_3h-t0hKcP-Ao4nr8At-NOt",title:"m7sH_qo102jJOrFsmprfd"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(84),r(18),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(84),r(18),r(28),r(42),r(4),r(23),r(57),r(17),r(85);var l=n(r(61)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=n(r(63)),h=n(r(806)),v=n(r(928)),g=r(72),y=n(r(1033)),E=n(r(869)),b=n(r(912)),_=n(r(870)),O=n(r(927)),S=n(r(929)),C=n(r(1277)),D=n(r(871)),k=n(r(1086)),N=n(r(862)),T=r(1087),R=n(r(2179));function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var I=function(e){(0,i.default)(r,e);var a=w(r);function r(e){var t;(0,u.default)(this,r),(t=a.call(this,e)).handleLegendClick=function(e,a){var r=(0,l.default)(t.state.activeSeries);r.includes(a)?(0,v.default)(r,(function(e){return e===a})):r.push(a),t.setState({activeSeries:r})};var n=(0,T.getActiveSeries)(e);return t.state={series:n,activeSeries:n},t}return(0,o.default)(r,[{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.unit,n=e.renderTitle,l=n?n():(0,m.default)(r)?t(a):"".concat(t(a)," (").concat(r,")");return f.default.createElement("div",{className:R.default.title},l)}},{key:"renderLegend",value:function(){return f.default.createElement(O.default,{wrapperStyle:{top:0,left:"auto",right:0,width:"70%",zIndex:1001},content:f.default.createElement(k.default,{activeSeries:this.state.activeSeries,onClick:this.handleLegendClick})})}},{key:"renderBar",value:function(){var e=this,t=this.props,a=t.unit,r=t.areaColors,n=t.renderBar;return n?n():this.series.map((function(t,n){var l=r[n],u=g.COLORS_MAP[l]||l;return f.default.createElement(y.default,{key:t,dataKey:t,stroke:u,fill:"url(#".concat(l,"-area)"),unit:a,hide:!e.state.activeSeries.includes(t)})}))}},{key:"render",value:function(){var e=this.props,t=e.theme,a=e.width,r=e.height,n=e.xKey,l=e.data,u=(0,p.default)(R.default.chart,"chart","chart-".concat(t));return f.default.createElement("div",{className:u,style:{width:a,height:r}},this.renderTitle(),f.default.createElement(D.default,{width:"100%",height:"100%",debounce:1},f.default.createElement(C.default,{data:l,margin:{top:50,bottom:-20,left:0,right:20}},f.default.createElement(S.default,{stroke:"#d8dee5",strokeDasharray:"2 3",vertical:!1}),f.default.createElement(_.default,{dataKey:n,axisLine:!1,tickLine:!1}),f.default.createElement(b.default,{width:45,axisLine:!1,tickLine:!1,tickFormatter:function(e){return e>0?e:""}}),f.default.createElement(E.default,{wrapperStyle:{zIndex:1e3},cursor:"dark"===t?{fill:g.COLORS_MAP.lightest,fillOpacity:.2}:{fill:g.COLORS_MAP.grey},content:f.default.createElement(N.default,null)}),this.renderLegend(),this.renderBar())))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var a=(0,T.getActiveSeries)(e);return(0,h.default)(a,t.series)?null:{series:a,activeSeries:a}}}]),r}(f.default.Component);a.default=I,I.propTypes={theme:d.default.oneOf(["light","dark"]),width:d.default.oneOfType([d.default.string,d.default.number]),height:d.default.oneOfType([d.default.string,d.default.number]),title:d.default.string,xKey:d.default.string,unit:d.default.string,data:d.default.array,areaColors:d.default.array,renderTitle:d.default.func,renderBar:d.default.func},I.defaultProps={theme:"light",width:"100%",height:200,title:"Title",xKey:"time",unit:"",areaColors:["green","blue","yellow"],data:[]}},function(e,t,a){e.exports={chart:"_12oj79UOFmAu5q6GiNUsq2",title:"_1cs-znnZFCTeUErbjSD6Ed"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(84),r(18),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(84),r(18),r(28),r(42),r(4),r(23),r(57),r(17),r(85);var l=n(r(61)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=n(r(63)),h=n(r(806)),v=n(r(928)),g=r(72);r(1278);var y=n(r(1033)),E=n(r(869)),b=n(r(912)),_=n(r(870)),O=n(r(927)),S=n(r(929)),C=n(r(1277)),D=n(r(871)),k=n(r(1086)),N=n(r(862)),T=r(1087),R=n(r(2231));function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var I=function(e){(0,i.default)(r,e);var a=w(r);function r(e){var t;(0,u.default)(this,r),(t=a.call(this,e)).getBarSize=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.length<=20?20:8},t.handleLegendClick=function(e,a){var r=(0,l.default)(t.state.activeSeries);r.includes(a)?(0,v.default)(r,(function(e){return e===a})):r.push(a),t.setState({activeSeries:r})};var n=(0,T.getActiveSeries)(e);return t.state={series:n,activeSeries:n},t}return(0,o.default)(r,[{key:"renderTitle",value:function(){var e=this.props,a=e.title,r=e.unit,n=e.renderTitle,l=n?n():(0,m.default)(r)?t(a):"".concat(t(a)," (").concat(r,")");return f.default.createElement("div",{className:R.default.title},l)}},{key:"renderLegend",value:function(){return f.default.createElement(O.default,{wrapperStyle:{top:0,left:"auto",right:0,width:"70%",zIndex:1001},content:f.default.createElement(k.default,{activeSeries:this.state.activeSeries,onClick:this.handleLegendClick})})}},{key:"renderBar",value:function(){var e=this,t=this.props,a=t.unit,r=t.areaColors,n=t.renderBar,l=this.state,u=l.series,o=l.activeSeries;return n?n():u.map((function(t,n){var l=r[n],u=g.COLORS_MAP[l]||l,i=e.getBarSize(e.series),c=0===n?[0,0,2,2]:n===e.series.length-1?[2,2,0,0]:null;return f.default.createElement(y.default,{key:t,dataKey:t,stackId:"series",barSize:i,stroke:u,strokeWidth:0,fill:u,radius:c,unit:a,hide:!o.includes(t)})}))}},{key:"render",value:function(){var e=this.props,t=e.theme,a=e.width,r=e.height,n=e.xKey,l=e.data,u=(0,p.default)(R.default.chart,"chart","chart-".concat(t));return f.default.createElement("div",{className:u,style:{width:a,height:r}},this.renderTitle(),f.default.createElement(D.default,{width:"100%",height:"100%",debounce:1},f.default.createElement(C.default,{data:l,margin:{top:50,bottom:-20,left:0,right:20}},f.default.createElement(S.default,{stroke:"#d8dee5",strokeDasharray:"2 3",vertical:!1}),f.default.createElement(_.default,{dataKey:n,axisLine:!1,tickLine:!1}),f.default.createElement(b.default,{width:45,axisLine:!1,tickLine:!1,tickFormatter:function(e){return e>0?e:""}}),f.default.createElement(E.default,{wrapperStyle:{zIndex:1e3},cursor:"dark"===t?{fill:g.COLORS_MAP.lightest,fillOpacity:.2}:{fill:g.COLORS_MAP.grey},content:f.default.createElement(N.default,null)}),this.renderLegend(),this.renderBar())))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var a=(0,T.getActiveSeries)(e);return(0,h.default)(a,t.series)?null:{series:a,activeSeries:a}}}]),r}(f.default.Component);a.default=I,I.propTypes={theme:d.default.oneOf(["light","dark"]),width:d.default.oneOfType([d.default.string,d.default.number]),height:d.default.oneOfType([d.default.string,d.default.number]),title:d.default.string,xKey:d.default.string,unit:d.default.string,data:d.default.array,areaColors:d.default.array,renderTitle:d.default.func,renderBar:d.default.func},I.defaultProps={theme:"light",width:"100%",height:200,title:"Title",xKey:"time",unit:"",areaColors:["green","blue","yellow"],data:[]}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={chart:"_23-9y13KSLTiB9ATkXvt6C",title:"_2tAARTBPZ1UnWw3S1J1rbq"}},function(e,a,r){"use strict";var n=r(20);r(12),r(827),r(11),r(6),r(18),r(190),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(827),r(11),r(6),r(18),r(28),r(42),r(190),r(34),r(15),r(9),r(13),r(10),r(4),r(436),r(23),r(57),r(17),r(7);var l=n(r(61)),u=n(r(30)),o=n(r(315)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(1)),h=n(r(3)),v=n(r(26)),g=n(r(63)),y=r(794),E=n(r(927)),b=n(r(869)),_=n(r(1159)),O=n(r(1036)),S=n(r(1089)),C=n(r(871)),D=n(r(2233));function k(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function N(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:1;return n.total?(n.value/n.total*100).toFixed(e):0},n.getPrimaryColor=function(e){var t=e||{},a=t.areaColors,r=t.active,l=t.showRate,u=t.fixedColor,o=t.rateNum,i=n.getRate(o),c=(0,v.default)(a,[0],"#fff");return l&&!u&&(r&&(c="white"),i>=80&&(c="yellow"),i>=90&&(c="red")),c},n.getFills=function(e){var t=e||{},a=t.areaColors,r=t.active,l={fill:(0,y.getColorByName)(n.getPrimaryColor(e))},u=a[1]||l.fill;return{activeFill:l,totalFill:r?{fill:"#fff",fillOpacity:.4}:{fill:(0,y.getColorByName)(u),fillOpacity:a[1]?1:.2}}},n.getData=function(){return[{name:n.props.legend[0],value:n.value},{name:"Remaining",value:n.remain}]},n.renderActiveShape=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cx,a=e.cy,r=e.innerRadius,l=e.outerRadius,u=e.startAngle,i=e.endAngle;return p.default.createElement("g",null,p.default.createElement(_.default,(0,o.default)({cx:t,cy:a,innerRadius:r,outerRadius:l,startAngle:u,endAngle:i},n.state.activeFill)))},n.renderTooltip=function(e){if(!e.active)return null;var a=n.props,r=a.title,l=a.legend,u=a.unit,o=a.value,i=a.total,c=a.showRate,s=a.rateNum,f=a.isShowTotalTooltip,d="%"===u?"%":" ".concat(u),m=c&&" (".concat(n.getRate(s),"%)");return p.default.createElement("div",{className:D.default.tooltip},p.default.createElement("div",{className:D.default.label},t(r)),p.default.createElement("div",{className:D.default.list},p.default.createElement("div",{className:D.default.item},p.default.createElement("i",{style:{background:n.state.activeFill.fill}}),p.default.createElement("label",null,t(l[0]),":"),p.default.createElement("p",null,o,d,m)),f&&p.default.createElement("div",{className:D.default.item},p.default.createElement("i",{style:{background:"#fff"}}),p.default.createElement("label",null,t(l[1]),":"),p.default.createElement("p",null,i,d))))},n.state=N({},n.getFills(e)),n}return(0,c.default)(r,[{key:"componentDidUpdate",value:function(e){e.active!==this.props.active&&this.setState(N({},this.getFills(this.props)))}},{key:"renderCenter",value:function(){var e,t=this.props,a=t.theme,r=t.value,n=t.total,l=t.showRate,o=t.showRatio,i=t.renderCustomCenter,c=t.showName,s=t.rateNum,f=this.getPrimaryColor(this.props),d=l?(0,u.default)({},D.default.standard,!0):o?(e={},(0,u.default)(e,D.default.mid,r>99||n>99),(0,u.default)(e,D.default.mini,r>999||n>999),e):{},m=l?"".concat(this.getRate(s),"%"):o?p.default.createElement("p",null,p.default.createElement("strong",null,r),p.default.createElement("span",null,"/"),n):null;return p.default.createElement("div",{className:(0,h.default)(D.default.center,D.default[f],d,(0,u.default)({},D.default.white,"dark"===a))},c&&p.default.createElement("p",{className:D.default["show-name"]},this.props.legend[0]),i?i({value:r,total:n}):m)}},{key:"renderLegend",value:function(){var e=this.props,a=e.legend,r=e.areaColors;return p.default.createElement(E.default,{wrapperStyle:{bottom:0,zIndex:100},content:function(e){var n=e.payload,u=(0,l.default)(n);return(0,g.default)(u)||(u[u.length-1].value=a[a.length-1],u[u.length-1].color=r[u.length-1]||"#fff"),p.default.createElement("div",{className:D.default.legend},u.map((function(e){var a=(0,v.default)(e,"payload.fill");return p.default.createElement("div",{key:e.dataKey,"data-key":e.dataKey,className:D.default.item},p.default.createElement("i",{style:{backgroundColor:a}}),t(e.value))})))}})}},{key:"render",value:function(){var e=this.props,t=e.width,a=e.height,r=e.showCenter,n=e.innerRadius,l=void 0===n?"70%":n,u=this.getData();return p.default.createElement("div",{className:D.default.chart,style:{width:t,height:a}},r&&this.renderCenter(),p.default.createElement(C.default,{width:"100%",height:"100%",debounce:1},p.default.createElement(S.default,null,p.default.createElement(O.default,(0,o.default)({data:u,dataKey:"value",activeIndex:0,activeShape:this.renderActiveShape,innerRadius:l,outerRadius:"100%",stroke:"transparent"},this.state.totalFill)),p.default.createElement(b.default,{wrapperStyle:{zIndex:100},content:this.renderTooltip}))))}},{key:"value",get:function(){var e=parseFloat(this.props.value||0);return e>0?e:0}},{key:"total",get:function(){return parseFloat(this.props.total||0)}},{key:"remain",get:function(){var e=this.total-this.value;return 0===this.total?1:e}}]),r}(p.default.Component);a.default=R,R.propTypes={theme:m.default.oneOf(["light","dark"]),width:m.default.oneOfType([m.default.string,m.default.number]),height:m.default.oneOfType([m.default.string,m.default.number]),title:m.default.string,legend:m.default.array,value:m.default.oneOfType([m.default.number,m.default.string]),total:m.default.oneOfType([m.default.number,m.default.string]),unit:m.default.string,areaColors:m.default.array,showCenter:m.default.bool,showRate:m.default.bool,showRatio:m.default.bool,active:m.default.bool,rateNum:m.default.number,isShowTotalTooltip:m.default.bool},R.defaultProps={theme:"light",width:100,height:100,title:"",legend:["USED","TOTAL"],value:0,total:0,unit:"",isShowTotalTooltip:!0,areaColors:["green"],showCenter:!0,showRate:!1,showRatio:!0,active:!1,rateNum:0}},function(e,t,a){e.exports={chart:"_3xORGioagELncq_b0QqUXh",center:"_1Fpm4EsVyd6rEqOU-TLFy4",fadeIn:"l534UI3MtCEqz4eGGY2TT","show-name":"_3xCxaH91PcORamjP2M6dwG",standard:"_2NHy2ySjaBP3iE_V33_T5s",mid:"_2_sR4rrGvd5Nbsd1lzOhmK",mini:"_2x1qX36v29kVnJ-mDXpniw",white:"_1HaIvuK2oSITwqGtPezmdk",yellow:"_bd_3V5QJCH9JEWCPD3q5",red:"_3zV4Hy8k1ujHADMao04tU1",tooltip:"_3j83qVypNfpK_iV4Spm6bt",label:"_1oAbCyvxESz8SMJcvczmya",item:"NrpjP1sw1yw9v33VrS1Qn",legend:"_2RMVikNBMbfj9iyRPZcc2V"}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(11),a(31),a(1037),a(18),a(1038),a(16),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.dataList,a=e.legendClassName,r=e.wrapperStyle,n=void 0===r?{width:"50%",left:"120px"}:r,E=e.disabledFilter,b=void 0!==E&&E,_=e.total,O=e.noTooltip,S=(0,u.useState)([]),C=(0,l.default)(S,2),D=C[0],k=C[1],N=(0,u.useState)(!0),T=(0,l.default)(N,2),R=T[0],w=T[1];(0,u.useEffect)((function(){var e=(0,p.default)(t);if(t.length>1){var a=e.map((function(e){return e.data})).flat(),r=a.pop(),n=a.filter((function(e){return e.name!==r.name})).concat(r);k(n)}else{var l=e.map((function(e){return e.data})).flat();k(l),w(!1)}}),[t]);if(Array.isArray(t)&&t.length<0)return;return u.default.createElement(d.default,{width:"100%",height:"100%",debounce:1},u.default.createElement(f.default,null,t.map((function(e,t){var a=e.data,r=e.dataKey,n=e.innerRadius,l=e.outerRadius,o=e.colors,i=e.cx,f=void 0===i?75:i,d=e.cy,p=void 0===d?55:d;return u.default.createElement(s.default,{data:a,dataKey:r,cx:f,cy:p,minAngle:0,innerRadius:n,outerRadius:l,startAngle:90,endAngle:-360,key:"pie-".concat(t),animationDuration:1e3},a.map((function(e,t){var a=!(0,h.default)(D.find((function(t){return t.name===e.name})));return u.default.createElement(c.default,{key:"cell-".concat(t),fill:a?o[t%o.length]:o[o.length-1]})})))})),!O&&u.default.createElement(o.default,{wrapperStyle:{zIndex:1e3},cursor:{stroke:v.COLORS_MAP.dark,strokeDasharray:"3,2",strokeWidth:2},content:u.default.createElement(g.default,null)}),u.default.createElement(i.default,{layout:"vertical",align:"right",verticalAlign:"middle",iconType:"circle",wrapperStyle:n,content:u.default.createElement(y.default,{activeSeries:D,onClick:b?null:function(e){var t=(0,p.default)(D);t.find((function(t){return t.name===e.name}))?(0,m.default)(t,(function(t){return t.name===e.name})):t.push(e),k(t)},isMult:R,className:a,totalValue:_})})))},a(5),a(11),a(31),a(1037),a(160),a(18),a(28),a(1038),a(16),a(4);var l=n(a(96)),u=r(a(0));a(1278);var o=n(a(869)),i=n(a(927)),c=n(a(998)),s=n(a(1036)),f=n(a(1089)),d=n(a(871)),p=n(a(135)),m=n(a(928)),h=n(a(158)),v=a(72),g=n(a(2235)),y=n(a(2237))},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(86),r(18),r(16),r(27),r(9),r(13),r(10),r(24),r(64),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(30));r(12),r(5),r(11),r(31),r(6),r(86),r(18),r(28),r(16),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(24),r(64),r(7);var u=n(r(0)),o=n(r(26)),i=n(r(63)),c=n(r(925)),s=r(52),f=r(72),d=r(1513),p=n(r(2236));function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function h(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};if(!e.active)return null;var a=e.renderLabel,r=e.payload,n=e.usageData,l=e.totalData,m=e.tailText,v=e.alert,g=e.isTranslate,y=void 0===g||g,E=r||[],b=e.label,_=(0,o.default)(E,"[0].payload.unit")||"",O="default"===_?"":"%"===_?"%":"".concat(t(_)),S=a?a(e):b,C=function(e){var a=e.indexOf("gpu")>-1?"gpu":e,r="gpu"===a?"".concat(a,".limit"):a;return f.ICON_TYPES[a]?t(r.replace(/[. ]/g,"_").toUpperCase()):r};return u.default.createElement("div",{className:p.default.tooltip},v&&u.default.createElement("div",{className:p.default.item},u.default.createElement(d.ReactComponent,null),"".concat(t(C(v.name||"")),":").concat("core"===v.unit?t("VALUE_CORES",{value:v.value}):t("VALUE_UNIT",h({},v)))),u.default.createElement("div",{className:p.default.label,style:{marginTop:"".concat(v?"8px":"0px")}},u.default.createElement("span",null,S),m&&u.default.createElement("span",null,m)),u.default.createElement("div",{className:p.default.list},E.map((function(e){var a=e.dataKey,r=e.name,f=e.value,d=void 0===f?0:f;if((0,c.default)(Number(d)))return null;var m=(0,o.default)(e,"payload.fill"),h=(0,o.default)(e,"payload.label")||r,v="";if(!(0,i.default)(n)&&!(0,i.default)(l)){var g=(0,o.default)(n.find((function(e){return e.time===b})),r)||0,E=(0,o.default)(l.find((function(e){return e.time===b})),r)||0;v=" (".concat(g,"/").concat(E,")")}var _=(0,s.coreUnitTS)(d,O);return u.default.createElement("div",{key:a,className:p.default.item},u.default.createElement("i",{style:{background:m}}),y?t(h):h,": ",d," ".concat(t(_)),v)}))))};a.default=v},function(e,t,a){e.exports={tooltip:"_18KqCyvNCGxzhlSz2Z2-9Y",label:"YYJ1OVwvKVdRA2JE3OPIX",item:"_22WPsKANfFjmXw4JkrTCTT"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(11),r(31),r(18),r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(5),r(11),r(31),r(18),r(16),r(4);var u=l(r(30)),o=l(r(96)),i=n(r(0)),c=l(r(3)),s=l(r(135)),f=l(r(26)),d=l(r(74)),p=l(r(2238)),m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=e.className,r=e.payload,n=e.activeSeries,l=void 0===n?[]:n,m=e.isMult,h=e.totalValue,v=(0,i.useState)([]),g=(0,o.default)(v,2),y=g[0],E=g[1];(0,i.useEffect)((function(){if(r.length>0){var e=(0,s.default)(r);if(m){var t=e.pop();void 0!==h&&(0,d.default)(t,"payload.value",h);var a=e.filter((function(e){return e.value!==t.value})).concat(t);E(a)}else E(e)}}),[r,h]);var b=function(t,a){t.cancelBubble=!0,t.stopPropagation();var r=e.onClick;r&&r(a)};return i.default.createElement("div",{className:(0,c.default)(a,p.default.legend)},y.map((function(e,a){var r,n=!l.find((function(t){return t.name===e.value})),o=(0,f.default)(e,"color"),s=!!m&&a===y.length-1;return i.default.createElement("div",{key:a,className:(0,c.default)(p.default.item,(r={},(0,u.default)(r,p.default.inactive,n),(0,u.default)(r,p.default.disabled,s),r)),onClick:s?null:function(t){return b(t,{name:e.value,value:e.payload.value})}},i.default.createElement("span",{className:p.default.label},i.default.createElement("i",{style:{backgroundColor:o}}),i.default.createElement("span",null,t(e.value))),i.default.createElement("b",{className:p.default.value},e.payload.unit?"core"===e.payload.unit?t("VALUE_CORES",{value:e.payload.value}):t("VALUE_UNIT",{value:e.payload.value,unit:t(e.payload.unit)}):e.payload.value))})))};a.default=m},function(e,t,a){e.exports={legend:"_1RC52HxQjVmMw4L8iQz2w_",hide:"_3b4znXld-yrkvvSjP8xkTG",item:"DkIMSpjNvU3Z-NUrcuIk9",label:"PD8OHwScr2aOwFWjkEAME",value:"_1nZ2x0Ee6aieU7C7M21FTp",inactive:"_3cAYRwJBR322I0l6tMMEUK",disabled:"_1DSn1UPehNfQ40117uCm4x"}},function(e,t,a){e.exports={selector:"_3jdnDfk2o9GZ977aTA-xpY",active:"_1VVAknMMhYtwjCCzJ26w8D",arrow:"_3fVUYCC4XLdULuzPPLryH6",dropdown:"_4VJDQbixxjDltdv9t2c1h",button:"B4m3CNQgLzi7Xqxf0JBO_",mask:"_2LZHnUZdP2-tzMlT4rOCY9",content:"_8RPB91ZzJIARHcetuuCun"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.redisCluster=t.redisSentinal=void 0;t.redisSentinal={resource:{apiVersion:"redis.radondb.com/v1beta1",kind:"RedisSentinel",metadata:{name:"redis-sentinel",namespace:"redis-sentinel"},spec:{clusterSize:3,kubernetesConfig:{redisVersion:"6.2.5",image:"radondb/redis:v6.2.5",imagePullPolicy:"Always",resources:{requests:{cpu:"101m",memory:"128Mi"},limits:{cpu:"101m",memory:"128Mi"}}},redisExporter:{enabled:!0,image:"radondb/redis-exporter:v1.44.0",imagePullPolicy:"Always",resources:{requests:{cpu:"100m",memory:"128Mi"},limits:{cpu:"100m",memory:"128Mi"}}},redisReplica:{replicas:3,redisConfig:{additionalRedisConfig:"redis-sentinel-external-config"},affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{podAffinityTerm:{labelSelector:{matchExpressions:[{key:"redis.radondb.com/name",operator:"In",values:[111]}]},topologyKey:"kubernetes.io/hostname"},weight:1}]}}},aclConfig:{aclFile:"redis-sentinel-acl-config"},redisSentinel:{replicas:3,sentinelConfig:{quorum:2,parallelSyncs:3},resources:{requests:{cpu:"100m",memory:"128Mi"},limits:{cpu:"100m",memory:"128Mi"}},affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{podAffinityTerm:{labelSelector:{matchExpressions:[{key:"redis.radondb.com/name",operator:"In",values:[111]}]},topologyKey:"kubernetes.io/hostname"},weight:1}]}}},storage:{volumeClaimTemplate:{spec:{storageClassName:"standard",accessModes:["ReadWriteOnce"],resources:{requests:{storage:"1Gi"}}}}}}},externalConfig:{apiVersion:"v1",kind:"ConfigMap",metadata:{namespace:"redis-sentinel",name:"redis-sentinel-external-config"},data:{"redis-external.conf":"aclfile /etc/redis/acl.conf.d/aclfile.conf\ntcp-keepalive 400\nslowlog-max-len 158\nstream-node-max-bytes 2048\nio-threads 1\nio-threads-do-reads no\nmaxmemory 0"}},secret:{apiVersion:"v1",kind:"Secret",metadata:{name:"redis-secret-password-secret",namespace:"redis-sentinel"},type:"Opaque",data:{password:"bWd3MjE2ODAwMA=="}},aclConfig:{apiVersion:"v1",kind:"ConfigMap",metadata:{namespace:"redis-sentinel",name:"redis-sentinel-acl-config"},data:{"aclfile.conf":"user radondb on >radondb123@ ~* &* +@all"}}};t.redisCluster={resource:{apiVersion:"redis.radondb.com/v1beta1",kind:"RedisCluster",metadata:{name:"redis-cluster",namespace:"redis-cluster"},spec:{clusterSize:3,kubernetesConfig:{redisVersion:"6.2.5",image:"radondb/redis:v6.2.5",imagePullPolicy:"IfNotPresent",resources:{requests:{cpu:"101m",memory:"128Mi"},limits:{cpu:"101m",memory:"128Mi"}}},redisExporter:{enabled:!0,image:"radondb/redis-exporter:v1.44.0",imagePullPolicy:"IfNotPresent",resources:{requests:{cpu:"100m",memory:"128Mi"},limits:{cpu:"100m",memory:"128Mi"}}},redisLeader:{replicas:3,redisConfig:{additionalRedisConfig:"redis-cluster-external-config"},affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{podAffinityTerm:{labelSelector:{matchExpressions:[{key:"redis.radondb.com/name",operator:"In",values:[111]}]},topologyKey:"kubernetes.io/hostname"},weight:1}]}}},redisFollower:{replicas:3,redisConfig:{additionalRedisConfig:"redis-cluster-external-config"},affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{podAffinityTerm:{labelSelector:{matchExpressions:[{key:"redis.radondb.com/name",operator:"In",values:[111]}]},topologyKey:"kubernetes.io/hostname"},weight:1}]}}},aclConfig:{aclFile:"redis-cluster-acl-config"},storage:{volumeClaimTemplate:{spec:{storageClassName:"csi-standard",accessModes:["ReadWriteOnce"],resources:{requests:{storage:"200Mi"}}}}},predixyExporter:{enabled:!0,image:"radondb/predixy-exporter:v1.0.0",imagePullPolicy:"IfNotPresent",resources:{requests:{cpu:"100m",memory:"128Mi"},limits:{cpu:"100m",memory:"128Mi"}}},redisProxy:{enabled:!1,replicas:3,image:"radondb/predixy:v1.0.5",imagePullPolicy:"IfNotPresent",resources:{requests:{cpu:"101m",memory:"128Mi"},limits:{cpu:"101m",memory:"128Mi"}},affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{podAffinityTerm:{labelSelector:{matchExpressions:[{key:"redis.radondb.com/name",operator:"In",values:[111]}]},topologyKey:"kubernetes.io/hostname"},weight:1}]}},predixyConfigParams:{clusterName:"redis-cluster",workerThreads:2,clientTimeout:0,bufSize:1048576,masterReadPriority:100,slaveReadPriority:0,refreshInterval:1,serverTimeout:3,serverFailureLimit:10,serverRetryTimeout:5,keepAlive:120}}}},externalConfig:{apiVersion:"v1",kind:"ConfigMap",metadata:{namespace:"redis-cluster",name:"redis-cluster-external-config"},data:{"redis-external.conf":'maxmemory 128mb\nmaxmemory-policy volatile-lru\nactiverehashing yes\nappendonly yes\nappendfsync everysec\ntcp-keepalive 400\ncluster-node-timeout 15000\nslowlog-max-len 128\nstream-node-max-bytes 2048\nmaxclients 102400\nlatency-monitor-threshold 0\nmaxmemory-samples 3\nmin-slaves-max-lag 10\nmin-slaves-to-write 0\nno-appendfsync-on-rewrite no\nnotify-keyspace-events ""\nrepl-backlog-size 1mb\nrepl-backlog-ttl 3600\nrepl-timeout 60\nset-max-intset-entries 512\nslowlog-log-slower-than -1\nslowlog-max-len 128\nhash-max-ziplist-entries 512\nhash-max-ziplist-value 64\nzset-max-ziplist-entries 512\nzset-max-ziplist-value 64\nlua-time-limit 5000\nio-threads 1\nio-threads-do-reads no\nlogfile logfile\n'}},secret:{apiVersion:"v1",kind:"Secret",metadata:{name:"redis-secret-password-secret",namespace:"redis-cluster"},type:"Opaque",data:{password:"bWd3MjE2ODAwMA=="}},aclConfig:{apiVersion:"v1",kind:"ConfigMap",metadata:{namespace:"redis-cluster",name:"redis-cluster-acl-config"},data:{"aclfile.conf":"user radondb on >radondb123@ ~* &* +@all"}}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.mongoYaml=void 0;t.mongoYaml={resources:{apiVersion:"mongodbcommunity.mongodb.com/v1",kind:"MongoDBCommunity",metadata:{name:"mongodb"},spec:{members:1,type:"ReplicaSet",version:"4.2.19",prometheus:{username:"Prometheus",passwordSecretRef:{name:"mongodb-metrics-password"}},security:{authentication:{modes:["SCRAM"]}},users:[{name:"operator",db:"admin",passwordSecretRef:{name:"mongodb-operator-password"},roles:[{name:"root",db:"admin"}],scramCredentialsSecretName:"mongodb-operator-password"},{name:"root",db:"admin",passwordSecretRef:{name:"mongodb-root-password"},roles:[{name:"root",db:"admin"}],scramCredentialsSecretName:"mongodb-root-password"}],additionalMongodConfig:{net:{port:27017,maxIncomingConnections:1e4},storage:{wiredTiger:{engineConfig:{journalCompressor:"zlib"}}},replication:{oplogSizeMB:10240,enableMajorityReadConcern:!0},operationProfiling:{mode:"off",slowOpThresholdMs:100},systemLog:{destination:"file",path:"/data/mongod.log",logAppend:!0,logRotate:"reopen",component:{command:{verbosity:0},index:{verbosity:0},query:{verbosity:0},network:{verbosity:0},write:{verbosity:0}}},setParameter:{cursorTimeoutMillis:7e5}},statefulSet:{spec:{template:{spec:{initContainers:[{name:"mongod-posthook",imagePullPolicy:"IfNotPresent",resources:{limits:{cpu:"0.2",memory:"250M"},requests:{cpu:"0.2",memory:"250M"}}},{name:"mongodb-agent-readinessprobe",imagePullPolicy:"IfNotPresent",resources:{limits:{cpu:"0.2",memory:"250M"},requests:{cpu:"0.2",memory:"250M"}}}],containers:[{name:"mongod",imagePullPolicy:"IfNotPresent",resources:{limits:{cpu:"8",memory:"16G"},requests:{cpu:2,memory:"4G"}}},{name:"mongodb-agent",imagePullPolicy:"IfNotPresent",resources:{limits:{cpu:"0.2",memory:"250M"},requests:{cpu:"0.2",memory:"250M"}}}],affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{podAffinityTerm:{labelSelector:{matchExpressions:[{key:"app.kubernetes.io/instance",operator:"In",values:[111]}]},topologyKey:"kubernetes.io/hostname"},weight:1}]}}}},volumeClaimTemplates:[{metadata:{name:"data-volume"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"100G"}},storageClassName:"csi-high-capacity"}}]}}}},masterSecret:{apiVersion:"v1",kind:"Secret",metadata:{name:"mongodb-operator-password"},type:"Opaque",stringData:{password:"operator_pwd"}},rootSecret:{apiVersion:"v1",kind:"Secret",metadata:{name:"mongodb-root-password"},type:"Opaque",stringData:{password:"root_pwd"}}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.ckYaml=void 0;t.ckYaml={resources:{apiVersion:"clickhouse.radondb.com/v1",kind:"ClickHouseInstallation",metadata:{name:"ck-cluster-11",namespace:"default"},spec:{metricsExporter:"on",configuration:{zookeeper:{install:!0,replica:3,port:2181},users:{"readonly/profile":"readonly","clickhouse/password":"c1ickh0use0perator","clickhouse/networks/ip":["127.0.0.1","::/0"],"clickhouse/profile":"default","clickhouse/quotas":"default"},profiles:{"readonly/readonly":"1","default/max_memory_usage":2e8},quotas:{"default/interval/duration":"3600"},settings:{"compression/case/method":"zstd",disable_internal_dns_cache:1,max_server_memory_usage:18e8,"logger/log":"/var/lib/clickhouse/log/clickhouse-server.log","logger/errorlog":"/var/lib/clickhouse/log/clickhouse-server.err.log","logger/count":10,"logger/size":"100M",timezone:"Asia/Shanghai"},clusters:[{name:"all-nodes",layout:{shardsCount:1,replicasCount:2}}]},defaults:{templates:{podTemplate:"pod-template-with-volume",dataVolumeClaimTemplate:"data",logVolumeClaimTemplate:"data",serviceTemplate:"chi-svc-template"}},templates:{serviceTemplates:[{name:"chi-svc-template",spec:{ports:[{name:"http",port:8123},{name:"tcp",port:9e3}],type:"NodePort"}}],podTemplates:[{name:"pod-template-with-volume",metadata:{annotations:{"backup.velero.io/backup-volumes":"data"}},spec:{affinity:{podAntiAffinity:{preferredDuringSchedulingIgnoredDuringExecution:[{weight:1,podAffinityTerm:{labelSelector:{matchExpressions:[{key:"clickhouse.radondb.com/chi",operator:"In",values:["clickhouse"]}]},topologyKey:"kubernetes.io/hostname"}}]}},containers:[{name:"clickhouse",image:"radondb/clickhouse-server:v21.1.3.32-stable",imagePullPolicy:"IfNotPresent",readinessProbe:{exec:{command:["/usr/bin/clickhouse-client","-q","SELECT 1"]}},initialDelaySeconds:10,periodSeconds:30,successThreshold:1,failureThreshold:4,timeoutSeconds:10,livenessProbe:{exec:{command:["/usr/bin/clickhouse-client","-q","SELECT 1"]},initialDelaySeconds:60,periodSeconds:30,successThreshold:1,failureThreshold:4,timeoutSeconds:10},volumeMounts:[{name:"data",mountPath:"/var/lib/clickhouse"}],resources:{requests:{memory:"1Gi",cpu:"500m"},limits:{memory:"1Gi",cpu:"500m"}}}]}}],volumeClaimTemplates:[{name:"data",reclaimPolicy:"Retain",spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"10Gi"}},storageClassName:"csi-qingcloud"}}]}}}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.pgYaml=void 0;t.pgYaml={resources:{apiVersion:"postgres.radondb.io/v1",kind:"PostgreSQL",metadata:{name:"lzzhang"},spec:{action:"start",deletepvc:!0,volume_type:"local",antiaffinity:{policy:"preferred",podAntiAffinityTerm:"autofailover-readwrite",topologyKey:"kubernetes.io/hostname"},backupCluster:{backupToS3:{policy:{retention:"REDUNDANCY 10"}}},services:[{selector:"autofailover",metadata:{name:"autofailover"},spec:{type:"ClusterIP",ports:[{name:"exporter",port:9187}]}},{selector:"primary",metadata:{name:"readwrite"},spec:{type:"ClusterIP",ports:[{name:"prime",port:5432},{name:"exporter",port:9187}]}},{selector:"standby-readonly",metadata:{name:"standby-readonly"},spec:{type:"ClusterIP",ports:[{name:"prime",port:5432},{name:"exporter",port:9187}]}}],autofailover:{hbas:["host all all all md5"],configs:["enable_seqscan=on"],podspec:{terminationGracePeriodSeconds:60,containers:[{image:"radondb/radondb-postgresql:12.12-v1.1.0",imagePullPolicy:"IfNotPresent",name:"postgresql",volumeMounts:[{name:"data",mountPath:"/var/lib/postgresql/data"}],resources:{limits:{memory:"500Mi",cpu:"0.5"}}},{image:"radondb/radondb-postgres-exporter:v1.1.0",imagePullPolicy:"IfNotPresent",name:"exporter",volumeMounts:[{name:"data",mountPath:"/var/lib/postgresql/data"}],resources:{limits:{memory:"100Mi",cpu:"0.1"}}}]},volumeClaimTemplates:[{metadata:{name:"data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"1Gi"}}}}]},postgresql:{users:{admin:[],normal:[]},hbas:["host all all all md5"],configs:["enable_seqscan=on","autovacuum=true","autovacuum_analyze_scale_factor=0.05","autovacuum_vacuum_cost_delay=0","autovacuum_vacuum_cost_limit=10000","autovacuum_vacuum_scale_factor=0.02","bgwriter_delay=10","bgwriter_flush_after=512kB","bgwriter_lru_maxpages=1000","checkpoint_timeout=300","commit_delay=0","commit_siblings=5","cpu_index_tuple_cost=0.005","cpu_tuple_cost=0.01","fsync=true","full_page_writes=true","idle_in_transaction_session_timeout=86400000","jit=false","log_min_duration_statement=10000","log_min_messages=WARNING","log_statement=none","maintenance_work_mem=64MB","max_connections=100","max_replication_slots=15","max_wal_senders=15","max_worker_processes=20","port=5432","random_page_cost=1.1","seq_page_cost=1","shared_buffers=128MB","statement_timeout=0","synchronous_commit=on","temp_buffers=1MB","vacuum_defer_cleanup_age=10000","wal_compression=false","wal_level=replica","wal_writer_delay=10","wal_writer_flush_after=1MB","work_mem=4MB"],readwriteinstance:{replicas:2,podspec:{terminationGracePeriodSeconds:60,containers:[{image:"radondb/radondb-postgresql:12.12-v1.1.0",imagePullPolicy:"IfNotPresent",name:"postgresql",volumeMounts:[{name:"data",mountPath:"/var/lib/postgresql/data"}],resources:{limits:{memory:"200Mi",cpu:"0.2"}}},{image:"radondb/radondb-postgres-exporter:v1.1.0",imagePullPolicy:"IfNotPresent",name:"exporter",volumeMounts:[{name:"data",mountPath:"/var/lib/postgresql/data"}],resources:{limits:{memory:"100Mi",cpu:"0.1"}}}]},volumeClaimTemplates:[{metadata:{name:"data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"1Gi"}}}}]},readonlyinstance:{streaming:"async",replicas:0,podspec:{terminationGracePeriodSeconds:60,containers:[{image:"radondb/radondb-postgresql:12.12-v1.1.0",imagePullPolicy:"IfNotPresent",name:"postgresql",volumeMounts:[{name:"data",mountPath:"/var/lib/postgresql/data"}],resources:{limits:{memory:"200Mi",cpu:"0.2"}}},{image:"radondb/radondb-postgres-exporter:v1.1.0",imagePullPolicy:"IfNotPresent",name:"exporter",volumeMounts:[{name:"data",mountPath:"/var/lib/postgresql/data"}],resources:{limits:{memory:"100Mi",cpu:"0.1"}}}]},volumeClaimTemplates:[{metadata:{name:"data"},spec:{accessModes:["ReadWriteOnce"],resources:{requests:{storage:"1Gi"}}}}]}}}}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.mysqlYaml=void 0;t.mysqlYaml={resources:{apiVersion:"mysql.radondb.com/v1alpha1",kind:"MysqlCluster",metadata:{name:"sample",namespace:"default"},spec:{replicas:3,mysqlVersion:"5.7",backupSecretName:"$DMP-MANAGED-S3-SECRET$",mysqlOpts:{rootPassword:"",image:"percona/percona-server:5.7.39",rootHost:"localhost",user:"radondb_usr",password:"RadonDB@123",database:"radondb",initTokuDB:!0,mysqlConf:{},resources:{requests:{cpu:"100m",memory:"256Mi"},limits:{cpu:"500m",memory:"1Gi"}}},xenonOpts:{image:"radondb/xenon:v2.3.0",admitDefeatHearbeatCount:5,electionTimeout:1e4,resources:{requests:{cpu:"50m",memory:"128Mi"},limits:{cpu:"100m",memory:"256Mi"}}},metricsOpts:{enabled:!0,image:"prom/mysqld-exporter:v0.12.1",resources:{requests:{cpu:"10m",memory:"32Mi"},limits:{cpu:"100m",memory:"128Mi"}}},podPolicy:{imagePullPolicy:"IfNotPresent",sidecarImage:"radondb/mysql-sidecar:v2.3.0",busyboxImage:"busybox:1.32",slowLogTail:!1,auditLogTail:!1,labels:{},annotations:{},affinity:{podAntiAffinity:{requiredDuringSchedulingIgnoredDuringExecution:[{labelSelector:{matchExpressions:[{key:"mysql.radondb.com/cluster",operator:"In",values:["mysql"]}]},topologyKey:"kubernetes.io/hostname"}]}},priorityClassName:"",schedulerName:"",extraResources:{requests:{cpu:"100m",memory:"500Mi"}}},persistence:{enabled:!0,accessModes:["ReadWriteOnce"],size:"10Gi"}}}}},,,,,,,,,function(e,t,a){"use strict";var r=a(20),n=a(157);a(12),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(28),a(42),a(448),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var l,u,o,i=r(a(315)),c=r(a(30)),s=r(a(58)),f=r(a(36)),d=r(a(37)),p=r(a(88)),m=r(a(55)),h=r(a(56)),v=r(a(51)),g=n(a(0)),y=r(a(1)),E=r(a(26)),b=r(a(189)),_=r(a(241)),O=r(a(787)),S=r(a(481)),C=r(a(482)),D=a(791),k=r(a(1296)),N=r(a(435)),T=r(a(1541)),R=r(a(2290));function w(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function I(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},u=l.containerDetail,o=l.selectedVersion,i=(0,s.default)(l,["containerDetail","selectedVersion"]),c=(null===(e=(0,p.default)(r))||void 0===e?void 0:e.props)||(0,p.default)(r),f=null===(t=(0,p.default)(r))||void 0===t?void 0:t.props,d=f.trigger,m=void 0===d?r.trigger:d,h=f.success,v=(void 0===h&&r.success,N.default.edgeappsets((0,_.default)(c,"namespace"))),g=(0,E.default)(u,"metadata.name"),y=(0,E.default)(u,"spec"),O=(0,E.default)(o,"_originData.spec.versionName"),S=(0,b.default)(y,"version");v&&(v.spec=I(I({},null==v?void 0:v.spec),{},{appTemplateName:g,version:O,deploymentTemplate:{spec:I(I({},S),{},{template:{spec:{deploymentTemplate:{spec:S}}}})}})),r.trigger("app.template.deploy.v2",I(I(I(I(I(I({trigger:m},(0,p.default)(r)),c),i),u),{},{app:(null===(a=r.props)||void 0===a?void 0:a.app)||(null===(n=(0,p.default)(r))||void 0===n?void 0:n.app),isEdgeTable:!0},(0,_.default)(c,["cluster","workspace","namespace"])),{},{formTemplate:v,onOK:null==c?void 0:c.onOK}))},r.store=new C.default,r}return(0,d.default)(a,[{key:"componentDidMount",value:function(){var e;(null===(e=this.rootStore.actions)||void 0===e?void 0:e["app.template.deploy.v2"])||this.rootStore.registerActions(k.default)}},{key:"render",value:function(){var e=this.props,t=e.visible,a=(e.onOk,e.onDeploy,(0,s.default)(e,["visible","onOk","onDeploy"]));return g.default.createElement(O.default,(0,i.default)({className:T.default.modal,bodyClassName:T.default.body,visible:t,hideHeader:!0,rightScreen:!0,hideFooter:!0},a),g.default.createElement(R.default,(0,i.default)({},a,{onDeploy:this.handleDeploy.bind(this)})))}}]),a}(g.Component),u.propTypes={app:y.default.object,visible:y.default.bool,onOK:y.default.func,onCancel:y.default.func,appName:y.default.string,cluster:y.default.string,workspace:y.default.string,namespace:y.default.string,trigger:y.default.func},u.defaultProps={visible:!1,onCancel:function(){}},l=o))||l;t.default=P},function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(109),r(11),r(31),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(31),r(6),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(7);var u=n(r(43)),o=n(r(30));r(41);var i,c,s,f=n(r(44)),d=n(r(36)),p=n(r(37)),m=n(r(88)),h=n(r(55)),v=n(r(56)),g=n(r(51)),y=l(r(0)),E=n(r(243)),b=n(r(63)),_=n(r(199)),O=n(r(1)),S=r(239),C=r(186),D=n(r(435)),k=r(248),N=n(r(816)),T=n(r(932)),R=n(r(482)),w=n(r(1100)),I=n(r(2356)),M=n(r(2358));function P(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){for(var t=1;t0&&void 0!==r[0]?r[0]:{},e.next=3,t.versionStore.fetchList(A(A({},a),{},{app_id:t.appId,noLimit:!0}));case 3:case"end":return e.stop()}}),e)}))),t.handleTabChange=function(e){t.setState({tab:e})},t.handleClickBack=function(){var e=t.props.app;t.props.setType("appList",e.repo_id)},t.showDeploy=function(){var e=t.props.app,a=e.name,r=e.description,n=t.containerFormRef.current;n&&n.validate((function(){(t.props.onDeploy||t.onDeploy)(A(A({},t.props||(0,m.default)(t)),{},{title:a,selectedVersion:t.selectedVersion,description:r||"-",containerDetail:n.getData(),store:t.store}))}))},t.handleChangeAppVersion=function(e){t.setState({selectedVersionKey:e})},t.state={tab:"versionInfo",selectedVersionKey:"",showDeploy:!1},t.store=new R.default,t.appTemplateStore=new w.default,t.containerFormRef=y.default.createRef(),t}return(0,p.default)(n,[{key:"componentDidMount",value:(a=(0,f.default)(u.default.mark((function e(){var t;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.props.app.latestVersion.name,this.setState({selectedVersionKey:t});case 2:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.props.setType()}},{key:"renderContainerGroupInfo",value:function(){var e=this.props,a=e.cluster,r=e.namespace;return y.default.createElement("div",{className:M.default.content},y.default.createElement("div",{className:M.default.title},t("VERSION")),y.default.createElement(N.default,{className:"margin-b12",value:this.state.selectedVersionKey,options:this.versionOptions,onChange:this.handleChangeAppVersion}),this.selectedVersion&&y.default.createElement(T.default,{formRef:this.containerFormRef,store:this.appTemplateStore,cluster:a,namespace:r,formTemplate:this.containerFormTemplate,onlyDockerHub:!0,isReadOnlyContainers:!0,isShowAddContainer:!1}))}},{key:"render",value:function(){var e=this.props.app,a=e.name,r=e.description;return y.default.createElement(y.default.Fragment,null,y.default.createElement(I.default,{onClickBack:this.handleClickBack,title:a,desc:r||"-"}),y.default.createElement("div",{className:M.default.bar},y.default.createElement("span",{className:"h6"},t("CONTAINER_GROUP_INFO")),y.default.createElement(C.Button,{type:"control",onClick:this.showDeploy,disabled:(0,b.default)(this.versionOptions)},t("DEPLOYMENT"))),this.renderContainerGroupInfo())}},{key:"appId",get:function(){return this.props.app.name}},{key:"tabs",get:function(){return[{label:t("APP_INFORMATION"),value:"versionInfo"},{label:t("CHART_FILES"),value:"chartFiles"}]}},{key:"versionOptions",get:function(){var e=this.props.app,a=e.versions,r=e.latestVersion;return a.map((function(e){var a=e.name,n=e.createTime;return{value:a,label:y.default.createElement(y.default.Fragment,null,a,a===r.name&&y.default.createElement(C.Tag,{type:"warning",className:M.default.latestTag},t("LATEST_VERSION_SCAP"))),description:(0,E.default)(n).format("YYYY-MM-DD")}}))}},{key:"selectedVersion",get:function(){var e=this.state.selectedVersionKey;return this.props.app.versions.find((function(t){return t.name===e}))}},{key:"containerFormTemplate",get:function(){var e=this.props.namespace,t=D.default.apptemplateversions({name:this.appId});return this.selectedVersion&&(t=(0,k.getVersionFormattedData)(this.selectedVersion)),t=(0,_.default)({metadata:{namespace:e}},t)}}]),n}(y.Component),c.propTypes={app:O.default.object,setType:O.default.func,cluster:O.default.string,workspace:O.default.string,namespace:O.default.string,onDeploy:O.default.func},c.defaultProps={app:{}},i=s))||i;a.default=L},function(e,t,a){e.exports={wrapper:"_3-Z2rH4dJXrmQSWl9e4ycU",disabled:"_1Dw41QGGd50RzhWJFhfH49",options:"_2Xu541Z-0bUtJcujaZkRHR",option:"_2EXRjaIiDTR4g0Dfk94wJz",control:"_1hz7Wgmx8Rghk274Q2pzcH",withIcon:"_2Vq4QaRwsRLaDLjC6rbHLK",leftIcon:"ooc_mcBxBm5WR1VuTXQgW",text:"_2zG-KdWrFpEGXbWTU-Uk_u",rightIcon:"UPnGOt9oqYtT-P8SuLo1R",selected:"_1swH00sr6Ka5DNZNLzmPRP",search:"BXevkwDBApCohP4-5hFly"}},,,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(6),r(16),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(6),r(42),r(16),r(4),r(23),r(57),r(17),r(7);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(63)),f=n(r(135)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=r(881),v=r(186),g=n(r(1097)),y=n(r(1297)),E=n(r(1299)),b=n(r(1301)),_=n(r(1302)),O=n(r(1303)),S=n(r(2324)),C=n(r(2333)),D=n(r(2335)),k=n(r(2337));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var T=function(e){(0,o.default)(r,e);var a=N(r);function r(e){var t;return(0,l.default)(this,r),(t=a.call(this,e)).registerForm=function(){var e=t.context.registerSubRoute,a=t.props.onCancel;e&&e(t.handleSubmit,a)},t.handleGoBack=function(){var e=t.context.resetSubRoute;e&&e(),t.props.onCancel()},t.handleSubmit=function(e){var a=t.props,r=a.onSave,n=a.withService,l=t.formRef.current;l&&l.validate((function(){var a=l.getData();a.args&&(a.args=a.args.filter((function(e){return!(0,s.default)(e)}))),a.command&&(a.command=a.command.filter((function(e){return!(0,s.default)(e)}))),a.env&&(a.env=a.env.filter((function(e){var t=e.name;return!(0,s.default)(t)}))),a.ports&&(a.ports=a.ports.filter((function(e){return e.name&&e.containerPort}))),(0,s.default)(a.lifecycle)&&delete a.lifecycle,(0,s.default)(a.livenessProbe)&&delete a.livenessProbe,(0,s.default)(a.startupProbe)&&delete a.startupProbe,(0,s.default)(a.readinessProbe)&&delete a.readinessProbe,!n&&a.ports&&a.ports.forEach((function(e){void 0!==e.servicePort&&delete e.servicePort})),a.image=t.state.imageDetail.image,r(a),e&&e()}))},t.handleContainerTypeChange=function(e){t.setState({containerType:e})},t.formRef=d.default.createRef(),t.state={containerType:e.data.type||"worker",formData:(0,f.default)(e.data),imageDetail:{}},t}return(0,u.default)(r,[{key:"getChildContext",value:function(){var e=this;return{forceUpdate:function(){e.forceUpdate()},imageDetail:this.state.imageDetail,setImageDetail:function(t){e.setState({imageDetail:t})}}}}]),(0,u.default)(r,[{key:"componentDidMount",value:function(){this.registerForm()}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.isFederated,r=e.cluster,n=e.limitRange,l=e.imageRegistries,u=e.namespace,o=e.withService,i=e.supportGpuSelect,c=e.projectDetail,s=e.containers,f=e.type,p=e.isEdgeWize,N=e.onlyDockerHub,T=this.state,R=T.containerType,w=T.formData;return d.default.createElement("div",{className:(0,m.default)(k.default.wrapper,t)},d.default.createElement("div",{className:"h5"},d.default.createElement("a",{className:"custom-icon",onClick:this.handleGoBack},d.default.createElement(h.ReactComponent,null)),this.title),d.default.createElement(v.Form,{ref:this.formRef,data:w},d.default.createElement(O.default,{data:w,cluster:r,namespace:u,limitRange:n,imageRegistries:N?[]:l,defaultContainerType:R,onContainerTypeChange:this.handleContainerTypeChange,workspaceQuota:this.props.workspaceQuota,supportGpuSelect:i,isEdgeWize:p,containers:s,type:f}),d.default.createElement(g.default,{withService:"init"!==R&&o,data:w}),d.default.createElement(b.default,null),"init"!==R&&d.default.createElement(_.default,null),d.default.createElement(D.default,null),d.default.createElement(y.default,null),d.default.createElement(E.default,{namespace:u,isFederated:a,cluster:r,isEdgeWize:p,projectDetail:c}),d.default.createElement(S.default,null),d.default.createElement(C.default,{data:w})))}},{key:"title",get:function(){var e=this.props,a=e.type,r=e.titlePrefix,n=t("".concat(a.toUpperCase(),"_CONTAINER"));return"".concat(r).concat(n)}}]),r}(d.default.Component);a.default=T,T.propTypes={onlyDockerHub:p.default.bool,isEdgeWize:p.default.bool,className:p.default.string,type:p.default.string,titlePrefix:p.default.string,namespace:p.default.string,module:p.default.string,data:p.default.object,onSave:p.default.func,onCancel:p.default.func,configMaps:p.default.array,secrets:p.default.array,containers:p.default.array},T.defaultProps={className:"",type:"Add",titlePrefix:"",onlyDockerHub:!1,isEdgeWize:!1,namespace:"",module:"",data:{},onSave:function(){},onCancel:function(){},configMaps:[],secrets:[],containers:[]},T.childContextTypes={forceUpdate:p.default.func,imageDetail:p.default.object,setImageDetail:p.default.func},T.contextTypes={registerSubRoute:p.default.func,resetSubRoute:p.default.func}},function(e,t,a){e.exports={wrapper:"_7te1l8EfVM6tZhqTao6Sf",text:"_3nzWDPF5TiOskojQKzJuIk"}},function(e,t,a){e.exports={wrapper:"_1nzmymJQjcRsMrjYGneDt5",tip:"_2NjdkVatk0DK13ijU1TUaM"}},function(e,t,a){e.exports={wrapper:"_2jnaJ_tJNRHuS4hoQljy_3"}},function(e,t,a){e.exports={defaultButton:"_7MnHu7AlZ8cMwEuzfGyTc"}},function(e,t,a){e.exports={input:"_9VIeOg56YL5EUVGKERJsI"}},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(5),r(11),r(31),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var u=l(r(30)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=n(r(0)),p=r(186),m=l(r(135)),h=l(r(3)),v=l(r(2301));function g(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function y(e){for(var t=1;t0&&d.default.createElement("span",{className:v.default.allChoose,onClick:this.handleAllChoose},l?t("DESELECT_ALL"):t("SELECT_ALL"))),d.default.createElement("div",{className:v.default.table},d.default.createElement("div",{className:(0,h.default)(v.default.innerBox,(0,u.default)({},v.default.scroll,i.length>4))},i.map((function(t,a){return d.default.createElement(p.Checkbox,{className:(0,h.default)(v.default.tableItem,(0,u.default)({},v.default.checked,t.checked)),checked:t.checked,onChange:function(){return e.handleKeyChecked(a)}},t.label)}))))),d.default.createElement("div",{className:v.default.options},d.default.createElement(p.Button,{onClick:this.handleCancel},t("CANCEL")),d.default.createElement(p.Button,{type:"control",onClick:this.handleOk},t("OK"))))}},{key:"tabs",get:function(){return[{label:t("CONFIGMAP_PL"),value:"configMaps"},{label:t("SECRET_PL"),value:"secrets"}]}},{key:"options",get:function(){var e=this.props,t=e.configMaps,a=e.secrets;return"configMaps"===this.state.tab?t.map((function(e){return{label:e.name,value:e.name}})):a.map((function(e){return{label:e.name,value:e.name}}))}},{key:"style",get:function(){var e=this.props,t=e.showModal,a=(0,e.getParentPosition)();return t?{top:a.y,left:"calc(".concat(a.x,"px - 12px)")}:{}}}]),r}(d.Component);a.default=b},function(e,t,a){e.exports={contentBox:"_3fu0cXTS6-8QAQs_DJTlw3",content:"_16xE4DVV_sWZ9H7S_Es45D",title:"_1aEnOXwYPEjPFMpZIZCIH4",tip:"_2zo3TJ4xDa-xQGLmdmJAZX",tabs:"_1uI7sdLkFlHd6bb1y0rgyj",subTitle:"DiD89TxExP31ZkyD20Jnm",allChoose:"Fg_gHEB2_RjJA7n2xThUV",select:"_1ibpdeUpiDUA7lh3JDj7SU",table:"_17sbwrk45iiciLmuuauJNz",innerBox:"_2Jw8cKyp5nGmQps7akPnIC",tableItem:"_2UF616YDFSnZNrttSww9aW",checked:"_1ktEr8__1sxlaBM9jyC2zQ",options:"_1Wjti9og2mC72XU2APvskI",scroll:"DHVShHP-NwtOgMhDs3KIG"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(84),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(85),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(84),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(193),r(17),r(85),r(7);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(26)),d=n(r(198)),p=n(r(63)),m=n(r(74)),h=n(r(800)),v=n(r(0)),g=n(r(1)),y=r(52),E=r(72),b=n(r(3)),_=r(186),O=n(r(1547)),S=n(r(867));function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t0){var u=n.includes("".concat(l));u&&e.setState({keyError:u},(function(){var a=t("DUPLICATE_KEYS");e.handleError({message:a})}))}},e.handleCfOrScChange=function(t){var a={name:e.props.value.name||"",valueFrom:(0,l.default)({},e.envType,{name:t||"",key:""})};e.validEnvKey(a.name,a),e.props.onChange(a)},e.handleError=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",a=e.props,r=a.handleKeyError,n=a.handleInputError;r(t),n(t)},e.checkNameRepeat=function(t){var a=e.props,r=a.arrayValue,n=a.index;return r.length>1&&r.filter((function(e,a){return e.name===t&&a!==n})).length>0},e.validEnvKey=(0,h.default)((function(a){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!E.PATTERN_ENV_NAME.test(a),l=e.checkNameRepeat(a),u=(0,d.default)(r,"valueFrom")?(0,p.default)(r.valueFrom):""===r.value;if(""===a&&u)e.handleError(),e.setState({keyError:!1});else{if(l){var o=t("DUPLICATE_KEYS");e.handleError({message:o})}else if(n){var i=""!==a?t("ENVIRONMENT_INVALID_TIP"):t("ENVIRONMENT_CANNOT_BE_EMPTY");e.handleError({message:i})}else e.handleError();e.setState({keyError:n||l})}}),300),e.handleValueChange=(0,h.default)((function(t){var a=t.name,r=t.value;""===a&&""===r?(e.props.handleKeyError(),e.props.handleInputError(),e.setState({keyError:!1})):e.validEnvKey(a,{value:r})}),300),e.handleTypeChange=function(t){var a=e.props,r=a.value,n=a.onChange;e.setState({envType:t,keyError:""},(function(){n("customization"!==t?{name:r.name||"",valueFrom:(0,l.default)({},t,{name:"",key:""})}:{name:r.name||"",value:""}),""===r.name&&e.handleError()}))},e.renderConfigOrSecret=function(){var a=e.props.value,r=void 0===a?{}:a,n=e.state.keyError,u=e.parseValue(r.valueFrom),o=u.resourceType,i=u.resourceName,c=u.resourceKey,s={name:r.name,resource:i,resourceKey:c};return v.default.createElement(S.default,{value:s,onChange:e.handleChange},v.default.createElement("div",{className:O.default.typeBox},v.default.createElement(_.Select,{options:e.resourceOptions,onChange:e.handleTypeChange,value:e.envType})),v.default.createElement(_.Input,{name:"name",placeholder:t("KEY"),className:(0,b.default)((0,l.default)({},O.default.formError,n)),onChange:function(t){return e.validEnvKey(t,r)}}),v.default.createElement(_.Select,{name:"resource",placeholder:t("RESOURCE"),prefixIcon:v.default.createElement(_.Icon,{name:"configMapKeyRef"===e.envType?"hammer":"key"}),options:e.getConfigOrSecretOptions,onChange:e.handleCfOrScChange}),v.default.createElement(_.Select,{name:"resourceKey",placeholder:t("KEY_IN_RESOURCE"),options:e.getKeysOptions({resourceType:o,resourceName:i}),onChange:e.handleKeyData}))},e}return(0,o.default)(r,[{key:"componentDidMount",value:function(){this.updateCheckStatus()}},{key:"parseValue",value:function(e){var t=(0,d.default)(e,"configMapKeyRef")?"configMapKeyRef":"secretKeyRef";return{resourceType:t,resourceName:(0,f.default)(e,"".concat(t,".name"),""),resourceKey:(0,f.default)(e,"".concat(t,".key"),"")}}},{key:"getKeysOptions",value:function(e){var t,a=e.resourceType,r=e.resourceName,n=this.props,l=n.configMaps,u=n.secrets;return"configMapKeyRef"===a?t=l.find((function(e){return e.name===r})):"secretKeyRef"===a&&(t=u.find((function(e){return e.name===r}))),t?Object.keys(t.data||{}).map((function(e){return{label:e,value:e}})):[]}},{key:"render",value:function(){var e=this,a=this.props,r=a.value,n=void 0===r?{}:r,u=a.onChange,o=this.state.keyError;return n.valueFrom?this.renderConfigOrSecret():v.default.createElement(S.default,{value:n,onChange:u},v.default.createElement("div",{className:O.default.typeBox},v.default.createElement(_.Select,{options:this.resourceOptions,onChange:this.handleTypeChange,value:this.envType})),v.default.createElement(_.Input,{name:"name",placeholder:t("KEY"),className:(0,b.default)((0,l.default)({},O.default.formError,o)),onChange:function(t){return e.validEnvKey(t,n)}}),v.default.createElement(_.Input,{name:"value",placeholder:t("VALUE"),onChange:function(){return e.handleValueChange(n)}}))}},{key:"envType",get:function(){var e=this.state.envType,t=this.props.value,a=t.valueFrom&&Object.keys(t.valueFrom)[0];return a||e}},{key:"resourceOptions",get:function(){return[{label:t("CUSTOM"),value:"customization"},{label:t("FROM_CONFIGMAP"),value:"configMapKeyRef"},{label:t("FROM_SECRET"),value:"secretKeyRef"}]}},{key:"getConfigOrSecretOptions",get:function(){var e=this.props,t=e.configMaps,a=e.secrets;return"configMapKeyRef"===this.envType?t.map((function(e){return{label:(0,y.getDisplayName)(e),value:e.name}})):a.map((function(e){return{label:(0,y.getDisplayName)(e),value:e.name}}))}}]),r}(v.default.Component);a.default=N,N.propTypes={value:g.default.object,onChange:g.default.func,configMaps:g.default.array,secrets:g.default.array},N.defaultProps={name:"",value:{},onChange:function(){},configMaps:[],secrets:[]}},function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(11),a(6),a(28),a(34),a(15),a(9),a(13),a(10),a(4),a(7);var l=n(a(30)),u=n(a(58)),o=n(a(96)),i=r(a(0)),c=a(186),s=n(a(3)),f=n(a(2304));function d(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}var p=function(e){var t=e.children,a=e.className,r=e.text,n=e.dataTest,p=e.onOK,m=e.modalHeight,h=(0,i.useRef)(),v=(0,i.useState)(!1),g=(0,o.default)(v,2),y=g[0],E=g[1],b=(0,i.useState)({x:"100%",y:"100%",y1:0,height:32}),_=(0,o.default)(b,2),O=_[0],S=_[1],C=function(){E(!y)},D=t.props,k=D.className,N=(0,u.default)(D,["className"]),T=i.default.cloneElement(t,function(e){for(var t=1;t0?l-u:l-12,y1:a+7,height:r})),E(!y)},"data-test":n},r),i.default.createElement("div",{className:(0,s.default)(f.default.triangle,(0,l.default)({},f.default.showModal,y)),style:{top:O.y1,left:O.x}}))};t.default=p},function(e,t,a){e.exports={buttonModalBox:"_2_csTIElkvsBzjHdoPar-Y",modal:"_20nMOVrlzEe8lRAHGp8Ka7",triangle:"_2_7O7g-y-zVcwFvGHPcxyz",showModal:"_18GWZH_n37uqfC9dcmi96j"}},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(18),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(18),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(7);var l,u,o,i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(239),v=n(r(1)),g=n(r(3)),y=n(r(135)),E=r(186),b=n(r(828)),_=n(r(2306)),O=n(r(1549)),S=n(r(2307));function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var k=[{value:"http",desc:"HTTP_REQUEST"},{value:"command",desc:"COMMAND"},{value:"tcp",desc:"TCP_PORT"}],N=(0,h.observer)((o=u=function(e){(0,f.default)(r,e);var a=D(r);function r(e){var t;return(0,c.default)(this,r),(t=a.call(this,e)).filterData=function(e){var a=t.state.checkerType,r=function(e){for(var t=1;t0||(n.ImageDetail={image:i,secret:n.secret,logo:r,short_description:u},n.getImageDetail(n.ImageDetail))}}),800,{leading:!0,trailing:!1}),n.getImageDetailNoCert=function(){n.getImageDetail(L(L({},n.ImageDetail),{},{insecure:!0}))},n.getImage=function(){var e=(0,c.default)(i.default.mark((function e(t){var a,r,l,u,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.image,r=t.insecure,l=t.tag,u=n.getImageParam(),n.setState({selectedLoading:!0}),e.next=5,n.store.getImageDetail(L({image:"".concat(a,":").concat(l||"lastest"),secret:n.secret,insecure:r},u));case 5:return o=e.sent,n.setState({selectedLoading:!1}),e.abrupt("return",o);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.getImageList=function(){var e=(0,c.default)(i.default.mark((function e(t){var a,r,l,u,c,s,f;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.imageName,r=t.insecure,l=t.page,u=(0,o.default)(t,["imageName","insecure","page"]),c=n.getImageParam(),s=a||n.image,e.next=5,n.store.getImageTagList(L(L({repository:s,insecure:r,page:l,secret:n.secret},u),c));case 5:return f=e.sent,u.more&&n.setState({imageTagList:f}),e.abrupt("return",f);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.getImageDetail=(0,b.default)(function(){var e=(0,c.default)(i.default.mark((function e(t){var a,r,l,u,o,c,s,f;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.image,r=t.insecure,l=t.secret,a&&!n.isUnMounted){e.next=3;break}return e.abrupt("return");case 3:if(n.image=a,n.setState({isLoading:!0}),u=n.getImageParam(),o=n.getTag(a),c=o.imageName,!(s=o.tag)||"latest"===s){e.next=15;break}return e.next=10,n.store.getImageDetail(L(L({image:"".concat(c,":").concat(s),insecure:r},u),{},{secret:l}));case 10:f=e.sent,n.store.updateTagList({data:[s],total:1,limit:Number(u.limit)||10,page:Number(u.page)||1,isLoading:!1}),n.setState({isLoading:!1,selectedImageTag:s,selectedImage:L(L({},f),{},{image:"".concat(c,":").concat(s)})},(function(){(0,C.default)(n.props.formTemplate,"image",n.state.selectedImage.image),n.context.setImageDetail&&n.context.setImageDetail(n.state.selectedImage)})),e.next=18;break;case 15:return e.next=17,n.getImageList(L({imageName:c,page:1},u));case 17:n.setState({selectedImage:void 0,selectedImageTag:"",isLoading:!1});case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),800,{leading:!0,trailing:!1}),n.renderWaringText=function(){return v.default.createElement("p",null,t("IGNORE_CERT_WARN_DESC"))},n.onSelectImageTag=(0,S.default)(function(){var e=(0,c.default)(i.default.mark((function e(t){var a,r,l,u,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.setState({selectedImageTag:t}),a=n.image,r=n.getTag(a),l=r.imageName,u="".concat(l,":").concat(t),e.next=6,n.getImage({image:l,tag:t});case 6:o=e.sent,(0,C.default)(n.props.formTemplate,"image",u),n.setState({selectedImage:L(L({},o),{},{image:u})},(function(){n.context.setImageDetail&&n.context.setImageDetail(n.state.selectedImage)}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),300,{leading:!1,trailing:!0}),n.renderWaringText=function(){return v.default.createElement("p",null,t("IGNORE_CERT_WARN_DESC"))},n.renderSelectedContent=function(){if(n.state.isLoading)return v.default.createElement(N.Loading,null,v.default.createElement("div",{className:A.default.selectedContent}));var e=n.state,a=e.selectedImage,r=e.selectedImageTag,l=e.selectedLoading,u=(0,y.toJS)(n.store.tagList);if((0,O.default)(a)){var o=a.message;if("failed"===a.status)return o&&o.includes("x509")?v.default.createElement("div",{className:(0,k.default)(A.default.selectedContent,A.default.emptyContent)},v.default.createElement(N.Icon,{name:"docker",className:A.default.icon}),v.default.createElement("p",{className:A.default.desc},t("CERT_ERROR"),v.default.createElement(N.Tooltip,{content:n.renderWaringText},v.default.createElement("span",{className:A.default.textConfirm,onClick:n.getImageDetailNoCert},t("IGNORE_AND_RETRY"))))):v.default.createElement("div",{className:(0,k.default)(A.default.selectedContent,A.default.emptyContent)},v.default.createElement("div",null,v.default.createElement(N.Icon,{name:"docker",className:A.default.icon}),v.default.createElement("p",{className:A.default.desc},t("NO_IMAGE_FOUND"))));var i=a.image,c=a.createTime,s=a.exposedPorts,f=void 0===s?[]:s,d=a.logo,p=a.short_description,m=i.indexOf("/")>-1?i.split("/")[0]:"docker.io",h=f.join("; "),g=o||p;return v.default.createElement(v.default.Fragment,null,v.default.createElement("div",{className:A.default.selectedContent},v.default.createElement(N.Loading,{spinning:l},v.default.createElement("div",{className:A.default.selectedImageInfo},v.default.createElement("div",{className:A.default.selectedInfo},v.default.createElement("img",{className:A.default.logo,src:d||"/assets/no_img.svg",alt:i}),v.default.createElement("div",{className:A.default.imageInfo},v.default.createElement("p",null,i),v.default.createElement("p",null,t("IMAGE_TIME_SIZE_LAYER",{time:(0,D.default)(c).fromNow()})))),v.default.createElement("div",{className:A.default.selectedInfo},v.default.createElement(N.Icon,{name:"port",className:A.default.icon}),v.default.createElement("div",{className:A.default.imageInfo},v.default.createElement("p",null,h||t("NO_DEFAULT_PORT")),v.default.createElement("p",null,t("PORT")))),v.default.createElement("div",{className:A.default.selectedInfo},v.default.createElement(N.Icon,{name:"docker",className:A.default.icon}),v.default.createElement("div",{className:A.default.imageInfo},v.default.createElement("p",null,m),v.default.createElement("p",null,t("REGISTRY")))))),g?v.default.createElement("div",{className:A.default.message},g):null,v.default.createElement(P.default,{onSelectImageTag:n.onSelectImageTag,selectedImageTag:r,tagList:u,getImageList:n.getImageList})))}return u.data.length>0?v.default.createElement(P.default,{onSelectImageTag:n.onSelectImageTag,selectedImageTag:r,tagList:(0,y.toJS)(n.store.tagList),getImageList:n.getImageList}):v.default.createElement("div",{className:(0,k.default)(A.default.selectedContent,A.default.emptyContent)},v.default.createElement("div",null,v.default.createElement(N.Icon,{name:"docker",className:A.default.icon}),v.default.createElement("p",{className:A.default.desc},t("SET_IMAGE_DESC"))))},n.imageRequiredValidator=function(e,a,r){if((0,_.default)(a))return r({message:t("IMAGE_EMPTY")});r()},n.store=e.isEdgeWize?new I.default:new w.default,n.getImageDetail=(0,S.default)(n.getImageDetail,1e3),n.state={isLoading:!1,selectedImage:void 0,selectedImageTag:void 0,selectedLoading:!1},n}return(0,d.default)(r,[{key:"componentDidMount",value:function(){var e,t,a=this,r=this.props,n=r.formTemplate,l=r.imageRegistries,u=(0,E.default)(n,"image",""),o=(null!==(e=null===(t=l.find((function(e){return e.value===a.secret})))||void 0===t?void 0:t.url)&&void 0!==e?e:"").replace(/^(http(s)?:\/\/)?(.*)$/,"$3");u&&u!==o&&this.getImageDetail({image:u,secret:this.secret})}},{key:"componentWillUnmount",value:function(){this.isUnMounted=!0}},{key:"render",value:function(){var e=t.html("IMAGE_DESC",{link:(0,T.getDocsUrl)("imageregistry")});return v.default.createElement(v.default.Fragment,null,v.default.createElement(N.Form.Item,{label:t("IMAGE"),desc:(0,T.learnMoreTip)(e),rules:[{pattern:R.PATTERN_IMAGE,message:t("INVALID_IMAGE")},{validator:this.imageRequiredValidator}]},v.default.createElement(M.default,(0,u.default)({},this.props,{store:this.store,onEnter:this.handleEnter,name:"image",onLoading:this.handleLoadingChange}))),globals.config.enableImageSearch&&this.renderSelectedContent())}},{key:"secret",get:function(){var e=this.props,t=e.imageRegistries,a=e.formTemplate,r=t.find((function(e){return e.isDefault}));return(0,E.default)(a,"pullSecret",(null==r?void 0:r.value)||"")}}]),r}(v.Component);a.default=U,U.defaultProps={className:"",type:"add"},U.contextTypes={forceUpdate:g.default.func,setImageDetail:g.default.func}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(31),r(86),r(18),r(320),r(16),r(27),r(4),r(22),r(196),r(23),r(139),r(24),r(17),r(64),r(188),r(136),r(75),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(31),r(86),r(18),r(320),r(42),r(16),r(27),r(4),r(22),r(196),r(23),r(57),r(139),r(251),r(24),r(252),r(17),r(64),r(188),r(75);var l=n(r(61)),u=n(r(30)),o=n(r(43));r(41);var i=n(r(44)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=n(r(1)),v=n(r(26)),g=n(r(74)),y=n(r(63)),E=n(r(3)),b=r(186),_=n(r(2315)),O=n(r(2317)),S=n(r(1550));function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var D=function(e){(0,f.default)(r,e);var a=C(r);function r(e){var n;(0,c.default)(this,r),(n=a.call(this,e)).handleDOMClick=function(e){n.dropContentRef&&n.dropContentRef.current&&!n.dropContentRef.current.contains(e.target)&&n.hideContent()},n.showContent=function(e){e.stopPropagation(),n.setState({visible:!0},(function(){document.addEventListener("click",n.handleDOMClick),"dockerHub"!==n.hubType&&n.fetchHarborList("",n.state.harborData)}))},n.hideContent=function(){"dockerHub"!==n.hubType&&n.setState({harborList:[]}),n.setState({visible:!1},(function(){document.removeEventListener("click",n.handleDOMClick)}))},n.handleDetailRedirect=function(e){var t=e.currentTarget.dataset.image;window.open("https://hub.docker.com/_/".concat(t))},n.handleSecretChange=function(e){if(e){var t=n.props.imageRegistries.filter((function(t){return t.value===e}))[0];n.setState({harborData:t})}var a=n.props.formTemplate;(0,g.default)(a,"pullSecret",e),n.props.onChange(n.registryUrl)},n.handleInputChange=function(e,t){var a=t;n.registryUrl&&(a="".concat(n.registryUrl,"/").concat(t).replace(/\/+/g,"/")),a=a.replace(/\s+/g,""),n.props.onChange(a),n.context.setImageDetail&&n.context.setImageDetail({image:a})},n.handleKeyUp=function(e){13===e.keyCode&&n.handleConfirm()},n.handleConfirm=function(){n.imageName&&n.props.onEnter()},n.handleDockerImageSelected=function(){var e=(0,i.default)(o.default.mark((function e(t){var a,r,l,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=t.currentTarget.dataset,r=a.image,l=a.logo,u=a.short_description,n.props.onChange(r),n.hideContent(),n.props.onEnter({logo:l,short_description:u});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.handleHarborImageSelected=function(){var e=(0,i.default)(o.default.mark((function e(t){var a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a="".concat(t.repository_name),"","",n.props.onChange("".concat(n.registryUrl,"/").concat(a)),n.hideContent(),n.props.onEnter({logo:"",short_description:""});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.handleSearchDockerHub=function(e){n.fetchDockerList(e)},n.handleSearchHarbor=function(e){n.fetchHarborList(e,n.state.harborData)},n.fetchDockerList=function(){var e=(0,i.default)(o.default.mark((function e(t){var a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.setState({isLoading:!0}),e.next=3,n.store.getDockerImagesLists({q:t||"",image_filter:t?void 0:"official",page_size:50,type:"image"}).finally((function(){!n.isUnMounted&&n.setState({isLoading:!1})}));case 3:a=e.sent,!n.isUnMounted&&n.setState({dockerList:(0,v.default)(a,"summaries",[])});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.fetchHarborList=function(){var e=(0,i.default)(o.default.mark((function e(t,a){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,v.default)(a,"url")&&!(0,y.default)(a)){e.next=3;break}return e.abrupt("return");case 3:return n.setState({isLoading:!0}),e.next=6,n.store.getHarborImagesLists({harborData:a,params:{q:t||""}}).finally((function(){!n.isUnMounted&&n.setState({isLoading:!1})}));case 6:r=e.sent,!n.isUnMounted&&n.setState({harborList:(0,v.default)(r,"repository",[])});case 8:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}(),n.renderContent=function(){return n.state.visible?m.default.createElement("div",{className:(0,E.default)(S.default.dropContent,(0,u.default)({},S.default.dropContent_hide,!n.state.visible)),ref:n.dropContentRef},m.default.createElement("div",{className:S.default.header},m.default.createElement(b.InputSearch,{className:S.default.search,onSearch:"dockerHub"===n.hubType?n.handleSearchDockerHub:n.handleSearchHarbor,placeholder:t("SEARCH")}),n.state.isLoading&&m.default.createElement(b.Loading,{className:"float-left",size:28})),"dockerHub"===n.hubType?n.renderDockerList():n.renderHarborList()):null};var l=n.props.imageRegistries,s="harbor"===n.hubType?l.find((function(e){return e.value===n.secretValue})):{};return n.state={dockerList:[],harborList:[],harborData:s,visible:!1,isLoading:!1},n.store=e.store,n.dropContentRef=m.default.createRef(),n.isUnMounted=!1,n}return(0,s.default)(r,[{key:"componentDidMount",value:function(){"Edit"!==this.props.type&&""!==this.secretValue&&this.handleSecretChange(this.secretValue),"dockerHub"===this.hubType&&this.fetchDockerList(),"harbor"===this.hubType&&this.fetchHarborList("",this.state.harborData)}},{key:"componentWillUnmount",value:function(){this.isUnMounted=!0,document.removeEventListener("click",this.handleDOMClick)}},{key:"renderDockerList",value:function(){var e=this;return(0,y.default)(this.state.dockerList)?m.default.createElement("ul",{className:S.default.listContent},m.default.createElement("div",{className:(0,E.default)(S.default.selectedContent,S.default.emptyContent)},m.default.createElement("div",null,m.default.createElement(b.Icon,{name:"docker",className:S.default.icon}),m.default.createElement("p",{className:S.default.desc},t("NO_IMAGE_FOUND"))))):m.default.createElement("ul",{className:S.default.listContent},this.state.dockerList.map((function(t){return m.default.createElement("li",{className:S.default.ImageItem,key:t.name},m.default.createElement("img",{src:(0,v.default)(t,"logo_url.large")||"/assets/no_img.svg",alt:t.name}),m.default.createElement("div",{className:S.default.info},m.default.createElement("p",{onClick:e.handleDockerImageSelected,className:S.default.clickable,"data-image":t.slug,"data-logo":(0,v.default)(t,"logo_url.large",""),"data-short_description":t.short_description},t.name),m.default.createElement("p",null,t.short_description)),m.default.createElement("div",{className:S.default.starContainer},m.default.createElement(b.Icon,{className:S.default.star,name:"star"}),t.star_count),m.default.createElement("div",{className:S.default.actions},m.default.createElement("span",{className:S.default.clickable,onClick:e.handleDetailRedirect,"data-image":t.slug},m.default.createElement(b.Icon,{name:"paper",size:16,changeable:!0})),m.default.createElement("span",{className:S.default.clickable,onClick:e.handleDockerImageSelected,"data-image":t.slug,"data-logo":(0,v.default)(t,"logo_url.large",""),"data-short_description":t.short_description},m.default.createElement(b.Icon,{name:"check",size:16,changeable:!0}))))})))}},{key:"renderHarborList",value:function(){var e=this;return(0,y.default)(this.state.harborList)?m.default.createElement("ul",{className:S.default.listContent},m.default.createElement("div",{className:(0,E.default)(S.default.selectedContent,S.default.emptyContent)},m.default.createElement("div",null,m.default.createElement(b.Icon,{name:"docker",className:S.default.icon}),m.default.createElement("p",{className:S.default.desc},t("NO_IMAGE_FOUND"))))):m.default.createElement("ul",{className:S.default.listContent},this.state.harborList.map((function(t){return m.default.createElement("li",{className:S.default.ImageItem,key:t.repository_name},m.default.createElement("img",{src:"/assets/no_img.svg",alt:t.repository_name}),m.default.createElement("div",{className:S.default.info},m.default.createElement("p",{onClick:function(a){return e.handleHarborImageSelected(t,a)},className:S.default.clickable},t.repository_name)),m.default.createElement("div",{className:S.default.actions},m.default.createElement("span",{className:S.default.clickable,onClick:function(a){return e.handleHarborImageSelected(t,a)}},m.default.createElement(b.Icon,{name:"check",size:16,changeable:!0}))))})))}},{key:"render",value:function(){var e=this;return m.default.createElement(m.default.Fragment,null,m.default.createElement(O.default,{className:S.default.imageInput,onChange:this.handleInputChange,value:this.imageName,autoComplete:"off",placeholder:this.secretValue?"nginx:latest":t("IMAGE_PLACEHOLDER"),onBlur:this.handleConfirm,onKeyUp:this.handleKeyUp},m.default.createElement(_.default,{value:this.secretValue,className:S.default.secretSelect,options:this.secretsOptions,onChange:this.handleSecretChange,disabled:this.secretsOptions.length<=1})),"others"===this.hubType||globals.config.enableImageSearch?m.default.createElement(b.Icon,{name:"templet",changeable:!0,className:S.default.dropDownIcon,onClick:function(t){return e.showContent(t)}}):null,this.renderContent())}},{key:"defaultImage",get:function(){return this.props.imageRegistries.find((function(e){return e.isDefault}))}},{key:"secretValue",get:function(){var e,t=this.props,a=t.formTemplate;return"Edit"===t.type?(0,v.default)(a,"pullSecret",""):(0,v.default)(a,"pullSecret",(null===(e=this.defaultImage)||void 0===e?void 0:e.value)||"")}},{key:"hubType",get:function(){return this.registryUrl.indexOf("docker.io")>=0||""===this.secretValue?"dockerHub":this.secretValue&&this.registryUrl.indexOf("docker.io")<0?"harbor":"others"}},{key:"registryUrl",get:function(){var e=this,t=this.props.imageRegistries;if(!(0,y.default)(t)&&this.secretValue){var a=t.find((function(t){return t.value===e.secretValue})),r=(0,v.default)(a,"url","");if(r)return r=(r=r.replace(/^(http(s)?:\/\/)?(.*)$/,"$3")).split("/")[0]}return""}},{key:"imageName",get:function(){var e=this.props.value;if(e.startsWith(this.registryUrl)){var t=new RegExp("".concat(this.registryUrl,"(/)?"));return e.replace(t,"")}return e}},{key:"secretsOptions",get:function(){var e=this.props.imageRegistries.map((function(e){return{label:e.label,value:e.value,url:e.url,isDefault:e.isDefault}}));return[{label:"Docker Hub",value:"",url:"",isDefault:!this.defaultImage}].concat((0,l.default)(e)).sort((function(e,t){return Number(!!t.isDefault)-Number(!!e.isDefault)}))}}]),r}(m.default.Component);a.default=D,D.contextTypes={setImageDetail:h.default.func},D.defaultProps={imageRegistries:[],className:"",value:"",onChange:function(){}}},function(e,a,r){"use strict";r(15);var n=r(20);r(11),r(31),r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(11),r(31),r(18),r(42),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(800)),m=n(r(63)),h=n(r(158)),v=n(r(837)),g=n(r(3)),y=r(186),E=n(r(2316));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var _=function(e){(0,i.default)(r,e);var a=b(r);function r(e){var t;return(0,u.default)(this,r),(t=a.call(this,e)).triggerChange=(0,p.default)((function(){(0,t.props.onChange)(t.state.value)})),t.handleClick=function(e){t.setState({value:e,showOptions:!1},(function(){t.triggerChange()}))},t.toggleShowOptions=function(){t.setState({showOptions:!t.state.showOptions})},t.handleShowOptions=function(){t.setState({showOptions:!0})},t.handleHideOptions=function(){t.setState({showOptions:!1})},t.state={value:(0,h.default)(e.value)?e.defaultValue:e.value,showOptions:!1},t.optionsRef=f.default.createRef(),t}return(0,o.default)(r,[{key:"renderOption",value:function(e,a){var r=this;return f.default.createElement("div",{key:e.uid||e.value,onClick:function(){return r.handleClick(e.value)},className:(0,g.default)(E.default.option,(0,l.default)({},E.default.selected,a))},f.default.createElement("div",{className:E.default.optionCol},f.default.createElement("span",{className:E.default.optionLabel},e.label),e.isDefault&&f.default.createElement("span",{className:E.default.defaultTag},t("DEFAULT"))),f.default.createElement("p",null,e.url))}},{key:"renderOptions",value:function(){var e=this,t=this.props,a=t.options,r=t.disabled,n=this.state.value;if(r||(0,m.default)(a))return null;var l=a.find((function(e){return(0,v.default)(e.value,n)}));return f.default.createElement("div",{className:E.default.options},l&&this.renderOption(l,!0),a.filter((function(e){return!(0,v.default)(e.value,n)})).map((function(t){return e.renderOption(t)})))}},{key:"renderControl",value:function(){var e=this.props,t=e.value,a=e.defaultValue,r=e.placeholder,n=e.options,u=e.disabled,o=t||a,i=n.find((function(e){return(0,v.default)(e.value,o)}))||r||{};return f.default.createElement("div",{className:E.default.control},f.default.createElement("span",{className:E.default.label},i.label),!u&&f.default.createElement(y.Icon,{className:(0,g.default)(E.default.rightIcon,(0,l.default)({},E.default.rightIcon_toggle,this.state.showOptions)),name:"chevron-down",size:20}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.disabled;return f.default.createElement("div",{className:(0,g.default)(E.default.wrapper,(0,l.default)({},E.default.disabled,a),t),onClick:this.toggleShowOptions},f.default.createElement(y.Dropdown,{closeAfterClick:!1,visible:this.state.showOptions,onOpen:this.handleShowOptions,onClose:this.handleHideOptions,content:this.renderOptions()},this.renderControl()))}}]),r}(f.default.Component);a.default=_,_.propTypes={className:d.default.string,value:d.default.any,defaultValue:d.default.any,options:d.default.array.isRequired,onChange:d.default.func},_.defaultProps={className:"",defaultValue:"",options:[],onChange:function(){}}},function(e,t,a){e.exports={wrapper:"S_heeB_hWWpcU9iQV27vw",disabled:"_1aEV1eGRRlcxgiiUgzDi4t",control:"_3VHbJcAvcKO3wpbr1S6Nax",options:"_3xbjYC08sAusjBLLYYmR10",label:"_1O8-tjKxx-KQjGqUDhfVTm",rightIcon:"_2KGD9mmPPR7LoALKbTXcqH",rightIcon_toggle:"_300TNQVWjbgMrbsLWW7bIU",selected:"_1pwHXZgl5FXdbBPslY8RjQ",option:"_13sntOU00zu8UIQHzr2jVu",optionCol:"Fk2RtFUjO7CJPWmtz7pYR",optionLabel:"FoyZHugIgAhtpqKQ65mpA",defaultTag:"_1j6G6ToUdFdTGLih7mSwsc"}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var l=n(a(315)),u=n(a(30)),o=n(a(58)),i=n(a(36)),c=n(a(37)),s=n(a(55)),f=n(a(56)),d=n(a(51)),p=r(a(0)),m=n(a(1)),h=n(a(3)),v=n(a(194)),g=n(a(189)),y=n(a(455)),E=n(a(2318));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var _=function(e){(0,s.default)(a,e);var t=b(a);function a(e){var r;return(0,i.default)(this,a),(r=t.call(this,e)).focus=function(){r.node.focus()},r.blur=function(){r.node.blur()},r.handleChange=function(e){var t=e.target.value,a=r.props,n=a.value,l=a.onChange,u=n||t;r.setState({value:u}),l!==y.default&&l(e,t)},r.handleKeyDown=function(e){var t=r.props,a=t.onPressEnter,n=t.onKeyDown;13===e.keyCode&&a&&a(e),n&&n(e)},r.state={value:String(e.value||e.defaultValue),isFocus:!1},r}return(0,c.default)(a,[{key:"render",value:function(){var e=this,t=this.props,a=t.className,r=t.size,n=t.disabled,i=t.children,c=(0,o.default)(t,["className","size","disabled","children"]),s=this.state.value;return p.default.createElement("span",{className:(0,h.default)(E.default.input,a,(0,u.default)({},"is-".concat(r),r))},i,p.default.createElement("input",(0,l.default)({},(0,g.default)(c,"schemas","onKeyDown","onPressEnter","onChange","value","defaultValue","validateStatus","validateHelp","validateIcon","validateOnChange","validateOnBlur"),{disabled:(0,v.default)(n)?n():n,onKeyDown:this.handleKeyDown,onChange:this.handleChange,value:s,ref:function(t){e.node=t},"data-test":"imageSearch"})),p.default.createElement("span",{className:(0,h.default)(E.default.border,"input")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return"value"in e&&e.value!==t.value?{value:e.value}:null}}]),a}(p.PureComponent);_.propTypes={name:m.default.string,type:m.default.string,className:m.default.string,size:m.default.oneOf(["small","default","large"]),value:m.default.oneOfType([m.default.string,m.default.number]),defaultValue:m.default.oneOfType([m.default.string,m.default.number]),disabled:m.default.oneOfType([m.default.bool,m.default.func]),onChange:m.default.func,onPressEnter:m.default.func,onKeyDown:m.default.func},_.defaultProps={type:"text",size:"default",disabled:!1,onChange:y.default,onPressEnter:y.default,onKeyDown:y.default,defaultValue:""};var O=_;t.default=O},function(e,t,a){e.exports={input:"_3vEQEMHbKh8LmE9d-auvSs",border:"_1UKB-z9KeXbZ9cQ3YQrnb2","is-small":"TnU7NSMR7wf7uCvk9WTBN",icon:"-ImUGeX33ECFh2FmuR9Z4","is-default":"_1o8YS1PIPm0_aFGs2NPwvr","is-large":"_3R2fJgdHmL4vLxJtTakF_B"}},function(e,t,a){"use strict";a(15);var r=a(20),n=a(157);a(18),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(18);var l=n(a(0)),u=a(186),o=r(a(863)),i=a(14),c=r(a(2322)),s=r(a(1551)),f=function(e){var t=e.selectedImageTag,a=e.onSelectImageTag,r=e.getImageList,n=e.tagList,f=(0,l.useCallback)((function(e){a(e)}),[]),d=n||{},p=d.data,m=d.page,h=d.total,v=d.isLoading;return l.default.createElement("div",{className:s.default.content},l.default.createElement(u.RadioGroup,{wrapClassName:1===h?s.default.radioOnlyOneListContent:s.default.radioListContent,onChange:f,value:t},l.default.createElement(o.default,{className:s.default.radioList,data:(0,i.toJS)(p),page:m,total:h,loading:v,noMount:!0,onFetch:r},p.map((function(e){return l.default.createElement(u.Radio,{value:e,key:e},l.default.createElement(c.default,{tag:e,selectedImageTag:t}))})))))};t.default=f},function(e,t,a){e.exports={wrapper:"Fxc1J8GJ2h6_Qd-n9BxZg",content:"_3DotkGf2uSTDa1JBsYdIsb"}},function(e,t,a){e.exports={wrapper:"_1HH_wApq9OB2Afiw8FUQG5",main:"_3Z6raG0G-fxugjFdD2je6J",content:"_2yXgC1SbTsHsrlUb6aUTxo",loadMore:"_33OcD9PenJa0VjGHcOD-aD",empty:"_2sZpot3ZfCOM9QHB7RXOkx"}},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(30)),l=r(a(0)),u=a(186),o=r(a(3)),i=r(a(1551)),c=function(e){var t=e.tag,a=e.selectedImageTag;return l.default.createElement("div",{className:(0,o.default)(i.default.imageTagDetailItem,(0,n.default)({},i.default.checked,t===a))},l.default.createElement(u.Icon,{name:"tag",className:i.default.icon,size:20,type:t===a?"light":"dark"}),l.default.createElement("p",{className:i.default.tagName},t))};t.default=c},function(e,t,a){e.exports={message:"_3obsx3JGHNcPFHM89AsInE",imageSearch:"_1OhvKXsP4kv0J873sFRM-g",columns:"aQZPHiJZpM_2WxHh0UHol",type:"_2LIGHzmFbBVhNOoFy_Ed-j"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(2325)),p=n(r(1552)),m=n(r(1553)),h=n(r(2330));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var g=function(e){(0,o.default)(r,e);var a=v(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement(f.Form.Group,{label:t("CONTAINER_SECURITY_CONTEXT"),desc:t("CONTAINER_SECURITY_CONTEXT_DESC"),checkable:!0},s.default.createElement(d.default,null),s.default.createElement(p.default,null),s.default.createElement(m.default,null),s.default.createElement(h.default,null))}}]),r}(s.default.PureComponent);a.default=g},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(1099)),p=n(r(2327));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var h=function(e){(0,o.default)(r,e);var a=m(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement("div",{className:"margin-b12"},s.default.createElement("div",{className:p.default.title},t("ACCESS_CONTROL")),s.default.createElement("div",{className:p.default.content},s.default.createElement(f.Form.Item,null,s.default.createElement(d.default,{name:"".concat(this.prefix,".privileged"),title:t("PRIVILEGED_MODE"),description:t("PRIVILEGED_MODE_DESC")})),s.default.createElement(f.Form.Item,null,s.default.createElement(d.default,{name:"".concat(this.prefix,".allowPrivilegeEscalation"),title:t("ALLOW_PRIVILEGE_ESCALATION"),description:t("ALLOW_PRIVILEGE_ESCALATION_DESC")})),s.default.createElement(f.Form.Item,null,s.default.createElement(d.default,{name:"".concat(this.prefix,".readOnlyRootFilesystem"),title:t("ROOT_DIRECTORY_READONLY"),description:t("ROOT_DIRECTORY_READONLY_DESC")}))))}},{key:"prefix",get:function(){return this.props.prefix||"securityContext"}}]),r}(s.default.Component);a.default=h},function(e,t,a){e.exports={wrapper:"_15WzUlcoLloZykJlZj0Apo",text:"_1FbvXHTu2eI1KD5ONd5HH0"}},function(e,t,a){e.exports={title:"xiiGbS5phbPetinkKktv5",content:"_3MKZeMiqNiY37e6ZT3uCbc"}},function(e,t,a){e.exports={title:"_93bRvqjERHRqTzbtsZ3hA",content:"ALf6y5a4svCrpH2U0yUs8"}},function(e,t,a){e.exports={title:"_3mzDzs1cbhNCB3Q4DZTkCL",content:"_2BaVtn2VyGgZ9YmDM_znzH"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(829)),p=n(r(2331)),m=n(r(2332));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(r,e);var a=h(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement("div",{className:"margin-b12"},s.default.createElement("div",{className:m.default.title},t("CAPABILITIES")),s.default.createElement("div",{className:m.default.content},s.default.createElement(f.Form.Item,{label:t("ADD")},s.default.createElement(d.default,{name:"".concat(this.prefix,".capabilities.add")},s.default.createElement(p.default,null))),s.default.createElement(f.Form.Item,{label:t("DROP")},s.default.createElement(d.default,{name:"".concat(this.prefix,".capabilities.drop")},s.default.createElement(p.default,null)))))}},{key:"prefix",get:function(){return this.props.prefix||"securityContext"}}]),r}(s.default.Component);a.default=v},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(58)),l=r(a(0)),u=a(186),o=function(e){e.arrayValue,e.handleKeyError;var t=(0,n.default)(e,["arrayValue","handleKeyError"]);return l.default.createElement(u.Input,t)};t.default=o},function(e,t,a){e.exports={title:"K8wgjzWlByq5WsuMlI7Tf",content:"_3X53teLvKWLW3f9mdpe3jg"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(97),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(97),r(42),r(4),r(23),r(57),r(17);var l=n(r(61)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(26)),p=n(r(74)),m=r(186),h=n(r(2334));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=function(e){(0,i.default)(r,e);var a=v(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),o=0;o0?0:1}}),(function(){e.triggerChange()}))},e.stopPropagation=function(e){return e.stopPropagation()},e}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props.cluster,a=this.state.replicas,r=!!a;return d.default.createElement("div",{className:(0,p.default)(v.default.wrapper,(0,u.default)({},v.default.checked,r)),onClick:this.handleWrapperClick},d.default.createElement(h.Checkbox,{checked:r,onClick:this.handleWrapperClick},d.default.createElement("span",{title:e},e)),d.default.createElement("div",{className:v.default.replicas,onClick:this.stopPropagation},d.default.createElement(h.Icon,{name:"substract",type:"light",size:20,clickable:!0,disabled:!r,onClick:this.handleSubStract}),d.default.createElement("span",{className:v.default.value},a,d.default.createElement("span",null," ",1===a?t("REPLICA_LOW_SI"):t("REPLICA_LOW_PL"))),d.default.createElement(h.Icon,{name:"add",type:"light",size:20,clickable:!0,disabled:!r,onClick:this.handleAdd})))}}]),r}(d.Component);a.default=y},function(e,t,a){e.exports={wrapper:"_1mKVwkCL_1ppeUigF3KAKg",checked:"_3b5rXyVfHzVbq7BXgqnsUg",replicas:"_1q8JcEqV4JG13oRb9C3HI_",value:"_1GwFMwt-s5K68TjO9mYodk"}},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(5),r(18),r(16),r(27),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(16),r(27),r(4),r(23),r(57),r(24),r(193),r(17);var u,o,i,c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=l(r(0)),h=n(r(26)),v=n(r(74)),g=r(14),y=r(239),E=r(186),b=n(r(1)),_=n(r(2343)),O=n(r(2345));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,p.default)(e);if(t){var n=(0,p.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,d.default)(this,a)}}var C=(0,y.observer)((i=o=function(e){(0,f.default)(r,e);var a=S(r);function r(){var e;(0,c.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u0&&void 0!==arguments[0]?arguments[0]:"";e.metaError=t},e.metaDataValidator=function(t,a,r){""===e.metaError&&r()},e}return(0,u.default)(r,[{key:"render",value:function(){return s.default.createElement(s.default.Fragment,null,s.default.createElement(f.Form.Item,{label:t("ANNOTATION_PL"),rules:[{validator:this.metaDataValidator}]},s.default.createElement(d.default,{name:"spec.template.metadata.annotations",addText:t("ADD"),hiddenKeys:globals.config.preservedAnnotations,onError:this.handleMetaError})))}}]),r}(s.default.Component);a.default=m},function(e,t,a){e.exports={formTip:"_19f0EVWj1un4oHSHVFkfCG",tipLabel:"_1QFTfCmmiYYArD4XUdtrk3",tipBox:"_2TmZJA7LIvFo8yQBSA3Ay3",tipTitle:"_2mM1im5fQ7ZlOrtF10n8QH"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var u=l(r(36)),o=l(r(37)),i=l(r(55)),c=l(r(56)),s=l(r(51)),f=n(r(0)),d=l(r(1)),p=r(186),m=l(r(2357));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var v=function(e){(0,i.default)(r,e);var a=h(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&(i[0].volume=(0,g.default)(i[0].volume,r)),{newVolume:u,newMounts:[].concat((0,l.default)(o),(0,l.default)(i))}},t.handleTypeChange=function(e){t.setState({type:e})},t.formRef=p.default.createRef(),t.state={type:t.checkVolumeType(e.volume)||"exist",editVolume:{}},t}return(0,c.default)(r,[{key:"componentDidMount",value:function(){var e=this.props.onCancel,t=this.context.registerSubRoute;t&&t(this.handleSubmit,e),this.saveEditVolume()}},{key:"saveEditVolume",value:function(){var e=this.props.volume;if(!(0,v.default)(e)){var t=this.volumeTypeMap(Object.keys((0,g.default)(e,["name","volumeMounts"])));"exist"!==t?this.setState({editVolume:{name:e.name,type:t}}):this.setState({editVolume:{name:(0,y.default)(e,"specVolume.name",""),type:t}})}}},{key:"checkVolumeType",value:function(e){var t="exist";return(0,v.default)(e)||(e.emptyDir?t="temp":e.hostPath&&(t="host")),t}},{key:"renderContent",value:function(){var e,t=this.props,a=t.volume,r=t.volumes,n=t.containers,l=t.checkVolumeNameExist,u=t.collectSavedLog,o=a.name,i=(0,y.default)(a,"volumeMounts",[]);if("exist"===this.state.type){var c=(0,y.default)(a,"specVolume.name",!1);c&&(a.name=c)}else{var s=(0,y.default)(a,"name",!1);s&&(a.name=s,(0,E.default)(a,"specVolume.name",s))}switch(i.length>0&&a.volumeMounts.forEach((function(e){return(0,E.default)(e,"name",a.name)})),this.state.type){case"temp":e=p.default.createElement(C.default,{formRef:this.formRef,formData:a,currentName:o,containers:n,checkVolumeNameExist:l,collectSavedLog:u});break;case"host":e=p.default.createElement(D.default,{formRef:this.formRef,formData:a,currentName:o,containers:n,checkVolumeNameExist:l});break;default:case"exist":e=p.default.createElement(S.default,{formRef:this.formRef,formData:a,currentName:o,volumes:r,containers:n,collectSavedLog:u})}return e}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.contentClassName;return p.default.createElement("div",{className:(0,h.default)(k.default.wrapper,a)},p.default.createElement("div",{className:"h6"},p.default.createElement("a",{className:"custom-icon",onClick:this.handleGoBack},p.default.createElement(_.ReactComponent,null)),t("VOLUME_PL")),p.default.createElement("div",{className:(0,h.default)(k.default.contentWrapper,r)},p.default.createElement("div",{className:k.default.title},t("MOUNT_VOLUME")),p.default.createElement(b.RadioGroup,{mode:"button",value:this.state.type,onChange:this.handleTypeChange,size:"small"},p.default.createElement(b.RadioButton,{value:"exist"},t("PERSISTENT_VOLUME")),p.default.createElement(b.RadioButton,{value:"temp"},t("TEMPORARY_VOLUME")),p.default.createElement(b.RadioButton,{value:"host"},t("HOSTPATH_VOLUME"))),this.renderContent()))}}]),r}(p.default.Component);a.default=w,w.propTypes={className:m.default.string,containers:m.default.array,volume:m.default.object,onSave:m.default.func,onCancel:m.default.func},w.defaultProps={className:"",volume:{},containers:[],onSave:function(){},onCancel:function(){}},w.contextTypes={registerSubRoute:m.default.func,resetSubRoute:m.default.func}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(6),r(84),r(18),r(16),r(4),r(23),r(17),r(85),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(6),r(84),r(18),r(42),r(16),r(4),r(23),r(57),r(17),r(85),r(7);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(321)),f=n(r(63)),d=n(r(0)),p=n(r(3)),m=n(r(1)),h=r(186),v=n(r(816)),g=n(r(1042)),y=r(52),E=n(r(2365));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var _=function(e){(0,o.default)(r,e);var a=b(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,u=new Array(n),o=0;o0&&r.push(f.default.createElement("span",{key:"split-".concat(l),className:v.default.split},"/")),r.push(f.default.createElement("span",{key:l,className:v.default.current},t(n.title)))}return f.default.createElement("div",{className:v.default.breadcrumb},r)}}]),r}(f.default.Component);a.default=y,y.propTypes={breadcrumbs:d.default.array,routes:d.default.array,params:d.default.object,pathname:d.default.string},y.defaultProps={breadcrumbs:[],routes:[],params:{},pathname:""}},function(e,t,a){e.exports={breadcrumb:"xKPrLMpPGvKrIzz7bxSWY",back:"_2ohviffIByrflMsW5nHYlw",split:"OW3leDjR4Z22vqaxRuyOp"}},function(e,t,a){e.exports={card:"_1fvaJvMVa-46vr6bRwfiN",default:"_11ZbWGuLKUUwxoCi0UE_ta",selector:"_3wwNftf5lh3zwe6VvRlXHx",loading:"_3mlYHmzoC11FwkXtCcN1P",title:"C-xBi2-VU40KNZUYrr3TD",operations:"_3HvzxjlUHTsgNXS2U7nD52",empty:"_19AVBGyFYrhX1z6mTr5sg0"}},function(e,t,a){e.exports={label:"_2Ci7cqZ4O7DRBCRuzvUd-F",name:"_3c-epdF2Xgo9q-18cg54xx"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(315)),u=n(r(58)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=r(186),v=n(r(1566)),g=n(r(1567));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=function(e){(0,c.default)(r,e);var a=y(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.formRef,r=e.data,n=e.children,o=e.hideFooter,i=e.onCancel,c=e.onOk,s=e.cancelText,f=e.okText,p=e.isSubmitting,y=e.bodyClassName,E=e.formClassName,b=e.disableOk,_=(0,u.default)(e,["formRef","data","children","hideFooter","onCancel","onOk","cancelText","okText","isSubmitting","bodyClassName","formClassName","disableOk"]);return d.default.createElement(v.default,(0,l.default)({},_,{bodyClassName:(0,m.default)(g.default.formBody,y),onCancel:i,hideFooter:!0}),d.default.createElement(h.Form,{ref:a,data:r,onSubmit:c},d.default.createElement("div",{className:(0,m.default)(g.default.formWrapper,E)},n),!o&&d.default.createElement("div",{className:g.default.formFooter},d.default.createElement(h.Button,{type:"default",onClick:i,"data-test":"modal-cancel"},s||t("CANCEL")),c&&d.default.createElement(h.Button,{type:"control",htmlType:"submit",loading:p,disabled:b||p,"data-test":"modal-ok"},f||t("OK")))))}}]),r}(d.default.Component);a.default=E,E.propTypes={data:p.default.object,isSubmitting:p.default.bool}},function(e,t,a){e.exports={status:"_1RJNTAi2gZll1lMoWME40i",indicator:"_2MMr1KtzTZnVoLtaDgs1lx"}},,,function(e){e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(11),a(6),a(16),a(137),a(10),a(4),a(22),a(23),a(17),a(7),a(110),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=n(a(315)),u=n(a(61)),o=n(a(36)),i=n(a(37)),c=n(a(55)),s=n(a(56)),f=n(a(51));a(45),a(5),a(11),a(6),a(42),a(16),a(137),a(10),a(4),a(22),a(23),a(57),a(17),a(7),a(110);var d=r(a(0)),p=n(a(1)),m=n(a(3)),h=n(a(455)),v=n(a(2447)),g=n(a(2448)),y=n(a(2449));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var b=+new Date,_=0;function O(){return _+=1,"upload-".concat(b,"-").concat(_)}var S=function(e){(0,c.default)(a,e);var t=E(a);function a(){var e;(0,o.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var a=new FormData;e.action=(0,r.getClusterUrl)(e.action),e.data&&Object.keys(e.data).forEach((function(t){a.append(t,e.data[t])}));a.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var a="cannot post ".concat(e.action," ").concat(t.status,"'"),r=new Error(a);return r.status=t.status,r.method=e.method||"post",r.url=e.action,r}(e,t),n(t)):e.onSuccess(n(t),t)},t.open(e.method||"post",e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var l=e.headers||{};null!==l["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest");return Object.keys(l).forEach((function(e){t.setRequestHeader(e,l[e])})),t.send(a),{abort:function(){t.abort()}}},a(250),a(45),a(5),a(6),a(10),a(4),a(7);var r=a(52);function n(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}},function(e,t,a){"use strict";a(15),a(86),a(97),a(16),a(24),a(64),a(136),a(818),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(86),a(160),a(97),a(16),a(4),a(24),a(193),a(64),a(818);t.default=function(e,t){if(e&&t){var a=Array.isArray(t)?t:t.split(","),r=e.name||"",n=e.type||"",l=n.replace(/\/.*$/,"");return a.some((function(e){var t,a,u=e.trim();return"."===u.charAt(0)?(t=r.toLowerCase(),a=u.toLowerCase(),-1!==t.indexOf(a,t.length-a.length)):/\/\*$/.test(u)?l===u.replace(/\/.*$/,""):n===u}))}return!0}},function(e,t,a){"use strict";a(15),a(5),a(6),a(16),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(5),a(6),a(16),a(4),a(7);var r=function(e,t,a){e.forEach((function(e){!function e(r,n){var l=n||"";if(r.isFile)r.file((function(e){a(e)&&t([e])}));else if(r.isDirectory){r.createReader().readEntries((function(t){t.forEach((function(t){e(t,"".concat(l).concat(r.name,"/"))}))}))}}(e.webkitGetAsEntry())}))};t.default=r},function(e,t,a){e.exports={container:"_28BAmUGayFPM7JPE5ubfRp",main_content:"_1nTOsD4LTy3JlMGPNyiH0J",controls:"_2iPsaoM6EKU-FKuFY19BPD",control:"_1Xce9RPORg_gvSJP9dstQ7","slider-wrapper":"VqFyTMdMnsEe-jAXhPkUB",normalSize:"_5KdmZqhOGtr0WGcmPF5R6",autoSize:"_2jsPFnKjZk2yDubgG_LTD2"}},function(e,t,a){e.exports={wrapper:"_2RXdRDDKaZIoVt_M4ZZKDH",card:"JoB_eaeo3gO3tgu15IdFJ",in:"_30Fhe_GMY_jqljFuBk6iPM",browseIn:"_27cK2SUAg9oL3KeZuQlc8I",out:"_3W6MlUSLX72EkOU9mwhqK9",browseOut:"_3_bxeu1laeJFbz1qe6hjOv",cardMain:"jApufF3_7WJgOAwNKdKLl",cardFoot:"_2MjC_tFWfTzr148xdbNYYP",title:"_3DuG8hhj8DMeFyPQ359a4Z",content:"_37wH-4L-J3wTYb3a17S4IK"}},function(e,t,a){e.exports={wrapper:"yZFq2sW492FUplIaCVLcA",title:"_2RF_2vkCUj5FRXMCT--OiK",panel:"_3GG4TSSEVPDykkKpRx-DTz",empty:"_2ipQUz0640DVJYOmATRKMA",loading:"_1P2YNSL2qJQiEtaDIFDfBf"}},function(e,t,a){e.exports={emptyTip:"_2n5LD-OS_oKZbSEFvtJWzL",emptyText:"_1TAFKSo4u8kgFnD_NDQWpq"}},function(e,t,a){e.exports={progress_label:"_5PSTAWJiSPA_LLFnStRk7",progress:"_1DA7GoI-GY3JPMYhUcAzd4",line_box:"_1Iiva64_Q4jDWrS8sN7HOy",line_split_items:"_2oZqVy1sIf-VGh8wW54aAH",line_block_items:"_2uhi-M5L9MD4cRySFNtXIB",line_block_mask_items:"_3kq8yg8B2d2ngP2g134sDG"}},function(e,t,a){e.exports={wrapper:"_302HbhNWl9mS-MU3L7oAQ0",disabled:"_1kINxzjNsn7aaOpqnibb0A",options:"_2w6Wx0Cn2s6hS24mPAoGsQ",option:"_2tyTnkSPzDAy8te4J5CaC9",control:"_1tMlQKHnZLlquKiSwFjDYV",withIcon:"QvU3_GAQkwcWv0oSs1iyi",leftIcon:"_3LTCGCX8_ciBanyKKA22gn",text:"_3HuhDrid86ZAmU9VGNM6Mz",rightIcon:"_3Uxm1hQLkKIpTk1QqTk3AM",selected:"_2FTW0KhkRJG4DvBe8MTypz",open:"HePRK-voaONco1Z9AdqPs"}},function(e,t,a){e.exports={option:"MwEyynZNsExX6uC1xcFAi",empty:"_1z-Oh8RaC_rY7Ef7mjU6Up",isOutdated:"_21PySuLKqWWEkaP8AJI3LB"}},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(11),r(6),r(86),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(11),r(6),r(86),r(18),r(28),r(191),r(42),r(16),r(159),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l,u=n(r(315)),o=n(r(30)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=r(186),m=n(r(788)),h=n(r(790)),v=r(791),g=n(r(873)),y=n(r(26)),E=n(r(74)),b=n(r(928)),_=n(r(63)),O=n(r(0)),S=r(239),C=n(r(1316)),D=r(52),k=r(72),N=r(434),T=r(14),R=n(r(2478));function w(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function I(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};e.keyword&&(e.name=e.keyword,delete e.keyword),n.store.fetchList(I({limit:-1,cluster:n.props.cluster,namespace:n.props.namespace,status:"enabled"},e))},n.getColumns=function(){return[{title:t("NAME"),dataIndex:"name",search:!0,key:"name",render:function(e,t){return O.default.createElement(m.default,{icon:k.ICON_TYPES.ippools,iconSize:40,title:(0,D.getDisplayName)(t),desc:t.description||"-"})}},{title:t("NETWORK_SEGMENT"),isHideable:!0,dataIndex:"cidr"},{title:n.isCalico?t("USED_IP_ADDRESSES"):O.default.createElement("span",{className:"flexbox items-center"},O.default.createElement("span",{className:"margin-r4"},t("USED_IP_ADDRESSES")),O.default.createElement(p.Tooltip,{content:t("IPPOOL_USED_TIP")},O.default.createElement(p.Icon,{name:"question",size:16}))),dataIndex:"status1",isHideable:!0,render:function(e,a){var r=a.status,n=(0,y.default)(r,"capacity",0),l=(0,y.default)(r,"unallocated",0);return O.default.createElement(h.default,{title:n-l,description:t("TOTAL_VALUE",{value:n})})}},{title:t("IPPOOL_BLOCK_SIZE"),dataIndex:"blockSize",isHideable:!0,render:function(e){return null!=e?e:"-"}},n.props.isOutdated?null:{title:t("IPPOOL_OVERLAY_MODE"),dataIndex:"overlay",isHideable:!0,render:function(e,t){var a=t.ipipMode,r=t.vxlanMode,n=(0,N.getOverlayStatus)({ipipMode:a,vxlanMode:r});return O.default.createElement("div",null,O.default.createElement("span",{className:"font-bold"},n.type),n.value&&O.default.createElement("span",{style:{marginLeft:"4px"}},"(",n.value,")"))}}]},n.changeIPPools=function(e){var t,a,r=n.props,l=r.name,u=r.formTemplate,o=r.data;null===(t=n.props)||void 0===t||null===(a=t.formProps)||void 0===a||a.onChange(l,JSON.stringify(e)),o&&(0,E.default)(n.props.data,l,JSON.stringify(e)),u&&(0,E.default)(n.props.formTemplate,l,JSON.stringify(e))},n.showCreate=function(){var e,t,a,r=n.props.cluster;return n.trigger("network.ippool.add",{module:"ippools",cluster:r,trigger:n.trigger,isOutdated:n.props.isOutdated,hideWorkspace:n.columnConfig.hideWorkspace,isCalico:n.isCalico,allList:(0,T.toJS)(null!==(e=null===(t=n.store)||void 0===t||null===(a=t.list)||void 0===a?void 0:a.data)&&void 0!==e?e:[]),success:n.getIPPools})},n.onSelectRowKeys=function(e){n.setState({selectedRowKeys:e},(function(){n.changeIPPools(e)}))},n.showEmpty=function(){var e=n.store.list,t=e.isLoading,a=e.filters,r=e.total;return!t&&(0,_.default)(a)&&0===r},n.deleteItem=function(e){var t=n.state.selectedRowKeys;(0,b.default)(t,(function(t){return t===e})),n.setState({selectedRowKeys:t},(function(){n.changeIPPools(t)}))},n.renderItems=function(e){return e.map((function(e){return O.default.createElement("span",{className:R.default.item},e,O.default.createElement(p.Icon,{name:"close",size:14,clickable:!0,onClick:function(){n.deleteItem(e)}}))}))},n.rootStore=e.rootStore,n.ippoolStore=new C.default,n.store=new(n.ippoolStore.getStoreByCluster(e.cluster));var l=(0,y.default)(e.data,e.name,"");return n.state={selectedRowKeys:l&&JSON.parse(l)||[]},n}return(0,c.default)(r,[{key:"componentDidMount",value:function(){this.store.fetchList({limit:-1,cluster:this.props.cluster,namespace:this.props.namespace,status:"enabled"})}},{key:"render",value:function(){var e=this.props,a=e.tableProps,r=e.name,n=this.state.selectedRowKeys,l=this.store.list.filters;return O.default.createElement("div",{className:R.default.ippools,name:r},n.length>0?O.default.createElement("div",{className:R.default.showSelects},O.default.createElement("p",null,t("SELECTED_IPPOOLS",{number:n.length})),O.default.createElement("div",{className:R.default.selectWrapper},this.renderItems(n))):"",O.default.createElement(g.default,(0,u.default)({},a,{module:"ippools",name:"POD_IP_POOL",columns:this.getColumns(),cluster:this.props.cluster,onFetch:this.getIPPools,onRefresh:this.getIPPools,onSelectRowKeys:this.onSelectRowKeys,selectedRowKeys:this.state.selectedRowKeys,disabledSelectActions:!0,data:(0,T.toJS)(this.store.list.data),hideFooter:!0,hideCustom:!0,searchType:"name",filters:l,showEmpty:this.showEmpty(),emptyProps:{desc:t("CLUSTER_IPPOOL_EMPTY_DES")}})),O.default.createElement("p",{className:R.default.empty},this.canCreate?O.default.createElement(O.default.Fragment,null,t("ADD_IPPOOL_EMPTY_DES_ADMIN"),O.default.createElement("a",{onClick:this.showCreate},t("CREATE_POD_IP_POOL"))):t("ADD_IPPOOL_EMPTY_DES")))}},{key:"isOutdated",get:function(){var e=this.props.cluster;return this.ippoolStore.isOutdated(e)}},{key:"isCalico",get:function(){var e=this.props.cluster;return this.ippoolStore.isCalico(e)}},{key:"columnConfig",get:function(){var e=this.isCalico;return{hideWorkspace:e,hideSerch:e,hideFilter:e}}},{key:"isNetworkManager",get:function(){var e=this.props.cluster;return-1!==(0,y.default)(globals,"user.clusterRules.".concat(e,".network"),[]).indexOf("manage")}},{key:"canCreate",get:function(){return"platform-admin"===globals.user.globalrole||this.isNetworkManager}}]),r}(O.default.Component))||l)||l;a.default=P},,,,,,,,,,,,,function(e,t,a){e.exports={wrapper:"_1ySvVWPft88PiZ2MO7sDtU"}},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var n=r(a(30)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=r(a(1)),d=r(a(3)),p=r(a(1165)),m=r(a(1166)),h=r(a(2472));function v(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=function(e){(0,o.default)(a,e);var t=g(a);function a(e){var r;(0,l.default)(this,a),(r=t.call(this,e)).handleToggle=function(){r.setState({visible:!r.state.visible},(function(){r.props.onToggle(r.state.visible)}))},r.hideSelector=function(){r.setState({visible:!1},(function(){r.props.onToggle(!1)}))},r.handleTimeChange=function(e){r.setState(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getNetworkUrl).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getNetDetailUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.getNetWorkUrl(t),"/").concat(t.name)},e.store=new v.default({module:"ippools",kind:"IPPool",apiVersion:"apis/crd.projectcalico.org/v1"}),e}return(0,f.default)(u,[{key:"fetchList",value:(a=(0,c.default)(n.default.mark((function e(){var t,a,r,u,i,c,s,f,d,p=this,m=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},a=t.cluster,r=t.workspace,u=t.namespace,i=t.more,c=t.devops,s=(0,o.default)(t,["cluster","workspace","namespace","more","devops"]),this.list.isLoading=!0,s.sortBy||void 0!==s.ascending||(s.sortBy=b.LIST_DEFAULT_ORDER[this.module]||"createTime"),s.limit!==1/0&&-1!==s.limit||(s.limit=-1,s.page=1),s.limit=s.limit||10,e.next=7,request.get(this.getNetWorkUrl({cluster:a,workspace:r,namespace:u,devops:c}),this.getFilterParams(s));case 7:return f=e.sent,d=((0,y.default)(f,"items")||((0,E.default)(f)?f:[])).map((function(e){return O({cluster:a,namespace:u},p.mapper(e))})),this.list.update(O(O({data:i?[].concat((0,l.default)(this.list.data),(0,l.default)(d)):d,total:f.totalItems||f.totalCount||f.total_count||d.length||0},s),{},{limit:Number(s.limit)||10,page:Number(s.page)||1,isLoading:!1},this.list.silent?{}:{selectedRowKeys:[]})),e.abrupt("return",d);case 11:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchDetail",value:(t=(0,c.default)(n.default.mark((function e(t){var a,r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isLoading=!0,e.next=3,request.get(this.getNetDetailUrl(t));case 3:return a=e.sent,r=O(O({},t),this.mapper(a)),this.detail=r,this.isLoading=!1,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"apis/crd.projectcalico.org/v1"}}]),u}(r(a(1104)).default),(0,h.default)(i.prototype,"fetchList",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchList"),i.prototype),(0,h.default)(i.prototype,"fetchDetail",[g.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchDetail"),i.prototype),i);t.default=C},function(e,t,a){e.exports={ippools:"_2kGSbKseUL2YRcov_9muVv",empty:"_24O3McxSSDwKwbFNUTDDCO",showSelects:"_2sv6WMgMdW8V1HSJxSoBYG",selectWrapper:"_1wN86v2HXHvjdxLHBN1OfO",item:"_1OeK_sDkEV3zvvBSay1L4P"}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(9),a(4),a(22),a(23),a(57),a(17);var n=r(a(43));a(41);var l,u=r(a(44)),o=r(a(36)),i=r(a(37)),c=r(a(55)),s=r(a(56)),f=r(a(51)),d=r(a(49)),p=r(a(26)),m=a(14);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var v=(l=function(e){(0,c.default)(l,e);var t,a,r=h(l);function l(){var e;(0,o.default)(this,l);for(var t=arguments.length,a=new Array(t),n=0;n=.9&&d.default.createElement(m.Icon,{name:"exclamation"})),description:t("CPU")})},e.renderMemory=function(a){var r=e.getRecordMetrics(a,[{type:"memory_used",unit:"Gi"},{type:"memory_total",unit:"Gi"},{type:"memory_utilisation"}]);return d.default.createElement(_.default,{title:d.default.createElement("div",{className:S.default.resource},d.default.createElement("span",null,"".concat(Math.round(100*r.memory_utilisation),"%")),r.memory_utilisation>=.9&&d.default.createElement(m.Icon,{name:"exclamation"})),description:t("MEMORY")})},e}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.detail,r=e.selected,n=e.hasMonitoring;return d.default.createElement("div",{className:(0,p.default)(S.default.item,(0,u.default)({},S.default.selected,r)),onClick:this.handleClick},d.default.createElement(m.Icon,{name:h.ICON_TYPES.nodes,size:20}),d.default.createElement("div",{className:S.default.ring}),d.default.createElement("div",{className:S.default.name},d.default.createElement(E.default,{icon:null,to:null,title:a.name,desc:a.ip})),this.renderStatus(a),d.default.createElement("div",null,d.default.createElement(_.default,{title:d.default.createElement(d.default.Fragment,null,a.role.join(",")),description:t("ROLE")})),n&&d.default.createElement(d.default.Fragment,null,d.default.createElement("div",null,this.renderCPU(a)),d.default.createElement("div",null,this.renderMemory(a))))}},{key:"metricTypesMap",get:function(){if(!this.props.isEdgeWize)return D;var e={};return Object.entries(D).forEach((function(t){var a=(0,l.default)(t,2),r=a[0],n=a[1];e["".concat(r)]="edge_".concat(n)})),e}}]),r}(d.default.Component);a.default=k},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(5),r(11),r(6),r(18),r(16),r(27),r(9),r(13),r(10),r(4),r(316),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(18),r(28),r(42),r(16),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(17),r(7);var l=n(r(61)),u=n(r(30)),o=n(r(43));r(41);var i,c=n(r(44)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(0)),v=r(14),g=r(239),y=n(r(26)),E=n(r(63)),b=r(186),_=n(r(863)),O=n(r(852)),S=n(r(954)),C=n(r(856)),D=n(r(2493)),k=n(r(1583));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){for(var t=1;t=.9&&d.default.createElement(m.Icon,{name:"exclamation"})),description:t("CPU")})},e.renderMemory=function(a){var r=e.getRecordMetrics(a,[{type:"memory_used",unit:"Gi"},{type:"memory_total",unit:"Gi"},{type:"memory_utilisation"}]);return d.default.createElement(b.default,{title:d.default.createElement("div",{className:O.default.resource},d.default.createElement("span",null,"".concat(Math.round(100*r.memory_utilisation),"%")),r.memory_utilisation>=.9&&d.default.createElement(m.Icon,{name:"exclamation"})),description:t("MEMORY")})},e.renderPodNum=function(a){var r=e.getRecordMetrics(a,[{type:"pod_used"},{type:"pod_total"}]),n=r.pod_total?parseFloat(r.pod_used/r.pod_total):0;return d.default.createElement(b.default,{title:"".concat(Math.round(100*n),"%"),description:t("PODS")})},e}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,t=e.detail,a=e.selected;return d.default.createElement("div",{className:(0,p.default)(O.default.item,(0,u.default)({},O.default.selected,a)),onClick:this.handleClick},d.default.createElement(m.Icon,{name:"edge-node",size:20}),d.default.createElement("div",{className:O.default.ring}),d.default.createElement("div",{className:O.default.name},d.default.createElement(y.default,{icon:null,to:null,title:t.name,desc:t.ip})),this.renderStatus(t),d.default.createElement("div",null,this.renderCPU(t)),d.default.createElement("div",null,this.renderMemory(t)),d.default.createElement("div",null,this.renderPodNum(t)))}},{key:"metricTypesMap",get:function(){var e={};return Object.entries(C).forEach((function(t){var a=(0,l.default)(t,2),r=a[0],n=a[1];e["".concat(r)]="edge_".concat(n)})),e}}]),r}(d.default.Component);a.default=D},function(e,t,a){e.exports={wrapper:"_4qArBgVOZGVzW4_C1mQa_",alert:"_2J-ZH7uleo6FGwk_vn2a-P",node:"_2_K8zkzSwO3NKwIB5qbvFK",body:"_2erzUoyxi1dmIp0QGaU92y"}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(4),r(23),r(57),r(17);var u=l(r(30)),o=l(r(36)),i=l(r(37)),c=l(r(55)),s=l(r(56)),f=l(r(51)),d=n(r(0)),p=l(r(3)),m=l(r(2496));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var v=function(e){(0,c.default)(r,e);var a=h(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.props,a=e.steps,r=e.current;return d.default.createElement("div",{className:m.default.wrapper},a.map((function(e,a){var n;return d.default.createElement("div",{key:e.title},d.default.createElement("span",{className:(0,p.default)(m.default.indicator,(n={},(0,u.default)(n,m.default.fullfill,r>a),(0,u.default)(n,m.default.current,r===a),(0,u.default)(n,m.default.pending,r1&&void 0!==arguments[1]?arguments[1]:[];return null==t||t.forEach((function(t){var r,n;(a.push(t.metadata.name),null===(r=t.spec)||void 0===r?void 0:r.children)&&e(null===(n=t.spec)||void 0===n?void 0:n.children,a)})),a}(n);R(e)}else R([])}),[C]),o.default.createElement("div",{className:d.default["node-tree-bg"]},o.default.createElement(s.InputSearch,{className:d.default.search,name:"search",value:b,placeholder:t("SEARCH_BY_NAME"),onChange:function(e){_(e)},autoComplete:"off"}),o.default.createElement("div",{className:m.default["select-nodes"]},o.default.createElement(s.Icon,{className:m.default["select-nodes-icon"],name:"listview",size:20,type:"coloured"}),t("已选择节点")),o.default.createElement("div",{className:m.default.trees},o.default.createElement("div",{className:(0,i.default)(d.default["node-group__tree-item"],d.default["node-group__tree-item-margin"])},o.default.createElement("img",{className:d.default.icon,width:20,src:"/assets/disk_group.svg",alt:""}),o.default.createElement("span",{className:d.default["node-group__tree-item-title"],onClick:a},"全部节点组"),o.default.createElement(s.Tooltip,{content:t(C?"全部关闭":"全部展开")},o.default.createElement("img",{className:d.default["node-group__tree-item-icon-hover"],name:C?"sort-ascending":"sort-descending",width:20,src:"/assets/".concat(C?"close_all":"expand_all",".svg"),onClick:function(){return D(!C)},alt:""}))),o.default.createElement(p.default,{treeData:n,expandedKeys:T,onSelect:g,autoExpandParent:C,renderMenu:function(e){var a=l.find((function(t){var a;return t.nodeGroup===(null==e||null===(a=e.metadata)||void 0===a?void 0:a.name)}))||{};if(void 0===a.nodeName)return null;var r=a.nodeName?"手动指定":"自动分配",n=a.nodeName?"step_1":"refresh_fill";return o.default.createElement(s.Tooltip,{content:t(r)},o.default.createElement("img",{width:16,src:"/assets/".concat(n,".svg"),alt:""}))},renderIcon:function(e){var t=h(n).filter((function(e){return null==v?void 0:v.includes(e.metadata.name)})),a=(0,c.default)(null==t?void 0:t.map((function(e){return e.parentKey})));return o.default.createElement(o.default.Fragment,null,o.default.createElement(f.default,{type:(null==a?void 0:a.includes(e.metadata.name))?"Running":"paused"}),o.default.createElement("img",{width:16,src:"/assets/disk_group.svg",alt:""}))},filterName:b.searchValue,showNumber:!0})))};var u=l(r(96));r(5),r(11),r(31),r(6),r(84),r(18),r(28),r(87),r(16),r(4),r(24),r(85),r(188),r(7);var o=n(r(0)),i=l(r(3)),c=l(r(450)),s=r(186),f=l(r(795)),d=l(r(1320)),p=l(r(1318)),m=l(r(1321));function h(e){return e.reduce((function(e,t){return e.concat([t],h(t.spec.children||[]))}),[])}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(31),r(18),r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.NodeGroup=function(e){var a=e.detail,r=e.cluster,n=e.formData,l=e.onSelect,g=(0,i.createRef)(),y=(0,i.useState)(!1),E=(0,o.default)(y,2),b=E[0],_=E[1],O=(0,i.useState)(!1),S=(0,o.default)(O,2),C=S[0],D=S[1],k=null==n?void 0:n.map((function(e){return e.nodeName}));return(0,i.useEffect)((function(){if(a){var e=n.find((function(e){return e.nodeGroup===a.metadata.name}));_(!!e&&!(null==e?void 0:e.nodeName))}}),[a]),i.default.createElement(i.default.Fragment,null,a?i.default.createElement("div",null,i.default.createElement(m.default,{cluster:r,detail:a,renderBtn:C&&i.default.createElement(f.default,{className:v.default.switch,text:t("IPPOOL_AUTO_ASSIGN"),checked:b,onChange:function(e){_(e),l(a,"")}})}),i.default.createElement(h.EdgewizeNodeTable,(0,u.default)({ref:g},e,{node:a,enabled:b,cluster:r,selectKeys:k,onSelect:function(e){var t;l(a,null===(t=e.metadata)||void 0===t?void 0:t.name)},setEdgeNodeStatus:D}))):i.default.createElement("div",null,i.default.createElement("div",{className:(0,c.default)(v.default["select-nodes"],v.default["select-nodes-normal"])},i.default.createElement(s.Icon,{className:v.default["select-nodes-icon"],name:"listview",size:20}),t("已选择节点")),i.default.createElement("div",{className:p.default.container},null==n?void 0:n.map((function(e){return i.default.createElement("div",{className:(0,c.default)(p.default.listItem,p.default.card)},i.default.createElement(d.default,{title:e.nodeGroup,icon:function(){return i.default.createElement("img",{width:40,src:"/assets/disk_group.svg",alt:""})},description:t("NODE_GROUP")}),i.default.createElement(d.default,{title:e.nodeName,icon:"nodes",description:t("EDGE_NODE_PL")}))})))))},r(31),r(18),r(16),r(4);var u=l(r(315)),o=l(r(96)),i=n(r(0)),c=l(r(3)),s=r(186),f=l(r(850)),d=l(r(790)),p=l(r(1322)),m=l(r(1584)),h=r(2503),v=l(r(1321))},,function(e,t,a){e.exports={"top-bar":"_2i1Q4R5tL-7QYBBbfNq3ip","top-bar-left":"sbdO2-XmopsQeo1skluC_",icon:"_2rLzHSHMjymGW9H85aW1eq","top-bar-title":"_2OM1eMcCE8Pvf4TpvXGz3E","top-bar-title-label":"_1DZcCR369hJBpQPUW-OYST","top-bar-des":"_3FqYBu8t0scwg42D44OIH9","top-bar-des-group":"lDV8LihpWxI9IRS9m2yGB","top-bar-bind":"_1-Fog9pCIzA3128ZSNDSd-","top-bar-ip":"_3Z6JLYi2ALlxOLrJj5Yp6q","top-bar-ip-tooltip":"B8tjvzuiPnVTWcWfqnv_J","top-bar-ip-tooltip-item":"_2tgYygRlwin9PWC0Ly840l","top-bar-ip-tooltip-item-ip":"vIeKUTxkq8djVvsN-EVp5"}},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(5),r(11),r(6),r(84),r(18),r(16),r(9),r(13),r(10),r(24),r(85),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.EdgewizeNodeTable=void 0,r(12),r(5),r(11),r(6),r(84),r(18),r(28),r(859),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(24),r(85),r(62),r(7);var u=l(r(43)),o=l(r(30));r(41);var i=l(r(315)),c=l(r(44)),s=l(r(96)),f=n(r(0)),d=l(r(63)),p=r(186),m=l(r(796)),h=l(r(788)),v=l(r(795)),g=r(444),y=r(72),E=l(r(953)),b=l(r(1585));function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;t0?h.default.createElement("label",{className:C.default.deleteAll,onClick:function(){e.deleteScreenshot(-1,r)}},t("DELETE_ALL")):h.default.createElement("label",{className:(0,y.default)(C.default.deleteAll,C.default.disabled)},t("DELETE_ALL")))))}}]),r}(h.default.Component),o.propTypes={detail:g.default.object,store:g.default.object,fileStore:g.default.object},o.defaultProps={detail:{},store:{},fileStore:function(){}},u=i))||u;a.default=k},function(e,t,a){e.exports={title:"_2uPiYzFDOXR72WfG9uGqfU",screenshot:"_2YKRw87avTolrxMvvqKdUw",pictures:"_2mut4J5F7tqeF_yGoONfAl",upload:"_3Y5SOweqK4JOLgJYTWXwWB",add:"svj73vqzmkHDs00vaMNKa",delete:"_2CvCSpyGVDD7j2kE2aPl6g",icon:"_19kdNNakltP3B4lu8OnnPQ",error:"gtPg-cI0R-ryIQiNIwS3N",words:"_2w8iv_6c2wn1jOzU9DFnYk",disabled:"LwrGabyBVUqWJUr4TYWl",deleteAll:"_2nkH5dSh2jhtOpVwtll5Dp"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l,u,o,i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=r(239),h=n(r(1)),v=n(r(2513)),g=n(r(2514));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var E={h1:!0,h2:!0,h3:!0,h4:!0,img:!1,link:!0,code:!0,preview:!0,expand:!0,undo:!0,redo:!0,save:!1,subfield:!0},b=(0,m.observer)((o=u=function(e){(0,s.default)(r,e);var a=y(r);function r(e){var t;return(0,i.default)(this,r),(t=a.call(this,e)).handleChange=function(e){t.setState({readme:e}),t.props.handleChange(e,"abstraction")},t.state={readme:e.detail.abstraction},t}return(0,c.default)(r,[{key:"render",value:function(){var e=this.state.readme;return p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{className:g.default.header},t("APP_INTRODUCTION")),p.default.createElement("div",{className:g.default.readmeEdit},p.default.createElement(v.default,{value:e,onChange:this.handleChange,placeholder:t("START_EDITING"),toolbar:E})))}}]),r}(p.default.Component),u.propTypes={detail:h.default.object,store:h.default.object,handleChange:h.default.func},u.defaultProps={detail:{},store:{},handleChange:function(){}},l=o))||l;a.default=b},,function(e,t,a){e.exports={header:"ovSS-AWa-ZyP2A-ngZTMO",readmeEdit:"Y_xQq9aBBqoFkxZrwNVBS"}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(22),a(23),a(57),a(17);var n=r(a(43)),l=r(a(58));a(41);var u,o,i,c=r(a(44)),s=r(a(65)),f=r(a(36)),d=r(a(88)),p=r(a(55)),m=r(a(56)),h=r(a(51)),v=r(a(49)),g=(r(a(66)),a(14));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,h.default)(e);if(t){var n=(0,h.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,m.default)(this,a)}}var E=(u=function(e){(0,p.default)(a,e);var t=y(a);function a(){var e;(0,f.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l0&&void 0!==arguments[0]?arguments[0]:{},a=t.category_id;return a?"".concat(e.baseUrl,"/").concat(e.resourceName,"/").concat(a):"".concat(e.baseUrl,"/").concat(e.resourceName)},(0,s.default)(e,"update",o,(0,d.default)(e)),(0,s.default)(e,"delete",i,(0,d.default)(e)),e}return a}(r(a(458)).default),o=(0,v.default)(u.prototype,"update",[g.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return(0,c.default)(n.default.mark((function t(){var a,r,u,o=arguments;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=o.length>0&&void 0!==o[0]?o[0]:{},r=a.category_id,u=(0,l.default)(a,["category_id"]),t.next=3,e.submitting(request.patch(e.getUrl({category_id:r}),u));case 3:case"end":return t.stop()}}),t)})))}}),i=(0,v.default)(u.prototype,"delete",[g.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.category_id;return e.submitting(request.delete(e.getUrl({category_id:a}),{}))}}}),u);t.default=E},function(e,t,a){e.exports={modal:"BdK5ZaX-xYe3UCP_Y1MKV",body:"_2yuMHphDy5tXJVP5ZG_oka"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var l,u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(26)),p=r(239),m=r(186),h=r(72),v=n(r(1325));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var y=(0,p.observer)(l=function(e){(0,i.default)(r,e);var a=g(r);function r(){var e;(0,u.default)(this,r);for(var n=arguments.length,l=new Array(n),o=0;o0){var i=d.default.Children.map(u,(function(t){return d.default.cloneElement(t,y(y({},t.props),{},{name:r,checked:o.includes(t.props.value),onChange:e.handleOptionChange}))}));return d.default.createElement("div",{"data-direction":n,className:(0,m.default)("checkbox-group",a)},i)}return d.default.createElement("div",{"data-direction":n,className:(0,m.default)("checkbox-group",a)},l.map((function(t){return d.default.createElement(h.Checkbox,{key:t.value,name:r,value:t.value,checked:o.includes(t.value),onChange:e.handleOptionChange},t.label)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return(0,v.default)(e.value,t.values)?null:{values:e.value}}}]),a}(d.Component);t.default=b,b.propTypes={options:p.default.arrayOf(p.default.oneOfType([p.default.string,p.default.shape({value:p.default.any,label:p.default.string,disabled:p.default.bool})])),value:p.default.array,onChange:p.default.func,direction:p.default.oneOf(["row","column"]),className:p.default.string,disabled:p.default.bool,children:p.default.node},b.defaultProps={direction:"row",options:[],value:[],onChange:function(){}}},function(e,t,a){e.exports={group:"_1apuDq7M0zdRfWCPastdWU"}},,,,function(e,t,a){e.exports={dropdown:"_2AA0siR3svLxPwUAGPyHck"}},,,function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(4),r(23),r(57),r(17);var u=l(r(36)),o=l(r(37)),i=l(r(55)),c=l(r(56)),s=l(r(51)),f=n(r(0)),d=r(186),p=l(r(2615));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var h=function(e){(0,i.default)(r,e);var a=m(r);function r(){return(0,u.default)(this,r),a.apply(this,arguments)}return(0,o.default)(r,[{key:"render",value:function(){var e=this.props,a=e.steps,r=e.current;return f.default.createElement("div",{className:p.default.wrapper},a.map((function(e,a){return f.default.createElement("div",{key:e.title},r>=a?f.default.createElement(d.Icon,{name:"success",type:"coloured",size:14}):f.default.createElement(d.Icon,{name:"dot",type:"light",size:14}),f.default.createElement("span",null,t(e.title)))})))}}]),r}(f.Component);a.default=h},function(e,t,a){e.exports={wrapper:"_3iSN2t3fxpa-6qCq-vAc0D"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(26)),f=n(r(74)),d=n(r(800)),p=n(r(0)),m=r(1),h=r(186),v=r(72),g=r(52),y=n(r(2617));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var b=function(e){(0,o.default)(r,e);var a=E(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,u=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t={};return Object.values(e).forEach((function(e){var a=e.kind.replace("Federated","");t[a]=e})),t},e.updateComponentKind=function(){var t=e.props.formData.application;(0,d.default)(t,"".concat(e.fedPrefix,"spec.componentKinds"),[{group:"",kind:"Service"},{group:"apps",kind:"Deployment"},{group:"apps",kind:"StatefulSet"},{group:"networking.k8s.io",kind:"Ingress"},{group:"servicemesh.kubesphere.io",kind:"Strategy"},{group:"servicemesh.kubesphere.io",kind:"ServicePolicy"}])},e.handleAdd=function(t){t.workload=t.Deployment||t.StatefulSet,t.service=t.Service,e.updateAppLabels(t),e.updateGovernance(t);var a=(0,f.default)(t,"service.metadata.name"),r=(0,f.default)(e.state.editData,"Service.metadata.name");e.setState((function(e){var n=e.components;return r&&n[r]&&delete n[r],{components:_(_({},n),{},(0,l.default)({},a,t)),editData:{}}}),(function(){r&&delete e.props.formData[r],e.props.formData[a]=t,e.updateComponentKind(),e.hideAdd()}))},e.handleDelete=function(t){e.setState((function(e){var a=e.components;return delete a[t],{components:_({},a)}}),(function(){delete e.props.formData[t],e.updateComponentKind()}))},e}return(0,o.default)(r,[{key:"componentDidUpdate",value:function(e){var t=this.props.formData;t!==e.formData&&this.setState({components:(0,p.default)(t,["application","ingress"])||{}})}},{key:"validate",value:function(e){e&&e()}},{key:"updateAppLabels",value:function(e){var t=(0,f.default)(this.props.formData,"application.".concat(this.fedPrefix,"spec.selector.matchLabels"),[]);(0,h.mergeLabels)(e.workload,t),(0,h.mergeLabels)(e.service,t)}},{key:"updateGovernance",value:function(e){var t=this.props,a=t.isGovernance,r=t.isFederated;(0,d.default)(e.workload,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',String(a)),(0,d.default)(e.service,'metadata.annotations["servicemesh.kubesphere.io/enabled"]',String(a)),(0,d.default)(e.workload,"spec.template.".concat(this.fedPrefix,'metadata.annotations["sidecar.istio.io/inject"]'),String(a)),r&&((0,h.updateFederatedAnnotations)(e.workload),(0,h.updateFederatedAnnotations)(e.service))}},{key:"render",value:function(){var e=this.props,a=e.cluster,r=e.namespace,n=e.isFederated,l=e.projectDetail,u=this.state,o=u.components,i=u.showAdd,c=u.editData;return m.default.createElement("div",{className:E.default.wrapper},m.default.createElement("div",{className:E.default.step},m.default.createElement("div",null,t("SERVICE_PL")),m.default.createElement("p",null,t("APPLICATION_SERVICE_DESC"))),m.default.createElement("div",{className:E.default.components},m.default.createElement(y.default,{data:o,clusters:l.clusters,onAdd:this.showAdd,onDelete:this.handleDelete})),m.default.createElement(g.default,{cluster:a,namespace:r,components:o,detail:c,store:this.serviceStore,module:"services",visible:i,onCancel:this.hideAdd,onOk:this.handleAdd,isFederated:n,projectDetail:l}))}},{key:"fedPrefix",get:function(){return this.props.isFederated?"spec.template.":""}}]),r}(m.default.Component);a.default=S},function(e,t,a){e.exports={cluster:"WepWXI1aSdsP2mN7tQD4h",title:"-FR9pSqY9v4vM0_IHSUJb",selected:"_10Jl3vuRvh7yJv5FXgkQV3"}},function(e,t,a){e.exports={wrapper:"_1MKeNDQmYI8pkIxXHU03ir",selected:"_3OBd22JrAfh3uBO-tVAK5U"}},function(e,a,r){"use strict";var n=r(20),l=r(157);r(12),r(5),r(11),r(6),r(29),r(9),r(13),r(10),r(4),r(22),r(23),r(17),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(29),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(38),r(7),r(32);var u,o=n(r(315)),i=n(r(30)),c=n(r(96)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=l(r(0)),v=n(r(26)),g=n(r(189)),y=n(r(1094)),E=n(r(158)),b=r(14),_=r(239),O=n(r(913)),S=r(52),C=r(248),D=n(r(851)),k=n(r(885)),N=n(r(1096)),T=n(r(1051)),R=n(r(1303));function w(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function I(e){for(var t=1;t=e}},N=(0,y.observer)(u=function(e){(0,s.default)(r,e);var a=C(r);function r(){var e;(0,i.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l=.9&&f.default.createElement(p.Icon,{name:"exclamation"})),description:t("CPU")})},e.renderMemory=function(a){var r=e.getRecordMetrics(a,[{type:"memory_used",unit:"Gi"},{type:"memory_total",unit:"Gi"},{type:"memory_utilisation"}]);return f.default.createElement(b.default,{title:f.default.createElement("div",{className:O.default.resource},f.default.createElement("span",null,"".concat(Math.round(100*r.memory_utilisation),"%")),r.memory_utilisation>=.9&&f.default.createElement(p.Icon,{name:"exclamation"})),description:t("MEMORY")})},e}return(0,o.default)(r,[{key:"render",value:function(){var e=this.props,a=e.detail,r=e.selected,n=e.hasMonitoring;return f.default.createElement("div",{className:(0,d.default)(O.default.item,(0,l.default)({},O.default.selected,r)),onClick:this.handleClick},f.default.createElement(p.Icon,{name:m.ICON_TYPES.nodes,size:20}),f.default.createElement("div",{className:O.default.ring}),f.default.createElement("div",{className:O.default.name},f.default.createElement(y.default,{icon:null,to:null,title:a.name,desc:a.ip})),this.renderStatus(a),f.default.createElement("div",null,f.default.createElement(b.default,{title:f.default.createElement(f.default.Fragment,null,a.role.join(",")),description:t("ROLE")})),n&&f.default.createElement(f.default.Fragment,null,f.default.createElement("div",null,this.renderCPU(a)),f.default.createElement("div",null,this.renderMemory(a))))}}]),r}(f.default.Component);a.default=D},function(e,t,a){e.exports={wrapper:"e5Jf5_q8FscHgID58CD7H",alert:"_2AIc5Vz5VWAUWlhxAD9FCG",node:"_1NNyPvCXso2s-hSebtqNpd",popper:"_3lit3qZEFq4FaHoohTz1rG"}},function(e,t,a){e.exports={wrapper:"_3AXbBgab3cgu3MkpHMsT2n"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(18),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(18),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l,u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(14),m=r(239),h=n(r(26)),v=r(186),g=n(r(863)),y=r(52),E=n(r(318)),b=n(r(858)),_=n(r(2638)),O=n(r(1619));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=t.props,r=a.cluster,n=a.namespace;t.store.fetchList(C({cluster:r,namespace:n},e))},t.handleSelect=function(e){t.setState({selectItem:e})},t.handleCancel=function(){t.setState({selectItem:{}},(function(){t.props.onCancel()}))},t.handleOK=function(){var e=t.props.onSelect,a=t.state.selectItem;e((0,h.default)(a,"_originData.spec.template.metadata.labels",{}))},t.state={type:"deployments",selectItem:{}},t.store=(0,y.isEdgeWizePage)()?new b.default(t.state.type):new E.default(t.state.type),t}return(0,i.default)(r,[{key:"render",value:function(){var e=this,a=this.state,r=a.type,n=a.selectItem,l=(0,p.toJS)(this.store.list),u=l.data,o=l.total,i=l.page,c=l.isLoading;return d.default.createElement("div",null,d.default.createElement("div",{className:O.default.body},d.default.createElement(v.Alert,{className:"margin-b8",message:t("SELECT_WORKLOAD_DESC"),hideIcon:!0}),d.default.createElement(v.RadioGroup,{mode:"button",buttonWidth:120,value:r,onChange:this.handleTypeChange,size:"small"},d.default.createElement(v.RadioButton,{value:"deployments"},t("DEPLOYMENT_PL")),d.default.createElement(v.RadioButton,{value:"statefulsets"},t("STATEFULSET_PL")),d.default.createElement(v.RadioButton,{value:"daemonsets"},t("DAEMONSET_PL"))),d.default.createElement("div",{className:O.default.workloads},d.default.createElement(g.default,{data:u,total:o,page:i,loading:c,onFetch:this.fetchData},u.map((function(t,a){return d.default.createElement(_.default,{key:"".concat(t.uid).concat(a),module:r,detail:t,onClick:e.handleSelect,selected:n.uid===t.uid})}))))),d.default.createElement("div",{className:O.default.footer},d.default.createElement(v.Button,{onClick:this.handleCancel},t("CANCEL")),d.default.createElement(v.Button,{type:"control",onClick:this.handleOK},t("OK"))))}}]),r}(d.default.Component))||l;a.default=k},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(16),a(4),a(23),a(57),a(17);var n=r(a(30)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=r(a(3)),d=a(186),p=a(72),m=r(a(1619));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(a,e);var t=h(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getWatchListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion,"/watch").concat(e.getPath(t),"/").concat(e.module)},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath(t),"/").concat(e.module)},(0,f.default)(e,"getLog",c,(0,m.default)(e)),e}return(0,p.default)(g,[{key:"fetchJobDetail",value:(i=(0,s.default)(o.default.mark((function e(t){var a,r,n,l,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.name,r=t.cluster,n=t.namespace,this.isLoading=!0,e.next=4,request.get("/apis/batch/v1".concat(this.getPath({namespace:n,cluster:r}),"/jobs/").concat(a));case 4:l=e.sent,u=S.default.jobs(l),this.jobDetail=u,this.isLoading=!1;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"fetchRunDetail",value:(l=(0,s.default)(o.default.mark((function e(t){var a,r,n,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.cluster,r=t.namespace,n=t.runName){e.next=3;break}return e.abrupt("return");case 3:return this.getRunDetailLoading=!0,e.next=6,request.get("/apis/devops.kubesphere.io/v1alpha1".concat(this.getPath({namespace:r,cluster:a}),"/").concat(this.module,"/").concat(n));case 6:return l=e.sent,this.runDetail=S.default.s2iruns(l),this.getRunDetailLoading=!1,e.abrupt("return",this.runDetail);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"deleteRun",value:(r=(0,s.default)(o.default.mark((function e(t){var a,r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.cluster,r=t.namespace,n=t.runName){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,request.delete("/apis/devops.kubesphere.io/v1alpha1".concat(this.getPath({namespace:r,cluster:a}),"/").concat(this.module,"/").concat(n));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"fetchS2IRunRecords",value:(a=(0,s.default)(o.default.mark((function e(){var t,a,r,l,i,c,s,f,d,p,m,h,v,g,y,E=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=E.length>0&&void 0!==E[0]?E[0]:{},a=t.limit,r=void 0===a?10:a,l=t.name,i=t.page,c=void 0===i?1:i,s=t.order,f=t.reverse,t.workspace,d=t.cluster,p=t.namespace,m=t.more,h=(0,u.default)(t,["limit","name","page","order","reverse","workspace","cluster","namespace","more"]),this.list.data.length||(this.list.isLoading=!0),(v={}).conditions=(0,C.getFilterString)(k(k({},h),{},{"labels.devops.kubesphere.io/builder-name":l})),s||void 0!==f||(s="createTime",f=!0),r!==1/0&&(v.paging="limit=".concat(r,",page=").concat(c)),s&&(v.orderBy=s),v.reverse=!0,e.next=10,request.get("/kapis/resources.kubesphere.io/v1alpha2".concat(this.getPath({namespace:p,cluster:d}),"/").concat(this.module),v);case 10:return g=e.sent,(y=g.items.map(this.mapper)).forEach((function(e,t){e.count=g.total_count-t-10*(c-1),e.cluster=d})),this.list={data:m?[].concat((0,n.default)(this.list.data),(0,n.default)(y)):y,total:g.total_count||0,limit:Number(r)||10,page:Number(c)||1,order:s,reverse:f,filters:h,isLoading:!1,selectedRowKeys:[]},e.abrupt("return",this.list);case 15:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchPodsLogs",value:(t=(0,s.default)(o.default.mark((function e(t,a){var r,n,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,_.default)(this.logData,"logURL","")!==t&&(this.logData={isLoading:!1,log:"",start:0,hasMore:!1}),this.logData.isLoading=!0,r=(0,_.default)(t.match(/namespaces\/([\w-/.]*)*\?/),"1"),this.containerName){e.next=11;break}return e.next=6,request.get("api/v1".concat(this.getPath({namespace:r,cluster:a})));case 6:if(n=e.sent,(0,_.default)(n,"status.containerStatuses[0]containerID")){e.next=10;break}return e.abrupt("return",O.default.error("container not ready"));case 10:this.containerName=(0,_.default)(n,"spec.containers[0].name","");case 11:return e.next=13,request.get("/api/v1".concat(this.getPath({namespace:r,cluster:a}),"/log"),{container:this.containerName,timestamps:!0,tailLines:1e3});case 13:l=e.sent,this.logData={logURL:t,isLoading:!1,log:l,start:0,hasMore:!1};case 15:case"end":return e.stop()}}),e,this)}))),function(e,a){return t.apply(this,arguments)})},{key:"apiVersion",get:function(){return"/apis/devops.kubesphere.io/v1alpha1"}}]),g}(r(a(472)).default),(0,y.default)(i.prototype,"fetchJobDetail",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchJobDetail"),i.prototype),(0,y.default)(i.prototype,"fetchRunDetail",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchRunDetail"),i.prototype),(0,y.default)(i.prototype,"deleteRun",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"deleteRun"),i.prototype),(0,y.default)(i.prototype,"fetchS2IRunRecords",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchS2IRunRecords"),i.prototype),c=(0,y.default)(i.prototype,"getLog",[E.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,s.default)(o.default.mark((function t(a,r){var n,l,u,i,c,s,f,d;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.logData.logURL!==a&&(e.logData={isLoading:!0,log:"",start:0,hasMore:!0}),n=(0,C.parseUrl)(a).pathname.slice(1),l=(0,_.default)(n.match(/\/namespaces\/(.*)\/pods\//),"1"),u=(0,_.default)(n.match(/\/pods\/(.*)/),"1"),n="/kapis/tenant.kubesphere.io/v1beta1".concat(e.getPath({cluster:r}),"logs"),t.next=7,request.get(n,{namespaces:l,pods:u,container:e.containerName,timestamps:!0,tailLines:1e3,size:300,from:e.logData.start,sort:"asc"});case 7:i=t.sent,c=(0,_.default)(i,"query.records",[]),s=(0,_.default)(i,"query.total",[]),f=e.logData.log,(0,b.default)(c)&&(d=c.reduce((function(e,t){return e+t.log}),f),e.logData={logURL:a,log:d,start:e.logData.start+c.length,hasMore:s>e.logData.start+c.length,isLoading:!1});case 12:case"end":return t.stop()}}),t)})));return function(e,a){return t.apply(this,arguments)}}()}}),(0,y.default)(i.prototype,"fetchPodsLogs",[E.action],Object.getOwnPropertyDescriptor(i.prototype,"fetchPodsLogs"),i.prototype),i);t.default=T},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(84),r(975),r(18),r(48),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(24),r(17),r(85),r(64),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(84),r(975),r(18),r(28),r(48),r(191),r(42),r(16),r(159),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(85),r(64),r(7);var l=n(r(315)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(186),v=n(r(240)),g=n(r(952)),y=n(r(459)),E=n(r(26)),b=n(r(74)),_=n(r(3)),O=r(52),S=r(72),C=n(r(456)),D=n(r(2647));function k(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function N(e){for(var t=1;t=0?o[l]=e:o.push(e),(0,p.default)(u,"spec.rules",o),t.updateTLS(u),t.updateAnnotations(),a&&t.updateOverrides(),t.closeModal()},t.handleDelete=function(e){var a=t.props.isFederated,r=t.state.ingress,n=a?(0,d.default)(r,"spec.template"):r,l=(0,d.default)(n,"spec.rules",[]);l.splice(e,1),(0,p.default)(n,"spec.rules",l),t.updateTLS(n),t.updateAnnotations(),a&&t.updateOverrides(),t.closeModal()},t.changeIngressClassName=function(e){var a=t.state.ingress;t.props.isFederated?(0,p.default)(a,"spec.template.spec.ingressClassName",e):(0,p.default)(a,"spec.ingressClassName",e)},t.mapper=e.isFederated?k.default.federated(k.default.services):k.default.services,t.secretStore=new O.default,t.gatewayStore=new C.default,e.isFederated&&(t.secretStore=new S.default({module:t.secretStore.module}));var a=(0,d.default)(t.props.formData,"ingress",{});return t.state={ingress:a,old:(0,g.default)(a),services:Object.values((0,m.default)(t.props.formData,["application","ingress"])||{}).map((function(e){return t.mapper(e.service)})),showAdd:!1,selectRuleIndex:-1,operation:"",ingressNameOption:[]},t}return(0,i.default)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.cluster,a=e.namespace;this.secretStore.fetchList({namespace:a,cluster:t,limit:-1}),this.updateName(),this.getIngressNameOptions()}},{key:"getIngressNameOptions",value:(a=(0,u.default)(l.default.mark((function e(){var t,a,r,n,u;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,a=t.cluster,r=t.namespace,e.next=3,this.gatewayStore.getNewGatewayByProject({cluster:a,namespace:r});case 3:n=e.sent,u=(0,y.default)(n,(function(e){return{label:"".concat(e.ingressClass,"(").concat(e.name,")"),value:e.ingressClass}})),this.setState({ingressNameOption:u});case 6:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"componentDidUpdate",value:function(e){var t=this,a=this.props.formData;(0,v.default)(a,e.formData)||(this.setState({ingress:(0,d.default)(a,"ingress",{}),services:Object.values((0,m.default)(this.props.formData,["application","ingress"])||{}).map((function(e){return t.mapper(e.service)}))}),this.updateName())}},{key:"updateTLS",value:function(e){var t=(0,d.default)(e,"spec.rules",[]).filter((function(e){return"https"===e.protocol&&e.secretName})).reduce((function(e,t){var a=t.secretName,r=t.host,n=t.clusters,l=e.find((function(e){return e.secretName===a}));return l?(l.hosts=l.hosts||[],-1===l.hosts.indexOf(r)&&l.hosts.push(r)):e.push({hosts:[r],secretName:a,clusters:n}),e}),[]);(0,p.default)(e,"spec.tls",t)}},{key:"updateOverrides",value:function(){var e=[],t=this.props,a=t.isFederated,r=t.projectDetail,n=this.state.ingress,l=a?(0,d.default)(n,"spec.template"):n,u=(0,d.default)(l,"metadata.annotations",[]),o=(0,d.default)(l,"spec.rules",[]),i=(0,d.default)(l,"spec.tls",[]);(0,d.default)(r,"clusters",[]).forEach((function(t){var a=function(e){return e.filter((function(e){return e.clusters.includes(t.name)})).map((function(e){return(0,m.default)(e,"clusters")}))},r=[{path:"/spec/rules",value:a(o)},{path:"/spec/tls",value:a(i)}];(0,h.default)(u)||r.unshift({path:"/metadata/annotations",value:u}),e.push({clusterName:t.name,clusterOverrides:r})})),(0,p.default)(n,"spec.overrides",e)}},{key:"render",value:function(){var e=this.props,a=e.cluster,r=e.namespace,n=e.gateway,l=e.isFederated,u=e.projectDetail,o=e.formData,i=this.state,c=i.showAdd,s=i.ingress,f=i.services,p=i.selectRuleIndex,m=i.ingressNameOption,v=l?(0,d.default)(s,"spec.template"):s,y=(0,d.default)(v,"spec.rules[".concat(p,"]"),{}),O=(0,_.toJS)(this.secretStore.list.data);return b.default.createElement("div",{className:R.default.wrapper},b.default.createElement("div",{className:R.default.step},b.default.createElement("div",null,t("ROUTE_SETTINGS")),b.default.createElement("p",null,t("ROUTE_SETTINGS_DESC"))),!(0,h.default)(m)&&b.default.createElement(b.default.Fragment,null,b.default.createElement("div",{className:R.default.title},t("SELECT_INGRESSCLASSNAME")),b.default.createElement("div",{className:R.default.ingressClassName},b.default.createElement(E.Select,{name:"spec.ingressClassName",options:m,onChange:this.changeIngressClassName}))),b.default.createElement("div",{className:R.default.title},t("ROUTING_RULES")),b.default.createElement("div",{className:R.default.rules},b.default.createElement(N.default,{data:v,gateway:n,isFederated:l,projectDetail:u,onEdit:this.showEdit,onAdd:this.showAdd,onDelete:this.handleDelete})),b.default.createElement(T.default,{visible:c,data:y,cluster:a,namespace:r,isFederated:l,projectDetail:u,onOk:this.handleAdd,onCancel:this.closeEditModal,gateway:n,services:f,secrets:O,validData:(0,g.default)((null==o?void 0:o.ingress)||(null==o?void 0:o.Ingress))}))}}]),n}(b.default.Component);a.default=I},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(11),r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(11),r(18),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(26)),p=n(r(790)),m=n(r(1607)),h=n(r(2670));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var g=function(e){(0,o.default)(r,e);var a=v(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"renderContent",value:function(){var e=this.props,a=e.data,r=e.onEdit,n=e.onDelete,l=e.onAdd,u=e.projectDetail,o=(0,d.default)(a,"spec.rules",[]),i=(0,d.default)(a,"spec.tls",[]);return s.default.createElement("ul",null,o.filter((function(e){return e.host})).map((function(e,t){return s.default.createElement(m.default,{key:"".concat(e.host,"-").concat(t),rule:e,tls:i,index:t,onEdit:r,onDelete:n,projectDetail:u})})),s.default.createElement("div",{className:h.default.add,onClick:l},s.default.createElement(p.default,{title:t("ADD_ROUTING_RULE"),description:t("ADD_ROUTING_RULE_DESC")})))}},{key:"render",value:function(){var e=this.props.error;return s.default.createElement("div",{className:h.default.wrapper},this.renderContent(),e&&s.default.createElement("p",{className:h.default.error},e))}}]),r}(s.default.Component);a.default=g,g.propTypes={data:f.default.object,onAdd:f.default.func,onDelete:f.default.func},g.defaultProps={data:{},onAdd:function(){},onDelete:function(){}}},function(e,t,a){e.exports={item:"_1kmSC__ph67BXHwPHIgdEt",icon:"WG4jVOyftN1J-3Qx0HfRQ",texts:"_2oTQpDYJHbQK9cSrwXrn5D",text:"_1kD3DJ4-DvWshSbWqKFvAW",title:"_3RZYExlr-Pjh7uww6Y6ZEb",description:"_9GO6DcfvOoroeH4GfG06N",clusters:"_367T3thgG7QtDZw5kAaWNy",add:"_2okV3MjC6xqfPB6AWhGQ3",paths:"_3dHV84JUfbE34Iu4EQYkNU",path:"f5_6svLoP460Z6PT3paLt",error:"_7YcL-GLR8AmCzM2qQJESE"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(29),r(18),r(48),r(97),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(17),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(29),r(18),r(28),r(48),r(97),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(38),r(7),r(32);var l=n(r(315)),u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(26)),p=n(r(63)),m=n(r(74)),h=n(r(0)),v=n(r(1)),g=r(186),y=n(r(787)),E=n(r(829)),b=n(r(1330)),_=n(r(917)),O=r(72),S=r(52),C=n(r(1331));function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t1){a=!0;break}n++}})),a},n.handleProtocolChange=function(e){n.setState({protocol:e})},n.handleModeChange=function(e){n.setState({type:e})},n.handleSubmit=function(e){var t=n.props.onOk;if("auto"===n.state.type){var a=n.props,r=a.gateway,l=a.projectDetail,u=a.namespace,o=(0,d.default)(e,"http.paths[0].backend.service.name"),i=(0,d.default)(l,'_originData.metadata.labels["kubesphere.io/namespace"]')||u;t(k(k({},e),{},{protocol:"http",host:r.isHostName?r.defaultIngress:"".concat((0,S.withDot)(o)).concat((0,S.withDot)(i)).concat((0,S.withDot)(r.defaultIngress),"nip.io")}))}else t(e)},n.domainValidator=function(e,a,r){var l=n.props,u=l.isFederated,o=l.data,i=l.validData;if(!a)return r();var c=n.props.cluster||n.defaultClusters,s=(0,d.default)(i,"metadata.namespace","");u&&((0,m.default)(i,"apiVersion","networking.k8s.io/v1"),(0,m.default)(i,"kind","Ingress"),(0,m.default)(i,"spec",{})),(0,m.default)(i,"spec.rules",[{host:a}]),u?Promise.all(o.clusters.map((function(e){return n.ingressStore.checkValidDomain({cluster:e,namespace:s},i).then((function(e){return e.exist}))}))).then((function(a){if(a.some((function(e){return e})))return r({message:t("EXIT_DOMAIN_DESC"),field:e.field});r()})):(c=u?"":c,n.ingressStore.checkValidDomain({cluster:c,namespace:s},i).then((function(a){if(a.exist)return r({message:t("EXIT_DOMAIN_DESC"),field:e.field});r()})))},n.state={type:"specify",service:"",protocol:(0,d.default)(e,"data.protocol","http")},n.formRef=h.default.createRef(),n.ingressStore=new _.default,n}return(0,i.default)(r,[{key:"getType",value:function(e){var t=(0,d.default)(e,"host");if(!t)return"auto";var a=this.props.gateway,r=(0,d.default)(e,"http.paths[0].backend.service.name"),n=a.defaultIngress,l=a.namespace;return t==="".concat(r,".").concat(l,".").concat(n,".nip.io")?"auto":"specify"}},{key:"renderForm",value:function(){var e,a,r=this.state,n=r.type,l=r.protocol,u=this.props.services;return h.default.createElement(h.default.Fragment,null,"specify"===n&&h.default.createElement(h.default.Fragment,null,h.default.createElement(g.Form.Item,{label:t("DOMAIN_NAME_TCAP"),key:null===(e=this.props.data)||void 0===e||null===(a=e.clusters)||void 0===a?void 0:a.length,rules:[{required:!0,message:t("DOMAIN_NAME_EMPTY_DESC")},{pattern:O.PATTERN_HOST,message:t("INVALID_DOMAIN_DESC")},{validator:this.domainValidator}]},h.default.createElement(g.Input,{name:"host",autoFocus:!0})),h.default.createElement(g.Form.Item,{label:t("PROTOCOL")},h.default.createElement(g.Select,{name:"protocol",defaultValue:"http",onChange:this.handleProtocolChange,options:this.protocols})),"https"===l&&h.default.createElement(g.Form.Item,{label:t("SECRET")},h.default.createElement(g.Select,{name:"secretName",options:this.secrets,placeholder:" "}))),h.default.createElement(g.Form.Item,{label:t("PATH_PL"),rules:[{required:!0,message:t("PATH_EMPTY_DESC")},{validator:this.pathValidator,checkOnSubmit:!0}]},h.default.createElement(E.default,{name:"http.paths",itemType:"object",addText:t("ADD"),checkItemValid:this.checkItemValid},h.default.createElement(b.default,{services:u}))))}},{key:"render",value:function(){var e=this,a=this.props,r=a.data,n=a.isFederated;return h.default.createElement(y.default.Form,(0,l.default)({title:(0,p.default)(r)?t("ADD_ROUTING_RULE"):t("EDIT_ROUTING_RULES"),width:920},this.props,{onOk:this.handleSubmit}),n&&h.default.createElement(g.Form.Group,{label:t("CLUSTER")},h.default.createElement(g.Form.Item,null,h.default.createElement(C.default,{name:"clusters",options:this.clusters,defaultValue:this.defaultClusters,onChange:function(){(0,m.default)(r,"host",""),e.forceUpdate()}}))),h.default.createElement(g.Form.Group,null,this.renderForm()))}},{key:"protocols",get:function(){return[{label:"HTTP",value:"http"},{label:"HTTPS",value:"https"}]}},{key:"secrets",get:function(){return this.props.secrets.map((function(e){return{label:e.name,value:e.name}}))}},{key:"clusters",get:function(){return(0,d.default)(this.props,"projectDetail.clusters",[]).slice()}},{key:"clusterNames",get:function(){var e;return null==this||null===(e=this.clusters)||void 0===e?void 0:e.map((function(e){return e.name}))}},{key:"defaultClusters",get:function(){return(0,d.default)(this.props,"projectDetail.clusters",[]).map((function(e){return e.name}))}}]),r}(h.default.Component);a.default=T,T.propTypes={data:v.default.object,secrets:v.default.array,services:v.default.array,gateway:v.default.object},T.defaultProps={data:{},secrets:[],services:[],gateway:{}}},function(e,t,a){e.exports={wrapper:"_2hbsokbzN5hp5LxUC8iC_g",step:"aaRAmJaOKA075Il_FYhK2",title:"_24SLKDqrt12UAU6QIqBAa6",ingressClassName:"_2dwjt-_eLMxBcellsKHTca",rules:"_2vD7NSXS51pA2tah6hdoeM"}},function(e,a,r){"use strict";r(15);var n=r(20);r(6),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(6),r(28),r(42),r(10),r(4),r(23),r(57),r(17),r(7);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(58)),f=n(r(0)),d=n(r(1)),p=r(186),m=n(r(884)),h=n(r(2674));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var g=function(e){(0,o.default)(r,e);var a=v(r);function r(e){var t,n,u,o,i,c;return(0,l.default)(this,r),(t=a.call(this,e)).data=(n=e.formTemplate,u=n.application,o=n.ingress,i=(0,s.default)(n,["application","ingress"]),c=[u,o],Object.keys(i).forEach((function(e){i[e].workload&&c.push(i[e].workload),i[e].service&&c.push(i[e].service)})),c),t.editor=f.default.createRef(),t}return(0,u.default)(r,[{key:"getData",value:function(){return this.editor.current.getData()}},{key:"render",value:function(){return f.default.createElement("div",{className:h.default.wrapper},f.default.createElement("div",{className:h.default.step},f.default.createElement("div",null,t("EDIT_YAML")),f.default.createElement("p",null,t("CREATE_BY_YAML_DESC"))),f.default.createElement("div",{className:h.default.codeWrapper},f.default.createElement("div",{className:h.default.pane},f.default.createElement("div",{className:h.default.title},f.default.createElement(p.Icon,{name:"coding",size:20}),f.default.createElement("span",null,t("YAML_FILE"))),f.default.createElement(m.default,{ref:this.editor,className:h.default.editor,value:this.data}))))}}]),r}(f.default.Component);a.default=g,g.propTypes={formTemplate:d.default.object,onOk:d.default.func,isSubmitting:d.default.bool},g.defaultProps={onOk:function(){},isSubmitting:!1}},function(e,t,a){e.exports={wrapper:"_2DbNJPdfgI4dgBJisOntmF",step:"_2R0Y1Bov3UM9xHfuQx18YU",codeWrapper:"A3dbNbkmfuxiqBXaeGMFW",pane:"_3pEJUsXvQi9so5hxtsl2EC",editor:"_2dd7dYos5S09v8It9Eak_Z",title:"_3H0QVPSbai5_e60lcson19"}},function(e,t,a){e.exports={modal:"p8a6H-jXk5OnSxqkTWQn7",body:"QLzi6PtdDSAbo1ZjB_ejT",wrapper:"_1FueZNETQGMwoOrD2sbcQW",steps:"_2u31JZwaeV3OsrEiBfQM1h",header:"_1O2uhbM6HbwUYsq6yl2mBa",headerBottom:"_1b15o9UoGNxLLpM-BKvPOU",title:"_2Q1EYtOJAJrVd0Pila76Zv",content:"_2EnfwBZjZ9ExnG507HuLf0",footer:"_1Y38fHH45ZkbYyovxA_mJj"}},,,function(e,t,a){e.exports={wrapper:"_7-12p6hcf7X0VthZc5rST"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={wrapper:"_3vD3gkqPGNxpeg-IpdujoY"}},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(16),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(11),a(42),a(16),a(9),a(4),a(23),a(57),a(17);var n,l=r(a(61)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(49)),d=a(14);function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var m=(n=function(e){(0,i.default)(a,e);var t=p(a);function a(){return(0,u.default)(this,a),t.apply(this,arguments)}return(0,o.default)(a,[{key:"addItem",value:function(e){this.data=[].concat((0,l.default)(this.data),[e])}},{key:"deleteItem",value:function(e){this.data=this.data.filter((function(t){return t.name!==e.name}))}}]),a}(r(a(120)).default),(0,f.default)(n.prototype,"addItem",[d.action],Object.getOwnPropertyDescriptor(n.prototype,"addItem"),n.prototype),(0,f.default)(n.prototype,"deleteItem",[d.action],Object.getOwnPropertyDescriptor(n.prototype,"deleteItem"),n.prototype),n);t.default=m},,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={"tags-duotone":'\n\n\n\n',"chain-off-duotone":'\n\n\n\n\n',event:'\n\n\n',"switch-button-duotone":'\n ',"volume-off-duotone":'',"bell-off-duotone":'',"earth-fill":'',"clock-duotone":''}},,,,,,function(e,t,a){e.exports={desc:"_2tdVqiHSAO-_hh2j8kmDdY",narrowItem:"_2dCR56ukrNg2YglIMXZMEw"}},,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={wrapper:"_2KCv1PnULxt1qFyQJeysBX",header:"_1F-0HDMWN3VFriGu-tr3Yx",title:"_13MPI-7qlosXGEs9LAnahA",select:"_3NcEBNmpoac-j5yvlYEfRp"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={accessModeWrapper:"t3ac6iAwz0VNleKctOM3q",accessMode:"_2ntH9Ni8zzlXvi9v2KCUYd"}},function(e,t,a){e.exports={wrapper:"_3RvD5UEuKHt_T1xybRhGfS",select:"_1aQ7ChfUm20NELU7IiXMSM"}},function(e,t,a){e.exports={wrapper:"btc8Ihe1GfSKeBPW4ocRC",value:"_1xboWqu4MnvlYbNanj_e",text:"_2_YxJhzeMUvmjUAngLClSH",buttons:"_28QqiVnCn-59TULfI9fWSA"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(1)),d=n(r(3)),p=r(186),m=n(r(240)),h=n(r(952)),v=n(r(2921));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=function(e){(0,o.default)(r,e);var a=g(r);function r(e){var n;return(0,l.default)(this,r),(n=a.call(this,e)).uploaderProps={name:"file",action:"/images/upload",accept:"image/*",beforeUpload:function(e){return!(e.size>2097152)||(m.default.error(t("FILE_OVERSIZED_TIP")),!1)},onSuccess:function(t){t&&e.onChange(t.path)}},n}return(0,u.default)(r,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.value,r=e.placeholder,n=e.defaultLogo;return s.default.createElement(p.Columns,{className:(0,d.default)("is-variable is-2",t)},s.default.createElement(p.Column,{className:"is-narrow"},s.default.createElement("img",{className:(0,d.default)(v.default.image,"upload-preview"),src:a||n})),s.default.createElement(p.Column,null,s.default.createElement(h.default,this.uploaderProps,s.default.createElement("div",{className:v.default.upload},s.default.createElement(p.Icon,{size:32,name:"upload"}),s.default.createElement("p",null,r)))))}}]),r}(s.default.Component);a.default=y,y.propTypes={className:f.default.string,defaultLogo:f.default.string,placeholder:f.default.string,value:f.default.string,onChange:f.default.func},y.defaultProps={className:"",value:"",onChange:function(){}}},function(e,t,a){e.exports={image:"_167OKUS_EKBqwDQxcIx-4e",upload:"_2t1CYrv42g1fxOKAN8Cxrv"}},function(e,t,a){e.exports={wrapper:"_4ZwD-XBeeb89uHJUpnc9X",trigger:"_39IOrUHzeoispGPqyhIGmq",content:"_1ddoFZzzUSM-yo3jVhK8Dv",rules:"_3J0m5Rox1YBbKgpQhXuhAt",barWrapper:"_3cTk_xH00ce2_lz197ulvB",bar:"pMEaabr1XWMm3r_fW2afr",tip:"yLbagG9qc0xvXpKUX3Ltx",icon:"_1CXCvE_9U9AkVY2j9zINU2",selected:"_2_Gwnizz4eeI_iF5yIUwav"}},function(e,t,a){e.exports={wrapper:"_3SwZze98375W9bhfjiqN-o",slider:"_28M70O8IpxNUXf81fNeAAx",floatContent:"XqxDCyE_PSNWzijpRx5vU"}},function(e,t,a){},function(e,t,a){e.exports={container:"_2VDZ-7eQWd8zMV87f6SbU-",select:"_1njJEaKU6jyyl9YDFHgWWW"}},function(e,t,a){e.exports={option:"_1Iz4ohvzuXgnhL83dbwRxn"}},function(e,t,a){"use strict";var r=a(157),n=a(20);a(12),a(5),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var l=n(a(30)),u=n(a(58)),o=n(a(36)),i=n(a(37)),c=n(a(55)),s=n(a(56)),f=n(a(51)),d=r(a(0)),p=n(a(158)),m=n(a(470));function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function v(e){for(var t=1;t63)return void h.default.error({content:t("PATTERN_TAG_VALUE_INVALID_TIP")});e.setState({value:""},(function(){n(u)}))}}else"Backspace"===a.key&&l()},e}return(0,o.default)(r,[{key:"render",value:function(){var e=this,t=this.state.value,a=this.props,r=a.style,n=a.placeholder;return f.default.createElement("div",{style:r,className:g.default.autosuggest,ref:function(t){e.autosuggest=t}},f.default.createElement(m.default,{className:g.default.autosuggestInput,type:"text",onKeyDown:this.handlePressEnter,onChange:this.handleChange,placeholder:n,ref:function(t){e.inputBox=t},value:t}))}}]),r}(f.Component);E.propTypes={onChange:d.default.func,onDelete:d.default.func,prefixCls:d.default.string,className:d.default.string,style:d.default.string,placeholder:d.default.string},E.defaultProps={prefixCls:"autosuggest",onAdd:p.default,onDelete:p.default,onChange:p.default};var b=E;a.default=b},,function(e,t,a){e.exports={extraBox:"_1XMQaAa8OBSWxpBisNQs07",IconBox:"_2IfBBHb39w_3FGYztJhAaA","input-padding-right-30":"_1Qlf_8Cc_90DXEXYz5Vg_y"}},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"UnitInput",{enumerable:!0,get:function(){return u.default}}),t.TimeUnitInput=void 0;var n=a(52),l=a(467),u=r(a(2933)),o=(0,n.withProps)(u.default,{units:l.timeUnit});t.TimeUnitInput=o},function(e,a,r){"use strict";var n=r(157),l=r(20);r(12),r(11),r(31),r(6),r(84),r(18),r(27),r(9),r(13),r(10),r(85),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(11),r(31),r(6),r(84),r(18),r(28),r(27),r(34),r(15),r(9),r(13),r(10),r(4),r(85),r(7);var u=l(r(315)),o=l(r(96)),i=l(r(30)),c=l(r(58)),s=r(186),f=l(r(799)),d=l(r(1)),p=n(r(0)),m=r(52),h=l(r(2934));function v(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function g(e){for(var t=1;t0&&void 0!==o[0]?o[0]:{},r=e.props.cluster,n=e.state.groupNamespace,t.next=5,e.projectStore.fetchList(T({cluster:r},a));case 5:l=t.sent,u=l.map((function(e){return T(T({},e),{},{nodegroup:n.some((function(t){return t.name===e.name&&t.nodegroup}))})})),e.setState({projectData:[].concat((0,i.default)(e.state.projectData),(0,i.default)(u))});case 8:case"end":return t.stop()}}),t)}))),e.fetchNodeGroupStore=(0,d.default)(s.default.mark((function t(){var a,r;return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.props.cluster,t.next=3,e.nodeGroupStore.fetchAllNamespaces({cluster:a,limit:"-1",page:1});case 3:r=t.sent,e.setState({groupNamespace:r.map((function(e){return{name:e.name,nodegroup:""===(0,_.default)(e,'labels["apps.edgewize.io/nodegroup"]')}}))});case 5:case"end":return t.stop()}}),t)}))),e.optionRenderer=function(a){return y.default.createElement("div",{className:k.default.tipBox},y.default.createElement("div",{className:k.default.option},a.isFedManaged?y.default.createElement("img",{className:k.default.indicator,src:"/assets/cluster.svg"}):y.default.createElement(O.Icon,{name:"project"}),a.label),(a.isFedManaged||!a.nodegroup)&&y.default.createElement(O.Tooltip,{content:e.props.tipMessage||(a.isFedManaged?t("FEDPROJECT_RESOURCE_TIP"):!a.nodegroup&&"nodegrup")},y.default.createElement(O.Icon,{className:k.default.tip,name:"question"})))},e}return(0,m.default)(r,[{key:"componentDidMount",value:function(){this.fetchData()}},{key:"getProjects",value:function(){var e=this.props.defaultValue,t=this.state.projectData,a=t.filter((function(e){return"Terminating"!==e.status})).map((function(e){return{label:e.name,value:e.name,disabled:e.isFedManaged||!e.nodegroup,isFedManaged:e.isFedManaged,nodegroup:e.nodegroup}}));return e&&!t.find((function(t){return t.name===e}))&&a.unshift({label:e,value:e}),a}},{key:"render",value:function(){var e=this.props,t=(e.cluster,(0,o.default)(e,["cluster"]));return!t.value&&t.defaultValue&&(t.value=t.defaultValue),y.default.createElement(O.Select,(0,u.default)({options:this.getProjects(),pagination:(0,b.default)(this.projectStore.list,["page","limit","total"]),isLoading:this.projectStore.list.isLoading,valueRenderer:this.optionRenderer,optionRenderer:this.optionRenderer,onFetch:this.fetchProjects,searchable:!0,clearable:!0,placeholder:" "},t))}}]),r}(y.Component))||f;a.default=w},function(e,t,a){e.exports={option:"_3Ct5TvyryxAmQgGcuMAOjM",tip:"_1Y5Wsb92G4yhdT_HetNO3G",tipBox:"_167pjDZ6cyN37GR-Q-Pp9f"}},,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={reason:"_2dAqW00YgMOSGORjuFVBGs",condition:"_3AeobLZKN_rHf4jlnsiMQk",title:"_3TkAdRLw937iktrSAezDu7",warning:"ALCcOSqNlYNtz2BKsiq8d",error:"_28enlxYAYUjvqkyLqd5qPC",reasonDesc:"dlkjsSoal876oQiTVfCr7"}},function(e,a,r){"use strict";r(15);var n=r(157);r(84),r(10),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=e.data,r=(0,l.useMemo)((function(){var e;return null==a||null===(e=a.annotations)||void 0===e?void 0:e["kubesphere.io/relatedHPA"]}),[a]),n=(0,l.useMemo)((function(){return Object.keys(a.labels).includes("autoscaling.kubeshpere.io/name")}),[a]),o=(0,l.useMemo)((function(){return n?t("WORKLOAD_SCALING_TOOL_TIP"):t("HPA_SET_TIP")})),i=(0,l.useMemo)((function(){return n?"stretch":"timed-task"}));if(!r&&!n)return null;return l.default.createElement(u.Tooltip,{content:o},l.default.createElement(u.Icon,{name:i,size:18}))},r(84),r(10),r(85);var l=n(r(0)),u=r(186)},function(e,t,a){e.exports={status:"_11_Dlx6pO5mTVNNIwnnhEU"}},,,,,,,,,,,,,,,,,function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(31),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(31),r(6),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l=n(r(315)),u=n(r(58)),o=n(r(30)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(1)),h=n(r(3)),v=n(r(63)),g=n(r(26)),y=r(186),E=n(r(828)),b=n(r(2974)),_=n(r(1690));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=t.map((function(e){var t=e.host,a=void 0===t?"":t,r=e.port,n=void 0===r?"":r;return"".concat(a.replace(/,/g,""),":").concat(n)})).join(",");e.props.onChange(a)},e}return(0,o.default)(r,[{key:"render",value:function(){var e=(0,d.default)(this.props,"value","").split(",").map((function(e){var t=e.match(/(.*):(.*)$/)||[],a=(0,l.default)(t,3),r=a[1],n=void 0===r?"":r,u=a[2];return{port:void 0===u?"":u,host:n}}));return f.default.createElement(m.default,{addText:t("ADD_SERVICE_ADDRESS"),itemType:"object",value:e,onChange:this.onChange},f.default.createElement(p.default,{className:g.default.address},f.default.createElement(v.Input,{name:"host",className:g.default.host,placeholder:t("EXAMPLE_VALUE",{value:"192.168.1.10"})}),f.default.createElement(h.default,{className:g.default.port,name:"port",min:0,max:65535,placeholder:t("EXAMPLE_VALUE",{value:9200}),integer:!0})))}}]),r}(f.default.Component);a.default=E},function(e,t,a){e.exports={address:"_2Y-pkqthIJRIsP4ExOInjH",host:"h1zpisJbm-ZoDbaSXptJj",port:"_2UTT5V7_N5_xNrvXpJIG5b"}},function(e,t,a){e.exports={path:"_1MJQsfqeDDP96NX-4TVyLe",columns:"_2dymll3HxLR4qGfdodyzRb",desc:"_1q83WoQ9jB2uwX0GBmVgmT"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(12),a(109),a(5),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(109),a(45),a(5),a(42),a(4),a(23),a(57),a(17);var n=r(a(30)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=r(a(1)),d=a(186),p=r(a(3)),m=r(a(1196));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var v=function(e){(0,o.default)(a,e);var t=h(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;un-1)E.default.error({content:t.html("MAX_EAMIL_COUNT",{count:n}),duration:1e3});else if(r.some((function(e){return e===a})))E.default.error({content:t("EMAIL_EXISTS"),duration:1e3});else{if(b.PATTERN_EMAIL.test(a))return!0;E.default.error({content:t("INVALID_EMAIL"),duration:1e3})}else E.default.error({content:t("EMAIL_EMPTY_DESC"),duration:1e3})},e.handleAdd=function(t){var a=e.props,r=a.value;(0,a.onChange)([].concat((0,l.default)(r),[t]))},e.handleDelete=function(t){var a=e.props,r=a.value;(0,a.onChange)(r.filter((function(e){return e!==t})))},e.renderListItem=function(a){return f.default.createElement("div",null,a," ",a===e.userEmail&&f.default.createElement(v.Tag,null,t("CURRENT_USER")))},e}return(0,o.default)(r,[{key:"render",value:function(){var e=this,t=this.props,a=t.value,r=t.className;return f.default.createElement("div",{className:(0,p.default)(O.default.wrapper,r)},f.default.createElement(y.default,{placeholder:"user@example.com",validate:this.validateMail,onAdd:this.handleAdd,showIcon:!0}),!(0,m.default)(a)&&f.default.createElement("div",{className:O.default.listWrapper},f.default.createElement(g.default,null,a.map((function(t){return f.default.createElement(g.default.Item,{key:t,className:O.default.listItem,title:e.renderListItem(t),onDelete:function(){return e.handleDelete(t)}})})))))}},{key:"userEmail",get:function(){return(0,h.default)(globals,"user.email")}}]),r}(f.default.Component);a.default=C,C.propTypes={value:d.default.array,onChange:d.default.func},C.defaultProps={value:[],onChange:function(){}}},,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(11),a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(11),a(18),a(42),a(4),a(23),a(57),a(17);var n=r(a(61)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=r(a(1)),d=r(a(3)),p=r(a(63)),m=r(a(812)),h=r(a(1060)),v=r(a(1378));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=function(e){(0,o.default)(a,e);var t=g(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,u=new Array(r),o=0;o 85',for:"1m",labels:{rule_id:"e56cf89c-c323-4754-a6c4-2f4ff4e91458"},severity:"warning"},{alert:"AvailableDiskLessThan15Percent",annotations:{message:"",summary:"磁盘可用百分比小于15%。"},expr:'round(sum(kubelet_volume_stats_available_bytes{namespace="namespaceName",persistentvolumeclaim=~"data-0-clusterId-kafka.*"})/sum(kubelet_volume_stats_capacity_bytes{namespace="namespaceName",persistentvolumeclaim=~"data-0-clusterId-kafka.*"})*100,0.1) < 15',for:"1m",labels:{rule_id:"9c52bb99-4146-4ab6-8002-2bebac7f9bb2"},severity:"warning"},{alert:"ExistOfflinePartitions",annotations:{message:"",summary:"存在不可用的partitions。"},expr:'sum(kafka_controller_kafkacontroller_offlinepartitionscount{namespace="namespaceName",strimzi_io_cluster="clusterId"}) > 0',for:"1m",labels:{rule_id:"4bce37ac-fe22-42b9-854a-097a578bb52a"},severity:"error"}]}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.redisAlertYaml=void 0;t.redisAlertYaml={apiVersion:"alerting.kubesphere.io/v2beta1",kind:"RuleGroup",metadata:{annotations:{dmp_managed_field:'[{"metricType":"Memory Usage","comparator":">=","thresholds":"70"}]',"kubesphere.io/creator":"admin"},creationTimestamp:"2023-10-07T08:11:25Z",generation:1,labels:{"alerting.kubesphere.io/enable":"true",app_instance:"clusterId",openpitrix_app_id:"app-redis-sentinel"},name:"clusterId-default",namespace:"namespaceName",uid:"94e4f243-9027-4cea-a663-7b4989d2c4cc"},spec:{rules:[{alert:"MemoryUsage",annotations:{message:"RadonDB Redis: clusterId,当前内存使用率超过 %。 当前值:{{ $value }}",summary:"RadonDB Redis 【clusterId】 当前内存使用率超过 %"},expr:'redis_memory_used_bytes{namespace="namespaceName",service=~".*clusterId.*"}/redis_memory_max_bytes{namespace="namespaceName",service=~".*clusterId.*"}*100 >= 70',for:"1m",labels:{rule_id:"794e0a39-4d7c-42fc-91ae-c8c45d8110b3"},severity:"warning"}]}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.openSearchAlertYaml=void 0;t.openSearchAlertYaml={apiVersion:"alerting.kubesphere.io/v2beta1",kind:"RuleGroup",metadata:{annotations:{dmp_managed_field:'[{"metricType":"OpenSearchAvailableDiskLessThan15%","comparator":"-","thresholds":""},{"metricType":"OpenSearchAvailableDiskLessThan10%","comparator":"-","thresholds":""},{"metricType":"OpenSearchHeapMemTooHigh90%","comparator":"-","thresholds":""}]',"kubesphere.io/creator":"admin"},creationTimestamp:"2023-10-07T07:53:28Z",generation:3,labels:{"alerting.kubesphere.io/enable":"true",app_instance:"clusterId",openpitrix_app_id:"app-opensearch"},name:"clusterId-default",namespace:"namespaceName",uid:"defeed56-e6b0-4b33-a677-ef232b5c8329"},spec:{rules:[{alert:"AvailableDiskLessThan15Percent",annotations:{message:"RadonDB OpenSearch: clusterId,磁盘可用百分比小于15%。 当前值:{{ $value }}",summary:"RadonDB OpenSearch 【clusterId】 磁盘可用百分比小于15%"},expr:'min(round(opensearch_fs_total_available_bytes{service="clusterId",namespace="namespaceName"}/opensearch_fs_total_total_bytes{service="clusterId",namespace="namespaceName"}*100,0.1))<15',for:"1m",labels:{rule_id:"0d159444-bd60-4777-a327-075487d62549"},severity:"warning"},{alert:"AvailableDiskLessThan10Percent",annotations:{message:"RadonDB OpenSearch: clusterId,磁盘可用百分比小于10%。 当前值:{{ $value }}",summary:"RadonDB OpenSearch 【clusterId】 磁盘可用百分比小于10%"},expr:'min(round(opensearch_fs_total_available_bytes{service="clusterId",namespace="namespaceName"}/opensearch_fs_total_total_bytes{service="clusterId",namespace="namespaceName"}*100,0.1))<10',for:"1m",labels:{rule_id:"37ac67a4-3fca-41d6-a54d-0813d5a7ee21"},severity:"error"}]}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.pgAlertYaml=void 0;t.pgAlertYaml={apiVersion:"alerting.kubesphere.io/v2beta1",kind:"RuleGroup",metadata:{annotations:{dmp_managed_field:'[{"metricType":"PGDisk","comparator":">=","thresholds":85}]',"kubesphere.io/creator":"admin"},creationTimestamp:"2023-10-08T04:59:40Z",generation:1,labels:{"alerting.kubesphere.io/enable":"true",app_instance:"clusterId",openpitrix_app_id:"app-postgresql"},name:"clusterId-default",namespace:"namespaceName",uid:"2c3c72f8-5239-45b8-af87-9721cea217fd"},spec:{rules:[{alert:"PGDisk",annotations:{message:"RadonDB PostgreSQL: clusterId,磁盘使用率超过 %。 当前值:{{ $value }}",summary:"RadonDB PostgreSQL 【clusterId】 磁盘使用率超过 %。"},expr:'kubelet_volume_stats_used_bytes{persistentvolumeclaim=~".*clusterId-readwriteinstance.*|.*clusterId-readonlyinstance.*"} / kubelet_volume_stats_capacity_bytes{persistentvolumeclaim=~".*clusterId-readwriteinstance.*|.*clusterId-readonlyinstance.*"} * 100 >= 85',for:"1m",labels:{rule_id:"e7a5e07a-979f-4503-8fda-1c992e920d80"},severity:"warning"}]}}},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.MySQLAlertYaml=void 0;t.MySQLAlertYaml={apiVersion:"alerting.kubesphere.io/v2beta1",kind:"RuleGroup",metadata:{annotations:{dmp_managed_field:'[{"metricType":"MySQLDisk","comparator":">=","thresholds":85}]',"kubesphere.io/creator":"admin"},creationTimestamp:"2023-10-09T03:17:04Z",generation:1,labels:{"alerting.kubesphere.io/enable":"true",app_instance:"clusterId",openpitrix_app_id:"app-mysql"},name:"clusterId-default",namespace:"namespaceName",uid:"0361ef38-ed49-477f-a473-0da2d5a90b45"},spec:{rules:[{alert:"MySQLDisk",annotations:{message:"RadonDB MySQL: clusterId,磁盘使用率超过 %。 当前值:{{ $value }}",summary:"RadonDB MySQL 【clusterId】 磁盘使用率超过 %"},expr:'(kubelet_volume_stats_used_bytes{persistentvolumeclaim=~".*clusterId.*"} / kubelet_volume_stats_capacity_bytes{persistentvolumeclaim=~".*clusterId.*"} * 100) >= 85',for:"1m",labels:{rule_id:"c0b9010a-d74c-4bf9-8b5a-b7a6105f6f93"},severity:"warning"}]}}},,function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(4),r(319),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=r(186),h=n(r(836)),v=n(r(3235));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var y=function(e){(0,i.default)(r,e);var a=g(r);function r(e){var t;return(0,u.default)(this,r),(t=a.call(this,e)).handleClickImage=function(e){var a=e.currentTarget.dataset.idx;t.stopAnimation(),t.setState({showOverlay:!0,currentIdx:parseInt(a,10)||0})},t.closeOverlay=function(){t.setState({showOverlay:!1})},t.getPrevNextIdx=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"next",a=t.state.currentIdx,r=t.props.images.length;return"next"===e?a+1>=r?0:a+1:a-1<0?r-1:a-1},t.showNextPic=function(){t.setState({currentIdx:t.getPrevNextIdx()})},t.handleClickPrev=function(){t.goToIdx(t.getPrevNextIdx("prev"))},t.handleClickNext=function(){t.goToIdx(t.getPrevNextIdx())},t.handleClickIndicator=function(e){t.goToIdx(e)},t.goToIdx=function(e){t.stopAnimation(),t.setState({currentIdx:e})},t.state={showOverlay:!1,currentIdx:e.defaultIdx||0},t}return(0,o.default)(r,[{key:"componentDidUpdate",value:function(e,t){var a=this.state.currentIdx;a!==t.currentIdx&&this.props.onChangeImage(this.props.images[a])}},{key:"componentWillUnmount",value:function(){this.stopAnimation()}},{key:"stopAnimation",value:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}},{key:"renderOverlay",value:function(){var e=this.state,t=e.showOverlay,a=e.currentIdx,r=this.props.images[a];return t?f.default.createElement("div",{className:v.default.overlay},f.default.createElement("div",{className:v.default.closeOverlay,onClick:this.closeOverlay},f.default.createElement(m.Icon,{name:"close",size:24,type:"dark"})),f.default.createElement("div",{className:v.default.viewCont},f.default.createElement("label",{className:v.default.pre,onClick:this.handleClickPrev},f.default.createElement(m.Icon,{name:"chevron-left",size:24,type:"dark"})),f.default.createElement("label",{className:v.default.next,onClick:this.handleClickNext},f.default.createElement(m.Icon,{name:"chevron-right",size:24,type:"dark"})),f.default.createElement("div",{className:v.default.overlayPic},f.default.createElement(h.default,{src:r})))):null}},{key:"render",value:function(){var e=this,a=this.props,r=a.images,n=a.className,u=this.state.currentIdx,o=210*r.length,i=210*u;return r.length?f.default.createElement("div",{className:(0,p.default)(v.default.slider,n)},f.default.createElement("label",{className:v.default.pre,onClick:this.handleClickPrev},f.default.createElement(m.Icon,{name:"chevron-left",size:24,type:"dark"})),f.default.createElement("label",{className:v.default.next,onClick:this.handleClickNext},f.default.createElement(m.Icon,{name:"chevron-right",size:24,type:"dark"})),r.length>2&&f.default.createElement("div",{className:v.default.dotList},r.map((function(t,a){return f.default.createElement("label",{key:"".concat(t,"-").concat(a),className:v.default.dot,onClick:function(){return e.handleClickIndicator(a)}},f.default.createElement("span",{className:(0,p.default)((0,l.default)({},v.default.active,u===a))}))}))),f.default.createElement("div",{className:v.default.listOuter},f.default.createElement("ul",{className:v.default.pictureList,style:{width:"".concat(o,"px"),left:"-".concat(i,"px")}},r.map((function(t,a){return f.default.createElement("li",{className:v.default.pictureOuter,key:a},f.default.createElement("div",{className:v.default.picture,"data-idx":a,onClick:e.handleClickImage},f.default.createElement(h.default,{src:t})))})))),this.renderOverlay()):f.default.createElement("div",{className:v.default.slider},t("NONE"))}}]),r}(f.default.PureComponent);a.default=y,y.propTypes={images:d.default.array.isRequired,onChangeImage:d.default.func,defaultIdx:d.default.number},y.defaultProps={images:[],onChangeImage:function(){},defaultIdx:0}},function(e,t,a){e.exports={slider:"m_31JSg6nUGhFZ5iAQUjU",pre:"P-w7KNnKvWDxXSrhHQxtZ",next:"vOIr4lPa5nsQ56p4JEDGu",disabled:"_2_nv3-wXNbTm1BHHlvUTy4",dotList:"_1TLzD0vpvRi3GaoYbX8pdk",dot:"_1Rem-XXjxrvGjbZZyM7Dqh",active:"_37ns6MNNforGPal8rdECz7",listOuter:"csullZjO0y8IcXlc9LirY",pictureList:"LSi2b_Lkrdk8wVRxlhwhQ",pictureOuter:"_2oFhbjePYqBFsvRHbpFwgG",picture:"_1m-TiVY9Dxxxc1YDUiDhF1",overlay:"_7a8Ix3gbvxd6JTh4tz75n",viewCont:"Hj97dEjPT3P_BYypqENEP",overlayPic:"_3ssVJsi-xownM8NUxZXV5e",fadeIn:"_2uybTeXUle2_galUE-2PT8",closeOverlay:"_3BFnq_4zFEzfnOD7IqbdJN"}},function(e,t,a){e.exports={appInfo:"_3AilH8qFkHx_4avHhZDK_4",title:"_12ML492fWTSMsK4vhUQt4U",versions:"_16JKvu0z7Y-Y4tB-Qsj0Ym",name:"_1mGDyZCPCDchoHaPc_BfFV",date:"_1j85iHLJPDExOlvmRKaqYF",desc:"_1BNX8-yI6Ox7Laya_AeDlG"}},,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={desc:"_3eh_E2EhQNcWLy8V-DL0TU"}},,,,,,,,function(e,t,a){e.exports={option:"_3mIiIau0E55cqSsXvtolhg",select:"_34FEBq7gI9Px86nIWbr_Pt","multi-repo":"_2nIdZAqBbg0vOZn6U8y_f-"}},,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(18),a(48),a(16),a(9),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(48),a(42),a(16),a(9),a(4),a(23),a(57),a(17);var n,l,u,o,i,c,s,f=r(a(61)),d=r(a(65)),p=r(a(36)),m=r(a(37)),h=r(a(88)),v=r(a(55)),g=r(a(56)),y=r(a(51)),E=r(a(49)),b=(r(a(66)),r(a(0))),_=a(14),O=a(239),S=r(a(3270)),C=r(a(1734));function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,y.default)(e);if(t){var n=(0,y.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,g.default)(this,a)}}var k=(0,O.observer)((s=c=function(e){(0,v.default)(a,e);var t=D(a);function a(){var e;(0,p.default)(this,a);for(var r=arguments.length,n=new Array(r),l=0;l=0&&t.sort>=0?e.sort-t.sort:t.sort-e.sort}))})).then(t.callback)},t.handleOk=function(){t.props.onAddStep({name:"input",arguments:[{key:"message",value:{isLiteral:!0,value:t.state.value}},{key:"submitter",value:{isLiteral:!0,value:t.state.submitter.join(", ")}}]})},t.memberStore=new R.default;var n=t.getDefaultData(),l=n.value,u=n.submitter;return t.state={loading:!1,value:l,submitter:u},t}return(0,d.default)(r,[{key:"render",value:function(){var e=this.props,a=e.visible,r=e.onCancel;return y.default.createElement(T.default,{width:680,bodyClassName:w.default.body,onCancel:r,onOk:this.handleOk,visible:a,closable:!1,title:t("input")},y.default.createElement(N.Alert,{type:"info",icon:"information",className:w.default.info,message:t("INPUT_DESC")}),y.default.createElement(N.Form,{data:this.formData,ref:this.formRef},y.default.createElement(N.Form.Item,{label:t("MESSAGE"),desc:t("INPUT_MESSAGE_DESC"),rules:[{required:!0,message:t("PARAM_REQUIRED")}]},y.default.createElement(k.MentionsInput,{className:"mention-input",value:this.state.value,onChange:this.handleMessageChange,onBlur:this.handleMessageSubmitter,placeholder:t("@somebody to help review")},y.default.createElement(k.Mention,{data:this.fetchUsers,loading:this.state.loading,type:"user",appendSpaceOnAdd:!0,displayTransform:function(e){return"@".concat(e)},markup:"@__id__ "})))))}}]),r}(y.default.Component),i.propTypes={name:E.default.string},i.defaultProps={visible:!1,onOk:function(){},onCancel:function(){}},u=c,o=(0,g.default)(u.prototype,"fetchUsers",[C.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t,a){t&&(e.debounced||(e.debounced=(0,b.default)(e.getUsers,300)),e.query=t,e.callback=a,e.debounced())}}}),l=u))||l;a.default=M},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(31),r(18),r(87),r(16),r(98),r(10),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(61)),u=n(r(65)),o=n(r(36)),i=n(r(37)),c=n(r(88)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(49));n(r(66));r(45),r(5),r(31),r(18),r(87),r(42),r(16),r(98),r(10),r(4),r(23),r(57),r(24),r(17),r(62);var m,h,v,g,y,E=n(r(0)),b=n(r(1)),_=n(r(26)),O=n(r(241)),S=r(14),C=r(239),D=r(186),k=n(r(787)),N=r(982),T=n(r(853));function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var w=function(e,t){var a=Object.keys(e).reduce((function(t,a){return"".concat(t).concat(a," : '").concat(e[a],"' ,")}),"");return"${[".concat(t,"(").concat(a,")]}")},I={secret_text:"string",username_password:"usernamePassword",ssh:"sshUserPrivateKey",kubeconfig:"kubeconfigContent",kubeconfigFile:"kubeconfigFile"},M=(0,C.observer)((y=g=function(e){(0,s.default)(r,e);var a=R(r);function r(e){var n;return(0,o.default)(this,r),(n=a.call(this,e)).initEditor=function(){var e=n.props.edittingData;if("withCredentials"===e.type){var t=(0,_.default)(e,"data.value","");if(t){var a=(0,N.groovyToJS)(t),r=function(e){var t=/\$\{\[([\w-]*)\(/,a=e.match(t)&&e.match(t)[1];if(a){var r=Object.entries(I).find((function(e){return e[1]===a}));return r?r[0]:null}return null}(t);n.setState({formData:a,credentialType:r})}}},(0,u.default)(n,"handleCredentialChange",v,(0,c.default)(n)),n.handleOk=function(){var e=n.formRef.current.getData();n.formRef.current.validate((function(){n.props.onAddStep({name:"withCredentials",arguments:{isLiteral:!1,value:w(e,I[n.state.credentialType])},children:[]})}))},n.renderParams=function(){switch(n.state.credentialType){case"username_password":return E.default.createElement(E.default.Fragment,null,E.default.createElement(D.Form.Item,{label:t("Password Variable")},E.default.createElement(D.Input,{name:"passwordVariable"})),E.default.createElement(D.Form.Item,{label:t("Username Variable")},E.default.createElement(D.Input,{name:"usernameVariable"})));case"secret_text":return E.default.createElement(E.default.Fragment,null,E.default.createElement(D.Form.Item,{label:t("Text Variable")},E.default.createElement(D.Input,{name:"variable"})));case"ssh":return E.default.createElement(E.default.Fragment,null,E.default.createElement(D.Form.Item,{label:t("key File Variable")},E.default.createElement(D.Input,{name:"keyFileVariable"})),E.default.createElement(D.Form.Item,{label:t("passphrase Variable")},E.default.createElement(D.Input,{name:"passphraseVariable"})),E.default.createElement(D.Form.Item,{label:t("Username Variable")},E.default.createElement(D.Input,{name:"usernameVariable"})));case"kubeconfig":return E.default.createElement(D.Form.Item,{label:t("Kubeconfig Variable")},E.default.createElement(D.Input,{name:"variable"}));case"kubeconfigFile":return E.default.createElement(D.Form.Item,{label:t("KubeconfigFile Variable")},E.default.createElement(D.Input,{name:"variable"}));default:return null}},n.getCredentialsListData=function(e){return n.props.store.getCredentials(e)},n.getCredentialsList=function(){return(0,l.default)(n.props.store.credentialsList.data.map((function(e){return{label:e.name,value:e.name,type:e.type,disabled:!1}})))},n.optionRender=function(e){var a=e.label,r=e.type,n=e.disabled;return E.default.createElement("span",{style:{display:"flex",alignItem:"center"}},a,"  ",E.default.createElement(D.Tag,{type:n?"":"warning"},"ssh"===r?"SSH":t(r)))},n.formRef=E.default.createRef(),n.state={formData:{},credentialType:"username_password"},n}return(0,i.default)(r,[{key:"componentDidMount",value:function(){this.props.store.getCredentials(),this.initEditor()}},{key:"render",value:function(){var e=this.props,a=e.visible,r=e.onCancel,n=this.props.store.credentialsList;return E.default.createElement(k.default,{width:680,bodyClassName:T.default.body,onCancel:r,onOk:this.handleOk,visible:a,closable:!1,title:t("withCredentials")},E.default.createElement(D.Form,{data:this.state.formData,ref:this.formRef},E.default.createElement(D.Form.Item,{label:t("CREDENTIAL_NAME"),rules:[{required:!0,message:t("PARAM_REQUIRED")}],desc:E.default.createElement("p",null,t("SELECT_CREDENTIAL_DESC"),E.default.createElement("span",{className:T.default.clickable,onClick:this.props.showCredential},t("CREATE_CREDENTIAL")))},E.default.createElement(D.Select,{name:"credentialsId",options:this.getCredentialsList(),pagination:(0,O.default)(n,["page","limit","total"]),isLoading:n.isLoading,onFetch:this.getCredentialsListData,onChange:this.handleCredentialChange,optionRenderer:this.optionRender,valueRenderer:this.optionRender,searchable:!0,clearable:!0})),this.renderParams()))}}]),r}(E.default.Component),g.propTypes={name:b.default.string},g.defaultProps={visible:!1,onOk:function(){},onCancel:function(){}},h=y,v=(0,p.default)(h.prototype,"handleCredentialChange",[S.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=e.getCredentialsList().find((function(e){return e.value===t})),r=(0,_.default)(a,"type","username_password");e.setState({credentialType:r,formData:{credentialsId:t}})}}}),m=h))||m;a.default=M},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(73),r(18),r(87),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(64),r(136),r(818),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(30)),u=n(r(61)),o=n(r(96)),i=n(r(65)),c=n(r(36)),s=n(r(37)),f=n(r(88)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(49)),v=(n(r(66)),n(r(246)));r(12),r(45),r(5),r(11),r(31),r(6),r(73),r(18),r(28),r(87),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(64),r(818),r(7);var g,y,E,b,_,O,S,C,D,k=n(r(0)),N=n(r(1)),T=n(r(63)),R=n(r(241)),w=n(r(26)),I=n(r(74)),M=n(r(158)),P=r(14),A=r(239),j=r(186),L=n(r(787)),x=n(r(853));function U(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function z(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.value,l=e.onChange;return m.default.createElement(g.Select,{name:r.name,options:a.getCDList(),pagination:(0,h.default)(n,["page","limit","total"]),isLoading:n.isLoading,onFetch:a.getCDListData,value:null==t?void 0:t.name,onChange:function(e){var t,r,n=e?null===(t=a.props.store.cdList)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.find((function(t){return t.name===e})):null;l(n?{name:n.name,namespace:n.devops}:null)},searchable:!0,clearable:!0})}}))}}]),r}(m.Component))||u;a.default=b},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(5),r(18),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(16),r(4),r(22),r(23),r(57),r(17);var u=n(r(43));r(41);var o,i=n(r(44)),c=n(r(61)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=l(r(0)),v=n(r(241)),g=n(r(26)),y=r(186),E=r(239),b=n(r(1733));function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var O=(0,E.observer)(o=function(e){(0,d.default)(n,e);var a,r=_(n);function n(){var e;(0,s.default)(this,n);for(var a=arguments.length,l=new Array(a),u=0;u1&&void 0!==arguments[1]?arguments[1]:{};(0,l.default)(this,e),this.state={},this.values={},this.config=[],this.context={},this.init=function(e,t){var r=e.map((function(e){return p(p({},e),{},{reactions:e.reactions?JSON.parse(e.reactions):[]})}));a.config=r;var n=0,l=[],u={},o=[];r.forEach((function(e){var r;void 0!==(0,s.default)(t,e.name)&&(0,c.default)(u,e.name,t[e.name]),l[e.name]={order:n++,display:"block",value:(0,s.default)(t,e.name),reactions:null!==(r=e.reactions)&&void 0!==r?r:[],"x-props":e},o.push((function(){a.handleValueChange({key:e.name,value:(0,s.default)(t,e.name)},!0)}))})),a.state=l,a.values=u,o.forEach((function(e){return e()}))},this.setValues=function(e,t){void 0!==t?(0,c.default)(a.values,e,t):a.values=(0,f.default)(a.values,e)},this.handleValueChange=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=a.state;a.setValues(e.key,e.value),a.state[e.key].value=e.value;var n=r[e.key].reactions;null==n||n.forEach((function(n){a.getStateByReaction(n,r[e.key],t)}))},this.getStateByReaction=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=e.target,u=e.fulfill,o=[];Object.entries(u.state).forEach((function(e){var u=(0,n.default)(e,2),i=u[0],c=u[1];if(!r||"value"!==i){var s=a.reactions[i],f=h(c,{$self:t,$context:a.context});a.state[l]&&(a.state[l][i]=f,s&&o.push((function(){return s(l,f)})))}})),o.forEach((function(e){return e()}))},this.handleFieldValueChange=function(e,t){var r;a.state[e]&&(a.handleValueChange({key:e,value:t}),null===(r=a.update)||void 0===r||r.call(a))},this.handleChangeValue=function(e,t){a.handleValueChange({key:e,value:t})},this.handleDisplayChange=function(e,t){"none"!==t?a.handleValueChange({key:e,value:a.state[e].value}):a.handleValueChange({key:e,value:void 0})},this.getValues=function(){return a.values},this.getFields=function(){return(0,i.default)(Object.values(a.state),"order").reduce((function(e,t){return"block"===t.display&&e.push(t["x-props"]),e}),[])},this.update=t,this.context=r,this.reactions={display:this.handleDisplayChange.bind(this),value:this.handleChangeValue.bind(this)}}},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var u=l(r(315)),o=l(r(96)),i=l(r(58)),c=n(r(0)),s=l(r(1200)),f=r(186),d=l(r(787)),p=r(14);a.default=function(e){e.value;var a=e.onChange,r=e.devops,n=(0,i.default)(e,["value","onChange","devops"]),l=c.useState(!1),m=(0,o.default)(l,2),h=m[0],v=m[1],g=c.useState(),y=(0,o.default)(g,2),E=y[0],b=y[1];return c.createElement("div",null,c.createElement(f.Button,{style:{height:24},size:"small",onClick:function(){return v(!0)}},t("IMPORT_FROM_CODE_REPO")),c.createElement(d.default,{title:t("IMPORT_FROM_CODE_REPO"),visible:h,onCancel:function(){return v(!1)},onOk:function(){a((0,p.toJS)(E)),v(!1)}},c.createElement("div",{style:{minHeight:270}},c.createElement(s.default,(0,u.default)({},n,{isCreatePipeline:!1,devops:r,onChange:b,value:E})))))}},function(e,t,a){e.exports={taskList:"_2loGhzv-O4GHTu099n1Cyv",task:"_3H5tvVgBDXf5LETASGtiQX",taskIcon:"asNYafbtn7uKGjr5sY-W7",taskInfo:"T1TGQgJXmgkWz6kfGHnpl",taskName:"HhpjXE4lv1c6-E-Njs0GB",desc:"_1Dc2Z_g9XfSxnUhp4sdhcW",back:"cvvjfvqaVKSa83bk1OARZ",tabs:"_2L811SJ-R9sRJovtFY5HnN",tab:"_3Maur7P1LAsNs0yts_dt3h",tab_active:"_3Xttzou4W6mEktK8OWPKbx",loading:"LtyrCDUgHMI9Qxb85FWVO"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(160),r(191),r(42),r(16),r(159),r(4),r(23),r(57),r(17);var l=n(r(61)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(3)),p=r(186),m=n(r(1)),h=r(14),v=n(r(135)),g=n(r(806)),y=r(1384),E=n(r(1016)),b=n(r(1062)),_=n(r(1736));function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var S={not:!0,allOf:!0,anyOf:!0},C=function(e){(0,i.default)(r,e);var a=O(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==u[0]?u[0]:{},a=t.cluster,r="".concat(this.getDevopsUrlV3({cluster:a}),"ci/nodelabels"),this.labelDataList=[],e.next=5,request.get(r,{},{},(function(){return null}));case 5:(n=e.sent)&&"success"===n.status&&(0,j.default)(n.data)&&(this.labelDataList=n.data.map((function(e){return{label:e,value:e}})));case 7:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"fetchPipelineStepTemplates",value:(n=(0,u.default)(l.default.mark((function e(){var t,a,r,n,u=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u.length>0&&void 0!==u[0]?u[0]:{},e.next=3,request.get("".concat(this.getBaseUrl(t),"clustersteptemplates?limit=100"));case 3:return a=e.sent,r=a.items,n=(void 0===r?[]:r).map($),this.pipelineSteps=n,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"fetchStepTemplate",value:(r=(0,u.default)(l.default.mark((function e(t){var a,r,n=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,request.get("".concat(this.getBaseUrl(a),"clustersteptemplates/").concat(t));case 3:return r=e.sent,e.abrupt("return",$(r));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getPipelineStepTempleJenkins",value:(a=(0,u.default)(l.default.mark((function e(t,a,r){var n,u,o,i=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>3&&void 0!==i[3]?i[3]:{},e.next=3,request.post("".concat(this.getBaseUrl(t),"clustersteptemplates/").concat(a,"/render?").concat(G.default.stringify(n)),r);case 3:return u=e.sent,o=(0,A.default)(u,"data",""),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return a.apply(this,arguments)})},{key:"newStage",get:function(){return{branches:[{id:String(Math.random()),name:"",steps:[]}],agent:{type:"none"},name:"stage-".concat((0,q.generateId)(5))}}},{key:"stages",get:function(){return(0,A.default)(this.jsonData,"json.pipeline.stages",[])}},{key:"activeStage",get:function(){return""===this.activeLineIndex?"":this.stages[this.activeLineIndex]?this.stages[this.activeLineIndex].parallel?this.stages[this.activeLineIndex].parallel[this.activeColumnIndex]:this.stages[this.activeLineIndex]:""}}]),z}(B.default),(0,m.default)(v.prototype,"stages",[F.computed],Object.getOwnPropertyDescriptor(v.prototype,"stages"),v.prototype),(0,m.default)(v.prototype,"activeStage",[F.computed],Object.getOwnPropertyDescriptor(v.prototype,"activeStage"),v.prototype),g=(0,m.default)(v.prototype,"jsonData",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),y=(0,m.default)(v.prototype,"activeLineIndex",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),E=(0,m.default)(v.prototype,"activeColumnIndex",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),b=(0,m.default)(v.prototype,"isAddingStep",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_=(0,m.default)(v.prototype,"edittingData",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),O=(0,m.default)(v.prototype,"params",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),S=(0,m.default)(v.prototype,"labelDataList",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),C=(0,m.default)(v.prototype,"credentialsList",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[]}}}),D=(0,m.default)(v.prototype,"cdList",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[]}}}),k=(0,m.default)(v.prototype,"pipelineList",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{data:[]}}}),N=(0,m.default)(v.prototype,"pipelineSteps",[F.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,m.default)(v.prototype,"setData",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"setData"),v.prototype),(0,m.default)(v.prototype,"insertColumn",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"insertColumn"),v.prototype),(0,m.default)(v.prototype,"setFocus",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"setFocus"),v.prototype),(0,m.default)(v.prototype,"setActive",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"setActive"),v.prototype),(0,m.default)(v.prototype,"setEdittingData",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"setEdittingData"),v.prototype),(0,m.default)(v.prototype,"clearFocus",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"clearFocus"),v.prototype),(0,m.default)(v.prototype,"deleteStage",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"deleteStage"),v.prototype),(0,m.default)(v.prototype,"setValue",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"setValue"),v.prototype),(0,m.default)(v.prototype,"convertJsonToJenkinsFile",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"convertJsonToJenkinsFile"),v.prototype),(0,m.default)(v.prototype,"saveJenkinsFile",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"saveJenkinsFile"),v.prototype),T=(0,m.default)(v.prototype,"getCredentials",[F.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,u.default)(l.default.mark((function t(a){return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.credentialStore.fetchList(Z({devops:e.params.devops,cluster:e.params.cluster},a));case 2:e.credentialsList=e.credentialStore.list;case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),R=(0,m.default)(v.prototype,"getPipelines",[F.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,u.default)(l.default.mark((function t(a){return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.pipelineStore.fetchList(Z({devops:e.params.devops,cluster:e.params.cluster,filter:"no-folders"},a));case 2:e.pipelineList=e.pipelineStore.list;case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),w=(0,m.default)(v.prototype,"getCDListData",[F.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,u.default)(l.default.mark((function t(a){return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.cdStore.fetchList(Z({devops:e.params.devops,cluster:e.params.cluster},a));case 2:e.cdList=e.cdStore.list;case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),I=(0,m.default)(v.prototype,"createCredential",[F.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,u.default)(l.default.mark((function t(a,r){return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.credentialStore.handleCreate(a,r);case 2:case"end":return t.stop()}}),t)})));return function(e,a){return t.apply(this,arguments)}}()}}),(0,m.default)(v.prototype,"handleConfirm",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"handleConfirm"),v.prototype),(0,m.default)(v.prototype,"handleConfirmOld",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"handleConfirmOld"),v.prototype),(0,m.default)(v.prototype,"fetchPipelineStepTemplates",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"fetchPipelineStepTemplates"),v.prototype),(0,m.default)(v.prototype,"fetchStepTemplate",[F.action],Object.getOwnPropertyDescriptor(v.prototype,"fetchStepTemplate"),v.prototype),v);a.default=ee},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Home",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Search",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"Detail",{enumerable:!0,get:function(){return u.default}});var n=r(a(3447)),l=r(a(3452)),u=r(a(3524))},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(65)),u=n(r(36)),o=n(r(37)),i=n(r(88)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(49));n(r(66));r(45),r(5),r(18),r(442),r(42),r(4),r(23),r(57),r(24),r(17),r(62);var p,m,h,v=n(r(96)),g=n(r(0)),y=r(14),E=r(239),b=n(r(243)),_=n(r(3)),O=r(186),S=n(r(1065)),C=n(r(3449)),D=n(r(1757)),k=n(r(985)),N=n(r(3451));function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var R=(0,E.observer)((m=function(e){(0,c.default)(r,e);var a=T(r);function r(){var e;(0,u.default)(this,r);for(var n=arguments.length,o=new Array(n),c=0;c0&&void 0!==c[0]?c[0]:{},a=c.length>1?c[1]:void 0,r=new Date((new Date).setHours(0,0,0,0)).getTime(),l=(new Date).getTime(),u={operation:"statistics",start_time:r,end_time:l},o=(0,E.default)(u,t),e.next=9,this.request(o,"get",a);case 9:i=e.sent,this.containersCount=(0,b.default)(i,"statistics.containers",0),this.logsCount=(0,b.default)(i,"statistics.logs",0),this.startTime=r,this.namespaces=(0,b.default)(i,"statistics.namespaces",[])||[];case 14:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"handleResult",value:function(e){return e}}]),r}(r(a(1391)).default),u=(0,g.default)(l.prototype,"logsCount",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),o=(0,g.default)(l.prototype,"startTime",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),i=(0,g.default)(l.prototype,"namespaces",[y.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,g.default)(l.prototype,"fetch",[y.action],Object.getOwnPropertyDescriptor(l.prototype,"fetch"),l.prototype),l);t.default=O},function(e,t,a){e.exports={container:"_9S1O5r-gMFTAyyTvA9sMv",customRange:"_2BqYBrIOMJkPL86SU4ibiS",currentParam:"_3i9QkdJ1v3Z_RhND9_jhxB",input:"_3knlp77eQpb5h3x9_brJrc",dropdown:"_32W2hcNHwcqLHylSRb_-1d",dropdownItem:"_1zYu7D7XMgnPQj_cviMH7j",icon:"_18iZ6-QD8yhu2WuwGN6v_R",param:"_3tDB0wRE_DlH-PpkLdtKqh",removeParam:"_2XvI9g_dJmtEwGNcgmHBUn",durationDropdown:"_1DPb6P0nYZPe_y5qrx0OSD"}},function(e,t,a){e.exports={tips:"_1GT_qdXcQqMwqs4fdmzGR3",rule:"cRqPZ_AGuSTA4AXOY08lP",searchBar:"_2YhYKa3lwuBurnOP3Cjh0U",pane:"cOD4mfyo7pc1RctxOlLvj",card:"p9FBwWjFgQ1xMXHax1X3s",count:"_37LGouPZA8H7IdsZHwN2j5",banner:"_3Z5wUKjeTOL8V6zsED-TSu",illustration:"_2Vn-O2H0xzvZ1d-cX3OeAG",statistics:"_2hC4Kwsw_VHnZ2DGcDMAv5",category:"_2pdXo055DfDsFjef58FrhO",icon:"_3zX3KvzK9hvXil7z9WwH0M",desc:"_1ZgIwmJnkzKt2QVxat6c6D",recent:"_3H27V0Txnl5HUAeAEpNIdA",recentSummary:"_27IlxPyLQZxq8UFPRqaK0i",chart:"_14dkUVVhwB9DUaaWX787Fy",searchBarContainer:"fSF-k2IyFBXVBSF4fZccp",clusterSelector:"_26VjJfMUGT6XkqSnSUkqn7"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(197),r(6),r(18),r(87),r(16),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(64),r(7),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(61)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(30)),c=n(r(65)),s=n(r(36)),f=n(r(37)),d=n(r(88)),p=n(r(55)),m=n(r(56)),h=n(r(51)),v=n(r(49));n(r(66));r(12),r(45),r(5),r(11),r(197),r(6),r(18),r(28),r(87),r(245),r(442),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(62),r(64),r(7),r(110);var g,y,E,b,_,O,S,C,D,k,N=n(r(96)),T=n(r(0)),R=r(239),w=r(14),I=n(r(243)),M=n(r(967)),P=n(r(195)),A=n(r(249)),j=n(r(1392)),L=n(r(1124)),x=n(r(1768)),U=n(r(1757)),z=r(186),F=n(r(1127)),G=r(1397),V=n(r(1065)),B=n(r(985)),Y=n(r(3523));function W(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function q(e){for(var t=1;t').concat(e.hightLighted,"")}))}})}}},{key:"startPolling",value:function(e){this.poll(),this.pollingInterval&&clearInterval(this.pollingInterval),this.pollingInterval=setInterval(this.poll,e||this.state.pollingFrequency)}},{key:"stopPolling",value:function(){this.setState({polling:!1}),clearInterval(this.pollingInterval)}},{key:"addPollingQuery",value:(a=(0,o.default)(u.default.mark((function e(){var t,a,r,n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.getQueryParams(),r={from:0,start_time:Date.now()-this.state.pollingFrequency,end_time:Date.now()},e.next=4,this.fetchQuery(q(q({},a),r));case 4:n=e.sent,(t=this.logs).push.apply(t,(0,l.default)(n.reverse())),this.scrollTo(this.logs.length);case 7:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"scrollTo",value:function(e){this.tableRef.current.scrollToRow(e)}},{key:"render",value:function(){var e=this.state.showHistogram;return T.default.createElement("div",{className:Y.default.container},T.default.createElement(z.Loading,{spinning:this.loading},this.renderSearchBar()),T.default.createElement("div",{className:Y.default.searchResult},T.default.createElement(z.Loading,{spinning:this.loading},T.default.createElement(T.default.Fragment,null,this.renderToolBar(),e&&this.renderTimeChart())),this.renderTable()))}},{key:"renderSearchBar",value:function(){return T.default.createElement("div",{className:Y.default.searchBar},globals.app.isMultiCluster&&T.default.createElement(z.Select,{value:this.props.searchInputState.cluster,onChange:this.changeClusterChange,className:Y.default.select,valueRenderer:this.clusterRenderer,options:this.props.clustersOpts}),T.default.createElement(B.default,{className:Y.default.searchInput,onChange:this.onSearchParamsChange,params:this.props.searchInputState,dropDownItems:{log_query:{icon:"magnifier",text:t("KEYWORD")},namespace_query:{icon:"project",text:t("PROJECT")},workload_query:{icon:"backup",text:t("WORKLOAD")},pod_query:{icon:"pod",text:t("POD")},container_query:{icon:"docker",text:t("CONTAINER")}}}),T.default.createElement(z.Select,{className:Y.default.select,value:this.props.searchInputState.queryMode,onChange:this.changeQueryMode,options:this.queryModeOptions}))}},{key:"renderToolBar",value:function(){var e=this.state,a=e.showHistogram,r=e.polling,n=e.pollingFrequency;return T.default.createElement("div",{className:Y.default.toolbar},T.default.createElement("div",null,t("TIME_TOPOLOGY"),T.default.createElement("span",{className:Y.default.showHistogramBtn,onClick:this.toggleHistogram},a?t("DISPLAY"):t("HIDE"),T.default.createElement(z.Icon,{name:"caret-down",type:"light"}))),T.default.createElement("div",{className:Y.default.operation},T.default.createElement("span",{className:Y.default.pollingBtn,onClick:this.togglePolling},T.default.createElement(z.Tooltip,{content:r?t("STOP_REAL_TIME_CONTAINER_LOG"):t("START_REAL_TIME_CONTAINER_LOG")},T.default.createElement(z.Icon,{name:r?"stop":"start",type:"light",size:16}))),T.default.createElement("span",{className:Y.default.exportButton},T.default.createElement(z.Dropdown,{content:this.renderMoreMenu,trigger:"click",placement:"bottomRight"},T.default.createElement("div",{className:Y.default.exportText},T.default.createElement("span",{className:Y.default.text},t("LOG_EXPORT")),T.default.createElement(z.Icon,{name:"more",type:"light"})))),T.default.createElement("span",{className:Y.default.frequencyOpts},T.default.createElement("span",null," ",t("REFRESH_RATE_COLON")),T.default.createElement(z.Select,{value:n,onChange:this.changeFrequency,className:Y.default.frequencyOptions,options:this.frequencyOptions}))))}},{key:"renderTimeChart",value:function(){return T.default.createElement("div",{className:Y.default.chartContainer},T.default.createElement("div",{className:Y.default.recentSummary},T.default.createElement("h2",{className:Y.default.count},this.histogramStore.logsCount),T.default.createElement("p",null,t("SEARCH_RESULTS"))),T.default.createElement("div",{className:Y.default.chart},T.default.createElement(V.default,{xKey:"time",data:(0,w.toJS)(this.histogramStore.histograms),legend:[["count",t("CONTAINER_LOG_COUNT")]],interval:this.histogramStore.interval,onBarClick:this.selectedDurationParameter})))}},{key:"renderTable",value:function(){return T.default.createElement("div",{className:Y.default.table},T.default.createElement(F.default,{onScroll:this.onTableScrollTop,onTrClick:this.selectLog,cols:this.tableCols,data:this.logs,tableRef:this.tableRef}))}},{key:"defaultDuration",get:function(){return{start_time:0,end_time:Date.now(),interval:"1d"}}},{key:"duration",get:function(){var e=(this.props||{}).searchInputState,t=Date.now(),a=e.start,r=e.end,n=e.step;return a?{start_time:(0,M.default)([1e3*a,t]),end_time:(0,M.default)([1e3*r,t]),interval:n}:this.defaultDuration}}]),h}(T.default.Component),E=(0,v.default)(y.prototype,"tableCols",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[{thead:t("TIME"),key:"time",content:function(e){return"[".concat((0,I.default)(e.time).format("YYYY-MM-DD HH:mm:ss"),"]")},hidden:!1},{thead:t("PROJECT"),key:"project",content:this.renderHightLightMatchTd({resKey:"namespace",searchKey:["namespace_query"]}),hidden:!1},{thead:t("POD"),key:"pod",hidden:!1,content:this.renderHightLightMatchTd({resKey:"pod",searchKey:["pod_query","workload_query"]})},{thead:t("CONTAINER"),key:"container",hidden:!0,content:this.renderHightLightMatchTd({resKey:"container",searchKey:["container_query"]})},{thead:t("LOG"),key:"log",className:Y.default.logItem,content:this.renderHightLightMatchLogTd({resKey:"log",searchKey:["log_query"],handler:G.esMark}),mustShow:!0}]}}),b=(0,v.default)(y.prototype,"logs",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),_=(0,v.default)(y.prototype,"loading",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),(0,v.default)(y.prototype,"refreshQuery",[w.action],Object.getOwnPropertyDescriptor(y.prototype,"refreshQuery"),y.prototype),(0,v.default)(y.prototype,"fetchQuery",[w.action],Object.getOwnPropertyDescriptor(y.prototype,"fetchQuery"),y.prototype),(0,v.default)(y.prototype,"fetchHistogram",[w.action],Object.getOwnPropertyDescriptor(y.prototype,"fetchHistogram"),y.prototype),O=(0,v.default)(y.prototype,"selectedDurationParameter",[w.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a,r,n,l,u,o=t.time,i=void 0===o?0:o,c=e.histogramStore.interval,s=e.props.searchInputState;s.durationAlias="",s.end=Math.ceil(i/1e3)+(a=c.match(/(\d+)(\w+)/),r=(0,N.default)(a,3),n=r[1],l=void 0===n?0:n,u=r[2],l*{s:1,m:60,h:3600,d:86400}[void 0===u?"s":u]),s.start=Math.ceil(i/1e3),s.step=e.getNextStepLevel(c),e.fetchHistogram(),e.refreshQuery()}}}),S=(0,v.default)(y.prototype,"onTableScrollTop",[w.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.scrollTop,r=e.queryStore,n=r.from,l=r.size,u=r.total;0===a&&u>n+l&&e.loadMoreLogs()}}}),(0,v.default)(y.prototype,"loadMoreLogs",[w.action],Object.getOwnPropertyDescriptor(y.prototype,"loadMoreLogs"),y.prototype),C=(0,v.default)(y.prototype,"toggleHistogram",[w.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.setState((function(e){return{showHistogram:!e.showHistogram}}))}}}),D=(0,v.default)(y.prototype,"togglePolling",[w.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=e.state.polling;t?e.stopPolling():e.startPolling(),e.setState({polling:!t})}}}),(0,v.default)(y.prototype,"addPollingQuery",[w.action],Object.getOwnPropertyDescriptor(y.prototype,"addPollingQuery"),y.prototype),k=(0,v.default)(y.prototype,"changeFrequency",[w.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.setState({pollingFrequency:t}),e.state.polling&&(e.stopPolling(),e.startPolling(t))}}}),g=y))||g;a.default=X},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={table:"_31DHxUvHF9cvrtMF8hZ1NJ",body:"_1o0OrXH49u7IWnn__jySDi",header:"_3d3ile0MQ76mzy4gKMKVGa",headerItems:"cBGvp-qF5E0-Zn-DV66BU",visibleBtn:"_1QLOXkaGohLi2bLbAWcJjT",dropdown:"_16GV2vWPgU-_LY-TSI-nEL",visibleItem:"_10IfOBGBtVJ2cWMKKLCURw",tr:"_3wpavJr72BCdw4FWfpnkOc",bodyItems:"_1Jb5Hf9bhyeHQD05-MYz5N"}},function(e,t,a){e.exports={searchBar:"_JTlDkrfohSwIxPpX97wp",searchInput:"_25v4Uq6VdGeubmXGfPRsa6",select:"_3t4uAxkZ2BFOTl4foQ1DRo",searchResult:"_3li-Ch_QP-SfD5vjzDIXgd",toolbar:"_1wFZR-2jbDGJY79Klx4L11",operation:"_23II8bjJaDDga7SzCWyMm7",exportButton:"_3eZWtrM_1V15_kaHWj-DpL",exportText:"_8g5V39tYUe7rdh7ZPduAB",text:"_1DLrO1c0pV2m8b_28dUerc",menuLinkContent:"LsDuLg9SzYCwxyLiKzBsS",frequencyOpts:"_3gotqRkYjzqimbLSXvXXoe",frequencyOptions:"_2FKKxtgN7QWnOcFKcoW-yl",chartContainer:"_1TbzGgX6Ll6A-GDc4T4Ad",recentSummary:"_32mzAeyZriH5v29CxUBHw0",chart:"_39jXgnORNLHHwWrfolFLAT",table:"_1LzMkW6YYbyYTptsNE4-Xa",logItem:"_1y2_hopFflOw1UUWDuImRk",count:"_3t6_PUErus14gjlZ0dSd0d",showHistogramBtn:"_9d9RtZ1b011VOdyFhrNMY",pollingBtn:"_1LWeyfeCE0ECAs__57lhjh",container:"_36atrKU0dMxQaHnt0CMWwj",hightLightMatch:"_2jhV5b7tn8RPILbYxuQt7g",hightLog:"_9VNSgJg53gFYpEK1pk5Co"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(86),r(18),r(48),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(818),r(7),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(86),r(18),r(28),r(245),r(48),r(859),r(442),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(818),r(7),r(110);var l=n(r(61)),u=n(r(43));r(41);var o,i,c,s,f,d,p=n(r(44)),m=n(r(30)),h=n(r(65)),v=n(r(36)),g=n(r(37)),y=n(r(88)),E=n(r(55)),b=n(r(56)),_=n(r(51)),O=n(r(49)),S=(n(r(66)),n(r(0))),C=n(r(243)),D=n(r(3)),k=r(239),N=r(14),T=n(r(1124)),R=n(r(26)),w=r(186),I=n(r(452)),M=n(r(439)),P=n(r(1768)),A=r(881),j=n(r(3525)),L=n(r(3527));function x(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function U(e){for(var t=1;t=r){var n=a.logStore,l=n.from,u=n.size;n.total>l+u&&a.loadMoreLogs()}},a.pre=function(){a.props.formStepState.pre()},a.clearQuery=function(){a.setState({query:""},(function(){a.refreshLogs()}))},a.renderMoreMenu=function(){var e=a.logStore,r=e.pods,n=e.containers,l=e.log_query,u=e.startTime,o=e.endTime,i=e.namespaces,c={cluster:a.props.searchInputState.cluster,namespaces:i,pods:r,containers:n,log_query:l,start_time:u,end_time:o},s=[S.default.createElement(w.Menu.MenuItem,{key:"asc"},S.default.createElement("span",{className:L.default.menuLinkContent},S.default.createElement("a",{href:a.logStore.exportLinkFactory(U(U({},c),{},{sort:"asc"})),download:!0},t("ASC_EXPORT")))),S.default.createElement(w.Menu.MenuItem,{key:"desc"},S.default.createElement("span",{className:L.default.menuLinkContent},S.default.createElement("a",{href:a.logStore.exportLinkFactory(U(U({},c),{},{sort:"desc"})),download:!0},t("DESC_EXPORT"))))];return S.default.createElement(w.Menu,null,s)};var r=a.props.detailState,n=r.pod,l=r.container,u=r.namespace,o=r.log,i=r.time,p=new Date(i).getTime();return a.logStore=new P.default({sort:"desc",pods:n,namespaces:u,containers:l,size:100,startTime:p-1e3,endTime:p+1e3}),a.podStore=new I.default,a.projectStore=new M.default,a.state={pollingFrequency:5e3,polling:!1,query:o},a}return(0,g.default)(_,[{key:"startPolling",value:(m=(0,p.default)(u.default.mark((function e(){var t,a=this;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Date.now(),e.next=3,this.fetchLogs({end_time:t,start_time:t-6e4,from:0});case 3:this.logs=e.sent,this.interval=setInterval((function(){a.addPollingLogs()}),this.state.pollingFrequency);case 5:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"addPollingLogs",value:(i=(0,p.default)(u.default.mark((function e(){var t,a,r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Date.now(),e.next=3,this.fetchLogs({end_time:a,start_time:a-this.state.pollingFrequency,from:0});case 3:r=e.sent,(t=this.logs).unshift.apply(t,(0,l.default)(r)),this.scrollToBottom();case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"scrollToBottom",value:function(){var e=this.logWindow.current;e.scrollTop=e.scrollHeight}},{key:"loadMoreLogs",value:(o=(0,p.default)(u.default.mark((function e(){var t,a,r,n,o;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.logStore,r=a.from,n=a.size,this.logStore.from=r+n,e.next=4,this.fetchLogs();case 4:o=e.sent,(t=this.logs).push.apply(t,(0,l.default)(o));case 6:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getPodContainers",value:function(e){var t=this.podStore.list.data.find((function(t){return t.name===e}))||{};return(0,R.default)(t,"containers",[])}},{key:"componentDidMount",value:function(){this.fetchPods(),this.fetchProject(),this.initialFetch()}},{key:"componentWillUnmount",value:function(){this.stopPolling()}},{key:"initialFetch",value:(n=(0,p.default)(u.default.mark((function e(){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetchLogs();case 2:this.logs=e.sent;case 3:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"refreshLogs",value:(r=(0,p.default)(u.default.mark((function e(){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logStore.from=0,this.logStore.log_query=this.state.query,this.setState({polling:!1}),this.stopPolling(),e.next=6,this.fetchLogs();case 6:this.logs=e.sent;case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"fetchLogs",value:(a=(0,p.default)(u.default.mark((function e(){var t,a,r=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},a=this.props.searchInputState.cluster,e.next=4,this.logStore.fetch(U(U({},t),{},{cluster:a}));case 4:return e.abrupt("return",this.logStore.records);case 5:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fetchProject",value:function(){var e=this.props.detailState.namespace,t=this.props.searchInputState.cluster;this.projectStore.fetchDetail({name:e,namespace:e,cluster:t},(function(){}))}},{key:"fetchPods",value:function(){var e=this.props.detailState.namespace,t=this.props.searchInputState.cluster;this.podStore.fetchList({cluster:t,namespace:e,limit:-1})}},{key:"render",value:function(){return S.default.createElement("div",{className:L.default.container},S.default.createElement("div",{className:L.default.article},this.renderSummary(),this.renderLog()))}},{key:"renderLog",value:function(){var e=this.state.polling;return S.default.createElement("div",{className:L.default.log},S.default.createElement("div",{className:(0,D.default)(L.default.toolbar,this.state.polling?L.default.pollingMode:"")},this.state.polling||this.renderDurationSelect(),this.renderSearchInput(),this.renderPollingBtn(),this.renderPollingOpts(),this.renderExportBtn()),S.default.createElement("div",{className:L.default.terminal,onScroll:e?null:this.onLogScroll,ref:this.logWindow},this.renderTerminal()))}},{key:"renderPollingOpts",value:function(){return S.default.createElement("div",{className:L.default.frequencyOpts},S.default.createElement(w.Select,{options:this.pollingFrequencyOpts,value:this.state.pollingFrequency,onChange:this.onFrequencySelect}))}},{key:"renderPollingBtn",value:function(){return S.default.createElement("div",{className:L.default.pollingBtn,onClick:this.togglePolling},S.default.createElement(w.Tooltip,{content:this.state.polling?t("STOP"):t("START")},S.default.createElement(w.Icon,{type:"light",name:this.state.polling?"stop":"start"})))}},{key:"renderExportBtn",value:function(){return S.default.createElement("div",{className:L.default.operation},S.default.createElement(w.Dropdown,{content:this.renderMoreMenu,trigger:"click",placement:"bottomRight"},S.default.createElement("div",{className:L.default.exportText},S.default.createElement("span",{className:L.default.text},t("LOG_EXPORT")),S.default.createElement(w.Icon,{name:"more",type:"light"}))))}},{key:"renderDurationSelect",value:function(){return S.default.createElement("div",{className:L.default.duration},S.default.createElement(j.default,{duration:this.logStore,onChange:this.onDurationChange}))}},{key:"renderSearchInput",value:function(){return S.default.createElement("div",{className:L.default.input},S.default.createElement(w.Icon,{name:"magnifier",type:"light"}),S.default.createElement("input",{type:"text",onKeyUp:this.queryLog,value:this.state.query,onChange:this.changeSearchLog}),this.state.query&&S.default.createElement(w.Icon,{className:L.default.clearQuery,name:"close",type:"light",onClick:this.clearQuery}))}},{key:"renderTerminal",value:function(){var e=this;return S.default.createElement("div",{className:L.default.logWindow},this.logs.reverse().map((function(t){var a=t.time,r=t.log;return S.default.createElement("p",{key:"".concat(a).concat(r)},S.default.createElement("span",{className:L.default.logTime},(0,C.default)(a).format("YYYY-MM-DD HH:mm:ss"),":"," ",e.renderHighLightLog(null!=r?r:"")))})))}},{key:"renderHighLightLog",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.state.query,a=t.trim(),r=e.toUpperCase().indexOf(a.toUpperCase());return a&&-1!==r?S.default.createElement("span",{className:L.default.queryLog},S.default.createElement("span",{dangerouslySetInnerHTML:{__html:F.ansi_to_html(e.slice(0,r))}}),S.default.createElement("span",{className:L.default.hightLight,dangerouslySetInnerHTML:{__html:F.ansi_to_html(e.slice(r,r+a.length))}}),S.default.createElement("span",{dangerouslySetInnerHTML:{__html:F.ansi_to_html(e.slice(r+a.length))}})):S.default.createElement("span",{className:L.default.queryLog,dangerouslySetInnerHTML:{__html:F.ansi_to_html(e)}})}},{key:"renderLink",value:function(e,a){return e?S.default.createElement(w.Tooltip,{content:t("VIEW_DETAILS")},S.default.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer"},a)):a}},{key:"renderSummary",value:function(){var e=this.props.detailState;return S.default.createElement("div",{className:L.default.summery},S.default.createElement("div",{className:L.default.header},S.default.createElement("div",{className:L.default.pre,onClick:this.pre},S.default.createElement(A.ReactComponent,{width:16,height:22}),S.default.createElement("span",null,t("BACK")))),S.default.createElement("h3",null,t("CONTAINER_LOG_SOURCE")),S.default.createElement("div",{className:L.default.dataList},S.default.createElement("div",null,S.default.createElement("h4",null,t("PROJECT")),S.default.createElement("p",null,S.default.createElement("span",null,S.default.createElement(w.Icon,{name:"project"})," ",e.namespace))),S.default.createElement("div",null,S.default.createElement("h4",null,t("POD")),S.default.createElement("div",{className:L.default.selectContainer},S.default.createElement(w.Select,{prefixIcon:S.default.createElement(w.Icon,{name:"pod"}),value:this.logStore.pods,onChange:this.changePod,options:this.PodOpts}),S.default.createElement("div",{className:L.default.resourceIcon},this.renderLink(this.podLink,S.default.createElement(w.Icon,{name:"cogwheel",size:16}))))),S.default.createElement("div",null,S.default.createElement("h4",null,t("CONTAINER")),S.default.createElement("div",{className:L.default.selectContainer},S.default.createElement(w.Select,{prefixIcon:S.default.createElement(w.Icon,{name:"docker"}),value:this.logStore.containers,options:this.ContainersOpts,onChange:this.changeContainer}),S.default.createElement("div",{className:L.default.resourceIcon},this.renderLink(this.containerLink,S.default.createElement(w.Icon,{name:"cogwheel",size:16})))))))}},{key:"podLink",get:function(){var e=this.props.detailState.namespace,t=this.props.searchInputState.cluster,a=this.logStore.pods,r=this.projectStore.detail.workspace;return r?"/".concat(r,"/clusters/").concat(t,"/projects/").concat(e,"/pods/").concat(a):""}},{key:"containerLink",get:function(){var e=this.props.detailState.namespace,t=this.props.searchInputState.cluster,a=this.logStore,r=a.pods,n=a.containers,l=this.projectStore.detail.workspace;return l?"/".concat(l,"/clusters/").concat(t,"/projects/").concat(e,"/pods/").concat(r,"/containers/").concat(n):""}},{key:"PodOpts",get:function(){return this.podStore.list.data.map((function(e){return{label:e.name||t("ALL"),value:e.name||""}}))}},{key:"ContainersOpts",get:function(){var e=this.logStore.pods;return this.getPodContainers(e).map((function(e){return{label:e.name,value:e.name}}))}}]),_}(S.default.Component),c=(0,O.default)(i.prototype,"logs",[N.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,O.default)(i.prototype,"podLink",[N.computed],Object.getOwnPropertyDescriptor(i.prototype,"podLink"),i.prototype),(0,O.default)(i.prototype,"containerLink",[N.computed],Object.getOwnPropertyDescriptor(i.prototype,"containerLink"),i.prototype),(0,O.default)(i.prototype,"PodOpts",[N.computed],Object.getOwnPropertyDescriptor(i.prototype,"PodOpts"),i.prototype),(0,O.default)(i.prototype,"ContainersOpts",[N.computed],Object.getOwnPropertyDescriptor(i.prototype,"ContainersOpts"),i.prototype),s=(0,O.default)(i.prototype,"changePod",[N.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.logStore.pods=t||"";var a=(0,R.default)(e.getPodContainers(t),"[0].name","");e.changeContainer(a)}}}),f=(0,O.default)(i.prototype,"changeContainer",[N.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.logStore.containers=t,e.logStore.log_query="",e.refreshLogs()}}}),(0,O.default)(i.prototype,"startPolling",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"startPolling"),i.prototype),(0,O.default)(i.prototype,"addPollingLogs",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"addPollingLogs"),i.prototype),d=(0,O.default)(i.prototype,"onFrequencySelect",[N.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.setState({pollingFrequency:t})}}}),(0,O.default)(i.prototype,"loadMoreLogs",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"loadMoreLogs"),i.prototype),(0,O.default)(i.prototype,"initialFetch",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"initialFetch"),i.prototype),(0,O.default)(i.prototype,"refreshLogs",[N.action],Object.getOwnPropertyDescriptor(i.prototype,"refreshLogs"),i.prototype),o=i))||o;a.default=G},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(9),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(442),r(42),r(9),r(4),r(23),r(57),r(24),r(17),r(62);var l,u,o,i,c,s,f,d,p,m=n(r(96)),h=n(r(65)),v=n(r(36)),g=n(r(37)),y=n(r(88)),E=n(r(55)),b=n(r(56)),_=n(r(51)),O=n(r(49)),S=(n(r(66)),n(r(0))),C=r(239),D=r(14),k=n(r(3)),N=n(r(243)),T=r(186),R=n(r(1166)),w=n(r(1165)),I=r(950),M=n(r(3526));function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,_.default)(e);if(t){var n=(0,_.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,b.default)(this,a)}}var A=(0,C.observer)((u=function(e){(0,E.default)(r,e);var a=P(r);function r(){var e;(0,v.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l=r){var l=e.store,u=l.from,o=l.size;l.total>u+o&&e.loadMoreLogs()}}}}),(0,N.default)(f.prototype,"loadMoreLogs",[A.action],Object.getOwnPropertyDescriptor(f.prototype,"loadMoreLogs"),f.prototype),(0,N.default)(f.prototype,"fetchQuery",[A.action],Object.getOwnPropertyDescriptor(f.prototype,"fetchQuery"),f.prototype),(0,N.default)(f.prototype,"fetchHistogram",[A.action],Object.getOwnPropertyDescriptor(f.prototype,"fetchHistogram"),f.prototype),v=(0,N.default)(f.prototype,"toggleHistogram",[A.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.setState((function(e){return{showHistogram:!e.showHistogram}}))}}}),g=(0,N.default)(f.prototype,"togglePolling",[A.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=e.state.polling;t?e.stopPolling():e.startPolling(),e.setState({polling:!t})}}}),(0,N.default)(f.prototype,"addPollingQuery",[A.action],Object.getOwnPropertyDescriptor(f.prototype,"addPollingQuery"),f.prototype),y=(0,N.default)(f.prototype,"changeFrequency",[A.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.setState({pollingFrequency:t}),e.state.polling&&(e.stopPolling(),e.startPolling(t))}}}),s=f))||s;a.default=Q},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(16),r(10),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(16),r(10),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(3)),d=r(186),p=r(52),m=n(r(3533)),h=n(r(3535));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var g=d.Tabs.TabPanel,y=function(e){(0,o.default)(r,e);var a=v(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,u=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:[];return t.map((function(t){var a=Object.keys(t)[0];return s.default.createElement(m.default,{key:a,data:t,renderMetadata:e.renderMetadata})}))}},{key:"render",value:function(){return s.default.createElement(d.Tabs,{direction:"vertical",className:h.default.tabs},s.default.createElement(g,{label:s.default.createElement(d.Icon,{name:"resource",size:16}),name:"resource"},s.default.createElement("div",{className:h.default.content},this.renderHeader("METADATA"),this.renderEventMetadata())),s.default.createElement(g,{label:s.default.createElement(d.Icon,{name:"cloud",size:16}),name:"cloud"},s.default.createElement("div",{className:h.default.content},this.renderHeader("DETAILS"),this.renderDetail(),this.renderFooter())))}}]),r}(s.default.Component);a.default=y},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(28),a(42),a(448),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var n=r(a(246)),l=r(a(30)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=a(186),p=r(a(3534));function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function h(e){for(var t=1;t=r){var l=e.store,u=l.from,o=l.size;l.total>u+o&&e.loadMoreLogs()}}}}),(0,T.default)(f.prototype,"loadMoreLogs",[L.action],Object.getOwnPropertyDescriptor(f.prototype,"loadMoreLogs"),f.prototype),(0,T.default)(f.prototype,"fetchQuery",[L.action],Object.getOwnPropertyDescriptor(f.prototype,"fetchQuery"),f.prototype),(0,T.default)(f.prototype,"fetchHistogram",[L.action],Object.getOwnPropertyDescriptor(f.prototype,"fetchHistogram"),f.prototype),g=(0,T.default)(f.prototype,"toggleHistogram",[L.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.setState((function(e){return{showHistogram:!e.showHistogram}}))}}}),y=(0,T.default)(f.prototype,"togglePolling",[L.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=e.state.polling;t?e.stopPolling():e.startPolling(),e.setState({polling:!t})}}}),E=(0,T.default)(f.prototype,"changeFrequency",[L.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.setState({pollingFrequency:t}),e.state.polling&&(e.stopPolling(),e.startPolling())}}}),s=f))||s;a.default=J},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(10),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(10),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(3543)),p=n(r(3545));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var h=f.Tabs.TabPanel,v=function(e){(0,o.default)(r,e);var a=m(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,u=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:[];return t.map((function(t){var a=Object.keys(t)[0];return s.default.createElement(d.default,{key:a,data:t,renderMetadata:e.renderMetadata})}))}},{key:"render",value:function(){return s.default.createElement(f.Tabs,{direction:"vertical",className:p.default.tabs},s.default.createElement(h,{label:s.default.createElement(f.Icon,{name:"resource",size:16}),name:"resource"},s.default.createElement("div",{className:p.default.content},this.renderHeader("METADATA"),this.renderEventMetadata())))}}]),r}(s.default.Component);a.default=v},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(11),a(6),a(28),a(42),a(448),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var n=r(a(246)),l=r(a(30)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=a(186),p=r(a(3544));function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function h(e){for(var t=1;t2&&a.shift(),a.forEach((function(e){t[e.type]=e.name})),t},(0,V.default)(e,"getCurrentMeterData",M,(0,W.default)(e)),(0,V.default)(e,"setMeterData",P,(0,W.default)(e)),e.fetchMeterData=function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,i,c;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.module,n=a.meters,l=a.resources,i=(0,u.default)(a,["module","meters","resources"]),t.next=3,e.store.fetchMeter(Ie({module:r,meters:n,resources:l},i));case 3:return c=t.sent,t.abrupt("return",c);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),(0,V.default)(e,"setTimeRange",A,(0,W.default)(e)),(0,V.default)(e,"getChildrenData",j,(0,W.default)(e)),e.getChildrenList=function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,i,c;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=a.labelSelector,n=a.currentType,l=a.childParam,u=e.getChildrenTypeByLevel(n),(i=Ie(Ie({},e.getChildrenParamsByCrumb()),l)).cluster||(i.cluster=e.cluster),r&&(i.labelSelector=(0,ce.toJS)(r)),c=[],!["namespaces","services","openpitrixs"].includes(n)){t.next=14;break}if("namespaces"!==n||e.clusterMeterStore.levelMeterData[i.namespaces]){t.next=10;break}return t.next=10,e.clusterMeterStore.fetchLevelMeter(Ie({},i));case 10:return t.next=12,e.getTypesListData(n,i);case 12:return c=t.sent,t.abrupt("return",c);case 14:if(!u.children){t.next=19;break}return t.next=17,e.clusterMeterStore.fetchList(Ie({type:u.children[0]},i));case 17:return c=t.sent,t.abrupt("return",c);case 19:return t.abrupt("return",c);case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.getClusterMeterChartData=function(){var t=(0,G.default)(o.default.mark((function t(a,r){var n,l,u,i,c,s,f,d,p,m,h;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.getMeterParamsByCrumb(),l=[],u=e.childrenResourceList.map((function(e){return{name:e.name,type:e.type,labelSelector:(0,ee.default)(e,"labelSelector")}})),Ee.RESOURCES_TYPE.forEach((function(e){var t=[];u.forEach((function(a){a.type===e&&t.push(a)})),(0,ae.default)(t)||l.push(t)})),i=[],c=!0,s=!1,t.prev=7,d=o.default.mark((function t(){var l,u,c,s,f,d,p;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=(l=h)[0].type,c=[],s=l.map((function(e){return e.name})),f=(0,ne.default)(n),r||(f[u]=l[0].name),t.next=8,e.setMeterData({module:u,meters:[a],resources:s,params:f});case 8:d=t.sent,(0,ae.default)(d)||l.forEach((function(e){var t=d.find((function(t){return(0,ee.default)(t,"metric.".concat(t.module))===e.name}));if(t){var a=(0,ee.default)(t,"sum_value"),r=(0,ee.default)(t,"metric.".concat(t.module)),n=(0,ee.default)(t,"unit.label");c.push({name:r,value:a||0,unit:n,type:u})}})),p=(0,ie.default)(c,(function(e){return e.value})).reverse(),i.push(p);case 12:case"end":return t.stop()}}),t)})),p=(0,J.default)(l);case 10:return t.next=12,p.next();case 12:return m=t.sent,c=m.done,t.next=16,m.value;case 16:if(h=t.sent,c){t.next=22;break}return t.delegateYield(d(),"t0",19);case 19:c=!0,t.next=10;break;case 22:t.next=28;break;case 24:t.prev=24,t.t1=t.catch(7),s=!0,f=t.t1;case 28:if(t.prev=28,t.prev=29,c||null==p.return){t.next=33;break}return t.next=33,p.return();case 33:if(t.prev=33,!s){t.next=36;break}throw f;case 36:return t.finish(33);case 37:return t.finish(28);case 38:e.pieChartData=(0,ue.default)(i);case 39:case"end":return t.stop()}}),t,null,[[7,24,28,38],[29,,33,37]])})));return function(e,a){return t.apply(this,arguments)}}(),e.getWorkspacesMeterChartData=function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,c,s,f,d,p,m,h,v,g,y,E,b,_,O;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("workspaces"!==(r=e.active.type)){t.next=6;break}return t.next=4,e.getClusterMeterChartData(a,!0);case 4:t.next=51;break;case 6:n=e.getMeterParamsByCrumb(),l=[],u=[],c=e.childrenResourceList.map((function(e){return{name:e.name,type:e.type,labelSelector:(0,ee.default)(e,"labelSelector")}})),Ee.RESOURCES_TYPE.forEach((function(e){var t=[];c.forEach((function(a){a.type===e&&t.push(a)})),(0,ae.default)(t)||u.push(t)})),s=Ie(Ie({},n),{},(0,i.default)({cluster:e.cluster},r,e.active.name)),f=e.clusterMeterStore.levelMeterData,d=e.getChildrenTypeByLevel(r),p=d.children,m=!0,h=!1,t.prev=17,g=(0,J.default)(p);case 19:return t.next=21,g.next();case 21:return y=t.sent,m=y.done,t.next=25,y.value;case 25:if(E=t.sent,m){t.next=34;break}b=E,_=(0,me.handleWSChartData)({levelMeterData:(0,ce.toJS)(f),meters:a,type:b,params:s}),O=(0,ie.default)(_,(function(e){return e.value})).reverse(),l.push(O);case 31:m=!0,t.next=19;break;case 34:t.next=40;break;case 36:t.prev=36,t.t0=t.catch(17),h=!0,v=t.t0;case 40:if(t.prev=40,t.prev=41,m||null==g.return){t.next=45;break}return t.next=45,g.return();case 45:if(t.prev=45,!h){t.next=48;break}throw v;case 48:return t.finish(45);case 49:return t.finish(40);case 50:e.pieChartData=(0,ue.default)(l);case 51:case"end":return t.stop()}}),t,null,[[17,36,40,50],[41,,45,49]])})));return function(e){return t.apply(this,arguments)}}(),(0,V.default)(e,"getResourceMeterData",L,(0,W.default)(e)),e.getChildrenParamsByCrumb=function(){var t={};return(0,ne.default)((0,ce.toJS)(e.crumbData)).forEach((function(e){t[e.type]=e.name})),t},e.getTypesListData=function(){var t=(0,G.default)(o.default.mark((function t(a,r){var n,l,u,i;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.getChildrenTypeByLevel(a),l=[],n.children.forEach((function(t){l.push(e.clusterMeterStore.fetchList(Ie({type:t},r)))})),t.next=5,Promise.all(l);case 5:return u=t.sent,i=(0,ue.default)(u),t.abrupt("return",i);case 8:case"end":return t.stop()}}),t)})));return function(e,a){return t.apply(this,arguments)}}(),e.getChildrenTypeByLevel=function(t){return e.props.level.find((function(e){return(0,te.default)(e.type)?e.type.indexOf(t)>-1:e.type===t}))},e.setLineChartColor=function(e){return(0,ae.default)(e)?[]:(e.map((function(e,t){return e.key=e.type,e.color=ve.COLORS_MAP[Ee.AREA_COLORS[t]]||Ee.AREA_COLORS[t],e})),e)},e.renderParentMeterCard=function(){if(!e.active.type||"cluster"===e.active.type||"workspaces"===e.active.type||(0,ae.default)((0,ce.toJS)(e.priceConfig)))return null;var a=e.crumbData.length,r=e.crumbData[a-2],n="namespaces"===e.active.type&&2===a&&e.cluster?"".concat(r.name," (").concat(e.cluster,")"):r.name;return Z.default.createElement("div",{className:Re.default.usageCard},Z.default.createElement(Se.default,(0,l.default)({className:Re.default.meterCard,isParent:!0,priceConfig:e.priceConfig,title:Z.default.createElement(Z.default.Fragment,null,Z.default.createElement("span",null,t(Ee.RESOURCE_TITLE[(0,ee.default)(r,"type","-")])),Z.default.createElement("strong",null,n))},e.parentMeterData)))},(0,V.default)(e,"handleChartData",x,(0,W.default)(e)),(0,V.default)(e,"getTimeRange",U,(0,W.default)(e)),(0,V.default)(e,"getCurrentTimeMeterData",z,(0,W.default)(e)),(0,V.default)(e,"handleCrumbOperation",F,(0,W.default)(e)),e.renderSubResource=function(){var a=(0,ce.toJS)(e.pieChartData);return"pods"===e.active.type||"openpitrix"===e.props.meterType||(0,oe.default)(e.currentMeterData.sumData)||(0,ae.default)(a)?null:Z.default.createElement(Z.default.Fragment,null,Z.default.createElement("div",{className:Re.default.subTitle},t("CURRENT_RESOURCE_CONSUMPTION"),Z.default.createElement(se.Tooltip,{content:t("METER_RESOURCE_DESC"),placement:"top"},Z.default.createElement(se.Icon,{name:"question",size:20}))),Z.default.createElement("div",{className:Re.default.childrenResourceContainer},Z.default.createElement(se.Loading,{spinning:e.resourceLoading},Z.default.createElement("div",{className:Re.default.childrenlistContainer},Z.default.createElement(Ne.default,{selectOptions:(0,ce.toJS)(e.currentMeterData.sumData),getResourceMeterData:e.getResourceMeterData,activeName:e.active.name})),Z.default.createElement("div",{className:Re.default.constomChartContainer},Z.default.createElement(Te.default,{data:a})))))},e.renderEmpty=function(){return Z.default.createElement("div",{className:Re.default.empty},Z.default.createElement(pe.default,{className:Re.default.emptyCard,icon:ve.ICON_TYPES[e.active.type],title:t("NO_DATA_DESC"),desc:t("NO_METER_DATA")}))},e}return(0,Y.default)(r,[{key:"componentDidMount",value:function(){this.initData()}},{key:"render",value:function(){var e=this.active,a=e.type,r=e.name,n=e.createTime,u=(0,ye.getWebsiteUrl)().url,o=Object.values((0,ce.toJS)(this.currentMeterData)).every((function(e){return(0,ae.default)(e)}));return(0,ae.default)(this.list)?Z.default.createElement("div",{className:Re.default.empty},Z.default.createElement(se.Loading,{spinning:this.sideLoading||this.loading},Z.default.createElement(pe.default,{className:Re.default.emptyCard,icon:"cluster",title:t("NO_CLUSTER_AVAILABLE"),desc:(0,ye.learnMoreTip)(t.html("METERING_NOT_ENABLED_DESC",{docUrl:u})),actions:Z.default.createElement(ge.default,{onClick:this.props.handleBack},"返回")}))):Z.default.createElement("div",{className:Re.default.billDetail},Z.default.createElement("div",{className:(0,$.default)(Re.default.leftContent,(0,i.default)({},Re.default.paddingBottom0,this.crumbData.length<2||(0,ae.default)((0,ce.toJS)(this.priceConfig))))},Z.default.createElement(be.default,{crumbData:(0,ce.toJS)(this.crumbData),handleCrumbOperation:this.handleCrumbOperation,loading:this.loading||this.sideLoading,cluster:this.cluster}),Z.default.createElement(Oe.default,{list:this.list,active:(0,ce.toJS)(this.active),handleSelectResource:this.handleSelectResource,getChildrenData:this.getChildrenData,loading:this.sideLoading||this.loading,fetchMeterData:this.fetchMeterData,crumbData:this.crumbData,timeRange:(0,ce.toJS)(this.timeRange),getMeterParamsByCrumb:this.getMeterParamsByCrumb,priceConfig:this.priceConfig,cluster:this.cluster,clusterList:this.clusterList,priceConfigList:this.priceConfigList}),this.renderParentMeterCard()),Z.default.createElement("div",{className:Re.default.rightContent},Z.default.createElement(se.Loading,{spinning:this.loading},Z.default.createElement(Z.default.Fragment,null,Z.default.createElement(_e.default,{type:a,cluster:this.cluster,clusters:this.clusters,setCluster:this.setCluster}),o?this.renderEmpty():Z.default.createElement("div",{className:Re.default.content},Z.default.createElement(Se.default,(0,l.default)({className:Re.default.toothbg,title:Z.default.createElement(Z.default.Fragment,null,Z.default.createElement("span",null,t(Ee.RESOURCE_TITLE[a].toUpperCase().replace(/\s+/g,"_"))),Z.default.createElement("strong",null,r)),priceConfig:this.priceConfig},this.currentMeterData)),Z.default.createElement("div",{className:Re.default.subTitle},t("CONSUMPTION_HISTORY")),Z.default.createElement("div",{className:Re.default.info},(0,ae.default)((0,ce.toJS)(this.timeRange))?null:Z.default.createElement(Ce.default,{createTime:n,getTime:this.getTimeRange,timeRange:this.timeRange})),Z.default.createElement(De.default,{chartData:(0,ce.toJS)(this.chartData),priceConfig:this.priceConfig}),Z.default.createElement(ke.default,{data:(0,ce.toJS)(this.tableData),priceConfig:this.priceConfig}),this.renderSubResource())))))}}]),r}(Z.default.Component),f=(0,K.default)(s.prototype,"crumbData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),d=(0,K.default)(s.prototype,"cacheCrumbData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),p=(0,K.default)(s.prototype,"tableData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),m=(0,K.default)(s.prototype,"active",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),h=(0,K.default)(s.prototype,"list",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),v=(0,K.default)(s.prototype,"timeRange",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),g=(0,K.default)(s.prototype,"currentMeterData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),y=(0,K.default)(s.prototype,"parentMeterData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),E=(0,K.default)(s.prototype,"sideLoading",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),b=(0,K.default)(s.prototype,"loading",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_=(0,K.default)(s.prototype,"chartData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),O=(0,K.default)(s.prototype,"priceConfig",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),S=(0,K.default)(s.prototype,"priceConfigList",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),C=(0,K.default)(s.prototype,"pieChartData",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),D=(0,K.default)(s.prototype,"resourceLoading",[ce.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),k=(0,K.default)(s.prototype,"getPriceConfigListByCluster",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=[],a.forEach((function(t){t.disabled||r.push(e.store.fetchPrice({cluster:t.name}))})),globals.app.isMultiCluster&&r.push(e.store.fetchPrice({cluster:""})),t.next=5,Promise.all(r);case 5:n=t.sent,e.priceConfigList=n;case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),N=(0,K.default)(s.prototype,"getClustersList",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=e.crumbData[0].list.find((function(e){return e.name===t})),r="system-workspace"===t?e.clusterList:(0,ee.default)(a,"_origin.clusters",[]);if((0,ae.default)(r))return[];var n=r.map((function(t){var a=e.clusterList.find((function(e){return e.name===t.name}));return(0,ae.default)(a)?null:{label:a.name,value:a.name,type:a._origin.isHost?"host":"member",disabled:a.disabled,sortValue:Number(a.disabled)}})).filter((function(e){return!(0,ae.default)(e)}));return n.every((function(e){return e.disabled}))?[]:(0,ie.default)(n,(function(e){return e.sortValue}))}}}),T=(0,K.default)(s.prototype,"setPriceConfig",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t||(0,ee.default)(ve.DEFAULT_CLUSTER,"metadata.name"),r=e.priceConfigList.find((function(e){return e.cluster&&e.cluster===a})),n=(0,ne.default)(r);delete n.cluster,e.priceConfig=(0,ae.default)(n)?{}:r,e.setStartTime()}}}),R=(0,K.default)(s.prototype,"setStartTime",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){e.startTime=(0,me.getRetentionDay)((0,ee.default)(e.priceConfig,"retention_day","7d"))}}}),w=(0,K.default)(s.prototype,"setCluster",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.cluster=a,e.loading=!0,r=e.active,n=r.name,l=r.type,u=e.list.find((function(e){return e.name===n})),e.setPriceConfig(a),t.next=7,e.getCurrentMeterData({name:n,type:l,isCopy:!0,isTime:!0,start:e.startTime,labelSelector:(0,ee.default)(u,"labelSelector","")});case 7:e.loading=!1;case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),I=(0,K.default)(s.prototype,"setActiveCrumb",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.name,r=t.type,n=t.isCopy,l=t.start,u=(0,re.default)(e.crumbData);u.type=r,u.name=a,u.start=l,n&&(e.cacheCrumbData=(0,ne.default)((0,ce.toJS)(e.crumbData)))}}}),M=(0,K.default)(s.prototype,"getCurrentMeterData",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,i,c,s,f,d;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.name,n=a.type,l=a.isCopy,u=a.labelSelector,i=a.isTime,c=a.start,e.active={name:r,type:n,start:c},e.tableData=[],e.pieChartData=[],e.timeRange={},e.setActiveCrumb({name:r,type:n,isCopy:!!l,start:c}),s=e.getMeterParamsByCrumb(),e.loading=!0,t.next=10,e.setMeterData({module:n,meters:"all",resources:[r],start:c,isTime:i,params:s});case 10:return f=t.sent,t.next=13,e.getCurrentTimeMeterData({valueKey:"currentMeterData",module:n,resources:[r],start:c,params:s});case 13:if(e.tableData=e.setLineChartColor(f),e.setTimeRange({isTime:i,start:c}),e.chartData=f,"pods"===n){t.next=35;break}if(!["workspaces","cluster","nodes"].includes(n)){t.next=24;break}return t.next=20,e.getChildrenList({labelSelector:u,currentType:n});case 20:d=t.sent,e.childrenResourceList=d,t.next=31;break;case 24:if(e.clusterMeterStore.levelMeterData[s.namespaces]){t.next=30;break}return s.cluster||(s.cluster=e.cluster),t.next=28,e.clusterMeterStore.fetchLevelMeter(Ie({},s));case 28:t.next=31;break;case 30:e.childrenResourceList=[];case 31:return t.next=33,e.getResourceMeterData((0,ee.default)(e.tableData,"[0].type","cpu"));case 33:t.next=36;break;case 35:e.childrenResourceList=[];case 36:e.loading=!1;case 37:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),P=(0,K.default)(s.prototype,"setMeterData",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,i,c,s,f,d,p;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.params,n=a.module,l=a.meters,u=a.resources,i=a.list,c=a.start,s=a.end,f=a.isTime,r.cluster&&"cluster"===e.props.meterType&&(e.cluster=r.cluster),r.cluster=e.cluster,"applications"!==n||(0,ae.default)(u)||(d=i||e.list,u=u.map((function(e){var t=d.find((function(t){return t.name===e})),a=(0,ee.default)(t,"_origin.version.name","")||(0,ee.default)(t,"_origin.version","");return"".concat(e).concat(a?":".concat(a):"")}))),"openpitrixs"===n&&globals.app.isMultiCluster&&"host"!==(0,ee.default)(e.clusters.find((function(e){return e.value===r.cluster})),"type")&&delete r.cluster,t.next=7,e.fetchMeterData(Ie({module:n,meters:l,resources:u,isTime:f,start:c,end:s},r));case 7:return p=t.sent,t.abrupt("return",p);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),A=(0,K.default)(s.prototype,"setTimeRange",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.isTime,r=(0,u.default)(t,["isTime"]),n=(0,me.getTimeParams)(Ie({isTime:a},r)),l=n.step,o=n.start,i=n.end;e.timeRange=o>=i?{}:{step:(0,he.getTimeStr)(l),start:1e3*o,end:1e3*i}}}}),j=(0,K.default)(s.prototype,"getChildrenData",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,i,c,s,f;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.name,n=a.type,l=a.labelSelector,u=(0,re.default)(e.crumbData),e.loading=!0,e.sideLoading=!0,"workspaces"===n&&r!==u.name&&(e.clusters=e.getClustersList(r),e.cluster=(0,ee.default)(e.clusters,"[0].value",""),e.setPriceConfig(e.cluster)),"cluster"===n&&r!==u.name&&e.setPriceConfig(r),e.setActiveCrumb({name:r,type:n,isCopy:!0,start:e.startTime}),t.next=9,e.getChildrenList({labelSelector:l,currentType:n});case 9:if(i=t.sent,(0,ae.default)(i)||!(0,te.default)(i)){t.next=20;break}return c=i[0].type,s=(0,re.default)(e.crumbData),f=e.getMeterParamsByCrumb(),t.next=16,e.getCurrentTimeMeterData({valueKey:"parentMeterData",params:f,module:s.type,start:s.start,resources:[s.name]});case 16:return e.crumbData.push({type:c,name:i[0].name,list:i,start:e.startTime}),t.next=19,e.getCurrentMeterData({name:i[0].name,type:c,isCopy:!0,isTime:!0,start:e.startTime,labelSelector:(0,ee.default)(i,"[0].labelSelector")});case 19:e.list=i;case 20:e.loading=!1,e.sideLoading=!1;case 22:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),L=(0,K.default)(s.prototype,"getResourceMeterData",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.props.level,e.resourceLoading=!0,"workspaces"!==r[0].type){t.next=7;break}return t.next=5,e.getWorkspacesMeterChartData(a);case 5:t.next=9;break;case 7:return t.next=9,e.getClusterMeterChartData(a);case 9:e.resourceLoading=!1;case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),x=(0,K.default)(s.prototype,"handleChartData",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,i;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.meters,n=(0,u.default)(a,["meters"]),l=e.active.name,e.tableData=[],t.next=5,e.setMeterData({module:e.active.type,resources:[l],meters:r,isTime:!0,params:n});case 5:i=t.sent,e.tableData=e.setLineChartColor(i),e.chartData=i;case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),U=(0,K.default)(s.prototype,"getTimeRange",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.type,r=t.value;if("close"===t.methord){var n=e.getMeterParamsByCrumb();(0,le.default)(e.timeRange,"".concat(a),r),e.handleChartData(Ie(Ie({meters:"all"},n),(0,ce.toJS)(e.timeRange)))}(0,le.default)(e.timeRange,"".concat(a),r)}}}),z=(0,K.default)(s.prototype,"getCurrentTimeMeterData",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,i,c,s,f,d;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.valueKey,n=a.params,l=a.module,u=a.start,i=a.resources,t.next=3,e.setMeterData({params:n,meters:"all",module:l,start:u,end:new Date,resources:i,valueKey:"parentMeterData",isTime:!0});case 3:c=t.sent,s=e.getSumMeterData(c),f=s.sumData,d=s.feeData,e[r]={sumData:f,feeData:d};case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),F=(0,K.default)(s.prototype,"handleCrumbOperation",[ce.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,G.default)(o.default.mark((function t(a){var r,n,l,u,i,c,s;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.crumbData.length-1,e.sideLoading=!0,"back"!==a){t.next=11;break}if(!(r<=0)){t.next=7;break}return e.props.handleBack(),e.sideLoading=!1,t.abrupt("return");case 7:e.crumbData.pop(),r-=1,t.next=18;break;case 11:if(!((n=e.cacheCrumbData.length-1)<=0||n===r)){t.next=15;break}return e.sideLoading=!1,t.abrupt("return");case 15:l=e.cacheCrumbData[r+1],e.crumbData.push(l),r+=1;case 18:if(u=(0,re.default)(e.crumbData),!(r>0)){t.next=25;break}return i=e.crumbData[r-1],c=e.getMeterParamsByCrumb(),"workspaces"===i.type?(c.workspaces=i.name,e.clusters=e.getClustersList(i.name),Object.keys(c).forEach((function(e){"workspaces"!==e&&(c[e]=void 0)}))):c[u.type]=void 0,t.next=25,e.getCurrentTimeMeterData({params:c,valueKey:"parentMeterData",module:i.type,start:i.start,resources:[i.name]});case 25:return s=u.list.find((function(e){return e.name===u.name})),t.next=28,e.getCurrentMeterData({name:u.name,type:u.type,start:e.startTime,labelSelector:(0,ee.default)(s,"labelSelector",""),isTime:!0});case 28:e.list=u.list,e.sideLoading=!1;case 30:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),c=s))||c;a.default=Pe},,function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(29),a(16),a(9),a(13),a(10),a(4),a(22),a(23),a(17),a(38),a(7),a(32),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(29),a(28),a(42),a(16),a(34),a(15),a(9),a(13),a(10),a(4),a(22),a(23),a(57),a(17),a(38),a(7),a(32);var n=r(a(43)),l=r(a(30)),u=r(a(58));a(41);var o,i,c,s,f,d,p,m,h,v,g=r(a(44)),y=r(a(65)),E=r(a(36)),b=r(a(37)),_=r(a(88)),O=r(a(55)),S=r(a(56)),C=r(a(51)),D=r(a(49)),k=(r(a(66)),a(14)),N=r(a(60)),T=r(a(63)),R=r(a(158)),w=r(a(438)),I=r(a(856)),M=r(a(445)),P=r(a(439)),A=r(a(961)),j=r(a(1206)),L=r(a(443)),x=r(a(318)),U=r(a(452)),z=a(72),F=a(1205);function G(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function V(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespaces,r=e.workspaces,n=e.deployments,l=e.statefulsets,u=e.daemonsets,o=e.services,i=e.pods,c="";return t&&(c+="/klusters/".concat(t)),a&&(c+="/namespaces/".concat(a)),r&&(c+="/workspaces/".concat(r)),o&&(c+="/services/".concat(o)),n&&(c+="/deployments/".concat(n)),l&&(c+="/statefulsets/".concat(l)),u&&(c+="/daemonsets/".concat(u)),i&&(c+="/pods/".concat(i)),c}},{key:"isMultiCluster",get:function(){return!globals.app.isMultiCluster}}]),a}(r(a(1781)).default),i=(0,D.default)(o.prototype,"list",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),c=(0,D.default)(o.prototype,"clustersConfig",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),s=(0,D.default)(o.prototype,"cacheList",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),f=(0,D.default)(o.prototype,"levelMeterData",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),d=(0,D.default)(o.prototype,"cacheLevelData",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),p=(0,D.default)(o.prototype,"isLoading",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),m=(0,D.default)(o.prototype,"fetchList",[k.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,g.default)(n.default.mark((function t(a){var r,l,o,i,c,s,f,d,p;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.type,l=(0,u.default)(a,["type"]),o=e.getStore(r),i=(0,F.getFetchParams)(V({isMultiCluster:e.isMultiCluster,type:r},l)),c=(0,F.getListConfig)({isMultiCluster:e.isMultiCluster,type:r}),s=[],i.forEach((function(e){"[object Array]"===Object.prototype.toString.call(o)?o.forEach((function(t){s.push(t.fetchList(V({},e)))})):s.push(o.fetchList(V({},e)))})),t.next=8,Promise.all(s).catch((function(){return[]}));case 8:if(f=t.sent,d=[],!(0,T.default)(f)&&(0,N.default)(f)&&f.forEach((function(t,a){t.forEach((function(t){if(!(0,F.hasNameSpacesType)(r)||(0,F.hasNameSpacesType)(r)&&(0,F.filterListByType)(V({type:r},l))(t)){var n=c[a],u=n.status,o=n.desc,i=e.handleStatusByWorkload(u,r,t),s=e.handleNameByType(r,t),f=e.handleIconByType(r,t.provider);d.push({icon:f,name:s,status:i,desc:o,labelSelector:t.selector,type:r,_origin:V({},t)})}}))})),"pods"===r&&(d=d.filter((function(e){return"Completed"!==e.status&&"Error"!==e.status}))),!l.node){t.next=15;break}return e.list=d,t.abrupt("return",d);case 15:return t.next=17,(0,F.filterResourceLevel)(V({levelMeterData:e.levelMeterData,type:r,data:d},l));case 17:return p=t.sent,e.list=p,t.abrupt("return",p);case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),h=(0,D.default)(o.prototype,"fetchLevelMeter",[k.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,g.default)(n.default.mark((function t(a){var r,u,o,i,c,s;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.cluster,u=a.namespaces,o=a.workspaces,r&&(e.cluster=r),i="".concat(e.tenantUrl({cluster:r}),"/namespaces/").concat(u,"/metering/hierarchy").concat(o?"?workspace=".concat(o):""),t.next=5,request.get(i,{},{},(function(){return{}}));case 5:return c=t.sent,s=(0,R.default)(c)||(0,T.default)(c)?{}:(0,l.default)({},u,c),e.levelMeterData=s,t.abrupt("return",s);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}}),v=(0,D.default)(o.prototype,"setLevelMeterData",[k.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.levelMeterData=t}}}),o);t.default=Y},,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(6),a(16),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(6),a(28),a(42),a(16),a(4),a(23),a(57),a(17),a(7);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=a(186),d=a(72),p=r(a(3565)),m=r(a(1398));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var v=function(e){(0,u.default)(a,e);var t=h(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u0?l.default.createElement(u.Select,{className:o.default.clusterSelect,options:n,optionRenderer:function(e){var t=e.label,a=e.disabled;return l.default.createElement("span",{style:{display:"flex",alignItem:"center"}},t,l.default.createElement("span",{style:{marginLeft:"10px"}},a?l.default.createElement(u.Icon,{name:"update",color:{primary:"#ffc781",secondary:"#f5a623"}}):null))},value:r,onChange:function(e){i(e)},showTip:!0}):null)};a.default=i},function(e,t,a){e.exports={title:"_2aGXmcx7mFZbhToSS1A-OM",clusterSelect:"_5ayuJN6svE2FJ4y0dsmAQ"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(31),r(6),r(29),r(18),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(17),r(38),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(31),r(6),r(29),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(38),r(7),r(32);var l=n(r(43)),u=n(r(30));r(41);var o,i,c,s,f,d,p=n(r(44)),m=n(r(65)),h=n(r(36)),v=n(r(37)),g=n(r(88)),y=n(r(55)),E=n(r(56)),b=n(r(51)),_=n(r(49)),O=(n(r(66)),n(r(0))),S=r(239),C=r(14),D=r(186),k=r(909),N=n(r(1375)),T=n(r(63)),R=n(r(158)),w=n(r(449)),I=n(r(26)),M=r(1205),P=n(r(3570)),A=n(r(3572));function j(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function L(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=e.className,r=e.title,n=e.isParent,p=e.priceConfig,m=(0,l.default)(e,["className","title","isParent","priceConfig"]),h=p.currency?p.currency:" ",v=function(){var e=m.feeData,t=0;return(0,s.default)(e)||(0,c.default)(e)||(t=Object.keys(e).map((function(t){return 100*parseFloat((0,i.default)(e[t],"value",0))})).reduce((function(e,t){return e+t}))/100),t.toFixed(2)},g=function(e){var t=y(e);return"-"!==t?t.toFixed(3):t},y=function(e){return(0,s.default)(e)?"-":e<0?0:e},E=function(e,a){return(0,c.default)(e)?null:"price"===a&&(0,c.default)(p)?u.default.createElement("ul",{className:f.default.noPriceTip},u.default.createElement("li",null,t("PRICE_CONFIG_DESC"))):u.default.createElement("ul",null,Object.keys(e).map((function(r){var n=(0,i.default)(e[r],"value"),l="meter"===a?g(n):y(n);return e[r]?u.default.createElement("li",{key:r},u.default.createElement("div",null,l),u.default.createElement("p",null,u.default.createElement("span",null,t(d.METER_RESOURCE_TITLE[r].toUpperCase().replace(/\s+/g,"_"))),u.default.createElement("span",null,"(",(0,i.default)(e[r],"unit.label","-"),")"))):null})))},b=function(e){var a=v();return u.default.createElement("div",null,u.default.createElement("h3",null,e," ",t("CONSUMPTION_SINCE_CREATION")),(0,c.default)(p)?null:u.default.createElement("div",{className:f.default.totalPrice},u.default.createElement("h4",null,a),u.default.createElement("p",null,t("TOTAL_COST",{unit:h}))))},_=function(e){var a=v();return u.default.createElement("div",{className:f.default.parentCostContainer},u.default.createElement("div",null,u.default.createElement("h3",null,e),u.default.createElement("span",null," ",t("CONSUMPTION_SINCE_CREATION"))),u.default.createElement("p",null,u.default.createElement("span",null,h),a))},O=m.sumData,S=void 0===O?{}:O,C=m.feeData,D=void 0===C?{}:C;return n?u.default.createElement("div",{className:(0,o.default)(f.default.billTotal,a)},_(r)):u.default.createElement("div",{className:(0,o.default)(f.default.billTotal,a)},b(r),u.default.createElement("div",{className:f.default.consumContainer},(0,c.default)(S)&&(0,c.default)(D)?null:u.default.createElement(u.default.Fragment,null,E(S,"meter"),u.default.createElement("div",{className:f.default.line}),E(D,"price"))))};a.default=p},function(e,t,a){e.exports={billTotal:"_2yAhIbTXhLB8AgqHVlMiY",parentCostContainer:"_2Q8zNmDqt_oiHw6Gea24im",totalPrice:"_1UrXZ5SCxDX8Afu2MVimjJ",consumContainer:"_1TAVSr4ki5JW2eC-92JCkR",noPriceTip:"_17jZhcUtJrSh3-xDgz5rNX",line:"rQmHupJi6faIkggp0AD-m"}},function(e,a,r){"use strict";r(15);var n=r(20);r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(186),d=n(r(240)),p=r(950),m=n(r(201)),h=n(r(243)),v=n(r(3576));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var y=["1h","2h","4h","8h","1d"],E="zh"===(0,m.default)("lang")?"Y年Md日 H:i":"M d, Y H:i",b=function(e){(0,o.default)(r,e);var a=g(r);function r(e){var n;(0,l.default)(this,r),(n=a.call(this,e)).getTimeRange=function(e){var t=e.type,a=e.methord;return function(e){var r=n.props,l=r.getTime,u=r.timeRange,o=u.end,i=u.start,c=new Date(e[0]).getTime();"start"===t&&c>=o||"end"===t&&c<=i||l({type:t,value:c,methord:a})}},n.handleStepChange=function(e){var a=e.type,r=e.methord;return function(e){var l=e,u=n.props,o=u.getTime,i=u.timeRange,c=i.end,s=i.start;Math.floor((c-s)/3600/24/1e3)>=30&&"1d"!==l?d.default.error({content:t("TIMERANGE_MORE_30DAY_MSG")}):o({type:a,value:l,methord:r})}},n.handleTimeRangeChange=function(e){return function(a){var r=n.props,l=r.getTime,u=r.timeRange,o=u.end,i=u.start,c=u.step,s=new Date(a[0]).getTime();if("start"===e&&s>=o||"end"===e&&s<=i)d.default.error({content:t("TIMERANGE_SELECTOR_MSG")});else{if("start"===e)Math.floor((o-s)/3600/24/1e3)>=30&&"1d"!==c&&l({type:"step",value:"1d",methord:"change"});if("end"===e)Math.floor((s-i)/3600/24/1e3)>=30&&"1d"!==c&&l({type:"step",value:"1d",methord:"change"});l({type:e,value:s,methord:"change"})}}};var u=n.props.timeRange,o=u.end||new Date;return n.endMaxDate=new Date(o),n.maxDate=new Date((0,h.default)(o).subtract(1,"minutes")),n.minDate=new Date(u.start),n}return(0,u.default)(r,[{key:"render",value:function(){var e=this.props.timeRange,a=e.step,r=e.start,n=e.end;return s.default.createElement("div",{className:v.default.datepicker},s.default.createElement("div",{className:v.default.datepickerLeft},s.default.createElement("div",null,t("BILLING_CYCLE"))),s.default.createElement("div",{className:v.default.datepickerRight},s.default.createElement("div",null,s.default.createElement(f.DatePicker,{defaultValue:r,value:r,showClearBtn:!1,dateFormat:E,minDate:this.minDate,maxDate:this.maxDate,onClose:this.getTimeRange({type:"start",methord:"close"}),onChange:this.handleTimeRangeChange("start")}),s.default.createElement("p",null,t("START_TIME"))),s.default.createElement("div",null,s.default.createElement(f.DatePicker,{defaultValue:n,value:n,showClearBtn:!1,dateFormat:E,minDate:this.minDate,maxDate:this.endMaxDate,onClose:this.getTimeRange({type:"end",methord:"close"}),onChange:this.handleTimeRangeChange("end")}),s.default.createElement("p",null,t("END_TIME"))),s.default.createElement("div",null,s.default.createElement("div",null,s.default.createElement(f.Select,{value:a,options:(0,p.getTimeOptions)(y),onChange:this.handleStepChange({type:"step",methord:"close"})})),s.default.createElement("p",null,t("SAMPLING_INTERVAL")))))}}]),r}(s.default.Component);a.default=b},function(e,t,a){e.exports={datepicker:"_27tdhObpPbURPjQ15hD9_p",datepickerLeft:"_1keZq2egvTiK6G1mB4EamV",datepickerRight:"_2JDSh06KoL1Fb1gCk0R4Qr"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(29),r(18),r(4),r(23),r(24),r(17),r(64),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(6),r(29),r(18),r(42),r(4),r(23),r(57),r(24),r(17),r(64),r(7),r(32);var l=n(r(315)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(26)),p=n(r(74)),m=n(r(63)),h=n(r(806)),v=n(r(60)),g=r(186),y=r(798),E=r(794),b=n(r(833)),_=n(r(3578)),O=r(943),S=n(r(3580));function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var D=function(e){(0,i.default)(r,e);var a=C(r);function r(){var e;(0,u.default)(this,r);for(var n=arguments.length,l=new Array(n),o=0;o=0?1:-1),O=b,S=v>=0?"start":"end";return o.default.createElement("g",null,o.default.createElement("text",{x:a,y:r,dy:8,textAnchor:"middle",fill:f,className:"chart__center__text"},d.name),o.default.createElement(i.default,{cx:a,cy:r,innerRadius:l,outerRadius:u,startAngle:c,endAngle:s,fill:f}),o.default.createElement(i.default,{cx:a,cy:r,startAngle:c,endAngle:s,innerRadius:u+6,outerRadius:u+10,fill:f}),o.default.createElement("path",{d:"M".concat(g,",").concat(y,"L").concat(E,",").concat(b,"L").concat(_,",").concat(O),stroke:f,fill:"none"}),o.default.createElement("circle",{cx:_,cy:O,r:2,fill:f,stroke:"none"}),o.default.createElement("text",{x:_+12*(v>=0?1:-1),y:O,textAnchor:S,fill:"#333"},"".concat(m," ").concat(d.unit)),o.default.createElement("text",{x:_+12*(v>=0?1:-1),y:O,dy:18,textAnchor:S,fill:"#999"},"(".concat((100*p).toFixed(2),"%)")))},_=function(e){var a=e.data,r=e.dataKey,n=void 0===r?"value":r,l=(0,o.useState)(0),i=(0,u.default)(l,2),_=i[0],O=i[1];return(0,m.default)(a)?null:o.default.createElement(c.default,{width:"100%",height:"100%"},o.default.createElement(p.default,{width:250,height:250},o.default.createElement(s.default,{vertical:!0,content:function(e){var a=e.payload;return o.default.createElement("div",{className:g.default.resourceList},o.default.createElement("ul",null,a.map((function(e,a){var r=e.payload,n=r.name,l=r.value,u=r.type,i=r.unit;return o.default.createElement("li",{key:"item-".concat(a)},o.default.createElement("i",{style:{background:e.color}}),o.default.createElement(E.default,{icon:v.ICON_TYPES[u],type:u,name:n}),o.default.createElement(h.default,{className:g.default.info,title:"".concat(n),description:t(y.RESOURCE_TITLE[u])}),o.default.createElement("span",null," ".concat(l," ").concat(i)))}))))},verticalAlign:"top"}),o.default.createElement(d.default,{cx:"70%",data:a,dataKey:n,innerRadius:"60%",outerRadius:"75%",activeShape:b,activeIndex:_,onMouseEnter:function(e,t){O(t)}},a.map((function(e,t){return o.default.createElement(f.default,{key:"cell-".concat(e.name),fill:y.PIE_COLORS[t%y.PIE_COLORS.length],strokeWidth:1})})))))};a.default=_},function(e,t,a){e.exports={resourceList:"_31MsHfl5iWHdowDFRcP_c_",info:"_1x0CTr7Gdd16AxoTqHsNYT"}},function(e,t,a){e.exports={empty:"_17Mqxb1Mgn-uRdDZOJ1Qry",emptyCard:"_3Je_SSJ5BVw3PS1lYiaF4a",billDetail:"_34UPSURIT6CqbdKJPw0R7F",paddingBottom0:"Pwj-ykGPltZo5v5_plDlH",leftContent:"_3s_-nS9c5xnUUgNEPJ8KBe",usageCard:"_21O2m-U6tWGv0Y9s4Y4Ajh",meterCard:"_2gAbgzqWqzvuq_xZzCJQ1f",rightContent:"_3Aa1yND_BGYLN9nw7XneCp",content:"_3g0_NpYdRmw2VOPc2T6ywW",toothbg:"_1Rh1CvWKS3lQeuSjvWt3Y0",subTitle:"_3jfzvzWfyayS9TsDXqD6lC",info:"_2oNPFCeABRFS8ryVIKhich",childrenResourceContainer:"_1OGurl1hQb7F7WnATfB1QY",childrenlistContainer:"_2pzMlSUqyzZuZDlITePlsG",constomChartContainer:"_1yVmPte_v552Dq8WqeShqg"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={wrapper:"_1FhVvljOspycHsfzDrmHds",item:"_3uwdOWJxem3W_jqv6BAFu0",disabled:"sjn_zdlBrahI74WoV5omc",cluster:"_2s530jxSq442V0tK0dIkX-",action:"_30jbBaVzPyFFq_kLZenMJb",loading:"_2AViFhQ9LVdDjo1TbCma_n",clusterGroupTag:"_2tthhYeEaldV9GRAYCBRGE",production:"_3yIRf79JJMwAIiDuiJ-pCJ",development:"_3tNJGwW0JIy457E7wJg2vi",testing:"ITsFiOT5f8SuWqLf3dqin",demo:"rCDJ6PUxymw3W-b5WZ8KP",radios:"_3s7U5MUfODfm6UTxJ8Gkak"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(832),n={"node:pod_abnormal:ratio{$1}":{label:"UNAVAILABLE_POD_RATIO",prefixIcon:"pod",ruleConfig:r.PERCENT_RULE_CONFIG},"node:pod_utilisation:ratio{$1}":{label:"POD_QUOTA_UTILIZATION_SCAP",prefixIcon:"pod",ruleConfig:r.PERCENT_RULE_CONFIG},"node:node_cpu_utilisation:avg1m{$1}":{label:"CPU_UTILIZATION_SCAP",prefixIcon:"cpu",ruleConfig:r.PERCENT_RULE_CONFIG},"node:load1:ratio{$1}":{label:"CPU_LOAD_1",prefixIcon:"cpu",ruleConfig:r.BASE_RULE_CONFIG},"node:load5:ratio{$1}":{label:"CPU_LOAD_5",prefixIcon:"cpu",ruleConfig:r.BASE_RULE_CONFIG},"node:load15:ratio{$1}":{label:"CPU_LOAD_15",prefixIcon:"cpu",ruleConfig:r.BASE_RULE_CONFIG},"node:node_memory_bytes_available:sum{$1}":{label:"MEMORY_AVAILABLE",prefixIcon:"memory",ruleConfig:r.DISK_RULE_CONFIG},"node:node_memory_utilisation:{$1}":{label:"MEMORY_UTILIZATION_SCAP",prefixIcon:"memory",ruleConfig:r.PERCENT_RULE_CONFIG},"node:disk_space_available:{$1}":{label:"DISK_SPACE_AVAILABLE",prefixIcon:"storage",ruleConfig:r.DISK_RULE_CONFIG},"node:disk_space_utilization:ratio{$1}":{label:"DISK_SPACE_UTILIZATION",prefixIcon:"storage",ruleConfig:r.PERCENT_RULE_CONFIG},"node:disk_inode_utilization:ratio{$1}":{label:"INODE_UTILIZATION",prefixIcon:"storage",ruleConfig:r.PERCENT_RULE_CONFIG},"node:data_volume_iops_reads:sum{$1}":{label:"DISK_READ_IOPS",prefixIcon:"storage",ruleConfig:r.BASE_RULE_CONFIG},"node:data_volume_iops_writes:sum{$1}":{label:"DISK_WRITE_IOPS",prefixIcon:"storage",ruleConfig:r.BASE_RULE_CONFIG},"node:data_volume_throughput_bytes_read:sum{$1}":{label:"DISK_READ_THROUGHPUT",prefixIcon:"storage",ruleConfig:r.THROUGHPUT_RULE_CONFIG},"node:data_volume_throughput_bytes_written:sum{$1}":{label:"DISK_WRITE_THROUGHPUT",prefixIcon:"storage",ruleConfig:r.THROUGHPUT_RULE_CONFIG},"node:node_net_bytes_transmitted:sum_irate{$1}":{label:"DATA_SEND_RATE",prefixIcon:"network",ruleConfig:r.BANDWIDTH_RULE_CONFIG},"node:node_net_bytes_received:sum_irate{$1}":{label:"DATA_RECEIVE_RATE",prefixIcon:"network",ruleConfig:r.BANDWIDTH_RULE_CONFIG}};t.default=n},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(832),n=(0,r.getBaseRuleConfig)({thresholds:{unit:"Kbps"}}),l={"namespace:workload_cpu_usage:sum{$1}":{label:"CPU_USAGE_SCAP",prefixIcon:"cpu",ruleConfig:r.CPU_RULE_CONFIG},"namespace:workload_memory_usage:sum{$1}":{label:"MEMORY_USAGE_SCAP",prefixIcon:"memory",ruleConfig:r.MEMORY_RULE_CONFIG},"namespace:workload_memory_usage_wo_cache:sum{$1}":{label:"MEMORY_USAGE_WO_CACHE_SCAP",prefixIcon:"memory",ruleConfig:r.MEMORY_RULE_CONFIG},"namespace:workload_net_bytes_transmitted:sum_irate{$1}":{label:"DATA_SEND_RATE",prefixIcon:"network",ruleConfig:n},"namespace:workload_net_bytes_received:sum_irate{$1}":{label:"DATA_RECEIVE_RATE",prefixIcon:"network",ruleConfig:n},"namespace:$2_unavailable_replicas:ratio{$1}":{label:"UNAVAILABLE_WORKLOAD_REPLICA_RATIO",prefixIcon:"backup",ruleConfig:r.PERCENT_RULE_CONFIG}};t.default=l},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(832),n=(0,r.getBaseRuleConfig)({thresholds:{unit:"Kbps"}}),l={pod_cpu_usage:{label:"CPU_USAGE_SCAP",prefixIcon:"cpu",ruleConfig:r.CPU_RULE_CONFIG},pod_cpu_utilisation:{label:"CPU_UTILIZATION_SCAP",prefixIcon:"cpu",ruleConfig:r.PERCENT_RULE_CONFIG},pod_memory_usage:{label:"MEMORY_USAGE_SCAP",prefixIcon:"memory",ruleConfig:r.MEMORY_RULE_CONFIG},pod_memory_usage_wo_cache:{label:"MEMORY_USAGE_WO_CACHE_SCAP",prefixIcon:"memory",ruleConfig:r.MEMORY_RULE_CONFIG},pod_memory_utilisation:{label:"MEMORY_UTILIZATION_SCAP",prefixIcon:"memory",ruleConfig:r.PERCENT_RULE_CONFIG},pod_net_bytes_transmitted:{label:"DATA_SEND_RATE",prefixIcon:"network",ruleConfig:n},pod_net_bytes_received:{label:"DATA_RECEIVE_RATE",prefixIcon:"network",ruleConfig:n}};t.default=l},function(e,t,a){e.exports={tab_button:"_1GjZQuKzwgC-xJHgrDeRWF"}},function(e,t,a){e.exports={statusBox:"_3-nUUNPdHf6nbcNilZpYRu",tipContent:"_3hWwCJ2aJ_CoClIJxwLD92","li-inactive":"qR0ICXRI_XTjTQpSmpQ30","li-pending":"mSNAp1UtzsfpxCLTnhS7r","li-firing":"_3-ibjgejpBZzHSyM9CLeFN","li-disabled":"_28ksGom3cFiMbDfJ69J2Sj",pending:"i0nzirrByxHGMEKshU2B8",inactive:"TSFq6Mn2U7nNIetXHhvbq",firing:"_3ZvlqZkrbQaAbCXIzga0Gz",disabled:"_2x-hssz0bLHxhscbkXhHRp",iconDisabled:"_1BJXzHjXw3Nt_eSzIZepU4"}},function(e,t,a){e.exports={wrapper:"_3CpXh5MQSB8n7L6OXc7ywb",header:"_2hifQ3b2l1YUmAwfc_edPZ",banner:"_1tHeasrKfQAP5PPnH3kiAU",toolbar:"_1Tny-SYL1rocrF2kq-buRw",keyword:"_3ZFaXRGjHJxsMgsf7RM7xw",loading:"_2K9VjkD9XMBf2NvcEMJnVX",bottomLine:"_3nxTNKx3AtqUA6JhYLjjH7","table-icon":"_1qE9Pp0LPqxfcpulbP71V-",status_icon:"_3ob3SnNsE5wyYrjjB2PTMm",tab_button:"r-sE4t_ogqB-qnJe4kpcu"}},,,,function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(97),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(97),r(4);var u=l(r(96)),o=n(r(0)),i=r(3713),c=l(r(3)),s=r(3716),f=r(3717),d=r(186),p=l(r(3719));var m=function(e){var a=e.item,r=e.user,n=(0,s.useDashboardHistory)(r),l=(0,u.default)(n,2),m=l[0],h=l[1],v=m.some((function(e){return e.id===a.id})),g=(0,f.useEventEmitter)();return(0,o.useEffect)((function(){g.$emit("FavoriteHistory-".concat(a.id),m)}),[m]),(0,o.useEffect)((function(){var e=function(e){m!==e&&h(e)};return g.$on("FavoriteHistory-".concat(a.id),e),function(){g.$off("FavoriteHistory-".concat(a.id),e)}}),[]),o.default.createElement("div",{className:(0,c.default)(p.default.favorite,"favorite-icon")},o.default.createElement(d.Tooltip,{content:v?t("CANCEL_QUICK_ACCESS"):t("ADD_TO_QUICK_ACCESS")},o.default.createElement("div",{onClick:function(e){e.stopPropagation(),e.preventDefault(),h(v?(0,s.removeDashboardHistory)(r,a.id,!1):(0,s.addDashboardHistory)(r,a,!1))}},v?o.default.createElement(i.StarDuotone,{className:"star",color:"#F5A623",size:16}):o.default.createElement(i.StarHalfDuotone,{className:"starHalf",size:16,color:"#36435C"}))))};a.default=m},function(e,t,a){"use strict";a(15),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"StarDuotone",{enumerable:!0,get:function(){return r.StarDuotone}}),Object.defineProperty(t,"StarHalfDuotone",{enumerable:!0,get:function(){return n.StarHalfDuotone}});var r=a(3714),n=a(3715)},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.StarDuotone=function(e){var t=(0,l.mapProps)(e,16);return n.default.createElement("svg",t,n.default.createElement("path",{d:"M7.70083 0.943204C7.82285 0.694551 8.17731 0.69455 8.29932 0.943204L10.2145 4.84615C10.3113 5.04344 10.4992 5.18034 10.7166 5.21212L15.0015 5.83833C15.2743 5.8782 15.3836 6.21317 15.1867 6.40619L12.0825 9.44937C11.9265 9.60235 11.8553 9.82209 11.8921 10.0375L12.6246 14.3331C12.6711 14.6056 12.3846 14.813 12.1402 14.6838L8.3117 12.6595C8.11674 12.5564 7.88341 12.5564 7.68846 12.6595L3.85996 14.6838C3.61553 14.813 3.32908 14.6056 3.37556 14.3331L4.1081 10.0375C4.14483 9.82209 4.07367 9.60235 3.91762 9.44937L0.813478 6.40619C0.616597 6.21317 0.725816 5.8782 0.998629 5.83833L5.28353 5.21212C5.50098 5.18034 5.68881 5.04344 5.78562 4.84615L7.70083 0.943204Z",fill:"currentColor"}))};var n=r(a(0)),l=a(1800)},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.StarHalfDuotone=function(e){var t=(0,l.mapProps)(e,16);return n.default.createElement("svg",t,n.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.2145 4.84615C10.3113 5.04344 10.4992 5.18034 10.7166 5.21212L15.0015 5.83833C15.0186 5.84082 15.035 5.84447 15.0507 5.84916C15.2868 5.91952 15.3713 6.22524 15.1867 6.40619L12.0825 9.44937C11.9265 9.60235 11.8553 9.82209 11.8921 10.0375L12.6246 14.3331C12.6275 14.3501 12.6291 14.3669 12.6295 14.3833C12.6354 14.6302 12.3693 14.8049 12.1402 14.6838L8.3117 12.6595C8.11674 12.5564 7.88341 12.5564 7.68845 12.6595L3.85996 14.6838C3.61553 14.813 3.32908 14.6056 3.37556 14.3331L4.1081 10.0375C4.14483 9.82209 4.07367 9.60235 3.91762 9.44937L0.813478 6.40619C0.616597 6.21317 0.725816 5.8782 0.998629 5.83833L5.28353 5.21212C5.29712 5.21013 5.3106 5.20774 5.32394 5.20494C5.52411 5.16299 5.69486 5.03111 5.78562 4.84615L7.70083 0.943204C7.82285 0.69455 8.17731 0.694551 8.29932 0.943204L10.2145 4.84615ZM7.06521 11.4807C7.35765 11.3261 7.67886 11.2488 8.00007 11.2488V3.36006L6.9826 5.43352C6.69217 6.02539 6.1287 6.4361 5.47634 6.53144L3.1871 6.866L4.85104 8.49726C5.31916 8.95619 5.53266 9.61541 5.42245 10.2616L5.03114 12.5563L7.06521 11.4807ZM8.93494 11.4807C8.6425 11.3261 8.32129 11.2488 8.00008 11.2488V3.36006L9.01755 5.43352C9.30799 6.02539 9.87145 6.4361 10.5238 6.53144L12.8131 6.866L11.1491 8.49726C10.681 8.95619 10.4675 9.61541 10.5777 10.2616L10.969 12.5563L8.93494 11.4807Z",fill:"currentColor"}))};var n=r(a(0)),l=a(1800)},function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(6),a(84),a(9),a(13),a(10),a(85),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.removeDashboardHistory=t.addDashboardHistory=t.useDashboardHistory=void 0;var n=r(a(30)),l=r(a(96));a(12),a(11),a(6),a(84),a(160),a(28),a(191),a(159),a(34),a(15),a(9),a(13),a(10),a(4),a(85),a(7);var u=r(a(806)),o=a(0);function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function c(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"history-cache-v4",r=(0,o.useState)(null!==(t=s(a)[e])&&void 0!==t?t:[]),i=(0,l.default)(r,2),f=i[0],d=i[1];return(0,o.useEffect)((function(){var t,r=null!==(t=s(a)[e])&&void 0!==t?t:[];(0,u.default)(r,f)||d(r)}),[e,a]),(0,o.useEffect)((function(){localStorage.setItem(a,JSON.stringify(c(c({},s(a)),{},(0,n.default)({},e,f))))}),[f]),[f,d]};t.addDashboardHistory=function(e,t){var a,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"history-cache-v4",u=null!==(a=s(l)[e])&&void 0!==a?a:[],o=u.filter((function(e){return e.id!==t.id}));return o.push(t),r&&localStorage.setItem(l,JSON.stringify(c(c({},s(l)),{},(0,n.default)({},e,o)))),o};t.removeDashboardHistory=function(e,t){var a,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"history-cache-v4",u=null!==(a=s(l)[e])&&void 0!==a?a:[],o=u.filter((function(e){return Array.isArray(t)?!t.includes(e.id):e.id!==t}));return o.length===u.length||r&&localStorage.setItem(l,JSON.stringify(c(c({},s(l)),{},(0,n.default)({},e,o)))),o}},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.useEventEmitter=void 0;var n=(0,r(a(3718)).default)(),l=n.on,u=n.off,o=n.emit,i=n.all;t.useEventEmitter=function(){return{$on:l,$off:u,$emit:o,all:i}}},,function(e,t,a){e.exports={favorite:"_3JaIb46ozjKz2jKBsCjIAv"}},function(e,t,a){e.exports={wrapper:"_3qaPLN3flFkd7vdbb-a06X",icon:"_2nvnLCPMiMLWLpzmB_ss4Y",indicator:"_1korY3RT8tulRRgwANoA8l",group:"_2FFcxBZefuDpc8WshcrThZ",options:"_15s8_iioN5RvbWBdWUbE7i"}},,,,,,function(e,t,a){e.exports={table:"_1i60_Zk2GuZ0BSBW7unRbV",table_rank:"_2Mr7mDygEQ35XwS2BpvdbG",table_no_border:"_35xeFOcthetSVxVd7jbhy8",rankCol:"K5KlP-RunT4IdakA3VSci",table_transparent:"_1kEZxv3qugETuqEDftrkMQ"}},function(e,t,a){e.exports={wrapper:"kE3KwCjpxjL06m1JyXYqh",pane:"_2uVDNuCFQlEdzxeJFsgade",pane__toolbar:"_3pwemZYlldk8BVRzKSjR0M",title:"_2QLeiq4lO4-E0UWkTwZ2pU",toolbar:"B2iEbHtsi7TSbVQDFZAAM",toolbar_buttons:"_20ATWKNncgatSI7TsIFmSk",toolbar_filter:"_3DIJstY5eiupA7Z3Sx7ugA",sortTypeSelect:"_3xIBxesObSvBweKWDzU4ik",sort_button:"bIIGx7S36rL-ZE_ySMccm",table:"_3zcLFyY9c0qr-O4IcoD-xM",table_rank:"UQZcsZfu2_Uy2ZbJXbAhV",table_no_border:"_2CLtp-r29kgr89OqLBTEzk",rankList_row:"_3MTKghTP6FCVM_Oc0poYe2",rankCol:"WFE7sesMVKXIVySSq_c7Q",listContainer:"_36b1LYqEBKXqJV0PTKLfTL",pane__pagination:"toSE7w2UfWCbYgAaXuYw7",avatar:"_3D6xMvf2yi0ds1rEmmP39K"}},,,,,,,,,,,,function(e,t,a){e.exports={resourceRatio:"_1fUEZ2TB-t0fMQV4l3ACo4",subTitle:"_1vbcsgfDS-GM0SJqrqvnYL",title:"_1Ikw3GCgFAv_lfARz3bQA-",radio:"_1wUm6engBLe0T9ZdhKcK_c",radioWrapper:"v5ipbsb_HvTj8l-aUcg75",middleStyle:"_3ruV0WGGqizDKwONs0sDru"}},,,,function(e,t,a){e.exports={background:"_1OASQA4PfdJS_KhH_yCm-S",percent:"_1t1MfmrTC862QBXYV5D0xT",tooltip:"_1OIWC_rqd8Odp6dvqoZtet"}},,,,,,,,,,,,,,,,function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(18),r(16);var l=n(r(61)),u=n(r(0)),o=r(239),i=n(r(241)),c=r(186),s=r(52),f=n(r(3760)),d=function(e){return u.default.createElement("span",{className:f.default.option,key:e.value},e.isFedManaged?u.default.createElement("img",{className:f.default.indicator,src:"/assets/cluster.svg"}):u.default.createElement(c.Icon,{name:"project"}),e.label)},p=(0,o.observer)((function(e){var a=e.namespace,r=e.list,n=e.onChange,o=e.onFetch,p=(0,i.default)(r,["page","total","limit"]),m=(0,l.default)(r.data.map((function(e){return{label:(0,s.showNameAndAlias)(e),value:e.name,isFedManaged:e.isFedManaged}})));return u.default.createElement(c.Select,{className:f.default.select,value:a,onChange:n,options:m,placeholder:t("ALL_PROJECTS"),pagination:p,isLoading:r.isLoading,valueRenderer:d,optionRenderer:d,onFetch:function(e){o(e)},searchable:!0,clearable:!0})}));a.default=p},function(e,t,a){e.exports={select:"_2YBMsPA_6y4KarYxsOs4xv",option:"zNLKUmmAgrOglv5eJIpKA"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(18),r(28),r(442),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(88)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=r(186),p=n(r(3)),m=n(r(801)),h=n(r(450)),v=n(r(26)),g=n(r(60)),y=n(r(63)),E=n(r(1)),b=n(r(0)),_=r(52),O=r(794),S=n(r(3799)),C=n(r(949));function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=e||{},r=a.times,n=a.step,l=a.createTime,u={times:r,step:n};if(l){var o=new Date(l).valueOf()/1e3,i=Date.now()/1e3,c=i-o;switch(!0){case c<=1800:u.times=30,u.step="1m";break;case c<=3600:u.times=60,u.step="1m";break;case c<=18e3:u.times=60,u.step="5m"}}t.params=u},t.fetchData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.state.cluster,r=k(k({},t.params),e);a&&(r.cluster=a),t.props.onFetch(r)},t.handleChange=function(e){t.params=e;var a=!e.start&&!e.end&&t.props.enableAutoRefresh;t.setState({enableAutoRefresh:a,autoRefresh:!1},(function(){(0,O.stopAutoRefresh)((0,i.default)(t)),t.fetchData()}))},t.handleClusterChange=function(e){t.setState({cluster:e},(function(){t.fetchData()}))},t.handleRefresh=function(){t.fetchData()},t.handleAutoRefresh=function(){t.setState({autoRefresh:!t.state.autoRefresh},(function(){t.state.autoRefresh?(0,O.startAutoRefresh)((0,i.default)(t)):(0,O.stopAutoRefresh)((0,i.default)(t))}))},t.handleToggle=function(e){t.setState({active:e})},t.state={active:!1,enableAutoRefresh:e.enableAutoRefresh,autoRefresh:!1,cluster:(0,v.default)(e,"clusters[0].name","")},t.init(),t}return(0,o.default)(r,[{key:"componentDidUpdate",value:function(e){e.step===this.props.step&&e.times===this.props.times&&e.createTime===this.props.createTime||(this.initParams(this.props),this.fetchData())}},{key:"componentWillUnmount",value:function(){(0,O.stopAutoRefresh)(this)}},{key:"init",value:function(){this.initParams(this.props),this.fetchData()}},{key:"renderAutoRefresh",value:function(){var e=this.state,t=e.enableAutoRefresh,a=e.autoRefresh;return t?b.default.createElement(d.Button,{className:S.default.button,type:"control",icon:a?"pause":"start",iconType:"light",onClick:this.handleAutoRefresh}):null}},{key:"renderCustomActions",value:function(){return this.props.customAction||null}},{key:"renderOperations",value:function(){var e=this.state.active,t=this.params,a=t.step,r=t.times,n=this.props.closeBtn;return b.default.createElement("div",{className:(0,p.default)(S.default.operations,(0,l.default)({},S.default.active,e))},this.props.isFederated&&b.default.createElement(d.Select,{key:this.state.cluster,prefixIcon:b.default.createElement(d.Icon,{name:"cluster"}),className:S.default.clusters,value:this.state.cluster,options:this.clusters,onChange:this.handleClusterChange,showTip:!0}),b.default.createElement(C.default,{step:a,times:r,onChange:this.handleChange,onToggle:this.handleToggle}),this.renderAutoRefresh(),b.default.createElement(d.Button,{className:S.default.button,type:"control",icon:"refresh",iconType:"light",onClick:this.handleRefresh}),this.renderCustomActions(),n)}},{key:"renderTitle",value:function(){var e=this.props.title||t("MONITORING");return b.default.createElement("div",{className:S.default.title},b.default.createElement("span",null,e),this.renderOperations())}},{key:"renderContent",value:function(){var e=this.props.children;return(0,y.default)(e)||(0,g.default)(e)&&(0,y.default)((0,h.default)(e).filter((function(e){return e})))?null:e}},{key:"render",value:function(){var e=this.props.loading,a=this.state.active;return b.default.createElement(d.Loading,{spinning:e},b.default.createElement(m.default,{className:(0,p.default)(S.default.card,(0,l.default)({},S.default.showDropDown,a)),title:this.renderTitle(),empty:t("NO_MONITORING_DATA"),isEmpty:this.props.isEmpty},b.default.createElement("div",{className:S.default.content},this.renderContent())))}},{key:"clusters",get:function(){return this.props.clusters.map((function(e){return{label:(0,_.showNameAndAlias)(e.name||e,"cluster"),value:e.name||e}}))}}]),r}(b.default.Component);a.default=T,T.propTypes={title:E.default.string,step:E.default.string,times:E.default.number,createTime:E.default.string,onFetch:E.default.func,loading:E.default.bool,refreshing:E.default.bool,isEmpty:E.default.bool,enableAutoRefresh:E.default.bool,customAction:E.default.oneOfType([E.default.node,E.default.element])},T.defaultProps={step:"10m",times:50,createTime:"",onFetch:function(){},loading:!1,refreshing:!1,isEmpty:!1,enableAutoRefresh:!0,customAction:""}},function(e,t,a){e.exports={card:"HkMSwByVKb_DH9GlZNpYS",title:"_1oinAKfdPYwC75teupWmDr",operations:"D3Ewo-uPBdaiIlaz7nbG1",button:"_2lV2YHNnzVWYZbgRLPezn6",content:"_39DKIQh7O8MogkRM7IB5wu",showDropDown:"_3wdK0lJ1xKmVaSH1oQH9iA",clusters:"_2NdSlr3w6Oy3jYXDPydnMT"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(16),r(4),r(436),r(319),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=n(r(26)),h=r(798),v=n(r(3801));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var y=function(e){(0,i.default)(r,e);var a=g(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0&&void 0!==arguments[0]?arguments[0]:{};r.props.onFetch(e)},r.handleTabClick=function(e){return(0,v.cacheFunc)("_tab_".concat(e),(function(){r.setState({activeIndex:Number(e)})}),(0,o.default)(r))},r.state={activeIndex:0},r.fetchData(),r}return(0,u.default)(a,[{key:"componentDidMount",value:function(){(0,g.startAutoRefresh)(this,{interval:1e4,leading:!1})}},{key:"componentWillUnmount",value:function(){(0,g.stopAutoRefresh)(this)}},{key:"renderTabList",value:function(){var e=this,t=this.props.tabOptions,a=this.state.activeIndex;return(0,m.default)(t)?null:f.default.createElement("div",{className:_.default.tabList},t.map((function(t,r){var l=r===a,u=t.component,o=t.render,i=S(S({},t.props),{},{active:l});return f.default.createElement("div",{key:r,className:(0,p.default)(_.default.tab,(0,n.default)({},_.default.active,l)),onClick:e.handleTabClick(r)},f.default.createElement("i",{className:_.default.img}),f.default.createElement("div",{className:_.default.inner},(0,h.default)(o)?o(i):f.default.createElement(u,i)))})))}},{key:"renderTabContent",value:function(){var e=this.props.contentOptions,t=e[this.state.activeIndex]||{},a=t.component,r=t.render,n=S({},t.props);return f.default.createElement("div",{className:_.default.tabContent},f.default.createElement("div",{className:_.default.inner},(0,m.default)(e)?f.default.createElement(b.default,null):(0,h.default)(r)?r(n):f.default.createElement(a,n)))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.title,r=e.loading;return f.default.createElement(E.default,{className:(0,p.default)(_.default.card,t),title:a},f.default.createElement(y.Loading,{spinning:r},f.default.createElement("div",{className:_.default.content},this.renderTabList(),this.renderTabContent())))}}]),a}(f.default.Component);t.default=D,D.propTypes={title:d.default.string,tabOptions:d.default.array,contentOptions:d.default.array,loading:d.default.bool,refreshing:d.default.bool,onFetch:d.default.func},D.defaultProps={title:"",tabOptions:[],contentOptions:[],loading:!0,refreshing:!1,onFetch:function(){}}},function(e,t,a){e.exports={content:"_2Xa5otudrXKkSBP4ZXj_25",tabList:"aUXLJpvLU0FB8AeOm_82I",tab:"_3ZiPd90tJiVMCa-tFKc6nM",active:"_1tGP7Q2XasoaNQb4W3sxtn",img:"_1C8h77HY1Vvimz27VInPzs",inner:"DjQwqZQmUhjM9VR9YmkZ",tabContent:"_2yiUNLbPZ7wkxc_wDsSjcI"}},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(18),r(9),r(13),r(10),r(4),r(316),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(18),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(23),r(57),r(17),r(7);var l,u=n(r(315)),o=n(r(30)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=r(239),h=n(r(26)),v=r(794),g=n(r(890)),y=r(52),E=r(798),b=r(822),_=n(r(3805));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};t.monitorStore.fetchMetrics(S({metrics:Object.values((0,y.hideGPUByLicense)(D,t.props.cluster)),step:"5m",times:100},e))},t.getValue=function(e){return(0,h.default)(e,"value[1]",0)},t.getTabOptions=function(){var e=(0,v.getLastMonitoringData)(t.metrics),a=[{name:"CPU",unitType:"cpu",used:t.getValue(e[D.cpu_usage]),total:t.getValue(e[D.cpu_total])},{name:"MEMORY",unitType:"memory",used:t.getValue(e[D.memory_usage]),total:t.getValue(e[D.memory_total])},{name:"GPU",used:t.getValue(e[D.gpu_usage]),total:t.getValue(e[D.gpu_total])},{name:"GPU_MEMORY",unitType:"memory",used:t.getValue(e[D.gpu_memory_usage]),total:t.getValue(e[D.gpu_memory_total])},{name:"DISK",unitType:"disk",used:t.getValue(e[D.disk_size_usage]),total:t.getValue(e[D.disk_size_capacity])},{name:"PODS",unit:"",used:t.getValue(e[D.pod_count]),total:t.getValue(e[D.pod_capacity])}];return(0,y.hideGPUByLicense)(a,t.props.cluster).map((function(e){return{props:e,component:_.default}}))},t.getContentOptions=function(){var e=[{type:"utilisation",title:"CPU_USAGE",unit:"%",legend:["USAGE"],data:(0,h.default)(t.metrics,"".concat(D.cpu_utilisation,".data.result"))},{type:"utilisation",title:"MEMORY_USAGE",unit:"%",legend:["USAGE"],data:(0,h.default)(t.metrics,"".concat(D.memory_utilisation,".data.result"))},{type:"utilisation",title:"GPU_USAGE",unit:"%",legend:["USAGE"],data:(0,h.default)(t.metrics,"".concat(D.gpu_utilization,".data.result"))},{title:"GPU_MEMORY_USAGE",type:"utilisation",unit:"%",legend:["USAGE"],data:(0,h.default)(t.metrics,"".concat(D.gpu_memory_utilization,".data.result"))},{type:"utilisation",title:"DISK_USAGE",unit:"%",legend:["USAGE"],data:(0,h.default)(t.metrics,"".concat(D.disk_utilisation,".data.result"))},{title:"POD_COUNT",unit:"",legend:["COUNT"],data:(0,h.default)(t.metrics,"".concat(D.pod_count,".data.result"))}];return(0,y.hideGPUByLicense)(e,t.props.cluster).map((function(e){return{props:e,render:t.renderChart}}))},t.monitorStore=new g.default({cluster:e.cluster}),t}return(0,c.default)(r,[{key:"renderChart",value:function(e){var t={key:e.title,width:"100%",height:"100%"};switch(e.type){default:case"area":var a=(0,v.getAreaChartOps)(e);return p.default.createElement(E.SimpleArea,(0,u.default)({},t,a))}}},{key:"render",value:function(){var e=this.monitorStore,a=e.isLoading,r=e.isRefreshing;return p.default.createElement(b.StatusTabs,{title:t("CLUSTER_RESOURCE_USAGE"),tabOptions:this.getTabOptions(),contentOptions:this.getContentOptions(),loading:a,refreshing:r,onFetch:this.fetchData})}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"metrics",get:function(){return this.monitorStore.data}}]),r}(p.default.Component))||l)||l;a.default=k},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(30));r(5),r(16),r(436);var u=n(r(0)),o=n(r(3)),i=r(794),c=r(798),s=n(r(3806)),f=function(e){var a=e.active,r=e.name,n=e.used,f=e.total,d=e.unit,p=e.unitType,m=t(r),h=(0,i.getSuitableUnit)(f||n,p)||d,v=(0,i.getValueByUnit)(n,h),g=(0,i.getValueByUnit)(f,h),y="core"===h?"CORE_PL":h;return u.default.createElement("div",{className:(0,o.default)(s.default.tab,(0,l.default)({},s.default.active,a))},u.default.createElement(c.SimpleCircle,{width:40,height:40,title:m,value:parseFloat(v),total:parseFloat(g),unit:h,showCenter:!1,showRate:!0,active:a}),u.default.createElement("div",{className:s.default.info},u.default.createElement("div",{className:s.default.title},m," ",t(y)),u.default.createElement("p",{title:"".concat(v,"/").concat(g)},v,u.default.createElement("span",null,"/",g))))};a.default=f},function(e,t,a){e.exports={tab:"_31-JVKem4VcI-TtgNWqY6Z",active:"_2tHL5e_1AJNteMDLEE_YbE",info:"hs8j62Zb-8wabHzFg3UiM",title:"_3WVO0kjKDahAj7KuGMbO57"}},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(31),r(6),r(18),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(31),r(6),r(18),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(17),r(7);var l=n(r(315)),u=n(r(43)),o=n(r(30));r(41);var i,c=n(r(44)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(0)),v=r(239),g=n(r(63)),y=n(r(26)),E=r(72),b=r(794),_=n(r(988)),O=r(798),S=r(822),C=n(r(3808));function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t0&&void 0!==r[0]?r[0]:{},a=k({step:"5m",times:100},t),e.next=4,n.apiStore.fetchMetrics(k({metrics:[T.request_latencies_total,T.request_latencies_apis,T.request_rate]},a));case 4:return e.next=6,n.schedulerStore.fetchMetrics(k({metrics:[T.schedule_attempts_count,T.schedule_attempt_rate]},a));case 6:case"end":return e.stop()}}),e)}))),n.getSpecificData=function(e,t,a){return((0,y.default)(n.metrics,"".concat(T[e],".data.result"))||[]).find((function(e){return(0,y.default)(e,"metric.".concat(t))===a}))||{}},n.getVerbData=function(e){return n.getSpecificData("request_latencies_apis","verb",e)},n.getTabOptions=function(){return[{icon:E.ICON_TYPES.apiserver,name:"API_SERVER",title:"REQUEST_LATENCY_TCAP"},{icon:E.ICON_TYPES.apiserver,name:"API_SERVER",title:"REQUEST_RATE"},{icon:E.ICON_TYPES.scheduler,name:"SCHEDULER",title:"SCHEDULE_ATTEMPTS_TCAP"},{icon:E.ICON_TYPES.scheduler,name:"SCHEDULER",title:"SCHEDULING_RATE_TCAP"}].map((function(e){return{props:e,component:C.default}}))},n.getContentOptions=function(){var e=n.metrics;return[{type:"area",title:"REQUEST_LATENCY",unit:"ms",legend:["REST_GET","REST_POST","REST_PATCH","REST_DELETE","REST_PUT","TOTAL_AVERAGE"],data:[n.getVerbData("GET"),n.getVerbData("POST"),n.getVerbData("PATCH"),n.getVerbData("DELETE"),n.getVerbData("PUT"),(0,y.default)(e,"".concat(T.request_latencies_total,".data.result[0]"))]},{type:"area",title:"REQUEST_PER_SECOND",unit:t("TIMES_PER_SECOND"),legend:["REQUEST"],data:(0,y.default)(e,"".concat(T.request_rate,".data.result"))},{type:"area",title:"SCHEDULE_ATTEMPTS",unit:"",legend:["SUCCESS","ERROR","FAILURE"],data:[n.getSpecificData("schedule_attempts_count","result","scheduled"),n.getSpecificData("schedule_attempts_count","result","error"),n.getSpecificData("schedule_attempts_count","result","unschedulable")],areaColors:["blue","red","yellow"]},{type:"area",title:"SCHEDULING_RATE",unit:t("TIMES_PER_SECOND"),legend:["SUCCESS","ERROR","FAILURE"],data:[n.getSpecificData("schedule_attempt_rate","result","scheduled"),n.getSpecificData("schedule_attempt_rate","result","error"),n.getSpecificData("schedule_attempt_rate","result","unschedulable")],areaColors:["blue","red","yellow"]}].map((function(e){return{props:e,render:n.renderChart}}))},n.apiStore=new _.default({module:"apiserver",cluster:e.cluster}),n.schedulerStore=new _.default({module:"scheduler",cluster:e.cluster}),n}return(0,f.default)(r,[{key:"renderChart",value:function(e){var t={key:e.title,width:"100%",height:"100%"},a=(0,b.getAreaChartOps)(e);return(0,g.default)(a.data)?null:(e.type,h.default.createElement(O.SimpleArea,(0,l.default)({},t,a)))}},{key:"render",value:function(){var e=this.schedulerStore,a=e.isLoading,r=e.isRefreshing;return h.default.createElement(S.StatusTabs,{title:t("SERVICE_COMPONENT_MONITORING"),tabOptions:this.getTabOptions(),contentOptions:this.getContentOptions(),loading:a,refreshing:r,onFetch:this.fetchData})}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"metrics",get:function(){var e=this.apiStore.data,t=this.schedulerStore.data;return k(k({},e),t)}}]),r}(h.default.Component))||i)||i;a.default=R},function(e,a,r){"use strict";r(15);var n=r(20);r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(315)),u=n(r(30));r(16);var o=n(r(0)),i=n(r(3)),c=r(186),s=n(r(3809)),f=function(e){var a=e.active,r=e.icon,n=e.name,f=e.title;return o.default.createElement("div",{className:(0,i.default)(s.default.tab,(0,u.default)({},s.default.active,a))},o.default.createElement(c.Icon,(0,l.default)({name:r,size:40},a?{color:{primary:"#fff",secondary:"#fff"}}:null)),o.default.createElement("div",{className:s.default.info},o.default.createElement("div",{className:s.default.title},t(n)),o.default.createElement("p",{dangerouslySetInnerHTML:{__html:t(f)}})))};a.default=f},function(e,t,a){e.exports={tab:"_34GN7J206xlTqjhJCfdruX",active:"_3qtjymCMRzmNFfc7Wy9IMr",info:"_2XEdgRJbCd_3cr8VVZfKQo",title:"_3PNsSTeAIrmYtf2UkG8H_4"}},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(31),r(6),r(18),r(9),r(13),r(10),r(4),r(316),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(31),r(6),r(18),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(23),r(57),r(17),r(7);var l,u=n(r(315)),o=n(r(30)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=r(239),h=n(r(63)),v=n(r(26)),g=r(72),y=r(794),E=n(r(988)),b=r(798),_=r(822),O=r(1132),S=n(r(3811));function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};n.monitorStore.fetchMetrics(D({metrics:Object.values(N),step:"5m",times:100},e))},n.getSpecificData=function(e,t,a){return((0,v.default)(n.metrics,"".concat(N[e],".data.result"))||[]).find((function(e){return(0,v.default)(e,"metric.".concat(t))===a}))||{}},n.getVerbData=function(e){return n.getSpecificData("request_latencies_apis","verb",e)},n.getTabOptions=function(){return[{icon:g.ICON_TYPES.etcd,name:"etcd",title:"ETCD_STATUS"},{icon:g.ICON_TYPES.etcd,name:"etcd",title:"ETCD_PROPOSAL"},{icon:g.ICON_TYPES.etcd,name:"etcd",title:"ETCD_DB_SIZE"},{icon:g.ICON_TYPES.etcd,name:"etcd",title:"ETCD_CLIENT_TRAFFIC"}].map((function(e){return{props:e,component:S.default}}))},n.getContentOptions=function(){var e=n.metrics;return[{props:{cluster:n.props.cluster},component:O.ETCDNodes},{props:{type:"area",title:"RAFT_PROPOSAL",unit:t("TIMES_PER_SECOND"),legend:["PROPOSAL_COMMITTED","PROPOSAL_APPLIED","PROPOSAL_FAILED","PROPOSAL_PENDING"],data:[(0,v.default)(e,"".concat(N.proposals_committed_rate,".data.result[0]")),(0,v.default)(e,"".concat(N.proposals_applied_rate,".data.result[0]")),(0,v.default)(e,"".concat(N.proposals_failed_rate,".data.result[0]")),(0,v.default)(e,"".concat(N.proposals_pending_count,".data.result[0]"))],areaColors:["blue","green","red","yellow"]},render:n.renderChart},{props:{type:"area",title:"DB_SIZE",unitType:"memory",legend:["DB_SIZE"],data:(0,v.default)(e,"".concat(N.db_size,".data.result"))},render:n.renderChart},{props:{type:"area",title:"CLIENT_TRAFFIC",unitType:"traffic",legend:["RECEIVED","SENT"],data:[(0,v.default)(e,"".concat(N.client_received_bytes,".data.result[0]")),(0,v.default)(e,"".concat(N.client_sent_bytes,".data.result[0]"))]},render:n.renderChart}]},n.monitorStore=new E.default({module:"etcd",cluster:e.cluster}),n}return(0,c.default)(r,[{key:"renderChart",value:function(e){var t={key:e.title,width:"100%",height:"100%"},a=(0,y.getAreaChartOps)(e);return(0,h.default)(a.data)?null:(e.type,p.default.createElement(b.SimpleArea,(0,u.default)({},t,a)))}},{key:"render",value:function(){var e=this.monitorStore,a=e.isLoading,r=e.isRefreshing;return p.default.createElement(_.StatusTabs,{title:t("ETCD_MONITORING"),tabOptions:this.getTabOptions(),contentOptions:this.getContentOptions(),loading:a,refreshing:r,onFetch:this.fetchData})}},{key:"routing",get:function(){return this.props.rootStore.routing}},{key:"metrics",get:function(){return this.monitorStore.data}}]),r}(p.default.Component))||l)||l;a.default=T},function(e,a,r){"use strict";r(15);var n=r(20);r(16),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(315)),u=n(r(30));r(16);var o=n(r(0)),i=n(r(3)),c=r(186),s=n(r(3812)),f=function(e){var a=e.active,r=e.icon,n=e.name,f=e.title;return o.default.createElement("div",{className:(0,i.default)(s.default.tab,(0,u.default)({},s.default.active,a))},o.default.createElement(c.Icon,(0,l.default)({name:r,size:40},a?{color:{primary:"#fff",secondary:"#fff"}}:null)),o.default.createElement("div",{className:s.default.info},o.default.createElement("div",{className:s.default.title},t(n)),o.default.createElement("p",{dangerouslySetInnerHTML:{__html:t(f)}})))};a.default=f},function(e,t,a){e.exports={tab:"_15NMG2yXO_Lun04XhV1Lae",active:"_3mR_zhBbwIvUT97S3UqHnU",info:"_3kMKZotOFJMQzgswYhBdW5",title:"_32I8HGLqDgqBJ2KQ_xitGY",nodes:"_3kzjrp7n3suOj46Y7ty3tY",item:"_3PsSoBgegEfVBTreynBugR",icon:"_3h-fE6NmNSMobCbCpYskqB",circle:"_2R8YGxK8I4oAmDRZu9Ay9r",offline:"_2svSg92VRM_kYrOaBMJMqF"}},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(31),r(6),r(18),r(9),r(13),r(10),r(4),r(316),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(31),r(6),r(18),r(28),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(23),r(57),r(17),r(7);var l,u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(239),m=n(r(3)),h=n(r(63)),v=n(r(26)),g=n(r(988)),y=r(186),E=n(r(846)),b=n(r(3814)),_=n(r(1808));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){for(var t=1;t1&&p.default.createElement(_.Tooltip,{content:this.renderPodIPContent(this.networkIPs)},p.default.createElement("div",{className:k.default.podip},this.networkIPs.length))),p.default.createElement("p",null,t("POD_IP_ADDRESS_SCAP"))),this.renderMonitorings(),p.default.createElement("div",{className:k.default.arrow},p.default.createElement(_.Icon,{name:"chevron-down",type:u?"light":"",size:20})))}},{key:"renderExtraContent",value:function(){var e=this,a=this.props,r=a.prefix,n=a.isEdgeWize,l=this.props.detail,u=l.cluster,o=l.containers,i=void 0===o?[]:o,c=l.initContainers,s=void 0===c?[]:c,f=l.name;return(0,g.default)(i)?null:p.default.createElement("div",{className:k.default.itemExtra},p.default.createElement("div",{className:"margin-b8"},p.default.createElement("strong",null,t("CONTAINER_PL"))),p.default.createElement("div",{className:k.default.containers},i.map((function(t){return p.default.createElement(C.default,{isEdgeWize:n,key:t.name,prefix:r&&e.getLink(),podName:f,detail:t,cluster:u,onContainerClick:e.handleLinkClick,isCreating:e.isCreating})})),s.map((function(t){return p.default.createElement(C.default,{key:t.name,isEdgeWize:n,prefix:r&&e.getLink(),podName:f,detail:t,cluster:u,onContainerClick:e.handleLinkClick,isCreating:e.isCreating,isInit:!0})}))))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.isExpand;return p.default.createElement("div",{className:(0,v.default)(k.default.item,t,(0,u.default)({},k.default.expanded,a))},p.default.createElement("div",{className:k.default.itemMain,onClick:this.handleExpandExtra},p.default.createElement("div",{className:k.default.icon},p.default.createElement(_.Icon,{name:"pod",size:40,type:a?"light":"dark"}),this.renderStatusTip()),this.renderContent()),this.renderExtraContent())}},{key:"status",get:function(){var e=this.props.detail.podStatus,t=e.status;return{type:e.type.toLowerCase(),name:t}}},{key:"isCreating",get:function(){return"warning"===this.status.type&&"ContainerCreating"===this.status.name}},{key:"isRunning",get:function(){return"running"===this.status.type||"completed"===this.status.type}},{key:"networkIPs",get:function(){return this.props.detail.networksStatus.reduce((function(e,t){return t.ips?[].concat((0,l.default)(e),(0,l.default)(t.ips)):(0,l.default)(e)}),[])}}]),r}(p.default.PureComponent);a.default=T,T.propTypes={isEdgeWize:h.default.bool,className:h.default.string,prefix:h.default.string,detail:h.default.object,metrics:h.default.object,loading:h.default.bool,isExpand:h.default.bool,onExpand:h.default.func,onShowEvents:h.default.func,showMonitoring:h.default.bool},T.defaultProps={prefix:"",detail:{},isEdgeWize:!1,isExpand:!1,onExpand:function(){},showMonitoring:!0}},function(e,a,r){"use strict";r(15);var n=r(20);r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(42),r(16),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=n(r(26)),d=n(r(787)),p=n(r(801)),m=n(r(846)),h=n(r(1373)),v=r(1),g=n(r(3884));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var E=function(e){(0,o.default)(r,e);var a=y(r);function r(){return(0,l.default)(this,r),a.apply(this,arguments)}return(0,u.default)(r,[{key:"renderContent",value:function(){var e=this.props.container,t=e.namespace,a=e.name,r=this.props,n=r.podName,l=r.isEdgeWize,u=this.context,o=u.gatewayName,i=u.gatewayNs,c=u.cluster||this.props.cluster;return(0,f.default)(this.props,"container.containerID")?s.default.createElement(h.default,{isEdgeWize:l,className:g.default.containerLog,contentClassName:g.default.containerLogContent,namespace:t,podName:n,cluster:c,containerName:a,gatewayName:o,gatewayNamespace:i}):s.default.createElement(p.default,null,s.default.createElement(m.default,{desc:"CONTAINER_LOGS_NOT_SUPPORTED"}))}},{key:"render",value:function(){var e=this.props,a=e.visible,r=e.onCancel;return s.default.createElement(d.default,{bodyClassName:g.default.body,title:t("CONTAINER_LOGS"),visible:a,onCancel:r,fullScreen:!0,hideFooter:!0},this.renderContent())}}]),r}(s.default.Component);a.default=E,E.contextTypes={isEdgeWize:v.PropTypes.bool,gatewayName:v.PropTypes.string,gatewayNs:v.PropTypes.string,cluster:v.PropTypes.string}},function(e,t,a){e.exports={body:"_2xIpWv0eUy2KqNf-tYtdAs",containerLog:"-vLGgh65xBp9j5muKQxTD",containerLogContent:"dnH0_IiFyYfpYfmg1hgpq"}},function(e,t,a){e.exports={content:"_39OJSr_1I0ySWE5IDXTgPS",table:"_2siFIGV4OlLNAn6cC6ip6o"}},function(e,t,a){e.exports={wrapper:"_3JO8ALufHH6Th6RsLTg6EB",box:"fJxyscdhUqQ5IqvqrNnv8",card:"_2VT5I0TDMsCwcJ_SuhMM6s",name:"_2QZjb0CkVrOEBHJUBPFnwI",value:"_1d4Yqo0p0_Y6uq8-vShyXl"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(16),r(4),r(23),r(57),r(17);var l,u,o,i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(3)),m=n(r(788)),h=n(r(801)),v=r(239),g=n(r(1)),y=n(r(0)),E=r(52),b=r(467),_=n(r(3888));function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var S=(0,v.observer)((o=u=function(e){(0,s.default)(r,e);var a=O(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u1&&void 0!==arguments[1]?arguments[1]:{},l=(0,v.createPatch)("yaml",a,r,"","",{context:-1}),o=(0,g.parse)(l);return(0,g.html)(o,b({drawFileList:!1},n))}},{key:"componentDidUpdate",value:function(e){(0,m.default)(e.datas,this.props.datas)||this.setState({diffHtml:this.getDiffHtml(this.props.datas,{outputFormat:this.state.mode})})}},{key:"render",value:function(){var e=this.props,t=e.title,a=e.description;return d.default.createElement("div",null,d.default.createElement("div",{className:y.default.header},d.default.createElement(h.Icon,{name:"terminal",size:20}),d.default.createElement("span",null,t),d.default.createElement(h.Icon,{name:"chevron-down",clickable:!0,size:20,onClick:this.handleModeChange("line-by-line")}),d.default.createElement(h.Icon,{name:"chevron-right",clickable:!0,size:20,onClick:this.handleModeChange("side-by-side")}),d.default.createElement("span",{className:"float-right"},a)),d.default.createElement("div",{dangerouslySetInnerHTML:{__html:this.state.diffHtml}}))}}]),a}(d.Component);t.default=O,O.propTypes={title:p.default.string,datas:p.default.arrayOf(p.default.string)},O.defaultProps={datas:["",""]}},,,function(e,t,a){},function(e,t,a){e.exports={header:"_21by05Ap1WqFl6ETG7MnQY"}},function(e,t,a){e.exports={header:"_1O9lrtOWxJdpIuBxJLt2lX",diffWrapper:"rJcIkfzIkKyVB8RM7xFBo"}},function(e,a,r){"use strict";r(15);var n=r(20);r(11),r(84),r(18),r(16),r(4),r(23),r(17),r(85),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(11),r(84),r(18),r(28),r(42),r(16),r(4),r(23),r(57),r(17),r(85);var l=n(r(30)),u=n(r(61)),o=n(r(36)),i=n(r(37)),c=n(r(88)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(1)),h=n(r(3)),v=n(r(63)),g=n(r(26)),y=n(r(928)),E=n(r(854)),b=r(52),_=r(72),O=r(794),S=r(186),C=n(r(240)),D=n(r(846)),k=n(r(1410));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var T=function(e){(0,s.default)(r,e);var a=N(r);function r(e){var n;return(0,o.default)(this,r),(n=a.call(this,e)).getItemName=function(e){return(0,g.default)(e,"metric.pod","-")},n.getCurrentValue=function(e){var t=n.props.config,a=t.type,r=t.unitType;return(0,O.getSuitableValue)((0,g.default)(e,"value[1]"),r||a)},n.handleScroll=function(e){var t=e.target,a=t.clientHeight,r=t.scrollHeight,l=a+t.scrollTop===r,u=n.props,o=u.data,i=u.page,c=u.total,s=u.onFetch;!n.scrolling&&c!==o.length&&l&&(n.scrolling=!0,s({more:!0,page:i+1}).then((function(){n.scrolling=!1})))},n.toggleChecked=function(e){n.setState({showChecked:e})},n.handleCheck=function(e){var a=n.getItemName(e);return(0,b.cacheFunc)("_resource_".concat(a),(function(){var e=n.props.maxChecked,r=(0,u.default)(n.props.checked);r.includes(a)?(0,y.default)(r,(function(e){return e===a})):r.length>=e?C.default.info({content:t("MONITORING_SELECT_LIMIT_MSG")}):r.push(a),n.props.onChange(r)}),(0,c.default)(n))},n.renderResourceItem=function(e){var a=n.props.checked,r=n.getItemName(e),l=n.getCurrentValue(e);return p.default.createElement("div",{key:r,className:k.default.item,onClick:n.handleCheck(e)},p.default.createElement(S.Checkbox,{className:k.default.itemCheck,checked:a.includes(r)}),p.default.createElement(S.Icon,{name:n.icon,size:16}),p.default.createElement("div",{className:k.default.itemInfo},p.default.createElement("strong",{title:r},r),p.default.createElement("p",null,t("CURRENT_VALUE",{value:l}))))},n.renderResourceList=function(e){return(0,v.default)(e)?p.default.createElement(D.default,null):e.map(n.renderResourceItem)},n.state={showChecked:!1},n.listRef=p.default.createRef(),n.throttleScroll=(0,E.default)(n.handleScroll,100),n}return(0,i.default)(r,[{key:"componentDidMount",value:function(){this.listNode=this.listRef.current,this.listNode&&this.listNode.addEventListener("scroll",this.throttleScroll)}},{key:"componentWillUnmount",value:function(){this.listNode&&this.listNode.removeEventListener("scroll",this.throttleScroll)}},{key:"render",value:function(){var e=this.props,a=e.loading,r=e.name,n=this.state.showChecked,u=n?this.checkedData:this.props.data;return p.default.createElement("div",{className:k.default.resources},p.default.createElement("div",{className:k.default.title},p.default.createElement("strong",null,t(r.toUpperCase())),p.default.createElement(S.Checkbox,{checked:n,onChange:this.toggleChecked},t("SHOW_SELECTED_ONLY"))),p.default.createElement("div",{className:k.default.content},p.default.createElement(S.Loading,{spinning:a},p.default.createElement("div",{className:k.default.list},p.default.createElement("div",{className:(0,h.default)((0,l.default)({},k.default.hide,!n))},this.renderResourceList(u)),p.default.createElement("div",{className:(0,h.default)((0,l.default)({},k.default.hide,n)),ref:this.listRef},this.renderResourceList(u))))))}},{key:"icon",get:function(){return _.ICON_TYPES[this.props.name.toLowerCase()]||"appcenter"}},{key:"checkedData",get:function(){var e=this,t=this.props,a=t.checked;return t.data.filter((function(t){return a.includes(e.getItemName(t))}))}}]),r}(p.default.Component);a.default=T,T.propTypes={loading:m.default.bool,config:m.default.object,name:m.default.string,maxChecked:m.default.number,page:m.default.number,total:m.default.number,checked:m.default.array,data:m.default.array,onFetch:m.default.func,onChange:m.default.func},T.defaultProps={loading:!1,config:{},name:"Resources",maxChecked:10,page:1,total:0,checked:[],data:[],onFetch:function(){},onChange:function(){}}},function(e,t,a){"use strict";var r=a(20);a(12),a(5),a(11),a(6),a(18),a(9),a(13),a(10),a(4),a(23),a(17),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(12),a(45),a(5),a(11),a(6),a(18),a(28),a(42),a(34),a(15),a(9),a(13),a(10),a(4),a(23),a(57),a(17),a(7);var n=r(a(315)),l=r(a(30)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=r(a(1)),p=r(a(26)),m=r(a(63)),h=a(794),v=a(186),g=r(a(846)),y=a(798),E=r(a(1410));function b(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function _(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return d.default.createElement("div",{className:E.default.tlsWrapper},d.default.createElement("div",{className:E.default.tlsItem},d.default.createElement("div",{className:"h6"},t("CREDENTIAL_SI")),d.default.createElement("pre",null,this.convert(e["tls.crt"],"tls.crt"))),d.default.createElement("div",{className:E.default.tlsItem},d.default.createElement("div",{className:"h6"},t("PRIVATE_KEY_TCAP")),d.default.createElement("pre",null,this.convert(e["tls.key"],"tls.key"))))}},{key:"renderImageRepositorySecret",value:function(e){var a=this,r=e[".dockerconfigjson"];return r&&r.auths?d.default.createElement("div",{className:E.default.imageWrapper},d.default.createElement("ul",null,Object.entries(r.auths).map((function(e){var n=(0,u.default)(e,1)[0];return d.default.createElement("li",{key:n},d.default.createElement("div",{className:"h6"},d.default.createElement(h.Icon,{name:"earth"}),n),d.default.createElement("ul",null,d.default.createElement("li",null,d.default.createElement("span",null,t(".dockerconfigjson"),":"),d.default.createElement("span",null,a.convert(JSON.stringify(r),".dockerconfigjson")))))})))):null}},{key:"renderDefault",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.default.createElement("div",{className:E.default.defaultWrapper},d.default.createElement("ul",null,Object.entries(t).map((function(t){var a=(0,u.default)(t,2),r=a[0],n=a[1];return d.default.createElement("li",{key:r},d.default.createElement("span",null,r,":"),d.default.createElement("span",null,d.default.createElement("pre",null,e.convert(n,r))))}))))}},{key:"renderBasicAuth",value:function(){var e=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.default.createElement("div",{className:E.default.defaultWrapper},d.default.createElement("ul",null,Object.entries(a).map((function(a){var r=(0,u.default)(a,2),n=r[0],l=r[1];return d.default.createElement("li",{key:n},d.default.createElement("span",null,t(n.toUpperCase()),":"),d.default.createElement("span",null,d.default.createElement("pre",null,e.convert(l,n))))}))))}},{key:"renderContent",value:function(e){if(!e.type)return null;var t=null;switch(e.type){case"kubernetes.io/tls":t=this.renderTLS(e.data);break;case"kubernetes.io/dockerconfigjson":t=this.renderImageRepositorySecret(e.data);break;case"kubernetes.io/basic-auth":t=this.renderBasicAuth(e.data);break;default:t=this.renderDefault(e.data)}return t}},{key:"renderOperations",value:function(){var e=this.state.showSecret;return d.default.createElement(h.Button,{type:"flat",icon:e?"eye":"eye-closed",onClick:this.changeSecretState})}},{key:"renderPlacement",value:function(){var e=this.props.match.params,t=e.name,a=e.namespace;return this.store.detail.isFedManaged?d.default.createElement(g.default,{module:this.store.module,name:t,namespace:a,isEdgeWize:(0,y.isEdgeWizePage)()}):null}},{key:"render",value:function(){var e=this.store.detail;return d.default.createElement("div",null,this.renderPlacement(),d.default.createElement(v.default,{title:t("DATA"),operations:this.renderOperations()},this.renderContent(e)))}},{key:"originData",get:function(){var e,t;return null!==(e=null===(t=this.store.detail._originData)||void 0===t?void 0:t.data)&&void 0!==e?e:{}}}]),r}(d.default.Component))||l)||l;a.default=_},function(e,t,a){e.exports={defaultWrapper:"_2peh6PErdPDCJ6M9zNnRHF",tlsWrapper:"_2tLwXnfNxiZk4X_bSM9kmR",tlsItem:"_2r-rapgWLiquMqgE3_cZwf",imageWrapper:"_2zQdawm6yFVe8N0JA-zICj"}},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(317),l=r(a(3934));t.default=function(e){return[{path:"".concat(e,"/detail"),title:"DATA",component:l.default,exact:!0},(0,n.getIndexRoute)({path:e,to:"".concat(e,"/detail"),exact:!0})]}},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(16),r(98),r(4),r(23),r(24),r(17),r(62),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(16),r(98),r(4),r(23),r(57),r(24),r(17),r(62);var l,u=n(r(96)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(239),m=n(r(801)),h=r(52),v=n(r(944)),g=n(r(3935));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=(0,p.inject)("detailStore")(l=(0,p.observer)(l=function(e){(0,c.default)(r,e);var a=y(r);function r(e){var t;return(0,o.default)(this,r),(t=a.call(this,e)).store=e.detailStore,t.module=e.module,t}return(0,i.default)(r,[{key:"renderContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.default.createElement("div",{className:g.default.wrapper},d.default.createElement("ul",null,Object.entries(e).map((function(e){var t=(0,u.default)(e,2),a=t[0],r=t[1];return d.default.createElement("li",{key:a},d.default.createElement("div",{className:"h6"},a),d.default.createElement("pre",{className:g.default.value},r))}))))}},{key:"renderPlacement",value:function(){var e=this.props.match.params,t=e.name,a=e.namespace;return this.store.detail.isFedManaged?d.default.createElement(v.default,{module:this.store.module,name:t,namespace:a,isEdgeWize:(0,h.isEdgeWizePage)()}):null}},{key:"render",value:function(){var e=this.store,a=e.detail,r=e.isLoading;return d.default.createElement("div",null,this.renderPlacement(),d.default.createElement(m.default,{title:t("DATA"),loading:r},this.renderContent(a.data)))}}]),r}(d.default.Component))||l)||l;a.default=E},function(e,t,a){e.exports={wrapper:"objLg3fuCuqy66XEKBptC",value:"SkXJa0qm0W5rZn0Q51xi5"}},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1214)).default);t.default=c},function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(317),l=r(a(3938));t.default=function(e){return[{path:"".concat(e,"/detail"),title:"DATA",component:l.default,exact:!0},(0,n.getIndexRoute)({path:e,to:"".concat(e,"/detail"),exact:!0})]}},function(e,t,a){"use strict";a(15);var r=a(20);a(18),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(18),a(42),a(16),a(4),a(23),a(57),a(17);var n,l=r(a(315)),u=r(a(36)),o=r(a(37)),i=r(a(55)),c=r(a(56)),s=r(a(51)),f=r(a(0)),d=a(239),p=r(a(26)),m=r(a(3939)),h=r(a(1836));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=(0,d.inject)("detailStore")(n=(0,d.observer)(n=function(e){(0,i.default)(a,e);var t=v(a);function a(e){var r;return(0,u.default)(this,a),(r=t.call(this,e)).store=e.detailStore,r.module=e.module,r}return(0,o.default)(a,[{key:"render",value:function(){var e=this,t=this.store.detail,a=(0,p.default)(t,"secrets"),r=(0,p.default)(t,"name");return f.default.createElement("div",null,f.default.createElement("div",{className:h.default.secretWrapper},a.map((function(t){var a=t.name;return f.default.createElement(m.default,(0,l.default)({secret:a,serviceAccountName:r,key:a},e.props))}))))}}]),a}(f.default.Component))||n)||n;t.default=g},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(18),r(98),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(136),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(18),r(28),r(42),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(136),r(7);var l,u,o=n(r(96)),i=n(r(30)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(49)),h=n(r(0)),v=r(239),g=r(14),y=r(186),E=n(r(240)),b=r(909),_=n(r(789)),O=n(r(841)),S=r(52),C=r(899),D=r(453),k=r(440),N=n(r(851)),T=n(r(1836));function R(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"namespacenetworkpolicies";return(0,n.default)(this,a),(e=t.call(this,r)).getListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion).concat(e.getPath(t),"/").concat(e.module).concat(t.dryRun?"?dryRun=All":"")},e.getWatchListUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat(e.apiVersion,"/watch").concat(e.getPath(t),"/").concat(e.module)},e.getResourceUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"/kapis/resources.kubesphere.io/v1alpha3".concat(e.getPath(t),"/").concat(e.module)},e}return(0,l.default)(a,[{key:"getPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.namespace,a="";return t&&(a+="/namespaces/".concat(t)),a}}]),a}(r(a(68)).default);t.default=s},function(e,a,r){"use strict";r(15);var n=r(20);Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=r(317),u=n(r(3955));a.default=function(e){return[{path:"".concat(e,"/egress"),title:t("EGRESS_RULES"),component:u.default,exact:!0},{path:"".concat(e,"/ingress"),title:t("INGRESS_RULES"),component:u.default,exact:!0},(0,l.getIndexRoute)({path:e,to:"".concat(e,"/egress"),exact:!0})]}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(73),r(18),r(87),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(73),r(18),r(28),r(87),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(62),r(7);var l,u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=r(186),p=n(r(789)),m=n(r(26)),h=n(r(63)),v=n(r(3956)),g=r(14),y=r(239),E=n(r(0)),b=r(52),_=n(r(3960));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var C=(0,y.inject)("detailStore")(l=(0,y.observer)(l=function(e){(0,c.default)(r,e);var a=S(r);function r(e){var t;return(0,o.default)(this,r),(t=a.call(this,e)).renderLabels=function(e){return e?(0,v.default)((0,m.default)(e,"matchLabels",[])).map((function(e){return E.default.createElement("div",null,E.default.createElement("label",{className:_.default.label},E.default.createElement("span",null,e[0]),e[1]))})):""},t.renderDetailLabels=function(e,t){var a=(0,m.default)(e,t);return(0,v.default)((0,m.default)(a,"matchLabels",[])).map((function(e){return E.default.createElement("label",{className:_.default.label},E.default.createElement("span",null,e[0]),e[1])})).reduce((function(e,t){return null===e?t:E.default.createElement(E.default.Fragment,null,e," and ",t)}),null)},t.renderIpBlock=function(e){return e?E.default.createElement("label",null,(0,v.default)(e).map((function(e){return"cidr"===e[0]?"".concat(e[1]):e.join(": ")})).reduce((function(e,t){return null===e?t:E.default.createElement(E.default.Fragment,null,e," ",t)}),null)):""},t.renderPolicyDetail=function(e){var a=(0,m.default)(e,"namespace",""),r=(0,m.default)(e,"ipBlock"),n=(0,m.default)(r,"except"),l=e.direction,u=t.renderIpBlock(r),o=t.renderDetailLabels(e,"specPodSelector"),i=t.renderDetailLabels(e,"namespaceSelector"),c=t.renderDetailLabels(e,"podSelector"),s=(0,m.default)(e,"ports",[]).map((function(e){return"".concat(e.protocol,": ").concat(e.port)})).reduce((function(e,t){return null===e?t:E.default.createElement(E.default.Fragment,null,e," and ",t)}),null);return E.default.createElement("div",null,E.default.createElement("span",null,"This rule allows pods in the namespace '",a,"' "),!(0,h.default)(o)&&E.default.createElement("span",null," with the label ",o," "),E.default.createElement("span",null,"egress"===l?"to connect to ":"to receive traffic from "),(0,h.default)(r)?(0,h.default)(c)&&(0,h.default)(i)?"all pods in the same namespace ":E.default.createElement("label",null,!(0,h.default)(c)&&E.default.createElement("span",null,(0,h.default)(i)?"pods in the same namespace ":"pods "," ","with labels ",c," "),!(0,h.default)(i)&&E.default.createElement("span",null,(0,h.default)(c)?"all pods in the namespace ":"in namespaces ","with the labels ",i," ")):E.default.createElement("label",null,n&&"all IPs in "," subnet '",u,"'"," "),(0,h.default)(s)?"on all ports":E.default.createElement("span",null,"on port",s.length>1?"s":""," ",s))},t.store=e.detailStore,t}return(0,i.default)(r,[{key:"render",value:function(){var e=this,a=this.tableData;return E.default.createElement(p.default,{title:"egress"===this.direction?t("EGRESS_RULES"):t("INGRESS_RULES")},E.default.createElement(d.Table,{dataSource:a,className:_.default.table,columns:this.columns,expandedRowRender:function(t){return E.default.createElement("div",{className:_.default.detail},e.renderPolicyDetail(t))}}))}},{key:"direction",get:function(){var e=this.props.match.path.match(/:name\/([a-z]*)/);return e?e[1]:"egress"}},{key:"columns",get:function(){var e=this;return[{title:t("TARGET"),children:[{title:t("PROJECT"),dataIndex:"namespace",render:function(e){return(0,b.showNameAndAlias)(e,"project")}},{title:t("LABEL"),dataIndex:"specPodSelector",render:function(t){return e.renderLabels(t)}}]},{title:t("DESTINATION"),children:[{title:t("PROJECT"),dataIndex:"namespaceSelector",render:function(t,a){if((0,h.default)((0,m.default)(a,"ipBlock")))return(0,m.default)(t,"matchLabels")?e.renderLabels(t):(0,m.default)(a,"namespace")}},{title:t("LABEL"),dataIndex:"podSelector",render:function(t,a){if((0,h.default)((0,m.default)(a,"ipBlock")))return(0,m.default)(t,"matchLabels")?e.renderLabels(t):"Any"}},{title:"CIDR",dataIndex:"ipBlock",className:_.default.cidr,render:function(t){return e.renderIpBlock(t)}},{title:t("PORT"),dataIndex:"ports",render:function(e){return(0,h.default)(e)?"Any":e.map((function(e){return E.default.createElement("div",null,e.protocol,": ",e.port,e.endPort?"-".concat(e.endPort):"")}))}}]}]}},{key:"tableData",get:function(){var e=this,t=this.store.detail,a=(0,g.toJS)((0,m.default)(t,"_originData")),r=(0,m.default)(a,"metadata.namespace"),n=(0,m.default)(a,"spec.podSelector"),l=(0,m.default)(a,"spec.".concat(this.direction),[]),o="ingress"===this.direction?"from":"to",i=[];return l.forEach((function(t){var a=(0,m.default)(t,"ports",[]);(0,m.default)(t,"".concat(o),[]).forEach((function(t){i.push(function(e){for(var t=1;t0?"builtin":""}},{key:"rules",get:function(){return(0,d.toJS)((0,m.default)(this.store,"detail._originDataWithStatus.spec.rules",[]))}}]),a}(f.default.Component))||n)||n;t.default=E},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(18),r(48),r(9),r(13),r(10),r(4),r(23),r(24),r(17),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(18),r(28),r(48),r(42),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(24),r(17),r(188),r(7);var l,u=n(r(30)),o=n(r(315)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=n(r(789)),h=r(239),v=r(186),g=r(14),y=n(r(135)),E=n(r(26)),b=n(r(249)),_=r(72),O=n(r(3)),S=n(r(3973)),C=n(r(1847));function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.cluster,a=e.namespace,r=this.props.match.params,n=r.cluster,l=r.namespace,u=r.workspace;return t=t||n,a=a||l,"".concat(u?"/".concat(u):"","/clusters/").concat(t).concat(a?"/projects/".concat(a):"")}},{key:"render",value:function(){var e=this.store.list,a=e.data,r=e.isLoading,n=e.filters;return p.default.createElement(C.default,{title:t("ALERTING_MESSAGE_PL"),loading:r},(0,g.default)(a)?p.default.createElement("div",null,t("NO_DATA_DESC")):p.default.createElement(p.default.Fragment,null,p.default.createElement(N.default,{className:R.default.table,filters:n,data:a,name:"Alerting Message",rowKey:"value",columns:this.getColumns(),selectedRowKeys:[],selectActions:[],hideHeader:!0,hideFooter:!0}),this.renderFooter()))}},{key:"type",get:function(){return this.props.match.url.indexOf("alert-rules/builtin")>0?"builtin":""}},{key:"pagination",get:function(){var e=this.state;return{page:e.page,limit:e.limit,total:this.store.list.total}}}]),r}(p.default.Component))||l;a.default=P},function(e,t,a){e.exports={table:"_1S6EGnQYhf4I_C9HYIeYHi",footer:"Kq4qO0-0y6WDXdgomQGx9",pageSizeBox:"_3L3d-EWgQL2dC6pjhEaaAw",pagesize:"_3bL0tigLuMghvx1kjbA11b",text:"_3EpDCZ8M24qb56fEsOL6zB",gap:"_23CFCJ6p6IBdfCDRazyfIm",pageSizeMenu:"QH34yZzzVVJKzl6Uy9lIr",pageSizeMenuitem:"_3TGMFzQBOsivXbopcaPhW"}},function(e,t,a){e.exports={icon:"_3uoefixeZIAoGPZ37DEVLm"}},,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(317),l=r(a(813)),u=r(a(821)),o=r(a(3986));t.default=function(e){return[{path:"".concat(e,"/resource-status"),title:"RESOURCE_STATUS",exact:!0,component:o.default},{path:"".concat(e,"/metadata"),title:"METADATA",component:u.default,exact:!0},{path:"".concat(e,"/events"),title:"EVENT_PL",exact:!0,component:l.default},(0,n.getIndexRoute)({path:e,to:"".concat(e,"/resource-status"),exact:!0})]}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(73),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(73),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l,u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(239),m=r(186),h=n(r(789)),v=n(r(831)),g=r(52),y=r(14),E=n(r(63)),b=n(r(3987)),_=n(r(3989));function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var C=d.default.createElement("div",null,d.default.createElement("div",null,t("RWO_DESC")),d.default.createElement("div",null,t("ROX_DESC")),d.default.createElement("div",null,t("RWX_DESC"))),D=(0,p.inject)("detailStore")(l=(0,p.observer)(l=function(e){(0,c.default)(r,e);var a=S(r);function r(){var e;(0,o.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u0&&f.createElement(f.Fragment,null,f.createElement("div",{className:d.default.title},f.createElement("div",null,t("SECRET_INFO"))),r.map((function(e){return f.createElement("div",{key:e.name,className:d.default.objectContainer},f.createElement("div",{className:d.default.v},t(e.label)),f.createElement("div",null,f.createElement("span",{className:d.default.k},t("NAME"),":"),f.createElement("span",{className:d.default.v},e.name)),f.createElement("div",null,f.createElement("span",{className:d.default.k},t("PROJECT"),":"),f.createElement("span",{className:d.default.v},e.namespace)))}))));default:return null}}())})));a.default=v},function(e,t,a){e.exports={wrapper:"_2qRBJsVUbx2DCXhx-PjMOI",title:"DelqatdDDYD0WB80zjyye",attrs:"_3fLkwri_NoztGHHZnQ0Tvk",attr:"_2k08ybc8MfthAHUcjHCwur",k:"_19wHxkkHh7sTteCNmaVgfP",attrTitle:"_2LJajeyjpTUCghMOKSX0lj",attrValue:"Q12wxwvQ_-E9SSJ5IPDHw",objectContainer:"_1wRaHGoiEWQ4U0Y5L81-oi",kvContainer:"_39n5tBsQPDfpckCQt5CuKH",v:"_38RkRqcmTNqMQFeXrZeCLM"}},function(e,t,a){e.exports={ItemBox:"_2mELQmeBTiwa56m4FRuCho",leftBox:"W7Qki2xI0vvqvcb2Q1F2M",rightBox:"_3RqsKWBD7eq3vXQvgCfOsD",title:"_3KYfcJ0CU8B4xFsFQda5Te",toolTip:"_37f2XY7RCBfmVNY1BOdNx8",des:"_2L3vvzzxhB-Zrg5WrqyiuM",titleBox:"_2gmisrquKxEER676oJ7GxM",IconLine:"_1IDNa6yWd9AhFr_21sUGZO",cardBox:"NqsBGhYtt3JFydHzSmjZq",text:"_17aFPuXEkGgpOO2vxoLjb-"}},,,,,function(e,t,a){e.exports={wrapper:"_1RTOu4WuOVY0Fca7CPEdB9",tabHeader:"Qd42i__2a3FJ2DzYpVXqd",tabHeaderItem:"_2ICL_nLZjLbTcDxms5nROn",active:"_2NpglgYkusPNf1fA7U4yCm",tabContent:"UsMeMpWi8k2TLXu-TzcHv",chartWrapper:"_1WcDqnOpkmr5xePLz3bOpj"}},,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(55)),u=r(a(56)),o=r(a(51));function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,o.default)(e);if(t){var n=(0,o.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,u.default)(this,a)}}var c=function(e){(0,l.default)(a,e);var t=i(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return a}(r(a(1420)).default);t.default=c},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(28),r(42),r(16),r(4),r(23),r(57),r(17);var l,u,o,i=n(r(315)),c=n(r(30)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(0)),v=r(239),g=n(r(1)),y=n(r(3)),E=n(r(194)),b=r(186),_=r(794),O=n(r(4019)),S=n(r(4020));function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var D=(0,v.inject)("rootStore")(l=(0,v.observer)((o=u=function(e){(0,d.default)(r,e);var a=C(r);function r(){var e;(0,s.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l99?h.default.createElement("div",{className:S.default.skip},"..."):a;return a>0?h.default.createElement("div",{className:S.default.warn},h.default.createElement(b.Tooltip,{className:S.default.tips,content:t("RESOURCE_WARNING_TIPS",{warnNum:a,tipName:t("".concat(r,"_PL"))})},h.default.createElement("div",{onClick:this.handleWarnClick},n))):null}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.icon,n=e.iconSize,l=e.name,u=e.routeName,o=e.num,s=e.metrics,f=e.onClick,d=e.cluster,p=(0,_.getAreaChartOps)({title:"",unit:"",legend:["COUNT"],data:s});return h.default.createElement("div",{"data-name":l,className:(0,y.default)(S.default.card,a)},h.default.createElement("div",{className:S.default.icon},h.default.createElement(b.Icon,{name:r,size:n}),this.renderWarn()),h.default.createElement("div",{className:(0,y.default)(S.default.info,(0,c.default)({},S.default.cursor,u||f)),onClick:this.handleClick},h.default.createElement("strong",null,o),h.default.createElement("span",null,"1"===o?t(l):t("".concat(l,"_PL")))),globals.app.hasClusterModule(d,"whizard-monitoring")&&h.default.createElement(O.default,(0,i.default)({width:330,height:44,bgColor:"transparent"},p)))}},{key:"routing",get:function(){return this.props.rootStore.routing}}]),r}(h.default.Component),u.propTypes={isEdgeWize:g.default.bool,className:g.default.string,icon:g.default.string,iconSize:g.default.number,name:g.default.string,namespace:g.default.string,routeName:g.default.string,num:g.default.oneOfType([g.default.number,g.default.string]),warnNum:g.default.number,onClick:g.default.func},u.defaultProps={isEdgeWize:!1,icon:"appcenter",iconSize:40,name:"deployment",namespace:"default",routeName:"",num:0,warnNum:0},l=o))||l)||l;a.default=D},function(e,t,a){"use strict";a(15);var r=a(20);a(827),a(11),a(18),a(10),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(827),a(11),a(18),a(42),a(10),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=a(72),d=r(a(900)),p=r(a(869)),m=r(a(870)),h=r(a(947)),v=r(a(929)),g=r(a(871)),y=r(a(862));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var b=function(e){(0,u.default)(a,e);var t=E(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"getVeticalPoints",value:function(){var e=this.props.width,t=(e-10)/10;return Array(10).fill("").map((function(e,a){return 5+t*a}))}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors,r={stroke:"#55bc8a",strokeWidth:1,fill:"#fff",fillOpacity:1};return this.series.map((function(e,n){var l=f.COLORS_MAP[a[n]];return c.default.createElement(d.default,{key:e,dataKey:e,stroke:l,fillOpacity:"0.1",fill:l,unit:t,dot:r})}))}},{key:"render",value:function(){var e=this.props,t=e.width,a=e.height,r=e.xKey,n=e.data;return c.default.createElement(g.default,{width:t,height:a,debounce:1},c.default.createElement(h.default,{data:n},c.default.createElement(m.default,{dataKey:r,hide:!0}),c.default.createElement(p.default,{wrapperStyle:{zIndex:1e3},content:c.default.createElement(y.default,null)}),c.default.createElement(v.default,{strokeDasharray:"3 6",horizontal:!1,verticalPoints:this.getVeticalPoints()}),this.renderArea()))}},{key:"series",get:function(){var e=this.props,t=e.xKey,a=e.data;return Object.keys(a[0]||{}).filter((function(e){return e!==t}))}}]),a}(c.default.Component);t.default=b,b.propTypes={width:s.default.oneOfType([s.default.string,s.default.number]),height:s.default.oneOfType([s.default.string,s.default.number]),xKey:s.default.string,unit:s.default.string,data:s.default.array,bgColor:s.default.string,areaColors:s.default.array},b.defaultProps={width:180,height:56,xKey:"time",unit:"",bgColor:f.COLORS_MAP.lightest,areaColors:["green","blue","yellow","red"],data:[]}},function(e,t,a){e.exports={card:"_2EqCYVjXVpgt08cuRczGSh",icon:"_36HfcePtCXEzvj8yzTS4vF",warn:"_1ntTH3ZrzLLbchIomuwlhQ",tips:"-w63JOV5KksV8TOcQl-U3",skip:"_2kxI8l5XqQlDPtMvynz3RZ",info:"_1u4G7Fwu2z6_yIx2xKMV71",cursor:"_1gP2nTFiH8FENSNxmyr2hr"}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(827),a(11),a(18),a(10),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(827),a(11),a(18),a(42),a(10),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=a(72),d=r(a(900)),p=r(a(869)),m=r(a(912)),h=r(a(870)),v=r(a(947)),g=r(a(929)),y=r(a(871)),E=r(a(862));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var _=function(e){(0,u.default)(a,e);var t=b(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"render",value:function(){var e=this.props,t=e.x,a=e.y,r=e.payload;return c.default.createElement("g",{transform:"translate(".concat(t,",").concat(a,")")},c.default.createElement("text",{x:0,y:0,dy:12,fill:"#79879c",textAnchor:"middle"},r.value))}}]),a}(c.default.PureComponent),O=function(e){(0,u.default)(a,e);var t=b(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"getHorizontalPoints",value:function(){var e=this.props.height,t=(e-30-6)/4;return Array(4).fill("").map((function(e,a){return 30+t*a}))}},{key:"renderArea",value:function(){var e=this.props,t=e.unit,a=e.areaColors;return this.series.map((function(e,r){var n=f.COLORS_MAP[a[r]];return c.default.createElement(d.default,{key:e,dataKey:e,stroke:n,fillOpacity:"1",fill:"url(#colorPv)",unit:t})}))}},{key:"render",value:function(){var e=this.props,t=e.width,a=e.height,r=e.xKey,n=e.data;return c.default.createElement(y.default,{width:t,height:a,debounce:1},c.default.createElement(v.default,{data:n,margin:{top:32,left:16,right:16,bottom:0}},c.default.createElement("defs",null,c.default.createElement("linearGradient",{id:"colorPv",x1:"0",y1:"0",x2:"0",y2:"1"},c.default.createElement("stop",{offset:"5%",stopColor:"#55bc8a",stopOpacity:.2}),c.default.createElement("stop",{offset:"95%",stopColor:"#55bc8a",stopOpacity:0}))),c.default.createElement(g.default,{vertical:!1,stroke:"#36435c",strokeDasharray:"2 2",horizontalPoints:this.getHorizontalPoints()}),c.default.createElement(h.default,{dataKey:r,axisLine:!1,tickLine:!1,height:30,interval:"preserveStart",tick:c.default.createElement(_,null),minTickGap:20}),c.default.createElement(m.default,{hide:!0,type:"number",domain:[function(e){return 0-Math.abs(e)},function(e){return 1.6*e}]}),c.default.createElement(p.default,{wrapperStyle:{zIndex:1e3},content:c.default.createElement(E.default,null)}),this.renderArea()))}},{key:"series",get:function(){var e=this.props,t=e.xKey,a=e.data;return Object.keys(a[0]||{}).filter((function(e){return e!==t}))}}]),a}(c.default.Component);t.default=O,O.propTypes={width:s.default.oneOfType([s.default.string,s.default.number]),height:s.default.oneOfType([s.default.string,s.default.number]),xKey:s.default.string,unit:s.default.string,data:s.default.array,bgColor:s.default.string,areaColors:s.default.array},O.defaultProps={width:180,height:56,xKey:"time",unit:"",bgColor:f.COLORS_MAP.lightest,areaColors:["green","blue","yellow","red"],data:[]}},function(e,t,a){e.exports={wrapper:"_235Ydzrxtn47mC5KVnUqMN",chartWrapper:"_1Ih0Px-Zxe5AwW8uJkqt8N",chart:"_3awmU2UAJvmujW7qMl0RAz",title:"_2jhkSzEfNoOh15_4kzbLaw"}},function(e,t,a){e.exports={wrapper:"_29aBx9QNbrjLovrOIFCqJl",header:"_3S-YBwfAwlBHzJQi5UvabR",timeSelect:"_3zET3ukjC_TJNnZ6Dw5ePh"}},,,,,,function(e,t,a){e.exports={item:"_3AKgHrYF7Fu8kENV1qw1Xg",content:"_7hMYwDpNDo4VWwNVsinXF",contentItem:"_8Zz1AYqtLjXcwA84SIji2"}},function(e,t,a){e.exports={card:"_2UbaCzyTEGsejSpXNrF6dW",Head:"pkiC1T3lJghgtls15h59r",item:"_29oHjjQCCBQ_HO52Qhu14a",title:"_34EuAy0Td-ux7hF71uGkGI",default:"_1k0Fd-vBuAggthS2MUTYbg",desc:"Mbk9BMGODO4puVhQfoED2",icon:"_1dVn11WYgSYrEHXe9FM6AK",open:"_3fvnh8ID_KJuzAwff1Rjj",List:"_1QnLnHp8eD8OFWcXcm6UUI",inline:"_18Mhfb5La8Pz1dnD8xW0t0",barItem:"_2OZot2XVNFPRHhkODRz2ag",bar:"_3PjP81XZ-f-DuKNK9b9qOS"}},function(e,t,a){e.exports={quota:"j_jIuTBmQIJCHq9iJUPCU",item:"_19YZe4YP-4n3v2b_sZUbmz",bar:"_2a14fJwRKjewBNftJGp2R-"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(86),r(16),r(27),r(190),r(10),r(24),r(62),r(64),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(96));r(5),r(6),r(86),r(16),r(27),r(190),r(10),r(4),r(436),r(24),r(62),r(64),r(7);var u=n(r(0)),o=n(r(26)),i=n(r(158)),c=r(186),s=n(r(1044)),f=r(52),d=r(72),p=n(r(4033)),m=["limits.cpu","limits.memory","pods"],h={Ti:Math.pow(1024,4),Gi:Math.pow(1024,3),Mi:Math.pow(1024,2),Ki:1024,TB:Math.pow(1e3,4),GB:Math.pow(1e3,3),MB:Math.pow(1e3,2),KB:1e3,T:Math.pow(1e3,4),G:Math.pow(1e3,3),M:Math.pow(1e3,2),K:1e3,Bytes:1,B:1},v=function(e){var a=e.name,r=e.total,n=e.used;if(!r&&!Number(n)&&-1===m.indexOf(a))return null;var v=0,g="",y="",E=function(e){return function(e,t){return e?[e,parseFloat(t)*(d.ICON_TYPES[a]||!h[e]?1:h[e])]:["",parseFloat(t)]}(function(e){var t=Object.keys(h),a=(0,o.default)(e.match(/[0-9]+([a-zA-Z]+)/),"1","");return t.forEach((function(e){if(a.indexOf(e)>-1)return a=e,!1})),a}(e),e)};if("limits.cpu"===a||"requests.cpu"===a)r&&(v=Number((0,f.cpuFormat)(n))/Number((0,f.cpuFormat)(r)),n="".concat((0,f.cpuFormat)(n)," Core"),r="".concat((0,f.cpuFormat)(r)," Core"));else if("limits.memory"===a||"requests.memory"===a)r&&(v=Number((0,f.memoryFormat)(n))/Number((0,f.memoryFormat)(r)),n="".concat((0,f.memoryFormat)(n,"Gi")," Gi"),r="".concat((0,f.memoryFormat)(r,"Gi")," Gi"));else if(r){var b=E(n),_=(0,l.default)(b,2),O=_[0],S=_[1],C=E(r),D=(0,l.default)(C,2),k=D[0],N=D[1];g=O,y=k,v=S/N}v=Math.min(Math.max(v,0),1);var T=a.indexOf("gpu")>-1?"gpu":a,R="gpu"===T?"".concat(T,".limit"):T;return u.default.createElement("div",{className:p.default.quota},u.default.createElement(c.Icon,{name:d.ICON_TYPES[T]||"resource",size:40}),u.default.createElement("div",{className:p.default.item},u.default.createElement("div",null,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return d.ICON_TYPES[T]?t(e.replace(/[. ]/g,"_").toUpperCase()):e}(R)),u.default.createElement("p",null,t("RESOURCE_TYPE_SCAP"))),u.default.createElement("div",{className:p.default.item},u.default.createElement("div",null,function(e){if(y&&!g){var t=d.ICON_TYPES[a]||!h[y]?1:h[y];return"".concat(e/t).concat(e>0?y:"")}return e}(n)),u.default.createElement("p",null,t("USED"))),u.default.createElement("div",{className:p.default.item},u.default.createElement("div",null,(0,i.default)(r)?t("NO_LIMIT_TCAP"):r),u.default.createElement("p",null,t("QUOTA"))),u.default.createElement("div",{className:p.default.item,style:{flex:3}},u.default.createElement("div",null,t("USAGE")),u.default.createElement(s.default,{value:Math.min(v,1),className:p.default.bar,rightText:r?"":t("NO_LIMIT"),text:t("USED_PERCENT",{percent:Number((100*v).toFixed(2))})})))};a.default=v},function(e,t,a){e.exports={quota:"_3_ChjGbxbGEOsl-bn45v6",item:"_39hSvb0gytLzXkJepmuZYY",bar:"_3C2DyYLkZ1uZmTpxOaCjMD"}},function(e,t,a){e.exports={wrapper:"_2SomAa9Qr3FAZCUu_vfPVg",header:"_3IWXKjfTi9VrsxbWViUQan",item:"tXNdZn2Wks84tQIm0_DB",content:"_1slhrCDV-prgABOLHi36ms",contentItem:"nMyfCUkpNIE-XvgWGaFJd"}},,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(73),a(18),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(73),a(18),a(42),a(16),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=a(52),f=r(a(26)),d=r(a(201)),p=r(a(4049));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var h=function(e){(0,u.default)(a,e);var t=m(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"render",value:function(){var e=this.props,t=e.templates,a=e.roleCategory,r=void 0===a?[]:a,n=(0,d.default)("lang")||(0,s.getBrowserLang)();return c.default.createElement("ul",{className:p.default.wrapper,"data-test":"rule-list"},r.map((function(e){var a,r,l=t[e.name]||[],u=(null==e||null===(a=e.displayName)||void 0===a?void 0:a[n])||(null==e||null===(r=e.displayName)||void 0===r?void 0:r.en);return l.length<1?null:c.default.createElement("li",{key:e.name},c.default.createElement("div",{className:p.default.name},u),c.default.createElement("div",null,l.map((function(e){return(0,f.default)(e,"_originData.spec.displayName[".concat(n,"]"))||(0,f.default)(e,"_originData.spec.displayName.en")})).join("  |  ")))})))}}]),a}(c.default.Component);t.default=h},function(e,t,a){e.exports={wrapper:"z2WyR5A5wRu0YtfOojEJ8",name:"_2Qe_QRdB_yNsSo5jz4l2m"}},function(e,t,a){e.exports={table:"_2rTR6NVDPyorYXDf3Og1lV"}},,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(317),l=r(a(4072)),u=r(a(4073)),o=r(a(4080)),i=r(a(4084)),c=r(a(4085));t.default=function(e){return[{path:"".concat(e,"/gateway-configs"),title:"CONFIGURATION_OPTIONS",component:i.default,exact:!0},{path:"".concat(e,"/monitors"),title:"MONITORING",component:u.default,exact:!0,clusterModule:"whizard-monitoring"},{path:"".concat(e,"/logs"),title:"GATEWAY_LOGS",component:c.default,exact:!0},{path:"".concat(e,"/resource-status"),title:"RESOURCE_STATUS",component:o.default,exact:!0},{path:"".concat(e,"/metadata"),title:"METADATA",component:l.default,exact:!0},(0,n.getIndexRoute)({path:e,to:"".concat(e,"/gateway-configs"),exact:!0})]}},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(18),r(98),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(98),r(4),r(23),r(57),r(17);var u,o=n(r(96)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=l(r(0)),m=n(r(789)),h=n(r(63)),v=r(239),g=n(r(1852));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var E=(0,v.inject)("detailStore")(u=(0,v.observer)(u=function(e){(0,s.default)(r,e);var a=y(r);function r(){return(0,i.default)(this,r),a.apply(this,arguments)}return(0,c.default)(r,[{key:"render",value:function(){var e=this.detail.annotations;return p.default.createElement(m.default,{title:t("ANNOTATION_PL")},p.default.createElement("div",{className:g.default.container},p.default.createElement("ul",null,(0,h.default)(e)?p.default.createElement("li",null,t("NO_DATA")):Object.entries(e).map((function(e){var t=(0,o.default)(e,2),a=t[0],r=t[1];return p.default.createElement("li",{key:a},p.default.createElement("span",{className:g.default.key},a),p.default.createElement("span",null,r))})))))}},{key:"store",get:function(){return this.props.detailStore}},{key:"detail",get:function(){return this.store.gateway.data||{}}}]),r}(p.Component))||u)||u;a.default=E},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(86),r(18),r(16),r(9),r(13),r(10),r(4),r(316),r(23),r(24),r(17),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(86),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(24),r(17),r(62),r(7);var l=n(r(315)),u=n(r(43)),o=n(r(30));r(41);var i,c=n(r(44)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=n(r(0)),v=r(239),g=n(r(26)),y=n(r(63)),E=r(794),b=n(r(1075)),_=r(186),O=r(822),S=r(798),C=n(r(4074));function D(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t-1||t.indexOf("/workspaces/")>-1?localStorage.getItem("federated-cluster"):e}},{key:"namespace",get:function(){return this.props.match.params.namespace}},{key:"workspace",get:function(){return this.props.match.params.workspace}},{key:"metrics",get:function(){return this.monitorStore.data}}]),r}(h.default.Component))||i)||i;a.default=R},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(84),r(86),r(73),r(18),r(16),r(27),r(190),r(9),r(13),r(10),r(4),r(316),r(23),r(24),r(17),r(85),r(62),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(84),r(86),r(73),r(18),r(28),r(42),r(16),r(27),r(190),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(24),r(17),r(85),r(62),r(7);var l=n(r(30)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(36)),c=n(r(37)),s=n(r(88)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(186),v=r(798),g=n(r(3)),y=r(1853),E=n(r(1075)),b=n(r(439)),_=n(r(63)),O=n(r(26)),S=n(r(189)),C=r(794),D=n(r(4075)),k=n(r(4079));function N(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){for(var t=1;t-1?Number(a).toFixed(4):isNaN(Number(a))?0:a;t[e.metric_name]=r})),t}},e.handleAutoRefresh=function(){e.setState({autoRefresh:!e.state.autoRefresh},(function(){e.state.autoRefresh?(0,C.startAutoRefresh)((0,s.default)(e)):(0,C.stopAutoRefresh)((0,s.default)(e))}))},e.handleRefresh=function(){e.fetchData()},e.renderAutoRefresh=function(){var t=e.state,a=t.enableAutoRefresh,r=t.autoRefresh;return a?m.default.createElement(h.Button,{className:k.default.button,type:"control",icon:r?"pause":"start",iconType:"light",onClick:e.handleAutoRefresh}):null},e.getMetricsData=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,O.default)(e.state.metrics,"".concat(t),a)},e.renderCustomLegend=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=(e.className,e.payload),r=e.activeSeries,n=void 0===r?[]:r,u=e.showAll,o=void 0!==u&&u,i=a||[];if(i.length<2&&!o)return m.default.createElement("div",{className:k.default.legend});var c=function(t){var a=e.onClick;a&&a(t,(0,O.default)(t.target,"dataset.key"))};return m.default.createElement("div",{className:k.default.legend,onClick:c},i.map((function(e){var a=!n.includes(e.value),r=(0,O.default)(e,"payload.stroke");return m.default.createElement("div",{key:e.dataKey,"data-key":e.dataKey,className:(0,g.default)(k.default.item,(0,l.default)({},k.default.inactive,a))},m.default.createElement("i",{style:{backgroundColor:r}}),t(e.value))})))},e}return(0,c.default)(r,[{key:"componentDidMount",value:function(){this.fetchData()}},{key:"render",value:function(){var e=this.state,a=e.duration,r=e.errorType;return m.default.createElement("div",{className:k.default.overview},m.default.createElement("div",{className:k.default.header},m.default.createElement("p",{className:k.default.title},t("OVERVIEW")),m.default.createElement("div",{className:k.default.operations},m.default.createElement(D.default,{duration:a,onChange:this.handleChange}),this.renderAutoRefresh(),m.default.createElement(h.Button,{className:k.default.button,type:"control",icon:"refresh",iconType:"light",onClick:this.handleRefresh}))),m.default.createElement("div",{className:k.default.body},m.default.createElement("div",{className:k.default.left},m.default.createElement("div",{className:k.default.item},m.default.createElement(h.Icon,{name:"gateway",size:56}),m.default.createElement("div",null,m.default.createElement("p",null,t("TOTAL_REQUESTS")),m.default.createElement("span",null,this.getMetricsData("ingress_request_count")))),m.default.createElement("div",{className:k.default.item},m.default.createElement(h.Icon,{name:"error",size:56}),m.default.createElement("div",null,m.default.createElement(h.Select,{width:30,value:r,options:[{label:t("FOUR_XX_REQUEST_COUNT"),value:"ingress_request_4xx_count"},{label:t("FIVE_XX_REQUEST_COUNT"),value:"ingress_request_5xx_count"}],onChange:this.handleRequestError}),m.default.createElement("span",null,this.getMetricsData(r))))),m.default.createElement("div",{className:k.default.middle},m.default.createElement(v.SimpleCircle,{theme:"light",width:200,height:200,title:"",value:"".concat((100*this.getMetricsData("ingress_success_rate")).toFixed(2)),total:100,unit:"%",innerRadius:"80%",legend:["SUCCESSFUL_REQUESTS","TOTAL"],showCenter:!0,showRate:!1,areaColors:["#55BC8A","#E3E9EF"],renderCustomCenter:function(e){var a=e.value;return m.default.createElement("div",{className:k.default.simpleContent},m.default.createElement("p",null,t("SUCCESSFUL_REQUESTS")),m.default.createElement("span",null,a,"%"))}})),m.default.createElement("div",{className:k.default.right},m.default.createElement("div",{className:k.default.item},m.default.createElement("span",{className:k.default.customIcon},m.default.createElement(y.ReactComponent,null)),m.default.createElement("div",null,m.default.createElement("p",null,t("AVERAGE_LATENCY")),m.default.createElement("span",null,"".concat(this.getMetricsData("ingress_request_duration_average")," s")))),m.default.createElement("div",{className:k.default.itemSmall},m.default.createElement("span",null,t("P_FIFTY_LATENCY")),m.default.createElement("span",null,"".concat(this.getMetricsData("ingress_request_duration_50percentage")," s"))),m.default.createElement("div",{className:k.default.itemSmall},m.default.createElement("span",null,t("P_NINETY_FIVE_LATENCY")),m.default.createElement("span",null,"".concat(this.getMetricsData("ingress_request_duration_95percentage")," s"))),m.default.createElement("div",{className:k.default.itemSmall},m.default.createElement("span",null,t("P_NINETY_NINE_LATENCY")),m.default.createElement("span",null,"".concat(this.getMetricsData("ingress_request_duration_99percentage")," s"))))))}},{key:"detail",get:function(){return this.props.detailStore.gateway.data}},{key:"isWorkspaceGateway",get:function(){var e=this.props.match.params,t=e.workspace,a=e.namespace;return t&&!a}},{key:"cluster",get:function(){var e=this.props.match.params.cluster;return this.props.location.pathname.indexOf("federatedprojects")>-1||this.isWorkspaceGateway?localStorage.getItem("federated-cluster"):e}}]),r}(m.default.Component);a.default=I},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(42),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=r(186),h=n(r(4076)),v=r(1854),g=n(r(4078));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var E=function(e){(0,i.default)(r,e);var a=y(r);function r(e){var t;(0,u.default)(this,r),(t=a.call(this,e)).handleToggle=function(){t.setState({visible:!t.state.visible},(function(){t.props.onToggle(t.state.visible)}))},t.hideSelector=function(){t.setState({visible:!1},(function(){t.props.onToggle(!1)}))},t.handleTimeChange=function(e){var a=e.duration;t.setState({visible:!1,duration:a},(function(){t.props.onChange(a)}))};var n=e.duration;return t.state={visible:!1,preDuration:"",duration:n||"10m"},t}return(0,o.default)(r,[{key:"renderButtonText",value:function(){var e=this.state.duration,a=(0,v.getTimeLabel)(e);return"".concat(t("LAST")," ").concat(a)}},{key:"renderContent",value:function(){var e=this.state.duration;return f.default.createElement("div",{className:g.default.content},f.default.createElement(h.default,{duration:e,onChange:this.handleTimeChange}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.dark,r=e.arrowIcon;return f.default.createElement("div",{className:(0,p.default)(g.default.selector,t,(0,l.default)({},g.default.active,this.state.visible))},f.default.createElement("div",{className:(0,p.default)(g.default.mask,(0,l.default)({},g.default.active,this.state.visible)),onClick:this.hideSelector}),f.default.createElement(m.Button,{className:g.default.button,onClick:this.handleToggle},f.default.createElement(m.Icon,{type:a?"dark":"light",name:"timed-task",size:20}),f.default.createElement("p",null,this.renderButtonText()),f.default.createElement(m.Icon,{className:g.default.arrow,type:a?"dark":"light",name:r||"caret-down"})),f.default.createElement("div",{className:g.default.dropdown},this.renderContent()))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.duration!==t.preDuration){var a=e.duration;return{prevPropStep:a,duration:a}}return null}}]),r}(f.default.PureComponent);a.default=E,E.propTypes={duration:d.default.string,onChange:d.default.func,onToggle:d.default.func},E.defaultProps={duration:"10m",onChange:function(){},onToggle:function(){}}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(42),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(3)),m=r(1854),h=n(r(4077));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var g=["1m","5m","10m","30m","1h","3h","6h","12h"],y=function(e){(0,i.default)(r,e);var a=v(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l-1||this.isWorkspaceGateway?localStorage.getItem("federated-cluster"):e}},{key:"prefix",get:function(){return"/clusters/".concat(this.cluster)}},{key:"type",get:function(){var e=this.props.match.params,t=e.namespace,a=e.workspace;return this.cluster&&a&&!t?"workspace":a&&t?"project":"cluster"}},{key:"namespace",get:function(){var e=this.props.match.params.namespace;return"cluster"===this.type?"":e}},{key:"actionModule",get:function(){var e=this.props.match.params,t=e.namespace,a=e.workspace;return t&&a&&this.cluster?"ks-project-gateway":a&&!t?"ks-workspace-gateway":"cluster-settings"}},{key:"enabledActions",get:function(){return globals.app.getActions(T(T({module:this.actionModule},this.props.match.params),{},{project:this.props.match.params.namespace,cluster:this.cluster}))}},{key:"volumesTitle",get:function(){return t("STORAGE_DEVICES")}},{key:"enableScaleReplica",get:function(){return this.enabledActions.includes("edit")&&!this.detail.isFedManaged}}]),r}(p.default.Component);w.childContextTypes={gatewayName:O.default.string,gatewayNs:O.default.string,cluster:O.default.string};var I=(0,h.inject)("detailStore")((0,h.observer)(w));a.default=I;var M=w;a.Component=M},function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(86),r(18),r(16),r(98),r(9),r(13),r(10),r(4),r(316),r(23),r(24),r(17),r(188),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(86),r(18),r(28),r(42),r(16),r(34),r(15),r(98),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(24),r(17),r(188),r(7);var l=n(r(315)),u=n(r(96)),o=n(r(43)),i=n(r(30)),c=n(r(58));r(41);var s,f,d,p=n(r(44)),m=n(r(36)),h=n(r(37)),v=n(r(55)),g=n(r(56)),y=n(r(51)),E=n(r(0)),b=r(239),_=n(r(1)),O=n(r(3)),S=n(r(63)),C=n(r(26)),D=r(186),k=r(794),N=n(r(1075)),T=n(r(789)),R=n(r(4082)),w=n(r(1855));function I(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function M(e){for(var t=1;t0&&void 0!==i[0]?i[0]:{},a=t.noMetrics,r=t.silent,l=(0,c.default)(t,["noMetrics","silent"]),!(0,S.default)(n.state.params)){e.next=4;break}return n.store.podList.isLoading=!1,e.abrupt("return");case 4:return u=n.props.limit,r&&(n.store.podList.silent=!0),e.next=8,n.store.getGatewayPodsList(M(M({limit:u},n.state.params),l));case 8:n.store.podList.silent=!1,a||n.fetchMetrics();case 10:case"end":return e.stop()}}),e)}))),n.fetchMetrics=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.store.podList,a=t.data,r=t.isLoading;if((0,S.default)(a)||r||(0,S.default)(n.state.params))return!1;var l=n.state.params,u=l.gatewayName,o=l.namespace,i=l.workspace,c=l.cluster;n.monitorStore.fetchMetrics(M(M({step:"1m",times:30,resources:a.map((function(e){return e.name})),metrics:Object.values(A),namespace:o,workspace:o?void 0:i,cluster:c||n.cluster},e),{},{component:"ingress",job:"".concat(u,"-metrics")}))},n.getPagination=function(){var e=n.store.podList;return{page:e.page,limit:e.limit,total:e.total}},n.getPodMetrics=function(){var e=n.monitorStore.data,t={};return Object.entries(A).forEach((function(a){var r=(0,u.default)(a,2),n=r[0],l=r[1],o=(0,C.default)(e,"".concat(l,".data.result"))||[];t[n]=o[0]})),t},n.handleSearch=function(e){n.searchValue=e,n.fetchData({search:e})},n.handleRefresh=function(){var e=n.searchValue?{search:n.searchValue}:{};n.fetchData(e)},n.handlePage=function(e){n.fetchData({page:e}).then((function(){n.props.onPage(e)}))},n.handleExpand=function(e){n.setState((function(t){return{expandItem:t.expandItem===e?"":e}}))},n.getClustersOptions=function(){return n.props.clusters.map((function(e){return{label:e,value:e}}))},n.renderHeader=function(){return E.default.createElement("div",{className:w.default.header},E.default.createElement(D.InputSearch,{className:w.default.search,name:"search",placeholder:t("SEARCH"),onSearch:n.handleSearch}),E.default.createElement("div",{className:w.default.actions},E.default.createElement(D.Button,{type:"flat",icon:"refresh",onClick:n.handleRefresh})))},n.renderFooter=function(){var e=n.getPagination(),a=e.total;return E.default.createElement(D.Level,{className:w.default.footer},E.default.createElement(D.LevelLeft,null,t("TOTAL_ITEMS",{num:a})),E.default.createElement(D.LevelRight,null,E.default.createElement(D.Pagination,(0,l.default)({},e,{onChange:n.handlePage}))))},n.store=e.store,n.monitorStore=new N.default,n.state={expandItem:"",params:e.params},n}return(0,h.default)(r,[{key:"componentDidMount",value:function(){this.fetchData(),(0,k.startAutoRefresh)(this,{method:"fetchMetrics",leading:!1})}},{key:"componentWillUnmount",value:function(){(0,k.stopAutoRefresh)(this),this.disposer&&this.disposer()}},{key:"renderContent",value:function(){var e=this,a=this.props.prefix,r=this.store.podList,n=r.data,l=r.isLoading,u=r.silent,o=E.default.createElement("div",{className:w.default.body},(0,S.default)(n)?E.default.createElement("div",{className:w.default.empty},t("NO_RESOURCE_FOUND")):n.map((function(t){return E.default.createElement(R.default,{key:t.uid,prefix:a,detail:t,metrics:e.getPodMetrics(t),loading:e.monitorStore.isLoading,refreshing:e.monitorStore.isRefreshing,isExpand:e.state.expandItem===t.uid,onExpand:e.handleExpand})})));return u?o:E.default.createElement(D.Loading,{spinning:l},o)}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.title,n=e.hideHeader,l=e.hideFooter,u=e.noWrapper,o=this.store.podList.data;return u?this.renderContent():E.default.createElement(T.default,{className:(0,O.default)(w.default.main,a),title:t(r),empty:t("NO_AVAILABLE_RESOURCE_VALUE",{resource:t("POD")}),isEmpty:(0,S.default)(o)},!n&&this.renderHeader(),this.renderContent(),!l&&this.renderFooter())}},{key:"isWorkspaceGateway",get:function(){var e=this.props.params,t=e.workspace,a=e.namespace;return t&&!a}},{key:"cluster",get:function(){var e,t=this.props.params.cluster;return(null===(e=location)||void 0===e?void 0:e.pathname).indexOf("federatedprojects")>-1||this.isWorkspaceGateway?localStorage.getItem("federated-cluster"):t}}]),r}(E.default.Component),f.propTypes={prefix:_.default.string,title:_.default.string,detail:_.default.object,details:_.default.object,hideHeader:_.default.bool,hideFooter:_.default.bool,onPage:_.default.func,limit:_.default.number},f.defaultProps={title:"PODS",detail:{},details:{},hideHeader:!1,hideFooter:!1,onPage:function(){}},s=d))||s;a.default=j},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(6),r(86),r(18),r(87),r(16),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(6),r(86),r(18),r(87),r(42),r(16),r(4),r(23),r(57),r(17),r(7);var l=n(r(61)),u=n(r(30)),o=n(r(315)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(0)),m=r(433),h=n(r(1)),v=n(r(3)),g=n(r(63)),y=n(r(26)),E=r(52),b=r(794),_=r(186),O=n(r(839)),S=r(798),C=n(r(1220)),D=n(r(804)),k=n(r(1855));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var T=function(e){(0,s.default)(r,e);var a=N(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u1&&p.default.createElement(_.Tooltip,{content:this.renderPodIPContent(this.networkIPs)},p.default.createElement("div",{className:k.default.podip},this.networkIPs.length))),p.default.createElement("p",null,t("POD_IP_ADDRESS_SCAP"))),this.renderMonitorings(),p.default.createElement("div",{className:k.default.arrow},p.default.createElement(_.Icon,{name:"chevron-down",type:l?"light":"",size:20})))}},{key:"renderExtraContent",value:function(){var e=this,a=this.props.prefix,r=this.props.detail,n=r.cluster,l=r.containers,u=void 0===l?[]:l,o=r.initContainers,i=void 0===o?[]:o,c=r.name;if((0,g.default)(u))return null;var s=globals.app.hasPermission({module:"clusters",action:"view"})&&a?this.getLink():"";return p.default.createElement("div",{className:k.default.itemExtra},p.default.createElement("div",{className:"margin-b8"},p.default.createElement("strong",null,t("CONTAINER_PL"))),p.default.createElement("div",{className:k.default.containers},u.map((function(t){return p.default.createElement(C.default,{key:t.name,prefix:s,podName:c,detail:t,cluster:n,onContainerClick:e.handleLinkClick,isCreating:e.isCreating,hideterminal:!0,hideLink:!0})})),i.map((function(t){return p.default.createElement(C.default,{key:t.name,prefix:s,podName:c,detail:t,cluster:n,onContainerClick:e.handleLinkClick,isCreating:e.isCreating,isInit:!0,hideterminal:!0,hideLink:!0})}))))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.isExpand;return p.default.createElement("div",{className:(0,v.default)(k.default.item,t,(0,u.default)({},k.default.expanded,a))},p.default.createElement("div",{className:k.default.itemMain,onClick:this.handleExpandExtra},p.default.createElement("div",{className:k.default.icon},p.default.createElement(_.Icon,{name:"pod",size:40,type:a?"light":"dark"}),this.renderStatusTip()),this.renderContent()),this.renderExtraContent())}},{key:"status",get:function(){var e=this.props.detail.podStatus,t=e.status;return{type:e.type.toLowerCase(),name:t}}},{key:"isCreating",get:function(){return"warning"===this.status.type&&"ContainerCreating"===this.status.name}},{key:"isRunning",get:function(){return"running"===this.status.type||"completed"===this.status.type}},{key:"networkIPs",get:function(){return this.props.detail.networksStatus.reduce((function(e,t){return[].concat((0,l.default)(e),(0,l.default)(t.ips))}),[])}}]),r}(p.default.PureComponent);a.default=T,T.propTypes={className:h.default.string,prefix:h.default.string,detail:h.default.object,metrics:h.default.object,loading:h.default.bool,isExpand:h.default.bool,onExpand:h.default.func},T.defaultProps={prefix:"",detail:{},isExpand:!1,onExpand:function(){}}},function(e,t,a){e.exports={deployment_codeResource:"_2sxIgN7h_UoStkDUN8ngoB"}},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(98),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(98),r(4),r(23),r(57),r(17);var l,u=n(r(96)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=n(r(789)),m=r(239),h=n(r(63)),v=n(r(26)),g=n(r(1852));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var E=(0,m.inject)("detailStore")(l=(0,m.observer)(l=function(e){(0,c.default)(r,e);var a=y(r);function r(){return(0,o.default)(this,r),a.apply(this,arguments)}return(0,i.default)(r,[{key:"render",value:function(){var e=this.detail.config;return d.default.createElement(p.default,{title:t("CONFIGURATION_OPTIONS")},d.default.createElement("div",{className:g.default.container},d.default.createElement("ul",null,(0,h.default)(e)?d.default.createElement("li",null,t("NO_DATA")):Object.entries(this.detail.config).map((function(e){var t=(0,u.default)(e,2),a=t[0],r=t[1];return d.default.createElement("li",{key:a},d.default.createElement("span",{className:g.default.key},a),d.default.createElement("span",null,r))})))))}},{key:"module",get:function(){return this.props.detailStore.module}},{key:"store",get:function(){return this.props.detailStore}},{key:"detail",get:function(){return(0,v.default)(this.store.gateway,"data",{})}}]),r}(d.default.Component))||l)||l;a.default=E},function(e,a,r){"use strict";r(84),r(85);var n=r(20);r(12),r(5),r(11),r(6),r(86),r(73),r(18),r(87),r(97),r(16),r(9),r(13),r(10),r(4),r(316),r(23),r(24),r(17),r(62),r(188),r(7),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(86),r(73),r(18),r(28),r(87),r(245),r(97),r(442),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(316),r(22),r(23),r(57),r(24),r(17),r(62),r(188),r(7),r(110);var l=n(r(61)),u=n(r(43)),o=n(r(30));r(41);var i,c,s,f,d,p,m,h,v,g=n(r(44)),y=n(r(96)),E=n(r(65)),b=n(r(36)),_=n(r(37)),O=n(r(88)),S=n(r(55)),C=n(r(56)),D=n(r(51)),k=n(r(49)),N=(n(r(66)),n(r(0))),T=r(239),R=n(r(833)),w=n(r(985)),I=r(14),M=r(186),P=n(r(3)),A=r(2014),j=n(r(243)),L=n(r(1127)),x=n(r(1392)),U=r(52),z=r(1397),F=n(r(1124)),G=n(r(4086));function V(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function B(e){for(var t=1;t').concat(e.hightLighted,"")}));return N.default.createElement("span",{dangerouslySetInnerHTML:{__html:o.join("")}})}},e.scrollTo=function(t){try{e.tableRef.current.scrollToRow(t)}catch(e){}},(0,E.default)(e,"onTableScrollTop",m,(0,O.default)(e)),e.initQuery=function(){e.searchInputState={query:[],start:"",end:"",durationAlias:"",nextParamsKey:""}},e.togglePolling=function(){e.state.polling?e.stopPolling():e.startPolling()},(0,E.default)(e,"changeFrequency",h,(0,O.default)(e)),(0,E.default)(e,"pollingFunc",v,(0,O.default)(e)),e.onSearchParamsChange=function(){e.stopPolling(),e.refreshQuery()},e.handleRefresh=function(){e.refreshQuery()},e.clearFilter=function(){e.initQuery(),e.refreshQuery()},e.renderEmpty=function(){return N.default.createElement("div",{className:G.default.emptyText},N.default.createElement("span",{className:G.default.emptyTipIcon},N.default.createElement(M.Icon,{name:"exclamation",size:48})),N.default.createElement("div",null,t("NO_MATCHING_RESULT_FOUND")),N.default.createElement("p",null,t("YOU_CAN_TRY_TO"),N.default.createElement("span",{className:G.default.action,onClick:e.handleRefresh,"data-test":"table-empty-refresh"},t("REFRESH_DATA")),t("OR"),N.default.createElement("span",{className:G.default.action,onClick:e.clearFilter,"data-test":"table-empty-clear-filter"},t("CLEAR_SEARCH_CONDITIONS"))))},e}return(0,_.default)(c,[{key:"componentDidMount",value:function(){this.refreshQuery()}},{key:"componentWillUnmount",value:function(){clearInterval(this.pollingInterval)}},{key:"getQueryParams",value:function(){return this.searchInputState.query.filter((function(e){return e.key})).reduce((function(e,t){var a=t.key,r=t.value,n=a,l=e[n];return e[n]=l?"".concat(l,",").concat(r):r,e}),{})}},{key:"refreshQuery",value:(n=(0,g.default)(u.default.mark((function e(){var t,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getQueryParams(),e.next=3,this.fetchLog(B(B({},t),{},{from:0,size:50},this.duration));case 3:a=e.sent,this.logs=a.reverse(),this.scrollTo(this.logs.length);case 6:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"fetchLog",value:(r=(0,g.default)(u.default.mark((function e(t){var a,r,n,l;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.props.match.params,r=a.namespace,n=a.gatewayName,l=a.workspace,e.next=3,this.store.getGatewayLogs(B({cluster:this.cluster,namespace:r,workspace:l,gatewayName:n},t));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"loadMoreLogs",value:(a=(0,g.default)(u.default.mark((function e(){var t,a,r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.store.logs.from+this.store.logs.size,a=this.getQueryParams(),e.next=4,this.fetchLog(B(B(B({},a),this.duration),{},{from:t,size:50}));case 4:r=e.sent,this.logs=[].concat((0,l.default)(r.reverse()),(0,l.default)(this.logs)),this.scrollTo(r.length);case 7:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"stopPolling",value:function(){clearTimeout(this.pollingInterval),this.setState({polling:!1})}},{key:"startPolling",value:function(){this.setState({polling:!0}),this.pollingFunc(),this.pollingInterval&&clearTimeout(this.pollingInterval),this.pollingInterval=setInterval(this.pollingFunc,this.pollingFrequency)}},{key:"renderOperation",value:function(){var e=this.props.match.params,a=e.namespace,r=e.gatewayName,n=e.workspace,l={cluster:this.cluster,namespace:a,workspace:n,gatewayName:r},u=[5,10,20].map((function(e){return{label:t("REFRESH_INTERVAL_VALUE",{value:e}),value:1e3*e}})),o=B(B(B({},l),this.duration),this.getQueryParams()),i=(0,U.getClusterUrl)(this.store.exportLinkFactory(o));return N.default.createElement("div",{className:G.default.filter},N.default.createElement("div",{className:(0,P.default)(G.default.filterButton,G.default.pollingBtn),onClick:this.togglePolling},N.default.createElement(M.Icon,{name:this.state.polling?"stop":"start",type:"light"})),N.default.createElement(M.Select,{prefixIcon:N.default.createElement(M.Icon,{type:"light",name:"timed-task",size:20}),className:(0,P.default)(G.default.filterButton,G.default.frequencyOpts),defaultValue:5e3,options:u,onChange:this.changeFrequency}),N.default.createElement("a",{href:i,download:!0},N.default.createElement("span",{className:(0,P.default)(G.default.filterButton,G.default.exportBtn)},N.default.createElement(M.Tooltip,{content:t("EXPORT_LOGS")},N.default.createElement(M.Icon,{name:"export",type:"light"})))))}},{key:"render",value:function(){return globals.app.hasKSModule("whizard-logging")?N.default.createElement("div",null,N.default.createElement("div",{className:G.default.title},N.default.createElement("div",{className:(0,P.default)(G.default.search,(0,o.default)({},G.default.focus,this.hasValue))},N.default.createElement(M.Icon,{className:G.default.isLeft,name:"magnifier",size:20}),N.default.createElement(w.default,{className:G.default.searchInput,onChange:this.onSearchParamsChange,params:this.searchInputState,dropdownClass:G.default.dropdownClass,iconThem:"light",enableClear:!0,dropDownItems:this.dropDownContent,showStep:!1}),N.default.createElement(M.Icon,{className:(0,P.default)(G.default.clearIcon,(0,o.default)({},G.default.hideIcon,!this.hasValue)),name:"close",onClick:this.initQuery})),this.renderOperation()),N.default.createElement("div",{className:G.default.body},(0,A.isEmpty)((0,I.toJS)(this.logs))?this.renderEmpty():N.default.createElement(L.default,{onScroll:this.onTableScrollTop,cols:this.tableCols,data:(0,I.toJS)(this.logs),tableRef:this.tableRef,trCLassName:G.default.trCLassName,body:G.default.bodyClassName,header:G.default.headerClassName}))):N.default.createElement(R.default,{className:"no-shadow",icon:"cluster",title:t("LOGGING_DISABLED")})}},{key:"hasValue",get:function(){return Object.values((0,I.toJS)(this.searchInputState)).some((function(e){return(0,A.isArray)(e)?e.some((function(e){return!(0,A.isEmpty)((0,I.toJS)(e))})):!(0,A.isEmpty)(e)}))}},{key:"defaultDuration",get:function(){return{start_time:0,end_time:Date.now()}}},{key:"isWorkspaceGateway",get:function(){var e=this.props.match.params,t=e.workspace,a=e.namespace;return t&&!a}},{key:"duration",get:function(){var e=Date.now(),t=this.searchInputState,a=t.start,r=t.end;return a?{start_time:(0,A.min)([1e3*a,e]),end_time:(0,A.min)([1e3*r,e])}:this.defaultDuration}},{key:"dropDownContent",get:function(){return{log_query:{icon:"magnifier",text:t("KEYWORD")},pod_query:{icon:"pod",text:t("POD")}}}},{key:"store",get:function(){return this.props.detailStore}},{key:"cluster",get:function(){var e=this.props.match.params.cluster,t=this.props.location.pathname;return t.indexOf("/federatedprojects/")>-1||t.indexOf("/workspaces/")>-1?localStorage.getItem("federated-cluster"):e}}]),c}(N.default.Component),s=(0,k.default)(c.prototype,"searchInputState",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{query:[],start:"",end:"",durationAlias:"",nextParamsKey:""}}}),f=(0,k.default)(c.prototype,"pollingFrequency",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 5e3}}),d=(0,k.default)(c.prototype,"logs",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,k.default)(c.prototype,"hasValue",[I.computed],Object.getOwnPropertyDescriptor(c.prototype,"hasValue"),c.prototype),p=(0,k.default)(c.prototype,"tableCols",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[{thead:t("TIME"),key:"time",dataIndex:"time",mustShow:!0,content:function(e){return"[".concat((0,j.default)(e.time).format("YYYY-MM-DD HH:mm:ss"),"]")}},{thead:t("POD"),key:"pod",dataIndex:"pod",mustShow:!0,content:this.renderHightLightMatchTd({resKey:"pod",searchKey:["pod_query"]})},{thead:t("MESSAGE"),key:"log",dataIndex:"log",className:G.default.logItem,content:this.renderHightLightMatchLogTd({resKey:"log",searchKey:["log_query"],handler:z.esMark}),mustShow:!0}]}}),(0,k.default)(c.prototype,"refreshQuery",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"refreshQuery"),c.prototype),(0,k.default)(c.prototype,"fetchLog",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"fetchLog"),c.prototype),(0,k.default)(c.prototype,"loadMoreLogs",[I.action],Object.getOwnPropertyDescriptor(c.prototype,"loadMoreLogs"),c.prototype),m=(0,k.default)(c.prototype,"onTableScrollTop",[I.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){var a=t.scrollTop,r=e.store.logs,n=r.from,l=r.size,u=r.total;0===a&&u>n+l&&e.loadMoreLogs()}}}),h=(0,k.default)(c.prototype,"changeFrequency",[I.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(t){e.pollingFrequency=t,e.state.polling&&(clearTimeout(e.pollingInterval),e.startPolling())}}}),v=(0,k.default)(c.prototype,"pollingFunc",[I.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=q;e.searchInputState.end=Math.ceil(Date.now()/1e3),e.searchInputState.start=e.searchInputState.end-t,e.searchInputState.durationAlias="".concat(t/60,"m"),e.refreshQuery()}}}),i=c))||i)||i;a.default=H},function(e,t,a){e.exports={title:"h3EGYxJHcXzNAZU64Ys-7",focus:"_1TYZVVQtrXwaAaa2nwD6NE",search:"_2QSFqdrB9aMZjIVh3QK0R2",clearIcon:"_3qDug15F8wtzhqs8WjeLBW",hideIcon:"_2CnN8q86DPsSM48wJnL6Nv",searchInput:"_2432rvdXjewrevIwLoYaSt",filter:"_2fb4uH-e_iaRbWSOMvDMPn",filterButton:"_7ASJ4CE_FCBt8fhgHM3Nz",exportBtn:"_2JJ6SH_-_MTCF7OPFW7kys",pollingBtn:"rOD92XzSZBE4irFyl6UkB",frequencyOpts:"_39g5yqbm9RZmh3S9viq599",searchBar:"_2PXN-WMqrT8hDBu-4PGTte",icon:"_1Mf8725MJ88eggNRQj49ku",input:"_2ApsehJ2Zoyl1l3Er5b7Ki",dropdownClass:"e7mNbUyHuqgvvXQ3KQ-ip",body:"_2zscwenqDTZYN32pr5Ds5-",logItem:"_3OcRCVG8GQmCwWPLwTW978",bodyClassName:"_2RyfnALWpJKi2fQDgJ-5qc",headerClassName:"_1ClFBNqMO40nDrGs0NH27N",trCLassName:"_1JuCS0O3IJiNnkzG1zCHzs",emptyText:"_2p2Dbxritd_IaivnVdRvZ1",emptyTipIcon:"_1dM3MOctITqHWlne46RoCc",action:"_3ihxA24eqCRlJprACXfqZc",hightLightMatch:"_3f66pKDSXrWjGp0u0360VP"}},,,,,,,,,,function(e,a,r){"use strict";var n=r(20);r(12),r(11),r(6),r(18),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(11),r(6),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l,u=n(r(30)),o=n(r(36)),i=n(r(37)),c=n(r(55)),s=n(r(56)),f=n(r(51)),d=n(r(0)),p=r(14),m=r(239),h=r(186),v=n(r(915)),g=n(r(787)),y=n(r(863)),E=n(r(438)),b=n(r(955)),_=n(r(4097)),O=n(r(4099));function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,f.default)(e);if(t){var n=(0,f.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,s.default)(this,a)}}var D=(0,m.observer)(l=function(e){(0,c.default)(r,e);var a=C(r);function r(e){var t;return(0,o.default)(this,r),(t=a.call(this,e)).fetchData=function(e){(e=e||{}).limit=-1,e.labelSelector=e.labelSelector?"".concat(e.labelSelector,",!cluster-role.kubesphere.io/edge"):"!cluster-role.kubesphere.io/edge",t.store.fetchList(function(e){for(var t=1;t0?t("".concat(e.isAdmin?"ADMIN_":"","UPDATE_LICENSE_DESC"),{day:e.dueDate,type:t("subscription"===e.type?"SUBSCRIPTION":"WARRANTY")}):t("".concat(e.isAdmin?"ADMIN_":"","MA_EXPIRED_LICENSE_DESC")):""},e.renderTipOperation=function(){var a=e.isInfoTip?{primary:"#326e93",secondary:"#326e93"}:{primary:"#8d663e",secondary:"#8d663e"},r=e.isUnAuthorized||e.isExpired?"ACTIVATE":"UPDATE_LICENSE";return"ACTIVATE"!==r?null:m.default.createElement("div",{onClick:function(){var t;e.trigger("license.update",{store:e.licenseStore,title:r,success:(t=(0,i.default)(u.default.mark((function t(){return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getData();case 2:e.currentUrl.indexOf("notification-history")>-1&&e.props.rootStore.routing.push("/settings/base-info");case 3:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})}},m.default.createElement("span",{style:{color:a}},t(r)),m.default.createElement(v.Icon,{name:"next",size:16,color:a}))},e}return(0,s.default)(n,[{key:"componentDidMount",value:(a=(0,i.default)(u.default.mark((function e(){var t=this;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!globals.user){e.next=4;break}return e.next=3,this.getData();case 3:window.triggerEvent.add("licenseViolation",(function(e){t.handleGetDataDebounce(e)}));case 4:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"render",value:function(){var e=-1!==this.currentUrl.indexOf("/license-info"),t=this.isExpired;return m.default.createElement("div",{className:(0,h.default)(O.default.licenseTip,(0,l.default)({},O.default.tipInfo,this.isInfoTip)),style:{display:this.visible?"block":"none"}},m.default.createElement("span",null,this.renderIcon(),this.renderTipText()),m.default.createElement("div",{className:O.default.operation},!e&&this.isAdmin&&this.renderTipOperation(),(!e||e&&!t)&&this.isInfoTip&&m.default.createElement(v.Icon,{name:"close",color:{primary:"#326e93",secondary:"#326e93"},size:16,onClick:this.handleCloseTip})))}},{key:"visible",get:function(){var e=this.props.rootStore.showLicenseTip;return this.isUnAuthorized||this.isExpired?(localStorage.removeItem("hideLicenseTip"),e):("true"===localStorage.getItem("hideLicenseTip")&&(e=!1,this.props.rootStore.hideLicenseTip()),e)}},{key:"licenseInfo",get:function(){return{}}},{key:"isAdmin",get:function(){return globals.app.isPlatformAdmin}},{key:"type",get:function(){return(0,g.default)(this.licenseInfo,"licenseType","subscription")}},{key:"isOverLimit",get:function(){return this.licenseInfo.isOverLimit||!1}},{key:"isUnAuthorized",get:function(){return this.licenseInfo.isUnAuthorized||!1}},{key:"isExpired",get:function(){return this.licenseInfo.isExpired||!1}},{key:"unExpired",get:function(){return this.licenseInfo.unExpired||!1}},{key:"isInfoTip",get:function(){return this.unExpired}},{key:"dueDate",get:function(){return this.licenseInfo.dueDate||-1}},{key:"currentUrl",get:function(){return this.props.rootStore.routing.location.pathname}}]),n}(m.default.Component))||o)||o)||o;a.default=C},function(e,t,a){e.exports={licenseTip:"_3wB25-Yoe6He1M4G1RSEzn",tipInfo:"_2mlSckPv_eZDS6o7GYbUSg",operation:"scU0LZ4kAkeyqIX9uyAab"}},function(e,a,r){"use strict";r(15);var n=r(20),l=r(157);r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(28),r(42),r(16),r(4),r(23),r(57),r(17);var u,o,i,c=n(r(30)),s=n(r(36)),f=n(r(37)),d=n(r(55)),p=n(r(56)),m=n(r(51)),h=l(r(0)),v=n(r(1)),g=r(239),y=n(r(3)),E=r(186),b=n(r(4107)),_=r(791),O=n(r(322)),S=n(r(4113));function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,m.default)(e);if(t){var n=(0,m.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,p.default)(this,a)}}var D=(0,g.inject)("rootStore")(u=(0,g.observer)(u=(0,_.trigger)((i=o=function(e){(0,d.default)(r,e);var a=C(r);function r(e){var t;return(0,s.default)(this,r),(t=a.call(this,e)).handleMoreClick=function(e,a){var r=t.props.rootStore.routing;switch(a){case"setting":t.trigger("user.setting",{});break;case"notification":t.trigger("notification.user.setting",{});break;case"about":t.setState({showAbout:!0});break;case"logout":t.props.rootStore.logout();break;case"support":r.push("/support")}},t.hideAboutModal=function(){t.setState({showAbout:!1})},t.store=new O.default,t.state={showAbout:!1},t}return(0,f.default)(r,[{key:"renderDropDown",value:function(){return h.default.createElement(E.Menu,{onClick:this.handleMoreClick},h.default.createElement(E.Menu.MenuItem,{key:"setting"},h.default.createElement(E.Icon,{name:"wrench"})," ",t("USER_SETTINGS")),h.default.createElement(E.Menu.MenuItem,{key:"notification"},h.default.createElement(E.Icon,{name:"loudspeaker"})," ",t("NOTIFICATION_SETTINGS")),h.default.createElement(E.Menu.MenuItem,{key:"logout"},h.default.createElement(E.Icon,{name:"logout"})," ",t("LOG_OUT")),h.default.createElement(E.Menu.MenuItem,{key:"about"},h.default.createElement(E.Icon,{name:"information"})," ",t("ABOUT")))}},{key:"renderModals",value:function(){return h.default.createElement("div",null,h.default.createElement(b.default,{visible:this.state.showAbout,onCancel:this.hideAboutModal}))}},{key:"render",value:function(){var e=this.props,a=e.className,r=e.isAppsPage;return globals.user?h.default.createElement("div",{className:(0,y.default)(S.default.logined,a)},h.default.createElement(E.Dropdown,{content:this.renderDropDown(),placement:"bottomRight"},h.default.createElement("div",{className:(0,y.default)(S.default.name,(0,c.default)({},S.default.isAppsPage,r))},h.default.createElement(E.Icon,{name:"human"}),globals.user.username,h.default.createElement(E.Icon,{name:"caret-down",type:r?"white":"dark"}))),this.renderModals()):h.default.createElement("div",{className:(0,y.default)(S.default.notLoggedIn,a)},h.default.createElement("div",{className:S.default.name},h.default.createElement(E.Icon,{name:"human",color:{primary:"#f5a623",secondary:"#8d663e"}}),h.default.createElement("a",{className:S.default.loginLabel,href:"/login?referer=".concat(location.pathname)},t("LOG_IN"))))}}]),r}(h.Component),o.propTypes={isAppsPage:v.default.bool},u=i))||u)||u)||u;a.default=D},function(e,a,r){"use strict";r(15);var n=r(157),l=r(20);r(12),r(109),r(5),r(18),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(18),r(42),r(4),r(23),r(57),r(17);var u=l(r(315)),o=l(r(30)),i=l(r(36)),c=l(r(37)),s=l(r(55)),f=l(r(56)),d=l(r(51)),p=n(r(0)),m=l(r(1)),h=l(r(787)),v=l(r(3)),g=l(r(4108)),y=l(r(4109)),E=l(r(1792)),b=l(r(1793)),_=l(r(1794)),O=l(r(201)),S=l(r(4110)),C=r(52),D=l(r(4112));function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var N=[{icon:E.default,title:"KSE_FEATURE_1"},{icon:b.default,title:"KSE_FEATURE_2"},{icon:_.default,title:"KSE_FEATURE_3"}],T=[{title:"KSC_FEATURE_BACKUP",desc:["KSC_FEATURE_BACKUP_APP_DESC","KSC_FEATURE_BACKUP_DATA_DESC","KSC_FEATURE_BACKUP_CLOUD_DESC"],img:"/assets/support-backup.svg"},{title:"KSC_FEATURE_INSPECTION",desc:["KSC_FEATURE_INSPECTION_VULN_DESC","KSC_FEATURE_INSPECTION_SECURITY_DESC","KSC_FEATURE_INSPECTION_BEST_DESC"],img:"/assets/support-cluster-inspection.svg"},{title:"KSC_FEATURE_LIGHTWEIGHT",desc:["KSC_FEATURE_LIGHTWEIGHT_START_DESC","KSC_FEATURE_LIGHTWEIGHT_KS_DESC","KSC_FEATURE_LIGHTWEIGHT_TEST_DESC"],img:"/assets/support-light-cluster.svg"}],R=function(e){(0,s.default)(r,e);var a=k(r);function r(){var e;(0,i.default)(this,r);for(var n=arguments.length,l=new Array(n),u=0;u0&&void 0!==arguments[0]?arguments[0]:{},a=e.props.current;return t.children?t.children.some((function(t){return e.checkSelect(t)})):t.tabs?t.tabs.some((function(t){return e.checkSelect(t)})):0===a.indexOf(t.name)},e.handleOpen=function(){var t=e.props;(0,t.onOpen)(t.item.name)},e}return(0,o.default)(r,[{key:"renderDisabledTip",value:function(e){return"CLUSTER_UPGRADE_REQUIRED"===e.reason?f.default.createElement(m.Tooltip,{content:t(e.reason,{version:e.requiredClusterVersion}),placement:"topRight"},f.default.createElement(m.Icon,{name:"update",className:v.default.extraIcon,color:{primary:"#ffc781",secondary:"#f5a623"}})):"UNAUTHORIZED"===e.reason?f.default.createElement(m.Tooltip,{content:f.default.createElement("div",null,f.default.createElement("p",{className:"font-bold"},t("UNAUTHORIZED_FEATURE")),f.default.createElement("p",null,t("UNAUTHORIZED_FEATURE_DESC"))),placement:"topRight"},f.default.createElement(m.Icon,{name:"lock",className:v.default.extraIcon})):null}},{key:"render",value:function(){var e,a,r=this,n=this.props,u=n.item,o=n.prefix,i=n.disabled,c=n.onClick,s=n.isOpen,d=(i||u.disabled)&&!u.showInDisable;return u.children?f.default.createElement("li",{className:(0,p.default)((a={},(0,l.default)(a,v.default.childSelect,this.checkSelect(u)),(0,l.default)(a,v.default.open,u.open||s),(0,l.default)(a,v.default.disabled,d),a))},f.default.createElement("div",{className:v.default.title,onClick:this.handleOpen},f.default.createElement(m.Icon,{name:u.icon}),f.default.createElement("span",{className:"nav-title"},t(u.title)),!d&&!u.open&&f.default.createElement(m.Icon,{name:"chevron-down",className:(0,p.default)(v.default.rightIcon,"nav_fold_icon")}),d&&this.renderDisabledTip(u)),f.default.createElement("ul",{className:(0,p.default)(v.default.innerNav,"children_nav")},u.children.map((function(e){var a,n=(i||e.disabled)&&!e.showInDisable;return f.default.createElement("li",{key:e.name,className:(0,p.default)((a={},(0,l.default)(a,v.default.select,r.checkSelect(e)),(0,l.default)(a,v.default.disabled,n),a))},f.default.createElement(h.default,{to:"".concat(o,"/").concat(e.name),disabled:n},t(e.title),n&&r.renderDisabledTip(e)))})))):f.default.createElement("li",{key:u.name,className:(0,p.default)((e={},(0,l.default)(e,v.default.select,this.checkSelect(u)),(0,l.default)(e,v.default.disabled,d),e))},f.default.createElement(h.default,{to:"".concat(o,"/").concat(u.name),onClick:c,disabled:d},f.default.createElement(m.Icon,{name:u.icon}),f.default.createElement("span",{className:"nav-title"},t(u.title)),d&&this.renderDisabledTip(u)))}}]),r}(f.default.Component);a.default=y,y.propTypes={item:d.default.object,current:d.default.string,prefix:d.default.string,onClick:d.default.func,onOpen:d.default.func,disabled:d.default.bool}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(18),a(16),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(42),a(16),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(1)),f=r(a(26)),d=a(186),p=r(a(787)),m=r(a(4118)),h=r(a(1859));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var g=function(e){(0,u.default)(a,e);var t=v(a);function a(){var e;(0,n.default)(this,a);for(var r=arguments.length,l=new Array(r),u=0;u=r.threshold-2&&r.props.onScrollBottom()},r.handleMenuClick=function(e,t){r.props.onSelect(t)},r.contentRef=s.default.createRef(),r}return(0,u.default)(a,[{key:"componentDidMount",value:function(){this.contentRef.current&&(this.$dropdownContent=this.contentRef.current.querySelector(".dropdown-content"),this.$dropdownContent.addEventListener("scroll",this.handleScroll))}},{key:"componentWillUnmount",value:function(){this.$dropdownContent&&this.$dropdownContent.removeEventListener("scroll",this.handleScroll)}},{key:"componentDidUpdate",value:function(){if(this.contentRef.current){var e=this.contentRef.current.querySelector(".dropdown-content > .menu-wrapper");e&&this.$dropdownContent&&(this.threshold=e.offsetHeight-this.$dropdownContent.offsetHeight)}}},{key:"renderList",value:function(){var e=this.props,t=e.defaultIcon,a=e.options,r=e.loading;return this.isMulti?s.default.createElement("div",{className:"menu-wrapper"},s.default.createElement(p.Menu,{width:220,onClick:this.handleMenuClick},a.map((function(e){return s.default.createElement(p.Menu.MenuItem,{key:e.value},s.default.createElement("img",{src:t,alt:""}),e.label)}))),s.default.createElement("div",{className:m.default.bottom},r&&s.default.createElement(p.Loading,{size:"small"}))):null}},{key:"render",value:function(){var e=this.props,t=e.icon,a=e.defaultIcon,r=e.value,l=e.type,u=e.options.find((function(e){return e.value===r}))||{};return s.default.createElement("div",{ref:this.contentRef},s.default.createElement(p.Dropdown,{theme:"dark",content:this.renderList()},s.default.createElement("div",{className:(0,d.default)(m.default.titleWrapper,(0,n.default)({},m.default.multi,this.isMulti))},s.default.createElement("div",{className:m.default.icon},s.default.createElement("img",{src:t||a,alt:""})),s.default.createElement("div",{className:m.default.text},s.default.createElement("p",null,l),s.default.createElement("div",{className:"h6"},u.label||r)),this.isMulti&&s.default.createElement("div",{className:m.default.arrow},s.default.createElement(p.Icon,{name:"caret-down",type:"light"})))))}},{key:"isMulti",get:function(){return this.props.options.length>1}}]),a}(s.default.Component);t.default=v,v.propTypes={icon:f.default.string,defaultIcon:f.default.string,value:f.default.string,type:f.default.string,loading:f.default.bool,options:f.default.array,onSelect:f.default.func,onScrollBottom:f.default.func},v.defaultProps={icon:"",defaultIcon:"",value:"",type:"",loading:!1,options:[],onSelect:function(){},onScrollBottom:function(){}}},function(e,t,a){e.exports={titleWrapper:"hSrp7rCyCg7SchEgVy_6y",icon:"_2GbxzJxwkGJD0qR41rMvpH",text:"t6iKjSPDFDOpWCtkS9Doa",arrow:"_3CTcTkgyEHMTpuCoayziCN",multi:"_1K5LDanfLvQQx8llb9YYT",bottom:"F7S4b1XHdXUSGAHB8uNAY"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){e.exports={wrapper:"_3ZtD5eAqH6AUKiDsz0pcAL",image:"Z7KWsw8fF2407V0aEX6SL",title:"_1KAJCl-kZirxlIa0q1yvdz",icon:"nGJu81QzoLuEo79G9vRpL",desc:"_1cgFUO3Bn5CsfWNgdOnzXf",canClick:"_34eEiZ0jC_waLj3cMn-bvD",isIcon:"_1yS8-xmglVH3M6Rb93PRbY",avatarIcon:"-giQOuJDvs9ioohUF1exA",letter:"_1X9WSgZJV4No7YWrHu0-6F"}},,,function(e,t,a){e.exports={cluster:"_2-ftWaI1a83L_0QqFrKD99",empty:"_3fjV7wo2CrhJ-5dXt_w3sp",desc:"_2sUA2vSFa_k4PbErr_vSfy",descTitle:"_2Rf6kTh0pgiyXfTNdjDb3A",container:"_1fc3jibbrO6vS2Nv3ZJMan",title:"_249VJGOOlE7eJT31tEzv36"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";var r=a(20);a(12),a(11),a(31),a(6),a(84),a(86),a(18),a(16),a(27),a(190),a(9),a(13),a(10),a(316),a(85),a(7),Object.defineProperty(t,"__esModule",{value:!0}),t.processEdges=t.processData=void 0;var n=r(a(30));a(12),a(11),a(31),a(6),a(84),a(86),a(18),a(28),a(16),a(27),a(190),a(34),a(15),a(9),a(13),a(10),a(4),a(316),a(85),a(7);var l=r(a(26)),u=r(a(74)),o=r(a(63)),i=r(a(855)),c=r(a(321)),s=r(a(1891));function f(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function d(e){for(var t=1;t0&&t.setNode(a.name,{name:a.name,width:226,height:l,workloadNum:n.length,isGateway:u}),a.workloads=n,a.edges.out.forEach((function(n){var l=e.find((function(e){return e.ids.includes(n.data.target)}));l&&l.name&&(t.setEdge(a.name,l.name,{id:n.data.id,out:a.edges.out,name:a.name,targetName:l.name}),r[n.data.id]=n)}))})),s.default.layout(t);var n=[],l=[];return t.nodes().forEach((function(e){var r=t.node(e);r.workloadNum>1&&(r.y-=110*(r.workloadNum-1)),n.push(d(d({},a[e]),{},{position:r}))})),t.edges().forEach((function(e){var n=t.edge(e),u=t.node(n.name),o=t.node(n.targetName),i=r[n.id],c=n.out.filter((function(e){return e.data.target===i.data.target})),s=n.points.length;if(s>0)if(3===s&&(n.points=[n.points[0],n.points[s-1]],s=n.points.length),u.isGateway)l.push(d(d({},i),{},{position:{points:[{x:u.x+u.width+-20,y:u.y+u.height/2+36},{x:o.x,y:o.y+o.height/2+36}]}}));else{var f=a[n.name].workloads.map((function(e){return e.data.id}));c.forEach((function(e){var t=f.indexOf(e.data.source),a={points:[{x:u.x+u.width,y:u.y+220*(t+.5)+36},{x:o.x,y:o.y+o.height/2+30*(t+1)}]};l.push(d(d({},e),{},{position:a}))}))}})),{nodes:n,edges:l}}(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.nodes,a=void 0===t?[]:t,r=e.edges,n=void 0===r?[]:r,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,o.default)(a))return[];for(var u=[],c={},s=0;s0)return"tcpActive";var a=0,n=0;return t.rates.http>0?(a=Number(t.rates.http),n=t.rates.httpPercentErr>0?Number(t.rates.httpPercentErr):0):t.rates.grpc>0&&(a=Number(t.rates.grpc),n=t.rates.grpcPercentErr>0?Number(t.rates.grpcPercentErr):0),0===a?"nodata":n>20?"error":n>.1?"degrade":"active"},r.getPath=function(){var e,t=r.props.data;if(t.position.points.length<=2){var a=(0,l.default)(t.position.points,2),n=a[0],u=a[1],o=(n.x+u.x)/2,i=(u.y-n.y)/4;e="M".concat(n.x,",").concat(n.y," C").concat(o,",").concat(n.y+i," ").concat(o,",").concat(u.y-i," ").concat(u.x,",").concat(u.y)}else e=t.position.points.reduce((function(e,t){return""===e?"M".concat(t.x,",").concat(t.y):-1!==e.indexOf("C")?"".concat(e,", ").concat(t.x," ").concat(t.y):"".concat(e," C").concat(t.x," ").concat(t.y)}),"");return e},r.hoverRef=f.default.createRef(),r}return(0,o.default)(a,[{key:"componentDidMount",value:function(){this.hoverRef.current&&(this.hoverRef.current.addEventListener("mouseover",this.handleMouseover),this.hoverRef.current.addEventListener("mouseout",this.handleMouseout))}},{key:"componentWillUnmount",value:function(){this.hoverRef.current&&(this.hoverRef.current.removeEventListener("mouseover",this.handleMouseover),this.hoverRef.current.removeEventListener("mouseout",this.handleMouseout))}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.selected,r=this.getPath(),l=this.getStatus(),u=(0,d.default)(h.default.path,h.default[l],(0,n.default)({},h.default.selected,a)),o=(0,d.default)(h.default.marker,h.default[l]);return f.default.createElement("g",null,f.default.createElement("defs",null,f.default.createElement("marker",{id:"triangle-".concat(l),viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse"},f.default.createElement("path",{d:"M 0 0 L 10 5 L 0 10 z",className:o})),f.default.createElement("marker",{id:"dot-".concat(l),viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"5",markerHeight:"5"},f.default.createElement("circle",{cx:"5",cy:"5",r:"5",className:o}))),f.default.createElement("path",{className:u,id:t.data.id,d:r,markerStart:"url(#dot-".concat(l,")"),markerEnd:"url(#triangle-".concat(l,")")}),f.default.createElement("path",{ref:this.hoverRef,d:r,fill:"none",stroke:"transparent",strokeWidth:"30"}),["active","tcpActive"].includes(l)&&f.default.createElement("circle",{r:"6",className:o},f.default.createElement("animateMotion",{dur:"6s",repeatCount:"indefinite"},f.default.createElement("mpath",{xlinkHref:"#".concat(t.data.id)}))),f.default.createElement("text",{width:"500",className:o,transform:"translate(0 -20)"},f.default.createElement("textPath",{xlinkHref:"#".concat(t.data.id),startOffset:"50%",textAnchor:"middle"},this.traffic)))}},{key:"traffic",get:function(){var e=this.props.data,t=(0,p.default)(e,"data.traffic"),a=(0,p.default)(t,"rates.tcp");if(!(0,m.default)(a))return"".concat(a," B/s");var r=(0,p.default)(t,"rates.http",0);return"".concat(r," RPS")}}]),a}(f.default.Component);t.default=g},function(e,t,a){e.exports={path:"f-qkOuFPRte0_-Z7QO_at",error:"C5K1TNQ2EeQCuscsvuVBr",active:"q8TR7qYUjNW5At4k1uzji",tcpActive:"_3s88I6Eoh7DqzdiCvZUuG9",selected:"_3Y5xaV3Vvhnr7rlXGL7l8q",marker:"_3q-X0_f1j8nrDn4cbDKE9b"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(18),r(87),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(18),r(87),r(42),r(16),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(0)),d=n(r(1)),p=n(r(26)),m=n(r(321)),h=n(r(855)),v=n(r(3)),g=n(r(4745)),y=n(r(4747));function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var b=function(e){(0,i.default)(r,e);var a=E(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0,d=(0,p.default)(r,"health.workloadStatuses",[]).reduce((function(e,t){return e+(t.replicas||t.availableReplicas||0)}),0),E=(0,p.default)(r,"health.workloads",{}),b=(0,m.default)((0,p.default)(r,"edges.inner",[]),"data.target");return f.default.createElement("div",{className:"ks-app-component",onClick:s?this.handleClick:null,"data-component":r.name,style:{position:"absolute",top:r.position.y,left:r.position.x,zIndex:2}},s&&f.default.createElement("p",{className:y.default.title},r.name),f.default.createElement("div",{className:(0,v.default)((e={},(0,l.default)(e,y.default.group,s),(0,l.default)(e,y.default.selected,"app"===i&&o.name===r.name),(0,l.default)(e,y.default.error,(0,p.default)(r,"health.requests.errorRatio")>0||(0,p.default)(r,"health.service.requests.errorRatio")>0),e))},s&&f.default.createElement("p",{className:y.default.pods},f.default.createElement("img",{src:"/assets/health.svg",alt:""}),t("PODS"),": ",d),c.service&&c.service.map((function(e){return f.default.createElement("div",{key:e.data.id,"data-service":e.data.service,"data-service-id":e.data.id})})),c.app&&c.app.map((function(e){return f.default.createElement(g.default,{className:y.default.app,key:e.data.id,data:e.data,edge:b[e.data.id],health:E[e.data.workload],inGroup:s,store:n})}))))}}]),r}(f.default.Component);a.default=b,b.propTypes={data:d.default.object},b.contextTypes={selectedData:d.default.object,selectedType:d.default.string,onSelectApp:d.default.func}},function(e,a,r){"use strict";r(15);var n=r(20);r(86),r(190),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(86),r(42),r(190),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(26)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=r(186),v=n(r(4746));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var y=function(e){(0,i.default)(r,e);var a=g(r);function r(){return(0,u.default)(this,r),a.apply(this,arguments)}return(0,o.default)(r,[{key:"renderHTTPMetrics",value:function(){var e=this.props,a=e.health,r=e.edge,n=(0,f.default)(a,"requests.errorRatio"),l=(0,f.default)(r,"data.traffic.rates.http",0),u=-1===n?NaN:(100-n).toFixed(2),o=(0,f.default)(r,"data.responseTime",NaN);return d.default.createElement("div",{className:v.default.detail},d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"changing-over",size:16})," ","".concat(l," RPS")),d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"check",size:16})," ",isNaN(u)?t("NO_DATA_SCAP"):"".concat(u,"%")),d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"timed-task",size:16})," ",isNaN(o)||"0"===o?t("NO_DATA_SCAP"):"".concat(o," ms")),d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"pod",size:16})," ",(0,f.default)(a,"workloadStatus.available")||(0,f.default)(a,"workloadStatus.availableReplicas")," ","/"," ",(0,f.default)(a,"workloadStatus.replicas")||(0,f.default)(a,"workloadStatus.desiredReplicas")))}},{key:"renderTCPMetrics",value:function(){var e=this.props,a=e.data,r=e.health,n=(0,f.default)(a,"traffic[0].rates.tcpIn"),l=(0,f.default)(a,"traffic[0].rates.tcpOut");return d.default.createElement("div",{className:v.default.detail},d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"next",size:16})," ",isNaN(n)?t("NO_DATA_SCAP"):"".concat(n," B/s")),d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"previous",size:16})," ",isNaN(l)?t("NO_DATA_SCAP"):"".concat(l," B/s")),d.default.createElement("p",null,d.default.createElement(h.Icon,{name:"pod",size:16})," ",(0,f.default)(r,"workloadStatus.availableReplicas")," /"," ",(0,f.default)(r,"workloadStatus.desiredReplicas")))}},{key:"renderDetail",value:function(){var e=this.props.edge;return"http"===((0,f.default)(e,"data.traffic.protocol")||"http")?this.renderHTTPMetrics():this.renderTCPMetrics()}},{key:"render",value:function(){var e=this.props,a=e.data,r=e.health,n=e.className,u=e.inGroup;if(-1!==a.app.indexOf("kubesphere")||"unknown"===a.app)return d.default.createElement("div",{className:(0,m.default)(v.default.card,n),"data-workload":a.workload,"data-workload-id":a.id,"data-group":u},d.default.createElement("div",{className:v.default.type},t("TRAFFIC_ENTRY")),d.default.createElement("div",{className:v.default.wrapper},d.default.createElement("div",{className:v.default.gatewayName},d.default.createElement(h.Icon,{name:"project",size:16}),a.targetNamespace)));var o=(0,f.default)(r,"requests.errorRatio");return d.default.createElement("div",{className:(0,m.default)(v.default.card,n,(0,l.default)({},v.default.error,o>0)),"data-workload":a.workload,"data-workload-id":a.id,"data-group":u},d.default.createElement("div",{className:v.default.type},a.hasCB&&d.default.createElement(h.Icon,{name:"thunder",type:"light"}),t("DEPLOYMENT")),d.default.createElement("div",{className:v.default.wrapper},this.renderDetail(),d.default.createElement("div",{className:v.default.workload},d.default.createElement("span",null,t("DEPLOYMENT")),d.default.createElement("span",null,a.workload))))}}]),r}(d.default.PureComponent);a.default=y,y.propTypes={data:p.default.object,health:p.default.object,edge:p.default.object},y.defaultProps={data:{},health:{},edge:{}}},function(e,t,a){e.exports={card:"_3UtyX1TwsMA4J5_I9azhk4",error:"_1f5z3cAVlVjSxozltEiLWa",type:"_3ig_hBH8qoAHkvUzs_7XPE",wrapper:"_2-NCjQfg1O19iTRk90LKv",detail:"_3Rb35sVDvzSTfvK_EvU8E6",gatewayName:"-s8vbKJS6TAxA3e75lQyx",workload:"_3hKVcpsaMemXWCdKAFDatc"}},function(e,t,a){e.exports={title:"vt11zKMrFCOLash0CtDuq",app:"_2VIFmapZqEet3i4h8IcfoT",group:"GBv7IxeMCUzEwP37i9ruG",selected:"_3hAJJY6cz3ePuX_85HtNfJ",error:"_3cHhj9ZjDA2V1eTNhECHpo",pods:"_2g9MF0hWsSUsXH7jreOBwD"}},function(e,a,r){"use strict";r(15);var n=r(20);r(5),r(31),r(16),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(5),r(31),r(42),r(16),r(4),r(23),r(57),r(17);var l=n(r(30)),u=n(r(36)),o=n(r(37)),i=n(r(55)),c=n(r(56)),s=n(r(51)),f=n(r(26)),d=n(r(0)),p=n(r(1)),m=n(r(3)),h=r(186),v=n(r(4749)),g=n(r(4754)),y=n(r(4758)),E=n(r(4760));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,s.default)(e);if(t){var n=(0,s.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,c.default)(this,a)}}var _=h.Collapse.CollapseItem,O=function(e){(0,i.default)(r,e);var a=b(r);function r(){var e;(0,u.default)(this,r);for(var t=arguments.length,n=new Array(t),l=0;l0?100*(t-a)/t:NaN,n=(0,v.getMetricData)((0,f.default)(e,"request_duration_millis[0].datapoints",[]),NaN);return[{title:"TRAFFIC",data:t.toFixed(2),unit:"RPS",icon:"changing-over"},{title:"SUCCESS_RATE",data:r.toFixed(2),icon:"check",unit:"%"},{title:"DURATION",data:n.toFixed(2),icon:"timed-task",unit:"ms"}]}}]),r}(d.default.Component);a.default=_,_.propTypes={detail:p.default.object,store:p.default.object}},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(190),r(4),r(23),r(17),r(110),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(42),r(190),r(4),r(22),r(23),r(57),r(17),r(110);var l=n(r(315)),u=n(r(43));r(41);var o=n(r(44)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(26)),m=n(r(0)),h=n(r(1)),v=n(r(837)),g=r(794),y=r(474),E=r(798),b=n(r(1913)),_=n(r(4752)),O=n(r(1450));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,d.default)(e);if(t){var n=(0,d.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,f.default)(this,a)}}var C=function(e){(0,s.default)(n,e);var a,r=S(n);function n(e){var t;return(0,i.default)(this,n),(t=r.call(this,e)).handleWorkloadChange=function(e){t.setState({workload:e},(function(){return t.getData()}))},t.state={workload:(0,p.default)(e.detail,"workloads[0].data.workload"),metrics:{},outMetrics:{}},t.getData(),t}return(0,c.default)(n,[{key:"componentDidUpdate",value:function(e){var t=this;(0,v.default)(e.detail,this.props.detail)||this.setState({workload:(0,p.default)(this.props.detail,"workloads[0].data.workload")},(function(){t.getData()}))}},{key:"componentDidMount",value:function(){var e=this;this.interval=setInterval((function(){e.getData()}),1e4)}},{key:"componentWillUnmount",value:function(){this.interval&&clearInterval(this.interval)}},{key:"getData",value:(a=(0,o.default)(u.default.mark((function e(){var t,a,r=this;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.state.workload,a=this.props.store,t&&(this.store.fetchWorkloadMetrics({name:t,namespace:a.detail.namespace,cluster:a.detail.cluster},{duration:1800}).then((function(e){r.setState({metrics:e})})),this.store.fetchWorkloadMetrics({name:t,namespace:a.detail.namespace,cluster:a.detail.cluster},{duration:1800,direction:"outbound",reporter:"destination"}).then((function(e){r.setState({outMetrics:e})})));case 3:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"renderWorkloadSelect",value:function(){return m.default.createElement(_.default,{className:O.default.workloads,value:this.state.workload,options:this.workloads,onChange:this.handleWorkloadChange})}},{key:"render",value:function(){return"tcp"===this.props.protocol?m.default.createElement(m.default.Fragment,null,m.default.createElement("div",{className:O.default.title},t("TCP_INBOUND_TRAFFIC")," ",this.renderWorkloadSelect()),m.default.createElement(E.SimpleArea,(0,l.default)({},this.tcpInMetrics,{height:150})),m.default.createElement("div",{className:O.default.title},t("TCP_OUTBOUND_TRAFFIC")," ",this.renderWorkloadSelect()),m.default.createElement(E.SimpleArea,(0,l.default)({},this.tcpOutMetrics,{height:150}))):m.default.createElement(m.default.Fragment,null,m.default.createElement("div",{className:O.default.title},t("HTTP_INBOUND_TRAFFIC")," ",this.renderWorkloadSelect()),m.default.createElement(b.default,{metrics:this.trafficInMetrics}),m.default.createElement("div",{className:"margin-b8"}),m.default.createElement(E.SimpleArea,(0,l.default)({},this.requestInMetrics,{height:150})),m.default.createElement("div",{className:O.default.title},t("HTTP_OUTBOUND_TRAFFIC")," ",this.renderWorkloadSelect()),m.default.createElement(b.default,{metrics:this.trafficOutMetrics}),m.default.createElement("div",{className:"margin-b8"}),m.default.createElement(E.SimpleArea,(0,l.default)({},this.requestOutMetrics,{height:150})))}},{key:"store",get:function(){return this.props.store}},{key:"workloads",get:function(){return(0,p.default)(this.props.detail,"workloads",[]).map((function(e){return{label:(0,p.default)(e,"data.workload",""),value:(0,p.default)(e,"data.workload","")}}))}},{key:"requestInMetrics",get:function(){if(!this.props.detail)return[];var e=this.state.metrics,t=(0,p.default)(e,"request_count[0].datapoints",[]),a=(0,p.default)(e,"request_error_count[0].datapoints",[]),r=t.map((function(e,t){return(0,y.getSuccessCount)(e,a[t])}));return(0,g.getAreaChartOps)({title:"TRAFFIC",legend:["SUCCESSFUL","ALL"],areaColors:["#329dce","#d8dee5"],data:[{values:r},{values:t}],unit:"RPS"})}},{key:"requestOutMetrics",get:function(){if(!this.props.detail)return[];var e=this.state.outMetrics,t=(0,p.default)(e,"request_count[0].datapoints",[]),a=(0,p.default)(e,"request_error_count[0].datapoints",[]),r=t.map((function(e,t){return(0,y.getSuccessCount)(e,a[t])}));return(0,g.getAreaChartOps)({title:"TRAFFIC",legend:["SUCCESSFUL","ALL"],areaColors:["#329dce","#d8dee5"],data:[{values:r},{values:t}],unit:"RPS"})}},{key:"tcpInMetrics",get:function(){if(!this.props.detail)return[];var e=this.state.metrics,t=(0,p.default)(e,"tcp_received[0].datapoints",[]),a=(0,p.default)(e,"tcp_sent[0].datapoints",[]);return 0===t.length&&0===a.length?{}:(0,g.getAreaChartOps)({title:"BANDWIDTH",legend:["SENT","RECEIVED"],data:[{values:a},{values:t}],unit:"B/s"})}},{key:"tcpOutMetrics",get:function(){if(!this.props.detail)return{};var e=this.state.outMetrics,t=(0,p.default)(e,"metrics.tcp_received.matrix[0].values",[]),a=(0,p.default)(e,"tcp_sent[0].datapoints",[]);return 0===t.length&&0===a.length?{}:(0,g.getAreaChartOps)({title:"BANDWIDTH",legend:["SENT","RECEIVED"],data:[{values:a},{values:t}],unit:"B/s"})}},{key:"trafficInMetrics",get:function(){if(!this.props.detail)return[];var e=this.state.metrics,t=(0,y.getMetricData)((0,p.default)(e,"request_count[0].datapoints",[]),NaN),a=(0,y.getMetricData)((0,p.default)(e,"request_error_count[0].datapoints",[]),0),r=t>0?100*(t-a)/t:NaN,n=(0,y.getMetricData)((0,p.default)(e,"request_duration_millis[0].datapoints",[]),NaN);return[{title:"TRAFFIC",data:t.toFixed(2),unit:"RPS",icon:"changing-over"},{title:"SUCCESS_RATE",desc:"SUCCESS_RATE_SCAP",data:r.toFixed(2),icon:"check",unit:"%"},{title:"DURATION",data:n.toFixed(2),icon:"timed-task",unit:"ms"}]}},{key:"trafficOutMetrics",get:function(){if(!this.props.detail)return[];var e=this.state.outMetrics,t=(0,y.getMetricData)((0,p.default)(e,"request_count[0].datapoints",[]),NaN),a=(0,y.getMetricData)((0,p.default)(e,"request_error_count[0].datapoints",[]),0),r=t>0?100*(t-a)/t:NaN,n=(0,y.getMetricData)((0,p.default)(e,"request_duration_millis[0].datapoints",[]),NaN);return[{title:"TRAFFIC",data:t.toFixed(2),unit:"RPS",icon:"changing-over"},{title:"SUCCESS_RATE",desc:"SUCCESS_RATE_SCAP",data:r.toFixed(2),icon:"check",unit:"%"},{title:"DURATION",data:n.toFixed(2),icon:"timed-task",unit:"ms"}]}}]),n}(m.default.Component);a.default=C,C.propTypes={detail:h.default.object,store:h.default.object}},function(e,t,a){"use strict";a(15);var r=a(157),n=a(20);a(5),a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(18),a(42),a(4),a(23),a(57),a(17);var l=n(a(36)),u=n(a(37)),o=n(a(55)),i=n(a(56)),c=n(a(51)),s=r(a(0)),f=n(a(3)),d=a(186),p=n(a(4753));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var h=function(e){(0,o.default)(a,e);var t=m(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u1?r[l[0]]=l[1]:t=!1}return{result:r,status:t}}(a),n=r.result;r.status&&t.triggerChange((0,u.default)({},e,n))}else t.triggerChange((0,u.default)({},e,a))}))};var n=t.getOptions(),i=Object.keys(e.value)[0]||n[0].value,c=e.value[i];return"httpCookie"===i&&c&&(c=Object.entries(c).map((function(e){var t=(0,l.default)(e,2),a=t[0],r=t[1];return"".concat(a,"=").concat(r)})).join("; ")),t.state={type:i,value:c,propsValue:e.value},t}return(0,i.default)(r,[{key:"getOptions",value:function(){var e=this.props.protocol,a=[{label:t("HASH_BASED_ON_SOURCE_IP_ADDRESS"),value:"useSourceIp"},{label:t("HASH_BASED_ON_RINGHASH"),value:"ringHash"},{label:t("HASH_BASED_ON_MAGLEV"),value:"maglev"}];if("http"===e)return[{label:t("HASH_BASED_ON_HTTP_HEADER"),value:"httpHeaderName"},{label:t("HASH_BASED_ON_HTTP_COOKIE"),value:"httpCookie"},{label:t("HASH_BASED_ON_HTTP_QUERY_PARAMETE_NAME"),value:"httpQueryParameterName"}].concat(a)}},{key:"render",value:function(){var e=this.state,a=e.type,r=e.value;return p.default.createElement("div",null,p.default.createElement(h.Select,{value:a,options:this.getOptions(),onChange:this.handleTypeChange}),"httpHeaderName"===a&&p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{className:"margin-t12"},t("HTTP_HEADER")),p.default.createElement(h.Input,{value:r,onChange:this.handleValueChange})),"httpCookie"===a&&p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{className:"margin-t12"},t("HTTP_COOKIE")),p.default.createElement(h.Input,{value:r,onChange:this.handleValueChange,placeholder:"key1=value1; key2=value2"})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.value!==t.propsValue){var a=Object.keys(e.value)[0],r=e.value[a];return"httpCookie"===a&&r&&(r=Object.entries(r).map((function(e){var t=(0,l.default)(e,2),a=t[0],r=t[1];return"".concat(a,"=").concat(r)})).join("; ")),{type:a,value:r,propsValue:e.value}}return null}}]),r}(p.default.Component);a.default=g,g.propTypes={value:m.default.object,onChange:m.default.func},g.defaultProps={value:{},onChange:function(){}}},function(e,t,a){e.exports={alert:"_1vmq3lFL4s_LHc4G92GrAd",title:"UJTgRS_diNzcvnFtP8moj",tip:"IYAZYjWhc7hDQqpGq-eJy"}},function(e,a,r){"use strict";var n=r(20);r(12),r(5),r(11),r(6),r(29),r(73),r(18),r(16),r(9),r(13),r(10),r(4),r(22),r(23),r(24),r(17),r(38),r(62),r(7),r(32),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(45),r(5),r(11),r(6),r(29),r(73),r(18),r(28),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(22),r(23),r(57),r(24),r(17),r(38),r(62),r(7),r(32);var l=n(r(43)),u=n(r(30));r(41);var o,i=n(r(44)),c=n(r(36)),s=n(r(37)),f=n(r(55)),d=n(r(56)),p=n(r(51)),m=n(r(0)),h=r(47),v=r(433),g=n(r(26)),y=r(14),E=r(186),b=n(r(837)),_=r(52),O=n(r(452)),S=n(r(318)),C=n(r(4759)),D=n(r(1914));function k(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function N(e){for(var t=1;t0&&f.default.createElement("div",{className:g.default.errorSpans},1===S?t("NUM_ERROR_SI",{num:S}):t("NUM_ERROR_PL",{num:S}))),f.default.createElement("ul",{className:g.default.services},(0,s.default)(u,"name").map((function(e){return f.default.createElement("li",{key:e.name},f.default.createElement("span",{className:g.default.tag,style:{backgroundColor:d[e.name]}}),"".concat(e.name," (").concat(e.numberOfSpans,")"))}))),f.default.createElement("div",{className:g.default.startTime},f.default.createElement("p",null,(0,h.formatRelativeDate)(o/1e3),"  |  ",f.default.createElement("strong",null,b)),f.default.createElement("p",null,_))))}}]),r}(f.default.Component);a.default=b,b.propTypes={className:d.default.string,onClick:d.default.func,detail:d.default.object,durationPercent:d.default.number},b.defaultProps={onClick:function(){},durationPercent:0,detail:{}}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(16),a(190),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a(30)),l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51));a(45),a(5),a(42),a(16),a(190),a(4),a(23),a(57),a(17);var s=r(a(0)),f=r(a(3)),d=a(186),p=a(1021),m=r(a(4768));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}function v(e){return"".concat((100*e).toFixed(1),"%")}var g=function(e){(0,o.default)(a,e);var t=h(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u1-c.end?"Left":"Right",s.default.createElement("li",{className:(0,f.default)(m.default.wrapper,(0,n.default)({},m.default.selected,u)),onClick:this.handleClick},s.default.createElement(d.Columns,{className:"is-gapless"},s.default.createElement(d.Column,{className:"is-3"},s.default.createElement("div",{className:m.default.nameWrapper},s.default.createElement("span",{className:m.default.padder,style:{paddingLeft:12*(a.depth+1)}}),s.default.createElement("a",{className:m.default.name,style:{borderColor:r}},s.default.createElement("span",{className:m.default.svc},o&&s.default.createElement(d.Icon,{name:"error",color:{primary:"#fff",secondary:"#ea4641"}}),a.process.serviceName," "),s.default.createElement("span",{className:m.default.endpoint},a.operationName)))),s.default.createElement(d.Column,{className:"margin-l12 margin-r12"},s.default.createElement("div",{className:m.default.barWrapper},s.default.createElement("div",{className:m.default.bar,style:{backgroundColor:r,left:v(c.start),width:v(c.end-c.start)}},s.default.createElement("div",{className:(0,f.default)(m.default.barLabel,m.default["barLabel".concat(e)])},i))))))}}]),a}(s.default.Component);t.default=g},function(e,t,a){e.exports={wrapper:"_3FpC5ye7GyQiA_9XNgx040",selected:"_11AetUGUuNRQbhOiVaaPrQ",nameWrapper:"cWTG60H4pfEzvUaUIBzkJ",name:"vjWzJJl5QXyvJrZh0yxG1",svc:"_1-OgJnOWAnoA9-4y_V7v6",endpoint:"_6EPxZpgSu0q2JNsNKM8dH",padder:"XpivfNFuNAu6Z00f5sn1b",barWrapper:"_2jIAbOYlOMtqtmQQ44uZ1a",bar:"_1kkSL2CR5ItZrLhBYy8cx4",barLabel:"_2jh31S8ET1p5RAOzk3mU13",barLabelLeft:"_32_b1BUKqADygs-iprfczz",barLabelRight:"_3V0eVtgfe3fOMxrkhggaoC"}},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(16),r(4),r(23),r(24),r(17),r(136),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51));r(45),r(18),r(191),r(42),r(16),r(159),r(4),r(23),r(57),r(17);var s=n(r(63)),f=n(r(0)),d=r(186),p=n(r(1045)),m=r(1021),h=n(r(4770));function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var g=function(e,t){switch(e){case"bool":return String(t);case"string":case"number":return t;default:return JSON.stringify(t)}},y=function(e){var t=e.data;return f.default.createElement("ul",{className:h.default.properties},t.map((function(e){return f.default.createElement("li",{key:e.key},f.default.createElement("span",null,e.key,": "),f.default.createElement("span",null,g(e.type,e.value)))})))},E=function(e){var t=e.data,a=e.startTime;return f.default.createElement("div",null,t.map((function(e){var t=(0,m.formatDuration)(e.timestamp-a);return f.default.createElement("div",{key:e.timestamp,classNames:h.default.log},f.default.createElement("span",null,t),e.fields.map((function(e){return f.default.createElement("span",{className:"margin-l12",key:e.key},f.default.createElement("span",null,e.key,"= "),f.default.createElement("span",null,f.default.createElement("strong",null," ",g(e.type,e.value))))})))})))},b=function(e){(0,o.default)(r,e);var a=v(r);function r(e){var t;return(0,l.default)(this,r),(t=a.call(this,e)).handleTypeChange=function(e){t.setState({type:e})},t.renderContentBody=function(){var e=t.props.span;switch(t.state.type){case"tags":return f.default.createElement(y,{data:e.tags});case"process":return f.default.createElement(y,{data:e.process.tags});case"logs":return f.default.createElement(E,{data:e.logs,startTime:e.startTime-e.relativeStartTime})}return null},t.state={type:"tags"},t}return(0,u.default)(r,[{key:"componentDidUpdate",value:function(e){this.props.span!==e.span&&this.setState({type:"tags"})}},{key:"render",value:function(){var e=this.props,a=e.span,r=e.onClose,n=this.state.type,l=(0,m.formatDuration)(a.relativeStartTime),u=(0,m.formatDuration)(a.duration),o=a.process.serviceName.split(".")[0];return f.default.createElement("div",{className:h.default.wrapper},f.default.createElement("div",{className:h.default.header},f.default.createElement(d.Icon,{name:"target",size:40}),f.default.createElement("div",{className:h.default.text},f.default.createElement("div",{className:h.default.name},a.process.serviceName,f.default.createElement(p.default,{name:t("SERVICE"),value:o}),f.default.createElement(p.default,{name:t("START_TIME"),value:l}),f.default.createElement(p.default,{name:t("DURATION"),value:u})),f.default.createElement("p",null,a.operationName)),f.default.createElement("div",{className:h.default.close,onClick:r},f.default.createElement(d.Icon,{name:"minimize",size:20}))),f.default.createElement("div",{className:h.default.content},f.default.createElement("div",{className:h.default.contentHeader},f.default.createElement(d.RadioGroup,{mode:"button",buttonWidth:155,value:n,onChange:this.handleTypeChange,size:"small"},f.default.createElement(d.RadioButton,{value:"tags"},t("TAG")),f.default.createElement(d.RadioButton,{value:"process"},t("PROCESS")),!(0,s.default)(a.logs)&&f.default.createElement(d.RadioButton,{value:"logs"},t("LOG")))),f.default.createElement("div",{className:h.default.contentBody},this.renderContentBody())))}}]),r}(f.default.Component);a.default=b},function(e,t,a){e.exports={wrapper:"_2SrTH5oLaYBNtgxSsaIe1_",header:"_14VaoFxYI4xrb8vE4XX7q_",text:"_1iF8T6gN1lf2KdP5iGWCtN",name:"afCuDDLbVrc6EwA9B7J42",content:"iQqWGMwUNDUNhZckjqUKb",contentHeader:"I7j76faUqwX3zA4eEVJQG",contentBody:"_3soUTBQ4emfUy3qasSxMm1",properties:"_33lp7a1-5ZP0KxxrDJPaa-",close:"PLv31nTie7tGWOvDkQJv1",log:"Wzdc9MCTDUaK_p6l27wct"}},function(e,t,a){"use strict";a(15);var r=a(20);a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=r(a(63)),f=r(a(4772)),d=r(a(4773)),p=r(a(1918));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var h=function(e){(0,u.default)(a,e);var t=m(a);function a(){return(0,n.default)(this,a),t.apply(this,arguments)}return(0,l.default)(a,[{key:"render",value:function(){var e=this.props,t=e.data,a=e.viewRange,r=e.onRangeChange;return(0,s.default)(t)?null:c.default.createElement("div",{className:p.default.graph},c.default.createElement(f.default,{data:t}),c.default.createElement(d.default,{data:t,viewRange:a,onRangeChange:r}))}}]),a}(c.default.Component);t.default=h},function(e,t,a){"use strict";a(15);var r=a(20);a(18),a(4),a(23),a(17),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(18),a(42),a(4),a(23),a(57),a(17);var n=r(a(36)),l=r(a(37)),u=r(a(55)),o=r(a(56)),i=r(a(51)),c=r(a(0)),s=a(1021);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,i.default)(e);if(t){var n=(0,i.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,o.default)(this,a)}}var d=function(e){(0,u.default)(a,e);var t=f(a);function a(e){var r;return(0,n.default)(this,a),(r=t.call(this,e)).getColor=function(e){return r.props.data.serviceColorMap[e]},r.canvas=c.default.createRef(),r}return(0,l.default)(a,[{key:"componentDidMount",value:function(){this.drawCanvas()}},{key:"drawCanvas",value:function(){if(this.canvas&&this.canvas.current){var e=this.props.data,t=e.spans.map((function(e){return{valueOffset:e.relativeStartTime,valueWidth:e.duration,serviceName:e.process.serviceName}}));(0,s.renderIntoCanvas)(this.canvas.current,t,e.duration,this.getColor)}}},{key:"render",value:function(){return c.default.createElement("canvas",{ref:this.canvas})}}]),a}(c.default.Component);t.default=d},function(e,a,r){"use strict";r(15);var n=r(20);r(18),r(190),r(4),r(23),r(17),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(45),r(18),r(28),r(42),r(190),r(4),r(23),r(57),r(17);var l=n(r(36)),u=n(r(37)),o=n(r(55)),i=n(r(56)),c=n(r(51)),s=n(r(0)),f=r(1021),d=n(r(1918));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=function(e){(0,o.default)(r,e);var a=p(r);function r(e){var t;return(0,l.default)(this,r),(t=a.call(this,e)).handleMouseDown=function(e){t.originX=e.x,t.hideCursorGuide();var a=t.svgBound,r=a.left,n=a.width,l=Math.max(e.x-r,0)/n;t.setState({viewStart:l,viewEnd:l})},t.handleMouseUp=function(){t.originX=-1;var e=t.state,a=e.viewStart,r=e.viewEnd;Math.abs(a-r)>.01&&t.props.onRangeChange({viewStart:a,viewEnd:r})},t.handleMouseLeave=function(){t.hideCursorGuide()},t.handleMouseMove=function(e){if(t.originX>-1){var a=t.svgBound,r=a.left,n=a.width,l=Math.max(e.x-r,0)/n;l>t.state.viewStart?t.setState({viewEnd:l}):t.setState({viewStart:l})}else t.showCursorGuide(e)},t.handleClear=function(){t.props.onRangeChange({viewStart:0,viewEnd:1})},t.showCursorGuide=function(e){if(t.cursorGuide)for(var a=t.svgBound,r=a.left,n=a.width,l=Math.max(e.x-r,0)/n,u="".concat(100*l,"%"),o=0;o0&&r<1,l="".concat(100*a,"%"),u="".concat(100*r,"%"),o=this.getCoords();return s.default.createElement("div",{className:d.default.range},s.default.createElement("svg",{height:"100%",width:"100%",ref:this.svg},s.default.createElement("g",{className:d.default.coord},o.map((function(e,t){return s.default.createElement("g",{key:e.value,className:d.default.coordLine},s.default.createElement("line",{y1:"0%",y2:"100%",x1:e.percent,x2:e.percent}),s.default.createElement("text",{x:e.percent,y:12,transform:t===f.COORD_COUNT?"translate(-2,0)":"translate(2,0)",textAnchor:t===f.COORD_COUNT?"end":"start"},(0,f.formatDuration)(e.value)))}))),s.default.createElement("g",{className:d.default.cursorGuide,name:"cursor-guide"},s.default.createElement("line",{y1:0,y2:58,strokeWidth:"1",stroke:"#212b36",strokeOpacity:"0",strokeDasharray:"2,2"}),s.default.createElement("line",{y1:19,y2:41,stroke:"#242e42",strokeWidth:"4",strokeOpacity:"0",strokeLinecap:"round"}),s.default.createElement("line",{y1:0,y2:58,strokeWidth:"20",stroke:"transparent"})),n&&s.default.createElement("g",{className:d.default.scrubber},s.default.createElement("line",{className:d.default.scrubberLine,y1:"0%",y2:"100%",x1:l,x2:l}),s.default.createElement("line",{className:d.default.scrubberLine,y1:"0%",y2:"100%",x1:u,x2:u}))),n&&s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:d.default.hoverBlock,style:{left:0,width:l}}),s.default.createElement("div",{className:d.default.hoverBlock,style:{left:u,width:"".concat(100*(1-r),"%")}}),s.default.createElement("div",{className:d.default.clearBlock,onClick:this.handleClear},t("CLEAR"))))}}]),r}(s.default.Component);a.default=m},function(e,t,a){e.exports={body:"_1pPFSIIbH7oLnLwkgHOLB5",header:"_2DMYdLCQ-OBk0rFii_9W5O",title:"_1Erbw_1JjBawD0kM-G52ln",name:"_3ugl6RaS7fK6PUFj7hPqwZ",close:"_2i5KJmq9o9HmC3fp0B5rPv",content:"_1lhG8ZLZp0syy6MTsAqY-_",wrapper:"_3n2YybElrtxWe2nOf7ZQUa",timelineTitle:"_3kkKn_rpepfTAFlapQ4YVK",leftPane:"pfziZWcqAxnmD-tb1Ip10",rightPane:"_36cdSAMcGZ9FJ-_068PDV_",timelineSelect:"_2mJV8zFMq6n5D4t-maCCmh",listPane:"GgsvlcpZCQVcsOdH3tQ6J",detailPane:"_4xyXvcotLTz6jMyjqWGbV",coords:"_20avL2qiM0J57r-UIzor8v"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(15);var r=a(20);a(11),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(11),a(28),a(4);var n=a(317),l=r(a(5249)),u=r(a(5251)),o=r(a(5258)),i="/clusters/:cluster/ippools/:name";t.default=function(e){var t=[{path:"".concat(i,"/workspaces"),title:"WORKSPACE_PL",component:l.default,exact:!0},{path:"".concat(i,"/namespaces"),title:"NAMESPACE_PL",component:u.default,exact:!0},{path:"".concat(i,"/pods"),title:"POD_PL",component:o.default,exact:!0}];return e?(t=t.filter((function(e){return"WORKSPACE_PL"!==e.title}))).push((0,n.getIndexRoute)({path:i,to:"".concat(i,"/namespaces"),exact:!0})):(t=t.filter((function(e){return"NAMESPACE_PL"!==e.title}))).push((0,n.getIndexRoute)({path:i,to:"".concat(i,"/workspaces"),exact:!0})),t}},function(e,a,r){"use strict";var n=r(20);r(12),r(109),r(5),r(11),r(6),r(73),r(18),r(87),r(16),r(9),r(13),r(10),r(4),r(23),r(17),r(7),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(12),r(109),r(45),r(5),r(11),r(6),r(73),r(18),r(28),r(87),r(42),r(16),r(34),r(15),r(9),r(13),r(10),r(4),r(23),r(57),r(17),r(7);var l,u,o=n(r(30)),i=n(r(36)),c=n(r(37)),s=n(r(55)),f=n(r(56)),d=n(r(51)),p=n(r(49)),m=n(r(789)),h=n(r(790)),v=n(r(26)),g=n(r(63)),y=r(14),E=r(239),b=n(r(0)),_=n(r(445)),O=r(52),S=n(r(5250));function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function D(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},a=e.props.cluster;return t.name&&(t.nameAndAlias=t.name,delete t.name),e.projectStore.fetchList(S(S({cluster:a},t),{},{limit:-1}))},e.handleOk=function(){var t=e.props.onOk,a=e.state.namespace,r=e.projectStore.list.data.find((function(e){return e.name===a}));t&&(null==t||t(r))},e.projectStore=new g.default,e.state={namespace:""},e}return(0,s.default)(r,[{key:"componentDidMount",value:function(){this.fetchProjects()}},{key:"getProjects",value:function(){var e=this.props.defaultValue,t=this.projectStore.list.data,a=t.filter((function(e){return"Terminating"!==e.status})).map((function(e){return{label:(0,E.showNameAndAlias)(e),value:e.name,disabled:e.isFedManaged,isFedManaged:e.isFedManaged}}));return e&&!t.find((function(t){return t.name===e}))&&a.unshift({label:e,value:e}),a}},{key:"render",value:function(){var e=this.props.onCancel,a=this.state.namespace;return m.default.createElement("div",{className:(0,h.default)(_.default.item)},m.default.createElement(v.Select,{options:this.getProjects(),isLoading:this.projectStore.list.isLoading,onChange:this.handleChange,defaultValue:a}),m.default.createElement("div",{className:_.default.operate},m.default.createElement(v.Button,{type:"control",onClick:this.handleOk},t("OK")),m.default.createElement(v.Button,{onClick:e},t("CANCEL"))))}}]),r}(m.default.Component),u.propTypes={onOk:y.default.func,onCancel:y.default.func},l=o))||l;a.default=D},function(e,t,a){e.exports={item:"_2VZojJMCcr5LCPjcy6xuXj",operate:"_2BjQJV11IdoAn6d-n9zWbC"}},function(e,t,a){e.exports={panel:"myyMir8aQeW7zvNdoD_ye",titleWrapper:"_12YJqhh4laJo2pSemgH7Bo",title:"_1LHpDb3CKBk2875n2BK-NW"}},function(e,t,a){"use strict";a(15);var r=a(20);a(5),a(4),a(23),a(24),a(17),a(62),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(45),a(5),a(42),a(4),a(23),a(57),a(24),a(17),a(62);var n,l=r(a(36)),u=r(a(37)),o=r(a(55)),i=r(a(56)),c=r(a(51)),s=r(a(0)),f=a(239),d=r(a(849));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=(0,c.default)(e);if(t){var n=(0,c.default)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return(0,i.default)(this,a)}}var m=(0,f.inject)("detailStore")(n=(0,f.observer)(n=function(e){(0,o.default)(a,e);var t=p(a);function a(){var e;(0,l.default)(this,a);for(var r=arguments.length,n=new Array(r),u=0;u @@ -108,4 +108,4 @@ var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,C=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case i:case s:case l:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case m:case u:return e;default:return t}}case a:return t}}}function x(e){return _(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=u,t.Element=o,t.ForwardRef=p,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=a,t.Profiler=s,t.StrictMode=l,t.Suspense=h,t.isAsyncMode=function(e){return x(e)||_(e)===f},t.isConcurrentMode=x,t.isContextConsumer=function(e){return _(e)===c},t.isContextProvider=function(e){return _(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return _(e)===p},t.isFragment=function(e){return _(e)===i},t.isLazy=function(e){return _(e)===g},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===a},t.isProfiler=function(e){return _(e)===s},t.isStrictMode=function(e){return _(e)===l},t.isSuspense=function(e){return _(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===l||e===h||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===u||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===C||e.$$typeof===w||e.$$typeof===y)},t.typeOf=_},function(e,t,n){"use strict";n(15),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){var e=document.createElement("div");e.innerHTML='\n