From 05b0116b1b4590b01ae191c37c4c427a611804ed Mon Sep 17 00:00:00 2001 From: brotherlu-xcq <1285823170@qq.com> Date: Fri, 27 Aug 2021 09:41:39 +0800 Subject: [PATCH] [ISSUE #6749] fix the batch delete has no permission problem. (#6754) --- .../ConfigurationManagement/ConfigurationManagement.js | 2 +- console/src/main/resources/static/js/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/console-ui/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js b/console-ui/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js index da5778e29..d9e163872 100644 --- a/console-ui/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js +++ b/console-ui/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js @@ -611,7 +611,7 @@ class ConfigurationManagement extends React.Component { onOk: () => { const url = `v1/cs/configs?delType=ids&ids=${Array.from(configsTableSelected.keys()).join( ',' - )}`; + )}&tenant=` + self.state.nownamespace_id; request({ url, type: 'delete', diff --git a/console/src/main/resources/static/js/main.js b/console/src/main/resources/static/js/main.js index 7d6cd58eb..ca26af15d 100644 --- a/console/src/main/resources/static/js/main.js +++ b/console/src/main/resources/static/js/main.js @@ -286,7 +286,7 @@ var t;e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_ //! moment.js locale configuration var t;e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="凌晨"||t==="早上"||t==="上午")return e;else if(t==="中午")return e>=11?e:e+12;else if(t==="下午"||t==="晚上")return e+12},meridiem:function(e,t,n){var a=e*100+t;if(a<600)return"凌晨";else if(a<900)return"早上";else if(a<1130)return"上午";else if(a<1230)return"中午";else if(a<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(8))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="凌晨"||t==="早上"||t==="上午")return e;else if(t==="中午")return e>=11?e:e+12;else if(t==="下午"||t==="晚上")return e+12},meridiem:function(e,t,n){var a=e*100+t;if(a<600)return"凌晨";else if(a<900)return"早上";else if(a<1130)return"上午";else if(a<1230)return"中午";else if(a<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(8))},function(e,t,n){"use strict";t.__esModule=!0;var v=c(n(2)),o=c(n(4)),i=c(n(5)),a=c(n(6)),r=n(0),_=c(r),l=c(n(3)),s=n(29),b=c(n(12)),u=c(n(44)),w=c(n(23)),M=c(n(118)),d=c(n(7)),k=n(11);function c(e){return e&&e.__esModule?e:{default:e}}var f,n=function(){},a=(f=r.Component,(0,a.default)(S,f),S.getDerivedStateFromProps=function(e){return"visible"in e?{visible:e.visible}:{}},S.prototype.render=function(){var e=this.props,t=e.prefix,n=(e.pure,e.className),a=e.style,r=e.type,o=e.shape,i=e.size,l=e.title,s=e.children,u=(e.defaultVisible,e.visible,e.iconType),d=e.closeable,c=(e.onClose,e.afterClose),f=e.animation,p=e.rtl,h=e.locale,m=(0,v.default)({},k.obj.pickOthers(Object.keys(S.propTypes),this.props)),g=this.state.visible,y=t+"message",e=(0,b.default)(((e={})[y]=!0,e[t+"message-"+r]=r,e[""+t+o]=o,e[""+t+i]=i,e[t+"title-content"]=!!l,e[t+"only-content"]=!l&&!!s,e[n]=n,e)),s=g?_.default.createElement("div",(0,v.default)({role:"alert",style:a},m,{className:e,dir:p?"rtl":void 0}),d?_.default.createElement("a",{role:"button","aria-label":h.closeAriaLabel,className:y+"-close",onClick:this.onClose},_.default.createElement(w.default,{type:"close"})):null,_.default.createElement(w.default,{className:y+"-symbol "+(!u&&y+"-symbol-icon"),type:u}),l?_.default.createElement("div",{className:y+"-title"},l):null,s?_.default.createElement("div",{className:y+"-content"},s):null):null;return f?_.default.createElement(M.default.Expand,{animationAppear:!1,afterLeave:c},s):s},a=r=S,r.propTypes={prefix:l.default.string,pure:l.default.bool,className:l.default.string,style:l.default.object,type:l.default.oneOf(["success","warning","error","notice","help","loading"]),shape:l.default.oneOf(["inline","addon","toast"]),size:l.default.oneOf(["medium","large"]),title:l.default.node,children:l.default.node,defaultVisible:l.default.bool,visible:l.default.bool,iconType:l.default.string,closeable:l.default.bool,onClose:l.default.func,afterClose:l.default.func,animation:l.default.bool,locale:l.default.object,rtl:l.default.bool},r.defaultProps={prefix:"next-",pure:!1,type:"success",shape:"inline",size:"medium",defaultVisible:!0,closeable:!1,onClose:n,afterClose:n,animation:!0,locale:u.default.Message},a);function S(){var e,t;(0,o.default)(this,S);for(var n=arguments.length,a=Array(n),r=0;ra.clientHeight&&0>6]+c[128|63&s]:s<55296||57344<=s?i+=c[224|s>>12]+c[128|s>>6&63]+c[128|63&s]:(l+=1,s=65536+((1023&s)<<10|1023&o.charCodeAt(l)),i+=c[240|s>>18]+c[128|s>>12&63]+c[128|s>>6&63]+c[128|63&s])}return i},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(d(e)){for(var n=[],a=0;athis.popupNode.offsetWidth&&p(this.popupNode,"width",l.offsetWidth+"px"),"outside"!==e||"hoz"===o&&1===n||(p(this.popupNode,"height",u.offsetHeight+"px"),this.popupNode.firstElementChild&&p(this.popupNode.firstElementChild,"overflow-y","auto"));var d=this.popupProps;d.onOpen&&d.onOpen()}catch(e){return null}},S.prototype.handlePopupClose=function(){var e=this.props.root.popupNodes,t=e.indexOf(this.popupNode);-1t?r[t+1]:r[0])}),n[a]||(o=r[0]),i.onSort(a,o)},i.keydownHandler=function(e){e.preventDefault(),e.stopPropagation(),e.keyCode===l.KEYCODE.ENTER&&i.handleClick()},i.onSort=function(e,t){var n={};n[e]=t,i.props.onSort(e,t,n)},(0,o.default)(i,e)}a.displayName="Sort",t.default=a,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(2)),a=c(n(4)),o=c(n(5)),i=c(n(6)),l=c(n(0)),s=c(n(3)),u=c(n(12)),d=c(n(381));function c(e){return e&&e.__esModule?e:{default:e}}var f,i=(f=l.default.Component,(0,i.default)(p,f),p.prototype.render=function(){var e=this.props,t=e.className,n=e.record,a=e.primaryKey,e=this.context.selectedRowKeys,a=(0,u.default)(((a={selected:-1 "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')":" "+this.message},e.exports=n},function(e,t){var r={}.hasOwnProperty;function n(e,t,n){this.message=e,this.parsedLine=t,this.snippet=n}(function(e,t){for(var n in t)r.call(t,n)&&(e[n]=t[n]);function a(){this.constructor=e}a.prototype=t.prototype,e.prototype=new a,e.__super__=t.prototype})(n,Error),n.prototype.toString=function(){return null!=this.parsedLine&&null!=this.snippet?" "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')":" "+this.message},e.exports=n},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var y=m(n(2)),a=m(n(4)),r=m(n(5)),o=m(n(6)),i=n(0),v=m(i),l=n(24),s=m(n(3)),_=m(n(12)),u=n(11),f=m(n(50)),d=m(n(60)),b=m(n(10)),c=m(n(44)),p=m(n(657)),h=m(n(392)),w=n(166);function m(e){return e&&e.__esModule?e:{default:e}}var M=d.default.Popup,g=f.default.Item,k=f.default.Group,n=u.func.noop,S=u.func.bindCtx,E=u.func.makeChain;var x,o=(x=v.default.Component,(0,o.default)(L,x),L.prototype.componentDidMount=function(){var e=this;setTimeout(function(){return e.syncWidth()},0),u.events.on(window,"resize",this.handleResize)},L.prototype.componentDidUpdate=function(e,t){e.label===this.props.label&&t.value===this.state.value||this.syncWidth()},L.prototype.componentWillUnmount=function(){u.events.off(window,"resize",this.handleResize),clearTimeout(this.resizeTimeout)},L.prototype.syncWidth=function(){var e=this,t=this.props,n=t.popupStyle,t=t.popupProps;n&&"width"in n||t&&t.style&&"width"in t.style||(t=u.dom.getStyle(this.selectDOM,"width"))&&this.width!==t&&(this.width=t,this.popupRef&&this.shouldAutoWidth()&&setTimeout(function(){e.popupRef&&e.popupRef.getInstance().overlay&&u.dom.setStyle(e.popupRef.getInstance().overlay.getInstance().getContentNode(),"width",e.width)},0))},L.prototype.handleResize=function(){var e=this;clearTimeout(this.resizeTimeout),this.state.visible&&(this.resizeTimeout=setTimeout(function(){e.syncWidth()},200))},L.prototype.setDataSource=function(e){var t=e.dataSource,e=e.children;return i.Children.count(e)?this.dataStore.updateByDS(e,!0):Array.isArray(t)?this.dataStore.updateByDS(t,!1):[]},L.prototype.setVisible=function(e,t){this.props.disabled&&e||this.state.visible===e||("visible"in this.props||this.setState({visible:e}),this.props.onVisibleChange(e,t))},L.prototype.setFirstHightLightKeyForMenu=function(){var e;this.props.autoHighlightFirstItem&&this.dataStore.getMenuDS().length&&this.dataStore.getEnableDS().length&&(e=""+this.dataStore.getEnableDS()[0].value,this.setState({highlightKey:e}),this.props.onToggleHighlightItem(e,"autoFirstItem"))},L.prototype.handleChange=function(e){var t;"value"in this.props||this.setState({value:e});for(var n=arguments.length,a=Array(1e.slidesToShow&&(n=e.slideWidth*e.slidesToShow*-1,o=e.slideHeight*e.slidesToShow*-1),e.slideCount%e.slidesToScroll!=0&&(t=e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow,(t=e.rtl?(e.slideIndex>=e.slideCount?e.slideCount-e.slideIndex:e.slideIndex)+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow:t)&&(o=e.slideIndex>e.slideCount?(n=(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideWidth*-1,(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideHeight*-1):(n=e.slideCount%e.slidesToScroll*e.slideWidth*-1,e.slideCount%e.slidesToScroll*e.slideHeight*-1)))):e.slideCount%e.slidesToScroll!=0&&e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow&&(n=(e.slidesToShow-e.slideCount%e.slidesToScroll)*e.slideWidth),e.centerMode&&(e.infinite?n+=e.slideWidth*Math.floor(e.slidesToShow/2):n=e.slideWidth*Math.floor(e.slidesToShow/2)),a=e.vertical?e.slideIndex*e.slideHeight*-1+o:e.slideIndex*e.slideWidth*-1+n,!0===e.variableWidth&&(n=void 0,a=(r=e.slideCount<=e.slidesToShow||!1===e.infinite?i.default.findDOMNode(e.trackRef).childNodes[e.slideIndex]:(n=e.slideIndex+e.slidesToShow,i.default.findDOMNode(e.trackRef).childNodes[n]))?-1*r.offsetLeft:0,!0===e.centerMode&&(r=!1===e.infinite?i.default.findDOMNode(e.trackRef).children[e.slideIndex]:i.default.findDOMNode(e.trackRef).children[e.slideIndex+e.slidesToShow+1])&&(a=-1*r.offsetLeft+(e.listWidth-r.offsetWidth)/2)),a)}},function(e,t,n){"use strict";t.__esModule=!0;var p=u(n(2)),h=u(n(13)),o=u(n(4)),i=u(n(5)),a=u(n(6)),m=u(n(0)),r=u(n(3)),g=u(n(12)),l=u(n(7)),y=u(n(23)),s=n(11);function u(e){return e&&e.__esModule?e:{default:e}}var d,a=(d=m.default.Component,(0,a.default)(c,d),c.prototype.render=function(){var e=this.props,t=e.title,n=e.children,a=e.className,r=e.isExpanded,o=e.disabled,i=e.style,l=e.prefix,s=e.onClick,u=e.id,d=(0,h.default)(e,["title","children","className","isExpanded","disabled","style","prefix","onClick","id"]),c=(0,g.default)(((f={})[l+"collapse-panel"]=!0,f[l+"collapse-panel-hidden"]=!r,f[l+"collapse-panel-expanded"]=r,f[l+"collapse-panel-disabled"]=o,f[a]=a,f)),a=(0,g.default)(((e={})[l+"collapse-panel-icon"]=!0,e[l+"collapse-panel-icon-expanded"]=r,e)),f=u?u+"-heading":void 0,e=u?u+"-region":void 0;return m.default.createElement("div",(0,p.default)({className:c,style:i,id:u},d),m.default.createElement("div",{id:f,className:l+"collapse-panel-title",onClick:s,onKeyDown:this.onKeyDown,tabIndex:"0","aria-disabled":o,"aria-expanded":r,"aria-controls":e,role:"button"},m.default.createElement(y.default,{type:"arrow-right",className:a,"aria-hidden":"true"}),t),m.default.createElement("div",{className:l+"collapse-panel-content",role:"region",id:e},n))},a=n=c,n.propTypes={prefix:r.default.string,style:r.default.object,children:r.default.any,isExpanded:r.default.bool,disabled:r.default.bool,title:r.default.node,className:r.default.string,onClick:r.default.func,id:r.default.string},n.defaultProps={prefix:"next-",isExpanded:!1,onClick:s.func.noop},n.isNextPanel=!0,a);function c(){var e,n;(0,o.default)(this,c);for(var t=arguments.length,a=Array(t),r=0;r\n com.alibaba.nacos\n nacos-client\n ${version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\nimport java.util.concurrent.Executor;\nimport com.alibaba.nacos.api.NacosFactory;\nimport com.alibaba.nacos.api.config.ConfigService;\nimport com.alibaba.nacos.api.config.listener.Listener;\nimport com.alibaba.nacos.api.exception.NacosException;\n\n/**\n * Config service example\n *\n * @author Nacos\n *\n */\npublic class ConfigExample {\n\n\tpublic static void main(String[] args) throws NacosException, InterruptedException {\n\t\tString serverAddr = "localhost";\n\t\tString dataId = "'.concat(e.dataId,'";\n\t\tString group = "').concat(e.group,'";\n\t\tProperties properties = new Properties();\n\t\tproperties.put(PropertyKeyConst.SERVER_ADDR, serverAddr);\n\t\tConfigService configService = NacosFactory.createConfigService(properties);\n\t\tString content = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tconfigService.addListener(dataId, group, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void receiveConfigInfo(String configInfo) {\n\t\t\t\tSystem.out.println("recieve:" + configInfo);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Executor getExecutor() {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\n\t\tboolean isPublishOk = configService.publishConfig(dataId, group, "content");\n\t\tSystem.out.println(isPublishOk);\n\n\t\tThread.sleep(3000);\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\n\t\tboolean isRemoveOk = configService.removeConfig(dataId, group);\n\t\tSystem.out.println(isRemoveOk);\n\t\tThread.sleep(3000);\n\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tThread.sleep(300000);\n\n\t}\n}\n')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,e=L.a.createElement("div",null);return L.a.createElement("div",null,L.a.createElement(_.a,{title:t.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:e,onClose:this.closeDialog.bind(this)},L.a.createElement("div",{style:{height:500}},L.a.createElement(N.a,{tip:t.loading,style:{width:"100%"},visible:this.state.loading},L.a.createElement(Y.a,{shape:"text",style:{height:40,paddingBottom:10}},L.a.createElement(P,{title:"Java",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),L.a.createElement(P,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigboot_code)}),L.a.createElement(P,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloud_code)}),L.a.createElement(P,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),L.a.createElement(P,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),L.a.createElement(P,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),L.a.createElement(P,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)})),L.a.createElement("div",{ref:"codepreview"})))))}}]),n}(L.a.Component),a.displayName="ShowCodeing",a=l))||a,l=(n(65),n(37)),a=n.n(l),I=(n(696),a.a.Row),R=a.a.Col,A=(0,u.a.config)((a=l=function(e){Object(S.a)(n,e);var t=Object(E.a)(n);function n(e){return Object(w.a)(this,n),(e=t.call(this,e)).state={visible:!1,title:"",content:"",isok:!0,dataId:"",group:""},e}return Object(M.a)(n,[{key:"componentDidMount",value:function(){this.initData()}},{key:"initData",value:function(){var e=this.props.locale;this.setState({title:(void 0===e?{}:e).confManagement})}},{key:"openDialog",value:function(e){this.setState({visible:!0,title:e.title,content:e.content,isok:e.isok,dataId:e.dataId,group:e.group,message:e.message})}},{key:"closeDialog",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,e=L.a.createElement("div",{style:{textAlign:"right"}},L.a.createElement(d.a,{type:"primary",onClick:this.closeDialog.bind(this)},t.determine));return L.a.createElement("div",null,L.a.createElement(_.a,{visible:this.state.visible,footer:e,style:{width:555},onCancel:this.closeDialog.bind(this),onClose:this.closeDialog.bind(this),title:t.deletetitle},L.a.createElement("div",null,L.a.createElement(I,null,L.a.createElement(R,{span:"4",style:{paddingTop:16}},L.a.createElement(y.a,{type:"".concat(this.state.isok?"success":"delete","-filling"),style:{color:this.state.isok?"green":"red"},size:"xl"})),L.a.createElement(R,{span:"20"},L.a.createElement("div",null,L.a.createElement("h3",null,this.state.isok?t.deletedSuccessfully:t.deleteFailed),L.a.createElement("p",null,L.a.createElement("span",{style:{color:"#999",marginRight:5}},"Data ID:"),L.a.createElement("span",{style:{color:"#c7254e"}},this.state.dataId)),L.a.createElement("p",null,L.a.createElement("span",{style:{color:"#999",marginRight:5}},"Group:"),L.a.createElement("span",{style:{color:"#c7254e"}},this.state.group)),this.state.isok?"":L.a.createElement("p",{style:{color:"red"}},this.state.message)))))))}}]),n}(L.a.Component),l.displayName="DeleteDialog",l=a))||l,a=(n(697),n(410)),H=n.n(a),F=(0,u.a.config)((a=l=function(e){Object(S.a)(n,e);var t=Object(E.a)(n);function n(){return Object(w.a)(this,n),t.apply(this,arguments)}return Object(M.a)(n,[{key:"render",value:function(){var e=this.props,t=e.data,n=void 0===t?{}:t,t=e.height,e=e.locale,a=void 0===e?{}:e;return L.a.createElement("div",null,"notice"===n.modeType?L.a.createElement("div",{"data-spm-click":"gostr=/aliyun;locaid=notice"},L.a.createElement(H.a,{style:{marginBottom:1e?b.a.createElement(L.a,{className:"pagination",total:s.count,pageSize:e,onChange:function(e){return a.onChangePage(e)}}):null,b.a.createElement(C,{ref:this.editInstanceDialog,serviceName:o,clusterName:n,groupName:i,openLoading:function(){return a.openLoading()},closeLoading:function(){return a.closeLoading()},getInstanceList:function(){return a.getInstanceList()}})):null}}]),n}(b.a.Component),r.displayName="InstanceTable",r.defaultProps={filters:new Map},o=o))||o,D=function(e,t){return e.filter(function(e){var n=e.metadata,a=!0;return t.forEach(function(e,t){if(e!==n[t])return a=!1}),a})},O=o,N=n(47),Y=n(31),o=(n(164),n(71)),o=n.n(o),P=o.a.Group,j=o.a.Closeable,I=v.a.Item;var R=a.a.config(function(e){var t=Object(_.useState)(""),n=(u=Object(Y.a)(t,2))[0],a=u[1],r=Object(_.useState)(""),o=(s=Object(Y.a)(r,2))[0],i=s[1],t=Object(_.useState)(""),r=(u=Object(Y.a)(t,2))[0],l=u[1],s=Object(_.useState)(""),u=(t=Object(Y.a)(s,2))[0],d=t[1],s=Object(_.useState)(new Map),c=(t=Object(Y.a)(s,2))[0],f=t[1],t=void 0===(s=e.locale)?{}:s,s=function(){var e;h(),n&&o&&(e=new Map(Array.from(c)).set(n,o),f(e),l(""),d(""),p())},p=function(){a(""),i("")},h=function(){l(n?"":"error"),d(o?"":"error")};return Object(_.useEffect)(function(){e.setFilters(c)},[c]),b.a.createElement(m.a,{contentHeight:"auto",className:"inner-card"},b.a.createElement(v.a,{inline:!0,size:"small"},b.a.createElement(I,{label:t.title},b.a.createElement(I,null,b.a.createElement(y.a,{placeholder:"key",value:n,trim:!0,onChange:function(e){return a(e)},onPressEnter:s,state:r})),b.a.createElement(I,null,b.a.createElement(y.a,{placeholder:"value",value:o,trim:!0,onChange:function(e){return i(e)},onPressEnter:s,state:u})),b.a.createElement(I,{label:""},b.a.createElement(g.a,{type:"primary",onClick:s,style:{marginRight:10}},t.addFilter),0n&&y.a.createElement(s.a,{className:"users-pagination",current:e,total:t.totalCount,pageSize:n,onChange:function(e){return a.setState({pageNo:e},function(){return a.getPermissions()})}}),y.a.createElement(L,{visible:i,onOk:function(e){return Object(v.a)(e).then(function(e){return a.setState({pageNo:1},function(){return a.getPermissions()}),e})},onCancel:function(){return a.colseCreatePermission()}}))}}]),n}(y.a.Component),i.displayName="PermissionsManagement",a=a))||a)||a);t.a=a},function(e,t,n){"use strict";n(63);var a=n(46),s=n.n(a),r=(n(34),n(18)),u=n.n(r),o=(n(61),n(20)),d=n.n(o),i=(n(32),n(19)),c=n.n(i),l=n(14),f=n(15),p=n(17),h=n(16),a=(n(25),n(7)),r=n.n(a),o=n(0),m=n.n(o),i=n(43),g=n(45),y=n(48),a=(n(40),n(10)),v=n.n(a),_=n(31),o=(n(49),n(26)),b=n.n(o),w=n(22),a=(n(42),n(9)),M=n.n(a),k=(n(151),M.a.Item),S={labelCol:{fixedSpan:4},wrapperCol:{span:19}},E=(0,r.a.config)((a=o=function(e){Object(p.a)(o,e);var r=Object(h.a)(o);function o(){var e;Object(l.a)(this,o);for(var t=arguments.length,n=new Array(t),a=0;ai&&m.a.createElement(s.a,{className:"users-pagination",current:l,total:n.totalCount,pageSize:i,onChange:function(e){return t.setState({pageNo:e},function(){return t.getUsers()})}}),m.a.createElement(E,{visible:e,onOk:function(e){return Object(g.c)(e).then(function(e){return t.setState({pageNo:1},function(){return t.getUsers()}),e})},onCancel:function(){return t.colseCreateUser()}}),m.a.createElement(x.a,{username:r,onOk:function(e){return Object(g.k)(e).then(function(e){return t.getUsers(),e})},onCancel:function(){return t.setState({passwordResetUser:void 0})}}))}}]),n}(m.a.Component),i.displayName="UserManagement",r=r))||r)||r;t.a=r},function(e,t,n){"use strict";n(63);var a=n(46),M=n.n(a),r=(n(32),n(19)),k=n.n(r),o=(n(171),n(97)),S=n.n(o),i=(n(40),n(10)),E=n.n(i),x=n(21),a=(n(52),n(27)),l=n.n(a),r=(n(34),n(18)),s=n.n(r),o=(n(49),n(26)),u=n.n(o),d=n(14),c=n(15),f=n(22),p=n(17),h=n(16),i=(n(25),n(7)),a=n.n(i),r=(n(61),n(20)),L=n.n(r),o=(n(65),n(37)),i=n.n(o),r=(n(42),n(9)),T=n.n(r),o=n(0),C=n.n(o),m=n(1),D=n(47),O=n(48),N=n(135),r=(n(51),n(33)),g=n.n(r),o=(n(126),n(57)),y=n.n(o),v=(n(396),y.a.Item),Y=(0,a.a.config)((o=r=function(e){Object(p.a)(n,e);var t=Object(h.a)(n);function n(e){return Object(d.a)(this,n),(e=t.call(this,e)).state={dialogvisible:!1,loading:!1},e.defaultCode="",e.nodejsCode="TODO",e.cppCode="TODO",e.shellCode="TODO",e.pythonCode="TODO",e.record={},e.springCode="TODO",e.sprigbootCode="TODO",e.sprigcloudCode="TODO",e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"getData",value:function(){var e=Object(m.b)("namespace"),e={group:this.record.group||"",dataId:this.record.dataId||"",namespace:e,inEdas:window.globalConfig.isParentEdas()};this.defaultCode=this.getJavaCode(e),this.createCodeMirror("text/x-java",this.defaultCode),this.springCode=this.getSpringCode(e),this.sprigbootCode=this.getSpringBootCode(e),this.sprigcloudCode=this.getSpringCloudCode(e),this.nodejsCode=this.getNodejsCode(e),this.cppCode=this.getCppCode(e),this.shellCode=this.getShellCode(e),this.pythonCode=this.getPythonCode(e),this.forceUpdate()}},{key:"getJavaCode",value:function(e){return'/* Refer to document: https://github.com/alibaba/nacos/blob/master/example/src/main/java/com/alibaba/nacos/example\n* pom.xml\n \n com.alibaba.nacos\n nacos-client\n ${latest.version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\n\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingFactory;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.listener.Event;\nimport com.alibaba.nacos.api.naming.listener.EventListener;\nimport com.alibaba.nacos.api.naming.listener.NamingEvent;\n\n/**\n * @author nkorange\n */\npublic class NamingExample {\n\n public static void main(String[] args) throws NacosException {\n\n Properties properties = new Properties();\n properties.setProperty("serverAddr", System.getProperty("serverAddr"));\n properties.setProperty("namespace", System.getProperty("namespace"));\n\n NamingService naming = NamingFactory.createNamingService(properties);\n\n naming.registerInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n naming.registerInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.deregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.subscribe("').concat(this.record.name,'", new EventListener() {\n @Override\n public void onEvent(Event event) {\n System.out.println(((NamingEvent)event).getServiceName());\n System.out.println(((NamingEvent)event).getInstances());\n }\n });\n }\n}')}},{key:"getSpringCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example\n* pom.xml\n \n com.alibaba.nacos\n nacos-spring-context\n ${latest.version}\n \n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring\npackage com.alibaba.nacos.example.spring;\n\nimport com.alibaba.nacos.api.annotation.NacosProperties;\nimport com.alibaba.nacos.spring.context.annotation.discovery.EnableNacosDiscovery;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\n@EnableNacosDiscovery(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848"))\npublic class NacosConfiguration {\n\n}\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring/controller\npackage com.alibaba.nacos.example.spring.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringBootCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example\n* pom.xml\n \n com.alibaba.boot\n nacos-discovery-spring-boot-starter\n ${latest.version}\n \n*/\n/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/resources\n* application.properties\n nacos.discovery.server-addr=127.0.0.1:8848\n*/\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/java/com/alibaba/nacos/example/spring/boot/controller\n\npackage com.alibaba.nacos.example.spring.boot.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringCloudCode",value:function(e){return"/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/\n* pom.xml\n \n org.springframework.cloud\n spring-cloud-starter-alibaba-nacos-discovery\n ${latest.version}\n \n*/\n\n// nacos-spring-cloud-provider-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/resources\n* application.properties\nserver.port=18080\nspring.application.name=".concat(this.record.name,'\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosProviderApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(NacosProviderApplication.class, args);\n}\n\n @RestController\n class EchoController {\n @RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)\n public String echo(@PathVariable String string) {\n return "Hello Nacos Discovery " + string;\n }\n }\n}\n\n// nacos-spring-cloud-consumer-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/resources\n* application.properties\nspring.application.name=micro-service-oauth2\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.cloud.client.loadbalancer.LoadBalanced;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\nimport org.springframework.web.client.RestTemplate;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosConsumerApplication {\n\n @LoadBalanced\n @Bean\n public RestTemplate restTemplate() {\n return new RestTemplate();\n }\n\n public static void main(String[] args) {\n SpringApplication.run(NacosConsumerApplication.class, args);\n }\n\n @RestController\n public class TestController {\n\n private final RestTemplate restTemplate;\n\n @Autowired\n public TestController(RestTemplate restTemplate) {this.restTemplate = restTemplate;}\n\n @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)\n public String echo(@PathVariable String str) {\n return restTemplate.getForObject("http://service-provider/echo/" + str, String.class);\n }\n }\n}')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}),this.cm.setSize("auto","490px"))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return C.a.createElement("div",null,C.a.createElement(s.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:C.a.createElement("div",null),onClose:this.closeDialog.bind(this)},C.a.createElement("div",{style:{height:500}},C.a.createElement(g.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},C.a.createElement(y.a,{shape:"text",style:{height:40,paddingBottom:10}},C.a.createElement(v,{title:"Java",key:0,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),C.a.createElement(v,{title:"Spring",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.springCode)}),C.a.createElement(v,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigbootCode)}),C.a.createElement(v,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloudCode)}),C.a.createElement(v,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),C.a.createElement(v,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),C.a.createElement(v,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),C.a.createElement(v,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)})),C.a.createElement("div",{ref:"codepreview"})))))}}]),n}(C.a.Component),r.displayName="ShowServiceCodeing",o=o))||o,P=(n(719),n(28)),j=T.a.Item,I=i.a.Row,R=i.a.Col,A=L.a.Column,a=(0,a.a.config)((a=i=function(e){Object(p.a)(a,e);var t=Object(h.a)(a);function a(e){var n;return Object(d.a)(this,a),(n=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return n.queryServiceList()})},n.showcode=function(){setTimeout(function(){return n.queryServiceList()})},n.setNowNameSpace=function(e,t){return n.setState({nowNamespaceName:e,nowNamespaceId:t})},n.rowColor=function(e){return{className:e.healthyInstanceCount?"":"row-bg-red"}},n.editServiceDialog=C.a.createRef(),n.showcode=C.a.createRef(),n.state={loading:!1,total:0,pageSize:10,currentPage:1,dataSource:[],search:{serviceName:"",groupName:""},hasIpCount:!("false"===localStorage.getItem("hasIpCount"))},n.field=new u.a(Object(f.a)(n)),n}return Object(c.a)(a,[{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"openEditServiceDialog",value:function(){try{this.editServiceDialog.current.getInstance().show(this.state.service)}catch(e){}}},{key:"queryServiceList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.search,o=e.withInstances,o=void 0!==o&&o,e=e.hasIpCount,r=["hasIpCount=".concat(e),"withInstances=".concat(o),"pageNo=".concat(t),"pageSize=".concat(a),"serviceNameParam=".concat(r.serviceName),"groupNameParam=".concat(r.groupName)];this.openLoading(),Object(m.c)({url:"v1/ns/catalog/services?".concat(r.join("&")),success:function(){var e=0i&&m.a.createElement(s.a,{className:"users-pagination",current:l,total:t.totalCount,pageSize:i,onChange:function(e){return a.setState({pageNo:e},function(){return a.getRoles()})}}),m.a.createElement(E,{visible:e,onOk:function(e){return Object(g.b)(e).then(function(e){return a.getRoles(),e})},onCancel:function(){return a.colseCreateRole()}}))}}]),n}(m.a.Component),i.displayName="RolesManagement",r=r))||r)||r);t.a=r},function(e,t,n){"use strict";n(32);var a=n(19),r=n.n(a),o=(n(42),n(9)),i=n.n(o),a=(n(40),n(10)),l=n.n(a),o=(n(49),n(26)),s=n.n(o),u=n(14),d=n(15),c=n(22),f=n(17),p=n(16),a=(n(25),n(7)),o=n.n(a),a=n(0),h=n.n(a),m=n(1),o=(n(673),(0,o.a.config)((o=n=function(e){Object(f.a)(n,e);var t=Object(p.a)(n);function n(e){return Object(u.a)(this,n),(e=t.call(this,e)).state={showmore:!1},e.edasAppName=Object(m.b)("edasAppName"),e.edasAppId=Object(m.b)("edasAppId"),e.inApp=e.edasAppName,e.field=new s.a(Object(c.a)(e)),e.dataId=Object(m.b)("dataId")||"yanlin",e.group=Object(m.b)("group")||"DEFAULT_GROUP",e.serverId=Object(m.b)("serverId")||"center",e.nid=Object(m.b)("nid")||"123509854",e.tenant=Object(m.b)("namespace")||"",e}return Object(d.a)(n,[{key:"componentDidMount",value:function(){this.getDataDetail()}},{key:"toggleMore",value:function(){this.setState({showmore:!this.state.showmore})}},{key:"getDataDetail",value:function(){this.props.locale;var t=this;Object(m.c)({url:"v1/cs/history?dataId=".concat(this.dataId,"&group=").concat(this.group,"&nid=").concat(this.nid),success:function(e){null!=e&&(t.field.setValue("dataId",(e=e).dataId),t.field.setValue("content",e.content),t.field.setValue("appName",t.inApp?t.edasAppName:e.appName),t.field.setValue("envs",t.serverId),t.field.setValue("srcUser",e.srcUser),t.field.setValue("srcIp",e.srcIp),t.field.setValue("opType",e.opType.trim()),t.field.setValue("group",e.group),t.field.setValue("md5",e.md5))}})}},{key:"goList",value:function(){this.props.history.push("/historyRollback?serverId=".concat(this.serverId,"&historyGroup=").concat(this.group,"&historyDataId=").concat(this.dataId,"&namespace=").concat(this.tenant))}},{key:"getOpType",value:function(e,t){return e?{U:t.update,I:t.insert,D:t.deleteAction}[e]:""}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,n=this.field.init,a={labelCol:{fixedSpan:6},wrapperCol:{span:18}},e=this.getOpType;return h.a.createElement("div",{style:{padding:10}},h.a.createElement("h1",null,t.historyDetails),h.a.createElement(i.a,{field:this.field},h.a.createElement(i.a.Item,Object.assign({label:"Data ID:",required:!0},a),h.a.createElement(l.a,Object.assign({htmlType:"text",readOnly:!0},n("dataId"))),h.a.createElement("div",{style:{marginTop:10}},h.a.createElement("a",{style:{fontSize:"12px"},onClick:this.toggleMore.bind(this)},this.state.showmore?t.recipientFrom:t.moreAdvancedOptions))),h.a.createElement("div",{style:{overflow:"hidden",height:this.state.showmore?"auto":"0"}},h.a.createElement(i.a.Item,Object.assign({label:"Group:",required:!0},a),h.a.createElement(l.a,Object.assign({htmlType:"text",readOnly:!0},n("group")))),h.a.createElement(i.a.Item,Object.assign({label:t.home},a),h.a.createElement(l.a,Object.assign({htmlType:"text",readOnly:!0},n("appName"))))),h.a.createElement(i.a.Item,Object.assign({label:t.operator,required:!0},a),h.a.createElement(l.a,Object.assign({htmlType:"text",readOnly:!0},n("srcUser")))),h.a.createElement(i.a.Item,Object.assign({label:t.sourceIp,required:!0},a),h.a.createElement(l.a,Object.assign({htmlType:"text",readOnly:!0},n("srcIp")))),h.a.createElement(i.a.Item,Object.assign({label:t.actionType,required:!0},a),h.a.createElement(l.a,{htmlType:"text",readOnly:!0,value:e(n("opType").value,t)})),h.a.createElement(i.a.Item,Object.assign({label:"MD5:",required:!0},a),h.a.createElement(l.a,Object.assign({htmlType:"text",readOnly:!0},n("md5")))),h.a.createElement(i.a.Item,Object.assign({label:t.configureContent,required:!0},a),h.a.createElement(l.a.TextArea,Object.assign({htmlType:"text",multiple:!0,rows:15,readOnly:!0},n("content")))),h.a.createElement(i.a.Item,Object.assign({label:" "},a),h.a.createElement(r.a,{type:"primary",onClick:this.goList.bind(this)},t.back))))}}]),n}(h.a.Component),n.displayName="HistoryDetail",o=o))||o);t.a=o},function(e,t,l){"use strict";l(51);var n=l(33),g=l.n(n),a=(l(32),l(19)),y=l.n(a),r=(l(387),l(133)),v=l.n(r),n=(l(41),l(23)),_=l.n(n),a=(l(120),l(82)),b=l.n(a),r=(l(103),l(69)),w=l.n(r),n=(l(62),l(30)),M=l.n(n),a=(l(42),l(9)),k=l.n(a),r=(l(40),l(10)),S=l.n(r),n=(l(126),l(57)),E=l.n(n),o=l(58),a=(l(34),l(18)),i=l.n(a),x=l(21),r=(l(52),l(27)),s=l.n(r),u=l(14),d=l(15),c=l(17),f=l(16),n=(l(25),l(7)),a=l.n(n),r=(l(65),l(37)),n=l.n(r),r=l(0),L=l.n(r),p=l(1),h=l(47),m=l(35),T=l(132),C=l(99),D=l(111),O=(l(672),n.a.Row),N=n.a.Col,Y=[{value:"text",label:"TEXT"},{value:"json",label:"JSON"},{value:"xml",label:"XML"},{value:"yaml",label:"YAML"},{value:"html",label:"HTML"},{value:"properties",label:"Properties"}],P=["production","beta"],a=(0,a.a.config)((a=n=function(e){Object(c.a)(n,e);var t=Object(f.a)(n);function n(e){return Object(u.a)(this,n),(e=t.call(this,e)).state={loading:!1,isBeta:!1,isNewConfig:!0,betaPublishSuccess:!1,betaIps:"",tabActiveKey:"",form:{dataId:"",group:"",content:"",appName:"",desc:"",config_tags:[],type:"text"},tagDataSource:[],subscriberDataSource:[],openAdvancedSettings:!1,editorClass:"editor-normal"},e.successDialog=L.a.createRef(),e.diffEditorDialog=L.a.createRef(),e}return Object(d.a)(n,[{key:"componentDidMount",value:function(){var t=this,e=!Object(p.b)("dataId"),n=Object(p.b)("group").trim();this.setState({isNewConfig:e},function(){e?(n&&t.setState({group:n}),t.initMoacoEditor("text","")):t.changeForm({dataId:Object(p.b)("dataId").trim(),group:n},function(){t.getConfig(!0).then(function(e){e?t.setState({isBeta:!0,tabActiveKey:"beta",betaPublishSuccess:!0}):t.getConfig()}),t.getSubscribesByNamespace()}),t.initFullScreenEvent()})}},{key:"initMoacoEditor",value:function(e,t){var n=this,a=document.getElementById("container");a.innerHTML="";var r={value:t,language:e,codeLens:!(this.monacoEditor=null),selectOnLineNumbers:!0,roundedSelection:!1,readOnly:!1,lineNumbersMinChars:!0,theme:"vs-dark",folding:!1,showFoldingControls:"always",cursorStyle:"line",automaticLayout:!0};window.monaco?this.monacoEditor=window.monaco.editor.create(a,r):window.importEditor(function(){n.monacoEditor=window.monaco.editor.create(a,r)})}},{key:"initFullScreenEvent",value:function(){var t=this;document.body.addEventListener("keydown",function(e){"F1"===e.key?(e.preventDefault(),t.setState({editorClass:"editor-full-screen"})):"Escape"===e.key&&t.setState({editorClass:"editor-normal"})})}},{key:"createDiffCodeMirror",value:function(e,t){var n=this.diffEditorDialog.current.getInstance();n.innerHTML="",this.diffeditor=window.CodeMirror.MergeView(n,{value:e||"",origLeft:null,orig:t||"",lineNumbers:!0,mode:this.mode,theme:"xq-light",highlightDifferences:!0,connect:"align",collapseIdentical:!1})}},{key:"openDiff",value:function(e){this.diffcb=e;var t=this.monacoEditor.getValue(),e=this.codeVal||"",t=t.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n"),e=e.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n");this.diffEditorDialog.current.getInstance().openDialog(t,e)}},{key:"clickTab",value:function(e){var t=this;this.setState({tabActiveKey:e},function(){return t.getConfig("beta"===e)})}},{key:"getCodeVal",value:function(){var e=this.props.locale,t=void 0===e?{}:e,e=this.state.form,e=(e.type,e.content),e=this.monacoEditor?this.monacoEditor.getValue():e;return e||(s.a.error({content:t.submitFailed,align:"cc cc"}),!1)}},{key:"setCodeVal",value:function(e){var t=this.state.form;this.setState({form:Object(x.a)(Object(x.a)({},t),{},{content:e})}),this.monacoEditor&&this.monacoEditor.setValue(e)}},{key:"publish",value:function(){var t=this,e=this.props.locale,n=void 0===e?{}:e,a=this.state.form.type;this.state.isNewConfig&&this.validation();e=this.getCodeVal();if(e)return T.a.validate({content:e,type:a})?this._publishConfig():new Promise(function(e){i.a.confirm({content:n.codeValErrorPrompt,onOk:function(){return e(t._publishConfig())},onCancel:function(){return e(!1)}})})}},{key:"_publishConfig",value:function(){var t=this,n=0this.state.pageSize&&w.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},w.a.createElement(p.a,{current:this.state.currentPage,total:this.state.total,pageSize:this.state.pageSize,onChange:function(e){return t.setState({currentPage:e},function(){return t.queryClusterStateList()})}}))))}}]),a}(w.a.Component),r.displayName="ClusterNodeList",o=o))||o;t.a=o},function(e,t,n){"use strict";n(51);var a=n(33),r=n.n(a),o=(n(63),n(46)),i=n.n(o),l=(n(61),n(20)),s=n.n(l),a=(n(40),n(10)),u=n.n(a),o=(n(62),n(30)),d=n.n(o),l=(n(49),n(26)),c=n.n(l),f=n(31),p=n(14),h=n(15),m=n(22),g=n(17),y=n(16),a=(n(25),n(7)),o=n.n(a),l=(n(65),n(37)),a=n.n(l),l=(n(42),n(9)),v=n.n(l),l=n(0),_=n.n(l),b=n(48),w=n(1),M=(n(678),v.a.Item),k=a.a.Row,S=a.a.Col,o=(0,o.a.config)((o=a=function(e){Object(g.a)(n,e);var t=Object(y.a)(n);function n(e){var a;return Object(p.a)(this,n),(a=t.call(this,e)).queryTrackQuery=function(){var l=Object(m.a)(a),e="",s=a.getValue("type");if(1===s){var t=a.getValue("ip"),e="v1/cs/listener?ip=".concat(t),n=window.nownamespace||Object(w.b)("namespace")||"";n&&(e+="&tenant=".concat(n))}else{t=a.getValue("dataId"),n=a.getValue("group");if(!t||!n)return!1;e="v1/cs/configs/listener?dataId=".concat(t,"&group=").concat(n)}Object(w.c)({url:e,beforeSend:function(){l.openLoading()},success:function(e){if(200===e.collectStatus){var t,n,a,r,o=[],i=e.lisentersGroupkeyStatus;for(t in i)1===s?(r={},n=t.split("+"),n=(a=Object(f.a)(n,2))[0],a=a[1],r.dataId=n,r.group=a,r.md5=i[t],o.push(r)):((r={}).ip=t,r.md5=i[t],o.push(r));l.setState({dataSource:o||[],total:o.length||0})}},complete:function(){l.closeLoading()}})},a.changePage=function(e){a.setState({currentPage:e})},a.getQueryLater=function(){setTimeout(function(){a.queryTrackQuery()})},a.state={value:"",visible:!1,loading:!1,total:0,pageSize:10,currentPage:1,dataSource:[]},a.field=new c.a(Object(m.a)(a)),a.group=Object(w.b)("listeningGroup")||"",a.dataId=Object(w.b)("listeningDataId")||"",a.serverId=Object(w.b)("listeningServerId")||"",a.tenant=Object(w.b)("namespace")||"",a}return Object(h.a)(n,[{key:"componentDidMount",value:function(){this.field.setValue("type",0),this.field.setValue("group",this.group),this.field.setValue("dataId",this.dataId)}},{key:"onSearch",value:function(){}},{key:"onChange",value:function(){}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"showMore",value:function(){}},{key:"resetSearch",value:function(){this.field.reset(),this.forceUpdate()}},{key:"renderStatus",value:function(e,t,n){var a=this.props.locale,a=void 0===a?{}:a;return _.a.createElement("div",null,!0===n.pushStatus?_.a.createElement("span",{style:{color:"green"}},a.success):_.a.createElement("span",{style:{color:"red"}},a.failure))}},{key:"render",value:function(){var t=this,e=this.props.locale,n=void 0===e?{}:e,a=this.field,e=a.init,a=a.getValue;this.init=e,this.getValue=a;a=[{label:n.configuration,value:0},{label:"IP",value:1}];return _.a.createElement(_.a.Fragment,null,_.a.createElement(r.a,{shape:"flower",style:{position:"relative"},visible:this.state.loading,tip:"Loading...",color:"#333"},_.a.createElement(b.a,{left:n.listenerQuery,namespaceCallBack:this.getQueryLater}),_.a.createElement(k,{className:"demo-row",style:{marginBottom:10,padding:0}},_.a.createElement(S,{span:"24"},_.a.createElement(v.a,{inline:!0,field:this.field},_.a.createElement(M,{label:"".concat(n.queryDimension,":")},_.a.createElement(d.a,Object.assign({dataSource:a,style:{width:200}},this.init("type"),{onChange:function(e){t.field.setValue("type",e),t.queryTrackQuery()}}))),_.a.createElement(M,{label:"Data ID:",style:{display:0===this.getValue("type")?"":"none"},required:!0},_.a.createElement(u.a,Object.assign({placeholder:n.pleaseEnterTheDataId,style:{width:200}},this.init("dataId",{rules:[{required:!0,message:n.dataIdCanNotBeEmpty}]})))),_.a.createElement(M,{label:"Group:",style:{display:0===this.getValue("type")?"":"none"},required:!0},_.a.createElement(u.a,Object.assign({placeholder:n.pleaseInputGroup,style:{width:200}},this.init("group",{rules:[{required:!0,message:n.groupCanNotBeEmpty}]})))),_.a.createElement(M,{label:"IP:",style:{display:0===this.getValue("type")?"none":""}},_.a.createElement(u.a,Object.assign({placeholder:n.pleaseInputIp,style:{width:200,boxSize:"border-box"}},this.init("ip")))),_.a.createElement(M,{label:""},_.a.createElement(v.a.Submit,{validate:!0,type:"primary",onClick:this.queryTrackQuery,style:{marginRight:10}},n.query))))),_.a.createElement("div",{style:{position:"relative"}},_.a.createElement("h3",{style:{height:28,lineHeight:"28px",paddingLeft:10,borderLeft:"3px solid #09c",margin:0,marginBottom:10,fontSize:16}},n.queryResultsQuery,_.a.createElement("strong",{style:{fontWeight:"bold"}}," ",this.state.total," "),n.articleMeetRequirementsConfiguration)),_.a.createElement(k,{style:{padding:0}},_.a.createElement(S,{span:"24",style:{padding:0}},1===this.getValue("type")?_.a.createElement(s.a,{dataSource:this.state.dataSource,fixedHeader:!0,maxBodyHeight:500,locale:{empty:n.pubNoData}},_.a.createElement(s.a.Column,{title:"Data ID",dataIndex:"dataId"}),_.a.createElement(s.a.Column,{title:"Group",dataIndex:"group"}),_.a.createElement(s.a.Column,{title:"MD5",dataIndex:"md5"})):_.a.createElement(s.a,{dataSource:this.state.dataSource,fixedHeader:!0,maxBodyHeight:400,locale:{empty:n.pubNoData}},_.a.createElement(s.a.Column,{title:"IP",dataIndex:"ip"}),_.a.createElement(s.a.Column,{title:"MD5",dataIndex:"md5"})))),_.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},_.a.createElement(i.a,{current:this.state.currentPage,total:this.state.total,pageSize:this.state.pageSize,onChange:this.changePage}),",")))}}]),n}(_.a.Component),a.displayName="ListeningToQuery",o=o))||o;t.a=o},function(e,t,n){"use strict";n(51);var a=n(33),r=n.n(a),o=(n(32),n(19)),i=n.n(o),a=(n(103),n(69)),l=n.n(a),o=(n(42),n(9)),s=n.n(o),a=(n(40),n(10)),u=n.n(a),o=(n(34),n(18)),d=n.n(o),a=(n(49),n(26)),c=n.n(a),f=n(14),p=n(15),h=n(22),m=n(17),g=n(16),o=(n(25),n(7)),a=n.n(o),o=n(0),y=n.n(o),v=n(99),_=n(1),b=n(47),a=(n(664),(0,a.a.config)((a=n=function(e){Object(m.a)(n,e);var t=Object(g.a)(n);function n(e){return Object(f.a)(this,n),(e=t.call(this,e)).successDialog=y.a.createRef(),e.field=new c.a(Object(h.a)(e)),e.dataId=Object(_.b)("dataId")||"yanlin",e.group=Object(_.b)("group")||"",e.serverId=Object(_.b)("serverId")||"",e.state={configType:0,envvalues:[],commonvalue:[],envComponent:"",envGroups:[],envlist:[],loading:!1,showmore:!1},e.codeValue="",e.mode="text",e.ips="",e}return Object(p.a)(n,[{key:"componentDidMount",value:function(){this.getDataDetail()}},{key:"toggleMore",value:function(){this.setState({showmore:!this.state.showmore})}},{key:"getEnvList",value:function(e){this.setState({envvalues:e}),this.envs=e}},{key:"getDomain",value:function(){var t=this;Object(_.c)({url:"/diamond-ops/env/domain",success:function(e){200===e.code&&(e=e.data.envGroups,t.setState({envGroups:e}))}})}},{key:"getDataDetail",value:function(){var i=this,e=this.props.locale,l=void 0===e?{}:e;this.tenant=Object(_.b)("namespace")||"",this.serverId=Object(_.b)("serverId")||"center";e="/diamond-ops/configList/detail/serverId/".concat(this.serverId,"/dataId/").concat(this.dataId,"/group/").concat(this.group,"/tenant/").concat(this.tenant,"?id=");"global"!==this.tenant&&this.tenant||(e="/diamond-ops/configList/detail/serverId/".concat(this.serverId,"/dataId/").concat(this.dataId,"/group/").concat(this.group,"?id=")),Object(_.c)({url:e,beforeSend:function(){i.openLoading()},success:function(e){if(200===e.code){var t=e.data,t=void 0===t?{}:t;i.field.setValue("dataId",t.dataId),i.field.setValue("appName",t.appName),i.field.setValue("group",t.group),i.field.setValue("content",t.content||"");for(var n=t.envs||[],a=[],r=[],o=0;othis.state.pageSize&&k.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},k.a.createElement(y.a,{current:this.state.pageNo,total:l,pageSize:this.state.pageSize,onChange:function(e){return t.setState({pageNo:e},function(){return t.querySubscriberList()})}}))))}}]),a}(k.a.Component),r.displayName="SubscriberList",i=i))||i)||i;t.a=i},function(e,t,n){"use strict";n(51);var a=n(33),r=n.n(a),o=(n(63),n(46)),i=n.n(o),a=(n(61),n(20)),l=n.n(a),o=(n(42),n(9)),s=n.n(o),a=(n(40),n(10)),u=n.n(a),o=(n(49),n(26)),d=n.n(o),c=n(14),f=n(15),p=n(22),h=n(17),m=n(16),a=(n(25),n(7)),o=n.n(a),a=n(0),g=n.n(a),y=n(48),v=n(1),o=(n(676),(0,o.a.config)((o=n=function(e){Object(h.a)(n,e);var t=Object(m.a)(n);function n(e){return Object(c.a)(this,n),(e=t.call(this,e)).field=new d.a(Object(p.a)(e)),e.appName=Object(v.b)("appName")||"",e.preAppName=e.appName,e.group=Object(v.b)("historyGroup")||"",e.preGroup=e.group,e.dataId=Object(v.b)("historyDataId")||"",e.preDataId=e.dataId,e.serverId=Object(v.b)("historyServerId")||"",e.state={value:"",visible:!1,total:0,pageSize:10,currentPage:1,dataSource:[],fieldValue:[],showAppName:!1,showgroup:!1,dataId:e.dataId,group:e.group,appName:e.appName,selectValue:[],loading:!1},e}return Object(f.a)(n,[{key:"componentDidMount",value:function(){this.field.setValue("group",this.group),this.field.setValue("dataId",this.dataId)}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"cleanAndGetData",value:function(){0=11?e:e+12;else if(t==="下午"||t==="晚上")return e+12},meridiem:function(e,t,n){var a=e*100+t;if(a<600)return"凌晨";else if(a<900)return"早上";else if(a<1130)return"上午";else if(a<1230)return"中午";else if(a<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(8))},function(e,t,n){"use strict";t.__esModule=!0;var v=c(n(2)),o=c(n(4)),i=c(n(5)),a=c(n(6)),r=n(0),_=c(r),l=c(n(3)),s=n(29),b=c(n(12)),u=c(n(44)),w=c(n(23)),M=c(n(118)),d=c(n(7)),k=n(11);function c(e){return e&&e.__esModule?e:{default:e}}var f,n=function(){},a=(f=r.Component,(0,a.default)(S,f),S.getDerivedStateFromProps=function(e){return"visible"in e?{visible:e.visible}:{}},S.prototype.render=function(){var e=this.props,t=e.prefix,n=(e.pure,e.className),a=e.style,r=e.type,o=e.shape,i=e.size,l=e.title,s=e.children,u=(e.defaultVisible,e.visible,e.iconType),d=e.closeable,c=(e.onClose,e.afterClose),f=e.animation,p=e.rtl,h=e.locale,m=(0,v.default)({},k.obj.pickOthers(Object.keys(S.propTypes),this.props)),g=this.state.visible,y=t+"message",e=(0,b.default)(((e={})[y]=!0,e[t+"message-"+r]=r,e[""+t+o]=o,e[""+t+i]=i,e[t+"title-content"]=!!l,e[t+"only-content"]=!l&&!!s,e[n]=n,e)),s=g?_.default.createElement("div",(0,v.default)({role:"alert",style:a},m,{className:e,dir:p?"rtl":void 0}),d?_.default.createElement("a",{role:"button","aria-label":h.closeAriaLabel,className:y+"-close",onClick:this.onClose},_.default.createElement(w.default,{type:"close"})):null,_.default.createElement(w.default,{className:y+"-symbol "+(!u&&y+"-symbol-icon"),type:u}),l?_.default.createElement("div",{className:y+"-title"},l):null,s?_.default.createElement("div",{className:y+"-content"},s):null):null;return f?_.default.createElement(M.default.Expand,{animationAppear:!1,afterLeave:c},s):s},a=r=S,r.propTypes={prefix:l.default.string,pure:l.default.bool,className:l.default.string,style:l.default.object,type:l.default.oneOf(["success","warning","error","notice","help","loading"]),shape:l.default.oneOf(["inline","addon","toast"]),size:l.default.oneOf(["medium","large"]),title:l.default.node,children:l.default.node,defaultVisible:l.default.bool,visible:l.default.bool,iconType:l.default.string,closeable:l.default.bool,onClose:l.default.func,afterClose:l.default.func,animation:l.default.bool,locale:l.default.object,rtl:l.default.bool},r.defaultProps={prefix:"next-",pure:!1,type:"success",shape:"inline",size:"medium",defaultVisible:!0,closeable:!1,onClose:n,afterClose:n,animation:!0,locale:u.default.Message},a);function S(){var e,t;(0,o.default)(this,S);for(var n=arguments.length,a=Array(n),r=0;ra.clientHeight&&0>6]+c[128|63&s]:s<55296||57344<=s?i+=c[224|s>>12]+c[128|s>>6&63]+c[128|63&s]:(l+=1,s=65536+((1023&s)<<10|1023&o.charCodeAt(l)),i+=c[240|s>>18]+c[128|s>>12&63]+c[128|s>>6&63]+c[128|63&s])}return i},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(d(e)){for(var n=[],a=0;athis.popupNode.offsetWidth&&p(this.popupNode,"width",l.offsetWidth+"px"),"outside"!==e||"hoz"===o&&1===n||(p(this.popupNode,"height",u.offsetHeight+"px"),this.popupNode.firstElementChild&&p(this.popupNode.firstElementChild,"overflow-y","auto"));var d=this.popupProps;d.onOpen&&d.onOpen()}catch(e){return null}},S.prototype.handlePopupClose=function(){var e=this.props.root.popupNodes,t=e.indexOf(this.popupNode);-1t?r[t+1]:r[0])}),n[a]||(o=r[0]),i.onSort(a,o)},i.keydownHandler=function(e){e.preventDefault(),e.stopPropagation(),e.keyCode===l.KEYCODE.ENTER&&i.handleClick()},i.onSort=function(e,t){var n={};n[e]=t,i.props.onSort(e,t,n)},(0,o.default)(i,e)}a.displayName="Sort",t.default=a,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(2)),a=c(n(4)),o=c(n(5)),i=c(n(6)),l=c(n(0)),s=c(n(3)),u=c(n(12)),d=c(n(381));function c(e){return e&&e.__esModule?e:{default:e}}var f,i=(f=l.default.Component,(0,i.default)(p,f),p.prototype.render=function(){var e=this.props,t=e.className,n=e.record,a=e.primaryKey,e=this.context.selectedRowKeys,a=(0,u.default)(((a={selected:-1 "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')":" "+this.message},e.exports=n},function(e,t){var r={}.hasOwnProperty;function n(e,t,n){this.message=e,this.parsedLine=t,this.snippet=n}(function(e,t){for(var n in t)r.call(t,n)&&(e[n]=t[n]);function a(){this.constructor=e}a.prototype=t.prototype,e.prototype=new a,e.__super__=t.prototype})(n,Error),n.prototype.toString=function(){return null!=this.parsedLine&&null!=this.snippet?" "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')":" "+this.message},e.exports=n},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var y=m(n(2)),a=m(n(4)),r=m(n(5)),o=m(n(6)),i=n(0),v=m(i),l=n(24),s=m(n(3)),_=m(n(12)),u=n(11),f=m(n(50)),d=m(n(60)),b=m(n(10)),c=m(n(44)),p=m(n(657)),h=m(n(392)),w=n(166);function m(e){return e&&e.__esModule?e:{default:e}}var M=d.default.Popup,g=f.default.Item,k=f.default.Group,n=u.func.noop,S=u.func.bindCtx,E=u.func.makeChain;var x,o=(x=v.default.Component,(0,o.default)(L,x),L.prototype.componentDidMount=function(){var e=this;setTimeout(function(){return e.syncWidth()},0),u.events.on(window,"resize",this.handleResize)},L.prototype.componentDidUpdate=function(e,t){e.label===this.props.label&&t.value===this.state.value||this.syncWidth()},L.prototype.componentWillUnmount=function(){u.events.off(window,"resize",this.handleResize),clearTimeout(this.resizeTimeout)},L.prototype.syncWidth=function(){var e=this,t=this.props,n=t.popupStyle,t=t.popupProps;n&&"width"in n||t&&t.style&&"width"in t.style||(t=u.dom.getStyle(this.selectDOM,"width"))&&this.width!==t&&(this.width=t,this.popupRef&&this.shouldAutoWidth()&&setTimeout(function(){e.popupRef&&e.popupRef.getInstance().overlay&&u.dom.setStyle(e.popupRef.getInstance().overlay.getInstance().getContentNode(),"width",e.width)},0))},L.prototype.handleResize=function(){var e=this;clearTimeout(this.resizeTimeout),this.state.visible&&(this.resizeTimeout=setTimeout(function(){e.syncWidth()},200))},L.prototype.setDataSource=function(e){var t=e.dataSource,e=e.children;return i.Children.count(e)?this.dataStore.updateByDS(e,!0):Array.isArray(t)?this.dataStore.updateByDS(t,!1):[]},L.prototype.setVisible=function(e,t){this.props.disabled&&e||this.state.visible===e||("visible"in this.props||this.setState({visible:e}),this.props.onVisibleChange(e,t))},L.prototype.setFirstHightLightKeyForMenu=function(){var e;this.props.autoHighlightFirstItem&&this.dataStore.getMenuDS().length&&this.dataStore.getEnableDS().length&&(e=""+this.dataStore.getEnableDS()[0].value,this.setState({highlightKey:e}),this.props.onToggleHighlightItem(e,"autoFirstItem"))},L.prototype.handleChange=function(e){var t;"value"in this.props||this.setState({value:e});for(var n=arguments.length,a=Array(1e.slidesToShow&&(n=e.slideWidth*e.slidesToShow*-1,o=e.slideHeight*e.slidesToShow*-1),e.slideCount%e.slidesToScroll!=0&&(t=e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow,(t=e.rtl?(e.slideIndex>=e.slideCount?e.slideCount-e.slideIndex:e.slideIndex)+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow:t)&&(o=e.slideIndex>e.slideCount?(n=(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideWidth*-1,(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideHeight*-1):(n=e.slideCount%e.slidesToScroll*e.slideWidth*-1,e.slideCount%e.slidesToScroll*e.slideHeight*-1)))):e.slideCount%e.slidesToScroll!=0&&e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow&&(n=(e.slidesToShow-e.slideCount%e.slidesToScroll)*e.slideWidth),e.centerMode&&(e.infinite?n+=e.slideWidth*Math.floor(e.slidesToShow/2):n=e.slideWidth*Math.floor(e.slidesToShow/2)),a=e.vertical?e.slideIndex*e.slideHeight*-1+o:e.slideIndex*e.slideWidth*-1+n,!0===e.variableWidth&&(n=void 0,a=(r=e.slideCount<=e.slidesToShow||!1===e.infinite?i.default.findDOMNode(e.trackRef).childNodes[e.slideIndex]:(n=e.slideIndex+e.slidesToShow,i.default.findDOMNode(e.trackRef).childNodes[n]))?-1*r.offsetLeft:0,!0===e.centerMode&&(r=!1===e.infinite?i.default.findDOMNode(e.trackRef).children[e.slideIndex]:i.default.findDOMNode(e.trackRef).children[e.slideIndex+e.slidesToShow+1])&&(a=-1*r.offsetLeft+(e.listWidth-r.offsetWidth)/2)),a)}},function(e,t,n){"use strict";t.__esModule=!0;var p=u(n(2)),h=u(n(13)),o=u(n(4)),i=u(n(5)),a=u(n(6)),m=u(n(0)),r=u(n(3)),g=u(n(12)),l=u(n(7)),y=u(n(23)),s=n(11);function u(e){return e&&e.__esModule?e:{default:e}}var d,a=(d=m.default.Component,(0,a.default)(c,d),c.prototype.render=function(){var e=this.props,t=e.title,n=e.children,a=e.className,r=e.isExpanded,o=e.disabled,i=e.style,l=e.prefix,s=e.onClick,u=e.id,d=(0,h.default)(e,["title","children","className","isExpanded","disabled","style","prefix","onClick","id"]),c=(0,g.default)(((f={})[l+"collapse-panel"]=!0,f[l+"collapse-panel-hidden"]=!r,f[l+"collapse-panel-expanded"]=r,f[l+"collapse-panel-disabled"]=o,f[a]=a,f)),a=(0,g.default)(((e={})[l+"collapse-panel-icon"]=!0,e[l+"collapse-panel-icon-expanded"]=r,e)),f=u?u+"-heading":void 0,e=u?u+"-region":void 0;return m.default.createElement("div",(0,p.default)({className:c,style:i,id:u},d),m.default.createElement("div",{id:f,className:l+"collapse-panel-title",onClick:s,onKeyDown:this.onKeyDown,tabIndex:"0","aria-disabled":o,"aria-expanded":r,"aria-controls":e,role:"button"},m.default.createElement(y.default,{type:"arrow-right",className:a,"aria-hidden":"true"}),t),m.default.createElement("div",{className:l+"collapse-panel-content",role:"region",id:e},n))},a=n=c,n.propTypes={prefix:r.default.string,style:r.default.object,children:r.default.any,isExpanded:r.default.bool,disabled:r.default.bool,title:r.default.node,className:r.default.string,onClick:r.default.func,id:r.default.string},n.defaultProps={prefix:"next-",isExpanded:!1,onClick:s.func.noop},n.isNextPanel=!0,a);function c(){var e,n;(0,o.default)(this,c);for(var t=arguments.length,a=Array(t),r=0;r\n com.alibaba.nacos\n nacos-client\n ${version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\nimport java.util.concurrent.Executor;\nimport com.alibaba.nacos.api.NacosFactory;\nimport com.alibaba.nacos.api.config.ConfigService;\nimport com.alibaba.nacos.api.config.listener.Listener;\nimport com.alibaba.nacos.api.exception.NacosException;\n\n/**\n * Config service example\n *\n * @author Nacos\n *\n */\npublic class ConfigExample {\n\n\tpublic static void main(String[] args) throws NacosException, InterruptedException {\n\t\tString serverAddr = "localhost";\n\t\tString dataId = "'.concat(e.dataId,'";\n\t\tString group = "').concat(e.group,'";\n\t\tProperties properties = new Properties();\n\t\tproperties.put(PropertyKeyConst.SERVER_ADDR, serverAddr);\n\t\tConfigService configService = NacosFactory.createConfigService(properties);\n\t\tString content = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tconfigService.addListener(dataId, group, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void receiveConfigInfo(String configInfo) {\n\t\t\t\tSystem.out.println("recieve:" + configInfo);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Executor getExecutor() {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\n\t\tboolean isPublishOk = configService.publishConfig(dataId, group, "content");\n\t\tSystem.out.println(isPublishOk);\n\n\t\tThread.sleep(3000);\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\n\t\tboolean isRemoveOk = configService.removeConfig(dataId, group);\n\t\tSystem.out.println(isRemoveOk);\n\t\tThread.sleep(3000);\n\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tThread.sleep(300000);\n\n\t}\n}\n')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,e=L.a.createElement("div",null);return L.a.createElement("div",null,L.a.createElement(_.a,{title:t.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:e,onClose:this.closeDialog.bind(this)},L.a.createElement("div",{style:{height:500}},L.a.createElement(N.a,{tip:t.loading,style:{width:"100%"},visible:this.state.loading},L.a.createElement(Y.a,{shape:"text",style:{height:40,paddingBottom:10}},L.a.createElement(P,{title:"Java",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),L.a.createElement(P,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigboot_code)}),L.a.createElement(P,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloud_code)}),L.a.createElement(P,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),L.a.createElement(P,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),L.a.createElement(P,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),L.a.createElement(P,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)})),L.a.createElement("div",{ref:"codepreview"})))))}}]),n}(L.a.Component),a.displayName="ShowCodeing",a=l))||a,l=(n(65),n(37)),a=n.n(l),I=(n(696),a.a.Row),R=a.a.Col,A=(0,u.a.config)((a=l=function(e){Object(S.a)(n,e);var t=Object(E.a)(n);function n(e){return Object(w.a)(this,n),(e=t.call(this,e)).state={visible:!1,title:"",content:"",isok:!0,dataId:"",group:""},e}return Object(M.a)(n,[{key:"componentDidMount",value:function(){this.initData()}},{key:"initData",value:function(){var e=this.props.locale;this.setState({title:(void 0===e?{}:e).confManagement})}},{key:"openDialog",value:function(e){this.setState({visible:!0,title:e.title,content:e.content,isok:e.isok,dataId:e.dataId,group:e.group,message:e.message})}},{key:"closeDialog",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,e=L.a.createElement("div",{style:{textAlign:"right"}},L.a.createElement(d.a,{type:"primary",onClick:this.closeDialog.bind(this)},t.determine));return L.a.createElement("div",null,L.a.createElement(_.a,{visible:this.state.visible,footer:e,style:{width:555},onCancel:this.closeDialog.bind(this),onClose:this.closeDialog.bind(this),title:t.deletetitle},L.a.createElement("div",null,L.a.createElement(I,null,L.a.createElement(R,{span:"4",style:{paddingTop:16}},L.a.createElement(y.a,{type:"".concat(this.state.isok?"success":"delete","-filling"),style:{color:this.state.isok?"green":"red"},size:"xl"})),L.a.createElement(R,{span:"20"},L.a.createElement("div",null,L.a.createElement("h3",null,this.state.isok?t.deletedSuccessfully:t.deleteFailed),L.a.createElement("p",null,L.a.createElement("span",{style:{color:"#999",marginRight:5}},"Data ID:"),L.a.createElement("span",{style:{color:"#c7254e"}},this.state.dataId)),L.a.createElement("p",null,L.a.createElement("span",{style:{color:"#999",marginRight:5}},"Group:"),L.a.createElement("span",{style:{color:"#c7254e"}},this.state.group)),this.state.isok?"":L.a.createElement("p",{style:{color:"red"}},this.state.message)))))))}}]),n}(L.a.Component),l.displayName="DeleteDialog",l=a))||l,a=(n(697),n(410)),H=n.n(a),F=(0,u.a.config)((a=l=function(e){Object(S.a)(n,e);var t=Object(E.a)(n);function n(){return Object(w.a)(this,n),t.apply(this,arguments)}return Object(M.a)(n,[{key:"render",value:function(){var e=this.props,t=e.data,n=void 0===t?{}:t,t=e.height,e=e.locale,a=void 0===e?{}:e;return L.a.createElement("div",null,"notice"===n.modeType?L.a.createElement("div",{"data-spm-click":"gostr=/aliyun;locaid=notice"},L.a.createElement(H.a,{style:{marginBottom:1e?b.a.createElement(L.a,{className:"pagination",total:s.count,pageSize:e,onChange:function(e){return a.onChangePage(e)}}):null,b.a.createElement(C,{ref:this.editInstanceDialog,serviceName:o,clusterName:n,groupName:i,openLoading:function(){return a.openLoading()},closeLoading:function(){return a.closeLoading()},getInstanceList:function(){return a.getInstanceList()}})):null}}]),n}(b.a.Component),r.displayName="InstanceTable",r.defaultProps={filters:new Map},o=o))||o,D=function(e,t){return e.filter(function(e){var n=e.metadata,a=!0;return t.forEach(function(e,t){if(e!==n[t])return a=!1}),a})},O=o,N=n(47),Y=n(31),o=(n(164),n(71)),o=n.n(o),P=o.a.Group,j=o.a.Closeable,I=v.a.Item;var R=a.a.config(function(e){var t=Object(_.useState)(""),n=(u=Object(Y.a)(t,2))[0],a=u[1],r=Object(_.useState)(""),o=(s=Object(Y.a)(r,2))[0],i=s[1],t=Object(_.useState)(""),r=(u=Object(Y.a)(t,2))[0],l=u[1],s=Object(_.useState)(""),u=(t=Object(Y.a)(s,2))[0],d=t[1],s=Object(_.useState)(new Map),c=(t=Object(Y.a)(s,2))[0],f=t[1],t=void 0===(s=e.locale)?{}:s,s=function(){var e;h(),n&&o&&(e=new Map(Array.from(c)).set(n,o),f(e),l(""),d(""),p())},p=function(){a(""),i("")},h=function(){l(n?"":"error"),d(o?"":"error")};return Object(_.useEffect)(function(){e.setFilters(c)},[c]),b.a.createElement(m.a,{contentHeight:"auto",className:"inner-card"},b.a.createElement(v.a,{inline:!0,size:"small"},b.a.createElement(I,{label:t.title},b.a.createElement(I,null,b.a.createElement(y.a,{placeholder:"key",value:n,trim:!0,onChange:function(e){return a(e)},onPressEnter:s,state:r})),b.a.createElement(I,null,b.a.createElement(y.a,{placeholder:"value",value:o,trim:!0,onChange:function(e){return i(e)},onPressEnter:s,state:u})),b.a.createElement(I,{label:""},b.a.createElement(g.a,{type:"primary",onClick:s,style:{marginRight:10}},t.addFilter),0n&&y.a.createElement(s.a,{className:"users-pagination",current:e,total:t.totalCount,pageSize:n,onChange:function(e){return a.setState({pageNo:e},function(){return a.getPermissions()})}}),y.a.createElement(L,{visible:i,onOk:function(e){return Object(v.a)(e).then(function(e){return a.setState({pageNo:1},function(){return a.getPermissions()}),e})},onCancel:function(){return a.colseCreatePermission()}}))}}]),n}(y.a.Component),i.displayName="PermissionsManagement",a=a))||a)||a);t.a=a},function(e,t,n){"use strict";n(63);var a=n(46),s=n.n(a),r=(n(34),n(18)),u=n.n(r),o=(n(61),n(20)),d=n.n(o),i=(n(32),n(19)),c=n.n(i),l=n(14),f=n(15),p=n(17),h=n(16),a=(n(25),n(7)),r=n.n(a),o=n(0),m=n.n(o),i=n(43),g=n(45),y=n(48),a=(n(40),n(10)),v=n.n(a),_=n(31),o=(n(49),n(26)),b=n.n(o),w=n(22),a=(n(42),n(9)),M=n.n(a),k=(n(151),M.a.Item),S={labelCol:{fixedSpan:4},wrapperCol:{span:19}},E=(0,r.a.config)((a=o=function(e){Object(p.a)(o,e);var r=Object(h.a)(o);function o(){var e;Object(l.a)(this,o);for(var t=arguments.length,n=new Array(t),a=0;ai&&m.a.createElement(s.a,{className:"users-pagination",current:l,total:n.totalCount,pageSize:i,onChange:function(e){return t.setState({pageNo:e},function(){return t.getUsers()})}}),m.a.createElement(E,{visible:e,onOk:function(e){return Object(g.c)(e).then(function(e){return t.setState({pageNo:1},function(){return t.getUsers()}),e})},onCancel:function(){return t.colseCreateUser()}}),m.a.createElement(x.a,{username:r,onOk:function(e){return Object(g.k)(e).then(function(e){return t.getUsers(),e})},onCancel:function(){return t.setState({passwordResetUser:void 0})}}))}}]),n}(m.a.Component),i.displayName="UserManagement",r=r))||r)||r;t.a=r},function(e,t,n){"use strict";n(63);var a=n(46),M=n.n(a),r=(n(32),n(19)),k=n.n(r),o=(n(171),n(97)),S=n.n(o),i=(n(40),n(10)),E=n.n(i),x=n(21),a=(n(52),n(27)),l=n.n(a),r=(n(34),n(18)),s=n.n(r),o=(n(49),n(26)),u=n.n(o),d=n(14),c=n(15),f=n(22),p=n(17),h=n(16),i=(n(25),n(7)),a=n.n(i),r=(n(61),n(20)),L=n.n(r),o=(n(65),n(37)),i=n.n(o),r=(n(42),n(9)),T=n.n(r),o=n(0),C=n.n(o),m=n(1),D=n(47),O=n(48),N=n(135),r=(n(51),n(33)),g=n.n(r),o=(n(126),n(57)),y=n.n(o),v=(n(396),y.a.Item),Y=(0,a.a.config)((o=r=function(e){Object(p.a)(n,e);var t=Object(h.a)(n);function n(e){return Object(d.a)(this,n),(e=t.call(this,e)).state={dialogvisible:!1,loading:!1},e.defaultCode="",e.nodejsCode="TODO",e.cppCode="TODO",e.shellCode="TODO",e.pythonCode="TODO",e.record={},e.springCode="TODO",e.sprigbootCode="TODO",e.sprigcloudCode="TODO",e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"getData",value:function(){var e=Object(m.b)("namespace"),e={group:this.record.group||"",dataId:this.record.dataId||"",namespace:e,inEdas:window.globalConfig.isParentEdas()};this.defaultCode=this.getJavaCode(e),this.createCodeMirror("text/x-java",this.defaultCode),this.springCode=this.getSpringCode(e),this.sprigbootCode=this.getSpringBootCode(e),this.sprigcloudCode=this.getSpringCloudCode(e),this.nodejsCode=this.getNodejsCode(e),this.cppCode=this.getCppCode(e),this.shellCode=this.getShellCode(e),this.pythonCode=this.getPythonCode(e),this.forceUpdate()}},{key:"getJavaCode",value:function(e){return'/* Refer to document: https://github.com/alibaba/nacos/blob/master/example/src/main/java/com/alibaba/nacos/example\n* pom.xml\n \n com.alibaba.nacos\n nacos-client\n ${latest.version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\n\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingFactory;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.listener.Event;\nimport com.alibaba.nacos.api.naming.listener.EventListener;\nimport com.alibaba.nacos.api.naming.listener.NamingEvent;\n\n/**\n * @author nkorange\n */\npublic class NamingExample {\n\n public static void main(String[] args) throws NacosException {\n\n Properties properties = new Properties();\n properties.setProperty("serverAddr", System.getProperty("serverAddr"));\n properties.setProperty("namespace", System.getProperty("namespace"));\n\n NamingService naming = NamingFactory.createNamingService(properties);\n\n naming.registerInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n naming.registerInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.deregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.subscribe("').concat(this.record.name,'", new EventListener() {\n @Override\n public void onEvent(Event event) {\n System.out.println(((NamingEvent)event).getServiceName());\n System.out.println(((NamingEvent)event).getInstances());\n }\n });\n }\n}')}},{key:"getSpringCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example\n* pom.xml\n \n com.alibaba.nacos\n nacos-spring-context\n ${latest.version}\n \n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring\npackage com.alibaba.nacos.example.spring;\n\nimport com.alibaba.nacos.api.annotation.NacosProperties;\nimport com.alibaba.nacos.spring.context.annotation.discovery.EnableNacosDiscovery;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\n@EnableNacosDiscovery(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848"))\npublic class NacosConfiguration {\n\n}\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring/controller\npackage com.alibaba.nacos.example.spring.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringBootCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example\n* pom.xml\n \n com.alibaba.boot\n nacos-discovery-spring-boot-starter\n ${latest.version}\n \n*/\n/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/resources\n* application.properties\n nacos.discovery.server-addr=127.0.0.1:8848\n*/\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/java/com/alibaba/nacos/example/spring/boot/controller\n\npackage com.alibaba.nacos.example.spring.boot.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringCloudCode",value:function(e){return"/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/\n* pom.xml\n \n org.springframework.cloud\n spring-cloud-starter-alibaba-nacos-discovery\n ${latest.version}\n \n*/\n\n// nacos-spring-cloud-provider-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/resources\n* application.properties\nserver.port=18080\nspring.application.name=".concat(this.record.name,'\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosProviderApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(NacosProviderApplication.class, args);\n}\n\n @RestController\n class EchoController {\n @RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)\n public String echo(@PathVariable String string) {\n return "Hello Nacos Discovery " + string;\n }\n }\n}\n\n// nacos-spring-cloud-consumer-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/resources\n* application.properties\nspring.application.name=micro-service-oauth2\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.cloud.client.loadbalancer.LoadBalanced;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\nimport org.springframework.web.client.RestTemplate;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosConsumerApplication {\n\n @LoadBalanced\n @Bean\n public RestTemplate restTemplate() {\n return new RestTemplate();\n }\n\n public static void main(String[] args) {\n SpringApplication.run(NacosConsumerApplication.class, args);\n }\n\n @RestController\n public class TestController {\n\n private final RestTemplate restTemplate;\n\n @Autowired\n public TestController(RestTemplate restTemplate) {this.restTemplate = restTemplate;}\n\n @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)\n public String echo(@PathVariable String str) {\n return restTemplate.getForObject("http://service-provider/echo/" + str, String.class);\n }\n }\n}')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}),this.cm.setSize("auto","490px"))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return C.a.createElement("div",null,C.a.createElement(s.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:C.a.createElement("div",null),onClose:this.closeDialog.bind(this)},C.a.createElement("div",{style:{height:500}},C.a.createElement(g.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},C.a.createElement(y.a,{shape:"text",style:{height:40,paddingBottom:10}},C.a.createElement(v,{title:"Java",key:0,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),C.a.createElement(v,{title:"Spring",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.springCode)}),C.a.createElement(v,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigbootCode)}),C.a.createElement(v,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloudCode)}),C.a.createElement(v,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),C.a.createElement(v,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),C.a.createElement(v,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),C.a.createElement(v,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)})),C.a.createElement("div",{ref:"codepreview"})))))}}]),n}(C.a.Component),r.displayName="ShowServiceCodeing",o=o))||o,P=(n(719),n(28)),j=T.a.Item,I=i.a.Row,R=i.a.Col,A=L.a.Column,a=(0,a.a.config)((a=i=function(e){Object(p.a)(a,e);var t=Object(h.a)(a);function a(e){var n;return Object(d.a)(this,a),(n=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return n.queryServiceList()})},n.showcode=function(){setTimeout(function(){return n.queryServiceList()})},n.setNowNameSpace=function(e,t){return n.setState({nowNamespaceName:e,nowNamespaceId:t})},n.rowColor=function(e){return{className:e.healthyInstanceCount?"":"row-bg-red"}},n.editServiceDialog=C.a.createRef(),n.showcode=C.a.createRef(),n.state={loading:!1,total:0,pageSize:10,currentPage:1,dataSource:[],search:{serviceName:"",groupName:""},hasIpCount:!("false"===localStorage.getItem("hasIpCount"))},n.field=new u.a(Object(f.a)(n)),n}return Object(c.a)(a,[{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"openEditServiceDialog",value:function(){try{this.editServiceDialog.current.getInstance().show(this.state.service)}catch(e){}}},{key:"queryServiceList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.search,o=e.withInstances,o=void 0!==o&&o,e=e.hasIpCount,r=["hasIpCount=".concat(e),"withInstances=".concat(o),"pageNo=".concat(t),"pageSize=".concat(a),"serviceNameParam=".concat(r.serviceName),"groupNameParam=".concat(r.groupName)];this.openLoading(),Object(m.c)({url:"v1/ns/catalog/services?".concat(r.join("&")),success:function(){var e=0i&&m.a.createElement(s.a,{className:"users-pagination",current:l,total:t.totalCount,pageSize:i,onChange:function(e){return a.setState({pageNo:e},function(){return a.getRoles()})}}),m.a.createElement(E,{visible:e,onOk:function(e){return Object(g.b)(e).then(function(e){return a.getRoles(),e})},onCancel:function(){return a.colseCreateRole()}}))}}]),n}(m.a.Component),i.displayName="RolesManagement",r=r))||r)||r);t.a=r},function(e,t,n){"use strict";n(32);var a=n(19),r=n.n(a),o=(n(42),n(9)),i=n.n(o),a=(n(40),n(10)),l=n.n(a),o=(n(49),n(26)),s=n.n(o),u=n(14),d=n(15),c=n(22),f=n(17),p=n(16),a=(n(25),n(7)),o=n.n(a),a=n(0),h=n.n(a),m=n(1),o=(n(673),(0,o.a.config)((o=n=function(e){Object(f.a)(n,e);var t=Object(p.a)(n);function n(e){return Object(u.a)(this,n),(e=t.call(this,e)).state={showmore:!1},e.edasAppName=Object(m.b)("edasAppName"),e.edasAppId=Object(m.b)("edasAppId"),e.inApp=e.edasAppName,e.field=new s.a(Object(c.a)(e)),e.dataId=Object(m.b)("dataId")||"yanlin",e.group=Object(m.b)("group")||"DEFAULT_GROUP",e.serverId=Object(m.b)("serverId")||"center",e.nid=Object(m.b)("nid")||"123509854",e.tenant=Object(m.b)("namespace")||"",e}return Object(d.a)(n,[{key:"componentDidMount",value:function(){this.getDataDetail()}},{key:"toggleMore",value:function(){this.setState({showmore:!this.state.showmore})}},{key:"getDataDetail",value:function(){this.props.locale;var t=this;Object(m.c)({url:"v1/cs/history?dataId=".concat(this.dataId,"&group=").concat(this.group,"&nid=").concat(this.nid),success:function(e){null!=e&&(t.field.setValue("dataId",(e=e).dataId),t.field.setValue("content",e.content),t.field.setValue("appName",t.inApp?t.edasAppName:e.appName),t.field.setValue("envs",t.serverId),t.field.setValue("srcUser",e.srcUser),t.field.setValue("srcIp",e.srcIp),t.field.setValue("opType",e.opType.trim()),t.field.setValue("group",e.group),t.field.setValue("md5",e.md5))}})}},{key:"goList",value:function(){this.props.history.push("/historyRollback?serverId=".concat(this.serverId,"&historyGroup=").concat(this.group,"&historyDataId=").concat(this.dataId,"&namespace=").concat(this.tenant))}},{key:"getOpType",value:function(e,t){return e?{U:t.update,I:t.insert,D:t.deleteAction}[e]:""}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,n=this.field.init,a={labelCol:{fixedSpan:6},wrapperCol:{span:18}},e=this.getOpType;return h.a.createElement("div",{style:{padding:10}},h.a.createElement("h1",null,t.historyDetails),h.a.createElement(i.a,{field:this.field},h.a.createElement(i.a.Item,Object.assign({label:"Data ID:",required:!0},a),h.a.createElement(l.a,Object.assign({htmlType:"text",readOnly:!0},n("dataId"))),h.a.createElement("div",{style:{marginTop:10}},h.a.createElement("a",{style:{fontSize:"12px"},onClick:this.toggleMore.bind(this)},this.state.showmore?t.recipientFrom:t.moreAdvancedOptions))),h.a.createElement("div",{style:{overflow:"hidden",height:this.state.showmore?"auto":"0"}},h.a.createElement(i.a.Item,Object.assign({label:"Group:",required:!0},a),h.a.createElement(l.a,Object.assign({htmlType:"text",readOnly:!0},n("group")))),h.a.createElement(i.a.Item,Object.assign({label:t.home},a),h.a.createElement(l.a,Object.assign({htmlType:"text",readOnly:!0},n("appName"))))),h.a.createElement(i.a.Item,Object.assign({label:t.operator,required:!0},a),h.a.createElement(l.a,Object.assign({htmlType:"text",readOnly:!0},n("srcUser")))),h.a.createElement(i.a.Item,Object.assign({label:t.sourceIp,required:!0},a),h.a.createElement(l.a,Object.assign({htmlType:"text",readOnly:!0},n("srcIp")))),h.a.createElement(i.a.Item,Object.assign({label:t.actionType,required:!0},a),h.a.createElement(l.a,{htmlType:"text",readOnly:!0,value:e(n("opType").value,t)})),h.a.createElement(i.a.Item,Object.assign({label:"MD5:",required:!0},a),h.a.createElement(l.a,Object.assign({htmlType:"text",readOnly:!0},n("md5")))),h.a.createElement(i.a.Item,Object.assign({label:t.configureContent,required:!0},a),h.a.createElement(l.a.TextArea,Object.assign({htmlType:"text",multiple:!0,rows:15,readOnly:!0},n("content")))),h.a.createElement(i.a.Item,Object.assign({label:" "},a),h.a.createElement(r.a,{type:"primary",onClick:this.goList.bind(this)},t.back))))}}]),n}(h.a.Component),n.displayName="HistoryDetail",o=o))||o);t.a=o},function(e,t,l){"use strict";l(51);var n=l(33),g=l.n(n),a=(l(32),l(19)),y=l.n(a),r=(l(387),l(133)),v=l.n(r),n=(l(41),l(23)),_=l.n(n),a=(l(120),l(82)),b=l.n(a),r=(l(103),l(69)),w=l.n(r),n=(l(62),l(30)),M=l.n(n),a=(l(42),l(9)),k=l.n(a),r=(l(40),l(10)),S=l.n(r),n=(l(126),l(57)),E=l.n(n),o=l(58),a=(l(34),l(18)),i=l.n(a),x=l(21),r=(l(52),l(27)),s=l.n(r),u=l(14),d=l(15),c=l(17),f=l(16),n=(l(25),l(7)),a=l.n(n),r=(l(65),l(37)),n=l.n(r),r=l(0),L=l.n(r),p=l(1),h=l(47),m=l(35),T=l(132),C=l(99),D=l(111),O=(l(672),n.a.Row),N=n.a.Col,Y=[{value:"text",label:"TEXT"},{value:"json",label:"JSON"},{value:"xml",label:"XML"},{value:"yaml",label:"YAML"},{value:"html",label:"HTML"},{value:"properties",label:"Properties"}],P=["production","beta"],a=(0,a.a.config)((a=n=function(e){Object(c.a)(n,e);var t=Object(f.a)(n);function n(e){return Object(u.a)(this,n),(e=t.call(this,e)).state={loading:!1,isBeta:!1,isNewConfig:!0,betaPublishSuccess:!1,betaIps:"",tabActiveKey:"",form:{dataId:"",group:"",content:"",appName:"",desc:"",config_tags:[],type:"text"},tagDataSource:[],subscriberDataSource:[],openAdvancedSettings:!1,editorClass:"editor-normal"},e.successDialog=L.a.createRef(),e.diffEditorDialog=L.a.createRef(),e}return Object(d.a)(n,[{key:"componentDidMount",value:function(){var t=this,e=!Object(p.b)("dataId"),n=Object(p.b)("group").trim();this.setState({isNewConfig:e},function(){e?(n&&t.setState({group:n}),t.initMoacoEditor("text","")):t.changeForm({dataId:Object(p.b)("dataId").trim(),group:n},function(){t.getConfig(!0).then(function(e){e?t.setState({isBeta:!0,tabActiveKey:"beta",betaPublishSuccess:!0}):t.getConfig()}),t.getSubscribesByNamespace()}),t.initFullScreenEvent()})}},{key:"initMoacoEditor",value:function(e,t){var n=this,a=document.getElementById("container");a.innerHTML="";var r={value:t,language:e,codeLens:!(this.monacoEditor=null),selectOnLineNumbers:!0,roundedSelection:!1,readOnly:!1,lineNumbersMinChars:!0,theme:"vs-dark",folding:!1,showFoldingControls:"always",cursorStyle:"line",automaticLayout:!0};window.monaco?this.monacoEditor=window.monaco.editor.create(a,r):window.importEditor(function(){n.monacoEditor=window.monaco.editor.create(a,r)})}},{key:"initFullScreenEvent",value:function(){var t=this;document.body.addEventListener("keydown",function(e){"F1"===e.key?(e.preventDefault(),t.setState({editorClass:"editor-full-screen"})):"Escape"===e.key&&t.setState({editorClass:"editor-normal"})})}},{key:"createDiffCodeMirror",value:function(e,t){var n=this.diffEditorDialog.current.getInstance();n.innerHTML="",this.diffeditor=window.CodeMirror.MergeView(n,{value:e||"",origLeft:null,orig:t||"",lineNumbers:!0,mode:this.mode,theme:"xq-light",highlightDifferences:!0,connect:"align",collapseIdentical:!1})}},{key:"openDiff",value:function(e){this.diffcb=e;var t=this.monacoEditor.getValue(),e=this.codeVal||"",t=t.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n"),e=e.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n");this.diffEditorDialog.current.getInstance().openDialog(t,e)}},{key:"clickTab",value:function(e){var t=this;this.setState({tabActiveKey:e},function(){return t.getConfig("beta"===e)})}},{key:"getCodeVal",value:function(){var e=this.props.locale,t=void 0===e?{}:e,e=this.state.form,e=(e.type,e.content),e=this.monacoEditor?this.monacoEditor.getValue():e;return e||(s.a.error({content:t.submitFailed,align:"cc cc"}),!1)}},{key:"setCodeVal",value:function(e){var t=this.state.form;this.setState({form:Object(x.a)(Object(x.a)({},t),{},{content:e})}),this.monacoEditor&&this.monacoEditor.setValue(e)}},{key:"publish",value:function(){var t=this,e=this.props.locale,n=void 0===e?{}:e,a=this.state.form.type;this.state.isNewConfig&&this.validation();e=this.getCodeVal();if(e)return T.a.validate({content:e,type:a})?this._publishConfig():new Promise(function(e){i.a.confirm({content:n.codeValErrorPrompt,onOk:function(){return e(t._publishConfig())},onCancel:function(){return e(!1)}})})}},{key:"_publishConfig",value:function(){var t=this,n=0this.state.pageSize&&w.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},w.a.createElement(p.a,{current:this.state.currentPage,total:this.state.total,pageSize:this.state.pageSize,onChange:function(e){return t.setState({currentPage:e},function(){return t.queryClusterStateList()})}}))))}}]),a}(w.a.Component),r.displayName="ClusterNodeList",o=o))||o;t.a=o},function(e,t,n){"use strict";n(51);var a=n(33),r=n.n(a),o=(n(63),n(46)),i=n.n(o),l=(n(61),n(20)),s=n.n(l),a=(n(40),n(10)),u=n.n(a),o=(n(62),n(30)),d=n.n(o),l=(n(49),n(26)),c=n.n(l),f=n(31),p=n(14),h=n(15),m=n(22),g=n(17),y=n(16),a=(n(25),n(7)),o=n.n(a),l=(n(65),n(37)),a=n.n(l),l=(n(42),n(9)),v=n.n(l),l=n(0),_=n.n(l),b=n(48),w=n(1),M=(n(678),v.a.Item),k=a.a.Row,S=a.a.Col,o=(0,o.a.config)((o=a=function(e){Object(g.a)(n,e);var t=Object(y.a)(n);function n(e){var a;return Object(p.a)(this,n),(a=t.call(this,e)).queryTrackQuery=function(){var l=Object(m.a)(a),e="",s=a.getValue("type");if(1===s){var t=a.getValue("ip"),e="v1/cs/listener?ip=".concat(t),n=window.nownamespace||Object(w.b)("namespace")||"";n&&(e+="&tenant=".concat(n))}else{t=a.getValue("dataId"),n=a.getValue("group");if(!t||!n)return!1;e="v1/cs/configs/listener?dataId=".concat(t,"&group=").concat(n)}Object(w.c)({url:e,beforeSend:function(){l.openLoading()},success:function(e){if(200===e.collectStatus){var t,n,a,r,o=[],i=e.lisentersGroupkeyStatus;for(t in i)1===s?(r={},n=t.split("+"),n=(a=Object(f.a)(n,2))[0],a=a[1],r.dataId=n,r.group=a,r.md5=i[t],o.push(r)):((r={}).ip=t,r.md5=i[t],o.push(r));l.setState({dataSource:o||[],total:o.length||0})}},complete:function(){l.closeLoading()}})},a.changePage=function(e){a.setState({currentPage:e})},a.getQueryLater=function(){setTimeout(function(){a.queryTrackQuery()})},a.state={value:"",visible:!1,loading:!1,total:0,pageSize:10,currentPage:1,dataSource:[]},a.field=new c.a(Object(m.a)(a)),a.group=Object(w.b)("listeningGroup")||"",a.dataId=Object(w.b)("listeningDataId")||"",a.serverId=Object(w.b)("listeningServerId")||"",a.tenant=Object(w.b)("namespace")||"",a}return Object(h.a)(n,[{key:"componentDidMount",value:function(){this.field.setValue("type",0),this.field.setValue("group",this.group),this.field.setValue("dataId",this.dataId)}},{key:"onSearch",value:function(){}},{key:"onChange",value:function(){}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"showMore",value:function(){}},{key:"resetSearch",value:function(){this.field.reset(),this.forceUpdate()}},{key:"renderStatus",value:function(e,t,n){var a=this.props.locale,a=void 0===a?{}:a;return _.a.createElement("div",null,!0===n.pushStatus?_.a.createElement("span",{style:{color:"green"}},a.success):_.a.createElement("span",{style:{color:"red"}},a.failure))}},{key:"render",value:function(){var t=this,e=this.props.locale,n=void 0===e?{}:e,a=this.field,e=a.init,a=a.getValue;this.init=e,this.getValue=a;a=[{label:n.configuration,value:0},{label:"IP",value:1}];return _.a.createElement(_.a.Fragment,null,_.a.createElement(r.a,{shape:"flower",style:{position:"relative"},visible:this.state.loading,tip:"Loading...",color:"#333"},_.a.createElement(b.a,{left:n.listenerQuery,namespaceCallBack:this.getQueryLater}),_.a.createElement(k,{className:"demo-row",style:{marginBottom:10,padding:0}},_.a.createElement(S,{span:"24"},_.a.createElement(v.a,{inline:!0,field:this.field},_.a.createElement(M,{label:"".concat(n.queryDimension,":")},_.a.createElement(d.a,Object.assign({dataSource:a,style:{width:200}},this.init("type"),{onChange:function(e){t.field.setValue("type",e),t.queryTrackQuery()}}))),_.a.createElement(M,{label:"Data ID:",style:{display:0===this.getValue("type")?"":"none"},required:!0},_.a.createElement(u.a,Object.assign({placeholder:n.pleaseEnterTheDataId,style:{width:200}},this.init("dataId",{rules:[{required:!0,message:n.dataIdCanNotBeEmpty}]})))),_.a.createElement(M,{label:"Group:",style:{display:0===this.getValue("type")?"":"none"},required:!0},_.a.createElement(u.a,Object.assign({placeholder:n.pleaseInputGroup,style:{width:200}},this.init("group",{rules:[{required:!0,message:n.groupCanNotBeEmpty}]})))),_.a.createElement(M,{label:"IP:",style:{display:0===this.getValue("type")?"none":""}},_.a.createElement(u.a,Object.assign({placeholder:n.pleaseInputIp,style:{width:200,boxSize:"border-box"}},this.init("ip")))),_.a.createElement(M,{label:""},_.a.createElement(v.a.Submit,{validate:!0,type:"primary",onClick:this.queryTrackQuery,style:{marginRight:10}},n.query))))),_.a.createElement("div",{style:{position:"relative"}},_.a.createElement("h3",{style:{height:28,lineHeight:"28px",paddingLeft:10,borderLeft:"3px solid #09c",margin:0,marginBottom:10,fontSize:16}},n.queryResultsQuery,_.a.createElement("strong",{style:{fontWeight:"bold"}}," ",this.state.total," "),n.articleMeetRequirementsConfiguration)),_.a.createElement(k,{style:{padding:0}},_.a.createElement(S,{span:"24",style:{padding:0}},1===this.getValue("type")?_.a.createElement(s.a,{dataSource:this.state.dataSource,fixedHeader:!0,maxBodyHeight:500,locale:{empty:n.pubNoData}},_.a.createElement(s.a.Column,{title:"Data ID",dataIndex:"dataId"}),_.a.createElement(s.a.Column,{title:"Group",dataIndex:"group"}),_.a.createElement(s.a.Column,{title:"MD5",dataIndex:"md5"})):_.a.createElement(s.a,{dataSource:this.state.dataSource,fixedHeader:!0,maxBodyHeight:400,locale:{empty:n.pubNoData}},_.a.createElement(s.a.Column,{title:"IP",dataIndex:"ip"}),_.a.createElement(s.a.Column,{title:"MD5",dataIndex:"md5"})))),_.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},_.a.createElement(i.a,{current:this.state.currentPage,total:this.state.total,pageSize:this.state.pageSize,onChange:this.changePage}),",")))}}]),n}(_.a.Component),a.displayName="ListeningToQuery",o=o))||o;t.a=o},function(e,t,n){"use strict";n(51);var a=n(33),r=n.n(a),o=(n(32),n(19)),i=n.n(o),a=(n(103),n(69)),l=n.n(a),o=(n(42),n(9)),s=n.n(o),a=(n(40),n(10)),u=n.n(a),o=(n(34),n(18)),d=n.n(o),a=(n(49),n(26)),c=n.n(a),f=n(14),p=n(15),h=n(22),m=n(17),g=n(16),o=(n(25),n(7)),a=n.n(o),o=n(0),y=n.n(o),v=n(99),_=n(1),b=n(47),a=(n(664),(0,a.a.config)((a=n=function(e){Object(m.a)(n,e);var t=Object(g.a)(n);function n(e){return Object(f.a)(this,n),(e=t.call(this,e)).successDialog=y.a.createRef(),e.field=new c.a(Object(h.a)(e)),e.dataId=Object(_.b)("dataId")||"yanlin",e.group=Object(_.b)("group")||"",e.serverId=Object(_.b)("serverId")||"",e.state={configType:0,envvalues:[],commonvalue:[],envComponent:"",envGroups:[],envlist:[],loading:!1,showmore:!1},e.codeValue="",e.mode="text",e.ips="",e}return Object(p.a)(n,[{key:"componentDidMount",value:function(){this.getDataDetail()}},{key:"toggleMore",value:function(){this.setState({showmore:!this.state.showmore})}},{key:"getEnvList",value:function(e){this.setState({envvalues:e}),this.envs=e}},{key:"getDomain",value:function(){var t=this;Object(_.c)({url:"/diamond-ops/env/domain",success:function(e){200===e.code&&(e=e.data.envGroups,t.setState({envGroups:e}))}})}},{key:"getDataDetail",value:function(){var i=this,e=this.props.locale,l=void 0===e?{}:e;this.tenant=Object(_.b)("namespace")||"",this.serverId=Object(_.b)("serverId")||"center";e="/diamond-ops/configList/detail/serverId/".concat(this.serverId,"/dataId/").concat(this.dataId,"/group/").concat(this.group,"/tenant/").concat(this.tenant,"?id=");"global"!==this.tenant&&this.tenant||(e="/diamond-ops/configList/detail/serverId/".concat(this.serverId,"/dataId/").concat(this.dataId,"/group/").concat(this.group,"?id=")),Object(_.c)({url:e,beforeSend:function(){i.openLoading()},success:function(e){if(200===e.code){var t=e.data,t=void 0===t?{}:t;i.field.setValue("dataId",t.dataId),i.field.setValue("appName",t.appName),i.field.setValue("group",t.group),i.field.setValue("content",t.content||"");for(var n=t.envs||[],a=[],r=[],o=0;othis.state.pageSize&&k.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},k.a.createElement(y.a,{current:this.state.pageNo,total:l,pageSize:this.state.pageSize,onChange:function(e){return t.setState({pageNo:e},function(){return t.querySubscriberList()})}}))))}}]),a}(k.a.Component),r.displayName="SubscriberList",i=i))||i)||i;t.a=i},function(e,t,n){"use strict";n(51);var a=n(33),r=n.n(a),o=(n(63),n(46)),i=n.n(o),a=(n(61),n(20)),l=n.n(a),o=(n(42),n(9)),s=n.n(o),a=(n(40),n(10)),u=n.n(a),o=(n(49),n(26)),d=n.n(o),c=n(14),f=n(15),p=n(22),h=n(17),m=n(16),a=(n(25),n(7)),o=n.n(a),a=n(0),g=n.n(a),y=n(48),v=n(1),o=(n(676),(0,o.a.config)((o=n=function(e){Object(h.a)(n,e);var t=Object(m.a)(n);function n(e){return Object(c.a)(this,n),(e=t.call(this,e)).field=new d.a(Object(p.a)(e)),e.appName=Object(v.b)("appName")||"",e.preAppName=e.appName,e.group=Object(v.b)("historyGroup")||"",e.preGroup=e.group,e.dataId=Object(v.b)("historyDataId")||"",e.preDataId=e.dataId,e.serverId=Object(v.b)("historyServerId")||"",e.state={value:"",visible:!1,total:0,pageSize:10,currentPage:1,dataSource:[],fieldValue:[],showAppName:!1,showgroup:!1,dataId:e.dataId,group:e.group,appName:e.appName,selectValue:[],loading:!1},e}return Object(f.a)(n,[{key:"componentDidMount",value:function(){this.field.setValue("group",this.group),this.field.setValue("dataId",this.dataId)}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"cleanAndGetData",value:function(){0