diff --git a/console/src/main/resources/static/index.html b/console/src/main/resources/static/index.html index 5fd73b0f776..121dab1872b 100644 --- a/console/src/main/resources/static/index.html +++ b/console/src/main/resources/static/index.html @@ -35,7 +35,7 @@ - +
@@ -56,6 +56,6 @@ - + diff --git a/console/src/main/resources/static/js/main.js b/console/src/main/resources/static/js/main.js index e8f148316b9..212c87988b0 100644 --- a/console/src/main/resources/static/js/main.js +++ b/console/src/main/resources/static/js/main.js @@ -295,7 +295,7 @@ var t;e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_ * @author Feross Aboukhadijeh * @license MIT */ -var S=P(706),o=P(707),s=P(708);function n(){return d.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function f(e,t){if(d.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var n=(e="string"!=typeof e?""+e:e).length;if(0===n)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return O(e).length;default:if(a)return L(e).length;t=(""+t).toLowerCase(),a=!0}}function t(e,t,n){var a,r=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,i=t,s=n,l=o.length;(!s||s<0||l=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=d.from(t,a)),d.isBuffer(t))return 0===t.length?-1:m(e,t,n,a,r);if("number"==typeof t)return t&=255,d.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(r?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):m(e,[t],n,a,r);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,a,r){var o=1,i=e.length,s=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;i/=o=2,s/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r)for(var u=-1,c=n;c>8,r.push(n%256),r.push(a);return r}(t,e.length-n),e,n,a)}function E(e,t,n){n=Math.min(e.length,n);for(var a=[],r=t;r>>10&1023|55296),c=56320|1023&c),a.push(c),r+=d}var f=a,p=f.length;if(p<=v)return String.fromCharCode.apply(String,f);for(var h="",m=0;mt)&&(e+=" ... "),""},d.prototype.compare=function(e,t,n,a,r){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===r&&(r=this.length),(t=void 0===t?0:t)<0||n>e.length||a<0||r>this.length)throw new RangeError("out of range index");if(r<=a&&n<=t)return 0;if(r<=a)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(a>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(o,i),l=this.slice(a,r),u=e.slice(t,n),c=0;cthis.length)throw new RangeError("Attempt to write outside buffer bounds");a=a||"utf8";for(var o,i,s,l=!1;;)switch(a){case"hex":var u=this,c=e,d=t,f=n,p=(d=Number(d)||0,u.length-d);if((!f||p<(f=Number(f)))&&(f=p),(p=c.length)%2!=0)throw new TypeError("Invalid hex string");p/2e.length)throw new RangeError("Index out of range")}function w(e,t,n,a){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r>>8*(a?r:1-r)}function M(e,t,n,a){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r>>8*(a?r:3-r)&255}function k(e,t,n,a){if(n+a>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function x(e,t,n,a,r){return r||k(e,0,n,4),o.write(e,t,n,a,23,4),n+4}function C(e,t,n,a,r){return r||k(e,0,n,8),o.write(e,t,n,a,52,8),n+8}d.prototype.slice=function(e,t){var n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):n>>8):w(this,e,t,!0),t+2},d.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},d.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},d.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},d.prototype.writeIntLE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=0,o=1,i=0;for(this[t]=255&e;++r>0)-i&255;return t+n},d.prototype.writeIntBE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=n-1,o=1,i=0;for(this[t+r]=255&e;0<=--r&&(o*=256);)e<0&&0===i&&0!==this[t+r+1]&&(i=1),this[t+r]=(e/o>>0)-i&255;return t+n},d.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,1,127,-128),d.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},d.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):w(this,e,t,!0),t+2},d.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},d.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},d.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},d.prototype.writeFloatLE=function(e,t,n){return x(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return x(this,e,t,!1,n)},d.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},d.prototype.copy=function(e,t,n,a){if(n=n||0,a||0===a||(a=this.length),t>=e.length&&(t=e.length),(a=0=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length);var r,o=(a=e.length-t>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(s=t;s>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function O(e){return S.toByteArray(function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,n,a){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}.call(this,P(65))},function(e,t,n){"use strict";var o=n(138);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return a||r?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(i,this,e)):o.nextTick(i,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,o.nextTick(i,n,e)):o.nextTick(i,n,e):t&&t(e)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var a=n(139).Buffer,r=a.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||a.isEncoding!==r&&r(e))return t||e;throw new Error("Unknown encoding: "+e)}function i(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=l,t=4;break;case"base64":this.text=d,this.end=f,t=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e){var t,n=this.lastTotal-this.lastNeed,a=(t=this,128!=(192&(a=e)[0])?(t.lastNeed=0,"�"):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&&(t=void 0,a=(r=e.slideCount<=e.slidesToShow||!1===e.infinite?i.default.findDOMNode(e.trackRef).childNodes[e.slideIndex]:(t=e.slideIndex+e.slidesToShow,i.default.findDOMNode(e.trackRef).childNodes[t]))?-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])?-1*r.offsetLeft+(e.listWidth-r.offsetWidth)/2:a)}},function(e,t,n){"use strict";t.__esModule=!0;var p=u(n(3)),h=u(n(17)),o=u(n(4)),i=u(n(7)),a=u(n(8)),m=u(n(0)),r=u(n(5)),g=u(n(19)),s=u(n(6)),y=u(n(26)),l=n(11);function u(e){return e&&e.__esModule?e:{default:e}}c=m.default.Component,(0,a.default)(d,c),d.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,s=e.prefix,l=e.onClick,u=e.id,e=(0,h.default)(e,["title","children","className","isExpanded","disabled","style","prefix","onClick","id"]),a=(0,g.default)(((c={})[s+"collapse-panel"]=!0,c[s+"collapse-panel-hidden"]=!r,c[s+"collapse-panel-expanded"]=r,c[s+"collapse-panel-disabled"]=o,c[a]=a,c)),c=(0,g.default)(((c={})[s+"collapse-panel-icon"]=!0,c[s+"collapse-panel-icon-expanded"]=r,c)),d=u?u+"-heading":void 0,f=u?u+"-region":void 0;return m.default.createElement("div",(0,p.default)({className:a,style:i,id:u},e),m.default.createElement("div",{id:d,className:s+"collapse-panel-title",onClick:l,onKeyDown:this.onKeyDown,tabIndex:"0","aria-disabled":o,"aria-expanded":r,"aria-controls":f,role:"button"},m.default.createElement(y.default,{type:"arrow-right",className:c,"aria-hidden":"true"}),t),m.default.createElement("div",{className:s+"collapse-panel-content",role:"region",id:f},n))},a=n=d,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:l.func.noop},n.isNextPanel=!0;var c,r=a;function d(){var e,n;(0,o.default)(this,d);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("receive:" + 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'/*\n* Demo for Nacos\n*/\nimport json\nimport socket\n\nimport nacos\n\n\ndef get_host_ip():\n res = socket.gethostbyname(socket.gethostname())\n return res\n\n\ndef load_config(content):\n _config = json.loads(content)\n return _config\n\n\ndef nacos_config_callback(args):\n content = args[\'raw_content\']\n load_config(content)\n\n\nclass NacosClient:\n service_name = None\n service_port = None\n service_group = None\n\n def __init__(self, server_endpoint, namespace_id, username=None, password=None):\n self.client = nacos.NacosClient(server_endpoint,\n namespace=namespace_id,\n username=username,\n password=password)\n self.endpoint = server_endpoint\n self.service_ip = get_host_ip()\n\n def register(self):\n self.client.add_naming_instance(self.service_name,\n self.service_ip,\n self.service_port,\n group_name=self.service_group)\n\n def modify(self, service_name, service_ip=None, service_port=None):\n self.client.modify_naming_instance(service_name,\n service_ip if service_ip else self.service_ip,\n service_port if service_port else self.service_port)\n\n def unregister(self):\n self.client.remove_naming_instance(self.service_name,\n self.service_ip,\n self.service_port)\n\n def set_service(self, service_name, service_ip, service_port, service_group):\n self.service_name = service_name\n self.service_ip = service_ip\n self.service_port = service_port\n self.service_group = service_group\n\n async def beat_callback(self):\n self.client.send_heartbeat(self.service_name,\n self.service_ip,\n self.service_port)\n\n def load_conf(self, data_id, group):\n return self.client.get_config(data_id=data_id, group=group, no_snapshot=True)\n\n def add_conf_watcher(self, data_id, group, callback):\n self.client.add_config_watcher(data_id=data_id, group=group, cb=callback)\n\n\nif __name__ == \'__main__\':\n nacos_config = {\n "nacos_data_id":"test",\n "nacos_server_ip":"127.0.0.1",\n "nacos_namespace":"public",\n "nacos_groupName":"DEFAULT_GROUP",\n "nacos_user":"nacos",\n "nacos_password":"1234567"\n }\n nacos_data_id = nacos_config["nacos_data_id"]\n SERVER_ADDRESSES = nacos_config["nacos_server_ip"]\n NAMESPACE = nacos_config["nacos_namespace"]\n groupName = nacos_config["nacos_groupName"]\n user = nacos_config["nacos_user"]\n password = nacos_config["nacos_password"]\n # todo 将另一个路由对象(通常定义在其他模块或文件中)合并到主应用(app)中。\n # app.include_router(custom_api.router, tags=[\'test\'])\n service_ip = get_host_ip()\n client = NacosClient(SERVER_ADDRESSES, NAMESPACE, user, password)\n client.add_conf_watcher(nacos_data_id, groupName, nacos_config_callback)\n\n # 启动时,强制同步一次配置\n data_stream = client.load_conf(nacos_data_id, groupName)\n json_config = load_config(data_stream)\n'}},{key:"getCSharpCode",value:function(e){return'/*\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n string serverAddr = "http://localhost:8848";\n string dataId = "'.concat(e.dataId,'";\n string group = "').concat(e.group,'";\n\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Config(x =>\n {\n x.ServerAddresses = new List { serverAddr };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.ConfigUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var configSvc = serviceProvider.GetService();\n\n var content = await configSvc.GetConfig(dataId, group, 3000);\n Console.WriteLine(content);\n\n var listener = new ConfigListener();\n\n await configSvc.AddListener(dataId, group, listener);\n\n var isPublishOk = await configSvc.PublishConfig(dataId, group, "content");\n Console.WriteLine(isPublishOk);\n\n await Task.Delay(3000);\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n\n var isRemoveOk = await configSvc.RemoveConfig(dataId, group);\n Console.WriteLine(isRemoveOk);\n await Task.Delay(3000);\n\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n await Task.Delay(300000);\n }\n\n internal class ConfigListener : IListener\n {\n public void ReceiveConfigInfo(string configInfo)\n {\n Console.WriteLine("receive:" + configInfo);\n }\n }\n}\n\n/*\nRefer to document: https://github.com/nacos-group/nacos-sdk-csharp/tree/dev/samples/MsConfigApp\nDemo for ASP.NET Core Integration\nMsConfigApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.Hosting;\nusing Serilog;\nusing Serilog.Events;\n\npublic class Program\n{\n public static void Main(string[] args)\n {\n Log.Logger = new LoggerConfiguration()\n .Enrich.FromLogContext()\n .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)\n .MinimumLevel.Override("System", LogEventLevel.Warning)\n .MinimumLevel.Debug()\n .WriteTo.Console()\n .CreateLogger();\n\n try\n {\n Log.ForContext().Information("Application starting...");\n CreateHostBuilder(args, Log.Logger).Build().Run();\n }\n catch (System.Exception ex)\n {\n Log.ForContext().Fatal(ex, "Application start-up failed!!");\n }\n finally\n {\n Log.CloseAndFlush();\n }\n }\n\n public static IHostBuilder CreateHostBuilder(string[] args, Serilog.ILogger logger) =>\n Host.CreateDefaultBuilder(args)\n .ConfigureAppConfiguration((context, builder) =>\n {\n var c = builder.Build();\n builder.AddNacosV2Configuration(c.GetSection("NacosConfig"), logAction: x => x.AddSerilog(logger));\n })\n .ConfigureWebHostDefaults(webBuilder =>\n {\n webBuilder.UseStartup().UseUrls("http://*:8787");\n })\n .UseSerilog();\n}\n ')}},{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,e=void 0===e?{}:e;return x.a.createElement("div",null,x.a.createElement(y.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:x.a.createElement("div",null),onClose:this.closeDialog.bind(this)},x.a.createElement("div",{style:{height:500}},x.a.createElement(H.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},x.a.createElement(L.a,{shape:"text",style:{height:40,paddingBottom:10}},x.a.createElement(O,{title:"Java",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),x.a.createElement(O,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigboot_code)}),x.a.createElement(O,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloud_code)}),x.a.createElement(O,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),x.a.createElement(O,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),x.a.createElement(O,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),x.a.createElement(O,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),x.a.createElement(O,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),x.a.createElement("div",{ref:"codepreview"})))))}}]),n}(x.a.Component)).displayName="ShowCodeing",S=S))||S,S=(t(69),t(40)),S=t.n(S),z=(t(756),S.a.Row),D=S.a.Col,W=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(e){return Object(_.a)(this,n),(e=t.call(this,e)).state={visible:!1,title:"",content:"",isok:!0,dataId:"",group:""},e}return Object(b.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,e=void 0===e?{}:e,t=x.a.createElement("div",{style:{textAlign:"right"}},x.a.createElement(c.a,{type:"primary",onClick:this.closeDialog.bind(this)},e.determine));return x.a.createElement("div",null,x.a.createElement(y.a,{visible:this.state.visible,footer:t,style:{width:555},onCancel:this.closeDialog.bind(this),onClose:this.closeDialog.bind(this),title:e.deletetitle},x.a.createElement("div",null,x.a.createElement(z,null,x.a.createElement(D,{span:"4",style:{paddingTop:16}},x.a.createElement(m.a,{type:"".concat(this.state.isok?"success":"delete","-filling"),style:{color:this.state.isok?"green":"red"},size:"xl"})),x.a.createElement(D,{span:"20"},x.a.createElement("div",null,x.a.createElement("h3",null,this.state.isok?e.deletedSuccessfully:e.deleteFailed),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Data ID"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.dataId)),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Group"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.group)),this.state.isok?"":x.a.createElement("p",{style:{color:"red"}},this.state.message)))))))}}]),n}(x.a.Component)).displayName="DeleteDialog",S=S))||S,S=(t(757),t(436)),B=t.n(S),U=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(b.a)(n,[{key:"render",value:function(){var e=this.props,t=e.data,t=void 0===t?{}:t,n=e.height,e=e.locale,a=void 0===e?{}:e;return x.a.createElement("div",null,"notice"===t.modeType?x.a.createElement("div",{"data-spm-click":"gostr=/aliyun;locaid=notice"},x.a.createElement(B.a,{style:{marginBottom:1\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'/*\n* Demo for Nacos\n*/\nimport json\nimport socket\n\nimport nacos\n\n\ndef get_host_ip():\n res = socket.gethostbyname(socket.gethostname())\n return res\n\n\ndef load_config(content):\n _config = json.loads(content)\n return _config\n\n\ndef nacos_config_callback(args):\n content = args[\'raw_content\']\n load_config(content)\n\n\nclass NacosClient:\n service_name = None\n service_port = None\n service_group = None\n\n def __init__(self, server_endpoint, namespace_id, username=None, password=None):\n self.client = nacos.NacosClient(server_endpoint,\n namespace=namespace_id,\n username=username,\n password=password)\n self.endpoint = server_endpoint\n self.service_ip = get_host_ip()\n\n def register(self):\n self.client.add_naming_instance(self.service_name,\n self.service_ip,\n self.service_port,\n group_name=self.service_group)\n\n def modify(self, service_name, service_ip=None, service_port=None):\n self.client.modify_naming_instance(service_name,\n service_ip if service_ip else self.service_ip,\n service_port if service_port else self.service_port)\n\n def unregister(self):\n self.client.remove_naming_instance(self.service_name,\n self.service_ip,\n self.service_port)\n\n def set_service(self, service_name, service_ip, service_port, service_group):\n self.service_name = service_name\n self.service_ip = service_ip\n self.service_port = service_port\n self.service_group = service_group\n\n async def beat_callback(self):\n self.client.send_heartbeat(self.service_name,\n self.service_ip,\n self.service_port)\n\n def load_conf(self, data_id, group):\n return self.client.get_config(data_id=data_id, group=group, no_snapshot=True)\n\n def add_conf_watcher(self, data_id, group, callback):\n self.client.add_config_watcher(data_id=data_id, group=group, cb=callback)\n\n\nif __name__ == \'__main__\':\n nacos_config = {\n "nacos_data_id":"test",\n "nacos_server_ip":"127.0.0.1",\n "nacos_namespace":"public",\n "nacos_groupName":"DEFAULT_GROUP",\n "nacos_user":"nacos",\n "nacos_password":"1234567"\n }\n nacos_data_id = nacos_config["nacos_data_id"]\n SERVER_ADDRESSES = nacos_config["nacos_server_ip"]\n NAMESPACE = nacos_config["nacos_namespace"]\n groupName = nacos_config["nacos_groupName"]\n user = nacos_config["nacos_user"]\n password = nacos_config["nacos_password"]\n # todo 将另一个路由对象(通常定义在其他模块或文件中)合并到主应用(app)中。\n # app.include_router(custom_api.router, tags=[\'test\'])\n service_ip = get_host_ip()\n client = NacosClient(SERVER_ADDRESSES, NAMESPACE, user, password)\n client.add_conf_watcher(nacos_data_id, groupName, nacos_config_callback)\n\n # 启动时,强制同步一次配置\n data_stream = client.load_conf(nacos_data_id, groupName)\n json_config = load_config(data_stream)\n #设定服务\n client.set_service(json_config["service_name"], json_config.get("service_ip", service_ip), service_port, groupName)\n #注册服务\n client.register()\n #下线服务\n client.unregister()\n'}},{key:"getCSharpCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Naming(x =>\n {\n x.ServerAddresses = new List { "http://localhost:8848/" };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.NamingUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var namingSvc = serviceProvider.GetService();\n\n await namingSvc.RegisterInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n await namingSvc.RegisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(await namingSvc.GetAllInstances("').concat(this.record.name,'")));\n\n await namingSvc.DeregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n var listener = new EventListener();\n\n await namingSvc.Subscribe("').concat(this.record.name,'", listener);\n }\n\n internal class EventListener : IEventListener\n {\n public Task OnEvent(IEvent @event)\n {\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(@event));\n return Task.CompletedTask;\n }\n }\n}\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for ASP.NET Core Integration\nApp.csproj\n\n\n \n\n*/\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/appsettings.json\n* appsettings.json\n{\n "nacos": {\n "ServerAddresses": [ "http://localhost:8848" ],\n "DefaultTimeOut": 15000,\n "Namespace": "cs",\n "ServiceName": "App1",\n "GroupName": "DEFAULT_GROUP",\n "ClusterName": "DEFAULT",\n "Port": 0,\n "Weight": 100,\n "RegisterEnabled": true,\n "InstanceEnabled": true,\n "Ephemeral": true,\n "NamingUseRpc": true,\n "NamingLoadCacheAtStart": ""\n }\n}\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/Startup.cs\nusing Nacos.AspNetCore.V2;\n\npublic class Startup\n{\n public Startup(IConfiguration configuration)\n {\n Configuration = configuration;\n }\n\n public IConfiguration Configuration { get; }\n\n public void ConfigureServices(IServiceCollection services)\n {\n // ....\n services.AddNacosAspNet(Configuration);\n }\n\n public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n {\n // ....\n }\n}\n ')}},{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 O.a.createElement("div",null,O.a.createElement(o.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:O.a.createElement("div",null),onClose:this.closeDialog.bind(this)},O.a.createElement("div",{style:{height:500}},O.a.createElement(h.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},O.a.createElement(m.a,{shape:"text",style:{height:40,paddingBottom:10}},O.a.createElement(g,{title:"Java",key:0,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),O.a.createElement(g,{title:"Spring",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.springCode)}),O.a.createElement(g,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigbootCode)}),O.a.createElement(g,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloudCode)}),O.a.createElement(g,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),O.a.createElement(g,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),O.a.createElement(g,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),O.a.createElement(g,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),O.a.createElement(g,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),O.a.createElement("div",{ref:"codepreview"})))))}}]),n}(O.a.Component)).displayName="ShowServiceCodeing",f=f))||f,Y=t(51),I=t(146),A=(t(778),t(22)),R=L.a.Item,H=d.a.Row,F=d.a.Col,z=T.a.Column,d=(0,n.a.config)(((f=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var a;return Object(s.a)(this,n),(a=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return a.queryServiceList()})},a.showcode=function(){setTimeout(function(){return a.queryServiceList()})},a.setNowNameSpace=function(e,t,n){return a.setState({nowNamespaceName:e,nowNamespaceId:t,nowNamespaceDesc:n})},a.rowColor=function(e){return{className:e.healthyInstanceCount?"":"row-bg-red"}},a.editServiceDialog=O.a.createRef(),a.showcode=O.a.createRef(),a.state={loading:!1,total:0,pageSize:10,currentPage:1,dataSource:[],search:{serviceName:Object(p.b)("serviceNameParam")||"",groupName:Object(p.b)("groupNameParam")||""},hasIpCount:!("false"===localStorage.getItem("hasIpCount"))},a.field=new i.a(Object(l.a)(a)),a}return Object(a.a)(n,[{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,e=["hasIpCount=".concat(e),"withInstances=".concat(o),"pageNo=".concat(t),"pageSize=".concat(a),"serviceNameParam=".concat(r.serviceName),"groupNameParam=".concat(r.groupName)];Object(p.f)({serviceNameParam:r.serviceName,groupNameParam:r.groupName}),this.openLoading(),Object(p.e)({url:"v3/console/ns/service/list?".concat(e.join("&")),success:function(e){var e=e.data,e=void 0===e?{}:e,t=e.count,e=e.serviceList;n.setState({dataSource:void 0===e?[]:e,total:void 0===t?0:t,loading:!1})},error:function(){return n.setState({dataSource:[],total:0,currentPage:0,loading:!1})}})}},{key:"showSampleCode",value:function(e){this.showcode.current.getInstance().openDialog(e)}},{key:"querySubscriber",value:function(e){var t=e.name,e=e.groupName,n=this.state.nowNamespaceId;this.props.history.push(Object(D.a)("/subscriberList",{namespace:n,name:t,groupName:e}))}},{key:"handlePageSizeChange",value:function(e){var t=this;this.setState({pageSize:e},function(){return t.queryServiceList()})}},{key:"deleteService",value:function(e){var t=this,n=this.props.locale,n=void 0===n?{}:n,a=n.prompt,n=n.promptDelete;o.a.confirm({title:a,content:n,onOk:function(){Object(p.e)({method:"DELETE",url:"v3/console/ns/service?serviceName=".concat(e.name,"&groupName=").concat(e.groupName),dataType:"json",beforeSend:function(){return t.openLoading()},success:function(e){0!==e.code?r.a.error(e.message||"删除服务失败"):(r.a.success("服务删除成功"),t.queryServiceList())},error:function(e){var t;r.a.error((null==(t=e.data)?void 0:t.responseText)||e.statusText||"请求失败")},complete:function(){return t.closeLoading()}})}})}},{key:"render",value:function(){var a=this,e=this.props.locale,t=void 0===e?{}:e,e=t.pubNoData,n=t.serviceList,r=t.serviceName,o=t.serviceNamePlaceholder,i=t.groupName,s=t.groupNamePlaceholder,l=t.hiddenEmptyService,u=t.query,c=t.create,d=t.operation,f=t.detail,p=t.sampleCode,h=t.deleteAction,m=t.subscriber,g=this.state,y=g.search,v=g.nowNamespaceName,_=g.nowNamespaceId,b=g.nowNamespaceDesc,g=g.hasIpCount,w=this.field,M=w.init,w=w.getValue;return this.init=M,this.getValue=w,O.a.createElement("div",{className:"main-container service-management"},O.a.createElement(Y.a,{title:n,desc:b,namespaceId:_,namespaceName:v,nameSpace:!0}),O.a.createElement(N.a,{setNowNameSpace:this.setNowNameSpace,namespaceCallBack:this.getQueryLater}),O.a.createElement(H,{className:"demo-row",style:{marginBottom:10,padding:0}},O.a.createElement(F,{span:"24"},O.a.createElement(L.a,{inline:!0,field:this.field},O.a.createElement(R,{label:""},O.a.createElement(C.a,{type:"primary",onClick:function(){return a.openEditServiceDialog()}},c)),O.a.createElement(R,{label:r},O.a.createElement(E.a,{placeholder:o,style:{width:200},value:y.serviceName,onChange:function(e){return a.setState({search:Object(x.a)(Object(x.a)({},y),{},{serviceName:e})})},onPressEnter:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}})),O.a.createElement(R,{label:i},O.a.createElement(E.a,{placeholder:s,style:{width:200},value:y.groupName,onChange:function(e){return a.setState({search:Object(x.a)(Object(x.a)({},y),{},{groupName:e})})},onPressEnter:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}})),O.a.createElement(L.a.Item,{label:"".concat(l)},O.a.createElement(S.a,{checked:g,onChange:function(e){return a.setState({hasIpCount:e,currentPage:1},function(){localStorage.setItem("hasIpCount",e),a.queryServiceList()})}})),O.a.createElement(R,{label:""},O.a.createElement(C.a,{type:"primary",onClick:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})},style:{marginRight:10}},u))))),O.a.createElement(H,{style:{padding:0}},O.a.createElement(F,{span:"24",style:{padding:0}},O.a.createElement(T.a,{dataSource:this.state.dataSource,locale:{empty:e},rowProps:function(e){return a.rowColor(e)},loading:this.state.loading},O.a.createElement(z,{title:t.columnServiceName,dataIndex:"name"}),O.a.createElement(z,{title:t.groupName,dataIndex:"groupName"}),O.a.createElement(z,{title:t.columnClusterCount,dataIndex:"clusterCount"}),O.a.createElement(z,{title:t.columnIpCount,dataIndex:"ipCount"}),O.a.createElement(z,{title:t.columnHealthyInstanceCount,dataIndex:"healthyInstanceCount"}),O.a.createElement(z,{title:t.columnTriggerFlag,dataIndex:"triggerFlag"}),O.a.createElement(z,{title:d,align:"center",cell:function(e,t,n){return O.a.createElement("div",null,O.a.createElement("a",{onClick:function(){var e=n.name,t=n.groupName;a.props.history.push(Object(D.a)("/serviceDetail",{name:e,groupName:t}))},style:{marginRight:5}},f),O.a.createElement("span",{style:{marginRight:5}},"|"),O.a.createElement("a",{style:{marginRight:5},onClick:function(){return a.showSampleCode(n)}},p),O.a.createElement("span",{style:{marginRight:5}},"|"),O.a.createElement("a",{style:{marginRight:5},onClick:function(){return a.querySubscriber(n)}},m),O.a.createElement("span",{style:{marginRight:5}},"|"),O.a.createElement("a",{onClick:function(){return a.deleteService(n)},style:{marginRight:5}},h))}})))),O.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},O.a.createElement(k.a,{current:this.state.currentPage,pageSizeList:A.f,pageSizePosition:"start",pageSizeSelector:"dropdown",popupProps:{align:"bl tl"},total:this.state.total,pageSize:this.state.pageSize,totalRender:function(e){return O.a.createElement(I.a,{locale:t,total:e})},onPageSizeChange:function(e){return a.handlePageSizeChange(e)},onChange:function(e){return a.setState({currentPage:e},function(){return a.queryServiceList()})}})),O.a.createElement(j,{ref:this.showcode}),O.a.createElement(P.a,{ref:this.editServiceDialog,openLoading:function(){return a.openLoading()},closeLoading:function(){return a.closeLoading()},queryServiceList:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}}))}}]),n}(O.a.Component)).displayName="ServiceList",t=f))||t;e.a=d},function(e,t,n){"use strict";n(67);var a=n(47),u=n.n(a),a=(n(35),n(18)),c=n.n(a),a=(n(66),n(21)),d=n.n(a),a=(n(34),n(20)),f=n.n(a),a=(n(93),n(55)),p=n.n(a),a=(n(38),n(2)),h=n.n(a),a=(n(37),n(10)),m=n.n(a),i=n(13),s=n(14),l=n(23),g=n(16),y=n(15),a=(n(27),n(6)),a=n.n(a),r=n(0),v=n.n(r),r=n(30),_=n(45),b=n(53),w=n(32),o=(n(49),n(28)),M=n.n(o),k=(n(168),h.a.Item),S={labelCol:{fixedSpan:4},wrapperCol:{span:19}},E=(0,a.a.config)(((o=function(e){Object(g.a)(o,e);var r=Object(y.a)(o);function o(){var e;Object(i.a)(this,o);for(var t=arguments.length,n=new Array(t),a=0;ao&&v.a.createElement(u.a,{className:"users-pagination",current:i,total:n.totalCount,pageSize:o,onChange:function(e){return t.setState({pageNo:e},function(){return t.getUsers()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.d)(e).then(function(e){return t.setState({pageNo:1},function(){return t.getUsers()}),e})},onCancel:function(){return t.colseCreateUser()}}),v.a.createElement(x.a,{visible:l,username:e,onOk:function(e){return Object(_.l)(e).then(function(e){return t.getUsers(),e})},onCancel:function(){return t.setState({passwordResetUser:void 0,passwordResetUserVisible:!1})}}))}}]),n}(v.a.Component)).displayName="UserManagement",n=o))||n)||n;t.a=r},function(e,t,n){"use strict";n(46);var a=n(24),l=n.n(a),a=(n(67),n(47)),u=n.n(a),a=(n(35),n(18)),c=n.n(a),d=n(32),a=(n(66),n(21)),f=n.n(a),a=(n(34),n(20)),p=n.n(a),a=(n(93),n(55)),h=n.n(a),a=(n(38),n(2)),m=n.n(a),a=(n(37),n(10)),g=n.n(a),i=n(13),s=n(14),y=n(23),v=n(16),_=n(15),a=(n(27),n(6)),a=n.n(a),r=n(0),b=n.n(r),r=n(30),w=n(45),o=n(86),M=n(53),k=(n(49),n(28)),S=n.n(k),k=(n(59),n(29)),E=n.n(k),x=m.a.Item,C=E.a.Option,T={labelCol:{fixedSpan:4},wrapperCol:{span:19}},L=Object(r.b)(function(e){return{namespaces:e.namespace.namespaces}},{getNamespaces:o.b,searchRoles:w.m})(k=(0,a.a.config)(((k=function(e){Object(v.a)(o,e);var r=Object(_.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ai&&b.a.createElement(u.a,{className:"users-pagination",current:s,total:t.totalCount,pageSize:i,onChange:function(e){return a.setState({pageNo:e},function(){return a.getPermissions()})}}),b.a.createElement(L,{visible:n,onOk:function(t){return Object(w.a)(t).then(function(e){e?l.a.error({content:o.checkPermission}):Object(w.b)(t).then(function(e){return a.setState({pageNo:1},function(){return a.getPermissions()}),e})})},onCancel:function(){return a.colseCreatePermission()}}))}}]),n}(b.a.Component)).displayName="PermissionsManagement",n=k))||n)||n);t.a=r},function(e,t,n){"use strict";n(67);var a=n(47),l=n.n(a),a=(n(35),n(18)),u=n.n(a),a=(n(66),n(21)),c=n.n(a),a=(n(34),n(20)),d=n.n(a),a=(n(93),n(55)),f=n.n(a),a=(n(38),n(2)),p=n.n(a),a=(n(37),n(10)),h=n.n(a),i=n(13),s=n(14),m=n(23),g=n(16),y=n(15),a=(n(27),n(6)),a=n.n(a),r=n(0),v=n.n(r),r=n(30),_=n(45),b=n(53),o=(n(59),n(29)),w=n.n(o),o=(n(49),n(28)),M=n.n(o),k=p.a.Item,S={labelCol:{fixedSpan:4},wrapperCol:{span:19}},E=Object(r.b)(function(e){return{users:e.authority.users}},{searchUsers:_.n})(o=(0,a.a.config)(((o=function(e){Object(g.a)(o,e);var r=Object(y.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ao&&v.a.createElement(l.a,{className:"users-pagination",current:i,total:t.totalCount,pageSize:o,onChange:function(e){return a.setState({pageNo:e},function(){return a.getRoles()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.c)(e).then(function(e){return a.getRoles(),e})},onCancel:function(){return a.colseCreateRole()}}))}}]),n}(v.a.Component)).displayName="RolesManagement",n=o))||n)||n);t.a=r},function(e,t,n){"use strict";n(35);function l(e){var t=void 0===(t=localStorage.token)?"{}":t,t=(Object(_.c)(t)&&JSON.parse(t)||{}).globalAdmin,n=[];return"naming"===e?n.push(b):"config"===e?n.push(w):n.push(w,b),t&&n.push(M),n.push(k),n.push(S),n.push(E),n.filter(function(e){return e})}var a=n(18),u=n.n(a),a=(n(46),n(24)),c=n.n(a),a=(n(43),n(26)),d=n.n(a),r=n(13),o=n(14),i=n(16),s=n(15),a=(n(27),n(6)),a=n.n(a),f=n(12),p=(n(84),n(50)),h=n.n(p),p=n(0),m=n.n(p),p=n(39),g=n(30),y=n(108),v=n(52),_=n(48),b={key:"serviceManagementVirtual",children:[{key:"serviceManagement",url:"/serviceManagement"},{key:"subscriberList",url:"/subscriberList"}]},w={key:"configurationManagementVirtual",children:[{key:"configurationManagement",url:"/configurationManagement"},{key:"historyRollback",url:"/historyRollback"},{key:"listeningToQuery",url:"/listeningToQuery"}]},M={key:"authorityControl",children:[{key:"userList",url:"/userManagement"},{key:"roleManagement",url:"/rolesManagement"},{key:"privilegeManagement",url:"/permissionsManagement"}]},k={key:"namespace",url:"/namespace"},S={key:"clusterManagementVirtual",children:[{key:"clusterManagement",url:"/clusterManagement"}]},E={key:"settingCenter",url:"/settingCenter"},x=(n(386),h.a.SubMenu),C=h.a.Item,p=(n=Object(g.b)(function(e){return Object(f.a)(Object(f.a)({},e.locale),e.base)},{getState:v.e,getNotice:v.d,getGuide:v.c}),g=a.a.config,Object(p.g)(a=n(a=g(((v=function(e){Object(i.a)(n,e);var t=Object(s.a)(n);function n(e){return Object(r.a)(this,n),(e=t.call(this,e)).state={visible:!0},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.props.getState(),this.props.getNotice(),this.props.getGuide()}},{key:"goBack",value:function(){this.props.history.goBack()}},{key:"navTo",value:function(e){var t=this.props.location.search,t=new URLSearchParams(t);t.set("namespace",window.nownamespace),t.set("namespaceShowName",window.namespaceShowName),this.props.history.push([e,"?",t.toString()].join(""))}},{key:"isCurrentPath",value:function(e){return e===this.props.location.pathname?"current-path next-selected":void 0}},{key:"defaultOpenKeys",value:function(){for(var t=this,e=l(this.props.functionMode),n=0,a=e.length;nthis.state.pageSize&&S.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},S.a.createElement(v.a,{current:this.state.pageNo,total:a,pageSize:this.state.pageSize,onChange:function(e){return t.setState({pageNo:e},function(){return t.querySubscriberList()})}}))))}}]),n}(S.a.Component)).displayName="SubscriberList",d=n))||d)||d;t.a=f},function(e,t,n){"use strict";n(54);var a=n(36),c=n.n(a),a=(n(67),n(47)),d=n.n(a),a=(n(179),n(78)),f=n.n(a),a=(n(37),n(10)),p=n.n(a),a=(n(34),n(20)),h=n.n(a),a=(n(35),n(18)),r=n.n(a),a=(n(46),n(24)),o=n.n(a),a=(n(49),n(28)),i=n.n(a),s=n(13),l=n(14),u=n(23),m=n(16),g=n(15),a=(n(27),n(6)),a=n.n(a),y=(n(421),n(123)),v=n.n(y),y=(n(66),n(21)),_=n.n(y),y=(n(69),n(40)),y=n.n(y),b=(n(38),n(2)),w=n.n(b),b=n(0),M=n.n(b),k=n(1),b=n(144),S=n.n(b),E=n(51),x=(n(781),w.a.Item),C=y.a.Row,T=y.a.Col,L=_.a.Column,O=v.a.Panel,y=(0,a.a.config)(((b=function(e){Object(m.a)(a,e);var t=Object(g.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return n.queryClusterStateList()})},n.setNowNameSpace=function(e,t){return n.setState({nowNamespaceName:e,nowNamespaceId:t})},n.rowColor=function(e){return{className:(e.voteFor,"")}},n.state={loading:!1,total:0,pageSize:10,currentPage:1,keyword:"",dataSource:[]},n.field=new i.a(Object(u.a)(n)),n}return Object(l.a)(a,[{key:"componentDidMount",value:function(){this.getQueryLater()}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"queryClusterStateList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.keyword,e=e.withInstances,e=["withInstances=".concat(void 0!==e&&e),"pageNo=".concat(t),"pageSize=".concat(a),"keyword=".concat(r)];Object(k.e)({url:"v3/console/core/cluster/nodes?".concat(e.join("&")),beforeSend:function(){return n.openLoading()},success:function(){var e=0this.state.pageSize&&M.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},M.a.createElement(d.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}(M.a.Component)).displayName="ClusterNodeList",n=b))||n;t.a=y},function(e,t,n){"use strict";n(34);var a=n(20),i=n.n(a),s=n(13),l=n(14),u=n(16),c=n(15),a=(n(27),n(6)),a=n.n(a),r=n(12),o=(n(114),n(75)),o=n.n(o),d=n(0),f=n.n(d),p=(n(784),n(51)),d=n(87),h=n(148),m=n(149),g=n(30),y=n(22),v=o.a.Group,g=Object(g.b)(function(e){return Object(r.a)({},e.locale)},{changeLanguage:d.a,changeTheme:h.a,changeNameShow:m.a})(o=(0,a.a.config)(((n=function(e){Object(u.a)(o,e);var r=Object(c.a)(o);function o(e){Object(s.a)(this,o),e=r.call(this,e);var t=localStorage.getItem(y.p),n=localStorage.getItem(y.j),a=localStorage.getItem(y.g);return e.state={theme:"dark"===t?"dark":"light",language:"en-US"===a?"en-US":"zh-CN",nameShow:"select"===n?"select":"label"},e}return Object(l.a)(o,[{key:"newTheme",value:function(e){this.setState({theme:e})}},{key:"newLanguage",value:function(e){this.setState({language:e})}},{key:"newNameShow",value:function(e){this.setState({nameShow:e})}},{key:"submit",value:function(){var e=this.props,t=e.changeLanguage,n=e.changeTheme,e=e.changeNameShow,a=this.state.language,r=this.state.theme,o=this.state.nameShow;t(a),n(r),e(o)}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=[{value:"light",label:e.settingLight},{value:"dark",label:e.settingDark}],n=[{value:"select",label:e.settingShowSelect},{value:"label",label:e.settingShowLabel}];return f.a.createElement(f.a.Fragment,null,f.a.createElement(p.a,{title:e.settingTitle}),f.a.createElement("div",{className:"setting-box"},f.a.createElement("div",{className:"text-box"},f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingTheme),f.a.createElement(v,{dataSource:t,value:this.state.theme,onChange:this.newTheme.bind(this)})),f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingLocale),f.a.createElement(v,{dataSource:[{value:"en-US",label:"English"},{value:"zh-CN",label:"中文"}],value:this.state.language,onChange:this.newLanguage.bind(this)})),f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingShow),f.a.createElement(v,{dataSource:n,value:this.state.nameShow,onChange:this.newNameShow.bind(this)}))),f.a.createElement(i.a,{type:"primary",onClick:this.submit.bind(this)},e.settingSubmit)))}}]),o}(f.a.Component)).displayName="SettingCenter",o=n))||o)||o;t.a=g},function(e,t,V){"use strict";V.r(t),function(e){V(54);var t=V(36),a=V.n(t),t=(V(27),V(6)),r=V.n(t),o=V(13),i=V(14),s=V(16),l=V(15),n=V(12),t=V(0),u=V.n(t),t=V(25),t=V.n(t),c=V(125),d=V(429),f=V(440),p=V(30),h=V(39),m=V(73),g=(V(477),V(449)),y=V(22),v=V(450),_=V(451),b=V(443),w=V(452),M=V(453),k=V(444),S=V(454),E=V(455),x=V(456),C=V(457),T=V(458),L=V(441),O=V(445),D=V(442),N=V(459),P=V(460),j=V(446),I=V(447),A=V(448),R=V(438),H=V(461),Y=V(439),F=V(87),z=V(52),W=V(148),B=V(149),e=(V(785),e.hot,localStorage.getItem(y.g)||localStorage.setItem(y.g,"zh-CN"===navigator.language?"zh-CN":"en-US"),Object(c.b)(Object(n.a)(Object(n.a)({},Y.a),{},{routing:d.routerReducer}))),Y=Object(c.d)(e,Object(c.c)(Object(c.a)(f.a),window[y.l]?window[y.l]():function(e){return e})),U=[{path:"/",exact:!0,render:function(){return u.a.createElement(h.a,{to:"/welcome"})}},{path:"/welcome",component:R.a},{path:"/namespace",component:b.a},{path:"/newconfig",component:w.a},{path:"/configsync",component:M.a},{path:"/configdetail",component:k.a},{path:"/configeditor",component:S.a},{path:"/historyDetail",component:E.a},{path:"/configRollback",component:x.a},{path:"/historyRollback",component:C.a},{path:"/listeningToQuery",component:T.a},{path:"/configurationManagement",component:L.a},{path:"/serviceManagement",component:O.a},{path:"/serviceDetail",component:D.a},{path:"/subscriberList",component:N.a},{path:"/clusterManagement",component:P.a},{path:"/userManagement",component:j.a},{path:"/rolesManagement",component:A.a},{path:"/permissionsManagement",component:I.a},{path:"/settingCenter",component:H.a}],e=Object(p.b)(function(e){return Object(n.a)(Object(n.a)({},e.locale),e.base)},{changeLanguage:F.a,getState:z.e,changeTheme:W.a,changeNameShow:B.a})(d=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){return Object(o.a)(this,n),(e=t.call(this,e)).state={shownotice:"none",noticecontent:"",nacosLoading:{}},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){this.props.getState();var e=localStorage.getItem(y.g),t=localStorage.getItem(y.p),n=localStorage.getItem(y.j);this.props.changeLanguage(e),this.props.changeTheme(t),this.props.changeNameShow(n)}},{key:"router",get:function(){var e=this.props,t=e.loginPageEnabled,e=e.consoleUiEnable;return u.a.createElement(m.a,null,u.a.createElement(h.d,null,t&&"false"===t?null:u.a.createElement(h.b,{path:"/login",component:v.a}),u.a.createElement(h.b,{path:"/register",component:_.a}),u.a.createElement(g.a,null,e&&"true"===e&&U.map(function(e){return u.a.createElement(h.b,Object.assign({key:e.path},e))}))))}},{key:"render",value:function(){var e=this.props,t=e.locale,e=e.loginPageEnabled;return u.a.createElement(a.a,Object.assign({className:"nacos-loading",shape:"flower",tip:"loading...",visible:!e,fullScreen:!0},this.state.nacosLoading),u.a.createElement(r.a,{locale:t},this.router))}}]),n}(u.a.Component))||d;t.a.render(u.a.createElement(p.a,{store:Y},u.a.createElement(e,null)),document.getElementById("root"))}.call(this,V(463)(e))},function(e,t){e.exports=function(e){var t;return e.webpackPolyfill||((t=Object.create(e)).children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1),t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(I,e,t){"use strict"; +var S=P(706),o=P(707),s=P(708);function n(){return d.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function f(e,t){if(d.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var n=(e="string"!=typeof e?""+e:e).length;if(0===n)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return O(e).length;default:if(a)return L(e).length;t=(""+t).toLowerCase(),a=!0}}function t(e,t,n){var a,r=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,i=t,s=n,l=o.length;(!s||s<0||l=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=d.from(t,a)),d.isBuffer(t))return 0===t.length?-1:m(e,t,n,a,r);if("number"==typeof t)return t&=255,d.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(r?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):m(e,[t],n,a,r);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,a,r){var o=1,i=e.length,s=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;i/=o=2,s/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r)for(var u=-1,c=n;c>8,r.push(n%256),r.push(a);return r}(t,e.length-n),e,n,a)}function E(e,t,n){n=Math.min(e.length,n);for(var a=[],r=t;r>>10&1023|55296),c=56320|1023&c),a.push(c),r+=d}var f=a,p=f.length;if(p<=v)return String.fromCharCode.apply(String,f);for(var h="",m=0;mt)&&(e+=" ... "),""},d.prototype.compare=function(e,t,n,a,r){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===r&&(r=this.length),(t=void 0===t?0:t)<0||n>e.length||a<0||r>this.length)throw new RangeError("out of range index");if(r<=a&&n<=t)return 0;if(r<=a)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(a>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(o,i),l=this.slice(a,r),u=e.slice(t,n),c=0;cthis.length)throw new RangeError("Attempt to write outside buffer bounds");a=a||"utf8";for(var o,i,s,l=!1;;)switch(a){case"hex":var u=this,c=e,d=t,f=n,p=(d=Number(d)||0,u.length-d);if((!f||p<(f=Number(f)))&&(f=p),(p=c.length)%2!=0)throw new TypeError("Invalid hex string");p/2e.length)throw new RangeError("Index out of range")}function w(e,t,n,a){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r>>8*(a?r:1-r)}function M(e,t,n,a){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r>>8*(a?r:3-r)&255}function k(e,t,n,a){if(n+a>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function x(e,t,n,a,r){return r||k(e,0,n,4),o.write(e,t,n,a,23,4),n+4}function C(e,t,n,a,r){return r||k(e,0,n,8),o.write(e,t,n,a,52,8),n+8}d.prototype.slice=function(e,t){var n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):n>>8):w(this,e,t,!0),t+2},d.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},d.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},d.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},d.prototype.writeIntLE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=0,o=1,i=0;for(this[t]=255&e;++r>0)-i&255;return t+n},d.prototype.writeIntBE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=n-1,o=1,i=0;for(this[t+r]=255&e;0<=--r&&(o*=256);)e<0&&0===i&&0!==this[t+r+1]&&(i=1),this[t+r]=(e/o>>0)-i&255;return t+n},d.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,1,127,-128),d.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},d.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):w(this,e,t,!0),t+2},d.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},d.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},d.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},d.prototype.writeFloatLE=function(e,t,n){return x(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return x(this,e,t,!1,n)},d.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},d.prototype.copy=function(e,t,n,a){if(n=n||0,a||0===a||(a=this.length),t>=e.length&&(t=e.length),(a=0=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length);var r,o=(a=e.length-t>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(s=t;s>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function O(e){return S.toByteArray(function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,n,a){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}.call(this,P(65))},function(e,t,n){"use strict";var o=n(138);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return a||r?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(i,this,e)):o.nextTick(i,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,o.nextTick(i,n,e)):o.nextTick(i,n,e):t&&t(e)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var a=n(139).Buffer,r=a.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||a.isEncoding!==r&&r(e))return t||e;throw new Error("Unknown encoding: "+e)}function i(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=l,t=4;break;case"base64":this.text=d,this.end=f,t=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e){var t,n=this.lastTotal-this.lastNeed,a=(t=this,128!=(192&(a=e)[0])?(t.lastNeed=0,"�"):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&&(t=void 0,a=(r=e.slideCount<=e.slidesToShow||!1===e.infinite?i.default.findDOMNode(e.trackRef).childNodes[e.slideIndex]:(t=e.slideIndex+e.slidesToShow,i.default.findDOMNode(e.trackRef).childNodes[t]))?-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])?-1*r.offsetLeft+(e.listWidth-r.offsetWidth)/2:a)}},function(e,t,n){"use strict";t.__esModule=!0;var p=u(n(3)),h=u(n(17)),o=u(n(4)),i=u(n(7)),a=u(n(8)),m=u(n(0)),r=u(n(5)),g=u(n(19)),s=u(n(6)),y=u(n(26)),l=n(11);function u(e){return e&&e.__esModule?e:{default:e}}c=m.default.Component,(0,a.default)(d,c),d.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,s=e.prefix,l=e.onClick,u=e.id,e=(0,h.default)(e,["title","children","className","isExpanded","disabled","style","prefix","onClick","id"]),a=(0,g.default)(((c={})[s+"collapse-panel"]=!0,c[s+"collapse-panel-hidden"]=!r,c[s+"collapse-panel-expanded"]=r,c[s+"collapse-panel-disabled"]=o,c[a]=a,c)),c=(0,g.default)(((c={})[s+"collapse-panel-icon"]=!0,c[s+"collapse-panel-icon-expanded"]=r,c)),d=u?u+"-heading":void 0,f=u?u+"-region":void 0;return m.default.createElement("div",(0,p.default)({className:a,style:i,id:u},e),m.default.createElement("div",{id:d,className:s+"collapse-panel-title",onClick:l,onKeyDown:this.onKeyDown,tabIndex:"0","aria-disabled":o,"aria-expanded":r,"aria-controls":f,role:"button"},m.default.createElement(y.default,{type:"arrow-right",className:c,"aria-hidden":"true"}),t),m.default.createElement("div",{className:s+"collapse-panel-content",role:"region",id:f},n))},a=n=d,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:l.func.noop},n.isNextPanel=!0;var c,r=a;function d(){var e,n;(0,o.default)(this,d);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("receive:" + 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'/*\n* Demo for Nacos\n*/\nimport json\nimport socket\n\nimport nacos\n\n\ndef get_host_ip():\n res = socket.gethostbyname(socket.gethostname())\n return res\n\n\ndef load_config(content):\n _config = json.loads(content)\n return _config\n\n\ndef nacos_config_callback(args):\n content = args[\'raw_content\']\n load_config(content)\n\n\nclass NacosClient:\n service_name = None\n service_port = None\n service_group = None\n\n def __init__(self, server_endpoint, namespace_id, username=None, password=None):\n self.client = nacos.NacosClient(server_endpoint,\n namespace=namespace_id,\n username=username,\n password=password)\n self.endpoint = server_endpoint\n self.service_ip = get_host_ip()\n\n def register(self):\n self.client.add_naming_instance(self.service_name,\n self.service_ip,\n self.service_port,\n group_name=self.service_group)\n\n def modify(self, service_name, service_ip=None, service_port=None):\n self.client.modify_naming_instance(service_name,\n service_ip if service_ip else self.service_ip,\n service_port if service_port else self.service_port)\n\n def unregister(self):\n self.client.remove_naming_instance(self.service_name,\n self.service_ip,\n self.service_port)\n\n def set_service(self, service_name, service_ip, service_port, service_group):\n self.service_name = service_name\n self.service_ip = service_ip\n self.service_port = service_port\n self.service_group = service_group\n\n async def beat_callback(self):\n self.client.send_heartbeat(self.service_name,\n self.service_ip,\n self.service_port)\n\n def load_conf(self, data_id, group):\n return self.client.get_config(data_id=data_id, group=group, no_snapshot=True)\n\n def add_conf_watcher(self, data_id, group, callback):\n self.client.add_config_watcher(data_id=data_id, group=group, cb=callback)\n\n\nif __name__ == \'__main__\':\n nacos_config = {\n "nacos_data_id":"test",\n "nacos_server_ip":"127.0.0.1",\n "nacos_namespace":"public",\n "nacos_groupName":"DEFAULT_GROUP",\n "nacos_user":"nacos",\n "nacos_password":"1234567"\n }\n nacos_data_id = nacos_config["nacos_data_id"]\n SERVER_ADDRESSES = nacos_config["nacos_server_ip"]\n NAMESPACE = nacos_config["nacos_namespace"]\n groupName = nacos_config["nacos_groupName"]\n user = nacos_config["nacos_user"]\n password = nacos_config["nacos_password"]\n # todo 将另一个路由对象(通常定义在其他模块或文件中)合并到主应用(app)中。\n # app.include_router(custom_api.router, tags=[\'test\'])\n service_ip = get_host_ip()\n client = NacosClient(SERVER_ADDRESSES, NAMESPACE, user, password)\n client.add_conf_watcher(nacos_data_id, groupName, nacos_config_callback)\n\n # 启动时,强制同步一次配置\n data_stream = client.load_conf(nacos_data_id, groupName)\n json_config = load_config(data_stream)\n'}},{key:"getCSharpCode",value:function(e){return'/*\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n string serverAddr = "http://localhost:8848";\n string dataId = "'.concat(e.dataId,'";\n string group = "').concat(e.group,'";\n\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Config(x =>\n {\n x.ServerAddresses = new List { serverAddr };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.ConfigUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var configSvc = serviceProvider.GetService();\n\n var content = await configSvc.GetConfig(dataId, group, 3000);\n Console.WriteLine(content);\n\n var listener = new ConfigListener();\n\n await configSvc.AddListener(dataId, group, listener);\n\n var isPublishOk = await configSvc.PublishConfig(dataId, group, "content");\n Console.WriteLine(isPublishOk);\n\n await Task.Delay(3000);\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n\n var isRemoveOk = await configSvc.RemoveConfig(dataId, group);\n Console.WriteLine(isRemoveOk);\n await Task.Delay(3000);\n\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n await Task.Delay(300000);\n }\n\n internal class ConfigListener : IListener\n {\n public void ReceiveConfigInfo(string configInfo)\n {\n Console.WriteLine("receive:" + configInfo);\n }\n }\n}\n\n/*\nRefer to document: https://github.com/nacos-group/nacos-sdk-csharp/tree/dev/samples/MsConfigApp\nDemo for ASP.NET Core Integration\nMsConfigApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.Hosting;\nusing Serilog;\nusing Serilog.Events;\n\npublic class Program\n{\n public static void Main(string[] args)\n {\n Log.Logger = new LoggerConfiguration()\n .Enrich.FromLogContext()\n .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)\n .MinimumLevel.Override("System", LogEventLevel.Warning)\n .MinimumLevel.Debug()\n .WriteTo.Console()\n .CreateLogger();\n\n try\n {\n Log.ForContext().Information("Application starting...");\n CreateHostBuilder(args, Log.Logger).Build().Run();\n }\n catch (System.Exception ex)\n {\n Log.ForContext().Fatal(ex, "Application start-up failed!!");\n }\n finally\n {\n Log.CloseAndFlush();\n }\n }\n\n public static IHostBuilder CreateHostBuilder(string[] args, Serilog.ILogger logger) =>\n Host.CreateDefaultBuilder(args)\n .ConfigureAppConfiguration((context, builder) =>\n {\n var c = builder.Build();\n builder.AddNacosV2Configuration(c.GetSection("NacosConfig"), logAction: x => x.AddSerilog(logger));\n })\n .ConfigureWebHostDefaults(webBuilder =>\n {\n webBuilder.UseStartup().UseUrls("http://*:8787");\n })\n .UseSerilog();\n}\n ')}},{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,e=void 0===e?{}:e;return x.a.createElement("div",null,x.a.createElement(y.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:x.a.createElement("div",null),onClose:this.closeDialog.bind(this)},x.a.createElement("div",{style:{height:500}},x.a.createElement(H.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},x.a.createElement(L.a,{shape:"text",style:{height:40,paddingBottom:10}},x.a.createElement(O,{title:"Java",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),x.a.createElement(O,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigboot_code)}),x.a.createElement(O,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloud_code)}),x.a.createElement(O,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),x.a.createElement(O,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),x.a.createElement(O,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),x.a.createElement(O,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),x.a.createElement(O,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),x.a.createElement("div",{ref:"codepreview"})))))}}]),n}(x.a.Component)).displayName="ShowCodeing",S=S))||S,S=(t(69),t(40)),S=t.n(S),z=(t(756),S.a.Row),D=S.a.Col,W=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(e){return Object(_.a)(this,n),(e=t.call(this,e)).state={visible:!1,title:"",content:"",isok:!0,dataId:"",group:""},e}return Object(b.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,e=void 0===e?{}:e,t=x.a.createElement("div",{style:{textAlign:"right"}},x.a.createElement(c.a,{type:"primary",onClick:this.closeDialog.bind(this)},e.determine));return x.a.createElement("div",null,x.a.createElement(y.a,{visible:this.state.visible,footer:t,style:{width:555},onCancel:this.closeDialog.bind(this),onClose:this.closeDialog.bind(this),title:e.deletetitle},x.a.createElement("div",null,x.a.createElement(z,null,x.a.createElement(D,{span:"4",style:{paddingTop:16}},x.a.createElement(m.a,{type:"".concat(this.state.isok?"success":"delete","-filling"),style:{color:this.state.isok?"green":"red"},size:"xl"})),x.a.createElement(D,{span:"20"},x.a.createElement("div",null,x.a.createElement("h3",null,this.state.isok?e.deletedSuccessfully:e.deleteFailed),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Data ID"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.dataId)),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Group"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.group)),this.state.isok?"":x.a.createElement("p",{style:{color:"red"}},this.state.message)))))))}}]),n}(x.a.Component)).displayName="DeleteDialog",S=S))||S,S=(t(757),t(436)),B=t.n(S),U=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(b.a)(n,[{key:"render",value:function(){var e=this.props,t=e.data,t=void 0===t?{}:t,n=e.height,e=e.locale,a=void 0===e?{}:e;return x.a.createElement("div",null,"notice"===t.modeType?x.a.createElement("div",{"data-spm-click":"gostr=/aliyun;locaid=notice"},x.a.createElement(B.a,{style:{marginBottom:1\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'/*\n* Demo for Nacos\n*/\nimport json\nimport socket\n\nimport nacos\n\n\ndef get_host_ip():\n res = socket.gethostbyname(socket.gethostname())\n return res\n\n\ndef load_config(content):\n _config = json.loads(content)\n return _config\n\n\ndef nacos_config_callback(args):\n content = args[\'raw_content\']\n load_config(content)\n\n\nclass NacosClient:\n service_name = None\n service_port = None\n service_group = None\n\n def __init__(self, server_endpoint, namespace_id, username=None, password=None):\n self.client = nacos.NacosClient(server_endpoint,\n namespace=namespace_id,\n username=username,\n password=password)\n self.endpoint = server_endpoint\n self.service_ip = get_host_ip()\n\n def register(self):\n self.client.add_naming_instance(self.service_name,\n self.service_ip,\n self.service_port,\n group_name=self.service_group)\n\n def modify(self, service_name, service_ip=None, service_port=None):\n self.client.modify_naming_instance(service_name,\n service_ip if service_ip else self.service_ip,\n service_port if service_port else self.service_port)\n\n def unregister(self):\n self.client.remove_naming_instance(self.service_name,\n self.service_ip,\n self.service_port)\n\n def set_service(self, service_name, service_ip, service_port, service_group):\n self.service_name = service_name\n self.service_ip = service_ip\n self.service_port = service_port\n self.service_group = service_group\n\n async def beat_callback(self):\n self.client.send_heartbeat(self.service_name,\n self.service_ip,\n self.service_port)\n\n def load_conf(self, data_id, group):\n return self.client.get_config(data_id=data_id, group=group, no_snapshot=True)\n\n def add_conf_watcher(self, data_id, group, callback):\n self.client.add_config_watcher(data_id=data_id, group=group, cb=callback)\n\n\nif __name__ == \'__main__\':\n nacos_config = {\n "nacos_data_id":"test",\n "nacos_server_ip":"127.0.0.1",\n "nacos_namespace":"public",\n "nacos_groupName":"DEFAULT_GROUP",\n "nacos_user":"nacos",\n "nacos_password":"1234567"\n }\n nacos_data_id = nacos_config["nacos_data_id"]\n SERVER_ADDRESSES = nacos_config["nacos_server_ip"]\n NAMESPACE = nacos_config["nacos_namespace"]\n groupName = nacos_config["nacos_groupName"]\n user = nacos_config["nacos_user"]\n password = nacos_config["nacos_password"]\n # todo 将另一个路由对象(通常定义在其他模块或文件中)合并到主应用(app)中。\n # app.include_router(custom_api.router, tags=[\'test\'])\n service_ip = get_host_ip()\n client = NacosClient(SERVER_ADDRESSES, NAMESPACE, user, password)\n client.add_conf_watcher(nacos_data_id, groupName, nacos_config_callback)\n\n # 启动时,强制同步一次配置\n data_stream = client.load_conf(nacos_data_id, groupName)\n json_config = load_config(data_stream)\n #设定服务\n client.set_service(json_config["service_name"], json_config.get("service_ip", service_ip), service_port, groupName)\n #注册服务\n client.register()\n #下线服务\n client.unregister()\n'}},{key:"getCSharpCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Naming(x =>\n {\n x.ServerAddresses = new List { "http://localhost:8848/" };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.NamingUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var namingSvc = serviceProvider.GetService();\n\n await namingSvc.RegisterInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n await namingSvc.RegisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(await namingSvc.GetAllInstances("').concat(this.record.name,'")));\n\n await namingSvc.DeregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n var listener = new EventListener();\n\n await namingSvc.Subscribe("').concat(this.record.name,'", listener);\n }\n\n internal class EventListener : IEventListener\n {\n public Task OnEvent(IEvent @event)\n {\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(@event));\n return Task.CompletedTask;\n }\n }\n}\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for ASP.NET Core Integration\nApp.csproj\n\n\n \n\n*/\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/appsettings.json\n* appsettings.json\n{\n "nacos": {\n "ServerAddresses": [ "http://localhost:8848" ],\n "DefaultTimeOut": 15000,\n "Namespace": "cs",\n "ServiceName": "App1",\n "GroupName": "DEFAULT_GROUP",\n "ClusterName": "DEFAULT",\n "Port": 0,\n "Weight": 100,\n "RegisterEnabled": true,\n "InstanceEnabled": true,\n "Ephemeral": true,\n "NamingUseRpc": true,\n "NamingLoadCacheAtStart": ""\n }\n}\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/Startup.cs\nusing Nacos.AspNetCore.V2;\n\npublic class Startup\n{\n public Startup(IConfiguration configuration)\n {\n Configuration = configuration;\n }\n\n public IConfiguration Configuration { get; }\n\n public void ConfigureServices(IServiceCollection services)\n {\n // ....\n services.AddNacosAspNet(Configuration);\n }\n\n public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n {\n // ....\n }\n}\n ')}},{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 O.a.createElement("div",null,O.a.createElement(o.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:O.a.createElement("div",null),onClose:this.closeDialog.bind(this)},O.a.createElement("div",{style:{height:500}},O.a.createElement(h.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},O.a.createElement(m.a,{shape:"text",style:{height:40,paddingBottom:10}},O.a.createElement(g,{title:"Java",key:0,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),O.a.createElement(g,{title:"Spring",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.springCode)}),O.a.createElement(g,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigbootCode)}),O.a.createElement(g,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloudCode)}),O.a.createElement(g,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),O.a.createElement(g,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),O.a.createElement(g,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),O.a.createElement(g,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),O.a.createElement(g,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),O.a.createElement("div",{ref:"codepreview"})))))}}]),n}(O.a.Component)).displayName="ShowServiceCodeing",f=f))||f,Y=t(51),I=t(146),A=(t(778),t(22)),R=L.a.Item,H=d.a.Row,F=d.a.Col,z=T.a.Column,d=(0,n.a.config)(((f=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var a;return Object(s.a)(this,n),(a=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return a.queryServiceList()})},a.showcode=function(){setTimeout(function(){return a.queryServiceList()})},a.setNowNameSpace=function(e,t,n){return a.setState({nowNamespaceName:e,nowNamespaceId:t,nowNamespaceDesc:n})},a.rowColor=function(e){return{className:e.healthyInstanceCount?"":"row-bg-red"}},a.editServiceDialog=O.a.createRef(),a.showcode=O.a.createRef(),a.state={loading:!1,total:0,pageSize:10,currentPage:1,dataSource:[],search:{serviceName:Object(p.b)("serviceNameParam")||"",groupName:Object(p.b)("groupNameParam")||""},hasIpCount:!("false"===localStorage.getItem("hasIpCount"))},a.field=new i.a(Object(l.a)(a)),a}return Object(a.a)(n,[{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,e=["hasIpCount=".concat(e),"withInstances=".concat(o),"pageNo=".concat(t),"pageSize=".concat(a),"serviceNameParam=".concat(r.serviceName),"groupNameParam=".concat(r.groupName)];Object(p.f)({serviceNameParam:r.serviceName,groupNameParam:r.groupName}),this.openLoading(),Object(p.e)({url:"v3/console/ns/service/list?".concat(e.join("&")),success:function(e){var e=e.data,e=void 0===e?{}:e,t=e.count,e=e.serviceList;n.setState({dataSource:void 0===e?[]:e,total:void 0===t?0:t,loading:!1})},error:function(){return n.setState({dataSource:[],total:0,currentPage:0,loading:!1})}})}},{key:"showSampleCode",value:function(e){this.showcode.current.getInstance().openDialog(e)}},{key:"querySubscriber",value:function(e){var t=e.name,e=e.groupName,n=this.state.nowNamespaceId;this.props.history.push(Object(D.a)("/subscriberList",{namespace:n,name:t,groupName:e}))}},{key:"handlePageSizeChange",value:function(e){var t=this;this.setState({pageSize:e},function(){return t.queryServiceList()})}},{key:"deleteService",value:function(e){var t=this,n=this.props.locale,n=void 0===n?{}:n,a=n.prompt,n=n.promptDelete;o.a.confirm({title:a,content:n,onOk:function(){Object(p.e)({method:"DELETE",url:"v3/console/ns/service?serviceName=".concat(e.name,"&groupName=").concat(e.groupName),dataType:"json",beforeSend:function(){return t.openLoading()},success:function(e){0!==e.code?r.a.error(e.message||"删除服务失败"):(r.a.success("服务删除成功"),t.queryServiceList())},error:function(e){var t;r.a.error((null==(t=e.data)?void 0:t.responseText)||e.statusText||"请求失败")},complete:function(){return t.closeLoading()}})}})}},{key:"render",value:function(){var a=this,e=this.props.locale,t=void 0===e?{}:e,e=t.pubNoData,n=t.serviceList,r=t.serviceName,o=t.serviceNamePlaceholder,i=t.groupName,s=t.groupNamePlaceholder,l=t.hiddenEmptyService,u=t.query,c=t.create,d=t.operation,f=t.detail,p=t.sampleCode,h=t.deleteAction,m=t.subscriber,g=this.state,y=g.search,v=g.nowNamespaceName,_=g.nowNamespaceId,b=g.nowNamespaceDesc,g=g.hasIpCount,w=this.field,M=w.init,w=w.getValue;return this.init=M,this.getValue=w,O.a.createElement("div",{className:"main-container service-management"},O.a.createElement(Y.a,{title:n,desc:b,namespaceId:_,namespaceName:v,nameSpace:!0}),O.a.createElement(N.a,{setNowNameSpace:this.setNowNameSpace,namespaceCallBack:this.getQueryLater}),O.a.createElement(H,{className:"demo-row",style:{marginBottom:10,padding:0}},O.a.createElement(F,{span:"24"},O.a.createElement(L.a,{inline:!0,field:this.field},O.a.createElement(R,{label:""},O.a.createElement(C.a,{type:"primary",onClick:function(){return a.openEditServiceDialog()}},c)),O.a.createElement(R,{label:r},O.a.createElement(E.a,{placeholder:o,style:{width:200},value:y.serviceName,onChange:function(e){return a.setState({search:Object(x.a)(Object(x.a)({},y),{},{serviceName:e})})},onPressEnter:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}})),O.a.createElement(R,{label:i},O.a.createElement(E.a,{placeholder:s,style:{width:200},value:y.groupName,onChange:function(e){return a.setState({search:Object(x.a)(Object(x.a)({},y),{},{groupName:e})})},onPressEnter:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}})),O.a.createElement(L.a.Item,{label:"".concat(l)},O.a.createElement(S.a,{checked:g,onChange:function(e){return a.setState({hasIpCount:e,currentPage:1},function(){localStorage.setItem("hasIpCount",e),a.queryServiceList()})}})),O.a.createElement(R,{label:""},O.a.createElement(C.a,{type:"primary",onClick:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})},style:{marginRight:10}},u))))),O.a.createElement(H,{style:{padding:0}},O.a.createElement(F,{span:"24",style:{padding:0}},O.a.createElement(T.a,{dataSource:this.state.dataSource,locale:{empty:e},rowProps:function(e){return a.rowColor(e)},loading:this.state.loading},O.a.createElement(z,{title:t.columnServiceName,dataIndex:"name"}),O.a.createElement(z,{title:t.groupName,dataIndex:"groupName"}),O.a.createElement(z,{title:t.columnClusterCount,dataIndex:"clusterCount"}),O.a.createElement(z,{title:t.columnIpCount,dataIndex:"ipCount"}),O.a.createElement(z,{title:t.columnHealthyInstanceCount,dataIndex:"healthyInstanceCount"}),O.a.createElement(z,{title:t.columnTriggerFlag,dataIndex:"triggerFlag"}),O.a.createElement(z,{title:d,align:"center",cell:function(e,t,n){return O.a.createElement("div",null,O.a.createElement("a",{onClick:function(){var e=n.name,t=n.groupName;a.props.history.push(Object(D.a)("/serviceDetail",{name:e,groupName:t}))},style:{marginRight:5}},f),O.a.createElement("span",{style:{marginRight:5}},"|"),O.a.createElement("a",{style:{marginRight:5},onClick:function(){return a.showSampleCode(n)}},p),O.a.createElement("span",{style:{marginRight:5}},"|"),O.a.createElement("a",{style:{marginRight:5},onClick:function(){return a.querySubscriber(n)}},m),O.a.createElement("span",{style:{marginRight:5}},"|"),O.a.createElement("a",{onClick:function(){return a.deleteService(n)},style:{marginRight:5}},h))}})))),O.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},O.a.createElement(k.a,{current:this.state.currentPage,pageSizeList:A.f,pageSizePosition:"start",pageSizeSelector:"dropdown",popupProps:{align:"bl tl"},total:this.state.total,pageSize:this.state.pageSize,totalRender:function(e){return O.a.createElement(I.a,{locale:t,total:e})},onPageSizeChange:function(e){return a.handlePageSizeChange(e)},onChange:function(e){return a.setState({currentPage:e},function(){return a.queryServiceList()})}})),O.a.createElement(j,{ref:this.showcode}),O.a.createElement(P.a,{ref:this.editServiceDialog,openLoading:function(){return a.openLoading()},closeLoading:function(){return a.closeLoading()},queryServiceList:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}}))}}]),n}(O.a.Component)).displayName="ServiceList",t=f))||t;e.a=d},function(e,t,n){"use strict";n(67);var a=n(47),u=n.n(a),a=(n(35),n(18)),c=n.n(a),a=(n(66),n(21)),d=n.n(a),a=(n(34),n(20)),f=n.n(a),a=(n(93),n(55)),p=n.n(a),a=(n(38),n(2)),h=n.n(a),a=(n(37),n(10)),m=n.n(a),i=n(13),s=n(14),l=n(23),g=n(16),y=n(15),a=(n(27),n(6)),a=n.n(a),r=n(0),v=n.n(r),r=n(30),_=n(45),b=n(53),w=n(32),o=(n(49),n(28)),M=n.n(o),k=(n(168),h.a.Item),S={labelCol:{fixedSpan:4},wrapperCol:{span:19}},E=(0,a.a.config)(((o=function(e){Object(g.a)(o,e);var r=Object(y.a)(o);function o(){var e;Object(i.a)(this,o);for(var t=arguments.length,n=new Array(t),a=0;ao&&v.a.createElement(u.a,{className:"users-pagination",current:i,total:n.totalCount,pageSize:o,onChange:function(e){return t.setState({pageNo:e},function(){return t.getUsers()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.d)(e).then(function(e){return t.setState({pageNo:1},function(){return t.getUsers()}),e})},onCancel:function(){return t.colseCreateUser()}}),v.a.createElement(x.a,{visible:l,username:e,onOk:function(e){return Object(_.l)(e).then(function(e){return t.getUsers(),e})},onCancel:function(){return t.setState({passwordResetUser:void 0,passwordResetUserVisible:!1})}}))}}]),n}(v.a.Component)).displayName="UserManagement",n=o))||n)||n;t.a=r},function(e,t,n){"use strict";n(46);var a=n(24),l=n.n(a),a=(n(67),n(47)),u=n.n(a),a=(n(35),n(18)),c=n.n(a),d=n(32),a=(n(66),n(21)),f=n.n(a),a=(n(34),n(20)),p=n.n(a),a=(n(93),n(55)),h=n.n(a),a=(n(38),n(2)),m=n.n(a),a=(n(37),n(10)),g=n.n(a),i=n(13),s=n(14),y=n(23),v=n(16),_=n(15),a=(n(27),n(6)),a=n.n(a),r=n(0),b=n.n(r),r=n(30),w=n(45),o=n(86),M=n(53),k=(n(49),n(28)),S=n.n(k),k=(n(59),n(29)),E=n.n(k),x=m.a.Item,C=E.a.Option,T={labelCol:{fixedSpan:4},wrapperCol:{span:19}},L=Object(r.b)(function(e){return{namespaces:e.namespace.namespaces}},{getNamespaces:o.b,searchRoles:w.m})(k=(0,a.a.config)(((k=function(e){Object(v.a)(o,e);var r=Object(_.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ai&&b.a.createElement(u.a,{className:"users-pagination",current:s,total:t.totalCount,pageSize:i,onChange:function(e){return a.setState({pageNo:e},function(){return a.getPermissions()})}}),b.a.createElement(L,{visible:n,onOk:function(t){return Object(w.a)(t).then(function(e){e?l.a.error({content:o.checkPermission}):Object(w.b)(t).then(function(e){return a.setState({pageNo:1},function(){return a.getPermissions()}),e})})},onCancel:function(){return a.colseCreatePermission()}}))}}]),n}(b.a.Component)).displayName="PermissionsManagement",n=k))||n)||n);t.a=r},function(e,t,n){"use strict";n(67);var a=n(47),l=n.n(a),a=(n(35),n(18)),u=n.n(a),a=(n(66),n(21)),c=n.n(a),a=(n(34),n(20)),d=n.n(a),a=(n(93),n(55)),f=n.n(a),a=(n(38),n(2)),p=n.n(a),a=(n(37),n(10)),h=n.n(a),i=n(13),s=n(14),m=n(23),g=n(16),y=n(15),a=(n(27),n(6)),a=n.n(a),r=n(0),v=n.n(r),r=n(30),_=n(45),b=n(53),o=(n(59),n(29)),w=n.n(o),o=(n(49),n(28)),M=n.n(o),k=p.a.Item,S={labelCol:{fixedSpan:4},wrapperCol:{span:19}},E=Object(r.b)(function(e){return{users:e.authority.users}},{searchUsers:_.n})(o=(0,a.a.config)(((o=function(e){Object(g.a)(o,e);var r=Object(y.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ao&&v.a.createElement(l.a,{className:"users-pagination",current:i,total:t.totalCount,pageSize:o,onChange:function(e){return a.setState({pageNo:e},function(){return a.getRoles()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.c)(e).then(function(e){return a.getRoles(),e})},onCancel:function(){return a.colseCreateRole()}}))}}]),n}(v.a.Component)).displayName="RolesManagement",n=o))||n)||n);t.a=r},function(e,t,n){"use strict";n(35);function l(e){var t=void 0===(t=localStorage.token)?"{}":t,t=(Object(_.c)(t)&&JSON.parse(t)||{}).globalAdmin,n=[];return"naming"===e?n.push(b):"config"===e?n.push(w):n.push(w,b),t&&n.push(M),n.push(k),n.push(S),n.push(E),n.filter(function(e){return e})}var a=n(18),u=n.n(a),a=(n(46),n(24)),c=n.n(a),a=(n(43),n(26)),d=n.n(a),r=n(13),o=n(14),i=n(16),s=n(15),a=(n(27),n(6)),a=n.n(a),f=n(12),p=(n(84),n(50)),h=n.n(p),p=n(0),m=n.n(p),p=n(39),g=n(30),y=n(108),v=n(52),_=n(48),b={key:"serviceManagementVirtual",children:[{key:"serviceManagement",url:"/serviceManagement"},{key:"subscriberList",url:"/subscriberList"}]},w={key:"configurationManagementVirtual",children:[{key:"configurationManagement",url:"/configurationManagement"},{key:"historyRollback",url:"/historyRollback"},{key:"listeningToQuery",url:"/listeningToQuery"}]},M={key:"authorityControl",children:[{key:"userList",url:"/userManagement"},{key:"roleManagement",url:"/rolesManagement"},{key:"privilegeManagement",url:"/permissionsManagement"}]},k={key:"namespace",url:"/namespace"},S={key:"clusterManagementVirtual",children:[{key:"clusterManagement",url:"/clusterManagement"}]},E={key:"settingCenter",url:"/settingCenter"},x=(n(386),h.a.SubMenu),C=h.a.Item,p=(n=Object(g.b)(function(e){return Object(f.a)(Object(f.a)({},e.locale),e.base)},{getState:v.e,getNotice:v.d,getGuide:v.c}),g=a.a.config,Object(p.g)(a=n(a=g(((v=function(e){Object(i.a)(n,e);var t=Object(s.a)(n);function n(e){return Object(r.a)(this,n),(e=t.call(this,e)).state={visible:!0},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.props.getState(),this.props.getNotice(),this.props.getGuide()}},{key:"goBack",value:function(){this.props.history.goBack()}},{key:"navTo",value:function(e){var t=this.props.location.search,t=new URLSearchParams(t);t.set("namespace",window.nownamespace),t.set("namespaceShowName",window.namespaceShowName),this.props.history.push([e,"?",t.toString()].join(""))}},{key:"isCurrentPath",value:function(e){return e===this.props.location.pathname?"current-path next-selected":void 0}},{key:"defaultOpenKeys",value:function(){for(var t=this,e=l(this.props.functionMode),n=0,a=e.length;nthis.state.pageSize&&S.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},S.a.createElement(v.a,{current:this.state.pageNo,total:a,pageSize:this.state.pageSize,onChange:function(e){return t.setState({pageNo:e},function(){return t.querySubscriberList()})}}))))}}]),n}(S.a.Component)).displayName="SubscriberList",d=n))||d)||d;t.a=f},function(e,t,n){"use strict";n(54);var a=n(36),c=n.n(a),a=(n(67),n(47)),d=n.n(a),a=(n(179),n(78)),f=n.n(a),a=(n(37),n(10)),p=n.n(a),a=(n(34),n(20)),h=n.n(a),a=(n(35),n(18)),r=n.n(a),a=(n(46),n(24)),o=n.n(a),a=(n(49),n(28)),i=n.n(a),s=n(13),l=n(14),u=n(23),m=n(16),g=n(15),a=(n(27),n(6)),a=n.n(a),y=(n(421),n(123)),v=n.n(y),y=(n(66),n(21)),_=n.n(y),y=(n(69),n(40)),y=n.n(y),b=(n(38),n(2)),w=n.n(b),b=n(0),M=n.n(b),k=n(1),b=n(144),S=n.n(b),E=n(51),x=(n(781),w.a.Item),C=y.a.Row,T=y.a.Col,L=_.a.Column,O=v.a.Panel,y=(0,a.a.config)(((b=function(e){Object(m.a)(a,e);var t=Object(g.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return n.queryClusterStateList()})},n.setNowNameSpace=function(e,t){return n.setState({nowNamespaceName:e,nowNamespaceId:t})},n.rowColor=function(e){return{className:(e.voteFor,"")}},n.state={loading:!1,total:0,pageSize:10,currentPage:1,keyword:"",dataSource:[]},n.field=new i.a(Object(u.a)(n)),n}return Object(l.a)(a,[{key:"componentDidMount",value:function(){this.getQueryLater()}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"queryClusterStateList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.keyword,e=e.withInstances,e=["withInstances=".concat(void 0!==e&&e),"pageNo=".concat(t),"pageSize=".concat(a),"keyword=".concat(r)];Object(k.e)({url:"v3/console/core/cluster/nodes?".concat(e.join("&")),beforeSend:function(){return n.openLoading()},success:function(){var e=0this.state.pageSize&&M.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},M.a.createElement(d.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}(M.a.Component)).displayName="ClusterNodeList",n=b))||n;t.a=y},function(e,t,n){"use strict";n(34);var a=n(20),i=n.n(a),s=n(13),l=n(14),u=n(16),c=n(15),a=(n(27),n(6)),a=n.n(a),r=n(12),o=(n(114),n(75)),o=n.n(o),d=n(0),f=n.n(d),p=(n(784),n(51)),d=n(87),h=n(148),m=n(149),g=n(30),y=n(22),v=o.a.Group,g=Object(g.b)(function(e){return Object(r.a)({},e.locale)},{changeLanguage:d.a,changeTheme:h.a,changeNameShow:m.a})(o=(0,a.a.config)(((n=function(e){Object(u.a)(o,e);var r=Object(c.a)(o);function o(e){Object(s.a)(this,o),e=r.call(this,e);var t=localStorage.getItem(y.p),n=localStorage.getItem(y.j),a=localStorage.getItem(y.g);return e.state={theme:"dark"===t?"dark":"light",language:"en-US"===a?"en-US":"zh-CN",nameShow:"select"===n?"select":"label"},e}return Object(l.a)(o,[{key:"newTheme",value:function(e){this.setState({theme:e})}},{key:"newLanguage",value:function(e){this.setState({language:e})}},{key:"newNameShow",value:function(e){this.setState({nameShow:e})}},{key:"submit",value:function(){var e=this.props,t=e.changeLanguage,n=e.changeTheme,e=e.changeNameShow,a=this.state.language,r=this.state.theme,o=this.state.nameShow;t(a),n(r),e(o)}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=[{value:"light",label:e.settingLight},{value:"dark",label:e.settingDark}],n=[{value:"select",label:e.settingShowSelect},{value:"label",label:e.settingShowLabel}];return f.a.createElement(f.a.Fragment,null,f.a.createElement(p.a,{title:e.settingTitle}),f.a.createElement("div",{className:"setting-box"},f.a.createElement("div",{className:"text-box"},f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingTheme),f.a.createElement(v,{dataSource:t,value:this.state.theme,onChange:this.newTheme.bind(this)})),f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingLocale),f.a.createElement(v,{dataSource:[{value:"en-US",label:"English"},{value:"zh-CN",label:"中文"}],value:this.state.language,onChange:this.newLanguage.bind(this)})),f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingShow),f.a.createElement(v,{dataSource:n,value:this.state.nameShow,onChange:this.newNameShow.bind(this)}))),f.a.createElement(i.a,{type:"primary",onClick:this.submit.bind(this)},e.settingSubmit)))}}]),o}(f.a.Component)).displayName="SettingCenter",o=n))||o)||o;t.a=g},function(e,t,V){"use strict";V.r(t),function(e){V(54);var t=V(36),a=V.n(t),t=(V(27),V(6)),r=V.n(t),o=V(13),i=V(14),s=V(16),l=V(15),n=V(12),t=V(0),u=V.n(t),t=V(25),t=V.n(t),c=V(125),d=V(429),f=V(440),p=V(30),h=V(39),m=V(73),g=(V(477),V(449)),y=V(22),v=V(450),_=V(451),b=V(443),w=V(452),M=V(453),k=V(444),S=V(454),E=V(455),x=V(456),C=V(457),T=V(458),L=V(441),O=V(445),D=V(442),N=V(459),P=V(460),j=V(446),I=V(447),A=V(448),R=V(438),H=V(461),Y=V(439),F=V(87),z=V(52),W=V(148),B=V(149),e=(V(785),e.hot,localStorage.getItem(y.g)||localStorage.setItem(y.g,"zh-CN"===navigator.language?"zh-CN":"en-US"),Object(c.b)(Object(n.a)(Object(n.a)({},Y.a),{},{routing:d.routerReducer}))),Y=Object(c.d)(e,Object(c.c)(Object(c.a)(f.a),window[y.l]?window[y.l]():function(e){return e})),U=[{path:"/",exact:!0,render:function(){return u.a.createElement(h.a,{to:"/welcome"})}},{path:"/welcome",component:R.a},{path:"/namespace",component:b.a},{path:"/newconfig",component:w.a},{path:"/configsync",component:M.a},{path:"/configdetail",component:k.a},{path:"/configeditor",component:S.a},{path:"/historyDetail",component:E.a},{path:"/configRollback",component:x.a},{path:"/historyRollback",component:C.a},{path:"/listeningToQuery",component:T.a},{path:"/configurationManagement",component:L.a},{path:"/serviceManagement",component:O.a},{path:"/serviceDetail",component:D.a},{path:"/subscriberList",component:N.a},{path:"/clusterManagement",component:P.a},{path:"/userManagement",component:j.a},{path:"/rolesManagement",component:A.a},{path:"/permissionsManagement",component:I.a},{path:"/settingCenter",component:H.a}],e=Object(p.b)(function(e){return Object(n.a)(Object(n.a)({},e.locale),e.base)},{changeLanguage:F.a,getState:z.e,changeTheme:W.a,changeNameShow:B.a})(d=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){return Object(o.a)(this,n),(e=t.call(this,e)).state={shownotice:"none",noticecontent:"",nacosLoading:{}},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){this.props.getState();var e=localStorage.getItem(y.g),t=localStorage.getItem(y.p),n=localStorage.getItem(y.j);this.props.changeLanguage(e),this.props.changeTheme(t),this.props.changeNameShow(n)}},{key:"router",get:function(){var e=this.props,t=e.loginPageEnabled,e=e.consoleUiEnable;return u.a.createElement(m.a,null,u.a.createElement(h.d,null,t&&"false"===t?null:u.a.createElement(h.b,{path:"/login",component:v.a}),u.a.createElement(h.b,{path:"/register",component:_.a}),u.a.createElement(g.a,null,e&&"true"===e&&U.map(function(e){return u.a.createElement(h.b,Object.assign({key:e.path},e))}))))}},{key:"render",value:function(){var e=this.props,t=e.locale,e=e.loginPageEnabled;return u.a.createElement(a.a,Object.assign({className:"nacos-loading",shape:"flower",tip:"loading...",visible:!e,fullScreen:!0},this.state.nacosLoading),u.a.createElement(r.a,{locale:t},this.router))}}]),n}(u.a.Component))||d;t.a.render(u.a.createElement(p.a,{store:Y},u.a.createElement(e,null)),document.getElementById("root"))}.call(this,V(463)(e))},function(e,t){e.exports=function(e){var t;return e.webpackPolyfill||((t=Object.create(e)).children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1),t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(I,e,t){"use strict"; /** @license React v16.14.0 * react.production.min.js *